summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rwxr-xr-xbin/createpackage.pl33
-rwxr-xr-xbin/syncqt3
-rw-r--r--config.tests/symbian/simple/main.cpp46
-rw-r--r--config.tests/symbian/simple/simple.pro4
-rwxr-xr-xconfig.tests/unix/bsymbolic_functions.test3
-rwxr-xr-xconfigure115
-rwxr-xr-xconfigure.exebin1319424 -> 1316864 bytes
-rw-r--r--demos/declarative/calculator/calculator.qml4
-rw-r--r--demos/declarative/flickr/common/ScrollBar.qml2
-rw-r--r--demos/declarative/flickr/common/Slider.qml2
-rw-r--r--demos/declarative/flickr/flickr.qml4
-rw-r--r--demos/declarative/flickr/mobile/GridDelegate.qml8
-rw-r--r--demos/declarative/flickr/mobile/ImageDetails.qml18
-rw-r--r--demos/declarative/flickr/mobile/TitleBar.qml15
-rw-r--r--demos/declarative/flickr/mobile/images/quit.pngbin0 -> 2369 bytes
-rw-r--r--demos/declarative/minehunt/MinehuntCore/Tile.qml2
-rw-r--r--demos/declarative/minehunt/minehunt.cpp2
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml10
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/Button.qml4
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml40
-rw-r--r--demos/declarative/photoviewer/i18n/base.ts30
-rw-r--r--demos/declarative/photoviewer/i18n/qml_fr.qmbin0 -> 268 bytes
-rw-r--r--demos/declarative/photoviewer/i18n/qml_fr.ts30
-rw-r--r--demos/declarative/photoviewer/photoviewer.qml6
-rw-r--r--demos/declarative/rssnews/content/BusyIndicator.qml12
-rw-r--r--demos/declarative/rssnews/content/CategoryDelegate.qml41
-rw-r--r--demos/declarative/rssnews/content/NewsDelegate.qml29
-rw-r--r--demos/declarative/rssnews/content/RssFeeds.qml18
-rw-r--r--demos/declarative/rssnews/content/ScrollBar.qml66
-rw-r--r--demos/declarative/rssnews/content/images/busy.pngbin0 -> 2629 bytes
-rw-r--r--demos/declarative/rssnews/content/images/scrollbar.pngbin0 -> 161 bytes
-rw-r--r--demos/declarative/rssnews/rssnews.qml52
-rw-r--r--demos/declarative/rssnews/rssnews.qmlproject (renamed from examples/declarative/xmlhttprequest/xmlhttprequest.qmlproject)0
-rwxr-xr-xdemos/declarative/samegame/SamegameCore/samegame.js9
-rw-r--r--demos/declarative/snake/content/snake.js18
-rw-r--r--demos/declarative/snake/snake.qml6
-rw-r--r--demos/declarative/twitter/TwitterCore/FatDelegate.qml2
-rw-r--r--demos/declarative/twitter/TwitterCore/HomeTitleBar.qml4
-rw-r--r--demos/declarative/twitter/TwitterCore/MultiTitleBar.qml2
-rw-r--r--demos/declarative/twitter/TwitterCore/TitleBar.qml2
-rw-r--r--demos/declarative/twitter/twitter.qml2
-rw-r--r--demos/declarative/webbrowser/content/Button.qml18
-rw-r--r--demos/declarative/webbrowser/content/FlickableWebView.qml43
-rw-r--r--demos/declarative/webbrowser/content/Header.qml69
-rw-r--r--demos/declarative/webbrowser/content/RectSoftShadow.qml32
-rw-r--r--demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml113
-rw-r--r--demos/declarative/webbrowser/content/ScrollBar.qml66
-rw-r--r--demos/declarative/webbrowser/content/UrlInput.qml44
-rw-r--r--demos/declarative/webbrowser/content/fieldtext/FieldText.qml157
-rw-r--r--demos/declarative/webbrowser/content/fieldtext/pics/cancel.pngbin1038 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/fieldtext/pics/ok.pngbin655 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/addressbar-filled.pngbin694 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/addressbar-filled.sci6
-rw-r--r--demos/declarative/webbrowser/content/pics/addressbar.pngbin467 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/addressbar.sci6
-rw-r--r--demos/declarative/webbrowser/content/pics/back-disabled.pngbin475 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/back.pngbin707 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/display.pngbin0 -> 998 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/edit-delete.pngbin0 -> 1333 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/footer.pngbin200 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/footer.sci6
-rw-r--r--demos/declarative/webbrowser/content/pics/forward-disabled.pngbin471 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/forward.pngbin682 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/go-next-view.pngbin0 -> 1187 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/go-previous-view.pngbin0 -> 1226 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/header.pngbin193 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/reload.pngbin1283 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/scrollbar.pngbin0 -> 161 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/softshadow-bottom.pngbin186 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/softshadow-left.pngbin598 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/softshadow-left.sci5
-rw-r--r--demos/declarative/webbrowser/content/pics/softshadow-right.pngbin636 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/softshadow-right.sci5
-rw-r--r--demos/declarative/webbrowser/content/pics/softshadow-top.pngbin186 -> 0 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/titlebar-bg.pngbin0 -> 213 bytes
-rw-r--r--demos/declarative/webbrowser/content/pics/view-refresh.pngbin0 -> 2182 bytes
-rw-r--r--demos/declarative/webbrowser/webbrowser.qml181
-rw-r--r--demos/demos.pro4
-rw-r--r--demos/embedded/anomaly/src/ControlStrip.cpp12
-rw-r--r--demos/embedded/flightinfo/flightinfo.cpp60
-rw-r--r--demos/embedded/fluidlauncher/config_s60/config.xml1
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.pro11
-rw-r--r--demos/embedded/fluidlauncher/screenshots/spectrum.pngbin0 -> 21771 bytes
-rw-r--r--demos/embedded/weatherinfo/weatherinfo.cpp17
-rw-r--r--demos/multimedia/multimedia.pro3
-rw-r--r--demos/multimedia/player/main.cpp54
-rw-r--r--demos/multimedia/player/player.cpp372
-rw-r--r--demos/multimedia/player/player.h114
-rw-r--r--demos/multimedia/player/player.pro29
-rw-r--r--demos/multimedia/player/playercontrols.cpp205
-rw-r--r--demos/multimedia/player/playercontrols.h107
-rw-r--r--demos/multimedia/player/playlistmodel.cpp160
-rw-r--r--demos/multimedia/player/playlistmodel.h95
-rw-r--r--demos/multimedia/player/videowidget.cpp78
-rw-r--r--demos/multimedia/player/videowidget.h66
-rw-r--r--demos/qtdemo/xml/examples.xml1
-rw-r--r--demos/spectrum/3rdparty/fftreal/Array.h97
-rw-r--r--demos/spectrum/3rdparty/fftreal/Array.hpp98
-rw-r--r--demos/spectrum/3rdparty/fftreal/DynArray.h100
-rw-r--r--demos/spectrum/3rdparty/fftreal/DynArray.hpp143
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTReal.dsp273
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTReal.dsw29
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTReal.h142
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTReal.hpp916
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTRealFixLen.h130
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTRealFixLen.hpp322
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTRealFixLenParam.h93
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTRealPassDirect.h96
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTRealPassDirect.hpp204
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTRealPassInverse.h101
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTRealPassInverse.hpp229
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTRealSelect.h77
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTRealSelect.hpp62
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTRealUseTrigo.h101
-rw-r--r--demos/spectrum/3rdparty/fftreal/FFTRealUseTrigo.hpp91
-rw-r--r--demos/spectrum/3rdparty/fftreal/OscSinCos.h106
-rw-r--r--demos/spectrum/3rdparty/fftreal/OscSinCos.hpp122
-rw-r--r--demos/spectrum/3rdparty/fftreal/TestAccuracy.h105
-rw-r--r--demos/spectrum/3rdparty/fftreal/TestAccuracy.hpp472
-rw-r--r--demos/spectrum/3rdparty/fftreal/TestHelperFixLen.h93
-rw-r--r--demos/spectrum/3rdparty/fftreal/TestHelperFixLen.hpp93
-rw-r--r--demos/spectrum/3rdparty/fftreal/TestHelperNormal.h94
-rw-r--r--demos/spectrum/3rdparty/fftreal/TestHelperNormal.hpp99
-rw-r--r--demos/spectrum/3rdparty/fftreal/TestSpeed.h95
-rw-r--r--demos/spectrum/3rdparty/fftreal/TestSpeed.hpp223
-rw-r--r--demos/spectrum/3rdparty/fftreal/TestWhiteNoiseGen.h95
-rw-r--r--demos/spectrum/3rdparty/fftreal/TestWhiteNoiseGen.hpp91
-rw-r--r--demos/spectrum/3rdparty/fftreal/bwins/fftrealu.def5
-rw-r--r--demos/spectrum/3rdparty/fftreal/def.h60
-rw-r--r--demos/spectrum/3rdparty/fftreal/eabi/fftrealu.def7
-rw-r--r--demos/spectrum/3rdparty/fftreal/fftreal.pas661
-rw-r--r--demos/spectrum/3rdparty/fftreal/fftreal.pro41
-rw-r--r--demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp54
-rw-r--r--demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h63
-rw-r--r--demos/spectrum/3rdparty/fftreal/license.txt459
-rw-r--r--demos/spectrum/3rdparty/fftreal/readme.txt242
-rw-r--r--demos/spectrum/3rdparty/fftreal/stopwatch/ClockCycleCounter.cpp285
-rw-r--r--demos/spectrum/3rdparty/fftreal/stopwatch/ClockCycleCounter.h124
-rw-r--r--demos/spectrum/3rdparty/fftreal/stopwatch/ClockCycleCounter.hpp150
-rw-r--r--demos/spectrum/3rdparty/fftreal/stopwatch/Int64.h71
-rw-r--r--demos/spectrum/3rdparty/fftreal/stopwatch/StopWatch.cpp101
-rw-r--r--demos/spectrum/3rdparty/fftreal/stopwatch/StopWatch.h110
-rw-r--r--demos/spectrum/3rdparty/fftreal/stopwatch/StopWatch.hpp83
-rw-r--r--demos/spectrum/3rdparty/fftreal/stopwatch/def.h65
-rw-r--r--demos/spectrum/3rdparty/fftreal/stopwatch/fnc.h67
-rw-r--r--demos/spectrum/3rdparty/fftreal/stopwatch/fnc.hpp85
-rw-r--r--demos/spectrum/3rdparty/fftreal/test.cpp267
-rw-r--r--demos/spectrum/3rdparty/fftreal/test_fnc.h53
-rw-r--r--demos/spectrum/3rdparty/fftreal/test_fnc.hpp56
-rw-r--r--demos/spectrum/3rdparty/fftreal/test_settings.h45
-rw-r--r--demos/spectrum/3rdparty/fftreal/testapp.dpr150
-rw-r--r--demos/spectrum/README.txt103
-rw-r--r--demos/spectrum/TODO.txt34
-rw-r--r--demos/spectrum/app/app.pro121
-rw-r--r--demos/spectrum/app/engine.cpp752
-rw-r--r--demos/spectrum/app/engine.h311
-rw-r--r--demos/spectrum/app/frequencyspectrum.cpp90
-rw-r--r--demos/spectrum/app/frequencyspectrum.h95
-rw-r--r--demos/spectrum/app/images/record.pngbin0 -> 670 bytes
-rw-r--r--demos/spectrum/app/images/settings.pngbin0 -> 3649 bytes
-rw-r--r--demos/spectrum/app/levelmeter.cpp143
-rw-r--r--demos/spectrum/app/levelmeter.h113
-rw-r--r--demos/spectrum/app/main.cpp58
-rw-r--r--demos/spectrum/app/mainwidget.cpp455
-rw-r--r--demos/spectrum/app/mainwidget.h138
-rw-r--r--demos/spectrum/app/progressbar.cpp141
-rw-r--r--demos/spectrum/app/progressbar.h71
-rw-r--r--demos/spectrum/app/settingsdialog.cpp149
-rw-r--r--demos/spectrum/app/settingsdialog.h84
-rw-r--r--demos/spectrum/app/spectrograph.cpp242
-rw-r--r--demos/spectrum/app/spectrograph.h96
-rw-r--r--demos/spectrum/app/spectrum.h141
-rw-r--r--demos/spectrum/app/spectrum.qrc7
-rw-r--r--demos/spectrum/app/spectrum.sh9
-rw-r--r--demos/spectrum/app/spectrumanalyser.cpp280
-rw-r--r--demos/spectrum/app/spectrumanalyser.h190
-rw-r--r--demos/spectrum/app/tonegenerator.cpp92
-rw-r--r--demos/spectrum/app/tonegenerator.h53
-rw-r--r--demos/spectrum/app/tonegeneratordialog.cpp148
-rw-r--r--demos/spectrum/app/tonegeneratordialog.h78
-rw-r--r--demos/spectrum/app/utils.cpp138
-rw-r--r--demos/spectrum/app/utils.h109
-rw-r--r--demos/spectrum/app/waveform.cpp419
-rw-r--r--demos/spectrum/app/waveform.h198
-rw-r--r--demos/spectrum/app/wavfile.cpp247
-rw-r--r--demos/spectrum/app/wavfile.h80
-rw-r--r--demos/spectrum/spectrum.pri37
-rw-r--r--demos/spectrum/spectrum.pro37
-rw-r--r--dist/changes-4.7.0181
-rw-r--r--doc/doc.pri4
-rw-r--r--doc/src/classes.qdoc6
-rw-r--r--doc/src/declarative/advtutorial.qdoc56
-rw-r--r--doc/src/declarative/animation.qdoc12
-rw-r--r--doc/src/declarative/basictypes.qdoc9
-rw-r--r--doc/src/declarative/codingconventions.qdoc7
-rw-r--r--doc/src/declarative/declarativeui.qdoc66
-rw-r--r--doc/src/declarative/dynamicobjects.qdoc199
-rw-r--r--doc/src/declarative/elements.qdoc12
-rw-r--r--doc/src/declarative/example-slideswitch.qdoc20
-rw-r--r--doc/src/declarative/examples.qdoc135
-rw-r--r--doc/src/declarative/extending-examples.qdoc304
-rw-r--r--doc/src/declarative/extending.qdoc51
-rw-r--r--doc/src/declarative/focus.qdoc30
-rw-r--r--doc/src/declarative/globalobject.qdoc177
-rw-r--r--doc/src/declarative/integrating.qdoc50
-rw-r--r--doc/src/declarative/pics/listview-highlight.png (renamed from doc/src/declarative/pics/trivialListView.png)bin5918 -> 5918 bytes
-rw-r--r--doc/src/declarative/pics/listview-simple.pngbin0 -> 5351 bytes
-rw-r--r--doc/src/declarative/qdeclarativeintro.qdoc5
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc56
-rw-r--r--doc/src/declarative/qmlruntime.qdoc66
-rw-r--r--doc/src/declarative/qtbinding.qdoc26
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h55
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro13
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/main.qml32
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/qmldir1
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h54
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp61
-rw-r--r--doc/src/declarative/tutorial.qdoc29
-rw-r--r--doc/src/development/assistant-manual.qdoc2
-rw-r--r--doc/src/development/developing-on-mac.qdoc5
-rw-r--r--doc/src/development/qmake-manual.qdoc1
-rw-r--r--doc/src/diagrams/modelview-move-rows-1.sk271
-rw-r--r--doc/src/diagrams/modelview-move-rows-2.sk271
-rw-r--r--doc/src/diagrams/modelview-move-rows-3.sk136
-rw-r--r--doc/src/diagrams/modelview-move-rows-4.sk136
-rw-r--r--doc/src/examples/elasticnodes.qdoc124
-rw-r--r--doc/src/examples/fingerpaint.qdoc2
-rw-r--r--doc/src/examples/padnavigator.qdoc552
-rw-r--r--doc/src/examples/pinchzoom.qdoc2
-rw-r--r--doc/src/examples/qml-examples.qdoc307
-rw-r--r--doc/src/examples/qml-extending.qdoc302
-rw-r--r--doc/src/examples/qml-folderlistmodel.qdoc144
-rw-r--r--doc/src/examples/qml-rssnews.qdoc49
-rw-r--r--doc/src/files-and-resources/datastreamformat.qdoc3
-rw-r--r--doc/src/files-and-resources/resources.qdoc2
-rw-r--r--doc/src/frameworks-technologies/accessible.qdoc6
-rw-r--r--doc/src/frameworks-technologies/activeqt-container.qdoc7
-rw-r--r--doc/src/frameworks-technologies/activeqt-server.qdoc6
-rw-r--r--doc/src/frameworks-technologies/activeqt.qdoc6
-rw-r--r--doc/src/frameworks-technologies/animation.qdoc1
-rw-r--r--doc/src/frameworks-technologies/containers.qdoc2
-rw-r--r--doc/src/frameworks-technologies/dbus-adaptors.qdoc2
-rw-r--r--doc/src/frameworks-technologies/dbus-intro.qdoc2
-rw-r--r--doc/src/frameworks-technologies/desktop-integration.qdoc6
-rw-r--r--doc/src/frameworks-technologies/dnd.qdoc10
-rw-r--r--doc/src/frameworks-technologies/eventsandfilters.qdoc3
-rw-r--r--doc/src/frameworks-technologies/gestures.qdoc7
-rw-r--r--doc/src/frameworks-technologies/graphicsview.qdoc5
-rw-r--r--doc/src/frameworks-technologies/implicit-sharing.qdoc2
-rw-r--r--doc/src/frameworks-technologies/ipc.qdoc3
-rw-r--r--doc/src/frameworks-technologies/phonon.qdoc6
-rw-r--r--doc/src/frameworks-technologies/threads.qdoc1
-rw-r--r--doc/src/frameworks-technologies/unicode.qdoc2
-rw-r--r--doc/src/getting-started/demos.qdoc7
-rw-r--r--doc/src/getting-started/examples.qdoc78
-rw-r--r--doc/src/getting-started/installation.qdoc18
-rw-r--r--doc/src/getting-started/known-issues.qdoc10
-rw-r--r--doc/src/howtos/HWacceleration.qdoc15
-rw-r--r--doc/src/howtos/accelerators.qdoc1
-rw-r--r--doc/src/howtos/appicon.qdoc1
-rw-r--r--doc/src/howtos/guibooks.qdoc1
-rw-r--r--doc/src/howtos/openvg.qdoc21
-rw-r--r--doc/src/howtos/qtdesigner.qdoc1
-rw-r--r--doc/src/howtos/restoring-geometry.qdoc2
-rw-r--r--doc/src/howtos/session.qdoc2
-rw-r--r--doc/src/howtos/sharedlibrary.qdoc2
-rw-r--r--doc/src/howtos/timers.qdoc2
-rw-r--r--doc/src/images/declarative-folderlistmodel.pngbin0 -> 17764 bytes
-rw-r--r--doc/src/images/declarative-image_fillMode.gifbin79561 -> 0 bytes
-rw-r--r--doc/src/images/declarative-integrating-graphicswidgets.pngbin1061 -> 0 bytes
-rw-r--r--doc/src/images/declarative-qtlogo-preserveaspectcrop.pngbin0 -> 6440 bytes
-rw-r--r--doc/src/images/declarative-qtlogo-preserveaspectfit.pngbin0 -> 4076 bytes
-rw-r--r--doc/src/images/declarative-qtlogo-stretch.pngbin0 -> 5584 bytes
-rw-r--r--doc/src/images/declarative-qtlogo-tile.pngbin0 -> 3940 bytes
-rw-r--r--doc/src/images/declarative-qtlogo-tilehorizontally.pngbin0 -> 5544 bytes
-rw-r--r--doc/src/images/declarative-qtlogo-tilevertically.pngbin0 -> 6288 bytes
-rw-r--r--doc/src/images/declarative-qtlogo.png (renamed from doc/src/images/declarative-qtlogo1.png)bin3436 -> 3436 bytes
-rw-r--r--doc/src/images/declarative-qtlogo2.pngbin11023 -> 0 bytes
-rw-r--r--doc/src/images/declarative-qtlogo3.pngbin4783 -> 0 bytes
-rw-r--r--doc/src/images/declarative-qtlogo4.pngbin11241 -> 0 bytes
-rw-r--r--doc/src/images/declarative-qtlogo5.pngbin3553 -> 0 bytes
-rw-r--r--doc/src/images/declarative-qtlogo6.pngbin4763 -> 0 bytes
-rw-r--r--doc/src/images/modelview-move-rows-1.pngbin0 -> 19709 bytes
-rw-r--r--doc/src/images/modelview-move-rows-2.pngbin0 -> 19385 bytes
-rw-r--r--doc/src/images/modelview-move-rows-3.pngbin0 -> 9281 bytes
-rw-r--r--doc/src/images/modelview-move-rows-4.pngbin0 -> 9381 bytes
-rw-r--r--doc/src/images/multitouch-fingerpaint-example.pngbin0 -> 17026 bytes
-rw-r--r--doc/src/images/qml-rssnews-example.pngbin0 -> 143314 bytes
-rw-r--r--doc/src/index.qdoc60
-rw-r--r--doc/src/modules.qdoc46
-rw-r--r--doc/src/network-programming/bearermanagement.qdoc9
-rw-r--r--doc/src/network-programming/qtnetwork.qdoc1
-rw-r--r--doc/src/network-programming/ssl.qdoc6
-rw-r--r--doc/src/objectmodel/metaobjects.qdoc4
-rw-r--r--doc/src/objectmodel/object.qdoc5
-rw-r--r--doc/src/objectmodel/objecttrees.qdoc3
-rw-r--r--doc/src/objectmodel/properties.qdoc4
-rw-r--r--doc/src/objectmodel/signalsandslots.qdoc3
-rw-r--r--doc/src/overviews.qdoc87
-rw-r--r--doc/src/painting-and-printing/coordsys.qdoc7
-rw-r--r--doc/src/painting-and-printing/paintsystem.qdoc4
-rw-r--r--doc/src/painting-and-printing/printing.qdoc1
-rw-r--r--doc/src/platforms/emb-openvg.qdocinc21
-rw-r--r--doc/src/platforms/emb-qvfb.qdoc10
-rw-r--r--doc/src/platforms/platform-notes.qdoc2
-rw-r--r--doc/src/platforms/symbian-introduction.qdoc5
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp20
-rw-r--r--doc/src/snippets/declarative/Sprite.qml3
-rw-r--r--doc/src/snippets/declarative/borderimage.qml (renamed from doc/src/snippets/declarative/border-image.qml)0
-rw-r--r--doc/src/snippets/declarative/componentCreation.js47
-rw-r--r--doc/src/snippets/declarative/createComponent.qml9
-rw-r--r--doc/src/snippets/declarative/createQmlObject.qml18
-rw-r--r--doc/src/snippets/declarative/drag.qml2
-rw-r--r--doc/src/snippets/declarative/dynamicObjects.qml29
-rw-r--r--doc/src/snippets/declarative/flickableScrollbar.qml26
-rw-r--r--doc/src/snippets/declarative/focusscopes.qml27
-rw-r--r--doc/src/snippets/declarative/folderlistmodel.qml17
-rw-r--r--doc/src/snippets/declarative/listview/ContactModel.qml18
-rw-r--r--doc/src/snippets/declarative/listview/dummydata/ContactModel.qml17
-rw-r--r--doc/src/snippets/declarative/listview/listview.qml116
-rw-r--r--doc/src/snippets/declarative/mouseregion.qml14
-rw-r--r--doc/src/snippets/declarative/qtbinding/contextproperties/contextproperties.pro (renamed from doc/src/declarative/snippets/qtbinding/contextproperties/contextproperties.pro)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp (renamed from doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/contextproperties/main.qml (renamed from doc/src/declarative/snippets/qtbinding/contextproperties/main.qml)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h (renamed from doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/custompalette.pro (renamed from doc/src/declarative/snippets/qtbinding/custompalette/custompalette.pro)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/main.cpp (renamed from doc/src/declarative/snippets/qtbinding/custompalette/main.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/main.qml (renamed from doc/src/declarative/snippets/qtbinding/custompalette/main.qml)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/example.qrc (renamed from doc/src/declarative/snippets/qtbinding/resources/example.qrc)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/images/background.png (renamed from doc/src/declarative/snippets/qtbinding/resources/images/background.png)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/main.cpp (renamed from doc/src/declarative/snippets/qtbinding/resources/main.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/main.qml (renamed from doc/src/declarative/snippets/qtbinding/resources/main.qml)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/resources.pro (renamed from doc/src/declarative/snippets/qtbinding/resources/resources.pro)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/main.qml (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/main.qml)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.cpp (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.pro (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.pro)0
-rw-r--r--doc/src/sql-programming/qsqldatatype-table.qdoc21
-rw-r--r--doc/src/sql-programming/sql-driver.qdoc2
-rw-r--r--doc/src/sql-programming/sql-programming.qdoc6
-rwxr-xr-xdoc/src/template/images/api_examples.pngbin1302 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/api_lookup.pngbin1879 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/api_topics.pngbin1216 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_l.pngbin139 -> 100 bytes
-rwxr-xr-xdoc/src/template/images/bg_l_blank.pngbin123 -> 84 bytes
-rwxr-xr-xdoc/src/template/images/bg_ll.pngbin514 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_ll_blank.pngbin320 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_lr.pngbin458 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_r.pngbin136 -> 96 bytes
-rwxr-xr-xdoc/src/template/images/bg_ul.pngbin516 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_ul_blank.pngbin304 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_ur.pngbin437 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_ur_blank.pngbin437 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/box_bg.pngbin129 -> 89 bytes
-rwxr-xr-xdoc/src/template/images/breadcrumb.pngbin195 -> 134 bytes
-rwxr-xr-xdoc/src/template/images/bullet_gt.pngbin185 -> 124 bytes
-rwxr-xr-xdoc/src/template/images/bullet_sq.pngbin117 -> 74 bytes
-rwxr-xr-xdoc/src/template/images/content_bg.pngbin1498 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/form_bg.pngbin390 -> 0 bytes
-rw-r--r--doc/src/template/images/header.pngbin2600 -> 0 bytes
-rw-r--r--doc/src/template/images/page.pngbin0 -> 3102 bytes
-rwxr-xr-xdoc/src/template/images/page_bg.pngbin126 -> 84 bytes
-rwxr-xr-xdoc/src/template/images/print.pngbin575 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/qt_guide.pngbin12685 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/qt_icon.pngbin4775 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/qt_ref_doc.pngbin2600 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/qt_tools.pngbin17508 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/sep.pngbin120 -> 0 bytes
-rw-r--r--doc/src/template/images/spinner.gifbin0 -> 2037 bytes
-rwxr-xr-xdoc/src/template/images/sprites-combined.pngbin18070 -> 62534 bytes
-rwxr-xr-xdoc/src/template/scripts/functions.js162
-rwxr-xr-xdoc/src/template/style/style.css907
-rw-r--r--doc/src/tutorials/widgets-tutorial.qdoc141
-rw-r--r--doc/src/widgets-and-layouts/layout.qdoc1
-rw-r--r--doc/src/widgets-and-layouts/styles.qdoc13
-rw-r--r--doc/src/widgets-and-layouts/widgets.qdoc201
-rw-r--r--doc/src/windows-and-dialogs/dialogs.qdoc1
-rw-r--r--doc/src/windows-and-dialogs/mainwindow.qdoc15
-rw-r--r--examples/declarative/animation/animation.qmlproject (renamed from examples/declarative/xmldata/xmldata.qmlproject)0
-rw-r--r--examples/declarative/animation/basics/basics.qmlproject (renamed from examples/declarative/workerscript/workerscript.qmlproject)0
-rw-r--r--examples/declarative/animation/basics/color-animation.qml70
-rw-r--r--examples/declarative/animation/basics/images/face-smile.png (renamed from examples/declarative/parallax/pics/face-smile.png)bin15408 -> 15408 bytes
-rw-r--r--examples/declarative/animation/basics/images/moon.png (renamed from examples/declarative/animations/images/moon.png)bin2433 -> 2433 bytes
-rw-r--r--examples/declarative/animation/basics/images/shadow.png (renamed from examples/declarative/parallax/pics/shadow.png)bin425 -> 425 bytes
-rw-r--r--examples/declarative/animation/basics/images/star.png (renamed from examples/declarative/dynamic/images/star.png)bin349 -> 349 bytes
-rw-r--r--examples/declarative/animation/basics/images/sun.png (renamed from examples/declarative/dynamic/images/sun.png)bin8153 -> 8153 bytes
-rw-r--r--examples/declarative/animation/basics/property-animation.qml63
-rw-r--r--examples/declarative/animation/behaviors/SideRect.qml (renamed from examples/declarative/behaviors/SideRect.qml)0
-rw-r--r--examples/declarative/animation/behaviors/behavior-example.qml79
-rw-r--r--examples/declarative/animation/behaviors/behaviors.qmlproject (renamed from examples/declarative/behaviors/behaviors.qmlproject)0
-rw-r--r--examples/declarative/animation/easing/easing.qml105
-rw-r--r--examples/declarative/animation/easing/easing.qmlproject (renamed from examples/declarative/webview/webview.qmlproject)0
-rw-r--r--examples/declarative/animation/states/states.qml (renamed from examples/declarative/states/states.qml)0
-rw-r--r--examples/declarative/animation/states/states.qmlproject (renamed from examples/declarative/states/states.qmlproject)0
-rw-r--r--examples/declarative/animation/states/transitions.qml90
-rw-r--r--examples/declarative/animation/states/user.png (renamed from examples/declarative/states/user.png)bin4886 -> 4886 bytes
-rw-r--r--examples/declarative/animations/color-animation.qml71
-rw-r--r--examples/declarative/animations/easing.qml99
-rw-r--r--examples/declarative/animations/property-animation.qml64
-rw-r--r--examples/declarative/aspectratio/face_fit.qml26
-rw-r--r--examples/declarative/aspectratio/face_fit_animated.qml28
-rw-r--r--examples/declarative/aspectratio/pics/face.pngbin15408 -> 0 bytes
-rw-r--r--examples/declarative/aspectratio/scale_and_crop.qml21
-rw-r--r--examples/declarative/aspectratio/scale_and_crop_simple.qml20
-rw-r--r--examples/declarative/aspectratio/scale_and_sidecrop.qml22
-rw-r--r--examples/declarative/aspectratio/scale_to_fit.qml22
-rw-r--r--examples/declarative/aspectratio/scale_to_fit_simple.qml20
-rw-r--r--examples/declarative/behaviors/behavior-example.qml79
-rw-r--r--examples/declarative/border-image/animated.qml54
-rw-r--r--examples/declarative/border-image/borders.qml17
-rw-r--r--examples/declarative/border-image/content/MyBorderImage.qml37
-rw-r--r--examples/declarative/connections/connections-example.qml38
-rw-r--r--examples/declarative/connections/content/Button.qml12
-rw-r--r--examples/declarative/connections/content/bg1.jpgbin23771 -> 0 bytes
-rw-r--r--examples/declarative/connections/content/rotate-left.pngbin3061 -> 0 bytes
-rw-r--r--examples/declarative/connections/content/rotate-right.pngbin3115 -> 0 bytes
-rw-r--r--examples/declarative/cppextensions/cppextensions.pro10
-rw-r--r--examples/declarative/cppextensions/cppextensions.qmlproject (renamed from examples/declarative/velocity/velocity.qmlproject)0
-rw-r--r--examples/declarative/cppextensions/imageprovider/ImageProviderCore/qmldir (renamed from examples/declarative/imageprovider/ImageProviderCore/qmldir)0
-rw-r--r--examples/declarative/cppextensions/imageprovider/imageprovider-example.qml (renamed from examples/declarative/imageprovider/imageprovider-example.qml)0
-rw-r--r--examples/declarative/cppextensions/imageprovider/imageprovider.cpp (renamed from examples/declarative/imageprovider/imageprovider.cpp)0
-rw-r--r--examples/declarative/cppextensions/imageprovider/imageprovider.pro (renamed from examples/declarative/imageprovider/imageprovider.pro)0
-rw-r--r--examples/declarative/cppextensions/imageprovider/imageprovider.qmlproject (renamed from examples/declarative/imageprovider/imageprovider.qmlproject)0
-rw-r--r--examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp109
-rw-r--r--examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro9
-rw-r--r--examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject (renamed from examples/declarative/tvtennis/tvtennis.qmlproject)0
-rw-r--r--examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc (renamed from examples/declarative/stringlistmodel/stringlistmodel.qrc)0
-rw-r--r--examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml7
-rw-r--r--examples/declarative/cppextensions/plugins/README (renamed from examples/declarative/plugins/README)0
-rw-r--r--examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml (renamed from examples/declarative/plugins/com/nokia/TimeExample/Clock.qml)0
-rw-r--r--examples/declarative/cppextensions/plugins/com/nokia/TimeExample/center.png (renamed from examples/declarative/plugins/com/nokia/TimeExample/center.png)bin765 -> 765 bytes
-rw-r--r--examples/declarative/cppextensions/plugins/com/nokia/TimeExample/clock.png (renamed from examples/declarative/plugins/com/nokia/TimeExample/clock.png)bin20653 -> 20653 bytes
-rw-r--r--examples/declarative/cppextensions/plugins/com/nokia/TimeExample/hour.png (renamed from examples/declarative/plugins/com/nokia/TimeExample/hour.png)bin625 -> 625 bytes
-rw-r--r--examples/declarative/cppextensions/plugins/com/nokia/TimeExample/minute.png (renamed from examples/declarative/plugins/com/nokia/TimeExample/minute.png)bin625 -> 625 bytes
-rw-r--r--examples/declarative/cppextensions/plugins/com/nokia/TimeExample/qmldir (renamed from examples/declarative/plugins/com/nokia/TimeExample/qmldir)0
-rw-r--r--examples/declarative/cppextensions/plugins/plugin.cpp (renamed from examples/declarative/plugins/plugin.cpp)0
-rw-r--r--examples/declarative/cppextensions/plugins/plugins.pro (renamed from examples/declarative/plugins/plugins.pro)0
-rw-r--r--examples/declarative/cppextensions/plugins/plugins.qml (renamed from examples/declarative/plugins/plugins.qml)0
-rw-r--r--examples/declarative/cppextensions/plugins/plugins.qmlproject (renamed from examples/declarative/plugins/plugins.qmlproject)0
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.pro13
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.qmlproject (renamed from examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject)0
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts.cpp (renamed from src/imports/widgets/graphicslayouts.cpp)0
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts.qml77
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts.qrc5
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts_p.h (renamed from src/imports/widgets/graphicslayouts_p.h)0
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/main.cpp60
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro8
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml17
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qmlproject (renamed from examples/declarative/tabwidget/tabwidget.qmlproject)0
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qrc5
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp75
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/qgraphicslayouts.pro5
-rw-r--r--examples/declarative/cppextensions/qgraphicslayouts/qgraphicslayouts.qmlproject (renamed from examples/declarative/sql/sql.qmlproject)0
-rw-r--r--examples/declarative/cppextensions/qwidgets/QWidgets/qmldir (renamed from examples/declarative/proxywidgets/ProxyWidgets/qmldir)0
-rw-r--r--examples/declarative/cppextensions/qwidgets/README6
-rw-r--r--examples/declarative/cppextensions/qwidgets/qwidgets.cpp97
-rw-r--r--examples/declarative/cppextensions/qwidgets/qwidgets.pro21
-rw-r--r--examples/declarative/cppextensions/qwidgets/qwidgets.qml70
-rw-r--r--examples/declarative/cppextensions/qwidgets/qwidgets.qmlproject (renamed from examples/declarative/slideswitch/slideswitch.qmlproject)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/adding/adding.pro (renamed from examples/declarative/extending/adding/adding.pro)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/adding/adding.qrc (renamed from examples/declarative/extending/adding/adding.qrc)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/adding/example.qml (renamed from examples/declarative/extending/adding/example.qml)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/adding/main.cpp (renamed from examples/declarative/extending/adding/main.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/adding/person.cpp (renamed from examples/declarative/extending/adding/person.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/adding/person.h (renamed from examples/declarative/extending/adding/person.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/attached/attached.pro (renamed from examples/declarative/extending/attached/attached.pro)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/attached/attached.qrc (renamed from examples/declarative/extending/attached/attached.qrc)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.cpp (renamed from examples/declarative/extending/attached/birthdayparty.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.h (renamed from examples/declarative/extending/attached/birthdayparty.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/attached/example.qml (renamed from examples/declarative/extending/attached/example.qml)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/attached/main.cpp (renamed from examples/declarative/extending/attached/main.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/attached/person.cpp (renamed from examples/declarative/extending/valuesource/person.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/attached/person.h (renamed from examples/declarative/extending/valuesource/person.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/binding/binding.pro (renamed from examples/declarative/extending/binding/binding.pro)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/binding/binding.qrc (renamed from examples/declarative/extending/binding/binding.qrc)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.cpp (renamed from examples/declarative/extending/binding/birthdayparty.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.h (renamed from examples/declarative/extending/binding/birthdayparty.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/binding/example.qml (renamed from examples/declarative/extending/binding/example.qml)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.cpp (renamed from examples/declarative/extending/binding/happybirthdaysong.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.h (renamed from examples/declarative/extending/binding/happybirthdaysong.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/binding/main.cpp (renamed from examples/declarative/extending/binding/main.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/binding/person.cpp (renamed from examples/declarative/extending/binding/person.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/binding/person.h (renamed from examples/declarative/extending/binding/person.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.cpp (renamed from examples/declarative/extending/grouped/birthdayparty.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.h (renamed from examples/declarative/extending/coercion/birthdayparty.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/coercion/coercion.pro (renamed from examples/declarative/extending/coercion/coercion.pro)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/coercion/coercion.qrc (renamed from examples/declarative/extending/coercion/coercion.qrc)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/coercion/example.qml (renamed from examples/declarative/extending/coercion/example.qml)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/coercion/main.cpp (renamed from examples/declarative/extending/coercion/main.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/coercion/person.cpp (renamed from examples/declarative/extending/coercion/person.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/coercion/person.h (renamed from examples/declarative/extending/coercion/person.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/default/birthdayparty.cpp (renamed from examples/declarative/extending/default/birthdayparty.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/default/birthdayparty.h (renamed from examples/declarative/extending/default/birthdayparty.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/default/default.pro (renamed from examples/declarative/extending/default/default.pro)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/default/default.qrc (renamed from examples/declarative/extending/default/default.qrc)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/default/example.qml (renamed from examples/declarative/extending/default/example.qml)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/default/main.cpp (renamed from examples/declarative/extending/default/main.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/default/person.cpp (renamed from examples/declarative/extending/default/person.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/default/person.h (renamed from examples/declarative/extending/default/person.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/extended/example.qml (renamed from examples/declarative/extending/extended/example.qml)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/extended/extended.pro (renamed from examples/declarative/extending/extended/extended.pro)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/extended/extended.qrc (renamed from examples/declarative/extending/extended/extended.qrc)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/extended/lineedit.cpp (renamed from examples/declarative/extending/extended/lineedit.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/extended/lineedit.h (renamed from examples/declarative/extending/extended/lineedit.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/extended/main.cpp (renamed from examples/declarative/extending/extended/main.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.cpp (renamed from examples/declarative/extending/coercion/birthdayparty.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.h (renamed from examples/declarative/extending/grouped/birthdayparty.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/grouped/example.qml (renamed from examples/declarative/extending/grouped/example.qml)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/grouped/grouped.pro (renamed from examples/declarative/extending/grouped/grouped.pro)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/grouped/grouped.qrc (renamed from examples/declarative/extending/grouped/grouped.qrc)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/grouped/main.cpp (renamed from examples/declarative/extending/grouped/main.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/grouped/person.cpp (renamed from examples/declarative/extending/signal/person.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/grouped/person.h (renamed from examples/declarative/extending/grouped/person.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.cpp (renamed from examples/declarative/extending/properties/birthdayparty.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h (renamed from examples/declarative/extending/properties/birthdayparty.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/properties/example.qml (renamed from examples/declarative/extending/properties/example.qml)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/properties/main.cpp (renamed from examples/declarative/extending/properties/main.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/properties/person.cpp (renamed from examples/declarative/extending/properties/person.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/properties/person.h (renamed from examples/declarative/extending/properties/person.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/properties/properties.pro (renamed from examples/declarative/extending/properties/properties.pro)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/properties/properties.qrc (renamed from examples/declarative/extending/properties/properties.qrc)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/referenceexamples.pro (renamed from examples/declarative/extending/extending.pro)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/referenceexamples.qmlproject (renamed from examples/declarative/searchbox/searchbox.qmlproject)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.cpp (renamed from examples/declarative/extending/signal/birthdayparty.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.h (renamed from examples/declarative/extending/signal/birthdayparty.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/signal/example.qml (renamed from examples/declarative/extending/signal/example.qml)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/signal/main.cpp (renamed from examples/declarative/extending/signal/main.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/signal/person.cpp (renamed from examples/declarative/extending/grouped/person.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/signal/person.h (renamed from examples/declarative/extending/signal/person.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/signal/signal.pro (renamed from examples/declarative/extending/signal/signal.pro)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/signal/signal.qrc (renamed from examples/declarative/extending/signal/signal.qrc)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.cpp (renamed from examples/declarative/extending/valuesource/birthdayparty.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.h (renamed from examples/declarative/extending/valuesource/birthdayparty.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/valuesource/example.qml (renamed from examples/declarative/extending/valuesource/example.qml)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp (renamed from examples/declarative/extending/valuesource/happybirthdaysong.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h (renamed from examples/declarative/extending/valuesource/happybirthdaysong.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp (renamed from examples/declarative/extending/valuesource/main.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/valuesource/person.cpp (renamed from examples/declarative/extending/attached/person.cpp)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/valuesource/person.h (renamed from examples/declarative/extending/attached/person.h)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.pro (renamed from examples/declarative/extending/valuesource/valuesource.pro)0
-rw-r--r--examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.qrc (renamed from examples/declarative/extending/valuesource/valuesource.qrc)0
-rw-r--r--examples/declarative/declarative.pro57
-rw-r--r--examples/declarative/dial/content/Dial.qml37
-rw-r--r--examples/declarative/dial/dial-example.qml44
-rw-r--r--examples/declarative/dynamic/dynamic.qml157
-rw-r--r--examples/declarative/dynamic/qml/Button.qml24
-rw-r--r--examples/declarative/dynamic/qml/GenericItem.qml13
-rw-r--r--examples/declarative/dynamic/qml/PaletteItem.qml13
-rw-r--r--examples/declarative/dynamic/qml/PerspectiveItem.qml16
-rw-r--r--examples/declarative/dynamic/qml/Sun.qml24
-rw-r--r--examples/declarative/dynamic/qml/itemCreation.js82
-rw-r--r--examples/declarative/fillmode/content/QtLogo.qml30
-rw-r--r--examples/declarative/fillmode/content/qt-logo.pngbin5149 -> 0 bytes
-rw-r--r--examples/declarative/fillmode/fillmode.qml22
-rw-r--r--examples/declarative/focus/Core/ListViews.qml62
-rw-r--r--examples/declarative/focus/focus.qml69
-rw-r--r--examples/declarative/fonts/fonts.qml64
-rw-r--r--examples/declarative/fonts/hello.qml38
-rw-r--r--examples/declarative/i18n/i18n.qml37
-rw-r--r--examples/declarative/i18n/i18n.qmlproject (renamed from examples/declarative/scrollbar/scrollbar.qmlproject)0
-rw-r--r--examples/declarative/i18n/i18n/base.ts12
-rw-r--r--examples/declarative/i18n/i18n/qml_en_AU.qmbin0 -> 81 bytes
-rw-r--r--examples/declarative/i18n/i18n/qml_en_AU.ts12
-rw-r--r--examples/declarative/i18n/i18n/qml_fr.qmbin0 -> 85 bytes
-rw-r--r--examples/declarative/i18n/i18n/qml_fr.ts12
-rw-r--r--examples/declarative/imageelements/borderimage/borderimage.qml57
-rw-r--r--examples/declarative/imageelements/borderimage/borderimage.qmlproject (renamed from examples/declarative/proxywidgets/proxywidgets.qmlproject)0
-rw-r--r--examples/declarative/imageelements/borderimage/content/MyBorderImage.qml50
-rw-r--r--examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml14
-rw-r--r--examples/declarative/imageelements/borderimage/content/bw.png (renamed from examples/declarative/border-image/content/bw.png)bin1357 -> 1357 bytes
-rw-r--r--examples/declarative/imageelements/borderimage/content/colors-round.sci (renamed from examples/declarative/border-image/content/colors-round.sci)0
-rw-r--r--examples/declarative/imageelements/borderimage/content/colors-stretch.sci (renamed from examples/declarative/border-image/content/colors-stretch.sci)0
-rw-r--r--examples/declarative/imageelements/borderimage/content/colors.png (renamed from examples/declarative/border-image/content/colors.png)bin1655 -> 1655 bytes
-rw-r--r--examples/declarative/imageelements/borderimage/content/shadow.pngbin0 -> 588 bytes
-rw-r--r--examples/declarative/imageelements/borderimage/shadows.qml24
-rw-r--r--examples/declarative/imageelements/imageelements.qmlproject (renamed from examples/declarative/progressbar/progressbar.qmlproject)0
-rw-r--r--examples/declarative/images/content/lemonade.jpgbin6645 -> 0 bytes
-rw-r--r--examples/declarative/images/images.qml72
-rw-r--r--examples/declarative/keyinteraction/focus/Core/ContextMenu.qml (renamed from examples/declarative/focus/Core/ContextMenu.qml)0
-rw-r--r--examples/declarative/keyinteraction/focus/Core/GridMenu.qml (renamed from examples/declarative/focus/Core/GridMenu.qml)0
-rw-r--r--examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml (renamed from examples/declarative/focus/Core/ListViewDelegate.qml)0
-rw-r--r--examples/declarative/keyinteraction/focus/Core/ListViews.qml62
-rw-r--r--examples/declarative/keyinteraction/focus/Core/images/arrow.png (renamed from examples/declarative/focus/Core/images/arrow.png)bin583 -> 583 bytes
-rw-r--r--examples/declarative/keyinteraction/focus/Core/images/qt-logo.png (renamed from examples/declarative/focus/Core/images/qt-logo.png)bin5149 -> 5149 bytes
-rw-r--r--examples/declarative/keyinteraction/focus/Core/qmldir (renamed from examples/declarative/focus/Core/qmldir)0
-rw-r--r--examples/declarative/keyinteraction/focus/focus.qml69
-rw-r--r--examples/declarative/keyinteraction/focus/focus.qmlproject (renamed from examples/declarative/focus/focus.qmlproject)0
-rw-r--r--examples/declarative/keyinteraction/keyinteraction.qmlproject (renamed from examples/declarative/parallax/parallax.qmlproject)0
-rw-r--r--examples/declarative/layouts/Button.qml22
-rw-r--r--examples/declarative/layouts/layouts.qml29
-rw-r--r--examples/declarative/layouts/positioners.qml213
-rw-r--r--examples/declarative/listview/dynamic.qml210
-rw-r--r--examples/declarative/listview/highlight.qml55
-rw-r--r--examples/declarative/listview/itemlist.qml67
-rw-r--r--examples/declarative/listview/listview-example.qml93
-rw-r--r--examples/declarative/listview/sections.qml71
-rw-r--r--examples/declarative/modelviews/gridview/gridview-example.qml (renamed from examples/declarative/gridview/gridview-example.qml)0
-rw-r--r--examples/declarative/modelviews/gridview/gridview.qmlproject (renamed from examples/declarative/gridview/gridview.qmlproject)0
-rw-r--r--examples/declarative/modelviews/gridview/pics/AddressBook_48.png (renamed from examples/declarative/gridview/pics/AddressBook_48.png)bin3350 -> 3350 bytes
-rw-r--r--examples/declarative/modelviews/gridview/pics/AudioPlayer_48.png (renamed from examples/declarative/gridview/pics/AudioPlayer_48.png)bin3806 -> 3806 bytes
-rw-r--r--examples/declarative/modelviews/gridview/pics/Camera_48.png (renamed from examples/declarative/gridview/pics/Camera_48.png)bin3540 -> 3540 bytes
-rw-r--r--examples/declarative/modelviews/gridview/pics/DateBook_48.png (renamed from examples/declarative/gridview/pics/DateBook_48.png)bin2610 -> 2610 bytes
-rw-r--r--examples/declarative/modelviews/gridview/pics/EMail_48.png (renamed from examples/declarative/gridview/pics/EMail_48.png)bin3655 -> 3655 bytes
-rw-r--r--examples/declarative/modelviews/gridview/pics/TodoList_48.png (renamed from examples/declarative/gridview/pics/TodoList_48.png)bin3429 -> 3429 bytes
-rw-r--r--examples/declarative/modelviews/gridview/pics/VideoPlayer_48.png (renamed from examples/declarative/gridview/pics/VideoPlayer_48.png)bin4151 -> 4151 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml (renamed from examples/declarative/listview/content/ClickAutoRepeating.qml)0
-rw-r--r--examples/declarative/modelviews/listview/content/MediaButton.qml (renamed from examples/declarative/listview/content/MediaButton.qml)0
-rw-r--r--examples/declarative/modelviews/listview/content/pics/add.png (renamed from examples/declarative/listview/content/pics/add.png)bin1577 -> 1577 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/archive-insert.png (renamed from examples/declarative/listview/content/pics/archive-insert.png)bin896 -> 896 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/archive-remove.png (renamed from examples/declarative/listview/content/pics/archive-remove.png)bin1074 -> 1074 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/button-pressed.png (renamed from examples/declarative/listview/content/pics/button-pressed.png)bin571 -> 571 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/button.png (renamed from examples/declarative/listview/content/pics/button.png)bin564 -> 564 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/del.png (renamed from examples/declarative/listview/content/pics/del.png)bin1661 -> 1661 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/fruit-salad.jpg (renamed from examples/declarative/listview/content/pics/fruit-salad.jpg)bin17952 -> 17952 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/go-down.png (renamed from examples/declarative/listview/content/pics/go-down.png)bin892 -> 892 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/go-up.png (renamed from examples/declarative/listview/content/pics/go-up.png)bin929 -> 929 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/hamburger.jpg (renamed from examples/declarative/listview/content/pics/hamburger.jpg)bin8572 -> 8572 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/lemonade.jpg (renamed from examples/declarative/listview/content/pics/lemonade.jpg)bin6645 -> 6645 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/list-add.png (renamed from examples/declarative/listview/content/pics/list-add.png)bin907 -> 907 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/list-remove.png (renamed from examples/declarative/listview/content/pics/list-remove.png)bin498 -> 498 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/moreDown.png (renamed from examples/declarative/listview/content/pics/moreDown.png)bin217 -> 217 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/moreUp.png (renamed from examples/declarative/listview/content/pics/moreUp.png)bin212 -> 212 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/pancakes.jpg (renamed from examples/declarative/listview/content/pics/pancakes.jpg)bin9163 -> 9163 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/trash.png (renamed from examples/declarative/listview/content/pics/trash.png)bin989 -> 989 bytes
-rw-r--r--examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpg (renamed from examples/declarative/listview/content/pics/vegetable-soup.jpg)bin8639 -> 8639 bytes
-rw-r--r--examples/declarative/modelviews/listview/dummydata/MyPetsModel.qml (renamed from examples/declarative/listview/dummydata/MyPetsModel.qml)0
-rw-r--r--examples/declarative/modelviews/listview/dummydata/Recipes.qml (renamed from examples/declarative/listview/dummydata/Recipes.qml)0
-rw-r--r--examples/declarative/modelviews/listview/dynamic.qml208
-rw-r--r--examples/declarative/modelviews/listview/highlight.qml55
-rw-r--r--examples/declarative/modelviews/listview/itemlist.qml67
-rw-r--r--examples/declarative/modelviews/listview/listview-example.qml93
-rw-r--r--examples/declarative/modelviews/listview/listview.qmlproject (renamed from examples/declarative/listview/listview.qmlproject)0
-rw-r--r--examples/declarative/modelviews/listview/recipes.qml (renamed from examples/declarative/listview/recipes.qml)0
-rw-r--r--examples/declarative/modelviews/listview/sections.qml71
-rw-r--r--examples/declarative/modelviews/modelviews.pro7
-rw-r--r--examples/declarative/modelviews/modelviews.qmlproject (renamed from examples/declarative/package/package.qmlproject)0
-rw-r--r--examples/declarative/modelviews/objectlistmodel/dataobject.cpp79
-rw-r--r--examples/declarative/modelviews/objectlistmodel/dataobject.h73
-rw-r--r--examples/declarative/modelviews/objectlistmodel/main.cpp (renamed from examples/declarative/objectlistmodel/main.cpp)0
-rw-r--r--examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro (renamed from examples/declarative/objectlistmodel/objectlistmodel.pro)0
-rw-r--r--examples/declarative/modelviews/objectlistmodel/objectlistmodel.qmlproject (renamed from examples/declarative/objectlistmodel/objectlistmodel.qmlproject)0
-rw-r--r--examples/declarative/modelviews/objectlistmodel/objectlistmodel.qrc (renamed from examples/declarative/objectlistmodel/objectlistmodel.qrc)0
-rw-r--r--examples/declarative/modelviews/objectlistmodel/view.qml16
-rw-r--r--examples/declarative/modelviews/package/Delegate.qml (renamed from examples/declarative/package/Delegate.qml)0
-rw-r--r--examples/declarative/modelviews/package/package.qmlproject (renamed from examples/declarative/mousearea/mousearea.qmlproject)0
-rw-r--r--examples/declarative/modelviews/package/view.qml (renamed from examples/declarative/package/view.qml)0
-rw-r--r--examples/declarative/modelviews/parallax/parallax.qml41
-rw-r--r--examples/declarative/modelviews/parallax/parallax.qmlproject (renamed from examples/declarative/listmodel-threaded/listmodel-threaded.qmlproject)0
-rw-r--r--examples/declarative/modelviews/parallax/pics/background.jpg (renamed from examples/declarative/parallax/pics/background.jpg)bin209814 -> 209814 bytes
-rw-r--r--examples/declarative/modelviews/parallax/pics/face-smile.png (renamed from examples/declarative/dynamic/images/face-smile.png)bin15408 -> 15408 bytes
-rw-r--r--examples/declarative/modelviews/parallax/pics/home-page.svg (renamed from examples/declarative/parallax/pics/home-page.svg)0
-rw-r--r--examples/declarative/modelviews/parallax/pics/shadow.png (renamed from examples/declarative/animations/images/shadow.png)bin425 -> 425 bytes
-rw-r--r--examples/declarative/modelviews/parallax/pics/yast-joystick.png (renamed from examples/declarative/parallax/pics/yast-joystick.png)bin2723 -> 2723 bytes
-rw-r--r--examples/declarative/modelviews/parallax/pics/yast-wol.png (renamed from examples/declarative/parallax/pics/yast-wol.png)bin3769 -> 3769 bytes
-rw-r--r--examples/declarative/modelviews/parallax/qml/ParallaxView.qml83
-rw-r--r--examples/declarative/modelviews/parallax/qml/Smiley.qml46
-rw-r--r--examples/declarative/modelviews/stringlistmodel/main.cpp (renamed from examples/declarative/stringlistmodel/main.cpp)0
-rw-r--r--examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro (renamed from examples/declarative/stringlistmodel/stringlistmodel.pro)0
-rw-r--r--examples/declarative/modelviews/stringlistmodel/stringlistmodel.qrc5
-rw-r--r--examples/declarative/modelviews/stringlistmodel/view.qml (renamed from examples/declarative/stringlistmodel/view.qml)0
-rw-r--r--examples/declarative/modelviews/webview/alerts.html (renamed from examples/declarative/webview/alerts.html)0
-rw-r--r--examples/declarative/modelviews/webview/alerts.qml58
-rw-r--r--examples/declarative/modelviews/webview/autosize.qml (renamed from examples/declarative/webview/autosize.qml)0
-rw-r--r--examples/declarative/modelviews/webview/content/FieldText.qml (renamed from examples/declarative/webview/content/FieldText.qml)0
-rw-r--r--examples/declarative/modelviews/webview/content/Mapping/Map.qml (renamed from examples/declarative/webview/content/Mapping/Map.qml)0
-rwxr-xr-xexamples/declarative/modelviews/webview/content/Mapping/map.html (renamed from examples/declarative/webview/content/Mapping/map.html)0
-rw-r--r--examples/declarative/modelviews/webview/content/SpinSquare.qml (renamed from examples/declarative/webview/content/SpinSquare.qml)0
-rw-r--r--examples/declarative/modelviews/webview/content/pics/cancel.png (renamed from examples/declarative/webview/content/pics/cancel.png)bin1038 -> 1038 bytes
-rw-r--r--examples/declarative/modelviews/webview/content/pics/ok.png (renamed from examples/declarative/webview/content/pics/ok.png)bin655 -> 655 bytes
-rw-r--r--examples/declarative/modelviews/webview/googleMaps.qml (renamed from examples/declarative/webview/googleMaps.qml)0
-rw-r--r--examples/declarative/modelviews/webview/inline-html.qml (renamed from examples/declarative/webview/inline-html.qml)0
-rw-r--r--examples/declarative/modelviews/webview/newwindows.html (renamed from examples/declarative/webview/newwindows.html)0
-rw-r--r--examples/declarative/modelviews/webview/newwindows.qml (renamed from examples/declarative/webview/newwindows.qml)0
-rw-r--r--examples/declarative/modelviews/webview/transparent.qml (renamed from examples/declarative/webview/transparent.qml)0
-rw-r--r--examples/declarative/modelviews/webview/webview.qmlproject (renamed from examples/declarative/layouts/layouts.qmlproject)0
-rw-r--r--examples/declarative/mousearea/mouse.qml47
-rw-r--r--examples/declarative/objectlistmodel/dataobject.cpp73
-rw-r--r--examples/declarative/objectlistmodel/dataobject.h69
-rw-r--r--examples/declarative/objectlistmodel/view.qml16
-rw-r--r--examples/declarative/parallax/parallax.qml41
-rw-r--r--examples/declarative/parallax/qml/ParallaxView.qml84
-rw-r--r--examples/declarative/parallax/qml/Smiley.qml47
-rw-r--r--examples/declarative/positioners/Button.qml38
-rw-r--r--examples/declarative/positioners/add.png (renamed from examples/declarative/layouts/add.png)bin1577 -> 1577 bytes
-rw-r--r--examples/declarative/positioners/del.png (renamed from examples/declarative/layouts/del.png)bin1661 -> 1661 bytes
-rw-r--r--examples/declarative/positioners/positioners.qml213
-rw-r--r--examples/declarative/positioners/positioners.qmlproject18
-rw-r--r--examples/declarative/positioners/positioners.qmlproject.user41
-rw-r--r--examples/declarative/proxywidgets/README4
-rw-r--r--examples/declarative/proxywidgets/proxywidgets.cpp97
-rw-r--r--examples/declarative/proxywidgets/proxywidgets.pro21
-rw-r--r--examples/declarative/proxywidgets/proxywidgets.qml70
-rw-r--r--examples/declarative/scrollbar/ScrollBar.qml33
-rw-r--r--examples/declarative/scrollbar/display.qml54
-rw-r--r--examples/declarative/slideswitch/content/Switch.qml76
-rw-r--r--examples/declarative/sqllocalstorage/hello.qml (renamed from examples/declarative/sql/hello.qml)0
-rw-r--r--examples/declarative/sqllocalstorage/sqllocalstorage.qmlproject (renamed from examples/declarative/images/images.qmlproject)0
-rw-r--r--examples/declarative/states/transitions.qml90
-rw-r--r--examples/declarative/text/fonts/availableFonts.qml17
-rw-r--r--examples/declarative/text/fonts/banner.qml (renamed from examples/declarative/fonts/banner.qml)0
-rw-r--r--examples/declarative/text/fonts/fonts.qml64
-rw-r--r--examples/declarative/text/fonts/fonts.qmlproject (renamed from examples/declarative/fonts/fonts.qmlproject)0
-rw-r--r--examples/declarative/text/fonts/fonts/tarzeau_ocr_a.ttf (renamed from examples/declarative/fonts/fonts/tarzeau_ocr_a.ttf)bin24544 -> 24544 bytes
-rw-r--r--examples/declarative/text/fonts/hello.qml38
-rw-r--r--examples/declarative/text/text.qmlproject (renamed from examples/declarative/gestures/gestures.qmlproject)0
-rw-r--r--examples/declarative/threading/threadedlistmodel/dataloader.js (renamed from examples/declarative/listmodel-threaded/dataloader.js)0
-rw-r--r--examples/declarative/threading/threadedlistmodel/threadedlistmodel.qmlproject (renamed from examples/declarative/flipable/flipable.qmlproject)0
-rw-r--r--examples/declarative/threading/threadedlistmodel/timedisplay.qml (renamed from examples/declarative/listmodel-threaded/timedisplay.qml)0
-rw-r--r--examples/declarative/threading/threading.qmlproject (renamed from examples/declarative/fillmode/fillmode.qmlproject)0
-rw-r--r--examples/declarative/threading/workerscript/workerscript.js (renamed from examples/declarative/workerscript/workerscript.js)0
-rw-r--r--examples/declarative/threading/workerscript/workerscript.qml (renamed from examples/declarative/workerscript/workerscript.qml)0
-rw-r--r--examples/declarative/threading/workerscript/workerscript.qmlproject (renamed from examples/declarative/extending/extending.qmlproject)0
-rw-r--r--examples/declarative/touchinteraction/gestures/experimental-gestures.qml (renamed from examples/declarative/gestures/experimental-gestures.qml)0
-rw-r--r--examples/declarative/touchinteraction/gestures/gestures.qmlproject (renamed from examples/declarative/dynamic/dynamic.qmlproject)0
-rw-r--r--examples/declarative/touchinteraction/mousearea/mouse.qml47
-rw-r--r--examples/declarative/touchinteraction/mousearea/mousearea.qmlproject (renamed from examples/declarative/dial/dial.qmlproject)0
-rw-r--r--examples/declarative/touchinteraction/touchinteraction.qmlproject (renamed from examples/declarative/connections/connections.qmlproject)0
-rw-r--r--examples/declarative/toys/clocks/clocks.qml (renamed from examples/declarative/clocks/clocks.qml)0
-rw-r--r--examples/declarative/toys/clocks/clocks.qmlproject (renamed from examples/declarative/clocks/clocks.qmlproject)0
-rw-r--r--examples/declarative/toys/clocks/content/Clock.qml (renamed from examples/declarative/clocks/content/Clock.qml)0
-rw-r--r--examples/declarative/toys/clocks/content/background.png (renamed from examples/declarative/clocks/content/background.png)bin46895 -> 46895 bytes
-rwxr-xr-xexamples/declarative/toys/clocks/content/center.png (renamed from examples/declarative/clocks/content/center.png)bin765 -> 765 bytes
-rwxr-xr-xexamples/declarative/toys/clocks/content/clock-night.png (renamed from examples/declarative/clocks/content/clock-night.png)bin23359 -> 23359 bytes
-rwxr-xr-xexamples/declarative/toys/clocks/content/clock.png (renamed from examples/declarative/clocks/content/clock.png)bin20653 -> 20653 bytes
-rwxr-xr-xexamples/declarative/toys/clocks/content/hour.png (renamed from examples/declarative/clocks/content/hour.png)bin625 -> 625 bytes
-rwxr-xr-xexamples/declarative/toys/clocks/content/minute.png (renamed from examples/declarative/clocks/content/minute.png)bin625 -> 625 bytes
-rwxr-xr-xexamples/declarative/toys/clocks/content/second.png (renamed from examples/declarative/clocks/content/second.png)bin303 -> 303 bytes
-rw-r--r--examples/declarative/toys/corkboards/Day.qml101
-rw-r--r--examples/declarative/toys/corkboards/cork.jpg (renamed from examples/declarative/velocity/cork.jpg)bin149337 -> 149337 bytes
-rw-r--r--examples/declarative/toys/corkboards/corkboards.qml (renamed from examples/declarative/velocity/velocity.qml)0
-rw-r--r--examples/declarative/toys/corkboards/corkboards.qmlproject (renamed from examples/declarative/border-image/border-image.qmlproject)0
-rw-r--r--examples/declarative/toys/corkboards/note-yellow.png (renamed from examples/declarative/velocity/note-yellow.png)bin54559 -> 54559 bytes
-rw-r--r--examples/declarative/toys/corkboards/tack.png (renamed from examples/declarative/velocity/tack.png)bin7282 -> 7282 bytes
-rw-r--r--examples/declarative/toys/dial/content/Dial.qml43
-rw-r--r--examples/declarative/toys/dial/content/background.png (renamed from examples/declarative/dial/content/background.png)bin35876 -> 35876 bytes
-rw-r--r--examples/declarative/toys/dial/content/needle.png (renamed from examples/declarative/dial/content/needle.png)bin342 -> 342 bytes
-rw-r--r--examples/declarative/toys/dial/content/needle_shadow.png (renamed from examples/declarative/dial/content/needle_shadow.png)bin632 -> 632 bytes
-rw-r--r--examples/declarative/toys/dial/content/overlay.png (renamed from examples/declarative/dial/content/overlay.png)bin3564 -> 3564 bytes
-rw-r--r--examples/declarative/toys/dial/dial-example.qml50
-rw-r--r--examples/declarative/toys/dial/dial.qmlproject (renamed from examples/declarative/aspectratio/aspectratio.qmlproject)0
-rw-r--r--examples/declarative/toys/dynamicscene/dynamicscene.qml176
-rw-r--r--examples/declarative/toys/dynamicscene/dynamicscene.qmlproject (renamed from examples/declarative/animations/animations.qmlproject)0
-rw-r--r--examples/declarative/toys/dynamicscene/images/NOTE (renamed from examples/declarative/dynamic/images/NOTE)0
-rw-r--r--examples/declarative/toys/dynamicscene/images/face-smile.png (renamed from examples/declarative/animations/images/face-smile.png)bin15408 -> 15408 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/images/moon.png (renamed from examples/declarative/dynamic/images/moon.png)bin1757 -> 1757 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/images/rabbit_brown.png (renamed from examples/declarative/dynamic/images/rabbit_brown.png)bin1245 -> 1245 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/images/rabbit_bw.png (renamed from examples/declarative/dynamic/images/rabbit_bw.png)bin1759 -> 1759 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/images/star.png (renamed from examples/declarative/animations/images/star.png)bin349 -> 349 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/images/sun.png (renamed from examples/declarative/animations/images/sun.png)bin8153 -> 8153 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/images/tree_s.png (renamed from examples/declarative/dynamic/images/tree_s.png)bin3406 -> 3406 bytes
-rw-r--r--examples/declarative/toys/dynamicscene/qml/Button.qml40
-rw-r--r--examples/declarative/toys/dynamicscene/qml/PaletteItem.qml19
-rw-r--r--examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml25
-rw-r--r--examples/declarative/toys/dynamicscene/qml/Sun.qml38
-rw-r--r--examples/declarative/toys/dynamicscene/qml/itemCreation.js65
-rw-r--r--examples/declarative/toys/tic-tac-toe/content/Button.qml (renamed from examples/declarative/tic-tac-toe/content/Button.qml)0
-rw-r--r--examples/declarative/toys/tic-tac-toe/content/TicTac.qml (renamed from examples/declarative/tic-tac-toe/content/TicTac.qml)0
-rw-r--r--examples/declarative/toys/tic-tac-toe/content/pics/board.png (renamed from examples/declarative/tic-tac-toe/content/pics/board.png)bin12258 -> 12258 bytes
-rw-r--r--examples/declarative/toys/tic-tac-toe/content/pics/o.png (renamed from examples/declarative/tic-tac-toe/content/pics/o.png)bin1470 -> 1470 bytes
-rw-r--r--examples/declarative/toys/tic-tac-toe/content/pics/x.png (renamed from examples/declarative/tic-tac-toe/content/pics/x.png)bin1331 -> 1331 bytes
-rw-r--r--examples/declarative/toys/tic-tac-toe/content/tic-tac-toe.js (renamed from examples/declarative/tic-tac-toe/content/tic-tac-toe.js)0
-rw-r--r--examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml (renamed from examples/declarative/tic-tac-toe/tic-tac-toe.qml)0
-rw-r--r--examples/declarative/toys/tic-tac-toe/tic-tac-toe.qmlproject16
-rw-r--r--examples/declarative/toys/toys.qmlproject16
-rw-r--r--examples/declarative/toys/tvtennis/tvtennis.qml71
-rw-r--r--examples/declarative/toys/tvtennis/tvtennis.qmlproject16
-rw-r--r--examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro5
-rw-r--r--examples/declarative/tutorials/extending/extending.pro9
-rw-r--r--examples/declarative/tutorials/helloworld/tutorial1.qml3
-rw-r--r--examples/declarative/tutorials/helloworld/tutorial2.qml3
-rw-r--r--examples/declarative/tutorials/helloworld/tutorial3.qml5
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/Block.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/Button.qml17
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/samegame.qml7
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/Block.qml2
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/Button.qml17
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/samegame.js15
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/samegame.qml5
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Button.qml17
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Dialog.qml33
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/samegame.js24
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/samegame.qml14
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Button.qml17
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml57
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/content/samegame.js32
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/samegame.qml38
-rw-r--r--examples/declarative/tutorials/tutorials.pro5
-rw-r--r--examples/declarative/tvtennis/click.wavbin3056 -> 0 bytes
-rw-r--r--examples/declarative/tvtennis/paddle.wavbin5320 -> 0 bytes
-rw-r--r--examples/declarative/tvtennis/tvtennis.qml79
-rw-r--r--examples/declarative/ui-components/flipable/content/5_heart.png (renamed from examples/declarative/flipable/content/5_heart.png)bin3872 -> 3872 bytes
-rw-r--r--examples/declarative/ui-components/flipable/content/9_club.png (renamed from examples/declarative/flipable/content/9_club.png)bin6135 -> 6135 bytes
-rw-r--r--examples/declarative/ui-components/flipable/content/Card.qml (renamed from examples/declarative/flipable/content/Card.qml)0
-rw-r--r--examples/declarative/ui-components/flipable/content/back.png (renamed from examples/declarative/flipable/content/back.png)bin1418 -> 1418 bytes
-rw-r--r--examples/declarative/ui-components/flipable/flipable-example.qml (renamed from examples/declarative/flipable/flipable-example.qml)0
-rw-r--r--examples/declarative/ui-components/flipable/flipable.qmlproject16
-rw-r--r--examples/declarative/ui-components/progressbar/content/ProgressBar.qml (renamed from examples/declarative/progressbar/content/ProgressBar.qml)0
-rw-r--r--examples/declarative/ui-components/progressbar/content/background.png (renamed from examples/declarative/progressbar/content/background.png)bin426 -> 426 bytes
-rw-r--r--examples/declarative/ui-components/progressbar/progressbar.qmlproject16
-rw-r--r--examples/declarative/ui-components/progressbar/progressbars.qml (renamed from examples/declarative/progressbar/progressbars.qml)0
-rw-r--r--examples/declarative/ui-components/scrollbar/ScrollBar.qml33
-rw-r--r--examples/declarative/ui-components/scrollbar/display.qml54
-rw-r--r--examples/declarative/ui-components/scrollbar/pics/niagara_falls.jpg (renamed from examples/declarative/scrollbar/pics/niagara_falls.jpg)bin604121 -> 604121 bytes
-rw-r--r--examples/declarative/ui-components/scrollbar/scrollbar.qmlproject16
-rw-r--r--examples/declarative/ui-components/searchbox/SearchBox.qml (renamed from examples/declarative/searchbox/SearchBox.qml)0
-rw-r--r--examples/declarative/ui-components/searchbox/images/edit-clear-locationbar-rtl.png (renamed from examples/declarative/searchbox/images/edit-clear-locationbar-rtl.png)bin429 -> 429 bytes
-rw-r--r--examples/declarative/ui-components/searchbox/images/lineedit-bg-focus.png (renamed from examples/declarative/searchbox/images/lineedit-bg-focus.png)bin526 -> 526 bytes
-rw-r--r--examples/declarative/ui-components/searchbox/images/lineedit-bg.png (renamed from examples/declarative/searchbox/images/lineedit-bg.png)bin426 -> 426 bytes
-rw-r--r--examples/declarative/ui-components/searchbox/main.qml (renamed from examples/declarative/searchbox/main.qml)0
-rw-r--r--examples/declarative/ui-components/searchbox/searchbox.qmlproject16
-rw-r--r--examples/declarative/ui-components/slideswitch/content/Switch.qml76
-rw-r--r--examples/declarative/ui-components/slideswitch/content/background.svg (renamed from examples/declarative/slideswitch/content/background.svg)0
-rw-r--r--examples/declarative/ui-components/slideswitch/content/knob.svg (renamed from examples/declarative/slideswitch/content/knob.svg)0
-rw-r--r--examples/declarative/ui-components/slideswitch/slideswitch.qml (renamed from examples/declarative/slideswitch/slideswitch.qml)0
-rw-r--r--examples/declarative/ui-components/slideswitch/slideswitch.qmlproject16
-rw-r--r--examples/declarative/ui-components/spinner/content/Spinner.qml25
-rw-r--r--examples/declarative/ui-components/spinner/content/spinner-bg.pngbin0 -> 345 bytes
-rw-r--r--examples/declarative/ui-components/spinner/content/spinner-select.pngbin0 -> 320 bytes
-rw-r--r--examples/declarative/ui-components/spinner/main.qml18
-rw-r--r--examples/declarative/ui-components/spinner/spinner.qmlproject16
-rw-r--r--examples/declarative/ui-components/tabwidget/TabWidget.qml (renamed from examples/declarative/tabwidget/TabWidget.qml)0
-rw-r--r--examples/declarative/ui-components/tabwidget/tab.png (renamed from examples/declarative/tabwidget/tab.png)bin507 -> 507 bytes
-rw-r--r--examples/declarative/ui-components/tabwidget/tabs.qml (renamed from examples/declarative/tabwidget/tabs.qml)0
-rw-r--r--examples/declarative/ui-components/tabwidget/tabwidget.qmlproject16
-rw-r--r--examples/declarative/ui-components/ui-components.qmlproject16
-rw-r--r--examples/declarative/velocity/Day.qml101
-rw-r--r--examples/declarative/webview/alerts.qml58
-rw-r--r--examples/declarative/xml/xml.qmlproject16
-rw-r--r--examples/declarative/xml/xmlhttprequest/test.qml (renamed from examples/declarative/xmlhttprequest/test.qml)0
-rw-r--r--examples/declarative/xml/xmlhttprequest/test.xml (renamed from examples/declarative/xmlhttprequest/test.xml)0
-rw-r--r--examples/declarative/xml/xmlhttprequest/xmlhttprequest.qmlproject16
-rw-r--r--examples/declarative/xmldata/daringfireball.qml48
-rw-r--r--examples/declarative/xmldata/yahoonews.qml83
-rw-r--r--examples/graphicsview/padnavigator/backside.ui208
-rw-r--r--examples/graphicsview/padnavigator/flippablepad.cpp99
-rw-r--r--examples/graphicsview/padnavigator/flippablepad.h64
-rw-r--r--examples/graphicsview/padnavigator/form.ui208
-rw-r--r--examples/graphicsview/padnavigator/main.cpp14
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.cpp307
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.h71
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.pro23
-rw-r--r--examples/graphicsview/padnavigator/panel.cpp238
-rw-r--r--examples/graphicsview/padnavigator/panel.h92
-rw-r--r--examples/graphicsview/padnavigator/roundrectitem.cpp146
-rw-r--r--examples/graphicsview/padnavigator/roundrectitem.h51
-rw-r--r--examples/graphicsview/padnavigator/splashitem.cpp48
-rw-r--r--examples/graphicsview/padnavigator/splashitem.h25
-rw-r--r--examples/multimedia/audiodevices/audiodevices.cpp158
-rw-r--r--examples/multimedia/audiodevices/audiodevices.h2
-rw-r--r--examples/multimedia/audiodevices/audiodevicesbase.ui565
-rw-r--r--examples/multimedia/audiodevices/main.cpp4
-rw-r--r--examples/network/bearermonitor/bearermonitor.cpp3
-rw-r--r--examples/network/bearermonitor/sessionwidget.cpp12
-rw-r--r--examples/network/bearermonitor/sessionwidget.h5
-rw-r--r--examples/network/bearermonitor/sessionwidget.ui2
-rw-r--r--mkspecs/common/symbian/symbian-makefile.conf9
-rw-r--r--mkspecs/common/symbian/symbian.conf2
-rw-r--r--mkspecs/features/dbusadaptors.prf5
-rw-r--r--mkspecs/features/dbusinterfaces.prf5
-rw-r--r--mkspecs/features/moc.prf5
-rw-r--r--mkspecs/features/qt.prf3
-rw-r--r--mkspecs/features/qt_functions.prf11
-rw-r--r--mkspecs/features/qttest_p4.prf2
-rw-r--r--mkspecs/features/resources.prf5
-rw-r--r--mkspecs/features/sis_targets.prf2
-rw-r--r--mkspecs/features/static.prf5
-rw-r--r--mkspecs/features/symbian/def_files.prf6
-rw-r--r--mkspecs/features/symbian/run_on_phone.prf9
-rw-r--r--mkspecs/features/symbian/symbian_building.prf43
-rw-r--r--mkspecs/features/uic.prf12
-rw-r--r--mkspecs/features/win32/qaxcontainer.prf4
-rw-r--r--mkspecs/features/win32/qaxserver.prf3
-rw-r--r--mkspecs/symbian/linux-armcc/qmake.conf6
-rw-r--r--mkspecs/symbian/linux-gcce/qmake.conf16
-rw-r--r--mkspecs/win32-g++/qmake.conf1
-rw-r--r--projects.pro4
-rw-r--r--qmake/Makefile.win324
-rw-r--r--qmake/Makefile.win32-g++3
-rw-r--r--qmake/Makefile.win32-g++-sh2
-rw-r--r--qmake/generators/makefile.cpp21
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp9
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp85
-rw-r--r--qmake/generators/symbian/symmake.cpp16
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp2
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp2
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp1
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h2
-rw-r--r--qmake/generators/win32/msvc_vcxproj.cpp1
-rw-r--r--qmake/qmake.pri8
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog28
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp4
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h10
-rw-r--r--src/3rdparty/javascriptcore/VERSION4
-rw-r--r--src/3rdparty/phonon/qt7/audiodevice.mm1
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/ChangeLog18
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog63
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri8
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/qt/api/QtScript.pro2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h12
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog530
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.gypi18
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pri9
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro41
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSParser.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in5
-rw-r--r--src/3rdparty/webkit/WebCore/css/Media.cpp77
-rw-r--r--src/3rdparty/webkit/WebCore/css/Media.h54
-rw-r--r--src/3rdparty/webkit/WebCore/css/Media.idl31
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaQueryExp.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/css/MediaQueryExp.h3
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleMedia.cpp77
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleMedia.h55
-rw-r--r--src/3rdparty/webkit/WebCore/css/StyleMedia.idl32
-rw-r--r--src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c843
-rw-r--r--src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h325
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMedia.cpp201
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSMedia.h87
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStyleMedia.cpp201
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSStyleMedia.h87
-rw-r--r--src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp12
-rw-r--r--src/3rdparty/webkit/WebCore/page/AbstractView.idl2
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMWindow.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMWindow.h8
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMWindow.idl2
-rw-r--r--src/3rdparty/webkit/WebCore/page/EventHandler.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/page/FocusController.cpp74
-rw-r--r--src/3rdparty/webkit/WebCore/page/FocusController.h5
-rw-r--r--src/3rdparty/webkit/WebCore/page/FrameView.h2
-rw-r--r--src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/page/SpatialNavigation.h5
-rw-r--r--src/3rdparty/webkit/WebCore/platform/FileSystem.h6
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp16
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp14
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp29
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h11
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.h1
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubsQt.cpp (renamed from src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp)0
-rw-r--r--src/3rdparty/webkit/WebKit.pri2
-rw-r--r--src/3rdparty/webkit/WebKit.pro2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp24
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp10
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp20
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp10
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.cpp23
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp45
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebkitversion.cpp66
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp216
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp36
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp24
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp132
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h3
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog200
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp6
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp12
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc109
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webelement/main.cpp56
-rw-r--r--src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp8
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp40
-rw-r--r--src/activeqt/control/qaxbindable.cpp2
-rw-r--r--src/corelib/animation/qabstractanimation.cpp3
-rw-r--r--src/corelib/global/qglobal.h8
-rw-r--r--src/corelib/io/qdatastream.cpp3
-rw-r--r--src/corelib/io/qfilesystemwatcher_symbian.cpp63
-rw-r--r--src/corelib/io/qfilesystemwatcher_symbian_p.h6
-rw-r--r--src/corelib/io/qiodevice.cpp3
-rw-r--r--src/corelib/io/qprocess.cpp4
-rw-r--r--src/corelib/io/qurl.cpp25
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp56
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp13
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h7
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp12
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian_p.h1
-rw-r--r--src/corelib/kernel/qfunctions_wince.cpp10
-rw-r--r--src/corelib/kernel/qobject.cpp134
-rw-r--r--src/corelib/kernel/qobject.h2
-rw-r--r--src/corelib/kernel/qobject_p.h4
-rw-r--r--src/corelib/thread/qmutex.cpp133
-rw-r--r--src/corelib/thread/qmutex.h71
-rw-r--r--src/corelib/thread/qmutex_p.h11
-rw-r--r--src/corelib/thread/qmutex_unix.cpp2
-rw-r--r--src/corelib/thread/qmutex_win.cpp2
-rw-r--r--src/corelib/thread/qorderedmutexlocker_p.h14
-rw-r--r--src/corelib/tools/qbytearray.cpp4
-rw-r--r--src/corelib/tools/qcache.h2
-rw-r--r--src/corelib/tools/qchar.cpp35
-rw-r--r--src/corelib/tools/qchar.h9
-rw-r--r--src/corelib/tools/qdatetime.cpp56
-rw-r--r--src/corelib/tools/qdatetime.h1
-rw-r--r--src/corelib/tools/qeasingcurve.cpp4
-rw-r--r--src/corelib/tools/qhash.cpp4
-rw-r--r--src/corelib/tools/qline.cpp8
-rw-r--r--src/corelib/tools/qlist.h5
-rw-r--r--src/corelib/tools/qlocale.cpp44
-rw-r--r--src/corelib/tools/qlocale.h3
-rw-r--r--src/corelib/tools/qlocale_data_p.h4072
-rw-r--r--src/corelib/tools/qlocale_p.h18
-rw-r--r--src/corelib/tools/qlocale_symbian.cpp57
-rw-r--r--src/corelib/tools/qmap.h20
-rw-r--r--src/corelib/tools/qpair.qdoc4
-rw-r--r--src/corelib/tools/qpoint.cpp8
-rw-r--r--src/corelib/tools/qrect.cpp8
-rw-r--r--src/corelib/tools/qregexp.cpp4
-rw-r--r--src/corelib/tools/qsize.cpp8
-rw-r--r--src/corelib/tools/qstring.cpp4
-rw-r--r--src/corelib/tools/qstringlist.cpp4
-rw-r--r--src/dbus/qdbusinternalfilters.cpp2
-rw-r--r--src/dbus/qdbusmacros.h4
-rw-r--r--src/dbus/qdbusxmlgenerator.cpp2
-rw-r--r--src/declarative/QmlChanges.txt27
-rw-r--r--src/declarative/declarative.pro4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors.cpp1
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp50
-rw-r--r--src/declarative/graphicsitems/qdeclarativeevents.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp253
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p.h35
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p_p.h10
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable.cpp17
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp134
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp253
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp575
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.h48
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem_p.h76
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp345
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview_p.h2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader.cpp157
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader_p.h10
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader_p_p.h3
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp68
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p.h8
-rw-r--r--src/declarative/graphicsitems/qdeclarativepainteditem.cpp31
-rw-r--r--src/declarative/graphicsitems/qdeclarativepainteditem_p.h5
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath.cpp35
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath_p.h1
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath_p_p.h3
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp111
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview_p.h5
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners.cpp121
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners_p.h6
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners_p_p.h5
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp93
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp96
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp137
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit_p.h5
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit_p_p.h7
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp176
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p.h5
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p_p.h5
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp97
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h6
-rw-r--r--src/declarative/qml/qdeclarativebinding.cpp25
-rw-r--r--src/declarative/qml/qdeclarativebinding_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeboundsignal.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings.cpp424
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings_p.h6
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp137
-rw-r--r--src/declarative/qml/qdeclarativecompiler_p.h4
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp120
-rw-r--r--src/declarative/qml/qdeclarativecomponent.h9
-rw-r--r--src/declarative/qml/qdeclarativecomponent_p.h3
-rw-r--r--src/declarative/qml/qdeclarativecompositetypedata_p.h2
-rw-r--r--src/declarative/qml/qdeclarativecompositetypemanager.cpp77
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp21
-rw-r--r--src/declarative/qml/qdeclarativecontext.h2
-rw-r--r--src/declarative/qml/qdeclarativecontext_p.h1
-rw-r--r--src/declarative/qml/qdeclarativecontextscriptclass.cpp46
-rw-r--r--src/declarative/qml/qdeclarativecontextscriptclass_p.h4
-rw-r--r--src/declarative/qml/qdeclarativedata_p.h10
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp976
-rw-r--r--src/declarative/qml/qdeclarativeengine_p.h109
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeexpression.cpp22
-rw-r--r--src/declarative/qml/qdeclarativeexpression.h6
-rw-r--r--src/declarative/qml/qdeclarativeextensionplugin.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeglobalscriptclass.cpp20
-rw-r--r--src/declarative/qml/qdeclarativeglobalscriptclass_p.h1
-rw-r--r--src/declarative/qml/qdeclarativeguard_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeimport.cpp931
-rw-r--r--src/declarative/qml/qdeclarativeimport_p.h139
-rw-r--r--src/declarative/qml/qdeclarativeinclude.cpp319
-rw-r--r--src/declarative/qml/qdeclarativeinclude_p.h115
-rw-r--r--src/declarative/qml/qdeclarativeinfo.cpp3
-rw-r--r--src/declarative/qml/qdeclarativeinstruction.cpp4
-rw-r--r--src/declarative/qml/qdeclarativeinstruction_p.h1
-rw-r--r--src/declarative/qml/qdeclarativeobjectscriptclass.cpp13
-rw-r--r--src/declarative/qml/qdeclarativeparser.cpp45
-rw-r--r--src/declarative/qml/qdeclarativeparser_p.h7
-rw-r--r--src/declarative/qml/qdeclarativeparserstatus.cpp10
-rw-r--r--src/declarative/qml/qdeclarativeparserstatus.h4
-rw-r--r--src/declarative/qml/qdeclarativeproperty.cpp36
-rw-r--r--src/declarative/qml/qdeclarativepropertycache.cpp31
-rw-r--r--src/declarative/qml/qdeclarativepropertycache_p.h1
-rw-r--r--src/declarative/qml/qdeclarativepropertyvaluesource.cpp3
-rw-r--r--src/declarative/qml/qdeclarativescriptparser.cpp75
-rw-r--r--src/declarative/qml/qdeclarativescriptstring.h2
-rw-r--r--src/declarative/qml/qdeclarativestringconverters_p.h2
-rw-r--r--src/declarative/qml/qdeclarativevaluetype.cpp220
-rw-r--r--src/declarative/qml/qdeclarativevaluetype_p.h147
-rw-r--r--src/declarative/qml/qdeclarativevaluetypescriptclass.cpp2
-rw-r--r--src/declarative/qml/qdeclarativevme.cpp13
-rw-r--r--src/declarative/qml/qdeclarativevmemetaobject.cpp3
-rw-r--r--src/declarative/qml/qdeclarativewatcher.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp39
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript_p.h5
-rw-r--r--src/declarative/qml/qdeclarativexmlhttprequest.cpp29
-rw-r--r--src/declarative/qml/qml.pri4
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp159
-rw-r--r--src/declarative/util/qdeclarativeanimation_p.h1
-rw-r--r--src/declarative/util/qdeclarativebehavior.cpp23
-rw-r--r--src/declarative/util/qdeclarativebehavior_p.h3
-rw-r--r--src/declarative/util/qdeclarativebind.cpp9
-rw-r--r--src/declarative/util/qdeclarativebind_p.h1
-rw-r--r--src/declarative/util/qdeclarativeconnections.cpp52
-rw-r--r--src/declarative/util/qdeclarativeconnections_p.h5
-rw-r--r--src/declarative/util/qdeclarativefontloader.cpp9
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp38
-rw-r--r--src/declarative/util/qdeclarativelistmodelworkeragent_p.h2
-rw-r--r--src/declarative/util/qdeclarativeopenmetaobject.cpp2
-rw-r--r--src/declarative/util/qdeclarativepackage.cpp4
-rw-r--r--src/declarative/util/qdeclarativepixmapcache.cpp6
-rw-r--r--src/declarative/util/qdeclarativepropertychanges.cpp36
-rw-r--r--src/declarative/util/qdeclarativesmoothedanimation.cpp6
-rw-r--r--src/declarative/util/qdeclarativesmoothedanimation_p.h2
-rw-r--r--src/declarative/util/qdeclarativesmoothedfollow.cpp6
-rw-r--r--src/declarative/util/qdeclarativesmoothedfollow_p.h2
-rw-r--r--src/declarative/util/qdeclarativespringfollow.cpp2
-rw-r--r--src/declarative/util/qdeclarativestate.cpp4
-rw-r--r--src/declarative/util/qdeclarativestate_p.h1
-rw-r--r--src/declarative/util/qdeclarativestategroup.cpp10
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp301
-rw-r--r--src/declarative/util/qdeclarativestateoperations_p.h39
-rw-r--r--src/declarative/util/qdeclarativesystempalette.cpp1
-rw-r--r--src/declarative/util/qdeclarativetimeline.cpp15
-rw-r--r--src/declarative/util/qdeclarativetransition.cpp4
-rw-r--r--src/declarative/util/qdeclarativetransitionmanager_p_p.h2
-rw-r--r--src/declarative/util/qdeclarativeview.cpp61
-rw-r--r--src/declarative/util/qdeclarativeview.h3
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp99
-rw-r--r--src/gui/dialogs/qcolordialog_mac.mm20
-rw-r--r--src/gui/dialogs/qfiledialog.h1
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm32
-rw-r--r--src/gui/dialogs/qfileinfogatherer.cpp15
-rw-r--r--src/gui/dialogs/qfileinfogatherer_p.h3
-rw-r--r--src/gui/dialogs/qfontdialog_mac.mm16
-rw-r--r--src/gui/dialogs/qmessagebox.h2
-rw-r--r--src/gui/dialogs/qnspanelproxy_mac.mm18
-rw-r--r--src/gui/dialogs/qpagesetupdialog_mac.mm8
-rw-r--r--src/gui/dialogs/qprintdialog_mac.mm8
-rw-r--r--src/gui/dialogs/qprintdialog_unix.cpp2
-rw-r--r--src/gui/dialogs/qwizard_win.cpp3
-rw-r--r--src/gui/effects/qgraphicseffect.cpp2
-rw-r--r--src/gui/egl/qegl_qws.cpp2
-rw-r--r--src/gui/egl/qegl_x11.cpp5
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp108
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h1
-rw-r--r--src/gui/graphicsview/qgraphicsitemanimation.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp69
-rw-r--r--src/gui/graphicsview/qgraphicsscene.h1
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h43
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp83
-rw-r--r--src/gui/graphicsview/qgraphicsview_p.h33
-rw-r--r--src/gui/graphicsview/qgraphicswidget.cpp22
-rw-r--r--src/gui/graphicsview/qgraphicswidget_p.cpp21
-rw-r--r--src/gui/graphicsview/qgraphicswidget_p.h1
-rw-r--r--src/gui/image/qicon.cpp25
-rw-r--r--src/gui/image/qpixmapcache.cpp43
-rw-r--r--src/gui/image/qpixmapcache.h10
-rw-r--r--src/gui/image/qpixmapcache_p.h2
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp7
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp11
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp2
-rw-r--r--src/gui/kernel/qapplication.cpp17
-rw-r--r--src/gui/kernel/qapplication_s60.cpp219
-rw-r--r--src/gui/kernel/qapplication_win.cpp4
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm21
-rw-r--r--src/gui/kernel/qcursor.cpp4
-rw-r--r--src/gui/kernel/qdnd_qws.cpp4
-rw-r--r--src/gui/kernel/qdnd_x11.cpp6
-rw-r--r--src/gui/kernel/qgesture.cpp2
-rw-r--r--src/gui/kernel/qgesturemanager.cpp77
-rw-r--r--src/gui/kernel/qgesturemanager_p.h5
-rw-r--r--src/gui/kernel/qsound_mac.mm6
-rw-r--r--src/gui/kernel/qt_mac_p.h2
-rw-r--r--src/gui/kernel/qt_s60_p.h15
-rw-r--r--src/gui/kernel/qwidget.cpp91
-rw-r--r--src/gui/kernel/qwidget_mac.mm30
-rw-r--r--src/gui/kernel/qwidget_p.h8
-rw-r--r--src/gui/kernel/qwidget_s60.cpp4
-rw-r--r--src/gui/kernel/qwidget_win.cpp7
-rw-r--r--src/gui/kernel/qwidget_wince.cpp4
-rw-r--r--src/gui/kernel/qwidget_x11.cpp2
-rw-r--r--src/gui/painting/qbezier.cpp228
-rw-r--r--src/gui/painting/qbezier_p.h7
-rw-r--r--src/gui/painting/qcolor.cpp6
-rw-r--r--src/gui/painting/qdatabuffer_p.h19
-rw-r--r--src/gui/painting/qdrawutil.cpp10
-rw-r--r--src/gui/painting/qmatrix.cpp8
-rw-r--r--src/gui/painting/qoutlinemapper.cpp3
-rw-r--r--src/gui/painting/qoutlinemapper_p.h11
-rw-r--r--src/gui/painting/qpaintengine_mac.cpp6
-rw-r--r--src/gui/painting/qpaintengine_mac_p.h3
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp52
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h3
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp2
-rw-r--r--src/gui/painting/qpaintengineex.cpp5
-rw-r--r--src/gui/painting/qpainter.cpp52
-rw-r--r--src/gui/painting/qpainterpath.cpp4
-rw-r--r--src/gui/painting/qpathclipper.cpp23
-rw-r--r--src/gui/painting/qpathclipper_p.h7
-rw-r--r--src/gui/painting/qpdf.cpp9
-rw-r--r--src/gui/painting/qpolygon.cpp8
-rw-r--r--src/gui/painting/qpolygonclipper_p.h3
-rw-r--r--src/gui/painting/qprintengine_pdf.cpp46
-rw-r--r--src/gui/painting/qprintengine_pdf_p.h1
-rw-r--r--src/gui/painting/qrasterizer.cpp8
-rw-r--r--src/gui/painting/qstroker.cpp23
-rw-r--r--src/gui/painting/qstroker_p.h18
-rw-r--r--src/gui/painting/qtextureglyphcache_p.h2
-rw-r--r--src/gui/painting/qtransform.cpp9
-rw-r--r--src/gui/styles/qcleanlooksstyle.cpp6
-rw-r--r--src/gui/styles/qgtkpainter.cpp9
-rw-r--r--src/gui/styles/qgtkstyle.cpp45
-rw-r--r--src/gui/styles/qmacstyle_mac.mm20
-rw-r--r--src/gui/styles/qs60style.cpp213
-rw-r--r--src/gui/styles/qs60style_p.h2
-rw-r--r--src/gui/styles/qs60style_s60.cpp27
-rw-r--r--src/gui/styles/qstylehelper.cpp62
-rw-r--r--src/gui/styles/qstylehelper_p.h33
-rw-r--r--src/gui/styles/qwindowsmobilestyle.cpp44
-rw-r--r--src/gui/styles/styles.pri7
-rw-r--r--src/gui/text/qfont.cpp3
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp1
-rw-r--r--src/gui/text/qfontengine_mac.mm18
-rw-r--r--src/gui/text/qfontengine_p.h3
-rw-r--r--src/gui/text/qtextcontrol.cpp8
-rw-r--r--src/gui/text/qtextdocument.cpp2
-rw-r--r--src/gui/text/qtextengine_p.h2
-rw-r--r--src/gui/util/qcompleter.cpp40
-rw-r--r--src/gui/util/qsystemtrayicon_mac.mm37
-rw-r--r--src/gui/util/qsystemtrayicon_win.cpp53
-rw-r--r--src/gui/util/qsystemtrayicon_wince.cpp296
-rw-r--r--src/gui/util/util.pri5
-rw-r--r--src/gui/widgets/qabstractslider.cpp8
-rw-r--r--src/gui/widgets/qcocoatoolbardelegate_mac.mm2
-rw-r--r--src/gui/widgets/qcocoatoolbardelegate_mac_p.h2
-rw-r--r--src/gui/widgets/qcombobox.cpp8
-rw-r--r--src/gui/widgets/qcombobox_p.h2
-rw-r--r--src/gui/widgets/qcommandlinkbutton.cpp3
-rw-r--r--src/gui/widgets/qdockarealayout.cpp46
-rw-r--r--src/gui/widgets/qdockarealayout_p.h4
-rw-r--r--src/gui/widgets/qdockwidget.cpp9
-rw-r--r--src/gui/widgets/qmainwindowlayout_mac.mm2
-rw-r--r--src/gui/widgets/qmenu.h2
-rw-r--r--src/gui/widgets/qmenu_p.h2
-rw-r--r--src/gui/widgets/qmenu_wince.cpp155
-rw-r--r--src/gui/widgets/qmenubar.cpp2
-rw-r--r--src/gui/widgets/qmenubar.h2
-rw-r--r--src/gui/widgets/qtabbar.cpp39
-rw-r--r--src/imports/folderlistmodel/folderlistmodel.pro26
-rw-r--r--src/imports/folderlistmodel/plugin.cpp69
-rw-r--r--src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp401
-rw-r--r--src/imports/folderlistmodel/qdeclarativefolderlistmodel.h155
-rw-r--r--src/imports/folderlistmodel/qmldir1
-rw-r--r--src/imports/gestures/qdeclarativegesturearea.cpp4
-rw-r--r--src/imports/imports.pro3
-rw-r--r--src/imports/multimedia/multimedia.cpp73
-rw-r--r--src/imports/multimedia/multimedia.pro36
-rw-r--r--src/imports/multimedia/qdeclarativeaudio.cpp357
-rw-r--r--src/imports/multimedia/qdeclarativeaudio_p.h176
-rw-r--r--src/imports/multimedia/qdeclarativemediabase.cpp528
-rw-r--r--src/imports/multimedia/qdeclarativemediabase_p.h181
-rw-r--r--src/imports/multimedia/qdeclarativevideo.cpp976
-rw-r--r--src/imports/multimedia/qdeclarativevideo_p.h207
-rw-r--r--src/imports/multimedia/qmetadatacontrolmetaobject.cpp362
-rw-r--r--src/imports/multimedia/qmetadatacontrolmetaobject_p.h92
-rw-r--r--src/imports/multimedia/qmldir1
-rw-r--r--src/imports/webkit/qdeclarativewebview.cpp277
-rw-r--r--src/imports/webkit/qdeclarativewebview_p.h32
-rw-r--r--src/imports/widgets/qmldir1
-rw-r--r--src/imports/widgets/widgets.cpp71
-rw-r--r--src/imports/widgets/widgets.pro30
-rw-r--r--src/multimedia/audio/audio.pri (renamed from src/multimedia/multimedia/audio/audio.pri)0
-rw-r--r--src/multimedia/audio/qaudio.cpp (renamed from src/multimedia/multimedia/audio/qaudio.cpp)0
-rw-r--r--src/multimedia/audio/qaudio.h (renamed from src/multimedia/multimedia/audio/qaudio.h)0
-rw-r--r--src/multimedia/audio/qaudio_mac.cpp (renamed from src/multimedia/multimedia/audio/qaudio_mac.cpp)0
-rw-r--r--src/multimedia/audio/qaudio_mac_p.h (renamed from src/multimedia/multimedia/audio/qaudio_mac_p.h)0
-rw-r--r--src/multimedia/audio/qaudio_symbian_p.cpp624
-rw-r--r--src/multimedia/audio/qaudio_symbian_p.h189
-rw-r--r--src/multimedia/audio/qaudiodevicefactory.cpp (renamed from src/multimedia/multimedia/audio/qaudiodevicefactory.cpp)0
-rw-r--r--src/multimedia/audio/qaudiodevicefactory_p.h (renamed from src/multimedia/multimedia/audio/qaudiodevicefactory_p.h)0
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo.cpp (renamed from src/multimedia/multimedia/audio/qaudiodeviceinfo.cpp)0
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo.h (renamed from src/multimedia/multimedia/audio/qaudiodeviceinfo.h)0
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp (renamed from src/multimedia/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp)0
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_alsa_p.h (renamed from src/multimedia/multimedia/audio/qaudiodeviceinfo_alsa_p.h)0
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp (renamed from src/multimedia/multimedia/audio/qaudiodeviceinfo_mac_p.cpp)0
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_mac_p.h (renamed from src/multimedia/multimedia/audio/qaudiodeviceinfo_mac_p.h)0
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_symbian_p.cpp240
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_symbian_p.h121
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp (renamed from src/multimedia/multimedia/audio/qaudiodeviceinfo_win32_p.cpp)0
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_win32_p.h (renamed from src/multimedia/multimedia/audio/qaudiodeviceinfo_win32_p.h)0
-rw-r--r--src/multimedia/audio/qaudioengine.cpp (renamed from src/multimedia/multimedia/audio/qaudioengine.cpp)0
-rw-r--r--src/multimedia/audio/qaudioengine.h (renamed from src/multimedia/multimedia/audio/qaudioengine.h)0
-rw-r--r--src/multimedia/audio/qaudioengineplugin.cpp (renamed from src/multimedia/multimedia/audio/qaudioengineplugin.cpp)0
-rw-r--r--src/multimedia/audio/qaudioengineplugin.h (renamed from src/multimedia/multimedia/audio/qaudioengineplugin.h)0
-rw-r--r--src/multimedia/audio/qaudioformat.cpp (renamed from src/multimedia/multimedia/audio/qaudioformat.cpp)0
-rw-r--r--src/multimedia/audio/qaudioformat.h (renamed from src/multimedia/multimedia/audio/qaudioformat.h)0
-rw-r--r--src/multimedia/audio/qaudioinput.cpp (renamed from src/multimedia/multimedia/audio/qaudioinput.cpp)0
-rw-r--r--src/multimedia/audio/qaudioinput.h (renamed from src/multimedia/multimedia/audio/qaudioinput.h)0
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.cpp (renamed from src/multimedia/multimedia/audio/qaudioinput_alsa_p.cpp)0
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.h (renamed from src/multimedia/multimedia/audio/qaudioinput_alsa_p.h)0
-rw-r--r--src/multimedia/audio/qaudioinput_mac_p.cpp (renamed from src/multimedia/multimedia/audio/qaudioinput_mac_p.cpp)0
-rw-r--r--src/multimedia/audio/qaudioinput_mac_p.h (renamed from src/multimedia/multimedia/audio/qaudioinput_mac_p.h)0
-rw-r--r--src/multimedia/audio/qaudioinput_symbian_p.cpp551
-rw-r--r--src/multimedia/audio/qaudioinput_symbian_p.h174
-rw-r--r--src/multimedia/audio/qaudioinput_win32_p.cpp (renamed from src/multimedia/multimedia/audio/qaudioinput_win32_p.cpp)0
-rw-r--r--src/multimedia/audio/qaudioinput_win32_p.h (renamed from src/multimedia/multimedia/audio/qaudioinput_win32_p.h)0
-rw-r--r--src/multimedia/audio/qaudiooutput.cpp421
-rw-r--r--src/multimedia/audio/qaudiooutput.h (renamed from src/multimedia/multimedia/audio/qaudiooutput.h)0
-rw-r--r--src/multimedia/audio/qaudiooutput_alsa_p.cpp (renamed from src/multimedia/multimedia/audio/qaudiooutput_alsa_p.cpp)0
-rw-r--r--src/multimedia/audio/qaudiooutput_alsa_p.h (renamed from src/multimedia/multimedia/audio/qaudiooutput_alsa_p.h)0
-rw-r--r--src/multimedia/audio/qaudiooutput_mac_p.cpp (renamed from src/multimedia/multimedia/audio/qaudiooutput_mac_p.cpp)0
-rw-r--r--src/multimedia/audio/qaudiooutput_mac_p.h (renamed from src/multimedia/multimedia/audio/qaudiooutput_mac_p.h)0
-rw-r--r--src/multimedia/audio/qaudiooutput_symbian_p.cpp646
-rw-r--r--src/multimedia/audio/qaudiooutput_symbian_p.h198
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.cpp (renamed from src/multimedia/multimedia/audio/qaudiooutput_win32_p.cpp)0
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.h (renamed from src/multimedia/multimedia/audio/qaudiooutput_win32_p.h)0
-rw-r--r--src/multimedia/mediaservices/base/base.pri69
-rw-r--r--src/multimedia/mediaservices/base/qgraphicsvideoitem.cpp442
-rw-r--r--src/multimedia/mediaservices/base/qgraphicsvideoitem.h115
-rw-r--r--src/multimedia/mediaservices/base/qlocalmediaplaylistprovider.cpp196
-rw-r--r--src/multimedia/mediaservices/base/qlocalmediaplaylistprovider.h87
-rw-r--r--src/multimedia/mediaservices/base/qmediacontent.cpp242
-rw-r--r--src/multimedia/mediaservices/base/qmediacontent.h93
-rw-r--r--src/multimedia/mediaservices/base/qmediacontrol.cpp140
-rw-r--r--src/multimedia/mediaservices/base/qmediacontrol.h82
-rw-r--r--src/multimedia/mediaservices/base/qmediacontrol_p.h74
-rw-r--r--src/multimedia/mediaservices/base/qmediaobject.cpp419
-rw-r--r--src/multimedia/mediaservices/base/qmediaobject.h121
-rw-r--r--src/multimedia/mediaservices/base/qmediaobject_p.h95
-rw-r--r--src/multimedia/mediaservices/base/qmediaplaylist.cpp724
-rw-r--r--src/multimedia/mediaservices/base/qmediaplaylist.h147
-rw-r--r--src/multimedia/mediaservices/base/qmediaplaylist_p.h172
-rw-r--r--src/multimedia/mediaservices/base/qmediaplaylistcontrol.cpp204
-rw-r--r--src/multimedia/mediaservices/base/qmediaplaylistcontrol.h97
-rw-r--r--src/multimedia/mediaservices/base/qmediaplaylistioplugin.cpp192
-rw-r--r--src/multimedia/mediaservices/base/qmediaplaylistioplugin.h126
-rw-r--r--src/multimedia/mediaservices/base/qmediaplaylistnavigator.cpp545
-rw-r--r--src/multimedia/mediaservices/base/qmediaplaylistnavigator.h116
-rw-r--r--src/multimedia/mediaservices/base/qmediaplaylistprovider.cpp308
-rw-r--r--src/multimedia/mediaservices/base/qmediaplaylistprovider.h114
-rw-r--r--src/multimedia/mediaservices/base/qmediaplaylistprovider_p.h75
-rw-r--r--src/multimedia/mediaservices/base/qmediapluginloader.cpp139
-rw-r--r--src/multimedia/mediaservices/base/qmediapluginloader_p.h92
-rw-r--r--src/multimedia/mediaservices/base/qmediaresource.cpp399
-rw-r--r--src/multimedia/mediaservices/base/qmediaresource.h134
-rw-r--r--src/multimedia/mediaservices/base/qmediaservice.cpp140
-rw-r--r--src/multimedia/mediaservices/base/qmediaservice.h90
-rw-r--r--src/multimedia/mediaservices/base/qmediaservice_p.h75
-rw-r--r--src/multimedia/mediaservices/base/qmediaserviceprovider.cpp738
-rw-r--r--src/multimedia/mediaservices/base/qmediaserviceprovider.h174
-rw-r--r--src/multimedia/mediaservices/base/qmediaserviceproviderplugin.h125
-rw-r--r--src/multimedia/mediaservices/base/qmediatimerange.cpp708
-rw-r--r--src/multimedia/mediaservices/base/qmediatimerange.h135
-rw-r--r--src/multimedia/mediaservices/base/qmetadatacontrol.cpp185
-rw-r--r--src/multimedia/mediaservices/base/qmetadatacontrol.h92
-rw-r--r--src/multimedia/mediaservices/base/qpaintervideosurface.cpp1565
-rw-r--r--src/multimedia/mediaservices/base/qpaintervideosurface_mac.mm283
-rw-r--r--src/multimedia/mediaservices/base/qpaintervideosurface_mac_p.h100
-rw-r--r--src/multimedia/mediaservices/base/qpaintervideosurface_p.h178
-rw-r--r--src/multimedia/mediaservices/base/qtmedianamespace.h194
-rw-r--r--src/multimedia/mediaservices/base/qtmedianamespace.qdoc214
-rw-r--r--src/multimedia/mediaservices/base/qvideodevicecontrol.cpp155
-rw-r--r--src/multimedia/mediaservices/base/qvideodevicecontrol.h90
-rw-r--r--src/multimedia/mediaservices/base/qvideooutputcontrol.cpp135
-rw-r--r--src/multimedia/mediaservices/base/qvideooutputcontrol.h91
-rw-r--r--src/multimedia/mediaservices/base/qvideorenderercontrol.cpp124
-rw-r--r--src/multimedia/mediaservices/base/qvideorenderercontrol.h77
-rw-r--r--src/multimedia/mediaservices/base/qvideowidget.cpp944
-rw-r--r--src/multimedia/mediaservices/base/qvideowidget.h131
-rw-r--r--src/multimedia/mediaservices/base/qvideowidget_p.h271
-rw-r--r--src/multimedia/mediaservices/base/qvideowidgetcontrol.cpp235
-rw-r--r--src/multimedia/mediaservices/base/qvideowidgetcontrol.h105
-rw-r--r--src/multimedia/mediaservices/base/qvideowindowcontrol.cpp275
-rw-r--r--src/multimedia/mediaservices/base/qvideowindowcontrol.h111
-rw-r--r--src/multimedia/mediaservices/effects/effects.pri26
-rw-r--r--src/multimedia/mediaservices/effects/qsoundeffect.cpp209
-rw-r--r--src/multimedia/mediaservices/effects/qsoundeffect_p.h109
-rw-r--r--src/multimedia/mediaservices/effects/qsoundeffect_pulse_p.cpp499
-rw-r--r--src/multimedia/mediaservices/effects/qsoundeffect_pulse_p.h137
-rw-r--r--src/multimedia/mediaservices/effects/qsoundeffect_qmedia_p.cpp132
-rw-r--r--src/multimedia/mediaservices/effects/qsoundeffect_qmedia_p.h103
-rw-r--r--src/multimedia/mediaservices/effects/qsoundeffect_qsound_p.cpp131
-rw-r--r--src/multimedia/mediaservices/effects/qsoundeffect_qsound_p.h102
-rw-r--r--src/multimedia/mediaservices/effects/wavedecoder_p.cpp151
-rw-r--r--src/multimedia/mediaservices/effects/wavedecoder_p.h133
-rw-r--r--src/multimedia/mediaservices/mediaservices.pro21
-rw-r--r--src/multimedia/mediaservices/playback/playback.pri11
-rw-r--r--src/multimedia/mediaservices/playback/qmediaplayer.cpp996
-rw-r--r--src/multimedia/mediaservices/playback/qmediaplayer.h203
-rw-r--r--src/multimedia/mediaservices/playback/qmediaplayercontrol.cpp378
-rw-r--r--src/multimedia/mediaservices/playback/qmediaplayercontrol.h131
-rw-r--r--src/multimedia/multimedia.pro21
-rw-r--r--src/multimedia/multimedia/audio/qaudio_symbian_p.cpp395
-rw-r--r--src/multimedia/multimedia/audio/qaudio_symbian_p.h156
-rw-r--r--src/multimedia/multimedia/audio/qaudiodeviceinfo_symbian_p.cpp200
-rw-r--r--src/multimedia/multimedia/audio/qaudiodeviceinfo_symbian_p.h107
-rw-r--r--src/multimedia/multimedia/audio/qaudioinput_symbian_p.cpp594
-rw-r--r--src/multimedia/multimedia/audio/qaudioinput_symbian_p.h188
-rw-r--r--src/multimedia/multimedia/audio/qaudiooutput.cpp411
-rw-r--r--src/multimedia/multimedia/audio/qaudiooutput_symbian_p.cpp697
-rw-r--r--src/multimedia/multimedia/audio/qaudiooutput_symbian_p.h210
-rw-r--r--src/multimedia/multimedia/multimedia.pro19
-rw-r--r--src/multimedia/video/qabstractvideobuffer.cpp (renamed from src/multimedia/multimedia/video/qabstractvideobuffer.cpp)0
-rw-r--r--src/multimedia/video/qabstractvideobuffer.h (renamed from src/multimedia/multimedia/video/qabstractvideobuffer.h)0
-rw-r--r--src/multimedia/video/qabstractvideobuffer_p.h (renamed from src/multimedia/multimedia/video/qabstractvideobuffer_p.h)0
-rw-r--r--src/multimedia/video/qabstractvideosurface.cpp (renamed from src/multimedia/multimedia/video/qabstractvideosurface.cpp)0
-rw-r--r--src/multimedia/video/qabstractvideosurface.h (renamed from src/multimedia/multimedia/video/qabstractvideosurface.h)0
-rw-r--r--src/multimedia/video/qabstractvideosurface_p.h (renamed from src/multimedia/multimedia/video/qabstractvideosurface_p.h)0
-rw-r--r--src/multimedia/video/qimagevideobuffer.cpp (renamed from src/multimedia/multimedia/video/qimagevideobuffer.cpp)0
-rw-r--r--src/multimedia/video/qimagevideobuffer_p.h (renamed from src/multimedia/multimedia/video/qimagevideobuffer_p.h)0
-rw-r--r--src/multimedia/video/qmemoryvideobuffer.cpp (renamed from src/multimedia/multimedia/video/qmemoryvideobuffer.cpp)0
-rw-r--r--src/multimedia/video/qmemoryvideobuffer_p.h (renamed from src/multimedia/multimedia/video/qmemoryvideobuffer_p.h)0
-rw-r--r--src/multimedia/video/qvideoframe.cpp (renamed from src/multimedia/multimedia/video/qvideoframe.cpp)0
-rw-r--r--src/multimedia/video/qvideoframe.h (renamed from src/multimedia/multimedia/video/qvideoframe.h)0
-rw-r--r--src/multimedia/video/qvideosurfaceformat.cpp (renamed from src/multimedia/multimedia/video/qvideosurfaceformat.cpp)0
-rw-r--r--src/multimedia/video/qvideosurfaceformat.h (renamed from src/multimedia/multimedia/video/qvideosurfaceformat.h)0
-rw-r--r--src/multimedia/video/video.pri (renamed from src/multimedia/multimedia/video/video.pri)0
-rw-r--r--src/network/access/qabstractnetworkcache.cpp4
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp39
-rw-r--r--src/network/access/qhttpnetworkconnection_p.h2
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp10
-rw-r--r--src/network/access/qhttpnetworkreply.cpp3
-rw-r--r--src/network/access/qhttpnetworkrequest.cpp13
-rw-r--r--src/network/access/qhttpnetworkrequest_p.h4
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp7
-rw-r--r--src/network/access/qnetworkaccessbackend_p.h1
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp13
-rw-r--r--src/network/access/qnetworkaccesshttpbackend_p.h3
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp27
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp8
-rw-r--r--src/network/access/qnetworkrequest.cpp52
-rw-r--r--src/network/access/qnetworkrequest.h7
-rw-r--r--src/network/kernel/qhostaddress.cpp4
-rw-r--r--src/network/kernel/qhostinfo.cpp33
-rw-r--r--src/network/kernel/qhostinfo_p.h4
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp1
-rw-r--r--src/network/kernel/qhostinfo_win.cpp1
-rw-r--r--src/network/socket/qlocalserver_win.cpp2
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp3
-rw-r--r--src/network/socket/qtcpserver.cpp18
-rw-r--r--src/network/socket/qtcpserver.h1
-rw-r--r--src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h4
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadermanager.cpp10
-rw-r--r--src/opengl/gl2paintengineex/qglengineshadersource_p.h1
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h1
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp90
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h3
-rw-r--r--src/opengl/gl2paintengineex/qtriangulatingstroker.cpp5
-rw-r--r--src/opengl/gl2paintengineex/qtriangulatingstroker_p.h1
-rw-r--r--src/opengl/gl2paintengineex/qtriangulator.cpp12
-rw-r--r--src/opengl/qgl.cpp79
-rw-r--r--src/opengl/qgl.h1
-rw-r--r--src/opengl/qgl_egl.cpp20
-rw-r--r--src/opengl/qgl_p.h8
-rw-r--r--src/opengl/qglpaintdevice.cpp5
-rw-r--r--src/opengl/qglpixmapfilter.cpp9
-rw-r--r--src/opengl/qpaintengine_opengl.cpp10
-rw-r--r--src/openvg/qpaintengine_vg.cpp87
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp405
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h15
-rw-r--r--src/plugins/bearer/symbian/symbian.pro1
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp248
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h27
-rw-r--r--src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp2
-rw-r--r--src/plugins/imageformats/gif/qgifhandler.cpp7
-rw-r--r--src/plugins/imageformats/svg/qsvgiohandler.cpp10
-rw-r--r--src/plugins/mediaservices/directshow/directshow.pro14
-rw-r--r--src/plugins/mediaservices/directshow/dsserviceplugin.cpp188
-rw-r--r--src/plugins/mediaservices/directshow/dsserviceplugin.h77
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.cpp166
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.h90
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp161
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.h83
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowglobal.h147
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.cpp501
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.h126
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp639
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.h157
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.cpp205
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.h85
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.cpp229
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.h78
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.cpp370
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.h104
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.cpp140
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.h81
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.cpp395
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.h153
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp1410
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.h220
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.cpp403
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.h126
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.cpp87
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.h75
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.cpp93
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.h82
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/mediaplayer.pri45
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.cpp91
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.h77
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.cpp633
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.h180
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.cpp317
-rw-r--r--src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.h116
-rw-r--r--src/plugins/mediaservices/gstreamer/gstreamer.pro59
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/mediaplayer.pri17
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp209
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.h83
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp501
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.h138
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp149
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.h101
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp924
-rw-r--r--src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.h176
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamerbushelper.cpp206
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamerbushelper.h87
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp97
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamermessage.h76
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.cpp192
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.h76
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.cpp165
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.h85
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.cpp77
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.h86
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.cpp230
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.h114
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.cpp88
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.h78
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.cpp52
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.h69
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideowidget.cpp340
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstreamervideowidget.h110
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstvideobuffer.cpp101
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstvideobuffer.h80
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.cpp282
-rw-r--r--src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.h131
-rw-r--r--src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.cpp713
-rw-r--r--src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h163
-rw-r--r--src/plugins/mediaservices/gstreamer/qx11videosurface.cpp523
-rw-r--r--src/plugins/mediaservices/gstreamer/qx11videosurface.h120
-rw-r--r--src/plugins/mediaservices/mediaservices.pro13
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/mediaplayer.pri18
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.h128
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.mm193
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.h84
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.mm274
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.h90
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.mm152
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.h151
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm552
-rw-r--r--src/plugins/mediaservices/qt7/qcvdisplaylink.h90
-rw-r--r--src/plugins/mediaservices/qt7/qcvdisplaylink.mm158
-rw-r--r--src/plugins/mediaservices/qt7/qt7.pro47
-rw-r--r--src/plugins/mediaservices/qt7/qt7backend.h68
-rw-r--r--src/plugins/mediaservices/qt7/qt7backend.mm60
-rw-r--r--src/plugins/mediaservices/qt7/qt7ciimagevideobuffer.h90
-rw-r--r--src/plugins/mediaservices/qt7/qt7ciimagevideobuffer.mm107
-rw-r--r--src/plugins/mediaservices/qt7/qt7movierenderer.h112
-rw-r--r--src/plugins/mediaservices/qt7/qt7movierenderer.mm465
-rw-r--r--src/plugins/mediaservices/qt7/qt7movievideowidget.h131
-rw-r--r--src/plugins/mediaservices/qt7/qt7movievideowidget.mm425
-rw-r--r--src/plugins/mediaservices/qt7/qt7movieviewoutput.h119
-rw-r--r--src/plugins/mediaservices/qt7/qt7movieviewoutput.mm335
-rw-r--r--src/plugins/mediaservices/qt7/qt7movieviewrenderer.h97
-rw-r--r--src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm366
-rw-r--r--src/plugins/mediaservices/qt7/qt7serviceplugin.h64
-rw-r--r--src/plugins/mediaservices/qt7/qt7serviceplugin.mm78
-rw-r--r--src/plugins/mediaservices/qt7/qt7videooutputcontrol.h135
-rw-r--r--src/plugins/mediaservices/qt7/qt7videooutputcontrol.mm93
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/mediaplayer.pri63
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/ms60mediaplayerresolver.h58
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.cpp268
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h116
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60mediametadataprovider.cpp185
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60mediametadataprovider.h81
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayeraudioendpointselector.cpp127
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayeraudioendpointselector.h81
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayercontrol.cpp274
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayercontrol.h143
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayerservice.cpp259
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayerservice.h105
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayersession.cpp496
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayersession.h167
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60mediarecognizer.cpp127
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60mediarecognizer.h83
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60videooverlay.cpp209
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60videooverlay.h109
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.cpp486
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h148
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60videorenderer.cpp69
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60videorenderer.h68
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60videosurface.cpp478
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60videosurface.h112
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60videowidget.cpp208
-rw-r--r--src/plugins/mediaservices/symbian/mediaplayer/s60videowidget.h115
-rw-r--r--src/plugins/mediaservices/symbian/s60mediaserviceplugin.cpp100
-rw-r--r--src/plugins/mediaservices/symbian/s60mediaserviceplugin.h64
-rw-r--r--src/plugins/mediaservices/symbian/s60videooutputcontrol.cpp76
-rw-r--r--src/plugins/mediaservices/symbian/s60videooutputcontrol.h72
-rw-r--r--src/plugins/mediaservices/symbian/symbian.pro27
-rw-r--r--src/plugins/plugins.pro2
-rw-r--r--src/qt3support/widgets/q3spinwidget.cpp8
-rw-r--r--src/s60installs/bwins/QtCoreu.def16
-rw-r--r--src/s60installs/bwins/QtDeclarativeu.def111
-rw-r--r--src/s60installs/bwins/QtGuiu.def34
-rw-r--r--src/s60installs/bwins/QtMediaServicesu.def673
-rw-r--r--src/s60installs/bwins/QtNetworku.def1
-rw-r--r--src/s60installs/bwins/QtOpenVGu.def3
-rw-r--r--src/s60installs/eabi/QtCoreu.def9
-rw-r--r--src/s60installs/eabi/QtDeclarativeu.def128
-rw-r--r--src/s60installs/eabi/QtGuiu.def24
-rw-r--r--src/s60installs/eabi/QtMediaServicesu.def674
-rw-r--r--src/s60installs/eabi/QtNetworku.def1
-rw-r--r--src/s60installs/eabi/QtOpenVGu.def2
-rw-r--r--src/s60installs/s60installs.pro12
-rw-r--r--src/script/api/qscriptengine.cpp17
-rw-r--r--src/src.pro27
-rw-r--r--src/testlib/qplaintestlogger.cpp1
-rw-r--r--tests/.gitignore6
-rw-r--r--tests/auto/auto.pro1
-rw-r--r--tests/auto/bic/tst_bic.cpp2
-rw-r--r--tests/auto/compilerwarnings/tst_compilerwarnings.cpp30
-rw-r--r--tests/auto/dbus.pro1
-rw-r--r--tests/auto/declarative/.gitignore5
-rw-r--r--tests/auto/declarative/declarative.pro137
-rw-r--r--tests/auto/declarative/examples/examples.pro9
-rw-r--r--tests/auto/declarative/examples/tst_examples.cpp25
-rw-r--r--tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml52
-rw-r--r--tests/auto/declarative/graphicswidgets/graphicswidgets.pro10
-rw-r--r--tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp74
-rw-r--r--tests/auto/declarative/parserstress/parserstress.pro9
-rw-r--r--tests/auto/declarative/parserstress/tst_parserstress.cpp6
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml1
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp53
-rw-r--r--tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp21
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/startup2.qml16
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro9
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp90
-rw-r--r--tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro9
-rw-r--r--tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro6
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-ignored.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-notarget.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-parent.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp37
-rw-r--r--tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro6
-rw-r--r--tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro9
-rw-r--r--tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp4
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/blank.js (renamed from tests/auto/qmediaplaylist/tmp.unsupported_format)0
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml4
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml4
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/eval.qml23
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/exception.js1
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/function.qml19
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.1.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.2.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/include.js8
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/include.qml23
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/include_callback.js11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/include_callback.qml15
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/include_pragma.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/include_pragma_inner.js5
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/include_pragma_outer.js6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/include_remote.js26
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/include_remote.qml21
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.js13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/include_shared.js12
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/include_shared.qml22
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/js/include2.js4
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/js/include3.js3
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/qtbug_10696.qml26
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/qtcreatorbug_1289.qml13
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/remote_file.js2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.2.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/testtypes.h2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp271
-rw-r--r--tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro6
-rw-r--r--tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro6
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp28
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro9
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro9
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/data/basic.qml5
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/data/dummy.qml1
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro17
-rw-r--r--tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp113
-rw-r--r--tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro9
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/manual-highlight.qml48
-rw-r--r--tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro9
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp30
-rw-r--r--tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro6
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp1
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/childrenRect.qml27
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml20
-rw-r--r--tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp196
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignValueToSignal.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/assignValueToSignal.qml6
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.2.qml11
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/emptySignal.errors.txt2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/scriptString2.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/scriptString3.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/scriptString4.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro9
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/testtypes.h4
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp70
-rw-r--r--tests/auto/declarative/qdeclarativelayoutitem/data/layoutItem.qml9
-rw-r--r--tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro15
-rw-r--r--tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp115
-rw-r--r--tests/auto/declarative/qdeclarativelayouts/data/layouts.qml31
-rw-r--r--tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro10
-rw-r--r--tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp147
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro9
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp22
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/manual-highlight.qml47
-rw-r--r--tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro9
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp33
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/AnchoredLoader.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml1
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/NoResize.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml1
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml1
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml1
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml1
-rw-r--r--tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp98
-rw-r--r--tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro6
-rw-r--r--tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp3
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro3
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro9
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/data/rejectEvent.qml28
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro9
-rw-r--r--tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp46
-rw-r--r--tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro9
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/pathUpdateOnStartChanged.qml38
-rw-r--r--tests/auto/declarative/qdeclarativepathview/data/pathview_package.qml88
-rw-r--r--tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro9
-rw-r--r--tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp72
-rw-r--r--tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro9
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro9
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp123
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/darker.qml3
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/fontFamilies.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/lighter.qml3
-rw-r--r--tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp26
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/objlist.qml2
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro9
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp19
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro9
-rw-r--r--tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro9
-rw-r--r--tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro9
-rw-r--r--tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro9
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml24
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml14
-rw-r--r--tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro9
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp277
-rw-r--r--tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro7
-rw-r--r--tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro9
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml12
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/mouseselection_default.qml7
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/mouseselection_false.qml7
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/mouseselection_true.qml7
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro9
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp73
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/data/geometrySignals.qml12
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro9
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp30
-rw-r--r--tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro6
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/enums.5.qml10
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_read.qml22
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_write.qml21
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_read.qml10
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_write.qml9
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/varAssignment.qml14
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_read.qml8
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_write.qml7
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_read.qml10
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_write.qml9
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro9
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/testtypes.h32
-rw-r--r--tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp156
-rw-r--r--tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp9
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/data/orientation.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro18
-rw-r--r--tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp108
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/data/objectlist.qml16
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro10
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp99
-rw-r--r--tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro9
-rw-r--r--tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro9
-rw-r--r--tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro10
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro9
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp2
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.0.pngbin0 -> 2046 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.1.pngbin0 -> 2059 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.2.pngbin0 -> 2052 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.3.pngbin0 -> 2011 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.qml1023
-rw-r--r--tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml64
-rw-r--r--tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml4
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.0.pngbin0 -> 1149 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.1.pngbin0 -> 1173 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.2.pngbin0 -> 1173 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.3.pngbin0 -> 1149 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.qml1151
-rw-r--r--tests/auto/declarative/qmlvisual/animation/qtbug10586/qtbug10586.qml27
-rw-r--r--tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-flickable.qml4
-rw-r--r--tests/auto/declarative/qmlvisual/qfxwebview/autosize/data-X11/autosize.0.pngbin6886 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qfxwebview/autosize/data-X11/autosize.qml83
-rw-r--r--tests/auto/declarative/qmlvisual/qfxwebview/autosize/data/autosize.0.pngbin6886 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/qfxwebview/autosize/data/autosize.qml83
-rw-r--r--tests/auto/declarative/qmlvisual/qmlvisual.pro31
-rw-r--r--tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp8
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/autosize.qml (renamed from tests/auto/declarative/qmlvisual/qfxwebview/autosize/autosize.qml)0
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.0.pngbin0 -> 10185 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.1.pngbin0 -> 10185 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.2.pngbin0 -> 10185 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.3.pngbin0 -> 10185 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.4.pngbin0 -> 10185 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.qml115
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.0.pngbin0 -> 10185 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.1.pngbin0 -> 10185 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.2.pngbin0 -> 10185 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.3.pngbin0 -> 10185 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.4.pngbin0 -> 10185 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.qml115
-rw-r--r--tests/auto/declarative/qmlvisual/webview/embedding/data/nesting.0.pngbin5659 -> 0 bytes
-rw-r--r--tests/auto/declarative/qmlvisual/webview/embedding/data/nesting.qml363
-rw-r--r--tests/auto/declarative/qmlvisual/webview/embedding/egg.qml26
-rw-r--r--tests/auto/declarative/qmlvisual/webview/embedding/nesting.html9
-rw-r--r--tests/auto/declarative/qmlvisual/webview/embedding/nesting.qml9
-rw-r--r--tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp2
-rw-r--r--tests/auto/gestures/tst_gestures.cpp154
-rw-r--r--tests/auto/languagechange/tst_languagechange.cpp4
-rw-r--r--tests/auto/mediaservices.pro19
-rw-r--r--tests/auto/qabstractnetworkcache/qabstractnetworkcache.pro1
-rw-r--r--tests/auto/qabstractsocket/qabstractsocket.pro1
-rw-r--r--tests/auto/qbuffer/tst_qbuffer.cpp26
-rw-r--r--tests/auto/qcolumnview/tst_qcolumnview.cpp10
-rw-r--r--tests/auto/qdatetime/tst_qdatetime.cpp26
-rw-r--r--tests/auto/qdbusserver/.gitignore1
-rw-r--r--tests/auto/qdbusserver/qdbusserver.pro11
-rw-r--r--tests/auto/qdbusserver/server.cpp49
-rw-r--r--tests/auto/qdbusserver/tst_qdbusserver.cpp78
-rw-r--r--tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro14
-rw-r--r--tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp1252
-rw-r--r--tests/auto/qdeclarativevideo/qdeclarativevideo.pro14
-rw-r--r--tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp921
-rw-r--r--tests/auto/qdirmodel/tst_qdirmodel.cpp5
-rw-r--r--tests/auto/qdockwidget/tst_qdockwidget.cpp24
-rw-r--r--tests/auto/qfile/largefile/tst_largefile.cpp4
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp4
-rw-r--r--tests/auto/qfiledialog2/tst_qfiledialog2.cpp16
-rw-r--r--tests/auto/qftp/qftp.pro1
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp24
-rw-r--r--tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp15
-rw-r--r--tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro5
-rw-r--r--tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp670
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp57
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp29
-rw-r--r--tests/auto/qhostaddress/qhostaddress.pro1
-rw-r--r--tests/auto/qhostinfo/qhostinfo.pro7
-rw-r--r--tests/auto/qhttp/qhttp.pro1
-rw-r--r--tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro2
-rw-r--r--tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp44
-rw-r--r--tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro1
-rw-r--r--tests/auto/qhttpsocketengine/qhttpsocketengine.pro1
-rw-r--r--tests/auto/qimagereader/tst_qimagereader.cpp63
-rw-r--r--tests/auto/qiodevice/qiodevice.pro1
-rw-r--r--tests/auto/qlocale/tst_qlocale.cpp100
-rw-r--r--tests/auto/qlocalsocket/qlocalsocket.pro1
-rw-r--r--tests/auto/qmediacontent/qmediacontent.pro6
-rw-r--r--tests/auto/qmediacontent/tst_qmediacontent.cpp174
-rw-r--r--tests/auto/qmediaobject/qmediaobject.pro4
-rw-r--r--tests/auto/qmediaobject/tst_qmediaobject.cpp549
-rw-r--r--tests/auto/qmediaplayer/qmediaplayer.pro6
-rw-r--r--tests/auto/qmediaplayer/tst_qmediaplayer.cpp986
-rw-r--r--tests/auto/qmediaplaylist/qmediaplaylist.pro6
-rw-r--r--tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp593
-rw-r--r--tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro6
-rw-r--r--tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp316
-rw-r--r--tests/auto/qmediapluginloader/qmediapluginloader.pro6
-rw-r--r--tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp121
-rw-r--r--tests/auto/qmediaresource/qmediaresource.pro6
-rw-r--r--tests/auto/qmediaresource/tst_qmediaresource.cpp516
-rw-r--r--tests/auto/qmediaservice/qmediaservice.pro6
-rw-r--r--tests/auto/qmediaservice/tst_qmediaservice.cpp219
-rw-r--r--tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro6
-rw-r--r--tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp481
-rw-r--r--tests/auto/qmediatimerange/qmediatimerange.pro6
-rw-r--r--tests/auto/qmediatimerange/tst_qmediatimerange.cpp735
-rw-r--r--tests/auto/qmessagebox/tst_qmessagebox.cpp2
-rw-r--r--tests/auto/qnativesocketengine/qnativesocketengine.pro1
-rw-r--r--tests/auto/qnetworkaccessmanager/qnetworkaccessmanager.pro1
-rw-r--r--tests/auto/qnetworkaccessmanager_and_qprogressdialog/qnetworkaccessmanager_and_qprogressdialog.pro1
-rw-r--r--tests/auto/qnetworkaddressentry/qnetworkaddressentry.pro2
-rw-r--r--tests/auto/qnetworkcachemetadata/qnetworkcachemetadata.pro1
-rw-r--r--tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp15
-rw-r--r--tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp8
-rw-r--r--tests/auto/qnetworkcookie/qnetworkcookie.pro1
-rw-r--r--tests/auto/qnetworkcookiejar/qnetworkcookiejar.pro1
-rw-r--r--tests/auto/qnetworkdiskcache/qnetworkdiskcache.pro1
-rw-r--r--tests/auto/qnetworkinterface/qnetworkinterface.pro1
-rw-r--r--tests/auto/qnetworkproxy/qnetworkproxy.pro1
-rw-r--r--tests/auto/qnetworkreply/qnetworkreply.pro1
-rw-r--r--tests/auto/qnetworkreply/smb-file.txt1
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp88
-rw-r--r--tests/auto/qnetworkrequest/qnetworkrequest.pro1
-rw-r--r--tests/auto/qnetworksession/lackey/main.cpp24
-rw-r--r--tests/auto/qnetworksession/qnetworksession.pro1
-rw-r--r--tests/auto/qnetworksession/test/tst_qnetworksession.cpp399
-rw-r--r--tests/auto/qpixmapcache/tst_qpixmapcache.cpp34
-rw-r--r--tests/auto/qprinter/tst_qprinter.cpp28
-rw-r--r--tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp24
-rw-r--r--tests/auto/qsocketnotifier/qsocketnotifier.pro1
-rw-r--r--tests/auto/qsocks5socketengine/qsocks5socketengine.pro1
-rw-r--r--tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp61
-rw-r--r--tests/auto/qsoundeffect/qsoundeffect.pro20
-rw-r--r--tests/auto/qsoundeffect/test.wavbin38316 -> 0 bytes
-rw-r--r--tests/auto/qsoundeffect/tst_qsoundeffect.cpp144
-rw-r--r--tests/auto/qsslcertificate/qsslcertificate.pro1
-rw-r--r--tests/auto/qsslcipher/qsslcipher.pro1
-rw-r--r--tests/auto/qsslerror/qsslerror.pro1
-rw-r--r--tests/auto/qsslkey/qsslkey.pro1
-rw-r--r--tests/auto/qsslsocket/qsslsocket.pro2
-rw-r--r--tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp31
-rw-r--r--tests/auto/qtcpserver/qtcpserver.pro1
-rw-r--r--tests/auto/qtcpsocket/qtcpsocket.pro1
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp26
-rw-r--r--tests/auto/qudpsocket/qudpsocket.pro1
-rw-r--r--tests/auto/qurl/qurl.pro1
-rw-r--r--tests/auto/qurl/tst_qurl.cpp53
-rw-r--r--tests/auto/qvideowidget/qvideowidget.pro6
-rw-r--r--tests/auto/qvideowidget/tst_qvideowidget.cpp1602
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp8
-rw-r--r--tests/auto/qwidgetaction/tst_qwidgetaction.cpp6
-rw-r--r--tests/auto/qxmlquery/tst_qxmlquery.cpp18
-rw-r--r--tests/auto/xmlpatterns.pro1
-rw-r--r--tests/auto/xmlpatternsxqts/tst_suitetest.cpp15
-rw-r--r--tests/benchmarks/corelib/thread/qmutex/qmutex.pro6
-rw-r--r--tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp131
-rw-r--r--tests/benchmarks/declarative/binding/binding.pro13
-rw-r--r--tests/benchmarks/declarative/binding/tst_binding.cpp5
-rw-r--r--tests/benchmarks/declarative/compilation/compilation.pro17
-rw-r--r--tests/benchmarks/declarative/compilation/data/BoomBlock.qml65
-rw-r--r--tests/benchmarks/declarative/compilation/tst_compilation.cpp89
-rw-r--r--tests/benchmarks/declarative/creation/creation.pro10
-rw-r--r--tests/benchmarks/declarative/creation/tst_creation.cpp13
-rw-r--r--tests/benchmarks/declarative/declarative.pro6
-rw-r--r--tests/benchmarks/declarative/painting/painting.pro3
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro19
-rw-r--r--tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp4
-rw-r--r--tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro9
-rw-r--r--tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp9
-rw-r--r--tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro10
-rw-r--r--tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp4
-rw-r--r--tests/benchmarks/declarative/qmltime/qmltime.pro16
-rw-r--r--tests/benchmarks/declarative/script/data/slot_complex_js.js8
-rw-r--r--tests/benchmarks/declarative/script/data/slot_complex_js.qml14
-rw-r--r--tests/benchmarks/declarative/script/data/slot_simple_js.js3
-rw-r--r--tests/benchmarks/declarative/script/data/slot_simple_js.qml10
-rw-r--r--tests/benchmarks/declarative/script/script.pro8
-rw-r--r--tests/benchmarks/declarative/script/tst_script.cpp1
-rw-r--r--tests/benchmarks/declarative/typeimports/tst_typeimports.cpp9
-rw-r--r--tests/benchmarks/declarative/typeimports/typeimports.pro8
-rw-r--r--tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp38
-rw-r--r--tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp5
-rw-r--r--tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp79
-rw-r--r--tests/manual/bearerex/bearerex.cpp18
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp1
-rw-r--r--tools/assistant/tools/assistant/contentwindow.cpp18
-rw-r--r--tools/assistant/tools/assistant/helpviewer.h1
-rw-r--r--tools/assistant/tools/assistant/helpviewer_qwv.cpp1
-rw-r--r--tools/configure/configureapp.cpp62
-rw-r--r--tools/designer/src/designer/qdesigner_actions.cpp1
-rw-r--r--tools/designer/src/lib/sdk/abstractformeditor.cpp3
-rw-r--r--tools/designer/src/lib/shared/filterwidget.cpp2
-rw-r--r--tools/designer/src/lib/shared/previewconfigurationwidget.cpp2
-rw-r--r--tools/qdoc3/htmlgenerator.cpp245
-rw-r--r--tools/qdoc3/htmlgenerator.h1
-rw-r--r--tools/qdoc3/node.cpp2
-rw-r--r--tools/qdoc3/test/assistant.qdocconf45
-rw-r--r--tools/qdoc3/test/designer.qdocconf60
-rw-r--r--tools/qdoc3/test/linguist.qdocconf60
-rw-r--r--tools/qdoc3/test/macros.qdocconf1
-rw-r--r--tools/qdoc3/test/qdeclarative.qdocconf63
-rw-r--r--tools/qdoc3/test/qmake.qdocconf63
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf63
-rw-r--r--tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf63
-rw-r--r--tools/qdoc3/test/qt-defines.qdocconf37
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf96
-rw-r--r--tools/qdoc3/test/qt.qdocconf55
-rw-r--r--tools/qdoc3/test/qt_zh_CN.qdocconf60
-rw-r--r--tools/qdoc3/test/style/style.css797
-rw-r--r--tools/qml/Info_mac.plist2
-rw-r--r--tools/qml/content/Browser.qml1
-rw-r--r--tools/qml/loggerwidget.cpp120
-rw-r--r--tools/qml/loggerwidget.h32
-rw-r--r--tools/qml/main.cpp83
-rw-r--r--tools/qml/qdeclarativefolderlistmodel.cpp420
-rw-r--r--tools/qml/qdeclarativefolderlistmodel.h127
-rw-r--r--tools/qml/qml.icnsbin0 -> 196156 bytes
-rw-r--r--tools/qml/qml.pri10
-rw-r--r--tools/qml/qml.pro7
-rw-r--r--tools/qml/qmlruntime.cpp381
-rw-r--r--tools/qml/qmlruntime.h29
-rw-r--r--tools/runonphone/main.cpp4
-rw-r--r--tools/runonphone/symbianutils/launcher.cpp18
-rw-r--r--tools/runonphone/symbianutils/trkutils.cpp22
-rw-r--r--tools/runonphone/symbianutils/trkutils.h8
-rw-r--r--tools/shared/deviceskin/deviceskin.pri3
-rw-r--r--tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen-pressed.pngbin115575 -> 0 bytes
-rw-r--r--tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen.pngbin104711 -> 0 bytes
-rw-r--r--tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreenPhone.skin29
-rw-r--r--tools/shared/deviceskin/skins/DualScreenPhone.skin/defaultbuttons.conf78
-rw-r--r--tools/shared/deviceskin/skins/PDAPhone.qrc5
-rw-r--r--tools/shared/deviceskin/skins/PDAPhone.skin/PDAPhone.skin18
-rw-r--r--tools/shared/deviceskin/skins/PDAPhone.skin/defaultbuttons.conf36
-rw-r--r--tools/shared/deviceskin/skins/PDAPhone.skin/finger.pngbin40343 -> 0 bytes
-rw-r--r--tools/shared/deviceskin/skins/PDAPhone.skin/pda_down.pngbin52037 -> 0 bytes
-rw-r--r--tools/shared/deviceskin/skins/PDAPhone.skin/pda_up.pngbin100615 -> 0 bytes
-rw-r--r--tools/shared/deviceskin/skins/Trolltech-Keypad.qrc5
-rw-r--r--tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-closed.pngbin69447 -> 0 bytes
-rw-r--r--tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-down.pngbin242107 -> 0 bytes
-rw-r--r--tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.pngbin230638 -> 0 bytes
-rw-r--r--tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.skin35
-rw-r--r--tools/shared/deviceskin/skins/Trolltech-Keypad.skin/defaultbuttons.conf142
-rw-r--r--tools/shared/deviceskin/skins/Trolltech-Touchscreen.qrc5
-rw-r--r--tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen-down.pngbin133117 -> 0 bytes
-rw-r--r--tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.pngbin133180 -> 0 bytes
-rw-r--r--tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.skin17
-rw-r--r--tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/defaultbuttons.conf53
-rw-r--r--tools/shared/symbian/epocroot.cpp9
-rw-r--r--translations/assistant_pl.ts500
-rw-r--r--translations/designer_pl.ts182
-rw-r--r--translations/linguist_pl.ts55
-rw-r--r--translations/qt_de.ts9
-rw-r--r--translations/qt_he.ts (renamed from translations/qt_iw.ts)0
-rw-r--r--translations/qt_help_pl.ts190
-rw-r--r--translations/qt_pl.ts332
-rw-r--r--translations/qtconfig_pl.ts22
-rw-r--r--translations/translations.pri8
-rw-r--r--translations/translations.pro6
-rwxr-xr-xutil/local_database/cldr2qlocalexml.py8
-rw-r--r--util/local_database/enumdata.py3
-rwxr-xr-xutil/local_database/qlocalexml2cpp.py5
-rw-r--r--util/s60pixelmetrics/pixel_metrics.cpp12
2106 files changed, 52065 insertions, 80067 deletions
diff --git a/.gitignore b/.gitignore
index ad8e3ea..04f6e7e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,8 @@ examples/*/*/*
examples/*/*/*[.]app
!examples/declarative/*
demos/*/*
+!demos/spectrum/*
+demos/spectrum/bin
!demos/*/*[.]*
demos/*/*[.]app
!demos/declarative/*
@@ -52,13 +54,13 @@ bin/Qt*.dll
bin/assistant*
bin/designer*
bin/dumpcpp*
-bin/duiviewer*
bin/idc*
bin/linguist*
bin/lrelease*
bin/lupdate*
bin/lconvert*
bin/moc*
+bin/makeqpf*
bin/pixeltool*
bin/qmake*
bin/qdoc3*
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index e844767..939c38e 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -69,15 +69,17 @@ Convenience script for creating signed packages you can install on your phone.
Usage: createpackage.pl [options] templatepkg [target]-[platform] [certificate key [passphrase]]
Where supported options are as follows:
- [-i|install] = Install the package right away using PC suite
+ [-i|install] = Install the package right away using PC suite.
[-p|preprocess] = Only preprocess the template .pkg file.
- [-c|certfile=<file>] = The file containing certificate information for signing.
+ [-c|certfile <file>] = The file containing certificate information for signing.
The file can have several certificates, each specified in
separate line. The certificate, key and passphrase in line
must be ';' separated. Lines starting with '#' are treated
as a comments. Also empty lines are ignored. The paths in
<file> can be absolute or relative to <file>.
- [-u|unsigned] = Preserves the unsigned package
+ [-u|unsigned] = Preserves the unsigned package.
+ [-s|stub] = Generates stub sis for ROM.
+ [-n|sisname <name>] = Specifies the final sis name.
Where parameters are as follows:
templatepkg = Name of .pkg file template
target = Either debug or release
@@ -118,12 +120,14 @@ my $preprocessonly = "";
my $certfile = "";
my $preserveUnsigned = "";
my $stub = "";
+my $signed_sis_name = "";
unless (GetOptions('i|install' => \$install,
'p|preprocess' => \$preprocessonly,
'c|certfile=s' => \$certfile,
'u|unsigned' => \$preserveUnsigned,
- 's|stub' => \$stub,)){
+ 's|stub' => \$stub,
+ 'n|sisname=s' => \$signed_sis_name,)) {
Usage();
}
@@ -162,11 +166,22 @@ $pkgoutputbasename = $pkgoutputbasename;
# Store output file names to variables
my $pkgoutput = $pkgoutputbasename.".pkg";
-my $sisoutputbasename = $pkgoutputbasename;
-$sisoutputbasename =~ s/_$targetplatform//g;
+my $sisoutputbasename;
+if ($signed_sis_name eq "") {
+ $sisoutputbasename = $pkgoutputbasename;
+ $sisoutputbasename =~ s/_$targetplatform//g;
+ $signed_sis_name = $sisoutputbasename.".sis";
+} else {
+ $sisoutputbasename = $signed_sis_name;
+ if ($sisoutputbasename =~ m/(\.sis$|\.sisx$)/i) {
+ $sisoutputbasename =~ s/$1//i;
+ } else {
+ $signed_sis_name = $signed_sis_name.".sis";
+ }
+}
+
my $unsigned_sis_name = $sisoutputbasename."_unsigned.sis";
-my $signed_sis_name = $sisoutputbasename.".sis";
-my $stub_sis_name = $sisoutputbasename."_stub.sis";
+my $stub_sis_name = $sisoutputbasename.".sis";
# Store some utility variables
my $scriptpath = dirname(__FILE__);
@@ -277,7 +292,7 @@ if($stub) {
# Create stub SIS.
system ("makesis -s $pkgoutput $stub_sis_name");
} else {
- if ($certtext eq "Self Signed" && !@certificates) {
+ if ($certtext eq "Self Signed" && !@certificates && $templatepkg !~ m/_installer\.pkg$/i) {
print("Auto-patching capabilities for self signed package.\n");
system ("patch_capabilities $pkgoutput");
}
diff --git a/bin/syncqt b/bin/syncqt
index 71b71db..252aefa 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -50,8 +50,7 @@ my %modules = ( # path to module name map
"QtDBus" => "$basedir/src/dbus",
"QtWebKit" => "$basedir/src/3rdparty/webkit/WebCore",
"phonon" => "$basedir/src/phonon",
- "QtMultimedia" => "$basedir/src/multimedia/multimedia",
- "QtMediaServices" => "$basedir/src/multimedia/mediaservices",
+ "QtMultimedia" => "$basedir/src/multimedia",
);
my %moduleheaders = ( # restrict the module headers to those found in relative path
"QtWebKit" => "../WebKit/qt/Api",
diff --git a/config.tests/symbian/simple/main.cpp b/config.tests/symbian/simple/main.cpp
new file mode 100644
index 0000000..9227c42
--- /dev/null
+++ b/config.tests/symbian/simple/main.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** 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 config.tests 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 <stdio.h>
+
+int main(int, char **) {
+ printf("test\n");
+ return 0;
+}
diff --git a/config.tests/symbian/simple/simple.pro b/config.tests/symbian/simple/simple.pro
new file mode 100644
index 0000000..fa086c9
--- /dev/null
+++ b/config.tests/symbian/simple/simple.pro
@@ -0,0 +1,4 @@
+TEMPLATE = app
+QT =
+SOURCES += main.cpp
+
diff --git a/config.tests/unix/bsymbolic_functions.test b/config.tests/unix/bsymbolic_functions.test
index 52fdb32..6c34895 100755
--- a/config.tests/unix/bsymbolic_functions.test
+++ b/config.tests/unix/bsymbolic_functions.test
@@ -4,11 +4,12 @@ BSYMBOLIC_FUNCTIONS_SUPPORT=no
COMPILER=$1
VERBOSE=$2
+
cat >>bsymbolic_functions.c << EOF
int main() { return 0; }
EOF
-"$COMPILER" -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes
+$COMPILER -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes
rm -f bsymbolic_functions.c libtest.so
# done
diff --git a/configure b/configure
index 6763969..f2023b8 100755
--- a/configure
+++ b/configure
@@ -682,8 +682,6 @@ CFG_RELEASE_QMAKE=no
CFG_PHONON=auto
CFG_PHONON_BACKEND=yes
CFG_MULTIMEDIA=auto
-CFG_MEDIASERVICES=auto
-CFG_MEDIA_BACKEND=auto
CFG_AUDIO_BACKEND=auto
CFG_SVG=auto
CFG_DECLARATIVE=auto
@@ -780,7 +778,7 @@ L_FLAGS=
RPATH_FLAGS=
l_FLAGS=
QCONFIG_FLAGS=
-XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
+XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian/linux-gcce"
PLATFORM=$QMAKESPEC
QT_CROSS_COMPILE=no
OPT_CONFIRM_LICENSE=no
@@ -938,7 +936,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style yes options
- -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-mediaservices|-media-backend|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles)
+ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
@@ -2165,20 +2163,6 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
- mediaservices)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_MEDIASERVICES="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- media-backend)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_MEDIA_BACKEND="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
audio-backend)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_AUDIO_BACKEND="$VAL"
@@ -3097,8 +3081,8 @@ fi
# auto-detect support for separate debug info in objcopy
if [ "$CFG_SEPARATE_DEBUG_INFO" != "no" ] && [ "$CFG_SHARED" = "yes" ]; then
- TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_].*=%%p' | tr '\n' ' '`
- TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_].*=%%p' | tr '\n' ' '`
+ TEST_COMPILER_CFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
+ TEST_COMPILER_CXXFLAGS=`getQMakeConf "$XQMAKESPEC" | sed -n -e 's%QMAKE_CXXFLAGS[^_=]*[+*]*=%%p' | tr '\n' ' '`
TEST_OBJCOPY=`getQMakeConf "$XQMAKESPEC" | grep "^QMAKE_OBJCOPY" | sed "s%.* *= *\(.*\)$%\1%" | tail -1`
COMPILER_WITH_FLAGS="$TEST_COMPILER $TEST_COMPILER_CXXFLAGS"
COMPILER_WITH_FLAGS=`echo "$COMPILER_WITH_FLAGS" | sed -e "s%\\$\\$QMAKE_CFLAGS%$TEST_COMPILER_CFLAGS%g"`
@@ -3409,8 +3393,7 @@ Usage: $relconf [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir
[-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
[-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
[-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
- [-no-multimedia] [-multimedia] [-no-mediaservices] [-mediaservices]
- [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
+ [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
[-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
[-no-openssl] [-openssl] [-openssl-linked]
[-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
@@ -3555,12 +3538,6 @@ fi
-no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
+ -audio-backend ..... Build the platform audio backend into QtMultimedia if available.
- -no-mediaservices... Do not build the QtMediaServices module.
- + -mediaservices...... Build the QtMediaServices module.
-
- -no-media-backend... Do not build platform mediaservices plugin.
- + -media-backend..... Build the platform mediaservices plugin.
-
-no-phonon ......... Do not build the Phonon module.
+ -phonon ............ Build the Phonon module.
Phonon is built if a decent C++ compiler is used.
@@ -4057,7 +4034,7 @@ if [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_X11" = "yes" ]; then
EOF
fi
-if echo "$XPLATFORM" | grep symbian > /dev/null ; then
+case "$XPLATFORM" in *symbian*)
cat << EOF
Qt for Symbian only:
@@ -4069,7 +4046,8 @@ Qt for Symbian only:
-no-usedeffiles .... Disable the usage of DEF files.
* -usedeffiles ....... Enable the usage of DEF files.
EOF
-fi
+;;
+esac
[ "x$ERROR" = "xyes" ] && exit 1
exit 0
@@ -4697,6 +4675,43 @@ if [ "$CFG_ZLIB" = "auto" ]; then
fi
fi
+case "$XPLATFORM" in *symbian*)
+ QMakeVar set styles "windows s60" #overwrite previous default
+ CFG_LIBFREETYPE=no
+
+ if test -z "$EPOCROOT"; then
+ echo "Please export EPOCROOT. It should point to the sdk install dir"
+ exit 1
+ fi
+ if test ! -d "$EPOCROOT/epoc32"; then
+ echo "Could not find the 'epoc32' dir in your EPOCROOT."
+ exit 1
+ fi
+
+ # the main commands needed to compile;
+ (cd config.tests/symbian
+ mkdir -p rcomp
+ cd rcomp
+ rm -f rcomp_test.rsg
+ touch rcomp_test.rpp rcomp_test.rsc rcomp_test.rss
+ rcomp -u -m045,046,047 -s./rcomp_test.rpp -o./rcomp_test.rsc -h./rcomp_test.rsg -i./rcomp_test.rss 2>&1 > /dev/null
+ if test ! -f rcomp_test.rsg; then
+ echo "Finding a working rcomp in your PATH failed."
+ echo "Fatal error. Make sure you have the epoc tools working and in your PATH";
+ exit 1;
+ fi
+ )
+
+ # compile a simple main that uses printf
+ if ! "$symbiantests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/symbian/simple "simple" $L_FLAGS $I_FLAGS $l_FLAGS
+ then
+ echo "Testing your compiler failed. Could not compile a simple application."
+ echo "Fatal error; Rerun configure with -verbose to get more details."
+ exit 1;
+ fi
+ ;;
+esac
+
if [ "$CFG_S60" = "auto" ]; then
if echo "$XPLATFORM" | grep symbian > /dev/null; then
CFG_S60=yes
@@ -4793,7 +4808,14 @@ fi
# detect accessibility
if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
- CFG_ACCESSIBILITY=yes
+ case "$XPLATFORM" in
+ symbian*)
+ # accessibility is currently unsupported
+ CFG_ACCESSIBILITY=no
+ ;;
+ *)
+ CFG_ACCESSIBILITY=yes
+ esac
fi
# auto-detect SQL-modules support
@@ -5181,21 +5203,8 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
fi
fi
- if [ "$CFG_GUI" = "no" ]; then
- if [ "$CFG_MEDIA_BACKEND" = "auto" ]; then
- CFG_MEDIA_BACKEND=no
- fi
- if [ "$CFG_MEDIA_BACKEND" != "no" ]; then
- echo "Medias backend enabled, but GUI disabled."
- echo " You might need to either enable the GUI or disable the media backend"
- exit 1
- fi
- elif [ "$CFG_MEDIA_BACKEND" = "auto" ]; then
- CFG_MEDIA_BACKEND=yes
- fi
-
# Auto-detect GStreamer support (needed for both Phonon & QtMultimedia)
- if [ "$CFG_PHONON" != "no" -o "$CFG_MEDIASERVICES" != "no" ]; then
+ if [ "$CFG_PHONON" != "no" ]; then
if [ "$CFG_GLIB" = "yes" -a "$CFG_GSTREAMER" != "no" ]; then
if [ -n "$PKG_CONFIG" ]; then
QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null`
@@ -5880,7 +5889,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
fi
CFG_EGL=no
# If QtOpenGL would be built against OpenGL ES, disable it as we can't to that if EGL is missing
- if [ "$CFG_OPENGL" = "es1" || "$CFG_OPENGL" = "es2" ]; then
+ if [ "$CFG_OPENGL" = "es1" -o "$CFG_OPENGL" = "es2" ]; then
CFG_OPENGL=no
fi
fi
@@ -6889,15 +6898,6 @@ else
QT_CONFIG="$QT_CONFIG multimedia"
fi
-if [ "$CFG_MEDIASERVICES" = "no" ]; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MEDIASERVICES"
-else
- QT_CONFIG="$QT_CONFIG mediaservices"
- if [ "$CFG_MEDIA_BACKEND" != "no" ]; then
- QT_CONFIG="$QT_CONFIG media-backend"
- fi
-fi
-
if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
QT_CONFIG="$QT_CONFIG audio-backend"
fi
@@ -7482,7 +7482,7 @@ fi
[ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
[ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
[ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
-[ "$CFG_ICD" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
+[ "$CFG_ICD" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICD"
# sort QCONFIG_FLAGS for neatness if we can
[ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
@@ -7494,7 +7494,7 @@ then
# We cannot use Linux's default export rules since they export everything.
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_DLL"
# Disable non-working features.
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT QT_NO_QFUTURE QT_NO_CRASHHANDLER QT_NO_PRINTER QT_NO_CURSOR QT_NO_SYSTEMTRAYICON"
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT QT_NO_QFUTURE QT_NO_CRASHHANDLER QT_NO_PRINTER QT_NO_SYSTEMTRAYICON"
fi
if [ -n "$QCONFIG_FLAGS" ]; then
@@ -7855,7 +7855,6 @@ echo "QtScriptTools module ... $CFG_SCRIPTTOOLS"
echo "QtXmlPatterns module ... $CFG_XMLPATTERNS"
echo "Phonon module .......... $CFG_PHONON"
echo "Multimedia module ...... $CFG_MULTIMEDIA"
-echo "Mediaservices module ... $CFG_MEDIASERVICES"
echo "SVG module ............. $CFG_SVG"
echo "WebKit module .......... $CFG_WEBKIT"
if [ "$CFG_WEBKIT" = "yes" ]; then
diff --git a/configure.exe b/configure.exe
index 35116ff..a19f515 100755
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml
index 286a4d1..75f5735 100644
--- a/demos/declarative/calculator/calculator.qml
+++ b/demos/declarative/calculator/calculator.qml
@@ -98,8 +98,8 @@ Rectangle {
transitions: Transition {
SequentialAnimation {
PropertyAction { target: rotateButton; property: "operation" }
- NumberAnimation { properties: "rotation"; duration: 300; easing.type: "InOutQuint" }
- NumberAnimation { properties: "x,y,width,height"; duration: 300; easing.type: "InOutQuint" }
+ NumberAnimation { properties: "rotation"; duration: 300; easing.type: Easing.InOutQuint }
+ NumberAnimation { properties: "x,y,width,height"; duration: 300; easing.type: Easing.InOutQuint }
}
}
}
diff --git a/demos/declarative/flickr/common/ScrollBar.qml b/demos/declarative/flickr/common/ScrollBar.qml
index 4022d23..d70cd3c 100644
--- a/demos/declarative/flickr/common/ScrollBar.qml
+++ b/demos/declarative/flickr/common/ScrollBar.qml
@@ -19,7 +19,7 @@ Item {
states: [
State {
name: "show"
- when: flickableArea.moving
+ when: flickableArea.movingVertically
PropertyChanges {
target: container
opacity: 1
diff --git a/demos/declarative/flickr/common/Slider.qml b/demos/declarative/flickr/common/Slider.qml
index 4da370e..76f6303 100644
--- a/demos/declarative/flickr/common/Slider.qml
+++ b/demos/declarative/flickr/common/Slider.qml
@@ -29,7 +29,7 @@ Item {
MouseArea {
anchors.fill: parent; drag.target: parent
- drag.axis: "XAxis"; drag.minimumX: 2; drag.maximumX: slider.xMax+2
+ drag.axis: Drag.XAxis; drag.minimumX: 2; drag.maximumX: slider.xMax+2
onPositionChanged: { value = (maximum - minimum) * (handle.x-2) / slider.xMax + minimum; }
}
}
diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml
index 8b73beb..29763d4 100644
--- a/demos/declarative/flickr/flickr.qml
+++ b/demos/declarative/flickr/flickr.qml
@@ -38,7 +38,7 @@ Item {
}
transitions: Transition {
- NumberAnimation { properties: "x"; duration: 500; easing.type: "InOutQuad" }
+ NumberAnimation { properties: "x"; duration: 500; easing.type: Easing.InOutQuad }
}
}
@@ -76,7 +76,7 @@ Item {
}
transitions: Transition {
- NumberAnimation { properties: "x"; duration: 500; easing.type: "InOutQuad" }
+ NumberAnimation { properties: "x"; duration: 500; easing.type: Easing.InOutQuad }
}
}
}
diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml
index 5ab7b87..df608bc 100644
--- a/demos/declarative/flickr/mobile/GridDelegate.qml
+++ b/demos/declarative/flickr/mobile/GridDelegate.qml
@@ -21,7 +21,7 @@
Item {
anchors.centerIn: parent
scale: 0.0
- Behavior on scale { NumberAnimation { easing.type: "InOutQuad"} }
+ Behavior on scale { NumberAnimation { easing.type: Easing.InOutQuad} }
id: scaleMe
Rectangle { height: 79; width: 79; id: blackRect; anchors.centerIn: parent; color: "black"; smooth: true }
@@ -38,7 +38,7 @@
states: [
State {
- name: "Show"; when: thumb.status == 1
+ name: "Show"; when: thumb.status == Image.Ready
PropertyChanges { target: scaleMe; scale: 1 }
},
State {
@@ -53,14 +53,14 @@
Transition {
from: "Show"; to: "Details"
ParentAnimation {
- NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" }
+ NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad }
}
},
Transition {
from: "Details"; to: "Show"
SequentialAnimation {
ParentAnimation {
- NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" }
+ NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad }
}
PropertyAction { targets: wrapper; properties: "z" }
}
diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml
index 58b0b83..79d7cab 100644
--- a/demos/declarative/flickr/mobile/ImageDetails.qml
+++ b/demos/declarative/flickr/mobile/ImageDetails.qml
@@ -54,7 +54,11 @@ Flipable {
Rectangle { anchors.fill: parent; color: "black"; opacity: 0.4 }
- Common.Progress { anchors.centerIn: parent; width: 200; height: 18; progress: bigImage.progress; visible: bigImage.status!=1 }
+ Common.Progress {
+ anchors.centerIn: parent; width: 200; height: 18
+ progress: bigImage.progress; visible: bigImage.status != Image.Ready
+ }
+
Flickable {
id: flickable; anchors.fill: parent; clip: true
contentWidth: imageContainer.width; contentHeight: imageContainer.height
@@ -66,10 +70,10 @@ Flipable {
Image {
id: bigImage; source: container.photoUrl; scale: slider.value
- anchors.centerIn: parent; smooth: !flickable.moving
+ anchors.centerIn: parent; smooth: !flickable.movingVertically
onStatusChanged : {
// Default scale shows the entire image.
- if (status == 1 && width != 0) {
+ if (status == Image.Ready && width != 0) {
slider.minimum = Math.min(flickable.width / width, flickable.height / height);
prevScale = Math.min(slider.minimum, 1);
slider.value = prevScale;
@@ -81,12 +85,12 @@ Flipable {
Text {
text: "Image Unavailable"
- visible: bigImage.status == 'Error'
+ visible: bigImage.status == Image.Error
anchors.centerIn: parent; color: "white"; font.bold: true
}
Common.Slider {
- id: slider; visible: { bigImage.status == 1 && maximum > minimum }
+ id: slider; visible: { bigImage.status == Image.Ready && maximum > minimum }
anchors {
bottom: parent.bottom; bottomMargin: 65
left: parent.left; leftMargin: 25
@@ -114,8 +118,8 @@ Flipable {
transitions: Transition {
SequentialAnimation {
PropertyAction { target: bigImage; property: "smooth"; value: false }
- NumberAnimation { easing.type: "InOutQuad"; properties: "angle"; duration: 500 }
- PropertyAction { target: bigImage; property: "smooth"; value: !flickable.moving }
+ NumberAnimation { easing.type: Easing.InOutQuad; properties: "angle"; duration: 500 }
+ PropertyAction { target: bigImage; property: "smooth"; value: !flickable.movingVertically }
}
}
}
diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml
index 71d9385..025b897 100644
--- a/demos/declarative/flickr/mobile/TitleBar.qml
+++ b/demos/declarative/flickr/mobile/TitleBar.qml
@@ -18,10 +18,21 @@ Item {
rssModel.tags = editor.text
}
+ Image {
+ id: quitButton
+ anchors.left: parent.left//; anchors.leftMargin: 0
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/quit.png"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: Qt.quit()
+ }
+ }
+
Text {
id: categoryText
anchors {
- left: parent.left; right: tagButton.left; leftMargin: 10; rightMargin: 10
+ left: quitButton.right; right: tagButton.left; leftMargin: 10; rightMargin: 10
verticalCenter: parent.verticalCenter
}
elide: Text.ElideLeft
@@ -70,6 +81,6 @@ Item {
}
transitions: Transition {
- NumberAnimation { properties: "x"; easing.type: "InOutQuad" }
+ NumberAnimation { properties: "x"; easing.type: Easing.InOutQuad }
}
}
diff --git a/demos/declarative/flickr/mobile/images/quit.png b/demos/declarative/flickr/mobile/images/quit.png
new file mode 100644
index 0000000..5bda1b6
--- /dev/null
+++ b/demos/declarative/flickr/mobile/images/quit.png
Binary files differ
diff --git a/demos/declarative/minehunt/MinehuntCore/Tile.qml b/demos/declarative/minehunt/MinehuntCore/Tile.qml
index f3620f4..98b2017 100644
--- a/demos/declarative/minehunt/MinehuntCore/Tile.qml
+++ b/demos/declarative/minehunt/MinehuntCore/Tile.qml
@@ -57,7 +57,7 @@ Flipable {
PauseAnimation {
duration: pauseDur
}
- RotationAnimation { easing.type: "InOutQuad" }
+ RotationAnimation { easing.type: Easing.InOutQuad }
ScriptAction { script: if (modelData.hasMine && modelData.flipped) { expl.explode = true } }
}
}
diff --git a/demos/declarative/minehunt/minehunt.cpp b/demos/declarative/minehunt/minehunt.cpp
index 93cd1c1..2a4ed10 100644
--- a/demos/declarative/minehunt/minehunt.cpp
+++ b/demos/declarative/minehunt/minehunt.cpp
@@ -212,6 +212,8 @@ void MinehuntGame::reset()
}
nMines = 12;
nFlags = 0;
+ emit numMinesChanged();
+ emit numFlagsChanged();
setPlaying(false);
QTimer::singleShot(600,this, SLOT(setBoard()));
}
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml
index d39b7bc..71d3cdc 100644
--- a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml
+++ b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml
@@ -56,7 +56,7 @@ Component {
Tag {
anchors { horizontalCenter: parent.horizontalCenter; bottom: parent.bottom; bottomMargin: 10 }
- frontLabel: tag; backLabel: "Delete"; flipped: mainWindow.editMode
+ frontLabel: tag; backLabel: qsTr("Remove"); flipped: mainWindow.editMode
onTagChanged: rssModel.tags = tag
onBackClicked: if (mainWindow.editMode) photosModel.remove(index);
}
@@ -78,11 +78,11 @@ Component {
]
GridView.onAdd: NumberAnimation {
- target: albumWrapper; properties: "scale"; from: 0.0; to: 1.0; easing.type: "OutQuad"
+ target: albumWrapper; properties: "scale"; from: 0.0; to: 1.0; easing.type: Easing.OutQuad
}
GridView.onRemove: SequentialAnimation {
PropertyAction { target: albumWrapper; property: "GridView.delayRemove"; value: true }
- NumberAnimation { target: albumWrapper; property: "scale"; from: 1.0; to: 0.0; easing.type: "OutQuad" }
+ NumberAnimation { target: albumWrapper; property: "scale"; from: 1.0; to: 0.0; easing.type: Easing.OutQuad }
PropertyAction { target: albumWrapper; property: "GridView.delayRemove"; value: false }
}
@@ -92,12 +92,12 @@ Component {
SequentialAnimation {
NumberAnimation { properties: 'opacity'; duration: 250 }
PauseAnimation { duration: 350 }
- NumberAnimation { target: backButton; properties: "y"; duration: 200; easing.type: "OutQuad" }
+ NumberAnimation { target: backButton; properties: "y"; duration: 200; easing.type: Easing.OutQuad }
}
},
Transition {
from: 'inGrid'; to: '*'
- NumberAnimation { properties: "y,opacity"; easing.type: "OutQuad"; duration: 300 }
+ NumberAnimation { properties: "y,opacity"; easing.type: Easing.OutQuad; duration: 300 }
}
]
}
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/Button.qml b/demos/declarative/photoviewer/PhotoViewerCore/Button.qml
index c681064..5be096a 100644
--- a/demos/declarative/photoviewer/PhotoViewerCore/Button.qml
+++ b/demos/declarative/photoviewer/PhotoViewerCore/Button.qml
@@ -4,7 +4,7 @@ Item {
id: container
property alias label: labelText.text
- property color tint: "#FFFFFFFF"
+ property string tint: ""
signal clicked
width: labelText.width + 70 ; height: labelText.height + 18
@@ -19,7 +19,7 @@ Item {
Rectangle {
anchors.fill: container; color: container.tint; visible: container.tint != ""
- opacity: 0.1; smooth: true
+ opacity: 0.25; smooth: true
}
Text { id: labelText; font.pixelSize: 15; anchors.centerIn: parent; smooth: true }
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml
index ccfda02..15ffe56 100644
--- a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml
+++ b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml
@@ -4,11 +4,10 @@ Item {
id: container
property string label
- property color tint: "#FFFFFFFF"
signal clicked
signal labelChanged(string label)
- width: labelText.width + 70 ; height: labelText.height + 18
+ width: textInput.width + 70 ; height: textInput.height + 18
BorderImage {
anchors { fill: container; leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 }
@@ -18,36 +17,25 @@ Item {
Image { anchors.fill: parent; source: "images/cardboard.png"; smooth: true }
- Rectangle {
- anchors.fill: container; color: container.tint; visible: container.tint != ""
- opacity: 0.1; smooth: true
- }
-
- Text { id: labelText; text: label; font.pixelSize: 15; anchors.centerIn: parent; smooth: true }
-
TextInput {
- id: textInput; text: label; font.pixelSize: 15; anchors.centerIn: parent; smooth: true; visible: false
- Keys.onReturnPressed: container.labelChanged(textInput.text)
+ id: textInput; text: label; font.pixelSize: 15; anchors.centerIn: parent; smooth: true
+ Keys.onReturnPressed: {
+ container.labelChanged(textInput.text)
+ container.focus = true
+ }
Keys.onEscapePressed: {
- textInput.text = labelText.text
- container.state = ''
+ textInput.text = container.label
+ container.focus = true
}
}
- MouseArea {
- anchors { fill: parent; leftMargin: -20; topMargin: -20; rightMargin: -20; bottomMargin: -20 }
- onClicked: container.state = "editMode"
- }
-
- states: State {
- name: "editMode"
- PropertyChanges { target: container; width: textInput.width + 70; height: textInput.height + 17 }
- PropertyChanges { target: textInput; visible: true; focus: true }
- PropertyChanges { target: labelText; visible: false }
+ Rectangle {
+ anchors.fill: container; border.color: "steelblue"; border.width: 4
+ color: "transparent"; visible: textInput.focus; smooth: true
}
- onLabelChanged: {
- labelText.text = label
- container.state = ''
+ MouseArea {
+ anchors { fill: parent; leftMargin: -20; topMargin: -20; rightMargin: -20; bottomMargin: -20 }
+ onClicked: textInput.forceFocus()
}
}
diff --git a/demos/declarative/photoviewer/i18n/base.ts b/demos/declarative/photoviewer/i18n/base.ts
new file mode 100644
index 0000000..1accfd2
--- /dev/null
+++ b/demos/declarative/photoviewer/i18n/base.ts
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0">
+<context>
+ <name>AlbumDelegate</name>
+ <message>
+ <location filename="../PhotoViewerCore/AlbumDelegate.qml" line="59"/>
+ <source>Remove</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>photoviewer</name>
+ <message>
+ <location filename="../photoviewer.qml" line="30"/>
+ <source>Add</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../photoviewer.qml" line="39"/>
+ <source>Edit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../photoviewer.qml" line="52"/>
+ <source>Back</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/demos/declarative/photoviewer/i18n/qml_fr.qm b/demos/declarative/photoviewer/i18n/qml_fr.qm
new file mode 100644
index 0000000..c24fcbc
--- /dev/null
+++ b/demos/declarative/photoviewer/i18n/qml_fr.qm
Binary files differ
diff --git a/demos/declarative/photoviewer/i18n/qml_fr.ts b/demos/declarative/photoviewer/i18n/qml_fr.ts
new file mode 100644
index 0000000..9f892db
--- /dev/null
+++ b/demos/declarative/photoviewer/i18n/qml_fr.ts
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr_FR">
+<context>
+ <name>AlbumDelegate</name>
+ <message>
+ <location filename="../PhotoViewerCore/AlbumDelegate.qml" line="59"/>
+ <source>Remove</source>
+ <translation>Supprimer</translation>
+ </message>
+</context>
+<context>
+ <name>photoviewer</name>
+ <message>
+ <location filename="../photoviewer.qml" line="30"/>
+ <source>Add</source>
+ <translation>Ajouter</translation>
+ </message>
+ <message>
+ <location filename="../photoviewer.qml" line="39"/>
+ <source>Edit</source>
+ <translation>Éditer</translation>
+ </message>
+ <message>
+ <location filename="../photoviewer.qml" line="52"/>
+ <source>Back</source>
+ <translation>Retour</translation>
+ </message>
+</context>
+</TS>
diff --git a/demos/declarative/photoviewer/photoviewer.qml b/demos/declarative/photoviewer/photoviewer.qml
index 4094294..e384f46 100644
--- a/demos/declarative/photoviewer/photoviewer.qml
+++ b/demos/declarative/photoviewer/photoviewer.qml
@@ -27,7 +27,7 @@ Rectangle {
Column {
spacing: 20; anchors { bottom: parent.bottom; right: parent.right; rightMargin: 20; bottomMargin: 20 }
Button {
- id: newButton; label: "New"; rotation: 3
+ id: newButton; label: qsTr("Add"); rotation: 3
anchors.horizontalCenter: parent.horizontalCenter
onClicked: {
mainWindow.editMode = false
@@ -36,7 +36,7 @@ Rectangle {
}
}
Button {
- id: deleteButton; label: "Delete"; rotation: -2;
+ id: deleteButton; label: qsTr("Edit"); rotation: -2;
onClicked: mainWindow.editMode = !mainWindow.editMode
anchors.horizontalCenter: parent.horizontalCenter
}
@@ -49,7 +49,7 @@ Rectangle {
ListView { anchors.fill: parent; model: albumVisualModel.parts.browser; interactive: false }
- Button { id: backButton; label: "Back"; rotation: 3; x: parent.width - backButton.width - 6; y: -backButton.height - 8 }
+ Button { id: backButton; label: qsTr("Back"); rotation: 3; x: parent.width - backButton.width - 6; y: -backButton.height - 8 }
Rectangle { id: photosShade; color: 'black'; width: parent.width; height: parent.height; opacity: 0; visible: opacity != 0.0 }
diff --git a/demos/declarative/rssnews/content/BusyIndicator.qml b/demos/declarative/rssnews/content/BusyIndicator.qml
new file mode 100644
index 0000000..4be59a8
--- /dev/null
+++ b/demos/declarative/rssnews/content/BusyIndicator.qml
@@ -0,0 +1,12 @@
+import Qt 4.7
+
+Image {
+ id: container
+ property bool on: false
+
+ source: "images/busy.png"; visible: container.on
+
+ NumberAnimation on rotation {
+ running: container.on; from: 0; to: 360; loops: Animation.Infinite; duration: 1200
+ }
+}
diff --git a/demos/declarative/rssnews/content/CategoryDelegate.qml b/demos/declarative/rssnews/content/CategoryDelegate.qml
new file mode 100644
index 0000000..1400c36
--- /dev/null
+++ b/demos/declarative/rssnews/content/CategoryDelegate.qml
@@ -0,0 +1,41 @@
+import Qt 4.7
+
+Item {
+ id: delegate
+
+ width: delegate.ListView.view.width; height: 60
+
+ Text {
+ text: name
+ color: delegate.ListView.isCurrentItem ? "white" : "black"
+ font { family: "Helvetica"; pixelSize: 16; bold: true }
+ anchors {
+ left: parent.left; leftMargin: 15
+ verticalCenter: parent.verticalCenter
+ }
+ }
+
+ BusyIndicator {
+ scale: 0.6
+ on: delegate.ListView.isCurrentItem && window.loading
+ anchors { right: parent.right; rightMargin: 10; verticalCenter: parent.verticalCenter }
+ }
+
+ Rectangle {
+ width: delegate.width; height: 1; color: "#cccccc"
+ anchors.bottom: delegate.bottom
+ visible: delegate.ListView.isCurrentItem ? false : true
+ }
+ Rectangle {
+ width: delegate.width; height: 1; color: "white"
+ visible: delegate.ListView.isCurrentItem ? false : true
+ }
+
+ MouseArea {
+ anchors.fill: delegate
+ onClicked: {
+ delegate.ListView.view.currentIndex = index
+ window.currentFeed = feed
+ }
+ }
+}
diff --git a/demos/declarative/rssnews/content/NewsDelegate.qml b/demos/declarative/rssnews/content/NewsDelegate.qml
new file mode 100644
index 0000000..0d03880
--- /dev/null
+++ b/demos/declarative/rssnews/content/NewsDelegate.qml
@@ -0,0 +1,29 @@
+import Qt 4.7
+
+Item {
+ id: delegate
+ height: childrenRect.height + 20
+ width: delegate.ListView.view.width
+
+ Column {
+ x: 20; y: 20
+ width: parent.width - 40
+
+ Text {
+ id: titleText
+ text: title; width: parent.width; wrapMode: Text.WordWrap
+ font { bold: true; family: "Helvetica"; pointSize: 16 }
+ }
+
+ Text {
+ id: descriptionText
+ width: parent.width; text: description
+ wrapMode: Text.WordWrap; font.family: "Helvetica"
+ }
+ }
+
+ Rectangle {
+ width: parent.width; height: 1; color: "#cccccc"
+ anchors.bottom: parent.bottom
+ }
+}
diff --git a/demos/declarative/rssnews/content/RssFeeds.qml b/demos/declarative/rssnews/content/RssFeeds.qml
new file mode 100644
index 0000000..21e59fe
--- /dev/null
+++ b/demos/declarative/rssnews/content/RssFeeds.qml
@@ -0,0 +1,18 @@
+import Qt 4.7
+
+ListModel {
+ id: rssFeeds
+
+ ListElement { name: "Top Stories"; feed: "rss.news.yahoo.com/rss/topstories" }
+ ListElement { name: "World"; feed: "rss.news.yahoo.com/rss/world" }
+ ListElement { name: "Europe"; feed: "rss.news.yahoo.com/rss/europe" }
+ ListElement { name: "Oceania"; feed: "rss.news.yahoo.com/rss/oceania" }
+ ListElement { name: "U.S. National"; feed: "rss.news.yahoo.com/rss/us" }
+ ListElement { name: "Politics"; feed: "rss.news.yahoo.com/rss/politics" }
+ ListElement { name: "Business"; feed: "rss.news.yahoo.com/rss/business" }
+ ListElement { name: "Technology"; feed: "rss.news.yahoo.com/rss/tech" }
+ ListElement { name: "Entertainment"; feed: "rss.news.yahoo.com/rss/entertainment" }
+ ListElement { name: "Health"; feed: "rss.news.yahoo.com/rss/health" }
+ ListElement { name: "Science"; feed: "rss.news.yahoo.com/rss/science" }
+ ListElement { name: "Sports"; feed: "rss.news.yahoo.com/rss/sports" }
+}
diff --git a/demos/declarative/rssnews/content/ScrollBar.qml b/demos/declarative/rssnews/content/ScrollBar.qml
new file mode 100644
index 0000000..d0b08dd
--- /dev/null
+++ b/demos/declarative/rssnews/content/ScrollBar.qml
@@ -0,0 +1,66 @@
+import Qt 4.7
+
+Item {
+ id: container
+
+ property variant scrollArea
+ property variant orientation: Qt.Vertical
+
+ opacity: 0
+
+ function position()
+ {
+ var ny = 0;
+ if (container.orientation == Qt.Vertical)
+ ny = scrollArea.visibleArea.yPosition * container.height;
+ else
+ ny = scrollArea.visibleArea.xPosition * container.width;
+ if (ny > 2) return ny; else return 2;
+ }
+
+ function size()
+ {
+ var nh, ny;
+
+ if (container.orientation == Qt.Vertical)
+ nh = scrollArea.visibleArea.heightRatio * container.height;
+ else
+ nh = scrollArea.visibleArea.widthRatio * container.width;
+
+ if (container.orientation == Qt.Vertical)
+ ny = scrollArea.visibleArea.yPosition * container.height;
+ else
+ ny = scrollArea.visibleArea.xPosition * container.width;
+
+ if (ny > 3) {
+ var t;
+ if (container.orientation == Qt.Vertical)
+ t = Math.ceil(container.height - 3 - ny);
+ else
+ t = Math.ceil(container.width - 3 - ny);
+ if (nh > t) return t; else return nh;
+ } else return nh + ny;
+ }
+
+ Rectangle { anchors.fill: parent; color: "Black"; opacity: 0.3 }
+
+ BorderImage {
+ source: "images/scrollbar.png"
+ border { left: 1; right: 1; top: 1; bottom: 1 }
+ x: container.orientation == Qt.Vertical ? 2 : position()
+ width: container.orientation == Qt.Vertical ? container.width - 4 : size()
+ y: container.orientation == Qt.Vertical ? position() : 2
+ height: container.orientation == Qt.Vertical ? size() : container.height - 4
+ }
+
+ states: State {
+ name: "visible"
+ when: container.orientation == Qt.Vertical ? scrollArea.movingVertically : scrollArea.movingHorizontally
+ PropertyChanges { target: container; opacity: 1.0 }
+ }
+
+ transitions: Transition {
+ from: "visible"; to: ""
+ NumberAnimation { properties: "opacity"; duration: 600 }
+ }
+}
diff --git a/demos/declarative/rssnews/content/images/busy.png b/demos/declarative/rssnews/content/images/busy.png
new file mode 100644
index 0000000..664c2b1
--- /dev/null
+++ b/demos/declarative/rssnews/content/images/busy.png
Binary files differ
diff --git a/demos/declarative/rssnews/content/images/scrollbar.png b/demos/declarative/rssnews/content/images/scrollbar.png
new file mode 100644
index 0000000..0228dcf
--- /dev/null
+++ b/demos/declarative/rssnews/content/images/scrollbar.png
Binary files differ
diff --git a/demos/declarative/rssnews/rssnews.qml b/demos/declarative/rssnews/rssnews.qml
new file mode 100644
index 0000000..29a530f
--- /dev/null
+++ b/demos/declarative/rssnews/rssnews.qml
@@ -0,0 +1,52 @@
+import Qt 4.7
+import "content"
+
+Rectangle {
+ id: window
+ width: 800; height: 480
+
+ property string currentFeed: "rss.news.yahoo.com/rss/topstories"
+ property bool loading: feedModel.status == XmlListModel.Loading
+
+ RssFeeds { id: rssFeeds }
+
+ XmlListModel {
+ id: feedModel
+ source: "http://" + window.currentFeed
+ query: "/rss/channel/item"
+
+ XmlRole { name: "title"; query: "title/string()" }
+ XmlRole { name: "link"; query: "link/string()" }
+ XmlRole { name: "description"; query: "description/string()" }
+ }
+
+ Row {
+ Rectangle {
+ width: 220; height: window.height
+ color: "#efefef"
+
+ ListView {
+ focus: true
+ id: categories
+ anchors.fill: parent
+ model: rssFeeds
+ delegate: CategoryDelegate {}
+ highlight: Rectangle { color: "steelblue" }
+ highlightMoveSpeed: 9999999
+ }
+ ScrollBar {
+ scrollArea: categories; height: categories.height; width: 8
+ anchors.right: categories.right
+ }
+ }
+ ListView {
+ id: list
+ width: window.width - 220; height: window.height
+ model: feedModel
+ delegate: NewsDelegate {}
+ }
+ }
+
+ ScrollBar { scrollArea: list; height: list.height; width: 8; anchors.right: window.right }
+ Rectangle { x: 220; height: window.height; width: 1; color: "#cccccc" }
+}
diff --git a/examples/declarative/xmlhttprequest/xmlhttprequest.qmlproject b/demos/declarative/rssnews/rssnews.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/xmlhttprequest/xmlhttprequest.qmlproject
+++ b/demos/declarative/rssnews/rssnews.qmlproject
diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js
index bf99ca3..5c008a2 100755
--- a/demos/declarative/samegame/SamegameCore/samegame.js
+++ b/demos/declarative/samegame/SamegameCore/samegame.js
@@ -175,15 +175,14 @@ function createBlock(column,row){
// only work if the block QML is a local file. Otherwise the component will
// not be ready immediately. There is a statusChanged signal on the
// component you could use if you want to wait to load remote files.
- if(component.isReady){
- var dynamicObject = component.createObject();
+ if(component.status == Component.Ready){
+ var dynamicObject = component.createObject(gameCanvas);
if(dynamicObject == null){
console.log("error creating block");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
dynamicObject.type = Math.floor(Math.random() * 3);
- dynamicObject.parent = gameCanvas;
dynamicObject.x = column*gameCanvas.blockSize;
dynamicObject.targetX = column*gameCanvas.blockSize;
dynamicObject.targetY = row*gameCanvas.blockSize;
@@ -193,7 +192,7 @@ function createBlock(column,row){
board[index(column,row)] = dynamicObject;
}else{
console.log("error loading block component");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
return true;
diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js
index 02f9757..6f78b33 100644
--- a/demos/declarative/snake/content/snake.js
+++ b/demos/declarative/snake/content/snake.js
@@ -52,15 +52,14 @@ function startNewGame()
link.spawned = false;
link.dying = false;
} else {
- if(linkComponent.isReady == false){
- if(linkComponent.isError == true)
- console.log(linkComponent.errorsString());
+ if(linkComponent.status != Component.Ready) {
+ if(linkComponent.status == Component.Error)
+ console.log(linkComponent.errorString());
else
console.log("Still loading linkComponent");
continue;//TODO: Better error handling?
}
- var link = linkComponent.createObject();
- link.parent = playfield;
+ var link = linkComponent.createObject(playfield);
link.z = numRows * numColumns + 1 - i;
link.type = i == 0 ? 2 : 0;
link.spawned = false;
@@ -293,15 +292,14 @@ function createCookie(value) {
}
}
- if(cookieComponent.isReady == false){
- if(cookieComponent.isError == true)
- console.log(cookieComponent.errorsString());
+ if(cookieComponent.status != Component.Ready) {
+ if(cookieComponent.status == Component.Error)
+ console.log(cookieComponent.errorString());
else
console.log("Still loading cookieComponent");
return;//TODO: Better error handling?
}
- cookie = cookieComponent.createObject();
- cookie.parent = head.parent;
+ cookie = cookieComponent.createObject(head.parent);
cookie.value = value;
cookie.row = row;
cookie.column = column;
diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml
index 47bced4..bc4a974 100644
--- a/demos/declarative/snake/snake.qml
+++ b/demos/declarative/snake/snake.qml
@@ -60,7 +60,7 @@ Rectangle {
Image {
id: title
source: "content/pics/snake.jpg"
- fillMode: "PreserveAspectCrop"
+ fillMode: Image.PreserveAspectCrop
anchors.fill: parent
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
@@ -69,7 +69,7 @@ Rectangle {
Text {
color: "white"
font.pointSize: 24
- horizontalAlignment: "AlignHCenter"
+ horizontalAlignment: Text.AlignHCenter
text: "Last Score:\t" + lastScore + "\nHighscore:\t" + highScores.topScore;
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
@@ -78,7 +78,7 @@ Rectangle {
}
source: "content/pics/background.png"
- fillMode: "PreserveAspectCrop"
+ fillMode: Image.PreserveAspectCrop
anchors.left: parent.left
anchors.right: parent.right
diff --git a/demos/declarative/twitter/TwitterCore/FatDelegate.qml b/demos/declarative/twitter/TwitterCore/FatDelegate.qml
index 62ee11a..72e5ecc 100644
--- a/demos/declarative/twitter/TwitterCore/FatDelegate.qml
+++ b/demos/declarative/twitter/TwitterCore/FatDelegate.qml
@@ -27,7 +27,7 @@ Component {
id: whiteRect; x: 6; width: 50; height: 50; color: "white"; smooth: true
anchors.verticalCenter: parent.verticalCenter
- Loading { x: 1; y: 1; width: 48; height: 48; visible: realImage.status != 1 }
+ Loading { x: 1; y: 1; width: 48; height: 48; visible: realImage.status != Image.Ready }
Image { id: realImage; source: userImage; x: 1; y: 1; width:48; height:48 }
}
Text { id:txt; y:4; x: 56
diff --git a/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml
index c1ae3e5..26ad1a9 100644
--- a/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml
+++ b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml
@@ -37,7 +37,7 @@ Item {
UserModel { user: rssModel.authName; id: userModel }
Component { id: imgDelegate;
Item {
- Loading { width:48; height:48; visible: realImage.status != 1 }
+ Loading { width:48; height:48; visible: realImage.status != Image.Ready }
Image { source: image; width:48; height:48; id: realImage }
}
}
@@ -113,7 +113,7 @@ Item {
transitions: [
Transition {
from: "*"; to: "*"
- NumberAnimation { properties: "x,y,width,height"; easing.type: "InOutQuad" }
+ NumberAnimation { properties: "x,y,width,height"; easing.type: Easing.InOutQuad }
}
]
}
diff --git a/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml b/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml
index 8c27e2b..445eda4 100644
--- a/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml
+++ b/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml
@@ -18,7 +18,7 @@ Item {
}
]
transitions: [
- Transition { NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" } }
+ Transition { NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad } }
]
}
diff --git a/demos/declarative/twitter/TwitterCore/TitleBar.qml b/demos/declarative/twitter/TwitterCore/TitleBar.qml
index 87ceec5..5256de4 100644
--- a/demos/declarative/twitter/TwitterCore/TitleBar.qml
+++ b/demos/declarative/twitter/TwitterCore/TitleBar.qml
@@ -70,6 +70,6 @@ Item {
}
transitions: Transition {
- NumberAnimation { properties: "x"; easing.type: "InOutQuad" }
+ NumberAnimation { properties: "x"; easing.type: Easing.InOutQuad }
}
}
diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml
index 0e3ec3e..f86388e 100644
--- a/demos/declarative/twitter/twitter.qml
+++ b/demos/declarative/twitter/twitter.qml
@@ -88,7 +88,7 @@ Item {
}
]
transitions: [
- Transition { NumberAnimation { properties: "x,y"; duration: 500; easing.type: "InOutQuad" } }
+ Transition { NumberAnimation { properties: "x,y"; duration: 500; easing.type: Easing.InOutQuad } }
]
}
}
diff --git a/demos/declarative/webbrowser/content/Button.qml b/demos/declarative/webbrowser/content/Button.qml
new file mode 100644
index 0000000..a1baf16
--- /dev/null
+++ b/demos/declarative/webbrowser/content/Button.qml
@@ -0,0 +1,18 @@
+import Qt 4.7
+
+Item {
+ property alias image: icon.source
+ property variant action
+
+ width: 40; height: parent.height
+
+ Image {
+ id: icon; anchors.centerIn: parent
+ opacity: action.enabled ? 1.0 : 0.4
+ }
+
+ MouseArea {
+ anchors { fill: parent; topMargin: -10; bottomMargin: -10 }
+ onClicked: action.trigger()
+ }
+}
diff --git a/demos/declarative/webbrowser/content/FlickableWebView.qml b/demos/declarative/webbrowser/content/FlickableWebView.qml
index 46f45e0..32d69d8 100644
--- a/demos/declarative/webbrowser/content/FlickableWebView.qml
+++ b/demos/declarative/webbrowser/content/FlickableWebView.qml
@@ -12,17 +12,22 @@ Flickable {
id: flickable
width: parent.width
- contentWidth: Math.max(parent.width,webView.width*webView.scale)
- contentHeight: Math.max(parent.height,webView.height*webView.scale)
+ contentWidth: Math.max(parent.width,webView.width)
+ contentHeight: Math.max(parent.height,webView.height)
anchors.top: headerSpace.bottom
- anchors.bottom: footer.top
+ anchors.bottom: parent.top
anchors.left: parent.left
anchors.right: parent.right
pressDelay: 200
+ onWidthChanged : {
+ // Expand (but not above 1:1) if otherwise would be smaller that available width.
+ if (width > webView.width*webView.contentsScale && webView.contentsScale < 1.0)
+ webView.contentsScale = width / webView.width * webView.contentsScale;
+ }
+
WebView {
id: webView
- pixelCacheSize: 4000000
transformOrigin: Item.TopLeft
function fixUrl(url)
@@ -42,8 +47,6 @@ Flickable {
url: fixUrl(webBrowser.urlString)
smooth: false // We don't want smooth scaling, since we only scale during (fast) transitions
- smoothCache: true // We do want smooth rendering
- fillColor: "white"
focus: true
zoomFactor: 1
@@ -53,14 +56,13 @@ Flickable {
{
if (centerX) {
var sc = zoom/contentsScale;
- scaleAnim.to = sc;
+ scaleAnim.to = zoom;
flickVX.from = flickable.contentX
flickVX.to = Math.max(0,Math.min(centerX-flickable.width/2,webView.width*sc-flickable.width))
finalX.value = flickVX.to
flickVY.from = flickable.contentY
flickVY.to = Math.max(0,Math.min(centerY-flickable.height/2,webView.height*sc-flickable.height))
finalY.value = flickVY.to
- finalZoom.value = zoom
quickZoom.start()
}
}
@@ -68,8 +70,8 @@ Flickable {
Keys.onLeftPressed: webView.contentsScale -= 0.1
Keys.onRightPressed: webView.contentsScale += 0.1
- preferredWidth: flickable.width*zoomFactor
- preferredHeight: flickable.height*zoomFactor
+ preferredWidth: flickable.width
+ preferredHeight: flickable.height
contentsScale: 1/zoomFactor
onContentsSizeChanged: {
// zoom out
@@ -102,17 +104,16 @@ Flickable {
NumberAnimation {
id: scaleAnim
target: webView
- property: "scale"
- from: 1
- to: 0 // set before calling
- easing.type: "Linear"
+ property: "contentsScale"
+ // the to property is set before calling
+ easing.type: Easing.Linear
duration: 200
}
NumberAnimation {
id: flickVX
target: flickable
property: "contentX"
- easing.type: "Linear"
+ easing.type: Easing.Linear
duration: 200
from: 0 // set before calling
to: 0 // set before calling
@@ -121,22 +122,12 @@ Flickable {
id: flickVY
target: flickable
property: "contentY"
- easing.type: "Linear"
+ easing.type: Easing.Linear
duration: 200
from: 0 // set before calling
to: 0 // set before calling
}
}
- PropertyAction {
- id: finalZoom
- target: webView
- property: "contentsScale"
- }
- PropertyAction {
- target: webView
- property: "scale"
- value: 1.0
- }
// Have to set the contentXY, since the above 2
// size changes may have started a correction if
// contentsScale < 1.0.
diff --git a/demos/declarative/webbrowser/content/Header.qml b/demos/declarative/webbrowser/content/Header.qml
new file mode 100644
index 0000000..7c93580
--- /dev/null
+++ b/demos/declarative/webbrowser/content/Header.qml
@@ -0,0 +1,69 @@
+import Qt 4.7
+
+Image {
+ property alias editUrl: urlInput.url
+
+ source: "pics/titlebar-bg.png"; fillMode: Image.TileHorizontally
+
+ x: webView.contentX < 0 ? -webView.contentX : webView.contentX > webView.contentWidth-webView.width
+ ? -webView.contentX+webView.contentWidth-webView.width : 0
+
+ y: {
+ if (webView.progress < 1.0)
+ return 0;
+ else {
+ webView.contentY < 0 ? -webView.contentY : webView.contentY > height ? -height : -webView.contentY
+ }
+ }
+
+ Column {
+ width: parent.width
+
+ Item {
+ width: parent.width; height: 20
+ Text {
+ anchors.centerIn: parent
+ text: webView.title; font.pixelSize: 14; font.bold: true
+ color: "white"; styleColor: "black"; style: Text.Sunken
+ }
+ }
+
+ Item {
+ width: parent.width; height: 40
+
+ Button {
+ id: backButton
+ action: webView.back; image: "pics/go-previous-view.png"
+ anchors { left: parent.left; bottom: parent.bottom }
+ }
+
+ Button {
+ id: nextButton
+ anchors.left: backButton.right
+ action: webView.forward; image: "pics/go-next-view.png"
+ }
+
+ UrlInput {
+ id: urlInput
+ anchors { left: nextButton.right; right: reloadButton.left }
+ image: "pics/display.png"
+ onUrlEntered: {
+ webBrowser.urlString = url
+ webBrowser.focus = true
+ }
+ }
+
+ Button {
+ id: reloadButton
+ anchors { right: parent.right; rightMargin: 4 }
+ action: webView.reload; image: "pics/view-refresh.png"; visible: webView.progress == 1.0
+ }
+
+ Button {
+ id: stopButton
+ anchors { right: parent.right; rightMargin: 4 }
+ action: webView.stop; image: "pics/edit-delete.png"; visible: webView.progress < 1.0
+ }
+ }
+ }
+}
diff --git a/demos/declarative/webbrowser/content/RectSoftShadow.qml b/demos/declarative/webbrowser/content/RectSoftShadow.qml
deleted file mode 100644
index 53d098c..0000000
--- a/demos/declarative/webbrowser/content/RectSoftShadow.qml
+++ /dev/null
@@ -1,32 +0,0 @@
-import Qt 4.7
-
-Item {
- BorderImage {
- source: "pics/softshadow-left.sci"
- x: -16
- y: -16
- width: 16
- height: parent.height+32
- }
- BorderImage {
- source: "pics/softshadow-right.sci"
- x: parent.width
- y: -16
- width: 16
- height: parent.height+32
- }
- Image {
- source: "pics/softshadow-top.png"
- x: 0
- y: -16
- width: parent.width
- height: 16
- }
- Image {
- source: "pics/softshadow-bottom.png"
- x: 0
- y: parent.height
- width: parent.width
- height: 16
- }
-}
diff --git a/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml b/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml
deleted file mode 100644
index f5bfadf..0000000
--- a/demos/declarative/webbrowser/content/RetractingWebBrowserHeader.qml
+++ /dev/null
@@ -1,113 +0,0 @@
-import Qt 4.7
-
-import "fieldtext"
-
-Image {
- property alias editUrl: editUrl.text
-
- id: header
- source: "pics/header.png"
- width: parent.width
- height: 60
- x: webView.contentX < 0 ? -webView.contentX : webView.contentX > webView.contentWidth-webView.width
- ? -webView.contentX+webView.contentWidth-webView.width : 0
- y: webView.contentY < 0 ? -webView.contentY : progressOff*
- (webView.contentY>height?-height:-webView.contentY)
- Row {
- id: headerTitle
-
- anchors.top: header.top
- anchors.topMargin: 4
- x: parent.width > headerIcon.width+headerText.width+6 ? (parent.width-headerIcon.width-headerText.width-6)/2 : 0
- spacing: 6
-
- Image {
- id: headerIcon
- pixmap: webView.icon
- }
-
- Text {
- id: headerText
-
- text: webView.title!='' || webView.progress == 1.0 ? webView.title : 'Loading...'
-
- color: "white"
- styleColor: "black"
- style: Text.Raised
-
- font.family: "Helvetica"
- font.pointSize: 10
- font.bold: true
-
- horizontalAlignment: Text.AlignHCenter
- }
- }
- Item {
- width: parent.width
- anchors.top: headerTitle.bottom
- anchors.topMargin: 2
- anchors.bottom: parent.bottom
-
- Item {
- id: urlBox
- height: 31
- anchors.left: parent.left
- anchors.leftMargin: 12
- anchors.right: parent.right
- anchors.rightMargin: 12
- anchors.top: parent.top
- clip: true
- property bool mouseGrabbed: false
-
- BorderImage {
- source: "pics/addressbar.sci"
- anchors.fill: urlBox
- }
-
- BorderImage {
- id: urlBoxhl
- source: "pics/addressbar-filled.sci"
- width: parent.width*webView.progress
- height: parent.height
- opacity: 1-header.progressOff
- clip: true
- }
-
- FieldText {
- id: editUrl
- mouseGrabbed: parent.mouseGrabbed
-
- text: webBrowser.urlString
- label: "url:"
- onConfirmed: { webBrowser.urlString = editUrl.text; webView.focus=true }
- onCancelled: { webView.focus=true }
- onStartEdit: { webView.focus=false }
-
- anchors.left: urlBox.left
- anchors.right: urlBox.right
- anchors.leftMargin: 6
- anchors.verticalCenter: urlBox.verticalCenter
- anchors.verticalCenterOffset: 1
- }
- }
- }
-
- property real progressOff : 1
- states: [
- State {
- name: "ProgressShown"
- when: webView.progress < 1.0
- PropertyChanges { target: header; progressOff: 0; }
- }
- ]
- transitions: [
- Transition {
- NumberAnimation {
- targets: header
- properties: "progressOff"
- easing.type: "InOutQuad"
- duration: 300
- }
- }
- ]
-}
diff --git a/demos/declarative/webbrowser/content/ScrollBar.qml b/demos/declarative/webbrowser/content/ScrollBar.qml
new file mode 100644
index 0000000..aa79d35
--- /dev/null
+++ b/demos/declarative/webbrowser/content/ScrollBar.qml
@@ -0,0 +1,66 @@
+import Qt 4.7
+
+Item {
+ id: container
+
+ property variant scrollArea
+ property variant orientation: Qt.Vertical
+
+ opacity: 0
+
+ function position()
+ {
+ var ny = 0;
+ if (container.orientation == Qt.Vertical)
+ ny = scrollArea.visibleArea.yPosition * container.height;
+ else
+ ny = scrollArea.visibleArea.xPosition * container.width;
+ if (ny > 2) return ny; else return 2;
+ }
+
+ function size()
+ {
+ var nh, ny;
+
+ if (container.orientation == Qt.Vertical)
+ nh = scrollArea.visibleArea.heightRatio * container.height;
+ else
+ nh = scrollArea.visibleArea.widthRatio * container.width;
+
+ if (container.orientation == Qt.Vertical)
+ ny = scrollArea.visibleArea.yPosition * container.height;
+ else
+ ny = scrollArea.visibleArea.xPosition * container.width;
+
+ if (ny > 3) {
+ var t;
+ if (container.orientation == Qt.Vertical)
+ t = Math.ceil(container.height - 3 - ny);
+ else
+ t = Math.ceil(container.width - 3 - ny);
+ if (nh > t) return t; else return nh;
+ } else return nh + ny;
+ }
+
+ Rectangle { anchors.fill: parent; color: "Black"; opacity: 0.5 }
+
+ BorderImage {
+ source: "pics/scrollbar.png"
+ border { left: 1; right: 1; top: 1; bottom: 1 }
+ x: container.orientation == Qt.Vertical ? 2 : position()
+ width: container.orientation == Qt.Vertical ? container.width - 4 : size()
+ y: container.orientation == Qt.Vertical ? position() : 2
+ height: container.orientation == Qt.Vertical ? size() : container.height - 4
+ }
+
+ states: State {
+ name: "visible"
+ when: container.orientation == Qt.Vertical ? scrollArea.movingVertically : scrollArea.movingHorizontally
+ PropertyChanges { target: container; opacity: 1.0 }
+ }
+
+ transitions: Transition {
+ from: "visible"; to: ""
+ NumberAnimation { properties: "opacity"; duration: 600 }
+ }
+}
diff --git a/demos/declarative/webbrowser/content/UrlInput.qml b/demos/declarative/webbrowser/content/UrlInput.qml
new file mode 100644
index 0000000..9f7fc38
--- /dev/null
+++ b/demos/declarative/webbrowser/content/UrlInput.qml
@@ -0,0 +1,44 @@
+import Qt 4.7
+
+Item {
+ id: container
+
+ property alias image: bg.source
+ property alias url: urlText.text
+
+ signal urlEntered(string url)
+
+ width: parent.height; height: parent.height
+
+ BorderImage {
+ id: bg; rotation: 180
+ x: 8; width: parent.width - 16; height: 30;
+ anchors.verticalCenter: parent.verticalCenter
+ border { left: 10; top: 10; right: 10; bottom: 10 }
+ }
+
+ Rectangle {
+ anchors.bottom: bg.bottom
+ x: 18; height: 4; color: "#63b1ed"
+ width: (bg.width - 20) * webView.progress
+ opacity: webView.progress == 1.0 ? 0.0 : 1.0
+ }
+
+ TextInput {
+ id: urlText
+ horizontalAlignment: TextEdit.AlignLeft
+ font.pixelSize: 14; focusOnPress: true
+ Keys.onEscapePressed: {
+ urlText.text = webView.url
+ webView.focus = true
+ }
+ Keys.onReturnPressed: {
+ container.urlEntered(urlText.text)
+ webView.focus = true
+ }
+ anchors {
+ left: parent.left; right: parent.right; leftMargin: 18; rightMargin: 18
+ verticalCenter: parent.verticalCenter
+ }
+ }
+}
diff --git a/demos/declarative/webbrowser/content/fieldtext/FieldText.qml b/demos/declarative/webbrowser/content/fieldtext/FieldText.qml
deleted file mode 100644
index d1d003f..0000000
--- a/demos/declarative/webbrowser/content/fieldtext/FieldText.qml
+++ /dev/null
@@ -1,157 +0,0 @@
-import Qt 4.7
-
-Item {
- id: fieldText
- height: 30
- property string text: ""
- property string label: ""
- property bool mouseGrabbed: false
- signal confirmed
- signal cancelled
- signal startEdit
-
- function edit() {
- if (!mouseGrabbed) {
- fieldText.startEdit();
- fieldText.state='editing';
- mouseGrabbed=true;
- }
- }
-
- function confirm() {
- fieldText.state='';
- fieldText.text = textEdit.text;
- mouseGrabbed=false;
- fieldText.confirmed();
- }
-
- function reset() {
- textEdit.text = fieldText.text;
- fieldText.state='';
- mouseGrabbed=false;
- fieldText.cancelled();
- }
-
- Image {
- id: cancelIcon
- width: 22
- height: 22
- anchors.right: parent.right
- anchors.rightMargin: 4
- anchors.verticalCenter: parent.verticalCenter
- source: "pics/cancel.png"
- opacity: 0
- }
-
- Image {
- id: confirmIcon
- width: 22
- height: 22
- anchors.left: parent.left
- anchors.leftMargin: 4
- anchors.verticalCenter: parent.verticalCenter
- source: "pics/ok.png"
- opacity: 0
- }
-
- TextInput {
- id: textEdit
- text: fieldText.text
- focus: false
- anchors.left: parent.left
- anchors.leftMargin: 0
- anchors.right: parent.right
- anchors.rightMargin: 0
- anchors.verticalCenter: parent.verticalCenter
- color: "black"
- font.bold: true
- readOnly: true
- onAccepted: confirm()
- Keys.onEscapePressed: reset()
- }
-
- Text {
- id: textLabel
- x: 5
- width: parent.width-10
- anchors.verticalCenter: parent.verticalCenter
- horizontalAlignment: Text.AlignHCenter
- color: fieldText.state == "editing" ? "#505050" : "#AAAAAA"
- font.italic: true
- font.bold: true
- text: label
- opacity: textEdit.text == '' ? 1 : 0
- Behavior on opacity {
- NumberAnimation {
- property: "opacity"
- duration: 250
- }
- }
- }
-
- MouseArea {
- anchors.fill: cancelIcon
- onClicked: { reset() }
- }
-
- MouseArea {
- anchors.fill: confirmIcon
- onClicked: { confirm() }
- }
-
- MouseArea {
- id: editRegion
- anchors.fill: textEdit
- onClicked: { edit() }
- }
-
- states: [
- State {
- name: "editing"
- PropertyChanges {
- target: confirmIcon
- opacity: 1
- }
- PropertyChanges {
- target: cancelIcon
- opacity: 1
- }
- PropertyChanges {
- target: textEdit
- color: "black"
- readOnly: false
- focus: true
- selectionStart: 0
- selectionEnd: -1
- }
- PropertyChanges {
- target: editRegion
- opacity: 0
- }
- PropertyChanges {
- target: textEdit.anchors
- leftMargin: 34
- }
- PropertyChanges {
- target: textEdit.anchors
- rightMargin: 34
- }
- }
- ]
-
- transitions: [
- Transition {
- from: ""
- to: "*"
- reversible: true
- NumberAnimation {
- properties: "opacity,leftMargin,rightMargin"
- duration: 200
- }
- ColorAnimation {
- property: "color"
- duration: 150
- }
- }
- ]
-}
diff --git a/demos/declarative/webbrowser/content/fieldtext/pics/cancel.png b/demos/declarative/webbrowser/content/fieldtext/pics/cancel.png
deleted file mode 100644
index ecc9533..0000000
--- a/demos/declarative/webbrowser/content/fieldtext/pics/cancel.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/fieldtext/pics/ok.png b/demos/declarative/webbrowser/content/fieldtext/pics/ok.png
deleted file mode 100644
index 5795f04..0000000
--- a/demos/declarative/webbrowser/content/fieldtext/pics/ok.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/addressbar-filled.png b/demos/declarative/webbrowser/content/pics/addressbar-filled.png
deleted file mode 100644
index d8452ec..0000000
--- a/demos/declarative/webbrowser/content/pics/addressbar-filled.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/addressbar-filled.sci b/demos/declarative/webbrowser/content/pics/addressbar-filled.sci
deleted file mode 100644
index 96c5efb..0000000
--- a/demos/declarative/webbrowser/content/pics/addressbar-filled.sci
+++ /dev/null
@@ -1,6 +0,0 @@
-border.left: 7
-border.top: 7
-border.bottom: 7
-border.right: 7
-source: addressbar-filled.png
-
diff --git a/demos/declarative/webbrowser/content/pics/addressbar.png b/demos/declarative/webbrowser/content/pics/addressbar.png
deleted file mode 100644
index 3278f58..0000000
--- a/demos/declarative/webbrowser/content/pics/addressbar.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/addressbar.sci b/demos/declarative/webbrowser/content/pics/addressbar.sci
deleted file mode 100644
index 8f1cd18..0000000
--- a/demos/declarative/webbrowser/content/pics/addressbar.sci
+++ /dev/null
@@ -1,6 +0,0 @@
-border.left: 7
-border.top: 7
-border.bottom: 7
-border.right: 7
-source: addressbar.png
-
diff --git a/demos/declarative/webbrowser/content/pics/back-disabled.png b/demos/declarative/webbrowser/content/pics/back-disabled.png
deleted file mode 100644
index 91b9e76..0000000
--- a/demos/declarative/webbrowser/content/pics/back-disabled.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/back.png b/demos/declarative/webbrowser/content/pics/back.png
deleted file mode 100644
index 9988dd3..0000000
--- a/demos/declarative/webbrowser/content/pics/back.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/display.png b/demos/declarative/webbrowser/content/pics/display.png
new file mode 100644
index 0000000..9507f43
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/display.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/edit-delete.png b/demos/declarative/webbrowser/content/pics/edit-delete.png
new file mode 100644
index 0000000..351659b
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/edit-delete.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/footer.png b/demos/declarative/webbrowser/content/pics/footer.png
deleted file mode 100644
index 8391a93..0000000
--- a/demos/declarative/webbrowser/content/pics/footer.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/footer.sci b/demos/declarative/webbrowser/content/pics/footer.sci
deleted file mode 100644
index 7be58f1..0000000
--- a/demos/declarative/webbrowser/content/pics/footer.sci
+++ /dev/null
@@ -1,6 +0,0 @@
-border.left: 5
-border.top: 0
-border.bottom: 0
-border.right: 5
-source: footer.png
-
diff --git a/demos/declarative/webbrowser/content/pics/forward-disabled.png b/demos/declarative/webbrowser/content/pics/forward-disabled.png
deleted file mode 100644
index cb87f4f..0000000
--- a/demos/declarative/webbrowser/content/pics/forward-disabled.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/forward.png b/demos/declarative/webbrowser/content/pics/forward.png
deleted file mode 100644
index 83870ee..0000000
--- a/demos/declarative/webbrowser/content/pics/forward.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/go-next-view.png b/demos/declarative/webbrowser/content/pics/go-next-view.png
new file mode 100644
index 0000000..3bce02d
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/go-next-view.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/go-previous-view.png b/demos/declarative/webbrowser/content/pics/go-previous-view.png
new file mode 100644
index 0000000..3ec011e
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/go-previous-view.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/header.png b/demos/declarative/webbrowser/content/pics/header.png
deleted file mode 100644
index 26588c3..0000000
--- a/demos/declarative/webbrowser/content/pics/header.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/reload.png b/demos/declarative/webbrowser/content/pics/reload.png
deleted file mode 100644
index 45b5535..0000000
--- a/demos/declarative/webbrowser/content/pics/reload.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/scrollbar.png b/demos/declarative/webbrowser/content/pics/scrollbar.png
new file mode 100644
index 0000000..0228dcf
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/scrollbar.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/softshadow-bottom.png b/demos/declarative/webbrowser/content/pics/softshadow-bottom.png
deleted file mode 100644
index 85b0b44..0000000
--- a/demos/declarative/webbrowser/content/pics/softshadow-bottom.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/softshadow-left.png b/demos/declarative/webbrowser/content/pics/softshadow-left.png
deleted file mode 100644
index 02926d1..0000000
--- a/demos/declarative/webbrowser/content/pics/softshadow-left.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/softshadow-left.sci b/demos/declarative/webbrowser/content/pics/softshadow-left.sci
deleted file mode 100644
index 45c88d5..0000000
--- a/demos/declarative/webbrowser/content/pics/softshadow-left.sci
+++ /dev/null
@@ -1,5 +0,0 @@
-border.left: 0
-border.top: 16
-border.bottom: 16
-border.right: 0
-source: softshadow-left.png
diff --git a/demos/declarative/webbrowser/content/pics/softshadow-right.png b/demos/declarative/webbrowser/content/pics/softshadow-right.png
deleted file mode 100644
index e459f4f..0000000
--- a/demos/declarative/webbrowser/content/pics/softshadow-right.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/softshadow-right.sci b/demos/declarative/webbrowser/content/pics/softshadow-right.sci
deleted file mode 100644
index 4d459c0..0000000
--- a/demos/declarative/webbrowser/content/pics/softshadow-right.sci
+++ /dev/null
@@ -1,5 +0,0 @@
-border.left: 0
-border.top: 16
-border.bottom: 16
-border.right: 0
-source: softshadow-right.png
diff --git a/demos/declarative/webbrowser/content/pics/softshadow-top.png b/demos/declarative/webbrowser/content/pics/softshadow-top.png
deleted file mode 100644
index 9a9e232..0000000
--- a/demos/declarative/webbrowser/content/pics/softshadow-top.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/titlebar-bg.png b/demos/declarative/webbrowser/content/pics/titlebar-bg.png
new file mode 100644
index 0000000..06961e8
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/titlebar-bg.png
Binary files differ
diff --git a/demos/declarative/webbrowser/content/pics/view-refresh.png b/demos/declarative/webbrowser/content/pics/view-refresh.png
new file mode 100644
index 0000000..afa2a9d
--- /dev/null
+++ b/demos/declarative/webbrowser/content/pics/view-refresh.png
Binary files differ
diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml
index fbbe7b2..f539e21 100644
--- a/demos/declarative/webbrowser/webbrowser.qml
+++ b/demos/declarative/webbrowser/webbrowser.qml
@@ -3,168 +3,35 @@ import org.webkit 1.0
import "content"
-Item {
+Rectangle {
id: webBrowser
property string urlString : "http://qt.nokia.com/"
- width: 640
- height: 480
+ width: 800; height: 600
+ color: "#343434"
- Item {
- id: webPanel
- anchors.fill: parent
- clip: true
- Rectangle {
- color: "#555555"
- anchors.fill: parent
- }
- Image {
- source: "content/pics/softshadow-bottom.png"
- width: webPanel.width
- height: 16
- }
- Image {
- source: "content/pics/softshadow-top.png"
- width: webPanel.width
- height: 16
- anchors.bottom: footer.top
- }
- RectSoftShadow {
- x: -webView.contentX
- y: -webView.contentY
- width: webView.contentWidth
- height: webView.contentHeight+headerSpace.height
- }
- Item {
- id: headerSpace
- width: parent.width
- height: 60
- z: 1
+ FlickableWebView {
+ id: webView
+ url: webBrowser.urlString
+ anchors { top: headerSpace.bottom; left: parent.left; right: parent.right; bottom: parent.bottom }
+ }
+
+ Item { id: headerSpace; width: parent.width; height: 62 }
+
+ Header {
+ id: header
+ editUrl: webBrowser.urlString
+ width: headerSpace.width; height: headerSpace.height
+ }
+
+ ScrollBar {
+ scrollArea: webView; width: 8
+ anchors { right: parent.right; top: header.bottom; bottom: parent.bottom }
+ }
- RetractingWebBrowserHeader { id: header }
- }
- FlickableWebView {
- id: webView
- width: parent.width
- anchors.top: headerSpace.bottom
- anchors.bottom: footer.top
- anchors.left: parent.left
- anchors.right: parent.right
- }
- BorderImage {
- id: footer
- source: "content/pics/footer.sci"
- width: parent.width
- height: 43
- anchors.bottom: parent.bottom
- Rectangle {
- y: -1
- width: parent.width
- height: 1
- color: "#555555"
- }
- Item {
- id: backbutton
- width: back_e.width
- height: back_e.height
- anchors.right: reload.left
- anchors.rightMargin: 10
- anchors.verticalCenter: parent.verticalCenter
- Image {
- id: back_e
- source: "content/pics/back.png"
- anchors.fill: parent
- }
- Image {
- id: back_d
- source: "content/pics/back-disabled.png"
- anchors.fill: parent
- }
- states: [
- State {
- name: "Enabled"
- when: webView.back.enabled==true
- PropertyChanges { target: back_e; opacity: 1 }
- PropertyChanges { target: back_d; opacity: 0 }
- },
- State {
- name: "Disabled"
- when: webView.back.enabled==false
- PropertyChanges { target: back_e; opacity: 0 }
- PropertyChanges { target: back_d; opacity: 1 }
- }
- ]
- transitions: [
- Transition {
- NumberAnimation {
- properties: "opacity"
- easing.type: "InOutQuad"
- duration: 300
- }
- }
- ]
- MouseArea {
- anchors.fill: back_e
- onClicked: { if (webView.back.enabled) webView.back.trigger() }
- }
- }
- Image {
- id: reload
- source: "content/pics/reload.png"
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- }
- MouseArea {
- anchors.fill: reload
- onClicked: { webView.reload.trigger() }
- }
- Item {
- id: forwardbutton
- width: forward_e.width
- height: forward_e.height
- anchors.left: reload.right
- anchors.leftMargin: 10
- anchors.verticalCenter: parent.verticalCenter
- Image {
- id: forward_e
- source: "content/pics/forward.png"
- anchors.fill: parent
- anchors.verticalCenter: parent.verticalCenter
- }
- Image {
- id: forward_d
- source: "content/pics/forward-disabled.png"
- anchors.fill: parent
- }
- states: [
- State {
- name: "Enabled"
- when: webView.forward.enabled==true
- PropertyChanges { target: forward_e; opacity: 1 }
- PropertyChanges { target: forward_d; opacity: 0 }
- },
- State {
- name: "Disabled"
- when: webView.forward.enabled==false
- PropertyChanges { target: forward_e; opacity: 0 }
- PropertyChanges { target: forward_d; opacity: 1 }
- }
- ]
- transitions: [
- Transition {
- NumberAnimation {
- properties: "opacity"
- easing.type: "InOutQuad"
- duration: 320
- }
- }
- ]
- MouseArea {
- anchors.fill: parent
- onClicked: { if (webView.forward.enabled) webView.forward.trigger() }
- }
- }
- }
+ ScrollBar {
+ scrollArea: webView; height: 8; orientation: Qt.Horizontal
+ anchors { right: parent.right; rightMargin: 8; left: parent.left; bottom: parent.bottom }
}
}
diff --git a/demos/demos.pro b/demos/demos.pro
index 5e8a4ea..f359bd7 100644
--- a/demos/demos.pro
+++ b/demos/demos.pro
@@ -57,8 +57,8 @@ wince*:SUBDIRS += demos_sqlbrowser
}
contains(QT_CONFIG, phonon):!static:SUBDIRS += demos_mediaplayer
contains(QT_CONFIG, webkit):contains(QT_CONFIG, svg):!symbian:SUBDIRS += demos_browser
-contains(QT_CONFIG, multimedia):SUBDIRS += demos_multimedia
contains(QT_CONFIG, declarative):SUBDIRS += demos_declarative
+contains(QT_CONFIG, multimedia):SUBDIRS += demos_spectrum
# install
sources.files = README *.pro
@@ -89,13 +89,13 @@ demos_sqlbrowser.subdir = sqlbrowser
demos_undo.subdir = undo
demos_qtdemo.subdir = qtdemo
demos_mediaplayer.subdir = qmediaplayer
-demos_multimedia.subdir = multimedia
demos_declarative.subdir = declarative
demos_browser.subdir = browser
demos_boxes.subdir = boxes
demos_sub-attaq.subdir = sub-attaq
+demos_spectrum.subdir = spectrum
#CONFIG += ordered
!ordered {
diff --git a/demos/embedded/anomaly/src/ControlStrip.cpp b/demos/embedded/anomaly/src/ControlStrip.cpp
index dc6d5c2..c9c81c0 100644
--- a/demos/embedded/anomaly/src/ControlStrip.cpp
+++ b/demos/embedded/anomaly/src/ControlStrip.cpp
@@ -66,6 +66,7 @@ QSize ControlStrip::minimumSizeHint() const
void ControlStrip::mousePressEvent(QMouseEvent *event)
{
int h = height();
+ int spacing = qMin(h, (width() - h * 4) / 3);
int x = event->pos().x();
if (x < h) {
@@ -80,13 +81,13 @@ void ControlStrip::mousePressEvent(QMouseEvent *event)
return;
}
- if ((x < width() - 2 * h) && (x > width() - 3 * h)) {
+ if ((x < width() - (h + spacing)) && (x > width() - (h * 2 + spacing))) {
emit forwardClicked();
event->accept();
return;
}
- if ((x < width() - 3 * h) && (x > width() - 5 * h)) {
+ if ((x < width() - (h * 2 + spacing * 2)) && (x > width() - (h * 3 + spacing * 2))) {
emit backClicked();
event->accept();
return;
@@ -96,15 +97,16 @@ void ControlStrip::mousePressEvent(QMouseEvent *event)
void ControlStrip::paintEvent(QPaintEvent *event)
{
int h = height();
- int s = (h - menuPixmap.height()) / 2;
+ int spacing = qMin(h, (width() - h * 4) / 3);
+ int s = (height() - menuPixmap.height()) / 2;
QPainter p(this);
p.fillRect(event->rect(), QColor(32, 32, 32, 192));
p.setCompositionMode(QPainter::CompositionMode_SourceOver);
p.drawPixmap(s, s, menuPixmap);
p.drawPixmap(width() - h + s, s, closePixmap);
- p.drawPixmap(width() - 3 * h + s, s, forwardPixmap);
- p.drawPixmap(width() - 5 * h + s, s, backPixmap);
+ p.drawPixmap(width() - (h * 2 + spacing) + s, s, forwardPixmap);
+ p.drawPixmap(width() - (h * 3 + spacing * 2) + s, s, backPixmap);
p.end();
}
diff --git a/demos/embedded/flightinfo/flightinfo.cpp b/demos/embedded/flightinfo/flightinfo.cpp
index 10d3f02..425d6aa 100644
--- a/demos/embedded/flightinfo/flightinfo.cpp
+++ b/demos/embedded/flightinfo/flightinfo.cpp
@@ -43,10 +43,6 @@
#include <QtGui>
#include <QtNetwork>
-#if defined (Q_OS_SYMBIAN)
-#include "sym_iap_util.h"
-#endif
-
#include "ui_form.h"
#define FLIGHTVIEW_URL "http://mobile.flightview.com/TrackByFlight.aspx"
@@ -100,6 +96,8 @@ private:
QUrl m_url;
QDate m_searchDate;
QPixmap m_map;
+ QNetworkAccessManager m_manager;
+ QList<QNetworkReply *> mapReplies;
public:
@@ -115,7 +113,6 @@ public:
connect(ui.flightEdit, SIGNAL(returnPressed()), SLOT(startSearch()));
setWindowTitle("Flight Info");
- QTimer::singleShot(0, this, SLOT(delayedInit()));
// Rendered from the public-domain vectorized aircraft
// http://openclipart.org/media/people/Jarno
@@ -127,6 +124,8 @@ public:
connect(searchTodayAction, SIGNAL(triggered()), SLOT(today()));
connect(searchYesterdayAction, SIGNAL(triggered()), SLOT(yesterday()));
connect(randomAction, SIGNAL(triggered()), SLOT(randomFlight()));
+ connect(&m_manager, SIGNAL(finished(QNetworkReply*)),
+ this, SLOT(handleNetworkData(QNetworkReply*)));
#if defined(Q_OS_SYMBIAN)
menuBar()->addAction(searchTodayAction);
menuBar()->addAction(searchYesterdayAction);
@@ -140,31 +139,21 @@ public:
}
private slots:
- void delayedInit() {
-#if defined(Q_OS_SYMBIAN)
- qt_SetDefaultIap();
-#endif
- }
-
void handleNetworkData(QNetworkReply *networkReply) {
if (!networkReply->error()) {
- // Assume UTF-8 encoded
- QByteArray data = networkReply->readAll();
- QString xml = QString::fromUtf8(data);
- digest(xml);
- }
- networkReply->deleteLater();
- networkReply->manager()->deleteLater();
- }
-
- void handleMapData(QNetworkReply *networkReply) {
- if (!networkReply->error()) {
- m_map.loadFromData(networkReply->readAll());
- update();
+ if (!mapReplies.contains(networkReply)) {
+ // Assume UTF-8 encoded
+ QByteArray data = networkReply->readAll();
+ QString xml = QString::fromUtf8(data);
+ digest(xml);
+ } else {
+ mapReplies.removeOne(networkReply);
+ m_map.loadFromData(networkReply->readAll());
+ update();
+ }
}
networkReply->deleteLater();
- networkReply->manager()->deleteLater();
}
void today() {
@@ -185,6 +174,10 @@ private slots:
ui.infoBox->hide();
ui.flightStatus->hide();
ui.flightName->setText("Enter flight number");
+ ui.flightEdit->setFocus();
+#ifdef QT_KEYPAD_NAVIGATION
+ ui.flightEdit->setEditFocus(true);
+#endif
m_map = QPixmap();
update();
}
@@ -224,10 +217,7 @@ public slots:
ui.flightName->setText("Getting a random flight...");
}
- QNetworkAccessManager *manager = new QNetworkAccessManager(this);
- connect(manager, SIGNAL(finished(QNetworkReply*)),
- this, SLOT(handleNetworkData(QNetworkReply*)));
- manager->get(QNetworkRequest(m_url));
+ m_manager.get(QNetworkRequest(m_url));
}
@@ -248,10 +238,7 @@ private:
regex.indexIn(href);
QString airport = regex.cap(1);
m_url.addEncodedQueryItem("dpap", QUrl::toPercentEncoding(airport));
- QNetworkAccessManager *manager = new QNetworkAccessManager(this);
- connect(manager, SIGNAL(finished(QNetworkReply*)),
- this, SLOT(handleNetworkData(QNetworkReply*)));
- manager->get(QNetworkRequest(m_url));
+ m_manager.get(QNetworkRequest(m_url));
return;
}
@@ -287,12 +274,9 @@ private:
}
if (xml.name() == "img" && inFlightMap) {
QString src = xml.attributes().value("src").toString();
- src.prepend("http://mobile.flightview.com");
+ src.prepend("http://mobile.flightview.com/");
QUrl url = QUrl::fromPercentEncoding(src.toAscii());
- QNetworkAccessManager *manager = new QNetworkAccessManager(this);
- connect(manager, SIGNAL(finished(QNetworkReply*)),
- this, SLOT(handleMapData(QNetworkReply*)));
- manager->get(QNetworkRequest(url));
+ mapReplies.append(m_manager.get(QNetworkRequest(url)));
}
}
diff --git a/demos/embedded/fluidlauncher/config_s60/config.xml b/demos/embedded/fluidlauncher/config_s60/config.xml
index 176f52e..d926a4b 100644
--- a/demos/embedded/fluidlauncher/config_s60/config.xml
+++ b/demos/embedded/fluidlauncher/config_s60/config.xml
@@ -20,6 +20,7 @@
<example filename="flickable" name="Kinetic Scrolling" image="screenshots/flickable.png"/>
<example filename="digiflip" name="Flipping Clock" image="screenshots/digiflip.png"/>
<example filename="qmediaplayer" name="Media Player" image="screenshots/mediaplayer.png" args="-small-screen"/>
+ <example filename="spectrum" name="Spectrum Analyzer" image="screenshots/spectrum.png" args="-small-screen"/>
</demos>
<slideshow timeout="60000" interval="10000">
<imagedir dir="slides"/>
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro
index c6a105e..bb512d9 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.pro
+++ b/demos/embedded/fluidlauncher/fluidlauncher.pro
@@ -116,6 +116,10 @@ symbian {
reg_resource.sources += $$regResourceDir(demos/qmediaplayer/qmediaplayer_reg.rsc)
}
+ contains(QT_CONFIG, multimedia) {
+ reg_resource.sources += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/spectrum_reg.rsc
+ }
+
reg_resource.path = $$REG_RESOURCE_IMPORT_DIR
@@ -196,6 +200,13 @@ symbian {
$$appResourceDir(demos/qmediaplayer/qmediaplayer.mif)
}
+ contains(QT_CONFIG, multimedia) {
+ executables.sources += spectrum.exe fftreal.dll
+ resource.sources += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/spectrum.rsc
+ mifs.sources += \
+ $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/spectrum.mif
+ }
+
contains(QT_CONFIG, script) {
executables.sources += $$QT_BUILD_TREE/examples/script/context2d/context2d.exe
reg_resource.sources += $$regResourceDir(examples/script/context2d/context2d_reg.rsc)
diff --git a/demos/embedded/fluidlauncher/screenshots/spectrum.png b/demos/embedded/fluidlauncher/screenshots/spectrum.png
new file mode 100644
index 0000000..7f4938f
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/spectrum.png
Binary files differ
diff --git a/demos/embedded/weatherinfo/weatherinfo.cpp b/demos/embedded/weatherinfo/weatherinfo.cpp
index 42b685e..3e0226a 100644
--- a/demos/embedded/weatherinfo/weatherinfo.cpp
+++ b/demos/embedded/weatherinfo/weatherinfo.cpp
@@ -44,10 +44,6 @@
#include <QtNetwork>
#include <QtSvg>
-#if defined (Q_OS_SYMBIAN)
-#include "sym_iap_util.h"
-#endif
-
class WeatherInfo: public QMainWindow
{
Q_OBJECT
@@ -67,6 +63,7 @@ private:
QList<QGraphicsTextItem*> m_rangeItems;
QTimeLine m_timeLine;
QHash<QString, QString> m_icons;
+ QNetworkAccessManager m_manager;
public:
WeatherInfo(QWidget *parent = 0): QMainWindow(parent) {
@@ -98,14 +95,14 @@ public:
}
setContextMenuPolicy(Qt::ActionsContextMenu);
+ connect(&m_manager, SIGNAL(finished(QNetworkReply*)),
+ this, SLOT(handleNetworkData(QNetworkReply*)));
+
QTimer::singleShot(0, this, SLOT(delayedInit()));
}
private slots:
void delayedInit() {
-#if defined(Q_OS_SYMBIAN)
- qt_SetDefaultIap();
-#endif
request("Oslo");
}
@@ -122,7 +119,6 @@ private slots:
if (!networkReply->error())
digest(QString::fromUtf8(networkReply->readAll()));
networkReply->deleteLater();
- networkReply->manager()->deleteLater();
}
void animate(int frame) {
@@ -185,10 +181,7 @@ private:
url.addEncodedQueryItem("hl", "en");
url.addEncodedQueryItem("weather", QUrl::toPercentEncoding(location));
- QNetworkAccessManager *manager = new QNetworkAccessManager(this);
- connect(manager, SIGNAL(finished(QNetworkReply*)),
- this, SLOT(handleNetworkData(QNetworkReply*)));
- manager->get(QNetworkRequest(url));
+ m_manager.get(QNetworkRequest(url));
city = QString();
setWindowTitle("Loading...");
diff --git a/demos/multimedia/multimedia.pro b/demos/multimedia/multimedia.pro
deleted file mode 100644
index fa29a12..0000000
--- a/demos/multimedia/multimedia.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-TEMPLATE = subdirs
-contains(QT_CONFIG, mediaservices): SUBDIRS = player
-
diff --git a/demos/multimedia/player/main.cpp b/demos/multimedia/player/main.cpp
deleted file mode 100644
index 87c5b87..0000000
--- a/demos/multimedia/player/main.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 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 "player.h"
-
-#include <QtGui>
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- Player player;
- player.show();
-
- return app.exec();
-};
diff --git a/demos/multimedia/player/player.cpp b/demos/multimedia/player/player.cpp
deleted file mode 100644
index bf314ee..0000000
--- a/demos/multimedia/player/player.cpp
+++ /dev/null
@@ -1,372 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 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 "player.h"
-
-#include "playercontrols.h"
-#include "playlistmodel.h"
-#include "videowidget.h"
-
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qmediaplaylist.h>
-
-#include <QtGui>
-
-Player::Player(QWidget *parent)
- : QWidget(parent)
- , videoWidget(0)
- , coverLabel(0)
- , slider(0)
- , colorDialog(0)
-{
- player = new QMediaPlayer(this);
- playlist = new QMediaPlaylist(this);
- playlist->setMediaObject(player);
-
- connect(player, SIGNAL(durationChanged(qint64)), SLOT(durationChanged(qint64)));
- connect(player, SIGNAL(positionChanged(qint64)), SLOT(positionChanged(qint64)));
- connect(player, SIGNAL(metaDataChanged()), SLOT(metaDataChanged()));
- connect(playlist, SIGNAL(currentIndexChanged(int)), SLOT(playlistPositionChanged(int)));
- connect(player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)),
- this, SLOT(statusChanged(QMediaPlayer::MediaStatus)));
- connect(player, SIGNAL(bufferStatusChanged(int)), this, SLOT(bufferingProgress(int)));
-
- videoWidget = new VideoWidget;
- videoWidget->setMediaObject(player);
-
- playlistModel = new PlaylistModel(this);
- playlistModel->setPlaylist(playlist);
-
- playlistView = new QListView;
- playlistView->setModel(playlistModel);
- playlistView->setCurrentIndex(playlistModel->index(playlist->currentIndex(), 0));
-
- connect(playlistView, SIGNAL(activated(QModelIndex)), this, SLOT(jump(QModelIndex)));
-
- playbackModeBox = new QComboBox;
- playbackModeBox->addItem(tr("Linear"),
- QVariant::fromValue<QMediaPlaylist::PlaybackMode>(QMediaPlaylist::Linear));
- playbackModeBox->addItem(tr("Loop"),
- QVariant::fromValue<QMediaPlaylist::PlaybackMode>(QMediaPlaylist::Loop));
- playbackModeBox->addItem(tr("Random"),
- QVariant::fromValue<QMediaPlaylist::PlaybackMode>(QMediaPlaylist::Random));
- playbackModeBox->addItem(tr("Current Item Once"),
- QVariant::fromValue<QMediaPlaylist::PlaybackMode>(QMediaPlaylist::CurrentItemOnce));
- playbackModeBox->addItem(tr("Current Item In Loop"),
- QVariant::fromValue<QMediaPlaylist::PlaybackMode>(QMediaPlaylist::CurrentItemInLoop));
- playbackModeBox->setCurrentIndex(0);
-
- connect(playbackModeBox, SIGNAL(activated(int)), SLOT(updatePlaybackMode()));
- updatePlaybackMode();
-
- slider = new QSlider(Qt::Horizontal);
- slider->setRange(0, player->duration() / 1000);
-
- connect(slider, SIGNAL(sliderMoved(int)), this, SLOT(seek(int)));
-
- QPushButton *openButton = new QPushButton(tr("Open"));
-
- connect(openButton, SIGNAL(clicked()), this, SLOT(open()));
-
- PlayerControls *controls = new PlayerControls;
- controls->setState(player->state());
- controls->setVolume(player->volume());
- controls->setMuted(controls->isMuted());
-
- connect(controls, SIGNAL(play()), player, SLOT(play()));
- connect(controls, SIGNAL(pause()), player, SLOT(pause()));
- connect(controls, SIGNAL(stop()), player, SLOT(stop()));
- connect(controls, SIGNAL(next()), playlist, SLOT(next()));
- connect(controls, SIGNAL(previous()), this, SLOT(previousClicked()));
- connect(controls, SIGNAL(changeVolume(int)), player, SLOT(setVolume(int)));
- connect(controls, SIGNAL(changeMuting(bool)), player, SLOT(setMuted(bool)));
- connect(controls, SIGNAL(changeRate(qreal)), player, SLOT(setPlaybackRate(qreal)));
-
- connect(player, SIGNAL(stateChanged(QMediaPlayer::State)),
- controls, SLOT(setState(QMediaPlayer::State)));
- connect(player, SIGNAL(volumeChanged(int)), controls, SLOT(setVolume(int)));
- connect(player, SIGNAL(mutedChanged(bool)), controls, SLOT(setMuted(bool)));
-
- QPushButton *fullScreenButton = new QPushButton(tr("FullScreen"));
- fullScreenButton->setCheckable(true);
-
- if (videoWidget != 0) {
- connect(fullScreenButton, SIGNAL(clicked(bool)), videoWidget, SLOT(setFullScreen(bool)));
- connect(videoWidget, SIGNAL(fullScreenChanged(bool)),
- fullScreenButton, SLOT(setChecked(bool)));
- } else {
- fullScreenButton->setEnabled(false);
- }
-
- QPushButton *colorButton = new QPushButton(tr("Color Options..."));
- if (videoWidget)
- connect(colorButton, SIGNAL(clicked()), this, SLOT(showColorDialog()));
- else
- colorButton->setEnabled(false);
-
- QBoxLayout *playlistLayout = new QVBoxLayout;
- playlistLayout->addWidget(playlistView);
- playlistLayout->addWidget(playbackModeBox);
-
- QBoxLayout *displayLayout = new QHBoxLayout;
- if (videoWidget)
- displayLayout->addWidget(videoWidget, 2);
- else
- displayLayout->addWidget(coverLabel, 2);
- displayLayout->addLayout(playlistLayout);
-
- QBoxLayout *controlLayout = new QHBoxLayout;
- controlLayout->setMargin(0);
- controlLayout->addWidget(openButton);
- controlLayout->addStretch(1);
- controlLayout->addWidget(controls);
- controlLayout->addStretch(1);
- controlLayout->addWidget(fullScreenButton);
- controlLayout->addWidget(colorButton);
-
- QBoxLayout *layout = new QVBoxLayout;
- layout->addLayout(displayLayout);
- layout->addWidget(slider);
- layout->addLayout(controlLayout);
-
- setLayout(layout);
-
- metaDataChanged();
-
- QStringList arguments = qApp->arguments();
- arguments.removeAt(0);
- foreach (QString const &argument, arguments) {
- QFileInfo fileInfo(argument);
- if (fileInfo.exists()) {
- QUrl url = QUrl::fromLocalFile(fileInfo.absoluteFilePath());
- if (fileInfo.suffix().toLower() == QLatin1String("m3u")) {
- playlist->load(url);
- } else
- playlist->addMedia(url);
- } else {
- QUrl url(argument);
- if (url.isValid()) {
- playlist->addMedia(url);
- }
- }
- }
-}
-
-Player::~Player()
-{
- delete playlist;
- delete player;
-}
-
-void Player::open()
-{
- QStringList fileNames = QFileDialog::getOpenFileNames();
- foreach (QString const &fileName, fileNames)
- playlist->addMedia(QUrl::fromLocalFile(fileName));
-}
-
-void Player::durationChanged(qint64 duration)
-{
- slider->setMaximum(duration / 1000);
-}
-
-void Player::positionChanged(qint64 progress)
-{
- slider->setValue(progress / 1000);
-}
-
-void Player::metaDataChanged()
-{
- //qDebug() << "update metadata" << player->metaData(QtMediaServices::Title).toString();
- if (player->isMetaDataAvailable()) {
- setTrackInfo(QString("%1 - %2")
- .arg(player->metaData(QtMediaServices::AlbumArtist).toString())
- .arg(player->metaData(QtMediaServices::Title).toString()));
-
- if (coverLabel) {
- QUrl url = player->metaData(QtMediaServices::CoverArtUrlLarge).value<QUrl>();
-
- coverLabel->setPixmap(!url.isEmpty()
- ? QPixmap(url.toString())
- : QPixmap());
- }
- }
-}
-
-void Player::previousClicked()
-{
- // Go to previous track if we are within the first 5 seconds of playback
- // Otherwise, seek to the beginning.
- if(player->position() <= 5000)
- playlist->previous();
- else
- player->setPosition(0);
-}
-
-void Player::jump(const QModelIndex &index)
-{
- if (index.isValid()) {
- playlist->setCurrentIndex(index.row());
- player->play();
- }
-}
-
-void Player::playlistPositionChanged(int currentItem)
-{
- playlistView->setCurrentIndex(playlistModel->index(currentItem, 0));
-}
-
-void Player::seek(int seconds)
-{
- player->setPosition(seconds * 1000);
-}
-
-void Player::statusChanged(QMediaPlayer::MediaStatus status)
-{
- switch (status) {
- case QMediaPlayer::UnknownMediaStatus:
- case QMediaPlayer::NoMedia:
- case QMediaPlayer::LoadedMedia:
- case QMediaPlayer::BufferingMedia:
- case QMediaPlayer::BufferedMedia:
-#ifndef QT_NO_CURSOR
- unsetCursor();
-#endif
- setStatusInfo(QString());
- break;
- case QMediaPlayer::LoadingMedia:
-#ifndef QT_NO_CURSOR
- setCursor(QCursor(Qt::BusyCursor));
-#endif
- setStatusInfo(tr("Loading..."));
- break;
- case QMediaPlayer::StalledMedia:
-#ifndef QT_NO_CURSOR
- setCursor(QCursor(Qt::BusyCursor));
-#endif
- break;
- case QMediaPlayer::EndOfMedia:
-#ifndef QT_NO_CURSOR
- unsetCursor();
-#endif
- setStatusInfo(QString());
- QApplication::alert(this);
- break;
- case QMediaPlayer::InvalidMedia:
-#ifndef QT_NO_CURSOR
- unsetCursor();
-#endif
- setStatusInfo(player->errorString());
- break;
- }
-}
-
-void Player::bufferingProgress(int progress)
-{
- setStatusInfo(tr("Buffering %4%%").arg(progress));
-}
-
-void Player::setTrackInfo(const QString &info)
-{
- trackInfo = info;
-
- if (!statusInfo.isEmpty())
- setWindowTitle(QString("%1 | %2").arg(trackInfo).arg(statusInfo));
- else
- setWindowTitle(trackInfo);
-
-}
-
-void Player::setStatusInfo(const QString &info)
-{
- statusInfo = info;
-
- if (!statusInfo.isEmpty())
- setWindowTitle(QString("%1 | %2").arg(trackInfo).arg(statusInfo));
- else
- setWindowTitle(trackInfo);
-}
-
-void Player::showColorDialog()
-{
- if (!colorDialog) {
- QSlider *brightnessSlider = new QSlider(Qt::Horizontal);
- brightnessSlider->setRange(-100, 100);
- brightnessSlider->setValue(videoWidget->brightness());
- connect(brightnessSlider, SIGNAL(sliderMoved(int)), videoWidget, SLOT(setBrightness(int)));
- connect(videoWidget, SIGNAL(brightnessChanged(int)), brightnessSlider, SLOT(setValue(int)));
-
- QSlider *contrastSlider = new QSlider(Qt::Horizontal);
- contrastSlider->setRange(-100, 100);
- contrastSlider->setValue(videoWidget->contrast());
- connect(contrastSlider, SIGNAL(sliderMoved(int)), videoWidget, SLOT(setContrast(int)));
- connect(videoWidget, SIGNAL(contrastChanged(int)), contrastSlider, SLOT(setValue(int)));
-
- QSlider *hueSlider = new QSlider(Qt::Horizontal);
- hueSlider->setRange(-100, 100);
- hueSlider->setValue(videoWidget->hue());
- connect(hueSlider, SIGNAL(sliderMoved(int)), videoWidget, SLOT(setHue(int)));
- connect(videoWidget, SIGNAL(hueChanged(int)), hueSlider, SLOT(setValue(int)));
-
- QSlider *saturationSlider = new QSlider(Qt::Horizontal);
- saturationSlider->setRange(-100, 100);
- saturationSlider->setValue(videoWidget->saturation());
- connect(saturationSlider, SIGNAL(sliderMoved(int)), videoWidget, SLOT(setSaturation(int)));
- connect(videoWidget, SIGNAL(saturationChanged(int)), saturationSlider, SLOT(setValue(int)));
-
- QFormLayout *layout = new QFormLayout;
- layout->addRow(tr("Brightness"), brightnessSlider);
- layout->addRow(tr("Contrast"), contrastSlider);
- layout->addRow(tr("Hue"), hueSlider);
- layout->addRow(tr("Saturation"), saturationSlider);
-
- colorDialog = new QDialog(this);
- colorDialog->setWindowTitle(tr("Color Options"));
- colorDialog->setLayout(layout);
- }
- colorDialog->show();
-}
-
-void Player::updatePlaybackMode()
-{
- playlist->setPlaybackMode(
- playbackModeBox->itemData(playbackModeBox->currentIndex()).value<QMediaPlaylist::PlaybackMode>());
-}
diff --git a/demos/multimedia/player/player.h b/demos/multimedia/player/player.h
deleted file mode 100644
index cda3eb9..0000000
--- a/demos/multimedia/player/player.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 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 PLAYER_H
-#define PLAYER_H
-
-#include <QtGui/QWidget>
-
-#include <qmediaplayer.h>
-#include <qmediaplaylist.h>
-#include <qvideowidget.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QAbstractItemView;
-class QLabel;
-class QModelIndex;
-class QSlider;
-class QComboBox;
-class QMediaPlayer;
-class QVideoWidget;
-class PlaylistModel;
-
-class Player : public QWidget
-{
- Q_OBJECT
-public:
- Player(QWidget *parent = 0);
- ~Player();
-
-Q_SIGNALS:
- void fullScreenChanged(bool fullScreen);
-
-private slots:
- void open();
- void durationChanged(qint64 duration);
- void positionChanged(qint64 progress);
- void metaDataChanged();
-
- void previousClicked();
-
- void seek(int seconds);
- void jump(const QModelIndex &index);
- void playlistPositionChanged(int);
-
- void statusChanged(QMediaPlayer::MediaStatus status);
- void bufferingProgress(int progress);
-
- void showColorDialog();
- void updatePlaybackMode();
-
-private:
- void setTrackInfo(const QString &info);
- void setStatusInfo(const QString &info);
-
- QMediaPlayer *player;
- QMediaPlaylist *playlist;
- QVideoWidget *videoWidget;
- QLabel *coverLabel;
- QSlider *slider;
- QComboBox *playbackModeBox;
- PlaylistModel *playlistModel;
- QAbstractItemView *playlistView;
- QDialog *colorDialog;
- QString trackInfo;
- QString statusInfo;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/demos/multimedia/player/player.pro b/demos/multimedia/player/player.pro
deleted file mode 100644
index 12bdf64..0000000
--- a/demos/multimedia/player/player.pro
+++ /dev/null
@@ -1,29 +0,0 @@
-TEMPLATE = app
-TARGET = player
-
-QT += gui mediaservices
-
-HEADERS = \
- player.h \
- playercontrols.h \
- playlistmodel.h \
- videowidget.h
-
-SOURCES = \
- main.cpp \
- player.cpp \
- playercontrols.cpp \
- playlistmodel.cpp \
- videowidget.cpp
-
-target.path = $$[QT_INSTALL_DEMOS]/multimedia/player
-sources.files = $$SOURCES $$HEADERS *.pro
-sources.path = $$[QT_INSTALL_DEMOS]/multimedia/player
-
-INSTALLS += target sources
-
-symbian {
- TARGET.UID3 = 0xA000E3FA
- include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
-}
-
diff --git a/demos/multimedia/player/playercontrols.cpp b/demos/multimedia/player/playercontrols.cpp
deleted file mode 100644
index 3798a71..0000000
--- a/demos/multimedia/player/playercontrols.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 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 "playercontrols.h"
-
-#include <QtGui/qboxlayout.h>
-#include <QtGui/qslider.h>
-#include <QtGui/qstyle.h>
-#include <QtGui/qtoolbutton.h>
-#include <QtGui/qcombobox.h>
-
-PlayerControls::PlayerControls(QWidget *parent)
- : QWidget(parent)
- , playerState(QMediaPlayer::StoppedState)
- , playerMuted(false)
- , playButton(0)
- , stopButton(0)
- , nextButton(0)
- , previousButton(0)
- , muteButton(0)
- , volumeSlider(0)
- , rateBox(0)
-{
- playButton = new QToolButton;
- playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
-
- connect(playButton, SIGNAL(clicked()), this, SLOT(playClicked()));
-
- stopButton = new QToolButton;
- stopButton->setIcon(style()->standardIcon(QStyle::SP_MediaStop));
- stopButton->setEnabled(false);
-
- connect(stopButton, SIGNAL(clicked()), this, SIGNAL(stop()));
-
- nextButton = new QToolButton;
- nextButton->setIcon(style()->standardIcon(QStyle::SP_MediaSkipForward));
-
- connect(nextButton, SIGNAL(clicked()), this, SIGNAL(next()));
-
- previousButton = new QToolButton;
- previousButton->setIcon(style()->standardIcon(QStyle::SP_MediaSkipBackward));
-
- connect(previousButton, SIGNAL(clicked()), this, SIGNAL(previous()));
-
- muteButton = new QToolButton;
- muteButton->setIcon(style()->standardIcon(QStyle::SP_MediaVolume));
-
- connect(muteButton, SIGNAL(clicked()), this, SLOT(muteClicked()));
-
- volumeSlider = new QSlider(Qt::Horizontal);
- volumeSlider->setRange(0, 100);
-
- connect(volumeSlider, SIGNAL(sliderMoved(int)), this, SIGNAL(changeVolume(int)));
-
- rateBox = new QComboBox;
- rateBox->addItem("0.5x", QVariant(0.5));
- rateBox->addItem("1.0x", QVariant(1.0));
- rateBox->addItem("2.0x", QVariant(2.0));
- rateBox->setCurrentIndex(1);
-
- connect(rateBox, SIGNAL(activated(int)), SLOT(updateRate()));
-
- QBoxLayout *layout = new QHBoxLayout;
- layout->setMargin(0);
- layout->addWidget(stopButton);
- layout->addWidget(previousButton);
- layout->addWidget(playButton);
- layout->addWidget(nextButton);
- layout->addWidget(muteButton);
- layout->addWidget(volumeSlider);
- layout->addWidget(rateBox);
- setLayout(layout);
-}
-
-QMediaPlayer::State PlayerControls::state() const
-{
- return playerState;
-}
-
-void PlayerControls::setState(QMediaPlayer::State state)
-{
- if (state != playerState) {
- playerState = state;
-
- switch (state) {
- case QMediaPlayer::StoppedState:
- stopButton->setEnabled(false);
- playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
- break;
- case QMediaPlayer::PlayingState:
- stopButton->setEnabled(true);
- playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPause));
- break;
- case QMediaPlayer::PausedState:
- stopButton->setEnabled(true);
- playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
- break;
- }
- }
-}
-
-int PlayerControls::volume() const
-{
- return volumeSlider->value();
-}
-
-void PlayerControls::setVolume(int volume)
-{
- volumeSlider->setValue(volume);
-}
-
-bool PlayerControls::isMuted() const
-{
- return playerMuted;
-}
-
-void PlayerControls::setMuted(bool muted)
-{
- if (muted != playerMuted) {
- playerMuted = muted;
-
- muteButton->setIcon(style()->standardIcon(muted
- ? QStyle::SP_MediaVolumeMuted
- : QStyle::SP_MediaVolume));
- }
-}
-
-void PlayerControls::playClicked()
-{
- switch (playerState) {
- case QMediaPlayer::StoppedState:
- case QMediaPlayer::PausedState:
- emit play();
- break;
- case QMediaPlayer::PlayingState:
- emit pause();
- break;
- }
-}
-
-void PlayerControls::muteClicked()
-{
- emit changeMuting(!playerMuted);
-}
-
-qreal PlayerControls::playbackRate() const
-{
- return rateBox->itemData(rateBox->currentIndex()).toDouble();
-}
-
-void PlayerControls::setPlaybackRate(float rate)
-{
- for (int i=0; i<rateBox->count(); i++) {
- if (qFuzzyCompare(rate, float(rateBox->itemData(i).toDouble()))) {
- rateBox->setCurrentIndex(i);
- return;
- }
- }
-
- rateBox->addItem( QString("%1x").arg(rate), QVariant(rate));
- rateBox->setCurrentIndex(rateBox->count()-1);
-}
-
-void PlayerControls::updateRate()
-{
- emit changeRate(playbackRate());
-}
diff --git a/demos/multimedia/player/playercontrols.h b/demos/multimedia/player/playercontrols.h
deleted file mode 100644
index d2229bd..0000000
--- a/demos/multimedia/player/playercontrols.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 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 PLAYERCONTROLS_H
-#define PLAYERCONTROLS_H
-
-#include <QtMediaServices/qmediaplayer.h>
-
-#include <QtGui/qwidget.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QAbstractButton;
-class QAbstractSlider;
-class QComboBox;
-
-class PlayerControls : public QWidget
-{
- Q_OBJECT
-public:
- PlayerControls(QWidget *parent = 0);
-
- QMediaPlayer::State state() const;
-
- int volume() const;
- bool isMuted() const;
- qreal playbackRate() const;
-
-public slots:
- void setState(QMediaPlayer::State state);
- void setVolume(int volume);
- void setMuted(bool muted);
- void setPlaybackRate(float rate);
-
-signals:
- void play();
- void pause();
- void stop();
- void next();
- void previous();
- void changeVolume(int volume);
- void changeMuting(bool muting);
- void changeRate(qreal rate);
-
-private slots:
- void playClicked();
- void muteClicked();
- void updateRate();
-
-private:
- QMediaPlayer::State playerState;
- bool playerMuted;
- QAbstractButton *playButton;
- QAbstractButton *stopButton;
- QAbstractButton *nextButton;
- QAbstractButton *previousButton;
- QAbstractButton *muteButton;
- QAbstractSlider *volumeSlider;
- QComboBox *rateBox;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/demos/multimedia/player/playlistmodel.cpp b/demos/multimedia/player/playlistmodel.cpp
deleted file mode 100644
index b60f914..0000000
--- a/demos/multimedia/player/playlistmodel.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 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 "playlistmodel.h"
-
-#include <QtCore/qfileinfo.h>
-#include <QtCore/qurl.h>
-
-#include <qmediaplaylist.h>
-
-PlaylistModel::PlaylistModel(QObject *parent)
- : QAbstractItemModel(parent)
- , m_playlist(0)
-{
-}
-
-int PlaylistModel::rowCount(const QModelIndex &parent) const
-{
- return m_playlist && !parent.isValid() ? m_playlist->mediaCount() : 0;
-}
-
-int PlaylistModel::columnCount(const QModelIndex &parent) const
-{
- return !parent.isValid() ? ColumnCount : 0;
-}
-
-QModelIndex PlaylistModel::index(int row, int column, const QModelIndex &parent) const
-{
- return m_playlist && !parent.isValid()
- && row >= 0 && row < m_playlist->mediaCount()
- && column >= 0 && column < ColumnCount
- ? createIndex(row, column)
- : QModelIndex();
-}
-
-QModelIndex PlaylistModel::parent(const QModelIndex &child) const
-{
- Q_UNUSED(child);
-
- return QModelIndex();
-}
-
-QVariant PlaylistModel::data(const QModelIndex &index, int role) const
-{
- if (index.isValid() && role == Qt::DisplayRole) {
- QVariant value = m_data[index];
- if (!value.isValid() && index.column() == Title) {
- QUrl location = m_playlist->media(index.row()).canonicalUrl();
- return QFileInfo(location.path()).fileName();
- }
-
- return value;
- }
- return QVariant();
-}
-
-QMediaPlaylist *PlaylistModel::playlist() const
-{
- return m_playlist;
-}
-
-void PlaylistModel::setPlaylist(QMediaPlaylist *playlist)
-{
- if (m_playlist) {
- disconnect(m_playlist, SIGNAL(mediaAboutToBeInserted(int,int)), this, SLOT(beginInsertItems(int,int)));
- disconnect(m_playlist, SIGNAL(mediaInserted(int,int)), this, SLOT(endInsertItems()));
- disconnect(m_playlist, SIGNAL(mediaAboutToBeRemoved(int,int)), this, SLOT(beginRemoveItems(int,int)));
- disconnect(m_playlist, SIGNAL(mediaRemoved(int,int)), this, SLOT(endRemoveItems()));
- disconnect(m_playlist, SIGNAL(mediaChanged(int,int)), this, SLOT(changeItems(int,int)));
- }
-
- m_playlist = playlist;
-
- if (m_playlist) {
- connect(m_playlist, SIGNAL(mediaAboutToBeInserted(int,int)), this, SLOT(beginInsertItems(int,int)));
- connect(m_playlist, SIGNAL(mediaInserted(int,int)), this, SLOT(endInsertItems()));
- connect(m_playlist, SIGNAL(mediaAboutToBeRemoved(int,int)), this, SLOT(beginRemoveItems(int,int)));
- connect(m_playlist, SIGNAL(mediaRemoved(int,int)), this, SLOT(endRemoveItems()));
- connect(m_playlist, SIGNAL(mediaChanged(int,int)), this, SLOT(changeItems(int,int)));
- }
-
-
- reset();
-}
-
-bool PlaylistModel::setData(const QModelIndex &index, const QVariant &value, int role)
-{
- Q_UNUSED(role);
- m_data[index] = value;
- emit dataChanged(index, index);
- return true;
-}
-
-void PlaylistModel::beginInsertItems(int start, int end)
-{
- m_data.clear();
- beginInsertRows(QModelIndex(), start, end);
-}
-
-void PlaylistModel::endInsertItems()
-{
- endInsertRows();
-}
-
-void PlaylistModel::beginRemoveItems(int start, int end)
-{
- m_data.clear();
- beginRemoveRows(QModelIndex(), start, end);
-}
-
-void PlaylistModel::endRemoveItems()
-{
- endInsertRows();
-}
-
-void PlaylistModel::changeItems(int start, int end)
-{
- m_data.clear();
- emit dataChanged(index(start,0), index(end,ColumnCount));
-}
-
-
diff --git a/demos/multimedia/player/playlistmodel.h b/demos/multimedia/player/playlistmodel.h
deleted file mode 100644
index 0180282..0000000
--- a/demos/multimedia/player/playlistmodel.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 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 PLAYLISTMODEL_H
-#define PLAYLISTMODEL_H
-
-#include <QtCore/qabstractitemmodel.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QMediaPlaylist;
-
-class PlaylistModel : public QAbstractItemModel
-{
- Q_OBJECT
-public:
- enum Column
- {
- Title = 0,
- ColumnCount
- };
-
- PlaylistModel(QObject *parent = 0);
-
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
- int columnCount(const QModelIndex &parent = QModelIndex()) const;
-
- QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
- QModelIndex parent(const QModelIndex &child) const;
-
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
-
- QMediaPlaylist *playlist() const;
- void setPlaylist(QMediaPlaylist *playlist);
-
- bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::DisplayRole);
-
-private slots:
- void beginInsertItems(int start, int end);
- void endInsertItems();
- void beginRemoveItems(int start, int end);
- void endRemoveItems();
- void changeItems(int start, int end);
-
-private:
- QMediaPlaylist *m_playlist;
- QMap<QModelIndex, QVariant> m_data;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/demos/multimedia/player/videowidget.cpp b/demos/multimedia/player/videowidget.cpp
deleted file mode 100644
index be864ec..0000000
--- a/demos/multimedia/player/videowidget.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 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 "videowidget.h"
-
-#include <QtGui>
-
-VideoWidget::VideoWidget(QWidget *parent)
- : QVideoWidget(parent)
-{
- setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
-
- QPalette p = palette();
- p.setColor(QPalette::Window, Qt::black);
- setPalette(p);
-
- setAttribute(Qt::WA_OpaquePaintEvent);
-}
-
-void VideoWidget::keyPressEvent(QKeyEvent *event)
-{
- if (event->key() == Qt::Key_Escape && isFullScreen()) {
- showNormal();
-
- event->accept();
- } else if (event->key() == Qt::Key_Enter && event->modifiers() & Qt::Key_Alt) {
- setFullScreen(!isFullScreen());
-
- event->accept();
- } else {
- QVideoWidget::keyPressEvent(event);
- }
-}
-
-void VideoWidget::mouseDoubleClickEvent(QMouseEvent *event)
-{
- setFullScreen(!isFullScreen());
-
- event->accept();
-}
diff --git a/demos/multimedia/player/videowidget.h b/demos/multimedia/player/videowidget.h
deleted file mode 100644
index b5bf581..0000000
--- a/demos/multimedia/player/videowidget.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 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 VIDEOWIDGET_H
-#define VIDEOWIDGET_H
-
-#include <QtMediaServices/qvideowidget.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class VideoWidget : public QVideoWidget
-{
- Q_OBJECT
-public:
- VideoWidget(QWidget *parent = 0);
-
-protected:
- void keyPressEvent(QKeyEvent *event);
- void mouseDoubleClickEvent(QMouseEvent *event);
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/demos/qtdemo/xml/examples.xml b/demos/qtdemo/xml/examples.xml
index e3240ab..9121861 100644
--- a/demos/qtdemo/xml/examples.xml
+++ b/demos/qtdemo/xml/examples.xml
@@ -19,6 +19,7 @@
<example filename="qmediaplayer" name="Media Player" />
<example filename="boxes" name="Boxes" />
<example filename="sub-attaq" name="Sub-attaq" />
+ <example filename="spectrum" name="Spectrum Analyzer" />
</demos>
<category dirname="animation" name="Animation Framework">
<example filename="animatedtiles" name="Animated Tiles" />
diff --git a/demos/spectrum/3rdparty/fftreal/Array.h b/demos/spectrum/3rdparty/fftreal/Array.h
new file mode 100644
index 0000000..a08e3cf
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/Array.h
@@ -0,0 +1,97 @@
+/*****************************************************************************
+
+ Array.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (Array_HEADER_INCLUDED)
+#define Array_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class T, long LEN>
+class Array
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ typedef T DataType;
+
+ Array ();
+
+ inline const DataType &
+ operator [] (long pos) const;
+ inline DataType &
+ operator [] (long pos);
+
+ static inline long
+ size ();
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ DataType _data_arr [LEN];
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ Array (const Array &other);
+ Array & operator = (const Array &other);
+ bool operator == (const Array &other);
+ bool operator != (const Array &other);
+
+}; // class Array
+
+
+
+#include "Array.hpp"
+
+
+
+#endif // Array_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/Array.hpp b/demos/spectrum/3rdparty/fftreal/Array.hpp
new file mode 100644
index 0000000..8300077
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/Array.hpp
@@ -0,0 +1,98 @@
+/*****************************************************************************
+
+ Array.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (Array_CURRENT_CODEHEADER)
+ #error Recursive inclusion of Array code header.
+#endif
+#define Array_CURRENT_CODEHEADER
+
+#if ! defined (Array_CODEHEADER_INCLUDED)
+#define Array_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include <cassert>
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class T, long LEN>
+Array <T, LEN>::Array ()
+{
+ // Nothing
+}
+
+
+
+template <class T, long LEN>
+const typename Array <T, LEN>::DataType & Array <T, LEN>::operator [] (long pos) const
+{
+ assert (pos >= 0);
+ assert (pos < LEN);
+
+ return (_data_arr [pos]);
+}
+
+
+
+template <class T, long LEN>
+typename Array <T, LEN>::DataType & Array <T, LEN>::operator [] (long pos)
+{
+ assert (pos >= 0);
+ assert (pos < LEN);
+
+ return (_data_arr [pos]);
+}
+
+
+
+template <class T, long LEN>
+long Array <T, LEN>::size ()
+{
+ return (LEN);
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+#endif // Array_CODEHEADER_INCLUDED
+
+#undef Array_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/DynArray.h b/demos/spectrum/3rdparty/fftreal/DynArray.h
new file mode 100644
index 0000000..8041a0c
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/DynArray.h
@@ -0,0 +1,100 @@
+/*****************************************************************************
+
+ DynArray.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (DynArray_HEADER_INCLUDED)
+#define DynArray_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class T>
+class DynArray
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ typedef T DataType;
+
+ DynArray ();
+ explicit DynArray (long size);
+ ~DynArray ();
+
+ inline long size () const;
+ inline void resize (long size);
+
+ inline const DataType &
+ operator [] (long pos) const;
+ inline DataType &
+ operator [] (long pos);
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ DataType * _data_ptr;
+ long _len;
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ DynArray (const DynArray &other);
+ DynArray & operator = (const DynArray &other);
+ bool operator == (const DynArray &other);
+ bool operator != (const DynArray &other);
+
+}; // class DynArray
+
+
+
+#include "DynArray.hpp"
+
+
+
+#endif // DynArray_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/DynArray.hpp b/demos/spectrum/3rdparty/fftreal/DynArray.hpp
new file mode 100644
index 0000000..e62b10f
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/DynArray.hpp
@@ -0,0 +1,143 @@
+/*****************************************************************************
+
+ DynArray.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (DynArray_CURRENT_CODEHEADER)
+ #error Recursive inclusion of DynArray code header.
+#endif
+#define DynArray_CURRENT_CODEHEADER
+
+#if ! defined (DynArray_CODEHEADER_INCLUDED)
+#define DynArray_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include <cassert>
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class T>
+DynArray <T>::DynArray ()
+: _data_ptr (0)
+, _len (0)
+{
+ // Nothing
+}
+
+
+
+template <class T>
+DynArray <T>::DynArray (long size)
+: _data_ptr (0)
+, _len (0)
+{
+ assert (size >= 0);
+ if (size > 0)
+ {
+ _data_ptr = new DataType [size];
+ _len = size;
+ }
+}
+
+
+
+template <class T>
+DynArray <T>::~DynArray ()
+{
+ delete [] _data_ptr;
+ _data_ptr = 0;
+ _len = 0;
+}
+
+
+
+template <class T>
+long DynArray <T>::size () const
+{
+ return (_len);
+}
+
+
+
+template <class T>
+void DynArray <T>::resize (long size)
+{
+ assert (size >= 0);
+ if (size > 0)
+ {
+ DataType * old_data_ptr = _data_ptr;
+ DataType * tmp_data_ptr = new DataType [size];
+
+ _data_ptr = tmp_data_ptr;
+ _len = size;
+
+ delete [] old_data_ptr;
+ }
+}
+
+
+
+template <class T>
+const typename DynArray <T>::DataType & DynArray <T>::operator [] (long pos) const
+{
+ assert (pos >= 0);
+ assert (pos < _len);
+
+ return (_data_ptr [pos]);
+}
+
+
+
+template <class T>
+typename DynArray <T>::DataType & DynArray <T>::operator [] (long pos)
+{
+ assert (pos >= 0);
+ assert (pos < _len);
+
+ return (_data_ptr [pos]);
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+#endif // DynArray_CODEHEADER_INCLUDED
+
+#undef DynArray_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/FFTReal.dsp b/demos/spectrum/3rdparty/fftreal/FFTReal.dsp
new file mode 100644
index 0000000..fe970db
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTReal.dsp
@@ -0,0 +1,273 @@
+# Microsoft Developer Studio Project File - Name="FFTReal" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=FFTReal - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "FFTReal.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "FFTReal.mak" CFG="FFTReal - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "FFTReal - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "FFTReal - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "FFTReal - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GR /GX /O2 /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "NDEBUG"
+# ADD RSC /l 0x40c /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "FFTReal - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /GR /GX /Zi /Od /Gf /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
+# ADD BASE RSC /l 0x40c /d "_DEBUG"
+# ADD RSC /l 0x40c /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "FFTReal - Win32 Release"
+# Name "FFTReal - Win32 Debug"
+# Begin Group "Library"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\Array.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Array.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\def.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\DynArray.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\DynArray.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\FFTReal.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\FFTReal.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\FFTRealFixLen.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\FFTRealFixLen.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\FFTRealFixLenParam.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\FFTRealPassDirect.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\FFTRealPassDirect.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\FFTRealPassInverse.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\FFTRealPassInverse.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\FFTRealSelect.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\FFTRealSelect.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\FFTRealUseTrigo.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\FFTRealUseTrigo.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\OscSinCos.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\OscSinCos.hpp
+# End Source File
+# End Group
+# Begin Group "Test"
+
+# PROP Default_Filter ""
+# Begin Group "stopwatch"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\stopwatch\ClockCycleCounter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\stopwatch\ClockCycleCounter.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\stopwatch\ClockCycleCounter.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\stopwatch\def.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\stopwatch\fnc.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\stopwatch\fnc.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\stopwatch\Int64.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\stopwatch\StopWatch.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\stopwatch\StopWatch.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\stopwatch\StopWatch.hpp
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\test.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\test_fnc.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\test_fnc.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\test_settings.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestAccuracy.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestAccuracy.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestHelperFixLen.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestHelperFixLen.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestHelperNormal.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestHelperNormal.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestSpeed.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestSpeed.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestWhiteNoiseGen.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestWhiteNoiseGen.hpp
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/demos/spectrum/3rdparty/fftreal/FFTReal.dsw b/demos/spectrum/3rdparty/fftreal/FFTReal.dsw
new file mode 100644
index 0000000..076b0ae
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTReal.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "FFTReal"=.\FFTReal.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/demos/spectrum/3rdparty/fftreal/FFTReal.h b/demos/spectrum/3rdparty/fftreal/FFTReal.h
new file mode 100644
index 0000000..9fb2725
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTReal.h
@@ -0,0 +1,142 @@
+/*****************************************************************************
+
+ FFTReal.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (FFTReal_HEADER_INCLUDED)
+#define FFTReal_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "def.h"
+#include "DynArray.h"
+#include "OscSinCos.h"
+
+
+
+template <class DT>
+class FFTReal
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ enum { MAX_BIT_DEPTH = 30 }; // So length can be represented as long int
+
+ typedef DT DataType;
+
+ explicit FFTReal (long length);
+ virtual ~FFTReal () {}
+
+ long get_length () const;
+ void do_fft (DataType f [], const DataType x []) const;
+ void do_ifft (const DataType f [], DataType x []) const;
+ void rescale (DataType x []) const;
+ DataType * use_buffer () const;
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ // Over this bit depth, we use direct calculation for sin/cos
+ enum { TRIGO_BD_LIMIT = 12 };
+
+ typedef OscSinCos <DataType> OscType;
+
+ void init_br_lut ();
+ void init_trigo_lut ();
+ void init_trigo_osc ();
+
+ FORCEINLINE const long *
+ get_br_ptr () const;
+ FORCEINLINE const DataType *
+ get_trigo_ptr (int level) const;
+ FORCEINLINE long
+ get_trigo_level_index (int level) const;
+
+ inline void compute_fft_general (DataType f [], const DataType x []) const;
+ inline void compute_direct_pass_1_2 (DataType df [], const DataType x []) const;
+ inline void compute_direct_pass_3 (DataType df [], const DataType sf []) const;
+ inline void compute_direct_pass_n (DataType df [], const DataType sf [], int pass) const;
+ inline void compute_direct_pass_n_lut (DataType df [], const DataType sf [], int pass) const;
+ inline void compute_direct_pass_n_osc (DataType df [], const DataType sf [], int pass) const;
+
+ inline void compute_ifft_general (const DataType f [], DataType x []) const;
+ inline void compute_inverse_pass_n (DataType df [], const DataType sf [], int pass) const;
+ inline void compute_inverse_pass_n_osc (DataType df [], const DataType sf [], int pass) const;
+ inline void compute_inverse_pass_n_lut (DataType df [], const DataType sf [], int pass) const;
+ inline void compute_inverse_pass_3 (DataType df [], const DataType sf []) const;
+ inline void compute_inverse_pass_1_2 (DataType x [], const DataType sf []) const;
+
+ const long _length;
+ const int _nbr_bits;
+ DynArray <long>
+ _br_lut;
+ DynArray <DataType>
+ _trigo_lut;
+ mutable DynArray <DataType>
+ _buffer;
+ mutable DynArray <OscType>
+ _trigo_osc;
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ FFTReal ();
+ FFTReal (const FFTReal &other);
+ FFTReal & operator = (const FFTReal &other);
+ bool operator == (const FFTReal &other);
+ bool operator != (const FFTReal &other);
+
+}; // class FFTReal
+
+
+
+#include "FFTReal.hpp"
+
+
+
+#endif // FFTReal_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/FFTReal.hpp b/demos/spectrum/3rdparty/fftreal/FFTReal.hpp
new file mode 100644
index 0000000..335d771
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTReal.hpp
@@ -0,0 +1,916 @@
+/*****************************************************************************
+
+ FFTReal.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (FFTReal_CURRENT_CODEHEADER)
+ #error Recursive inclusion of FFTReal code header.
+#endif
+#define FFTReal_CURRENT_CODEHEADER
+
+#if ! defined (FFTReal_CODEHEADER_INCLUDED)
+#define FFTReal_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include <cassert>
+#include <cmath>
+
+
+
+static inline bool FFTReal_is_pow2 (long x)
+{
+ assert (x > 0);
+
+ return ((x & -x) == x);
+}
+
+
+
+static inline int FFTReal_get_next_pow2 (long x)
+{
+ --x;
+
+ int p = 0;
+ while ((x & ~0xFFFFL) != 0)
+ {
+ p += 16;
+ x >>= 16;
+ }
+ while ((x & ~0xFL) != 0)
+ {
+ p += 4;
+ x >>= 4;
+ }
+ while (x > 0)
+ {
+ ++p;
+ x >>= 1;
+ }
+
+ return (p);
+}
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*
+==============================================================================
+Name: ctor
+Input parameters:
+ - length: length of the array on which we want to do a FFT. Range: power of
+ 2 only, > 0.
+Throws: std::bad_alloc
+==============================================================================
+*/
+
+template <class DT>
+FFTReal <DT>::FFTReal (long length)
+: _length (length)
+, _nbr_bits (FFTReal_get_next_pow2 (length))
+, _br_lut ()
+, _trigo_lut ()
+, _buffer (length)
+, _trigo_osc ()
+{
+ assert (FFTReal_is_pow2 (length));
+ assert (_nbr_bits <= MAX_BIT_DEPTH);
+
+ init_br_lut ();
+ init_trigo_lut ();
+ init_trigo_osc ();
+}
+
+
+
+/*
+==============================================================================
+Name: get_length
+Description:
+ Returns the number of points processed by this FFT object.
+Returns: The number of points, power of 2, > 0.
+Throws: Nothing
+==============================================================================
+*/
+
+template <class DT>
+long FFTReal <DT>::get_length () const
+{
+ return (_length);
+}
+
+
+
+/*
+==============================================================================
+Name: do_fft
+Description:
+ Compute the FFT of the array.
+Input parameters:
+ - x: pointer on the source array (time).
+Output parameters:
+ - f: pointer on the destination array (frequencies).
+ f [0...length(x)/2] = real values,
+ f [length(x)/2+1...length(x)-1] = negative imaginary values of
+ coefficents 1...length(x)/2-1.
+Throws: Nothing
+==============================================================================
+*/
+
+template <class DT>
+void FFTReal <DT>::do_fft (DataType f [], const DataType x []) const
+{
+ assert (f != 0);
+ assert (f != use_buffer ());
+ assert (x != 0);
+ assert (x != use_buffer ());
+ assert (x != f);
+
+ // General case
+ if (_nbr_bits > 2)
+ {
+ compute_fft_general (f, x);
+ }
+
+ // 4-point FFT
+ else if (_nbr_bits == 2)
+ {
+ f [1] = x [0] - x [2];
+ f [3] = x [1] - x [3];
+
+ const DataType b_0 = x [0] + x [2];
+ const DataType b_2 = x [1] + x [3];
+
+ f [0] = b_0 + b_2;
+ f [2] = b_0 - b_2;
+ }
+
+ // 2-point FFT
+ else if (_nbr_bits == 1)
+ {
+ f [0] = x [0] + x [1];
+ f [1] = x [0] - x [1];
+ }
+
+ // 1-point FFT
+ else
+ {
+ f [0] = x [0];
+ }
+}
+
+
+
+/*
+==============================================================================
+Name: do_ifft
+Description:
+ Compute the inverse FFT of the array. Note that data must be post-scaled:
+ IFFT (FFT (x)) = x * length (x).
+Input parameters:
+ - f: pointer on the source array (frequencies).
+ f [0...length(x)/2] = real values
+ f [length(x)/2+1...length(x)-1] = negative imaginary values of
+ coefficents 1...length(x)/2-1.
+Output parameters:
+ - x: pointer on the destination array (time).
+Throws: Nothing
+==============================================================================
+*/
+
+template <class DT>
+void FFTReal <DT>::do_ifft (const DataType f [], DataType x []) const
+{
+ assert (f != 0);
+ assert (f != use_buffer ());
+ assert (x != 0);
+ assert (x != use_buffer ());
+ assert (x != f);
+
+ // General case
+ if (_nbr_bits > 2)
+ {
+ compute_ifft_general (f, x);
+ }
+
+ // 4-point IFFT
+ else if (_nbr_bits == 2)
+ {
+ const DataType b_0 = f [0] + f [2];
+ const DataType b_2 = f [0] - f [2];
+
+ x [0] = b_0 + f [1] * 2;
+ x [2] = b_0 - f [1] * 2;
+ x [1] = b_2 + f [3] * 2;
+ x [3] = b_2 - f [3] * 2;
+ }
+
+ // 2-point IFFT
+ else if (_nbr_bits == 1)
+ {
+ x [0] = f [0] + f [1];
+ x [1] = f [0] - f [1];
+ }
+
+ // 1-point IFFT
+ else
+ {
+ x [0] = f [0];
+ }
+}
+
+
+
+/*
+==============================================================================
+Name: rescale
+Description:
+ Scale an array by divide each element by its length. This function should
+ be called after FFT + IFFT.
+Input parameters:
+ - x: pointer on array to rescale (time or frequency).
+Throws: Nothing
+==============================================================================
+*/
+
+template <class DT>
+void FFTReal <DT>::rescale (DataType x []) const
+{
+ const DataType mul = DataType (1.0 / _length);
+
+ if (_length < 4)
+ {
+ long i = _length - 1;
+ do
+ {
+ x [i] *= mul;
+ --i;
+ }
+ while (i >= 0);
+ }
+
+ else
+ {
+ assert ((_length & 3) == 0);
+
+ // Could be optimized with SIMD instruction sets (needs alignment check)
+ long i = _length - 4;
+ do
+ {
+ x [i + 0] *= mul;
+ x [i + 1] *= mul;
+ x [i + 2] *= mul;
+ x [i + 3] *= mul;
+ i -= 4;
+ }
+ while (i >= 0);
+ }
+}
+
+
+
+/*
+==============================================================================
+Name: use_buffer
+Description:
+ Access the internal buffer, whose length is the FFT one.
+ Buffer content will be erased at each do_fft() / do_ifft() call!
+ This buffer cannot be used as:
+ - source for FFT or IFFT done with this object
+ - destination for FFT or IFFT done with this object
+Returns:
+ Buffer start address
+Throws: Nothing
+==============================================================================
+*/
+
+template <class DT>
+typename FFTReal <DT>::DataType * FFTReal <DT>::use_buffer () const
+{
+ return (&_buffer [0]);
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class DT>
+void FFTReal <DT>::init_br_lut ()
+{
+ const long length = 1L << _nbr_bits;
+ _br_lut.resize (length);
+
+ _br_lut [0] = 0;
+ long br_index = 0;
+ for (long cnt = 1; cnt < length; ++cnt)
+ {
+ // ++br_index (bit reversed)
+ long bit = length >> 1;
+ while (((br_index ^= bit) & bit) == 0)
+ {
+ bit >>= 1;
+ }
+
+ _br_lut [cnt] = br_index;
+ }
+}
+
+
+
+template <class DT>
+void FFTReal <DT>::init_trigo_lut ()
+{
+ using namespace std;
+
+ if (_nbr_bits > 3)
+ {
+ const long total_len = (1L << (_nbr_bits - 1)) - 4;
+ _trigo_lut.resize (total_len);
+
+ for (int level = 3; level < _nbr_bits; ++level)
+ {
+ const long level_len = 1L << (level - 1);
+ DataType * const level_ptr =
+ &_trigo_lut [get_trigo_level_index (level)];
+ const double mul = PI / (level_len << 1);
+
+ for (long i = 0; i < level_len; ++ i)
+ {
+ level_ptr [i] = static_cast <DataType> (cos (i * mul));
+ }
+ }
+ }
+}
+
+
+
+template <class DT>
+void FFTReal <DT>::init_trigo_osc ()
+{
+ const int nbr_osc = _nbr_bits - TRIGO_BD_LIMIT;
+ if (nbr_osc > 0)
+ {
+ _trigo_osc.resize (nbr_osc);
+
+ for (int osc_cnt = 0; osc_cnt < nbr_osc; ++osc_cnt)
+ {
+ OscType & osc = _trigo_osc [osc_cnt];
+
+ const long len = 1L << (TRIGO_BD_LIMIT + osc_cnt);
+ const double mul = (0.5 * PI) / len;
+ osc.set_step (mul);
+ }
+ }
+}
+
+
+
+template <class DT>
+const long * FFTReal <DT>::get_br_ptr () const
+{
+ return (&_br_lut [0]);
+}
+
+
+
+template <class DT>
+const typename FFTReal <DT>::DataType * FFTReal <DT>::get_trigo_ptr (int level) const
+{
+ assert (level >= 3);
+
+ return (&_trigo_lut [get_trigo_level_index (level)]);
+}
+
+
+
+template <class DT>
+long FFTReal <DT>::get_trigo_level_index (int level) const
+{
+ assert (level >= 3);
+
+ return ((1L << (level - 1)) - 4);
+}
+
+
+
+// Transform in several passes
+template <class DT>
+void FFTReal <DT>::compute_fft_general (DataType f [], const DataType x []) const
+{
+ assert (f != 0);
+ assert (f != use_buffer ());
+ assert (x != 0);
+ assert (x != use_buffer ());
+ assert (x != f);
+
+ DataType * sf;
+ DataType * df;
+
+ if ((_nbr_bits & 1) != 0)
+ {
+ df = use_buffer ();
+ sf = f;
+ }
+ else
+ {
+ df = f;
+ sf = use_buffer ();
+ }
+
+ compute_direct_pass_1_2 (df, x);
+ compute_direct_pass_3 (sf, df);
+
+ for (int pass = 3; pass < _nbr_bits; ++ pass)
+ {
+ compute_direct_pass_n (df, sf, pass);
+
+ DataType * const temp_ptr = df;
+ df = sf;
+ sf = temp_ptr;
+ }
+}
+
+
+
+template <class DT>
+void FFTReal <DT>::compute_direct_pass_1_2 (DataType df [], const DataType x []) const
+{
+ assert (df != 0);
+ assert (x != 0);
+ assert (df != x);
+
+ const long * const bit_rev_lut_ptr = get_br_ptr ();
+ long coef_index = 0;
+ do
+ {
+ const long rev_index_0 = bit_rev_lut_ptr [coef_index];
+ const long rev_index_1 = bit_rev_lut_ptr [coef_index + 1];
+ const long rev_index_2 = bit_rev_lut_ptr [coef_index + 2];
+ const long rev_index_3 = bit_rev_lut_ptr [coef_index + 3];
+
+ DataType * const df2 = df + coef_index;
+ df2 [1] = x [rev_index_0] - x [rev_index_1];
+ df2 [3] = x [rev_index_2] - x [rev_index_3];
+
+ const DataType sf_0 = x [rev_index_0] + x [rev_index_1];
+ const DataType sf_2 = x [rev_index_2] + x [rev_index_3];
+
+ df2 [0] = sf_0 + sf_2;
+ df2 [2] = sf_0 - sf_2;
+
+ coef_index += 4;
+ }
+ while (coef_index < _length);
+}
+
+
+
+template <class DT>
+void FFTReal <DT>::compute_direct_pass_3 (DataType df [], const DataType sf []) const
+{
+ assert (df != 0);
+ assert (sf != 0);
+ assert (df != sf);
+
+ const DataType sqrt2_2 = DataType (SQRT2 * 0.5);
+ long coef_index = 0;
+ do
+ {
+ DataType v;
+
+ df [coef_index] = sf [coef_index] + sf [coef_index + 4];
+ df [coef_index + 4] = sf [coef_index] - sf [coef_index + 4];
+ df [coef_index + 2] = sf [coef_index + 2];
+ df [coef_index + 6] = sf [coef_index + 6];
+
+ v = (sf [coef_index + 5] - sf [coef_index + 7]) * sqrt2_2;
+ df [coef_index + 1] = sf [coef_index + 1] + v;
+ df [coef_index + 3] = sf [coef_index + 1] - v;
+
+ v = (sf [coef_index + 5] + sf [coef_index + 7]) * sqrt2_2;
+ df [coef_index + 5] = v + sf [coef_index + 3];
+ df [coef_index + 7] = v - sf [coef_index + 3];
+
+ coef_index += 8;
+ }
+ while (coef_index < _length);
+}
+
+
+
+template <class DT>
+void FFTReal <DT>::compute_direct_pass_n (DataType df [], const DataType sf [], int pass) const
+{
+ assert (df != 0);
+ assert (sf != 0);
+ assert (df != sf);
+ assert (pass >= 3);
+ assert (pass < _nbr_bits);
+
+ if (pass <= TRIGO_BD_LIMIT)
+ {
+ compute_direct_pass_n_lut (df, sf, pass);
+ }
+ else
+ {
+ compute_direct_pass_n_osc (df, sf, pass);
+ }
+}
+
+
+
+template <class DT>
+void FFTReal <DT>::compute_direct_pass_n_lut (DataType df [], const DataType sf [], int pass) const
+{
+ assert (df != 0);
+ assert (sf != 0);
+ assert (df != sf);
+ assert (pass >= 3);
+ assert (pass < _nbr_bits);
+
+ const long nbr_coef = 1 << pass;
+ const long h_nbr_coef = nbr_coef >> 1;
+ const long d_nbr_coef = nbr_coef << 1;
+ long coef_index = 0;
+ const DataType * const cos_ptr = get_trigo_ptr (pass);
+ do
+ {
+ const DataType * const sf1r = sf + coef_index;
+ const DataType * const sf2r = sf1r + nbr_coef;
+ DataType * const dfr = df + coef_index;
+ DataType * const dfi = dfr + nbr_coef;
+
+ // Extreme coefficients are always real
+ dfr [0] = sf1r [0] + sf2r [0];
+ dfi [0] = sf1r [0] - sf2r [0]; // dfr [nbr_coef] =
+ dfr [h_nbr_coef] = sf1r [h_nbr_coef];
+ dfi [h_nbr_coef] = sf2r [h_nbr_coef];
+
+ // Others are conjugate complex numbers
+ const DataType * const sf1i = sf1r + h_nbr_coef;
+ const DataType * const sf2i = sf1i + nbr_coef;
+ for (long i = 1; i < h_nbr_coef; ++ i)
+ {
+ const DataType c = cos_ptr [i]; // cos (i*PI/nbr_coef);
+ const DataType s = cos_ptr [h_nbr_coef - i]; // sin (i*PI/nbr_coef);
+ DataType v;
+
+ v = sf2r [i] * c - sf2i [i] * s;
+ dfr [i] = sf1r [i] + v;
+ dfi [-i] = sf1r [i] - v; // dfr [nbr_coef - i] =
+
+ v = sf2r [i] * s + sf2i [i] * c;
+ dfi [i] = v + sf1i [i];
+ dfi [nbr_coef - i] = v - sf1i [i];
+ }
+
+ coef_index += d_nbr_coef;
+ }
+ while (coef_index < _length);
+}
+
+
+
+template <class DT>
+void FFTReal <DT>::compute_direct_pass_n_osc (DataType df [], const DataType sf [], int pass) const
+{
+ assert (df != 0);
+ assert (sf != 0);
+ assert (df != sf);
+ assert (pass > TRIGO_BD_LIMIT);
+ assert (pass < _nbr_bits);
+
+ const long nbr_coef = 1 << pass;
+ const long h_nbr_coef = nbr_coef >> 1;
+ const long d_nbr_coef = nbr_coef << 1;
+ long coef_index = 0;
+ OscType & osc = _trigo_osc [pass - (TRIGO_BD_LIMIT + 1)];
+ do
+ {
+ const DataType * const sf1r = sf + coef_index;
+ const DataType * const sf2r = sf1r + nbr_coef;
+ DataType * const dfr = df + coef_index;
+ DataType * const dfi = dfr + nbr_coef;
+
+ osc.clear_buffers ();
+
+ // Extreme coefficients are always real
+ dfr [0] = sf1r [0] + sf2r [0];
+ dfi [0] = sf1r [0] - sf2r [0]; // dfr [nbr_coef] =
+ dfr [h_nbr_coef] = sf1r [h_nbr_coef];
+ dfi [h_nbr_coef] = sf2r [h_nbr_coef];
+
+ // Others are conjugate complex numbers
+ const DataType * const sf1i = sf1r + h_nbr_coef;
+ const DataType * const sf2i = sf1i + nbr_coef;
+ for (long i = 1; i < h_nbr_coef; ++ i)
+ {
+ osc.step ();
+ const DataType c = osc.get_cos ();
+ const DataType s = osc.get_sin ();
+ DataType v;
+
+ v = sf2r [i] * c - sf2i [i] * s;
+ dfr [i] = sf1r [i] + v;
+ dfi [-i] = sf1r [i] - v; // dfr [nbr_coef - i] =
+
+ v = sf2r [i] * s + sf2i [i] * c;
+ dfi [i] = v + sf1i [i];
+ dfi [nbr_coef - i] = v - sf1i [i];
+ }
+
+ coef_index += d_nbr_coef;
+ }
+ while (coef_index < _length);
+}
+
+
+
+// Transform in several pass
+template <class DT>
+void FFTReal <DT>::compute_ifft_general (const DataType f [], DataType x []) const
+{
+ assert (f != 0);
+ assert (f != use_buffer ());
+ assert (x != 0);
+ assert (x != use_buffer ());
+ assert (x != f);
+
+ DataType * sf = const_cast <DataType *> (f);
+ DataType * df;
+ DataType * df_temp;
+
+ if (_nbr_bits & 1)
+ {
+ df = use_buffer ();
+ df_temp = x;
+ }
+ else
+ {
+ df = x;
+ df_temp = use_buffer ();
+ }
+
+ for (int pass = _nbr_bits - 1; pass >= 3; -- pass)
+ {
+ compute_inverse_pass_n (df, sf, pass);
+
+ if (pass < _nbr_bits - 1)
+ {
+ DataType * const temp_ptr = df;
+ df = sf;
+ sf = temp_ptr;
+ }
+ else
+ {
+ sf = df;
+ df = df_temp;
+ }
+ }
+
+ compute_inverse_pass_3 (df, sf);
+ compute_inverse_pass_1_2 (x, df);
+}
+
+
+
+template <class DT>
+void FFTReal <DT>::compute_inverse_pass_n (DataType df [], const DataType sf [], int pass) const
+{
+ assert (df != 0);
+ assert (sf != 0);
+ assert (df != sf);
+ assert (pass >= 3);
+ assert (pass < _nbr_bits);
+
+ if (pass <= TRIGO_BD_LIMIT)
+ {
+ compute_inverse_pass_n_lut (df, sf, pass);
+ }
+ else
+ {
+ compute_inverse_pass_n_osc (df, sf, pass);
+ }
+}
+
+
+
+template <class DT>
+void FFTReal <DT>::compute_inverse_pass_n_lut (DataType df [], const DataType sf [], int pass) const
+{
+ assert (df != 0);
+ assert (sf != 0);
+ assert (df != sf);
+ assert (pass >= 3);
+ assert (pass < _nbr_bits);
+
+ const long nbr_coef = 1 << pass;
+ const long h_nbr_coef = nbr_coef >> 1;
+ const long d_nbr_coef = nbr_coef << 1;
+ long coef_index = 0;
+ const DataType * const cos_ptr = get_trigo_ptr (pass);
+ do
+ {
+ const DataType * const sfr = sf + coef_index;
+ const DataType * const sfi = sfr + nbr_coef;
+ DataType * const df1r = df + coef_index;
+ DataType * const df2r = df1r + nbr_coef;
+
+ // Extreme coefficients are always real
+ df1r [0] = sfr [0] + sfi [0]; // + sfr [nbr_coef]
+ df2r [0] = sfr [0] - sfi [0]; // - sfr [nbr_coef]
+ df1r [h_nbr_coef] = sfr [h_nbr_coef] * 2;
+ df2r [h_nbr_coef] = sfi [h_nbr_coef] * 2;
+
+ // Others are conjugate complex numbers
+ DataType * const df1i = df1r + h_nbr_coef;
+ DataType * const df2i = df1i + nbr_coef;
+ for (long i = 1; i < h_nbr_coef; ++ i)
+ {
+ df1r [i] = sfr [i] + sfi [-i]; // + sfr [nbr_coef - i]
+ df1i [i] = sfi [i] - sfi [nbr_coef - i];
+
+ const DataType c = cos_ptr [i]; // cos (i*PI/nbr_coef);
+ const DataType s = cos_ptr [h_nbr_coef - i]; // sin (i*PI/nbr_coef);
+ const DataType vr = sfr [i] - sfi [-i]; // - sfr [nbr_coef - i]
+ const DataType vi = sfi [i] + sfi [nbr_coef - i];
+
+ df2r [i] = vr * c + vi * s;
+ df2i [i] = vi * c - vr * s;
+ }
+
+ coef_index += d_nbr_coef;
+ }
+ while (coef_index < _length);
+}
+
+
+
+template <class DT>
+void FFTReal <DT>::compute_inverse_pass_n_osc (DataType df [], const DataType sf [], int pass) const
+{
+ assert (df != 0);
+ assert (sf != 0);
+ assert (df != sf);
+ assert (pass > TRIGO_BD_LIMIT);
+ assert (pass < _nbr_bits);
+
+ const long nbr_coef = 1 << pass;
+ const long h_nbr_coef = nbr_coef >> 1;
+ const long d_nbr_coef = nbr_coef << 1;
+ long coef_index = 0;
+ OscType & osc = _trigo_osc [pass - (TRIGO_BD_LIMIT + 1)];
+ do
+ {
+ const DataType * const sfr = sf + coef_index;
+ const DataType * const sfi = sfr + nbr_coef;
+ DataType * const df1r = df + coef_index;
+ DataType * const df2r = df1r + nbr_coef;
+
+ osc.clear_buffers ();
+
+ // Extreme coefficients are always real
+ df1r [0] = sfr [0] + sfi [0]; // + sfr [nbr_coef]
+ df2r [0] = sfr [0] - sfi [0]; // - sfr [nbr_coef]
+ df1r [h_nbr_coef] = sfr [h_nbr_coef] * 2;
+ df2r [h_nbr_coef] = sfi [h_nbr_coef] * 2;
+
+ // Others are conjugate complex numbers
+ DataType * const df1i = df1r + h_nbr_coef;
+ DataType * const df2i = df1i + nbr_coef;
+ for (long i = 1; i < h_nbr_coef; ++ i)
+ {
+ df1r [i] = sfr [i] + sfi [-i]; // + sfr [nbr_coef - i]
+ df1i [i] = sfi [i] - sfi [nbr_coef - i];
+
+ osc.step ();
+ const DataType c = osc.get_cos ();
+ const DataType s = osc.get_sin ();
+ const DataType vr = sfr [i] - sfi [-i]; // - sfr [nbr_coef - i]
+ const DataType vi = sfi [i] + sfi [nbr_coef - i];
+
+ df2r [i] = vr * c + vi * s;
+ df2i [i] = vi * c - vr * s;
+ }
+
+ coef_index += d_nbr_coef;
+ }
+ while (coef_index < _length);
+}
+
+
+
+template <class DT>
+void FFTReal <DT>::compute_inverse_pass_3 (DataType df [], const DataType sf []) const
+{
+ assert (df != 0);
+ assert (sf != 0);
+ assert (df != sf);
+
+ const DataType sqrt2_2 = DataType (SQRT2 * 0.5);
+ long coef_index = 0;
+ do
+ {
+ df [coef_index] = sf [coef_index] + sf [coef_index + 4];
+ df [coef_index + 4] = sf [coef_index] - sf [coef_index + 4];
+ df [coef_index + 2] = sf [coef_index + 2] * 2;
+ df [coef_index + 6] = sf [coef_index + 6] * 2;
+
+ df [coef_index + 1] = sf [coef_index + 1] + sf [coef_index + 3];
+ df [coef_index + 3] = sf [coef_index + 5] - sf [coef_index + 7];
+
+ const DataType vr = sf [coef_index + 1] - sf [coef_index + 3];
+ const DataType vi = sf [coef_index + 5] + sf [coef_index + 7];
+
+ df [coef_index + 5] = (vr + vi) * sqrt2_2;
+ df [coef_index + 7] = (vi - vr) * sqrt2_2;
+
+ coef_index += 8;
+ }
+ while (coef_index < _length);
+}
+
+
+
+template <class DT>
+void FFTReal <DT>::compute_inverse_pass_1_2 (DataType x [], const DataType sf []) const
+{
+ assert (x != 0);
+ assert (sf != 0);
+ assert (x != sf);
+
+ const long * bit_rev_lut_ptr = get_br_ptr ();
+ const DataType * sf2 = sf;
+ long coef_index = 0;
+ do
+ {
+ {
+ const DataType b_0 = sf2 [0] + sf2 [2];
+ const DataType b_2 = sf2 [0] - sf2 [2];
+ const DataType b_1 = sf2 [1] * 2;
+ const DataType b_3 = sf2 [3] * 2;
+
+ x [bit_rev_lut_ptr [0]] = b_0 + b_1;
+ x [bit_rev_lut_ptr [1]] = b_0 - b_1;
+ x [bit_rev_lut_ptr [2]] = b_2 + b_3;
+ x [bit_rev_lut_ptr [3]] = b_2 - b_3;
+ }
+ {
+ const DataType b_0 = sf2 [4] + sf2 [6];
+ const DataType b_2 = sf2 [4] - sf2 [6];
+ const DataType b_1 = sf2 [5] * 2;
+ const DataType b_3 = sf2 [7] * 2;
+
+ x [bit_rev_lut_ptr [4]] = b_0 + b_1;
+ x [bit_rev_lut_ptr [5]] = b_0 - b_1;
+ x [bit_rev_lut_ptr [6]] = b_2 + b_3;
+ x [bit_rev_lut_ptr [7]] = b_2 - b_3;
+ }
+
+ sf2 += 8;
+ coef_index += 8;
+ bit_rev_lut_ptr += 8;
+ }
+ while (coef_index < _length);
+}
+
+
+
+#endif // FFTReal_CODEHEADER_INCLUDED
+
+#undef FFTReal_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/FFTRealFixLen.h b/demos/spectrum/3rdparty/fftreal/FFTRealFixLen.h
new file mode 100644
index 0000000..0b80266
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTRealFixLen.h
@@ -0,0 +1,130 @@
+/*****************************************************************************
+
+ FFTRealFixLen.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (FFTRealFixLen_HEADER_INCLUDED)
+#define FFTRealFixLen_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "Array.h"
+#include "DynArray.h"
+#include "FFTRealFixLenParam.h"
+#include "OscSinCos.h"
+
+
+
+template <int LL2>
+class FFTRealFixLen
+{
+ typedef int CompileTimeCheck1 [(LL2 >= 0) ? 1 : -1];
+ typedef int CompileTimeCheck2 [(LL2 <= 30) ? 1 : -1];
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ typedef FFTRealFixLenParam::DataType DataType;
+ typedef OscSinCos <DataType> OscType;
+
+ enum { FFT_LEN_L2 = LL2 };
+ enum { FFT_LEN = 1 << FFT_LEN_L2 };
+
+ FFTRealFixLen ();
+
+ inline long get_length () const;
+ void do_fft (DataType f [], const DataType x []);
+ void do_ifft (const DataType f [], DataType x []);
+ void rescale (DataType x []) const;
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ enum { TRIGO_BD_LIMIT = FFTRealFixLenParam::TRIGO_BD_LIMIT };
+
+ enum { BR_ARR_SIZE_L2 = ((FFT_LEN_L2 - 3) < 0) ? 0 : (FFT_LEN_L2 - 2) };
+ enum { BR_ARR_SIZE = 1 << BR_ARR_SIZE_L2 };
+
+ enum { TRIGO_BD = ((FFT_LEN_L2 - TRIGO_BD_LIMIT) < 0)
+ ? (int)FFT_LEN_L2
+ : (int)TRIGO_BD_LIMIT };
+ enum { TRIGO_TABLE_ARR_SIZE_L2 = (LL2 < 4) ? 0 : (TRIGO_BD - 2) };
+ enum { TRIGO_TABLE_ARR_SIZE = 1 << TRIGO_TABLE_ARR_SIZE_L2 };
+
+ enum { NBR_TRIGO_OSC = FFT_LEN_L2 - TRIGO_BD };
+ enum { TRIGO_OSC_ARR_SIZE = (NBR_TRIGO_OSC > 0) ? NBR_TRIGO_OSC : 1 };
+
+ void build_br_lut ();
+ void build_trigo_lut ();
+ void build_trigo_osc ();
+
+ DynArray <DataType>
+ _buffer;
+ DynArray <long>
+ _br_data;
+ DynArray <DataType>
+ _trigo_data;
+ Array <OscType, TRIGO_OSC_ARR_SIZE>
+ _trigo_osc;
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ FFTRealFixLen (const FFTRealFixLen &other);
+ FFTRealFixLen& operator = (const FFTRealFixLen &other);
+ bool operator == (const FFTRealFixLen &other);
+ bool operator != (const FFTRealFixLen &other);
+
+}; // class FFTRealFixLen
+
+
+
+#include "FFTRealFixLen.hpp"
+
+
+
+#endif // FFTRealFixLen_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/FFTRealFixLen.hpp b/demos/spectrum/3rdparty/fftreal/FFTRealFixLen.hpp
new file mode 100644
index 0000000..6defb00
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTRealFixLen.hpp
@@ -0,0 +1,322 @@
+/*****************************************************************************
+
+ FFTRealFixLen.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (FFTRealFixLen_CURRENT_CODEHEADER)
+ #error Recursive inclusion of FFTRealFixLen code header.
+#endif
+#define FFTRealFixLen_CURRENT_CODEHEADER
+
+#if ! defined (FFTRealFixLen_CODEHEADER_INCLUDED)
+#define FFTRealFixLen_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "def.h"
+#include "FFTRealPassDirect.h"
+#include "FFTRealPassInverse.h"
+#include "FFTRealSelect.h"
+
+#include <cassert>
+#include <cmath>
+
+namespace std { }
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <int LL2>
+FFTRealFixLen <LL2>::FFTRealFixLen ()
+: _buffer (FFT_LEN)
+, _br_data (BR_ARR_SIZE)
+, _trigo_data (TRIGO_TABLE_ARR_SIZE)
+, _trigo_osc ()
+{
+ build_br_lut ();
+ build_trigo_lut ();
+ build_trigo_osc ();
+}
+
+
+
+template <int LL2>
+long FFTRealFixLen <LL2>::get_length () const
+{
+ return (FFT_LEN);
+}
+
+
+
+// General case
+template <int LL2>
+void FFTRealFixLen <LL2>::do_fft (DataType f [], const DataType x [])
+{
+ assert (f != 0);
+ assert (x != 0);
+ assert (x != f);
+ assert (FFT_LEN_L2 >= 3);
+
+ // Do the transform in several passes
+ const DataType * cos_ptr = &_trigo_data [0];
+ const long * br_ptr = &_br_data [0];
+
+ FFTRealPassDirect <FFT_LEN_L2 - 1>::process (
+ FFT_LEN,
+ f,
+ &_buffer [0],
+ x,
+ cos_ptr,
+ TRIGO_TABLE_ARR_SIZE,
+ br_ptr,
+ &_trigo_osc [0]
+ );
+}
+
+// 4-point FFT
+template <>
+void FFTRealFixLen <2>::do_fft (DataType f [], const DataType x [])
+{
+ assert (f != 0);
+ assert (x != 0);
+ assert (x != f);
+
+ f [1] = x [0] - x [2];
+ f [3] = x [1] - x [3];
+
+ const DataType b_0 = x [0] + x [2];
+ const DataType b_2 = x [1] + x [3];
+
+ f [0] = b_0 + b_2;
+ f [2] = b_0 - b_2;
+}
+
+// 2-point FFT
+template <>
+void FFTRealFixLen <1>::do_fft (DataType f [], const DataType x [])
+{
+ assert (f != 0);
+ assert (x != 0);
+ assert (x != f);
+
+ f [0] = x [0] + x [1];
+ f [1] = x [0] - x [1];
+}
+
+// 1-point FFT
+template <>
+void FFTRealFixLen <0>::do_fft (DataType f [], const DataType x [])
+{
+ assert (f != 0);
+ assert (x != 0);
+
+ f [0] = x [0];
+}
+
+
+
+// General case
+template <int LL2>
+void FFTRealFixLen <LL2>::do_ifft (const DataType f [], DataType x [])
+{
+ assert (f != 0);
+ assert (x != 0);
+ assert (x != f);
+ assert (FFT_LEN_L2 >= 3);
+
+ // Do the transform in several passes
+ DataType * s_ptr =
+ FFTRealSelect <FFT_LEN_L2 & 1>::sel_bin (&_buffer [0], x);
+ DataType * d_ptr =
+ FFTRealSelect <FFT_LEN_L2 & 1>::sel_bin (x, &_buffer [0]);
+ const DataType * cos_ptr = &_trigo_data [0];
+ const long * br_ptr = &_br_data [0];
+
+ FFTRealPassInverse <FFT_LEN_L2 - 1>::process (
+ FFT_LEN,
+ d_ptr,
+ s_ptr,
+ f,
+ cos_ptr,
+ TRIGO_TABLE_ARR_SIZE,
+ br_ptr,
+ &_trigo_osc [0]
+ );
+}
+
+// 4-point IFFT
+template <>
+void FFTRealFixLen <2>::do_ifft (const DataType f [], DataType x [])
+{
+ assert (f != 0);
+ assert (x != 0);
+ assert (x != f);
+
+ const DataType b_0 = f [0] + f [2];
+ const DataType b_2 = f [0] - f [2];
+
+ x [0] = b_0 + f [1] * 2;
+ x [2] = b_0 - f [1] * 2;
+ x [1] = b_2 + f [3] * 2;
+ x [3] = b_2 - f [3] * 2;
+}
+
+// 2-point IFFT
+template <>
+void FFTRealFixLen <1>::do_ifft (const DataType f [], DataType x [])
+{
+ assert (f != 0);
+ assert (x != 0);
+ assert (x != f);
+
+ x [0] = f [0] + f [1];
+ x [1] = f [0] - f [1];
+}
+
+// 1-point IFFT
+template <>
+void FFTRealFixLen <0>::do_ifft (const DataType f [], DataType x [])
+{
+ assert (f != 0);
+ assert (x != 0);
+ assert (x != f);
+
+ x [0] = f [0];
+}
+
+
+
+
+template <int LL2>
+void FFTRealFixLen <LL2>::rescale (DataType x []) const
+{
+ assert (x != 0);
+
+ const DataType mul = DataType (1.0 / FFT_LEN);
+
+ if (FFT_LEN < 4)
+ {
+ long i = FFT_LEN - 1;
+ do
+ {
+ x [i] *= mul;
+ --i;
+ }
+ while (i >= 0);
+ }
+
+ else
+ {
+ assert ((FFT_LEN & 3) == 0);
+
+ // Could be optimized with SIMD instruction sets (needs alignment check)
+ long i = FFT_LEN - 4;
+ do
+ {
+ x [i + 0] *= mul;
+ x [i + 1] *= mul;
+ x [i + 2] *= mul;
+ x [i + 3] *= mul;
+ i -= 4;
+ }
+ while (i >= 0);
+ }
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <int LL2>
+void FFTRealFixLen <LL2>::build_br_lut ()
+{
+ _br_data [0] = 0;
+ for (long cnt = 1; cnt < BR_ARR_SIZE; ++cnt)
+ {
+ long index = cnt << 2;
+ long br_index = 0;
+
+ int bit_cnt = FFT_LEN_L2;
+ do
+ {
+ br_index <<= 1;
+ br_index += (index & 1);
+ index >>= 1;
+
+ -- bit_cnt;
+ }
+ while (bit_cnt > 0);
+
+ _br_data [cnt] = br_index;
+ }
+}
+
+
+
+template <int LL2>
+void FFTRealFixLen <LL2>::build_trigo_lut ()
+{
+ const double mul = (0.5 * PI) / TRIGO_TABLE_ARR_SIZE;
+ for (long i = 0; i < TRIGO_TABLE_ARR_SIZE; ++ i)
+ {
+ using namespace std;
+
+ _trigo_data [i] = DataType (cos (i * mul));
+ }
+}
+
+
+
+template <int LL2>
+void FFTRealFixLen <LL2>::build_trigo_osc ()
+{
+ for (int i = 0; i < NBR_TRIGO_OSC; ++i)
+ {
+ OscType & osc = _trigo_osc [i];
+
+ const long len = static_cast <long> (TRIGO_TABLE_ARR_SIZE) << (i + 1);
+ const double mul = (0.5 * PI) / len;
+ osc.set_step (mul);
+ }
+}
+
+
+
+#endif // FFTRealFixLen_CODEHEADER_INCLUDED
+
+#undef FFTRealFixLen_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/FFTRealFixLenParam.h b/demos/spectrum/3rdparty/fftreal/FFTRealFixLenParam.h
new file mode 100644
index 0000000..163c083
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTRealFixLenParam.h
@@ -0,0 +1,93 @@
+/*****************************************************************************
+
+ FFTRealFixLenParam.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (FFTRealFixLenParam_HEADER_INCLUDED)
+#define FFTRealFixLenParam_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+class FFTRealFixLenParam
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ // Over this bit depth, we use direct calculation for sin/cos
+ enum { TRIGO_BD_LIMIT = 12 };
+
+ typedef float DataType;
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+#if 0 // To avoid GCC warning:
+ // All member functions in class 'FFTRealFixLenParam' are private
+ FFTRealFixLenParam ();
+ ~FFTRealFixLenParam ();
+ FFTRealFixLenParam (const FFTRealFixLenParam &other);
+ FFTRealFixLenParam &
+ operator = (const FFTRealFixLenParam &other);
+ bool operator == (const FFTRealFixLenParam &other);
+ bool operator != (const FFTRealFixLenParam &other);
+#endif
+
+}; // class FFTRealFixLenParam
+
+
+
+//#include "FFTRealFixLenParam.hpp"
+
+
+
+#endif // FFTRealFixLenParam_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/FFTRealPassDirect.h b/demos/spectrum/3rdparty/fftreal/FFTRealPassDirect.h
new file mode 100644
index 0000000..7d19c02
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTRealPassDirect.h
@@ -0,0 +1,96 @@
+/*****************************************************************************
+
+ FFTRealPassDirect.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (FFTRealPassDirect_HEADER_INCLUDED)
+#define FFTRealPassDirect_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "def.h"
+#include "FFTRealFixLenParam.h"
+#include "OscSinCos.h"
+
+
+
+template <int PASS>
+class FFTRealPassDirect
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ typedef FFTRealFixLenParam::DataType DataType;
+ typedef OscSinCos <DataType> OscType;
+
+ FORCEINLINE static void
+ process (long len, DataType dest_ptr [], DataType src_ptr [], const DataType x_ptr [], const DataType cos_ptr [], long cos_len, const long br_ptr [], OscType osc_list []);
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ FFTRealPassDirect ();
+ ~FFTRealPassDirect ();
+ FFTRealPassDirect (const FFTRealPassDirect &other);
+ FFTRealPassDirect &
+ operator = (const FFTRealPassDirect &other);
+ bool operator == (const FFTRealPassDirect &other);
+ bool operator != (const FFTRealPassDirect &other);
+
+}; // class FFTRealPassDirect
+
+
+
+#include "FFTRealPassDirect.hpp"
+
+
+
+#endif // FFTRealPassDirect_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/FFTRealPassDirect.hpp b/demos/spectrum/3rdparty/fftreal/FFTRealPassDirect.hpp
new file mode 100644
index 0000000..db9d568
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTRealPassDirect.hpp
@@ -0,0 +1,204 @@
+/*****************************************************************************
+
+ FFTRealPassDirect.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (FFTRealPassDirect_CURRENT_CODEHEADER)
+ #error Recursive inclusion of FFTRealPassDirect code header.
+#endif
+#define FFTRealPassDirect_CURRENT_CODEHEADER
+
+#if ! defined (FFTRealPassDirect_CODEHEADER_INCLUDED)
+#define FFTRealPassDirect_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "FFTRealUseTrigo.h"
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <>
+void FFTRealPassDirect <1>::process (long len, DataType dest_ptr [], DataType src_ptr [], const DataType x_ptr [], const DataType cos_ptr [], long cos_len, const long br_ptr [], OscType osc_list [])
+{
+ // First and second pass at once
+ const long qlen = len >> 2;
+
+ long coef_index = 0;
+ do
+ {
+ // To do: unroll the loop (2x).
+ const long ri_0 = br_ptr [coef_index >> 2];
+ const long ri_1 = ri_0 + 2 * qlen; // bit_rev_lut_ptr [coef_index + 1];
+ const long ri_2 = ri_0 + 1 * qlen; // bit_rev_lut_ptr [coef_index + 2];
+ const long ri_3 = ri_0 + 3 * qlen; // bit_rev_lut_ptr [coef_index + 3];
+
+ DataType * const df2 = dest_ptr + coef_index;
+ df2 [1] = x_ptr [ri_0] - x_ptr [ri_1];
+ df2 [3] = x_ptr [ri_2] - x_ptr [ri_3];
+
+ const DataType sf_0 = x_ptr [ri_0] + x_ptr [ri_1];
+ const DataType sf_2 = x_ptr [ri_2] + x_ptr [ri_3];
+
+ df2 [0] = sf_0 + sf_2;
+ df2 [2] = sf_0 - sf_2;
+
+ coef_index += 4;
+ }
+ while (coef_index < len);
+}
+
+template <>
+void FFTRealPassDirect <2>::process (long len, DataType dest_ptr [], DataType src_ptr [], const DataType x_ptr [], const DataType cos_ptr [], long cos_len, const long br_ptr [], OscType osc_list [])
+{
+ // Executes "previous" passes first. Inverts source and destination buffers
+ FFTRealPassDirect <1>::process (
+ len,
+ src_ptr,
+ dest_ptr,
+ x_ptr,
+ cos_ptr,
+ cos_len,
+ br_ptr,
+ osc_list
+ );
+
+ // Third pass
+ const DataType sqrt2_2 = DataType (SQRT2 * 0.5);
+
+ long coef_index = 0;
+ do
+ {
+ dest_ptr [coef_index ] = src_ptr [coef_index] + src_ptr [coef_index + 4];
+ dest_ptr [coef_index + 4] = src_ptr [coef_index] - src_ptr [coef_index + 4];
+ dest_ptr [coef_index + 2] = src_ptr [coef_index + 2];
+ dest_ptr [coef_index + 6] = src_ptr [coef_index + 6];
+
+ DataType v;
+
+ v = (src_ptr [coef_index + 5] - src_ptr [coef_index + 7]) * sqrt2_2;
+ dest_ptr [coef_index + 1] = src_ptr [coef_index + 1] + v;
+ dest_ptr [coef_index + 3] = src_ptr [coef_index + 1] - v;
+
+ v = (src_ptr [coef_index + 5] + src_ptr [coef_index + 7]) * sqrt2_2;
+ dest_ptr [coef_index + 5] = v + src_ptr [coef_index + 3];
+ dest_ptr [coef_index + 7] = v - src_ptr [coef_index + 3];
+
+ coef_index += 8;
+ }
+ while (coef_index < len);
+}
+
+template <int PASS>
+void FFTRealPassDirect <PASS>::process (long len, DataType dest_ptr [], DataType src_ptr [], const DataType x_ptr [], const DataType cos_ptr [], long cos_len, const long br_ptr [], OscType osc_list [])
+{
+ // Executes "previous" passes first. Inverts source and destination buffers
+ FFTRealPassDirect <PASS - 1>::process (
+ len,
+ src_ptr,
+ dest_ptr,
+ x_ptr,
+ cos_ptr,
+ cos_len,
+ br_ptr,
+ osc_list
+ );
+
+ const long dist = 1L << (PASS - 1);
+ const long c1_r = 0;
+ const long c1_i = dist;
+ const long c2_r = dist * 2;
+ const long c2_i = dist * 3;
+ const long cend = dist * 4;
+ const long table_step = cos_len >> (PASS - 1);
+
+ enum { TRIGO_OSC = PASS - FFTRealFixLenParam::TRIGO_BD_LIMIT };
+ enum { TRIGO_DIRECT = (TRIGO_OSC >= 0) ? 1 : 0 };
+
+ long coef_index = 0;
+ do
+ {
+ const DataType * const sf = src_ptr + coef_index;
+ DataType * const df = dest_ptr + coef_index;
+
+ // Extreme coefficients are always real
+ df [c1_r] = sf [c1_r] + sf [c2_r];
+ df [c2_r] = sf [c1_r] - sf [c2_r];
+ df [c1_i] = sf [c1_i];
+ df [c2_i] = sf [c2_i];
+
+ FFTRealUseTrigo <TRIGO_DIRECT>::prepare (osc_list [TRIGO_OSC]);
+
+ // Others are conjugate complex numbers
+ for (long i = 1; i < dist; ++ i)
+ {
+ DataType c;
+ DataType s;
+ FFTRealUseTrigo <TRIGO_DIRECT>::iterate (
+ osc_list [TRIGO_OSC],
+ c,
+ s,
+ cos_ptr,
+ i * table_step,
+ (dist - i) * table_step
+ );
+
+ const DataType sf_r_i = sf [c1_r + i];
+ const DataType sf_i_i = sf [c1_i + i];
+
+ const DataType v1 = sf [c2_r + i] * c - sf [c2_i + i] * s;
+ df [c1_r + i] = sf_r_i + v1;
+ df [c2_r - i] = sf_r_i - v1;
+
+ const DataType v2 = sf [c2_r + i] * s + sf [c2_i + i] * c;
+ df [c2_r + i] = v2 + sf_i_i;
+ df [cend - i] = v2 - sf_i_i;
+ }
+
+ coef_index += cend;
+ }
+ while (coef_index < len);
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+#endif // FFTRealPassDirect_CODEHEADER_INCLUDED
+
+#undef FFTRealPassDirect_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/FFTRealPassInverse.h b/demos/spectrum/3rdparty/fftreal/FFTRealPassInverse.h
new file mode 100644
index 0000000..2de8952
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTRealPassInverse.h
@@ -0,0 +1,101 @@
+/*****************************************************************************
+
+ FFTRealPassInverse.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (FFTRealPassInverse_HEADER_INCLUDED)
+#define FFTRealPassInverse_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "def.h"
+#include "FFTRealFixLenParam.h"
+#include "OscSinCos.h"
+
+
+
+
+template <int PASS>
+class FFTRealPassInverse
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ typedef FFTRealFixLenParam::DataType DataType;
+ typedef OscSinCos <DataType> OscType;
+
+ FORCEINLINE static void
+ process (long len, DataType dest_ptr [], DataType src_ptr [], const DataType f_ptr [], const DataType cos_ptr [], long cos_len, const long br_ptr [], OscType osc_list []);
+ FORCEINLINE static void
+ process_rec (long len, DataType dest_ptr [], DataType src_ptr [], const DataType cos_ptr [], long cos_len, const long br_ptr [], OscType osc_list []);
+ FORCEINLINE static void
+ process_internal (long len, DataType dest_ptr [], const DataType src_ptr [], const DataType cos_ptr [], long cos_len, const long br_ptr [], OscType osc_list []);
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ FFTRealPassInverse ();
+ ~FFTRealPassInverse ();
+ FFTRealPassInverse (const FFTRealPassInverse &other);
+ FFTRealPassInverse &
+ operator = (const FFTRealPassInverse &other);
+ bool operator == (const FFTRealPassInverse &other);
+ bool operator != (const FFTRealPassInverse &other);
+
+}; // class FFTRealPassInverse
+
+
+
+#include "FFTRealPassInverse.hpp"
+
+
+
+#endif // FFTRealPassInverse_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/FFTRealPassInverse.hpp b/demos/spectrum/3rdparty/fftreal/FFTRealPassInverse.hpp
new file mode 100644
index 0000000..5737546
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTRealPassInverse.hpp
@@ -0,0 +1,229 @@
+/*****************************************************************************
+
+ FFTRealPassInverse.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (FFTRealPassInverse_CURRENT_CODEHEADER)
+ #error Recursive inclusion of FFTRealPassInverse code header.
+#endif
+#define FFTRealPassInverse_CURRENT_CODEHEADER
+
+#if ! defined (FFTRealPassInverse_CODEHEADER_INCLUDED)
+#define FFTRealPassInverse_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "FFTRealUseTrigo.h"
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <int PASS>
+void FFTRealPassInverse <PASS>::process (long len, DataType dest_ptr [], DataType src_ptr [], const DataType f_ptr [], const DataType cos_ptr [], long cos_len, const long br_ptr [], OscType osc_list [])
+{
+ process_internal (
+ len,
+ dest_ptr,
+ f_ptr,
+ cos_ptr,
+ cos_len,
+ br_ptr,
+ osc_list
+ );
+ FFTRealPassInverse <PASS - 1>::process_rec (
+ len,
+ src_ptr,
+ dest_ptr,
+ cos_ptr,
+ cos_len,
+ br_ptr,
+ osc_list
+ );
+}
+
+
+
+template <int PASS>
+void FFTRealPassInverse <PASS>::process_rec (long len, DataType dest_ptr [], DataType src_ptr [], const DataType cos_ptr [], long cos_len, const long br_ptr [], OscType osc_list [])
+{
+ process_internal (
+ len,
+ dest_ptr,
+ src_ptr,
+ cos_ptr,
+ cos_len,
+ br_ptr,
+ osc_list
+ );
+ FFTRealPassInverse <PASS - 1>::process_rec (
+ len,
+ src_ptr,
+ dest_ptr,
+ cos_ptr,
+ cos_len,
+ br_ptr,
+ osc_list
+ );
+}
+
+template <>
+void FFTRealPassInverse <0>::process_rec (long len, DataType dest_ptr [], DataType src_ptr [], const DataType cos_ptr [], long cos_len, const long br_ptr [], OscType osc_list [])
+{
+ // Stops recursion
+}
+
+
+
+template <int PASS>
+void FFTRealPassInverse <PASS>::process_internal (long len, DataType dest_ptr [], const DataType src_ptr [], const DataType cos_ptr [], long cos_len, const long br_ptr [], OscType osc_list [])
+{
+ const long dist = 1L << (PASS - 1);
+ const long c1_r = 0;
+ const long c1_i = dist;
+ const long c2_r = dist * 2;
+ const long c2_i = dist * 3;
+ const long cend = dist * 4;
+ const long table_step = cos_len >> (PASS - 1);
+
+ enum { TRIGO_OSC = PASS - FFTRealFixLenParam::TRIGO_BD_LIMIT };
+ enum { TRIGO_DIRECT = (TRIGO_OSC >= 0) ? 1 : 0 };
+
+ long coef_index = 0;
+ do
+ {
+ const DataType * const sf = src_ptr + coef_index;
+ DataType * const df = dest_ptr + coef_index;
+
+ // Extreme coefficients are always real
+ df [c1_r] = sf [c1_r] + sf [c2_r];
+ df [c2_r] = sf [c1_r] - sf [c2_r];
+ df [c1_i] = sf [c1_i] * 2;
+ df [c2_i] = sf [c2_i] * 2;
+
+ FFTRealUseTrigo <TRIGO_DIRECT>::prepare (osc_list [TRIGO_OSC]);
+
+ // Others are conjugate complex numbers
+ for (long i = 1; i < dist; ++ i)
+ {
+ df [c1_r + i] = sf [c1_r + i] + sf [c2_r - i];
+ df [c1_i + i] = sf [c2_r + i] - sf [cend - i];
+
+ DataType c;
+ DataType s;
+ FFTRealUseTrigo <TRIGO_DIRECT>::iterate (
+ osc_list [TRIGO_OSC],
+ c,
+ s,
+ cos_ptr,
+ i * table_step,
+ (dist - i) * table_step
+ );
+
+ const DataType vr = sf [c1_r + i] - sf [c2_r - i];
+ const DataType vi = sf [c2_r + i] + sf [cend - i];
+
+ df [c2_r + i] = vr * c + vi * s;
+ df [c2_i + i] = vi * c - vr * s;
+ }
+
+ coef_index += cend;
+ }
+ while (coef_index < len);
+}
+
+template <>
+void FFTRealPassInverse <2>::process_internal (long len, DataType dest_ptr [], const DataType src_ptr [], const DataType cos_ptr [], long cos_len, const long br_ptr [], OscType osc_list [])
+{
+ // Antepenultimate pass
+ const DataType sqrt2_2 = DataType (SQRT2 * 0.5);
+
+ long coef_index = 0;
+ do
+ {
+ dest_ptr [coef_index ] = src_ptr [coef_index] + src_ptr [coef_index + 4];
+ dest_ptr [coef_index + 4] = src_ptr [coef_index] - src_ptr [coef_index + 4];
+ dest_ptr [coef_index + 2] = src_ptr [coef_index + 2] * 2;
+ dest_ptr [coef_index + 6] = src_ptr [coef_index + 6] * 2;
+
+ dest_ptr [coef_index + 1] = src_ptr [coef_index + 1] + src_ptr [coef_index + 3];
+ dest_ptr [coef_index + 3] = src_ptr [coef_index + 5] - src_ptr [coef_index + 7];
+
+ const DataType vr = src_ptr [coef_index + 1] - src_ptr [coef_index + 3];
+ const DataType vi = src_ptr [coef_index + 5] + src_ptr [coef_index + 7];
+
+ dest_ptr [coef_index + 5] = (vr + vi) * sqrt2_2;
+ dest_ptr [coef_index + 7] = (vi - vr) * sqrt2_2;
+
+ coef_index += 8;
+ }
+ while (coef_index < len);
+}
+
+template <>
+void FFTRealPassInverse <1>::process_internal (long len, DataType dest_ptr [], const DataType src_ptr [], const DataType cos_ptr [], long cos_len, const long br_ptr [], OscType osc_list [])
+{
+ // Penultimate and last pass at once
+ const long qlen = len >> 2;
+
+ long coef_index = 0;
+ do
+ {
+ const long ri_0 = br_ptr [coef_index >> 2];
+
+ const DataType b_0 = src_ptr [coef_index ] + src_ptr [coef_index + 2];
+ const DataType b_2 = src_ptr [coef_index ] - src_ptr [coef_index + 2];
+ const DataType b_1 = src_ptr [coef_index + 1] * 2;
+ const DataType b_3 = src_ptr [coef_index + 3] * 2;
+
+ dest_ptr [ri_0 ] = b_0 + b_1;
+ dest_ptr [ri_0 + 2 * qlen] = b_0 - b_1;
+ dest_ptr [ri_0 + 1 * qlen] = b_2 + b_3;
+ dest_ptr [ri_0 + 3 * qlen] = b_2 - b_3;
+
+ coef_index += 4;
+ }
+ while (coef_index < len);
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+#endif // FFTRealPassInverse_CODEHEADER_INCLUDED
+
+#undef FFTRealPassInverse_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/FFTRealSelect.h b/demos/spectrum/3rdparty/fftreal/FFTRealSelect.h
new file mode 100644
index 0000000..bd722d4
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTRealSelect.h
@@ -0,0 +1,77 @@
+/*****************************************************************************
+
+ FFTRealSelect.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (FFTRealSelect_HEADER_INCLUDED)
+#define FFTRealSelect_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "def.h"
+
+
+
+template <int P>
+class FFTRealSelect
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ FORCEINLINE static float *
+ sel_bin (float *e_ptr, float *o_ptr);
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ FFTRealSelect ();
+ ~FFTRealSelect ();
+ FFTRealSelect (const FFTRealSelect &other);
+ FFTRealSelect& operator = (const FFTRealSelect &other);
+ bool operator == (const FFTRealSelect &other);
+ bool operator != (const FFTRealSelect &other);
+
+}; // class FFTRealSelect
+
+
+
+#include "FFTRealSelect.hpp"
+
+
+
+#endif // FFTRealSelect_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/FFTRealSelect.hpp b/demos/spectrum/3rdparty/fftreal/FFTRealSelect.hpp
new file mode 100644
index 0000000..9ddf586
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTRealSelect.hpp
@@ -0,0 +1,62 @@
+/*****************************************************************************
+
+ FFTRealSelect.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (FFTRealSelect_CURRENT_CODEHEADER)
+ #error Recursive inclusion of FFTRealSelect code header.
+#endif
+#define FFTRealSelect_CURRENT_CODEHEADER
+
+#if ! defined (FFTRealSelect_CODEHEADER_INCLUDED)
+#define FFTRealSelect_CODEHEADER_INCLUDED
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <int P>
+float * FFTRealSelect <P>::sel_bin (float *e_ptr, float *o_ptr)
+{
+ return (o_ptr);
+}
+
+
+
+template <>
+float * FFTRealSelect <0>::sel_bin (float *e_ptr, float *o_ptr)
+{
+ return (e_ptr);
+}
+
+
+
+#endif // FFTRealSelect_CODEHEADER_INCLUDED
+
+#undef FFTRealSelect_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/FFTRealUseTrigo.h b/demos/spectrum/3rdparty/fftreal/FFTRealUseTrigo.h
new file mode 100644
index 0000000..c4368ee
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTRealUseTrigo.h
@@ -0,0 +1,101 @@
+/*****************************************************************************
+
+ FFTRealUseTrigo.h
+ Copyright (c) 2005 Laurent de Soras
+
+Template parameters:
+ - ALGO: algorithm choice. 0 = table, other = oscillator
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (FFTRealUseTrigo_HEADER_INCLUDED)
+#define FFTRealUseTrigo_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "def.h"
+#include "FFTRealFixLenParam.h"
+#include "OscSinCos.h"
+
+
+
+template <int ALGO>
+class FFTRealUseTrigo
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ typedef FFTRealFixLenParam::DataType DataType;
+ typedef OscSinCos <DataType> OscType;
+
+ FORCEINLINE static void
+ prepare (OscType &osc);
+ FORCEINLINE static void
+ iterate (OscType &osc, DataType &c, DataType &s, const DataType cos_ptr [], long index_c, long index_s);
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ FFTRealUseTrigo ();
+ ~FFTRealUseTrigo ();
+ FFTRealUseTrigo (const FFTRealUseTrigo &other);
+ FFTRealUseTrigo &
+ operator = (const FFTRealUseTrigo &other);
+ bool operator == (const FFTRealUseTrigo &other);
+ bool operator != (const FFTRealUseTrigo &other);
+
+}; // class FFTRealUseTrigo
+
+
+
+#include "FFTRealUseTrigo.hpp"
+
+
+
+#endif // FFTRealUseTrigo_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/FFTRealUseTrigo.hpp b/demos/spectrum/3rdparty/fftreal/FFTRealUseTrigo.hpp
new file mode 100644
index 0000000..aa968b8
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/FFTRealUseTrigo.hpp
@@ -0,0 +1,91 @@
+/*****************************************************************************
+
+ FFTRealUseTrigo.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (FFTRealUseTrigo_CURRENT_CODEHEADER)
+ #error Recursive inclusion of FFTRealUseTrigo code header.
+#endif
+#define FFTRealUseTrigo_CURRENT_CODEHEADER
+
+#if ! defined (FFTRealUseTrigo_CODEHEADER_INCLUDED)
+#define FFTRealUseTrigo_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "OscSinCos.h"
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <int ALGO>
+void FFTRealUseTrigo <ALGO>::prepare (OscType &osc)
+{
+ osc.clear_buffers ();
+}
+
+template <>
+void FFTRealUseTrigo <0>::prepare (OscType &osc)
+{
+ // Nothing
+}
+
+
+
+template <int ALGO>
+void FFTRealUseTrigo <ALGO>::iterate (OscType &osc, DataType &c, DataType &s, const DataType cos_ptr [], long index_c, long index_s)
+{
+ osc.step ();
+ c = osc.get_cos ();
+ s = osc.get_sin ();
+}
+
+template <>
+void FFTRealUseTrigo <0>::iterate (OscType &osc, DataType &c, DataType &s, const DataType cos_ptr [], long index_c, long index_s)
+{
+ c = cos_ptr [index_c];
+ s = cos_ptr [index_s];
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+#endif // FFTRealUseTrigo_CODEHEADER_INCLUDED
+
+#undef FFTRealUseTrigo_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/OscSinCos.h b/demos/spectrum/3rdparty/fftreal/OscSinCos.h
new file mode 100644
index 0000000..775fc14
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/OscSinCos.h
@@ -0,0 +1,106 @@
+/*****************************************************************************
+
+ OscSinCos.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (OscSinCos_HEADER_INCLUDED)
+#define OscSinCos_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "def.h"
+
+
+
+template <class T>
+class OscSinCos
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ typedef T DataType;
+
+ OscSinCos ();
+
+ FORCEINLINE void
+ set_step (double angle_rad);
+
+ FORCEINLINE DataType
+ get_cos () const;
+ FORCEINLINE DataType
+ get_sin () const;
+ FORCEINLINE void
+ step ();
+ FORCEINLINE void
+ clear_buffers ();
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ DataType _pos_cos; // Current phase expressed with sin and cos. [-1 ; 1]
+ DataType _pos_sin; // -
+ DataType _step_cos; // Phase increment per step, [-1 ; 1]
+ DataType _step_sin; // -
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ OscSinCos (const OscSinCos &other);
+ OscSinCos & operator = (const OscSinCos &other);
+ bool operator == (const OscSinCos &other);
+ bool operator != (const OscSinCos &other);
+
+}; // class OscSinCos
+
+
+
+#include "OscSinCos.hpp"
+
+
+
+#endif // OscSinCos_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/OscSinCos.hpp b/demos/spectrum/3rdparty/fftreal/OscSinCos.hpp
new file mode 100644
index 0000000..749aef0
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/OscSinCos.hpp
@@ -0,0 +1,122 @@
+/*****************************************************************************
+
+ OscSinCos.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (OscSinCos_CURRENT_CODEHEADER)
+ #error Recursive inclusion of OscSinCos code header.
+#endif
+#define OscSinCos_CURRENT_CODEHEADER
+
+#if ! defined (OscSinCos_CODEHEADER_INCLUDED)
+#define OscSinCos_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include <cmath>
+
+namespace std { }
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class T>
+OscSinCos <T>::OscSinCos ()
+: _pos_cos (1)
+, _pos_sin (0)
+, _step_cos (1)
+, _step_sin (0)
+{
+ // Nothing
+}
+
+
+
+template <class T>
+void OscSinCos <T>::set_step (double angle_rad)
+{
+ using namespace std;
+
+ _step_cos = static_cast <DataType> (cos (angle_rad));
+ _step_sin = static_cast <DataType> (sin (angle_rad));
+}
+
+
+
+template <class T>
+typename OscSinCos <T>::DataType OscSinCos <T>::get_cos () const
+{
+ return (_pos_cos);
+}
+
+
+
+template <class T>
+typename OscSinCos <T>::DataType OscSinCos <T>::get_sin () const
+{
+ return (_pos_sin);
+}
+
+
+
+template <class T>
+void OscSinCos <T>::step ()
+{
+ const DataType old_cos = _pos_cos;
+ const DataType old_sin = _pos_sin;
+
+ _pos_cos = old_cos * _step_cos - old_sin * _step_sin;
+ _pos_sin = old_cos * _step_sin + old_sin * _step_cos;
+}
+
+
+
+template <class T>
+void OscSinCos <T>::clear_buffers ()
+{
+ _pos_cos = static_cast <DataType> (1);
+ _pos_sin = static_cast <DataType> (0);
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+#endif // OscSinCos_CODEHEADER_INCLUDED
+
+#undef OscSinCos_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/TestAccuracy.h b/demos/spectrum/3rdparty/fftreal/TestAccuracy.h
new file mode 100644
index 0000000..4b07a6b
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/TestAccuracy.h
@@ -0,0 +1,105 @@
+/*****************************************************************************
+
+ TestAccuracy.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (TestAccuracy_HEADER_INCLUDED)
+#define TestAccuracy_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class FO>
+class TestAccuracy
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ typedef typename FO::DataType DataType;
+ typedef long double BigFloat; // To get maximum accuracy during intermediate calculations
+
+ static int perform_test_single_object (FO &fft);
+ static int perform_test_d (FO &fft, const char *class_name_0);
+ static int perform_test_i (FO &fft, const char *class_name_0);
+ static int perform_test_di (FO &fft, const char *class_name_0);
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ enum { NBR_ACC_TESTS = 10 * 1000 * 1000 };
+ enum { MAX_NBR_TESTS = 10000 };
+
+ static void compute_tf (DataType s [], const DataType x [], long length);
+ static void compute_itf (DataType x [], const DataType s [], long length);
+ static int compare_vect_display (const DataType x_ptr [], const DataType y_ptr [], long len, BigFloat &max_err_rel);
+ static BigFloat
+ compute_power (const DataType x_ptr [], long len);
+ static BigFloat
+ compute_power (const DataType x_ptr [], const DataType y_ptr [], long len);
+ static void compare_vect (const DataType x_ptr [], const DataType y_ptr [], BigFloat &power, long &max_err_pos, long len);
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ TestAccuracy ();
+ ~TestAccuracy ();
+ TestAccuracy (const TestAccuracy &other);
+ TestAccuracy & operator = (const TestAccuracy &other);
+ bool operator == (const TestAccuracy &other);
+ bool operator != (const TestAccuracy &other);
+
+}; // class TestAccuracy
+
+
+
+#include "TestAccuracy.hpp"
+
+
+
+#endif // TestAccuracy_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/TestAccuracy.hpp b/demos/spectrum/3rdparty/fftreal/TestAccuracy.hpp
new file mode 100644
index 0000000..5c794f7
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/TestAccuracy.hpp
@@ -0,0 +1,472 @@
+/*****************************************************************************
+
+ TestAccuracy.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (TestAccuracy_CURRENT_CODEHEADER)
+ #error Recursive inclusion of TestAccuracy code header.
+#endif
+#define TestAccuracy_CURRENT_CODEHEADER
+
+#if ! defined (TestAccuracy_CODEHEADER_INCLUDED)
+#define TestAccuracy_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "def.h"
+#include "test_fnc.h"
+#include "TestWhiteNoiseGen.h"
+
+#include <typeinfo>
+#include <vector>
+
+#include <cmath>
+#include <cstdio>
+
+
+
+static const double TestAccuracy_LN10 = 2.3025850929940456840179914546844;
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class FO>
+int TestAccuracy <FO>::perform_test_single_object (FO &fft)
+{
+ assert (&fft != 0);
+
+ using namespace std;
+
+ int ret_val = 0;
+
+ const std::type_info & ti = typeid (fft);
+ const char * class_name_0 = ti.name ();
+
+ if (ret_val == 0)
+ {
+ ret_val = perform_test_d (fft, class_name_0);
+ }
+ if (ret_val == 0)
+ {
+ ret_val = perform_test_i (fft, class_name_0);
+ }
+ if (ret_val == 0)
+ {
+ ret_val = perform_test_di (fft, class_name_0);
+ }
+
+ if (ret_val == 0)
+ {
+ printf ("\n");
+ }
+
+ return (ret_val);
+}
+
+
+
+template <class FO>
+int TestAccuracy <FO>::perform_test_d (FO &fft, const char *class_name_0)
+{
+ assert (&fft != 0);
+ assert (class_name_0 != 0);
+
+ using namespace std;
+
+ int ret_val = 0;
+ const long len = fft.get_length ();
+ const long nbr_tests = limit (
+ NBR_ACC_TESTS / len / len,
+ 1L,
+ static_cast <long> (MAX_NBR_TESTS)
+ );
+
+ printf ("Testing %s::do_fft () [%ld samples]... ", class_name_0, len);
+ fflush (stdout);
+ TestWhiteNoiseGen <DataType> noise;
+ std::vector <DataType> x (len);
+ std::vector <DataType> s1 (len);
+ std::vector <DataType> s2 (len);
+ BigFloat err_avg = 0;
+
+ for (long test = 0; test < nbr_tests && ret_val == 0; ++ test)
+ {
+ noise.generate (&x [0], len);
+ fft.do_fft (&s1 [0], &x [0]);
+ compute_tf (&s2 [0], &x [0], len);
+
+ BigFloat max_err;
+ compare_vect_display (&s1 [0], &s2 [0], len, max_err);
+ err_avg += max_err;
+ }
+ err_avg /= NBR_ACC_TESTS;
+
+ printf ("done.\n");
+ printf (
+ "Average maximum error: %.6f %% (%f dB)\n",
+ static_cast <double> (err_avg * 100),
+ static_cast <double> ((20 / TestAccuracy_LN10) * log (err_avg))
+ );
+
+ return (ret_val);
+}
+
+
+
+template <class FO>
+int TestAccuracy <FO>::perform_test_i (FO &fft, const char *class_name_0)
+{
+ assert (&fft != 0);
+ assert (class_name_0 != 0);
+
+ using namespace std;
+
+ int ret_val = 0;
+ const long len = fft.get_length ();
+ const long nbr_tests = limit (
+ NBR_ACC_TESTS / len / len,
+ 10L,
+ static_cast <long> (MAX_NBR_TESTS)
+ );
+
+ printf ("Testing %s::do_ifft () [%ld samples]... ", class_name_0, len);
+ fflush (stdout);
+ TestWhiteNoiseGen <DataType> noise;
+ std::vector <DataType> s (len);
+ std::vector <DataType> x1 (len);
+ std::vector <DataType> x2 (len);
+ BigFloat err_avg = 0;
+
+ for (long test = 0; test < nbr_tests && ret_val == 0; ++ test)
+ {
+ noise.generate (&s [0], len);
+ fft.do_ifft (&s [0], &x1 [0]);
+ compute_itf (&x2 [0], &s [0], len);
+
+ BigFloat max_err;
+ compare_vect_display (&x1 [0], &x2 [0], len, max_err);
+ err_avg += max_err;
+ }
+ err_avg /= NBR_ACC_TESTS;
+
+ printf ("done.\n");
+ printf (
+ "Average maximum error: %.6f %% (%f dB)\n",
+ static_cast <double> (err_avg * 100),
+ static_cast <double> ((20 / TestAccuracy_LN10) * log (err_avg))
+ );
+
+ return (ret_val);
+}
+
+
+
+template <class FO>
+int TestAccuracy <FO>::perform_test_di (FO &fft, const char *class_name_0)
+{
+ assert (&fft != 0);
+ assert (class_name_0 != 0);
+
+ using namespace std;
+
+ int ret_val = 0;
+ const long len = fft.get_length ();
+ const long nbr_tests = limit (
+ NBR_ACC_TESTS / len / len,
+ 1L,
+ static_cast <long> (MAX_NBR_TESTS)
+ );
+
+ printf (
+ "Testing %s::do_fft () / do_ifft () / rescale () [%ld samples]... ",
+ class_name_0,
+ len
+ );
+ fflush (stdout);
+ TestWhiteNoiseGen <DataType> noise;
+ std::vector <DataType> x (len);
+ std::vector <DataType> s (len);
+ std::vector <DataType> y (len);
+ BigFloat err_avg = 0;
+
+ for (long test = 0; test < nbr_tests && ret_val == 0; ++ test)
+ {
+ noise.generate (&x [0], len);
+ fft.do_fft (&s [0], &x [0]);
+ fft.do_ifft (&s [0], &y [0]);
+ fft.rescale (&y [0]);
+
+ BigFloat max_err;
+ compare_vect_display (&x [0], &y [0], len, max_err);
+ err_avg += max_err;
+ }
+ err_avg /= NBR_ACC_TESTS;
+
+ printf ("done.\n");
+ printf (
+ "Average maximum error: %.6f %% (%f dB)\n",
+ static_cast <double> (err_avg * 100),
+ static_cast <double> ((20 / TestAccuracy_LN10) * log (err_avg))
+ );
+
+ return (ret_val);
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+// Positive transform
+template <class FO>
+void TestAccuracy <FO>::compute_tf (DataType s [], const DataType x [], long length)
+{
+ assert (s != 0);
+ assert (x != 0);
+ assert (length >= 2);
+ assert ((length & 1) == 0);
+
+ const long nbr_bins = length >> 1;
+
+ // DC and Nyquist
+ BigFloat dc = 0;
+ BigFloat ny = 0;
+ for (long pos = 0; pos < length; pos += 2)
+ {
+ const BigFloat even = x [pos ];
+ const BigFloat odd = x [pos + 1];
+ dc += even + odd;
+ ny += even - odd;
+ }
+ s [0 ] = static_cast <DataType> (dc);
+ s [nbr_bins] = static_cast <DataType> (ny);
+
+ // Regular bins
+ for (long bin = 1; bin < nbr_bins; ++ bin)
+ {
+ BigFloat sum_r = 0;
+ BigFloat sum_i = 0;
+
+ const BigFloat m = bin * static_cast <BigFloat> (2 * PI) / length;
+
+ for (long pos = 0; pos < length; ++pos)
+ {
+ using namespace std;
+
+ const BigFloat phase = pos * m;
+ const BigFloat e_r = cos (phase);
+ const BigFloat e_i = sin (phase);
+
+ sum_r += x [pos] * e_r;
+ sum_i += x [pos] * e_i;
+ }
+
+ s [ bin] = static_cast <DataType> (sum_r);
+ s [nbr_bins + bin] = static_cast <DataType> (sum_i);
+ }
+}
+
+
+
+// Negative transform
+template <class FO>
+void TestAccuracy <FO>::compute_itf (DataType x [], const DataType s [], long length)
+{
+ assert (s != 0);
+ assert (x != 0);
+ assert (length >= 2);
+ assert ((length & 1) == 0);
+
+ const long nbr_bins = length >> 1;
+
+ // DC and Nyquist
+ BigFloat dc = s [0 ];
+ BigFloat ny = s [nbr_bins];
+
+ // Regular bins
+ for (long pos = 0; pos < length; ++pos)
+ {
+ BigFloat sum = dc + ny * (1 - 2 * (pos & 1));
+
+ const BigFloat m = pos * static_cast <BigFloat> (-2 * PI) / length;
+
+ for (long bin = 1; bin < nbr_bins; ++ bin)
+ {
+ using namespace std;
+
+ const BigFloat phase = bin * m;
+ const BigFloat e_r = cos (phase);
+ const BigFloat e_i = sin (phase);
+
+ sum += 2 * ( e_r * s [bin ]
+ - e_i * s [bin + nbr_bins]);
+ }
+
+ x [pos] = static_cast <DataType> (sum);
+ }
+}
+
+
+
+template <class FO>
+int TestAccuracy <FO>::compare_vect_display (const DataType x_ptr [], const DataType y_ptr [], long len, BigFloat &max_err_rel)
+{
+ assert (x_ptr != 0);
+ assert (y_ptr != 0);
+ assert (len > 0);
+ assert (&max_err_rel != 0);
+
+ using namespace std;
+
+ int ret_val = 0;
+
+ BigFloat power = compute_power (&x_ptr [0], &y_ptr [0], len);
+ BigFloat power_dif;
+ long max_err_pos;
+ compare_vect (&x_ptr [0], &y_ptr [0], power_dif, max_err_pos, len);
+
+ if (power == 0)
+ {
+ power = power_dif;
+ }
+ const BigFloat power_err_rel = power_dif / power;
+
+ BigFloat max_err = 0;
+ max_err_rel = 0;
+ if (max_err_pos >= 0)
+ {
+ max_err = y_ptr [max_err_pos] - x_ptr [max_err_pos];
+ max_err_rel = 2 * fabs (max_err) / ( fabs (y_ptr [max_err_pos])
+ + fabs (x_ptr [max_err_pos]));
+ }
+
+ if (power_err_rel > 0.001)
+ {
+ printf ("Power error : %f (%.6f %%)\n",
+ static_cast <double> (power_err_rel),
+ static_cast <double> (power_err_rel * 100)
+ );
+ if (max_err_pos >= 0)
+ {
+ printf (
+ "Maximum error: %f - %f = %f (%f)\n",
+ static_cast <double> (y_ptr [max_err_pos]),
+ static_cast <double> (x_ptr [max_err_pos]),
+ static_cast <double> (max_err),
+ static_cast <double> (max_err_pos)
+ );
+ }
+ }
+
+ return (ret_val);
+}
+
+
+
+template <class FO>
+typename TestAccuracy <FO>::BigFloat TestAccuracy <FO>::compute_power (const DataType x_ptr [], long len)
+{
+ assert (x_ptr != 0);
+ assert (len > 0);
+
+ BigFloat power = 0;
+ for (long pos = 0; pos < len; ++pos)
+ {
+ const BigFloat val = x_ptr [pos];
+
+ power += val * val;
+ }
+
+ using namespace std;
+
+ power = sqrt (power) / len;
+
+ return (power);
+}
+
+
+
+template <class FO>
+typename TestAccuracy <FO>::BigFloat TestAccuracy <FO>::compute_power (const DataType x_ptr [], const DataType y_ptr [], long len)
+{
+ assert (x_ptr != 0);
+ assert (y_ptr != 0);
+ assert (len > 0);
+
+ return ((compute_power (x_ptr, len) + compute_power (y_ptr, len)) * 0.5);
+}
+
+
+
+template <class FO>
+void TestAccuracy <FO>::compare_vect (const DataType x_ptr [], const DataType y_ptr [], BigFloat &power, long &max_err_pos, long len)
+{
+ assert (x_ptr != 0);
+ assert (y_ptr != 0);
+ assert (len > 0);
+ assert (&power != 0);
+ assert (&max_err_pos != 0);
+
+ power = 0;
+ BigFloat max_dif2 = 0;
+ max_err_pos = -1;
+
+ for (long pos = 0; pos < len; ++pos)
+ {
+ const BigFloat x = x_ptr [pos];
+ const BigFloat y = y_ptr [pos];
+ const BigFloat dif = y - x;
+ const BigFloat dif2 = dif * dif;
+
+ power += dif2;
+ if (dif2 > max_dif2)
+ {
+ max_err_pos = pos;
+ max_dif2 = dif2;
+ }
+ }
+
+ using namespace std;
+
+ power = sqrt (power) / len;
+}
+
+
+
+#endif // TestAccuracy_CODEHEADER_INCLUDED
+
+#undef TestAccuracy_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/TestHelperFixLen.h b/demos/spectrum/3rdparty/fftreal/TestHelperFixLen.h
new file mode 100644
index 0000000..ecff96d
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/TestHelperFixLen.h
@@ -0,0 +1,93 @@
+/*****************************************************************************
+
+ TestHelperFixLen.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (TestHelperFixLen_HEADER_INCLUDED)
+#define TestHelperFixLen_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "FFTRealFixLen.h"
+
+
+
+template <int L>
+class TestHelperFixLen
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ typedef FFTRealFixLen <L> FftType;
+
+ static void perform_test_accuracy (int &ret_val);
+ static void perform_test_speed (int &ret_val);
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ TestHelperFixLen ();
+ ~TestHelperFixLen ();
+ TestHelperFixLen (const TestHelperFixLen &other);
+ TestHelperFixLen &
+ operator = (const TestHelperFixLen &other);
+ bool operator == (const TestHelperFixLen &other);
+ bool operator != (const TestHelperFixLen &other);
+
+}; // class TestHelperFixLen
+
+
+
+#include "TestHelperFixLen.hpp"
+
+
+
+#endif // TestHelperFixLen_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/TestHelperFixLen.hpp b/demos/spectrum/3rdparty/fftreal/TestHelperFixLen.hpp
new file mode 100644
index 0000000..25048b9
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/TestHelperFixLen.hpp
@@ -0,0 +1,93 @@
+/*****************************************************************************
+
+ TestHelperFixLen.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (TestHelperFixLen_CURRENT_CODEHEADER)
+ #error Recursive inclusion of TestHelperFixLen code header.
+#endif
+#define TestHelperFixLen_CURRENT_CODEHEADER
+
+#if ! defined (TestHelperFixLen_CODEHEADER_INCLUDED)
+#define TestHelperFixLen_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "test_settings.h"
+
+#include "TestAccuracy.h"
+#if defined (test_settings_SPEED_TEST_ENABLED)
+ #include "TestSpeed.h"
+#endif
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <int L>
+void TestHelperFixLen <L>::perform_test_accuracy (int &ret_val)
+{
+ if (ret_val == 0)
+ {
+ FftType fft;
+ ret_val = TestAccuracy <FftType>::perform_test_single_object (fft);
+ }
+}
+
+
+
+template <int L>
+void TestHelperFixLen <L>::perform_test_speed (int &ret_val)
+{
+#if defined (test_settings_SPEED_TEST_ENABLED)
+
+ if (ret_val == 0)
+ {
+ FftType fft;
+ ret_val = TestSpeed <FftType>::perform_test_single_object (fft);
+ }
+
+#endif
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+#endif // TestHelperFixLen_CODEHEADER_INCLUDED
+
+#undef TestHelperFixLen_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/TestHelperNormal.h b/demos/spectrum/3rdparty/fftreal/TestHelperNormal.h
new file mode 100644
index 0000000..a7bff5c
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/TestHelperNormal.h
@@ -0,0 +1,94 @@
+/*****************************************************************************
+
+ TestHelperNormal.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (TestHelperNormal_HEADER_INCLUDED)
+#define TestHelperNormal_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "FFTReal.h"
+
+
+
+template <class DT>
+class TestHelperNormal
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ typedef DT DataType;
+ typedef FFTReal <DataType> FftType;
+
+ static void perform_test_accuracy (int &ret_val);
+ static void perform_test_speed (int &ret_val);
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ TestHelperNormal ();
+ ~TestHelperNormal ();
+ TestHelperNormal (const TestHelperNormal &other);
+ TestHelperNormal &
+ operator = (const TestHelperNormal &other);
+ bool operator == (const TestHelperNormal &other);
+ bool operator != (const TestHelperNormal &other);
+
+}; // class TestHelperNormal
+
+
+
+#include "TestHelperNormal.hpp"
+
+
+
+#endif // TestHelperNormal_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/TestHelperNormal.hpp b/demos/spectrum/3rdparty/fftreal/TestHelperNormal.hpp
new file mode 100644
index 0000000..e037696
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/TestHelperNormal.hpp
@@ -0,0 +1,99 @@
+/*****************************************************************************
+
+ TestHelperNormal.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (TestHelperNormal_CURRENT_CODEHEADER)
+ #error Recursive inclusion of TestHelperNormal code header.
+#endif
+#define TestHelperNormal_CURRENT_CODEHEADER
+
+#if ! defined (TestHelperNormal_CODEHEADER_INCLUDED)
+#define TestHelperNormal_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "test_settings.h"
+
+#include "TestAccuracy.h"
+#if defined (test_settings_SPEED_TEST_ENABLED)
+ #include "TestSpeed.h"
+#endif
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class DT>
+void TestHelperNormal <DT>::perform_test_accuracy (int &ret_val)
+{
+ const int len_arr [] = { 1, 2, 3, 4, 7, 8, 10, 12 };
+ const int nbr_len = sizeof (len_arr) / sizeof (len_arr [0]);
+ for (int k = 0; k < nbr_len && ret_val == 0; ++k)
+ {
+ const long len = 1L << (len_arr [k]);
+ FftType fft (len);
+ ret_val = TestAccuracy <FftType>::perform_test_single_object (fft);
+ }
+}
+
+
+
+template <class DT>
+void TestHelperNormal <DT>::perform_test_speed (int &ret_val)
+{
+#if defined (test_settings_SPEED_TEST_ENABLED)
+
+ const int len_arr [] = { 1, 2, 3, 4, 7, 8, 10, 12, 14, 16, 18, 20, 22 };
+ const int nbr_len = sizeof (len_arr) / sizeof (len_arr [0]);
+ for (int k = 0; k < nbr_len && ret_val == 0; ++k)
+ {
+ const long len = 1L << (len_arr [k]);
+ FftType fft (len);
+ ret_val = TestSpeed <FftType>::perform_test_single_object (fft);
+ }
+
+#endif
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+#endif // TestHelperNormal_CODEHEADER_INCLUDED
+
+#undef TestHelperNormal_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/TestSpeed.h b/demos/spectrum/3rdparty/fftreal/TestSpeed.h
new file mode 100644
index 0000000..2295781
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/TestSpeed.h
@@ -0,0 +1,95 @@
+/*****************************************************************************
+
+ TestSpeed.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (TestSpeed_HEADER_INCLUDED)
+#define TestSpeed_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class FO>
+class TestSpeed
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ typedef typename FO::DataType DataType;
+
+ static int perform_test_single_object (FO &fft);
+ static int perform_test_d (FO &fft, const char *class_name_0);
+ static int perform_test_i (FO &fft, const char *class_name_0);
+ static int perform_test_di (FO &fft, const char *class_name_0);
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ enum { NBR_SPD_TESTS = 10 * 1000 * 1000 };
+ enum { MAX_NBR_TESTS = 10000 };
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ TestSpeed ();
+ ~TestSpeed ();
+ TestSpeed (const TestSpeed &other);
+ TestSpeed & operator = (const TestSpeed &other);
+ bool operator == (const TestSpeed &other);
+ bool operator != (const TestSpeed &other);
+
+}; // class TestSpeed
+
+
+
+#include "TestSpeed.hpp"
+
+
+
+#endif // TestSpeed_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/TestSpeed.hpp b/demos/spectrum/3rdparty/fftreal/TestSpeed.hpp
new file mode 100644
index 0000000..e716b2a
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/TestSpeed.hpp
@@ -0,0 +1,223 @@
+/*****************************************************************************
+
+ TestSpeed.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (TestSpeed_CURRENT_CODEHEADER)
+ #error Recursive inclusion of TestSpeed code header.
+#endif
+#define TestSpeed_CURRENT_CODEHEADER
+
+#if ! defined (TestSpeed_CODEHEADER_INCLUDED)
+#define TestSpeed_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "test_fnc.h"
+#include "stopwatch/StopWatch.h"
+#include "TestWhiteNoiseGen.h"
+
+#include <typeinfo>
+
+#include <cstdio>
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class FO>
+int TestSpeed <FO>::perform_test_single_object (FO &fft)
+{
+ assert (&fft != 0);
+
+ int ret_val = 0;
+
+ const std::type_info & ti = typeid (fft);
+ const char * class_name_0 = ti.name ();
+
+ if (ret_val == 0)
+ {
+ perform_test_d (fft, class_name_0);
+ }
+ if (ret_val == 0)
+ {
+ perform_test_i (fft, class_name_0);
+ }
+ if (ret_val == 0)
+ {
+ perform_test_di (fft, class_name_0);
+ }
+
+ if (ret_val == 0)
+ {
+ printf ("\n");
+ }
+
+ return (ret_val);
+}
+
+
+
+template <class FO>
+int TestSpeed <FO>::perform_test_d (FO &fft, const char *class_name_0)
+{
+ assert (&fft != 0);
+ assert (class_name_0 != 0);
+
+ const long len = fft.get_length ();
+ const long nbr_tests = limit (
+ static_cast <long> (NBR_SPD_TESTS / len / len),
+ 1L,
+ static_cast <long> (MAX_NBR_TESTS)
+ );
+
+ TestWhiteNoiseGen <DataType> noise;
+ std::vector <DataType> x (len, 0);
+ std::vector <DataType> s (len);
+ noise.generate (&x [0], len);
+
+ printf (
+ "%s::do_fft () speed test [%ld samples]... ",
+ class_name_0,
+ len
+ );
+ fflush (stdout);
+
+ stopwatch::StopWatch chrono;
+ chrono.start ();
+ for (long test = 0; test < nbr_tests; ++ test)
+ {
+ fft.do_fft (&s [0], &x [0]);
+ chrono.stop_lap ();
+ }
+
+ printf ("%.1f clocks/sample\n", chrono.get_time_best_lap (len));
+
+ return (0);
+}
+
+
+
+template <class FO>
+int TestSpeed <FO>::perform_test_i (FO &fft, const char *class_name_0)
+{
+ assert (&fft != 0);
+ assert (class_name_0 != 0);
+
+ const long len = fft.get_length ();
+ const long nbr_tests = limit (
+ static_cast <long> (NBR_SPD_TESTS / len / len),
+ 1L,
+ static_cast <long> (MAX_NBR_TESTS)
+ );
+
+ TestWhiteNoiseGen <DataType> noise;
+ std::vector <DataType> x (len);
+ std::vector <DataType> s (len, 0);
+ noise.generate (&s [0], len);
+
+ printf (
+ "%s::do_ifft () speed test [%ld samples]... ",
+ class_name_0,
+ len
+ );
+ fflush (stdout);
+
+ stopwatch::StopWatch chrono;
+ chrono.start ();
+ for (long test = 0; test < nbr_tests; ++ test)
+ {
+ fft.do_ifft (&s [0], &x [0]);
+ chrono.stop_lap ();
+ }
+
+ printf ("%.1f clocks/sample\n", chrono.get_time_best_lap (len));
+
+ return (0);
+}
+
+
+
+template <class FO>
+int TestSpeed <FO>::perform_test_di (FO &fft, const char *class_name_0)
+{
+ assert (&fft != 0);
+ assert (class_name_0 != 0);
+
+ const long len = fft.get_length ();
+ const long nbr_tests = limit (
+ static_cast <long> (NBR_SPD_TESTS / len / len),
+ 1L,
+ static_cast <long> (MAX_NBR_TESTS)
+ );
+
+ TestWhiteNoiseGen <DataType> noise;
+ std::vector <DataType> x (len, 0);
+ std::vector <DataType> s (len);
+ std::vector <DataType> y (len);
+ noise.generate (&x [0], len);
+
+ printf (
+ "%s::do_fft () / do_ifft () / rescale () speed test [%ld samples]... ",
+ class_name_0,
+ len
+ );
+ fflush (stdout);
+
+ stopwatch::StopWatch chrono;
+
+ chrono.start ();
+ for (long test = 0; test < nbr_tests; ++ test)
+ {
+ fft.do_fft (&s [0], &x [0]);
+ fft.do_ifft (&s [0], &y [0]);
+ fft.rescale (&y [0]);
+ chrono.stop_lap ();
+ }
+
+ printf ("%.1f clocks/sample\n", chrono.get_time_best_lap (len));
+
+ return (0);
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+#endif // TestSpeed_CODEHEADER_INCLUDED
+
+#undef TestSpeed_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/TestWhiteNoiseGen.h b/demos/spectrum/3rdparty/fftreal/TestWhiteNoiseGen.h
new file mode 100644
index 0000000..d815f8e
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/TestWhiteNoiseGen.h
@@ -0,0 +1,95 @@
+/*****************************************************************************
+
+ TestWhiteNoiseGen.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (TestWhiteNoiseGen_HEADER_INCLUDED)
+#define TestWhiteNoiseGen_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class DT>
+class TestWhiteNoiseGen
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ typedef DT DataType;
+
+ TestWhiteNoiseGen ();
+ virtual ~TestWhiteNoiseGen () {}
+
+ void generate (DataType data_ptr [], long len);
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ typedef unsigned long StateType;
+
+ StateType _rand_state;
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ TestWhiteNoiseGen (const TestWhiteNoiseGen &other);
+ TestWhiteNoiseGen &
+ operator = (const TestWhiteNoiseGen &other);
+ bool operator == (const TestWhiteNoiseGen &other);
+ bool operator != (const TestWhiteNoiseGen &other);
+
+}; // class TestWhiteNoiseGen
+
+
+
+#include "TestWhiteNoiseGen.hpp"
+
+
+
+#endif // TestWhiteNoiseGen_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/TestWhiteNoiseGen.hpp b/demos/spectrum/3rdparty/fftreal/TestWhiteNoiseGen.hpp
new file mode 100644
index 0000000..13b7eb3
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/TestWhiteNoiseGen.hpp
@@ -0,0 +1,91 @@
+/*****************************************************************************
+
+ TestWhiteNoiseGen.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (TestWhiteNoiseGen_CURRENT_CODEHEADER)
+ #error Recursive inclusion of TestWhiteNoiseGen code header.
+#endif
+#define TestWhiteNoiseGen_CURRENT_CODEHEADER
+
+#if ! defined (TestWhiteNoiseGen_CODEHEADER_INCLUDED)
+#define TestWhiteNoiseGen_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class DT>
+TestWhiteNoiseGen <DT>::TestWhiteNoiseGen ()
+: _rand_state (0)
+{
+ _rand_state = reinterpret_cast <StateType> (this);
+}
+
+
+
+template <class DT>
+void TestWhiteNoiseGen <DT>::generate (DataType data_ptr [], long len)
+{
+ assert (data_ptr != 0);
+ assert (len > 0);
+
+ const DataType one = static_cast <DataType> (1);
+ const DataType mul = one / static_cast <DataType> (0x80000000UL);
+
+ long pos = 0;
+ do
+ {
+ const DataType x = static_cast <DataType> (_rand_state & 0xFFFFFFFFUL);
+ data_ptr [pos] = x * mul - one;
+
+ _rand_state = _rand_state * 1234567UL + 890123UL;
+
+ ++ pos;
+ }
+ while (pos < len);
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+#endif // TestWhiteNoiseGen_CODEHEADER_INCLUDED
+
+#undef TestWhiteNoiseGen_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/bwins/fftrealu.def b/demos/spectrum/3rdparty/fftreal/bwins/fftrealu.def
new file mode 100644
index 0000000..7a79397
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/bwins/fftrealu.def
@@ -0,0 +1,5 @@
+EXPORTS
+ ??0FFTRealWrapper@@QAE@XZ @ 1 NONAME ; FFTRealWrapper::FFTRealWrapper(void)
+ ??1FFTRealWrapper@@QAE@XZ @ 2 NONAME ; FFTRealWrapper::~FFTRealWrapper(void)
+ ?calculateFFT@FFTRealWrapper@@QAEXQAMQBM@Z @ 3 NONAME ; void FFTRealWrapper::calculateFFT(float * const, float const * const)
+
diff --git a/demos/spectrum/3rdparty/fftreal/def.h b/demos/spectrum/3rdparty/fftreal/def.h
new file mode 100644
index 0000000..99c545f
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/def.h
@@ -0,0 +1,60 @@
+/*****************************************************************************
+
+ def.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (def_HEADER_INCLUDED)
+#define def_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+
+const double PI = 3.1415926535897932384626433832795;
+const double SQRT2 = 1.41421356237309514547462185873883;
+
+#if defined (_MSC_VER)
+
+ #define FORCEINLINE __forceinline
+
+#else
+
+ #define FORCEINLINE inline
+
+#endif
+
+
+
+#endif // def_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/eabi/fftrealu.def b/demos/spectrum/3rdparty/fftreal/eabi/fftrealu.def
new file mode 100644
index 0000000..f95a441
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/eabi/fftrealu.def
@@ -0,0 +1,7 @@
+EXPORTS
+ _ZN14FFTRealWrapper12calculateFFTEPfPKf @ 1 NONAME
+ _ZN14FFTRealWrapperC1Ev @ 2 NONAME
+ _ZN14FFTRealWrapperC2Ev @ 3 NONAME
+ _ZN14FFTRealWrapperD1Ev @ 4 NONAME
+ _ZN14FFTRealWrapperD2Ev @ 5 NONAME
+
diff --git a/demos/spectrum/3rdparty/fftreal/fftreal.pas b/demos/spectrum/3rdparty/fftreal/fftreal.pas
new file mode 100644
index 0000000..ea63754
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/fftreal.pas
@@ -0,0 +1,661 @@
+(*****************************************************************************
+
+ DIGITAL SIGNAL PROCESSING TOOLS
+ Version 1.03, 2001/06/15
+ (c) 1999 - Laurent de Soras
+
+ FFTReal.h
+ Fourier transformation of real number arrays.
+ Portable ISO C++
+
+------------------------------------------------------------------------------
+
+ LEGAL
+
+ Source code may be freely used for any purpose, including commercial
+ applications. Programs must display in their "About" dialog-box (or
+ documentation) a text telling they use these routines by Laurent de Soras.
+ Modified source code can be distributed, but modifications must be clearly
+ indicated.
+
+ CONTACT
+
+ Laurent de Soras
+ 92 avenue Albert 1er
+ 92500 Rueil-Malmaison
+ France
+
+ ldesoras@club-internet.fr
+
+------------------------------------------------------------------------------
+
+ Translation to ObjectPascal by :
+ Frederic Vanmol
+ frederic@axiworld.be
+
+*****************************************************************************)
+
+
+unit
+ FFTReal;
+
+interface
+
+uses
+ Windows;
+
+(* Change this typedef to use a different floating point type in your FFTs
+ (i.e. float, double or long double). *)
+type
+ pflt_t = ^flt_t;
+ flt_t = single;
+
+ pflt_array = ^flt_array;
+ flt_array = array[0..0] of flt_t;
+
+ plongarray = ^longarray;
+ longarray = array[0..0] of longint;
+
+const
+ sizeof_flt : longint = SizeOf(flt_t);
+
+
+
+type
+ // Bit reversed look-up table nested class
+ TBitReversedLUT = class
+ private
+ _ptr : plongint;
+ public
+ constructor Create(const nbr_bits: integer);
+ destructor Destroy; override;
+ function get_ptr: plongint;
+ end;
+
+ // Trigonometric look-up table nested class
+ TTrigoLUT = class
+ private
+ _ptr : pflt_t;
+ public
+ constructor Create(const nbr_bits: integer);
+ destructor Destroy; override;
+ function get_ptr(const level: integer): pflt_t;
+ end;
+
+ TFFTReal = class
+ private
+ _bit_rev_lut : TBitReversedLUT;
+ _trigo_lut : TTrigoLUT;
+ _sqrt2_2 : flt_t;
+ _length : longint;
+ _nbr_bits : integer;
+ _buffer_ptr : pflt_t;
+ public
+ constructor Create(const length: longint);
+ destructor Destroy; override;
+
+ procedure do_fft(f: pflt_array; const x: pflt_array);
+ procedure do_ifft(const f: pflt_array; x: pflt_array);
+ procedure rescale(x: pflt_array);
+ end;
+
+
+
+
+
+
+
+implementation
+
+uses
+ Math;
+
+{ TBitReversedLUT }
+
+constructor TBitReversedLUT.Create(const nbr_bits: integer);
+var
+ length : longint;
+ cnt : longint;
+ br_index : longint;
+ bit : longint;
+begin
+ inherited Create;
+
+ length := 1 shl nbr_bits;
+ GetMem(_ptr, length*SizeOf(longint));
+
+ br_index := 0;
+ plongarray(_ptr)^[0] := 0;
+ for cnt := 1 to length-1 do
+ begin
+ // ++br_index (bit reversed)
+ bit := length shr 1;
+ br_index := br_index xor bit;
+ while br_index and bit = 0 do
+ begin
+ bit := bit shr 1;
+ br_index := br_index xor bit;
+ end;
+
+ plongarray(_ptr)^[cnt] := br_index;
+ end;
+end;
+
+destructor TBitReversedLUT.Destroy;
+begin
+ FreeMem(_ptr);
+ _ptr := nil;
+ inherited;
+end;
+
+function TBitReversedLUT.get_ptr: plongint;
+begin
+ Result := _ptr;
+end;
+
+{ TTrigLUT }
+
+constructor TTrigoLUT.Create(const nbr_bits: integer);
+var
+ total_len : longint;
+ PI : double;
+ level : integer;
+ level_len : longint;
+ level_ptr : pflt_array;
+ mul : double;
+ i : longint;
+begin
+ inherited Create;
+
+ _ptr := nil;
+
+ if (nbr_bits > 3) then
+ begin
+ total_len := (1 shl (nbr_bits - 1)) - 4;
+ GetMem(_ptr, total_len * sizeof_flt);
+
+ PI := ArcTan(1) * 4;
+ for level := 3 to nbr_bits-1 do
+ begin
+ level_len := 1 shl (level - 1);
+ level_ptr := pointer(get_ptr(level));
+ mul := PI / (level_len shl 1);
+
+ for i := 0 to level_len-1 do
+ level_ptr^[i] := cos(i * mul);
+ end;
+ end;
+end;
+
+destructor TTrigoLUT.Destroy;
+begin
+ FreeMem(_ptr);
+ _ptr := nil;
+ inherited;
+end;
+
+function TTrigoLUT.get_ptr(const level: integer): pflt_t;
+var
+ tempp : pflt_t;
+begin
+ tempp := _ptr;
+ inc(tempp, (1 shl (level-1)) - 4);
+ Result := tempp;
+end;
+
+{ TFFTReal }
+
+constructor TFFTReal.Create(const length: longint);
+begin
+ inherited Create;
+
+ _length := length;
+ _nbr_bits := Floor(Ln(length) / Ln(2) + 0.5);
+ _bit_rev_lut := TBitReversedLUT.Create(Floor(Ln(length) / Ln(2) + 0.5));
+ _trigo_lut := TTrigoLUT.Create(Floor(Ln(length) / Ln(2) + 0.05));
+ _sqrt2_2 := Sqrt(2) * 0.5;
+
+ _buffer_ptr := nil;
+ if _nbr_bits > 2 then
+ GetMem(_buffer_ptr, _length * sizeof_flt);
+end;
+
+destructor TFFTReal.Destroy;
+begin
+ if _buffer_ptr <> nil then
+ begin
+ FreeMem(_buffer_ptr);
+ _buffer_ptr := nil;
+ end;
+
+ _bit_rev_lut.Free;
+ _bit_rev_lut := nil;
+ _trigo_lut.Free;
+ _trigo_lut := nil;
+
+ inherited;
+end;
+
+(*==========================================================================*/
+/* Name: do_fft */
+/* Description: Compute the FFT of the array. */
+/* Input parameters: */
+/* - x: pointer on the source array (time). */
+/* Output parameters: */
+/* - f: pointer on the destination array (frequencies). */
+/* f [0...length(x)/2] = real values, */
+/* f [length(x)/2+1...length(x)-1] = imaginary values of */
+/* coefficents 1...length(x)/2-1. */
+/*==========================================================================*)
+procedure TFFTReal.do_fft(f: pflt_array; const x: pflt_array);
+var
+ sf, df : pflt_array;
+ pass : integer;
+ nbr_coef : longint;
+ h_nbr_coef : longint;
+ d_nbr_coef : longint;
+ coef_index : longint;
+ bit_rev_lut_ptr : plongarray;
+ rev_index_0 : longint;
+ rev_index_1 : longint;
+ rev_index_2 : longint;
+ rev_index_3 : longint;
+ df2 : pflt_array;
+ n1, n2, n3 : integer;
+ sf_0, sf_2 : flt_t;
+ sqrt2_2 : flt_t;
+ v : flt_t;
+ cos_ptr : pflt_array;
+ i : longint;
+ sf1r, sf2r : pflt_array;
+ dfr, dfi : pflt_array;
+ sf1i, sf2i : pflt_array;
+ c, s : flt_t;
+ temp_ptr : pflt_array;
+ b_0, b_2 : flt_t;
+begin
+ n1 := 1;
+ n2 := 2;
+ n3 := 3;
+
+ (*______________________________________________
+ *
+ * General case
+ *______________________________________________
+ *)
+
+ if _nbr_bits > 2 then
+ begin
+ if _nbr_bits and 1 <> 0 then
+ begin
+ df := pointer(_buffer_ptr);
+ sf := f;
+ end
+ else
+ begin
+ df := f;
+ sf := pointer(_buffer_ptr);
+ end;
+
+ //
+ // Do the transformation in several passes
+ //
+
+ // First and second pass at once
+ bit_rev_lut_ptr := pointer(_bit_rev_lut.get_ptr);
+ coef_index := 0;
+
+ repeat
+ rev_index_0 := bit_rev_lut_ptr^[coef_index];
+ rev_index_1 := bit_rev_lut_ptr^[coef_index + 1];
+ rev_index_2 := bit_rev_lut_ptr^[coef_index + 2];
+ rev_index_3 := bit_rev_lut_ptr^[coef_index + 3];
+
+ df2 := pointer(longint(df) + (coef_index*sizeof_flt));
+ df2^[n1] := x^[rev_index_0] - x^[rev_index_1];
+ df2^[n3] := x^[rev_index_2] - x^[rev_index_3];
+
+ sf_0 := x^[rev_index_0] + x^[rev_index_1];
+ sf_2 := x^[rev_index_2] + x^[rev_index_3];
+
+ df2^[0] := sf_0 + sf_2;
+ df2^[n2] := sf_0 - sf_2;
+
+ inc(coef_index, 4);
+ until (coef_index >= _length);
+
+
+ // Third pass
+ coef_index := 0;
+ sqrt2_2 := _sqrt2_2;
+
+ repeat
+ sf^[coef_index] := df^[coef_index] + df^[coef_index + 4];
+ sf^[coef_index + 4] := df^[coef_index] - df^[coef_index + 4];
+ sf^[coef_index + 2] := df^[coef_index + 2];
+ sf^[coef_index + 6] := df^[coef_index + 6];
+
+ v := (df [coef_index + 5] - df^[coef_index + 7]) * sqrt2_2;
+ sf^[coef_index + 1] := df^[coef_index + 1] + v;
+ sf^[coef_index + 3] := df^[coef_index + 1] - v;
+
+ v := (df^[coef_index + 5] + df^[coef_index + 7]) * sqrt2_2;
+ sf [coef_index + 5] := v + df^[coef_index + 3];
+ sf [coef_index + 7] := v - df^[coef_index + 3];
+
+ inc(coef_index, 8);
+ until (coef_index >= _length);
+
+
+ // Next pass
+ for pass := 3 to _nbr_bits-1 do
+ begin
+ coef_index := 0;
+ nbr_coef := 1 shl pass;
+ h_nbr_coef := nbr_coef shr 1;
+ d_nbr_coef := nbr_coef shl 1;
+
+ cos_ptr := pointer(_trigo_lut.get_ptr(pass));
+ repeat
+ sf1r := pointer(longint(sf) + (coef_index * sizeof_flt));
+ sf2r := pointer(longint(sf1r) + (nbr_coef * sizeof_flt));
+ dfr := pointer(longint(df) + (coef_index * sizeof_flt));
+ dfi := pointer(longint(dfr) + (nbr_coef * sizeof_flt));
+
+ // Extreme coefficients are always real
+ dfr^[0] := sf1r^[0] + sf2r^[0];
+ dfi^[0] := sf1r^[0] - sf2r^[0]; // dfr [nbr_coef] =
+ dfr^[h_nbr_coef] := sf1r^[h_nbr_coef];
+ dfi^[h_nbr_coef] := sf2r^[h_nbr_coef];
+
+ // Others are conjugate complex numbers
+ sf1i := pointer(longint(sf1r) + (h_nbr_coef * sizeof_flt));
+ sf2i := pointer(longint(sf1i) + (nbr_coef * sizeof_flt));
+
+ for i := 1 to h_nbr_coef-1 do
+ begin
+ c := cos_ptr^[i]; // cos (i*PI/nbr_coef);
+ s := cos_ptr^[h_nbr_coef - i]; // sin (i*PI/nbr_coef);
+
+ v := sf2r^[i] * c - sf2i^[i] * s;
+ dfr^[i] := sf1r^[i] + v;
+ dfi^[-i] := sf1r^[i] - v; // dfr [nbr_coef - i] =
+
+ v := sf2r^[i] * s + sf2i^[i] * c;
+ dfi^[i] := v + sf1i^[i];
+ dfi^[nbr_coef - i] := v - sf1i^[i];
+ end;
+
+ inc(coef_index, d_nbr_coef);
+ until (coef_index >= _length);
+
+ // Prepare to the next pass
+ temp_ptr := df;
+ df := sf;
+ sf := temp_ptr;
+ end;
+ end
+
+ (*______________________________________________
+ *
+ * Special cases
+ *______________________________________________
+ *)
+
+ // 4-point FFT
+ else if _nbr_bits = 2 then
+ begin
+ f^[n1] := x^[0] - x^[n2];
+ f^[n3] := x^[n1] - x^[n3];
+
+ b_0 := x^[0] + x^[n2];
+ b_2 := x^[n1] + x^[n3];
+
+ f^[0] := b_0 + b_2;
+ f^[n2] := b_0 - b_2;
+ end
+
+ // 2-point FFT
+ else if _nbr_bits = 1 then
+ begin
+ f^[0] := x^[0] + x^[n1];
+ f^[n1] := x^[0] - x^[n1];
+ end
+
+ // 1-point FFT
+ else
+ f^[0] := x^[0];
+end;
+
+
+(*==========================================================================*/
+/* Name: do_ifft */
+/* Description: Compute the inverse FFT of the array. Notice that */
+/* IFFT (FFT (x)) = x * length (x). Data must be */
+/* post-scaled. */
+/* Input parameters: */
+/* - f: pointer on the source array (frequencies). */
+/* f [0...length(x)/2] = real values, */
+/* f [length(x)/2+1...length(x)-1] = imaginary values of */
+/* coefficents 1...length(x)/2-1. */
+/* Output parameters: */
+/* - x: pointer on the destination array (time). */
+/*==========================================================================*)
+procedure TFFTReal.do_ifft(const f: pflt_array; x: pflt_array);
+var
+ n1, n2, n3 : integer;
+ n4, n5, n6, n7 : integer;
+ sf, df, df_temp : pflt_array;
+ pass : integer;
+ nbr_coef : longint;
+ h_nbr_coef : longint;
+ d_nbr_coef : longint;
+ coef_index : longint;
+ cos_ptr : pflt_array;
+ i : longint;
+ sfr, sfi : pflt_array;
+ df1r, df2r : pflt_array;
+ df1i, df2i : pflt_array;
+ c, s, vr, vi : flt_t;
+ temp_ptr : pflt_array;
+ sqrt2_2 : flt_t;
+ bit_rev_lut_ptr : plongarray;
+ sf2 : pflt_array;
+ b_0, b_1, b_2, b_3 : flt_t;
+begin
+ n1 := 1;
+ n2 := 2;
+ n3 := 3;
+ n4 := 4;
+ n5 := 5;
+ n6 := 6;
+ n7 := 7;
+
+ (*______________________________________________
+ *
+ * General case
+ *______________________________________________
+ *)
+
+ if _nbr_bits > 2 then
+ begin
+ sf := f;
+
+ if _nbr_bits and 1 <> 0 then
+ begin
+ df := pointer(_buffer_ptr);
+ df_temp := x;
+ end
+ else
+ begin
+ df := x;
+ df_temp := pointer(_buffer_ptr);
+ end;
+
+ // Do the transformation in several pass
+
+ // First pass
+ for pass := _nbr_bits-1 downto 3 do
+ begin
+ coef_index := 0;
+ nbr_coef := 1 shl pass;
+ h_nbr_coef := nbr_coef shr 1;
+ d_nbr_coef := nbr_coef shl 1;
+
+ cos_ptr := pointer(_trigo_lut.get_ptr(pass));
+
+ repeat
+ sfr := pointer(longint(sf) + (coef_index*sizeof_flt));
+ sfi := pointer(longint(sfr) + (nbr_coef*sizeof_flt));
+ df1r := pointer(longint(df) + (coef_index*sizeof_flt));
+ df2r := pointer(longint(df1r) + (nbr_coef*sizeof_flt));
+
+ // Extreme coefficients are always real
+ df1r^[0] := sfr^[0] + sfi^[0]; // + sfr [nbr_coef]
+ df2r^[0] := sfr^[0] - sfi^[0]; // - sfr [nbr_coef]
+ df1r^[h_nbr_coef] := sfr^[h_nbr_coef] * 2;
+ df2r^[h_nbr_coef] := sfi^[h_nbr_coef] * 2;
+
+ // Others are conjugate complex numbers
+ df1i := pointer(longint(df1r) + (h_nbr_coef*sizeof_flt));
+ df2i := pointer(longint(df1i) + (nbr_coef*sizeof_flt));
+
+ for i := 1 to h_nbr_coef-1 do
+ begin
+ df1r^[i] := sfr^[i] + sfi^[-i]; // + sfr [nbr_coef - i]
+ df1i^[i] := sfi^[i] - sfi^[nbr_coef - i];
+
+ c := cos_ptr^[i]; // cos (i*PI/nbr_coef);
+ s := cos_ptr^[h_nbr_coef - i]; // sin (i*PI/nbr_coef);
+ vr := sfr^[i] - sfi^[-i]; // - sfr [nbr_coef - i]
+ vi := sfi^[i] + sfi^[nbr_coef - i];
+
+ df2r^[i] := vr * c + vi * s;
+ df2i^[i] := vi * c - vr * s;
+ end;
+
+ inc(coef_index, d_nbr_coef);
+ until (coef_index >= _length);
+
+
+ // Prepare to the next pass
+ if (pass < _nbr_bits - 1) then
+ begin
+ temp_ptr := df;
+ df := sf;
+ sf := temp_ptr;
+ end
+ else
+ begin
+ sf := df;
+ df := df_temp;
+ end
+ end;
+
+ // Antepenultimate pass
+ sqrt2_2 := _sqrt2_2;
+ coef_index := 0;
+
+ repeat
+ df^[coef_index] := sf^[coef_index] + sf^[coef_index + 4];
+ df^[coef_index + 4] := sf^[coef_index] - sf^[coef_index + 4];
+ df^[coef_index + 2] := sf^[coef_index + 2] * 2;
+ df^[coef_index + 6] := sf^[coef_index + 6] * 2;
+
+ df^[coef_index + 1] := sf^[coef_index + 1] + sf^[coef_index + 3];
+ df^[coef_index + 3] := sf^[coef_index + 5] - sf^[coef_index + 7];
+
+ vr := sf^[coef_index + 1] - sf^[coef_index + 3];
+ vi := sf^[coef_index + 5] + sf^[coef_index + 7];
+
+ df^[coef_index + 5] := (vr + vi) * sqrt2_2;
+ df^[coef_index + 7] := (vi - vr) * sqrt2_2;
+
+ inc(coef_index, 8);
+ until (coef_index >= _length);
+
+
+ // Penultimate and last pass at once
+ coef_index := 0;
+ bit_rev_lut_ptr := pointer(_bit_rev_lut.get_ptr);
+ sf2 := df;
+
+ repeat
+ b_0 := sf2^[0] + sf2^[n2];
+ b_2 := sf2^[0] - sf2^[n2];
+ b_1 := sf2^[n1] * 2;
+ b_3 := sf2^[n3] * 2;
+
+ x^[bit_rev_lut_ptr^[0]] := b_0 + b_1;
+ x^[bit_rev_lut_ptr^[n1]] := b_0 - b_1;
+ x^[bit_rev_lut_ptr^[n2]] := b_2 + b_3;
+ x^[bit_rev_lut_ptr^[n3]] := b_2 - b_3;
+
+ b_0 := sf2^[n4] + sf2^[n6];
+ b_2 := sf2^[n4] - sf2^[n6];
+ b_1 := sf2^[n5] * 2;
+ b_3 := sf2^[n7] * 2;
+
+ x^[bit_rev_lut_ptr^[n4]] := b_0 + b_1;
+ x^[bit_rev_lut_ptr^[n5]] := b_0 - b_1;
+ x^[bit_rev_lut_ptr^[n6]] := b_2 + b_3;
+ x^[bit_rev_lut_ptr^[n7]] := b_2 - b_3;
+
+ inc(sf2, 8);
+ inc(coef_index, 8);
+ inc(bit_rev_lut_ptr, 8);
+ until (coef_index >= _length);
+ end
+
+ (*______________________________________________
+ *
+ * Special cases
+ *______________________________________________
+ *)
+
+ // 4-point IFFT
+ else if _nbr_bits = 2 then
+ begin
+ b_0 := f^[0] + f [n2];
+ b_2 := f^[0] - f [n2];
+
+ x^[0] := b_0 + f [n1] * 2;
+ x^[n2] := b_0 - f [n1] * 2;
+ x^[n1] := b_2 + f [n3] * 2;
+ x^[n3] := b_2 - f [n3] * 2;
+ end
+
+ // 2-point IFFT
+ else if _nbr_bits = 1 then
+ begin
+ x^[0] := f^[0] + f^[n1];
+ x^[n1] := f^[0] - f^[n1];
+ end
+
+ // 1-point IFFT
+ else
+ x^[0] := f^[0];
+end;
+
+(*==========================================================================*/
+/* Name: rescale */
+/* Description: Scale an array by divide each element by its length. */
+/* This function should be called after FFT + IFFT. */
+/* Input/Output parameters: */
+/* - x: pointer on array to rescale (time or frequency). */
+/*==========================================================================*)
+procedure TFFTReal.rescale(x: pflt_array);
+var
+ mul : flt_t;
+ i : longint;
+begin
+ mul := 1.0 / _length;
+ i := _length - 1;
+
+ repeat
+ x^[i] := x^[i] * mul;
+ dec(i);
+ until (i < 0);
+end;
+
+end.
diff --git a/demos/spectrum/3rdparty/fftreal/fftreal.pro b/demos/spectrum/3rdparty/fftreal/fftreal.pro
new file mode 100644
index 0000000..4ab9652
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/fftreal.pro
@@ -0,0 +1,41 @@
+TEMPLATE = lib
+TARGET = fftreal
+
+# FFTReal
+HEADERS += Array.h \
+ Array.hpp \
+ DynArray.h \
+ DynArray.hpp \
+ FFTRealFixLen.h \
+ FFTRealFixLen.hpp \
+ FFTRealFixLenParam.h \
+ FFTRealPassDirect.h \
+ FFTRealPassDirect.hpp \
+ FFTRealPassInverse.h \
+ FFTRealPassInverse.hpp \
+ FFTRealSelect.h \
+ FFTRealSelect.hpp \
+ FFTRealUseTrigo.h \
+ FFTRealUseTrigo.hpp \
+ OscSinCos.h \
+ OscSinCos.hpp \
+ def.h
+
+# Wrapper used to export the required instantiation of the FFTRealFixLen template
+HEADERS += fftreal_wrapper.h
+SOURCES += fftreal_wrapper.cpp
+
+DEFINES += FFTREAL_LIBRARY
+
+symbian {
+ # Provide unique ID for the generated binary, required by Symbian OS
+ TARGET.UID3 = 0xA000E3FB
+} else {
+ macx {
+ CONFIG += lib_bundle
+ } else {
+ DESTDIR = ../../bin
+ }
+}
+
+
diff --git a/demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp b/demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp
new file mode 100644
index 0000000..50ab36d
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp
@@ -0,0 +1,54 @@
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** This program 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.1. This
+** program 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 General Public License
+** for more details. You should have received a copy of the GNU General
+** Public License along with this program. If not, see
+** <http://www.gnu.org/licenses/>.
+**
+***************************************************************************/
+
+#include "fftreal_wrapper.h"
+
+// FFTReal code generates quite a lot of 'unused parameter' compiler warnings,
+// which we suppress here in order to get a clean build output.
+#if defined Q_CC_MSVC
+# pragma warning(disable:4100)
+#elif defined Q_CC_GNU
+# pragma GCC diagnostic ignored "-Wunused-parameter"
+#elif defined Q_CC_MWERKS
+# pragma warning off (10182)
+#endif
+
+#include "FFTRealFixLen.h"
+
+class FFTRealWrapperPrivate {
+public:
+ FFTRealFixLen<FFTLengthPowerOfTwo> m_fft;
+};
+
+
+FFTRealWrapper::FFTRealWrapper()
+ : m_private(new FFTRealWrapperPrivate)
+{
+
+}
+
+FFTRealWrapper::~FFTRealWrapper()
+{
+ delete m_private;
+}
+
+void FFTRealWrapper::calculateFFT(DataType in[], const DataType out[])
+{
+ m_private->m_fft.do_fft(in, out);
+}
diff --git a/demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h b/demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h
new file mode 100644
index 0000000..48d614e
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h
@@ -0,0 +1,63 @@
+/***************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** This program 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.1. This
+** program 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 General Public License
+** for more details. You should have received a copy of the GNU General
+** Public License along with this program. If not, see
+** <http://www.gnu.org/licenses/>.
+**
+***************************************************************************/
+
+#ifndef FFTREAL_WRAPPER_H
+#define FFTREAL_WRAPPER_H
+
+#include <QtCore/QtGlobal>
+
+#if defined(FFTREAL_LIBRARY)
+# define FFTREAL_EXPORT Q_DECL_EXPORT
+#else
+# define FFTREAL_EXPORT Q_DECL_IMPORT
+#endif
+
+class FFTRealWrapperPrivate;
+
+// Each pass of the FFT processes 2^X samples, where X is the
+// number below.
+static const int FFTLengthPowerOfTwo = 12;
+
+/**
+ * Wrapper around the FFTRealFixLen template provided by the FFTReal
+ * library
+ *
+ * This class instantiates a single instance of FFTRealFixLen, using
+ * FFTLengthPowerOfTwo as the template parameter. It then exposes
+ * FFTRealFixLen<FFTLengthPowerOfTwo>::do_fft via the calculateFFT
+ * function, thereby allowing an application to dynamically link
+ * against the FFTReal implementation.
+ *
+ * See http://ldesoras.free.fr/prod.html
+ */
+class FFTREAL_EXPORT FFTRealWrapper
+{
+public:
+ FFTRealWrapper();
+ ~FFTRealWrapper();
+
+ typedef float DataType;
+ void calculateFFT(DataType in[], const DataType out[]);
+
+private:
+ FFTRealWrapperPrivate* m_private;
+};
+
+#endif // FFTREAL_WRAPPER_H
+
diff --git a/demos/spectrum/3rdparty/fftreal/license.txt b/demos/spectrum/3rdparty/fftreal/license.txt
new file mode 100644
index 0000000..918fe68
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/license.txt
@@ -0,0 +1,459 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
diff --git a/demos/spectrum/3rdparty/fftreal/readme.txt b/demos/spectrum/3rdparty/fftreal/readme.txt
new file mode 100644
index 0000000..0c5ce16
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/readme.txt
@@ -0,0 +1,242 @@
+==============================================================================
+
+ FFTReal
+ Version 2.00, 2005/10/18
+
+ Fourier transformation (FFT, IFFT) library specialised for real data
+ Portable ISO C++
+
+ (c) Laurent de Soras <laurent.de.soras@club-internet.fr>
+ Object Pascal port (c) Frederic Vanmol <frederic@fruityloops.com>
+
+==============================================================================
+
+
+
+1. Legal
+--------
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Check the file license.txt to get full information about the license.
+
+
+
+2. Content
+----------
+
+FFTReal is a library to compute Discrete Fourier Transforms (DFT) with the
+FFT algorithm (Fast Fourier Transform) on arrays of real numbers. It can
+also compute the inverse transform.
+
+You should find in this package a lot of files ; some of them are of interest:
+- readme.txt: you are reading it
+- FFTReal.h: FFT, length fixed at run-time
+- FFTRealFixLen.h: FFT, length fixed at compile-time
+- FFTReal.pas: Pascal implementation (working but not up-to-date)
+- stopwatch directory
+
+
+
+3. Using FFTReal
+----------------
+
+Important - if you were using older versions of FFTReal (up to 1.03), some
+things have changed. FFTReal is now a template. Therefore use FFTReal<float>
+or FFTReal<double> in your code depending on the application datatype. The
+flt_t typedef has been removed.
+
+You have two ways to use FFTReal. In the first way, the FFT has its length
+fixed at run-time, when the object is instanciated. It means that you have
+not to know the length when you write the code. This is the usual way of
+proceeding.
+
+
+3.1 FFTReal - Length fixed at run-time
+--------------------------------------
+
+Just instanciate one time a FFTReal object. Specify the data type you want
+as template parameter (only floating point: float, double, long double or
+custom type). The constructor precompute a lot of things, so it may be a bit
+long. The parameter is the number of points used for the next FFTs. It must
+be a power of 2:
+
+ #include "FFTReal.h"
+ ...
+ long len = 1024;
+ ...
+ FFTReal <float> fft_object (len); // 1024-point FFT object constructed.
+
+Then you can use this object to compute as many FFTs and IFFTs as you want.
+They will be computed very quickly because a lot of work has been done in the
+object construction.
+
+ float x [1024];
+ float f [1024];
+
+ ...
+ fft_object.do_fft (f, x); // x (real) --FFT---> f (complex)
+ ...
+ fft_object.do_ifft (f, x); // f (complex) --IFFT--> x (real)
+ fft_object.rescale (x); // Post-scaling should be done after FFT+IFFT
+ ...
+
+x [] and f [] are floating point number arrays. x [] is the real number
+sequence which we want to compute the FFT. f [] is the result, in the
+"frequency" domain. f has the same number of elements as x [], but f []
+elements are complex numbers. The routine uses some FFT properties to
+optimize memory and to reduce calculations: the transformaton of a real
+number sequence is a conjugate complex number sequence: F [k] = F [-k]*.
+
+
+3.2 FFTRealFixLen - Length fixed at compile-time
+------------------------------------------------
+
+This class is significantly faster than the previous one, giving a speed
+gain between 50 and 100 %. The template parameter is the base-2 logarithm of
+the FFT length. The datatype is float; it can be changed by modifying the
+DataType typedef in FFTRealFixLenParam.h. As FFTReal class, it supports
+only floating-point types or equivalent.
+
+To instanciate the object, just proceed as below:
+
+ #include "FFTRealFixLen.h"
+ ...
+ FFTRealFixLen <10> fft_object; // 1024-point (2^10) FFT object constructed.
+
+Use is similar as the one of FFTReal.
+
+
+3.3 Data organisation
+---------------------
+
+Mathematically speaking, the formulas below show what does FFTReal:
+
+do_fft() : f(k) = sum (p = 0, N-1, x(p) * exp (+j*2*pi*k*p/N))
+do_ifft(): x(k) = sum (p = 0, N-1, f(p) * exp (-j*2*pi*k*p/N))
+
+Where j is the square root of -1. The formulas differ only by the sign of
+the exponential. When the sign is positive, the transform is called positive.
+Common formulas for Fourier transform are negative for the direct tranform and
+positive for the inverse one.
+
+However in these formulas, f is an array of complex numbers and doesn't
+correspound exactly to the f[] array taken as function parameter. The
+following table shows how the f[] sequence is mapped onto the usable FFT
+coefficients (called bins):
+
+ FFTReal output | Positive FFT equiv. | Negative FFT equiv.
+ ---------------+-----------------------+-----------------------
+ f [0] | Real (bin 0) | Real (bin 0)
+ f [...] | Real (bin ...) | Real (bin ...)
+ f [length/2] | Real (bin length/2) | Real (bin length/2)
+ f [length/2+1] | Imag (bin 1) | -Imag (bin 1)
+ f [...] | Imag (bin ...) | -Imag (bin ...)
+ f [length-1] | Imag (bin length/2-1) | -Imag (bin length/2-1)
+
+And FFT bins are distributed in f [] as above:
+
+ | | Positive FFT | Negative FFT
+ Bin | Real part | imaginary part | imaginary part
+ ------------+----------------+-----------------+---------------
+ 0 | f [0] | 0 | 0
+ 1 | f [1] | f [length/2+1] | -f [length/2+1]
+ ... | f [...], | f [...] | -f [...]
+ length/2-1 | f [length/2-1] | f [length-1] | -f [length-1]
+ length/2 | f [length/2] | 0 | 0
+ length/2+1 | f [length/2-1] | -f [length-1] | f [length-1]
+ ... | f [...] | -f [...] | f [...]
+ length-1 | f [1] | -f [length/2+1] | f [length/2+1]
+
+f [] coefficients have the same layout for FFT and IFFT functions. You may
+notice that scaling must be done if you want to retrieve x after FFT and IFFT.
+Actually, IFFT (FFT (x)) = x * length(x). This is a not a problem because
+most of the applications don't care about absolute values. Thus, the operation
+requires less calculation. If you want to use the FFT and IFFT to transform a
+signal, you have to apply post- (or pre-) processing yourself. Multiplying
+or dividing floating point numbers by a power of 2 doesn't generate extra
+computation noise.
+
+
+
+4. Compilation and testing
+--------------------------
+
+Drop the following files into your project or makefile:
+
+Array.*
+def.h
+DynArray.*
+FFTReal*.cpp
+FFTReal*.h*
+OscSinCos.*
+
+Other files are for testing purpose only, do not include them if you just need
+to use the library ; they are not needed to use FFTReal in your own programs.
+
+FFTReal may be compiled in two versions: release and debug. Debug version
+has checks that could slow down the code. Define NDEBUG to set the Release
+mode. For example, the command line to compile the test bench on GCC would
+look like:
+
+Debug mode:
+g++ -Wall -o fftreal_debug.exe *.cpp stopwatch/*.cpp
+
+Release mode:
+g++ -Wall -o fftreal_release.exe -DNDEBUG -O3 *.cpp stopwatch/*.cpp
+
+It may be tricky to compile the test bench because the speed tests use the
+stopwatch sub-library, which is not that cross-platform. If you encounter
+any problem that you cannot easily fix while compiling it, edit the file
+test_settings.h and un-define the speed test macro. Remove the stopwatch
+directory from your source file list, too.
+
+If it's not done by default, you should activate the exception handling
+of your compiler to get the class memory-leak-safe. Thus, when a memory
+allocation fails (in the constructor), an exception is thrown and the entire
+object is safely destructed. It reduces the permanent error checking overhead
+in the client code. Also, the test bench requires Run-Time Type Information
+(RTTI) to be enabled in order to display the names of the tested classes -
+sometimes mangled, depending on the compiler.
+
+The test bench may take a long time to compile, especially in Release mode,
+because a lot of recursive templates are instanciated.
+
+
+
+5. History
+----------
+
+v2.00 (2005.10.18)
+- Turned FFTReal class into template (data type as parameter)
+- Added FFTRealFixLen
+- Trigonometric tables are size-limited in order to preserve cache memory;
+over a given size, sin/cos functions are computed on the fly.
+- Better test bench for accuracy and speed
+
+v1.03 (2001.06.15)
+- Thanks to Frederic Vanmol for the Pascal port (works with Delphi).
+- Documentation improvement
+
+v1.02 (2001.03.25)
+- sqrt() is now precomputed when the object FFTReal is constructed, resulting
+in speed impovement for small size FFT.
+
+v1.01 (2000)
+- Small modifications, I don't remember what.
+
+v1.00 (1999.08.14)
+- First version released
+
diff --git a/demos/spectrum/3rdparty/fftreal/stopwatch/ClockCycleCounter.cpp b/demos/spectrum/3rdparty/fftreal/stopwatch/ClockCycleCounter.cpp
new file mode 100644
index 0000000..fe1d424
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/stopwatch/ClockCycleCounter.cpp
@@ -0,0 +1,285 @@
+/*****************************************************************************
+
+ ClockCycleCounter.cpp
+ Copyright (c) 2003 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (_MSC_VER)
+ #pragma warning (1 : 4130) // "'operator' : logical operation on address of string constant"
+ #pragma warning (1 : 4223) // "nonstandard extension used : non-lvalue array converted to pointer"
+ #pragma warning (1 : 4705) // "statement has no effect"
+ #pragma warning (1 : 4706) // "assignment within conditional expression"
+ #pragma warning (4 : 4786) // "identifier was truncated to '255' characters in the debug information"
+ #pragma warning (4 : 4800) // "forcing value to bool 'true' or 'false' (performance warning)"
+ #pragma warning (4 : 4355) // "'this' : used in base member initializer list"
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "ClockCycleCounter.h"
+
+#include <cassert>
+
+
+
+namespace stopwatch
+{
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*
+==============================================================================
+Name: ctor
+Description:
+ The first object constructed initialise global data. This first
+ construction may be a bit slow.
+Throws: Nothing
+==============================================================================
+*/
+
+ClockCycleCounter::ClockCycleCounter ()
+: _start_time (0)
+, _state (0)
+, _best_score (-1)
+{
+ if (! _init_flag)
+ {
+ // Should be executed in this order
+ compute_clk_mul ();
+ compute_measure_time_total ();
+ compute_measure_time_lap ();
+
+ // Restores object state
+ _start_time = 0;
+ _state = 0;
+ _best_score = -1;
+
+ _init_flag = true;
+ }
+}
+
+
+
+/*
+==============================================================================
+Name: get_time_total
+Description:
+ Gives the time elapsed between the latest stop_lap() and start() calls.
+Returns:
+ The duration, in clock cycles.
+Throws: Nothing
+==============================================================================
+*/
+
+Int64 ClockCycleCounter::get_time_total () const
+{
+ const Int64 duration = _state - _start_time;
+ assert (duration >= 0);
+
+ const Int64 t = max (
+ duration - _measure_time_total,
+ static_cast <Int64> (0)
+ );
+
+ return (t * _clk_mul);
+}
+
+
+
+/*
+==============================================================================
+Name: get_time_best_lap
+Description:
+ Gives the smallest time between two consecutive stop_lap() or between
+ the stop_lap() and start(). The value is reset by a call to start().
+ Call this function only after a stop_lap().
+ The time is amputed from the duration of the stop_lap() call itself.
+Returns:
+ The smallest duration, in clock cycles.
+Throws: Nothing
+==============================================================================
+*/
+
+Int64 ClockCycleCounter::get_time_best_lap () const
+{
+ assert (_best_score >= 0);
+
+ const Int64 t1 = max (
+ _best_score - _measure_time_lap,
+ static_cast <Int64> (0)
+ );
+ const Int64 t = min (t1, get_time_total ());
+
+ return (t * _clk_mul);
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+#if defined (__MACOS__)
+
+static inline double stopwatch_ClockCycleCounter_get_time_s ()
+{
+ const Nanoseconds ns = AbsoluteToNanoseconds (UpTime ());
+
+ return (ns.hi * 4294967296e-9 + ns.lo * 1e-9);
+}
+
+#endif // __MACOS__
+
+
+
+/*
+==============================================================================
+Name: compute_clk_mul
+Description:
+ This function, only for PowerPC/MacOS computers, computes the multiplier
+ required to deduce clock cycles from the internal counter.
+Throws: Nothing
+==============================================================================
+*/
+
+void ClockCycleCounter::compute_clk_mul ()
+{
+ assert (! _init_flag);
+
+#if defined (__MACOS__)
+
+ long clk_speed_mhz = CurrentProcessorSpeed ();
+ const Int64 clk_speed =
+ static_cast <Int64> (clk_speed_mhz) * (1000L*1000L);
+
+ const double start_time_s = stopwatch_ClockCycleCounter_get_time_s ();
+ start ();
+
+ const double duration = 0.01; // Seconds
+ while (stopwatch_ClockCycleCounter_get_time_s () - start_time_s < duration)
+ {
+ continue;
+ }
+
+ const double stop_time_s = stopwatch_ClockCycleCounter_get_time_s ();
+ stop ();
+
+ const double diff_time_s = stop_time_s - start_time_s;
+ const double nbr_cycles = diff_time_s * static_cast <double> (clk_speed);
+
+ const Int64 diff_time_c = _state - _start_time;
+ const double clk_mul = nbr_cycles / static_cast <double> (diff_time_c);
+
+ _clk_mul = round_int (clk_mul);
+
+#endif // __MACOS__
+}
+
+
+
+void ClockCycleCounter::compute_measure_time_total ()
+{
+ start ();
+ spend_time ();
+
+ Int64 best_result = 0x7FFFFFFFL; // Should be enough
+ long nbr_tests = 100;
+ for (long cnt = 0; cnt < nbr_tests; ++cnt)
+ {
+ start ();
+ stop_lap ();
+ const Int64 duration = _state - _start_time;
+ best_result = min (best_result, duration);
+ }
+
+ _measure_time_total = best_result;
+}
+
+
+
+/*
+==============================================================================
+Name: compute_measure_time_lap
+Description:
+ Computes the duration of one stop_lap() call and store it. It will be used
+ later to get the real duration of the measured operation (by substracting
+ the measurement duration).
+Throws: Nothing
+==============================================================================
+*/
+
+void ClockCycleCounter::compute_measure_time_lap ()
+{
+ start ();
+ spend_time ();
+
+ long nbr_tests = 10;
+ for (long cnt = 0; cnt < nbr_tests; ++cnt)
+ {
+ stop_lap ();
+ stop_lap ();
+ stop_lap ();
+ stop_lap ();
+ }
+
+ _measure_time_lap = _best_score;
+}
+
+
+
+void ClockCycleCounter::spend_time ()
+{
+ const Int64 nbr_clocks = 500; // Number of clock cycles to spend
+
+ const Int64 start = read_clock_counter ();
+ Int64 current;
+
+ do
+ {
+ current = read_clock_counter ();
+ }
+ while ((current - start) * _clk_mul < nbr_clocks);
+}
+
+
+
+Int64 ClockCycleCounter::_measure_time_total = 0;
+Int64 ClockCycleCounter::_measure_time_lap = 0;
+int ClockCycleCounter::_clk_mul = 1;
+bool ClockCycleCounter::_init_flag = false;
+
+
+} // namespace stopwatch
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/stopwatch/ClockCycleCounter.h b/demos/spectrum/3rdparty/fftreal/stopwatch/ClockCycleCounter.h
new file mode 100644
index 0000000..ba7a99a
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/stopwatch/ClockCycleCounter.h
@@ -0,0 +1,124 @@
+/*****************************************************************************
+
+ ClockCycleCounter.h
+ Copyright (c) 2003 Laurent de Soras
+
+Instrumentation class, for accurate time interval measurement. You may have
+to modify the implementation to adapt it to your system and/or compiler.
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (stopwatch_ClockCycleCounter_HEADER_INCLUDED)
+#define stopwatch_ClockCycleCounter_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "def.h"
+#include "Int64.h"
+
+
+
+namespace stopwatch
+{
+
+
+
+class ClockCycleCounter
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ ClockCycleCounter ();
+
+ stopwatch_FORCEINLINE void
+ start ();
+ stopwatch_FORCEINLINE void
+ stop_lap ();
+ Int64 get_time_total () const;
+ Int64 get_time_best_lap () const;
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ void compute_clk_mul ();
+ void compute_measure_time_total ();
+ void compute_measure_time_lap ();
+
+ static void spend_time ();
+ static stopwatch_FORCEINLINE Int64
+ read_clock_counter ();
+
+ Int64 _start_time;
+ Int64 _state;
+ Int64 _best_score;
+
+ static Int64 _measure_time_total;
+ static Int64 _measure_time_lap;
+ static int _clk_mul;
+ static bool _init_flag;
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ ClockCycleCounter (const ClockCycleCounter &other);
+ ClockCycleCounter &
+ operator = (const ClockCycleCounter &other);
+ bool operator == (const ClockCycleCounter &other);
+ bool operator != (const ClockCycleCounter &other);
+
+}; // class ClockCycleCounter
+
+
+
+} // namespace stopwatch
+
+
+
+#include "ClockCycleCounter.hpp"
+
+
+
+#endif // stopwatch_ClockCycleCounter_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/stopwatch/ClockCycleCounter.hpp b/demos/spectrum/3rdparty/fftreal/stopwatch/ClockCycleCounter.hpp
new file mode 100644
index 0000000..fbd511e
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/stopwatch/ClockCycleCounter.hpp
@@ -0,0 +1,150 @@
+/*****************************************************************************
+
+ ClockCycleCounter.hpp
+ Copyright (c) 2003 Laurent de Soras
+
+Please complete the definitions according to your compiler/architecture.
+It's not a big deal if it's not possible to get the clock count...
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (stopwatch_ClockCycleCounter_CURRENT_CODEHEADER)
+ #error Recursive inclusion of ClockCycleCounter code header.
+#endif
+#define stopwatch_ClockCycleCounter_CURRENT_CODEHEADER
+
+#if ! defined (stopwatch_ClockCycleCounter_CODEHEADER_INCLUDED)
+#define stopwatch_ClockCycleCounter_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "fnc.h"
+
+#include <climits>
+
+
+
+namespace stopwatch
+{
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*
+==============================================================================
+Name: start
+Description:
+ Starts the counter.
+Throws: Nothing
+==============================================================================
+*/
+
+void ClockCycleCounter::start ()
+{
+ _best_score = (static_cast <Int64> (1) << (sizeof (Int64) * CHAR_BIT - 2));
+ const Int64 start_clock = read_clock_counter ();
+ _start_time = start_clock;
+ _state = start_clock - _best_score;
+}
+
+
+
+/*
+==============================================================================
+Name: stop_lap
+Description:
+ Captures the current time and updates the smallest duration between two
+ consecutive calls to stop_lap() or the latest start().
+ start() must have been called at least once before calling this function.
+Throws: Nothing
+==============================================================================
+*/
+
+void ClockCycleCounter::stop_lap ()
+{
+ const Int64 end_clock = read_clock_counter ();
+ _best_score = min (end_clock - _state, _best_score);
+ _state = end_clock;
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+Int64 ClockCycleCounter::read_clock_counter ()
+{
+ register Int64 clock_cnt;
+
+#if defined (_MSC_VER)
+
+ __asm
+ {
+ lea edi, clock_cnt
+ rdtsc
+ mov [edi ], eax
+ mov [edi + 4], edx
+ }
+
+#elif defined (__GNUC__) && defined (__i386__)
+
+ __asm__ __volatile__ ("rdtsc" : "=A" (clock_cnt));
+
+#elif (__MWERKS__) && defined (__POWERPC__)
+
+ asm
+ {
+ loop:
+ mftbu clock_cnt@hiword
+ mftb clock_cnt@loword
+ mftbu r5
+ cmpw clock_cnt@hiword,r5
+ bne loop
+ }
+
+#endif
+
+ return (clock_cnt);
+}
+
+
+
+} // namespace stopwatch
+
+
+
+#endif // stopwatch_ClockCycleCounter_CODEHEADER_INCLUDED
+
+#undef stopwatch_ClockCycleCounter_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/stopwatch/Int64.h b/demos/spectrum/3rdparty/fftreal/stopwatch/Int64.h
new file mode 100644
index 0000000..1e786e2
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/stopwatch/Int64.h
@@ -0,0 +1,71 @@
+/*****************************************************************************
+
+ Int64.h
+ Copyright (c) 2003 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (stopwatch_Int64_HEADER_INCLUDED)
+#define stopwatch_Int64_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+namespace stopwatch
+{
+
+
+#if defined (_MSC_VER)
+
+ typedef __int64 Int64;
+
+#elif defined (__MWERKS__) || defined (__GNUC__)
+
+ typedef long long Int64;
+
+#elif defined (__BEOS__)
+
+ typedef int64 Int64;
+
+#else
+
+ #error No 64-bit integer type defined for this compiler !
+
+#endif
+
+
+} // namespace stopwatch
+
+
+
+#endif // stopwatch_Int64_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/stopwatch/StopWatch.cpp b/demos/spectrum/3rdparty/fftreal/stopwatch/StopWatch.cpp
new file mode 100644
index 0000000..7795d86
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/stopwatch/StopWatch.cpp
@@ -0,0 +1,101 @@
+/*****************************************************************************
+
+ StopWatch.cpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (_MSC_VER)
+ #pragma warning (1 : 4130) // "'operator' : logical operation on address of string constant"
+ #pragma warning (1 : 4223) // "nonstandard extension used : non-lvalue array converted to pointer"
+ #pragma warning (1 : 4705) // "statement has no effect"
+ #pragma warning (1 : 4706) // "assignment within conditional expression"
+ #pragma warning (4 : 4786) // "identifier was truncated to '255' characters in the debug information"
+ #pragma warning (4 : 4800) // "forcing value to bool 'true' or 'false' (performance warning)"
+ #pragma warning (4 : 4355) // "'this' : used in base member initializer list"
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "StopWatch.h"
+
+#include <cassert>
+
+
+
+namespace stopwatch
+{
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+StopWatch::StopWatch ()
+: _ccc ()
+, _nbr_laps (0)
+{
+ // Nothing
+}
+
+
+
+double StopWatch::get_time_total (Int64 nbr_op) const
+{
+ assert (_nbr_laps > 0);
+ assert (nbr_op > 0);
+
+ return (
+ static_cast <double> (_ccc.get_time_total ())
+ / (static_cast <double> (nbr_op) * static_cast <double> (_nbr_laps))
+ );
+}
+
+
+
+double StopWatch::get_time_best_lap (Int64 nbr_op) const
+{
+ assert (nbr_op > 0);
+
+ return (
+ static_cast <double> (_ccc.get_time_best_lap ())
+ / static_cast <double> (nbr_op)
+ );
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+} // namespace stopwatch
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/stopwatch/StopWatch.h b/demos/spectrum/3rdparty/fftreal/stopwatch/StopWatch.h
new file mode 100644
index 0000000..9cc47e5
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/stopwatch/StopWatch.h
@@ -0,0 +1,110 @@
+/*****************************************************************************
+
+ StopWatch.h
+ Copyright (c) 2005 Laurent de Soras
+
+Utility class based on ClockCycleCounter to measure the unit time of a
+repeated operation.
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (stopwatch_StopWatch_HEADER_INCLUDED)
+#define stopwatch_StopWatch_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "ClockCycleCounter.h"
+
+
+
+namespace stopwatch
+{
+
+
+
+class StopWatch
+{
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+public:
+
+ StopWatch ();
+
+ stopwatch_FORCEINLINE void
+ start ();
+ stopwatch_FORCEINLINE void
+ stop_lap ();
+
+ double get_time_total (Int64 nbr_op) const;
+ double get_time_best_lap (Int64 nbr_op) const;
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+protected:
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ ClockCycleCounter
+ _ccc;
+ Int64 _nbr_laps;
+
+
+
+/*\\\ FORBIDDEN MEMBER FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+private:
+
+ StopWatch (const StopWatch &other);
+ StopWatch & operator = (const StopWatch &other);
+ bool operator == (const StopWatch &other);
+ bool operator != (const StopWatch &other);
+
+}; // class StopWatch
+
+
+
+} // namespace stopwatch
+
+
+
+#include "StopWatch.hpp"
+
+
+
+#endif // stopwatch_StopWatch_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/stopwatch/StopWatch.hpp b/demos/spectrum/3rdparty/fftreal/stopwatch/StopWatch.hpp
new file mode 100644
index 0000000..74482a7
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/stopwatch/StopWatch.hpp
@@ -0,0 +1,83 @@
+/*****************************************************************************
+
+ StopWatch.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (stopwatch_StopWatch_CURRENT_CODEHEADER)
+ #error Recursive inclusion of StopWatch code header.
+#endif
+#define stopwatch_StopWatch_CURRENT_CODEHEADER
+
+#if ! defined (stopwatch_StopWatch_CODEHEADER_INCLUDED)
+#define stopwatch_StopWatch_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+namespace stopwatch
+{
+
+
+
+/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+void StopWatch::start ()
+{
+ _nbr_laps = 0;
+ _ccc.start ();
+}
+
+
+
+void StopWatch::stop_lap ()
+{
+ _ccc.stop_lap ();
+ ++ _nbr_laps;
+}
+
+
+
+/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+} // namespace stopwatch
+
+
+
+#endif // stopwatch_StopWatch_CODEHEADER_INCLUDED
+
+#undef stopwatch_StopWatch_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/stopwatch/def.h b/demos/spectrum/3rdparty/fftreal/stopwatch/def.h
new file mode 100644
index 0000000..81ee6aa
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/stopwatch/def.h
@@ -0,0 +1,65 @@
+/*****************************************************************************
+
+ def.h
+ Copyright (c) 2003 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (stopwatch_def_HEADER_INCLUDED)
+#define stopwatch_def_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+namespace stopwatch
+{
+
+
+
+#if defined (_MSC_VER)
+
+ #define stopwatch_FORCEINLINE __forceinline
+
+#else
+
+ #define stopwatch_FORCEINLINE inline
+
+#endif
+
+
+
+} // namespace stopwatch
+
+
+
+#endif // stopwatch_def_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/stopwatch/fnc.h b/demos/spectrum/3rdparty/fftreal/stopwatch/fnc.h
new file mode 100644
index 0000000..0554535
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/stopwatch/fnc.h
@@ -0,0 +1,67 @@
+/*****************************************************************************
+
+ fnc.h
+ Copyright (c) 2003 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (stopwatch_fnc_HEADER_INCLUDED)
+#define stopwatch_fnc_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+namespace stopwatch
+{
+
+
+
+template <typename T>
+inline T min (T a, T b);
+
+template <typename T>
+inline T max (T a, T b);
+
+inline int round_int (double x);
+
+
+
+} // namespace rsp
+
+
+
+#include "fnc.hpp"
+
+
+
+#endif // stopwatch_fnc_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/stopwatch/fnc.hpp b/demos/spectrum/3rdparty/fftreal/stopwatch/fnc.hpp
new file mode 100644
index 0000000..0ab5949
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/stopwatch/fnc.hpp
@@ -0,0 +1,85 @@
+/*****************************************************************************
+
+ fnc.hpp
+ Copyright (c) 2003 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (stopwatch_fnc_CURRENT_CODEHEADER)
+ #error Recursive inclusion of fnc code header.
+#endif
+#define stopwatch_fnc_CURRENT_CODEHEADER
+
+#if ! defined (stopwatch_fnc_CODEHEADER_INCLUDED)
+#define stopwatch_fnc_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include <cassert>
+#include <cmath>
+
+namespace std {}
+
+
+
+namespace stopwatch
+{
+
+
+
+template <typename T>
+inline T min (T a, T b)
+{
+ return ((a < b) ? a : b);
+}
+
+
+
+template <typename T>
+inline T max (T a, T b)
+{
+ return ((b < a) ? a : b);
+}
+
+
+
+int round_int (double x)
+{
+ using namespace std;
+
+ return (static_cast <int> (floor (x + 0.5)));
+}
+
+
+
+} // namespace stopwatch
+
+
+
+#endif // stopwatch_fnc_CODEHEADER_INCLUDED
+
+#undef stopwatch_fnc_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/test.cpp b/demos/spectrum/3rdparty/fftreal/test.cpp
new file mode 100644
index 0000000..7b6ed2c
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/test.cpp
@@ -0,0 +1,267 @@
+/*****************************************************************************
+
+ test.cpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (_MSC_VER)
+ #pragma warning (4 : 4786) // "identifier was truncated to '255' characters in the debug information"
+ #pragma warning (4 : 4800) // "forcing value to bool 'true' or 'false' (performance warning)"
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+#include "test_settings.h"
+#include "TestHelperFixLen.h"
+#include "TestHelperNormal.h"
+
+#if defined (_MSC_VER)
+#include <crtdbg.h>
+#include <new.h>
+#endif // _MSC_VER
+
+#include <new>
+
+#include <cassert>
+#include <cstdio>
+
+
+
+#define TEST_
+
+
+/*\\\ FUNCTIONS \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+static int TEST_perform_test_accuracy_all ();
+static int TEST_perform_test_speed_all ();
+
+static void TEST_prog_init ();
+static void TEST_prog_end ();
+
+
+
+int main (int argc, char *argv [])
+{
+ using namespace std;
+
+ int ret_val = 0;
+
+ TEST_prog_init ();
+
+ try
+ {
+ if (ret_val == 0)
+ {
+ ret_val = TEST_perform_test_accuracy_all ();
+ }
+
+ if (ret_val == 0)
+ {
+ ret_val = TEST_perform_test_speed_all ();
+ }
+ }
+
+ catch (std::exception &e)
+ {
+ printf ("\n*** main(): Exception (std::exception) : %s\n", e.what ());
+ ret_val = -1;
+ }
+
+ catch (...)
+ {
+ printf ("\n*** main(): Undefined exception\n");
+ ret_val = -1;
+ }
+
+ TEST_prog_end ();
+
+ return (ret_val);
+}
+
+
+
+int TEST_perform_test_accuracy_all ()
+{
+ int ret_val = 0;
+
+ TestHelperNormal <float >::perform_test_accuracy (ret_val);
+ TestHelperNormal <double>::perform_test_accuracy (ret_val);
+
+ TestHelperFixLen < 1>::perform_test_accuracy (ret_val);
+ TestHelperFixLen < 2>::perform_test_accuracy (ret_val);
+ TestHelperFixLen < 3>::perform_test_accuracy (ret_val);
+ TestHelperFixLen < 4>::perform_test_accuracy (ret_val);
+ TestHelperFixLen < 7>::perform_test_accuracy (ret_val);
+ TestHelperFixLen < 8>::perform_test_accuracy (ret_val);
+ TestHelperFixLen <10>::perform_test_accuracy (ret_val);
+ TestHelperFixLen <12>::perform_test_accuracy (ret_val);
+ TestHelperFixLen <13>::perform_test_accuracy (ret_val);
+
+ return (ret_val);
+}
+
+
+
+int TEST_perform_test_speed_all ()
+{
+ int ret_val = 0;
+
+#if defined (test_settings_SPEED_TEST_ENABLED)
+
+ TestHelperNormal <float >::perform_test_speed (ret_val);
+ TestHelperNormal <double>::perform_test_speed (ret_val);
+
+ TestHelperFixLen < 1>::perform_test_speed (ret_val);
+ TestHelperFixLen < 2>::perform_test_speed (ret_val);
+ TestHelperFixLen < 3>::perform_test_speed (ret_val);
+ TestHelperFixLen < 4>::perform_test_speed (ret_val);
+ TestHelperFixLen < 7>::perform_test_speed (ret_val);
+ TestHelperFixLen < 8>::perform_test_speed (ret_val);
+ TestHelperFixLen <10>::perform_test_speed (ret_val);
+ TestHelperFixLen <12>::perform_test_speed (ret_val);
+ TestHelperFixLen <14>::perform_test_speed (ret_val);
+ TestHelperFixLen <16>::perform_test_speed (ret_val);
+ TestHelperFixLen <20>::perform_test_speed (ret_val);
+
+#endif
+
+ return (ret_val);
+}
+
+
+
+#if defined (_MSC_VER)
+static int __cdecl TEST_new_handler_cb (size_t dummy)
+{
+ throw std::bad_alloc ();
+ return (0);
+}
+#endif // _MSC_VER
+
+
+
+#if defined (_MSC_VER) && ! defined (NDEBUG)
+static int __cdecl TEST_debug_alloc_hook_cb (int alloc_type, void *user_data_ptr, size_t size, int block_type, long request_nbr, const unsigned char *filename_0, int line_nbr)
+{
+ if (block_type != _CRT_BLOCK) // Ignore CRT blocks to prevent infinite recursion
+ {
+ switch (alloc_type)
+ {
+ case _HOOK_ALLOC:
+ case _HOOK_REALLOC:
+ case _HOOK_FREE:
+
+ // Put some debug code here
+
+ break;
+
+ default:
+ assert (false); // Undefined allocation type
+ break;
+ }
+ }
+
+ return (1);
+}
+#endif
+
+
+
+#if defined (_MSC_VER) && ! defined (NDEBUG)
+static int __cdecl TEST_debug_report_hook_cb (int report_type, char *user_msg_0, int *ret_val_ptr)
+{
+ *ret_val_ptr = 0; // 1 to override the CRT default reporting mode
+
+ switch (report_type)
+ {
+ case _CRT_WARN:
+ case _CRT_ERROR:
+ case _CRT_ASSERT:
+
+// Put some debug code here
+
+ break;
+ }
+
+ return (*ret_val_ptr);
+}
+#endif
+
+
+
+static void TEST_prog_init ()
+{
+#if defined (_MSC_VER)
+ ::_set_new_handler (::TEST_new_handler_cb);
+#endif // _MSC_VER
+
+#if defined (_MSC_VER) && ! defined (NDEBUG)
+ {
+ const int mode = (1 * _CRTDBG_MODE_DEBUG)
+ | (1 * _CRTDBG_MODE_WNDW);
+ ::_CrtSetReportMode (_CRT_WARN, mode);
+ ::_CrtSetReportMode (_CRT_ERROR, mode);
+ ::_CrtSetReportMode (_CRT_ASSERT, mode);
+
+ const int old_flags = ::_CrtSetDbgFlag (_CRTDBG_REPORT_FLAG);
+ ::_CrtSetDbgFlag ( old_flags
+ | (1 * _CRTDBG_LEAK_CHECK_DF)
+ | (1 * _CRTDBG_CHECK_ALWAYS_DF));
+ ::_CrtSetBreakAlloc (-1); // Specify here a memory bloc number
+ ::_CrtSetAllocHook (TEST_debug_alloc_hook_cb);
+ ::_CrtSetReportHook (TEST_debug_report_hook_cb);
+
+ // Speed up I/O but breaks C stdio compatibility
+// std::cout.sync_with_stdio (false);
+// std::cin.sync_with_stdio (false);
+// std::cerr.sync_with_stdio (false);
+// std::clog.sync_with_stdio (false);
+ }
+#endif // _MSC_VER, NDEBUG
+}
+
+
+
+static void TEST_prog_end ()
+{
+#if defined (_MSC_VER) && ! defined (NDEBUG)
+ {
+ const int mode = (1 * _CRTDBG_MODE_DEBUG)
+ | (0 * _CRTDBG_MODE_WNDW);
+ ::_CrtSetReportMode (_CRT_WARN, mode);
+ ::_CrtSetReportMode (_CRT_ERROR, mode);
+ ::_CrtSetReportMode (_CRT_ASSERT, mode);
+
+ ::_CrtMemState mem_state;
+ ::_CrtMemCheckpoint (&mem_state);
+ ::_CrtMemDumpStatistics (&mem_state);
+ }
+#endif // _MSC_VER, NDEBUG
+}
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/test_fnc.h b/demos/spectrum/3rdparty/fftreal/test_fnc.h
new file mode 100644
index 0000000..2622156
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/test_fnc.h
@@ -0,0 +1,53 @@
+/*****************************************************************************
+
+ test_fnc.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (test_fnc_HEADER_INCLUDED)
+#define test_fnc_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class T>
+inline T limit (const T &x, const T &inf, const T &sup);
+
+
+
+#include "test_fnc.hpp"
+
+
+
+#endif // test_fnc_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/test_fnc.hpp b/demos/spectrum/3rdparty/fftreal/test_fnc.hpp
new file mode 100644
index 0000000..4b5f9f5
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/test_fnc.hpp
@@ -0,0 +1,56 @@
+/*****************************************************************************
+
+ test_fnc.hpp
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if defined (test_fnc_CURRENT_CODEHEADER)
+ #error Recursive inclusion of test_fnc code header.
+#endif
+#define test_fnc_CURRENT_CODEHEADER
+
+#if ! defined (test_fnc_CODEHEADER_INCLUDED)
+#define test_fnc_CODEHEADER_INCLUDED
+
+
+
+/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
+
+
+
+template <class T>
+T limit (const T &x, const T &inf, const T &sup)
+{
+ assert (! (sup < inf));
+
+ return ((x < inf) ? inf : ((sup < x) ? sup : x));
+}
+
+
+
+#endif // test_fnc_CODEHEADER_INCLUDED
+
+#undef test_fnc_CURRENT_CODEHEADER
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/test_settings.h b/demos/spectrum/3rdparty/fftreal/test_settings.h
new file mode 100644
index 0000000..b893afc
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/test_settings.h
@@ -0,0 +1,45 @@
+/*****************************************************************************
+
+ test_settings.h
+ Copyright (c) 2005 Laurent de Soras
+
+--- Legal stuff ---
+
+This library 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.1 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*Tab=3***********************************************************************/
+
+
+
+#if ! defined (test_settings_HEADER_INCLUDED)
+#define test_settings_HEADER_INCLUDED
+
+#if defined (_MSC_VER)
+ #pragma once
+ #pragma warning (4 : 4250) // "Inherits via dominance."
+#endif
+
+
+
+// #undef this label to avoid speed test compilation.
+#define test_settings_SPEED_TEST_ENABLED
+
+
+
+#endif // test_settings_HEADER_INCLUDED
+
+
+
+/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
diff --git a/demos/spectrum/3rdparty/fftreal/testapp.dpr b/demos/spectrum/3rdparty/fftreal/testapp.dpr
new file mode 100644
index 0000000..54f2eb9
--- /dev/null
+++ b/demos/spectrum/3rdparty/fftreal/testapp.dpr
@@ -0,0 +1,150 @@
+program testapp;
+{$APPTYPE CONSOLE}
+uses
+ SysUtils,
+ fftreal in 'fftreal.pas',
+ Math,
+ Windows;
+
+var
+ nbr_points : longint;
+ x, f : pflt_array;
+ fft : TFFTReal;
+ i : longint;
+ PI : double;
+ areal, img : double;
+ f_abs : double;
+ buffer_size : longint;
+ nbr_tests : longint;
+ time0, time1, time2 : int64;
+ timereso : int64;
+ offset : longint;
+ t0, t1 : double;
+ nbr_s_chn : longint;
+ tempp1, tempp2 : pflt_array;
+
+begin
+ (*______________________________________________
+ *
+ * Exactness test
+ *______________________________________________
+ *)
+
+ WriteLn('Accuracy test:');
+ WriteLn;
+
+ nbr_points := 16; // Power of 2
+ GetMem(x, nbr_points * sizeof_flt);
+ GetMem(f, nbr_points * sizeof_flt);
+ fft := TFFTReal.Create(nbr_points); // FFT object initialized here
+
+ // Test signal
+ PI := ArcTan(1) * 4;
+ for i := 0 to nbr_points-1 do
+ begin
+ x^[i] := -1 + sin (3*2*PI*i/nbr_points)
+ + cos (5*2*PI*i/nbr_points) * 2
+ - sin (7*2*PI*i/nbr_points) * 3
+ + cos (8*2*PI*i/nbr_points) * 5;
+ end;
+
+ // Compute FFT and IFFT
+ fft.do_fft(f, x);
+ fft.do_ifft(f, x);
+ fft.rescale(x);
+
+ // Display the result
+ WriteLn('FFT:');
+ for i := 0 to nbr_points div 2 do
+ begin
+ areal := f^[i];
+ if (i > 0) and (i < nbr_points div 2) then
+ img := f^[i + nbr_points div 2]
+ else
+ img := 0;
+
+ f_abs := Sqrt(areal * areal + img * img);
+ WriteLn(Format('%5d: %12.6f %12.6f (%12.6f)', [i, areal, img, f_abs]));
+ end;
+
+ WriteLn;
+ WriteLn('IFFT:');
+ for i := 0 to nbr_points-1 do
+ WriteLn(Format('%5d: %f', [i, x^[i]]));
+
+ WriteLn;
+
+ FreeMem(x);
+ FreeMem(f);
+ fft.Free;
+
+
+ (*______________________________________________
+ *
+ * Speed test
+ *______________________________________________
+ *)
+
+ WriteLn('Speed test:');
+ WriteLn('Please wait...');
+ WriteLn;
+
+ nbr_points := 1024; // Power of 2
+ buffer_size := 256*nbr_points; // Number of flt_t (float or double)
+ nbr_tests := 10000;
+
+ assert(nbr_points <= buffer_size);
+ GetMem(x, buffer_size * sizeof_flt);
+ GetMem(f, buffer_size * sizeof_flt);
+ fft := TFFTReal.Create(nbr_points); // FFT object initialized here
+
+ // Test signal: noise
+ for i := 0 to nbr_points-1 do
+ x^[i] := Random($7fff) - ($7fff shr 1);
+
+ // timing
+ QueryPerformanceFrequency(timereso);
+ QueryPerformanceCounter(time0);
+
+ for i := 0 to nbr_tests-1 do
+ begin
+ offset := (i * nbr_points) and (buffer_size - 1);
+ tempp1 := f;
+ inc(tempp1, offset);
+ tempp2 := x;
+ inc(tempp2, offset);
+ fft.do_fft(tempp1, tempp2);
+ end;
+
+ QueryPerformanceCounter(time1);
+
+ for i := 0 to nbr_tests-1 do
+ begin
+ offset := (i * nbr_points) and (buffer_size - 1);
+ tempp1 := f;
+ inc(tempp1, offset);
+ tempp2 := x;
+ inc(tempp2, offset);
+ fft.do_ifft(tempp1, tempp2);
+ fft.rescale(x);
+ end;
+
+ QueryPerformanceCounter(time2);
+
+ t0 := ((time1-time0) / timereso) / nbr_tests;
+ t1 := ((time2-time1) / timereso) / nbr_tests;
+
+ WriteLn(Format('%d-points FFT : %.0f us.', [nbr_points, t0 * 1000000]));
+ WriteLn(Format('%d-points IFFT + scaling: %.0f us.', [nbr_points, t1 * 1000000]));
+
+ nbr_s_chn := Floor(nbr_points / ((t0 + t1) * 44100 * 2));
+ WriteLn(Format('Peak performance: FFT+IFFT on %d mono channels at 44.1 KHz (with overlapping)', [nbr_s_chn]));
+ WriteLn;
+
+ FreeMem(x);
+ FreeMem(f);
+ fft.Free;
+
+ WriteLn('Press [Return] key to terminate...');
+ ReadLn;
+end.
diff --git a/demos/spectrum/README.txt b/demos/spectrum/README.txt
new file mode 100644
index 0000000..c39d4a7
--- /dev/null
+++ b/demos/spectrum/README.txt
@@ -0,0 +1,103 @@
+Spectrum analyser demo app
+==========================
+
+Introduction
+------------
+
+This application is a demo which uses the QtMultimedia APIs to capture and play back PCM audio. While either recording or playback is ongoing, the application performs real-time level and frequency spectrum analysis, displaying the results in its main window.
+
+
+Acknowledgments
+---------------
+
+The application uses the FFTReal v2.00 library by Laurent de Soras to perform frequency analysis of the audio signal. For further information, see the project home page:
+ http://ldesoras.free.fr/prod.html
+
+
+Quick start
+-----------
+
+Play generated tone
+1. Select 'Play generated tone' from the mode menu
+2. Ensure that the 'Frequency sweep' box is checked
+3. Press 'OK'
+4. Press the play button
+You should hear a rising tone, and see progressively higher frequencies indicated by the spectrograph.
+
+Record and playback
+1. Select 'Record and play back audio' from the mode menu
+2. Press the record button, and speak into the microphone
+3. Wait until the buffer is full (shown as a full blue bar in the top widget)
+4. Press play, and wait until playback of the buffer is complete
+
+Play file
+1. Select 'Play file' from the mode menu
+2. Select a WAV file
+3. Press the play button
+You should hear the first few seconds of the file being played. The waveform, spectrograph and level meter should be updated as the file is played.
+
+
+Things to play with
+-------------------
+
+Try repeating the 'Play generated tone' sequence using different window functions. These can be selected from the settings dialog - launch it by pressing the spanner icon. The window function is applied to the audio signal before performing the frequency analysis; different windows should have a visible effect on the resulting frequency spectrum.
+
+Try clicking on one of the spectrograph bars while the tone is being played. The frequency range for that bar will be displayed at the top of the application window.
+
+
+Troubleshooting
+---------------
+
+If either recording or playback do not work, you may need to select a different input / output audio device. This can be done in the settings dialog - launch it by pressing the spanner icon.
+
+If that doesn't work, there may be a problem either in the application or in Qt. Report a bug in the usual way.
+
+
+Application interface
+---------------------
+
+The main window of the application contains the following widgets, starting at the top:
+
+Message box
+This shows various messages during execution, such as the current audio format.
+
+Progress bar / waveform display
+- While recording or playback is ongoing, the audio waveform is displayed, sliding from right to left.
+- Superimposed on the waveform, the amount of data currently in the buffer is showed as a blue bar. When recording, this blue bar fills up from left to right; when playing, the bar gets consumed from left to right.
+- A green window shows which part of the buffer has most recently been analysed. This window should be close to the 'leading edge' of recording or playback, i.e. the most recently recorded / played data, although it will lag slightly depending on the performance of the machine on which the application is running.
+
+Frequency spectrograph (on the left)
+The spectrograph shows 10 bars, each representing a frequency range. The frequency range of each bar is displayed in the message box when the bar is clicked. The height of the bar shows the maximum amplitude of freqencies within its range.
+
+Level meter (on the right)
+The current peak audio level is shown as a pink bar; the current RMS level is shown as a red bar. The 'high water mark' during a recent period is shown as a thin red line.
+
+Button panel
+- The mode menu allows switching between the three operation modes - 'Play generated tone', 'Record and play back' and 'Play file'.
+- The record button starts or resumes audio capture from the current input device.
+- The pause button suspends either capture or recording.
+- The play button starts or resumes audio playback to the current output device.
+- The settings button launches the settings dialog.
+
+
+Hacking
+-------
+
+If you want to hack the application, here are some pointers to get started.
+
+The spectrum.pri file contains several macros which you can enable by uncommenting:
+- LOG_FOO Enable logging from class Foo via qDebug()
+- DUMP_FOO Dump data from class Foo to the file system
+ e.g. DUMP_SPECTRUMANALYSER writes files containing the raw FFT input and output.
+ Be aware that this can generate a *lot* of data and may slow the app down considerably.
+- DISABLE_FOO Disable specified functionality
+
+If you don't like the combination of the waveform and progress bar in a single widget, separate them by commenting out SUPERIMPOSE_PROGRESS_ON_WAVEFORM.
+
+The spectrum.h file defines a number of parameters which can be played with. These control things such as the number of audio samples analysed per FFT calculation, the range and number of bands displayed by the spectrograph, and so on.
+
+The part of the application which interacts with QtMultimedia is in the Engine class.
+
+Some ideas for enhancements to the app are listed in TODO.txt. Feel free to start work on any of them :)
+
+
diff --git a/demos/spectrum/TODO.txt b/demos/spectrum/TODO.txt
new file mode 100644
index 0000000..dc3d8f3
--- /dev/null
+++ b/demos/spectrum/TODO.txt
@@ -0,0 +1,34 @@
+TODO list for spectrum analyser
+===============================
+
+Bug fixes
+---------
+
+
+New features
+------------
+
+* Wrap user-visible strings in tr()
+
+* Allow user to set frequency range
+There should be some constraints on this, e.g.
+ - Maximum frequency must not be greater than Nyquist frequency
+ - Range is divisible by number of bars?
+
+* Add more visualizers other than bar spectrogram
+e.g. Funky OpenGL visualizers, particle effects etc
+
+
+Non-functional stuff
+--------------------
+
+* Improve robustness of QComboBox -> enum mapping
+At the moment, SettingsDialog relies on casting the combobox item index directly to the enumerated type. This is clearly a bit fragile...
+
+* For functions which take or return qint64 values, make a clear distinction between duration (microseconds) and length (bytes).
+A sensible convention would be that the default is bytes - i.e. microseconds must be indicated by adding a Us suffix, where not already obvious from the function name.
+
+
+
+
+
diff --git a/demos/spectrum/app/app.pro b/demos/spectrum/app/app.pro
new file mode 100644
index 0000000..2adb605
--- /dev/null
+++ b/demos/spectrum/app/app.pro
@@ -0,0 +1,121 @@
+include(../spectrum.pri)
+
+TEMPLATE = app
+
+TARGET = spectrum
+unix: !macx: !symbian: TARGET = spectrum.bin
+
+QT += multimedia
+
+SOURCES += main.cpp \
+ engine.cpp \
+ frequencyspectrum.cpp \
+ levelmeter.cpp \
+ mainwidget.cpp \
+ progressbar.cpp \
+ settingsdialog.cpp \
+ spectrograph.cpp \
+ spectrumanalyser.cpp \
+ tonegenerator.cpp \
+ tonegeneratordialog.cpp \
+ utils.cpp \
+ waveform.cpp \
+ wavfile.cpp
+
+HEADERS += engine.h \
+ frequencyspectrum.h \
+ levelmeter.h \
+ mainwidget.h \
+ progressbar.h \
+ settingsdialog.h \
+ spectrograph.h \
+ spectrum.h \
+ spectrumanalyser.h \
+ tonegenerator.h \
+ tonegeneratordialog.h \
+ utils.h \
+ waveform.h \
+ wavfile.h
+
+fftreal_dir = ../3rdparty/fftreal
+
+INCLUDEPATH += $${fftreal_dir}
+
+RESOURCES = spectrum.qrc
+
+symbian {
+ # Platform security capability required to record audio on Symbian
+ TARGET.CAPABILITY += UserEnvironment
+
+ # Provide unique ID for the generated binary, required by Symbian OS
+ TARGET.UID3 = 0xA000E3FA
+}
+
+
+# Dynamic linkage against FFTReal DLL
+!contains(DEFINES, DISABLE_FFT) {
+ symbian {
+ # Must explicitly add the .dll suffix to ensure dynamic linkage
+ LIBS += -lfftreal.dll
+ } else {
+ macx {
+ # Link to fftreal framework
+ LIBS += -F$${fftreal_dir}
+ LIBS += -framework fftreal
+ } else {
+ # Link to dynamic library which is written to ../bin
+ LIBS += -L../bin
+ LIBS += -lfftreal
+ }
+ }
+}
+
+
+# Deployment
+
+symbian {
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+
+ !contains(DEFINES, DISABLE_FFT) {
+ # Include FFTReal DLL in the SIS file
+ fftreal.sources = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)/fftreal.dll
+ fftreal.path = !:/sys/bin
+ DEPLOYMENT += fftreal
+ }
+} else {
+ macx {
+ # Specify directory in which to create spectrum.app bundle
+ DESTDIR = ..
+
+ !contains(DEFINES, DISABLE_FFT) {
+ # Relocate fftreal.framework into spectrum.app bundle
+ framework_dir = ../spectrum.app/Contents/Frameworks
+ framework_name = fftreal.framework/Versions/1/fftreal
+ QMAKE_POST_LINK = \
+ mkdir -p $${framework_dir} &&\
+ rm -rf $${framework_dir}/fftreal.framework &&\
+ cp -R $${fftreal_dir}/fftreal.framework $${framework_dir} &&\
+ install_name_tool -id @executable_path/../Frameworks/$${framework_name} \
+ $${framework_dir}/$${framework_name} &&\
+ install_name_tool -change $${framework_name} \
+ @executable_path/../Frameworks/$${framework_name} \
+ ../spectrum.app/Contents/MacOS/spectrum
+ }
+ } else {
+ # Specify directory in which to create spectrum application
+ DESTDIR = ../bin
+
+ unix: !symbian {
+ # On unices other than Mac OSX, we copy a shell script into the bin directory.
+ # This script takes care of correctly setting the LD_LIBRARY_PATH so that
+ # the dynamic library can be located.
+ copy_launch_script.target = copy_launch_script
+ copy_launch_script.commands = \
+ install -m 0555 spectrum.sh ../bin/spectrum
+ QMAKE_EXTRA_TARGETS += copy_launch_script
+ POST_TARGETDEPS += copy_launch_script
+ }
+ }
+}
+
+
diff --git a/demos/spectrum/app/engine.cpp b/demos/spectrum/app/engine.cpp
new file mode 100644
index 0000000..5cdfb6d
--- /dev/null
+++ b/demos/spectrum/app/engine.cpp
@@ -0,0 +1,752 @@
+/****************************************************************************
+**
+** 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: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 "engine.h"
+#include "tonegenerator.h"
+#include "utils.h"
+
+#include <math.h>
+
+#include <QCoreApplication>
+#include <QMetaObject>
+#include <QSet>
+#include <QtMultimedia/QAudioInput>
+#include <QtMultimedia/QAudioOutput>
+#include <QDebug>
+#include <QThread>
+#include <QFile>
+
+//-----------------------------------------------------------------------------
+// Constants
+//-----------------------------------------------------------------------------
+
+const qint64 BufferDurationUs = 10 * 1000000;
+const int NotifyIntervalMs = 100;
+
+// Size of the level calculation window in microseconds
+const int LevelWindowUs = 0.1 * 1000000;
+
+
+//-----------------------------------------------------------------------------
+// Helper functions
+//-----------------------------------------------------------------------------
+
+QDebug& operator<<(QDebug &debug, const QAudioFormat &format)
+{
+ debug << format.frequency() << "Hz"
+ << format.channels() << "channels";
+ return debug;
+}
+
+//-----------------------------------------------------------------------------
+// Constructor and destructor
+//-----------------------------------------------------------------------------
+
+Engine::Engine(QObject *parent)
+ : QObject(parent)
+ , m_mode(QAudio::AudioInput)
+ , m_state(QAudio::StoppedState)
+ , m_generateTone(false)
+ , m_file(0)
+ , m_availableAudioInputDevices
+ (QAudioDeviceInfo::availableDevices(QAudio::AudioInput))
+ , m_audioInputDevice(QAudioDeviceInfo::defaultInputDevice())
+ , m_audioInput(0)
+ , m_audioInputIODevice(0)
+ , m_recordPosition(0)
+ , m_availableAudioOutputDevices
+ (QAudioDeviceInfo::availableDevices(QAudio::AudioOutput))
+ , m_audioOutputDevice(QAudioDeviceInfo::defaultOutputDevice())
+ , m_audioOutput(0)
+ , m_playPosition(0)
+ , m_dataLength(0)
+ , m_rmsLevel(0.0)
+ , m_peakLevel(0.0)
+ , m_spectrumLengthBytes(0)
+ , m_spectrumAnalyser()
+ , m_spectrumPosition(0)
+ , m_count(0)
+{
+ qRegisterMetaType<FrequencySpectrum>("FrequencySpectrum");
+ CHECKED_CONNECT(&m_spectrumAnalyser,
+ SIGNAL(spectrumChanged(FrequencySpectrum)),
+ this,
+ SLOT(spectrumChanged(FrequencySpectrum)));
+
+ initialize();
+
+#ifdef DUMP_DATA
+ createOutputDir();
+#endif
+
+#ifdef DUMP_SPECTRUM
+ m_spectrumAnalyser.setOutputPath(outputPath());
+#endif
+}
+
+Engine::~Engine()
+{
+
+}
+
+//-----------------------------------------------------------------------------
+// Public functions
+//-----------------------------------------------------------------------------
+
+bool Engine::loadFile(const QString &fileName)
+{
+ bool result = false;
+ m_generateTone = false;
+
+ Q_ASSERT(!fileName.isEmpty());
+ Q_ASSERT(!m_file);
+ m_file = new QFile(fileName, this);
+ m_file->setFileName(fileName);
+ Q_ASSERT(m_file->exists());
+ if (m_file->open(QFile::ReadOnly)) {
+ m_wavFile.readHeader(*m_file);
+ if (isPCMS16LE(m_wavFile.format())) {
+ result = initialize();
+ } else {
+ emit errorMessage(tr("Audio format not supported"),
+ formatToString(m_wavFile.format()));
+ }
+ } else {
+ emit errorMessage(tr("Could not open file"), fileName);
+ }
+
+ delete m_file;
+ m_file = 0;
+
+ return result;
+}
+
+bool Engine::generateTone(const Tone &tone)
+{
+ Q_ASSERT(!m_file);
+ m_generateTone = true;
+ m_tone = tone;
+ ENGINE_DEBUG << "Engine::generateTone"
+ << "startFreq" << m_tone.startFreq
+ << "endFreq" << m_tone.endFreq
+ << "amp" << m_tone.amplitude;
+ return initialize();
+}
+
+bool Engine::generateSweptTone(qreal amplitude)
+{
+ Q_ASSERT(!m_file);
+ m_generateTone = true;
+ m_tone.startFreq = 1;
+ m_tone.endFreq = 0;
+ m_tone.amplitude = amplitude;
+ ENGINE_DEBUG << "Engine::generateSweptTone"
+ << "startFreq" << m_tone.startFreq
+ << "amp" << m_tone.amplitude;
+ return initialize();
+}
+
+bool Engine::initializeRecord()
+{
+ ENGINE_DEBUG << "Engine::initializeRecord";
+ Q_ASSERT(!m_file);
+ m_generateTone = false;
+ m_tone = SweptTone();
+ return initialize();
+}
+
+qint64 Engine::bufferDuration() const
+{
+ return BufferDurationUs;
+}
+
+qint64 Engine::dataDuration() const
+{
+ qint64 result = 0;
+ if (QAudioFormat() != m_format)
+ result = audioDuration(m_format, m_dataLength);
+ return result;
+}
+
+qint64 Engine::audioBufferLength() const
+{
+ qint64 length = 0;
+ if (QAudio::ActiveState == m_state || QAudio::IdleState == m_state) {
+ Q_ASSERT(QAudioFormat() != m_format);
+ switch (m_mode) {
+ case QAudio::AudioInput:
+ length = m_audioInput->bufferSize();
+ break;
+ case QAudio::AudioOutput:
+ length = m_audioOutput->bufferSize();
+ break;
+ }
+ }
+ return length;
+}
+
+void Engine::setWindowFunction(WindowFunction type)
+{
+ m_spectrumAnalyser.setWindowFunction(type);
+}
+
+
+//-----------------------------------------------------------------------------
+// Public slots
+//-----------------------------------------------------------------------------
+
+void Engine::startRecording()
+{
+ if (m_audioInput) {
+ if (QAudio::AudioInput == m_mode &&
+ QAudio::SuspendedState == m_state) {
+ m_audioInput->resume();
+ } else {
+ m_spectrumAnalyser.cancelCalculation();
+ spectrumChanged(0, 0, FrequencySpectrum());
+
+ m_buffer.fill(0);
+ setRecordPosition(0, true);
+ stopPlayback();
+ m_mode = QAudio::AudioInput;
+ CHECKED_CONNECT(m_audioInput, SIGNAL(stateChanged(QAudio::State)),
+ this, SLOT(audioStateChanged(QAudio::State)));
+ CHECKED_CONNECT(m_audioInput, SIGNAL(notify()),
+ this, SLOT(audioNotify()));
+ m_count = 0;
+ m_dataLength = 0;
+ emit dataDurationChanged(0);
+ m_audioInputIODevice = m_audioInput->start();
+ CHECKED_CONNECT(m_audioInputIODevice, SIGNAL(readyRead()),
+ this, SLOT(audioDataReady()));
+ }
+ }
+}
+
+void Engine::startPlayback()
+{
+ if (m_audioOutput) {
+ if (QAudio::AudioOutput == m_mode &&
+ QAudio::SuspendedState == m_state) {
+#ifdef Q_OS_WIN
+ // The Windows backend seems to internally go back into ActiveState
+ // while still returning SuspendedState, so to ensure that it doesn't
+ // ignore the resume() call, we first re-suspend
+ m_audioOutput->suspend();
+#endif
+ m_audioOutput->resume();
+ } else {
+ m_spectrumAnalyser.cancelCalculation();
+ spectrumChanged(0, 0, FrequencySpectrum());
+
+ setPlayPosition(0, true);
+ stopRecording();
+ m_mode = QAudio::AudioOutput;
+ CHECKED_CONNECT(m_audioOutput, SIGNAL(stateChanged(QAudio::State)),
+ this, SLOT(audioStateChanged(QAudio::State)));
+ CHECKED_CONNECT(m_audioOutput, SIGNAL(notify()),
+ this, SLOT(audioNotify()));
+ m_count = 0;
+ m_audioOutputIODevice.close();
+ m_audioOutputIODevice.setBuffer(&m_buffer);
+ m_audioOutputIODevice.open(QIODevice::ReadOnly);
+ m_audioOutput->start(&m_audioOutputIODevice);
+ }
+ }
+}
+
+void Engine::suspend()
+{
+ if (QAudio::ActiveState == m_state ||
+ QAudio::IdleState == m_state) {
+ switch (m_mode) {
+ case QAudio::AudioInput:
+ m_audioInput->suspend();
+ break;
+ case QAudio::AudioOutput:
+ m_audioOutput->suspend();
+ break;
+ }
+ }
+}
+
+void Engine::setAudioInputDevice(const QAudioDeviceInfo &device)
+{
+ if (device.deviceName() != m_audioInputDevice.deviceName()) {
+ m_audioInputDevice = device;
+ initialize();
+ }
+}
+
+void Engine::setAudioOutputDevice(const QAudioDeviceInfo &device)
+{
+ if (device.deviceName() != m_audioOutputDevice.deviceName()) {
+ m_audioOutputDevice = device;
+ initialize();
+ }
+}
+
+
+//-----------------------------------------------------------------------------
+// Private slots
+//-----------------------------------------------------------------------------
+
+void Engine::audioNotify()
+{
+ switch (m_mode) {
+ case QAudio::AudioInput: {
+ const qint64 recordPosition =
+ qMin(BufferDurationUs, m_audioInput->processedUSecs());
+ setRecordPosition(recordPosition);
+
+ // Calculate level of most recently captured data
+ qint64 levelLength = audioLength(m_format, LevelWindowUs);
+ levelLength = qMin(m_dataLength, levelLength);
+ const qint64 levelPosition = m_dataLength - levelLength;
+ calculateLevel(levelPosition, levelLength);
+
+ // Calculate spectrum of most recently captured data
+ if (m_dataLength >= m_spectrumLengthBytes) {
+ const qint64 spectrumPosition = m_dataLength - m_spectrumLengthBytes;
+ calculateSpectrum(spectrumPosition);
+ }
+ }
+ break;
+ case QAudio::AudioOutput: {
+ const qint64 playPosition =
+ qMin(dataDuration(), m_audioOutput->processedUSecs());
+ setPlayPosition(playPosition);
+
+ qint64 analysisPosition = audioLength(m_format, playPosition);
+
+ // Calculate level of data starting at current playback position
+ const qint64 levelLength = audioLength(m_format, LevelWindowUs);
+ if (analysisPosition + levelLength < m_dataLength)
+ calculateLevel(analysisPosition, levelLength);
+
+ if (analysisPosition + m_spectrumLengthBytes < m_dataLength)
+ calculateSpectrum(analysisPosition);
+
+ if (dataDuration() == playPosition)
+ stopPlayback();
+ }
+ break;
+ }
+}
+
+void Engine::audioStateChanged(QAudio::State state)
+{
+ ENGINE_DEBUG << "Engine::audioStateChanged from" << m_state
+ << "to" << state;
+
+ if (QAudio::StoppedState == state) {
+ // Check error
+ QAudio::Error error = QAudio::NoError;
+ switch (m_mode) {
+ case QAudio::AudioInput:
+ error = m_audioInput->error();
+ break;
+ case QAudio::AudioOutput:
+ error = m_audioOutput->error();
+ break;
+ }
+ if (QAudio::NoError != error) {
+ reset();
+ return;
+ }
+ }
+ setState(state);
+}
+
+void Engine::audioDataReady()
+{
+ const qint64 bytesReady = m_audioInput->bytesReady();
+ const qint64 bytesSpace = m_buffer.size() - m_dataLength;
+ const qint64 bytesToRead = qMin(bytesReady, bytesSpace);
+
+ const qint64 bytesRead = m_audioInputIODevice->read(
+ m_buffer.data() + m_dataLength,
+ bytesToRead);
+
+ if (bytesRead) {
+ m_dataLength += bytesRead;
+
+ const qint64 duration = audioDuration(m_format, m_dataLength);
+ emit dataDurationChanged(duration);
+ }
+
+ if (m_buffer.size() == m_dataLength)
+ stopRecording();
+}
+
+void Engine::spectrumChanged(const FrequencySpectrum &spectrum)
+{
+ ENGINE_DEBUG << "Engine::spectrumChanged" << "pos" << m_spectrumPosition;
+ const qint64 positionUs = audioDuration(m_format, m_spectrumPosition);
+ const qint64 lengthUs = audioDuration(m_format, m_spectrumLengthBytes);
+ emit spectrumChanged(positionUs, lengthUs, spectrum);
+}
+
+
+//-----------------------------------------------------------------------------
+// Private functions
+//-----------------------------------------------------------------------------
+
+void Engine::reset()
+{
+ stopRecording();
+ stopPlayback();
+ setState(QAudio::AudioInput, QAudio::StoppedState);
+ setFormat(QAudioFormat());
+ delete m_audioInput;
+ m_audioInput = 0;
+ m_audioInputIODevice = 0;
+ setRecordPosition(0);
+ delete m_audioOutput;
+ m_audioOutput = 0;
+ setPlayPosition(0);
+ m_buffer.clear();
+ m_dataLength = 0;
+ m_spectrumPosition = 0;
+ emit dataDurationChanged(0);
+ setLevel(0.0, 0.0, 0);
+}
+
+bool Engine::initialize()
+{
+ bool result = false;
+
+ reset();
+
+ if (selectFormat()) {
+ const qint64 bufferLength = audioLength(m_format, BufferDurationUs);
+ m_buffer.resize(bufferLength);
+ m_buffer.fill(0);
+ emit bufferDurationChanged(BufferDurationUs);
+
+ if (m_generateTone) {
+ if (0 == m_tone.endFreq) {
+ const qreal nyquist = nyquistFrequency(m_format);
+ m_tone.endFreq = qMin(qreal(SpectrumHighFreq), nyquist);
+ }
+
+ // Call function defined in utils.h, at global scope
+ ::generateTone(m_tone, m_format, m_buffer);
+ m_dataLength = m_buffer.size();
+ emit dataDurationChanged(bufferDuration());
+ setRecordPosition(bufferDuration());
+ result = true;
+ } else if (m_file) {
+ const qint64 length = m_wavFile.readData(*m_file, m_buffer, m_format);
+ if (length) {
+ m_dataLength = length;
+ emit dataDurationChanged(dataDuration());
+ setRecordPosition(dataDuration());
+ result = true;
+ }
+ } else {
+ m_audioInput = new QAudioInput(m_audioInputDevice, m_format, this);
+ m_audioInput->setNotifyInterval(NotifyIntervalMs);
+ result = true;
+ }
+
+ m_audioOutput = new QAudioOutput(m_audioOutputDevice, m_format, this);
+ m_audioOutput->setNotifyInterval(NotifyIntervalMs);
+ m_spectrumLengthBytes = SpectrumLengthSamples *
+ (m_format.sampleSize() / 8) * m_format.channels();
+ } else {
+ if (m_file)
+ emit errorMessage(tr("Audio format not supported"),
+ formatToString(m_format));
+ else if (m_generateTone)
+ emit errorMessage(tr("No suitable format found"), "");
+ else
+ emit errorMessage(tr("No common input / output format found"), "");
+ }
+
+ ENGINE_DEBUG << "Engine::initialize" << "format" << m_format;
+
+ return result;
+}
+
+bool Engine::selectFormat()
+{
+ bool foundSupportedFormat = false;
+
+ if (m_file) {
+ // Header is read from the WAV file; just need to check whether
+ // it is supported by the audio output device
+ QAudioFormat format = m_wavFile.format();
+ if (m_audioOutputDevice.isFormatSupported(m_wavFile.format())) {
+ setFormat(m_wavFile.format());
+ foundSupportedFormat = true;
+ } else {
+ // Try flipping mono <-> stereo
+ const int channels = (format.channels() == 1) ? 2 : 1;
+ format.setChannels(channels);
+ if (m_audioOutputDevice.isFormatSupported(format)) {
+ setFormat(format);
+ foundSupportedFormat = true;
+ }
+ }
+ } else {
+
+ QList<int> frequenciesList;
+ #ifdef Q_OS_WIN
+ // The Windows audio backend does not correctly report format support
+ // (see QTBUG-9100). Furthermore, although the audio subsystem captures
+ // at 11025Hz, the resulting audio is corrupted.
+ frequenciesList += 8000;
+ #endif
+
+ if (!m_generateTone)
+ frequenciesList += m_audioInputDevice.supportedFrequencies();
+
+ frequenciesList += m_audioOutputDevice.supportedFrequencies();
+ frequenciesList = frequenciesList.toSet().toList(); // remove duplicates
+ qSort(frequenciesList);
+ ENGINE_DEBUG << "Engine::initialize frequenciesList" << frequenciesList;
+
+ QList<int> channelsList;
+ channelsList += m_audioInputDevice.supportedChannels();
+ channelsList += m_audioOutputDevice.supportedChannels();
+ channelsList = channelsList.toSet().toList();
+ qSort(channelsList);
+ ENGINE_DEBUG << "Engine::initialize channelsList" << channelsList;
+
+ QAudioFormat format;
+ format.setByteOrder(QAudioFormat::LittleEndian);
+ format.setCodec("audio/pcm");
+ format.setSampleSize(16);
+ format.setSampleType(QAudioFormat::SignedInt);
+ int frequency, channels;
+ foreach (frequency, frequenciesList) {
+ if (foundSupportedFormat)
+ break;
+ format.setFrequency(frequency);
+ foreach (channels, channelsList) {
+ format.setChannels(channels);
+ const bool inputSupport = m_generateTone ||
+ m_audioInputDevice.isFormatSupported(format);
+ const bool outputSupport = m_audioOutputDevice.isFormatSupported(format);
+ ENGINE_DEBUG << "Engine::initialize checking " << format
+ << "input" << inputSupport
+ << "output" << outputSupport;
+ if (inputSupport && outputSupport) {
+ foundSupportedFormat = true;
+ break;
+ }
+ }
+ }
+
+ if (!foundSupportedFormat)
+ format = QAudioFormat();
+
+ setFormat(format);
+ }
+
+ return foundSupportedFormat;
+}
+
+void Engine::stopRecording()
+{
+ if (m_audioInput) {
+ m_audioInput->stop();
+ QCoreApplication::instance()->processEvents();
+ m_audioInput->disconnect();
+ }
+ m_audioInputIODevice = 0;
+
+#ifdef DUMP_AUDIO
+ dumpData();
+#endif
+}
+
+void Engine::stopPlayback()
+{
+ if (m_audioOutput) {
+ m_audioOutput->stop();
+ QCoreApplication::instance()->processEvents();
+ m_audioOutput->disconnect();
+ setPlayPosition(0);
+ }
+}
+
+void Engine::setState(QAudio::State state)
+{
+ const bool changed = (m_state != state);
+ m_state = state;
+ if (changed)
+ emit stateChanged(m_mode, m_state);
+}
+
+void Engine::setState(QAudio::Mode mode, QAudio::State state)
+{
+ const bool changed = (m_mode != mode || m_state != state);
+ m_mode = mode;
+ m_state = state;
+ if (changed)
+ emit stateChanged(m_mode, m_state);
+}
+
+void Engine::setRecordPosition(qint64 position, bool forceEmit)
+{
+ const bool changed = (m_recordPosition != position);
+ m_recordPosition = position;
+ if (changed || forceEmit)
+ emit recordPositionChanged(m_recordPosition);
+}
+
+void Engine::setPlayPosition(qint64 position, bool forceEmit)
+{
+ const bool changed = (m_playPosition != position);
+ m_playPosition = position;
+ if (changed || forceEmit)
+ emit playPositionChanged(m_playPosition);
+}
+
+void Engine::calculateLevel(qint64 position, qint64 length)
+{
+#ifdef DISABLE_LEVEL
+ Q_UNUSED(position)
+ Q_UNUSED(length)
+#else
+ Q_ASSERT(position + length <= m_dataLength);
+
+ qreal peakLevel = 0.0;
+
+ qreal sum = 0.0;
+ const char *ptr = m_buffer.constData() + position;
+ const char *const end = ptr + length;
+ while (ptr < end) {
+ const qint16 value = *reinterpret_cast<const qint16*>(ptr);
+ const qreal fracValue = pcmToReal(value);
+ peakLevel = qMax(peakLevel, fracValue);
+ sum += fracValue * fracValue;
+ ptr += 2;
+ }
+ const int numSamples = length / 2;
+ qreal rmsLevel = sqrt(sum / numSamples);
+
+ rmsLevel = qMax(qreal(0.0), rmsLevel);
+ rmsLevel = qMin(qreal(1.0), rmsLevel);
+ setLevel(rmsLevel, peakLevel, numSamples);
+
+ ENGINE_DEBUG << "Engine::calculateLevel" << "pos" << position << "len" << length
+ << "rms" << rmsLevel << "peak" << peakLevel;
+#endif
+}
+
+void Engine::calculateSpectrum(qint64 position)
+{
+#ifdef DISABLE_SPECTRUM
+ Q_UNUSED(position)
+#else
+ Q_ASSERT(position + m_spectrumLengthBytes <= m_dataLength);
+ Q_ASSERT(0 == m_spectrumLengthBytes % 2); // constraint of FFT algorithm
+
+ // QThread::currentThread is marked 'for internal use only', but
+ // we're only using it for debug output here, so it's probably OK :)
+ ENGINE_DEBUG << "Engine::calculateSpectrum" << QThread::currentThread()
+ << "count" << m_count << "pos" << position << "len" << m_spectrumLengthBytes
+ << "spectrumAnalyser.isReady" << m_spectrumAnalyser.isReady();
+
+ if(m_spectrumAnalyser.isReady()) {
+ m_spectrumBuffer = QByteArray::fromRawData(m_buffer.constData() + position,
+ m_spectrumLengthBytes);
+ m_spectrumPosition = position;
+ m_spectrumAnalyser.calculate(m_spectrumBuffer, m_format);
+ }
+#endif
+}
+
+void Engine::setFormat(const QAudioFormat &format)
+{
+ const bool changed = (format != m_format);
+ m_format = format;
+ if (changed)
+ emit formatChanged(m_format);
+}
+
+void Engine::setLevel(qreal rmsLevel, qreal peakLevel, int numSamples)
+{
+ m_rmsLevel = rmsLevel;
+ m_peakLevel = peakLevel;
+ emit levelChanged(m_rmsLevel, m_peakLevel, numSamples);
+}
+
+#ifdef DUMP_DATA
+void Engine::createOutputDir()
+{
+ m_outputDir.setPath("output");
+
+ // Ensure output directory exists and is empty
+ if (m_outputDir.exists()) {
+ const QStringList files = m_outputDir.entryList(QDir::Files);
+ QString file;
+ foreach (file, files)
+ m_outputDir.remove(file);
+ } else {
+ QDir::current().mkdir("output");
+ }
+}
+#endif // DUMP_DATA
+
+#ifdef DUMP_AUDIO
+void Engine::dumpData()
+{
+ const QString txtFileName = m_outputDir.filePath("data.txt");
+ QFile txtFile(txtFileName);
+ txtFile.open(QFile::WriteOnly | QFile::Text);
+ QTextStream stream(&txtFile);
+ const qint16 *ptr = reinterpret_cast<const qint16*>(m_buffer.constData());
+ const int numSamples = m_dataLength / (2 * m_format.channels());
+ for (int i=0; i<numSamples; ++i) {
+ stream << i << "\t" << *ptr << "\n";
+ ptr += m_format.channels();
+ }
+
+ const QString pcmFileName = m_outputDir.filePath("data.pcm");
+ QFile pcmFile(pcmFileName);
+ pcmFile.open(QFile::WriteOnly);
+ pcmFile.write(m_buffer.constData(), m_dataLength);
+}
+#endif // DUMP_AUDIO
diff --git a/demos/spectrum/app/engine.h b/demos/spectrum/app/engine.h
new file mode 100644
index 0000000..16088b2
--- /dev/null
+++ b/demos/spectrum/app/engine.h
@@ -0,0 +1,311 @@
+/****************************************************************************
+**
+** 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 ENGINE_H
+#define ENGINE_H
+
+#include "spectrum.h"
+#include "spectrumanalyser.h"
+#include "wavfile.h"
+
+#include <QObject>
+#include <QByteArray>
+#include <QBuffer>
+#include <QVector>
+#include <QtMultimedia/QAudioDeviceInfo>
+#include <QtMultimedia/QAudioFormat>
+
+#ifdef DUMP_CAPTURED_AUDIO
+#define DUMP_DATA
+#endif
+
+#ifdef DUMP_SPECTRUM
+#define DUMP_DATA
+#endif
+
+#ifdef DUMP_DATA
+#include <QDir>
+#endif
+
+class QAudioInput;
+class QAudioOutput;
+class FrequencySpectrum;
+class QFile;
+
+/**
+ * This class interfaces with the QtMultimedia audio classes, and also with
+ * the SpectrumAnalyser class. Its role is to manage the capture and playback
+ * of audio data, meanwhile performing real-time analysis of the audio level
+ * and frequency spectrum.
+ */
+class Engine : public QObject {
+ Q_OBJECT
+public:
+ Engine(QObject *parent = 0);
+ ~Engine();
+
+ const QList<QAudioDeviceInfo>& availableAudioInputDevices() const
+ { return m_availableAudioInputDevices; }
+
+ const QList<QAudioDeviceInfo>& availableAudioOutputDevices() const
+ { return m_availableAudioOutputDevices; }
+
+ QAudio::Mode mode() const { return m_mode; }
+ QAudio::State state() const { return m_state; }
+
+ /**
+ * \return Reference to internal audio buffer
+ * \note This reference is valid for the lifetime of the Engine
+ */
+ const QByteArray& buffer() const { return m_buffer; }
+
+ /**
+ * \return Current audio format
+ * \note May be QAudioFormat() if engine is not initialized
+ */
+ const QAudioFormat& format() const { return m_format; }
+
+ /**
+ * Stop any ongoing recording or playback, and reset to ground state.
+ */
+ void reset();
+
+ /**
+ * Load data from WAV file
+ */
+ bool loadFile(const QString &fileName);
+
+ /**
+ * Generate tone
+ */
+ bool generateTone(const Tone &tone);
+
+ /**
+ * Generate tone
+ */
+ bool generateSweptTone(qreal amplitude);
+
+ /**
+ * Initialize for recording
+ */
+ bool initializeRecord();
+
+ /**
+ * Position of the audio input device.
+ * \return Position in microseconds.
+ */
+ qint64 recordPosition() const { return m_recordPosition; }
+
+ /**
+ * RMS level of the most recently processed set of audio samples.
+ * \return Level in range (0.0, 1.0)
+ */
+ qreal rmsLevel() const { return m_rmsLevel; }
+
+ /**
+ * Peak level of the most recently processed set of audio samples.
+ * \return Level in range (0.0, 1.0)
+ */
+ qreal peakLevel() const { return m_peakLevel; }
+
+ /**
+ * Position of the audio output device.
+ * \return Position in microseconds.
+ */
+ qint64 playPosition() const { return m_playPosition; }
+
+ /**
+ * Length of the internal engine buffer.
+ * \return Buffer length in microseconds.
+ */
+ qint64 bufferDuration() const;
+
+ /**
+ * Amount of data held in the buffer.
+ * \return Data duration in microseconds.
+ */
+ qint64 dataDuration() const;
+
+ /**
+ * Returns the size of the underlying audio buffer in bytes.
+ * This should be an approximation of the capture latency.
+ */
+ qint64 audioBufferLength() const;
+
+ /**
+ * Set window function applied to audio data before spectral analysis.
+ */
+ void setWindowFunction(WindowFunction type);
+
+public slots:
+ void startRecording();
+ void startPlayback();
+ void suspend();
+ void setAudioInputDevice(const QAudioDeviceInfo &device);
+ void setAudioOutputDevice(const QAudioDeviceInfo &device);
+
+signals:
+ void stateChanged(QAudio::Mode mode, QAudio::State state);
+
+ /**
+ * Informational message for non-modal display
+ */
+ void infoMessage(const QString &message, int durationMs);
+
+ /**
+ * Error message for modal display
+ */
+ void errorMessage(const QString &heading, const QString &detail);
+
+ /**
+ * Format of audio data has changed
+ */
+ void formatChanged(const QAudioFormat &format);
+
+ /**
+ * Length of buffer has changed.
+ * \param duration Duration in microseconds
+ */
+ void bufferDurationChanged(qint64 duration);
+
+ /**
+ * Amount of data in buffer has changed.
+ * \param duration Duration of data in microseconds
+ */
+ void dataDurationChanged(qint64 duration);
+
+ /**
+ * Position of the audio input device has changed.
+ * \param position Position in microseconds
+ */
+ void recordPositionChanged(qint64 position);
+
+ /**
+ * Position of the audio output device has changed.
+ * \param position Position in microseconds
+ */
+ void playPositionChanged(qint64 position);
+
+ /**
+ * Level changed
+ * \param rmsLevel RMS level in range 0.0 - 1.0
+ * \param peakLevel Peak level in range 0.0 - 1.0
+ * \param numSamples Number of audio samples analysed
+ */
+ void levelChanged(qreal rmsLevel, qreal peakLevel, int numSamples);
+
+ /**
+ * Spectrum has changed.
+ * \param position Position of start of window in microseconds
+ * \param length Length of window in microseconds
+ * \param spectrum Resulting frequency spectrum
+ */
+ void spectrumChanged(qint64 position, qint64 length, const FrequencySpectrum &spectrum);
+
+private slots:
+ void audioNotify();
+ void audioStateChanged(QAudio::State state);
+ void audioDataReady();
+ void spectrumChanged(const FrequencySpectrum &spectrum);
+
+private:
+ bool initialize();
+ bool selectFormat();
+ void stopRecording();
+ void stopPlayback();
+ void setState(QAudio::State state);
+ void setState(QAudio::Mode mode, QAudio::State state);
+ void setFormat(const QAudioFormat &format);
+ void setRecordPosition(qint64 position, bool forceEmit = false);
+ void setPlayPosition(qint64 position, bool forceEmit = false);
+ void calculateLevel(qint64 position, qint64 length);
+ void calculateSpectrum(qint64 position);
+ void setLevel(qreal rmsLevel, qreal peakLevel, int numSamples);
+
+#ifdef DUMP_DATA
+ void createOutputDir();
+ QString outputPath() const { return m_outputDir.path(); }
+#endif
+
+#ifdef DUMP_CAPTURED_AUDIO
+ void dumpData();
+#endif
+
+private:
+ QAudio::Mode m_mode;
+ QAudio::State m_state;
+
+ bool m_generateTone;
+ SweptTone m_tone;
+
+ QFile* m_file;
+ WavFile m_wavFile;
+
+ QAudioFormat m_format;
+
+ const QList<QAudioDeviceInfo> m_availableAudioInputDevices;
+ QAudioDeviceInfo m_audioInputDevice;
+ QAudioInput* m_audioInput;
+ QIODevice* m_audioInputIODevice;
+ qint64 m_recordPosition;
+
+ const QList<QAudioDeviceInfo> m_availableAudioOutputDevices;
+ QAudioDeviceInfo m_audioOutputDevice;
+ QAudioOutput* m_audioOutput;
+ qint64 m_playPosition;
+ QBuffer m_audioOutputIODevice;
+
+ QByteArray m_buffer;
+ qint64 m_dataLength;
+
+ qreal m_rmsLevel;
+ qreal m_peakLevel;
+
+ int m_spectrumLengthBytes;
+ QByteArray m_spectrumBuffer;
+ SpectrumAnalyser m_spectrumAnalyser;
+ qint64 m_spectrumPosition;
+
+ int m_count;
+
+#ifdef DUMP_DATA
+ QDir m_outputDir;
+#endif
+
+};
+
+#endif // ENGINE_H
diff --git a/demos/spectrum/app/frequencyspectrum.cpp b/demos/spectrum/app/frequencyspectrum.cpp
new file mode 100644
index 0000000..6ab80c2
--- /dev/null
+++ b/demos/spectrum/app/frequencyspectrum.cpp
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** 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: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 "frequencyspectrum.h"
+
+FrequencySpectrum::FrequencySpectrum(int numPoints)
+ : m_elements(numPoints)
+{
+
+}
+
+void FrequencySpectrum::reset()
+{
+ iterator i = begin();
+ for ( ; i != end(); ++i)
+ *i = Element();
+}
+
+int FrequencySpectrum::count() const
+{
+ return m_elements.count();
+}
+
+FrequencySpectrum::Element& FrequencySpectrum::operator[](int index)
+{
+ return m_elements[index];
+}
+
+const FrequencySpectrum::Element& FrequencySpectrum::operator[](int index) const
+{
+ return m_elements[index];
+}
+
+FrequencySpectrum::iterator FrequencySpectrum::begin()
+{
+ return m_elements.begin();
+}
+
+FrequencySpectrum::iterator FrequencySpectrum::end()
+{
+ return m_elements.end();
+}
+
+FrequencySpectrum::const_iterator FrequencySpectrum::begin() const
+{
+ return m_elements.begin();
+}
+
+FrequencySpectrum::const_iterator FrequencySpectrum::end() const
+{
+ return m_elements.end();
+}
diff --git a/demos/spectrum/app/frequencyspectrum.h b/demos/spectrum/app/frequencyspectrum.h
new file mode 100644
index 0000000..0dd814e
--- /dev/null
+++ b/demos/spectrum/app/frequencyspectrum.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** 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 FREQUENCYSPECTRUM_H
+#define FREQUENCYSPECTRUM_H
+
+#include <QtCore/QVector>
+
+/**
+ * Represents a frequency spectrum as a series of elements, each of which
+ * consists of a frequency, an amplitude and a phase.
+ */
+class FrequencySpectrum {
+public:
+ FrequencySpectrum(int numPoints = 0);
+
+ struct Element {
+ Element()
+ : frequency(0.0), amplitude(0.0), phase(0.0), clipped(false)
+ { }
+
+ /**
+ * Frequency in Hertz
+ */
+ qreal frequency;
+
+ /**
+ * Amplitude in range [0.0, 1.0]
+ */
+ qreal amplitude;
+
+ /**
+ * Phase in range [0.0, 2*PI]
+ */
+ qreal phase;
+
+ /**
+ * Indicates whether value has been clipped during spectrum analysis
+ */
+ bool clipped;
+ };
+
+ typedef QVector<Element>::iterator iterator;
+ typedef QVector<Element>::const_iterator const_iterator;
+
+ void reset();
+
+ int count() const;
+ Element& operator[](int index);
+ const Element& operator[](int index) const;
+ iterator begin();
+ iterator end();
+ const_iterator begin() const;
+ const_iterator end() const;
+
+private:
+ QVector<Element> m_elements;
+
+};
+
+#endif // FREQUENCYSPECTRUM_H
diff --git a/demos/spectrum/app/images/record.png b/demos/spectrum/app/images/record.png
new file mode 100644
index 0000000..e7493aa
--- /dev/null
+++ b/demos/spectrum/app/images/record.png
Binary files differ
diff --git a/demos/spectrum/app/images/settings.png b/demos/spectrum/app/images/settings.png
new file mode 100644
index 0000000..12179dc
--- /dev/null
+++ b/demos/spectrum/app/images/settings.png
Binary files differ
diff --git a/demos/spectrum/app/levelmeter.cpp b/demos/spectrum/app/levelmeter.cpp
new file mode 100644
index 0000000..39e43c9
--- /dev/null
+++ b/demos/spectrum/app/levelmeter.cpp
@@ -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 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_END_LICENSE$
+**
+****************************************************************************/
+
+#include "levelmeter.h"
+
+#include <math.h>
+
+#include <QPainter>
+#include <QTimer>
+#include <QDebug>
+
+
+// Constants
+const int RedrawInterval = 100; // ms
+const qreal PeakDecayRate = 0.001;
+const int PeakHoldLevelDuration = 2000; // ms
+
+
+LevelMeter::LevelMeter(QWidget *parent)
+ : QWidget(parent)
+ , m_rmsLevel(0.0)
+ , m_peakLevel(0.0)
+ , m_decayedPeakLevel(0.0)
+ , m_peakDecayRate(PeakDecayRate)
+ , m_peakHoldLevel(0.0)
+ , m_redrawTimer(new QTimer(this))
+ , m_rmsColor(Qt::red)
+ , m_peakColor(255, 200, 200, 255)
+{
+ setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
+ setMinimumWidth(30);
+
+ connect(m_redrawTimer, SIGNAL(timeout()), this, SLOT(redrawTimerExpired()));
+ m_redrawTimer->start(RedrawInterval);
+}
+
+LevelMeter::~LevelMeter()
+{
+
+}
+
+void LevelMeter::reset()
+{
+ m_rmsLevel = 0.0;
+ m_peakLevel = 0.0;
+ update();
+}
+
+void LevelMeter::levelChanged(qreal rmsLevel, qreal peakLevel, int numSamples)
+{
+ // Smooth the RMS signal
+ const qreal smooth = pow(qreal(0.9), static_cast<qreal>(numSamples) / 256); // TODO: remove this magic number
+ m_rmsLevel = (m_rmsLevel * smooth) + (rmsLevel * (1.0 - smooth));
+
+ if (peakLevel > m_decayedPeakLevel) {
+ m_peakLevel = peakLevel;
+ m_decayedPeakLevel = peakLevel;
+ m_peakLevelChanged.start();
+ }
+
+ if (peakLevel > m_peakHoldLevel) {
+ m_peakHoldLevel = peakLevel;
+ m_peakHoldLevelChanged.start();
+ }
+
+ update();
+}
+
+void LevelMeter::redrawTimerExpired()
+{
+ // Decay the peak signal
+ const int elapsedMs = m_peakLevelChanged.elapsed();
+ const qreal decayAmount = m_peakDecayRate * elapsedMs;
+ if (decayAmount < m_peakLevel)
+ m_decayedPeakLevel = m_peakLevel - decayAmount;
+ else
+ m_decayedPeakLevel = 0.0;
+
+ // Check whether to clear the peak hold level
+ if (m_peakHoldLevelChanged.elapsed() > PeakHoldLevelDuration)
+ m_peakHoldLevel = 0.0;
+
+ update();
+}
+
+void LevelMeter::paintEvent(QPaintEvent *event)
+{
+ Q_UNUSED(event)
+
+ QPainter painter(this);
+ painter.fillRect(rect(), Qt::black);
+
+ QRect bar = rect();
+
+ bar.setTop(rect().top() + (1.0 - m_peakHoldLevel) * rect().height());
+ bar.setBottom(bar.top() + 5);
+ painter.fillRect(bar, m_rmsColor);
+ bar.setBottom(rect().bottom());
+
+ bar.setTop(rect().top() + (1.0 - m_decayedPeakLevel) * rect().height());
+ painter.fillRect(bar, m_peakColor);
+
+ bar.setTop(rect().top() + (1.0 - m_rmsLevel) * rect().height());
+ painter.fillRect(bar, m_rmsColor);
+}
diff --git a/demos/spectrum/app/levelmeter.h b/demos/spectrum/app/levelmeter.h
new file mode 100644
index 0000000..ab8340b
--- /dev/null
+++ b/demos/spectrum/app/levelmeter.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** 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 LEVELMETER_H
+#define LEVELMETER_H
+
+#include <QTime>
+#include <QWidget>
+
+/**
+ * Widget which displays a vertical audio level meter, indicating the
+ * RMS and peak levels of the window of audio samples most recently analysed
+ * by the Engine.
+ */
+class LevelMeter : public QWidget {
+ Q_OBJECT
+public:
+ LevelMeter(QWidget *parent = 0);
+ ~LevelMeter();
+
+ void paintEvent(QPaintEvent *event);
+
+public slots:
+ void reset();
+ void levelChanged(qreal rmsLevel, qreal peakLevel, int numSamples);
+
+private slots:
+ void redrawTimerExpired();
+
+private:
+ /**
+ * Height of RMS level bar.
+ * Range 0.0 - 1.0.
+ */
+ qreal m_rmsLevel;
+
+ /**
+ * Most recent peak level.
+ * Range 0.0 - 1.0.
+ */
+ qreal m_peakLevel;
+
+ /**
+ * Height of peak level bar.
+ * This is calculated by decaying m_peakLevel depending on the
+ * elapsed time since m_peakLevelChanged, and the value of m_decayRate.
+ */
+ qreal m_decayedPeakLevel;
+
+ /**
+ * Time at which m_peakLevel was last changed.
+ */
+ QTime m_peakLevelChanged;
+
+ /**
+ * Rate at which peak level bar decays.
+ * Expressed in level units / millisecond.
+ */
+ qreal m_peakDecayRate;
+
+ /**
+ * High watermark of peak level.
+ * Range 0.0 - 1.0.
+ */
+ qreal m_peakHoldLevel;
+
+ /**
+ * Time at which m_peakHoldLevel was last changed.
+ */
+ QTime m_peakHoldLevelChanged;
+
+ QTimer *m_redrawTimer;
+
+ QColor m_rmsColor;
+ QColor m_peakColor;
+
+};
+
+#endif // LEVELMETER_H
diff --git a/demos/spectrum/app/main.cpp b/demos/spectrum/app/main.cpp
new file mode 100644
index 0000000..6e2b6fc
--- /dev/null
+++ b/demos/spectrum/app/main.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** 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: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/QApplication>
+#include "mainwidget.h"
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ app.setApplicationName("QtMultimedia spectrum analyser");
+ MainWidget w;
+
+#ifdef Q_OS_SYMBIAN
+ w.showMaximized();
+#else
+ w.show();
+#endif
+
+ return app.exec();
+}
diff --git a/demos/spectrum/app/mainwidget.cpp b/demos/spectrum/app/mainwidget.cpp
new file mode 100644
index 0000000..3b7c306
--- /dev/null
+++ b/demos/spectrum/app/mainwidget.cpp
@@ -0,0 +1,455 @@
+/****************************************************************************
+**
+** 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: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 "engine.h"
+#include "levelmeter.h"
+#include "mainwidget.h"
+#include "waveform.h"
+#include "progressbar.h"
+#include "settingsdialog.h"
+#include "spectrograph.h"
+#include "tonegeneratordialog.h"
+#include "utils.h"
+
+#include <QLabel>
+#include <QPushButton>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+#include <QStyle>
+#include <QMenu>
+#include <QFileDialog>
+#include <QTimerEvent>
+#include <QMessageBox>
+
+const int NullTimerId = -1;
+
+MainWidget::MainWidget(QWidget *parent)
+ : QWidget(parent)
+ , m_mode(NoMode)
+ , m_engine(new Engine(this))
+#ifndef DISABLE_WAVEFORM
+ , m_waveform(new Waveform(m_engine->buffer(), this))
+#endif
+ , m_progressBar(new ProgressBar(this))
+ , m_spectrograph(new Spectrograph(this))
+ , m_levelMeter(new LevelMeter(this))
+ , m_modeButton(new QPushButton(this))
+ , m_recordButton(new QPushButton(this))
+ , m_pauseButton(new QPushButton(this))
+ , m_playButton(new QPushButton(this))
+ , m_settingsButton(new QPushButton(this))
+ , m_infoMessage(new QLabel(tr("Select a mode to begin"), this))
+ , m_infoMessageTimerId(NullTimerId)
+ , m_settingsDialog(new SettingsDialog(
+ m_engine->availableAudioInputDevices(),
+ m_engine->availableAudioOutputDevices(),
+ this))
+ , m_toneGeneratorDialog(new ToneGeneratorDialog(this))
+ , m_modeMenu(new QMenu(this))
+ , m_loadFileAction(0)
+ , m_generateToneAction(0)
+ , m_recordAction(0)
+{
+ m_spectrograph->setParams(SpectrumNumBands, SpectrumLowFreq, SpectrumHighFreq);
+
+ createUi();
+ connectUi();
+}
+
+MainWidget::~MainWidget()
+{
+
+}
+
+
+//-----------------------------------------------------------------------------
+// Public slots
+//-----------------------------------------------------------------------------
+
+void MainWidget::stateChanged(QAudio::Mode mode, QAudio::State state)
+{
+ Q_UNUSED(mode);
+
+ updateButtonStates();
+
+ if (QAudio::ActiveState != state && QAudio::SuspendedState != state) {
+ m_levelMeter->reset();
+ m_spectrograph->reset();
+ }
+}
+
+void MainWidget::formatChanged(const QAudioFormat &format)
+{
+ infoMessage(formatToString(format), NullMessageTimeout);
+
+#ifndef DISABLE_WAVEFORM
+ if (QAudioFormat() != format) {
+ m_waveform->initialize(format, WaveformTileLength,
+ WaveformWindowDuration);
+ }
+#endif
+}
+
+void MainWidget::spectrumChanged(qint64 position, qint64 length,
+ const FrequencySpectrum &spectrum)
+{
+ m_progressBar->windowChanged(position, length);
+ m_spectrograph->spectrumChanged(spectrum);
+}
+
+void MainWidget::infoMessage(const QString &message, int timeoutMs)
+{
+ m_infoMessage->setText(message);
+
+ if (NullTimerId != m_infoMessageTimerId) {
+ killTimer(m_infoMessageTimerId);
+ m_infoMessageTimerId = NullTimerId;
+ }
+
+ if (NullMessageTimeout != timeoutMs)
+ m_infoMessageTimerId = startTimer(timeoutMs);
+}
+
+void MainWidget::errorMessage(const QString &heading, const QString &detail)
+{
+#ifdef Q_OS_SYMBIAN
+ const QString message = heading + "\n" + detail;
+ QMessageBox::warning(this, "", message, QMessageBox::Close);
+#else
+ QMessageBox::warning(this, heading, detail, QMessageBox::Close);
+#endif
+}
+
+void MainWidget::timerEvent(QTimerEvent *event)
+{
+ Q_ASSERT(event->timerId() == m_infoMessageTimerId);
+ Q_UNUSED(event) // suppress warnings in release builds
+ killTimer(m_infoMessageTimerId);
+ m_infoMessageTimerId = NullTimerId;
+ m_infoMessage->setText("");
+}
+
+void MainWidget::positionChanged(qint64 positionUs)
+{
+#ifndef DISABLE_WAVEFORM
+ qint64 positionBytes = audioLength(m_engine->format(), positionUs);
+ m_waveform->positionChanged(positionBytes);
+#else
+ Q_UNUSED(positionUs)
+#endif
+}
+
+void MainWidget::bufferDurationChanged(qint64 durationUs)
+{
+ m_progressBar->bufferDurationChanged(durationUs);
+}
+
+
+//-----------------------------------------------------------------------------
+// Private slots
+//-----------------------------------------------------------------------------
+
+void MainWidget::dataDurationChanged(qint64 duration)
+{
+#ifndef DISABLE_WAVEFORM
+ const qint64 dataLength = audioLength(m_engine->format(), duration);
+ m_waveform->dataLengthChanged(dataLength);
+#else
+ Q_UNUSED(duration)
+#endif
+
+ updateButtonStates();
+}
+
+void MainWidget::showFileDialog()
+{
+ reset();
+ const QString dir;
+ const QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open WAV file"), dir, "*.wav");
+ if (fileNames.count()) {
+ setMode(LoadFileMode);
+ m_engine->loadFile(fileNames.front());
+ updateButtonStates();
+ }
+}
+
+void MainWidget::showSettingsDialog()
+{
+ reset();
+ m_settingsDialog->exec();
+ if (m_settingsDialog->result() == QDialog::Accepted) {
+ m_engine->setAudioInputDevice(m_settingsDialog->inputDevice());
+ m_engine->setAudioOutputDevice(m_settingsDialog->outputDevice());
+ m_engine->setWindowFunction(m_settingsDialog->windowFunction());
+ }
+}
+
+void MainWidget::showToneGeneratorDialog()
+{
+ reset();
+ m_toneGeneratorDialog->exec();
+ if (m_toneGeneratorDialog->result() == QDialog::Accepted) {
+ setMode(GenerateToneMode);
+ const qreal amplitude = m_toneGeneratorDialog->amplitude();
+ if (m_toneGeneratorDialog->isFrequencySweepEnabled()) {
+ m_engine->generateSweptTone(amplitude);
+ } else {
+ const qreal frequency = m_toneGeneratorDialog->frequency();
+ const Tone tone(frequency, amplitude);
+ m_engine->generateTone(tone);
+ updateButtonStates();
+ }
+ }
+}
+
+void MainWidget::initializeRecord()
+{
+ reset();
+ setMode(RecordMode);
+ if (m_engine->initializeRecord())
+ updateButtonStates();
+}
+
+
+//-----------------------------------------------------------------------------
+// Private functions
+//-----------------------------------------------------------------------------
+
+void MainWidget::createUi()
+{
+ createMenus();
+
+ setWindowTitle(tr("Spectrum Analyser"));
+
+ QVBoxLayout *windowLayout = new QVBoxLayout(this);
+
+ m_infoMessage->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ m_infoMessage->setAlignment(Qt::AlignHCenter);
+ windowLayout->addWidget(m_infoMessage);
+
+#ifdef SUPERIMPOSE_PROGRESS_ON_WAVEFORM
+ QScopedPointer<QHBoxLayout> waveformLayout(new QHBoxLayout);
+ waveformLayout->addWidget(m_progressBar);
+ m_progressBar->setMinimumHeight(m_waveform->minimumHeight());
+ waveformLayout->setMargin(0);
+ m_waveform->setLayout(waveformLayout.data());
+ waveformLayout.take();
+ windowLayout->addWidget(m_waveform);
+#else
+#ifndef DISABLE_WAVEFORM
+ windowLayout->addWidget(m_waveform);
+#endif // DISABLE_WAVEFORM
+ windowLayout->addWidget(m_progressBar);
+#endif // SUPERIMPOSE_PROGRESS_ON_WAVEFORM
+
+ // Spectrograph and level meter
+
+ QScopedPointer<QHBoxLayout> analysisLayout(new QHBoxLayout);
+ analysisLayout->addWidget(m_spectrograph);
+ analysisLayout->addWidget(m_levelMeter);
+ windowLayout->addLayout(analysisLayout.data());
+ analysisLayout.take();
+
+ // Button panel
+
+ const QSize buttonSize(30, 30);
+
+ m_modeButton->setText(tr("Mode"));
+
+ m_recordIcon = QIcon(":/images/record.png");
+ m_recordButton->setIcon(m_recordIcon);
+ m_recordButton->setEnabled(false);
+ m_recordButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ m_recordButton->setMinimumSize(buttonSize);
+
+ m_pauseIcon = style()->standardIcon(QStyle::SP_MediaPause);
+ m_pauseButton->setIcon(m_pauseIcon);
+ m_pauseButton->setEnabled(false);
+ m_pauseButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ m_pauseButton->setMinimumSize(buttonSize);
+
+ m_playIcon = style()->standardIcon(QStyle::SP_MediaPlay);
+ m_playButton->setIcon(m_playIcon);
+ m_playButton->setEnabled(false);
+ m_playButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ m_playButton->setMinimumSize(buttonSize);
+
+ m_settingsIcon = QIcon(":/images/settings.png");
+ m_settingsButton->setIcon(m_settingsIcon);
+ m_settingsButton->setEnabled(true);
+ m_settingsButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ m_settingsButton->setMinimumSize(buttonSize);
+
+ QScopedPointer<QHBoxLayout> buttonPanelLayout(new QHBoxLayout);
+ buttonPanelLayout->addStretch();
+ buttonPanelLayout->addWidget(m_modeButton);
+ buttonPanelLayout->addWidget(m_recordButton);
+ buttonPanelLayout->addWidget(m_pauseButton);
+ buttonPanelLayout->addWidget(m_playButton);
+ buttonPanelLayout->addWidget(m_settingsButton);
+
+ QWidget *buttonPanel = new QWidget(this);
+ buttonPanel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ buttonPanel->setLayout(buttonPanelLayout.data());
+ buttonPanelLayout.take(); // ownership transferred to buttonPanel
+
+ QScopedPointer<QHBoxLayout> bottomPaneLayout(new QHBoxLayout);
+ bottomPaneLayout->addWidget(buttonPanel);
+ windowLayout->addLayout(bottomPaneLayout.data());
+ bottomPaneLayout.take(); // ownership transferred to windowLayout
+
+ // Apply layout
+
+ setLayout(windowLayout);
+}
+
+void MainWidget::connectUi()
+{
+ CHECKED_CONNECT(m_recordButton, SIGNAL(clicked()),
+ m_engine, SLOT(startRecording()));
+
+ CHECKED_CONNECT(m_pauseButton, SIGNAL(clicked()),
+ m_engine, SLOT(suspend()));
+
+ CHECKED_CONNECT(m_playButton, SIGNAL(clicked()),
+ m_engine, SLOT(startPlayback()));
+
+ CHECKED_CONNECT(m_settingsButton, SIGNAL(clicked()),
+ this, SLOT(showSettingsDialog()));
+
+ CHECKED_CONNECT(m_engine, SIGNAL(stateChanged(QAudio::Mode,QAudio::State)),
+ this, SLOT(stateChanged(QAudio::Mode,QAudio::State)));
+
+ CHECKED_CONNECT(m_engine, SIGNAL(formatChanged(const QAudioFormat &)),
+ this, SLOT(formatChanged(const QAudioFormat &)));
+
+ m_progressBar->bufferDurationChanged(m_engine->bufferDuration());
+
+ CHECKED_CONNECT(m_engine, SIGNAL(bufferDurationChanged(qint64)),
+ this, SLOT(bufferDurationChanged(qint64)));
+
+ CHECKED_CONNECT(m_engine, SIGNAL(dataDurationChanged(qint64)),
+ this, SLOT(dataDurationChanged(qint64)));
+
+ CHECKED_CONNECT(m_engine, SIGNAL(recordPositionChanged(qint64)),
+ m_progressBar, SLOT(recordPositionChanged(qint64)));
+
+ CHECKED_CONNECT(m_engine, SIGNAL(playPositionChanged(qint64)),
+ m_progressBar, SLOT(playPositionChanged(qint64)));
+
+ CHECKED_CONNECT(m_engine, SIGNAL(recordPositionChanged(qint64)),
+ this, SLOT(positionChanged(qint64)));
+
+ CHECKED_CONNECT(m_engine, SIGNAL(playPositionChanged(qint64)),
+ this, SLOT(positionChanged(qint64)));
+
+ CHECKED_CONNECT(m_engine, SIGNAL(levelChanged(qreal, qreal, int)),
+ m_levelMeter, SLOT(levelChanged(qreal, qreal, int)));
+
+ CHECKED_CONNECT(m_engine, SIGNAL(spectrumChanged(qint64, qint64, const FrequencySpectrum &)),
+ this, SLOT(spectrumChanged(qint64, qint64, const FrequencySpectrum &)));
+
+ CHECKED_CONNECT(m_engine, SIGNAL(infoMessage(QString, int)),
+ this, SLOT(infoMessage(QString, int)));
+
+ CHECKED_CONNECT(m_engine, SIGNAL(errorMessage(QString, QString)),
+ this, SLOT(errorMessage(QString, QString)));
+
+ CHECKED_CONNECT(m_spectrograph, SIGNAL(infoMessage(QString, int)),
+ this, SLOT(infoMessage(QString, int)));
+}
+
+void MainWidget::createMenus()
+{
+ m_modeButton->setMenu(m_modeMenu);
+
+ m_generateToneAction = m_modeMenu->addAction(tr("Play generated tone"));
+ m_recordAction = m_modeMenu->addAction(tr("Record and play back"));
+ m_loadFileAction = m_modeMenu->addAction(tr("Play file"));
+
+ m_loadFileAction->setCheckable(true);
+ m_generateToneAction->setCheckable(true);
+ m_recordAction->setCheckable(true);
+
+ connect(m_loadFileAction, SIGNAL(triggered(bool)), this, SLOT(showFileDialog()));
+ connect(m_generateToneAction, SIGNAL(triggered(bool)), this, SLOT(showToneGeneratorDialog()));
+ connect(m_recordAction, SIGNAL(triggered(bool)), this, SLOT(initializeRecord()));
+}
+
+void MainWidget::updateButtonStates()
+{
+ const bool recordEnabled = ((QAudio::AudioOutput == m_engine->mode() ||
+ (QAudio::ActiveState != m_engine->state() &&
+ QAudio::IdleState != m_engine->state())) &&
+ RecordMode == m_mode);
+ m_recordButton->setEnabled(recordEnabled);
+
+ const bool pauseEnabled = (QAudio::ActiveState == m_engine->state() ||
+ QAudio::IdleState == m_engine->state());
+ m_pauseButton->setEnabled(pauseEnabled);
+
+ const bool playEnabled = (m_engine->dataDuration() &&
+ (QAudio::AudioOutput != m_engine->mode() ||
+ (QAudio::ActiveState != m_engine->state() &&
+ QAudio::IdleState != m_engine->state())));
+ m_playButton->setEnabled(playEnabled);
+}
+
+void MainWidget::reset()
+{
+#ifndef DISABLE_WAVEFORM
+ m_waveform->reset();
+#endif
+ m_engine->reset();
+ m_levelMeter->reset();
+ m_spectrograph->reset();
+ m_progressBar->reset();
+}
+
+void MainWidget::setMode(Mode mode)
+{
+
+ m_mode = mode;
+ m_loadFileAction->setChecked(LoadFileMode == mode);
+ m_generateToneAction->setChecked(GenerateToneMode == mode);
+ m_recordAction->setChecked(RecordMode == mode);
+}
+
diff --git a/demos/spectrum/app/mainwidget.h b/demos/spectrum/app/mainwidget.h
new file mode 100644
index 0000000..846b97a
--- /dev/null
+++ b/demos/spectrum/app/mainwidget.h
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** 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 MAINWIDGET_H
+#define MAINWIDGET_H
+
+#include <QWidget>
+#include <QIcon>
+#include <QtMultimedia/qaudio.h>
+
+class Engine;
+class FrequencySpectrum;
+class ProgressBar;
+class Spectrograph;
+class Waveform;
+class LevelMeter;
+class SettingsDialog;
+class ToneGeneratorDialog;
+class QAudioFormat;
+class QLabel;
+class QPushButton;
+class QMenu;
+class QAction;
+
+/**
+ * Main application widget, responsible for connecting the various UI
+ * elements to the Engine.
+ */
+class MainWidget : public QWidget {
+ Q_OBJECT
+public:
+ MainWidget(QWidget *parent = 0);
+ ~MainWidget();
+
+ // QObject
+ void timerEvent(QTimerEvent *event);
+
+public slots:
+ void stateChanged(QAudio::Mode mode, QAudio::State state);
+ void formatChanged(const QAudioFormat &format);
+ void spectrumChanged(qint64 position, qint64 length,
+ const FrequencySpectrum &spectrum);
+ void infoMessage(const QString &message, int timeoutMs);
+ void errorMessage(const QString &heading, const QString &detail);
+ void positionChanged(qint64 position);
+ void bufferDurationChanged(qint64 duration);
+
+private slots:
+ void showFileDialog();
+ void showSettingsDialog();
+ void showToneGeneratorDialog();
+ void initializeRecord();
+ void dataDurationChanged(qint64 duration);
+
+private:
+ void createUi();
+ void createMenus();
+ void connectUi();
+ void updateButtonStates();
+ void reset();
+
+ enum Mode {
+ NoMode,
+ RecordMode,
+ GenerateToneMode,
+ LoadFileMode
+ };
+
+ void setMode(Mode mode);
+
+private:
+ Mode m_mode;
+
+ Engine* m_engine;
+
+ Waveform* m_waveform;
+ ProgressBar* m_progressBar;
+ Spectrograph* m_spectrograph;
+ LevelMeter* m_levelMeter;
+
+ QPushButton* m_modeButton;
+ QPushButton* m_recordButton;
+ QIcon m_recordIcon;
+ QPushButton* m_pauseButton;
+ QIcon m_pauseIcon;
+ QPushButton* m_playButton;
+ QIcon m_playIcon;
+ QPushButton* m_settingsButton;
+ QIcon m_settingsIcon;
+
+ QLabel* m_infoMessage;
+ int m_infoMessageTimerId;
+
+ SettingsDialog* m_settingsDialog;
+ ToneGeneratorDialog* m_toneGeneratorDialog;
+
+ QMenu* m_modeMenu;
+ QAction* m_loadFileAction;
+ QAction* m_generateToneAction;
+ QAction* m_recordAction;
+
+};
+
+#endif // MAINWIDGET_H
diff --git a/demos/spectrum/app/progressbar.cpp b/demos/spectrum/app/progressbar.cpp
new file mode 100644
index 0000000..256acf0
--- /dev/null
+++ b/demos/spectrum/app/progressbar.cpp
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** 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: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 "progressbar.h"
+#include "spectrum.h"
+#include <QPainter>
+
+ProgressBar::ProgressBar(QWidget *parent)
+ : QWidget(parent)
+ , m_bufferDuration(0)
+ , m_recordPosition(0)
+ , m_playPosition(0)
+ , m_windowPosition(0)
+ , m_windowLength(0)
+{
+ setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ setMinimumHeight(30);
+#ifdef SUPERIMPOSE_PROGRESS_ON_WAVEFORM
+ setAutoFillBackground(false);
+#endif
+}
+
+ProgressBar::~ProgressBar()
+{
+
+}
+
+void ProgressBar::reset()
+{
+ m_bufferDuration = 0;
+ m_recordPosition = 0;
+ m_playPosition = 0;
+ m_windowPosition = 0;
+ m_windowLength = 0;
+ update();
+}
+
+void ProgressBar::paintEvent(QPaintEvent * /*event*/)
+{
+ QPainter painter(this);
+
+ QColor bufferColor(0, 0, 255);
+ QColor windowColor(0, 255, 0);
+
+#ifdef SUPERIMPOSE_PROGRESS_ON_WAVEFORM
+ bufferColor.setAlphaF(0.5);
+ windowColor.setAlphaF(0.5);
+#else
+ painter.fillRect(rect(), Qt::black);
+#endif
+
+ if (m_bufferDuration) {
+ QRect bar = rect();
+ const qreal play = qreal(m_playPosition) / m_bufferDuration;
+ bar.setLeft(rect().left() + play * rect().width());
+ const qreal record = qreal(m_recordPosition) / m_bufferDuration;
+ bar.setRight(rect().left() + record * rect().width());
+ painter.fillRect(bar, bufferColor);
+
+ QRect window = rect();
+ const qreal windowLeft = qreal(m_windowPosition) / m_bufferDuration;
+ window.setLeft(rect().left() + windowLeft * rect().width());
+ const qreal windowWidth = qreal(m_windowLength) / m_bufferDuration;
+ window.setWidth(windowWidth * rect().width());
+ painter.fillRect(window, windowColor);
+ }
+}
+
+void ProgressBar::bufferDurationChanged(qint64 bufferSize)
+{
+ m_bufferDuration = bufferSize;
+ m_recordPosition = 0;
+ m_playPosition = 0;
+ m_windowPosition = 0;
+ m_windowLength = 0;
+ repaint();
+}
+
+void ProgressBar::recordPositionChanged(qint64 recordPosition)
+{
+ Q_ASSERT(recordPosition >= 0);
+ Q_ASSERT(recordPosition <= m_bufferDuration);
+ m_recordPosition = recordPosition;
+ repaint();
+}
+
+void ProgressBar::playPositionChanged(qint64 playPosition)
+{
+ Q_ASSERT(playPosition >= 0);
+ Q_ASSERT(playPosition <= m_bufferDuration);
+ m_playPosition = playPosition;
+ repaint();
+}
+
+void ProgressBar::windowChanged(qint64 position, qint64 length)
+{
+ Q_ASSERT(position >= 0);
+ Q_ASSERT(position <= m_bufferDuration);
+ Q_ASSERT(position + length <= m_bufferDuration);
+ m_windowPosition = position;
+ m_windowLength = length;
+ repaint();
+}
diff --git a/demos/spectrum/app/progressbar.h b/demos/spectrum/app/progressbar.h
new file mode 100644
index 0000000..de9e5a9
--- /dev/null
+++ b/demos/spectrum/app/progressbar.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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 PROGRESSBAR_H
+#define PROGRESSBAR_H
+
+#include <QWidget>
+
+/**
+ * Widget which displays a the current fill state of the Engine's internal
+ * buffer, and the current play/record position within that buffer.
+ */
+class ProgressBar : public QWidget {
+ Q_OBJECT
+public:
+ ProgressBar(QWidget *parent = 0);
+ ~ProgressBar();
+
+ void reset();
+ void paintEvent(QPaintEvent *event);
+
+public slots:
+ void bufferDurationChanged(qint64 bufferSize);
+ void recordPositionChanged(qint64 recordPosition);
+ void playPositionChanged(qint64 playPosition);
+ void windowChanged(qint64 position, qint64 length);
+
+private:
+ qint64 m_bufferDuration;
+ qint64 m_recordPosition;
+ qint64 m_playPosition;
+ qint64 m_windowPosition;
+ qint64 m_windowLength;
+
+};
+
+#endif // PROGRESSBAR_H
diff --git a/demos/spectrum/app/settingsdialog.cpp b/demos/spectrum/app/settingsdialog.cpp
new file mode 100644
index 0000000..204b43f
--- /dev/null
+++ b/demos/spectrum/app/settingsdialog.cpp
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** 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: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 "settingsdialog.h"
+#include <QComboBox>
+#include <QDialogButtonBox>
+#include <QLabel>
+#include <QPushButton>
+#include <QVBoxLayout>
+#include <QCheckBox>
+#include <QSlider>
+#include <QSpinBox>
+
+SettingsDialog::SettingsDialog(
+ const QList<QAudioDeviceInfo> &availableInputDevices,
+ const QList<QAudioDeviceInfo> &availableOutputDevices,
+ QWidget *parent)
+ : QDialog(parent)
+ , m_windowFunction(DefaultWindowFunction)
+ , m_inputDeviceComboBox(new QComboBox(this))
+ , m_outputDeviceComboBox(new QComboBox(this))
+ , m_windowFunctionComboBox(new QComboBox(this))
+{
+ QVBoxLayout *dialogLayout = new QVBoxLayout(this);
+
+ // Populate combo boxes
+
+ QAudioDeviceInfo device;
+ foreach (device, availableInputDevices)
+ m_inputDeviceComboBox->addItem(device.deviceName(),
+ qVariantFromValue(device));
+ foreach (device, availableOutputDevices)
+ m_outputDeviceComboBox->addItem(device.deviceName(),
+ qVariantFromValue(device));
+
+ m_windowFunctionComboBox->addItem(tr("None"), qVariantFromValue(int(NoWindow)));
+ m_windowFunctionComboBox->addItem("Hann", qVariantFromValue(int(HannWindow)));
+ m_windowFunctionComboBox->setCurrentIndex(m_windowFunction);
+
+ // Initialize default devices
+ if (!availableInputDevices.empty())
+ m_inputDevice = availableInputDevices.front();
+ if (!availableOutputDevices.empty())
+ m_outputDevice = availableOutputDevices.front();
+
+ // Add widgets to layout
+
+ QScopedPointer<QHBoxLayout> inputDeviceLayout(new QHBoxLayout);
+ QLabel *inputDeviceLabel = new QLabel(tr("Input device"), this);
+ inputDeviceLayout->addWidget(inputDeviceLabel);
+ inputDeviceLayout->addWidget(m_inputDeviceComboBox);
+ dialogLayout->addLayout(inputDeviceLayout.data());
+ inputDeviceLayout.take(); // ownership transferred to dialogLayout
+
+ QScopedPointer<QHBoxLayout> outputDeviceLayout(new QHBoxLayout);
+ QLabel *outputDeviceLabel = new QLabel(tr("Output device"), this);
+ outputDeviceLayout->addWidget(outputDeviceLabel);
+ outputDeviceLayout->addWidget(m_outputDeviceComboBox);
+ dialogLayout->addLayout(outputDeviceLayout.data());
+ outputDeviceLayout.take(); // ownership transferred to dialogLayout
+
+ QScopedPointer<QHBoxLayout> windowFunctionLayout(new QHBoxLayout);
+ QLabel *windowFunctionLabel = new QLabel(tr("Window function"), this);
+ windowFunctionLayout->addWidget(windowFunctionLabel);
+ windowFunctionLayout->addWidget(m_windowFunctionComboBox);
+ dialogLayout->addLayout(windowFunctionLayout.data());
+ windowFunctionLayout.take(); // ownership transferred to dialogLayout
+
+ // Connect
+ CHECKED_CONNECT(m_inputDeviceComboBox, SIGNAL(activated(int)),
+ this, SLOT(inputDeviceChanged(int)));
+ CHECKED_CONNECT(m_outputDeviceComboBox, SIGNAL(activated(int)),
+ this, SLOT(outputDeviceChanged(int)));
+ CHECKED_CONNECT(m_windowFunctionComboBox, SIGNAL(activated(int)),
+ this, SLOT(windowFunctionChanged(int)));
+
+ // Add standard buttons to layout
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(this);
+ buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+ dialogLayout->addWidget(buttonBox);
+
+ // Connect standard buttons
+ CHECKED_CONNECT(buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
+ this, SLOT(accept()));
+ CHECKED_CONNECT(buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
+ this, SLOT(reject()));
+
+ setLayout(dialogLayout);
+}
+
+SettingsDialog::~SettingsDialog()
+{
+
+}
+
+void SettingsDialog::windowFunctionChanged(int index)
+{
+ m_windowFunction = static_cast<WindowFunction>(
+ m_windowFunctionComboBox->itemData(index).value<int>());
+}
+
+void SettingsDialog::inputDeviceChanged(int index)
+{
+ m_inputDevice = m_inputDeviceComboBox->itemData(index).value<QAudioDeviceInfo>();
+}
+
+void SettingsDialog::outputDeviceChanged(int index)
+{
+ m_outputDevice = m_outputDeviceComboBox->itemData(index).value<QAudioDeviceInfo>();
+}
+
diff --git a/demos/spectrum/app/settingsdialog.h b/demos/spectrum/app/settingsdialog.h
new file mode 100644
index 0000000..7215a50
--- /dev/null
+++ b/demos/spectrum/app/settingsdialog.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** 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 SETTINGSDIALOG_H
+#define SETTINGSDIALOG_H
+
+#include "spectrum.h"
+#include <QDialog>
+#include <QtMultimedia/QAudioDeviceInfo>
+
+class QComboBox;
+class QCheckBox;
+class QSlider;
+class QSpinBox;
+class QGridLayout;
+
+/**
+ * Dialog used to control settings such as the audio input / output device
+ * and the windowing function.
+ */
+class SettingsDialog : public QDialog {
+ Q_OBJECT
+public:
+ SettingsDialog(const QList<QAudioDeviceInfo> &availableInputDevices,
+ const QList<QAudioDeviceInfo> &availableOutputDevices,
+ QWidget *parent = 0);
+ ~SettingsDialog();
+
+ WindowFunction windowFunction() const { return m_windowFunction; }
+ const QAudioDeviceInfo& inputDevice() const { return m_inputDevice; }
+ const QAudioDeviceInfo& outputDevice() const { return m_outputDevice; }
+
+private slots:
+ void windowFunctionChanged(int index);
+ void inputDeviceChanged(int index);
+ void outputDeviceChanged(int index);
+
+private:
+ WindowFunction m_windowFunction;
+ QAudioDeviceInfo m_inputDevice;
+ QAudioDeviceInfo m_outputDevice;
+
+ QComboBox* m_inputDeviceComboBox;
+ QComboBox* m_outputDeviceComboBox;
+
+ QComboBox* m_windowFunctionComboBox;
+
+};
+
+#endif // SETTINGSDIALOG_H
diff --git a/demos/spectrum/app/spectrograph.cpp b/demos/spectrum/app/spectrograph.cpp
new file mode 100644
index 0000000..1fcf434
--- /dev/null
+++ b/demos/spectrum/app/spectrograph.cpp
@@ -0,0 +1,242 @@
+/****************************************************************************
+**
+** 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: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 "spectrograph.h"
+#include <QPainter>
+#include <QMouseEvent>
+#include <QDebug>
+#include <QTimerEvent>
+
+const int NullTimerId = -1;
+const int NullIndex = -1;
+const int BarSelectionInterval = 2000;
+
+Spectrograph::Spectrograph(QWidget *parent)
+ : QWidget(parent)
+ , m_barSelected(NullIndex)
+ , m_timerId(NullTimerId)
+ , m_lowFreq(0.0)
+ , m_highFreq(0.0)
+{
+ setMinimumHeight(100);
+}
+
+Spectrograph::~Spectrograph()
+{
+
+}
+
+void Spectrograph::setParams(int numBars, qreal lowFreq, qreal highFreq)
+{
+ Q_ASSERT(numBars > 0);
+ Q_ASSERT(highFreq > lowFreq);
+ m_bars.resize(numBars);
+ m_lowFreq = lowFreq;
+ m_highFreq = highFreq;
+ updateBars();
+}
+
+void Spectrograph::timerEvent(QTimerEvent *event)
+{
+ Q_ASSERT(event->timerId() == m_timerId);
+ Q_UNUSED(event) // suppress warnings in release builds
+ killTimer(m_timerId);
+ m_timerId = NullTimerId;
+ m_barSelected = NullIndex;
+ update();
+}
+
+void Spectrograph::paintEvent(QPaintEvent *event)
+{
+ Q_UNUSED(event)
+
+ QPainter painter(this);
+ painter.fillRect(rect(), Qt::black);
+
+ const int numBars = m_bars.count();
+
+ // Highlight region of selected bar
+ if (m_barSelected != NullIndex && numBars) {
+ QRect regionRect = rect();
+ regionRect.setLeft(m_barSelected * rect().width() / numBars);
+ regionRect.setWidth(rect().width() / numBars);
+ QColor regionColor(202, 202, 64);
+ painter.setBrush(Qt::DiagCrossPattern);
+ painter.fillRect(regionRect, regionColor);
+ painter.setBrush(Qt::NoBrush);
+ }
+
+ QColor barColor(51, 204, 102);
+ QColor clipColor(255, 255, 0);
+
+ // Draw the outline
+ const QColor gridColor = barColor.darker();
+ QPen gridPen(gridColor);
+ painter.setPen(gridPen);
+ painter.drawLine(rect().topLeft(), rect().topRight());
+ painter.drawLine(rect().topRight(), rect().bottomRight());
+ painter.drawLine(rect().bottomRight(), rect().bottomLeft());
+ painter.drawLine(rect().bottomLeft(), rect().topLeft());
+
+ QVector<qreal> dashes;
+ dashes << 2 << 2;
+ gridPen.setDashPattern(dashes);
+ painter.setPen(gridPen);
+
+ // Draw vertical lines between bars
+ if (numBars) {
+ const int numHorizontalSections = numBars;
+ QLine line(rect().topLeft(), rect().bottomLeft());
+ for (int i=1; i<numHorizontalSections; ++i) {
+ line.translate(rect().width()/numHorizontalSections, 0);
+ painter.drawLine(line);
+ }
+ }
+
+ // Draw horizontal lines
+ const int numVerticalSections = 10;
+ QLine line(rect().topLeft(), rect().topRight());
+ for (int i=1; i<numVerticalSections; ++i) {
+ line.translate(0, rect().height()/numVerticalSections);
+ painter.drawLine(line);
+ }
+
+ barColor = barColor.lighter();
+ barColor.setAlphaF(0.75);
+ clipColor.setAlphaF(0.75);
+
+ // Draw the bars
+ if (numBars) {
+ // Calculate width of bars and gaps
+ const int widgetWidth = rect().width();
+ const int barPlusGapWidth = widgetWidth / numBars;
+ const int barWidth = 0.8 * barPlusGapWidth;
+ const int gapWidth = barPlusGapWidth - barWidth;
+ const int paddingWidth = widgetWidth - numBars * (barWidth + gapWidth);
+ const int leftPaddingWidth = (paddingWidth + gapWidth) / 2;
+ const int barHeight = rect().height() - 2 * gapWidth;
+
+ for (int i=0; i<numBars; ++i) {
+ const qreal value = m_bars[i].value;
+ Q_ASSERT(value >= 0.0 && value <= 1.0);
+ QRect bar = rect();
+ bar.setLeft(rect().left() + leftPaddingWidth + (i * (gapWidth + barWidth)));
+ bar.setWidth(barWidth);
+ bar.setTop(rect().top() + gapWidth + (1.0 - value) * barHeight);
+ bar.setBottom(rect().bottom() - gapWidth);
+
+ QColor color = barColor;
+ if (m_bars[i].clipped)
+ color = clipColor;
+
+ painter.fillRect(bar, color);
+ }
+ }
+}
+
+void Spectrograph::mousePressEvent(QMouseEvent *event)
+{
+ const QPoint pos = event->pos();
+ const int index = m_bars.count() * (pos.x() - rect().left()) / rect().width();
+ selectBar(index);
+}
+
+void Spectrograph::reset()
+{
+ m_spectrum.reset();
+ spectrumChanged(m_spectrum);
+}
+
+void Spectrograph::spectrumChanged(const FrequencySpectrum &spectrum)
+{
+ m_spectrum = spectrum;
+ updateBars();
+}
+
+int Spectrograph::barIndex(qreal frequency) const
+{
+ Q_ASSERT(frequency >= m_lowFreq && frequency < m_highFreq);
+ const qreal bandWidth = (m_highFreq - m_lowFreq) / m_bars.count();
+ const int index = (frequency - m_lowFreq) / bandWidth;
+ if(index <0 || index >= m_bars.count())
+ Q_ASSERT(false);
+ return index;
+}
+
+QPair<qreal, qreal> Spectrograph::barRange(int index) const
+{
+ Q_ASSERT(index >= 0 && index < m_bars.count());
+ const qreal bandWidth = (m_highFreq - m_lowFreq) / m_bars.count();
+ return QPair<qreal, qreal>(index * bandWidth, (index+1) * bandWidth);
+}
+
+void Spectrograph::updateBars()
+{
+ m_bars.fill(Bar());
+ FrequencySpectrum::const_iterator i = m_spectrum.begin();
+ const FrequencySpectrum::const_iterator end = m_spectrum.end();
+ for ( ; i != end; ++i) {
+ const FrequencySpectrum::Element e = *i;
+ if (e.frequency >= m_lowFreq && e.frequency < m_highFreq) {
+ Bar &bar = m_bars[barIndex(e.frequency)];
+ bar.value = qMax(bar.value, e.amplitude);
+ bar.clipped |= e.clipped;
+ }
+ }
+ update();
+}
+
+void Spectrograph::selectBar(int index) {
+ const QPair<qreal, qreal> frequencyRange = barRange(index);
+ const QString message = QString("%1 - %2 Hz")
+ .arg(frequencyRange.first)
+ .arg(frequencyRange.second);
+ emit infoMessage(message, BarSelectionInterval);
+
+ if (NullTimerId != m_timerId)
+ killTimer(m_timerId);
+ m_timerId = startTimer(BarSelectionInterval);
+
+ m_barSelected = index;
+ update();
+}
+
+
diff --git a/demos/spectrum/app/spectrograph.h b/demos/spectrum/app/spectrograph.h
new file mode 100644
index 0000000..6bfef33
--- /dev/null
+++ b/demos/spectrum/app/spectrograph.h
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** 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 SPECTROGRAPH_H
+#define SPECTROGRAPH_H
+
+#include <QWidget>
+#include "frequencyspectrum.h"
+
+class QMouseEvent;
+
+/**
+ * Widget which displays a spectrograph showing the frequency spectrum
+ * of the window of audio samples most recently analysed by the Engine.
+ */
+class Spectrograph : public QWidget {
+ Q_OBJECT
+public:
+ Spectrograph(QWidget *parent = 0);
+ ~Spectrograph();
+
+ void setParams(int numBars, qreal lowFreq, qreal highFreq);
+
+ // QObject
+ void timerEvent(QTimerEvent *event);
+
+ // QWidget
+ void paintEvent(QPaintEvent *event);
+ void mousePressEvent(QMouseEvent *event);
+
+signals:
+ void infoMessage(const QString &message, int intervalMs);
+
+public slots:
+ void reset();
+ void spectrumChanged(const FrequencySpectrum &spectrum);
+
+private:
+ int barIndex(qreal frequency) const;
+ QPair<qreal, qreal> barRange(int barIndex) const;
+ void updateBars();
+
+ void selectBar(int index);
+
+private:
+ struct Bar {
+ Bar() : value(0.0), clipped(false) { }
+ qreal value;
+ bool clipped;
+ };
+
+ QVector<Bar> m_bars;
+ int m_barSelected;
+ int m_timerId;
+ qreal m_lowFreq;
+ qreal m_highFreq;
+ FrequencySpectrum m_spectrum;
+
+
+};
+
+#endif // SPECTROGRAPH_H
diff --git a/demos/spectrum/app/spectrum.h b/demos/spectrum/app/spectrum.h
new file mode 100644
index 0000000..6cfe29f
--- /dev/null
+++ b/demos/spectrum/app/spectrum.h
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** 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 SPECTRUM_H
+#define SPECTRUM_H
+
+#include <QtCore/qglobal.h>
+#include "utils.h"
+#include "fftreal_wrapper.h" // For FFTLengthPowerOfTwo
+
+//-----------------------------------------------------------------------------
+// Constants
+//-----------------------------------------------------------------------------
+
+// Number of audio samples used to calculate the frequency spectrum
+const int SpectrumLengthSamples = PowerOfTwo<FFTLengthPowerOfTwo>::Result;
+
+// Number of bands in the frequency spectrum
+const int SpectrumNumBands = 10;
+
+// Lower bound of first band in the spectrum
+const qreal SpectrumLowFreq = 0.0; // Hz
+
+// Upper band of last band in the spectrum
+const qreal SpectrumHighFreq = 1000.0; // Hz
+
+// Waveform window size in microseconds
+const qint64 WaveformWindowDuration = 500 * 1000;
+
+// Length of waveform tiles in bytes
+// Ideally, these would match the QAudio*::bufferSize(), but that isn't
+// available until some time after QAudio*::start() has been called, and we
+// need this value in order to initialize the waveform display.
+// We therefore just choose a sensible value.
+const int WaveformTileLength = 4096;
+
+// Fudge factor used to calculate the spectrum bar heights
+const qreal SpectrumAnalyserMultiplier = 0.15;
+
+// Disable message timeout
+const int NullMessageTimeout = -1;
+
+
+//-----------------------------------------------------------------------------
+// Types and data structures
+//-----------------------------------------------------------------------------
+
+enum WindowFunction {
+ NoWindow,
+ HannWindow
+};
+
+const WindowFunction DefaultWindowFunction = HannWindow;
+
+struct Tone {
+ Tone(qreal freq = 0.0, qreal amp = 0.0)
+ : frequency(freq), amplitude(amp)
+ { }
+
+ // Start and end frequencies for swept tone generation
+ qreal frequency;
+
+ // Amplitude in range [0.0, 1.0]
+ qreal amplitude;
+};
+
+struct SweptTone {
+ SweptTone(qreal start = 0.0, qreal end = 0.0, qreal amp = 0.0)
+ : startFreq(start), endFreq(end), amplitude(amp)
+ { Q_ASSERT(end >= start); }
+
+ SweptTone(const Tone &tone)
+ : startFreq(tone.frequency), endFreq(tone.frequency), amplitude(tone.amplitude)
+ { }
+
+ // Start and end frequencies for swept tone generation
+ qreal startFreq;
+ qreal endFreq;
+
+ // Amplitude in range [0.0, 1.0]
+ qreal amplitude;
+};
+
+
+//-----------------------------------------------------------------------------
+// Macros
+//-----------------------------------------------------------------------------
+
+// Macro which connects a signal to a slot, and which causes application to
+// abort if the connection fails. This is intended to catch programming errors
+// such as mis-typing a signal or slot name. It is necessary to write our own
+// macro to do this - the following idiom
+// Q_ASSERT(connect(source, signal, receiver, slot));
+// will not work because Q_ASSERT compiles to a no-op in release builds.
+
+#define CHECKED_CONNECT(source, signal, receiver, slot) \
+ if(!connect(source, signal, receiver, slot)) \
+ qt_assert_x(Q_FUNC_INFO, "CHECKED_CONNECT failed", __FILE__, __LINE__);
+
+// Handle some dependencies between macros defined in the .pro file
+
+#ifdef DISABLE_WAVEFORM
+#undef SUPERIMPOSE_PROGRESS_ON_WAVEFORM
+#endif
+
+#endif // SPECTRUM_H
+
diff --git a/demos/spectrum/app/spectrum.qrc b/demos/spectrum/app/spectrum.qrc
new file mode 100644
index 0000000..6100479
--- /dev/null
+++ b/demos/spectrum/app/spectrum.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/record.png</file>
+ <file>images/settings.png</file>
+</qresource>
+</RCC>
+
diff --git a/demos/spectrum/app/spectrum.sh b/demos/spectrum/app/spectrum.sh
new file mode 100644
index 0000000..75ad6c2
--- /dev/null
+++ b/demos/spectrum/app/spectrum.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Shell script for launching spectrum application on Unix systems other than Mac OSX
+
+bindir=`dirname "$0"`
+LD_LIBRARY_PATH="${bindir}:${LD_LIBRARY_PATH}"
+export LD_LIBRARY_PATH
+exec "${bindir}/spectrum.bin" ${1+"$@"}
+
diff --git a/demos/spectrum/app/spectrumanalyser.cpp b/demos/spectrum/app/spectrumanalyser.cpp
new file mode 100644
index 0000000..54d3f5e
--- /dev/null
+++ b/demos/spectrum/app/spectrumanalyser.cpp
@@ -0,0 +1,280 @@
+/****************************************************************************
+**
+** 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: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 "spectrumanalyser.h"
+#include "utils.h"
+
+#include <QtCore/qmath.h>
+#include <QtCore/qmetatype.h>
+#include <QtMultimedia/QAudioFormat>
+#include <QThread>
+
+#include "fftreal_wrapper.h"
+
+SpectrumAnalyserThread::SpectrumAnalyserThread(QObject *parent)
+ : QObject(parent)
+#ifndef DISABLE_FFT
+ , m_fft(new FFTRealWrapper)
+#endif
+ , m_numSamples(SpectrumLengthSamples)
+ , m_windowFunction(DefaultWindowFunction)
+ , m_window(SpectrumLengthSamples, 0.0)
+ , m_input(SpectrumLengthSamples, 0.0)
+ , m_output(SpectrumLengthSamples, 0.0)
+ , m_spectrum(SpectrumLengthSamples)
+#ifdef SPECTRUM_ANALYSER_SEPARATE_THREAD
+ , m_thread(new QThread(this))
+#endif
+{
+#ifdef SPECTRUM_ANALYSER_SEPARATE_THREAD
+ moveToThread(m_thread);
+ m_thread->start();
+#endif
+ calculateWindow();
+}
+
+SpectrumAnalyserThread::~SpectrumAnalyserThread()
+{
+#ifndef DISABLE_FFT
+ delete m_fft;
+#endif
+}
+
+void SpectrumAnalyserThread::setWindowFunction(WindowFunction type)
+{
+ m_windowFunction = type;
+ calculateWindow();
+}
+
+void SpectrumAnalyserThread::calculateWindow()
+{
+ for (int i=0; i<m_numSamples; ++i) {
+ DataType x = 0.0;
+
+ switch (m_windowFunction) {
+ case NoWindow:
+ x = 1.0;
+ break;
+ case HannWindow:
+ x = 0.5 * (1 - qCos((2 * M_PI * i) / (m_numSamples - 1)));
+ break;
+ default:
+ Q_ASSERT(false);
+ }
+
+ m_window[i] = x;
+ }
+}
+
+void SpectrumAnalyserThread::calculateSpectrum(const QByteArray &buffer,
+ int inputFrequency,
+ int bytesPerSample)
+{
+#ifndef DISABLE_FFT
+ Q_ASSERT(buffer.size() == m_numSamples * bytesPerSample);
+
+ // Initialize data array
+ const char *ptr = buffer.constData();
+ for (int i=0; i<m_numSamples; ++i) {
+ const qint16 pcmSample = *reinterpret_cast<const qint16*>(ptr);
+ // Scale down to range [-1.0, 1.0]
+ const DataType realSample = pcmToReal(pcmSample);
+ const DataType windowedSample = realSample * m_window[i];
+ m_input[i] = windowedSample;
+ ptr += bytesPerSample;
+ }
+
+ // Calculate the FFT
+ m_fft->calculateFFT(m_output.data(), m_input.data());
+
+ // Analyse output to obtain amplitude and phase for each frequency
+ for (int i=2; i<=m_numSamples/2; ++i) {
+ // Calculate frequency of this complex sample
+ m_spectrum[i].frequency = qreal(i * inputFrequency) / (m_numSamples);
+
+ const qreal real = m_output[i];
+ qreal imag = 0.0;
+ if (i>0 && i<m_numSamples/2)
+ imag = m_output[m_numSamples/2 + i];
+
+ const qreal magnitude = sqrt(real*real + imag*imag);
+ qreal amplitude = SpectrumAnalyserMultiplier * log(magnitude);
+
+ // Bound amplitude to [0.0, 1.0]
+ m_spectrum[i].clipped = (amplitude > 1.0);
+ amplitude = qMax(qreal(0.0), amplitude);
+ amplitude = qMin(qreal(1.0), amplitude);
+ m_spectrum[i].amplitude = amplitude;
+ }
+#endif
+
+ emit calculationComplete(m_spectrum);
+}
+
+
+//=============================================================================
+// SpectrumAnalyser
+//=============================================================================
+
+SpectrumAnalyser::SpectrumAnalyser(QObject *parent)
+ : QObject(parent)
+ , m_thread(new SpectrumAnalyserThread(this))
+ , m_state(Idle)
+#ifdef DUMP_SPECTRUMANALYSER
+ , m_count(0)
+#endif
+{
+ CHECKED_CONNECT(m_thread, SIGNAL(calculationComplete(FrequencySpectrum)),
+ this, SLOT(calculationComplete(FrequencySpectrum)));
+}
+
+SpectrumAnalyser::~SpectrumAnalyser()
+{
+
+}
+
+#ifdef DUMP_SPECTRUMANALYSER
+void SpectrumAnalyser::setOutputPath(const QString &outputDir)
+{
+ m_outputDir.setPath(outputDir);
+ m_textFile.setFileName(m_outputDir.filePath("spectrum.txt"));
+ m_textFile.open(QIODevice::WriteOnly | QIODevice::Text);
+ m_textStream.setDevice(&m_textFile);
+}
+#endif
+
+//-----------------------------------------------------------------------------
+// Public functions
+//-----------------------------------------------------------------------------
+
+void SpectrumAnalyser::setWindowFunction(WindowFunction type)
+{
+ const bool b = QMetaObject::invokeMethod(m_thread, "setWindowFunction",
+ Qt::AutoConnection,
+ Q_ARG(WindowFunction, type));
+ Q_ASSERT(b);
+ Q_UNUSED(b) // suppress warnings in release builds
+}
+
+void SpectrumAnalyser::calculate(const QByteArray &buffer,
+ const QAudioFormat &format)
+{
+ // QThread::currentThread is marked 'for internal use only', but
+ // we're only using it for debug output here, so it's probably OK :)
+ SPECTRUMANALYSER_DEBUG << "SpectrumAnalyser::calculate"
+ << QThread::currentThread()
+ << "state" << m_state;
+
+ if (isReady()) {
+ Q_ASSERT(isPCMS16LE(format));
+
+ const int bytesPerSample = format.sampleSize() * format.channels() / 8;
+
+#ifdef DUMP_SPECTRUMANALYSER
+ m_count++;
+ const QString pcmFileName = m_outputDir.filePath(QString("spectrum_%1.pcm").arg(m_count, 4, 10, QChar('0')));
+ QFile pcmFile(pcmFileName);
+ pcmFile.open(QIODevice::WriteOnly);
+ const int bufferLength = m_numSamples * bytesPerSample;
+ pcmFile.write(buffer, bufferLength);
+
+ m_textStream << "TimeDomain " << m_count << "\n";
+ const qint16* input = reinterpret_cast<const qint16*>(buffer);
+ for (int i=0; i<m_numSamples; ++i) {
+ m_textStream << i << "\t" << *input << "\n";
+ input += format.channels();
+ }
+#endif
+
+ m_state = Busy;
+
+ // Invoke SpectrumAnalyserThread::calculateSpectrum using QMetaObject. If
+ // m_thread is in a different thread from the current thread, the
+ // calculation will be done in the child thread.
+ // Once the calculation is finished, a calculationChanged signal will be
+ // emitted by m_thread.
+ const bool b = QMetaObject::invokeMethod(m_thread, "calculateSpectrum",
+ Qt::AutoConnection,
+ Q_ARG(QByteArray, buffer),
+ Q_ARG(int, format.frequency()),
+ Q_ARG(int, bytesPerSample));
+ Q_ASSERT(b);
+ Q_UNUSED(b) // suppress warnings in release builds
+
+#ifdef DUMP_SPECTRUMANALYSER
+ m_textStream << "FrequencySpectrum " << m_count << "\n";
+ FrequencySpectrum::const_iterator x = m_spectrum.begin();
+ for (int i=0; i<m_numSamples; ++i, ++x)
+ m_textStream << i << "\t"
+ << x->frequency << "\t"
+ << x->amplitude<< "\t"
+ << x->phase << "\n";
+#endif
+ }
+}
+
+bool SpectrumAnalyser::isReady() const
+{
+ return (Idle == m_state);
+}
+
+void SpectrumAnalyser::cancelCalculation()
+{
+ if (Busy == m_state)
+ m_state = Cancelled;
+}
+
+
+//-----------------------------------------------------------------------------
+// Private slots
+//-----------------------------------------------------------------------------
+
+void SpectrumAnalyser::calculationComplete(const FrequencySpectrum &spectrum)
+{
+ Q_ASSERT(Idle != m_state);
+ if (Busy == m_state)
+ emit spectrumChanged(spectrum);
+ m_state = Idle;
+}
+
+
+
+
diff --git a/demos/spectrum/app/spectrumanalyser.h b/demos/spectrum/app/spectrumanalyser.h
new file mode 100644
index 0000000..caeb1c1
--- /dev/null
+++ b/demos/spectrum/app/spectrumanalyser.h
@@ -0,0 +1,190 @@
+/****************************************************************************
+**
+** 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 SPECTRUMANALYSER_H
+#define SPECTRUMANALYSER_H
+
+#include <QByteArray>
+#include <QObject>
+#include <QVector>
+
+#ifdef DUMP_SPECTRUMANALYSER
+#include <QDir>
+#include <QFile>
+#include <QTextStream>
+#endif
+
+#include "frequencyspectrum.h"
+#include "spectrum.h"
+
+#ifndef DISABLE_FFT
+#include "FFTRealFixLenParam.h"
+#endif
+
+class QAudioFormat;
+class QThread;
+class FFTRealWrapper;
+
+class SpectrumAnalyserThreadPrivate;
+
+/**
+ * Implementation of the spectrum analysis which can be run in a
+ * separate thread.
+ */
+class SpectrumAnalyserThread : public QObject
+{
+ Q_OBJECT
+public:
+ SpectrumAnalyserThread(QObject *parent);
+ ~SpectrumAnalyserThread();
+
+public slots:
+ void setWindowFunction(WindowFunction type);
+ void calculateSpectrum(const QByteArray &buffer,
+ int inputFrequency,
+ int bytesPerSample);
+
+signals:
+ void calculationComplete(const FrequencySpectrum &spectrum);
+
+private:
+ void calculateWindow();
+
+private:
+#ifndef DISABLE_FFT
+ FFTRealWrapper* m_fft;
+#endif
+
+ const int m_numSamples;
+
+ WindowFunction m_windowFunction;
+
+#ifdef DISABLE_FFT
+ typedef qreal DataType;
+#else
+ typedef FFTRealFixLenParam::DataType DataType;
+#endif
+ QVector<DataType> m_window;
+
+ QVector<DataType> m_input;
+ QVector<DataType> m_output;
+
+ FrequencySpectrum m_spectrum;
+
+#ifdef SPECTRUM_ANALYSER_SEPARATE_THREAD
+ QThread* m_thread;
+#endif
+};
+
+/**
+ * Class which performs frequency spectrum analysis on a window of
+ * audio samples, provided to it by the Engine.
+ */
+class SpectrumAnalyser : public QObject
+{
+ Q_OBJECT
+public:
+ SpectrumAnalyser(QObject *parent = 0);
+ ~SpectrumAnalyser();
+
+#ifdef DUMP_SPECTRUMANALYSER
+ void setOutputPath(const QString &outputPath);
+#endif
+
+public:
+ /*
+ * Set the windowing function which is applied before calculating the FFT
+ */
+ void setWindowFunction(WindowFunction type);
+
+ /*
+ * Calculate a frequency spectrum
+ *
+ * \param buffer Audio data
+ * \param format Format of audio data
+ *
+ * Frequency spectrum is calculated asynchronously. The result is returned
+ * via the spectrumChanged signal.
+ *
+ * An ongoing calculation can be cancelled by calling cancelCalculation().
+ *
+ */
+ void calculate(const QByteArray &buffer, const QAudioFormat &format);
+
+ /*
+ * Check whether the object is ready to perform another calculation
+ */
+ bool isReady() const;
+
+ /*
+ * Cancel an ongoing calculation
+ *
+ * Note that cancelling is asynchronous.
+ */
+ void cancelCalculation();
+
+signals:
+ void spectrumChanged(const FrequencySpectrum &spectrum);
+
+private slots:
+ void calculationComplete(const FrequencySpectrum &spectrum);
+
+private:
+ void calculateWindow();
+
+private:
+
+ SpectrumAnalyserThread* m_thread;
+
+ enum State {
+ Idle,
+ Busy,
+ Cancelled
+ };
+
+ State m_state;
+
+#ifdef DUMP_SPECTRUMANALYSER
+ QDir m_outputDir;
+ int m_count;
+ QFile m_textFile;
+ QTextStream m_textStream;
+#endif
+};
+
+#endif // SPECTRUMANALYSER_H
+
diff --git a/demos/spectrum/app/tonegenerator.cpp b/demos/spectrum/app/tonegenerator.cpp
new file mode 100644
index 0000000..6458a7d
--- /dev/null
+++ b/demos/spectrum/app/tonegenerator.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** 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: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 "spectrum.h"
+#include "utils.h"
+#include <QByteArray>
+#include <QtMultimedia/QAudioFormat>
+#include <QtCore/qmath.h>
+#include <QtCore/qendian.h>
+
+void generateTone(const SweptTone &tone, const QAudioFormat &format, QByteArray &buffer)
+{
+ Q_ASSERT(isPCMS16LE(format));
+
+ const int channelBytes = format.sampleSize() / 8;
+ const int sampleBytes = format.channels() * channelBytes;
+ int length = buffer.size();
+ const int numSamples = buffer.size() / sampleBytes;
+
+ Q_ASSERT(length % sampleBytes == 0);
+ Q_UNUSED(sampleBytes) // suppress warning in release builds
+
+ unsigned char *ptr = reinterpret_cast<unsigned char *>(buffer.data());
+
+ qreal phase = 0.0;
+
+ const qreal d = 2 * M_PI / format.frequency();
+
+ // We can't generate a zero-frequency sine wave
+ const qreal startFreq = tone.startFreq ? tone.startFreq : 1.0;
+
+ // Amount by which phase increases on each sample
+ qreal phaseStep = d * startFreq;
+
+ // Amount by which phaseStep increases on each sample
+ // If this is non-zero, the output is a frequency-swept tone
+ const qreal phaseStepStep = d * (tone.endFreq - startFreq) / numSamples;
+
+ while (length) {
+ const qreal x = tone.amplitude * qSin(phase);
+ const qint16 value = realToPcm(x);
+ for (int i=0; i<format.channels(); ++i) {
+ qToLittleEndian<qint16>(value, ptr);
+ ptr += channelBytes;
+ length -= channelBytes;
+ }
+
+ phase += phaseStep;
+ while (phase > 2 * M_PI)
+ phase -= 2 * M_PI;
+ phaseStep += phaseStepStep;
+ }
+}
+
diff --git a/demos/spectrum/app/tonegenerator.h b/demos/spectrum/app/tonegenerator.h
new file mode 100644
index 0000000..419f7e4
--- /dev/null
+++ b/demos/spectrum/app/tonegenerator.h
@@ -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$
+**
+*****************************************************************************/
+
+#ifndef TONEGENERATOR_H
+#define TONEGENERATOR_H
+
+#include <QtCore/qglobal.h>
+#include "spectrum.h"
+
+class QAudioFormat;
+class QByteArray;
+
+/**
+ * Generate a sine wave
+ */
+void generateTone(const SweptTone &tone, const QAudioFormat &format, QByteArray &buffer);
+
+#endif // TONEGENERATOR_H
+
diff --git a/demos/spectrum/app/tonegeneratordialog.cpp b/demos/spectrum/app/tonegeneratordialog.cpp
new file mode 100644
index 0000000..06e453c
--- /dev/null
+++ b/demos/spectrum/app/tonegeneratordialog.cpp
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** 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: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 "tonegeneratordialog.h"
+#include <QComboBox>
+#include <QDialogButtonBox>
+#include <QLabel>
+#include <QPushButton>
+#include <QVBoxLayout>
+#include <QCheckBox>
+#include <QSlider>
+#include <QSpinBox>
+
+const int ToneGeneratorFreqMin = 1;
+const int ToneGeneratorFreqMax = 1000;
+const int ToneGeneratorFreqDefault = 440;
+const int ToneGeneratorAmplitudeDefault = 75;
+
+ToneGeneratorDialog::ToneGeneratorDialog(QWidget *parent)
+ : QDialog(parent)
+ , m_toneGeneratorSweepCheckBox(new QCheckBox(tr("Frequency sweep"), this))
+ , m_frequencySweepEnabled(true)
+ , m_toneGeneratorControl(new QWidget(this))
+ , m_toneGeneratorFrequencyControl(new QWidget(this))
+ , m_frequencySlider(new QSlider(Qt::Horizontal, this))
+ , m_frequencySpinBox(new QSpinBox(this))
+ , m_frequency(ToneGeneratorFreqDefault)
+ , m_amplitudeSlider(new QSlider(Qt::Horizontal, this))
+{
+ QVBoxLayout *dialogLayout = new QVBoxLayout(this);
+
+ m_toneGeneratorSweepCheckBox->setChecked(true);
+
+ // Configure tone generator controls
+ m_frequencySlider->setRange(ToneGeneratorFreqMin, ToneGeneratorFreqMax);
+ m_frequencySlider->setValue(ToneGeneratorFreqDefault);
+ m_frequencySpinBox->setRange(ToneGeneratorFreqMin, ToneGeneratorFreqMax);
+ m_frequencySpinBox->setValue(ToneGeneratorFreqDefault);
+ m_amplitudeSlider->setRange(0, 100);
+ m_amplitudeSlider->setValue(ToneGeneratorAmplitudeDefault);
+
+ // Add widgets to layout
+
+ QScopedPointer<QGridLayout> frequencyControlLayout(new QGridLayout);
+ QLabel *frequencyLabel = new QLabel(tr("Frequency (Hz)"), this);
+ frequencyControlLayout->addWidget(frequencyLabel, 0, 0, 2, 1);
+ frequencyControlLayout->addWidget(m_frequencySlider, 0, 1);
+ frequencyControlLayout->addWidget(m_frequencySpinBox, 1, 1);
+ m_toneGeneratorFrequencyControl->setLayout(frequencyControlLayout.data());
+ frequencyControlLayout.take(); // ownership transferred to m_toneGeneratorFrequencyControl
+ m_toneGeneratorFrequencyControl->setEnabled(false);
+
+ QScopedPointer<QGridLayout> toneGeneratorLayout(new QGridLayout);
+ QLabel *amplitudeLabel = new QLabel(tr("Amplitude"), this);
+ toneGeneratorLayout->addWidget(m_toneGeneratorSweepCheckBox, 0, 1);
+ toneGeneratorLayout->addWidget(m_toneGeneratorFrequencyControl, 1, 0, 1, 2);
+ toneGeneratorLayout->addWidget(amplitudeLabel, 2, 0);
+ toneGeneratorLayout->addWidget(m_amplitudeSlider, 2, 1);
+ m_toneGeneratorControl->setLayout(toneGeneratorLayout.data());
+ m_toneGeneratorControl->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ dialogLayout->addWidget(m_toneGeneratorControl);
+ toneGeneratorLayout.take(); // ownership transferred
+
+ // Connect
+ CHECKED_CONNECT(m_toneGeneratorSweepCheckBox, SIGNAL(toggled(bool)),
+ this, SLOT(frequencySweepEnabled(bool)));
+ CHECKED_CONNECT(m_frequencySlider, SIGNAL(valueChanged(int)),
+ m_frequencySpinBox, SLOT(setValue(int)));
+ CHECKED_CONNECT(m_frequencySpinBox, SIGNAL(valueChanged(int)),
+ m_frequencySlider, SLOT(setValue(int)));
+
+ // Add standard buttons to layout
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(this);
+ buttonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+ dialogLayout->addWidget(buttonBox);
+
+ // Connect standard buttons
+ CHECKED_CONNECT(buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
+ this, SLOT(accept()));
+ CHECKED_CONNECT(buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
+ this, SLOT(reject()));
+
+ setLayout(dialogLayout);
+}
+
+ToneGeneratorDialog::~ToneGeneratorDialog()
+{
+
+}
+
+bool ToneGeneratorDialog::isFrequencySweepEnabled() const
+{
+ return m_toneGeneratorSweepCheckBox->isChecked();
+}
+
+qreal ToneGeneratorDialog::frequency() const
+{
+ return qreal(m_frequencySlider->value());
+}
+
+qreal ToneGeneratorDialog::amplitude() const
+{
+ return qreal(m_amplitudeSlider->value()) / 100.0;
+}
+
+void ToneGeneratorDialog::frequencySweepEnabled(bool enabled)
+{
+ m_frequencySweepEnabled = enabled;
+ m_toneGeneratorFrequencyControl->setEnabled(!enabled);
+}
diff --git a/demos/spectrum/app/tonegeneratordialog.h b/demos/spectrum/app/tonegeneratordialog.h
new file mode 100644
index 0000000..35d69c2
--- /dev/null
+++ b/demos/spectrum/app/tonegeneratordialog.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** 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 TONEGENERATORDIALOG_H
+#define TONEGENERATORDIALOG_H
+
+#include "spectrum.h"
+#include <QDialog>
+#include <QtMultimedia/QAudioDeviceInfo>
+
+class QCheckBox;
+class QSlider;
+class QSpinBox;
+class QGridLayout;
+
+/**
+ * Dialog which controls the parameters of the tone generator.
+ */
+class ToneGeneratorDialog : public QDialog {
+ Q_OBJECT
+public:
+ ToneGeneratorDialog(QWidget *parent = 0);
+ ~ToneGeneratorDialog();
+
+ bool isFrequencySweepEnabled() const;
+ qreal frequency() const;
+ qreal amplitude() const;
+
+private slots:
+ void frequencySweepEnabled(bool enabled);
+
+private:
+ QCheckBox* m_toneGeneratorSweepCheckBox;
+ bool m_frequencySweepEnabled;
+ QWidget* m_toneGeneratorControl;
+ QWidget* m_toneGeneratorFrequencyControl;
+ QSlider* m_frequencySlider;
+ QSpinBox* m_frequencySpinBox;
+ qreal m_frequency;
+ QSlider* m_amplitudeSlider;
+
+};
+
+#endif // TONEGENERATORDIALOG_H
diff --git a/demos/spectrum/app/utils.cpp b/demos/spectrum/app/utils.cpp
new file mode 100644
index 0000000..97dc6e3
--- /dev/null
+++ b/demos/spectrum/app/utils.cpp
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** 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: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 <QtMultimedia/QAudioFormat>
+#include "utils.h"
+
+qint64 audioDuration(const QAudioFormat &format, qint64 bytes)
+{
+ return (bytes * 1000000) /
+ (format.frequency() * format.channels() * (format.sampleSize() / 8));
+}
+
+qint64 audioLength(const QAudioFormat &format, qint64 microSeconds)
+{
+ return (format.frequency() * format.channels() * (format.sampleSize() / 8))
+ * microSeconds / 1000000;
+}
+
+qreal nyquistFrequency(const QAudioFormat &format)
+{
+ return format.frequency() / 2;
+}
+
+QString formatToString(const QAudioFormat &format)
+{
+ QString result;
+
+ if (QAudioFormat() != format) {
+ if (format.codec() == "audio/pcm") {
+ Q_ASSERT(format.sampleType() == QAudioFormat::SignedInt);
+
+ const QString formatEndian = (format.byteOrder() == QAudioFormat::LittleEndian)
+ ? QString("LE") : QString("BE");
+
+ QString formatType;
+ switch(format.sampleType()) {
+ case QAudioFormat::SignedInt:
+ formatType = "signed";
+ break;
+ case QAudioFormat::UnSignedInt:
+ formatType = "unsigned";
+ break;
+ case QAudioFormat::Float:
+ formatType = "float";
+ break;
+ case QAudioFormat::Unknown:
+ formatType = "unknown";
+ break;
+ }
+
+ QString formatChannels = QString("%1 channels").arg(format.channels());
+ switch (format.channels()) {
+ case 1:
+ formatChannels = "mono";
+ break;
+ case 2:
+ formatChannels = "stereo";
+ break;
+ }
+
+ result = QString("%1 Hz %2 bit %3 %4 %5")
+ .arg(format.frequency())
+ .arg(format.sampleSize())
+ .arg(formatType)
+ .arg(formatEndian)
+ .arg(formatChannels);
+ } else {
+ result = format.codec();
+ }
+ }
+
+ return result;
+}
+
+bool isPCM(const QAudioFormat &format)
+{
+ return (format.codec() == "audio/pcm");
+}
+
+
+bool isPCMS16LE(const QAudioFormat &format)
+{
+ return (isPCM(format) &&
+ format.sampleType() == QAudioFormat::SignedInt &&
+ format.sampleSize() == 16 &&
+ format.byteOrder() == QAudioFormat::LittleEndian);
+}
+
+const qint16 PCMS16MaxValue = 32767;
+const quint16 PCMS16MaxAmplitude = 32768; // because minimum is -32768
+
+qreal pcmToReal(qint16 pcm)
+{
+ return qreal(pcm) / PCMS16MaxAmplitude;
+}
+
+qint16 realToPcm(qreal real)
+{
+ return real * PCMS16MaxValue;
+}
diff --git a/demos/spectrum/app/utils.h b/demos/spectrum/app/utils.h
new file mode 100644
index 0000000..83467cd
--- /dev/null
+++ b/demos/spectrum/app/utils.h
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** 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 UTILS_H
+#define UTILS_H
+
+#include <QtCore/qglobal.h>
+#include <QDebug>
+
+class QAudioFormat;
+
+//-----------------------------------------------------------------------------
+// Miscellaneous utility functions
+//-----------------------------------------------------------------------------
+
+qint64 audioDuration(const QAudioFormat &format, qint64 bytes);
+qint64 audioLength(const QAudioFormat &format, qint64 microSeconds);
+
+QString formatToString(const QAudioFormat &format);
+
+qreal nyquistFrequency(const QAudioFormat &format);
+
+// Scale PCM value to [-1.0, 1.0]
+qreal pcmToReal(qint16 pcm);
+
+// Scale real value in [-1.0, 1.0] to PCM
+qint16 realToPcm(qreal real);
+
+// Check whether the audio format is PCM
+bool isPCM(const QAudioFormat &format);
+
+// Check whether the audio format is signed, little-endian, 16-bit PCM
+bool isPCMS16LE(const QAudioFormat &format);
+
+// Compile-time calculation of powers of two
+
+template<int N> class PowerOfTwo
+{ public: static const int Result = PowerOfTwo<N-1>::Result * 2; };
+
+template<> class PowerOfTwo<0>
+{ public: static const int Result = 1; };
+
+
+//-----------------------------------------------------------------------------
+// Debug output
+//-----------------------------------------------------------------------------
+
+class NullDebug
+{
+public:
+ template <typename T>
+ NullDebug& operator<<(const T&) { return *this; }
+};
+
+inline NullDebug nullDebug() { return NullDebug(); }
+
+#ifdef LOG_ENGINE
+# define ENGINE_DEBUG qDebug()
+#else
+# define ENGINE_DEBUG nullDebug()
+#endif
+
+#ifdef LOG_SPECTRUMANALYSER
+# define SPECTRUMANALYSER_DEBUG qDebug()
+#else
+# define SPECTRUMANALYSER_DEBUG nullDebug()
+#endif
+
+#ifdef LOG_WAVEFORM
+# define WAVEFORM_DEBUG qDebug()
+#else
+# define WAVEFORM_DEBUG nullDebug()
+#endif
+
+#endif // UTILS_H
diff --git a/demos/spectrum/app/waveform.cpp b/demos/spectrum/app/waveform.cpp
new file mode 100644
index 0000000..3fc4f76
--- /dev/null
+++ b/demos/spectrum/app/waveform.cpp
@@ -0,0 +1,419 @@
+/****************************************************************************
+**
+** 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: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 "waveform.h"
+#include "utils.h"
+#include <QPainter>
+#include <QResizeEvent>
+#include <QDebug>
+
+
+Waveform::Waveform(const QByteArray &buffer, QWidget *parent)
+ : QWidget(parent)
+ , m_buffer(buffer)
+ , m_dataLength(0)
+ , m_position(0)
+ , m_active(false)
+ , m_tileLength(0)
+ , m_tileArrayStart(0)
+ , m_windowPosition(0)
+ , m_windowLength(0)
+{
+ setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ setMinimumHeight(50);
+}
+
+Waveform::~Waveform()
+{
+ deletePixmaps();
+}
+
+void Waveform::paintEvent(QPaintEvent * /*event*/)
+{
+ QPainter painter(this);
+
+ painter.fillRect(rect(), Qt::black);
+
+ if (m_active) {
+ WAVEFORM_DEBUG << "Waveform::paintEvent"
+ << "windowPosition" << m_windowPosition
+ << "windowLength" << m_windowLength;
+ qint64 pos = m_windowPosition;
+ const qint64 windowEnd = m_windowPosition + m_windowLength;
+ int destLeft = 0;
+ int destRight = 0;
+ while (pos < windowEnd) {
+ const TilePoint point = tilePoint(pos);
+ WAVEFORM_DEBUG << "Waveform::paintEvent" << "pos" << pos
+ << "tileIndex" << point.index
+ << "positionOffset" << point.positionOffset
+ << "pixelOffset" << point.pixelOffset;
+
+ if (point.index != NullIndex) {
+ const Tile &tile = m_tiles[point.index];
+ if (tile.painted) {
+ const qint64 sectionLength = qMin((m_tileLength - point.positionOffset),
+ (windowEnd - pos));
+ Q_ASSERT(sectionLength > 0);
+
+ const int sourceRight = tilePixelOffset(point.positionOffset + sectionLength);
+ destRight = windowPixelOffset(pos - m_windowPosition + sectionLength);
+
+ QRect destRect = rect();
+ destRect.setLeft(destLeft);
+ destRect.setRight(destRight);
+
+ QRect sourceRect(QPoint(), m_pixmapSize);
+ sourceRect.setLeft(point.pixelOffset);
+ sourceRect.setRight(sourceRight);
+
+ WAVEFORM_DEBUG << "Waveform::paintEvent" << "tileIndex" << point.index
+ << "source" << point.pixelOffset << sourceRight
+ << "dest" << destLeft << destRight;
+
+ painter.drawPixmap(destRect, *tile.pixmap, sourceRect);
+
+ destLeft = destRight;
+
+ if (point.index < m_tiles.count()) {
+ pos = tilePosition(point.index + 1);
+ WAVEFORM_DEBUG << "Waveform::paintEvent" << "pos ->" << pos;
+ } else {
+ // Reached end of tile array
+ WAVEFORM_DEBUG << "Waveform::paintEvent" << "reached end of tile array";
+ break;
+ }
+ } else {
+ // Passed last tile which is painted
+ WAVEFORM_DEBUG << "Waveform::paintEvent" << "tile" << point.index << "not painted";
+ break;
+ }
+ } else {
+ // pos is past end of tile array
+ WAVEFORM_DEBUG << "Waveform::paintEvent" << "pos" << pos << "past end of tile array";
+ break;
+ }
+ }
+
+ WAVEFORM_DEBUG << "Waveform::paintEvent" << "final pos" << pos << "final x" << destRight;
+ }
+}
+
+void Waveform::resizeEvent(QResizeEvent *event)
+{
+ if (event->size() != event->oldSize())
+ createPixmaps(event->size());
+}
+
+void Waveform::initialize(const QAudioFormat &format, qint64 audioBufferSize, qint64 windowDurationUs)
+{
+ WAVEFORM_DEBUG << "Waveform::initialize"
+ << "audioBufferSize" << audioBufferSize
+ << "m_buffer.size()" << m_buffer.size()
+ << "windowDurationUs" << windowDurationUs;
+
+ reset();
+
+ m_format = format;
+
+ // Calculate tile size
+ m_tileLength = audioBufferSize;
+
+ // Calculate window size
+ m_windowLength = audioLength(m_format, windowDurationUs);
+
+ // Calculate number of tiles required
+ int nTiles;
+ if (m_tileLength > m_windowLength) {
+ nTiles = 2;
+ } else {
+ nTiles = m_windowLength / m_tileLength + 1;
+ if (m_windowLength % m_tileLength)
+ ++nTiles;
+ }
+
+ WAVEFORM_DEBUG << "Waveform::initialize"
+ << "tileLength" << m_tileLength
+ << "windowLength" << m_windowLength
+ << "nTiles" << nTiles;
+
+ m_pixmaps.fill(0, nTiles);
+ m_tiles.resize(nTiles);
+
+ createPixmaps(rect().size());
+
+ m_active = true;
+}
+
+void Waveform::reset()
+{
+ WAVEFORM_DEBUG << "Waveform::reset";
+
+ m_dataLength = 0;
+ m_position = 0;
+ m_format = QAudioFormat();
+ m_active = false;
+ deletePixmaps();
+ m_tiles.clear();
+ m_tileLength = 0;
+ m_tileArrayStart = 0;
+ m_windowPosition = 0;
+ m_windowLength = 0;
+}
+
+void Waveform::dataLengthChanged(qint64 length)
+{
+ WAVEFORM_DEBUG << "Waveform::dataLengthChanged" << length;
+ const qint64 oldLength = m_dataLength;
+ m_dataLength = length;
+
+ if (m_active) {
+ if (m_dataLength < oldLength)
+ positionChanged(m_dataLength);
+ else
+ paintTiles();
+ }
+}
+
+void Waveform::positionChanged(qint64 position)
+{
+ WAVEFORM_DEBUG << "Waveform::positionChanged" << position;
+
+ if (position + m_windowLength > m_dataLength)
+ position = m_dataLength - m_windowLength;
+
+ m_position = position;
+
+ setWindowPosition(position);
+}
+
+void Waveform::deletePixmaps()
+{
+ QPixmap *pixmap;
+ foreach (pixmap, m_pixmaps)
+ delete pixmap;
+ m_pixmaps.clear();
+}
+
+void Waveform::createPixmaps(const QSize &widgetSize)
+{
+ m_pixmapSize = widgetSize;
+ m_pixmapSize.setWidth(qreal(widgetSize.width()) * m_tileLength / m_windowLength);
+
+ WAVEFORM_DEBUG << "Waveform::createPixmaps"
+ << "widgetSize" << widgetSize
+ << "pixmapSize" << m_pixmapSize;
+
+ Q_ASSERT(m_tiles.count() == m_pixmaps.count());
+
+ // (Re)create pixmaps
+ for (int i=0; i<m_pixmaps.size(); ++i) {
+ delete m_pixmaps[i];
+ m_pixmaps[i] = 0;
+ m_pixmaps[i] = new QPixmap(m_pixmapSize);
+ }
+
+ // Update tile pixmap pointers, and mark for repainting
+ for (int i=0; i<m_tiles.count(); ++i) {
+ m_tiles[i].pixmap = m_pixmaps[i];
+ m_tiles[i].painted = false;
+ }
+
+ paintTiles();
+}
+
+void Waveform::setWindowPosition(qint64 position)
+{
+ WAVEFORM_DEBUG << "Waveform::setWindowPosition"
+ << "old" << m_windowPosition << "new" << position
+ << "tileArrayStart" << m_tileArrayStart;
+
+ const qint64 oldPosition = m_windowPosition;
+ m_windowPosition = position;
+
+ if((m_windowPosition >= oldPosition) &&
+ (m_windowPosition - m_tileArrayStart < (m_tiles.count() * m_tileLength))) {
+ // Work out how many tiles need to be shuffled
+ const qint64 offset = m_windowPosition - m_tileArrayStart;
+ const int nTiles = offset / m_tileLength;
+ shuffleTiles(nTiles);
+ } else {
+ resetTiles(m_windowPosition);
+ }
+
+ if(!paintTiles() && m_windowPosition != oldPosition)
+ update();
+}
+
+qint64 Waveform::tilePosition(int index) const
+{
+ return m_tileArrayStart + index * m_tileLength;
+}
+
+Waveform::TilePoint Waveform::tilePoint(qint64 position) const
+{
+ TilePoint result;
+ if (position >= m_tileArrayStart) {
+ const qint64 tileArrayEnd = m_tileArrayStart + m_tiles.count() * m_tileLength;
+ if (position < tileArrayEnd) {
+ const qint64 offsetIntoTileArray = position - m_tileArrayStart;
+ result.index = offsetIntoTileArray / m_tileLength;
+ Q_ASSERT(result.index >= 0 && result.index <= m_tiles.count());
+ result.positionOffset = offsetIntoTileArray % m_tileLength;
+ result.pixelOffset = tilePixelOffset(result.positionOffset);
+ Q_ASSERT(result.pixelOffset >= 0 && result.pixelOffset <= m_pixmapSize.width());
+ }
+ }
+
+ return result;
+}
+
+int Waveform::tilePixelOffset(qint64 positionOffset) const
+{
+ Q_ASSERT(positionOffset >= 0 && positionOffset <= m_tileLength);
+ const int result = (qreal(positionOffset) / m_tileLength) * m_pixmapSize.width();
+ return result;
+}
+
+int Waveform::windowPixelOffset(qint64 positionOffset) const
+{
+ Q_ASSERT(positionOffset >= 0 && positionOffset <= m_windowLength);
+ const int result = (qreal(positionOffset) / m_windowLength) * rect().width();
+ return result;
+}
+
+bool Waveform::paintTiles()
+{
+ WAVEFORM_DEBUG << "Waveform::paintTiles";
+ bool updateRequired = false;
+
+ for (int i=0; i<m_tiles.count(); ++i) {
+ const Tile &tile = m_tiles[i];
+ if (!tile.painted) {
+ const qint64 tileEnd = m_tileArrayStart + (i + 1) * m_tileLength;
+ if (m_dataLength >= tileEnd) {
+ paintTile(i);
+ updateRequired = true;
+ }
+ }
+ }
+
+ if (updateRequired)
+ update();
+
+ return updateRequired;
+}
+
+void Waveform::paintTile(int index)
+{
+ WAVEFORM_DEBUG << "Waveform::paintTile" << "index" << index;
+
+ const qint64 tileStart = m_tileArrayStart + index * m_tileLength;
+ Q_ASSERT(m_dataLength >= tileStart + m_tileLength);
+
+ Tile &tile = m_tiles[index];
+ Q_ASSERT(!tile.painted);
+
+ const qint16* base = reinterpret_cast<const qint16*>(m_buffer.constData());
+ const qint16* buffer = base + (tileStart / 2);
+ const int numSamples = m_tileLength / (2 * m_format.channels());
+
+ QPainter painter(tile.pixmap);
+
+ painter.fillRect(tile.pixmap->rect(), Qt::black);
+
+ QPen pen(Qt::white);
+ painter.setPen(pen);
+
+ // Calculate initial PCM value
+ qint16 previousPcmValue = 0;
+ if (buffer > base)
+ previousPcmValue = *(buffer - m_format.channels());
+
+ // Calculate initial point
+ const qreal previousRealValue = pcmToReal(previousPcmValue);
+ const int originY = ((previousRealValue + 1.0) / 2) * m_pixmapSize.height();
+ const QPoint origin(0, originY);
+
+ QLine line(origin, origin);
+
+ for (int i=0; i<numSamples; ++i) {
+ const qint16* ptr = buffer + i * m_format.channels();
+ const qint16 pcmValue = *ptr;
+ const qreal realValue = pcmToReal(pcmValue);
+
+ const int x = tilePixelOffset(i * 2 * m_format.channels());
+ const int y = ((realValue + 1.0) / 2) * m_pixmapSize.height();
+
+ line.setP2(QPoint(x, y));
+ painter.drawLine(line);
+ line.setP1(line.p2());
+ }
+
+ tile.painted = true;
+}
+
+void Waveform::shuffleTiles(int n)
+{
+ WAVEFORM_DEBUG << "Waveform::shuffleTiles" << "n" << n;
+
+ while (n--) {
+ Tile tile = m_tiles.first();
+ tile.painted = false;
+ m_tiles.erase(m_tiles.begin());
+ m_tiles += tile;
+ m_tileArrayStart += m_tileLength;
+ }
+
+ WAVEFORM_DEBUG << "Waveform::shuffleTiles" << "tileArrayStart" << m_tileArrayStart;
+}
+
+void Waveform::resetTiles(qint64 newStartPos)
+{
+ WAVEFORM_DEBUG << "Waveform::resetTiles" << "newStartPos" << newStartPos;
+
+ QVector<Tile>::iterator i = m_tiles.begin();
+ for ( ; i != m_tiles.end(); ++i)
+ i->painted = false;
+
+ m_tileArrayStart = newStartPos;
+}
+
diff --git a/demos/spectrum/app/waveform.h b/demos/spectrum/app/waveform.h
new file mode 100644
index 0000000..4de527f
--- /dev/null
+++ b/demos/spectrum/app/waveform.h
@@ -0,0 +1,198 @@
+/****************************************************************************
+**
+** 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 WAVEFORM_H
+#define WAVEFORM_H
+
+#include <QWidget>
+#include <QtMultimedia/QAudioFormat>
+#include <QPixmap>
+#include <QScopedPointer>
+
+class QByteArray;
+
+/**
+ * Widget which displays a section of the audio waveform.
+ *
+ * The waveform is rendered on a set of QPixmaps which form a group of tiles
+ * whose extent covers the widget. As the audio position is updated, these
+ * tiles are scrolled from left to right; when the left-most tile scrolls
+ * outside the widget, it is moved to the right end of the tile array and
+ * painted with the next section of the waveform.
+ */
+class Waveform : public QWidget {
+ Q_OBJECT
+public:
+ Waveform(const QByteArray &buffer, QWidget *parent = 0);
+ ~Waveform();
+
+ // QWidget
+ void paintEvent(QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
+
+ void initialize(const QAudioFormat &format, qint64 audioBufferSize, qint64 windowDurationUs);
+ void reset();
+
+ void setAutoUpdatePosition(bool enabled);
+
+public slots:
+ void dataLengthChanged(qint64 length);
+ void positionChanged(qint64 position);
+
+private:
+ static const int NullIndex = -1;
+
+ void deletePixmaps();
+
+ /*
+ * (Re)create all pixmaps, repaint and update the display.
+ * Triggers an update();
+ */
+ void createPixmaps(const QSize &newSize);
+
+ /*
+ * Update window position.
+ * Triggers an update().
+ */
+ void setWindowPosition(qint64 position);
+
+ /*
+ * Base position of tile
+ */
+ qint64 tilePosition(int index) const;
+
+ /*
+ * Structure which identifies a point within a given
+ * tile.
+ */
+ struct TilePoint
+ {
+ TilePoint(int idx = 0, qint64 pos = 0, qint64 pix = 0)
+ : index(idx), positionOffset(pos), pixelOffset(pix)
+ { }
+
+ // Index of tile
+ int index;
+
+ // Number of bytes from start of tile
+ qint64 positionOffset;
+
+ // Number of pixels from left of corresponding pixmap
+ int pixelOffset;
+ };
+
+ /*
+ * Convert position in m_buffer into a tile index and an offset in pixels
+ * into the corresponding pixmap.
+ *
+ * \param position Offset into m_buffer, in bytes
+
+ * If position is outside the tile array, index is NullIndex and
+ * offset is zero.
+ */
+ TilePoint tilePoint(qint64 position) const;
+
+ /*
+ * Convert offset in bytes into a tile into an offset in pixels
+ * within that tile.
+ */
+ int tilePixelOffset(qint64 positionOffset) const;
+
+ /*
+ * Convert offset in bytes into the window into an offset in pixels
+ * within the widget rect().
+ */
+ int windowPixelOffset(qint64 positionOffset) const;
+
+ /*
+ * Paint all tiles which can be painted.
+ * \return true iff update() was called
+ */
+ bool paintTiles();
+
+ /*
+ * Paint the specified tile
+ *
+ * \pre Sufficient data is available to completely paint the tile, i.e.
+ * m_dataLength is greater than the upper bound of the tile.
+ */
+ void paintTile(int index);
+
+ /*
+ * Move the first n tiles to the end of the array, and mark them as not
+ * painted.
+ */
+ void shuffleTiles(int n);
+
+ /*
+ * Reset tile array
+ */
+ void resetTiles(qint64 newStartPos);
+
+private:
+ const QByteArray& m_buffer;
+ qint64 m_dataLength;
+ qint64 m_position;
+ QAudioFormat m_format;
+
+ bool m_active;
+
+ QSize m_pixmapSize;
+ QVector<QPixmap*> m_pixmaps;
+
+ struct Tile {
+ // Pointer into parent m_pixmaps array
+ QPixmap* pixmap;
+
+ // Flag indicating whether this tile has been painted
+ bool painted;
+ };
+
+ QVector<Tile> m_tiles;
+
+ // Length of audio data in bytes depicted by each tile
+ qint64 m_tileLength;
+
+ // Position in bytes of the first tile, relative to m_buffer
+ qint64 m_tileArrayStart;
+
+ qint64 m_windowPosition;
+ qint64 m_windowLength;
+
+};
+
+#endif // WAVEFORM_H
diff --git a/demos/spectrum/app/wavfile.cpp b/demos/spectrum/app/wavfile.cpp
new file mode 100644
index 0000000..ec911ad
--- /dev/null
+++ b/demos/spectrum/app/wavfile.cpp
@@ -0,0 +1,247 @@
+/****************************************************************************
+**
+** 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: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/qendian.h>
+#include <QVector>
+#include <QDebug>
+#include "utils.h"
+#include "wavfile.h"
+
+struct chunk
+{
+ char id[4];
+ quint32 size;
+};
+
+struct RIFFHeader
+{
+ chunk descriptor; // "RIFF"
+ char type[4]; // "WAVE"
+};
+
+struct WAVEHeader
+{
+ chunk descriptor;
+ quint16 audioFormat;
+ quint16 numChannels;
+ quint32 sampleRate;
+ quint32 byteRate;
+ quint16 blockAlign;
+ quint16 bitsPerSample;
+};
+
+struct DATAHeader
+{
+ chunk descriptor;
+};
+
+struct CombinedHeader
+{
+ RIFFHeader riff;
+ WAVEHeader wave;
+ DATAHeader data;
+};
+
+static const int HeaderLength = sizeof(CombinedHeader);
+
+
+WavFile::WavFile(const QAudioFormat &format, qint64 dataLength)
+ : m_format(format)
+ , m_dataLength(dataLength)
+{
+
+}
+
+bool WavFile::readHeader(QIODevice &device)
+{
+ bool result = true;
+
+ if (!device.isSequential())
+ result = device.seek(0);
+ // else, assume that current position is the start of the header
+
+ if (result) {
+ CombinedHeader header;
+ result = (device.read(reinterpret_cast<char *>(&header), HeaderLength) == HeaderLength);
+ if (result) {
+ if ((memcmp(&header.riff.descriptor.id, "RIFF", 4) == 0
+ || memcmp(&header.riff.descriptor.id, "RIFX", 4) == 0)
+ && memcmp(&header.riff.type, "WAVE", 4) == 0
+ && memcmp(&header.wave.descriptor.id, "fmt ", 4) == 0
+ && header.wave.audioFormat == 1 // PCM
+ ) {
+ if (memcmp(&header.riff.descriptor.id, "RIFF", 4) == 0)
+ m_format.setByteOrder(QAudioFormat::LittleEndian);
+ else
+ m_format.setByteOrder(QAudioFormat::BigEndian);
+
+ m_format.setChannels(qFromLittleEndian<quint16>(header.wave.numChannels));
+ m_format.setCodec("audio/pcm");
+ m_format.setFrequency(qFromLittleEndian<quint32>(header.wave.sampleRate));
+ m_format.setSampleSize(qFromLittleEndian<quint16>(header.wave.bitsPerSample));
+
+ switch(header.wave.bitsPerSample) {
+ case 8:
+ m_format.setSampleType(QAudioFormat::UnSignedInt);
+ break;
+ case 16:
+ m_format.setSampleType(QAudioFormat::SignedInt);
+ break;
+ default:
+ result = false;
+ }
+
+ m_dataLength = device.size() - HeaderLength;
+ } else {
+ result = false;
+ }
+ }
+ }
+
+ return result;
+}
+
+bool WavFile::writeHeader(QIODevice &device)
+{
+ CombinedHeader header;
+
+ memset(&header, 0, HeaderLength);
+
+ // RIFF header
+ if (m_format.byteOrder() == QAudioFormat::LittleEndian)
+ strncpy(&header.riff.descriptor.id[0], "RIFF", 4);
+ else
+ strncpy(&header.riff.descriptor.id[0], "RIFX", 4);
+ qToLittleEndian<quint32>(quint32(m_dataLength + HeaderLength - 8),
+ reinterpret_cast<unsigned char*>(&header.riff.descriptor.size));
+ strncpy(&header.riff.type[0], "WAVE", 4);
+
+ // WAVE header
+ strncpy(&header.wave.descriptor.id[0], "fmt ", 4);
+ qToLittleEndian<quint32>(quint32(16),
+ reinterpret_cast<unsigned char*>(&header.wave.descriptor.size));
+ qToLittleEndian<quint16>(quint16(1),
+ reinterpret_cast<unsigned char*>(&header.wave.audioFormat));
+ qToLittleEndian<quint16>(quint16(m_format.channels()),
+ reinterpret_cast<unsigned char*>(&header.wave.numChannels));
+ qToLittleEndian<quint32>(quint32(m_format.frequency()),
+ reinterpret_cast<unsigned char*>(&header.wave.sampleRate));
+ qToLittleEndian<quint32>(quint32(m_format.frequency() * m_format.channels() * m_format.sampleSize() / 8),
+ reinterpret_cast<unsigned char*>(&header.wave.byteRate));
+ qToLittleEndian<quint16>(quint16(m_format.channels() * m_format.sampleSize() / 8),
+ reinterpret_cast<unsigned char*>(&header.wave.blockAlign));
+ qToLittleEndian<quint16>(quint16(m_format.sampleSize()),
+ reinterpret_cast<unsigned char*>(&header.wave.bitsPerSample));
+
+ // DATA header
+ strncpy(&header.data.descriptor.id[0], "data", 4);
+ qToLittleEndian<quint32>(quint32(m_dataLength),
+ reinterpret_cast<unsigned char*>(&header.data.descriptor.size));
+
+ return (device.write(reinterpret_cast<const char *>(&header), HeaderLength) == HeaderLength);
+}
+
+const QAudioFormat& WavFile::format() const
+{
+ return m_format;
+}
+
+qint64 WavFile::dataLength() const
+{
+ return m_dataLength;
+}
+
+qint64 WavFile::headerLength()
+{
+ return HeaderLength;
+}
+
+bool WavFile::writeDataLength(QIODevice &device, qint64 dataLength)
+{
+ bool result = false;
+ if (!device.isSequential()) {
+ device.seek(40);
+ unsigned char dataLengthLE[4];
+ qToLittleEndian<quint32>(quint32(dataLength), dataLengthLE);
+ result = (device.write(reinterpret_cast<const char *>(dataLengthLE), 4) == 4);
+ }
+ return result;
+}
+
+#include <QFile>
+#include <QTextStream>
+
+qint64 WavFile::readData(QIODevice &device, QByteArray &buffer,
+ QAudioFormat outputFormat)
+{
+ if (QAudioFormat() == outputFormat)
+ outputFormat = m_format;
+
+ qint64 result = 0;
+
+ QFile file("wav.txt");
+ file.open(QIODevice::WriteOnly | QIODevice::Text);
+ QTextStream stream;
+ stream.setDevice(&file);
+
+ if (isPCMS16LE(outputFormat) && isPCMS16LE(m_format)) {
+ QVector<char> inputSample(2 * m_format.channels());
+
+ qint16 *output = reinterpret_cast<qint16*>(buffer.data());
+
+ while (result < buffer.size()) {
+ if (device.read(inputSample.data(), inputSample.count())) {
+ int inputIdx = 0;
+ for (int outputIdx = 0; outputIdx < outputFormat.channels(); ++outputIdx) {
+ const qint16* input = reinterpret_cast<const qint16*>(inputSample.data() + 2 * inputIdx);
+ *output++ = qFromLittleEndian<qint16>(*input);
+ result += 2;
+ if (inputIdx < m_format.channels())
+ ++inputIdx;
+ }
+ } else {
+ break;
+ }
+ }
+ }
+ return result;
+}
+
diff --git a/demos/spectrum/app/wavfile.h b/demos/spectrum/app/wavfile.h
new file mode 100644
index 0000000..05866f7
--- /dev/null
+++ b/demos/spectrum/app/wavfile.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** 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 WAVFILE_H
+#define WAVFILE_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qfile.h>
+#include <QtMultimedia/qaudioformat.h>
+
+/**
+ * Helper class for reading WAV files
+ *
+ * See https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
+ */
+class WavFile
+{
+public:
+ WavFile(const QAudioFormat &format = QAudioFormat(),
+ qint64 dataLength = 0);
+
+ // Reads WAV header and seeks to start of data
+ bool readHeader(QIODevice &device);
+
+ // Writes WAV header
+ bool writeHeader(QIODevice &device);
+
+ // Read PCM data
+ qint64 readData(QIODevice &device, QByteArray &buffer,
+ QAudioFormat outputFormat = QAudioFormat());
+
+ const QAudioFormat& format() const;
+ qint64 dataLength() const;
+
+ static qint64 headerLength();
+
+ static bool writeDataLength(QIODevice &device, qint64 dataLength);
+
+private:
+ QAudioFormat m_format;
+ qint64 m_dataLength;
+};
+
+#endif
+
diff --git a/demos/spectrum/spectrum.pri b/demos/spectrum/spectrum.pri
new file mode 100644
index 0000000..c09aa0d
--- /dev/null
+++ b/demos/spectrum/spectrum.pri
@@ -0,0 +1,37 @@
+# The following macros allow certain features and debugging output
+# to be disabled / enabled at compile time.
+
+# Debug output from spectrum calculation
+DEFINES += LOG_SPECTRUMANALYSER
+
+# Debug output from waveform generation
+#DEFINES += LOG_WAVEFORM
+
+# Debug output from engine
+DEFINES += LOG_ENGINE
+
+# Dump input data to spectrum analyer, plus artefact data files
+#DEFINES += DUMP_SPECTRUMANALYSER
+
+# Dump captured audio data
+#DEFINES += DUMP_CAPTURED_AUDIO
+
+# Disable calculation of level
+#DEFINES += DISABLE_LEVEL
+
+# Disable calculation of frequency spectrum
+# If this macro is defined, the FFTReal DLL will not be built
+#DEFINES += DISABLE_FFT
+
+# Disables rendering of the waveform
+#DEFINES += DISABLE_WAVEFORM
+
+# If defined, superimpose the progress bar on the waveform
+DEFINES += SUPERIMPOSE_PROGRESS_ON_WAVEFORM
+
+# Perform spectrum analysis calculation in a separate thread
+DEFINES += SPECTRUM_ANALYSER_SEPARATE_THREAD
+
+# Suppress warnings about strncpy potentially being unsafe, emitted by MSVC
+win32: DEFINES += _CRT_SECURE_NO_WARNINGS
+
diff --git a/demos/spectrum/spectrum.pro b/demos/spectrum/spectrum.pro
new file mode 100644
index 0000000..04bbdee
--- /dev/null
+++ b/demos/spectrum/spectrum.pro
@@ -0,0 +1,37 @@
+load(data_caging_paths)
+include(spectrum.pri)
+
+TEMPLATE = subdirs
+
+# Ensure that library is built before application
+CONFIG += ordered
+
+!contains(DEFINES, DISABLE_FFT) {
+ SUBDIRS += 3rdparty/fftreal
+}
+
+SUBDIRS += app
+
+TARGET = spectrum
+
+symbian {
+ # Create a 'make sis' rule which can be run from the top-level
+
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+
+ # UID for the SIS file
+ TARGET.UID3 = 0xA000E3FA
+
+ bin.sources = spectrum.exe
+ !contains(DEFINES, DISABLE_FFT) {
+ bin.sources += fftreal.dll
+ }
+ bin.path = /sys/bin
+ rsc.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/spectrum.rsc
+ rsc.path = $$APP_RESOURCE_DIR
+ mif.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/spectrum.mif
+ mif.path = $$APP_RESOURCE_DIR
+ reg_rsc.sources = $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/spectrum_reg.rsc
+ reg_rsc.path = $$REG_RESOURCE_IMPORT_DIR
+ DEPLOYMENT += bin rsc mif reg_rsc
+}
diff --git a/dist/changes-4.7.0 b/dist/changes-4.7.0
index 4fd7fdb..a57575e 100644
--- a/dist/changes-4.7.0
+++ b/dist/changes-4.7.0
@@ -27,6 +27,12 @@ General Improvements
- Support for the GL_EXT_geometry_shader4, aka Geometry Shaders, was added
to QGLShaderProgram.
+New features
+------------
+
+ - QNetworkSession, QNetworkConfiguration, QNetworkConfigurationManager
+ * New bearer management classes added.
+
Third party components
----------------------
@@ -44,6 +50,17 @@ Third party components
QtCore
------
+ - QMetaType
+ * Significantly improved performance of the type() function
+ - QState
+ * [QTBUG-7741] Added a function to get the out-going transitions
+ - QStateMachine
+ * [QTBUG-8842] Reset history states when (re)starting machine
+ - QXmlStreamReader
+ * [QTBUG-9196] fixed crash when parsing
+ - QTimer
+ * singleShot with 0 timeout will now avoid allocating objects
+
QtGui
-----
@@ -51,15 +68,147 @@ QtGui
* Fixed a bug that would cause keyboard searches not to behave
properly when used within 400 milliseconds of midnight.
+ - QComboBox
+ * [QTBUG-8796] Made ForegroundRole work for all styles.
+
- QPrinter
* Obsoleted the slightly confusing setNumCopies() and numCopies()
functions, and replaced them with setCopyCount(), copyCount() and
supportsMultipleCopies().
+ - QPrintDialog/QPrinter
+ * Added support for printing the current page.
+
- QCommonStyle
* Fixed a bug that led to missing text pixels in QTabBar when using
small font sizes. (QTBUG-7137)
+ - QGraphicsEffect
+ * Fixed rendering bugs when scrolling graphics items with drop
+ shadows.
+
+ - QGraphicsItem
+ * [QTBUG-8112] itemChange() is now called when transformation
+ properties change (setRotation, setScale, setTransformOriginPoint).
+
+ - QGraphicsTextItem
+ * [QTBUG-7333] Fixed keyboard shortcuts not being triggered when the
+ the item has focus and something else has the same shortcut sequence.
+
+ - QGraphicsView
+ * [QTBUG-7438] Fixed viewport cursor getting reset when releasing
+ the mouse.
+
+ - QImage
+ * [QTBUG-9640] Prevented unneccessary copy in QImage::setAlphaChannel().
+ * [QTBUG-7982] Added QImage::bitPlaneCount().
+
+ - QPicture
+ * [QTBUG-4974] Printing QPictures containing text to a high resolution
+ QPrinter would in many cases cause incorrect character spacing.
+
+ - QPainter
+ * Added QPainter::drawPixmapFragments(), which makes it possible to draw
+ pixmaps, or sub-rectangles of pixmaps, at various positions with
+ different scale, opacity and rotation.
+ * [QTBUG-10018] Fixed image drawing inconsistencies when drawing
+ 1x1 source rects with rotating / shear / perspective transforms.
+ * Optimized various blending and rendering operations for ARM
+ processors with a NEON vector unit.
+ * Fixed some performance issues when drawing sub-pixmaps of large
+ pixmaps and falling back to raster in the X11 paint engine.
+
+ - QPainterPath
+ * [QTBUG-3778] Fixed bug in painter path polygon intersection code.
+ * [QTBUG-7396] Optimized painter path intersections for when at
+ least one of the paths is a rectangle by special casing.
+ * [QTBUG-8035] Got rid of bezier intersection code in the boolean
+ operators (intersect, subtract, unite) to prevent numerical
+ stability issues.
+
+ - QPixmap
+ * [QTBUG-4149] Fixed QPixmap::grabWidget() on widgets that have not yet
+ been shown.
+
+ - QPlastiqueStyle
+ * [QTBUG-6516] Respect AlternateBase role for list views.
+
+ - QRegion
+ * [QTBUG-7699] Fixed crash caused by large x-coordinates.
+
+ - QSplitter
+ * [QTBUG-9335] Improve support for 1-pixel splitters by using a
+ larger drag area.
+
+ - QTransform
+ * [QTBUG-8557] Fixed bug in QTransform::type() potentially occuring
+ after using operator/ or operator* or their overloads.
+
+QtNetwork
+---------
+ - QHostInfo: Added a small 60 second DNS cache
+ - QNetworkAccessManager
+ * Performance improvements for file:// and http://
+ * Crash fixes
+ * Improvements on HTTP pipelining
+ * Fix problem with canReadLine()
+ * Fix problem with HTTP 100 reply
+ * Some new attributes for QNetworkRequest
+ * [QTBUG-8206] add method to send custom requests
+ * [QTBUG-9618] [MR 2372] send secure cookies only over secure connections
+ * [QTBUG-7713] Fix bug related to re-sending request
+ * [QTBUG-7673] Fix issue with some webservers
+ - Sockets
+ * Better support for derived QTcpServer
+ * [QTBUG-7054] Fix error handling with waitFor*() for socket engine
+ * [QTBUG-7316, QTBUG-7317] Also handle unknown errors from socket engine
+ - SSL
+ * [QTBUG-2515] Do not make OpenSSL prompt for a password
+ * [QTBUG-6504, QTBUG-8924, QTBUG-5645] Fix memleak
+
+QtOpenGL
+--------
+ - QGLWidget
+ * [QTBUG-7865] Fixed bug where GL widgets were not fully updated on
+ Windows Vista/7 with Aero disabled.
+
+QtScript
+--------
+ - Updated src/3rdparty/javascriptcore to a more recent version
+ - Significantly improved performance of the Qt/C++<-->JavaScript bridge
+ - QScriptValueIterator: Significantly improved performance
+ - [QTBUG-3637] Added a wrap option for excluding slots from a QObject binding
+ - [QTBUG-6238] Added a function for reporting additional memory cost
+ - [QTBUG-6908] Significantly improved performance of qsTr()
+
+QtSvg
+-----
+ - QSvgRenderer
+ * [QTBUG-8264] Fixed rounded rectangles when 'rx' or 'ry' is zero.
+ * [QTBUG-10022] Fixed assert failure when loading an invalid SVG.
+
+QtXmlPatterns
+-------------
+
+ - [QTBUG-8920] fixed crash with anonymous types in XsdSchemaChecker
+ - [QTBUG-8394] include/import/redefine schemas only once
+ - QXmlSchema: fix crash with referencing elements
+
+Qt Plugins
+----------
+
+ - Jpeg image IO plugin
+ * Fixed failure to store certain QImage formats as jpeg (QTBUG-7780)
+ * Optimized smoothscaling
+ * Optimized to avoid data copy when reading from memory device (QTBUG-9095)
+
+ - SVG image IO plugin
+ * Added support for svgz format (QTBUG-8227)
+ * Fixed canRead() so that it can be used also for non-sequential
+ devices. (QTBUG-9053)
+ * Added support for clipping and scaling and backgroundcolor
+ * Optimized to avoid data copy when reading from memory device (QTBUG-9095)
+
****************************************************************************
* Database Drivers *
****************************************************************************
@@ -71,10 +220,13 @@ QtGui
Qt for Linux/X11
----------------
-
+ - QGtkStyle
+ * Fixed rtl issues with sliders (QTBUG-8986)
+ * Fixed missing pressed appearance on scroll bar handles. (QTBUG-10396)
Qt for Windows
--------------
+ - Popup windows now implicitly activate when shown. (QTBUG-7386)
- QLocalSocket
* Pipe handle leak fixed, when closing a QLocalSocket that still has
@@ -86,11 +238,15 @@ Qt for Windows
Qt for Mac OS X
---------------
-
+ - QMacStyle
+ * Removed frame around statusbar items. (QTBUG-3574)
+ * More native appearance of item view headers and frames. (QTBUG-10047)
Qt for Embedded Linux
---------------------
+ * Add support for WA_TranslucentBackground (QTBUG-5739)
+ * Add support for QFont::NoAntialias (QTBUG-5936)
Qt for Windows CE
-----------------
@@ -125,7 +281,16 @@ Qt for Windows CE
- Designer
-
+ - [QTBUG-9351] Fixed a bug that caused modified headerview-properties
+ of item views to be duplicated in the UI-file.
+ - [QTBUG-8347] Fixed a layout problem caused by embedded images in the rich
+ text of a QLabel.
+ - [QTBUG-8041], [QTBUG-8213] Fixed a crash related to undo while moving
+ widgets by arrow keys.
+ - [QTBUG-7822] Added support for the 'windowOpacity'-property.
+ - [QTBUG-7764] Fixed the emission of the propertyChanged()-signal of
+ QDesignerPropertyEditorInterface.
+ - [QTBUG-5492] Made widgetbox-filter match on class names, too.
- Linguist
- Linguist GUI
@@ -143,9 +308,10 @@ Qt for Windows CE
- uic
-
- uic3
+ - [QTBUG-9207] Fixed export of image files of type XPM, added
+ compatibility option -limit-xpm-linelength.
- qmake
@@ -168,3 +334,10 @@ Qt for Windows CE
* Important Behavior Changes *
****************************************************************************
+QtScript: Changes due to updating src/3rdparty/javascriptcore:
+ - It is no longer possible to delete an undeletable property from C++
+ using QScriptValue::setProperty().
+ - The QScriptEngineAgent::positionChange() callback will always report
+ a column number of 1.
+ - QScriptValueIterator will include the "length" property when iterating
+ over Array objects.
diff --git a/doc/doc.pri b/doc/doc.pri
index 3d04049..3180a61 100644
--- a/doc/doc.pri
+++ b/doc/doc.pri
@@ -55,11 +55,11 @@ docs_zh_CN.commands = $$QT_ZH_CN_DOCUMENTATION
# Install rules
htmldocs.files = $$QT_BUILD_TREE/doc/html
htmldocs.path = $$[QT_INSTALL_DOCS]
-htmldocs.CONFIG += no_check_exist
+htmldocs.CONFIG += no_check_exist directory
qchdocs.files= $$QT_BUILD_TREE/doc/qch
qchdocs.path = $$[QT_INSTALL_DOCS]
-qchdocs.CONFIG += no_check_exist
+qchdocs.CONFIG += no_check_exist directory
docimages.files = $$QT_BUILD_TREE/doc/src/images
docimages.path = $$[QT_INSTALL_DOCS]/src
diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc
index 1552f56..594c1fe 100644
--- a/doc/src/classes.qdoc
+++ b/doc/src/classes.qdoc
@@ -59,7 +59,7 @@
/*!
\page classes.html
- \title All Qt Classes
+ \title All Classes
\ingroup classlists
\brief If you know the name of the class you want, find it here.
@@ -71,7 +71,7 @@
\generatelist classes
- \sa {Qt3 Support Classes}, {All Qt Modules}, {Obsolete Classes}
+ \sa {Qt3 Support Classes}, {All Modules}, {Obsolete Classes}
*/
/*!
@@ -162,7 +162,7 @@
/*!
\page namespaces.html
- \title All Qt Namespaces
+ \title All Namespaces
\ingroup classlists
\brief A Qt namespace contains enum types, functions, and sometimes classes.
diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc
index 2d05850..47504ae 100644
--- a/doc/src/declarative/advtutorial.qdoc
+++ b/doc/src/declarative/advtutorial.qdoc
@@ -105,16 +105,20 @@ is the \l SystemPalette item. This provides access to the Qt system palette
and is used to give the button a more native look-and-feel.
Notice the anchors for the \c Item, \c Button and \c Text elements are set using
-\l {codingconventions.html#Grouped-properties}{group notation} for readability.
+\l {qdeclarativeintroduction.html#dot-properties}{group notation} for readability.
\section2 Adding \c Button and \c Block components
-The \c Button item in the code above is defined in a separate file named \c Button.qml.
+The \c Button item in the code above is defined in a separate component file named \c Button.qml.
To create a functional button, we use the QML elements \l Text and \l MouseArea inside a \l Rectangle.
Here is the \c Button.qml code:
\snippet declarative/tutorials/samegame/samegame1/Button.qml 0
+This essentially defines a rectangle that contains text and can be clicked. The \l MouseArea
+has an \c onClicked() handler that is implemented to emit the \c clicked() signal of the
+\c container when the area is clicked.
+
In Same Game, the screen is filled with small blocks when the game begins.
Each block is just an item that contains an image. The block
code is defined in a separate \c Block.qml file:
@@ -174,7 +178,7 @@ The \c createBlock() function creates a block from the \c Block.qml file
and moves the new block to its position on the game canvas. This involves several steps:
\list
-\o \l {createComponent(url file)}{createComponent()} is called to generate an element from \c Block.qml.
+\o \l {Qt.createComponent(url file)}{Qt.createComponent()} is called to generate an element from \c Block.qml.
If the component is ready, we can call \c createObject() to create an instance of the \c Block item.
\o If \c createObject() returned null (i.e. if there was an error while
loading the object), print the error information.
@@ -226,14 +230,14 @@ until it is won or lost.
To do this, we have added the following functions to \c samegame.js:
\list
-\o function \c{handleClick(x,y)}
-\o function \c{floodFill(xIdx,yIdx,type)}
-\o function \c{shuffleDown()}
-\o function \c{victoryCheck()}
-\o function \c{floodMoveCheck(xIdx, yIdx, type)}
+\o \c{handleClick(x,y)}
+\o \c{floodFill(xIdx,yIdx,type)}
+\o \c{shuffleDown()}
+\o \c{victoryCheck()}
+\o \c{floodMoveCheck(xIdx, yIdx, type)}
\endlist
-As this is a tutorial about QML, not game design, we will only discuss \c handleClick() and \c victoryCheck() below since they interface directly with the QML elements. Note that although the game logic here is written in JavaScript, it could have been written in C++ and then exposed to JavaScript.
+As this is a tutorial about QML, not game design, we will only discuss \c handleClick() and \c victoryCheck() below since they interface directly with the QML elements. Note that although the game logic here is written in JavaScript, it could have been written in C++ and then exposed to QML.
\section3 Enabling mouse click interaction
@@ -269,6 +273,8 @@ And this is how it is used in the main \c samegame.qml file:
\snippet declarative/tutorials/samegame/samegame3/samegame.qml 2
+We give the dialog a \l {Item::z}{z} value of 100 to ensure it is displayed on top of our other components. The default \c z value for an item is 0.
+
\section3 A dash of color
@@ -383,15 +389,41 @@ The theme change here is produced simply by replacing the block images. This can
Another feature we might want to add to the game is a method of storing and retrieving high scores.
-In \c samegame.qml we now pop up a dialog when the game is over and requests the player's name so it can be added to a High Scores table. The dialog is created using \c Dialog.qml:
+To do this, we will show a dialog when the game is over to request the player's name and add it to a High Scores table.
+This requires a few changes to \c Dialog.qml. In addition to a \c Text element, it now has a
+\c TextInput child item for receiving keyboard text input:
+
+\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 0
+\dots 4
+\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 2
+\dots 4
+\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 3
+
+We'll also add a \c showWithInput() function. The text input will only be visible if this function
+is called instead of \c show(). When the dialog is closed, it emits a \c closed() signal, and
+other elements can retrieve the text entered by the user through an \c inputText property:
+
+\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 0
+\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 1
+\dots 4
+\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 3
+
+Now the dialog can be used in \c samegame.qml:
\snippet declarative/tutorials/samegame/samegame4/samegame.qml 0
-When the dialog is closed, we call the new \c saveHighScore() function in \c samegame.js, which stores the high score locally in an SQL database and also send the score to an online database if possible.
+When the dialog emits the \c closed signal, we call the new \c saveHighScore() function in \c samegame.js, which stores the high score locally in an SQL database and also send the score to an online database if possible.
+The \c nameInputDialog is activated in the \c victoryCheck() function in \c samegame.js:
+
+\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 3
+\dots 4
+\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 4
\section3 Storing high scores offline
+Now we need to implement the functionality to actually save the High Scores table.
+
Here is the \c saveHighScore() function in \c samegame.js:
\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 2
@@ -436,6 +468,6 @@ By following this tutorial you've seen how you can write a fully functional appl
\endlist
There is so much more to learn about QML that we haven't been able to cover in this tutorial. Check out all the
-demos and examples and the \l {Declarative UI (QML)}{documentation} to find out all the things you can do with QML!
+demos and examples and the \l {Declarative UI Using QML}{documentation} to find out all the things you can do with QML!
*/
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index 88aca1b..6e98949 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -73,9 +73,9 @@ Rectangle {
y: 0
SequentialAnimation on y {
loops: Animation.Infinite
- NumberAnimation { to: 200-img.height; easing.type: "OutBounce"; duration: 2000 }
+ NumberAnimation { to: 200-img.height; easing.type: Easing.OutBounce; duration: 2000 }
PauseAnimation { duration: 1000 }
- NumberAnimation { to: 0; easing.type: "OutQuad"; duration: 1000 }
+ NumberAnimation { to: 0; easing.type: Easing.OutQuad; duration: 1000 }
}
}
}
@@ -136,7 +136,7 @@ transitions: [
Transition {
NumberAnimation {
properties: "x,y"
- easing.type: "OutBounce"
+ easing.type: Easing.OutBounce
duration: 200
}
}
@@ -157,7 +157,7 @@ Transition {
SequentialAnimation {
NumberAnimation {
duration: 1000
- easing.type: "OutBounce"
+ easing.type: Easing.OutBounce
// animate myItem's x and y if they have changed in the state
target: myItem
properties: "x,y"
@@ -199,7 +199,7 @@ Transition {
ParallelAnimation {
NumberAnimation {
duration: 1000
- easing.type: "OutBounce"
+ easing.type: Easing.OutBounce
targets: box1
properties: "x,y"
}
@@ -227,7 +227,7 @@ Rectangle {
id: redRect
color: "red"
width: 100; height: 100
- Behavior on x { NumberAnimation { duration: 300; easing.type: "InOutQuad" } }
+ Behavior on x { NumberAnimation { duration: 300; easing.type: Easing.InOutQuad } }
}
\endqml
diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc
index 6901947..8db1c35 100644
--- a/doc/src/declarative/basictypes.qdoc
+++ b/doc/src/declarative/basictypes.qdoc
@@ -43,9 +43,12 @@
\page qdeclarativebasictypes.html
\title QML Basic Types
- QML uses a set of property types, which are primitive within QML.
- These basic types are referenced throughout the documentation of the
- QML elements. Almost all of them are exactly what you would expect.
+ QML has a set of primitive types, as listed below, that are used throughout
+ the \l {QML Elements}.
+
+ The simpler types in this list can also be used for defining a new
+ \c property in a component. See \l{Extending types from QML} for the
+ list of types that can be used for custom properties.
\annotatedlist qmlbasictypes
*/
diff --git a/doc/src/declarative/codingconventions.qdoc b/doc/src/declarative/codingconventions.qdoc
index 7ca206b..4fa7d0c 100644
--- a/doc/src/declarative/codingconventions.qdoc
+++ b/doc/src/declarative/codingconventions.qdoc
@@ -57,7 +57,7 @@ Through our documentation and examples, QML objects are always structured in the
\o id
\o property declarations
\o signal declarations
-\o javascript functions
+\o JavaScript functions
\o object properties
\o child objects
\o states
@@ -72,7 +72,6 @@ For example, a hypothetical \e photo QML object would look like this:
\snippet doc/src/snippets/declarative/codingconventions/photo.qml 0
-\target Grouped properties
\section1 Grouped properties
If using multiple properties from a group of properties,
@@ -102,7 +101,7 @@ we will write this:
\snippet doc/src/snippets/declarative/codingconventions/lists.qml 1
-\section1 Javascript code
+\section1 JavaScript code
If the script is a single expression, we recommend writing it inline:
@@ -116,7 +115,7 @@ If the script is more than a couple of lines long or can be used by different ob
\snippet doc/src/snippets/declarative/codingconventions/javascript.qml 2
-For long scripts, we will put the functions in their own javascript file and import it like this:
+For long scripts, we will put the functions in their own JavaScript file and import it like this:
\snippet doc/src/snippets/declarative/codingconventions/javascript-imports.qml 0
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index d79c4d2..5283ba8 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -40,46 +40,42 @@
****************************************************************************/
/*!
-\title Declarative UI Using QML
+\title Qt Quick
\page declarativeui.html
-\brief The Qt Declarative module provides a declarative framework for building
-highly dynamic, custom user interfaces.
+\brief Qt Quick provides a declarative framework for building highly
+dynamic, custom user interfaces.
-\section1 \l{QML Elements}{Fast QML Elements Reference Page}
+Qt Quick provides a declarative framework for building highly dynamic,
+custom user interfaces from a rich set of \l {QML Elements}{QML elements}.
+Qt Quick helps programmers and designers collaborate to
+build the fluid user interfaces that are becoming common in portable
+consumer devices, such as mobile phones, media players, set-top boxes
+and netbooks.
-\raw HTML
-<br>
-\endraw
+QML is an extension to \l
+{http://www.ecma-international.org/publications/standards/Ecma-262.htm}
+{JavaScript}, that provides a mechanism to declaratively build an
+object tree of \l {QML Elements}{QML elements}. 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.
-\section1 Preamble
+The \l {QML Elements}{QML elements} are a sophisticated set of
+graphical and behavioral building blocks. These different elements
+are combined together in \l {QML Documents}{QML documents} to build
+components ranging in complexity from simple buttons and sliders, to
+complete internet-enabled applications like a \l
+{http://www.flickr.com}{Flickr} photo browser.
-Qt Declarative UI provides a declarative framework for building highly dynamic, custom
-user interfaces. Declarative UI helps programmers and designers collaborate to build
-the animation rich, fluid user interfaces that are becoming common in portable
-consumer devices, such as mobile phones, media players, set-top boxes and netbooks.
+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++}.
-The Qt Declarative module provides an engine for interpreting the declarative
-QML language, and a rich set of \bold { \l {QML Elements}{QML elements} }
-that can be used from QML.
+\section1 Getting Started
-QML is an extension to \l {http://www.ecma-international.org/publications/standards/Ecma-262.htm}
-{JavaScript}, that provides a mechanism to declaratively build an object tree
-of QML elements. 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 QML elements are a sophisticated set of graphical and behavioral building
-blocks. These different elements are combined together in \l {QML Documents}{QML documents} to build components
-ranging in complexity from simple buttons and sliders, to complete
-internet-enabled applications like a \l {http://www.flickr.com}{Flickr} photo browser.
-
-Qt Declarative 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++}.
-
-\section1 Getting Started:
\list
\o \l {Introduction to the QML language}
\o \l {QML Tutorial}{Tutorial: 'Hello World'}
@@ -88,7 +84,7 @@ completely new applications. QML is fully \l {Extending QML in C++}{extensible
\o \l {QML for Qt programmers}
\endlist
-\section1 Core QML Features:
+\section1 Core QML Features
\list
\o \l {QML Documents}
\o \l {Property Binding}
@@ -106,7 +102,7 @@ completely new applications. QML is fully \l {Extending QML in C++}{extensible
\o \l {qmlruntime.html}{The Qt Declarative Runtime}
\endlist
-\section1 Using QML with C++:
+\section1 Using QML with C++
\list
\o \l {Tutorial: Writing QML extensions with C++}
\o \l {Extending QML in C++}
@@ -114,7 +110,7 @@ completely new applications. QML is fully \l {Extending QML in C++}{extensible
\o \l {Integrating QML with existing Qt UI code}
\endlist
-\section1 Reference:
+\section1 Reference
\list
\o \l {QML Elements}
\o \l {QML Global Object}
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc
index 4cb5198..2688ee5 100644
--- a/doc/src/declarative/dynamicobjects.qdoc
+++ b/doc/src/declarative/dynamicobjects.qdoc
@@ -43,84 +43,68 @@
\page qdeclarativedynamicobjects.html
\title Dynamic Object Management
-QML has some support for dynamically loading and managing QML objects from
-within Javascript blocks. It is preferable to use the existing QML elements for
-dynamic object management wherever possible; these are \l{Loader},
-\l{Repeater}, \l{ListView}, \l{GridView} and \l{PathView}. It is also possible
-to dynamically create and manage objects from C++, and this is preferable for
-hybrid QML/C++ applications - see \l{Using QML in C++ Applications}.
-Dynamically creating and managing objects from
-within Javascript blocks is intended for when none of the existing QML elements
-fit the needs of your application, and you do not desire for your application
-to involve C++ code.
+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
+from C++, and this is the preferred method for hybrid QML/C++ applications
+(see \l{Using QML 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
+application, and there are no C++ components involved.
+
\section1 Creating Objects Dynamically
-There are two ways of creating objects dynamically. You can either create
-a component which instantiates items, or create an item from a string of QML.
-Creating a component is better for the situation where you have a predefined
-item which you want to manage dynamic instances of, and creating an item from
-a string of QML is intended for when the QML itself is generated at runtime.
+There are two ways to create objects dynamically from JavaScript. You can either call
+\l {Qt.createComponent(url file)}{Qt.createComponent()} to create
+a component which instantiates items, or use \l{Qt.createQmlObject(string qml, object parent, string filepath)}{Qt.createQmlObject()}
+to create an item from a string of QML.
+Creating a component is better if you have a predefined
+item, and you want to create dynamic instances of that item; creating an item from
+a string of QML is useful when the item QML itself is generated at runtime.
If you have a component specified in a QML file, you can dynamically load it with
-the \l {createComponent(url file)}{createComponent()} function on the \l{QML Global Object}.
+the \l {Qt.createComponent(url file)}{Qt.createComponent()} function on the \l{QML Global Object}.
This function takes the URL of the QML file as its only argument and returns
a component object which can be used to create and load that QML file.
-Once you have a component you can use its \c createObject() method to create an instance of
-the component. Example QML script is below. Remember that QML files that might be loaded
- over the network cannot be expected to be ready immediately.
- \code
- var component;
- var sprite;
- function finishCreation() {
- if(component.isReady()) {
- sprite = component.createObject();
- if(sprite == 0) {
- // Error Handling
- } else {
- sprite.parent = page;
- sprite.x = 200;
- //...
- }
- } else if(component.isError()) {
- // Error Handling
- }
- }
-
- component = createComponent("Sprite.qml");
- if(component.isReady()) {
- finishCreation();
- } else {
- component.statusChanged.connect(finishCreation);
- }
- \endcode
-
- If you are certain the files will be local, you could simplify to
-
- \code
- component = createComponent("Sprite.qml");
- sprite = component.createObject();
- if(sprite == 0) {
- // Error Handling
- console.log(component.errorsString());
- } else {
- sprite.parent = page;
- sprite.x = 200;
- //...
- }
- \endcode
-
-After creating the item, remember to set its parent to an item within the scene.
-Otherwise your dynamically created item will not appear in the scene. When using files with relative paths, the path should
-be relative to the file where \c createComponent() is executed.
-
-If the QML does not exist until runtime, you can create a QML item from
-a string of QML using the \l{createQmlObject(string qml, object parent, string filepath)}{createQmlObject()} function, as in the following example:
-
- \code
- newObject = createQmlObject('import Qt 4.7; Rectangle { color: "red"; width: 20; height: 20 }',
- targetItem, "dynamicSnippet1");
- \endcode
+Once you have a component you can use its \l {Component::createObject()}{createObject()} method to create an instance of
+the component. This function takes exactly one argument, which is the parent for the new item. Since graphical items will
+not appear on the scene without a parent, it is recommended that you set the parent this way. However, if you wish to set
+the parent later you can safely pass null to this function.
+
+Here is an example. Here is a \c Sprite.qml, which defines a simple QML component:
+
+\quotefile doc/src/snippets/declarative/Sprite.qml
+
+Our main application file, \c main.qml, imports a \c componentCreation.js JavaScript file
+that will create \c Sprite objects:
+
+\quotefile doc/src/snippets/declarative/createComponent.qml
+
+Here is \c componentCreation.js. Remember that QML files that might be loaded
+over the network cannot be expected to be ready immediately:
+
+\snippet doc/src/snippets/declarative/componentCreation.js 0
+\codeline
+\snippet doc/src/snippets/declarative/componentCreation.js 1
+
+If you are certain the files will be local, you could simplify to:
+
+\snippet doc/src/snippets/declarative/componentCreation.js 2
+
+Notice that once a \c Sprite object is created, its parent is set to \c appWindow (defined
+in \c main.qml). After creating an item, you must set its parent to an item within the scene.
+Otherwise your dynamically created item will not appear in the scene.
+
+When using files with relative paths, the path should
+be relative to the file where \l {Qt.createComponent(url file)}{Qt.createComponent()} is executed.
+
+If the QML component does not exist until runtime, you can create a QML item from
+a string of QML using the \l{Qt.createQmlObject(string qml, object parent, string filepath)}{Qt.createQmlObject()} function, as in the following example:
+
+\snippet doc/src/snippets/declarative/createQmlObject.qml 0
+
The first argument is the string of QML to create. Just like in a new file, you will need to
import any types you wish to use. For importing files with relative paths, the path should
be relative to the file where the item in the second argument is defined. Remember to set the parent after
@@ -130,47 +114,44 @@ item, which is used for error reporting.
\section1 Maintaining Dynamically Created Objects
-Dynamically created objects may be used the same as other objects, however they
-will not have an id in QML.
+When managing dynamically created items, you must ensure the creation context
+outlives the created item. Otherwise, if the creation context is destroyed first,
+the bindings in the dynamic item will no longer work.
+
+The actual creation context depends on how an item is created:
+
+\list
+\o If \l {Qt.createComponent(url file)}{Qt.createComponent()} is used, the creation context
+ is the QDeclarativeContext in which this method is called
+\o If \l{Qt.createQmlObject(string qml, object parent, string filepath)}{Qt.createQmlObject()}
+ if called, it is the context of the item used as the second argument to this method
+\o If a \c {Component{}} item is defined and \l {Component::createObject()}{createObject()}
+ is called on that item, it is the context in which the \c Component is defined
+\endlist
+
+Also, note that while dynamically created objects may be used the same as other objects, they
+do not have an id in QML.
-A restriction which you need to manage with dynamically created items,
-is that the creation context must outlive the
-created item. The creation context is the QDeclarativeContext in which \c createComponent()
-was called, or the context in which the Component element, or the item used as the
-second argument to \c createQmlObject(), was specified. If the creation
-context is destroyed before the dynamic item is, then bindings in the dynamic item will
-fail to work.
\section1 Deleting Objects Dynamically
-You should generally avoid dynamically deleting objects that you did not
-dynamically create. In many UIs, it is sufficient to set the opacity to 0 or
-to move the item off of the edge of the screen. If you have lots of dynamically
-created items however, deleting them when they are no longer used will provide
-a worthwhile performance benefit. Note that you should never manually delete
-items which were dynamically created by QML Elements such as \l{Loader}.
-
-To manually delete a QML item, call its destroy method. This method has one
-argument, which is an approximate delay in ms and which defaults to zero. This
-allows you to wait until the completion of an animation or transition. An example:
-
-\code
- Component {
- id: fadesOut
- Rectangle{
- id: rect
- width: 40; height: 40;
- NumberAnimation on opacity { from:1; to:0; duration: 1000 }
- Component.onCompleted: rect.destroy(1000);
- }
- }
- function createFadesOut(parentItem)
- {
- var object = fadesOut.createObject();
- object.parent = parentItem;
- }
-\endcode
-In the above example, the dynamically created rectangle calls destroy as soon as it's created,
- but delays long enough for its fade out animation to play.
+In many user interfaces, it is sufficient to set an item's opacity to 0 or
+to move the item off the screen instead of deleting the item. If you have
+lots of dynamically created items, however, you may receive a worthwhile
+performance benefit if unused items are deleted.
+
+Note that you should never manually delete items that were dynamically created
+by QML elements (such as \l Loader). Also, you should generally avoid deleting
+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. This allows you to wait until the completion of
+an animation or transition. An example:
+
+\snippet doc/src/snippets/declarative/dynamicObjects.qml 0
+
+Here, \c Rectangle objects are destroyed one second after they are created, which is long
+enough for the \c NumberAnimation to be played before the object is destroyed.
*/
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index 79fe909..574a187 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -120,11 +120,22 @@ The following table lists the QML elements provided by the \l {QtDeclarative}{Qt
\list
\o \l Item
\o \l Rectangle
+ \list
+ \o \l Gradient
+ \list
+ \o \l GradientStop
+ \endlist
+ \endlist
\o \l Image
\o \l BorderImage
\o \l AnimatedImage
\o \l Text
\o \l TextInput
+ \list
+ \o \l IntValidator
+ \o \l DoubleValidator
+ \o \l RegExpValidator
+ \endlist
\o \l TextEdit
\endlist
@@ -142,6 +153,7 @@ The following table lists the QML elements provided by the \l {QtDeclarative}{Qt
\o \l Loader
\o \l Repeater
\o \l SystemPalette
+\o \l FontLoader
\o \l LayoutItem
\endlist
diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc
index c14208e..27b7f38 100644
--- a/doc/src/declarative/example-slideswitch.qdoc
+++ b/doc/src/declarative/example-slideswitch.qdoc
@@ -45,7 +45,7 @@
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/slideswitch directory.
+The code for this example can be found in the \c $QTDIR/examples/declarative/ui-components/slideswitch directory.
\section1 Overview
@@ -61,12 +61,12 @@ The elements that composed the switch are:
\endlist
\section1 Switch.qml
-\snippet examples/declarative/slideswitch/content/Switch.qml 0
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 0
\section1 Walkthrough
\section2 Interface
-\snippet examples/declarative/slideswitch/content/Switch.qml 1
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 1
This property is the interface of the switch. By default, the switch is off and this property is \c false.
It can be used to activate/disactivate the switch or to query its current state.
@@ -81,14 +81,14 @@ Text { text: "The switch is on"; visible: mySwitch.on == true }
the text will only be visible when the switch is on.
\section2 Images and user interaction
-\snippet examples/declarative/slideswitch/content/Switch.qml 4
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 4
First, we create the background image of the switch.
In order for the switch to toggle when the user clicks on the background, we add a \l{MouseArea} as a child item of the image.
A \c MouseArea has a \c onClicked property that is triggered when the item is clicked. For the moment we will just call a
\c toggle() function. We will see what this function does in a moment.
-\snippet examples/declarative/slideswitch/content/Switch.qml 5
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 5
Then, we place the image of the knob on top of the background.
The interaction here is a little more complex. We want the knob to move with the finger when it is clicked. That is what the \c drag
@@ -96,7 +96,7 @@ property of the \c MouseArea is for. We also want to toggle the switch if the kn
in the \c dorelease() function that is called in the \c onReleased property.
\section2 States
-\snippet examples/declarative/slideswitch/content/Switch.qml 6
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 6
We define the two states of the switch:
\list
@@ -110,13 +110,13 @@ For more information on states see \l{qmlstates}{QML States}.
We add two JavaScript functions to our switch:
-\snippet examples/declarative/slideswitch/content/Switch.qml 2
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 2
This first function is called when the background image or the knob are clicked. We simply want the switch to toggle between the two
states (\e on and \e off).
-\snippet examples/declarative/slideswitch/content/Switch.qml 3
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 3
This second function is called when the knob is released and we want to make sure that the knob does not end up between states
(neither \e on nor \e off). If it is the case call the \c toggle() function otherwise we do nothing.
@@ -124,7 +124,7 @@ This second function is called when the knob is released and we want to make sur
For more information on scripts see \l{Integrating JavaScript}.
\section2 Transition
-\snippet examples/declarative/slideswitch/content/Switch.qml 7
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 7
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.
@@ -133,5 +133,5 @@ For more information on transitions see \l{state-transitions}{QML Transitions}.
\section1 Usage
The switch can be used in a QML file, like this:
-\snippet examples/declarative/slideswitch/slideswitch.qml 0
+\snippet examples/declarative/ui-components/slideswitch/slideswitch.qml 0
*/
diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc
index e01459f..a355f9f 100644
--- a/doc/src/declarative/examples.qdoc
+++ b/doc/src/declarative/examples.qdoc
@@ -40,8 +40,9 @@
****************************************************************************/
/*!
-\page qdeclarativeexamples.html
-\title QML Examples and Demos
+ \page qdeclarativeexamples.html
+ \title QML Examples and Demos
+ \ingroup all-examples
\previouspage Graphics View Examples
\contentspage Qt Examples
@@ -70,59 +71,107 @@ For example, from your build directory, run:
\section1 Examples
+\section2 Animation
\list
-\o \l{declarative/animations}{Animations}
-\o \l{declarative/aspectratio}{Aspect Ratio}
-\o \l{declarative/behaviors}{Behaviors}
-\o \l{declarative/border-image}{Border Image}
-\o \l{declarative/clocks}{Clocks}
-\o \l{declarative/connections}{Connections}
-\o \l{declarative/dial}{Dial}
-\o \l{declarative/dynamic}{Dynamic}
-\o \l{declarative/extending}{Extending}
-\o \l{declarative/fillmode}{Fillmode}
-\o \l{declarative/flipable}{Flipable}
-\o \l{declarative/focus}{Focus}
-\o \l{declarative/fonts}{Fonts}
-\o \l{declarative/gridview}{GridView}
-\o \l{declarative/imageprovider}{Image Provider}
-\o \l{declarative/images}{Images}
-\o \l{declarative/layouts}{Layouts}
-\o \l{declarative/listmodel-threaded}{ListModel Threaded}
-\o \l{declarative/listview}{ListView}
-\o \l{declarative/mousearea}{Mouse Area}
-\o \l{declarative/objectlistmodel}{Object ListModel}
-\o \l{declarative/package}{Package}
-\o \l{declarative/parallax}{Parallax}
-\o \l{declarative/plugins}{Plugins}
-\o \l{declarative/progressbar}{Progress Bars}
-\o \l{declarative/proxywidgets}{Proxy Widgets}
-\o \l{declarative/scrollbar}{Scrollbar}
-\o \l{declarative/searchbox}{Search Box}
-\o \l{declarative/slideswitch}{Slide Switch}
-\o \l{declarative/sql}{SQL}
-\o \l{declarative/states}{States}
-\o \l{declarative/stringlistmodel}{String ListModel}
-\o \l{declarative/tabwidget}{Tab Widget}
-\o \l{declarative/tic-tac-toe}{Tic-Tac-Toe}
-\o \l{declarative/tvtennis}{TV Tennis}
-\o \l{declarative/velocity}{Velocity}
-\o \l{declarative/webview}{WebView}
-\o \l{declarative/workerscript}{WorkerScript}
-\o \l{declarative/xmldata}{XML Data}
-\o \l{declarative/xmlhttprequest}{XMLHttpRequest}
+\o \l{declarative/animation/basics}{Basics}
+\o \l{declarative/animation/behaviors}{Behaviors}
+\o \l{declarative/animation/easing}{Easing types}
+\o \l{declarative/animation/states}{States}
+\endlist
+
+\section2 Image Elements
+\list
+\o \l{declarative/imageelements/borderimage}{BorderImage}
+\endlist
+
+\section2 \l{declarative/positioners}{Positioners}
+\section2 Key Interaction
+\list
+\o \l{declarative/keyinteraction/focus}{Focus}
\endlist
+\section2 Touch Interaction
+\list
+\o \l{declarative/touchinteraction/gestures}{Gestures}
+\o \l{declarative/touchinteraction/mousearea}{MouseArea}
+\endlist
+
+\section2 UI Components
+\list
+\o \l{declarative/ui-components/flipable}{Flipable}
+\o \l{declarative/ui-components/progressbar}{Progress bar}
+\o \l{declarative/ui-components/scrollbar}{Scroll bar}
+\o \l{declarative/ui-components/searchbox}{Search box}
+\o \l{declarative/ui-components/slideswitch}{Slide switch}
+\o \l{declarative/ui-components/spinner}{Spinner}
+\o \l{declarative/ui-components/tabwidget}{Tab widget}
+\endlist
+
+\section2 Models and Views
+\list
+\o \l{declarative/modelviews/gridview}{GridView}
+\o \l{declarative/modelviews/listview}{ListView}
+\o \l{declarative/modelviews/objectlistmodel}{Object list model}
+\o \l{declarative/modelviews/package}{Package}
+\o \l{declarative/modelviews/parallax}{Parallax}
+\o \l{declarative/modelviews/stringlistmodel}{String list model}
+\o \l{declarative/modelviews/webview}{WebView}
+\endlist
+
+\section2 XML
+\list
+\o \l{declarative/xml/xmlhttprequest}{XmlHttpRequest}
+\endlist
+
+\section2 \l{declarative/i18n}{Internationalization (i18n)}
+
+\section2 Threading
+\list
+\o \l{declarative/threading/threadedlistmodel}{Threaded ListModel}
+\o \l{declarative/threading/workerscript}{WorkerScript}
+\endlist
+
+\section2 \l{declarative/sqllocalstorage}{SQL Local Storage}
+
+\section2 C++ Extensions
+\list
+\o \l{declarative-cppextensions-reference.html}{Reference examples} (discussed in \l {Extending QML in C++})
+\o \l{declarative/cppextensions/plugins}{Plugins}
+\o \l{declarative-cppextensions-qgraphicslayouts.html}{QGraphicsLayouts}
+\o \l{declarative/cppextensions/qwidgets}{QWidgets}
+\o \l{declarative/cppextensions/imageprovider}{Image provider}
+\o \l{declarative/cppextensions/networkaccessmanagerfactory}{Network access manager factory}
+\endlist
+
+\section2 Toys
+\list
+\o \l{declarative/toys/clocks}{Clocks}
+\o \l{declarative/toys/corkboards}{Corkboards}
+\o \l{declarative/toys/dial}{Dial}
+\o \l{declarative/toys/dynamicscene}{Dynamic Scene}
+\o \l{declarative/toys/tic-tac-toe}{Tic Tac Toe}
+\o \l{declarative/toys/tvtennis}{TV Tennis}
+\endlist
+
+
\section1 Demos
\list
\o \l{demos/declarative/calculator}{Calculator}
+\o \l{demos/declarative/flickr}{Flickr Mobile}
\o \l{demos/declarative/minehunt}{Minehunt}
\o \l{demos/declarative/photoviewer}{Photo Viewer}
-\o \l{demos/declarative/flickr}{Flickr Mobile}
+\o \l{demos/declarative/rssnews}{RSS News Reader}
\o \l{demos/declarative/samegame}{Same Game}
\o \l{demos/declarative/snake}{Snake}
\endlist
+\section1 Labs
+
+\list
+\o \l{src/imports/folderlistmodel}{Folder List Model} - a C++ model plugin
+\endlist
+
*/
+
diff --git a/doc/src/declarative/extending-examples.qdoc b/doc/src/declarative/extending-examples.qdoc
deleted file mode 100644
index 307162e..0000000
--- a/doc/src/declarative/extending-examples.qdoc
+++ /dev/null
@@ -1,304 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\example declarative/extending/adding
-\title Extending QML - Adding Types Example
-
-The Adding Types Example shows how to add a new element type, \c Person, to QML.
-The \c Person type can be used from QML like this:
-
-\snippet examples/declarative/extending/adding/example.qml 0
-
-\section1 Declare the Person class
-
-All QML elements map to C++ types. Here we declare a basic C++ Person class
-with the two properties we want accessible on the QML type - name and shoeSize.
-Although in this example we use the same name for the C++ class as the QML
-element, the C++ class can be named differently, or appear in a namespace.
-
-\snippet examples/declarative/extending/adding/person.h 0
-
-\section1 Define the Person class
-
-\snippet examples/declarative/extending/adding/person.cpp 0
-
-The Person class implementation is quite basic. The property accessors simply
-return members of the object instance.
-
-The implementation must also be registered using the QML_REGISTER_TYPE() macro. This macro
-registers the Person class with QML as a type in the People library version 1.0,
-and defines the mapping between the C++ and QML class names.
-
-\section1 Running the example
-
-The main.cpp file in the example includes a simple shell application that
-loads and runs the QML snippet shown at the beginning of this page.
-*/
-
-/*!
-\example declarative/extending/properties
-\title Extending QML - Object and List Property Types Example
-
-This example builds on:
-\list
-\o \l {Extending QML - Adding Types Example}
-\endlist
-
-The Object and List Property Types example shows how to add object and list
-properties in QML. This example adds a BirthdayParty element that specifies
-a birthday party, consisting of a celebrant and a list of guests. People are
-specified using the People QML type built in the previous example.
-
-\snippet examples/declarative/extending/properties/example.qml 0
-
-\section1 Declare the BirthdayParty
-
-The BirthdayParty class is declared like this:
-
-\snippet examples/declarative/extending/properties/birthdayparty.h 0
-\snippet examples/declarative/extending/properties/birthdayparty.h 1
-\snippet examples/declarative/extending/properties/birthdayparty.h 2
-\snippet examples/declarative/extending/properties/birthdayparty.h 3
-
-The class contains a member to store the celebrant object, and also a
-QList<Person *> member.
-
-In QML, the type of a list properties - and the guests property is a list of
-people - are all of type QDeclarativeListProperty<T>. QDeclarativeListProperty is simple value
-type that contains a set of function pointers. QML calls these function
-pointers whenever it needs to read from, write to or otherwise interact with
-the list. In addition to concrete lists like the people list used in this
-example, the use of QDeclarativeListProperty allows for "virtual lists" and other advanced
-scenarios.
-
-\section2 Define the BirthdayParty
-
-The implementation of BirthdayParty property accessors is straight forward.
-
-\snippet examples/declarative/extending/properties/birthdayparty.cpp 0
-
-\section1 Running the example
-
-The main.cpp file in the example includes a simple shell application that
-loads and runs the QML snippet shown at the beginning of this page.
-*/
-
-/*!
-\example declarative/extending/coercion
-\title Extending QML - Inheritance and Coercion Example
-
-This example builds on:
-\list
-\o \l {Extending QML - Object and List Property Types Example}
-\o \l {Extending QML - Adding Types Example}
-\endlist
-
-The Inheritance and Coercion Example shows how to use base classes to assign
-elements of more than one type to a property. It specializes the Person element
-developed in the previous examples into two elements - a \c Boy and a \c Girl.
-
-\snippet examples/declarative/extending/coercion/example.qml 0
-
-\section1 Declare Boy and Girl
-
-\snippet examples/declarative/extending/coercion/person.h 0
-
-The Person class remains unaltered in this example and the Boy and Girl C++
-classes are trivial extensions of it. As an example, the inheritance used here
-is a little contrived, but in real applications it is likely that the two
-extensions would add additional properties or modify the Person classes
-behavior.
-
-\section2 Define People as a base class
-
-The implementation of the People class itself has not changed since the the
-previous example. However, as we have repurposed the People class as a common
-base for Boy and Girl, we want to prevent it from being instantiated from QML
-directly - an explicit Boy or Girl should be instantiated instead.
-
-\snippet examples/declarative/extending/coercion/main.cpp 0
-
-While we want to disallow instantiating Person from within QML, it still needs
-to be registered with the QML engine, so that it can be used as a property type
-and other types can be coerced to it. To register a type, without defining a
-named mapping into QML, we call the QML_REGISTER_NOCREATE_TYPE() macro instead of
-the QML_REGISTER_TYPE() macro used previously.
-
-\section2 Define Boy and Girl
-
-The implementation of Boy and Girl are trivial.
-
-\snippet examples/declarative/extending/coercion/person.cpp 1
-
-All that is necessary is to implement the constructor, and to register the types
-and their QML name with the QML engine.
-
-\section1 Running the example
-
-The BirthdayParty element has not changed since the previous example. The
-celebrant and guests property still use the People type.
-
-\snippet examples/declarative/extending/coercion/birthdayparty.h 0
-
-However, as all three types, Person, Boy and Girl, have been registered with the
-QML system, on assignment QML automatically (and type-safely) converts the Boy
-and Girl objects into a Person.
-
-The main.cpp file in the example includes a simple shell application that
-loads and runs the QML snippet shown at the beginning of this page.
-*/
-
-/*!
-\example declarative/extending/default
-\title Extending QML - Default Property Example
-
-This example builds on:
-\list
-\o \l {Extending QML - Inheritance and Coercion Example}
-\o \l {Extending QML - Object and List Property Types Example}
-\o \l {Extending QML - Adding Types Example}
-\endlist
-
-The Default Property Example is a minor modification of the
-\l {Extending QML - Inheritance and Coercion Example} that simplifies the
-specification of a BirthdayParty through the use of a default property.
-
-\snippet examples/declarative/extending/default/example.qml 0
-
-\section1 Declaring the BirthdayParty class
-
-The only difference between this example and the last, is the addition of the
-\c DefaultProperty class info annotation.
-
-\snippet examples/declarative/extending/default/birthdayparty.h 0
-
-The default property specifies the property to assign to whenever an explicit
-property is not specified, in the case of the BirthdayParty element the guest
-property. It is purely a syntactic simplification, the behavior is identical
-to specifying the property by name, but it can add a more natural feel in many
-situations. The default property must be either an object or list property.
-
-\section1 Running the example
-
-The main.cpp file in the example includes a simple shell application that
-loads and runs the QML snippet shown at the beginning of this page.
-*/
-
-/*!
-\example declarative/extending/grouped
-\title Extending QML - Grouped Properties Example
-
-This example builds on:
-\list
-\o \l {Extending QML - Default Property Example}
-\o \l {Extending QML - Inheritance and Coercion Example}
-\o \l {Extending QML - Object and List Property Types Example}
-\o \l {Extending QML - Adding Types Example}
-\endlist
-
-*/
-
-/*!
-\example declarative/extending/grouped
-\title Extending QML - Attached Properties Example
-
-This example builds on:
-\list
-\o \l {Extending QML - Grouped Properties Example}
-\o \l {Extending QML - Default Property Example}
-\o \l {Extending QML - Inheritance and Coercion Example}
-\o \l {Extending QML - Object and List Property Types Example}
-\o \l {Extending QML - Adding Types Example}
-\endlist
-
-*/
-
-/*!
-\example declarative/extending/signal
-\title Extending QML - Signal Support Example
-
-This example builds on:
-\list
-\o \l {Extending QML - Attached Properties Example}
-\o \l {Extending QML - Grouped Properties Example}
-\o \l {Extending QML - Default Property Example}
-\o \l {Extending QML - Inheritance and Coercion Example}
-\o \l {Extending QML - Object and List Property Types Example}
-\o \l {Extending QML - Adding Types Example}
-\endlist
-
-*/
-
-/*!
-\example declarative/extending/valuesource
-\title Extending QML - Property Value Source Example
-
-This example builds on:
-\list
-\o \l {Extending QML - Signal Support Example}
-\o \l {Extending QML - Attached Properties Example}
-\o \l {Extending QML - Grouped Properties Example}
-\o \l {Extending QML - Default Property Example}
-\o \l {Extending QML - Inheritance and Coercion Example}
-\o \l {Extending QML - Object and List Property Types Example}
-\o \l {Extending QML - Adding Types Example}
-\endlist
-
-*/
-
-/*!
-\example declarative/extending/binding
-\title Extending QML - Binding Example
-
-This example builds on:
-\list
-\o \l {Extending QML - Property Value Source Example}
-\o \l {Extending QML - Signal Support Example}
-\o \l {Extending QML - Attached Properties Example}
-\o \l {Extending QML - Grouped Properties Example}
-\o \l {Extending QML - Default Property Example}
-\o \l {Extending QML - Inheritance and Coercion Example}
-\o \l {Extending QML - Object and List Property Types Example}
-\o \l {Extending QML - Adding Types Example}
-\endlist
-
-*/
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 1c159e4..574b0b2 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -56,13 +56,16 @@ QML for their own independent use.
\section1 Adding Types
\target adding-types
-\snippet examples/declarative/extending/adding/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/adding/example.qml 0
The QML snippet shown above instantiates one \c Person instance and sets
the \c name and \c shoeSize properties on it. Everything in QML ultimately comes down
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.
+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.
The QML engine has no intrinsic knowledge of any class types. Instead the
programmer must register the C++ types with their corresponding QML names.
@@ -121,7 +124,7 @@ the \c Person type.
\section1 Object and List Property Types
-\snippet examples/declarative/extending/properties/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/properties/example.qml 0
The QML snippet shown above assigns a \c Person object to the \c BirthdayParty's
\c host property, and assigns three \c Person objects to the guests property.
@@ -136,7 +139,7 @@ Properties that are pointers to objects or Qt interfaces are declared with the
Q_PROPERTY() macro, just like other properties. The \c host property
declaration looks like this:
-\snippet examples/declarative/extending/properties/birthdayparty.h 1
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 1
As long as the property type, in this case \c Person, is registered with QML the
property can be assigned.
@@ -165,14 +168,14 @@ As with object properties, the type \a T must be registered with QML.
The \c guest property declaration looks like this:
-\snippet examples/declarative/extending/properties/birthdayparty.h 2
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 2
\l {Extending QML - Object and List Property Types Example} shows the complete
code used to create the \c BirthdayParty type.
\section1 Inheritance and Coercion
-\snippet examples/declarative/extending/coercion/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/coercion/example.qml 0
The QML snippet shown above assigns a \c Boy object to the \c BirthdayParty's
\c host property, and assigns three other objects to the \c guests property.
@@ -214,7 +217,7 @@ code used to create the \c Boy and \c Girl types.
\section1 Default Property
-\snippet examples/declarative/extending/default/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/default/example.qml 0
The QML snippet shown above assigns a collection of objects to the
\c BirthdayParty's default property.
@@ -246,7 +249,7 @@ specify a default property.
\section1 Grouped Properties
-\snippet examples/declarative/extending/grouped/example.qml 1
+\snippet examples/declarative/cppextensions/referenceexamples/grouped/example.qml 1
The QML snippet shown above assigns a number of properties to the \c Boy object,
including four properties using the grouped property syntax.
@@ -259,7 +262,7 @@ different types through implementation reuse.
A grouped property block is implemented as a read-only object property. The
\c shoe property shown is declared like this:
-\snippet examples/declarative/extending/grouped/person.h 1
+\snippet examples/declarative/cppextensions/referenceexamples/grouped/person.h 1
The \c ShoeDescription type declares the properties available to the grouped
property block - in this case the \c size, \c color, \c brand and \c price properties.
@@ -271,7 +274,7 @@ implement the \c shoe property grouping.
\section1 Attached Properties
-\snippet examples/declarative/extending/attached/example.qml 1
+\snippet examples/declarative/cppextensions/referenceexamples/attached/example.qml 1
The QML snippet shown above assigns a date to the \c rsvp property using the attached
property syntax.
@@ -393,8 +396,8 @@ this situation, but it must not crash.
\section1 Signal Support
-\snippet examples/declarative/extending/signal/example.qml 0
-\snippet examples/declarative/extending/signal/example.qml 1
+\snippet examples/declarative/cppextensions/referenceexamples/signal/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/signal/example.qml 1
The QML snippet shown above associates the evaluation of a JavaScript expression
with the emission of a Qt signal.
@@ -406,7 +409,7 @@ signal name: "on" is prepended, and the first letter of the signal name upper
cased. For example, the signal used in the example above has the following
C++ signature:
-\snippet examples/declarative/extending/signal/birthdayparty.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.h 0
In classes with multiple signals with the same name, only the final signal
is accessible as a signal property. Note that signals with the same name
@@ -424,8 +427,8 @@ implement the onPartyStarted signal property.
\section1 Property Value Sources
-\snippet examples/declarative/extending/valuesource/example.qml 0
-\snippet examples/declarative/extending/valuesource/example.qml 1
+\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.
A property value source generates a value for a property that changes over time.
@@ -440,7 +443,7 @@ The example shown here is rather contrived: the \c announcment property of the
the \c HappyBirthdaySong value source generates the lyrics of the song
"Happy Birthday".
-\snippet examples/declarative/extending/valuesource/birthdayparty.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.h 0
Normally, assigning an object to a string property would not be allowed. In
the case of a property value source, rather than assigning the object instance
@@ -453,9 +456,9 @@ QDeclarativePropertyValueSource::setTarget(), that the QML engine invokes when
associating the property value source with a property. The relevant part of
the \c HappyBirthdaySong type declaration looks like this:
-\snippet examples/declarative/extending/valuesource/happybirthdaysong.h 0
-\snippet examples/declarative/extending/valuesource/happybirthdaysong.h 1
-\snippet examples/declarative/extending/valuesource/happybirthdaysong.h 2
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h 1
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h 2
In all other respects, property value sources are regular QML types. They must
be registered with the QML engine using the same macros as other types, and can
@@ -471,8 +474,8 @@ implement the \c HappyBirthdaySong property value source.
\section1 Property Binding
-\snippet examples/declarative/extending/binding/example.qml 0
-\snippet examples/declarative/extending/binding/example.qml 1
+\snippet examples/declarative/cppextensions/referenceexamples/binding/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/binding/example.qml 1
The QML snippet shown above uses a property binding to ensure the
\c HappyBirthdaySong's \c name property remains up to date with the \c host.
@@ -492,7 +495,7 @@ the property's value. QML relies on the presence of a
Here is the \c host property declaration:
-\snippet examples/declarative/extending/binding/birthdayparty.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.h 0
The NOTIFY attribute is followed by a signal name. It is the responsibility of
the class implementer to ensure that whenever the property's value changes, the
@@ -531,7 +534,7 @@ subsequently change. The most common case of this is when a type uses
only freed when the object is deleted. In these cases, the CONSTANT attribute
may be added to the property declaration instead of a NOTIFY signal.
-\snippet examples/declarative/extending/binding/person.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/binding/person.h 0
Extreme care must be taken here or applications using your type may misbehave.
The CONSTANT attribute should only be used for properties whose value is set,
@@ -543,7 +546,7 @@ include NOTIFY signals for use in binding.
\section1 Extension Objects
-\snippet examples/declarative/extending/extended/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/extended/example.qml 0
The QML snippet shown above adds a new property to an existing C++ type without
modifying its source code.
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
index e5c1d32..4c4a317 100644
--- a/doc/src/declarative/focus.qdoc
+++ b/doc/src/declarative/focus.qdoc
@@ -67,7 +67,12 @@ item and thus subsequently be \l {QEvent::ignore()}{ignored}.
\code
Item {
Item {
- Keys.onPressed: if (event.key == Qt.Key_A) { console.log('Key A was pressed'); event.accepted = true }
+ Keys.onPressed: {
+ if (event.key == Qt.Key_A) {
+ console.log('Key A was pressed');
+ event.accepted = true;
+ }
+ }
Rectangle {}
}
}
@@ -291,28 +296,7 @@ print the name of the current list item.
\table
\row
-\o \code
-Rectangle {
- color: "lightsteelblue"; width: 240; height: 320
-
- ListView {
- id: myView; anchors.fill: parent; focus: true
- model: ListModel {
- ListElement { name: "Bob" }
- ListElement { name: "John" }
- ListElement { name: "Michael" }
- }
- delegate: FocusScope {
- width: contents.width; height: contents.height
- Text {
- focus: true
- text: name
- Keys.onReturnPressed: console.log(name)
- }
- }
- }
-}
-\endcode
+\o \snippet doc/src/snippets/declarative/focusscopes.qml 0
\o \image declarative-qmlfocus4.png
\endtable
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc
index 57eaae7..bd0a9f5 100644
--- a/doc/src/declarative/globalobject.qdoc
+++ b/doc/src/declarative/globalobject.qdoc
@@ -166,10 +166,33 @@ If no format is specified the locale's short format is used. Alternatively, you
\section2 Functions
The Qt object also contains the following miscellaneous functions which expose Qt functionality for use in QML.
-\section3 Qt.lighter(color baseColor)
-This function returns a color 50% lighter than \c baseColor. See QColor::lighter() for further details.
-\section3 Qt.darker(color baseColor)
-This function returns a color 50% darker than \c baseColor. See QColor::darker() for further details.
+\section3 Qt.lighter(color baseColor, real factor)
+This function returns a color lighter than \c baseColor by the \c factor provided.
+
+If the factor is greater than 1.0, this functions returns a lighter color.
+Setting factor to 1.5 returns a color that is 50% brighter. If the factor is less than 1.0,
+the return color is darker, but we recommend using the Qt.darker() function for this purpose.
+If the factor is 0 or negative, the return value is unspecified.
+
+The function converts the current RGB color to HSV, multiplies the value (V) component
+by factor and converts the color back to RGB.
+
+If \c factor is not supplied, returns a color 50% lighter than \c baseColor (factor 1.5).
+
+\section3 Qt.darker(color baseColor, real factor)
+This function returns a color darker than \c baseColor by the \c factor provided.
+
+If the factor is greater than 1.0, this function returns a darker color.
+Setting factor to 3.0 returns a color that has one-third the brightness.
+If the factor is less than 1.0, the return color is lighter, but we recommend using
+the Qt.lighter() function for this purpose. If the factor is 0 or negative, the return
+value is unspecified.
+
+The function converts the current RGB color to HSV, divides the value (V) component
+by factor and converts the color back to RGB.
+
+If \c factor is not supplied, returns a color 50% darker than \c baseColor (factor 2.0).
+
\section3 Qt.tint(color baseColor, color tintColor)
This function allows tinting one color with another.
@@ -196,13 +219,17 @@ Binary to ASCII - this function returns a base64 encoding of \c data.
ASCII to binary - this function returns a base64 decoding of \c data.
\section3 Qt.quit()
-This function causes the QML engine to emit the quit signal, which in
-\l {Qt Declarative UI Runtime}{qml} causes the runtime to quit.
+This function causes the QDeclarativeEngine::quit() signal to be emitted.
+Within the \l {Qt Declarative UI Runtime}{qml} application this causes the
+launcher application to exit.
\section3 Qt.resolvedUrl(url)
This function returns \c url resolved relative to the URL of the
caller.
+\section3 Qt.fontFamilies()
+This function returns a list of the font families available to the application.
+
\section3 Qt.isQtObject(object)
Returns true if \c object is a valid reference to a Qt or QML object, otherwise false.
@@ -211,87 +238,61 @@ The following functions on the global object allow you to dynamically create QML
items from files or strings. See \l{Dynamic Object Management} for an overview
of their use.
-\section2 createComponent(url file)
- This function takes the URL of a QML file as its only argument. It returns
- a component object which can be used to create and load that QML file.
-
- Example QML script is below. Remember that QML files that might be loaded
- over the network cannot be expected to be ready immediately.
- \code
- var component;
- var sprite;
- function finishCreation(){
- if(component.isReady()){
- sprite = component.createObject();
- if(sprite == null){
- // Error Handling
- }else{
- sprite.parent = page;
- sprite.x = 200;
- //...
- }
- }else if(component.isError()){
- // Error Handling
- }
- }
-
- component = createComponent("Sprite.qml");
- if(component.isReady()){
- finishCreation();
- }else{
- component.statusChanged.connect(finishCreation);
- }
- \endcode
-
- If you are certain the files will be local, you could simplify to
-
- \code
- component = createComponent("Sprite.qml");
- sprite = component.createObject();
- if(sprite == null){
- // Error Handling
- console.log(component.errorsString());
- }else{
- sprite.parent = page;
- sprite.x = 200;
- //...
- }
- \endcode
-
- The methods and properties of the Component element are defined in its own
- page, but when using it dynamically only two methods are usually used.
- Component.createObject() returns the created object or null if there is an error.
- If there is an error, Component.errorsString() describes what the error was.
-
- If you want to just create an arbitrary string of QML, instead of
- loading a QML file, consider the createQmlObject() function.
-
-\section2 createQmlObject(string qml, object parent, string filepath)
- Creates a new object from the specified string of QML. It requires a
- second argument, which is the id of an existing QML object to use as
- the new object's parent. If a third argument is provided, this is used
- for error reporting as the filepath that the QML came from.
-
- Example (where targetItem is the id of an existing QML item):
- \code
- newObject = createQmlObject('import Qt 4.7; Rectangle {color: "red"; width: 20; height: 20}',
- targetItem, "dynamicSnippet1");
- \endcode
-
- This function is intended for use inside QML only. It is intended to behave
- similarly to eval, but for creating QML elements.
-
- Returns the created object, or null if there is an error. In the case of an
- error, a QtScript Error object is thrown. This object has the additional property,
- qmlErrors, which is an array of all the errors encountered when trying to execute the
- QML. Each object in the array has the members: lineNumber, columnNumber, fileName and message.
-
- Note that this function returns immediately, and therefore may not work if
- the QML loads new components. If you are trying to load a new component,
- for example from a QML file, consider the createComponent() function
- instead. 'New components' refers to external QML files that have not yet
- been loaded, and so it is safe to use createQmlObject to load built-in
- components.
+
+\section2 Qt.createComponent(url file)
+
+This function takes the URL of a QML file as its only argument. It returns
+a component object which can be used to create and load that QML file.
+
+Here is an example. Remember that QML files that might be loaded
+over the network cannot be expected to be ready immediately.
+
+\snippet doc/src/snippets/declarative/componentCreation.js 0
+\codeline
+\snippet doc/src/snippets/declarative/componentCreation.js 1
+
+If you are certain the files will be local, you could simplify to:
+
+\snippet doc/src/snippets/declarative/componentCreation.js 2
+
+The methods and properties of the Component element are defined in its own
+page, but when using it dynamically only two methods are usually used.
+\c Component.createObject() returns the created object or \c null if there is an error.
+If there is an error, \l {Component::errorString()}{Component.errorString()} describes
+the error that occurred. Note that createObject() takes exactly one argument, which is set
+to the parent of the created object. Graphical objects without a parent will not appear
+on the scene, but if you do not wish to parent the item at this point you can safely pass
+in null.
+
+If you want to just create an arbitrary string of QML, instead of
+loading a QML file, consider the \l{Qt.createQmlObject(string qml, object parent, string filepath)}{Qt.createQmlObject()} function.
+
+
+\section2 Qt.createQmlObject(string qml, object parent, string filepath)
+
+Creates a new object from the specified string of QML. It requires a
+second argument, which is the id of an existing QML object to use as
+the new object's parent. If a third argument is provided, this is used
+for error reporting as the filepath that the QML came from.
+
+Example (where \c targetItem is the id of an existing QML item):
+
+\snippet doc/src/snippets/declarative/createQmlObject.qml 0
+
+This function is intended for use inside QML only. It is intended to behave
+similarly to eval, but for creating QML elements.
+
+Returns the created object, \c or null if there is an error. In the case of an
+error, a QtScript Error object is thrown. This object has the additional property,
+qmlErrors, which is an array of all the errors encountered when trying to execute the
+QML. Each object in the array has the members \c lineNumber, \c columnNumber, \c fileName and \c message.
+
+Note that this function returns immediately, and therefore may not work if
+the QML loads new components. If you are trying to load a new component,
+for example from a QML file, consider the \l{Qt.createComponent(url file)}{Qt.createComponent()} function
+instead. 'New components' refers to external QML files that have not yet
+been loaded, and so it is safe to use \c Qt.createQmlObject() to load built-in
+components.
\section1 XMLHttpRequest
@@ -382,7 +383,7 @@ of QDeclarativeEngine::offlineStoragePath(), currently as SQLite databases.
The API can be used from JavaScript functions in your QML:
-\quotefile declarative/sql/hello.qml
+\quotefile declarative/sqllocalstorage/hello.qml
The API conforms to the Synchronous API of the HTML5 Web Database API,
\link http://www.w3.org/TR/2009/WD-webdatabase-20091029/ W3C Working Draft 29 October 2009\endlink.
diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc
index 0051f09..c6f754b 100644
--- a/doc/src/declarative/integrating.qdoc
+++ b/doc/src/declarative/integrating.qdoc
@@ -110,51 +110,11 @@ of QML UIs:
\section2 Loading QGraphicsWidget objects in QML
An alternative approach is to expose your existing QGraphicsWidget objects to
-QML and construct your scene in QML instead. To do this, you need to register
-any custom C++ types and create a plugin that registers the custom types
-so that they can be used from your QML file.
+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.
-Here is an example. Suppose you have two classes, \c RedSquare and \c BlueCircle,
-that both inherit from QGraphicsWidget:
-
-\c [graphicswidgets/redsquare.h]
-\snippet doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h 0
-
-\c [graphicswidgets/bluecircle.h]
-\snippet doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h 0
-
-Then, create a plugin by subclassing QDeclarativeExtensionPlugin, and register the
-types by calling qmlRegisterType(). Also export the plugin with Q_EXPORT_PLUGIN2.
-
-\c [graphicswidgets/shapesplugin.cpp]
-\snippet doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp 0
-
-Now write a project file that creates the plugin:
-
-\c [graphicswidgets/graphicswidgets.pro]
-\quotefile doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro
-
-And add a \c qmldir file that includes the \c graphicswidgets plugin from the \c lib
-subdirectory (as defined in the project file):
-
-\c [graphicswidgets/qmldir]
-\quotefile doc/src/declarative/snippets/integrating/graphicswidgets/qmldir
-
-Now, we can write a QML file that uses the \c RedSquare and \c BlueCircle widgets.
-(As an example, we can also create \c QGraphicsWidget items if we import the \c Qt.widgets
-module.)
-
-\c [main.qml]
-\quotefile doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
-
-Here is a screenshot of the result:
-
-\image declarative-integrating-graphicswidgets.png
-
-
-Note this approach of creating your graphics objects from QML does not work
-with QGraphicsItems that are not QGraphicsObject-based, since they are not QObjects.
-
-See \l{Extending QML in C++} for further information on using C++ types.
+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.
*/
diff --git a/doc/src/declarative/pics/trivialListView.png b/doc/src/declarative/pics/listview-highlight.png
index dc5c6b3..dc5c6b3 100644
--- a/doc/src/declarative/pics/trivialListView.png
+++ b/doc/src/declarative/pics/listview-highlight.png
Binary files differ
diff --git a/doc/src/declarative/pics/listview-simple.png b/doc/src/declarative/pics/listview-simple.png
new file mode 100644
index 0000000..71a1c51
--- /dev/null
+++ b/doc/src/declarative/pics/listview-simple.png
Binary files differ
diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc
index a98c9e1..acf4ec9 100644
--- a/doc/src/declarative/qdeclarativeintro.qdoc
+++ b/doc/src/declarative/qdeclarativeintro.qdoc
@@ -60,10 +60,13 @@ technologies like HTML and CSS, but it's not required.
QML looks like this:
\code
+import Qt 4.7
+
Rectangle {
width: 200
height: 200
- color: "white"
+ color: "blue"
+
Image {
source: "pics/logo.png"
anchors.centerIn: parent
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
index 91acb3c..109d390 100644
--- a/doc/src/declarative/qdeclarativemodels.qdoc
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -99,7 +99,8 @@ There are a number of QML elements that operate using data models:
\endlist
QML supports several types of data model, which may be provided by QML
-or C++ (via QDeclarativeContext::setContextProperty(), for example).
+or C++ (via QDeclarativeContext::setContextProperty() or as plugin types,
+for example).
\section1 QML Data Models
@@ -143,6 +144,28 @@ ListView {
}
\endcode
+It is also possible to manipulate the ListModel directly via JavaScript.
+In this case, the first item inserted will determine the roles available
+to any views using the model. For example, if an empty ListModel is
+created and populated via JavaScript the roles provided by the first
+insertion are the only roles that will be shown in the view:
+
+\code
+Item {
+ ListModel {
+ id: fruitModel
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: fruitModel.append({"cost": 5.95, "name":"Pizza"})
+ }
+}
+\endcode
+
+When the MouseArea is clicked fruitModel will have two roles, "cost" and "name".
+Even if subsequent roles are added, only the first two will be handled by views
+using the model.
+
\section2 XmlListModel
@@ -188,8 +211,13 @@ will be positioned by the view.
\section1 C++ Data Models
+Models defined in C++ can be made available to QML either from a C++ application or from a
+\l{QDeclarativeExtensionPlugin}{QML C++ plugin}.
+
\section2 QAbstractItemModel
+A model can be defined by subclassing QAbstractItemModel.
+
QAbstractItemModel provides the roles set via the QAbstractItemModel::setRoleNames() method.
The default role names set by Qt are:
@@ -205,7 +233,18 @@ The default role names set by Qt are:
\o decoration
\endtable
-QAbstractItemModel presents a heirachy of tables. Views currently provided by QML
+The model could be made available to QML either directly:
+
+\code
+QDeclarativeContext *ctxt = view.rootContext();
+MyModel *model = new MyModel; // subclass of QAbstractItemModel
+ctxt->setContextProperty("myModel", model);
+\endcode
+
+or by registering the subclass as a new QML type in
+a \l{QDeclarativeExtensionPlugin}{QML C++ plugin}.
+
+QAbstractItemModel presents a heirachy of tables, but views currently provided by QML
can only display list data.
In order to display child lists of a heirachical model
the VisualDataModel element provides several properties and functions for use
@@ -220,7 +259,7 @@ with models of type QAbstractItemModel:
\section2 QStringList
-QStringList provides the contents of the list via the \e modelData role:
+A model may be a simple QStringList, which provides the contents of the list via the \e modelData role:
\table
\row
@@ -283,7 +322,9 @@ QDeclarativeContext *ctxt = view.rootContext();
ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
\endcode
-The properties of the object may then be accessed in the delegate:
+The QObject* is available as the \c modelData property. As a convenience,
+the properties of the object are also made available directly in the
+delegate's context:
\code
ListView {
@@ -295,13 +336,18 @@ ListView {
Rectangle {
height: 25
width: 100
- color: model.color
+ color: model.modelData.color
Text { text: name }
}
}
}
\endcode
+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 modelData
+object.
+
Note: There is no way for the view to know that the contents of a QList
have changed. If the QList is changed, it will be necessary to reset
the model by calling QDeclarativeContext::setContextProperty() again.
diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc
index a724c7d..cef5e63 100644
--- a/doc/src/declarative/qmlruntime.qdoc
+++ b/doc/src/declarative/qmlruntime.qdoc
@@ -42,19 +42,18 @@
/*!
\page qmlruntime.html
\title Qt Declarative UI Runtime
- \keyword qml runtime
+ \keyword QML Viewer
\ingroup qttools
This page documents the \e{Declarative UI Runtime} for the Qt GUI
- toolkit, and the \c qml executable which can be used to run apps
- written for the runtime. The \c qml executable reads a declarative user interface definition
- (\c .qml) file and displays the user interface it describes.
+ toolkit, and the \QQV which can be used to run apps
+ written for the runtime. The \QQV reads a declarative
+ user interface definition (\c .qml) file and displays the user interface it describes.
- QML is a runtime, as you can run plain qml files which pull in their required modules.
+ QML is a runtime, as you can run plain QML files which pull in their required modules.
To run apps with the QML runtime, you can either start the runtime
- from your own application (using a QDeclarativeView) or with the simple \c qml application.
- The \c qml application can be
- installed in a production environment, assuming that it is not already
+ from your own application (using a QDeclarativeView) or with the simple \QQV.
+ The launcher can be installed in a production environment, assuming that it is not already
present in the system. It is generally packaged alongside Qt.
To deploy an application using the QML runtime, you have two options:
@@ -62,18 +61,18 @@
\list
\o Write your own Qt application including a QDeclarative view and deploy it the same as
any other Qt application (not discussed further on this page), or
- \o Write a main QML file for your application, and run your application using the included \c qml tool.
+ \o Write a main QML file for your application, and run your application using the included \QQV.
\endlist
- To run an application with the \c qml tool, pass the filename as an argument:
+ To run an application with the \QQV, pass the filename as an argument:
\code
- qml myQmlFile.qml
+ qmlviewer myQmlFile.qml
\endcode
- Deploying a QML application via the \c qml executable allows for QML only deployments, but can also
+ Deploying a QML application via the \QQV allows for QML only deployments, but can also
include custom C++ modules just as easily. Below is an example of how you might structure
- a complex application deployed via the qml runtime, it is a listing of the files that would
+ a complex application deployed via the QML runtime, it is a listing of the files that would
be included in the deployment package.
\code
@@ -93,8 +92,8 @@
as the appropriate module file is chosen based on platform naming conventions. The C++
modules must contain a QDeclarativeExtentionPlugin subclass.
- The application would be executed either with your own application, the command 'qml MyApp.qml' or by
- opening the qml file if your system has the \c qml executable registered as the handler for qml files. The MyApp.qml file would have access
+ The application would be executed either with your own application, the command 'qmlviewer MyApp.qml' or by
+ opening the file if your system has the \QQV registered as the handler for QML files. The MyApp.qml file would have access
to all of the deployed types using the import statements such as the following:
\code
@@ -102,19 +101,36 @@
import "OtherModule" 1.0 as Other
\endcode
- \section1 \c qml application functionality
- The \c qml application implements some additional functionality to help it serve the role of a launcher
- for myriad applications. If you implement your own launcher application, you may also wish to reimplement
+ \section1 Qt QML Viewer functionality
+ The \QQV implements some additional functionality to help it supporting
+ myriad applications. If you implement your own application, you may also wish to reimplement
some or all of this functionality. However, much of this functionality is intended to aid the prototyping of
- qml applications and may not be necessary for a deployed application.
+ QML applications and may not be necessary for a deployed application.
\section2 Options
- When run with the \c -help option, qml shows available options.
+ When run with the \c -help option, \c qmlviewer shows available options.
+
+ \section2 Translations
+
+ When the launcher loads an initial QML file, it will install a translation file from
+ a "i18n" subdirectory relative to that initial QML file. The actual translation file
+ loaded will be according to the system locale and have the form
+ "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".
+
+ Such files can be created using \l{Qt Linguist}.
+
+ See the \l{scripting.html#internationalization}{Qt Internationalization} documentation for information about how to make
+ the JavaScript in QML files use translatable strings.
+
+ Additionally, the launcher will load translation files specified on the
+ command line via the \c -translation option.
\section2 Dummy Data
- The secondary use of the qml runtime is to allow QML files to be viewed with
+ The secondary use of the launcher is to allow QML files to be viewed with
dummy data. This is useful when prototyping the UI, as the dummy data can
be later replaced with actual data and bindings from a C++ plugin.
To provide dummy data: create a directory called "dummydata" in the same directory as
@@ -136,13 +152,13 @@
\section2 Runtime Object
- All applications using the qmlruntime will have access to the 'runtime'
+ All applications using the launcher will have access to the 'runtime'
property on the root context. This property contains several pieces of
information about the runtime environment of the application.
\section3 Screen Orientation
- A special piece of dummy data which is integrated into the runtime is
+ A special piece of dummy data which is integrated into the launcher is
a simple orientation property. The orientation can be set via the
settings menu in the application, or by pressing Ctrl+T to toggle it.
@@ -156,13 +172,13 @@
}
\endcode
- This allows your application to respond to the orientation of the screen changing. The runtime
+ This allows your application to respond to the orientation of the screen changing. The launcher
will automatically update this on some platforms (currently the N900 only) to match the physical
screen's orientation. On other plaforms orientation changes will only happen when explictly asked for.
\section3 Window Active
- The runtime.isActiveWindow property tells whether the main window of the qml runtime is currently active
+ The runtime.isActiveWindow property tells whether the main window of the launcher is currently active
or not. This is especially useful for embedded devices when you want to pause parts of your application,
including animations, when your application loses focus or goes to the background.
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index d024ff2..7d696d7 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -97,17 +97,17 @@ The following example shows how to expose a background color to a QML file throu
\row
\o
\c {// main.cpp}
-\snippet doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp 0
\o
\c {// main.qml}
-\snippet doc/src/declarative/snippets/qtbinding/contextproperties/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.qml 0
\endtable
Or, if you want \c main.cpp to create the component without showing it in a QDeclarativeView, you could create an instance of QDeclarativeContext using QDeclarativeEngine::rootContext() instead:
-\snippet doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp 1
+\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp 1
Context properties work just like normal properties in QML bindings - if the \c backgroundColor
context property in this example was changed to red, the component object instances would
@@ -135,15 +135,15 @@ allow QML to set values.
The following example creates a \c CustomPalette object, and sets it as the \c palette context
property.
-\snippet doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h 0
+\snippet doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h 0
-\snippet doc/src/declarative/snippets/qtbinding/custompalette/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/custompalette/main.cpp 0
The QML that follows references the palette object, and its properties, to set the appropriate
background and text colors. When the window is clicked, the palette's text color is changed, and
the window text will update accordingly.
-\snippet doc/src/declarative/snippets/qtbinding/custompalette/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/custompalette/main.qml 0
To detect when a C++ property value - in this case the \c CustomPalette's \c text property -
changes, the property must have a corresponding NOTIFY signal. The NOTIFY signal specifies a signal
@@ -185,12 +185,12 @@ This example toggles the "Stopwatch" object on/off when the MouseArea is clicked
\row
\o
\c {// main.cpp}
-\snippet doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h 0
-\snippet doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h 0
+\snippet doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp 0
\o
\c {// main.qml}
-\snippet doc/src/declarative/snippets/qtbinding/stopwatch/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/stopwatch/main.qml 0
\endtable
@@ -258,16 +258,16 @@ QML content can be loaded from \l {The Qt Resource System} using the \e qrc: URL
For example:
\c [project/example.qrc]
-\quotefile doc/src/declarative/snippets/qtbinding/resources/example.qrc
+\quotefile doc/src/snippets/declarative/qtbinding/resources/example.qrc
\c [project/project.pro]
-\quotefile doc/src/declarative/snippets/qtbinding/resources/resources.pro
+\quotefile doc/src/snippets/declarative/qtbinding/resources/resources.pro
\c [project/main.cpp]
-\snippet doc/src/declarative/snippets/qtbinding/resources/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/resources/main.cpp 0
\c [project/main.qml]
-\snippet doc/src/declarative/snippets/qtbinding/resources/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/resources/main.qml 0
*/
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h b/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h
deleted file mode 100644
index 73d66b7..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-//![0]
-#include <QGraphicsWidget>
-#include <QPainter>
-
-class BlueCircle : public QGraphicsWidget
-{
- Q_OBJECT
-public:
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
- {
- painter->setPen(QColor(Qt::blue));
- painter->drawEllipse(0, 0, size().width(), size().height());
- }
-};
-//![0]
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro b/doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro
deleted file mode 100644
index 21c8a37..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-TEMPLATE = lib
-CONFIG += qt plugin
-QT += declarative
-
-HEADERS += redsquare.h \
- bluecircle.h
-
-SOURCES += shapesplugin.cpp
-
-DESTDIR = lib
-OBJECTS_DIR = tmp
-MOC_DIR = tmp
-
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml b/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
deleted file mode 100644
index ffcf79d..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
+++ /dev/null
@@ -1,32 +0,0 @@
-import Qt 4.7
-import Qt.widgets 4.7
-
-Rectangle {
- width: 200
- height: 200
-
- RedSquare {
- id: square
- width: 80
- height: 80
- }
-
- BlueCircle {
- anchors.left: square.right
- width: 80
- height: 80
- }
-
- QGraphicsWidget {
- anchors.top: square.bottom
- size.width: 80
- size.height: 80
- layout: QGraphicsLinearLayout {
- LayoutItem {
- preferredSize: "100x100"
- Rectangle { color: "yellow"; anchors.fill: parent }
- }
- }
- }
-}
-
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/qmldir b/doc/src/declarative/snippets/integrating/graphicswidgets/qmldir
deleted file mode 100644
index f94dad2..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/qmldir
+++ /dev/null
@@ -1 +0,0 @@
-plugin graphicswidgets lib
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h b/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h
deleted file mode 100644
index 3050662..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-//![0]
-#include <QGraphicsWidget>
-#include <QPainter>
-
-class RedSquare : public QGraphicsWidget
-{
- Q_OBJECT
-public:
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
- {
- painter->fillRect(0, 0, size().width(), size().height(), QColor(Qt::red));
- }
-};
-//![0]
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp b/doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp
deleted file mode 100644
index 4c18ef3..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-//![0]
-#include "redsquare.h"
-#include "bluecircle.h"
-
-#include <QtDeclarative/QDeclarativeExtensionPlugin>
-#include <QtDeclarative/qdeclarative.h>
-
-class ShapesPlugin : public QDeclarativeExtensionPlugin
-{
- Q_OBJECT
-public:
- void registerTypes(const char *uri) {
- qmlRegisterType<RedSquare>(uri, 1, 0, "RedSquare");
- qmlRegisterType<BlueCircle>(uri, 1, 0, "BlueCircle");
- }
-};
-
-#include "shapesplugin.moc"
-
-Q_EXPORT_PLUGIN2(shapesplugin, ShapesPlugin);
-//![0]
diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc
index 1a93d05..75c0f851 100644
--- a/doc/src/declarative/tutorial.qdoc
+++ b/doc/src/declarative/tutorial.qdoc
@@ -57,10 +57,10 @@ The tutorial's source code is located in the $QTDIR/examples/declarative/tutoria
Tutorial chapters:
-\list
-\o \l {QML Tutorial 1 - Basic Types}
-\o \l {QML Tutorial 2 - QML Component}
-\o \l {QML Tutorial 3 - States and Transitions}
+\list 1
+\o \l {QML Tutorial 1 - Basic Types}{Basic Types}
+\o \l {QML Tutorial 2 - QML Components}{QML Components}
+\o \l {QML Tutorial 3 - States and Transitions}{States and Transitions}
\endlist
*/
@@ -86,7 +86,7 @@ Here is the QML code for the application:
\section2 Import
First, we need to import the types that we need for this example. Most QML files will import the built-in QML
-types (like \l{Rectangle}, \l{Image}, ...) that come with Qt with:
+types (like \l{Rectangle}, \l{Image}, ...) that come with Qt, using:
\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 3
@@ -95,7 +95,7 @@ types (like \l{Rectangle}, \l{Image}, ...) that come with Qt with:
\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 1
We declare a root element of type \l{Rectangle}. It is one of the basic building blocks you can use to create an application in QML.
-We give it an \c{id} to be able to refer to it later. In this case, we call it \e page.
+We give it an \c{id} to be able to refer to it later. In this case, we call it "page".
We also set the \c width, \c height and \c color properties.
The \l{Rectangle} element contains many other properties (such as \c x and \c y), but these are left at their default values.
@@ -103,15 +103,16 @@ The \l{Rectangle} element contains many other properties (such as \c x and \c y)
\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 2
-We add a \l Text element as a child of our root element that will display the text 'Hello world!'.
+We add a \l Text element as a child of the root Rectangle element that displays the text 'Hello world!'.
The \c y property is used to position the text vertically at 30 pixels from the top of its parent.
-The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}.
-
The \c anchors.horizontalCenter property refers to the horizontal center of an element.
In this case, we specify that our text element should be horizontally centered in the \e page element (see \l{anchor-layout}{Anchor-based Layout}).
+The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}.
+
+
\section2 Viewing the example
To view what you have created, run the \l{Qt Declarative UI Runtime}{qml} tool (located in the \c bin directory) with your filename as the first argument.
@@ -124,7 +125,7 @@ bin/qml $QTDIR/examples/declarative/tutorials/helloworld/tutorial1.qml
/*!
\page qml-tutorial2.html
-\title QML Tutorial 2 - QML Component
+\title QML Tutorial 2 - QML Components
\contentspage QML Tutorial
\previouspage QML Tutorial 1 - Basic Types
\nextpage QML Tutorial 3 - States and Transitions
@@ -134,10 +135,10 @@ This chapter adds a color picker to change the color of the text.
\image declarative-tutorial2.png
Our color picker is made of six cells with different colors.
-To avoid writing the same code multiple times, we first create a new \c Cell component.
+To avoid writing the same code multiple times for each cell, we create a new \c Cell component.
A component provides a way of defining a new type that we can re-use in other QML files.
-A QML component is like a black-box and interacts with the outside world through properties, signals and slots and is generally
-defined in its own QML file (for more details, see \l {Defining new Components}).
+A QML component is like a black-box and interacts with the outside world through properties, signals and functions and is generally
+defined in its own QML file. (For more details, see \l {Defining new Components}).
The component's filename must always start with a capital letter.
Here is the QML code for \c Cell.qml:
@@ -157,7 +158,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{intro-properties}{Properties}).
+This property is just an alias to an existing property - the color of the rectangle that compose the cell (see \l{Adding new properties}).
\snippet examples/declarative/tutorials/helloworld/Cell.qml 5
diff --git a/doc/src/development/assistant-manual.qdoc b/doc/src/development/assistant-manual.qdoc
index 7d56ea1..afc6361 100644
--- a/doc/src/development/assistant-manual.qdoc
+++ b/doc/src/development/assistant-manual.qdoc
@@ -359,7 +359,7 @@
The \menu{Options} page lets you specify the homepage \QA will display when
you click the \gui{Home} button in \QA's main user interface. You can specify
- the hompage by typing it here or clicking on one of the buttons below the
+ the homepage by typing it here or clicking on one of the buttons below the
textbox. \gui{Current Page} sets the currently displayed page as your home
page while \gui{Restore to default} will reset your home page to the default
home page.
diff --git a/doc/src/development/developing-on-mac.qdoc b/doc/src/development/developing-on-mac.qdoc
index 785858f..0c0af79 100644
--- a/doc/src/development/developing-on-mac.qdoc
+++ b/doc/src/development/developing-on-mac.qdoc
@@ -41,9 +41,8 @@
/*!
\page developing-on-mac.html
- \title Developing Qt Applications on Mac OS X
- \brief A overview of items to be aware of when developing Qt applications
- on Mac OS X
+ \title Developing Qt Applications for Mac OS X
+ \brief Information for developing Qt applications for Mac OS X
\ingroup platform-specific
\tableofcontents
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index 688122b..c63e96c 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -347,6 +347,7 @@
\row \o vcapp \o Creates a Visual Studio Project file to build
an application.
\row \o vclib \o Creates a Visual Studio Project file to build a library.
+ \row \o vcsubdirs \o Creates a Visual Studio Solution file to build projects in sub-directories.
\endtable
See the \l{qmake Tutorial} for advice on writing project files for
diff --git a/doc/src/diagrams/modelview-move-rows-1.sk b/doc/src/diagrams/modelview-move-rows-1.sk
new file mode 100644
index 0000000..dc90cfb
--- /dev/null
+++ b/doc/src/diagrams/modelview-move-rows-1.sk
@@ -0,0 +1,271 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,220,515)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,665)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,664.044)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,425)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,337.5)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,605)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,515.177)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,575)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,485.177)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,277.5,575)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,335)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,415,575)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,545)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30.262,220,305.262)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,307.5)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,455.177)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,635)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,545.177)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30.956,415.038,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,455)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,367.5)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,277.5,605)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,365)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,415,605)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,277.5,635)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,395)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,415,635)
+le()
+lw(1)
+r(165,0,0,-230,210,705)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(229.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(424.478,672.184))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(229.44,433.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(424.44,345.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(229.44,643.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(424.478,642.184))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(229.44,403.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(424.44,315.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(229.44,613.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(424.478,523.317))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(286.94,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(229.44,373.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(424.44,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(229.44,583.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(424.478,493.317))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(286.94,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(229.44,343.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(424.44,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(229.44,553.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(424.478,463.317))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(286.94,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(229.44,313.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(424.44,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,523.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.133,283.402))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(424.44,285.64))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(424.478,433.317))
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(277.5,635,0)
+bs(252.5,635,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(292.5,380,0)
+bs(292.5,542.5,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(250,380,0)
+bs(290,380,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-move-rows-2.sk b/doc/src/diagrams/modelview-move-rows-2.sk
new file mode 100644
index 0000000..7ddb95e
--- /dev/null
+++ b/doc/src/diagrams/modelview-move-rows-2.sk
@@ -0,0 +1,271 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,220,515)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,665)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,664.044)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,425)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,337.5)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,605)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,605)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,575)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,575)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,275,455)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,335)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,415,455)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,545)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,545)
+fp((1,1,1))
+lw(1)
+r(29.6927,0,0,-30,220,305.262)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,307.5)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,635)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,635)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,694.044)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,455)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,367.5)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,275,485)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,365)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,415,485)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,275,515)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,395)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,415,515)
+le()
+lw(1)
+r(165,0,0,-230,210,705)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(229.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(424.478,672.184))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(229.44,433.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(424.44,345.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(229.44,643.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(424.478,642.184))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(229.44,403.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(424.44,315.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(229.44,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(424.44,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(284.44,493.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(229.44,373.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(424.44,493.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(229.44,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(424.44,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(284.44,463.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(229.44,343.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(424.44,463.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(229.44,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(424.44,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(284.44,433.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(229.44,313.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(424.44,433.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,523.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(424.44,523.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.133,283.402))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(424.44,285.64))
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(275,515,0)
+bs(252.5,515,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(292.5,380,0)
+bs(292.5,422.5,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(250,380,0)
+bs(290,380,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-move-rows-3.sk b/doc/src/diagrams/modelview-move-rows-3.sk
new file mode 100644
index 0000000..6c28bb9
--- /dev/null
+++ b/doc/src/diagrams/modelview-move-rows-3.sk
@@ -0,0 +1,136 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+G()
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,211.449,486.649)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,336.446,461.649)
+lw(1)
+r(30,0,0,-30,211.449,396.649)
+lw(1)
+r(30,0,0,-30,336.449,401.388)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,211.449,366.911)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,336.449,371.649)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,211.449,516.649)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,336.446,491.649)
+lw(1)
+r(30,0,0,-30,211.449,426.649)
+lw(1)
+r(30,0,0,-30,336.449,431.388)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,263.949,516.649)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,336.449,521.649)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,211.449,456.649)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(220.889,494.789))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(345.886,469.789))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(220.889,464.789))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(345.886,439.789))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(273.389,494.789))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(345.889,499.789))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(220.889,434.789))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(220.889,404.789))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(345.889,409.528))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(220.889,374.789))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(345.889,379.528))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(220.582,345.051))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(346.498,349.789))
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(263.949,516.649,0)
+bs(243.949,516.649,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(278.949,441.649,0)
+bs(278.949,484.149,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(241.449,441.649,0)
+bs(276.449,441.649,0)
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-move-rows-4.sk b/doc/src/diagrams/modelview-move-rows-4.sk
new file mode 100644
index 0000000..c74fd28
--- /dev/null
+++ b/doc/src/diagrams/modelview-move-rows-4.sk
@@ -0,0 +1,136 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+G()
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,211.449,482.601)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,336.449,487.601)
+lw(1)
+r(30,0,0,-30,211.449,392.781)
+lw(1)
+r(30,0,0,-30,336.449,397.34)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30.442,211.449,363.043)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,336.449,367.601)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,211.449,512.601)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,336.449,517.601)
+lw(1)
+r(30,0,0,-30,211.449,422.601)
+lw(1)
+r(30,0,0,-30,336.449,457.601)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,263.949,392.601)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,336.449,427.601)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,211.449,452.601)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(220.889,490.741))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(345.889,495.741))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(220.889,460.741))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(345.889,465.741))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(273.389,370.741))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(345.889,405.741))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(220.889,430.741))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(220.889,400.741))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(345.889,435.741))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(220.889,370.741))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(345.889,375.48))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(220.889,341.183))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(345.889,345.741))
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(263.949,392.601,0)
+bs(243.949,392.601,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(278.949,437.601,0)
+bs(278.949,395.101,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(241.449,437.601,0)
+bs(276.449,437.601,0)
+G_()
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/examples/elasticnodes.qdoc b/doc/src/examples/elasticnodes.qdoc
index edc62d8..e6e6594 100644
--- a/doc/src/examples/elasticnodes.qdoc
+++ b/doc/src/examples/elasticnodes.qdoc
@@ -83,7 +83,7 @@
also reimplements \l{QGraphicsItem::shape()}{shape()} to ensure its hit
area has an elliptic shape (as opposed to the default bounding rectangle).
- For edge management purposes the node provides a simple API for adding
+ For edge management purposes, the node provides a simple API for adding
edges to a node, and for listing all connected edges.
The \l{QGraphicsItem::advance()}{advance()} reimplementation is called
@@ -126,16 +126,21 @@
\snippet examples/graphicsview/elasticnodes/node.cpp 2
- The \e calculateForces() function implements the elastic forces effect that
- pulls and pushes on nodes in the grid. In addition to this algorithm, the
- user can move one node around with the mouse. Because we do not want the
- two to interfere, we start by checking if this \c Node is the current mouse
- grabber item (i.e., QGraphicsScene::mouseGrabberItem()). Because we need to
- find all neighboring (but not necessarily connected) nodes, we also make
- sure the item is part of a scene in the first place.
+ There are two ways to move a node. The \c calculateForces() function
+ implements the elastic effect that pulls and pushes on nodes in the grid.
+ In addition, the user can directly move one node around with the mouse.
+ Because we do not want the two approaches to operate at the same time on
+ the same node, we start \c calculateForces() by checking if this \c Node is
+ the current mouse grabber item (i.e., QGraphicsScene::mouseGrabberItem()).
+ Because we need to find all neighboring (but not necessarily connected)
+ nodes, we also make sure the item is part of a scene in the first place.
\snippet examples/graphicsview/elasticnodes/node.cpp 3
+ The "elastic" effect comes from an algorithm that applies pushing and
+ pulling forces. The effect is impressive, and surprisingly simple to
+ implement.
+
The algorithm has two steps: the first is to calculate the forces that push
the nodes apart, and the second is to subtract the forces that pull the
nodes together. First we need to find all the nodes in the graph. We call
@@ -143,19 +148,20 @@
qgraphicsitem_cast() to look for \c Node instances.
We make use of \l{QGraphicsItem::mapFromItem()}{mapFromItem()} to create a
- vector pointing from this node to each other node, in \l{The Graphics View
- Coordinate System}{local coordinates}. We use the decomposed components of
- this vector to determine the direction and strength of force that apply to
- the node. The forces are added up for each node, and weighted so that the
- closest nodes are given the strongest force. The sum of all forces are
- stored in \e xvel (X-velocity) and \e yvel (Y-velocity).
+ temporary vector pointing from this node to each other node, in \l{The
+ Graphics View Coordinate System}{local coordinates}. We use the decomposed
+ components of this vector to determine the direction and strength of force
+ that should apply to the node. The forces accumulate for each node, and are
+ then adjusted so that the closest nodes are given the strongest force, with
+ rapid degradation when distance increases. The sum of all forces is stored
+ in \c xvel (X-velocity) and \c yvel (Y-velocity).
\snippet examples/graphicsview/elasticnodes/node.cpp 4
- The edges between the nodes represent the forces that pull the nodes
- together. By visiting each edge that is connected to this node, we can use
- a similar approach as above to find the direction and strength of all
- forces. These forces are subtracted from \e xvel and \e yvel.
+ The edges between the nodes represent forces that pull the nodes together.
+ By visiting each edge that is connected to this node, we can use a similar
+ approach as above to find the direction and strength of all pulling forces.
+ These forces are subtracted from \c xvel and \c yvel.
\snippet examples/graphicsview/elasticnodes/node.cpp 5
@@ -166,20 +172,20 @@
\snippet examples/graphicsview/elasticnodes/node.cpp 6
- The final step of \e calculateForces() determines the node's new position.
+ The final step of \c calculateForces() determines the node's new position.
We add the force to the node's current position. We also make sure the new
position stays inside of our defined boundaries. We don't actually move the
- item in this function; that's done in a separate step, from \e advance().
+ item in this function; that's done in a separate step, from \c advance().
\snippet examples/graphicsview/elasticnodes/node.cpp 7
- The \e advance() function updates the item's current position. It is called
- from \e GraphWidget::timerEvent(). If the node's position changed, the
+ The \c advance() function updates the item's current position. It is called
+ from \c GraphWidget::timerEvent(). If the node's position changed, the
function returns true; otherwise false is returned.
\snippet examples/graphicsview/elasticnodes/node.cpp 8
- The \e Node's bounding rectangle is a 20x20 sized rectangle centered around
+ The \c Node's bounding rectangle is a 20x20 sized rectangle centered around
its origin (0, 0), adjusted by 2 units in all directions to compensate for
the node's outline stroke, and by 3 units down and to the right to make
room for a simple drop shadow.
@@ -188,8 +194,8 @@
The shape is a simple ellipse. This ensures that you must click inside the
node's elliptic shape in order to drag it around. You can test this effect
- by running the example, and zooming far enough in so that the nodes become
- very large. Without reimplementing \l{QGraphicsItem::shape()}{shape()}, the
+ by running the example, and zooming far in so that the nodes are very
+ large. Without reimplementing \l{QGraphicsItem::shape()}{shape()}, the
item's hit area would be identical to its bounding rectangle (i.e.,
rectangular).
@@ -197,7 +203,7 @@
This function implements the node's painting. We start by drawing a simple
dark gray elliptic drop shadow at (-7, -7), that is, (3, 3) units down and
- to the right.
+ to the right from the top-left corner (-10, -10) of the ellipse.
We then draw an ellipse with a radial gradient fill. This fill is either
Qt::yellow to Qt::darkYellow when raised, or the opposite when sunken. In
@@ -217,8 +223,8 @@
calculations.
This notification is the only reason why the nodes need to keep a pointer
- back to the \e GraphWidget. Another approach could be to provide such
- notification using a signal; in such case, \e Node would need to inherit
+ back to the \c GraphWidget. Another approach could be to provide such
+ notification using a signal; in such case, \c Node would need to inherit
from QGraphicsObject.
\snippet examples/graphicsview/elasticnodes/node.cpp 12
@@ -226,14 +232,14 @@
Because we have set the \l{QGraphicsItem::ItemIsMovable}{ItemIsMovable}
flag, we don't need to implement the logic that moves the node according to
mouse input; this is already provided for us. We still need to reimplement
- the mouse press and release handlers though, to update the nodes' visual
+ the mouse press and release handlers, though, to update the nodes' visual
appearance (i.e., sunken or raised).
\section1 Edge Class Definition
- The \e Edge class represents the arrow-lines between the nodes in this
+ The \c Edge class represents the arrow-lines between the nodes in this
example. The class is very simple: it maintains a source- and destination
- node pointer, and provides an \e adjust() function that makes sure the line
+ node pointer, and provides an \c adjust() function that makes sure the line
starts at the position of the source, and ends at the position of the
destination. The edges are the only items that change continuously as
forces pull and push on the nodes.
@@ -242,13 +248,13 @@
\snippet examples/graphicsview/elasticnodes/edge.h 0
- \e Edge inherits from QGraphicsItem, as it's a simple class that has no use
+ \c Edge inherits from QGraphicsItem, as it's a simple class that has no use
for signals, slots, and properties (compare to QGraphicsObject).
The constructor takes two node pointers as input. Both pointers are
mandatory in this example. We also provide get-functions for each node.
- The \e adjust() function repositions the edge, and the item also implements
+ The \c adjust() function repositions the edge, and the item also implements
\l{QGraphicsItem::boundingRect()}{boundingRect()} and
\{QGraphicsItem::paint()}{paint()}.
@@ -256,7 +262,7 @@
\snippet examples/graphicsview/elasticnodes/edge.cpp 0
- The \e Edge constructor initializes its arrowSize data member to 10 units;
+ The \c Edge constructor initializes its \c arrowSize data member to 10 units;
this determines the size of the arrow which is drawn in
\l{QGraphicsItem::paint()}{paint()}.
@@ -265,7 +271,7 @@
This ensures that the edge items are not considered for mouse input at all
(i.e., you cannot click the edges). Then, the source and destination
pointers are updated, this edge is registered with each node, and we call
- \e adjust() to update this edge's start end end position.
+ \c adjust() to update this edge's start end end position.
\snippet examples/graphicsview/elasticnodes/edge.cpp 1
@@ -274,7 +280,7 @@
\snippet examples/graphicsview/elasticnodes/edge.cpp 2
- In \e adjust(), we define two points: \e sourcePoint, and \e destPoint,
+ In \c adjust(), we define two points: \c sourcePoint, and \c destPoint,
pointing at the source and destination nodes' origins respectively. Each
point is calculated using \l{The Graphics View Coordinate System}{local
coordinates}.
@@ -295,7 +301,7 @@
It's important to notice that we call
\l{QGraphicsItem::prepareGeometryChange()}{prepareGeometryChange()} in this
- function. The reason is that the variables \e sourcePoint and \e destPoint
+ function. The reason is that the variables \c sourcePoint and \c destPoint
are used directly when painting, and they are returned from the
\l{QGraphicsItem::boundingRect()}{boundingRect()} reimplementation. We must
always call
@@ -338,26 +344,26 @@
\section1 GraphWidget Class Definition
- \e GraphWidget is a subclass of QGraphicsView, which provides the main
+ \c GraphWidget is a subclass of QGraphicsView, which provides the main
window with scrollbars.
\snippet examples/graphicsview/elasticnodes/graphwidget.h 0
- It provides a basic constructor that initializes the scene, an \e
+ The class provides a basic constructor that initializes the scene, an \c
itemMoved() function to notify changes in the scene's node graph, a few
event handlers, a reimplementation of
\l{QGraphicsView::drawBackground()}{drawBackground()}, and a helper
- function for scaling the view by mouse or keyboard.
+ function for scaling the view by using the mouse wheel or keyboard.
\snippet examples/graphicsview/elasticnodes/graphwidget.cpp 0
- \e GraphicsWidget's constructor creates the scene, and because most items
- move around most of the time, it sets QGraphicsScene::NoIndex. Then the
- scene gets a fixed \l{QGraphicsScene::sceneRect}{scene rectangle}.
- The scene is then assigned to the \e GraphWidget view.
+ \c GraphicsWidget's constructor creates the scene, and because most items
+ move around most of the time, it sets QGraphicsScene::NoIndex. The scene
+ then gets a fixed \l{QGraphicsScene::sceneRect}{scene rectangle}, and is
+ assigned to the \c GraphWidget view.
The view enables QGraphicsView::CacheBackground to cache rendering of its
- static and somewhat complex background. Because the graph renders a close
+ static, and somewhat complex, background. Because the graph renders a close
collection of small items that all move around, it's unnecessary for
Graphics View to waste time finding accurate update regions, so we set the
QGraphicsView::BoundingRectViewportUpdate viewport update mode. The default
@@ -381,15 +387,15 @@
\snippet examples/graphicsview/elasticnodes/graphwidget.cpp 2
- \e GraphWidget is notified of node movement through this \e itemMoved()
+ \c GraphWidget is notified of node movement through this \c itemMoved()
function. Its job is simply to restart the main timer in case it's not
running already. The timer is designed to stop when the graph stabilizes,
and start once it's unstable again.
\snippet examples/graphicsview/elasticnodes/graphwidget.cpp 3
- This is \e GraphWidget's key event handler. The arrow keys move the center
- node around, the '+' and '-' keys zoom in and out by calling \e
+ This is \c GraphWidget's key event handler. The arrow keys move the center
+ node around, the '+' and '-' keys zoom in and out by calling \c
scaleView(), and the enter and space keys randomize the positions of the
nodes. All other key events (e.g., page up and page down) are handled by
QGraphicsView's default implementation.
@@ -398,16 +404,16 @@
The timer event handler's job is to run the whole force calculation
machinery as a smooth animation. Each time the timer is triggered, the
- handler will find all nodes in the scene, and call \e
+ handler will find all nodes in the scene, and call \c
Node::calculateForces() on each node, one at a time. Then, in a final step
- it will call \e Node::advance() to move all nodes to their new positions.
- By checking the return value of \e advance(), we can decide if the grid
+ it will call \c Node::advance() to move all nodes to their new positions.
+ By checking the return value of \c advance(), we can decide if the grid
stabilized (i.e., no nodes moved). If so, we can stop the timer.
\snippet examples/graphicsview/elasticnodes/graphwidget.cpp 5
In the wheel event handler, we convert the mouse wheel delta to a scale
- factor, and pass this factor to \e scaleView(). This approach takes into
+ factor, and pass this factor to \c scaleView(). This approach takes into
account the speed that the wheel is rolled. The faster you roll the mouse
wheel, the faster the view will zoom.
@@ -415,24 +421,24 @@
The view's background is rendered in a reimplementation of
QGraphicsView::drawBackground(). We draw a large rectangle filled with a
- linear gradient, with a drop shadow, and then render text in top. The text
- is rendered twice to give a similar simple drop-shadow effect.
+ linear gradient, add a drop shadow, and then render text on top. The text
+ is rendered twice for a simple drop-shadow effect.
This background rendering is quite expensive; this is why the view enables
QGraphicsView::CacheBackground.
\snippet examples/graphicsview/elasticnodes/graphwidget.cpp 7
- The \e scaleView() helper function checks that the scale factor stays
+ The \c scaleView() helper function checks that the scale factor stays
within certain limits (i.e., you cannot zoom too far in nor too far out),
- and then applies this scale.
+ and then applies this scale to the view.
\section1 The main() Function
- In contrast to the complexity of the rest of this example, the \e main()
+ In contrast to the complexity of the rest of this example, the \c main()
function is very simple: We create a QApplication instance, seed the
- randomizer using qsrand(), and then create and show an instance of \e
- GraphWidget. Because all nodes in the grid are moved initially, the \e
+ randomizer using qsrand(), and then create and show an instance of \c
+ GraphWidget. Because all nodes in the grid are moved initially, the \c
GraphWidget timer will start immediately after control has returned to the
event loop.
*/
diff --git a/doc/src/examples/fingerpaint.qdoc b/doc/src/examples/fingerpaint.qdoc
index e5eb4ef..7eb1512 100644
--- a/doc/src/examples/fingerpaint.qdoc
+++ b/doc/src/examples/fingerpaint.qdoc
@@ -46,5 +46,5 @@
The Finger Paint example shows the use of multi-touch with a custom widget
to create a simple painting application.
- \image multitouch-fingerpaint.png
+ \image multitouch-fingerpaint-example.png
*/
diff --git a/doc/src/examples/padnavigator.qdoc b/doc/src/examples/padnavigator.qdoc
index 70e131e..e29a3b2 100644
--- a/doc/src/examples/padnavigator.qdoc
+++ b/doc/src/examples/padnavigator.qdoc
@@ -43,9 +43,555 @@
\example graphicsview/padnavigator
\title Pad Navigator Example
- The Pad Navigator Example shows how you can use Graphics View
- together with embedded widgets to create a simple but useful
- dynamic user interface for embedded devices.
+ The Pad Navigator Example shows how you can use Graphics View together with
+ embedded widgets and Qt's \l{State Machine Framework} to create a simple
+ but useful, dynamic, animated user interface.
\image padnavigator-example.png
+
+ The interface consists of a flippable, rotating pad with icons that can be
+ selected using the arrow keys on your keyboard or keypad. Pressing enter
+ will flip the pad around and reveal its back side, which has a form
+ embedded into a QGraphicsProxyWidget. You can interact with the form, and
+ press the enter key to flip back to the front side of the pad at any time.
+
+ Graphics View provides the QGraphicsScene class for managing and
+ interacting with a large number of custom-made 2D graphical items derived
+ from the QGraphicsItem class, and a QGraphicsView widget for visualizing
+ the items, with support for zooming and rotation.
+
+ This example consists of a \c RoundRectItem class, a \c FlippablePad class,
+ a \c PadNavigator class, a \c SplashItem class, and a \c main() function.
+
+ \section1 RoundRectItem Class Definition
+
+ The \c RoundRectItem class is used by itself to diplay the icons on the
+ pad, and as a base class for \c FlippablePad, the class for the pad itself.
+ The role of the class is to paint a round rectangle of a specified size and
+ gradient color, and optionally to paint a pixmap icon on top. To support \c
+ FlippablePad it also allows filling its contents with a plain window
+ background color.
+
+ Let's start by reviewing the \c RoundRectItem class declaration.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.h 0
+
+ \c RoundRectItem inherits QGraphicsObject, which makes it easy to control
+ its properties using QPropertyAnimation. Its constructor takes a rectangle
+ to determine its bounds, and a color.
+
+ Besides implementing the mandatory \l{QGraphicsItem::paint()}{paint()} and
+ \l{QGraphicsItem::boundingRect()}{boundingRect()} pure virtual functions,
+ it also provides the \c pixmap and \c fill properties.
+
+ The \c pixmap property sets an optional pixmap that is drawn on top of the
+ round rectangle. The \c fill property will, when true, fill the round
+ rectangle contents with a fixed QPalette::Window background color.
+ Otherwise the contents are filled using a gradient based on the color
+ passed to \c RoundRectItem's constructor.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.h 1
+
+ The private data members are:
+
+ \list
+ \o \c pix: The optional pixmap that is drawn on top of the rectangle.
+ \o \c fillRect: Corresponds to the \c fill property.
+ \o \c color: The configurable gradient color fill of the rectangle.
+ \o \c bounds: The bounds of the rectangle.
+ \o \c gradient: A precalculated gradient used to fill the rectangle.
+ \endlist
+
+ We will now review the \c RoundRectItem implementation. Let's start by
+ looking at its constructor:
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 0
+
+ The constructor initializes its member variables and forwards the \c parent
+ argument to QGraphicsObject's constructor. It then constructs the linear
+ gradient that is used in \l{QGraphicsItem::paint()}{paint()} to draw the
+ round rectangle's gradient background. The linear gradient's starting point
+ is at the top-left corner of the bounds, and the end is at the bottom-left
+ corner. The start color is identical to the color passed as an argument,
+ and a slightly darker color is chosen for the final stop.
+
+ We store this gradient as a member variable to avoid having to recreate the
+ gradient every time the item is repainted.
+
+ Finally we set the cache mode
+ \l{QGraphicsItem::ItemCoordinateCache}{ItemCoordinateCache}. This mode
+ causes the item's rendering to be cached into an off-screen pixmap that
+ remains persistent as we move and transform the item. This mode is ideal
+ for this example, and works particularily well with OpenGL and OpenGL ES.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 1
+
+ The \c pixmap property implementation simple returns the member pixmap, or
+ sets it and then calls \l{QGraphicsItem::update()}{update()}.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 2
+
+ As the \l{QGraphicsItem::paint()}{paint()} implementation below draws a
+ simple drop shadow down and to the right of the item, we return a slightly
+ adjusted rectangle from \l{QGraphicsItem::boundingRect()}{boundingRect()}.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 3
+
+ The \l{QGraphicsItem::paint()}{paint()} implementation starts by rendering
+ a semi transparent black round rectangle drop shadow, two units down and to
+ the right of the main item.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 4
+
+ We then draw the "foreground" round rectangle itself. The fill depends on
+ the \c fill property; if true, we will with a plain QPalette::Window color.
+ We get the corrent brush from QApplication::palette(). We assign a single
+ unit wide pen for the stroke, assign the brush, and then draw the
+ rectangle.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 5
+
+ If a pixmap has been assigned to the \e pixmap property, we draw this
+ pixmap in the center of the rectangle item. The pixmaps are scaled to match
+ the size of the icons; in arguably a better approach would have been to
+ store the icons with the right size in the first places.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 6
+
+ Finally, for completeness we include the \c fill property implementation.
+ It returns the \c fill member variable's value, and when assigned to, it
+ calls \l{QGraphicsItem::update()}{update()}.
+
+ As mentioned already, \c RoundRectItem is the base class for \c
+ FlippablePad, which is the class representing the tilting pad itself. We
+ will proceed to reviewing \c FlippablePad.
+
+ \section1 FlippablePad Class Definition
+
+ \c FlippablePad is, in addition to its inherited \c RoundRectItem
+ responsibilities, responsible for creating and managing a grid of icons.
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.h 0
+
+ Its declaration is very simple: It inherits \c RoundRectItem and does not
+ need any special polymorphic behavior. It's suitable to declare its own
+ constructor, and a getter-function that allows \c PadNavigator to access
+ the icons in the grid by (row, column).
+
+ The example has no "real" behavior or logic of any kind, and because of
+ that, the icons do not need to provide any \e behavior or special
+ interactions management. In a real application, however, it would be
+ natural for the \c FlippablePad and its icons to handle more of the
+ navigation logic. In this example, we have chosen to leave this to
+ the \c PadNavigator class, which we will get back to below.
+
+ We will now review the \c FlippablePad implementation. This implementation
+ starts with two helper functions: \c boundsFromSize() and \c
+ posForLocation():
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.cpp 0
+
+ \c boundsForSize() takes a QSize argument, and returns the bounding
+ rectangle of the flippable pad item. The QSize determines how many rows and
+ columns the icon grid should have. Each icon is given 150x150 units of
+ space, and this determines the bounds.
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.cpp 1
+
+ \c posForLocation() returns the position of an icon given its row and
+ column position. Like \c boundsForSize(), the function assumes each icon is
+ given 150x150 units of space, and that all icons are centered around the
+ flippable pad item's origin (0, 0).
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.cpp 2
+
+ The \c FlippablePad constructor passes suitable bounds (using \c
+ boundsForSize()) and specific color to \c RoundRectItem's constructor.
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.cpp 3
+
+ It then loads pixmaps from compiled-in resources to use for its icons.
+ QDirIterator is very useful in this context, as it allows us to fetch all
+ resource "*.png" files inside the \c :/images directory without explicitly
+ naming the files.
+
+ We also make sure not to load more pixmaps than we need.
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.cpp 4
+
+ Now that we have the pixmaps, we can create icons, position then and assign
+ pixmaps. We start by finding a suitable size and color for the icons, and
+ initializing a convenient grid structure for storing the icons. This \c
+ iconGrid is also used later to find the icon for a specific (column, row)
+ location.
+
+ For each row and column in our grid, we proceed to constructing each icon
+ as an instance of \c RoundRectItem. The item is placed by using the \c
+ posForLocation() helper function. To make room for the slip-behind
+ selection item, we give each icon a \l{QGraphicsItem::zValue()}{Z-value} of
+ 1. The pixmaps are distributed to the icons in round-robin fasion.
+
+ Again, this approach is only suitable for example purposes. In a real-life
+ application where each icon represents a specific action, it would be more
+ natural to assign the pixmaps directly, or that the icons themselves
+ provide suitable pixmaps.
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.cpp 5
+
+ Finally, the \c iconAt() function returns a pointer to the icon at a
+ specific row and column. It makes a somewhat bold assumption that the input
+ is valid, which is fair because the \c PadNavigator class only calls this
+ function with correct input.
+
+ We will now review the \c SplashItem class.
+
+ \section1 SplashItem Class Definition
+
+ The \c SplashItem class represents the "splash window", a semitransparent
+ white overlay with text that appears immediately after the application has
+ started, and disappears after pressing any key. The animation is controlled
+ by \c PadNavigator; this class is very simple by itself.
+
+ \snippet examples/graphicsview/padnavigator/splashitem.h 0
+
+ The class declaration shows that \c SplashItem inherits QGraphicsObject to
+ allow it to be controlled by QPropertyAnimation. It reimplements the
+ mandatory \l{QGraphicsItem::paint()}{paint()} and
+ \l{QGraphicsItem::boundingRect()}{boundingRect()} pure virtual functions,
+ and keeps a \c text member variable which will contain the information text
+ displayed on this splash item.
+
+ Let's look at its implementation.
+
+ \snippet examples/graphicsview/padnavigator/splashitem.cpp 0
+
+ The constructor forwards to QGraphicsObject as expected, assigns a text
+ message to the \c text member variable, and enables
+ \l{QGraphicsItem::DeviceCoordinateCache}{DeviceCoordinateCache}. This cache
+ mode is suitable because the splash item only moves and is never
+ transformed, and because it contains text, it's important that it has a
+ pixel perfect visual appearance (in constrast to
+ \l{QGraphicsItem::ItemCoordinateCache}{ItemCoordinateCache}, where the
+ visual appearance is not as good).
+
+ We use caching to avoid having to relayout and rerender the text for each
+ frame. An alterative approach would be to use the new QStaticText class.
+
+ \snippet examples/graphicsview/padnavigator/splashitem.cpp 1
+
+ \c SplashItem's bounding rectangle is fixed at (400x175).
+
+ \snippet examples/graphicsview/padnavigator/splashitem.cpp 2
+
+ The \l{QGraphicsItem::paint()}{paint()} implementation draws a clipped
+ round rectangle with a thick 2-unit border and a semi-transparent white
+ background. It proceeds to finding a suitable text area by adjusting the
+ splash item's bounding rectangle with 10 units in each side. The text is
+ rendered inside this rectangle, with top-left alignment, and with word
+ wrapping enabled.
+
+ The main class now remains. We will proceed to reviewing \c PadNavigator.
+
+ \section1 PadNavigator Class Definition
+
+ \c PadNavigator represents the main window of our Pad Navigator Example
+ application. It creates and controls a somewhat complex state machine, and
+ several animations. Its class declaration is very simple:
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.h 0
+
+ It inherits QGraphicsView and reimplements only one function:
+ \l{QGraphicsView::resizeEvent()}{resizeEvent()}, to ensure the scene is
+ scaled to fit inside the view when resizing the main window.
+
+ The \c PadNavigator constructor takes a QSize argument that determines the
+ number or rows and columns in the grid.
+
+ It also keeps a private member instance, \c form, which is the generated
+ code for the pad's back side item's QGraphicsProxyWidget-embedded form.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 0
+
+ \c PadNavigator's constructor is a bit long. In short, its job is to create
+ all items, including the \c FlippablePad, the \c SplashItem and the
+ QGraphicsProxyWidget \c backItem, and then to set up all animations, states
+ and transitions that control the behavior of the application.
+
+ It starts out simple, by forwarding to QGraphicsView's constructor.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 1
+
+ The first item to be created is \c SplashItem. This is going to be a top-level
+ item in the scene, next to \c FlippablePad, and stacked on top of it, so we
+ assign it a \l{QGraphicsItem::zValue()}{Z-value} of 1.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 2
+
+ Now we construct the \c FlippablePad item, passing its column-row count to
+ its constructor.
+
+ The pad is constrolled by three transformations, and we create one
+ QGraphicsRotation object for each of these.
+
+ \list
+ \o \c flipRotation: Rotates the grid around its Qt::YAxis. This rotation is
+ animated from 0 to 180, and eventually back, when enter is pressed on the
+ keyboard, flipping the pad around.
+ \o \c xRotation: Rotates the grid around its Qt::XAxis. This is used to
+ tilt the pad vertically corresponding to which item is currently selected.
+ This way, the selected item is always kept in front.
+ \o \c yRotation: Rotates the grid around its Qt::YAxis. This is used to
+ tilt the pad horizontally corresponding to which item is selected. This
+ way, the selected item is always kept in front.
+ \endlist
+
+ The combination of all three rotations is assigned via
+ QGraphicsItem::setTransformations().
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 3
+
+ Now we construct the QGraphicsProxyWidget-embedded \c backItem. The proxy
+ widget is created as a child of the pad. We create a new QWidget and
+ populate it with the \c form member. To ensure the \c hostName line edit is
+ the first to receive input focus when this item is shown, we call
+ \l{QWidget::setFocus()}{setFocus()} immediately. This will not give the
+ widget focus right away; it will only prepare the item to automatically
+ receive focus once it is shown.
+
+ The QWidget based form is embedded into the proxy widget. The proxy is
+ hidden initially; we only want to show it when the pad is rotated at least
+ 90 degrees, and we also rotate the proxy itself by 180 degrees. This way we
+ give the impression that the proxy widget is "behind" the flipped pad, when
+ in fact, it's actually \e{on top of it}.
+
+ We enable \l{QGraphicsItem::ItemCoordinateCache}{ItemCoordinateCache} to
+ ensure the flip animation can run smoothly.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 4
+
+ We now create the selection item. This is simply another instance of \c
+ RoundRectItem that is slightly larger than the icons on the pad. We create
+ it as an immediate child of the \c FlippablePad, so the selection item is a
+ sibling to all the icons. By giving it a
+ \l{QGraphicsItem::zValue()}{Z-value} of 0.5 we ensure it will slide beteen
+ the pad and its icons.
+
+ What follows now is a series of animation initializations.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 5
+
+ We begin with the animations that apply to the splash item. The first
+ animation, \c smoothSplashMove, ensures that the "y" property of \c splash
+ will be animated with a 250-millisecond duration
+ \l{QEasingCurve::InQuad}{InQuad} easing function. \c smoothSplashOpacity
+ ensures the opacity of \c splash eases in and out in 250 milliseconds.
+
+ The values are assigned by \c PadNavigator's state machine, which is
+ created later.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 6
+
+ These are the animations that control the selection item's movement and the
+ \c xRotation and \c yRotation QGraphicsRotation objects that tilt the pad.
+ All animations have a duration of 125 milliseconds, and they all use the
+ \l{QEasingCurve::InOutQuad}{InOutQuad} easing function.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 7
+
+ We now create the animations that control the flip-effect when you press
+ the enter key. The main goal is to rotate the pad by 180 degrees or back,
+ but we also need to make sure the selection item's tilt rotations are reset
+ back to 0 when the pad is flipped, and restored back to their original
+ values when flipped back:
+
+ \list
+ \o \c smoothFlipRotation: Animates the main 180 degree rotation of the pad.
+ \o \c smoothFlipScale: Scales the pad out and then in again while the pad is rotating.
+ \o \c smoothFlipXRotation: Animates the selection item's X-tilt to 0 and back.
+ \o \c smoothFlipYRotation: Animates the selection item's Y-tilt to 0 and back.
+ \o \c flipAnimation: A parallel animation group that ensures all the above animations are run in parallel.
+ \endlist
+
+ All animations are given a 500 millisecond duration and an
+ \l{QEasingCurve::InOutQuad}{InOutQuad} easing function.
+
+ It's worth taking a close look at \c smoothFlipScale. This animation's
+ start and end values are both 1.0, but at animation step 0.5 the
+ animation's value is 0.7. This means that after 50% of the animation's
+ duration, or 250 milliseconds, the pad will be scaled down to 0.7x of its
+ original size, which gives a great visual effect while flipping.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 8
+
+ This section uses a trick to ensure that certain properties are assigned
+ precisely when the flip animation passes 50%, or 90 degrees, rotation. In
+ short, the pad's icons and selection item are all hidden, the pad's \c fill
+ property is enabled, and \c backItem is shown when flipping over. When
+ flipping back, the reverse properties are applied.
+
+ The way this is achieved is by running a sequential animation in parallel
+ to the other animations. This sequence, dubbed \c setVariablesSequence,
+ starts with a 250 millisecond pause, and then executes several animations
+ with a duration of 0. Each animation will ensure that properties are set
+ immediate at this point.
+
+ This approach can also be used to call functions or set any other
+ properties at a specific time while an animation is running.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 9
+
+ We will now create the state machine. The whole \c PadNavigator state
+ machinery is controlled by one single state machine that has a
+ straight-forward state structure. The state engine itself is created
+ as a child of the \c PadNavigator itself. We then create three top level
+ states:
+
+ \list
+ \o \c splashState: The initial state where the splash item is visible.
+ \o \c frontState: The base state where the splash is gone and we can see
+ the front side of the pad, and navigate the selection item.
+ \o \c backState: The flipped state where the \c backItem is visible, and we
+ can interact with the QGraphicsProxyWidget-embedded form.
+ \endlist
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 10
+
+ Each state assigns specific properties to objects on entry. Most
+ interesting perhaps is the assignment of the value 0.0 to the pad's \c
+ flipRotation angle property when in \c frontState, and 180.0 when in \c
+ backState. At the end of this section we register default animations with
+ the state engine; these animations will apply to their respective objects
+ and properties for any state transition. Otherwise it's common to assign
+ animations to specific transitions.
+
+ The \c splashState state is set as the initial state. This is required
+ before we start the state engine. We proceed with creating some
+ transitions.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 11
+
+ QEventTransition defines a very flexible transition type. You can use this
+ class to trigger a transition based on an object receiving an event of a
+ specific type. In this case, we would like to transition from \c
+ splashState into \c frontState if \c PadNavigator receives any key press
+ event (QEvent::KeyPress).
+
+ We register the \c splashItem's animations to this transition to ensure they
+ are used to animate the item's movement and opacity.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 12
+
+ We use QKeyEventTransition to capture specific key events. In this case, we
+ detect that the user presses Qt::Key_Return or Qt::Key_Enter, and use this
+ to trigger transitions between \c frontState and backState. We register \c
+ flipAnimation, our complex parallel animation group, with these
+ transitions.
+
+ We continue by defining the states for each of the icons in the grid.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 13
+
+ We will use state groups to control transitions between icons. Each icon
+ represents a \e substate of \c frontState. We will then define transitions
+ between the states by detecting key presses, using QKeyEventTransition.
+
+ We start by creating all the substates, and at the same time we create a
+ temporary grid structure for the states to make it easier to find which
+ states represents icons that are up, down, left and to the right each
+ other.
+
+ Once the first substate is known, we set this up as the initial substate of
+ \c frontState. We will use the (0, 0), or top-left, icon for the initial
+ substate. We initialze the selection item's position to be exactly where
+ the top-left icon is.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 14
+
+ We can now create four transitions for each icon. Each transition ensures
+ that we move to the state corresponding to which arrow key has been
+ pressed. It's clear from this techinique that we could design any other
+ specific transitions to and from each of the sub states depending on these
+ and other keys.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 15
+
+ Also, for each of the icons, we assign suitable values to the \c xRotation
+ and \c yRotation objects' "angle"-properties. If you recall, these
+ properties "tilt" the pad corresponding to which item is currently
+ selected. We ensure each icon is invisible when the pad is flipped, and
+ visible when the pad is not flipped. To ensure the visible property is
+ assigned at the right time, we add property-controlling animations to the
+ \c setVariableSequence animation defined earlier.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 16
+
+ We are now finished with all states, transitions, and animations. We now
+ create the scene that will contain all our items. The scene gets a defined
+ background pixmap, and we disable item indexing (as most items in this
+ scene are animated). We add our \c pad item to the scene, and use its
+ bounding rectangle to fixate the scene rectangle. This rectangle is used by
+ the view to find a suitable size for the application window.
+
+ Then the scene is assigned to the view, or in our case, \c PadNavigator
+ itself.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 17
+
+ Now that the scene has received its final size, we can position the splash
+ item at the very top, find its fade-out position, and add it to the scene.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 18
+
+ The view toggles a few necessary properties:
+
+ \list
+ \o It disables its scroll bars - this application has no use for scroll bars.
+ \o It assigns a minimum size. This is necessary to avoid numerical errors
+ in our fit-in-view \c resizeEvent() implementation.
+ \o It sets \l{QGraphicsView::FullViewportUpdate}{FullViewportUpdate}, to
+ ensure QGraphicsView doesn't spend time figuring out precisely what needs
+ to be redrawn. This application is very simple - if anything changes,
+ everything is updated.
+ \o It enables background caching - this makes no performance difference
+ with OpenGL, but without OpenGL it avoids unnecessary re-scaling of the
+ background pixmap.
+ \o It sets render hints that increase rendering quality.
+ \o If OpenGL is supported, a QGLWidget viewport is assigned to the view.
+ \endlist
+
+ Finally, we start the state engine.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 19
+
+ The \l{QGraphicsView::resizeEvent()}{resizeEvent()} implementation calls
+ the base implementation, and then calls QGraphicsView::fitInView() to scale
+ the scene so that it fits perfectly inside the view.
+
+ By resizing the main application window, you can see this effect yourself.
+ The scene contents grow when you make the window larger, and shrink when
+ you make it smaller, while keeping the aspect ratio intact.
+
+ \section1 The main() Function
+
+ \snippet examples/graphicsview/padnavigator/main.cpp 0
+
+ The \c main function creates the QApplication instance, uses
+ Q_INIT_RESOURCE to ensure our compiled-in resources aren't removed by the
+ linker, and then creates a 3x3 \c PadNavigator instance and shows it.
+
+ Our flippable pad shows up with a suitable splash item once control returns
+ to the event loop.
+
+ \section1 Performance Notes
+
+ The example uses OpenGL if this is available, to achieve optimal
+ performance; otherwise perspective tranformations can be quite costly.
+
+ Although this example does use QGraphicsProxyWidget to demonstrate
+ integration of Qt widget components integrated into Graphics View, using
+ QGraphicsProxyWidget comes with a performance penalty, and is therefore not
+ recommended for embedded development.
+
+ This example uses extensive item caching to avoid rerendering of static
+ elements, at the expense of graphics memory.
*/
diff --git a/doc/src/examples/pinchzoom.qdoc b/doc/src/examples/pinchzoom.qdoc
index 726b1b3..867b2b3 100644
--- a/doc/src/examples/pinchzoom.qdoc
+++ b/doc/src/examples/pinchzoom.qdoc
@@ -46,5 +46,5 @@
The Pinch Zoom example shows how to use low-level multi-touch information
to recognize a gesture.
- \image multitouch-pinchzoom.png
+ \image multitouch-pinchzoom-example.png
*/
diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc
index 93e4a46..c2237d6 100644
--- a/doc/src/examples/qml-examples.qdoc
+++ b/doc/src/examples/qml-examples.qdoc
@@ -40,221 +40,348 @@
****************************************************************************/
/*!
- \title Animations
- \example declarative/animations
+ \title Animation: Basics
+ \example declarative/animation/basics
- This example shows how to use animations in QML.
+ This example shows how to create \l{QML Animation}{animations} in QML.
*/
/*!
- \title AspectRatio
- \example declarative/aspectratio
+ \title Animation: Behaviors
+ \example declarative/animation/behaviors
- This example shows how to implement different aspect ratios in QML.
+ This example shows how to use QML behaviors.
*/
/*!
- \example declarative/behaviors
- \title Behaviors
+ \title Animation: Easing types
+ \example declarative/animation/easing
+
+ This example shows the different easing modes available for \l{QML Animation}{animations}.
*/
/*!
- \title Border Image
- \example declarative/border-image
+ \title Animation: States
+ \example declarative/animation/states
- This example shows how to use a BorderImage in QML.
+ This example shows how to use \l{States}{states} and \l{Transitions}{transitions}.
*/
/*!
- \title Clocks
- \example declarative/clocks
+ \title Image Elements: Border Image
+ \example declarative/imageelements/borderimage
- This example shows how to create a Clock component and reuse it in a grid.
+ This example shows how to use the BorderImage element.
*/
/*!
- \title Connections
- \example declarative/connections
+ \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
+ documentation, which highlights the main principles demonstrated in each example.
+
+ Furthermore, here are additional pages that discuss each example in detail:
+
+ \list
+ \o \l {declarative/cppextensions/referenceexamples/adding}{Adding Types}
+ \o \l {declarative/cppextensions/referenceexamples/properties}{Object and List Property Types}
+ \o \l {declarative/cppextensions/referenceexamples/coercion}{Inheritance and Coercion}
+ \o \l {declarative/cppextensions/referenceexamples/default}{Default Property}
+ \o \l {declarative/cppextensions/referenceexamples/grouped}{Grouped Properties}
+ \o \l {declarative/cppextensions/referenceexamples/attached}{Attached Properties}
+ \o \l {declarative/cppextensions/referenceexamples/signal}{Signal Support}
+ \o \l {declarative/cppextensions/referenceexamples/valuesource}{Property Value Source}
+ \o \l {declarative/cppextensions/referenceexamples/binding}{Binding}
+ \endlist
- This example shows how to use a Connection element in QML.
+ \note These examples all print information to the console to demonstrate the concepts presented.
+ Ensure that you are able to view the application output when running these examples.
+ For example, the dbgView tool on Windows can be used to display application output.
*/
/*!
- \title Dial
- \example declarative/dial
+ \title C++ Extensions: Plugins
+ \example declarative/cppextensions/plugins
- This example shows how to implement a dial in QML.
+ This example shows how to create a C++ plugin extension by subclassing QDeclarativeExtensionPlugin.
*/
/*!
- \title Dynamic
- \example declarative/dynamic
+ \title Graphics Layouts
+ \example declarative/cppextensions/qgraphicslayouts/graphicsLayouts
- This example shows how to create dynamic objects QML.
+ This example show how to integrate Qt \l{Graphics View Framework}{Graphics View} components
+ like QGraphicsLayoutItem, QGraphicsLinearLayout and QGraphicsGridLayout into QML.
*/
+/*!
+ \title Layout Item
+ \example declarative/cppextensions/qgraphicslayouts/layoutItem
+ This example show how to integrate QML into an existing
+ \l{Graphics View Framework}{Graphics View}-based application.
+*/
/*!
- \example declarative/extending
- \title Extending
+ \page declarative-cppextensions-qgraphicslayouts.html
+ \title C++ Extensions: QGraphicsLayouts
+
+ These examples show how to integrate \l{Graphics View Framework}{Graphics View}
+ layout components with QML:
+
+ \list
+ \o \l{declarative/cppextensions/qgraphicslayouts/graphicsLayouts}{Graphics Layouts}
+ \o \l{declarative/cppextensions/qgraphicslayouts/layoutItem}{Layout Item}
+ \endlist
*/
/*!
- \example declarative/fillmode
- \title Fillmode
+ \title C++ Extensions: QWidgets
+ \example declarative/cppextensions/qwidgets
+
+ This example shows how to embed QWidget-based objects into QML using QGraphicsProxyWidget.
*/
/*!
- \title Flipable
- \example declarative/flipable
+ \title C++ Extensions: Image Provider
+ \example declarative/cppextensions/imageprovider
- This example shows how to use a Flipable element in QML.
+ This examples shows how to use QDeclarativeImageProvider to serve images asynchronously
+ into a QML item.
*/
/*!
- \title Focus
- \example declarative/focus
+ \title C++ Extensions: Network access manager
+ \example declarative/cppextensions/networkaccessmanagerfactory
- This example shows how to handle keys and focus in QML.
+ This example shows how to use QDeclarativeNetworkAccessManagerFactory to create a QNetworkAccessManager
+ with a proxy.
+*/
- \image qml-focus-example.png
+/*!
+ \title Internationlization
+ \example declarative/i18n
+
+ This example shows how to enable text translation in QML.
*/
/*!
- \example declarative/fonts
- \title Fonts
+ \title Positioners
+ \example declarative/positioners
+
+ This example shows how to use positioner elements such as Row, Column,
+ Grid and Flow.
*/
/*!
- \example declarative/gridview
- \title GridView
+ \title Key Interaction: Focus
+ \example declarative/keyinteraction/focus
+
+ This example shows how to handle keys and focus in QML.
+
+ \image qml-focus-example.png
*/
/*!
- \example declarative/imageprovider
- \title Image Provider
+ \title Models and Views: GridView
+ \example declarative/modelviews/gridview
+
+ This example shows how to use the GridView element.
*/
/*!
- \example declarative/images
- \title Images
+ \title Models and Views: ListView
+ \example declarative/modelviews/listview
+
+ This example shows how to use the ListView element.
*/
/*!
- \example declarative/layouts
- \title Layouts
+ \title Models and Views: Object ListModel
+ \example declarative/modelviews/objectlistmodel
+
+ This example shows how to create a C++ extension that exposes a
+ QList<QObject*> as a model in QML.
*/
/*!
- \example declarative/listmodel-threaded
- \title ListModel Threaded
+ \title Models and Views: Package
+ \example declarative/modelviews/package
+
+ This example shows how to use the Package element.
*/
/*!
- \example declarative/listview
- \title ListView
+ \title Models and Views: Parallax
+ \example declarative/modelviews/parallax
+
+ This example shows how to combine and switch between views.
*/
/*!
- \example declarative/mousearea
- \title Mouse Area
+ \title Models and Views: String ListModel
+ \example declarative/modelviews/stringlistmodel
+
+ This example shows how to create a C++ extension that exposes a
+ QStringList as a model in QML.
*/
/*!
- \example declarative/objectlistmodel
- \title Object ListModel
+ \title Models and Views: WebView
+ \example declarative/modelviews/webview
+
+ This example shows how to use the WebView element.
+*/
+
+/*!
+ \title SQL Local Storage
+ \example declarative/sqllocalstorage
+
+ This example shows how to use the SQL Local Storage API in QML.
*/
/*!
- \example declarative/package
- \title Package
+ \title Text: Fonts
+ \example declarative/text/fonts
+
+ This example shows how to discover available fonts from QML and use
+ fonts in different ways.
*/
/*!
- \example declarative/parallax
- \title Parallax
+ \title Threading: Threaded ListModel
+ \example declarative/threading/threadedlistmodel
+
+ This example shows how to use a ListModel from multiple threads using
+ WorkerScript.
*/
/*!
- \example declarative/plugins
- \title Plugins
+ \title Threading: WorkerScript
+ \example declarative/threading/workerscript
+
+ This example shows how to use the WorkerScript element for threading in QML.
*/
/*!
- \example declarative/progressbar
- \title Progress Bars
+ \title Toys: Clocks
+ \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
+ and \l SpringFollow animations.
*/
/*!
- \example declarative/proxywidgets
- \title Proxy Widgets
+ \title Toys: Corkboards
+ \example declarative/toys/corkboards
+
+ This example presents a flickable set of interactive corkboards. It is created
+ through a combination of elements like \l ListModel, \l Repeater and \l TextEdit
+ together with rotation and scaling transforms, animation and mouse interaction.
*/
/*!
- \example declarative/scrollbar
- \title Scrollbar
+ \title Toys: Dial
+ \example declarative/toys/dial
+
+ This example presents an interactive speedometer-type dial by combining
+ \l Image elements with \l Rotation transforms and \l SpringFollow animations.
*/
/*!
- \example declarative/searchbox
- \title Search Box
+ \title Toys: Dynamic Scene
+ \example declarative/toys/dynamicscene
+
+ This example presents an interactive drag-and-drop scene. It demonstrates
+ how to use QML's \l{Dynamic Object Creation} support to dynamically create and
+ destroy objects.
*/
/*!
- \example declarative/slideswitch
- \title Slide Switch
+ \title Toys: Tic-Tac-Toe
+ \example declarative/toys/tic-tac-toe
+
+ This example presents a simple implementation of Tic Tac Toe.
*/
/*!
- \example declarative/sql
- \title SQL
+ \title Toys: TV Tennis
+ \example declarative/toys/tvtennis
+
+ This example shows how to use animation components such as \l SpringFollow,
+ \l SequentialAnimation and \l PropertyAction to create a game of TV tennis.
*/
/*!
- \example declarative/states
- \title States
+ \title Touch Interaction: Gestures
+ \example declarative/touchinteraction/gestures
+
+ This example shows how to use the GestureArea element.
*/
/*!
- \example declarative/stringlistmodel
- \title String ListModel
+ \title Touch Interaction: Mouse Area
+ \example declarative/touchinteraction/mousearea
+
+ This example shows how to use the MouseArea element.
*/
/*!
- \example declarative/tabwidget
- \title Tab Widget
+ \title UI Components: Flipable
+ \example declarative/ui-components/flipable
+
+ This example shows how to use the Flipable element.
*/
/*!
- \example declarative/tic-tac-toe
- \title Tic-Tac-Toe
+ \title UI Components: Progress Bars
+ \example declarative/ui-components/progressbar
+
+ This example shows how to create a progress bar.
*/
/*!
- \example declarative/tvtennis
- \title TV Tennis
+ \title UI Components: Scroll Bar
+ \example declarative/ui-components/scrollbar
+
+ This example shows how to create scroll bars for a Flickable element
+ using the \l {Flickable::visibleArea.xPosition}{Flickable::visibleArea}
+ properties.
*/
/*!
- \example declarative/velocity
- \title Velocity
+ \title UI Components: Search Box
+ \example declarative/ui-components/searchbox
+
+ This example shows how to create a search box.
*/
/*!
- \example declarative/webview
- \title WebView
+ \title UI Components: Slide Switch
+ \example declarative/ui-components/slideswitch
+
+ This example shows how to create a slide switch.
*/
/*!
- \example declarative/workerscript
- \title WorkerScript
+ \title UI Components: Spinner
+ \example declarative/ui-components/spinner
+
+ This example shows how to create a spinner-type component.
*/
/*!
- \example declarative/xmldata
- \title XML Data
+ \title UI Components: Tab Widget
+ \example declarative/ui-components/tabwidget
+
+ This example shows how to create a tab widget.
*/
/*!
- \example declarative/xmlhttprequest
- \title XMLHttpRequest
+ \title XML: XMLHttpRequest
+ \example declarative/xml/xmlhttprequest
+
+ This example shows how to use \l XmlHttpRequest in QML.
*/
diff --git a/doc/src/examples/qml-extending.qdoc b/doc/src/examples/qml-extending.qdoc
new file mode 100644
index 0000000..09108d6
--- /dev/null
+++ b/doc/src/examples/qml-extending.qdoc
@@ -0,0 +1,302 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\example declarative/cppextensions/referenceexamples/adding
+\title Extending QML - Adding Types Example
+
+The Adding Types Example shows how to add a new element type, \c Person, to QML.
+The \c Person type can be used from QML like this:
+
+\snippet examples/declarative/cppextensions/referenceexamples/adding/example.qml 0
+
+\section1 Declare the Person class
+
+All QML elements map to C++ types. Here we declare a basic C++ Person class
+with the two properties we want accessible on the QML type - name and shoeSize.
+Although in this example we use the same name for the C++ class as the QML
+element, the C++ class can be named differently, or appear in a namespace.
+
+\snippet examples/declarative/cppextensions/referenceexamples/adding/person.h 0
+
+\section1 Define the Person class
+
+\snippet examples/declarative/cppextensions/referenceexamples/adding/person.cpp 0
+
+The Person class implementation is quite basic. The property accessors simply
+return members of the object instance.
+
+The \c main.cpp file also calls the \c qmlRegisterType() function to
+register the \c Person type with QML as a type in the People library version 1.0,
+and defines the mapping between the C++ and QML class names.
+
+\section1 Running the example
+
+The main.cpp file in the example includes a simple shell application that
+loads and runs the QML snippet shown at the beginning of this page.
+*/
+
+/*!
+\example declarative/cppextensions/referenceexamples/properties
+\title Extending QML - Object and List Property Types Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+The Object and List Property Types example shows how to add object and list
+properties in QML. This example adds a BirthdayParty element that specifies
+a birthday party, consisting of a celebrant and a list of guests. People are
+specified using the People QML type built in the previous example.
+
+\snippet examples/declarative/cppextensions/referenceexamples/properties/example.qml 0
+
+\section1 Declare the BirthdayParty
+
+The BirthdayParty class is declared like this:
+
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 1
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 2
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 3
+
+The class contains a member to store the celebrant object, and also a
+QList<Person *> member.
+
+In QML, the type of a list properties - and the guests property is a list of
+people - are all of type QDeclarativeListProperty<T>. QDeclarativeListProperty is simple value
+type that contains a set of function pointers. QML calls these function
+pointers whenever it needs to read from, write to or otherwise interact with
+the list. In addition to concrete lists like the people list used in this
+example, the use of QDeclarativeListProperty allows for "virtual lists" and other advanced
+scenarios.
+
+\section2 Define the BirthdayParty
+
+The implementation of BirthdayParty property accessors is straight forward.
+
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.cpp 0
+
+\section1 Running the example
+
+The main.cpp file in the example includes a simple shell application that
+loads and runs the QML snippet shown at the beginning of this page.
+*/
+
+/*!
+\example declarative/cppextensions/referenceexamples/coercion
+\title Extending QML - Inheritance and Coercion Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+The Inheritance and Coercion Example shows how to use base classes to assign
+elements of more than one type to a property. It specializes the Person element
+developed in the previous examples into two elements - a \c Boy and a \c Girl.
+
+\snippet examples/declarative/cppextensions/referenceexamples/coercion/example.qml 0
+
+\section1 Declare Boy and Girl
+
+\snippet examples/declarative/cppextensions/referenceexamples/coercion/person.h 0
+
+The Person class remains unaltered in this example and the Boy and Girl C++
+classes are trivial extensions of it. As an example, the inheritance used here
+is a little contrived, but in real applications it is likely that the two
+extensions would add additional properties or modify the Person classes
+behavior.
+
+\section2 Define People as a base class
+
+The implementation of the People class itself has not changed since the the
+previous example. However, as we have repurposed the People class as a common
+base for Boy and Girl, we want to prevent it from being instantiated from QML
+directly - an explicit Boy or Girl should be instantiated instead.
+
+\snippet examples/declarative/cppextensions/referenceexamples/coercion/main.cpp 0
+
+While we want to disallow instantiating Person from within QML, it still needs
+to be registered with the QML engine, so that it can be used as a property type
+and other types can be coerced to it.
+
+\section2 Define Boy and Girl
+
+The implementation of Boy and Girl are trivial.
+
+\snippet examples/declarative/cppextensions/referenceexamples/coercion/person.cpp 1
+
+All that is necessary is to implement the constructor, and to register the types
+and their QML name with the QML engine.
+
+\section1 Running the example
+
+The BirthdayParty element has not changed since the previous example. The
+celebrant and guests property still use the People type.
+
+\snippet examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.h 0
+
+However, as all three types, Person, Boy and Girl, have been registered with the
+QML system, on assignment QML automatically (and type-safely) converts the Boy
+and Girl objects into a Person.
+
+The main.cpp file in the example includes a simple shell application that
+loads and runs the QML snippet shown at the beginning of this page.
+*/
+
+/*!
+\example declarative/cppextensions/referenceexamples/default
+\title Extending QML - Default Property Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Inheritance and Coercion Example}
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+The Default Property Example is a minor modification of the
+\l {Extending QML - Inheritance and Coercion Example} that simplifies the
+specification of a BirthdayParty through the use of a default property.
+
+\snippet examples/declarative/cppextensions/referenceexamples/default/example.qml 0
+
+\section1 Declaring the BirthdayParty class
+
+The only difference between this example and the last, is the addition of the
+\c DefaultProperty class info annotation.
+
+\snippet examples/declarative/cppextensions/referenceexamples/default/birthdayparty.h 0
+
+The default property specifies the property to assign to whenever an explicit
+property is not specified, in the case of the BirthdayParty element the guest
+property. It is purely a syntactic simplification, the behavior is identical
+to specifying the property by name, but it can add a more natural feel in many
+situations. The default property must be either an object or list property.
+
+\section1 Running the example
+
+The main.cpp file in the example includes a simple shell application that
+loads and runs the QML snippet shown at the beginning of this page.
+*/
+
+/*!
+\example declarative/cppextensions/referenceexamples/grouped
+\title Extending QML - Grouped Properties Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Default Property Example}
+\o \l {Extending QML - Inheritance and Coercion Example}
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+*/
+
+/*!
+\example declarative/cppextensions/referenceexamples/attached
+\title Extending QML - Attached Properties Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Grouped Properties Example}
+\o \l {Extending QML - Default Property Example}
+\o \l {Extending QML - Inheritance and Coercion Example}
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+*/
+
+/*!
+\example declarative/cppextensions/referenceexamples/signal
+\title Extending QML - Signal Support Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Attached Properties Example}
+\o \l {Extending QML - Grouped Properties Example}
+\o \l {Extending QML - Default Property Example}
+\o \l {Extending QML - Inheritance and Coercion Example}
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+*/
+
+/*!
+\example declarative/cppextensions/referenceexamples/valuesource
+\title Extending QML - Property Value Source Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Signal Support Example}
+\o \l {Extending QML - Attached Properties Example}
+\o \l {Extending QML - Grouped Properties Example}
+\o \l {Extending QML - Default Property Example}
+\o \l {Extending QML - Inheritance and Coercion Example}
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+*/
+
+/*!
+\example declarative/cppextensions/referenceexamples/binding
+\title Extending QML - Binding Example
+
+This example builds on:
+\list
+\o \l {Extending QML - Property Value Source Example}
+\o \l {Extending QML - Signal Support Example}
+\o \l {Extending QML - Attached Properties Example}
+\o \l {Extending QML - Grouped Properties Example}
+\o \l {Extending QML - Default Property Example}
+\o \l {Extending QML - Inheritance and Coercion Example}
+\o \l {Extending QML - Object and List Property Types Example}
+\o \l {Extending QML - Adding Types Example}
+\endlist
+
+*/
diff --git a/doc/src/examples/qml-folderlistmodel.qdoc b/doc/src/examples/qml-folderlistmodel.qdoc
new file mode 100644
index 0000000..b820528
--- /dev/null
+++ b/doc/src/examples/qml-folderlistmodel.qdoc
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+
+\title FolderListModel - a C++ model plugin
+\example src/imports/folderlistmodel
+
+This plugin shows how to make a C++ model available to QML. It presents
+a simple file list for a single folder (directory) and allows the presented
+folder to be changed.
+
+\image declarative-folderlistmodel.png The FolderListModel used to choose a QML file
+
+We do not explain the model implementation in detail, but rather focus on the mechanics of
+making the model available to QML.
+
+\section1 Usage from QML
+
+The type we are creating can be used from QML like this:
+
+\snippet doc/src/snippets/declarative/folderlistmodel.qml 0
+
+\section1 Defining the Model
+
+We are subclassing QAbstractListModel which will allow us to give data to QML and
+send notifications when the data changes:
+
+\snippet src/imports/folderlistmodel/qdeclarativefolderlistmodel.h class begin
+
+As you see, we also inherit the QDeclarativeParserStatus interface, so that we
+can delay initial processing until we have all properties set (via componentComplete() below).
+
+The first thing to do when devising a new type for QML is to define the properties
+you want the type to have:
+
+\snippet src/imports/folderlistmodel/qdeclarativefolderlistmodel.h class props
+
+The purposes of each of these should be pretty obvious - in QML we will set the folder
+to display (a file: URL), and the kinds of files we want to show in the view of the model.
+
+Next are the constructor, destructor, and standard QAbstractListModel subclassing requirements:
+
+\snippet src/imports/folderlistmodel/qdeclarativefolderlistmodel.h abslistmodel
+
+The data() function is where we provide model values. The rowCount() function
+is also a standard part of the QAbstractListModel interface, but we also want to provide
+a simpler count property:
+
+\snippet src/imports/folderlistmodel/qdeclarativefolderlistmodel.h count
+
+Then we have the functions for the remaining properties which we defined above:
+
+\snippet src/imports/folderlistmodel/qdeclarativefolderlistmodel.h prop funcs
+
+Imperative actions upon the model are made available to QML via a Q_INVOKABLE tag on
+a normal member function. The isFolder(index) function says whether the value at \e index
+is a folder:
+
+\snippet src/imports/folderlistmodel/qdeclarativefolderlistmodel.h isfolder
+
+Then we have the QDeclarativeParserStatus interface:
+
+\snippet src/imports/folderlistmodel/qdeclarativefolderlistmodel.h parserstatus
+
+Then the NOTIFY function for the folders property. The implementation will emit this
+when the folder property is changed.
+
+\snippet src/imports/folderlistmodel/qdeclarativefolderlistmodel.h notifier
+
+The class ends with some implementation details:
+
+\snippet src/imports/folderlistmodel/qdeclarativefolderlistmodel.h class end
+
+Lastly, the boilerplare to declare the type for QML use:
+
+\snippet src/imports/folderlistmodel/qdeclarativefolderlistmodel.h qml decl
+
+\section1 Connecting the Model to QML
+
+To make this class available to QML, we only need to make a simple subclass of QDeclarativeExtensionPlugin:
+
+\snippet src/imports/folderlistmodel/plugin.cpp class decl
+
+and then use the standard Qt plugin export macro:
+
+\snippet src/imports/folderlistmodel/plugin.cpp plugin export decl
+
+Finally, in order for QML to connect the "import" statement to our plugin, we list it in the qmldir file:
+
+\l{src/imports/folderlistmodel/qmldir}
+
+This qmldir file and the compiled plugin will be installed in \c $QTDIR/imports/Qt/labs/folderlistmodel/ where
+the QML engine will find it (since \c $QTDIR/imports is the value of QLibraryInf::libraryPath()).
+
+\section1 Implementing the Model
+
+We'll not discuss the model implementation in detail, as it is not specific to QML - any Qt C++ model
+can be interfaced to QML.
+This implementation is basically just takes the krufty old QDirModel,
+which is a tree with lots of detailed roles and re-presents it as a simpler list model where
+each item is just a fileName and a filePath (as a file: URL rather than a plain file, since QML
+works with URLs for all content).
+
+\l{src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp}
+*/
diff --git a/doc/src/examples/qml-rssnews.qdoc b/doc/src/examples/qml-rssnews.qdoc
new file mode 100644
index 0000000..0e7bdef
--- /dev/null
+++ b/doc/src/examples/qml-rssnews.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: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$
+**
+****************************************************************************/
+
+/*!
+ \title RSS News
+ \example demos/declarative/rssnews
+
+ This demo shows how to write a RSS news reader in QML.
+
+ \image qml-rssnews-example.png
+*/
diff --git a/doc/src/files-and-resources/datastreamformat.qdoc b/doc/src/files-and-resources/datastreamformat.qdoc
index bab2c2c..c4be7bb 100644
--- a/doc/src/files-and-resources/datastreamformat.qdoc
+++ b/doc/src/files-and-resources/datastreamformat.qdoc
@@ -41,7 +41,8 @@
/*!
\page datastreamformat.html
- \title Format of the QDataStream Operators
+ \title Serializing Qt Data Types
+ \ingroup qt-network
\brief Representations of data types that can be serialized by QDataStream.
The \l QDataStream allows you to serialize some of the Qt data types.
diff --git a/doc/src/files-and-resources/resources.qdoc b/doc/src/files-and-resources/resources.qdoc
index 00646ac..83d74a3 100644
--- a/doc/src/files-and-resources/resources.qdoc
+++ b/doc/src/files-and-resources/resources.qdoc
@@ -54,6 +54,8 @@
/*!
\page resources.html
\title The Qt Resource System
+ \ingroup qt-network
+ \brief A platform-independent mechanism for storing binary files in an application.
\keyword resource system
diff --git a/doc/src/frameworks-technologies/accessible.qdoc b/doc/src/frameworks-technologies/accessible.qdoc
index 101d22a..0aff214 100644
--- a/doc/src/frameworks-technologies/accessible.qdoc
+++ b/doc/src/frameworks-technologies/accessible.qdoc
@@ -47,8 +47,10 @@
/*!
\page accessible.html
\title Accessibility
-
- \ingroup frameworks-technologies
+ \brief How to make your applications accessible to those with disabilities.
+
+ \ingroup technology-apis
+ \ingroup best-practices
\tableofcontents
diff --git a/doc/src/frameworks-technologies/activeqt-container.qdoc b/doc/src/frameworks-technologies/activeqt-container.qdoc
index c1c0947..03cfa8f 100644
--- a/doc/src/frameworks-technologies/activeqt-container.qdoc
+++ b/doc/src/frameworks-technologies/activeqt-container.qdoc
@@ -41,10 +41,11 @@
/*!
\page activeqt-container.html
- \title Using ActiveX controls and COM objects in Qt
+ \title Using ActiveX controls and COM in Qt
+ \ingroup qt-activex
- \brief The QAxContainer module is a Windows-only extension for
- accessing ActiveX controls and COM objects.
+ \brief A Windows-only extension for accessing ActiveX controls and
+ COM objects.
The QAxContainer module is part of the \l ActiveQt framework. It
provides a library implementing a QWidget subclass, QAxWidget,
diff --git a/doc/src/frameworks-technologies/activeqt-server.qdoc b/doc/src/frameworks-technologies/activeqt-server.qdoc
index 4afcee1..900953a 100644
--- a/doc/src/frameworks-technologies/activeqt-server.qdoc
+++ b/doc/src/frameworks-technologies/activeqt-server.qdoc
@@ -41,10 +41,10 @@
/*!
\page activeqt-server.html
- \title Building ActiveX servers and controls with Qt
+ \title Building ActiveX servers in Qt
+ \ingroup qt-activex
- \brief The QAxServer module is a Windows-only static library that
- you can use to turn a standard Qt binary into a COM server.
+ \brief A Windows-only static library for turning a Qt binary into a COM server.
The QAxServer module is part of the \l ActiveQt framework. It
consists of three classes:
diff --git a/doc/src/frameworks-technologies/activeqt.qdoc b/doc/src/frameworks-technologies/activeqt.qdoc
index b752122..979d885 100644
--- a/doc/src/frameworks-technologies/activeqt.qdoc
+++ b/doc/src/frameworks-technologies/activeqt.qdoc
@@ -53,12 +53,12 @@
/*!
\page activeqt.html
- \title ActiveQt Framework
+ \title Qt's ActiveX Framework (ActiveQt)
\brief An overview of Qt's ActiveX and COM integration on Windows.
- \ingroup platform-specific
- \ingroup frameworks-technologies
+ \ingroup qt-activex
\keyword ActiveQt
+ \target ActiveQt Framework
Qt's ActiveX and COM support allows Qt for Windows developers to:
diff --git a/doc/src/frameworks-technologies/animation.qdoc b/doc/src/frameworks-technologies/animation.qdoc
index 5548b57..dc705ba 100644
--- a/doc/src/frameworks-technologies/animation.qdoc
+++ b/doc/src/frameworks-technologies/animation.qdoc
@@ -47,6 +47,7 @@
/*!
\page animation-overview.html
\title The Animation Framework
+ \ingroup qt-gui-concepts
\brief An overview of the Animation Framework
diff --git a/doc/src/frameworks-technologies/containers.qdoc b/doc/src/frameworks-technologies/containers.qdoc
index 505b65c..5b184fa 100644
--- a/doc/src/frameworks-technologies/containers.qdoc
+++ b/doc/src/frameworks-technologies/containers.qdoc
@@ -58,7 +58,7 @@
/*!
\page containers.html
\title Generic Containers
- \ingroup frameworks-technologies
+ \ingroup technology-apis
\ingroup groups
\keyword container class
\keyword container classes
diff --git a/doc/src/frameworks-technologies/dbus-adaptors.qdoc b/doc/src/frameworks-technologies/dbus-adaptors.qdoc
index 5fc7a79..3dd0e4d 100644
--- a/doc/src/frameworks-technologies/dbus-adaptors.qdoc
+++ b/doc/src/frameworks-technologies/dbus-adaptors.qdoc
@@ -42,7 +42,9 @@
/*!
\page usingadaptors.html
\title Using QtDBus Adaptors
+ \brief How to create and use DBus adaptors in Qt.
+ \ingroup technology-apis
\ingroup best-practices
Adaptors are special classes that are attached to any QObject-derived class
diff --git a/doc/src/frameworks-technologies/dbus-intro.qdoc b/doc/src/frameworks-technologies/dbus-intro.qdoc
index 1fe2ed2..10726e5 100644
--- a/doc/src/frameworks-technologies/dbus-intro.qdoc
+++ b/doc/src/frameworks-technologies/dbus-intro.qdoc
@@ -45,7 +45,7 @@
\brief An introduction to Inter-Process Communication and Remote Procedure Calling with D-Bus.
\keyword QtDBus
- \ingroup frameworks-technologies
+ \ingroup technology-apis
\section1 Introduction
diff --git a/doc/src/frameworks-technologies/desktop-integration.qdoc b/doc/src/frameworks-technologies/desktop-integration.qdoc
index 7f01ae3..59b2570 100644
--- a/doc/src/frameworks-technologies/desktop-integration.qdoc
+++ b/doc/src/frameworks-technologies/desktop-integration.qdoc
@@ -40,16 +40,12 @@
****************************************************************************/
/*!
- \group desktop
- \title Desktop Integration Classes
-*/
-
-/*!
\page desktop-integration.html
\title Desktop Integration
\brief Integrating with the user's desktop environment.
\ingroup best-practices
+ \ingroup qt-gui-concepts
Qt applications behave well in the user's desktop environment, but certain
integrations require additional, and sometimes platform specific, techniques.
diff --git a/doc/src/frameworks-technologies/dnd.qdoc b/doc/src/frameworks-technologies/dnd.qdoc
index 49468de..0e952ad 100644
--- a/doc/src/frameworks-technologies/dnd.qdoc
+++ b/doc/src/frameworks-technologies/dnd.qdoc
@@ -40,18 +40,12 @@
****************************************************************************/
/*!
- \group draganddrop
- \title Drag And Drop Classes
-
- \brief Classes dealing with drag and drop and mime type encoding and decoding.
-*/
-
-/*!
\page dnd.html
\title Drag and Drop
\brief An overview of the drag and drop system provided by Qt.
- \ingroup frameworks-technologies
+ \ingroup technology-apis
+ \ingroup qt-gui-concepts
Drag and drop provides a simple visual mechanism which users can use
to transfer information between and within applications. (In the
diff --git a/doc/src/frameworks-technologies/eventsandfilters.qdoc b/doc/src/frameworks-technologies/eventsandfilters.qdoc
index 96ee18c..0cd60b8 100644
--- a/doc/src/frameworks-technologies/eventsandfilters.qdoc
+++ b/doc/src/frameworks-technologies/eventsandfilters.qdoc
@@ -54,7 +54,8 @@
/*!
\page eventsandfilters.html
- \title Events and Event Filters
+ \title The Event System
+ \ingroup qt-basic-concepts
\brief A guide to event handling in Qt.
\ingroup frameworks-technologies
diff --git a/doc/src/frameworks-technologies/gestures.qdoc b/doc/src/frameworks-technologies/gestures.qdoc
index 1b395b0..c999fa6 100644
--- a/doc/src/frameworks-technologies/gestures.qdoc
+++ b/doc/src/frameworks-technologies/gestures.qdoc
@@ -42,12 +42,13 @@
/*!
\page gestures-overview.html
\title Gestures Programming
- \ingroup frameworks-technologies
\startpage index.html Qt Reference Documentation
+ \ingroup technology-apis
+ \ingroup qt-gui-concepts
- \brief An overview of the Qt support for Gesture programming.
+ \brief An overview of Qt support for Gesture programming.
- Qt includes a framework for gesture programming that gives has the ability
+ Qt includes a framework for gesture programming that has the ability
to form gestures from a series of events, independently of the input methods
used. A gesture could be a particular movement of a mouse, a touch screen
action, or a series of events from some other source. The nature of the input,
diff --git a/doc/src/frameworks-technologies/graphicsview.qdoc b/doc/src/frameworks-technologies/graphicsview.qdoc
index 6844aed..681568e 100644
--- a/doc/src/frameworks-technologies/graphicsview.qdoc
+++ b/doc/src/frameworks-technologies/graphicsview.qdoc
@@ -46,12 +46,11 @@
/*!
\page graphicsview.html
- \title The Graphics View Framework
+ \title Graphics View Framework
+ \ingroup qt-graphics
\brief An overview of the Graphics View framework for interactive 2D
graphics.
- \ingroup frameworks-technologies
-
\keyword Graphics View
\keyword GraphicsView
\keyword Graphics
diff --git a/doc/src/frameworks-technologies/implicit-sharing.qdoc b/doc/src/frameworks-technologies/implicit-sharing.qdoc
index e4d6f65..f42ec93 100644
--- a/doc/src/frameworks-technologies/implicit-sharing.qdoc
+++ b/doc/src/frameworks-technologies/implicit-sharing.qdoc
@@ -50,7 +50,7 @@
/*!
\page implicit-sharing.html
\title Implicit Sharing
- \ingroup frameworks-technologies
+ \ingroup qt-basic-concepts
\brief Reference counting for fast copying.
diff --git a/doc/src/frameworks-technologies/ipc.qdoc b/doc/src/frameworks-technologies/ipc.qdoc
index 18a9455..b49a816 100644
--- a/doc/src/frameworks-technologies/ipc.qdoc
+++ b/doc/src/frameworks-technologies/ipc.qdoc
@@ -44,7 +44,8 @@
\title Inter-Process Communication in Qt
\brief Inter-Process communication in Qt applications.
- \ingroup frameworks-technologies
+ \ingroup technology-apis
+ \ingroup qt-network
Qt provides several ways to implement Inter-Process Communication
(IPC) in Qt applications.
diff --git a/doc/src/frameworks-technologies/phonon.qdoc b/doc/src/frameworks-technologies/phonon.qdoc
index 2d035c7..61b906e 100644
--- a/doc/src/frameworks-technologies/phonon.qdoc
+++ b/doc/src/frameworks-technologies/phonon.qdoc
@@ -41,8 +41,10 @@
/*!
\page phonon-overview.html
- \title Phonon Overview
- \ingroup frameworks-technologies
+ \title Phonon multimedia framework
+ \brief Using the Phonon multimedia framework in Qt.
+ \ingroup technology-apis
+ \ingroup best-practices
\tableofcontents
diff --git a/doc/src/frameworks-technologies/threads.qdoc b/doc/src/frameworks-technologies/threads.qdoc
index fd6bebb..f7dde59 100644
--- a/doc/src/frameworks-technologies/threads.qdoc
+++ b/doc/src/frameworks-technologies/threads.qdoc
@@ -47,6 +47,7 @@
/*!
\page threads.html
\title Thread Support in Qt
+ \ingroup qt-basic-concepts
\brief A detailed discussion of thread handling in Qt.
\ingroup frameworks-technologies
diff --git a/doc/src/frameworks-technologies/unicode.qdoc b/doc/src/frameworks-technologies/unicode.qdoc
index 8fa168a..88393a0 100644
--- a/doc/src/frameworks-technologies/unicode.qdoc
+++ b/doc/src/frameworks-technologies/unicode.qdoc
@@ -58,7 +58,7 @@
\keyword Unicode
- \ingroup frameworks-technologies
+ \ingroup technology-apis
Unicode is a multi-byte character set, portable across all major
computing platforms and with decent coverage over most of the world.
diff --git a/doc/src/getting-started/demos.qdoc b/doc/src/getting-started/demos.qdoc
index 6974634..f8c70fe 100644
--- a/doc/src/getting-started/demos.qdoc
+++ b/doc/src/getting-started/demos.qdoc
@@ -53,15 +53,14 @@
\l{Qt Examples} and are used to highlight certain features of
Qt.
- \table 50%
+ \table
\header
\o {2,1} Getting an Overview
\row
\o \inlineimage qtdemo-small.png
- \o
- If you run the \l{Examples and Demos Launcher}, you'll see many of Qt's
+ \o If you run the \l{Examples and Demos Launcher}, you'll see many of Qt's
widgets in action.
-
+
The \l{Qt Widget Gallery} also provides overviews of selected Qt
widgets in each of the styles used on various supported platforms.
\endtable
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index 542f672..c3b8880 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -40,13 +40,36 @@
****************************************************************************/
/*!
- \page examples-overview.html
- \raw HTML
- <script>
- document.location.href = "examples.html";
- </script>
- \endraw
- Click this \l{Qt Examples}{link} if you don't get redirected.
+ \group all-examples
+ \title Qt Examples
+
+ Qt includes a set of examples that cover nearly every aspect of Qt
+ development. They aren't meant to be impressive when you run them,
+ but in each case the source code has been carefully written to
+ illustrate one or more best Qt programming practices.
+
+ 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 thos examples).
+
+ The examples are listed below by functional area. Each example
+ listed in a particular functional area is meant to illustrate how
+ best to use Qt to do some particular task in that functional area,
+ but the examples will often use features from other functional
+ areas as well for completeness.
+
+ If you are new to Qt, you should probably start by going through
+ the \l{Tutorials}, and then begin with the
+ \l{mainwindows/application} {Application} example.
+
+ In addition to these examples and the \l{Tutorials}{tutorials}, Qt
+ includes a \l{Qt Demonstrations}{selection of demos} that
+ deliberately show off Qt's features. You might want to look at
+ these as well.
+
+ \section1 Examples by functional area
+
+ \generatelist{related}
*/
/*!
@@ -461,6 +484,8 @@
/*!
\page examples-widgets.html
\title Widgets Examples
+ \ingroup all-examples
+ \brief Lots of examples of how to use different kinds of widgets.
\contentspage Qt Examples
\nextpage Dialog Examples
@@ -509,7 +534,9 @@
/*!
\page examples-dialogs.html
+ \ingroup all-examples
\title Dialog Examples
+ \brief Using Qt's standard dialogs and building and using custom dialogs.
\previouspage Widgets Examples
\contentspage Qt Examples
@@ -539,7 +566,9 @@
/*!
\page examples-mainwindow.html
+ \ingroup all-examples
\title Main Window Examples
+ \brief Building applications around a main window.
\previouspage Dialog Examples
\contentspage Qt Examples
@@ -567,7 +596,9 @@
/*!
\page examples-layouts.html
+ \ingroup all-examples
\title Layout Examples
+ Using Qt's layout-based approach to widget management.
\previouspage Main Window Examples
\contentspage Qt Examples
@@ -594,7 +625,9 @@
/*!
\page examples-itemviews.html
+ \ingroup all-examples
\title Item Views Examples
+ \brief Using the model/view design pattern to separate presentation from data.
\previouspage Layout Examples
\contentspage Qt Examples
@@ -632,7 +665,9 @@
/*!
\page examples-graphicsview.html
+ \ingroup all-examples
\title Graphics View Examples
+ \brief Using Qt to manage and interact with a large (potentially) number of graphics items.
\previouspage Item Views Examples
\contentspage Qt Examples
@@ -651,6 +686,7 @@
\o \l{graphicsview/diagramscene}{Diagram Scene}\raisedaster
\o \l{graphicsview/dragdroprobot}{Drag and Drop Robot}\raisedaster
\o \l{graphicsview/elasticnodes}{Elastic Nodes}\raisedaster
+ \o \l{graphicsview/padnavigator}{Pad Navigator}\raisedaster
\o \l{graphicsview/portedasteroids}{Ported Asteroids}
\o \l{graphicsview/portedcanvas}{Ported Canvas}
\endlist
@@ -677,6 +713,7 @@
/*!
\page examples-painting.html
+ \ingroup all-examples
\title Painting Examples
\previouspage QML Examples and Demos
@@ -709,6 +746,7 @@
/*!
\page examples-richtext.html
+ \ingroup all-examples
\title Rich Text Examples
\previouspage Painting Examples
@@ -732,6 +770,7 @@
/*!
\page examples-desktop.html
+ \ingroup all-examples
\title Desktop Examples
\previouspage Rich Text Examples
@@ -755,6 +794,7 @@
/*!
\page examples-draganddrop.html
+ \ingroup all-examples
\title Drag and Drop Examples
\previouspage Desktop Examples
@@ -783,6 +823,7 @@
/*!
\page examples-threadandconcurrent.html
+ \ingroup all-examples
\title Threading and Concurrent Programming Examples
\previouspage Drag and Drop Examples
@@ -823,6 +864,7 @@
/*!
\page examples.tools.html
+ \ingroup all-examples
\title Tools Examples
\previouspage Threading and Concurrent Programming Examples
@@ -861,6 +903,7 @@
/*!
\page examples-network.html
+ \ingroup all-examples
\title Network Examples
\previouspage Tools Examples
@@ -899,6 +942,7 @@
/*!
\page examples-ipc.html
+ \ingroup all-examples
\title Inter-Process Communication Examples
\previouspage Network Examples
@@ -916,6 +960,7 @@
/*!
\page examples-opengl.html
+ \ingroup all-examples
\title OpenGL Examples
\previouspage Inter-Process Communication Examples
@@ -950,6 +995,7 @@
/*!
\page examples-openvg.html
+ \ingroup all-examples
\title OpenVG Examples
\previouspage OpenGL Examples
@@ -971,6 +1017,7 @@
/*!
\page examples-multimedia.html
+ \ingroup all-examples
\title Multimedia Examples
\previouspage OpenGL Examples
@@ -1020,6 +1067,7 @@
/*!
\page examples-sql.html
+ \ingroup all-examples
\title SQL Examples
\previouspage Multimedia Examples
@@ -1049,6 +1097,7 @@
/*!
\page examples-xml.html
+ \ingroup all-examples
\title XML Examples
\previouspage SQL Examples
@@ -1085,6 +1134,7 @@
/*!
\page examples-designer.html
+ \ingroup all-examples
\title Qt Designer Examples
\previouspage XML Examples
@@ -1110,6 +1160,7 @@
/*!
\page examples-uitools.html
+ \ingroup all-examples
\title UiTools Examples
\previouspage Qt Designer Examples
@@ -1126,6 +1177,7 @@
/*!
\page examples-linguist.html
+ \ingroup all-examples
\title Qt Linguist Examples
\previouspage UiTools Examples
@@ -1146,6 +1198,7 @@
/*!
\page examples-script.html
+ \ingroup all-examples
\title Qt Script Examples
\previouspage Qt Linguist Examples
@@ -1175,6 +1228,7 @@
/*!
\page examples-webkit.html
+ \ingroup all-examples
\title WebKit Examples
\previouspage Qt Script Examples
@@ -1215,7 +1269,8 @@
*/
/*!
- \page examples-helpsystem.html
+ \page examples-helpsystem.html
+ \ingroup all-examples
\title Help System Examples
\previouspage WebKit Examples
@@ -1239,6 +1294,7 @@
/*!
\page examples-statemachine.html
+ \ingroup all-examples
\title State Machine Examples
\previouspage Help System Examples
@@ -1265,6 +1321,7 @@
/*!
\page examples-animation.html
+ \ingroup all-examples
\title Animation Framework Examples
\previouspage State Machine Examples
@@ -1287,6 +1344,7 @@
/*!
\page examples-multitouch.html
+ \ingroup all-examples
\title Multi-Touch Examples
\previouspage Animation Framework Examples
@@ -1306,6 +1364,7 @@
/*!
\page examples-gestures.html
+ \ingroup all-examples
\title Gestures Examples
\previouspage Multi-Touch Examples
@@ -1322,6 +1381,7 @@
/*!
\page examples-dbus.html
+ \ingroup all-examples
\title D-Bus Examples
\previouspage Gestures Examples
@@ -1341,6 +1401,7 @@
/*!
\page examples-embeddedlinux.html
+ \ingroup all-examples
\title Qt for Embedded Linux Examples
\previouspage D-Bus Examples
@@ -1363,6 +1424,7 @@
/*!
\page examples-activeqt.html
+ \ingroup all-examples
\title ActiveQt Examples
\previouspage Qt for Embedded Linux Examples
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index 3ea351e..36abc10 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -703,21 +703,19 @@ If you are using pre-built binaries, follow the instructions given in the
\ingroup qtsymbian
\brief How to install Qt on the Symbian platform using Linux.
-\note Qt for the Symbian platform has some requirements that are given in more detail
-in the \l{Qt for the Symbian platform Requirements} document. TODO list requirements like SDK here.
-
\note \bold {This document describes how to install and configure Qt for
the Symbian platform from scratch, using Linux as the build host.
-Qt does not come with a binary package for Linux yet, but if you want to avoid
-the full build of Qt and start developing applications right away, you can
-download drop-in binaries from here: TODO}
+Qt for Symbian binaries can be downloaded directly so development of
+applications using Qt for Symbian can start right away.}
\list 1
\o Setup the development environment
- TODO Make sure your Symbian development environment is correctly installed and
- patched as explained in the \l{Qt for the Symbian platform Requirements} document.
+ \note Qt for the Symbian platform has some requirements on the development
+ platform. The Symbian SDK for Linux as well as a cross compiler for the ARM
+ processor used on Symbian devices should be present on the development machine.
+ See {http://qt.gitorious.org/qt/pages/QtCreatorSymbianLinux} for more details.
\o Install Qt
@@ -770,7 +768,7 @@ download drop-in binaries from here: TODO}
The Qt libraries are built with "All -Tcb" capability, so that
they can support all types of applications. However, these
- capabilities are automatically lowered if you make a selfsigned
+ capabilities are automatically lowered if you make a self-signed
package.
\o Building a Qt package with a Symbian developer certificate
@@ -826,7 +824,7 @@ download drop-in binaries from here: TODO}
Note the identifier on the line where your Symbian device
appears. Then execute the following, using the first and
- second part of the identifier in place of \c XXXX,
+ second part of the identifier in place of \c XXX,
respectively.
\snippet doc/src/snippets/code/doc_src_installation.qdoc 44
diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc
index b73e15d..cedebf9 100644
--- a/doc/src/getting-started/known-issues.qdoc
+++ b/doc/src/getting-started/known-issues.qdoc
@@ -41,15 +41,15 @@
/*!
\page known-issues.html
- \title Known Issues in %VERSION%
+ \title Known Issues in this Qt Version
\ingroup platform-specific
- \brief A summary of known issues in Qt %VERSION% at the time of release.
+ \brief A summary of known issues in this Qt version at the time of release.
- An up-to-date list of known issues with Qt %VERSION% can be found via the
+ An up-to-date list of known issues can be found at
\l{http://bugreports.qt.nokia.com/}{Qt Bug Tracker}.
- For a list list of known bugs in Qt %VERSION%, see the \l{Task Tracker}
- on the Qt website.
+ For a list list of known bugs, see the \l{Task Tracker} at the Qt
+ website.
An overview of known issues may also be found at:
\l{http://qt.gitorious.org/qt/pages/QtKnownIssues}
diff --git a/doc/src/howtos/HWacceleration.qdoc b/doc/src/howtos/HWacceleration.qdoc
index fbc657c..c7b1a72 100644
--- a/doc/src/howtos/HWacceleration.qdoc
+++ b/doc/src/howtos/HWacceleration.qdoc
@@ -41,17 +41,20 @@
/*!
\page HWAcc_rendering.html
- \title Using hardware acceleration on embedded platforms.
+ \title Hardware Acceleration &amp Embedded Platforms.
+ \brief How to use hardware acceleration for fast rendering.
\ingroup best-practices
\section1 Abstract
+
This document describes how to use hardware acceleration for fast
- rendering on embedded platforms supported by Qt. In short, it explains
- how the graphics pipeline works. Since there might be differences to
- how the APIs are being used on different embedded platforms, a table
- links to documentation dedicated to platform specific documentation
- for each supported hardware acceleration API.
+ rendering on embedded platforms supported by Qt. In short, it
+ explains how the graphics pipeline works. Since there might be
+ differences to how the APIs are being used on different embedded
+ platforms, a table links to documentation dedicated to platform
+ specific documentation for each supported hardware acceleration
+ API.
\input platforms/emb-hardwareacceleration.qdocinc
diff --git a/doc/src/howtos/accelerators.qdoc b/doc/src/howtos/accelerators.qdoc
index 65f1def..b6ef5c2 100644
--- a/doc/src/howtos/accelerators.qdoc
+++ b/doc/src/howtos/accelerators.qdoc
@@ -42,6 +42,7 @@
/*!
\page accelerators.html
\title Standard Accelerator Keys
+ \brief Recommended accelerator keys.
\ingroup best-practices
diff --git a/doc/src/howtos/appicon.qdoc b/doc/src/howtos/appicon.qdoc
index dd39509..9377961 100644
--- a/doc/src/howtos/appicon.qdoc
+++ b/doc/src/howtos/appicon.qdoc
@@ -42,6 +42,7 @@
/*!
\page appicon.html
\title Setting the Application Icon
+ \brief How to set your application's icon.
\ingroup best-practices
diff --git a/doc/src/howtos/guibooks.qdoc b/doc/src/howtos/guibooks.qdoc
index 1a70670..bccfbe6 100644
--- a/doc/src/howtos/guibooks.qdoc
+++ b/doc/src/howtos/guibooks.qdoc
@@ -43,6 +43,7 @@
\page guibooks.html
\title Books about GUI Design
\ingroup best-practices
+ \brief Some recommended books about GUI design.
This is not a comprehensive list -- there are many other books worth
buying. Here we mention just a few user interface books that don't
diff --git a/doc/src/howtos/openvg.qdoc b/doc/src/howtos/openvg.qdoc
index f70ed54..e448d9c 100644
--- a/doc/src/howtos/openvg.qdoc
+++ b/doc/src/howtos/openvg.qdoc
@@ -172,8 +172,25 @@
\endlist
The other members of QPainter::CompositionMode are not supported
- because OpenVG 1.1 does not have an equivalent in its \c VGBlendMode
- enumeration. Any attempt to set an unsupported mode will result in
+ unless the \c{VG_KHR_advanced_blending} extension is present,
+ in which case the following additional modes are supported:
+
+ \list
+ \o QPainter::CompositionMode_Overlay
+ \o QPainter::CompositionMode_ColorDodge
+ \o QPainter::CompositionMode_ColorBurn
+ \o QPainter::CompositionMode_HardLight
+ \o QPainter::CompositionMode_SoftLight
+ \o QPainter::CompositionMode_Difference
+ \o QPainter::CompositionMode_Exclusion
+ \o QPainter::CompositionMode_SourceOut
+ \o QPainter::CompositionMode_DestinationOut
+ \o QPainter::CompositionMode_SourceAtop
+ \o QPainter::CompositionMode_DestinationAtop
+ \o QPainter::CompositionMode_Xor
+ \endlist
+
+ Any attempt to set an unsupported mode will result in
the actual mode being set to QPainter::CompositionMode_SourceOver.
Client applications should avoid using unsupported modes.
diff --git a/doc/src/howtos/qtdesigner.qdoc b/doc/src/howtos/qtdesigner.qdoc
index 2dd7fcf..92041f0 100644
--- a/doc/src/howtos/qtdesigner.qdoc
+++ b/doc/src/howtos/qtdesigner.qdoc
@@ -42,6 +42,7 @@
/*!
\page qtdesigner-components.html
\title Creating and Using Components for Qt Designer
+ \brief How to create and use custom widget plugins.
\ingroup best-practices
\tableofcontents
diff --git a/doc/src/howtos/restoring-geometry.qdoc b/doc/src/howtos/restoring-geometry.qdoc
index 36c5e4f..e72b993 100644
--- a/doc/src/howtos/restoring-geometry.qdoc
+++ b/doc/src/howtos/restoring-geometry.qdoc
@@ -42,7 +42,7 @@
/*!
\page restoring-geometry.html
\title Restoring a Window's Geometry
-
+ \brief How to save &amp restore window geometry.
\ingroup best-practices
This document describes how to save and restore a \l{Window
diff --git a/doc/src/howtos/session.qdoc b/doc/src/howtos/session.qdoc
index e2e87a8..f53af04 100644
--- a/doc/src/howtos/session.qdoc
+++ b/doc/src/howtos/session.qdoc
@@ -42,7 +42,7 @@
/*!
\page session.html
\title Session Management
-
+ \brief How to do session management with Qt.
\ingroup best-practices
A \e session is a group of running applications, each of which has a
diff --git a/doc/src/howtos/sharedlibrary.qdoc b/doc/src/howtos/sharedlibrary.qdoc
index 70fc4db..ed803ed 100644
--- a/doc/src/howtos/sharedlibrary.qdoc
+++ b/doc/src/howtos/sharedlibrary.qdoc
@@ -42,7 +42,7 @@
/*!
\page sharedlibrary.html
\title Creating Shared Libraries
-
+ \brief How to create shared libraries.
\ingroup best-practices
The following sections list certain things that should be taken into
diff --git a/doc/src/howtos/timers.qdoc b/doc/src/howtos/timers.qdoc
index cfc2fb4..b001916 100644
--- a/doc/src/howtos/timers.qdoc
+++ b/doc/src/howtos/timers.qdoc
@@ -42,7 +42,7 @@
/*!
\page timers.html
\title Timers
- \brief How to use timers in your application.
+ \brief How to use Qt timers in your application.
\ingroup best-practices
diff --git a/doc/src/images/declarative-folderlistmodel.png b/doc/src/images/declarative-folderlistmodel.png
new file mode 100644
index 0000000..a469f96
--- /dev/null
+++ b/doc/src/images/declarative-folderlistmodel.png
Binary files differ
diff --git a/doc/src/images/declarative-image_fillMode.gif b/doc/src/images/declarative-image_fillMode.gif
deleted file mode 100644
index eb0a9af..0000000
--- a/doc/src/images/declarative-image_fillMode.gif
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/declarative-integrating-graphicswidgets.png b/doc/src/images/declarative-integrating-graphicswidgets.png
deleted file mode 100644
index d57f4b9..0000000
--- a/doc/src/images/declarative-integrating-graphicswidgets.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo-preserveaspectcrop.png b/doc/src/images/declarative-qtlogo-preserveaspectcrop.png
new file mode 100644
index 0000000..64fb086
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo-preserveaspectcrop.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo-preserveaspectfit.png b/doc/src/images/declarative-qtlogo-preserveaspectfit.png
new file mode 100644
index 0000000..2585fa5
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo-preserveaspectfit.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo-stretch.png b/doc/src/images/declarative-qtlogo-stretch.png
new file mode 100644
index 0000000..32a0114
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo-stretch.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo-tile.png b/doc/src/images/declarative-qtlogo-tile.png
new file mode 100644
index 0000000..7d1b9d0
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo-tile.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo-tilehorizontally.png b/doc/src/images/declarative-qtlogo-tilehorizontally.png
new file mode 100644
index 0000000..367a8c7
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo-tilehorizontally.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo-tilevertically.png b/doc/src/images/declarative-qtlogo-tilevertically.png
new file mode 100644
index 0000000..68afafa
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo-tilevertically.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo1.png b/doc/src/images/declarative-qtlogo.png
index 940d159..940d159 100644
--- a/doc/src/images/declarative-qtlogo1.png
+++ b/doc/src/images/declarative-qtlogo.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo2.png b/doc/src/images/declarative-qtlogo2.png
deleted file mode 100644
index b1d128a..0000000
--- a/doc/src/images/declarative-qtlogo2.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo3.png b/doc/src/images/declarative-qtlogo3.png
deleted file mode 100644
index d516524..0000000
--- a/doc/src/images/declarative-qtlogo3.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo4.png b/doc/src/images/declarative-qtlogo4.png
deleted file mode 100644
index 7c8aa64..0000000
--- a/doc/src/images/declarative-qtlogo4.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo5.png b/doc/src/images/declarative-qtlogo5.png
deleted file mode 100644
index b7b3513..0000000
--- a/doc/src/images/declarative-qtlogo5.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo6.png b/doc/src/images/declarative-qtlogo6.png
deleted file mode 100644
index 07a078f..0000000
--- a/doc/src/images/declarative-qtlogo6.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/modelview-move-rows-1.png b/doc/src/images/modelview-move-rows-1.png
new file mode 100644
index 0000000..b629a72
--- /dev/null
+++ b/doc/src/images/modelview-move-rows-1.png
Binary files differ
diff --git a/doc/src/images/modelview-move-rows-2.png b/doc/src/images/modelview-move-rows-2.png
new file mode 100644
index 0000000..674ca18
--- /dev/null
+++ b/doc/src/images/modelview-move-rows-2.png
Binary files differ
diff --git a/doc/src/images/modelview-move-rows-3.png b/doc/src/images/modelview-move-rows-3.png
new file mode 100644
index 0000000..5445dd5
--- /dev/null
+++ b/doc/src/images/modelview-move-rows-3.png
Binary files differ
diff --git a/doc/src/images/modelview-move-rows-4.png b/doc/src/images/modelview-move-rows-4.png
new file mode 100644
index 0000000..ecd65ba
--- /dev/null
+++ b/doc/src/images/modelview-move-rows-4.png
Binary files differ
diff --git a/doc/src/images/multitouch-fingerpaint-example.png b/doc/src/images/multitouch-fingerpaint-example.png
new file mode 100644
index 0000000..c741b65
--- /dev/null
+++ b/doc/src/images/multitouch-fingerpaint-example.png
Binary files differ
diff --git a/doc/src/images/qml-rssnews-example.png b/doc/src/images/qml-rssnews-example.png
new file mode 100644
index 0000000..948ef4d
--- /dev/null
+++ b/doc/src/images/qml-rssnews-example.png
Binary files differ
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index 2e6f9bd..b759435 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -44,16 +44,15 @@
\keyword Qt Reference Documentation
\raw HTML
- <div class="indexbox" >
+ <div class="indexbox guide" >
<div class="heading">
Qt Developer Guide</div>
<div class="indexboxcont indexboxbar">
- <div class="section indexIcon">
- <img src="images/qt_guide.png" alt="" /></div>
+ <div class="section indexIcon"><span></span></div>
<div class="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>
</div>
- <div class="section sectionlist lastcol">
+ <div class="section sectionlist">
<ul>
<li><a href="">Getting started</a></li>
<li><a href="installation.html">Installation &amp; first steps</a></li>
@@ -65,50 +64,50 @@
</div>
</div>
</div>
- <div class="indexbox">
+ <div class="indexbox api">
<div class="heading">
Qt API Overviews</div>
- <div class="indexboxcont indexboxbar tricol">
- <div class="sectionlist">
+ <div class="indexboxcont indexboxbar ">
+ <div class="sectionlist tricol">
<ul>
- <li><a href="modules.html">All modules</a></li>
- <li><a href="classes.html">All classes</a></li>
- <li><a href="namespaces.html">All namespaces</a></li>
- <li><a href="functions.html">All functions</a></li>
- <li><a href="platform-specific.html">Platform support &amp; specifics</a></li>
+ <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 stuff</a></li>
+ <li><a href="qdeclarativeelements.html">QML elements</a></li>
</ul>
</div>
- <div class="sectionlist">
+ <div class="sectionlist tricol">
<ul>
- <li><a href="object.html">QObject model</a></li>
- <li><a href="application-windows.html">Window architecture</a></li>
- <li><a href="widgets-and-layouts.html">Styles &amp; layout</a></li>
- <li><a href="eventsandfilters.html">Event handling</a></li>
- <li><a href="paintsystem.html">Paint system</a></li>
+ <li><a href="qt-basic-concepts.html">Basic Qt Architecture</a></li>
+ <li><a href="declarativeui.html">Device UI's &amp; Qt Quick</a></li>
+ <li><a href="qt-gui-concepts.html">Desktop UI components</a></li>
+ <li><a href="platform-specific.html">Platform-specific info</a></li>
+ <li><a href="qt-graphics.html">Graphics, Painting &amp Printing</a></li>
+ <li><a href="qt-network.html">Input/Output &amp networking</a></li>
</ul>
</div>
- <div class="lastcol">
+ <div class="sectionlist">
<ul>
- <li><a href="graphicsview.html">Canvas UI with Graphics View</a></li>
- <li><a href="declarativeui.html">UI design &amp; Qt Quick</a></li>
- <li><a href="io.html">Input/output</a></li>
- <li><a href="webintegration.html">Integrating Web Content</a></li>
- <li><a href="developing-with-qt.html">X-platform, debug &amp; deploy</a></li>
+ <li><a href="model-view-programming.html">Model/View programming</a></li>
+ <li><a href="technology-apis.html">Qt API's for other technologies</a></li>
+ <li><a href="best-practices.html">Qt How-to's &amp best practices</a></li>
+ <li><a href="developing-with-qt.html">Cross-platform development</a></li>
</ul>
</div>
</div>
</div>
- <div class="indexbox">
+ <div class="indexbox tools">
<div class="heading">
Qt Tools</div>
<div class="indexboxcont">
- <div class="section indexIcon">
- <img src="images/qt_tools.png" alt="" /></div>
+ <div class="section indexIcon"><span></span></div>
<div class="section">
<p>Qt offers a selection of development tools for different tasks. Use Qt Creator for
project and code management as well as building powerfull UIs.</p>
</div>
- <div class="section sectionlist lastcol">
+ <div class="section sectionlist">
<ul>
<li><a href="http://doc.qt.nokia.com/qtcreator-1.3/index.html">Qt Creator</a></li>
<li><a href="designer-manual.html">Qt Designer</a></li>
@@ -118,9 +117,8 @@
<li><a href="qvfb.html">Virtual Framebuffer</a></li>
</ul>
</div>
- </div>
- </div>
-
+ </div>
+ </div>
\endraw
*/
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index 1ab1c00..2c0744b 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -41,7 +41,7 @@
/*!
\group modules
- \title All Qt Modules
+ \title All Modules
\startpage index.html Qt Reference Documentation
\nextpage QtCore
@@ -96,8 +96,8 @@
/*!
\module QtCore
\title QtCore Module
- \contentspage All Qt Modules
- \previouspage All Qt Modules
+ \contentspage All Modules
+ \previouspage All Modules
\nextpage QtGui
\ingroup modules
@@ -115,7 +115,7 @@
/*!
\module QtGui
\title QtGui Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtCore
\nextpage QtNetwork
\ingroup modules
@@ -132,7 +132,7 @@
\module QtMultimedia
\page qtmultimedia-module.html
\title QtMultimedia Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtCore
\nextpage QtNetwork
\ingroup modules
@@ -156,7 +156,7 @@
/*!
\module QtNetwork
\title QtNetwork Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtMultimedia
\nextpage QtOpenGL
\ingroup modules
@@ -178,7 +178,7 @@
/*!
\module QtOpenGL
\title QtOpenGL Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtNetwork
\nextpage QtOpenVG
\ingroup modules
@@ -231,7 +231,7 @@
\module QtOpenVG
\title QtOpenVG Module
\since 4.6
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtOpenGL
\nextpage QtScript
\ingroup modules
@@ -286,7 +286,7 @@
\module QtScript
\title QtScript Module
\since 4.3
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtOpenVG
\nextpage QtScriptTools
\ingroup modules
@@ -346,7 +346,7 @@
\module QtScriptTools
\title QtScriptTools Module
\since 4.5
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtScript
\nextpage QtSql
\ingroup modules
@@ -370,7 +370,7 @@
/*!
\module QtSql
\title QtSql Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtScript
\nextpage QtSvg
\ingroup modules
@@ -393,7 +393,7 @@
\module QtSvg
\title QtSvg Module
\since 4.1
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtSql
\nextpage QtWebKit
\ingroup modules
@@ -444,7 +444,7 @@
/*!
\module QtXml
\title QtXml Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtSvg
\nextpage QtXmlPatterns
\ingroup modules
@@ -471,7 +471,7 @@
\module QtXmlPatterns
\title QtXmlPatterns Module
\since 4.4
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtXml
\nextpage Phonon Module
\ingroup modules
@@ -551,7 +551,7 @@
\page phonon-module.html
\module Phonon
\title Phonon Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtXmlPatterns
\nextpage Qt3Support
\ingroup modules
@@ -621,7 +621,7 @@
/*!
\module Qt3Support
\title Qt3Support Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage Phonon Module
\nextpage QtDesigner
\ingroup modules
@@ -654,7 +654,7 @@
/*!
\module QtDesigner
\title QtDesigner Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage Qt3Support
\nextpage QtUiTools
\ingroup modules
@@ -681,7 +681,7 @@
\module QtUiTools
\title QtUiTools Module
\since 4.1
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtDesigner
\nextpage QtHelp
\ingroup modules
@@ -717,7 +717,7 @@
/*!
\module QtHelp
\title QtHelp Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtUiTools
\nextpage QtTest
\ingroup modules
@@ -776,7 +776,7 @@
/*!
\module QtTest
\title QtTest Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtHelp
\nextpage QAxContainer
\ingroup modules
@@ -806,7 +806,7 @@
/*!
\module QAxContainer
\title QAxContainer Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtTest
\nextpage QAxServer
\ingroup modules
@@ -858,7 +858,7 @@
/*!
\module QAxServer
\title QAxServer Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QAxContainer
\nextpage QtDBus module
\ingroup modules
@@ -910,7 +910,7 @@
/*!
\module QtDBus
\title QtDBus module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QAxServer
\ingroup modules
diff --git a/doc/src/network-programming/bearermanagement.qdoc b/doc/src/network-programming/bearermanagement.qdoc
index 10d697a..b10481e 100644
--- a/doc/src/network-programming/bearermanagement.qdoc
+++ b/doc/src/network-programming/bearermanagement.qdoc
@@ -40,12 +40,11 @@
****************************************************************************/
/*!
-\page bearer-management.html
+ \page bearer-management.html
-\title Bearer Management
-\brief An API to control the system's connectivity state.
-
-\ingroup network
+ \title Bearer Management
+ \ingroup qt-network
+ \brief An API to control the system's connectivity state.
Bearer Management controls the connectivity state of the system so that
the user can start or stop interfaces or roam transparently between
diff --git a/doc/src/network-programming/qtnetwork.qdoc b/doc/src/network-programming/qtnetwork.qdoc
index 36f48cf..9134809 100644
--- a/doc/src/network-programming/qtnetwork.qdoc
+++ b/doc/src/network-programming/qtnetwork.qdoc
@@ -50,6 +50,7 @@
/*!
\page network-programming.html
\title Network Programming
+ \ingroup qt-network
\brief An Introduction to Network Programming with Qt
The QtNetwork module offers classes that allow you to write TCP/IP clients
diff --git a/doc/src/network-programming/ssl.qdoc b/doc/src/network-programming/ssl.qdoc
index 2feb7b6..7f365a9 100644
--- a/doc/src/network-programming/ssl.qdoc
+++ b/doc/src/network-programming/ssl.qdoc
@@ -40,11 +40,11 @@
****************************************************************************/
/*!
- \group ssl
+ \page ssl.html
\title Secure Sockets Layer (SSL) Classes
- \ingroup groups
-
\brief Classes for secure communication over network sockets.
+ \ingroup qt-network
+
\keyword SSL
The classes below provide support for secure network communication using
diff --git a/doc/src/objectmodel/metaobjects.qdoc b/doc/src/objectmodel/metaobjects.qdoc
index c1b0ea6..f6fcc44 100644
--- a/doc/src/objectmodel/metaobjects.qdoc
+++ b/doc/src/objectmodel/metaobjects.qdoc
@@ -41,9 +41,11 @@
/*!
\page metaobjects.html
- \title Meta-Object System
+ \title The Meta-Object System
+ \ingroup qt-basic-concepts
\brief An overview of Qt's meta-object system and introspection capabilities.
\keyword meta-object
+ \target Meta-Object System
Qt's meta-object system provides the signals and slots mechanism for
inter-object communication, run-time type information, and the dynamic
diff --git a/doc/src/objectmodel/object.qdoc b/doc/src/objectmodel/object.qdoc
index 2f06004..f81577d 100644
--- a/doc/src/objectmodel/object.qdoc
+++ b/doc/src/objectmodel/object.qdoc
@@ -41,11 +41,10 @@
/*!
\page object.html
- \title Qt Object Model
+ \title Object Model
+ \ingroup qt-basic-concepts
\brief A description of the powerful features made possible by Qt's dynamic object model.
- \ingroup frameworks-technologies
-
The standard C++ object model provides very efficient runtime
support for the object paradigm. But its static nature is
inflexibile in certain problem domains. Graphical user interface
diff --git a/doc/src/objectmodel/objecttrees.qdoc b/doc/src/objectmodel/objecttrees.qdoc
index 11824ae..97d646a 100644
--- a/doc/src/objectmodel/objecttrees.qdoc
+++ b/doc/src/objectmodel/objecttrees.qdoc
@@ -41,7 +41,8 @@
/*!
\page objecttrees.html
- \title Object Trees and Object Ownership
+ \title Object Trees & Ownership
+ \ingroup qt-basic-concepts
\brief Information about the parent-child pattern used to describe
object ownership in Qt.
diff --git a/doc/src/objectmodel/properties.qdoc b/doc/src/objectmodel/properties.qdoc
index a807caf..7f876c3 100644
--- a/doc/src/objectmodel/properties.qdoc
+++ b/doc/src/objectmodel/properties.qdoc
@@ -41,8 +41,10 @@
/*!
\page properties.html
- \title Qt's Property System
+ \title The Property System
+ \ingroup qt-basic-concepts
\brief An overview of Qt's property system.
+ \target Qt's Property System
Qt provides a sophisticated property system similar to the ones
supplied by some compiler vendors. However, as a compiler- and
diff --git a/doc/src/objectmodel/signalsandslots.qdoc b/doc/src/objectmodel/signalsandslots.qdoc
index 0f3f618..f33badf 100644
--- a/doc/src/objectmodel/signalsandslots.qdoc
+++ b/doc/src/objectmodel/signalsandslots.qdoc
@@ -41,7 +41,8 @@
/*!
\page signalsandslots.html
- \title Signals and Slots
+ \title Signals & Slots
+ \ingroup qt-basic-concepts
\brief An overview of Qt's signals and slots inter-object
communication mechanism.
diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc
index 7302e30..c3c59af 100644
--- a/doc/src/overviews.qdoc
+++ b/doc/src/overviews.qdoc
@@ -48,26 +48,97 @@
*/
/*!
- \group frameworks-technologies
- \title Frameworks and Technologies
+ \group qt-basic-concepts
+ \title Basic Qt Architecture
- \brief Documentation about the frameworks and technologies in Qt
+ \brief The basic architecture of the Qt cross-platform application and UI framework.
- These documents dive into the frameworks of classes that Qt provides,
- and provide background information about the technical solutions used
- in Qt's architecture.
+ Qt is a cross-platform application and UI framework for writing
+ web-enabled applications for desktop, mobile, and embedded
+ operating systems. These pages explain basic architectural
+ concepts of Qt:
+
+ \generatelist {related}
+ */
+
+/*!
+ \group qt-gui-concepts
+ \title Qt Desktop UI Components
+
+ \brief The Qt components for constructing native look & feel desktop UI's.
+
+ These pages are about Qt's traditional set of GUI components for
+ building both native look ^ feel and custom UI's for the desktop
+ environment. Use \l {declarativeui.html} {Qt Quick} for building
+ UI's for mobile devices.
+
+ \generatelist {related}
+ */
+
+/*!
+ \group qt-graphics
+ \title Qt Graphics and Painting
+
+ \brief The Qt components for doing graphics.
+
+ \generatelist {related}
+ */
+
+/*!
+ \group qt-network
+ \title Network programming with Qt
+
+ \brief The these pages are about Qt's support for network programming.
+
+ \generatelist {related}
+ */
+
+/*!
+ \group technology-apis
+ \title Qt API's for other technologies
+
+ These pages document Qt's API's for some widely-used standards and
+ technologies.
\generatelist{related}
*/
/*!
+ \group qt-activex
+ \title Qt For ActiveX
+ \brief Qt API's for using ActiveX controls, servers, and COM.
+ \ingroup technology-apis
+ \ingroup platform-specific
+
+ These pages document Qt's API's for developing with ActiveX
+ controls, servers, and COM.
+
+ \generatelist{related}
+*/
+
+/*!
+ \group qt-sql
+ \title Using SQL in Qt
+ \brief Qt API's for using SQL.
+ \ingroup technology-apis
+ \ingroup best-practices
+
+ These pages document Qt's API's for using SQL database systems
+ in Qt applications.
+
+ \generatelist{related}
+*/
+
+/*!
\group best-practices
\title How-To's and Best Practices
\brief How-To Guides and Best Practices
- These documents provide guidelines and best practices explaining
- how to use Qt to solve specific technical problems.
+ These documents provide guidelines and best practices for using Qt
+ to solve specific technical problems. They are listed
+ alphabetically by the first word in the title, so scan the entire
+ list to find what you want.
\generatelist{related}
*/
diff --git a/doc/src/painting-and-printing/coordsys.qdoc b/doc/src/painting-and-printing/coordsys.qdoc
index 5807f57..d6714b8 100644
--- a/doc/src/painting-and-printing/coordsys.qdoc
+++ b/doc/src/painting-and-printing/coordsys.qdoc
@@ -41,14 +41,11 @@
/*!
\page coordsys.html
- \title The Coordinate System
+ \title Coordinate System
+ \ingroup qt-graphics
\brief Information about the coordinate system used by the paint
system.
- \previouspage Drawing and Filling
- \contentspage The Paint System
- \nextpage Reading and Writing Image Files
-
The coordinate system is controlled by the QPainter
class. Together with the QPaintDevice and QPaintEngine classes,
QPainter form the basis of Qt's painting system, Arthur. QPainter
diff --git a/doc/src/painting-and-printing/paintsystem.qdoc b/doc/src/painting-and-printing/paintsystem.qdoc
index 802751f..44c84a2 100644
--- a/doc/src/painting-and-printing/paintsystem.qdoc
+++ b/doc/src/painting-and-printing/paintsystem.qdoc
@@ -60,7 +60,9 @@
/*!
\page paintsystem.html
- \title The Paint System
+ \title Paint System
+ \brief A system for painting on the screen or on print devices using the same API
+ \ingroup qt-graphics
\ingroup frameworks-technologies
Qt's paint system enables painting on screen and print devices
diff --git a/doc/src/painting-and-printing/printing.qdoc b/doc/src/painting-and-printing/printing.qdoc
index 3d6ade2..6dad097 100644
--- a/doc/src/painting-and-printing/printing.qdoc
+++ b/doc/src/painting-and-printing/printing.qdoc
@@ -49,6 +49,7 @@
/*!
\page printing.html
\title Printing with Qt
+ \ingroup qt-graphics
\previouspage Styling
\contentspage The Paint System
diff --git a/doc/src/platforms/emb-openvg.qdocinc b/doc/src/platforms/emb-openvg.qdocinc
index 2f9cc21..579af67 100644
--- a/doc/src/platforms/emb-openvg.qdocinc
+++ b/doc/src/platforms/emb-openvg.qdocinc
@@ -135,8 +135,25 @@ transformations for non-image elements in performance critical code.
\endlist
The other members of QPainter::CompositionMode are not supported
-because OpenVG 1.1 does not have an equivalent in its \c VGBlendMode
-enumeration. Any attempt to set an unsupported mode will result in
+unless the \c{VG_KHR_advanced_blending} extension is present,
+in which case the following additional modes are supported:
+
+\list
+\o QPainter::CompositionMode_Overlay
+\o QPainter::CompositionMode_ColorDodge
+\o QPainter::CompositionMode_ColorBurn
+\o QPainter::CompositionMode_HardLight
+\o QPainter::CompositionMode_SoftLight
+\o QPainter::CompositionMode_Difference
+\o QPainter::CompositionMode_Exclusion
+\o QPainter::CompositionMode_SourceOut
+\o QPainter::CompositionMode_DestinationOut
+\o QPainter::CompositionMode_SourceAtop
+\o QPainter::CompositionMode_DestinationAtop
+\o QPainter::CompositionMode_Xor
+\endlist
+
+Any attempt to set an unsupported mode will result in
the actual mode being set to QPainter::CompositionMode_SourceOver.
Client applications should avoid using unsupported modes.
diff --git a/doc/src/platforms/emb-qvfb.qdoc b/doc/src/platforms/emb-qvfb.qdoc
index bcadb73..ceec027 100644
--- a/doc/src/platforms/emb-qvfb.qdoc
+++ b/doc/src/platforms/emb-qvfb.qdoc
@@ -146,17 +146,13 @@
\list
\o ClamshellPhone
- \o pda
- \o PDAPhone
- \o Qt ExtendedPDA
- \o Qt ExtendedPhone-Advanced
- \o Qt ExtendedPhone-Simple
+ \o PortableMedia
+ \o S60-nHD-Touchscreen
+ \o S60-QVGA-Candybar
\o SmartPhone
\o SmartPhone2
\o SmartPhoneWithButtons
\o TouchscreenPhone
- \o Trolltech-Keypad
- \o Trolltech-Touchscreen
\endlist
In addition, it is possible to create custom skins.
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index 8f5b6a5..16e0c0f 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -517,7 +517,7 @@
Note that some modules rely on other modules. If your application uses
QtXmlPatterns, QtWebkit or QtScript it may still require \c NetworkServices
- \o as these modules rely on QtNetwork to go online.
+ as these modules rely on QtNetwork to go online.
For more information see the documentation of the individual Qt classes. If
a class does not mention Symbian capabilities, it requires none.
diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc
index 591d6f1..6ffc568 100644
--- a/doc/src/platforms/symbian-introduction.qdoc
+++ b/doc/src/platforms/symbian-introduction.qdoc
@@ -191,7 +191,10 @@
\table
\row \o -i \o Install the package right away using PC suite.
\row \o -p \o Only preprocess the template \c .pkg file.
- \row \o -c=<file> \o Read certificate information from a file.
+ \row \o -c <file> \o Read certificate information from a file.
+ \row \o -u \o Preserves unsigned package.
+ \row \o -s \o Generates stub sis for ROM.
+ \row \o -n <name> \o Specifies the final sis name.
\endtable
Execute the \c{createpackage.pl} script without any
diff --git a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
index 22ea240..e3ad483 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
@@ -67,3 +67,23 @@ beginInsertColumns(parent, 6, 8);
//! [5]
beginRemoveColumns(parent, 4, 6);
//! [5]
+
+
+//! [6]
+beginMoveRows(sourceParent, 2, 4, destinationParent, 2);
+//! [6]
+
+
+//! [7]
+beginMoveRows(sourceParent, 2, 4, destinationParent, 6);
+//! [7]
+
+
+//! [8]
+beginMoveRows(parent, 2, 2, parent, 0);
+//! [8]
+
+
+//! [9]
+beginMoveRows(parent, 2, 2, parent, 4);
+//! [9]
diff --git a/doc/src/snippets/declarative/Sprite.qml b/doc/src/snippets/declarative/Sprite.qml
new file mode 100644
index 0000000..6670703
--- /dev/null
+++ b/doc/src/snippets/declarative/Sprite.qml
@@ -0,0 +1,3 @@
+import Qt 4.7
+
+Rectangle { width: 80; height: 50; color: "red" }
diff --git a/doc/src/snippets/declarative/border-image.qml b/doc/src/snippets/declarative/borderimage.qml
index 9c4247e..9c4247e 100644
--- a/doc/src/snippets/declarative/border-image.qml
+++ b/doc/src/snippets/declarative/borderimage.qml
diff --git a/doc/src/snippets/declarative/componentCreation.js b/doc/src/snippets/declarative/componentCreation.js
new file mode 100644
index 0000000..25bc10c
--- /dev/null
+++ b/doc/src/snippets/declarative/componentCreation.js
@@ -0,0 +1,47 @@
+//![0]
+var component;
+var sprite;
+
+function finishCreation() {
+ if (component.status == Component.Ready) {
+ sprite = component.createObject(appWindow);
+ if (sprite == null) {
+ // Error Handling
+ } else {
+ sprite.x = 100;
+ sprite.y = 100;
+ // ...
+ }
+ } else if (component.status == Component.Error) {
+ // Error Handling
+ console.log("Error loading component:", component.errorString());
+ }
+}
+//![0]
+
+function createSpriteObjects() {
+
+//![1]
+component = Qt.createComponent("Sprite.qml");
+if (component.status == Component.Ready)
+ finishCreation();
+else
+ component.statusChanged.connect(finishCreation);
+//![1]
+
+//![2]
+component = Qt.createComponent("Sprite.qml");
+sprite = component.createObject(appWindow);
+
+if (sprite == null) {
+ // Error Handling
+ console.log("Error loading component:", component.errorString());
+} else {
+ sprite.x = 100;
+ sprite.y = 100;
+ // ...
+}
+//![2]
+
+}
+
diff --git a/doc/src/snippets/declarative/createComponent.qml b/doc/src/snippets/declarative/createComponent.qml
new file mode 100644
index 0000000..c4a1617
--- /dev/null
+++ b/doc/src/snippets/declarative/createComponent.qml
@@ -0,0 +1,9 @@
+import Qt 4.7
+import "componentCreation.js" as MyModule
+
+Rectangle {
+ id: appWindow
+ width: 300; height: 300
+
+ Component.onCompleted: MyModule.createSpriteObjects();
+}
diff --git a/doc/src/snippets/declarative/createQmlObject.qml b/doc/src/snippets/declarative/createQmlObject.qml
new file mode 100644
index 0000000..6b331c4
--- /dev/null
+++ b/doc/src/snippets/declarative/createQmlObject.qml
@@ -0,0 +1,18 @@
+import Qt 4.7
+
+Rectangle {
+ id: targetItem
+ property QtObject newObject
+
+ width: 100
+ height: 100
+
+ function createIt() {
+//![0]
+newObject = Qt.createQmlObject('import Qt 4.7; Rectangle {color: "red"; width: 20; height: 20}',
+ targetItem, "dynamicSnippet1");
+//![0]
+ }
+
+ Component.onCompleted: createIt()
+}
diff --git a/doc/src/snippets/declarative/drag.qml b/doc/src/snippets/declarative/drag.qml
index 9465efb..79469e3 100644
--- a/doc/src/snippets/declarative/drag.qml
+++ b/doc/src/snippets/declarative/drag.qml
@@ -9,7 +9,7 @@ Rectangle {
MouseArea {
anchors.fill: parent
drag.target: pic
- drag.axis: "XAxis"
+ drag.axis: Drag.XAxis
drag.minimumX: 0
drag.maximumX: blurtest.width-pic.width
}
diff --git a/doc/src/snippets/declarative/dynamicObjects.qml b/doc/src/snippets/declarative/dynamicObjects.qml
new file mode 100644
index 0000000..6a8c927
--- /dev/null
+++ b/doc/src/snippets/declarative/dynamicObjects.qml
@@ -0,0 +1,29 @@
+import Qt 4.7
+
+//![0]
+Rectangle {
+ id: rootItem
+ width: 300
+ height: 300
+
+ Component {
+ id: rectComponent
+
+ Rectangle {
+ id: rect
+ width: 40; height: 40;
+ color: "red"
+
+ NumberAnimation on opacity { from: 1; to: 0; duration: 1000 }
+
+ Component.onCompleted: rect.destroy(1000);
+ }
+ }
+
+ function createRectangle() {
+ var object = rectComponent.createObject(rootItem);
+ }
+
+ Component.onCompleted: createRectangle()
+}
+//![0]
diff --git a/doc/src/snippets/declarative/flickableScrollbar.qml b/doc/src/snippets/declarative/flickableScrollbar.qml
new file mode 100644
index 0000000..147751a
--- /dev/null
+++ b/doc/src/snippets/declarative/flickableScrollbar.qml
@@ -0,0 +1,26 @@
+import Qt 4.7
+
+//![0]
+Rectangle {
+ width: 200; height: 200
+
+ Flickable {
+ id: flickable
+//![0]
+ anchors.fill: parent
+ contentWidth: image.width; contentHeight: image.height
+
+ Image { id: image; source: "pics/qt.png" }
+//![1]
+ }
+
+ Rectangle {
+ id: scrollbar
+ anchors.right: flickable.right
+ y: flickable.visibleArea.yPosition * flickable.height
+ width: 10
+ height: flickable.visibleArea.heightRatio * flickable.height
+ color: "black"
+ }
+}
+//![1]
diff --git a/doc/src/snippets/declarative/focusscopes.qml b/doc/src/snippets/declarative/focusscopes.qml
new file mode 100644
index 0000000..686de29
--- /dev/null
+++ b/doc/src/snippets/declarative/focusscopes.qml
@@ -0,0 +1,27 @@
+import Qt 4.7
+
+//![0]
+Rectangle {
+ color: "lightsteelblue"; width: 240; height: 320
+
+ ListView {
+ anchors.fill: parent
+ focus: true
+
+ model: ListModel {
+ ListElement { name: "Bob" }
+ ListElement { name: "John" }
+ ListElement { name: "Michael" }
+ }
+
+ delegate: FocusScope {
+ width: childrenRect.width; height: childrenRect.height
+ TextInput {
+ focus: true
+ text: name
+ Keys.onReturnPressed: console.log(name)
+ }
+ }
+ }
+ }
+//![0]
diff --git a/doc/src/snippets/declarative/folderlistmodel.qml b/doc/src/snippets/declarative/folderlistmodel.qml
new file mode 100644
index 0000000..e90f9fd
--- /dev/null
+++ b/doc/src/snippets/declarative/folderlistmodel.qml
@@ -0,0 +1,17 @@
+//![0]
+import Qt 4.7
+import Qt.labs.folderlistmodel 1.0
+
+ListView {
+ FolderListModel {
+ id: foldermodel
+ nameFilters: ["*.qml"]
+ }
+ Component {
+ id: filedelegate
+ Text { text: fileName }
+ }
+ model: foldermodel
+ delegate: filedelegate
+}
+//![0]
diff --git a/doc/src/snippets/declarative/listview/ContactModel.qml b/doc/src/snippets/declarative/listview/ContactModel.qml
new file mode 100644
index 0000000..b930c06
--- /dev/null
+++ b/doc/src/snippets/declarative/listview/ContactModel.qml
@@ -0,0 +1,18 @@
+//![0]
+import Qt 4.7
+
+ListModel {
+ ListElement {
+ name: "Bill Smith"
+ number: "555 3264"
+ }
+ ListElement {
+ name: "John Brown"
+ number: "555 8426"
+ }
+ ListElement {
+ name: "Sam Wise"
+ number: "555 0473"
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/listview/dummydata/ContactModel.qml b/doc/src/snippets/declarative/listview/dummydata/ContactModel.qml
deleted file mode 100644
index 20687cf..0000000
--- a/doc/src/snippets/declarative/listview/dummydata/ContactModel.qml
+++ /dev/null
@@ -1,17 +0,0 @@
-import Qt 4.7
-
-ListModel {
- id: contactModel
- ListElement {
- name: "Bill Smith"
- number: "555 3264"
- }
- ListElement {
- name: "John Brown"
- number: "555 8426"
- }
- ListElement {
- name: "Sam Wise"
- number: "555 0473"
- }
-}
diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml
index 61bf126..1e9ccd9 100644
--- a/doc/src/snippets/declarative/listview/listview.qml
+++ b/doc/src/snippets/declarative/listview/listview.qml
@@ -1,49 +1,101 @@
+//![import]
import Qt 4.7
+//![import]
-//! [3]
-Rectangle {
- width: 180; height: 200; color: "white"
+Item {
+
+//![classdocs simple]
+ListView {
+ width: 180; height: 200
+
+ model: ContactModel {}
+ delegate: Text {
+ text: name + ": " + number
+ }
+}
+//![classdocs simple]
- // ContactModel model is defined in dummydata/ContactModel.qml
- // The viewer automatically loads files in dummydata/* to assist
- // development without a real data source.
+//![classdocs advanced]
+Rectangle {
+ width: 180; height: 200
- // Define a delegate component. A component will be
- // instantiated for each visible item in the list.
-//! [0]
Component {
- id: delegate
+ id: contactDelegate
Item {
- id: wrapper
width: 180; height: 40
Column {
- x: 5; y: 5
Text { text: '<b>Name:</b> ' + name }
Text { text: '<b>Number:</b> ' + number }
}
}
}
-//! [0]
- // Define a highlight component. Just one of these will be instantiated
- // by each ListView and placed behind the current item.
-//! [1]
- Component {
- id: highlight
- Rectangle {
- color: "lightsteelblue"
- radius: 5
- }
- }
-//! [1]
- // The actual list
-//! [2]
+
ListView {
- width: parent.width; height: parent.height
- model: ContactModel
- delegate: delegate
- highlight: highlight
+ anchors.fill: parent
+ model: ContactModel {}
+ delegate: contactDelegate
+ highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
focus: true
}
-//! [2]
}
-//! [3]
+//![classdocs advanced]
+
+//![delayRemove]
+Component {
+ id: delegate
+ Item {
+ ListView.onRemove: SequentialAnimation {
+ PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: true }
+ NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing.type: Easing.InOutQuad }
+ PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: false }
+ }
+ }
+}
+//![delayRemove]
+
+//![highlightFollowsCurrentItem]
+Component {
+ id: highlight
+ Rectangle {
+ width: 180; height: 40
+ color: "lightsteelblue"; radius: 5
+ SpringFollow on y {
+ to: list.currentItem.y
+ spring: 3
+ damping: 0.2
+ }
+ }
+}
+
+ListView {
+ id: list
+ width: 180; height: 200
+ model: ContactModel {}
+ delegate: Text { text: name }
+
+ highlight: highlight
+ highlightFollowsCurrentItem: false
+ focus: true
+}
+//![highlightFollowsCurrentItem]
+
+//![isCurrentItem]
+ListView {
+ width: 180; height: 200
+
+ Component {
+ id: contactsDelegate
+ Text {
+ id: contactInfo
+ text: name + ": " + number
+ color: contactInfo.ListView.isCurrentItem ? "red" : "black"
+ }
+ }
+
+ model: ContactModel {}
+ delegate: contactsDelegate
+ focus: true
+}
+//![isCurrentItem]
+
+}
diff --git a/doc/src/snippets/declarative/mouseregion.qml b/doc/src/snippets/declarative/mouseregion.qml
index a464069..683770b 100644
--- a/doc/src/snippets/declarative/mouseregion.qml
+++ b/doc/src/snippets/declarative/mouseregion.qml
@@ -3,13 +3,21 @@ import Qt 4.7
Rectangle { width: 200; height: 100
Row {
//! [0]
-Rectangle { width: 100; height: 100; color: "green"
- MouseArea { anchors.fill: parent; onClicked: { parent.color = 'red' } }
+Rectangle {
+ width: 100; height: 100
+ color: "green"
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: { parent.color = 'red' }
+ }
}
//! [0]
//! [1]
Rectangle {
- width: 100; height: 100; color: "green"
+ width: 100; height: 100
+ color: "green"
+
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
diff --git a/doc/src/declarative/snippets/qtbinding/contextproperties/contextproperties.pro b/doc/src/snippets/declarative/qtbinding/contextproperties/contextproperties.pro
index 68eeaf2..68eeaf2 100644
--- a/doc/src/declarative/snippets/qtbinding/contextproperties/contextproperties.pro
+++ b/doc/src/snippets/declarative/qtbinding/contextproperties/contextproperties.pro
diff --git a/doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp b/doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp
index 4073a6c..4073a6c 100644
--- a/doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp
+++ b/doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/contextproperties/main.qml b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml
index 1053f73..1053f73 100644
--- a/doc/src/declarative/snippets/qtbinding/contextproperties/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h
index d0d253a..d0d253a 100644
--- a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h
+++ b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.pro b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.pro
index e6af0d0..e6af0d0 100644
--- a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.pro
+++ b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.pro
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/main.cpp b/doc/src/snippets/declarative/qtbinding/custompalette/main.cpp
index dc651f6..dc651f6 100644
--- a/doc/src/declarative/snippets/qtbinding/custompalette/main.cpp
+++ b/doc/src/snippets/declarative/qtbinding/custompalette/main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/main.qml b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml
index f1a3b4f..f1a3b4f 100644
--- a/doc/src/declarative/snippets/qtbinding/custompalette/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml
diff --git a/doc/src/declarative/snippets/qtbinding/resources/example.qrc b/doc/src/snippets/declarative/qtbinding/resources/example.qrc
index 5e49415..5e49415 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/example.qrc
+++ b/doc/src/snippets/declarative/qtbinding/resources/example.qrc
diff --git a/doc/src/declarative/snippets/qtbinding/resources/images/background.png b/doc/src/snippets/declarative/qtbinding/resources/images/background.png
index e69de29..e69de29 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/images/background.png
+++ b/doc/src/snippets/declarative/qtbinding/resources/images/background.png
diff --git a/doc/src/declarative/snippets/qtbinding/resources/main.cpp b/doc/src/snippets/declarative/qtbinding/resources/main.cpp
index 5459b9e..5459b9e 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/main.cpp
+++ b/doc/src/snippets/declarative/qtbinding/resources/main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/resources/main.qml b/doc/src/snippets/declarative/qtbinding/resources/main.qml
index dfe923f..dfe923f 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/resources/main.qml
diff --git a/doc/src/declarative/snippets/qtbinding/resources/resources.pro b/doc/src/snippets/declarative/qtbinding/resources/resources.pro
index cc01ee1..cc01ee1 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/resources.pro
+++ b/doc/src/snippets/declarative/qtbinding/resources/resources.pro
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp b/doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp
index 537a288..537a288 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/main.qml b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml
index 2efa542..2efa542 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.cpp b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.cpp
index 4954a5f..4954a5f 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.cpp
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h
index 8d17121..8d17121 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.pro b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.pro
index d803e6a..d803e6a 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.pro
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.pro
diff --git a/doc/src/sql-programming/qsqldatatype-table.qdoc b/doc/src/sql-programming/qsqldatatype-table.qdoc
index fc961f5..fb5fb49 100644
--- a/doc/src/sql-programming/qsqldatatype-table.qdoc
+++ b/doc/src/sql-programming/qsqldatatype-table.qdoc
@@ -41,19 +41,20 @@
/*!
\page sql-types.html
- \title Recommended Use of Data Types in Databases
+ \title Data Types for Qt-supported Database Systems
+ \brief Recommended data types for database systems
- \ingroup best-practices
+ \ingroup qt-sql
- \section1 Recommended Use of Types in Qt Supported Databases
+ \section1 Data Types for Qt Supported Database Systems
- This table shows the recommended data types used when extracting data
- from the databases supported in Qt. It is important to note that the
- types used in Qt are not necessarily valid as input to the specific
- database. One example could be that a double would work perfectly as
- input for floating point records in a database, but not necessarily
- as a storage format for output from the database since it would be stored
- with 64-bit precision in C++.
+ This table shows the recommended data types for extracting data from
+ the databases supported in Qt. Note that types used in Qt are not
+ necessarily valid as input types to a specific database
+ system. e.g., A double might work perfectly as input for floating
+ point records in a particular database, but not necessarily as a
+ storage format for output from that database, because it would be
+ stored with 64-bit precision in C++.
\tableofcontents
diff --git a/doc/src/sql-programming/sql-driver.qdoc b/doc/src/sql-programming/sql-driver.qdoc
index 6bccd83..f0e4e52 100644
--- a/doc/src/sql-programming/sql-driver.qdoc
+++ b/doc/src/sql-programming/sql-driver.qdoc
@@ -44,7 +44,7 @@
\title SQL Database Drivers
\brief How to configure and install QtSql drivers for supported databases.
- \ingroup best-practices
+ \ingroup qt-sql
The QtSql module uses driver \l{How to Create Qt
Plugins}{plugins} to communicate with the different database
diff --git a/doc/src/sql-programming/sql-programming.qdoc b/doc/src/sql-programming/sql-programming.qdoc
index f1f3e5e..b34810c 100644
--- a/doc/src/sql-programming/sql-programming.qdoc
+++ b/doc/src/sql-programming/sql-programming.qdoc
@@ -49,6 +49,7 @@
/*!
\page sql-programming.html
\title SQL Programming
+ \ingroup qt-sql
\nextpage Connecting to Databases
\brief Database integration for Qt applications.
@@ -118,6 +119,7 @@
/*!
\page sql-connecting.html
\title Connecting to Databases
+ \ingroup qt-sql
\contentspage SQL Programming
\previouspage SQL Programming
@@ -187,6 +189,7 @@
/*!
\page sql-sqlstatements.html
\title Executing SQL Statements
+ \ingroup qt-sql
\previouspage Connecting to Databases
\contentspage SQL Programming
@@ -337,6 +340,7 @@
/*!
\page sql-model.html
\title Using the SQL Model Classes
+ \ingroup qt-sql
\previouspage Executing SQL Statements
\contentspage SQL Programming
@@ -483,6 +487,7 @@
/*!
\page sql-presenting.html
\title Presenting Data in a Table View
+ \ingroup qt-sql
\previouspage Using the SQL Model Classes
\contentspage SQL Programming
@@ -587,6 +592,7 @@
/*!
\page sql-forms.html
\title Creating Data-Aware Forms
+ \ingroup qt-sql
\previouspage Presenting Data in a Table View
\contentspage SQL Programming
diff --git a/doc/src/template/images/api_examples.png b/doc/src/template/images/api_examples.png
deleted file mode 100755
index 1fcbc96..0000000
--- a/doc/src/template/images/api_examples.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/api_lookup.png b/doc/src/template/images/api_lookup.png
deleted file mode 100755
index 1cffd5e..0000000
--- a/doc/src/template/images/api_lookup.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/api_topics.png b/doc/src/template/images/api_topics.png
deleted file mode 100755
index a76a6c3..0000000
--- a/doc/src/template/images/api_topics.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_l.png b/doc/src/template/images/bg_l.png
index 95470c7..90b1da1 100755
--- a/doc/src/template/images/bg_l.png
+++ b/doc/src/template/images/bg_l.png
Binary files differ
diff --git a/doc/src/template/images/bg_l_blank.png b/doc/src/template/images/bg_l_blank.png
index e0eca3f..5a9673d 100755
--- a/doc/src/template/images/bg_l_blank.png
+++ b/doc/src/template/images/bg_l_blank.png
Binary files differ
diff --git a/doc/src/template/images/bg_ll.png b/doc/src/template/images/bg_ll.png
deleted file mode 100755
index 99796e7..0000000
--- a/doc/src/template/images/bg_ll.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_ll_blank.png b/doc/src/template/images/bg_ll_blank.png
deleted file mode 100755
index 95a1c45..0000000
--- a/doc/src/template/images/bg_ll_blank.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_lr.png b/doc/src/template/images/bg_lr.png
deleted file mode 100755
index fef1d17..0000000
--- a/doc/src/template/images/bg_lr.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_r.png b/doc/src/template/images/bg_r.png
index 42a35a5..f0fb121 100755
--- a/doc/src/template/images/bg_r.png
+++ b/doc/src/template/images/bg_r.png
Binary files differ
diff --git a/doc/src/template/images/bg_ul.png b/doc/src/template/images/bg_ul.png
deleted file mode 100755
index 303181f..0000000
--- a/doc/src/template/images/bg_ul.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_ul_blank.png b/doc/src/template/images/bg_ul_blank.png
deleted file mode 100755
index 7051261..0000000
--- a/doc/src/template/images/bg_ul_blank.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_ur.png b/doc/src/template/images/bg_ur.png
deleted file mode 100755
index bfa51a4..0000000
--- a/doc/src/template/images/bg_ur.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_ur_blank.png b/doc/src/template/images/bg_ur_blank.png
deleted file mode 100755
index 5779961..0000000
--- a/doc/src/template/images/bg_ur_blank.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/box_bg.png b/doc/src/template/images/box_bg.png
index 232655a..3322f92 100755
--- a/doc/src/template/images/box_bg.png
+++ b/doc/src/template/images/box_bg.png
Binary files differ
diff --git a/doc/src/template/images/breadcrumb.png b/doc/src/template/images/breadcrumb.png
index f0571ce..0ded551 100755
--- a/doc/src/template/images/breadcrumb.png
+++ b/doc/src/template/images/breadcrumb.png
Binary files differ
diff --git a/doc/src/template/images/bullet_gt.png b/doc/src/template/images/bullet_gt.png
index 8875925..7561b4e 100755
--- a/doc/src/template/images/bullet_gt.png
+++ b/doc/src/template/images/bullet_gt.png
Binary files differ
diff --git a/doc/src/template/images/bullet_sq.png b/doc/src/template/images/bullet_sq.png
index db85ee3..a84845e 100755
--- a/doc/src/template/images/bullet_sq.png
+++ b/doc/src/template/images/bullet_sq.png
Binary files differ
diff --git a/doc/src/template/images/content_bg.png b/doc/src/template/images/content_bg.png
deleted file mode 100755
index 416397d..0000000
--- a/doc/src/template/images/content_bg.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/form_bg.png b/doc/src/template/images/form_bg.png
deleted file mode 100755
index bf2ee54..0000000
--- a/doc/src/template/images/form_bg.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/header.png b/doc/src/template/images/header.png
deleted file mode 100644
index 141488b..0000000
--- a/doc/src/template/images/header.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/page.png b/doc/src/template/images/page.png
new file mode 100644
index 0000000..1db151b
--- /dev/null
+++ b/doc/src/template/images/page.png
Binary files differ
diff --git a/doc/src/template/images/page_bg.png b/doc/src/template/images/page_bg.png
index fb7d051..9b3bd99 100755
--- a/doc/src/template/images/page_bg.png
+++ b/doc/src/template/images/page_bg.png
Binary files differ
diff --git a/doc/src/template/images/print.png b/doc/src/template/images/print.png
deleted file mode 100755
index 4581da1..0000000
--- a/doc/src/template/images/print.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/qt_guide.png b/doc/src/template/images/qt_guide.png
deleted file mode 100755
index 9f53a05..0000000
--- a/doc/src/template/images/qt_guide.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/qt_icon.png b/doc/src/template/images/qt_icon.png
deleted file mode 100755
index fbaee35..0000000
--- a/doc/src/template/images/qt_icon.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/qt_ref_doc.png b/doc/src/template/images/qt_ref_doc.png
deleted file mode 100755
index 141488b..0000000
--- a/doc/src/template/images/qt_ref_doc.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/qt_tools.png b/doc/src/template/images/qt_tools.png
deleted file mode 100755
index cc24179..0000000
--- a/doc/src/template/images/qt_tools.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/sep.png b/doc/src/template/images/sep.png
deleted file mode 100755
index c895646..0000000
--- a/doc/src/template/images/sep.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/spinner.gif b/doc/src/template/images/spinner.gif
new file mode 100644
index 0000000..1ed786f
--- /dev/null
+++ b/doc/src/template/images/spinner.gif
Binary files differ
diff --git a/doc/src/template/images/sprites-combined.png b/doc/src/template/images/sprites-combined.png
index 4186022..3a48b21 100755
--- a/doc/src/template/images/sprites-combined.png
+++ b/doc/src/template/images/sprites-combined.png
Binary files differ
diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js
index fa454e3..7d93486 100755
--- a/doc/src/template/scripts/functions.js
+++ b/doc/src/template/scripts/functions.js
@@ -1,10 +1,8 @@
-
/* START non link areas where cursor should change to pointing hand */
$('.t_button').mouseover(function() {
$('.t_button').css('cursor','pointer');
/*document.getElementById(this.id).style.cursor='pointer';*/
});
-
/* END non link areas */
$('#smallA').click(function() {
$('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('font-size','smaller');
@@ -35,27 +33,139 @@ $('#bigA').click(function() {
$(this).addClass('active')
});
-function doSearch(str){
-
-if (str.length>3)
- {
- alert('Search is not yet activated.');
- // document.getElementById("refWrapper").innerHTML="";
- return;
- }
- else
- return;
-
-// var url="indexSearch.php";
-// url=url+"?q="+str;
- // url=url+"&sid="+Math.random();
- // var url="http://localhost:8983/solr/select?";
- // url=url+"&q="+str;
- // url=url+"&fq=&start=0&rows=10&fl=&qt=&wt=&explainOther=&hl.fl=";
-
- // $.get(url, function(data){
- // alert(data);
- // document.getElementById("refWrapper").innerHTML=data;
- //});
-
-} \ No newline at end of file
+
+var lookupCount = 0;
+var articleCount = 0;
+var exampleCount = 0;
+var qturl = ""; // change from "http://doc.qt.nokia.com/4.6/" to 0 so we can have relative links
+
+function processNokiaData(response){
+$('.sidebar .search form input').addClass('loading');
+ // debug $('.content').prepend('<li>handling search results</li>'); // debuging
+ var propertyTags = response.getElementsByTagName('page');
+
+ for (var i=0; i< propertyTags.length; i++) {
+ var linkStart = "<li class=\"liveResult\"><a href='"+qturl+"";
+ var linkEnd = "</a></li>";
+
+ if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage'){
+ lookupCount++;
+ //$('.live001').css('display','block');
+
+
+ for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
+ full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
+ full_li_element = full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd;
+
+ $('#ul001').append(full_li_element);
+ $('#ul001 .defaultLink').css('display','none');
+
+ }
+ }
+
+ if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article'){
+ articleCount++;
+ //$('.live002').css('display','block');
+
+
+ for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
+ full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
+ full_li_element =full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd ;
+
+ $('#ul002').append(full_li_element);
+ $('#ul002 .defaultLink').css('display','none');
+
+ }
+ }
+ if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Example'){
+ exampleCount++;
+ //$('.live003').css('display','block');
+
+
+ for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
+ full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
+ full_li_element =full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd ;
+
+ $('#ul003').append(full_li_element);
+ $('#ul003 .defaultLink').css('display','none');
+
+ }
+ }
+ }
+
+ if(lookupCount == 0){$('#ul001').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');
+}
+ if(articleCount == 0){$('#ul002').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul002 li').css('display','block');}
+ if(exampleCount == 0){$('#ul003').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul003 li').css('display','block');}
+ // reset count variables;
+ lookupCount=0;
+ articleCount = 0;
+ exampleCount = 0;
+
+}
+
+//build regular expression object to find empty string or any number of blank
+var blankRE=/^\s*$/;
+function CheckEmptyAndLoadList()
+{
+ $('.liveResult').remove();
+ var value = document.getElementById('pageType').value;
+ if((blankRE.test(value)) || (value.length < 3))
+ {
+ //empty inputbox
+ // load default li elements into the ul if empty
+ // loadAllList(); // replaced
+ $('.defaultLink').css('display','block');
+ // $('.liveResult').css('display','none');
+ }else{
+ $('.defaultLink').css('display','none');
+ }
+}
+/*
+$(window).resize(function(){
+if($(window).width()<400)
+ $('body').addClass('offline');
+else
+ $('body').removeClass('offline');
+ });
+ */
+// Loads on doc ready
+ $(document).ready(function () {
+ var pageTitle = $('title').html();
+ $('#feedform').append('<input id="page" name="pageVal" value="'+pageTitle+'" style="display:none;">');
+ var currentString = $('#pageType').val() ;
+ if(currentString.length < 1){
+ $('.defaultLink').css('display','block');
+ CheckEmptyAndLoadList();
+ }
+
+ $('#pageType').keyup(function () {
+ var searchString = $('#pageType').val() ;
+ if ((searchString == null) || (searchString.length < 3)) {
+ $('.liveResult').remove(); // replaces removeResults();
+ CheckEmptyAndLoadList();
+ $('.report').remove();
+ // debug$('.content').prepend('<li>too short or blank</li>'); // debug
+ return;
+ }
+ if (this.timer) clearTimeout(this.timer);
+ this.timer = setTimeout(function () {
+ // debug$('.content').prepend('<li>new search started </li>');// debug
+ // debug$('.content').prepend('<p class=\"report\">Search string ' +searchString +'</p>'); // debug
+
+ $.ajax({
+ contentType: "application/x-www-form-urlencoded",
+ url: 'http://' + location.host + '/nokiasearch/GetDataServlet',
+ data: 'searchString='+searchString,
+ dataType:'xml',
+ type: 'post',
+ success: function (response, textStatus) {
+
+ $('.liveResult').remove(); // replaces removeResults();
+ processNokiaData(response);
+
+ }
+ });
+ }, 500);
+ });
+ });
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index d5920b9..5ad90e3 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -58,6 +58,23 @@
{
vertical-align: baseline;
}
+ tt, .qmlreadonly span, .qmldefault span
+ {
+ word-spacing:5px;
+ }
+ .heading
+ {
+ font: normal 600 16px/1.0 Arial;
+ padding-bottom: 15px;
+ }
+ .subtitle
+ {
+ font-size: 13px;
+ }
+ .small-subtitle
+ {
+ font-size: 13px;
+ }
legend
{
color: #000000;
@@ -73,7 +90,6 @@
{
font-size: 100%;
}
- /* Page style */
html
{
background-color: #e5e5e5;
@@ -92,6 +108,11 @@
{
font-style: italic;
}
+ a
+ {
+ color: #00732f;
+ text-decoration: none;
+ }
.header, .footer, .wrapper
{
min-width: 600px;
@@ -106,23 +127,19 @@
{
padding-left: 216px;
height: 15px;
- background: url(../images/bg_ul.png) no-repeat 0 0;
+ background: url(../images/page.png) no-repeat 0 0;
overflow: hidden;
}
.offline .wrapper .hd
{
- background: url(../images/bg_ul_blank.png) no-repeat 0 0;
+ background: url(../images/page.png) no-repeat 0 -15px;
}
.wrapper .hd span
{
height: 15px;
display: block;
- background: url(../images/bg_ur.png) no-repeat 100% 0;
overflow: hidden;
- }
- .offline .wrapper .hd span
- {
- /* background: url(../images/bg_ur_blank.png) no-repeat 100% 0; */
+ background: url(../images/page.png) no-repeat 100% -30px;
}
.wrapper .bd
{
@@ -137,18 +154,18 @@
{
padding-left: 216px;
height: 15px;
- background: url(../images/bg_ll.png) no-repeat 0 0;
+ background: url(../images/page.png) no-repeat 0 -75px;
overflow: hidden;
}
.offline .wrapper .ft
{
- background: url(../images/bg_ll_blank.png) no-repeat 0 0;
+ background: url(../images/page.png) no-repeat 0 -90px;
}
.wrapper .ft span
{
height: 15px;
display: block;
- background: url(../images/bg_lr.png) no-repeat 100% 0;
+ background: url(../images/page.png) no-repeat 100% -60px;
overflow: hidden;
}
.header, .footer
@@ -182,186 +199,9 @@
width: 302px;
height: 22px;
text-indent: -999em;
- background: url(../images/qt_ref_doc.png) no-repeat 0 0;
- }
- /* header elements */
- #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;
+ background: url(../images/sprites-combined.png) no-repeat -78px -235px;
}
- #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;
- }
- /* Clearing */
- .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after
- {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
- }
- /* ^ Clearing */
-
-
-
- .shortCut-topleft-inactive
- {
- padding-left: 3px;
- background: transparent url( "../images/sprites-combined.png" ) no-repeat 0px -58px;
- height: 20px;
- width: 93px;
- }
- .shortCut-topleft-inactive span
- {
- font-variant: normal;
- }
- #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;
- text-decoration: none;
- }
- #shortCut li a:hover
- {
- color: #44a51c;
- text-decoration: none;
- }
-
- /* end of header elements */
-
- /* menu element */
.sidebar
{
float: left;
@@ -369,32 +209,32 @@
width: 200px;
font-size: 11px;
}
- .sidebar a
- {
- color: #00732f;
- text-decoration: none;
- }
- .offline .sidebar, .offline .feedback
+
+ .offline .sidebar, .offline .feedback, .offline .t_button
{
display: none;
}
+
.sidebar .searchlabel
{
padding: 0 0 2px 17px;
font: normal bold 11px/1.2 Verdana;
}
+
.sidebar .search
{
padding: 0 15px 0 16px;
}
+
.sidebar .search form
{
- width: 167px;
- height: 21px;
- padding: 2px 0 0 5px;
- background: url(../images/form_bg.png) no-repeat 0 0;
+ background: url(../images/sprites-combined.png) no-repeat -6px -348px;
+ height:21px;
+ padding:2px 0 0 5px;
+ width:167px;
}
- .sidebar .search form fieldset input#searchstring
+
+ .sidebar .search form input#pageType
{
width: 158px;
height: 19px;
@@ -403,35 +243,68 @@
outline: none;
font: 13px/1.2 Verdana;
}
+
.sidebar .box
{
padding: 17px 15px 5px 16px;
}
+
.sidebar .box .first
{
background-image: none;
}
+
.sidebar .box h2
{
font: normal 18px/1.2 Arial;
- padding: 15px 0 0 40px;
+ padding: 0;
min-height: 32px;
}
+ .sidebar .box h2 span
+ {
+ overflow: hidden;
+ display: inline-block;
+ }
.sidebar .box#lookup h2
{
- background: url(../images/api_lookup.png) no-repeat 0 0;
+ background-image: none;
+ }
+ .sidebar #lookup.box h2 span
+ {
+ background: url(../images/sprites-combined.png) no-repeat -6px -311px;
+ width: 27px;
+ height: 35px;
+ margin-right: 13px;
}
.sidebar .box#topics h2
{
- background: url(../images/api_topics.png) no-repeat 0 0;
+ background-image: none;
+ }
+ .sidebar #topics.box h2 span
+ {
+ background: url(../images/sprites-combined.png) no-repeat -94px -311px;
+ width: 27px;
+ height: 32px;
+ margin-right: 13px;
}
.sidebar .box#examples h2
{
- background: url(../images/api_examples.png) no-repeat 0 0;
+ background-image: none;
+ }
+ .sidebar #examples.box h2 span
+ {
+ background: url(../images/sprites-combined.png) no-repeat -48px -311px;
+ width: 30px;
+ height: 31px;
+ margin-right: 9px;
}
+
.sidebar .box .list
{
display: block;
+ max-height:200px;
+ overflow-y:auto;
+ overflow-x:none;
}
.sidebar .box .live
{
@@ -443,33 +316,34 @@
{
text-decoration: underline;
}
+ .sidebar .box ul
+ {
+ padding:10px;
+ }
.sidebar .box ul li
{
padding-left: 12px;
background: url(../images/bullet_gt.png) no-repeat 0 5px;
- margin-bottom: 15px;
+ margin-bottom: 5px;
}
.sidebar .bottombar
{
background: url(../images/box_bg.png) repeat-x 0 bottom;
}
- /* content elements */
.wrap
{
- overflow: hidden;
+ margin: 0 5px 0 208px;
+ overflow: visible;
}
.offline .wrap
{
margin: 0 5px 0 5px;
}
- /* tool bar */
.wrap .toolbar
{
background-color: #fafafa;
border-bottom: 1px solid #d1d1d1;
- height: 20px;
- margin-left: 3px;
- margin-right: 5px;
+ height: 20px;
position: relative;
}
.wrap .toolbar .toolblock
@@ -487,7 +361,7 @@
{
padding: 0 0 10px 21px;
right: 5px;
- vertical-align: top;
+ vertical-align: middle;
overflow: hidden;
}
.wrap .toolbar .toolbuttons .active
@@ -507,32 +381,56 @@
font-weight: bold;
color: #B0ADAB;
}
- #smallA
+
+ .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;
}
- #medA
+ .toolbuttons #medA
{
font-size: 12pt;
}
- #bigA
+ .toolbuttons #bigA
{
font-size: 14pt;
+ margin-right: 7px;
}
+
#smallA:hover, #medA:hover, #bigA:hover
{
color: #00732F;
}
- #print
+
+ .offline .wrap .breadcrumb
{
- font-size: 14pt;
- line-height: 20pt;
}
- #printIcon
+
+ .wrap .breadcrumb ul
{
- margin-left: 5px;
}
- /* bread crumbs */
.wrap .breadcrumb ul li
{
float: left;
@@ -545,6 +443,10 @@
{
font-weight: normal;
}
+ .wrap .breadcrumb ul li a
+ {
+ color: #363534;
+ }
.wrap .breadcrumb ul li.first
{
background-image: none;
@@ -554,29 +456,29 @@
.wrap .content
{
padding: 30px;
- position: relative;
}
- /* text elements */
- .heading
+
+ .wrap .content li
{
- font: normal 600 16px/1.0 Arial;
- padding-bottom: 15px;
+ padding-left: 12px;
+ background: url(../images/bullet_sq.png) no-repeat 0 5px;
+ font: normal 400 10pt/1 Verdana;
+ /* color: #44a51c;*/
+ margin-bottom: 10px;
}
-
- .subtitle
+ .content li:hover
{
- font-size: 13px;
+ /* text-decoration: underline;*/
}
- .small-subtitle
+ .offline .wrap .content
{
- font-size: 13px;
+ padding-top: 15px;
}
-
+
.wrap .content h1
{
font: 600 18px/1.2 Arial;
- padding-bottom: 15px;
}
.wrap .content h2
{
@@ -588,25 +490,18 @@
}
.wrap .content p
{
- line-height:20px;
- padding:10px 5px 10px 5px;
+ line-height: 20px;
+ padding: 5px;
}
+ .wrap .content table p
+ {
+ line-height: 20px;
+ padding: 0px;
+ }
.wrap .content ul
{
padding-left: 25px;
- }
- .wrap .content li
- {
- padding-left: 12px;
- background: url(../images/bullet_sq.png) no-repeat 0 5px;
- font: normal 400 10pt/1 Verdana;
- margin-bottom: 10px;
- line-height: 14px;
- }
- a
- {
- color: #00732F;
- text-decoration: none;
+ padding-top: 10px;
}
a:hover
{
@@ -618,22 +513,26 @@
color: #4c0033;
text-decoration: none;
}
- .offline .wrap .content
+ .content a:visited:hover
{
- padding-top: 15px;
- }
- .footer
+ color: #4c0033;
+ text-decoration: underline;
+ } .footer
{
min-height: 100px;
color: #797775;
font: normal 9px/1 Verdana;
text-align: center;
padding-top: 40px;
+ background-color: #E6E7E8;
+ margin: 0;
}
.feedback
{
- float: right;
- padding-right: 10px;
+ float: none;
+ position: absolute;
+ right: 15px;
+ bottom: 10px;
font: normal 8px/1 Verdana;
color: #B0ADAB;
}
@@ -644,37 +543,244 @@
color: #00732F;
text-decoration: underline;
}
+ .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after
+ {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ }
+ #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;
+ background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px;
+ height: 20px;
+ width: 47px;
+ }
+ .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;
+ }
+
hr
{
- background-color: #e0e0e0;
+ background-color: #E6E6E6;
+ border: 1px solid #E6E6E6;
height: 1px;
width: 100%;
text-align: left;
margin: 15px 0px 15px 0px;
}
-
+
.content .alignedsummary
{
margin: 15px;
}
- /* tables */
+ pre
+ {
+ border: 1px solid #DDDDDD;
+ margin: 0 20px 10px 10px;
+ padding: 20px 15px 20px 20px;
+ overflow-x: auto;
+ }
table, pre
{
-moz-border-radius: 7px 7px 7px 7px;
background-color: #F6F6F6;
border: 1px solid #E6E6E6;
border-collapse: separate;
- font-size: 11px;
- min-width: 395px;
+ font-size: 11px;
+ /*min-width: 395px;*/
margin-bottom: 25px;
+ display: inline-block;
+ }
+ thead
+ {
+ margin-top: 5px;
+ font:600 12px/1.2 Arial;
+ }
+ th
+ {
+ padding: 5px 15px 5px 15px;
+ background-color: #E1E1E1;
+ /* border-bottom: 1px solid #E6E6E6;*/
+ border-left: 1px solid #E6E6E6;
+ /* border-right: 1px solid #E6E6E6;*/
+ }
+ td
+ {
+ padding: 3px 15px 3px 20px;
+ /* border-left: 1px solid #E6E6E6;
+ border-right: 1px solid #E6E6E6;*/
}
- thead{margin-top: 5px;}
- th{ padding: 3px 15px 3px 15px;}
- td{padding: 3px 15px 3px 20px;}
+ tr.odd td:hover, tr.even td:hover
+ {
+ /* border-right: 1px solid #C3C3C3;
+ border-left: 1px solid #C3C3C3;*/
+ }
+
+ td.rightAlign
+ {
+ padding: 3px 15px 3px 10px;
+ }
table tr.odd
{
border-left: 1px solid #E6E6E6;
- background-color: #F6F6F6;
+ background-color: #F6F6F6;
color: #66666E;
}
table tr.even
@@ -683,14 +789,11 @@
background-color: #ffffff;
color: #66666E;
}
- table tr.odd:hover
- {
- background-color: #E6E6E6;
- }
- table tr.even:hover
+ table tr.odd td:hover, table tr.even td:hover
{
background-color: #E6E6E6;
}
+
span.comment
{
color: #8B0000;
@@ -700,15 +803,7 @@
{
color: #254117;
}
- pre
- {
- -moz-border-radius:7px 7px 7px 7px;
- background-color:#F6F6F6;
- border:1px solid #DDDDDD;
- margin:0 20px 10px 10px;
- padding:20px 15px 20px 20px;
- overflow-x:auto;
- }
+
.qmltype
{
text-align: center;
@@ -736,11 +831,11 @@
#feedbackBox
{
- display:none;
- -moz-border-radius:7px 7px 7px 7px;
- border:1px solid #DDDDDD;
- position:fixed;
- top:100px;
+ display: none;
+ -moz-border-radius: 7px 7px 7px 7px;
+ border: 1px solid #DDDDDD;
+ position: fixed;
+ top: 100px;
left: 33%;
height: 190px;
width: 400px;
@@ -750,27 +845,27 @@
}
#feedcloseX a
{
- display:inline;
+ display: inline;
padding: 5px 5px 0 0;
- margin-bottom:3px;
+ margin-bottom: 3px;
color: #363534;
- font-weight:600;
+ font-weight: 600;
float: right;
text-decoration: none;
}
+
#feedbox
- /* here */
{
- display:inline;
+ display: inline;
width: 370px;
height: 120px;
- margin:0px 25px 10px 15px;
+ margin: 0px 25px 10px 15px;
}
#feedsubmit
{
- display:inline;
- float:right;
- margin:4px 32px 0 0;
+ display: inline;
+ float: right;
+ margin: 4px 32px 0 0;
}
#blurpage
{
@@ -786,36 +881,72 @@
}
.toc
{
- float: right;
- -moz-border-radius:7px 7px 7px 7px;
- background-color:#F6F6F6;
- border:1px solid #DDDDDD;
- margin:0 20px 10px 10px;
- padding:20px 15px 20px 20px;
+ float: right;
+ -moz-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
+ .toc h3, .generic a
{
- font:600 12px/1.2 Arial;
+ font: 600 12px/1.2 Arial;
}
+
+ .generic{
+ max-width:75%;
+ }
+ .generic td{
+ padding:0;
+ }
+
+ .generic .odd .alphaChar{
+ background-color: #F6F6F6;
+ }
+
+ .generic .even .alphaChar{
+ background-color: #FFFFFF;
+ }
+
+ .alignedsummary{}
+ .propsummary{}
+ .memItemLeft{}
+ .memItemRight{}
+ .bottomAlign{}
+ .highlightedCode
+ {
+ margin:10px;
+ }
+ .LegaleseLeft{}
+ .valuelist{}
+ .annotated{}
+ .obsolete{}
+ .compat{}
+ .flags{}
+ .qmlsummary{}
+ .qmlitem{}
+ .qmlproto{}
+ .qmlname{}
+ .qmlreadonly{}
+ .qmldefault{}
+ .qmldoc{}
+ .qt-style{}
+ .redFont{}
+ code{}
.wrap .content .toc ul
{
- /* float: left;*/
padding-left: 0px;
-
}
.wrap .content .toc .level2
{
- /* float: left;*/
- padding-left: 15px;
-
+ margin-left: 15px;
}
-
.content .toc li
{
@@ -823,133 +954,191 @@
background: url(../images/bullet_dn.png) no-repeat 0 5px;
}
- .relpage
+ .relpage
{
-moz-border-radius: 7px 7px 7px 7px;
border: 1px solid #DDDDDD;
padding: 25px 25px;
- clear:both;
+ clear: both;
}
.relpage ul
{
float: none;
padding: 15px;
}
- .content .relpage li
+ .content .relpage li
{
font: normal 11px/1.2 Verdana;
}
- /* edit */
h3.fn, span.fn
{
background-color: #F6F6F6;
border-width: 1px;
border-style: solid;
border-color: #E6E6E6;
- font-weight: bold;
- /* padding: 6px 0px 6px 10px;*/
- /* margin: 42px 0px 0px 0px;*/
+ font-weight: bold;
+ word-spacing:3px;
}
- /* edit */
- .indexbox
- {
- width: 100%;
- }
- .content .indexboxcont li
- {
- font: normal 600 13px/1 Verdana;
- }
+ .functionIndex {
+ font-size:12pt;
+ word-spacing:10px;
+ margin-bottom:10px;
+ background-color: #F6F6F6;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #E6E6E6;
+ }
+
+ .centerAlign
+ {
+ text-align:center;
+ }
+
+ .rightAlign
+ {
+ text-align:right;
+ }
- /* .indexbox a
- {
- color: #00732f;
- text-decoration: none;
- }*/
- .indexbox a:hover, .indexbox a:visited:hover
- {
- color: #4c0033;
- text-decoration: underline;
- }
- .indexbox a:visited
+
+ .leftAlign
+ {
+ text-align:left;
+ }
+
+ .topAlign{
+ vertical-align:top
+ }
+
+ .functionIndex a{
+ display:inline-block;
+ }
+
+ /* start index box */
+ .indexbox
{
- color: #00732f;
- text-decoration: none;
+ width: 100%;
+ display:inline-block;
}
.indexboxcont
{
display: block;
+ /* overflow: hidden;*/
}
.indexboxbar
{
- background: transparent url( "../images/horBar.png" ) repeat-x left bottom;
+ background: transparent url(../images/horBar.png ) repeat-x left bottom;
margin-bottom: 25px;
+ /* background-image: none;
+ border-bottom: 1px solid #e2e2e2;*/
}
.indexboxcont .section
{
- display: inline-block;
+ 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;
- width: 33%;
- margin-right: -2px;
- vertical-align: top;
+ width: 32.5%;
padding: 0;
}
- .tricol
- {
-
- }
.indexboxcont .sectionlist ul
{
- padding-left: 15px;
margin-bottom: 20px;
}
-/*
+
.indexboxcont .sectionlist ul li
{
line-height: 12px;
}
-*/
- .lastcol
+
+ .content .indexboxcont li
{
- display: inline-block;
- vertical-align: top;
- padding: 0;
- max-width: 25%;
+ font: normal 600 13px/1 Verdana;
}
- .tricol .lastcol
+ .indexbox a:hover, .indexbox a:visited:hover
{
- margin-left:-6px;
+ color: #4c0033;
+ text-decoration: underline;
}
- /*.toc ul*/
+ .indexbox a:visited
+ {
+ color: #00732f;
+ text-decoration: none;
+ }
+
+ .indexbox .indexIcon {
+ width: 11%;
+ }
- /* end page elements */
+
+ .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;
+ }
+
+.sidebar .search form input.loading
+{
+ background:url("../images/spinner.gif") no-repeat scroll right center transparent;
+}
+
+ /* end of screen media */
+
+
}
/* end of screen media */
@@ -957,7 +1146,7 @@
@media print
{
- .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft
+ input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft
{
display: none;
background: none;
diff --git a/doc/src/tutorials/widgets-tutorial.qdoc b/doc/src/tutorials/widgets-tutorial.qdoc
index 2b04035..0422e1a 100644
--- a/doc/src/tutorials/widgets-tutorial.qdoc
+++ b/doc/src/tutorials/widgets-tutorial.qdoc
@@ -45,84 +45,97 @@
\brief This tutorial covers basic usage of widgets and layouts, showing how
they are used to build GUI applications.
- \startpage {index.html}{Qt Reference Documentation}
- \contentspage Tutorials
- \nextpage {tutorials/widgets/toplevel}{Creating a Window}
-
-
\section1 Introduction
- Widgets are the basic building blocks of graphical user interface (GUI)
- applications made with Qt. Each GUI component, such as a button, label or
- text editor, is a widget and can be placed within an existing user
- interface or displayed as an independent window. Each type of component
- is provided by a particular subclass of QWidget, which is itself a
- subclass of QObject.
-
- QWidget is not an abstract class; it can be used as a container for other
- widgets, and can be subclassed with minimal effort to create custom
- widgets. It is most often used to create windows in which other widgets
- are placed.
-
- As with \l{QObject}s, widgets can be created with parent objects to
- indicate ownership, ensuring that objects are deleted when they are no
- longer used. With widgets, these parent-child relationships have an
- additional meaning: each child is displayed within the screen area
- occupied by its parent. This means that, when a window is deleted, all
- the widgets it contains are automatically deleted.
+ Widgets are the basic building blocks for graphical user interface
+ (GUI) applications built with Qt. Each GUI component (e.g.
+ buttons, labels, text editor) is a \l{QWidget}{widget} that is
+ placed somewhere within a user interface window, or is displayed
+ as an independent window. Each type of widge is provided by a
+ subclass of QWidget, which is itself a subclass of QObject.
+
+ QWidget is not an abstract class. It can be used as a container
+ for other widgets, and it can be subclassed with minimal effort to
+ create new, custom widgets. QWidget is often used to create a
+ window inside which other \l{QWidget}s are placed.
+
+ As with \l{QObject}s, \l{QWidget}s can be created with parent
+ objects to indicate ownership, ensuring that objects are deleted
+ when they are no longer used. With widgets, these parent-child
+ relationships have an additional meaning: Each child widget is
+ displayed within the screen area occupied by its parent widget.
+ This means that when you delete a window widget, all the child
+ widgets it contains are also deleted.
\section1 Writing a main Function
- Many of the GUI examples in Qt follow the pattern of having a \c{main.cpp}
- file containing code to initialize the application, and a number of other
- source and header files containing the application logic and custom GUI
- components.
+ Many of the GUI examples provided with Qt follow the pattern of
+ having a \c{main.cpp} file, which contains the standard code to
+ initialize the application, plus any number of other source/header
+ files that contain the application logic and custom GUI components.
- A typical \c main() function, written in \c{main.cpp}, looks like this:
+ A typical \c main() function in \c{main.cpp} looks like this:
\snippet doc/src/snippets/widgets-tutorial/template.cpp main.cpp body
- We first construct a QApplication object which is configured using any
- arguments passed in from the command line. After any widgets have been
- created and shown, we call QApplication::exec() to start Qt's event loop.
- Control passes to Qt until this function returns, at which point we return
- the value we obtain from this function.
+ First, a QApplication object is constructed, which can be
+ configured with arguments passed in from the command line. After
+ the widgets have been created and shown, QApplication::exec() is
+ called to start Qt's event loop. Control passes to Qt until this
+ function returns. Finally, \c{main()} returns the value returned
+ by QApplication::exec().
- In each part of this tutorial, we provide an example that is written
- entirely within a \c main() function. In more sophisticated examples, the
- code to set up widgets and layouts is written in other parts of the
- example. For example, the GUI for a main window may be set up in the
- constructor of a QMainWindow subclass.
+ \section1 Simple widget examples
+
+ Each of theses simple widget examples is written entirely within
+ the \c main() function.
+
+ \list
+ \o \l {tutorials/widgets/toplevel} {Creating a window}
+
+ \o \l {tutorials/widgets/childwidget} {Creating child widgets}
+
+ \o \l {tutorials/widgets/windowlayout} {Using layouts}
+
+ \o \l {tutorials/widgets/nestedlayouts} {Nested layouts}
+ \endlist
+
+ \section1 Real world widget examples
- The \l{Widgets examples} are a good place to look for
- more complex and complete examples and applications.
+ In these \l{Widgets examples} {more advanced examples}, the code
+ that creates the widgets and layouts is stored in other files. For
+ example, the GUI for a main window may be created in the
+ constructor of a QMainWindow subclass.
- \section1 Building Examples and Tutorials
+ \section1 Building The Examples
- If you obtained a binary package of Qt or compiled it yourself, the
- examples described in this tutorial should already be ready to run.
- However, if you may wish to modify them and recompile them, you need to
- perform the following steps:
+ If you installed a binary package to get Qt, or if you compiled Qt
+ yourself, the examples described in this tutorial should already
+ be built and ready to run. If you wish to modify and recompile
+ them, follow these steps:
\list 1
- \o At the command line, enter the directory containing the example you
- wish to recompile.
- \o Type \c qmake and press \key{Return}. If this doesn't work, make sure
- that the executable is on your path, or enter its full location.
- \o On Linux/Unix and Mac OS X, type \c make and press \key{Return};
- on Windows with Visual Studio, type \c nmake and press \key{Return}.
+
+ \o From a command prompt, enter the directory containing the
+ example you have modified.
+
+ \o Type \c qmake and press \key{Return}. If this doesn't work,
+ make sure that the executable is on your path, or enter its
+ full location.
+
+ \o On Linux/Unix and Mac OS X, type \c make and press
+ \key{Return}; on Windows with Visual Studio, type \c nmake and
+ press \key{Return}.
+
\endlist
- An executable file should have been created within the current directory.
- On Windows, this file may be located within a \c debug or \c release
- subdirectory. You can run this file to see the example code at work.
+ An executable file is created in the current directory. On
+ Windows, this file may be located in a \c debug or \c release
+ subdirectory. You can run this executable to see the example code
+ at work.
*/
/*!
- \page widgets-tutorial-toplevel.html
- \contentspage {Widgets Tutorial}{Contents}
- \previouspage {Widgets Tutorial}
- \nextpage {Widgets Tutorial - Child Widgets}
\example tutorials/widgets/toplevel
\title Widgets Tutorial - Creating a Window
@@ -151,13 +164,10 @@
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
demonstrate in the next part of this tutorial.
+
*/
/*!
- \page widgets-tutorial-childwidget.html
- \contentspage {Widgets Tutorial}{Contents}
- \previouspage {Widgets Tutorial - Creating a Window}
- \nextpage {Widgets Tutorial - Using Layouts}
\example tutorials/widgets/childwidget
\title Widgets Tutorial - Child Widgets
@@ -185,10 +195,6 @@
*/
/*!
- \page widgets-tutorial-windowlayout.html
- \contentspage {Widgets Tutorial}{Contents}
- \previouspage {Widgets Tutorial - Child Widgets}
- \nextpage {Widgets Tutorial - Nested Layouts}
\example tutorials/widgets/windowlayout
\title Widgets Tutorial - Using Layouts
@@ -228,9 +234,6 @@
*/
/*!
- \page widgets-tutorial-nestedlayouts.html
- \contentspage {Widgets Tutorial}{Contents}
- \previouspage {Widgets Tutorial - Using Layouts}
\example tutorials/widgets/nestedlayouts
\title Widgets Tutorial - Nested Layouts
diff --git a/doc/src/widgets-and-layouts/layout.qdoc b/doc/src/widgets-and-layouts/layout.qdoc
index 0cfde22..2ca202f 100644
--- a/doc/src/widgets-and-layouts/layout.qdoc
+++ b/doc/src/widgets-and-layouts/layout.qdoc
@@ -47,6 +47,7 @@
/*!
\page layout.html
\title Layout Management
+ \ingroup qt-gui-concepts
\brief A tour of the standard layout managers and an introduction to custom
layouts.
diff --git a/doc/src/widgets-and-layouts/styles.qdoc b/doc/src/widgets-and-layouts/styles.qdoc
index 9a28715..31dfe40 100644
--- a/doc/src/widgets-and-layouts/styles.qdoc
+++ b/doc/src/widgets-and-layouts/styles.qdoc
@@ -47,14 +47,9 @@
/*!
\page style-reference.html
- \title Implementing Styles and Style Aware Widgets
- \brief An overview of styles and the styling of widgets.
-
- \ingroup frameworks-technologies
-
- \previouspage Widget Classes
- \contentspage Widgets and Layouts
- \nextpage {Qt Style Sheets}{Style sheets}
+ \title Styles and Style Aware Widgets
+ \ingroup qt-gui-concepts
+ \brief Styles and the styling of widgets.
Styles (classes that inherit QStyle) draw on behalf of widgets
and encapsulate the look and feel of a GUI. The QStyle class is
@@ -90,8 +85,6 @@
current style. This document shows how widgets draw themselves
and which possibilities the style gives them.
- \tableofcontents
-
\section1 Classes for Widget Styling
These classes are used to customize an application's appearance and
diff --git a/doc/src/widgets-and-layouts/widgets.qdoc b/doc/src/widgets-and-layouts/widgets.qdoc
index 7bd27b6..9fe2d69 100644
--- a/doc/src/widgets-and-layouts/widgets.qdoc
+++ b/doc/src/widgets-and-layouts/widgets.qdoc
@@ -40,130 +40,121 @@
****************************************************************************/
/*!
- \page widgets-and-layouts.html
- \title Widgets and Layouts
-
- \ingroup frameworks-technologies
-
- \nextpage Widget Classes
-
- The primary elements for designing user interfaces in Qt are widgets and layouts.
-
- \section1 Widgets
-
- \l{Widget Classes}{Widgets} can display data and status information, receive
- user input, and provide a container for other widgets that should be grouped
- together. A widget that is not embedded in a parent widget is called a
- \l{Application Windows and Dialogs}{window}.
-
- \image parent-child-widgets.png A parent widget containing various child widgets.
-
- The QWidget class provides the basic capability to render to the screen, and to
- handle user input events. All UI elements that Qt provides are either subclasses
- of QWidget, or are used in connection with a QWidget subclass. Creating custom
- widgets is done by subclassing QWidget or a suitable subclass and reimplementing
- the virtual event handlers.
-
- \section1 Layouts
-
- \l{Layout Management}{Layouts} are an elegant and flexible way to automatically
- arrange child widgets within their container. Each widget reports its size requirements
- to the layout through the \l{QWidget::}{sizeHint} and \l{QWidget::}{sizePolicy}
- properties, and the layout distributes the available space accordingly.
-
- \table
- \row
- \o \image qgridlayout-with-5-children.png
- \o \image qformlayout-with-6-children.png
- \endtable
-
- \l{Qt Designer Manual}{\QD} is a powerful tool for interactively creating and
- arranging widgets in layouts.
-
- \section1 Widget Styles
-
- \l{Implementing Styles and Style Aware Widgets}{Styles} draw on behalf of widgets
- and encapsulate the look and feel of a GUI. Qt's built-in widgets use the QStyle
- class to perform nearly all of their drawing, ensuring that they look exactly like
- the equivalent native widgets.
+ \page widgets-and-layouts.html
+ \title Widgets and Layouts
+ \ingroup qt-gui-concepts
+ \brief The primary elements for designing user interfaces in Qt.
+
+ \section1 Widgets
+
+ Widgets are the primary elements for creating user interfaces in Qt.
+ \l{Widget Classes}{Widgets} can display data and status information,
+ receive user input, and provide a container for other widgets that
+ should be grouped together. A widget that is not embedded in a
+ parent widget is called a \l{Application Windows and
+ Dialogs}{window}.
+
+ \image parent-child-widgets.png A parent widget containing various child widgets.
+
+ The QWidget class provides the basic capability to render to the
+ screen, and to handle user input events. All UI elements that Qt
+ provides are either subclasses of QWidget, or are used in connection
+ with a QWidget subclass. Creating custom widgets is done by
+ subclassing QWidget or a suitable subclass and reimplementing the
+ virtual event handlers.
+
+ \section1 Layouts
+
+ \l{Layout Management}{Layouts} are an elegant and flexible way to
+ automatically arrange child widgets within their container. Each
+ widget reports its size requirements to the layout through the
+ \l{QWidget::}{sizeHint} and \l{QWidget::}{sizePolicy} properties,
+ and the layout distributes the available space accordingly.
+
+ \table
+ \row
+ \o \image qgridlayout-with-5-children.png
+ \o \image qformlayout-with-6-children.png
+ \endtable
+
+ \l{Qt Designer Manual}{\QD} is a powerful tool for interactively creating and
+ arranging widgets in layouts.
+
+ \section1 Widget Styles
+
+ \l{Implementing Styles and Style Aware Widgets}{Styles} draw on
+ behalf of widgets and encapsulate the look and feel of a GUI. Qt's
+ built-in widgets use the QStyle class to perform nearly all of their
+ drawing, ensuring that they look exactly like the equivalent native
+ widgets.
- \table
- \row
- \o \image windowsxp-tabwidget.png
- \o \image plastique-tabwidget.png
- \o \image macintosh-tabwidget.png
- \endtable
-
- \l{Qt Style Sheets} are a powerful mechanism that allows you to customize the
- appearance of widgets, in addition to what is already possible by subclassing QStyle.
-*/
-
-/*!
- \page widget-classes.html
- \title Widget Classes
+ \table
+ \row
+ \o \image windowsxp-tabwidget.png
+ \o \image plastique-tabwidget.png
+ \o \image macintosh-tabwidget.png
+ \endtable
- \contentspage Widgets and Layouts
- \nextpage Layout Management
+ \l{Qt Style Sheets} are a powerful mechanism that allows you to customize the
+ appearance of widgets, in addition to what is already possible by subclassing QStyle.
- Below you find a list of all widget classes in Qt. You can also browse the
- widget classes Qt provides in the various supported styles in the
- \l{Qt Widget Gallery}.
+ \section1 The Widget Classes
- \tableofcontents
+ The following sections list the widget classes. See the \l{Qt Widget
+ Gallery} for some examples.
- \section1 Basic Widgets
+ \section2 Basic Widgets
- These basic widgets (controls), such as buttons, comboboxes and scroll bars, are
- designed for direct use.
+ These basic widgets (controls), e.g. buttons, comboboxes and
+ scroll bars, are designed for direct use.
- \table
- \row
- \o \image windows-label.png
- \o \image windowsvista-pushbutton.png
- \o \image gtk-progressbar.png
- \row
- \o \image plastique-combobox.png
- \o \image macintosh-radiobutton.png
- \o \image cde-lineedit.png
- \endtable
+ \table
+ \row
+ \o \image windows-label.png
+ \o \image windowsvista-pushbutton.png
+ \o \image gtk-progressbar.png
+ \row
+ \o \image plastique-combobox.png
+ \o \image macintosh-radiobutton.png
+ \o \image cde-lineedit.png
+ \endtable
- \annotatedlist basicwidgets
+ \annotatedlist basicwidgets
- \section1 Advanced Widgets
+ \section2 Advanced Widgets
- Advanced GUI widgets such as tab widgets and progress bars provide more
- complex user interface controls.
+ Advanced GUI widgets, e.g. tab widgets and progress bars, provide
+ more complex user interface controls.
- \table
- \row
- \o \image windowsxp-treeview.png
- \o \image gtk-calendarwidget.png
- \o \image qundoview.png
- \endtable
+ \table
+ \row
+ \o \image windowsxp-treeview.png
+ \o \image gtk-calendarwidget.png
+ \o \image qundoview.png
+ \endtable
- \annotatedlist advanced
+ \annotatedlist advanced
- \table
- \row
- \o \image windowsvista-tabwidget.png
- \o \image macintosh-groupbox.png
- \endtable
+ \table
+ \row
+ \o \image windowsvista-tabwidget.png
+ \o \image macintosh-groupbox.png
+ \endtable
- \section1 Organizer Widgets
+ \section2 Organizer Widgets
- Classes like splitters, tab bars, button groups, etc are used to
- organize and group GUI primitives into more complex applications or
- dialogs.
+ Classes like splitters, tab bars, button groups, etc are used for
+ organizing and grouping GUI primitives into more complex
+ applications and dialogs.
- \annotatedlist organizers
+ \annotatedlist organizers
- \section1 Abstract Widget Classes
+ \section2 Abstract Widget Classes
- Abstract widget classes usable through subclassing. They are generally
- not usable in themselves, but provide functionality that can be used
- by inheriting these classes.
+ The abstract widget classes are base classes. They are not usable as
+ standalone classes but provide functionality when they are subclassed.
- \annotatedlist abstractwidgets
+ \annotatedlist abstractwidgets
*/
/*!
diff --git a/doc/src/windows-and-dialogs/dialogs.qdoc b/doc/src/windows-and-dialogs/dialogs.qdoc
index acee0c5..0b0a842 100644
--- a/doc/src/windows-and-dialogs/dialogs.qdoc
+++ b/doc/src/windows-and-dialogs/dialogs.qdoc
@@ -52,6 +52,7 @@
/*!
\page dialogs.html
\title Dialog Windows
+ \ingroup qt-gui-concepts
\brief An overview over dialog windows.
\previouspage The Application Main Window
diff --git a/doc/src/windows-and-dialogs/mainwindow.qdoc b/doc/src/windows-and-dialogs/mainwindow.qdoc
index 6adfa75..c1e66d9 100644
--- a/doc/src/windows-and-dialogs/mainwindow.qdoc
+++ b/doc/src/windows-and-dialogs/mainwindow.qdoc
@@ -46,11 +46,11 @@
/*!
\page application-windows.html
- \title Application Windows and Dialogs
+ \title Window and Dialog Widgets
+ \brief Windows and Dialogs in Qt.
+ \ingroup qt-gui-concepts
\ingroup frameworks-technologies
- \nextpage The Application Main Window
-
A \l{Widgets Tutorial}{widget} that is not embedded in a parent widget is called a window.
Usually, windows have a frame and a title bar, although it is also possible to create
windows without such decoration using suitable window flags). In Qt, QMainWindow
@@ -164,12 +164,9 @@
/*!
\page mainwindow.html
- \title The Application Main Window
- \brief Everything you need for a typical modern main application window,
- including menus, toolbars, workspace, etc.
-
- \contentspage Application Windows and Dialogs
- \nextpage Dialog Windows
+ \title Application Main Window
+ \ingroup qt-gui-concepts
+ \brief Creating the application window.
\tableofcontents
diff --git a/examples/declarative/xmldata/xmldata.qmlproject b/examples/declarative/animation/animation.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/xmldata/xmldata.qmlproject
+++ b/examples/declarative/animation/animation.qmlproject
diff --git a/examples/declarative/workerscript/workerscript.qmlproject b/examples/declarative/animation/basics/basics.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/workerscript/workerscript.qmlproject
+++ b/examples/declarative/animation/basics/basics.qmlproject
diff --git a/examples/declarative/animation/basics/color-animation.qml b/examples/declarative/animation/basics/color-animation.qml
new file mode 100644
index 0000000..61737e9
--- /dev/null
+++ b/examples/declarative/animation/basics/color-animation.qml
@@ -0,0 +1,70 @@
+import Qt 4.7
+import Qt.labs.particles 1.0
+
+Item {
+ id: window
+ width: 640; height: 480
+
+ // Let's draw the sky...
+ Rectangle {
+ anchors { left: parent.left; top: parent.top; right: parent.right; bottom: parent.verticalCenter }
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ SequentialAnimation on color {
+ loops: Animation.Infinite
+ ColorAnimation { from: "DeepSkyBlue"; to: "#0E1533"; duration: 5000 }
+ ColorAnimation { from: "#0E1533"; to: "DeepSkyBlue"; duration: 5000 }
+ }
+ }
+ GradientStop {
+ position: 1.0
+ SequentialAnimation on color {
+ loops: Animation.Infinite
+ ColorAnimation { from: "SkyBlue"; to: "#437284"; duration: 5000 }
+ ColorAnimation { from: "#437284"; to: "SkyBlue"; duration: 5000 }
+ }
+ }
+ }
+ }
+
+ // the sun, moon, and stars
+ Item {
+ width: parent.width; height: 2 * parent.height
+ NumberAnimation on rotation { from: 0; to: 360; duration: 10000; loops: Animation.Infinite }
+ Image {
+ source: "images/sun.png"; y: 10; anchors.horizontalCenter: parent.horizontalCenter
+ rotation: -3 * parent.rotation
+ }
+ Image {
+ source: "images/moon.png"; y: parent.height - 74; anchors.horizontalCenter: parent.horizontalCenter
+ rotation: -parent.rotation
+ }
+ Particles {
+ x: 0; y: parent.height/2; width: parent.width; height: parent.height/2
+ source: "images/star.png"; angleDeviation: 360; velocity: 0
+ velocityDeviation: 0; count: parent.width / 10; fadeInDuration: 2800
+ SequentialAnimation on opacity {
+ loops: Animation.Infinite
+ NumberAnimation { from: 0; to: 1; duration: 5000 }
+ NumberAnimation { from: 1; to: 0; duration: 5000 }
+ }
+ }
+ }
+
+ // ...and the ground.
+ Rectangle {
+ anchors { left: parent.left; top: parent.verticalCenter; right: parent.right; bottom: parent.bottom }
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ SequentialAnimation on color {
+ loops: Animation.Infinite
+ ColorAnimation { from: "ForestGreen"; to: "#001600"; duration: 5000 }
+ ColorAnimation { from: "#001600"; to: "ForestGreen"; duration: 5000 }
+ }
+ }
+ GradientStop { position: 1.0; color: "DarkGreen" }
+ }
+ }
+}
diff --git a/examples/declarative/parallax/pics/face-smile.png b/examples/declarative/animation/basics/images/face-smile.png
index 3d66d72..3d66d72 100644
--- a/examples/declarative/parallax/pics/face-smile.png
+++ b/examples/declarative/animation/basics/images/face-smile.png
Binary files differ
diff --git a/examples/declarative/animations/images/moon.png b/examples/declarative/animation/basics/images/moon.png
index 9407b2b..9407b2b 100644
--- a/examples/declarative/animations/images/moon.png
+++ b/examples/declarative/animation/basics/images/moon.png
Binary files differ
diff --git a/examples/declarative/parallax/pics/shadow.png b/examples/declarative/animation/basics/images/shadow.png
index 8270565..8270565 100644
--- a/examples/declarative/parallax/pics/shadow.png
+++ b/examples/declarative/animation/basics/images/shadow.png
Binary files differ
diff --git a/examples/declarative/dynamic/images/star.png b/examples/declarative/animation/basics/images/star.png
index 27ef924..27ef924 100644
--- a/examples/declarative/dynamic/images/star.png
+++ b/examples/declarative/animation/basics/images/star.png
Binary files differ
diff --git a/examples/declarative/dynamic/images/sun.png b/examples/declarative/animation/basics/images/sun.png
index 7713ca5..7713ca5 100644
--- a/examples/declarative/dynamic/images/sun.png
+++ b/examples/declarative/animation/basics/images/sun.png
Binary files differ
diff --git a/examples/declarative/animation/basics/property-animation.qml b/examples/declarative/animation/basics/property-animation.qml
new file mode 100644
index 0000000..87ac8ec
--- /dev/null
+++ b/examples/declarative/animation/basics/property-animation.qml
@@ -0,0 +1,63 @@
+import Qt 4.7
+
+Item {
+ id: window
+ width: 320; height: 480
+
+ // Let's draw the sky...
+ Rectangle {
+ anchors { left: parent.left; top: parent.top; right: parent.right; bottom: parent.verticalCenter }
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "DeepSkyBlue" }
+ GradientStop { position: 1.0; color: "LightSkyBlue" }
+ }
+ }
+
+ // ...and the ground.
+ Rectangle {
+ anchors { left: parent.left; top: parent.verticalCenter; right: parent.right; bottom: parent.bottom }
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "ForestGreen" }
+ GradientStop { position: 1.0; color: "DarkGreen" }
+ }
+ }
+
+ // The shadow for the smiley face
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "images/shadow.png"; y: smiley.minHeight + 58
+
+ // The scale property depends on the y position of the smiley face.
+ scale: smiley.y * 0.5 / (smiley.minHeight - smiley.maxHeight)
+ }
+
+ Image {
+ id: smiley
+ property int maxHeight: window.height / 3
+ property int minHeight: 2 * window.height / 3
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "images/face-smile.png"; y: minHeight
+
+ // Animate the y property. Setting loops to Animation.Infinite makes the
+ // animation repeat indefinitely, otherwise it would only run once.
+ SequentialAnimation on y {
+ loops: Animation.Infinite
+
+ // Move from minHeight to maxHeight in 300ms, using the OutExpo easing function
+ NumberAnimation {
+ from: smiley.minHeight; to: smiley.maxHeight
+ easing.type: Easing.OutExpo; duration: 300
+ }
+
+ // Then move back to minHeight in 1 second, using the OutBounce easing function
+ NumberAnimation {
+ from: smiley.maxHeight; to: smiley.minHeight
+ easing.type: Easing.OutBounce; duration: 1000
+ }
+
+ // Then pause for 500ms
+ PauseAnimation { duration: 500 }
+ }
+ }
+}
diff --git a/examples/declarative/behaviors/SideRect.qml b/examples/declarative/animation/behaviors/SideRect.qml
index d32bd7b..d32bd7b 100644
--- a/examples/declarative/behaviors/SideRect.qml
+++ b/examples/declarative/animation/behaviors/SideRect.qml
diff --git a/examples/declarative/animation/behaviors/behavior-example.qml b/examples/declarative/animation/behaviors/behavior-example.qml
new file mode 100644
index 0000000..1f17b81
--- /dev/null
+++ b/examples/declarative/animation/behaviors/behavior-example.qml
@@ -0,0 +1,79 @@
+import Qt 4.7
+
+Rectangle {
+ width: 600; height: 400
+ color: "#343434"
+
+ Rectangle {
+ anchors.centerIn: parent
+ width: 200; height: 200
+ radius: 30
+ color: "transparent"
+ border.width: 4; border.color: "white"
+
+
+ SideRect {
+ id: leftRect
+ anchors { verticalCenter: parent.verticalCenter; horizontalCenter: parent.left }
+ text: "Left"
+ }
+
+ SideRect {
+ id: rightRect
+ anchors { verticalCenter: parent.verticalCenter; horizontalCenter: parent.right }
+ text: "Right"
+ }
+
+ SideRect {
+ id: topRect
+ anchors { verticalCenter: parent.top; horizontalCenter: parent.horizontalCenter }
+ text: "Top"
+ }
+
+ SideRect {
+ id: bottomRect
+ anchors { verticalCenter: parent.bottom; horizontalCenter: parent.horizontalCenter }
+ text: "Bottom"
+ }
+
+
+ Rectangle {
+ id: focusRect
+
+ property string text
+
+ x: 62.5; y: 75; width: 75; height: 50
+ radius: 6
+ border.width: 4; border.color: "white"
+ color: "firebrick"
+
+ // Setting an 'elastic' behavior on the focusRect's x property.
+ Behavior on x {
+ NumberAnimation { easing.type: Easing.OutElastic; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 }
+ }
+
+ // Setting an 'elastic' behavior on the focusRect's y property.
+ Behavior on y {
+ NumberAnimation { easing.type: Easing.OutElastic; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 }
+ }
+
+ Text {
+ id: focusText
+ text: focusRect.text
+ anchors.centerIn: parent
+ color: "white"
+ font.pixelSize: 16; font.bold: true
+
+ // Setting a behavior on the focusText's x property:
+ // Set the opacity to 0, set the new text value, then set the opacity back to 1.
+ Behavior on text {
+ SequentialAnimation {
+ NumberAnimation { target: focusText; property: "opacity"; to: 0; duration: 150 }
+ PropertyAction { }
+ NumberAnimation { target: focusText; property: "opacity"; to: 1; duration: 150 }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/declarative/behaviors/behaviors.qmlproject b/examples/declarative/animation/behaviors/behaviors.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/behaviors/behaviors.qmlproject
+++ b/examples/declarative/animation/behaviors/behaviors.qmlproject
diff --git a/examples/declarative/animation/easing/easing.qml b/examples/declarative/animation/easing/easing.qml
new file mode 100644
index 0000000..939d43b
--- /dev/null
+++ b/examples/declarative/animation/easing/easing.qml
@@ -0,0 +1,105 @@
+import Qt 4.7
+
+Rectangle {
+ id: window
+ width: 600; height: 460; color: "#232323"
+
+ ListModel {
+ id: easingTypes
+ ListElement { name: "Easing.Linear"; type: Easing.Linear; ballColor: "DarkRed" }
+ ListElement { name: "Easing.InQuad"; type: Easing.InQuad; ballColor: "IndianRed" }
+ ListElement { name: "Easing.OutQuad"; type: Easing.OutQuad; ballColor: "Salmon" }
+ ListElement { name: "Easing.InOutQuad"; type: Easing.InOutQuad; ballColor: "Tomato" }
+ ListElement { name: "Easing.OutInQuad"; type: Easing.OutInQuad; ballColor: "DarkOrange" }
+ ListElement { name: "Easing.InCubic"; type: Easing.InCubic; ballColor: "Gold" }
+ ListElement { name: "Easing.OutCubic"; type: Easing.OutCubic; ballColor: "Yellow" }
+ ListElement { name: "Easing.InOutCubic"; type: Easing.InOutCubic; ballColor: "PeachPuff" }
+ ListElement { name: "Easing.OutInCubic"; type: Easing.OutInCubic; ballColor: "Thistle" }
+ ListElement { name: "Easing.InQuart"; type: Easing.InQuart; ballColor: "Orchid" }
+ ListElement { name: "Easing.OutQuart"; type: Easing.OutQuart; ballColor: "Purple" }
+ ListElement { name: "Easing.InOutQuart"; type: Easing.InOutQuart; ballColor: "SlateBlue" }
+ ListElement { name: "Easing.OutInQuart"; type: Easing.OutInQuart; ballColor: "Chartreuse" }
+ ListElement { name: "Easing.InQuint"; type: Easing.InQuint; ballColor: "LimeGreen" }
+ ListElement { name: "Easing.OutQuint"; type: Easing.OutQuint; ballColor: "SeaGreen" }
+ ListElement { name: "Easing.InOutQuint"; type: Easing.InOutQuint; ballColor: "DarkGreen" }
+ ListElement { name: "Easing.OutInQuint"; type: Easing.OutInQuint; ballColor: "Olive" }
+ ListElement { name: "Easing.InSine"; type: Easing.InSine; ballColor: "DarkSeaGreen" }
+ ListElement { name: "Easing.OutSine"; type: Easing.OutSine; ballColor: "Teal" }
+ ListElement { name: "Easing.InOutSine"; type: Easing.InOutSine; ballColor: "Turquoise" }
+ ListElement { name: "Easing.OutInSine"; type: Easing.OutInSine; ballColor: "SteelBlue" }
+ ListElement { name: "Easing.InExpo"; type: Easing.InExpo; ballColor: "SkyBlue" }
+ ListElement { name: "Easing.OutExpo"; type: Easing.OutExpo; ballColor: "RoyalBlue" }
+ ListElement { name: "Easing.InOutExpo"; type: Easing.InOutExpo; ballColor: "MediumBlue" }
+ ListElement { name: "Easing.OutInExpo"; type: Easing.OutInExpo; ballColor: "MidnightBlue" }
+ ListElement { name: "Easing.InCirc"; type: Easing.InCirc; ballColor: "CornSilk" }
+ ListElement { name: "Easing.OutCirc"; type: Easing.OutCirc; ballColor: "Bisque" }
+ ListElement { name: "Easing.InOutCirc"; type: Easing.InOutCirc; ballColor: "RosyBrown" }
+ ListElement { name: "Easing.OutInCirc"; type: Easing.OutInCirc; ballColor: "SandyBrown" }
+ ListElement { name: "Easing.InElastic"; type: Easing.InElastic; ballColor: "DarkGoldenRod" }
+ ListElement { name: "Easing.InElastic"; type: Easing.OutElastic; ballColor: "Chocolate" }
+ ListElement { name: "Easing.InOutElastic"; type: Easing.InOutElastic; ballColor: "SaddleBrown" }
+ ListElement { name: "Easing.OutInElastic"; type: Easing.OutInElastic; ballColor: "Brown" }
+ ListElement { name: "Easing.InBack"; type: Easing.InBack; ballColor: "Maroon" }
+ ListElement { name: "Easing.OutBack"; type: Easing.OutBack; ballColor: "LavenderBlush" }
+ ListElement { name: "Easing.InOutBack"; type: Easing.InOutBack; ballColor: "MistyRose" }
+ ListElement { name: "Easing.OutInBack"; type: Easing.OutInBack; ballColor: "Gainsboro" }
+ ListElement { name: "Easing.OutBounce"; type: Easing.OutBounce; ballColor: "Silver" }
+ ListElement { name: "Easing.InBounce"; type: Easing.InBounce; ballColor: "DimGray" }
+ ListElement { name: "Easing.InOutBounce"; type: Easing.InOutBounce; ballColor: "SlateGray" }
+ ListElement { name: "Easing.OutInBounce"; type: Easing.OutInBounce; ballColor: "DarkSlateGray" }
+ }
+
+ Component {
+ id: delegate
+
+ Item {
+ height: 42; width: window.width
+
+ Text { text: name; anchors.centerIn: parent; color: "White" }
+
+ Rectangle {
+ id: slot1; color: "#121212"; x: 30; height: 32; width: 32
+ border.color: "#343434"; border.width: 1; radius: 8
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Rectangle {
+ id: slot2; color: "#121212"; x: window.width - 62; height: 32; width: 32
+ border.color: "#343434"; border.width: 1; radius: 8
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Rectangle {
+ id: rect; x: 30; color: "#454545"
+ border.color: "White"; border.width: 2
+ height: 32; width: 32; radius: 8
+ anchors.verticalCenter: parent.verticalCenter
+
+ MouseArea {
+ onClicked: if (rect.state == '') rect.state = "right"; else rect.state = ''
+ anchors.fill: parent
+ }
+
+ states : State {
+ name: "right"
+ PropertyChanges { target: rect; x: window.width - 62; color: ballColor }
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "x"; easing.type: type; duration: 1000 }
+ ColorAnimation { properties: "color"; easing.type: type; duration: 1000 }
+ }
+ }
+ }
+ }
+
+ Flickable {
+ anchors.fill: parent; contentHeight: layout.height
+
+ Column {
+ id: layout
+ anchors.left: parent.left; anchors.right: parent.right
+ Repeater { model: easingTypes; delegate: delegate }
+ }
+ }
+}
diff --git a/examples/declarative/webview/webview.qmlproject b/examples/declarative/animation/easing/easing.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/webview/webview.qmlproject
+++ b/examples/declarative/animation/easing/easing.qmlproject
diff --git a/examples/declarative/states/states.qml b/examples/declarative/animation/states/states.qml
index 4429e78..4429e78 100644
--- a/examples/declarative/states/states.qml
+++ b/examples/declarative/animation/states/states.qml
diff --git a/examples/declarative/states/states.qmlproject b/examples/declarative/animation/states/states.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/states/states.qmlproject
+++ b/examples/declarative/animation/states/states.qmlproject
diff --git a/examples/declarative/animation/states/transitions.qml b/examples/declarative/animation/states/transitions.qml
new file mode 100644
index 0000000..ccc7060
--- /dev/null
+++ b/examples/declarative/animation/states/transitions.qml
@@ -0,0 +1,90 @@
+import Qt 4.7
+
+/*
+ This is exactly the same as states.qml, except that we have appended
+ a set of transitions to apply animations when the item changes
+ between each state.
+*/
+
+Rectangle {
+ id: page
+ width: 640; height: 480
+ color: "#343434"
+
+ Image {
+ id: userIcon
+ x: topLeftRect.x; y: topLeftRect.y
+ source: "user.png"
+ }
+
+ Rectangle {
+ id: topLeftRect
+
+ anchors { left: parent.left; top: parent.top; leftMargin: 10; topMargin: 20 }
+ width: 64; height: 64
+ color: "Transparent"; border.color: "Gray"; radius: 6
+
+ // Clicking in here sets the state to the default state, returning the image to
+ // its initial position
+ MouseArea { anchors.fill: parent; onClicked: page.state = '' }
+ }
+
+ Rectangle {
+ id: middleRightRect
+
+ anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 20 }
+ width: 64; height: 64
+ color: "Transparent"; border.color: "Gray"; radius: 6
+
+ // Clicking in here sets the state to 'middleRight'
+ MouseArea { anchors.fill: parent; onClicked: page.state = 'middleRight' }
+ }
+
+ Rectangle {
+ id: bottomLeftRect
+
+ anchors { left: parent.left; bottom: parent.bottom; leftMargin: 10; bottomMargin: 20 }
+ width: 64; height: 64
+ color: "Transparent"; border.color: "Gray"; radius: 6
+
+ // Clicking in here sets the state to 'bottomLeft'
+ MouseArea { anchors.fill: parent; onClicked: page.state = 'bottomLeft' }
+ }
+
+ states: [
+ // In state 'middleRight', move the image to middleRightRect
+ State {
+ name: "middleRight"
+ PropertyChanges { target: userIcon; x: middleRightRect.x; y: middleRightRect.y }
+ },
+
+ // In state 'bottomLeft', move the image to bottomLeftRect
+ State {
+ name: "bottomLeft"
+ PropertyChanges { target: userIcon; x: bottomLeftRect.x; y: bottomLeftRect.y }
+ }
+ ]
+
+ // Transitions define how the properties change when the item moves between each state
+ transitions: [
+
+ // When transitioning to 'middleRight' move x,y over a duration of 1 second,
+ // with OutBounce easing function.
+ Transition {
+ from: "*"; to: "middleRight"
+ NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce; duration: 1000 }
+ },
+
+ // When transitioning to 'bottomLeft' move x,y over a duration of 2 seconds,
+ // with InOutQuad easing function.
+ Transition {
+ from: "*"; to: "bottomLeft"
+ NumberAnimation { properties: "x,y"; easing.type: Easing.InOutQuad; duration: 2000 }
+ },
+
+ // For any other state changes move x,y linearly over duration of 200ms.
+ Transition {
+ NumberAnimation { properties: "x,y"; duration: 200 }
+ }
+ ]
+}
diff --git a/examples/declarative/states/user.png b/examples/declarative/animation/states/user.png
index dd7d7a2..dd7d7a2 100644
--- a/examples/declarative/states/user.png
+++ b/examples/declarative/animation/states/user.png
Binary files differ
diff --git a/examples/declarative/animations/color-animation.qml b/examples/declarative/animations/color-animation.qml
deleted file mode 100644
index 3616a31..0000000
--- a/examples/declarative/animations/color-animation.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-import Qt 4.7
-import Qt.labs.particles 1.0
-
-Item {
- id: window
- width: 640; height: 480
-
- // Let's draw the sky...
- Rectangle {
- anchors { left: parent.left; top: parent.top; right: parent.right; bottom: parent.verticalCenter }
- gradient: Gradient {
- GradientStop {
- position: 0.0
- SequentialAnimation on color {
- loops: Animation.Infinite
- ColorAnimation { from: "DeepSkyBlue"; to: "#0E1533"; duration: 5000 }
- ColorAnimation { from: "#0E1533"; to: "DeepSkyBlue"; duration: 5000 }
- }
- }
- GradientStop {
- position: 1.0
- SequentialAnimation on color {
- loops: Animation.Infinite
- ColorAnimation { from: "SkyBlue"; to: "#437284"; duration: 5000 }
- ColorAnimation { from: "#437284"; to: "SkyBlue"; duration: 5000 }
- }
- }
- }
- }
-
- // the sun, moon, and stars
- Item {
- width: parent.width; height: 2 * parent.height
- transformOrigin: Item.Center
- NumberAnimation on rotation { from: 0; to: 360; duration: 10000; loops: Animation.Infinite }
- Image {
- source: "images/sun.png"; y: 10; anchors.horizontalCenter: parent.horizontalCenter
- transformOrigin: Item.Center; rotation: -3 * parent.rotation
- }
- Image {
- source: "images/moon.png"; y: parent.height - 74; anchors.horizontalCenter: parent.horizontalCenter
- transformOrigin: Item.Center; rotation: -parent.rotation
- }
- Particles {
- x: 0; y: parent.height/2; width: parent.width; height: parent.height/2
- source: "images/star.png"; angleDeviation: 360; velocity: 0
- velocityDeviation: 0; count: parent.width / 10; fadeInDuration: 2800
- SequentialAnimation on opacity {
- loops: Animation.Infinite
- NumberAnimation { from: 0; to: 1; duration: 5000 }
- NumberAnimation { from: 1; to: 0; duration: 5000 }
- }
- }
- }
-
- // ...and the ground.
- Rectangle {
- anchors { left: parent.left; top: parent.verticalCenter; right: parent.right; bottom: parent.bottom }
- gradient: Gradient {
- GradientStop {
- position: 0.0
- SequentialAnimation on color {
- loops: Animation.Infinite
- ColorAnimation { from: "ForestGreen"; to: "#001600"; duration: 5000 }
- ColorAnimation { from: "#001600"; to: "ForestGreen"; duration: 5000 }
- }
- }
- GradientStop { position: 1.0; color: "DarkGreen" }
- }
- }
-}
diff --git a/examples/declarative/animations/easing.qml b/examples/declarative/animations/easing.qml
deleted file mode 100644
index b0f9669..0000000
--- a/examples/declarative/animations/easing.qml
+++ /dev/null
@@ -1,99 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- id: window
- width: 600; height: 460; color: "#232323"
-
- ListModel {
- id: easingTypes
- ListElement { type: "Linear"; ballColor: "DarkRed" }
- ListElement { type: "InQuad"; ballColor: "IndianRed" }
- ListElement { type: "OutQuad"; ballColor: "Salmon" }
- ListElement { type: "InOutQuad"; ballColor: "Tomato" }
- ListElement { type: "OutInQuad"; ballColor: "DarkOrange" }
- ListElement { type: "InCubic"; ballColor: "Gold" }
- ListElement { type: "OutCubic"; ballColor: "Yellow" }
- ListElement { type: "InOutCubic"; ballColor: "PeachPuff" }
- ListElement { type: "OutInCubic"; ballColor: "Thistle" }
- ListElement { type: "InQuart"; ballColor: "Orchid" }
- ListElement { type: "OutQuart"; ballColor: "Purple" }
- ListElement { type: "InOutQuart"; ballColor: "SlateBlue" }
- ListElement { type: "OutInQuart"; ballColor: "Chartreuse" }
- ListElement { type: "InQuint"; ballColor: "LimeGreen" }
- ListElement { type: "OutQuint"; ballColor: "SeaGreen" }
- ListElement { type: "InOutQuint"; ballColor: "DarkGreen" }
- ListElement { type: "OutInQuint"; ballColor: "Olive" }
- ListElement { type: "InSine"; ballColor: "DarkSeaGreen" }
- ListElement { type: "OutSine"; ballColor: "Teal" }
- ListElement { type: "InOutSine"; ballColor: "Turquoise" }
- ListElement { type: "OutInSine"; ballColor: "SteelBlue" }
- ListElement { type: "InExpo"; ballColor: "SkyBlue" }
- ListElement { type: "OutExpo"; ballColor: "RoyalBlue" }
- ListElement { type: "InOutExpo"; ballColor: "MediumBlue" }
- ListElement { type: "OutInExpo"; ballColor: "MidnightBlue" }
- ListElement { type: "InCirc"; ballColor: "CornSilk" }
- ListElement { type: "OutCirc"; ballColor: "Bisque" }
- ListElement { type: "InOutCirc"; ballColor: "RosyBrown" }
- ListElement { type: "OutInCirc"; ballColor: "SandyBrown" }
- ListElement { type: "InElastic"; ballColor: "DarkGoldenRod" }
- ListElement { type: "OutElastic"; ballColor: "Chocolate" }
- ListElement { type: "InOutElastic"; ballColor: "SaddleBrown" }
- ListElement { type: "OutInElastic"; ballColor: "Brown" }
- ListElement { type: "InBack"; ballColor: "Maroon" }
- ListElement { type: "OutBack"; ballColor: "LavenderBlush" }
- ListElement { type: "InOutBack"; ballColor: "MistyRose" }
- ListElement { type: "OutInBack"; ballColor: "Gainsboro" }
- ListElement { type: "OutBounce"; ballColor: "Silver" }
- ListElement { type: "InBounce"; ballColor: "DimGray" }
- ListElement { type: "InOutBounce"; ballColor: "SlateGray" }
- ListElement { type: "OutInBounce"; ballColor: "DarkSlateGray" }
- }
-
- Component {
- id: delegate
-
- Item {
- height: 42; width: window.width
- Text { text: type; anchors.centerIn: parent; color: "White" }
- Rectangle {
- id: slot1; color: "#121212"; x: 30; height: 32; width: 32
- border.color: "#343434"; border.width: 1; radius: 8; anchors.verticalCenter: parent.verticalCenter
- }
- Rectangle {
- id: slot2; color: "#121212"; x: window.width - 62; height: 32; width: 32
- border.color: "#343434"; border.width: 1; radius: 8; anchors.verticalCenter: parent.verticalCenter
- }
- Rectangle {
- id: rect; x: 30; color: "#454545"
- border.color: "White"; border.width: 2
- height: 32; width: 32; radius: 8; anchors.verticalCenter: parent.verticalCenter
-
- MouseArea {
- onClicked: if (rect.state == '') rect.state = "right"; else rect.state = ''
- anchors.fill: parent
- }
-
- states : State {
- name: "right"
- PropertyChanges { target: rect; x: window.width - 62; color: ballColor }
- }
-
- transitions: Transition {
- // ParallelAnimation {
- NumberAnimation { properties: "x"; easing.type: type; duration: 1000 }
- ColorAnimation { properties: "color"; easing.type: type; duration: 1000 }
- // }
- }
- }
- }
- }
-
- Flickable {
- anchors.fill: parent; contentHeight: layout.height
- Column {
- id: layout
- anchors.left: parent.left; anchors.right: parent.right
- Repeater { model: easingTypes; delegate: delegate }
- }
- }
-}
diff --git a/examples/declarative/animations/property-animation.qml b/examples/declarative/animations/property-animation.qml
deleted file mode 100644
index 5afe8ef..0000000
--- a/examples/declarative/animations/property-animation.qml
+++ /dev/null
@@ -1,64 +0,0 @@
-import Qt 4.7
-
-Item {
- id: window
- width: 320; height: 480
-
- // Let's draw the sky...
- Rectangle {
- anchors { left: parent.left; top: parent.top; right: parent.right; bottom: parent.verticalCenter }
- gradient: Gradient {
- GradientStop { position: 0.0; color: "DeepSkyBlue" }
- GradientStop { position: 1.0; color: "LightSkyBlue" }
- }
- }
-
- // ...and the ground.
- Rectangle {
- anchors { left: parent.left; top: parent.verticalCenter; right: parent.right; bottom: parent.bottom }
- gradient: Gradient {
- GradientStop { position: 0.0; color: "ForestGreen" }
- GradientStop { position: 1.0; color: "DarkGreen" }
- }
- }
-
- // The shadow for the smiley face
- Image {
- anchors.horizontalCenter: parent.horizontalCenter
- source: "images/shadow.png"; y: smiley.minHeight + 58
- transformOrigin: Item.Center
-
- // The scale property depends on the y position of the smiley face.
- scale: smiley.y * 0.5 / (smiley.minHeight - smiley.maxHeight)
- }
-
- Image {
- id: smiley
- property int maxHeight: window.height / 3
- property int minHeight: 2 * window.height / 3
-
- anchors.horizontalCenter: parent.horizontalCenter
- source: "images/face-smile.png"; y: minHeight
-
- // Animate the y property. Setting loops to Animation.Infinite makes the
- // animation repeat indefinitely, otherwise it would only run once.
- SequentialAnimation on y {
- loops: Animation.Infinite
-
- // Move from minHeight to maxHeight in 300ms, using the OutExpo easing function
- NumberAnimation {
- from: smiley.minHeight; to: smiley.maxHeight
- easing.type: "OutExpo"; duration: 300
- }
-
- // Then move back to minHeight in 1 second, using the OutBounce easing function
- NumberAnimation {
- from: smiley.maxHeight; to: smiley.minHeight
- easing.type: "OutBounce"; duration: 1000
- }
-
- // Then pause for 500ms
- PauseAnimation { duration: 500 }
- }
- }
-}
diff --git a/examples/declarative/aspectratio/face_fit.qml b/examples/declarative/aspectratio/face_fit.qml
deleted file mode 100644
index 52cd4c2..0000000
--- a/examples/declarative/aspectratio/face_fit.qml
+++ /dev/null
@@ -1,26 +0,0 @@
-import Qt 4.7
-
-// Here, we implement a hybrid of the "scale to fit" and "scale and crop"
-// behaviours which will crop up to 25% from *one* dimension if necessary
-// to fully scale the other. This is a realistic algorithm, for example
-// when the edges of the image contain less vital information than the
-// center - such as a face.
-//
-Rectangle {
- // default size: whole image, unscaled
- width: face.width
- height: face.height
- color: "gray"
- clip: true
-
- Image {
- id: face
- smooth: true
- anchors.centerIn: parent
- source: "pics/face.png"
- x: (parent.width-width*scale)/2
- y: (parent.height-height*scale)/2
- scale: Math.max(Math.min(parent.width/width*1.333,parent.height/height),
- Math.min(parent.width/width,parent.height/height*1.333))
- }
-}
diff --git a/examples/declarative/aspectratio/face_fit_animated.qml b/examples/declarative/aspectratio/face_fit_animated.qml
deleted file mode 100644
index 63fc9c6..0000000
--- a/examples/declarative/aspectratio/face_fit_animated.qml
+++ /dev/null
@@ -1,28 +0,0 @@
-import Qt 4.7
-
-// Here, we extend the "face_fit" example with animation to show how truly
-// diverse and usage-specific behaviours are made possible by NOT putting a
-// hard-coded aspect ratio feature into the Image primitive.
-//
-Rectangle {
- // default size: whole image, unscaled
- width: face.width
- height: face.height
- color: "gray"
- clip: true
-
- Image {
- id: face
- smooth: true
- anchors.centerIn: parent
- source: "pics/face.png"
- x: (parent.width-width*scale)/2
- y: (parent.height-height*scale)/2
- SpringFollow on scale {
- to: Math.max(Math.min(face.parent.width/face.width*1.333,face.parent.height/face.height),
- Math.min(face.parent.width/face.width,face.parent.height/face.height*1.333))
- spring: 1
- damping: 0.05
- }
- }
-}
diff --git a/examples/declarative/aspectratio/pics/face.png b/examples/declarative/aspectratio/pics/face.png
deleted file mode 100644
index 3d66d72..0000000
--- a/examples/declarative/aspectratio/pics/face.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/aspectratio/scale_and_crop.qml b/examples/declarative/aspectratio/scale_and_crop.qml
deleted file mode 100644
index a438104..0000000
--- a/examples/declarative/aspectratio/scale_and_crop.qml
+++ /dev/null
@@ -1,21 +0,0 @@
-import Qt 4.7
-
-// Here, we implement "Scale and Crop" behaviour.
-//
-Rectangle {
- // default size: whole image, unscaled
- width: face.width
- height: face.height
- color: "gray"
- clip: true
-
- Image {
- id: face
- smooth: true
- anchors.centerIn: parent
- source: "pics/face.png"
- x: (parent.width-width*scale)/2
- y: (parent.height-height*scale)/2
- scale: Math.max(parent.width/width,parent.height/height)
- }
-}
diff --git a/examples/declarative/aspectratio/scale_and_crop_simple.qml b/examples/declarative/aspectratio/scale_and_crop_simple.qml
deleted file mode 100644
index 1160ec5..0000000
--- a/examples/declarative/aspectratio/scale_and_crop_simple.qml
+++ /dev/null
@@ -1,20 +0,0 @@
-import Qt 4.7
-
-// Here, we implement "Scale to Fit" behaviour, using the
-// fillMode property.
-//
-Rectangle {
- // default size: whole image, unscaled
- width: face.width
- height: face.height
- color: "gray"
- clip: true
-
- Image {
- id: face
- smooth: true
- source: "pics/face.png"
- fillMode: Image.PreserveAspectCrop
- anchors.fill: parent
- }
-}
diff --git a/examples/declarative/aspectratio/scale_and_sidecrop.qml b/examples/declarative/aspectratio/scale_and_sidecrop.qml
deleted file mode 100644
index 5593ab8..0000000
--- a/examples/declarative/aspectratio/scale_and_sidecrop.qml
+++ /dev/null
@@ -1,22 +0,0 @@
-import Qt 4.7
-
-// Here, we implement a variant of "Scale and Crop" behaviour, where we
-// crop the sides if necessary to fully fit vertically, but not the reverse.
-//
-Rectangle {
- // default size: whole image, unscaled
- width: face.width
- height: face.height
- color: "gray"
- clip: true
-
- Image {
- id: face
- smooth: true
- anchors.centerIn: parent
- source: "pics/face.png"
- x: (parent.width-width*scale)/2
- y: (parent.height-height*scale)/2
- scale: parent.height/height
- }
-}
diff --git a/examples/declarative/aspectratio/scale_to_fit.qml b/examples/declarative/aspectratio/scale_to_fit.qml
deleted file mode 100644
index 724a36e..0000000
--- a/examples/declarative/aspectratio/scale_to_fit.qml
+++ /dev/null
@@ -1,22 +0,0 @@
-import Qt 4.7
-
-// Here, we implement "Scale to Fit" behaviour "manually", rather
-// than using the preserveAspect property.
-//
-Rectangle {
- // default size: whole image, unscaled
- width: face.width
- height: face.height
- color: "gray"
- clip: true
-
- Image {
- id: face
- smooth: true
- anchors.centerIn: parent
- source: "pics/face.png"
- x: (parent.width-width*scale)/2
- y: (parent.height-height*scale)/2
- scale: Math.min(parent.width/width,parent.height/height)
- }
-}
diff --git a/examples/declarative/aspectratio/scale_to_fit_simple.qml b/examples/declarative/aspectratio/scale_to_fit_simple.qml
deleted file mode 100644
index 0e960b4..0000000
--- a/examples/declarative/aspectratio/scale_to_fit_simple.qml
+++ /dev/null
@@ -1,20 +0,0 @@
-import Qt 4.7
-
-// Here, we implement "Scale to Fit" behaviour, using the
-// fillMode property.
-//
-Rectangle {
- // default size: whole image, unscaled
- width: face.width
- height: face.height
- color: "gray"
- clip: true
-
- Image {
- id: face
- smooth: true
- source: "pics/face.png"
- fillMode: Image.PreserveAspectFit
- anchors.fill: parent
- }
-}
diff --git a/examples/declarative/behaviors/behavior-example.qml b/examples/declarative/behaviors/behavior-example.qml
deleted file mode 100644
index b7bae6c..0000000
--- a/examples/declarative/behaviors/behavior-example.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- width: 600; height: 400
- color: "#343434"
-
- Rectangle {
- anchors.centerIn: parent
- width: 200; height: 200
- radius: 30
- color: "transparent"
- border.width: 4; border.color: "white"
-
-
- SideRect {
- id: leftRect
- anchors { verticalCenter: parent.verticalCenter; horizontalCenter: parent.left }
- text: "Left"
- }
-
- SideRect {
- id: rightRect
- anchors { verticalCenter: parent.verticalCenter; horizontalCenter: parent.right }
- text: "Right"
- }
-
- SideRect {
- id: topRect
- anchors { verticalCenter: parent.top; horizontalCenter: parent.horizontalCenter }
- text: "Top"
- }
-
- SideRect {
- id: bottomRect
- anchors { verticalCenter: parent.bottom; horizontalCenter: parent.horizontalCenter }
- text: "Bottom"
- }
-
-
- Rectangle {
- id: focusRect
-
- property string text
-
- x: 62.5; y: 75; width: 75; height: 50
- radius: 6
- border.width: 4; border.color: "white"
- color: "firebrick"
-
- // Setting an 'elastic' behavior on the focusRect's x property.
- Behavior on x {
- NumberAnimation { easing.type: "OutElastic"; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 }
- }
-
- // Setting an 'elastic' behavior on the focusRect's y property.
- Behavior on y {
- NumberAnimation { easing.type: "OutElastic"; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 }
- }
-
- Text {
- id: focusText
- text: focusRect.text
- anchors.centerIn: parent
- color: "white"
- font.pixelSize: 16; font.bold: true
-
- // Setting a behavior on the focusText's x property:
- // Set the opacity to 0, set the new text value, then set the opacity back to 1.
- Behavior on text {
- SequentialAnimation {
- NumberAnimation { target: focusText; property: "opacity"; to: 0; duration: 150 }
- PropertyAction { }
- NumberAnimation { target: focusText; property: "opacity"; to: 1; duration: 150 }
- }
- }
- }
- }
- }
-}
diff --git a/examples/declarative/border-image/animated.qml b/examples/declarative/border-image/animated.qml
deleted file mode 100644
index c3ff9ef..0000000
--- a/examples/declarative/border-image/animated.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-import Qt 4.7
-import "content"
-
-Rectangle {
- id: page
- width: 1030; height: 540
-
- MyBorderImage {
- x: 20; y: 20; minWidth: 120; maxWidth: 240
- minHeight: 120; maxHeight: 240
- source: "content/colors.png"; margin: 30
- }
- MyBorderImage {
- x: 270; y: 20; minWidth: 120; maxWidth: 240
- minHeight: 120; maxHeight: 240
- source: "content/colors.png"; margin: 30
- horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
- }
- MyBorderImage {
- x: 520; y: 20; minWidth: 120; maxWidth: 240
- minHeight: 120; maxHeight: 240
- source: "content/colors.png"; margin: 30
- horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
- }
- MyBorderImage {
- x: 770; y: 20; minWidth: 120; maxWidth: 240
- minHeight: 120; maxHeight: 240
- source: "content/colors.png"; margin: 30
- horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
- }
- MyBorderImage {
- x: 20; y: 280; minWidth: 60; maxWidth: 200
- minHeight: 40; maxHeight: 200
- source: "content/bw.png"; margin: 10
- }
- MyBorderImage {
- x: 270; y: 280; minWidth: 60; maxWidth: 200
- minHeight: 40; maxHeight: 200
- source: "content/bw.png"; margin: 10
- horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
- }
- MyBorderImage {
- x: 520; y: 280; minWidth: 60; maxWidth: 200
- minHeight: 40; maxHeight: 200
- source: "content/bw.png"; margin: 10
- horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
- }
- MyBorderImage {
- x: 770; y: 280; minWidth: 60; maxWidth: 200
- minHeight: 40; maxHeight: 200
- source: "content/bw.png"; margin: 10
- horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
- }
-}
diff --git a/examples/declarative/border-image/borders.qml b/examples/declarative/border-image/borders.qml
deleted file mode 100644
index 3743f7e..0000000
--- a/examples/declarative/border-image/borders.qml
+++ /dev/null
@@ -1,17 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- id: page
- width: 520; height: 280
-
- BorderImage {
- x: 20; y: 20; width: 230; height: 240
- smooth: true
- source: "content/colors-stretch.sci"
- }
- BorderImage {
- x: 270; y: 20; width: 230; height: 240
- smooth: true
- source: "content/colors-round.sci"
- }
-}
diff --git a/examples/declarative/border-image/content/MyBorderImage.qml b/examples/declarative/border-image/content/MyBorderImage.qml
deleted file mode 100644
index f65f093..0000000
--- a/examples/declarative/border-image/content/MyBorderImage.qml
+++ /dev/null
@@ -1,37 +0,0 @@
-import Qt 4.7
-
-Item {
- property alias horizontalMode: image.horizontalTileMode
- property alias verticalMode: image.verticalTileMode
- property alias source: image.source
-
- property int minWidth
- property int minHeight
- property int maxWidth
- property int maxHeight
- property int margin
-
- id: container
- width: 240; height: 240
-
- BorderImage {
- id: image; x: container.width / 2 - width / 2; y: container.height / 2 - height / 2
-
- SequentialAnimation on width {
- loops: Animation.Infinite
- NumberAnimation { from: container.minWidth; to: container.maxWidth; duration: 2000; easing.type: "InOutQuad"}
- NumberAnimation { from: container.maxWidth; to: container.minWidth; duration: 2000; easing.type: "InOutQuad" }
- }
-
- SequentialAnimation on height {
- loops: Animation.Infinite
- NumberAnimation { from: container.minHeight; to: container.maxHeight; duration: 2000; easing.type: "InOutQuad"}
- NumberAnimation { from: container.maxHeight; to: container.minHeight; duration: 2000; easing.type: "InOutQuad" }
- }
-
- border.top: container.margin
- border.left: container.margin
- border.bottom: container.margin
- border.right: container.margin
- }
-}
diff --git a/examples/declarative/connections/connections-example.qml b/examples/declarative/connections/connections-example.qml
deleted file mode 100644
index fbef968..0000000
--- a/examples/declarative/connections/connections-example.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-import Qt 4.7
-import "content"
-
-Rectangle {
- id: window
-
- property int angle: 0
-
- width: 640; height: 480
- color: "#646464"
-
- Image {
- id: image
- source: "content/bg1.jpg"
- anchors.centerIn: parent
- transformOrigin: Item.Center
- rotation: window.angle
-
- Behavior on rotation {
- NumberAnimation { easing.type: "OutCubic"; duration: 300 }
- }
- }
-
- Button {
- id: leftButton
- image: "content/rotate-left.png"
- anchors { left: parent.left; bottom: parent.bottom; leftMargin: 10; bottomMargin: 10 }
- }
-
- Button {
- id: rightButton
- image: "content/rotate-right.png"
- anchors { right: parent.right; bottom: parent.bottom; rightMargin: 10; bottomMargin: 10 }
- }
-
- Connections { target: leftButton; onClicked: window.angle -= 90 }
- Connections { target: rightButton; onClicked: window.angle += 90 }
-}
diff --git a/examples/declarative/connections/content/Button.qml b/examples/declarative/connections/content/Button.qml
deleted file mode 100644
index f95afbb..0000000
--- a/examples/declarative/connections/content/Button.qml
+++ /dev/null
@@ -1,12 +0,0 @@
-import Qt 4.7
-
-Item {
- id: button
- width: 48; height: 48
-
- property alias image: icon.source
- signal clicked
-
- Image { id: icon }
- MouseArea { anchors.fill: icon; onClicked: button.clicked() }
-}
diff --git a/examples/declarative/connections/content/bg1.jpg b/examples/declarative/connections/content/bg1.jpg
deleted file mode 100644
index dfc7cee..0000000
--- a/examples/declarative/connections/content/bg1.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/connections/content/rotate-left.png b/examples/declarative/connections/content/rotate-left.png
deleted file mode 100644
index c30387e..0000000
--- a/examples/declarative/connections/content/rotate-left.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/connections/content/rotate-right.png b/examples/declarative/connections/content/rotate-right.png
deleted file mode 100644
index 1b05674..0000000
--- a/examples/declarative/connections/content/rotate-right.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/cppextensions/cppextensions.pro b/examples/declarative/cppextensions/cppextensions.pro
new file mode 100644
index 0000000..33762fe
--- /dev/null
+++ b/examples/declarative/cppextensions/cppextensions.pro
@@ -0,0 +1,10 @@
+TEMPLATE = subdirs
+
+SUBDIRS += \
+ imageprovider \
+ plugins \
+ networkaccessmanagerfactory \
+ qwidgets \
+ qgraphicslayouts \
+ referenceexamples
+
diff --git a/examples/declarative/velocity/velocity.qmlproject b/examples/declarative/cppextensions/cppextensions.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/velocity/velocity.qmlproject
+++ b/examples/declarative/cppextensions/cppextensions.qmlproject
diff --git a/examples/declarative/imageprovider/ImageProviderCore/qmldir b/examples/declarative/cppextensions/imageprovider/ImageProviderCore/qmldir
index 1028590..1028590 100644
--- a/examples/declarative/imageprovider/ImageProviderCore/qmldir
+++ b/examples/declarative/cppextensions/imageprovider/ImageProviderCore/qmldir
diff --git a/examples/declarative/imageprovider/imageprovider-example.qml b/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml
index d774112..d774112 100644
--- a/examples/declarative/imageprovider/imageprovider-example.qml
+++ b/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml
diff --git a/examples/declarative/imageprovider/imageprovider.cpp b/examples/declarative/cppextensions/imageprovider/imageprovider.cpp
index 4c4aa94..4c4aa94 100644
--- a/examples/declarative/imageprovider/imageprovider.cpp
+++ b/examples/declarative/cppextensions/imageprovider/imageprovider.cpp
diff --git a/examples/declarative/imageprovider/imageprovider.pro b/examples/declarative/cppextensions/imageprovider/imageprovider.pro
index 945a301..945a301 100644
--- a/examples/declarative/imageprovider/imageprovider.pro
+++ b/examples/declarative/cppextensions/imageprovider/imageprovider.pro
diff --git a/examples/declarative/imageprovider/imageprovider.qmlproject b/examples/declarative/cppextensions/imageprovider/imageprovider.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/imageprovider/imageprovider.qmlproject
+++ b/examples/declarative/cppextensions/imageprovider/imageprovider.qmlproject
diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp
new file mode 100644
index 0000000..fac36ff
--- /dev/null
+++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** 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 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 <QNetworkAccessManager>
+#include <QNetworkProxy>
+
+#include <QDeclarativeEngine>
+#include <QDeclarativeNetworkAccessManagerFactory>
+#include <QDeclarativeView>
+
+
+/*
+ This example illustrates using a QDeclarativeNetworkAccessManagerFactory to
+ create a QNetworkAccessManager with a proxy.
+
+ Usage:
+ networkaccessmanagerfactory [-host <proxy> -port <port>] [file]
+*/
+
+static QString proxyHost;
+static int proxyPort = 0;
+
+class MyNetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory
+{
+public:
+ virtual QNetworkAccessManager *create(QObject *parent);
+};
+
+QNetworkAccessManager *MyNetworkAccessManagerFactory::create(QObject *parent)
+{
+ QNetworkAccessManager *nam = new QNetworkAccessManager(parent);
+ if (!proxyHost.isEmpty()) {
+ qDebug() << "Created QNetworkAccessManager using proxy" << (proxyHost + ":" + QString::number(proxyPort));
+ QNetworkProxy proxy(QNetworkProxy::HttpCachingProxy, proxyHost, proxyPort);
+ nam->setProxy(proxy);
+ }
+
+ return nam;
+}
+
+int main(int argc, char ** argv)
+{
+ QUrl source("qrc:view.qml");
+
+ QApplication app(argc, argv);
+
+ for (int i = 1; i < argc; ++i) {
+ QString arg(argv[i]);
+ if (arg == "-host" && i < argc-1) {
+ proxyHost = argv[++i];
+ } else if (arg == "-port" && i < argc-1) {
+ arg = argv[++i];
+ proxyPort = arg.toInt();
+ } else if (arg[0] != '-') {
+ source = QUrl::fromLocalFile(arg);
+ } else {
+ qWarning() << "Usage: networkaccessmanagerfactory [-host <proxy> -port <port>] [file]";
+ exit(1);
+ }
+ }
+
+ QDeclarativeView view;
+ view.engine()->setNetworkAccessManagerFactory(new MyNetworkAccessManagerFactory);
+
+ view.setSource(source);
+ view.show();
+
+ return app.exec();
+}
+
diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro
new file mode 100644
index 0000000..74d8db3
--- /dev/null
+++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro
@@ -0,0 +1,9 @@
+TEMPLATE = app
+TARGET = networkaccessmanagerfactory
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative network
+
+# Input
+SOURCES += main.cpp
+RESOURCES += networkaccessmanagerfactory.qrc
diff --git a/examples/declarative/tvtennis/tvtennis.qmlproject b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/tvtennis/tvtennis.qmlproject
+++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject
diff --git a/examples/declarative/stringlistmodel/stringlistmodel.qrc b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc
index 17e9301..17e9301 100644
--- a/examples/declarative/stringlistmodel/stringlistmodel.qrc
+++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc
diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml b/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml
new file mode 100644
index 0000000..7f1bdef
--- /dev/null
+++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml
@@ -0,0 +1,7 @@
+import Qt 4.7
+
+Image {
+ width: 100
+ height: 100
+ source: "http://qt.nokia.com/logo.png"
+}
diff --git a/examples/declarative/plugins/README b/examples/declarative/cppextensions/plugins/README
index fe519f8..fe519f8 100644
--- a/examples/declarative/plugins/README
+++ b/examples/declarative/cppextensions/plugins/README
diff --git a/examples/declarative/plugins/com/nokia/TimeExample/Clock.qml b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml
index 0048372..0048372 100644
--- a/examples/declarative/plugins/com/nokia/TimeExample/Clock.qml
+++ b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml
diff --git a/examples/declarative/plugins/com/nokia/TimeExample/center.png b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/center.png
index 7fbd802..7fbd802 100644
--- a/examples/declarative/plugins/com/nokia/TimeExample/center.png
+++ b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/center.png
Binary files differ
diff --git a/examples/declarative/plugins/com/nokia/TimeExample/clock.png b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/clock.png
index 462edac..462edac 100644
--- a/examples/declarative/plugins/com/nokia/TimeExample/clock.png
+++ b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/clock.png
Binary files differ
diff --git a/examples/declarative/plugins/com/nokia/TimeExample/hour.png b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/hour.png
index f8061a1..f8061a1 100644
--- a/examples/declarative/plugins/com/nokia/TimeExample/hour.png
+++ b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/hour.png
Binary files differ
diff --git a/examples/declarative/plugins/com/nokia/TimeExample/minute.png b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/minute.png
index 1297ec7..1297ec7 100644
--- a/examples/declarative/plugins/com/nokia/TimeExample/minute.png
+++ b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/minute.png
Binary files differ
diff --git a/examples/declarative/plugins/com/nokia/TimeExample/qmldir b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/qmldir
index e9ef115..e9ef115 100644
--- a/examples/declarative/plugins/com/nokia/TimeExample/qmldir
+++ b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/qmldir
diff --git a/examples/declarative/plugins/plugin.cpp b/examples/declarative/cppextensions/plugins/plugin.cpp
index fb51b0c..fb51b0c 100644
--- a/examples/declarative/plugins/plugin.cpp
+++ b/examples/declarative/cppextensions/plugins/plugin.cpp
diff --git a/examples/declarative/plugins/plugins.pro b/examples/declarative/cppextensions/plugins/plugins.pro
index b501ae3..b501ae3 100644
--- a/examples/declarative/plugins/plugins.pro
+++ b/examples/declarative/cppextensions/plugins/plugins.pro
diff --git a/examples/declarative/plugins/plugins.qml b/examples/declarative/cppextensions/plugins/plugins.qml
index 449cd9a..449cd9a 100644
--- a/examples/declarative/plugins/plugins.qml
+++ b/examples/declarative/cppextensions/plugins/plugins.qml
diff --git a/examples/declarative/plugins/plugins.qmlproject b/examples/declarative/cppextensions/plugins/plugins.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/plugins/plugins.qmlproject
+++ b/examples/declarative/cppextensions/plugins/plugins.qmlproject
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.pro b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.pro
new file mode 100644
index 0000000..e5d91b2
--- /dev/null
+++ b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.pro
@@ -0,0 +1,13 @@
+TEMPLATE = app
+TARGET = graphicslayouts
+QT += declarative
+
+SOURCES += \
+ graphicslayouts.cpp \
+ main.cpp
+
+HEADERS += \
+ graphicslayouts_p.h
+
+RESOURCES += \
+ graphicslayouts.qrc
diff --git a/examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/tic-tac-toe/tic-tac-toe.qmlproject
+++ b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicsLayouts.qmlproject
diff --git a/src/imports/widgets/graphicslayouts.cpp b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts.cpp
index 25cf994..25cf994 100644
--- a/src/imports/widgets/graphicslayouts.cpp
+++ b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts.cpp
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts.qml b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts.qml
new file mode 100644
index 0000000..fcd78d5
--- /dev/null
+++ b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts.qml
@@ -0,0 +1,77 @@
+import Qt 4.7
+import GraphicsLayouts 4.7
+
+Item {
+ id: resizable
+
+ width: 800
+ height: 400
+
+ QGraphicsWidget {
+ size.width: parent.width/2
+ size.height: parent.height
+
+ layout: QGraphicsLinearLayout {
+ LayoutItem {
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+ Rectangle { color: "yellow"; anchors.fill: parent }
+ }
+ LayoutItem {
+ minimumSize: "100x100"
+ maximumSize: "400x400"
+ preferredSize: "200x200"
+ Rectangle { color: "green"; anchors.fill: parent }
+ }
+ }
+ }
+ QGraphicsWidget {
+ x: parent.width/2
+ size.width: parent.width/2
+ size.height: parent.height
+
+ layout: QGraphicsGridLayout {
+ LayoutItem {
+ QGraphicsGridLayout.row: 0
+ QGraphicsGridLayout.column: 0
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+ Rectangle { color: "red"; anchors.fill: parent }
+ }
+ LayoutItem {
+ QGraphicsGridLayout.row: 1
+ QGraphicsGridLayout.column: 0
+ minimumSize: "100x100"
+ maximumSize: "200x200"
+ preferredSize: "100x100"
+ Rectangle { color: "orange"; anchors.fill: parent }
+ }
+ LayoutItem {
+ QGraphicsGridLayout.row: 2
+ QGraphicsGridLayout.column: 0
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "200x200"
+ Rectangle { color: "yellow"; anchors.fill: parent }
+ }
+ LayoutItem {
+ QGraphicsGridLayout.row: 0
+ QGraphicsGridLayout.column: 1
+ minimumSize: "100x100"
+ maximumSize: "200x200"
+ preferredSize: "200x200"
+ Rectangle { color: "green"; anchors.fill: parent }
+ }
+ LayoutItem {
+ QGraphicsGridLayout.row: 1
+ QGraphicsGridLayout.column: 1
+ minimumSize: "100x100"
+ maximumSize: "400x400"
+ preferredSize: "200x200"
+ Rectangle { color: "blue"; anchors.fill: parent }
+ }
+ }
+ }
+}
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts.qrc b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts.qrc
new file mode 100644
index 0000000..a199f8d
--- /dev/null
+++ b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>graphicslayouts.qml</file>
+</qresource>
+</RCC>
diff --git a/src/imports/widgets/graphicslayouts_p.h b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts_p.h
index ea9c614..ea9c614 100644
--- a/src/imports/widgets/graphicslayouts_p.h
+++ b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/graphicslayouts_p.h
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/main.cpp b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/main.cpp
new file mode 100644
index 0000000..89b69bf
--- /dev/null
+++ b/examples/declarative/cppextensions/qgraphicslayouts/graphicsLayouts/main.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins 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 <QtDeclarative/qdeclarative.h>
+#include "graphicslayouts_p.h"
+#include <QtDeclarative/QDeclarativeView>
+
+int main(int argc, char* argv[])
+{
+ QApplication app(argc, argv);
+ QDeclarativeView view;
+ qmlRegisterInterface<QGraphicsLayoutItem>("QGraphicsLayoutItem");
+ qmlRegisterInterface<QGraphicsLayout>("QGraphicsLayout");
+ qmlRegisterType<QGraphicsLinearLayoutStretchItemObject>("GraphicsLayouts",4,7,"QGraphicsLinearLayoutStretchItem");
+ qmlRegisterType<QGraphicsLinearLayoutObject>("GraphicsLayouts",4,7,"QGraphicsLinearLayout");
+ qmlRegisterType<QGraphicsGridLayoutObject>("GraphicsLayouts",4,7,"QGraphicsGridLayout");
+ view.setSource(QUrl(":graphicslayouts.qml"));
+ view.show();
+ return app.exec();
+};
+
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro
new file mode 100644
index 0000000..c85a400
--- /dev/null
+++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.pro
@@ -0,0 +1,8 @@
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative
+
+SOURCES += main.cpp
+RESOURCES += layoutItem.qrc
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml
new file mode 100644
index 0000000..6f91dc9
--- /dev/null
+++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qml
@@ -0,0 +1,17 @@
+import Qt 4.7
+
+LayoutItem { //Sized by the layout
+ id: resizable
+
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "100x100"
+
+ Rectangle { color: "yellow"; anchors.fill: parent }
+
+ Rectangle {
+ width: 100; height: 100
+ anchors.top: parent.top; anchors.right: parent.right
+ color: "green"
+ }
+}
diff --git a/examples/declarative/tabwidget/tabwidget.qmlproject b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/tabwidget/tabwidget.qmlproject
+++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qmlproject
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qrc b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qrc
new file mode 100644
index 0000000..deb0fba
--- /dev/null
+++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/layoutItem.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>layoutItem.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp
new file mode 100644
index 0000000..47d3a23
--- /dev/null
+++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutItem/main.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** 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: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 <QGraphicsView>
+#include <QGraphicsScene>
+#include <QGraphicsWidget>
+#include <QGraphicsLinearLayout>
+#include <QDeclarativeComponent>
+#include <QDeclarativeEngine>
+
+/* This example demonstrates using a LayoutItem to let QML snippets integrate
+ nicely with existing QGraphicsView applications designed with GraphicsLayouts
+*/
+int main(int argc, char* argv[])
+{
+ QApplication app(argc, argv);
+
+ //Set up a graphics scene with a QGraphicsWidget and Layout
+ QGraphicsView view;
+ QGraphicsScene scene;
+ QGraphicsWidget *widget = new QGraphicsWidget();
+ QGraphicsLinearLayout *layout = new QGraphicsLinearLayout();
+ widget->setLayout(layout);
+ scene.addItem(widget);
+ view.setScene(&scene);
+
+ //Add the QML snippet into the layout
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl(":layoutItem.qml"));
+ QGraphicsLayoutItem* obj = qobject_cast<QGraphicsLayoutItem*>(c.create());
+ layout->addItem(obj);
+
+ widget->setGeometry(QRectF(0,0, 400,400));
+ view.show();
+ return app.exec();
+}
diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslayouts.pro b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslayouts.pro
new file mode 100644
index 0000000..d92a6f4
--- /dev/null
+++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslayouts.pro
@@ -0,0 +1,5 @@
+TEMPLATE = subdirs
+
+SUBDIRS += \
+ graphicsLayouts \
+ layoutItem
diff --git a/examples/declarative/sql/sql.qmlproject b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslayouts.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/sql/sql.qmlproject
+++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslayouts.qmlproject
diff --git a/examples/declarative/proxywidgets/ProxyWidgets/qmldir b/examples/declarative/cppextensions/qwidgets/QWidgets/qmldir
index e55267c..e55267c 100644
--- a/examples/declarative/proxywidgets/ProxyWidgets/qmldir
+++ b/examples/declarative/cppextensions/qwidgets/QWidgets/qmldir
diff --git a/examples/declarative/cppextensions/qwidgets/README b/examples/declarative/cppextensions/qwidgets/README
new file mode 100644
index 0000000..e2f1b2b
--- /dev/null
+++ b/examples/declarative/cppextensions/qwidgets/README
@@ -0,0 +1,6 @@
+This example shows how to embed QWidget-based objects into QML.
+
+To run:
+
+ make install
+ qml qwidgets.qml
diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.cpp b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp
new file mode 100644
index 0000000..228f9f1
--- /dev/null
+++ b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp
@@ -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 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_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtDeclarative/QDeclarativeExtensionPlugin>
+#include <QtDeclarative/qdeclarative.h>
+#include <QtGui/QGraphicsProxyWidget>
+#include <QtGui/QPushButton>
+#include <QDebug>
+
+class MyPushButton : public QGraphicsProxyWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
+
+public:
+ MyPushButton(QGraphicsItem* parent = 0)
+ : QGraphicsProxyWidget(parent)
+ {
+ widget = new QPushButton("MyPushButton");
+ widget->setAttribute(Qt::WA_NoSystemBackground);
+ setWidget(widget);
+
+ QObject::connect(widget, SIGNAL(clicked(bool)), this, SIGNAL(clicked(bool)));
+ }
+
+ QString text() const
+ {
+ return widget->text();
+ }
+
+ void setText(const QString& text)
+ {
+ if (text != widget->text()) {
+ widget->setText(text);
+ emit textChanged();
+ }
+ }
+
+Q_SIGNALS:
+ void clicked(bool);
+ void textChanged();
+
+private:
+ QPushButton *widget;
+};
+
+class QWidgetsPlugin : public QDeclarativeExtensionPlugin
+{
+ Q_OBJECT
+public:
+ void registerTypes(const char *uri)
+ {
+ qmlRegisterType<MyPushButton>(uri, 1, 0, "MyPushButton");
+ }
+};
+
+#include "qwidgets.moc"
+
+Q_EXPORT_PLUGIN2(qwidgetsplugin, QWidgetsPlugin);
diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.pro b/examples/declarative/cppextensions/qwidgets/qwidgets.pro
new file mode 100644
index 0000000..37f313d
--- /dev/null
+++ b/examples/declarative/cppextensions/qwidgets/qwidgets.pro
@@ -0,0 +1,21 @@
+TEMPLATE = lib
+DESTDIR = QWidgets
+TARGET = qwidgetsplugin
+CONFIG += qt plugin
+QT += declarative
+
+SOURCES += qwidgets.cpp
+
+sources.files += qwidgets.pro qwidgets.cpp qwidgets.qml
+
+sources.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins
+
+target.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins
+
+INSTALLS += sources target
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+
+symbian:{
+ TARGET.EPOCALLOWDLLDATA = 1
+}
diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.qml b/examples/declarative/cppextensions/qwidgets/qwidgets.qml
new file mode 100644
index 0000000..47f9573
--- /dev/null
+++ b/examples/declarative/cppextensions/qwidgets/qwidgets.qml
@@ -0,0 +1,70 @@
+import Qt 4.7
+import "QWidgets" 1.0
+
+Rectangle {
+ id: window
+
+ property int margin: 30
+
+ width: 640; height: 480
+ color: palette.window
+
+ SystemPalette { id: palette }
+
+ MyPushButton {
+ id: button1
+ x: margin; y: margin
+ text: "Right"
+ transformOriginPoint: Qt.point(width / 2, height / 2)
+
+ onClicked: window.state = "right"
+ }
+
+ MyPushButton {
+ id: button2
+ x: margin; y: margin + 30
+ text: "Bottom"
+ transformOriginPoint: Qt.point(width / 2, height / 2)
+
+ onClicked: window.state = "bottom"
+ }
+
+ MyPushButton {
+ id: button3
+ x: margin; y: margin + 60
+ text: "Quit"
+ transformOriginPoint: Qt.point(width / 2, height / 2)
+
+ onClicked: Qt.quit()
+ }
+
+ states: [
+ State {
+ name: "right"
+ PropertyChanges { target: button1; x: window.width - width - margin; text: "Left"; onClicked: window.state = "" }
+ PropertyChanges { target: button2; x: window.width - width - margin }
+ PropertyChanges { target: button3; x: window.width - width - margin }
+ PropertyChanges { target: window; color: Qt.darker(palette.window) }
+ },
+ State {
+ name: "bottom"
+ PropertyChanges { target: button1; y: window.height - height - margin; rotation: 180 }
+ PropertyChanges {
+ target: button2
+ x: button1.x + button1.width + 10; y: window.height - height - margin
+ rotation: 180
+ text: "Top"
+ onClicked: window.state = ""
+ }
+ PropertyChanges { target: button3; x: button2.x + button2.width + 10; y: window.height - height - margin; rotation: 180 }
+ PropertyChanges { target: window; color: Qt.lighter(palette.window) }
+ }
+ ]
+
+ transitions: Transition {
+ ParallelAnimation {
+ NumberAnimation { properties: "x,y,rotation"; duration: 600; easing.type: Easing.OutQuad }
+ ColorAnimation { target: window; duration: 600 }
+ }
+ }
+}
diff --git a/examples/declarative/slideswitch/slideswitch.qmlproject b/examples/declarative/cppextensions/qwidgets/qwidgets.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/slideswitch/slideswitch.qmlproject
+++ b/examples/declarative/cppextensions/qwidgets/qwidgets.qmlproject
diff --git a/examples/declarative/extending/adding/adding.pro b/examples/declarative/cppextensions/referenceexamples/adding/adding.pro
index 6072de4..6072de4 100644
--- a/examples/declarative/extending/adding/adding.pro
+++ b/examples/declarative/cppextensions/referenceexamples/adding/adding.pro
diff --git a/examples/declarative/extending/adding/adding.qrc b/examples/declarative/cppextensions/referenceexamples/adding/adding.qrc
index e2fa01d..e2fa01d 100644
--- a/examples/declarative/extending/adding/adding.qrc
+++ b/examples/declarative/cppextensions/referenceexamples/adding/adding.qrc
diff --git a/examples/declarative/extending/adding/example.qml b/examples/declarative/cppextensions/referenceexamples/adding/example.qml
index dc891e7..dc891e7 100644
--- a/examples/declarative/extending/adding/example.qml
+++ b/examples/declarative/cppextensions/referenceexamples/adding/example.qml
diff --git a/examples/declarative/extending/adding/main.cpp b/examples/declarative/cppextensions/referenceexamples/adding/main.cpp
index 7b33895..7b33895 100644
--- a/examples/declarative/extending/adding/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/adding/main.cpp
diff --git a/examples/declarative/extending/adding/person.cpp b/examples/declarative/cppextensions/referenceexamples/adding/person.cpp
index cdf08e0..cdf08e0 100644
--- a/examples/declarative/extending/adding/person.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/adding/person.cpp
diff --git a/examples/declarative/extending/adding/person.h b/examples/declarative/cppextensions/referenceexamples/adding/person.h
index d6de9a9..d6de9a9 100644
--- a/examples/declarative/extending/adding/person.h
+++ b/examples/declarative/cppextensions/referenceexamples/adding/person.h
diff --git a/examples/declarative/extending/attached/attached.pro b/examples/declarative/cppextensions/referenceexamples/attached/attached.pro
index f6d76ed..f6d76ed 100644
--- a/examples/declarative/extending/attached/attached.pro
+++ b/examples/declarative/cppextensions/referenceexamples/attached/attached.pro
diff --git a/examples/declarative/extending/attached/attached.qrc b/examples/declarative/cppextensions/referenceexamples/attached/attached.qrc
index e2fa01d..e2fa01d 100644
--- a/examples/declarative/extending/attached/attached.qrc
+++ b/examples/declarative/cppextensions/referenceexamples/attached/attached.qrc
diff --git a/examples/declarative/extending/attached/birthdayparty.cpp b/examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.cpp
index 7fa1748..7fa1748 100644
--- a/examples/declarative/extending/attached/birthdayparty.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.cpp
diff --git a/examples/declarative/extending/attached/birthdayparty.h b/examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.h
index 1c66f8c..1c66f8c 100644
--- a/examples/declarative/extending/attached/birthdayparty.h
+++ b/examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.h
diff --git a/examples/declarative/extending/attached/example.qml b/examples/declarative/cppextensions/referenceexamples/attached/example.qml
index 50f0a32..50f0a32 100644
--- a/examples/declarative/extending/attached/example.qml
+++ b/examples/declarative/cppextensions/referenceexamples/attached/example.qml
diff --git a/examples/declarative/extending/attached/main.cpp b/examples/declarative/cppextensions/referenceexamples/attached/main.cpp
index f1055ae..f1055ae 100644
--- a/examples/declarative/extending/attached/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/attached/main.cpp
diff --git a/examples/declarative/extending/valuesource/person.cpp b/examples/declarative/cppextensions/referenceexamples/attached/person.cpp
index 0a9e508..0a9e508 100644
--- a/examples/declarative/extending/valuesource/person.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/attached/person.cpp
diff --git a/examples/declarative/extending/valuesource/person.h b/examples/declarative/cppextensions/referenceexamples/attached/person.h
index 2f444c5..2f444c5 100644
--- a/examples/declarative/extending/valuesource/person.h
+++ b/examples/declarative/cppextensions/referenceexamples/attached/person.h
diff --git a/examples/declarative/extending/binding/binding.pro b/examples/declarative/cppextensions/referenceexamples/binding/binding.pro
index 896ce25..896ce25 100644
--- a/examples/declarative/extending/binding/binding.pro
+++ b/examples/declarative/cppextensions/referenceexamples/binding/binding.pro
diff --git a/examples/declarative/extending/binding/binding.qrc b/examples/declarative/cppextensions/referenceexamples/binding/binding.qrc
index e2fa01d..e2fa01d 100644
--- a/examples/declarative/extending/binding/binding.qrc
+++ b/examples/declarative/cppextensions/referenceexamples/binding/binding.qrc
diff --git a/examples/declarative/extending/binding/birthdayparty.cpp b/examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.cpp
index 000bb1f..000bb1f 100644
--- a/examples/declarative/extending/binding/birthdayparty.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.cpp
diff --git a/examples/declarative/extending/binding/birthdayparty.h b/examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.h
index c3f033e..c3f033e 100644
--- a/examples/declarative/extending/binding/birthdayparty.h
+++ b/examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.h
diff --git a/examples/declarative/extending/binding/example.qml b/examples/declarative/cppextensions/referenceexamples/binding/example.qml
index 82eb3be..82eb3be 100644
--- a/examples/declarative/extending/binding/example.qml
+++ b/examples/declarative/cppextensions/referenceexamples/binding/example.qml
diff --git a/examples/declarative/extending/binding/happybirthdaysong.cpp b/examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.cpp
index a40e7fb..a40e7fb 100644
--- a/examples/declarative/extending/binding/happybirthdaysong.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.cpp
diff --git a/examples/declarative/extending/binding/happybirthdaysong.h b/examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.h
index e825b86..e825b86 100644
--- a/examples/declarative/extending/binding/happybirthdaysong.h
+++ b/examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.h
diff --git a/examples/declarative/extending/binding/main.cpp b/examples/declarative/cppextensions/referenceexamples/binding/main.cpp
index 2495676..2495676 100644
--- a/examples/declarative/extending/binding/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/binding/main.cpp
diff --git a/examples/declarative/extending/binding/person.cpp b/examples/declarative/cppextensions/referenceexamples/binding/person.cpp
index 9a2248f..9a2248f 100644
--- a/examples/declarative/extending/binding/person.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/binding/person.cpp
diff --git a/examples/declarative/extending/binding/person.h b/examples/declarative/cppextensions/referenceexamples/binding/person.h
index 2a68da0..2a68da0 100644
--- a/examples/declarative/extending/binding/person.h
+++ b/examples/declarative/cppextensions/referenceexamples/binding/person.h
diff --git a/examples/declarative/extending/grouped/birthdayparty.cpp b/examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.cpp
index 4f415a3..4f415a3 100644
--- a/examples/declarative/extending/grouped/birthdayparty.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.cpp
diff --git a/examples/declarative/extending/coercion/birthdayparty.h b/examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.h
index ee77e9a..ee77e9a 100644
--- a/examples/declarative/extending/coercion/birthdayparty.h
+++ b/examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.h
diff --git a/examples/declarative/extending/coercion/coercion.pro b/examples/declarative/cppextensions/referenceexamples/coercion/coercion.pro
index c8daed8..c8daed8 100644
--- a/examples/declarative/extending/coercion/coercion.pro
+++ b/examples/declarative/cppextensions/referenceexamples/coercion/coercion.pro
diff --git a/examples/declarative/extending/coercion/coercion.qrc b/examples/declarative/cppextensions/referenceexamples/coercion/coercion.qrc
index e2fa01d..e2fa01d 100644
--- a/examples/declarative/extending/coercion/coercion.qrc
+++ b/examples/declarative/cppextensions/referenceexamples/coercion/coercion.qrc
diff --git a/examples/declarative/extending/coercion/example.qml b/examples/declarative/cppextensions/referenceexamples/coercion/example.qml
index 7b45950..7b45950 100644
--- a/examples/declarative/extending/coercion/example.qml
+++ b/examples/declarative/cppextensions/referenceexamples/coercion/example.qml
diff --git a/examples/declarative/extending/coercion/main.cpp b/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp
index 2c7b545..2c7b545 100644
--- a/examples/declarative/extending/coercion/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp
diff --git a/examples/declarative/extending/coercion/person.cpp b/examples/declarative/cppextensions/referenceexamples/coercion/person.cpp
index 5b5203a..5b5203a 100644
--- a/examples/declarative/extending/coercion/person.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/coercion/person.cpp
diff --git a/examples/declarative/extending/coercion/person.h b/examples/declarative/cppextensions/referenceexamples/coercion/person.h
index 1c95da7..1c95da7 100644
--- a/examples/declarative/extending/coercion/person.h
+++ b/examples/declarative/cppextensions/referenceexamples/coercion/person.h
diff --git a/examples/declarative/extending/default/birthdayparty.cpp b/examples/declarative/cppextensions/referenceexamples/default/birthdayparty.cpp
index 4f415a3..4f415a3 100644
--- a/examples/declarative/extending/default/birthdayparty.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/default/birthdayparty.cpp
diff --git a/examples/declarative/extending/default/birthdayparty.h b/examples/declarative/cppextensions/referenceexamples/default/birthdayparty.h
index 9741040..9741040 100644
--- a/examples/declarative/extending/default/birthdayparty.h
+++ b/examples/declarative/cppextensions/referenceexamples/default/birthdayparty.h
diff --git a/examples/declarative/extending/default/default.pro b/examples/declarative/cppextensions/referenceexamples/default/default.pro
index 32aff0b..32aff0b 100644
--- a/examples/declarative/extending/default/default.pro
+++ b/examples/declarative/cppextensions/referenceexamples/default/default.pro
diff --git a/examples/declarative/extending/default/default.qrc b/examples/declarative/cppextensions/referenceexamples/default/default.qrc
index e2fa01d..e2fa01d 100644
--- a/examples/declarative/extending/default/default.qrc
+++ b/examples/declarative/cppextensions/referenceexamples/default/default.qrc
diff --git a/examples/declarative/extending/default/example.qml b/examples/declarative/cppextensions/referenceexamples/default/example.qml
index c0f3cbb..c0f3cbb 100644
--- a/examples/declarative/extending/default/example.qml
+++ b/examples/declarative/cppextensions/referenceexamples/default/example.qml
diff --git a/examples/declarative/extending/default/main.cpp b/examples/declarative/cppextensions/referenceexamples/default/main.cpp
index 2ffd180..2ffd180 100644
--- a/examples/declarative/extending/default/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/default/main.cpp
diff --git a/examples/declarative/extending/default/person.cpp b/examples/declarative/cppextensions/referenceexamples/default/person.cpp
index 69216d3..69216d3 100644
--- a/examples/declarative/extending/default/person.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/default/person.cpp
diff --git a/examples/declarative/extending/default/person.h b/examples/declarative/cppextensions/referenceexamples/default/person.h
index 3e56860..3e56860 100644
--- a/examples/declarative/extending/default/person.h
+++ b/examples/declarative/cppextensions/referenceexamples/default/person.h
diff --git a/examples/declarative/extending/extended/example.qml b/examples/declarative/cppextensions/referenceexamples/extended/example.qml
index 985ce20..985ce20 100644
--- a/examples/declarative/extending/extended/example.qml
+++ b/examples/declarative/cppextensions/referenceexamples/extended/example.qml
diff --git a/examples/declarative/extending/extended/extended.pro b/examples/declarative/cppextensions/referenceexamples/extended/extended.pro
index 97af286..97af286 100644
--- a/examples/declarative/extending/extended/extended.pro
+++ b/examples/declarative/cppextensions/referenceexamples/extended/extended.pro
diff --git a/examples/declarative/extending/extended/extended.qrc b/examples/declarative/cppextensions/referenceexamples/extended/extended.qrc
index e2fa01d..e2fa01d 100644
--- a/examples/declarative/extending/extended/extended.qrc
+++ b/examples/declarative/cppextensions/referenceexamples/extended/extended.qrc
diff --git a/examples/declarative/extending/extended/lineedit.cpp b/examples/declarative/cppextensions/referenceexamples/extended/lineedit.cpp
index 0e521ec..0e521ec 100644
--- a/examples/declarative/extending/extended/lineedit.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/extended/lineedit.cpp
diff --git a/examples/declarative/extending/extended/lineedit.h b/examples/declarative/cppextensions/referenceexamples/extended/lineedit.h
index 3a464b0..3a464b0 100644
--- a/examples/declarative/extending/extended/lineedit.h
+++ b/examples/declarative/cppextensions/referenceexamples/extended/lineedit.h
diff --git a/examples/declarative/extending/extended/main.cpp b/examples/declarative/cppextensions/referenceexamples/extended/main.cpp
index ca7242d..ca7242d 100644
--- a/examples/declarative/extending/extended/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/extended/main.cpp
diff --git a/examples/declarative/extending/coercion/birthdayparty.cpp b/examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.cpp
index 4f415a3..4f415a3 100644
--- a/examples/declarative/extending/coercion/birthdayparty.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.cpp
diff --git a/examples/declarative/extending/grouped/birthdayparty.h b/examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.h
index 31d21b2..31d21b2 100644
--- a/examples/declarative/extending/grouped/birthdayparty.h
+++ b/examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.h
diff --git a/examples/declarative/extending/grouped/example.qml b/examples/declarative/cppextensions/referenceexamples/grouped/example.qml
index 91b7a06..91b7a06 100644
--- a/examples/declarative/extending/grouped/example.qml
+++ b/examples/declarative/cppextensions/referenceexamples/grouped/example.qml
diff --git a/examples/declarative/extending/grouped/grouped.pro b/examples/declarative/cppextensions/referenceexamples/grouped/grouped.pro
index 576e1d2..576e1d2 100644
--- a/examples/declarative/extending/grouped/grouped.pro
+++ b/examples/declarative/cppextensions/referenceexamples/grouped/grouped.pro
diff --git a/examples/declarative/extending/grouped/grouped.qrc b/examples/declarative/cppextensions/referenceexamples/grouped/grouped.qrc
index e2fa01d..e2fa01d 100644
--- a/examples/declarative/extending/grouped/grouped.qrc
+++ b/examples/declarative/cppextensions/referenceexamples/grouped/grouped.qrc
diff --git a/examples/declarative/extending/grouped/main.cpp b/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp
index baf32cf..baf32cf 100644
--- a/examples/declarative/extending/grouped/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp
diff --git a/examples/declarative/extending/signal/person.cpp b/examples/declarative/cppextensions/referenceexamples/grouped/person.cpp
index 0a9e508..0a9e508 100644
--- a/examples/declarative/extending/signal/person.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/grouped/person.cpp
diff --git a/examples/declarative/extending/grouped/person.h b/examples/declarative/cppextensions/referenceexamples/grouped/person.h
index a031e69..a031e69 100644
--- a/examples/declarative/extending/grouped/person.h
+++ b/examples/declarative/cppextensions/referenceexamples/grouped/person.h
diff --git a/examples/declarative/extending/properties/birthdayparty.cpp b/examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.cpp
index 27d17a1..27d17a1 100644
--- a/examples/declarative/extending/properties/birthdayparty.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.cpp
diff --git a/examples/declarative/extending/properties/birthdayparty.h b/examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h
index 39ce9ba..39ce9ba 100644
--- a/examples/declarative/extending/properties/birthdayparty.h
+++ b/examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h
diff --git a/examples/declarative/extending/properties/example.qml b/examples/declarative/cppextensions/referenceexamples/properties/example.qml
index 35abdd6..35abdd6 100644
--- a/examples/declarative/extending/properties/example.qml
+++ b/examples/declarative/cppextensions/referenceexamples/properties/example.qml
diff --git a/examples/declarative/extending/properties/main.cpp b/examples/declarative/cppextensions/referenceexamples/properties/main.cpp
index 85e9584..85e9584 100644
--- a/examples/declarative/extending/properties/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/properties/main.cpp
diff --git a/examples/declarative/extending/properties/person.cpp b/examples/declarative/cppextensions/referenceexamples/properties/person.cpp
index 92c54f5..92c54f5 100644
--- a/examples/declarative/extending/properties/person.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/properties/person.cpp
diff --git a/examples/declarative/extending/properties/person.h b/examples/declarative/cppextensions/referenceexamples/properties/person.h
index 0029b09..0029b09 100644
--- a/examples/declarative/extending/properties/person.h
+++ b/examples/declarative/cppextensions/referenceexamples/properties/person.h
diff --git a/examples/declarative/extending/properties/properties.pro b/examples/declarative/cppextensions/referenceexamples/properties/properties.pro
index a8f4301..a8f4301 100644
--- a/examples/declarative/extending/properties/properties.pro
+++ b/examples/declarative/cppextensions/referenceexamples/properties/properties.pro
diff --git a/examples/declarative/extending/properties/properties.qrc b/examples/declarative/cppextensions/referenceexamples/properties/properties.qrc
index e2fa01d..e2fa01d 100644
--- a/examples/declarative/extending/properties/properties.qrc
+++ b/examples/declarative/cppextensions/referenceexamples/properties/properties.qrc
diff --git a/examples/declarative/extending/extending.pro b/examples/declarative/cppextensions/referenceexamples/referenceexamples.pro
index 169c7ab..169c7ab 100644
--- a/examples/declarative/extending/extending.pro
+++ b/examples/declarative/cppextensions/referenceexamples/referenceexamples.pro
diff --git a/examples/declarative/searchbox/searchbox.qmlproject b/examples/declarative/cppextensions/referenceexamples/referenceexamples.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/searchbox/searchbox.qmlproject
+++ b/examples/declarative/cppextensions/referenceexamples/referenceexamples.qmlproject
diff --git a/examples/declarative/extending/signal/birthdayparty.cpp b/examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.cpp
index 740c8c9..740c8c9 100644
--- a/examples/declarative/extending/signal/birthdayparty.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.cpp
diff --git a/examples/declarative/extending/signal/birthdayparty.h b/examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.h
index ae4dd39..ae4dd39 100644
--- a/examples/declarative/extending/signal/birthdayparty.h
+++ b/examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.h
diff --git a/examples/declarative/extending/signal/example.qml b/examples/declarative/cppextensions/referenceexamples/signal/example.qml
index 83d6a23..83d6a23 100644
--- a/examples/declarative/extending/signal/example.qml
+++ b/examples/declarative/cppextensions/referenceexamples/signal/example.qml
diff --git a/examples/declarative/extending/signal/main.cpp b/examples/declarative/cppextensions/referenceexamples/signal/main.cpp
index 453f688..453f688 100644
--- a/examples/declarative/extending/signal/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/signal/main.cpp
diff --git a/examples/declarative/extending/grouped/person.cpp b/examples/declarative/cppextensions/referenceexamples/signal/person.cpp
index 0a9e508..0a9e508 100644
--- a/examples/declarative/extending/grouped/person.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/signal/person.cpp
diff --git a/examples/declarative/extending/signal/person.h b/examples/declarative/cppextensions/referenceexamples/signal/person.h
index 2f444c5..2f444c5 100644
--- a/examples/declarative/extending/signal/person.h
+++ b/examples/declarative/cppextensions/referenceexamples/signal/person.h
diff --git a/examples/declarative/extending/signal/signal.pro b/examples/declarative/cppextensions/referenceexamples/signal/signal.pro
index 6367a38..6367a38 100644
--- a/examples/declarative/extending/signal/signal.pro
+++ b/examples/declarative/cppextensions/referenceexamples/signal/signal.pro
diff --git a/examples/declarative/extending/signal/signal.qrc b/examples/declarative/cppextensions/referenceexamples/signal/signal.qrc
index e2fa01d..e2fa01d 100644
--- a/examples/declarative/extending/signal/signal.qrc
+++ b/examples/declarative/cppextensions/referenceexamples/signal/signal.qrc
diff --git a/examples/declarative/extending/valuesource/birthdayparty.cpp b/examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.cpp
index b915f4f..b915f4f 100644
--- a/examples/declarative/extending/valuesource/birthdayparty.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.cpp
diff --git a/examples/declarative/extending/valuesource/birthdayparty.h b/examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.h
index 5f25781..5f25781 100644
--- a/examples/declarative/extending/valuesource/birthdayparty.h
+++ b/examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.h
diff --git a/examples/declarative/extending/valuesource/example.qml b/examples/declarative/cppextensions/referenceexamples/valuesource/example.qml
index 5b8c8af..5b8c8af 100644
--- a/examples/declarative/extending/valuesource/example.qml
+++ b/examples/declarative/cppextensions/referenceexamples/valuesource/example.qml
diff --git a/examples/declarative/extending/valuesource/happybirthdaysong.cpp b/examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp
index 8ea5c2b..8ea5c2b 100644
--- a/examples/declarative/extending/valuesource/happybirthdaysong.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp
diff --git a/examples/declarative/extending/valuesource/happybirthdaysong.h b/examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h
index 3d07909..3d07909 100644
--- a/examples/declarative/extending/valuesource/happybirthdaysong.h
+++ b/examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h
diff --git a/examples/declarative/extending/valuesource/main.cpp b/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp
index 00840ee..00840ee 100644
--- a/examples/declarative/extending/valuesource/main.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp
diff --git a/examples/declarative/extending/attached/person.cpp b/examples/declarative/cppextensions/referenceexamples/valuesource/person.cpp
index 0a9e508..0a9e508 100644
--- a/examples/declarative/extending/attached/person.cpp
+++ b/examples/declarative/cppextensions/referenceexamples/valuesource/person.cpp
diff --git a/examples/declarative/extending/attached/person.h b/examples/declarative/cppextensions/referenceexamples/valuesource/person.h
index 2f444c5..2f444c5 100644
--- a/examples/declarative/extending/attached/person.h
+++ b/examples/declarative/cppextensions/referenceexamples/valuesource/person.h
diff --git a/examples/declarative/extending/valuesource/valuesource.pro b/examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.pro
index 0626c98..0626c98 100644
--- a/examples/declarative/extending/valuesource/valuesource.pro
+++ b/examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.pro
diff --git a/examples/declarative/extending/valuesource/valuesource.qrc b/examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.qrc
index e2fa01d..e2fa01d 100644
--- a/examples/declarative/extending/valuesource/valuesource.qrc
+++ b/examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.qrc
diff --git a/examples/declarative/declarative.pro b/examples/declarative/declarative.pro
index e37c3d4..e3d922c 100644
--- a/examples/declarative/declarative.pro
+++ b/examples/declarative/declarative.pro
@@ -2,51 +2,28 @@ TEMPLATE = subdirs
# These examples contain some C++ and need to be built
SUBDIRS = \
- extending \
- imageprovider \
- objectlistmodel \
- stringlistmodel \
- plugins \
- proxywidgets
+ cppextensions \
+ modelviews \
+ tutorials
# plugins uses a 'Time' class that conflicts with symbian e32std.h also defining a class of the same name
symbian:SUBDIRS -= plugins
# These examples contain no C++ and can simply be copied
sources.files = \
- animations \
- aspectratio \
- behaviors \
- border-image \
- clocks \
- connections \
- dial \
- dynamic \
- effects \
- fillmode \
- focus \
- fonts \
- gridview \
- layouts \
- listview \
- mousearea \
- package \
- parallax \
- progressbar \
- scrollbar \
- searchbox \
- slideswitch \
- sql \
- states \
- tabwidget \
- tic-tac-toe \
- tutorials \
- tvtennis \
- velocity \
- webview \
- workerlistmodel \
- workerscript \
- xmldata \
- xmlhttprequest
+ animation \
+ cppextensions \
+ i18n \
+ imageelements \
+ keyinteraction \
+ positioners \
+ sqllocalstorage \
+ text \
+ threading \
+ touchinteraction \
+ toys \
+ ui-components \
+ xml
+
sources.path = $$[QT_INSTALL_EXAMPLES]/declarative
INSTALLS += sources
diff --git a/examples/declarative/dial/content/Dial.qml b/examples/declarative/dial/content/Dial.qml
deleted file mode 100644
index f9ab3e3..0000000
--- a/examples/declarative/dial/content/Dial.qml
+++ /dev/null
@@ -1,37 +0,0 @@
-import Qt 4.7
-
-Item {
- id: root
- property real value : 0
-
- width: 210; height: 210
-
- Image { source: "background.png" }
-
- Image {
- x: 93
- y: 35
- source: "needle_shadow.png"
- transform: Rotation {
- origin.x: 11; origin.y: 67
- angle: needleRotation.angle
- }
- }
- Image {
- id: needle
- x: 95; y: 33
- smooth: true
- source: "needle.png"
- transform: Rotation {
- id: needleRotation
- origin.x: 7; origin.y: 65
- angle: -130
- SpringFollow on angle {
- spring: 1.4
- damping: .15
- to: Math.min(Math.max(-130, root.value*2.6 - 130), 133)
- }
- }
- }
- Image { x: 21; y: 18; source: "overlay.png" }
-}
diff --git a/examples/declarative/dial/dial-example.qml b/examples/declarative/dial/dial-example.qml
deleted file mode 100644
index fd899a5..0000000
--- a/examples/declarative/dial/dial-example.qml
+++ /dev/null
@@ -1,44 +0,0 @@
-import Qt 4.7
-import "content"
-
-Rectangle {
- color: "#545454"
- width: 300; height: 300
-
- // Dial with a slider to adjust it
- Dial {
- id: dial
- anchors.centerIn: parent
- value: slider.x * 100 / (container.width - 34)
- }
-
- Rectangle {
- id: container
- anchors { bottom: parent.bottom; left: parent.left; right: parent.right; leftMargin: 20; rightMargin: 20; bottomMargin: 10 }
- height: 16
-
- radius: 8
- opacity: 0.7
- smooth: true
- gradient: Gradient {
- GradientStop { position: 0.0; color: "gray" }
- GradientStop { position: 1.0; color: "white" }
- }
-
- Rectangle {
- id: slider
- x: 1; y: 1; width: 30; height: 14
- radius: 6
- smooth: true
- gradient: Gradient {
- GradientStop { position: 0.0; color: "#424242" }
- GradientStop { position: 1.0; color: "black" }
- }
-
- MouseArea {
- anchors.fill: parent
- drag.target: parent; drag.axis: "XAxis"; drag.minimumX: 2; drag.maximumX: container.width - 32
- }
- }
- }
-}
diff --git a/examples/declarative/dynamic/dynamic.qml b/examples/declarative/dynamic/dynamic.qml
deleted file mode 100644
index 0e6e197..0000000
--- a/examples/declarative/dynamic/dynamic.qml
+++ /dev/null
@@ -1,157 +0,0 @@
-import Qt 4.7
-import Qt.labs.particles 1.0
-import "qml"
-
-Item {
- id: window
- //This is a desktop-sized example
- width: 1024; height: 512
- property int activeSuns: 0
-
- //This is the message that pops up when there's an error
- Rectangle{
- id: dialog
- opacity: 0
- anchors.centerIn: parent
- width: dialogText.width + 6
- height: dialogText.height + 6
- border.color: 'black'
- color: 'lightsteelblue'
- z: 65535 //Arbitrary number chosen to be above all the items, including the scaled perspective ones.
- function show(str){
- dialogText.text = str;
- dialogAnim.start();
- }
- Text{
- id: dialogText
- x:3
- y:3
- font.pixelSize: 14
- }
- SequentialAnimation{
- id: dialogAnim
- NumberAnimation{target: dialog; property:"opacity"; to: 1; duration: 1000}
- PauseAnimation{duration: 5000}
- NumberAnimation{target: dialog; property:"opacity"; to: 0; duration: 1000}
- }
- }
-
- // sky
- Rectangle { id: sky
- anchors { left: parent.left; top: parent.top; right: toolbox.right; bottom: parent.verticalCenter }
- gradient: Gradient {
- GradientStop { id: stopA; position: 0.0; color: "#0E1533" }
- GradientStop { id: stopB; position: 1.0; color: "#437284" }
- }
- }
-
- // stars (when there's no sun)
- Particles {
- id: stars
- x: 0; y: 0; width: parent.width; height: parent.height / 2
- source: "images/star.png"; angleDeviation: 360; velocity: 0
- velocityDeviation: 0; count: parent.width / 10; fadeInDuration: 2800
- opacity: 1
- }
-
- // ground, which has a z such that the sun can set behind it
- Rectangle {
- id: ground
- z: 2
- anchors { left: parent.left; top: parent.verticalCenter; right: toolbox.right; bottom: parent.bottom }
- gradient: Gradient {
- GradientStop { position: 0.0; color: "ForestGreen" }
- GradientStop { position: 1.0; color: "DarkGreen" }
- }
- }
-
- //Day state, for when you place a sun
- states: State {
- name: "Day"; when: window.activeSuns > 0
- PropertyChanges { target: stopA; color: "DeepSkyBlue"}
- PropertyChanges { target: stopB; color: "SkyBlue"}
- PropertyChanges { target: stars; opacity: 0 }
- }
-
- transitions: Transition {
- PropertyAnimation { duration: 3000 }
- ColorAnimation { duration: 3000 }
- }
-
- SystemPalette { id: activePalette }
-
- // toolbox
- Rectangle {
- id: toolbox
- z: 3 //Above ground
- color: activePalette.window;
- width: 480
- anchors { right: parent.right; top:parent.top; bottom: parent.bottom }
- Rectangle { //Not a child of any positioner
- border.color: "black";
- width: toolRow.width + 4
- height: toolRow.height + 4
- x: toolboxPositioner.x + toolRow.x - 2
- y: toolboxPositioner.y + toolRow.y - 2
- }
- Column {
- id: toolboxPositioner
- anchors.centerIn: parent
- spacing: 8
- Text { text: "Drag an item into the scene." }
- Row {
- id: toolRow
- spacing: 8;
- PaletteItem {
- anchors.verticalCenter: parent.verticalCenter
- file: "Sun.qml";
- image: "../images/sun.png"
- }
- PaletteItem {
- file: "GenericItem.qml"
- image: "../images/moon.png"
- }
- PaletteItem {
- anchors.verticalCenter: parent.verticalCenter
- file: "PerspectiveItem.qml"
- image: "../images/tree_s.png"
- }
- PaletteItem {
- anchors.verticalCenter: parent.verticalCenter
- file: "PerspectiveItem.qml"
- image: "../images/rabbit_brown.png"
- }
- PaletteItem {
- anchors.verticalCenter: parent.verticalCenter
- file: "PerspectiveItem.qml"
- image: "../images/rabbit_bw.png"
- }
- }
- Text { text: "Active Suns: " + activeSuns }
- Rectangle { width: 440; height: 1; color: "black" }
- Text { text: "Arbitrary QML: " }
- TextEdit {
- id: qmlText
- width: 460
- height: 220
- readOnly: false
- focusOnPress: true
- font.pixelSize: 14
-
- text: "import Qt 4.7\nImage {\n id: smile;\n x: 500*Math.random();\n y: 200*Math.random(); \n source: 'images/face-smile.png';\n NumberAnimation on opacity { \n to: 0; duration: 1500;\n }\n Component.onCompleted: smile.destroy(1500);\n}"
- }
- Button {
- text: "Create"
- function makeCustom() {
- try{
- Qt.createQmlObject(qmlText.text, window, 'CustomObject');
- }catch(err){
- dialog.show('Error on line ' + err.qmlErrors[0].lineNumber + '\n' + err.qmlErrors[0].message );
- }
- }
- onClicked: makeCustom();
- }
- }
- }
-
-}
diff --git a/examples/declarative/dynamic/qml/Button.qml b/examples/declarative/dynamic/qml/Button.qml
deleted file mode 100644
index 53588bb..0000000
--- a/examples/declarative/dynamic/qml/Button.qml
+++ /dev/null
@@ -1,24 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- id: container
-
- property variant text
- signal clicked
-
- SystemPalette { id: activePalette }
- height: text.height + 10
- width: text.width + 20
- border.width: 1
- radius: 4; smooth: true
- gradient: Gradient {
- GradientStop { position: 0.0;
- color: if(!mr.pressed){activePalette.light;}else{activePalette.button;}
- }
- GradientStop { position: 1.0;
- color: if(!mr.pressed){activePalette.button;}else{activePalette.dark;}
- }
- }
- MouseArea { id:mr; anchors.fill: parent; onClicked: container.clicked() }
- Text { id: text; anchors.centerIn:parent; font.pointSize: 10; text: parent.text; color: activePalette.buttonText }
-}
diff --git a/examples/declarative/dynamic/qml/GenericItem.qml b/examples/declarative/dynamic/qml/GenericItem.qml
deleted file mode 100644
index faac06d..0000000
--- a/examples/declarative/dynamic/qml/GenericItem.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-import Qt 4.7
-
-Item{
- property bool created: false
- property string image
- width: imageItem.width
- height: imageItem.height
- z: 2
- Image{
- id: imageItem
- source: image;
- }
-}
diff --git a/examples/declarative/dynamic/qml/PaletteItem.qml b/examples/declarative/dynamic/qml/PaletteItem.qml
deleted file mode 100644
index e8f2ed4..0000000
--- a/examples/declarative/dynamic/qml/PaletteItem.qml
+++ /dev/null
@@ -1,13 +0,0 @@
-import Qt 4.7
-import "itemCreation.js" as Code
-
-GenericItem {
- id: itemButton
- property string file
- MouseArea {
- anchors.fill: parent;
- onPressed: Code.startDrag(mouse);
- onPositionChanged: Code.moveDrag(mouse);
- onReleased: Code.endDrag(mouse);
- }
-}
diff --git a/examples/declarative/dynamic/qml/PerspectiveItem.qml b/examples/declarative/dynamic/qml/PerspectiveItem.qml
deleted file mode 100644
index 3cbe64a..0000000
--- a/examples/declarative/dynamic/qml/PerspectiveItem.qml
+++ /dev/null
@@ -1,16 +0,0 @@
-import Qt 4.7
-
-Image {
- id: tree
- property bool created: false
- property double scaleFactor: Math.max((y+height-250)*0.01, 0.3)
- property double scaledBottom: y + (height+height*scaleFactor)/2
- property bool onLand: scaledBottom > window.height/2
- property string image //Needed for compatibility with GenericItem
- opacity: onLand ? 1 : 0.25
- onCreatedChanged: if (created && !onLand) { tree.destroy() } else { z = scaledBottom }
- scale: scaleFactor
- transformOrigin: "Center"
- source: image; smooth: true
- onYChanged: z = scaledBottom
-}
diff --git a/examples/declarative/dynamic/qml/Sun.qml b/examples/declarative/dynamic/qml/Sun.qml
deleted file mode 100644
index 3627964..0000000
--- a/examples/declarative/dynamic/qml/Sun.qml
+++ /dev/null
@@ -1,24 +0,0 @@
-import Qt 4.7
-
-Image {
- id: sun
- property bool created: false
- property string image: "../images/sun.png"
- onCreatedChanged: if(created){window.activeSuns++;}else{window.activeSuns--;}
-
- source: image;
- z: 1
-
- //x and y get set when instantiated
- //head offscreen
- NumberAnimation on y {
- to: window.height / 2;
- running: created
- onRunningChanged: if (running) duration = (window.height - sun.y) * 10; else state = "OffScreen";
- }
-
- states: State {
- name: "OffScreen";
- StateChangeScript { script: { sun.created = false; sun.destroy() } }
- }
-}
diff --git a/examples/declarative/dynamic/qml/itemCreation.js b/examples/declarative/dynamic/qml/itemCreation.js
deleted file mode 100644
index 98d48a8..0000000
--- a/examples/declarative/dynamic/qml/itemCreation.js
+++ /dev/null
@@ -1,82 +0,0 @@
-var itemComponent = null;
-var draggedItem = null;
-var startingMouse;
-var startingZ;
-//Until QT-2385 is resolved we need to convert to scene coordinates manually
-var xOffset;
-var yOffset;
-function setSceneOffset()
-{
- xOffset = 0;
- yOffset = 0;
- var p = itemButton;
- while(p != window){
- xOffset += p.x;
- yOffset += p.y;
- p = p.parent;
- }
-}
-
-function startDrag(mouse)
-{
- setSceneOffset();
- startingMouse = { x: mouse.x, y: mouse.y }
- loadComponent();
-}
-
-//Creation is split into two functions due to an asyncronous wait while
-//possible external files are loaded.
-
-function loadComponent() {
- if (itemComponent != null) //Already loaded the component
- createItem();
-
- itemComponent = Qt.createComponent(itemButton.file);
- //console.log(itemButton.file)
- if(itemComponent.isLoading){
- component.statusChanged.connect(finishCreation);
- }else{//Depending on the content, it can be ready or error immediately
- createItem();
- }
-}
-
-function createItem() {
- if (itemComponent.isReady && draggedItem == null) {
- draggedItem = itemComponent.createObject();
- draggedItem.parent = window;
- draggedItem.image = itemButton.image;
- draggedItem.x = xOffset;
- draggedItem.y = yOffset;
- startingZ = draggedItem.z;
- draggedItem.z = 4;//On top
- } else if (itemComponent.isError) {
- draggedItem = null;
- console.log("error creating component");
- console.log(component.errorsString());
- }
-}
-
-function moveDrag(mouse)
-{
- if(draggedItem == null)
- return;
-
- draggedItem.x = mouse.x + xOffset - startingMouse.x;
- draggedItem.y = mouse.y + yOffset - startingMouse.y;
-}
-
-function endDrag(mouse)
-{
- if(draggedItem == null)
- return;
-
- if(draggedItem.x + draggedItem.width > toolbox.x){ //Don't drop it in the toolbox
- draggedItem.destroy();
- draggedItem = null;
- }else{
- draggedItem.z = startingZ;
- draggedItem.created = true;
- draggedItem = null;
- }
-}
-
diff --git a/examples/declarative/fillmode/content/QtLogo.qml b/examples/declarative/fillmode/content/QtLogo.qml
deleted file mode 100644
index 6dd714d..0000000
--- a/examples/declarative/fillmode/content/QtLogo.qml
+++ /dev/null
@@ -1,30 +0,0 @@
-import Qt 4.7
-
-Item {
- id: qtLogo
-
- property alias fillMode: image.fillMode
- property alias label: labelText.text
-
- width: ((window.width - 20) - ((grid.columns - 1) * grid.spacing)) / grid.columns
- height: ((window.height - 20) - ((grid.rows - 1) * grid.spacing)) / grid.rows
-
- Column {
- anchors.fill: parent
-
- Rectangle {
- height: qtLogo.height - 30; width: qtLogo.width
- border.color: "black"; clip: true
-
- Image {
- id: image
- anchors.fill: parent; smooth: true; source: "qt-logo.png"
- }
- }
-
- Text {
- id: labelText; anchors.horizontalCenter: parent.horizontalCenter
- height: 30; verticalAlignment: Text.AlignVCenter
- }
- }
-}
diff --git a/examples/declarative/fillmode/content/qt-logo.png b/examples/declarative/fillmode/content/qt-logo.png
deleted file mode 100644
index 14ddf2a..0000000
--- a/examples/declarative/fillmode/content/qt-logo.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/fillmode/fillmode.qml b/examples/declarative/fillmode/fillmode.qml
deleted file mode 100644
index e5b0336..0000000
--- a/examples/declarative/fillmode/fillmode.qml
+++ /dev/null
@@ -1,22 +0,0 @@
-import Qt 4.7
-import "content"
-
-Rectangle {
- id: window
-
- width: 800; height: 480
- color: "#cdcdcd"
-
- Grid {
- id: grid
- anchors { fill: parent; topMargin: 10; leftMargin: 10; rightMargin: 10; bottomMargin: 10 }
- columns: 3; rows: 2; spacing: 20
-
- QtLogo { fillMode: Image.Stretch; label: "Stretch" }
- QtLogo { fillMode: Image.PreserveAspectFit; label: "PreserveAspectFit" }
- QtLogo { fillMode: Image.PreserveAspectCrop; label: "PreserveAspectCrop" }
- QtLogo { fillMode: Image.Tile; label: "Tile" }
- QtLogo { fillMode: Image.TileHorizontally; label: "TileHorizontally" }
- QtLogo { fillMode: Image.TileVertically; label: "TileVertically" }
- }
-}
diff --git a/examples/declarative/focus/Core/ListViews.qml b/examples/declarative/focus/Core/ListViews.qml
deleted file mode 100644
index 089f821..0000000
--- a/examples/declarative/focus/Core/ListViews.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-import Qt 4.7
-
-FocusScope {
- clip: true
-
- onWantsFocusChanged: if (wantsFocus) mainView.state = "showListViews"
-
- ListView {
- id: list1
- y: wantsFocus ? 10 : 40; width: parent.width / 3; height: parent.height - 20
- focus: true
- KeyNavigation.up: gridMenu; KeyNavigation.left: contextMenu; KeyNavigation.right: list2
- model: 10; cacheBuffer: 200
- delegate: ListViewDelegate {}
-
- Behavior on y {
- NumberAnimation { duration: 600; easing.type: "OutQuint" }
- }
- }
-
- ListView {
- id: list2
- y: wantsFocus ? 10 : 40; x: parent.width / 3; width: parent.width / 3; height: parent.height - 20
- KeyNavigation.up: gridMenu; KeyNavigation.left: list1; KeyNavigation.right: list3
- model: 10; cacheBuffer: 200
- delegate: ListViewDelegate {}
-
- Behavior on y {
- NumberAnimation { duration: 600; easing.type: "OutQuint" }
- }
- }
-
- ListView {
- id: list3
- y: wantsFocus ? 10 : 40; x: 2 * parent.width / 3; width: parent.width / 3; height: parent.height - 20
- KeyNavigation.up: gridMenu; KeyNavigation.left: list2
- model: 10; cacheBuffer: 200
- delegate: ListViewDelegate {}
-
- Behavior on y {
- NumberAnimation { duration: 600; easing.type: "OutQuint" }
- }
- }
-
- Rectangle { width: parent.width; height: 1; color: "#D1DBBD" }
-
- Rectangle {
- y: 1; width: parent.width; height: 10
- gradient: Gradient {
- GradientStop { position: 0.0; color: "#3E606F" }
- GradientStop { position: 1.0; color: "transparent" }
- }
- }
-
- Rectangle {
- y: parent.height - 10; width: parent.width; height: 10
- gradient: Gradient {
- GradientStop { position: 1.0; color: "#3E606F" }
- GradientStop { position: 0.0; color: "transparent" }
- }
- }
-}
diff --git a/examples/declarative/focus/focus.qml b/examples/declarative/focus/focus.qml
deleted file mode 100644
index 22b0e50..0000000
--- a/examples/declarative/focus/focus.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-import Qt 4.7
-import "Core"
-
-Rectangle {
- id: window
-
- width: 800; height: 480
- color: "#3E606F"
-
- FocusScope {
- id: mainView
-
- width: parent.width; height: parent.height
- focus: true
-
- GridMenu {
- id: gridMenu
-
- width: parent.width; height: 320
- focus: true
- interactive: parent.wantsFocus
- }
-
- ListViews {
- id: listViews
- y: 320; width: parent.width; height: 320
- }
-
- Rectangle {
- id: shade
- color: "black"; opacity: 0; anchors.fill: parent
- }
-
- states: State {
- name: "showListViews"
- PropertyChanges { target: gridMenu; y: -160 }
- PropertyChanges { target: listViews; y: 160 }
- }
-
- transitions: Transition {
- NumberAnimation { properties: "y"; duration: 600; easing.type: "OutQuint" }
- }
- }
-
- Image {
- source: "Core/images/arrow.png"
- rotation: 90
- anchors.verticalCenter: parent.verticalCenter
-
- MouseArea {
- anchors { fill: parent; leftMargin: -10; topMargin: -10; rightMargin: -10; bottomMargin: -10 }
- onClicked: window.state = "contextMenuOpen"
- }
- }
-
- ContextMenu { id: contextMenu; x: -265; width: 260; height: parent.height }
-
- states: State {
- name: "contextMenuOpen"
- when: !mainView.wantsFocus
- PropertyChanges { target: contextMenu; x: 0; open: true }
- PropertyChanges { target: mainView; x: 130 }
- PropertyChanges { target: shade; opacity: 0.25 }
- }
-
- transitions: Transition {
- NumberAnimation { properties: "x,opacity"; duration: 600; easing.type: "OutQuint" }
- }
-}
diff --git a/examples/declarative/fonts/fonts.qml b/examples/declarative/fonts/fonts.qml
deleted file mode 100644
index ae31b03..0000000
--- a/examples/declarative/fonts/fonts.qml
+++ /dev/null
@@ -1,64 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- property string myText: "The quick brown fox jumps over the lazy dog."
-
- width: 800; height: 480
- color: "steelblue"
-
- FontLoader { id: fixedFont; name: "Courier" }
- FontLoader { id: localFont; source: "fonts/tarzeau_ocr_a.ttf" }
- FontLoader { id: webFont; source: "http://www.princexml.com/fonts/steffmann/Starburst.ttf" }
-
- Column {
- anchors { fill: parent; leftMargin: 10; rightMargin: 10 }
- spacing: 15
-
- Text {
- text: myText
- color: "lightsteelblue"
- width: parent.width
- elide: Text.ElideRight
- font.family: "Times"; font.pointSize: 42
- }
- Text {
- text: myText
- color: "lightsteelblue"
- width: parent.width
- elide: Text.ElideLeft
- font { family: "Times"; pointSize: 42; capitalization: Font.AllUppercase }
- }
- Text {
- text: myText
- color: "lightsteelblue"
- width: parent.width
- elide: Text.ElideMiddle
- font { family: fixedFont.name; pointSize: 42; weight: Font.Bold; capitalization: Font.AllLowercase }
- }
- Text {
- text: myText
- color: "lightsteelblue"
- width: parent.width
- elide: Text.ElideRight
- font { family: fixedFont.name; pointSize: 42; italic: true; capitalization: Font.SmallCaps }
- }
- Text {
- text: myText
- color: "lightsteelblue"
- width: parent.width
- elide: Text.ElideLeft
- font { family: localFont.name; pointSize: 42; capitalization: Font.Capitalize }
- }
- Text {
- text: {
- if (webFont.status == 1) myText
- else if (webFont.status == 2) "Loading..."
- else if (webFont.status == 3) "Error loading font"
- }
- color: "lightsteelblue"
- width: parent.width
- elide: Text.ElideMiddle
- font.family: webFont.name; font.pointSize: 42
- }
- }
-}
diff --git a/examples/declarative/fonts/hello.qml b/examples/declarative/fonts/hello.qml
deleted file mode 100644
index d4d0e4c..0000000
--- a/examples/declarative/fonts/hello.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- id: screen
-
- width: 800; height: 480
- color: "black"
-
- Item {
- id: container
- x: screen.width / 2; y: screen.height / 2
-
- Text {
- id: text
- anchors.centerIn: parent
- color: "white"
- text: "Hello world!"
- font.pixelSize: 60
-
- SequentialAnimation on font.letterSpacing {
- loops: Animation.Infinite;
- NumberAnimation { from: 100; to: 300; easing.type: "InQuad"; duration: 3000 }
- ScriptAction {
- script: {
- container.y = (screen.height / 4) + (Math.random() * screen.height / 2)
- container.x = (screen.width / 4) + (Math.random() * screen.width / 2)
- }
- }
- }
-
- SequentialAnimation on opacity {
- loops: Animation.Infinite;
- NumberAnimation { from: 1; to: 0; duration: 2600 }
- PauseAnimation { duration: 400 }
- }
- }
- }
-}
diff --git a/examples/declarative/i18n/i18n.qml b/examples/declarative/i18n/i18n.qml
new file mode 100644
index 0000000..c3030b2
--- /dev/null
+++ b/examples/declarative/i18n/i18n.qml
@@ -0,0 +1,37 @@
+import Qt 4.7
+
+//
+// The QML runtime automatically loads a translation from the i18n subdirectory of the root
+// QML file, based on the system language.
+//
+// The files are created/updated by running:
+//
+// lupdate i18n.qml -ts i18n/base.ts
+//
+// Translations for new languages are created by copying i18n/base.ts to i18n/qml_<lang>.ts
+// The .ts files can then be edited with Linguist:
+//
+// linguist i18n/qml_fr.ts
+//
+// The run-time translation files are then generaeted by running:
+//
+// lrelease i18n/*.ts
+//
+
+Rectangle {
+ width: 640; height: 480
+
+ Column {
+ anchors.fill: parent; spacing: 20
+
+ Text {
+ text: "If a translation is available for the system language (eg. French) then the string below will translated (eg. 'Bonjour'). Otherwise is will show 'Hello'."
+ width: parent.width; wrapMode: Text.WordWrap
+ }
+
+ Text {
+ text: qsTr("Hello")
+ font.pointSize: 25; anchors.horizontalCenter: parent.horizontalCenter
+ }
+ }
+}
diff --git a/examples/declarative/scrollbar/scrollbar.qmlproject b/examples/declarative/i18n/i18n.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/scrollbar/scrollbar.qmlproject
+++ b/examples/declarative/i18n/i18n.qmlproject
diff --git a/examples/declarative/i18n/i18n/base.ts b/examples/declarative/i18n/i18n/base.ts
new file mode 100644
index 0000000..82547a1
--- /dev/null
+++ b/examples/declarative/i18n/i18n/base.ts
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" sourcelanguage="en">
+<context>
+ <name>i18n</name>
+ <message>
+ <location filename="../i18n.qml" line="30"/>
+ <source>Hello</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/declarative/i18n/i18n/qml_en_AU.qm b/examples/declarative/i18n/i18n/qml_en_AU.qm
new file mode 100644
index 0000000..fb8b710
--- /dev/null
+++ b/examples/declarative/i18n/i18n/qml_en_AU.qm
Binary files differ
diff --git a/examples/declarative/i18n/i18n/qml_en_AU.ts b/examples/declarative/i18n/i18n/qml_en_AU.ts
new file mode 100644
index 0000000..e991aff
--- /dev/null
+++ b/examples/declarative/i18n/i18n/qml_en_AU.ts
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_AU" sourcelanguage="en">
+<context>
+ <name>i18n</name>
+ <message>
+ <location filename="../i18n.qml" line="30"/>
+ <source>Hello</source>
+ <translation>G&apos;day</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/declarative/i18n/i18n/qml_fr.qm b/examples/declarative/i18n/i18n/qml_fr.qm
new file mode 100644
index 0000000..583562e
--- /dev/null
+++ b/examples/declarative/i18n/i18n/qml_fr.qm
Binary files differ
diff --git a/examples/declarative/i18n/i18n/qml_fr.ts b/examples/declarative/i18n/i18n/qml_fr.ts
new file mode 100644
index 0000000..365abd9
--- /dev/null
+++ b/examples/declarative/i18n/i18n/qml_fr.ts
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="fr" sourcelanguage="en">
+<context>
+ <name>i18n</name>
+ <message>
+ <location filename="../i18n.qml" line="30"/>
+ <source>Hello</source>
+ <translation>Bonjour</translation>
+ </message>
+</context>
+</TS>
diff --git a/examples/declarative/imageelements/borderimage/borderimage.qml b/examples/declarative/imageelements/borderimage/borderimage.qml
new file mode 100644
index 0000000..c334cea
--- /dev/null
+++ b/examples/declarative/imageelements/borderimage/borderimage.qml
@@ -0,0 +1,57 @@
+import Qt 4.7
+import "content"
+
+Rectangle {
+ id: page
+ width: 1030; height: 540
+
+ Grid {
+ anchors.centerIn: parent; spacing: 20
+
+ MyBorderImage {
+ minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ }
+
+ MyBorderImage {
+ minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
+ }
+
+ MyBorderImage {
+ minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
+ }
+
+ MyBorderImage {
+ minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
+ }
+
+ MyBorderImage {
+ minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ }
+
+ MyBorderImage {
+ minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
+ }
+
+ MyBorderImage {
+ minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
+ }
+
+ MyBorderImage {
+ minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
+ }
+ }
+}
diff --git a/examples/declarative/proxywidgets/proxywidgets.qmlproject b/examples/declarative/imageelements/borderimage/borderimage.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/proxywidgets/proxywidgets.qmlproject
+++ b/examples/declarative/imageelements/borderimage/borderimage.qmlproject
diff --git a/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml b/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml
new file mode 100644
index 0000000..b47df7b
--- /dev/null
+++ b/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml
@@ -0,0 +1,50 @@
+import Qt 4.7
+
+Item {
+ id: container
+
+ property alias horizontalMode: image.horizontalTileMode
+ property alias verticalMode: image.verticalTileMode
+ property alias source: image.source
+
+ property int minWidth
+ property int minHeight
+ property int maxWidth
+ property int maxHeight
+ property int margin
+
+ width: 240; height: 240
+
+ BorderImage {
+ id: image; anchors.centerIn: parent
+
+ SequentialAnimation on width {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: container.minWidth; to: container.maxWidth
+ duration: 2000; easing.type: Easing.InOutQuad
+ }
+ NumberAnimation {
+ from: container.maxWidth; to: container.minWidth
+ duration: 2000; easing.type: Easing.InOutQuad
+ }
+ }
+
+ SequentialAnimation on height {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: container.minHeight; to: container.maxHeight
+ duration: 2000; easing.type: Easing.InOutQuad
+ }
+ NumberAnimation {
+ from: container.maxHeight; to: container.minHeight
+ duration: 2000; easing.type: Easing.InOutQuad
+ }
+ }
+
+ border.top: container.margin
+ border.left: container.margin
+ border.bottom: container.margin
+ border.right: container.margin
+ }
+}
diff --git a/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml b/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml
new file mode 100644
index 0000000..629478b
--- /dev/null
+++ b/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml
@@ -0,0 +1,14 @@
+import Qt 4.7
+
+Item {
+ property alias color : rectangle.color
+
+ BorderImage {
+ anchors.fill: rectangle
+ anchors { leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 }
+ border { left: 10; top: 10; right: 10; bottom: 10 }
+ source: "shadow.png"; smooth: true
+ }
+
+ Rectangle { id: rectangle; anchors.fill: parent }
+}
diff --git a/examples/declarative/border-image/content/bw.png b/examples/declarative/imageelements/borderimage/content/bw.png
index 486eaae..486eaae 100644
--- a/examples/declarative/border-image/content/bw.png
+++ b/examples/declarative/imageelements/borderimage/content/bw.png
Binary files differ
diff --git a/examples/declarative/border-image/content/colors-round.sci b/examples/declarative/imageelements/borderimage/content/colors-round.sci
index 506f6f5..506f6f5 100644
--- a/examples/declarative/border-image/content/colors-round.sci
+++ b/examples/declarative/imageelements/borderimage/content/colors-round.sci
diff --git a/examples/declarative/border-image/content/colors-stretch.sci b/examples/declarative/imageelements/borderimage/content/colors-stretch.sci
index e4989a7..e4989a7 100644
--- a/examples/declarative/border-image/content/colors-stretch.sci
+++ b/examples/declarative/imageelements/borderimage/content/colors-stretch.sci
diff --git a/examples/declarative/border-image/content/colors.png b/examples/declarative/imageelements/borderimage/content/colors.png
index dfb62f3..dfb62f3 100644
--- a/examples/declarative/border-image/content/colors.png
+++ b/examples/declarative/imageelements/borderimage/content/colors.png
Binary files differ
diff --git a/examples/declarative/imageelements/borderimage/content/shadow.png b/examples/declarative/imageelements/borderimage/content/shadow.png
new file mode 100644
index 0000000..431af85
--- /dev/null
+++ b/examples/declarative/imageelements/borderimage/content/shadow.png
Binary files differ
diff --git a/examples/declarative/imageelements/borderimage/shadows.qml b/examples/declarative/imageelements/borderimage/shadows.qml
new file mode 100644
index 0000000..a08d133
--- /dev/null
+++ b/examples/declarative/imageelements/borderimage/shadows.qml
@@ -0,0 +1,24 @@
+import Qt 4.7
+import "content"
+
+Rectangle {
+ id: window
+
+ width: 480; height: 320
+ color: "gray"
+
+ ShadowRectangle {
+ anchors.centerIn: parent; width: 250; height: 250
+ color: "lightsteelblue"
+ }
+
+ ShadowRectangle {
+ anchors.centerIn: parent; width: 200; height: 200
+ color: "steelblue"
+ }
+
+ ShadowRectangle {
+ anchors.centerIn: parent; width: 150; height: 150
+ color: "thistle"
+ }
+}
diff --git a/examples/declarative/progressbar/progressbar.qmlproject b/examples/declarative/imageelements/imageelements.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/progressbar/progressbar.qmlproject
+++ b/examples/declarative/imageelements/imageelements.qmlproject
diff --git a/examples/declarative/images/content/lemonade.jpg b/examples/declarative/images/content/lemonade.jpg
deleted file mode 100644
index db445c9..0000000
--- a/examples/declarative/images/content/lemonade.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/images/images.qml b/examples/declarative/images/images.qml
deleted file mode 100644
index e48ad50..0000000
--- a/examples/declarative/images/images.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- color: "white"
- width: grid.width + 50
- height: grid.height + 50
-
- Grid {
- id: grid
- x: 25; y: 25
- columns: 3
-
- Image {
- source: "content/lemonade.jpg"
- }
-
- Image {
- sourceSize.width: 50
- sourceSize.height: 50
- source: "content/lemonade.jpg"
- }
-
- Image {
- sourceSize.width: 50
- sourceSize.height: 50
- smooth: true
- source: "content/lemonade.jpg"
- }
-
- Image {
- scale: 1/3
- source: "content/lemonade.jpg"
- }
-
- Image {
- scale: 1/3
- sourceSize.width: 50
- sourceSize.height: 50
- source: "content/lemonade.jpg"
- }
-
- Image {
- scale: 1/3
- sourceSize.width: 50
- sourceSize.height: 50
- smooth: true
- source: "content/lemonade.jpg"
- }
-
- Image {
- width: 50; height: 50
- transform: Translate { x: 50 }
- source: "content/lemonade.jpg"
- }
-
- Image {
- width: 50; height: 50
- transform: Translate { x: 50 }
- sourceSize.width: 50
- sourceSize.height: 50
- source: "content/lemonade.jpg"
- }
-
- Image {
- width: 50; height: 50
- transform: Translate { x: 50 }
- sourceSize: "50x50" // syntactic sugar
- smooth: true
- source: "content/lemonade.jpg"
- }
- }
-}
diff --git a/examples/declarative/focus/Core/ContextMenu.qml b/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml
index 49a54bc..49a54bc 100644
--- a/examples/declarative/focus/Core/ContextMenu.qml
+++ b/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml
diff --git a/examples/declarative/focus/Core/GridMenu.qml b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
index 3f727fd..3f727fd 100644
--- a/examples/declarative/focus/Core/GridMenu.qml
+++ b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
diff --git a/examples/declarative/focus/Core/ListViewDelegate.qml b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
index 14e2548..14e2548 100644
--- a/examples/declarative/focus/Core/ListViewDelegate.qml
+++ b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
diff --git a/examples/declarative/keyinteraction/focus/Core/ListViews.qml b/examples/declarative/keyinteraction/focus/Core/ListViews.qml
new file mode 100644
index 0000000..32a5d4c
--- /dev/null
+++ b/examples/declarative/keyinteraction/focus/Core/ListViews.qml
@@ -0,0 +1,62 @@
+import Qt 4.7
+
+FocusScope {
+ clip: true
+
+ onWantsFocusChanged: if (wantsFocus) mainView.state = "showListViews"
+
+ ListView {
+ id: list1
+ y: wantsFocus ? 10 : 40; width: parent.width / 3; height: parent.height - 20
+ focus: true
+ KeyNavigation.up: gridMenu; KeyNavigation.left: contextMenu; KeyNavigation.right: list2
+ model: 10; cacheBuffer: 200
+ delegate: ListViewDelegate {}
+
+ Behavior on y {
+ NumberAnimation { duration: 600; easing.type: Easing.OutQuint }
+ }
+ }
+
+ ListView {
+ id: list2
+ y: wantsFocus ? 10 : 40; x: parent.width / 3; width: parent.width / 3; height: parent.height - 20
+ KeyNavigation.up: gridMenu; KeyNavigation.left: list1; KeyNavigation.right: list3
+ model: 10; cacheBuffer: 200
+ delegate: ListViewDelegate {}
+
+ Behavior on y {
+ NumberAnimation { duration: 600; easing.type: Easing.OutQuint }
+ }
+ }
+
+ ListView {
+ id: list3
+ y: wantsFocus ? 10 : 40; x: 2 * parent.width / 3; width: parent.width / 3; height: parent.height - 20
+ KeyNavigation.up: gridMenu; KeyNavigation.left: list2
+ model: 10; cacheBuffer: 200
+ delegate: ListViewDelegate {}
+
+ Behavior on y {
+ NumberAnimation { duration: 600; easing.type: Easing.OutQuint }
+ }
+ }
+
+ Rectangle { width: parent.width; height: 1; color: "#D1DBBD" }
+
+ Rectangle {
+ y: 1; width: parent.width; height: 10
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#3E606F" }
+ GradientStop { position: 1.0; color: "transparent" }
+ }
+ }
+
+ Rectangle {
+ y: parent.height - 10; width: parent.width; height: 10
+ gradient: Gradient {
+ GradientStop { position: 1.0; color: "#3E606F" }
+ GradientStop { position: 0.0; color: "transparent" }
+ }
+ }
+}
diff --git a/examples/declarative/focus/Core/images/arrow.png b/examples/declarative/keyinteraction/focus/Core/images/arrow.png
index 14978c2..14978c2 100644
--- a/examples/declarative/focus/Core/images/arrow.png
+++ b/examples/declarative/keyinteraction/focus/Core/images/arrow.png
Binary files differ
diff --git a/examples/declarative/focus/Core/images/qt-logo.png b/examples/declarative/keyinteraction/focus/Core/images/qt-logo.png
index 14ddf2a..14ddf2a 100644
--- a/examples/declarative/focus/Core/images/qt-logo.png
+++ b/examples/declarative/keyinteraction/focus/Core/images/qt-logo.png
Binary files differ
diff --git a/examples/declarative/focus/Core/qmldir b/examples/declarative/keyinteraction/focus/Core/qmldir
index e25d63c..e25d63c 100644
--- a/examples/declarative/focus/Core/qmldir
+++ b/examples/declarative/keyinteraction/focus/Core/qmldir
diff --git a/examples/declarative/keyinteraction/focus/focus.qml b/examples/declarative/keyinteraction/focus/focus.qml
new file mode 100644
index 0000000..8c992ae
--- /dev/null
+++ b/examples/declarative/keyinteraction/focus/focus.qml
@@ -0,0 +1,69 @@
+import Qt 4.7
+import "Core"
+
+Rectangle {
+ id: window
+
+ width: 800; height: 480
+ color: "#3E606F"
+
+ FocusScope {
+ id: mainView
+
+ width: parent.width; height: parent.height
+ focus: true
+
+ GridMenu {
+ id: gridMenu
+
+ width: parent.width; height: 320
+ focus: true
+ interactive: parent.wantsFocus
+ }
+
+ ListViews {
+ id: listViews
+ y: 320; width: parent.width; height: 320
+ }
+
+ Rectangle {
+ id: shade
+ color: "black"; opacity: 0; anchors.fill: parent
+ }
+
+ states: State {
+ name: "showListViews"
+ PropertyChanges { target: gridMenu; y: -160 }
+ PropertyChanges { target: listViews; y: 160 }
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "y"; duration: 600; easing.type: Easing.OutQuint }
+ }
+ }
+
+ Image {
+ source: "Core/images/arrow.png"
+ rotation: 90
+ anchors.verticalCenter: parent.verticalCenter
+
+ MouseArea {
+ anchors { fill: parent; leftMargin: -10; topMargin: -10; rightMargin: -10; bottomMargin: -10 }
+ onClicked: window.state = "contextMenuOpen"
+ }
+ }
+
+ ContextMenu { id: contextMenu; x: -265; width: 260; height: parent.height }
+
+ states: State {
+ name: "contextMenuOpen"
+ when: !mainView.wantsFocus
+ PropertyChanges { target: contextMenu; x: 0; open: true }
+ PropertyChanges { target: mainView; x: 130 }
+ PropertyChanges { target: shade; opacity: 0.25 }
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "x,opacity"; duration: 600; easing.type: Easing.OutQuint }
+ }
+}
diff --git a/examples/declarative/focus/focus.qmlproject b/examples/declarative/keyinteraction/focus/focus.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/focus/focus.qmlproject
+++ b/examples/declarative/keyinteraction/focus/focus.qmlproject
diff --git a/examples/declarative/parallax/parallax.qmlproject b/examples/declarative/keyinteraction/keyinteraction.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/parallax/parallax.qmlproject
+++ b/examples/declarative/keyinteraction/keyinteraction.qmlproject
diff --git a/examples/declarative/layouts/Button.qml b/examples/declarative/layouts/Button.qml
deleted file mode 100644
index 0f08893..0000000
--- a/examples/declarative/layouts/Button.qml
+++ /dev/null
@@ -1,22 +0,0 @@
-import Qt 4.7
-
-Rectangle { border.color: "black"; color: "steelblue"; radius: 5; width: pix.width + textelement.width + 13; height: pix.height + 10; id: page
- property string text
- property string icon
- signal clicked
-
- Image { id: pix; x: 5; y:5; source: parent.icon}
- Text { id: textelement; text: page.text; color: "white"; x:pix.width+pix.x+3; anchors.verticalCenter: pix.verticalCenter;}
- MouseArea{ id:mr; anchors.fill: parent; onClicked: {parent.focus = true; page.clicked()}}
-
- states:
- State{ name:"pressed"; when:mr.pressed
- PropertyChanges {target:textelement; x: 5}
- PropertyChanges {target:pix; x:textelement.x+textelement.width + 3}
- }
-
- transitions:
- Transition{
- NumberAnimation { properties:"x,left"; easing.type:"InOutQuad"; duration:200 }
- }
-}
diff --git a/examples/declarative/layouts/layouts.qml b/examples/declarative/layouts/layouts.qml
deleted file mode 100644
index 391eab7..0000000
--- a/examples/declarative/layouts/layouts.qml
+++ /dev/null
@@ -1,29 +0,0 @@
-import Qt 4.7
-import Qt.widgets 4.7
-
-Item {
- id: resizable
-
- width: 400
- height: 400
-
- QGraphicsWidget {
- size.width: parent.width
- size.height: parent.height
-
- layout: QGraphicsLinearLayout {
- LayoutItem {
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { color: "yellow"; anchors.fill: parent }
- }
- LayoutItem {
- minimumSize: "100x100"
- maximumSize: "400x400"
- preferredSize: "200x200"
- Rectangle { color: "green"; anchors.fill: parent }
- }
- }
- }
-}
diff --git a/examples/declarative/layouts/positioners.qml b/examples/declarative/layouts/positioners.qml
deleted file mode 100644
index 3703b59..0000000
--- a/examples/declarative/layouts/positioners.qml
+++ /dev/null
@@ -1,213 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- id: page
- width: 420; height: 420
-
- Column {
- id: layout1
- y: 0
- move: Transition {
- NumberAnimation { properties: "y"; easing.type: "OutBounce" }
- }
- add: Transition {
- NumberAnimation { properties: "y"; easing.type: "OutQuad" }
- }
-
- Rectangle { color: "red"; width: 100; height: 50; border.color: "black"; radius: 15 }
-
- Rectangle {
- id: blueV1
- width: 100; height: 50
- color: "lightsteelblue"
- border.color: "black"
- radius: 15
- Behavior on opacity { NumberAnimation {} }
- }
-
- Rectangle { color: "green"; width: 100; height: 50; border.color: "black"; radius: 15 }
-
- Rectangle {
- id: blueV2
- width: 100; height: 50
- color: "lightsteelblue"
- border.color: "black"
- radius: 15
- Behavior on opacity { NumberAnimation {} }
- }
-
- Rectangle { color: "orange"; width: 100; height: 50; border.color: "black"; radius: 15 }
- }
-
- Row {
- id: layout2
- y: 300
- move: Transition {
- NumberAnimation { properties: "x"; easing.type: "OutBounce" }
- }
- add: Transition {
- NumberAnimation { properties: "x"; easing.type: "OutQuad" }
- }
-
- Rectangle { color: "red"; width: 50; height: 100; border.color: "black"; radius: 15 }
-
- Rectangle {
- id: blueH1
- width: 50; height: 100
- color: "lightsteelblue"
- border.color: "black"
- radius: 15
- Behavior on opacity { NumberAnimation {} }
- }
-
- Rectangle { color: "green"; width: 50; height: 100; border.color: "black"; radius: 15 }
-
- Rectangle {
- id: blueH2
- width: 50; height: 100
- color: "lightsteelblue"
- border.color: "black"
- radius: 15
- Behavior on opacity { NumberAnimation {} }
- }
-
- Rectangle { color: "orange"; width: 50; height: 100; border.color: "black"; radius: 15 }
- }
-
- Button {
- x: 135; y: 90
- text: "Remove"
- icon: "del.png"
-
- onClicked: {
- blueH2.opacity = 0
- blueH1.opacity = 0
- blueV1.opacity = 0
- blueV2.opacity = 0
- blueG1.opacity = 0
- blueG2.opacity = 0
- blueG3.opacity = 0
- blueF1.opacity = 0
- blueF2.opacity = 0
- blueF3.opacity = 0
- }
- }
-
- Button {
- x: 145; y: 140
- text: "Add"
- icon: "add.png"
-
- onClicked: {
- blueH2.opacity = 1
- blueH1.opacity = 1
- blueV1.opacity = 1
- blueV2.opacity = 1
- blueG1.opacity = 1
- blueG2.opacity = 1
- blueG3.opacity = 1
- blueF1.opacity = 1
- blueF2.opacity = 1
- blueF3.opacity = 1
- }
- }
-
- Grid {
- x: 260; y: 0
- columns: 3
-
- move: Transition {
- NumberAnimation { properties: "x,y"; easing.type: "OutBounce" }
- }
-
- add: Transition {
- NumberAnimation { properties: "x,y"; easing.type: "OutBounce" }
- }
-
- Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 }
-
- Rectangle {
- id: blueG1
- width: 50; height: 50
- color: "lightsteelblue"
- border.color: "black"
- radius: 15
- Behavior on opacity { NumberAnimation {} }
- }
-
- Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 }
-
- Rectangle {
- id: blueG2
- width: 50; height: 50
- color: "lightsteelblue"
- border.color: "black"
- radius: 15
- Behavior on opacity { NumberAnimation {} }
- }
-
- Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 }
-
- Rectangle {
- id: blueG3
- width: 50; height: 50
- color: "lightsteelblue"
- border.color: "black"
- radius: 15
- Behavior on opacity { NumberAnimation {} }
- }
-
- Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 }
- Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 }
- Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 }
- }
-
- Flow {
- id: layout4
- x: 260; y: 250; width: 150
-
- move: Transition {
- NumberAnimation { properties: "x,y"; easing.type: "OutBounce" }
- }
-
- add: Transition {
- NumberAnimation { properties: "x,y"; easing.type: "OutBounce" }
- }
-
- Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 }
-
- Rectangle {
- id: blueF1
- width: 60; height: 50
- color: "lightsteelblue"
- border.color: "black"
- radius: 15
- Behavior on opacity { NumberAnimation {} }
- }
-
- Rectangle { color: "green"; width: 30; height: 50; border.color: "black"; radius: 15 }
-
- Rectangle {
- id: blueF2
- width: 60; height: 50
- color: "lightsteelblue"
- border.color: "black"
- radius: 15
- Behavior on opacity { NumberAnimation {} }
- }
-
- Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 }
-
- Rectangle {
- id: blueF3
- width: 40; height: 50
- color: "lightsteelblue"
- border.color: "black"
- radius: 15
- Behavior on opacity { NumberAnimation {} }
- }
-
- Rectangle { color: "red"; width: 80; height: 50; border.color: "black"; radius: 15 }
- }
-
-}
diff --git a/examples/declarative/listview/dynamic.qml b/examples/declarative/listview/dynamic.qml
deleted file mode 100644
index 236a9c5..0000000
--- a/examples/declarative/listview/dynamic.qml
+++ /dev/null
@@ -1,210 +0,0 @@
-import Qt 4.7
-import "content"
-import "../scrollbar"
-
-Rectangle {
- id: container
- width: 640; height: 480
- color: "#343434"
-
- ListModel {
- id: fruitModel
-
- ListElement {
- name: "Apple"; cost: 2.45
- attributes: [
- ListElement { description: "Core" },
- ListElement { description: "Deciduous" }
- ]
- }
- ListElement {
- name: "Banana"; cost: 1.95
- attributes: [
- ListElement { description: "Tropical" },
- ListElement { description: "Seedless" }
- ]
- }
- ListElement {
- name: "Cumquat"; cost: 3.25
- attributes: [
- ListElement { description: "Citrus" }
- ]
- }
- ListElement {
- name: "Durian"; cost: 9.95
- attributes: [
- ListElement { description: "Tropical" },
- ListElement { description: "Smelly" }
- ]
- }
- ListElement {
- name: "Elderberry"; cost: 0.05
- attributes: [
- ListElement { description: "Berry" }
- ]
- }
- ListElement {
- name: "Fig"; cost: 0.25
- attributes: [
- ListElement { description: "Flower" }
- ]
- }
- }
-
- Component {
- id: fruitDelegate
-
- Item {
- width: container.width; height: 55
-
- Column {
- id: moveButtons
- x: 5; width: childrenRect.width; anchors.verticalCenter: parent.verticalCenter
-
- Image {
- source: "content/pics/go-up.png"
- MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index-1,1) }
- }
- Image { source: "content/pics/go-down.png"
- MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index+1,1) }
- }
- }
-
- Column {
- anchors { right: itemButtons.left; verticalCenter: parent.verticalCenter; left: moveButtons.right; leftMargin: 10 }
-
- Text {
- id: label
- width: parent.width
- color: "White"
- font.bold: true; font.pixelSize: 15
- text: name; elide: Text.ElideRight
- }
- Row {
- spacing: 5
- Repeater {
- model: attributes
- Component {
- Text { text: description; color: "White" }
- }
- }
- }
- }
-
- Row {
- id: itemButtons
-
- anchors { right: removeButton.left; rightMargin: 35; verticalCenter: parent.verticalCenter }
- width: childrenRect.width
- spacing: 10
-
- Image {
- source: "content/pics/list-add.png"
- scale: clickUp.isPressed ? 0.9 : 1
- transformOrigin: Item.Center
-
- ClickAutoRepeating {
- id: clickUp
- anchors.fill: parent
- onClicked: fruitModel.setProperty(index, "cost", cost+0.25)
- }
- }
-
- Text { id: costText; text: '$'+Number(cost).toFixed(2); font.pixelSize: 15; color: "White"; font.bold: true; }
-
- Image {
- source: "content/pics/list-remove.png"
- scale: clickDown.isPressed ? 0.9 : 1
- transformOrigin: Item.Center
-
- ClickAutoRepeating {
- id: clickDown
- anchors.fill: parent
- onClicked: fruitModel.setProperty(index, "cost", Math.max(0,cost-0.25))
- }
- }
- }
- Image {
- id: removeButton
- anchors { verticalCenter: parent.verticalCenter; right: parent.right; rightMargin: 10 }
- source: "content/pics/archive-remove.png"
-
- MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) }
- }
- }
- }
-
- ListView {
- id: view
- anchors { top: parent.top; left: parent.left; right: parent.right; bottom: buttons.top }
- model: fruitModel
- delegate: fruitDelegate
- }
-
- // Attach scrollbar to the right edge of the view.
- ScrollBar {
- id: verticalScrollBar
-
- width: 8; height: view.height; anchors.right: view.right
- opacity: 0
- orientation: "Vertical"
- position: view.visibleArea.yPosition
- pageSize: view.visibleArea.heightRatio
-
- // Only show the scrollbar when the view is moving.
- states: State {
- name: "ShowBars"; when: view.moving
- PropertyChanges { target: verticalScrollBar; opacity: 1 }
- }
- transitions: Transition {
- NumberAnimation { properties: "opacity"; duration: 400 }
- }
- }
-
- Row {
- id: buttons
-
- x: 8; width: childrenRect.width; height: childrenRect.height
- anchors { bottom: parent.bottom; bottomMargin: 8 }
- spacing: 8
-
- Image {
- source: "content/pics/archive-insert.png"
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- fruitModel.append({
- "name": "Pizza Margarita",
- "cost": 5.95,
- "attributes": [{"description": "Cheese"},{"description": "Tomato"}]
- })
- }
- }
- }
-
- Image {
- source: "content/pics/archive-insert.png"
-
- MouseArea {
- anchors.fill: parent;
- onClicked: {
- fruitModel.insert(0, {
- "name": "Pizza Supreme",
- "cost": 9.95,
- "attributes": [{"description": "Cheese"},{"description": "Tomato"},{"description": "The Works"}]
- })
- }
- }
- }
-
- Image {
- source: "content/pics/archive-remove.png"
-
- MouseArea {
- anchors.fill: parent
- onClicked: fruitModel.clear()
- }
- }
- }
-}
diff --git a/examples/declarative/listview/highlight.qml b/examples/declarative/listview/highlight.qml
deleted file mode 100644
index 50ba2f7..0000000
--- a/examples/declarative/listview/highlight.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- width: 400; height: 300
-
- // MyPets model is defined in dummydata/MyPetsModel.qml
- // The viewer automatically loads files in dummydata/* to assist
- // development without a real data source.
- // This one contains my pets.
-
- // Define a delegate component. A component will be
- // instantiated for each visible item in the list.
- Component {
- id: petDelegate
- Item {
- id: wrapper
- width: 200; height: 50
- Column {
- Text { text: 'Name: ' + name }
- Text { text: 'Type: ' + type }
- Text { text: 'Age: ' + age }
- }
- // Use the ListView.isCurrentItem attached property to
- // indent the item if it is the current item.
- states: State {
- name: "Current"
- when: wrapper.ListView.isCurrentItem
- PropertyChanges { target: wrapper; x: 10 }
- }
- transitions: Transition {
- NumberAnimation { properties: "x"; duration: 200 }
- }
- }
- }
- // Specify a highlight with custom movement. Note that highlightFollowsCurrentItem
- // is set to false in the ListView so that we can control how the
- // highlight moves to the current item.
- Component {
- id: petHighlight
- Rectangle {
- width: 200; height: 50
- color: "#FFFF88"
- SpringFollow on y { to: list1.currentItem.y; spring: 3; damping: 0.1 }
- }
- }
-
- ListView {
- id: list1
- width: 200; height: parent.height
- model: MyPetsModel
- delegate: petDelegate
- highlight: petHighlight; highlightFollowsCurrentItem: false
- focus: true
- }
-}
diff --git a/examples/declarative/listview/itemlist.qml b/examples/declarative/listview/itemlist.qml
deleted file mode 100644
index e387f28..0000000
--- a/examples/declarative/listview/itemlist.qml
+++ /dev/null
@@ -1,67 +0,0 @@
-// This example demonstrates placing items in a view using
-// a VisualItemModel
-
-import Qt 4.7
-
-Rectangle {
- color: "lightgray"
- width: 240
- height: 320
-
- VisualItemModel {
- id: itemModel
-
- Rectangle {
- width: view.width; height: view.height
- color: "#FFFEF0"
- Text { text: "Page 1"; font.bold: true; anchors.centerIn: parent }
- }
- Rectangle {
- width: view.width; height: view.height
- color: "#F0FFF7"
- Text { text: "Page 2"; font.bold: true; anchors.centerIn: parent }
- }
- Rectangle {
- width: view.width; height: view.height
- color: "#F4F0FF"
- Text { text: "Page 3"; font.bold: true; anchors.centerIn: parent }
- }
- }
-
- ListView {
- id: view
- anchors { fill: parent; bottomMargin: 30 }
- model: itemModel
- preferredHighlightBegin: 0; preferredHighlightEnd: 0
- highlightRangeMode: "StrictlyEnforceRange"
- orientation: ListView.Horizontal
- snapMode: ListView.SnapOneItem; flickDeceleration: 2000
- }
-
- Rectangle {
- width: 240; height: 30
- anchors { top: view.bottom; bottom: parent.bottom }
- color: "gray"
-
- Row {
- anchors.centerIn: parent
- spacing: 20
-
- Repeater {
- model: itemModel.count
-
- Rectangle {
- width: 5; height: 5
- radius: 3
- color: view.currentIndex == index ? "blue" : "white"
-
- MouseArea {
- width: 20; height: 20
- anchors.centerIn: parent
- onClicked: view.currentIndex = index
- }
- }
- }
- }
- }
-}
diff --git a/examples/declarative/listview/listview-example.qml b/examples/declarative/listview/listview-example.qml
deleted file mode 100644
index 6feedf6..0000000
--- a/examples/declarative/listview/listview-example.qml
+++ /dev/null
@@ -1,93 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- width: 600; height: 300
-
- // MyPets model is defined in dummydata/MyPetsModel.qml
- // The viewer automatically loads files in dummydata/* to assist
- // development without a real data source.
- // This one contains my pets.
-
- // Define a delegate component. A component will be
- // instantiated for each visible item in the list.
- Component {
- id: petDelegate
- Item {
- width: 200; height: 50
- Column {
- Text { text: 'Name: ' + name }
- Text { text: 'Type: ' + type }
- Text { text: 'Age: ' + age }
- }
- }
- }
-
- // Define a highlight component. Just one of these will be instantiated
- // by each ListView and placed behind the current item.
- Component {
- id: petHighlight
- Rectangle { color: "#FFFF88" }
- }
-
- // Show the model in three lists, with different highlight ranges.
- // preferredHighlightBegin and preferredHighlightEnd set the
- // range in which to attempt to maintain the highlight.
- //
- // Note that the second and third ListView
- // set their currentIndex to be the same as the first, and that
- // the first ListView is given keyboard focus.
- //
- // The default mode allows the currentItem to move freely
- // within the visible area. If it would move outside the visible
- // area, the view is scrolled to keep it visible.
- //
- // The second list sets a highlight range which attempts to keep the
- // current item within the the bounds of the range, however
- // items will not scroll beyond the beginning or end of the view,
- // forcing the highlight to move outside the range at the ends.
- //
- // The third list sets the highlightRangeMode to StrictlyEnforceRange
- // and sets a range smaller than the height of an item. This
- // forces the current item to change when the view is flicked,
- // since the highlight is unable to move.
- //
- // Note that the first ListView sets its currentIndex to be equal to
- // the third ListView's currentIndex. By flicking List3 with
- // the mouse, the current index of List1 will be changed.
-
- ListView {
- id: list1
- width: 200; height: parent.height
- model: MyPetsModel
- delegate: petDelegate
-
- highlight: petHighlight
- currentIndex: list3.currentIndex
- focus: true
- }
-
- ListView {
- id: list2
- x: 200; width: 200; height: parent.height
- model: MyPetsModel
- delegate: petDelegate
-
- highlight: petHighlight
- currentIndex: list1.currentIndex
- preferredHighlightBegin: 80; preferredHighlightEnd: 220
- highlightRangeMode: "ApplyRange"
- }
-
- ListView {
- id: list3
- x: 400; width: 200; height: parent.height
- model: MyPetsModel
- delegate: petDelegate
-
- highlight: Rectangle { color: "lightsteelblue" }
- currentIndex: list1.currentIndex
- preferredHighlightBegin: 125; preferredHighlightEnd: 125
- highlightRangeMode: "StrictlyEnforceRange"
- flickDeceleration: 1000
- }
-}
diff --git a/examples/declarative/listview/sections.qml b/examples/declarative/listview/sections.qml
deleted file mode 100644
index 0a81f63..0000000
--- a/examples/declarative/listview/sections.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-import Qt 4.7
-
-//! [0]
-Rectangle {
- width: 200
- height: 240
-
- // MyPets model is defined in dummydata/MyPetsModel.qml
- // The viewer automatically loads files in dummydata/* to assist
- // development without a real data source.
- // This one contains my pets.
-
- // Define a delegate component that includes a separator for sections.
- Component {
- id: petDelegate
-
- Item {
- id: wrapper
- width: 200
- height: desc.height // height is the combined height of the description and the section separator
-
- Item {
- id: desc
- x: 5; height: layout.height + 4
-
- Column {
- id: layout
- y: 2
- Text { text: 'Name: ' + name }
- Text { text: 'Type: ' + type }
- Text { text: 'Age: ' + age }
- }
- }
- }
- }
-
- // Define a highlight component. Just one of these will be instantiated
- // by each ListView and placed behind the current item.
- Component {
- id: petHighlight
- Rectangle { color: "#FFFF88" }
- }
-
- // The list
- ListView {
- id: myList
-
- width: 200; height: parent.height
- model: MyPetsModel
- delegate: petDelegate
- highlight: petHighlight
- focus: true
-
- // The sectionExpression is simply the size of the pet.
- // We use this to determine which section we are in above.
- section.property: "size"
- section.criteria: ViewSection.FullString
- section.delegate: Rectangle {
- color: "lightsteelblue"
- width: 200
- height: 20
- Text {
- x: 2; height: parent.height
- verticalAlignment: 'AlignVCenter'
- text: section
- font.bold: true
- }
- }
- }
-}
-//! [0]
diff --git a/examples/declarative/gridview/gridview-example.qml b/examples/declarative/modelviews/gridview/gridview-example.qml
index a5f41fb..a5f41fb 100644
--- a/examples/declarative/gridview/gridview-example.qml
+++ b/examples/declarative/modelviews/gridview/gridview-example.qml
diff --git a/examples/declarative/gridview/gridview.qmlproject b/examples/declarative/modelviews/gridview/gridview.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/gridview/gridview.qmlproject
+++ b/examples/declarative/modelviews/gridview/gridview.qmlproject
diff --git a/examples/declarative/gridview/pics/AddressBook_48.png b/examples/declarative/modelviews/gridview/pics/AddressBook_48.png
index 1ab7c8e..1ab7c8e 100644
--- a/examples/declarative/gridview/pics/AddressBook_48.png
+++ b/examples/declarative/modelviews/gridview/pics/AddressBook_48.png
Binary files differ
diff --git a/examples/declarative/gridview/pics/AudioPlayer_48.png b/examples/declarative/modelviews/gridview/pics/AudioPlayer_48.png
index f4b8689..f4b8689 100644
--- a/examples/declarative/gridview/pics/AudioPlayer_48.png
+++ b/examples/declarative/modelviews/gridview/pics/AudioPlayer_48.png
Binary files differ
diff --git a/examples/declarative/gridview/pics/Camera_48.png b/examples/declarative/modelviews/gridview/pics/Camera_48.png
index c76b524..c76b524 100644
--- a/examples/declarative/gridview/pics/Camera_48.png
+++ b/examples/declarative/modelviews/gridview/pics/Camera_48.png
Binary files differ
diff --git a/examples/declarative/gridview/pics/DateBook_48.png b/examples/declarative/modelviews/gridview/pics/DateBook_48.png
index 58f5787..58f5787 100644
--- a/examples/declarative/gridview/pics/DateBook_48.png
+++ b/examples/declarative/modelviews/gridview/pics/DateBook_48.png
Binary files differ
diff --git a/examples/declarative/gridview/pics/EMail_48.png b/examples/declarative/modelviews/gridview/pics/EMail_48.png
index d6d84a6..d6d84a6 100644
--- a/examples/declarative/gridview/pics/EMail_48.png
+++ b/examples/declarative/modelviews/gridview/pics/EMail_48.png
Binary files differ
diff --git a/examples/declarative/gridview/pics/TodoList_48.png b/examples/declarative/modelviews/gridview/pics/TodoList_48.png
index 0988448..0988448 100644
--- a/examples/declarative/gridview/pics/TodoList_48.png
+++ b/examples/declarative/modelviews/gridview/pics/TodoList_48.png
Binary files differ
diff --git a/examples/declarative/gridview/pics/VideoPlayer_48.png b/examples/declarative/modelviews/gridview/pics/VideoPlayer_48.png
index 52638c5..52638c5 100644
--- a/examples/declarative/gridview/pics/VideoPlayer_48.png
+++ b/examples/declarative/modelviews/gridview/pics/VideoPlayer_48.png
Binary files differ
diff --git a/examples/declarative/listview/content/ClickAutoRepeating.qml b/examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml
index f65c2b3..f65c2b3 100644
--- a/examples/declarative/listview/content/ClickAutoRepeating.qml
+++ b/examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml
diff --git a/examples/declarative/listview/content/MediaButton.qml b/examples/declarative/modelviews/listview/content/MediaButton.qml
index a625b4c..a625b4c 100644
--- a/examples/declarative/listview/content/MediaButton.qml
+++ b/examples/declarative/modelviews/listview/content/MediaButton.qml
diff --git a/examples/declarative/listview/content/pics/add.png b/examples/declarative/modelviews/listview/content/pics/add.png
index f29d84b..f29d84b 100644
--- a/examples/declarative/listview/content/pics/add.png
+++ b/examples/declarative/modelviews/listview/content/pics/add.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/archive-insert.png b/examples/declarative/modelviews/listview/content/pics/archive-insert.png
index b706248..b706248 100644
--- a/examples/declarative/listview/content/pics/archive-insert.png
+++ b/examples/declarative/modelviews/listview/content/pics/archive-insert.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/archive-remove.png b/examples/declarative/modelviews/listview/content/pics/archive-remove.png
index 9640f6b..9640f6b 100644
--- a/examples/declarative/listview/content/pics/archive-remove.png
+++ b/examples/declarative/modelviews/listview/content/pics/archive-remove.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/button-pressed.png b/examples/declarative/modelviews/listview/content/pics/button-pressed.png
index e434d32..e434d32 100644
--- a/examples/declarative/listview/content/pics/button-pressed.png
+++ b/examples/declarative/modelviews/listview/content/pics/button-pressed.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/button.png b/examples/declarative/modelviews/listview/content/pics/button.png
index 56a63ce..56a63ce 100644
--- a/examples/declarative/listview/content/pics/button.png
+++ b/examples/declarative/modelviews/listview/content/pics/button.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/del.png b/examples/declarative/modelviews/listview/content/pics/del.png
index 1d753a3..1d753a3 100644
--- a/examples/declarative/listview/content/pics/del.png
+++ b/examples/declarative/modelviews/listview/content/pics/del.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/fruit-salad.jpg b/examples/declarative/modelviews/listview/content/pics/fruit-salad.jpg
index da5a6b1..da5a6b1 100644
--- a/examples/declarative/listview/content/pics/fruit-salad.jpg
+++ b/examples/declarative/modelviews/listview/content/pics/fruit-salad.jpg
Binary files differ
diff --git a/examples/declarative/listview/content/pics/go-down.png b/examples/declarative/modelviews/listview/content/pics/go-down.png
index 63331a5..63331a5 100644
--- a/examples/declarative/listview/content/pics/go-down.png
+++ b/examples/declarative/modelviews/listview/content/pics/go-down.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/go-up.png b/examples/declarative/modelviews/listview/content/pics/go-up.png
index 4459024..4459024 100644
--- a/examples/declarative/listview/content/pics/go-up.png
+++ b/examples/declarative/modelviews/listview/content/pics/go-up.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/hamburger.jpg b/examples/declarative/modelviews/listview/content/pics/hamburger.jpg
index d0a15be..d0a15be 100644
--- a/examples/declarative/listview/content/pics/hamburger.jpg
+++ b/examples/declarative/modelviews/listview/content/pics/hamburger.jpg
Binary files differ
diff --git a/examples/declarative/listview/content/pics/lemonade.jpg b/examples/declarative/modelviews/listview/content/pics/lemonade.jpg
index db445c9..db445c9 100644
--- a/examples/declarative/listview/content/pics/lemonade.jpg
+++ b/examples/declarative/modelviews/listview/content/pics/lemonade.jpg
Binary files differ
diff --git a/examples/declarative/listview/content/pics/list-add.png b/examples/declarative/modelviews/listview/content/pics/list-add.png
index e029787..e029787 100644
--- a/examples/declarative/listview/content/pics/list-add.png
+++ b/examples/declarative/modelviews/listview/content/pics/list-add.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/list-remove.png b/examples/declarative/modelviews/listview/content/pics/list-remove.png
index 2bb1a59..2bb1a59 100644
--- a/examples/declarative/listview/content/pics/list-remove.png
+++ b/examples/declarative/modelviews/listview/content/pics/list-remove.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/moreDown.png b/examples/declarative/modelviews/listview/content/pics/moreDown.png
index 31a35d5..31a35d5 100644
--- a/examples/declarative/listview/content/pics/moreDown.png
+++ b/examples/declarative/modelviews/listview/content/pics/moreDown.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/moreUp.png b/examples/declarative/modelviews/listview/content/pics/moreUp.png
index fefb9c9..fefb9c9 100644
--- a/examples/declarative/listview/content/pics/moreUp.png
+++ b/examples/declarative/modelviews/listview/content/pics/moreUp.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/pancakes.jpg b/examples/declarative/modelviews/listview/content/pics/pancakes.jpg
index 60c4396..60c4396 100644
--- a/examples/declarative/listview/content/pics/pancakes.jpg
+++ b/examples/declarative/modelviews/listview/content/pics/pancakes.jpg
Binary files differ
diff --git a/examples/declarative/listview/content/pics/trash.png b/examples/declarative/modelviews/listview/content/pics/trash.png
index 2042595..2042595 100644
--- a/examples/declarative/listview/content/pics/trash.png
+++ b/examples/declarative/modelviews/listview/content/pics/trash.png
Binary files differ
diff --git a/examples/declarative/listview/content/pics/vegetable-soup.jpg b/examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpg
index 9dce332..9dce332 100644
--- a/examples/declarative/listview/content/pics/vegetable-soup.jpg
+++ b/examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpg
Binary files differ
diff --git a/examples/declarative/listview/dummydata/MyPetsModel.qml b/examples/declarative/modelviews/listview/dummydata/MyPetsModel.qml
index f15dda3..f15dda3 100644
--- a/examples/declarative/listview/dummydata/MyPetsModel.qml
+++ b/examples/declarative/modelviews/listview/dummydata/MyPetsModel.qml
diff --git a/examples/declarative/listview/dummydata/Recipes.qml b/examples/declarative/modelviews/listview/dummydata/Recipes.qml
index f707c82..f707c82 100644
--- a/examples/declarative/listview/dummydata/Recipes.qml
+++ b/examples/declarative/modelviews/listview/dummydata/Recipes.qml
diff --git a/examples/declarative/modelviews/listview/dynamic.qml b/examples/declarative/modelviews/listview/dynamic.qml
new file mode 100644
index 0000000..693e88a
--- /dev/null
+++ b/examples/declarative/modelviews/listview/dynamic.qml
@@ -0,0 +1,208 @@
+import Qt 4.7
+import "content"
+import "../../ui-components/scrollbar"
+
+Rectangle {
+ id: container
+ width: 640; height: 480
+ color: "#343434"
+
+ ListModel {
+ id: fruitModel
+
+ ListElement {
+ name: "Apple"; cost: 2.45
+ attributes: [
+ ListElement { description: "Core" },
+ ListElement { description: "Deciduous" }
+ ]
+ }
+ ListElement {
+ name: "Banana"; cost: 1.95
+ attributes: [
+ ListElement { description: "Tropical" },
+ ListElement { description: "Seedless" }
+ ]
+ }
+ ListElement {
+ name: "Cumquat"; cost: 3.25
+ attributes: [
+ ListElement { description: "Citrus" }
+ ]
+ }
+ ListElement {
+ name: "Durian"; cost: 9.95
+ attributes: [
+ ListElement { description: "Tropical" },
+ ListElement { description: "Smelly" }
+ ]
+ }
+ ListElement {
+ name: "Elderberry"; cost: 0.05
+ attributes: [
+ ListElement { description: "Berry" }
+ ]
+ }
+ ListElement {
+ name: "Fig"; cost: 0.25
+ attributes: [
+ ListElement { description: "Flower" }
+ ]
+ }
+ }
+
+ Component {
+ id: fruitDelegate
+
+ Item {
+ width: container.width; height: 55
+
+ Column {
+ id: moveButtons
+ x: 5; width: childrenRect.width; anchors.verticalCenter: parent.verticalCenter
+
+ Image {
+ source: "content/pics/go-up.png"
+ MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index-1,1) }
+ }
+ Image { source: "content/pics/go-down.png"
+ MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index+1,1) }
+ }
+ }
+
+ Column {
+ anchors { right: itemButtons.left; verticalCenter: parent.verticalCenter; left: moveButtons.right; leftMargin: 10 }
+
+ Text {
+ id: label
+ width: parent.width
+ color: "White"
+ font.bold: true; font.pixelSize: 15
+ text: name; elide: Text.ElideRight
+ }
+ Row {
+ spacing: 5
+ Repeater {
+ model: attributes
+ Component {
+ Text { text: description; color: "White" }
+ }
+ }
+ }
+ }
+
+ Row {
+ id: itemButtons
+
+ anchors { right: removeButton.left; rightMargin: 35; verticalCenter: parent.verticalCenter }
+ width: childrenRect.width
+ spacing: 10
+
+ Image {
+ source: "content/pics/list-add.png"
+ scale: clickUp.isPressed ? 0.9 : 1
+
+ ClickAutoRepeating {
+ id: clickUp
+ anchors.fill: parent
+ onClicked: fruitModel.setProperty(index, "cost", cost+0.25)
+ }
+ }
+
+ Text { id: costText; text: '$'+Number(cost).toFixed(2); font.pixelSize: 15; color: "White"; font.bold: true; }
+
+ Image {
+ source: "content/pics/list-remove.png"
+ scale: clickDown.isPressed ? 0.9 : 1
+
+ ClickAutoRepeating {
+ id: clickDown
+ anchors.fill: parent
+ onClicked: fruitModel.setProperty(index, "cost", Math.max(0,cost-0.25))
+ }
+ }
+ }
+ Image {
+ id: removeButton
+ anchors { verticalCenter: parent.verticalCenter; right: parent.right; rightMargin: 10 }
+ source: "content/pics/archive-remove.png"
+
+ MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) }
+ }
+ }
+ }
+
+ ListView {
+ id: view
+ anchors { top: parent.top; left: parent.left; right: parent.right; bottom: buttons.top }
+ model: fruitModel
+ delegate: fruitDelegate
+ }
+
+ // Attach scrollbar to the right edge of the view.
+ ScrollBar {
+ id: verticalScrollBar
+
+ width: 8; height: view.height; anchors.right: view.right
+ opacity: 0
+ orientation: Qt.Vertical
+ position: view.visibleArea.yPosition
+ pageSize: view.visibleArea.heightRatio
+
+ // Only show the scrollbar when the view is moving.
+ states: State {
+ name: "ShowBars"; when: view.movingVertically
+ PropertyChanges { target: verticalScrollBar; opacity: 1 }
+ }
+ transitions: Transition {
+ NumberAnimation { properties: "opacity"; duration: 400 }
+ }
+ }
+
+ Row {
+ id: buttons
+
+ x: 8; width: childrenRect.width; height: childrenRect.height
+ anchors { bottom: parent.bottom; bottomMargin: 8 }
+ spacing: 8
+
+ Image {
+ source: "content/pics/archive-insert.png"
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ fruitModel.append({
+ "name": "Pizza Margarita",
+ "cost": 5.95,
+ "attributes": [{"description": "Cheese"},{"description": "Tomato"}]
+ })
+ }
+ }
+ }
+
+ Image {
+ source: "content/pics/archive-insert.png"
+
+ MouseArea {
+ anchors.fill: parent;
+ onClicked: {
+ fruitModel.insert(0, {
+ "name": "Pizza Supreme",
+ "cost": 9.95,
+ "attributes": [{"description": "Cheese"},{"description": "Tomato"},{"description": "The Works"}]
+ })
+ }
+ }
+ }
+
+ Image {
+ source: "content/pics/archive-remove.png"
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: fruitModel.clear()
+ }
+ }
+ }
+}
diff --git a/examples/declarative/modelviews/listview/highlight.qml b/examples/declarative/modelviews/listview/highlight.qml
new file mode 100644
index 0000000..ade355d
--- /dev/null
+++ b/examples/declarative/modelviews/listview/highlight.qml
@@ -0,0 +1,55 @@
+import Qt 4.7
+
+Rectangle {
+ width: 400; height: 300
+
+ // MyPets model is defined in dummydata/MyPetsModel.qml
+ // The launcher automatically loads files in dummydata/* to assist
+ // development without a real data source.
+ // This one contains my pets.
+
+ // Define a delegate component. A component will be
+ // instantiated for each visible item in the list.
+ Component {
+ id: petDelegate
+ Item {
+ id: wrapper
+ width: 200; height: 50
+ Column {
+ Text { text: 'Name: ' + name }
+ Text { text: 'Type: ' + type }
+ Text { text: 'Age: ' + age }
+ }
+ // Use the ListView.isCurrentItem attached property to
+ // indent the item if it is the current item.
+ states: State {
+ name: "Current"
+ when: wrapper.ListView.isCurrentItem
+ PropertyChanges { target: wrapper; x: 10 }
+ }
+ transitions: Transition {
+ NumberAnimation { properties: "x"; duration: 200 }
+ }
+ }
+ }
+ // Specify a highlight with custom movement. Note that highlightFollowsCurrentItem
+ // is set to false in the ListView so that we can control how the
+ // highlight moves to the current item.
+ Component {
+ id: petHighlight
+ Rectangle {
+ width: 200; height: 50
+ color: "#FFFF88"
+ SpringFollow on y { to: list1.currentItem.y; spring: 3; damping: 0.1 }
+ }
+ }
+
+ ListView {
+ id: list1
+ width: 200; height: parent.height
+ model: MyPetsModel
+ delegate: petDelegate
+ highlight: petHighlight; highlightFollowsCurrentItem: false
+ focus: true
+ }
+}
diff --git a/examples/declarative/modelviews/listview/itemlist.qml b/examples/declarative/modelviews/listview/itemlist.qml
new file mode 100644
index 0000000..b73b3a3
--- /dev/null
+++ b/examples/declarative/modelviews/listview/itemlist.qml
@@ -0,0 +1,67 @@
+// This example demonstrates placing items in a view using
+// a VisualItemModel
+
+import Qt 4.7
+
+Rectangle {
+ color: "lightgray"
+ width: 240
+ height: 320
+
+ VisualItemModel {
+ id: itemModel
+
+ Rectangle {
+ width: view.width; height: view.height
+ color: "#FFFEF0"
+ Text { text: "Page 1"; font.bold: true; anchors.centerIn: parent }
+ }
+ Rectangle {
+ width: view.width; height: view.height
+ color: "#F0FFF7"
+ Text { text: "Page 2"; font.bold: true; anchors.centerIn: parent }
+ }
+ Rectangle {
+ width: view.width; height: view.height
+ color: "#F4F0FF"
+ Text { text: "Page 3"; font.bold: true; anchors.centerIn: parent }
+ }
+ }
+
+ ListView {
+ id: view
+ anchors { fill: parent; bottomMargin: 30 }
+ model: itemModel
+ preferredHighlightBegin: 0; preferredHighlightEnd: 0
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ orientation: ListView.Horizontal
+ snapMode: ListView.SnapOneItem; flickDeceleration: 2000
+ }
+
+ Rectangle {
+ width: 240; height: 30
+ anchors { top: view.bottom; bottom: parent.bottom }
+ color: "gray"
+
+ Row {
+ anchors.centerIn: parent
+ spacing: 20
+
+ Repeater {
+ model: itemModel.count
+
+ Rectangle {
+ width: 5; height: 5
+ radius: 3
+ color: view.currentIndex == index ? "blue" : "white"
+
+ MouseArea {
+ width: 20; height: 20
+ anchors.centerIn: parent
+ onClicked: view.currentIndex = index
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/examples/declarative/modelviews/listview/listview-example.qml b/examples/declarative/modelviews/listview/listview-example.qml
new file mode 100644
index 0000000..2e8cdda
--- /dev/null
+++ b/examples/declarative/modelviews/listview/listview-example.qml
@@ -0,0 +1,93 @@
+import Qt 4.7
+
+Rectangle {
+ width: 600; height: 300
+
+ // MyPets model is defined in dummydata/MyPetsModel.qml
+ // The viewer automatically loads files in dummydata/* to assist
+ // development without a real data source.
+ // This one contains my pets.
+
+ // Define a delegate component. A component will be
+ // instantiated for each visible item in the list.
+ Component {
+ id: petDelegate
+ Item {
+ width: 200; height: 50
+ Column {
+ Text { text: 'Name: ' + name }
+ Text { text: 'Type: ' + type }
+ Text { text: 'Age: ' + age }
+ }
+ }
+ }
+
+ // Define a highlight component. Just one of these will be instantiated
+ // by each ListView and placed behind the current item.
+ Component {
+ id: petHighlight
+ Rectangle { color: "#FFFF88" }
+ }
+
+ // Show the model in three lists, with different highlight ranges.
+ // preferredHighlightBegin and preferredHighlightEnd set the
+ // range in which to attempt to maintain the highlight.
+ //
+ // Note that the second and third ListView
+ // set their currentIndex to be the same as the first, and that
+ // the first ListView is given keyboard focus.
+ //
+ // The default mode allows the currentItem to move freely
+ // within the visible area. If it would move outside the visible
+ // area, the view is scrolled to keep it visible.
+ //
+ // The second list sets a highlight range which attempts to keep the
+ // current item within the the bounds of the range, however
+ // items will not scroll beyond the beginning or end of the view,
+ // forcing the highlight to move outside the range at the ends.
+ //
+ // The third list sets the highlightRangeMode to StrictlyEnforceRange
+ // and sets a range smaller than the height of an item. This
+ // forces the current item to change when the view is flicked,
+ // since the highlight is unable to move.
+ //
+ // Note that the first ListView sets its currentIndex to be equal to
+ // the third ListView's currentIndex. By flicking List3 with
+ // the mouse, the current index of List1 will be changed.
+
+ ListView {
+ id: list1
+ width: 200; height: parent.height
+ model: MyPetsModel
+ delegate: petDelegate
+
+ highlight: petHighlight
+ currentIndex: list3.currentIndex
+ focus: true
+ }
+
+ ListView {
+ id: list2
+ x: 200; width: 200; height: parent.height
+ model: MyPetsModel
+ delegate: petDelegate
+
+ highlight: petHighlight
+ currentIndex: list1.currentIndex
+ preferredHighlightBegin: 80; preferredHighlightEnd: 220
+ highlightRangeMode: ListView.ApplyRange
+ }
+
+ ListView {
+ id: list3
+ x: 400; width: 200; height: parent.height
+ model: MyPetsModel
+ delegate: petDelegate
+
+ highlight: Rectangle { color: "lightsteelblue" }
+ currentIndex: list1.currentIndex
+ preferredHighlightBegin: 125; preferredHighlightEnd: 125
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ flickDeceleration: 1000
+ }
+}
diff --git a/examples/declarative/listview/listview.qmlproject b/examples/declarative/modelviews/listview/listview.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/listview/listview.qmlproject
+++ b/examples/declarative/modelviews/listview/listview.qmlproject
diff --git a/examples/declarative/listview/recipes.qml b/examples/declarative/modelviews/listview/recipes.qml
index 990e272..990e272 100644
--- a/examples/declarative/listview/recipes.qml
+++ b/examples/declarative/modelviews/listview/recipes.qml
diff --git a/examples/declarative/modelviews/listview/sections.qml b/examples/declarative/modelviews/listview/sections.qml
new file mode 100644
index 0000000..21f9f03
--- /dev/null
+++ b/examples/declarative/modelviews/listview/sections.qml
@@ -0,0 +1,71 @@
+import Qt 4.7
+
+//! [0]
+Rectangle {
+ width: 200
+ height: 240
+
+ // MyPets model is defined in dummydata/MyPetsModel.qml
+ // The viewer automatically loads files in dummydata/* to assist
+ // development without a real data source.
+ // This one contains my pets.
+
+ // Define a delegate component that includes a separator for sections.
+ Component {
+ id: petDelegate
+
+ Item {
+ id: wrapper
+ width: 200
+ height: desc.height // height is the combined height of the description and the section separator
+
+ Item {
+ id: desc
+ x: 5; height: layout.height + 4
+
+ Column {
+ id: layout
+ y: 2
+ Text { text: 'Name: ' + name }
+ Text { text: 'Type: ' + type }
+ Text { text: 'Age: ' + age }
+ }
+ }
+ }
+ }
+
+ // Define a highlight component. Just one of these will be instantiated
+ // by each ListView and placed behind the current item.
+ Component {
+ id: petHighlight
+ Rectangle { color: "#FFFF88" }
+ }
+
+ // The list
+ ListView {
+ id: myList
+
+ width: 200; height: parent.height
+ model: MyPetsModel
+ delegate: petDelegate
+ highlight: petHighlight
+ focus: true
+
+ // The sectionExpression is simply the size of the pet.
+ // We use this to determine which section we are in above.
+ section.property: "size"
+ section.criteria: ViewSection.FullString
+ section.delegate: Rectangle {
+ color: "lightsteelblue"
+ width: 200
+ height: 20
+ Text {
+ x: 2; height: parent.height
+ verticalAlignment: Text.AlignVCenter
+ text: section
+ font.bold: true
+ }
+ }
+ }
+}
+//! [0]
diff --git a/examples/declarative/modelviews/modelviews.pro b/examples/declarative/modelviews/modelviews.pro
new file mode 100644
index 0000000..b811e44
--- /dev/null
+++ b/examples/declarative/modelviews/modelviews.pro
@@ -0,0 +1,7 @@
+TEMPLATE = subdirs
+
+SUBDIRS += \
+ objectlistmodel \
+ stringlistmodel
+
+
diff --git a/examples/declarative/package/package.qmlproject b/examples/declarative/modelviews/modelviews.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/package/package.qmlproject
+++ b/examples/declarative/modelviews/modelviews.qmlproject
diff --git a/examples/declarative/modelviews/objectlistmodel/dataobject.cpp b/examples/declarative/modelviews/objectlistmodel/dataobject.cpp
new file mode 100644
index 0000000..14be1b9
--- /dev/null
+++ b/examples/declarative/modelviews/objectlistmodel/dataobject.cpp
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** 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 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 <QDebug>
+#include "dataobject.h"
+
+DataObject::DataObject(QObject *parent)
+ : QObject(parent)
+{
+}
+
+DataObject::DataObject(const QString &name, const QString &color, QObject *parent)
+ : QObject(parent), m_name(name), m_color(color)
+{
+}
+
+QString DataObject::name() const
+{
+ return m_name;
+}
+
+void DataObject::setName(const QString &name)
+{
+ if (name != m_name) {
+ m_name = name;
+ emit nameChanged();
+ }
+}
+
+QString DataObject::color() const
+{
+ return m_color;
+}
+
+void DataObject::setColor(const QString &color)
+{
+ if (color != m_color) {
+ m_color = color;
+ emit colorChanged();
+ }
+}
diff --git a/examples/declarative/modelviews/objectlistmodel/dataobject.h b/examples/declarative/modelviews/objectlistmodel/dataobject.h
new file mode 100644
index 0000000..852110d
--- /dev/null
+++ b/examples/declarative/modelviews/objectlistmodel/dataobject.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** 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 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 DATAOBJECT_H
+#define DATAOBJECT_H
+
+#include <QObject>
+
+class DataObject : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+ Q_PROPERTY(QString color READ color WRITE setColor NOTIFY colorChanged)
+
+public:
+ DataObject(QObject *parent=0);
+ DataObject(const QString &name, const QString &color, QObject *parent=0);
+
+ QString name() const;
+ void setName(const QString &name);
+
+ QString color() const;
+ void setColor(const QString &color);
+
+signals:
+ void nameChanged();
+ void colorChanged();
+
+private:
+ QString m_name;
+ QString m_color;
+};
+
+#endif // DATAOBJECT_H
diff --git a/examples/declarative/objectlistmodel/main.cpp b/examples/declarative/modelviews/objectlistmodel/main.cpp
index b210570..b210570 100644
--- a/examples/declarative/objectlistmodel/main.cpp
+++ b/examples/declarative/modelviews/objectlistmodel/main.cpp
diff --git a/examples/declarative/objectlistmodel/objectlistmodel.pro b/examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro
index 869cde3..869cde3 100644
--- a/examples/declarative/objectlistmodel/objectlistmodel.pro
+++ b/examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro
diff --git a/examples/declarative/objectlistmodel/objectlistmodel.qmlproject b/examples/declarative/modelviews/objectlistmodel/objectlistmodel.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/objectlistmodel/objectlistmodel.qmlproject
+++ b/examples/declarative/modelviews/objectlistmodel/objectlistmodel.qmlproject
diff --git a/examples/declarative/objectlistmodel/objectlistmodel.qrc b/examples/declarative/modelviews/objectlistmodel/objectlistmodel.qrc
index 17e9301..17e9301 100644
--- a/examples/declarative/objectlistmodel/objectlistmodel.qrc
+++ b/examples/declarative/modelviews/objectlistmodel/objectlistmodel.qrc
diff --git a/examples/declarative/modelviews/objectlistmodel/view.qml b/examples/declarative/modelviews/objectlistmodel/view.qml
new file mode 100644
index 0000000..2b8383f
--- /dev/null
+++ b/examples/declarative/modelviews/objectlistmodel/view.qml
@@ -0,0 +1,16 @@
+import Qt 4.7
+
+ListView {
+ width: 100
+ height: 100
+ anchors.fill: parent
+ model: myModel
+ delegate: Component {
+ Rectangle {
+ height: 25
+ width: 100
+ color: model.modelData.color
+ Text { text: name }
+ }
+ }
+}
diff --git a/examples/declarative/package/Delegate.qml b/examples/declarative/modelviews/package/Delegate.qml
index 785fde6..785fde6 100644
--- a/examples/declarative/package/Delegate.qml
+++ b/examples/declarative/modelviews/package/Delegate.qml
diff --git a/examples/declarative/mousearea/mousearea.qmlproject b/examples/declarative/modelviews/package/package.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/mousearea/mousearea.qmlproject
+++ b/examples/declarative/modelviews/package/package.qmlproject
diff --git a/examples/declarative/package/view.qml b/examples/declarative/modelviews/package/view.qml
index 67f896b..67f896b 100644
--- a/examples/declarative/package/view.qml
+++ b/examples/declarative/modelviews/package/view.qml
diff --git a/examples/declarative/modelviews/parallax/parallax.qml b/examples/declarative/modelviews/parallax/parallax.qml
new file mode 100644
index 0000000..110f17e
--- /dev/null
+++ b/examples/declarative/modelviews/parallax/parallax.qml
@@ -0,0 +1,41 @@
+import Qt 4.7
+import "../../toys/clocks/content"
+import "qml"
+
+Rectangle {
+ id: root
+
+ width: 320; height: 480
+
+ ParallaxView {
+ id: parallax
+ anchors.fill: parent
+ background: "pics/background.jpg"
+
+ Item {
+ property url icon: "pics/yast-wol.png"
+ width: 320; height: 480
+ Clock { anchors.centerIn: parent }
+ }
+
+ Item {
+ property url icon: "pics/home-page.svg"
+ width: 320; height: 480
+ Smiley { }
+ }
+
+ Item {
+ property url icon: "pics/yast-joystick.png"
+ width: 320; height: 480
+
+ Loader {
+ anchors { top: parent.top; topMargin: 10; horizontalCenter: parent.horizontalCenter }
+ width: 300; height: 400
+ clip: true;
+ source: "../../../../demos/declarative/samegame/samegame.qml"
+ }
+ }
+
+ currentIndex: root.currentIndex
+ }
+}
diff --git a/examples/declarative/listmodel-threaded/listmodel-threaded.qmlproject b/examples/declarative/modelviews/parallax/parallax.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/listmodel-threaded/listmodel-threaded.qmlproject
+++ b/examples/declarative/modelviews/parallax/parallax.qmlproject
diff --git a/examples/declarative/parallax/pics/background.jpg b/examples/declarative/modelviews/parallax/pics/background.jpg
index 61cca2f..61cca2f 100644
--- a/examples/declarative/parallax/pics/background.jpg
+++ b/examples/declarative/modelviews/parallax/pics/background.jpg
Binary files differ
diff --git a/examples/declarative/dynamic/images/face-smile.png b/examples/declarative/modelviews/parallax/pics/face-smile.png
index 3d66d72..3d66d72 100644
--- a/examples/declarative/dynamic/images/face-smile.png
+++ b/examples/declarative/modelviews/parallax/pics/face-smile.png
Binary files differ
diff --git a/examples/declarative/parallax/pics/home-page.svg b/examples/declarative/modelviews/parallax/pics/home-page.svg
index 4f16958..4f16958 100644
--- a/examples/declarative/parallax/pics/home-page.svg
+++ b/examples/declarative/modelviews/parallax/pics/home-page.svg
diff --git a/examples/declarative/animations/images/shadow.png b/examples/declarative/modelviews/parallax/pics/shadow.png
index 8270565..8270565 100644
--- a/examples/declarative/animations/images/shadow.png
+++ b/examples/declarative/modelviews/parallax/pics/shadow.png
Binary files differ
diff --git a/examples/declarative/parallax/pics/yast-joystick.png b/examples/declarative/modelviews/parallax/pics/yast-joystick.png
index 858cea0..858cea0 100644
--- a/examples/declarative/parallax/pics/yast-joystick.png
+++ b/examples/declarative/modelviews/parallax/pics/yast-joystick.png
Binary files differ
diff --git a/examples/declarative/parallax/pics/yast-wol.png b/examples/declarative/modelviews/parallax/pics/yast-wol.png
index 7712180..7712180 100644
--- a/examples/declarative/parallax/pics/yast-wol.png
+++ b/examples/declarative/modelviews/parallax/pics/yast-wol.png
Binary files differ
diff --git a/examples/declarative/modelviews/parallax/qml/ParallaxView.qml b/examples/declarative/modelviews/parallax/qml/ParallaxView.qml
new file mode 100644
index 0000000..e869a21
--- /dev/null
+++ b/examples/declarative/modelviews/parallax/qml/ParallaxView.qml
@@ -0,0 +1,83 @@
+import Qt 4.7
+
+Item {
+ id: root
+
+ property alias background: background.source
+ default property alias content: visualModel.children
+ property int currentIndex: 0
+
+ Image {
+ id: background
+ fillMode: Image.TileHorizontally
+ x: -list.contentX / 2
+ width: Math.max(list.contentWidth, parent.width)
+ }
+
+ ListView {
+ id: list
+
+ currentIndex: root.currentIndex
+ onCurrentIndexChanged: root.currentIndex = currentIndex
+
+ orientation: Qt.Horizontal
+ boundsBehavior: Flickable.DragOverBounds
+ anchors.fill: parent
+ model: VisualItemModel { id: visualModel }
+
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ snapMode: ListView.SnapOneItem
+ }
+
+ ListView {
+ id: selector
+
+ Rectangle {
+ color: "#60FFFFFF"
+ x: -10; y: -10; radius: 10; z: -1
+ width: parent.width + 20; height: parent.height + 20
+ }
+ currentIndex: root.currentIndex
+ onCurrentIndexChanged: root.currentIndex = currentIndex
+
+ height: 50
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: Math.min(count * 50, parent.width - 20)
+ interactive: width == parent.width - 20
+ orientation: Qt.Horizontal
+
+ delegate: Item {
+ width: 50; height: 50
+ id: delegateRoot
+
+ Image {
+ id: image
+ source: modelData.icon
+ smooth: true
+ scale: 0.8
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: { root.currentIndex = index }
+ }
+
+ states: State {
+ name: "Selected"
+ when: delegateRoot.ListView.isCurrentItem == true
+ PropertyChanges {
+ target: image
+ scale: 1
+ y: -5
+ }
+ }
+ transitions: Transition {
+ NumberAnimation {
+ properties: "scale,y"
+ }
+ }
+ }
+ model: visualModel.children
+ }
+}
diff --git a/examples/declarative/modelviews/parallax/qml/Smiley.qml b/examples/declarative/modelviews/parallax/qml/Smiley.qml
new file mode 100644
index 0000000..662addc
--- /dev/null
+++ b/examples/declarative/modelviews/parallax/qml/Smiley.qml
@@ -0,0 +1,46 @@
+import Qt 4.7
+
+Item {
+ id: window
+ width: 320; height: 480
+
+ // The shadow for the smiley face
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "../pics/shadow.png"; y: smiley.minHeight + 58
+
+ // The scale property depends on the y position of the smiley face.
+ scale: smiley.y * 0.5 / (smiley.minHeight - smiley.maxHeight)
+ }
+
+ Image {
+ id: smiley
+ property int maxHeight: window.height / 3
+ property int minHeight: 2 * window.height / 3
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "../pics/face-smile.png"; y: minHeight
+
+ // Animate the y property. Setting repeat to true makes the
+ // animation repeat indefinitely, otherwise it would only run once.
+ SequentialAnimation on y {
+ loops: Animation.Infinite
+
+ // Move from minHeight to maxHeight in 300ms, using the OutExpo easing function
+ NumberAnimation {
+ from: smiley.minHeight; to: smiley.maxHeight
+ easing.type: Easing.OutExpo; duration: 300
+ }
+
+ // Then move back to minHeight in 1 second, using the OutBounce easing function
+ NumberAnimation {
+ from: smiley.maxHeight; to: smiley.minHeight
+ easing.type: Easing.OutBounce; duration: 1000
+ }
+
+ // Then pause for 500ms
+ PauseAnimation { duration: 500 }
+ }
+ }
+}
+
diff --git a/examples/declarative/stringlistmodel/main.cpp b/examples/declarative/modelviews/stringlistmodel/main.cpp
index abbffa7..abbffa7 100644
--- a/examples/declarative/stringlistmodel/main.cpp
+++ b/examples/declarative/modelviews/stringlistmodel/main.cpp
diff --git a/examples/declarative/stringlistmodel/stringlistmodel.pro b/examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro
index 23dc481..23dc481 100644
--- a/examples/declarative/stringlistmodel/stringlistmodel.pro
+++ b/examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro
diff --git a/examples/declarative/modelviews/stringlistmodel/stringlistmodel.qrc b/examples/declarative/modelviews/stringlistmodel/stringlistmodel.qrc
new file mode 100644
index 0000000..17e9301
--- /dev/null
+++ b/examples/declarative/modelviews/stringlistmodel/stringlistmodel.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>view.qml</file>
+</qresource>
+</RCC>
diff --git a/examples/declarative/stringlistmodel/view.qml b/examples/declarative/modelviews/stringlistmodel/view.qml
index 41c03d9..41c03d9 100644
--- a/examples/declarative/stringlistmodel/view.qml
+++ b/examples/declarative/modelviews/stringlistmodel/view.qml
diff --git a/examples/declarative/webview/alerts.html b/examples/declarative/modelviews/webview/alerts.html
index 82caddf..82caddf 100644
--- a/examples/declarative/webview/alerts.html
+++ b/examples/declarative/modelviews/webview/alerts.html
diff --git a/examples/declarative/modelviews/webview/alerts.qml b/examples/declarative/modelviews/webview/alerts.qml
new file mode 100644
index 0000000..7684c3e
--- /dev/null
+++ b/examples/declarative/modelviews/webview/alerts.qml
@@ -0,0 +1,58 @@
+import Qt 4.7
+import org.webkit 1.0
+
+WebView {
+ id: webView
+ width: 120
+ height: 150
+ url: "alerts.html"
+
+ onAlert: popup.show(message)
+
+ Rectangle {
+ id: popup
+
+ color: "red"
+ border.color: "black"; border.width: 2
+ radius: 4
+
+ y: parent.height // off "screen"
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: label.width+5
+ height: label.height+5
+
+ opacity: 0
+
+ function show(t) {
+ label.text = t
+ popup.state = "visible"
+ timer.start()
+ }
+ states: State {
+ name: "visible"
+ PropertyChanges { target: popup; opacity: 1 }
+ PropertyChanges { target: popup; y: (webView.height-popup.height)/2 }
+ }
+
+ transitions: [
+ Transition { from: ""; PropertyAnimation { properties: "opacity,y"; duration: 65 } },
+ Transition { from: "visible"; PropertyAnimation { properties: "opacity,y"; duration: 500 } }
+ ]
+
+ Timer {
+ id: timer
+ interval: 1000
+ onTriggered: popup.state = ""
+ }
+
+ Text {
+ id: label
+ anchors.centerIn: parent
+ color: "white"
+ font.pixelSize: 20
+ width: webView.width*0.75
+ wrapMode: Text.WordWrap
+ horizontalAlignment: Text.AlignHCenter
+ }
+ }
+}
diff --git a/examples/declarative/webview/autosize.qml b/examples/declarative/modelviews/webview/autosize.qml
index 9632883..9632883 100644
--- a/examples/declarative/webview/autosize.qml
+++ b/examples/declarative/modelviews/webview/autosize.qml
diff --git a/examples/declarative/webview/content/FieldText.qml b/examples/declarative/modelviews/webview/content/FieldText.qml
index d1d003f..d1d003f 100644
--- a/examples/declarative/webview/content/FieldText.qml
+++ b/examples/declarative/modelviews/webview/content/FieldText.qml
diff --git a/examples/declarative/webview/content/Mapping/Map.qml b/examples/declarative/modelviews/webview/content/Mapping/Map.qml
index 5d3ba81..5d3ba81 100644
--- a/examples/declarative/webview/content/Mapping/Map.qml
+++ b/examples/declarative/modelviews/webview/content/Mapping/Map.qml
diff --git a/examples/declarative/webview/content/Mapping/map.html b/examples/declarative/modelviews/webview/content/Mapping/map.html
index a8726fd..a8726fd 100755
--- a/examples/declarative/webview/content/Mapping/map.html
+++ b/examples/declarative/modelviews/webview/content/Mapping/map.html
diff --git a/examples/declarative/webview/content/SpinSquare.qml b/examples/declarative/modelviews/webview/content/SpinSquare.qml
index dba48d4..dba48d4 100644
--- a/examples/declarative/webview/content/SpinSquare.qml
+++ b/examples/declarative/modelviews/webview/content/SpinSquare.qml
diff --git a/examples/declarative/webview/content/pics/cancel.png b/examples/declarative/modelviews/webview/content/pics/cancel.png
index ecc9533..ecc9533 100644
--- a/examples/declarative/webview/content/pics/cancel.png
+++ b/examples/declarative/modelviews/webview/content/pics/cancel.png
Binary files differ
diff --git a/examples/declarative/webview/content/pics/ok.png b/examples/declarative/modelviews/webview/content/pics/ok.png
index 5795f04..5795f04 100644
--- a/examples/declarative/webview/content/pics/ok.png
+++ b/examples/declarative/modelviews/webview/content/pics/ok.png
Binary files differ
diff --git a/examples/declarative/webview/googleMaps.qml b/examples/declarative/modelviews/webview/googleMaps.qml
index 5506012..5506012 100644
--- a/examples/declarative/webview/googleMaps.qml
+++ b/examples/declarative/modelviews/webview/googleMaps.qml
diff --git a/examples/declarative/webview/inline-html.qml b/examples/declarative/modelviews/webview/inline-html.qml
index eec7fc6..eec7fc6 100644
--- a/examples/declarative/webview/inline-html.qml
+++ b/examples/declarative/modelviews/webview/inline-html.qml
diff --git a/examples/declarative/webview/newwindows.html b/examples/declarative/modelviews/webview/newwindows.html
index f169599..f169599 100644
--- a/examples/declarative/webview/newwindows.html
+++ b/examples/declarative/modelviews/webview/newwindows.html
diff --git a/examples/declarative/webview/newwindows.qml b/examples/declarative/modelviews/webview/newwindows.qml
index 2e4a72e..2e4a72e 100644
--- a/examples/declarative/webview/newwindows.qml
+++ b/examples/declarative/modelviews/webview/newwindows.qml
diff --git a/examples/declarative/webview/transparent.qml b/examples/declarative/modelviews/webview/transparent.qml
index e4efc31..e4efc31 100644
--- a/examples/declarative/webview/transparent.qml
+++ b/examples/declarative/modelviews/webview/transparent.qml
diff --git a/examples/declarative/layouts/layouts.qmlproject b/examples/declarative/modelviews/webview/webview.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/layouts/layouts.qmlproject
+++ b/examples/declarative/modelviews/webview/webview.qmlproject
diff --git a/examples/declarative/mousearea/mouse.qml b/examples/declarative/mousearea/mouse.qml
deleted file mode 100644
index 67302a8..0000000
--- a/examples/declarative/mousearea/mouse.qml
+++ /dev/null
@@ -1,47 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- width: 200; height: 200
-
- Rectangle {
- width: 50; height: 50
- color: "red"
-
- Text { text: "Click"; anchors.centerIn: parent }
-
- MouseArea {
- anchors.fill: parent
- hoverEnabled: true
- acceptedButtons: Qt.LeftButton | Qt.RightButton
-
- onPressed: console.log('press (x: ' + mouse.x + ' y: ' + mouse.y + ' button: ' + (mouse.button == Qt.RightButton ? 'right' : 'left') + ' Shift: ' + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')')
- onReleased: console.log('release (x: ' + mouse.x + ' y: ' + mouse.y + ' isClick: ' + mouse.isClick + ' wasHeld: ' + mouse.wasHeld + ')')
- onClicked: console.log('click (x: ' + mouse.x + ' y: ' + mouse.y + ' wasHeld: ' + mouse.wasHeld + ')')
- onDoubleClicked: console.log('double click (x: ' + mouse.x + ' y: ' + mouse.y + ')')
- onPressAndHold: console.log('press and hold')
- onEntered: console.log('entered ' + pressed)
- onExited: console.log('exited ' + pressed)
- }
- }
-
- Rectangle {
- y: 100; width: 50; height: 50
- color: "blue"
-
- Text { text: "Drag"; anchors.centerIn: parent }
-
- MouseArea {
- anchors.fill: parent
- drag.target: parent
- drag.axis: "XAxis"
- drag.minimumX: 0
- drag.maximumX: 150
-
- onPressed: console.log('press')
- onReleased: console.log('release (isClick: ' + mouse.isClick + ') (wasHeld: ' + mouse.wasHeld + ')')
- onClicked: console.log('click' + '(wasHeld: ' + mouse.wasHeld + ')')
- onDoubleClicked: console.log('double click')
- onPressAndHold: console.log('press and hold')
- }
- }
-}
diff --git a/examples/declarative/objectlistmodel/dataobject.cpp b/examples/declarative/objectlistmodel/dataobject.cpp
deleted file mode 100644
index 4c44ee4..0000000
--- a/examples/declarative/objectlistmodel/dataobject.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QDebug>
-#include "dataobject.h"
-
-DataObject::DataObject(QObject *parent)
- : QObject(parent)
-{
-}
-
-DataObject::DataObject(const QString &name, const QString &color, QObject *parent)
- : QObject(parent), m_name(name), m_color(color)
-{
-}
-
-QString DataObject::name() const
-{
- return m_name;
-}
-
-void DataObject::setName(const QString &name)
-{
- m_name = name;
-}
-
-QString DataObject::color() const
-{
- return m_color;
-}
-
-void DataObject::setColor(const QString &color)
-{
- m_color = color;
-}
diff --git a/examples/declarative/objectlistmodel/dataobject.h b/examples/declarative/objectlistmodel/dataobject.h
deleted file mode 100644
index 6804474..0000000
--- a/examples/declarative/objectlistmodel/dataobject.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** 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 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 DATAOBJECT_H
-#define DATAOBJECT_H
-
-#include <QObject>
-
-class DataObject : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(QString color READ color WRITE setColor)
-
-public:
- DataObject(QObject *parent=0);
- DataObject(const QString &name, const QString &color, QObject *parent=0);
-
- QString name() const;
- void setName(const QString &name);
-
- QString color() const;
- void setColor(const QString &color);
-
-private:
- QString m_name;
- QString m_color;
-};
-
-#endif // DATAOBJECT_H
diff --git a/examples/declarative/objectlistmodel/view.qml b/examples/declarative/objectlistmodel/view.qml
deleted file mode 100644
index 908e388..0000000
--- a/examples/declarative/objectlistmodel/view.qml
+++ /dev/null
@@ -1,16 +0,0 @@
-import Qt 4.7
-
-ListView {
- width: 100
- height: 100
- anchors.fill: parent
- model: myModel
- delegate: Component {
- Rectangle {
- height: 25
- width: 100
- color: model.color
- Text { text: name }
- }
- }
-}
diff --git a/examples/declarative/parallax/parallax.qml b/examples/declarative/parallax/parallax.qml
deleted file mode 100644
index cb0437d..0000000
--- a/examples/declarative/parallax/parallax.qml
+++ /dev/null
@@ -1,41 +0,0 @@
-import Qt 4.7
-import "../clocks/content"
-import "qml"
-
-Rectangle {
- id: root
-
- width: 320; height: 480
-
- ParallaxView {
- id: parallax
- anchors.fill: parent
- background: "pics/background.jpg"
-
- Item {
- property url icon: "pics/yast-wol.png"
- width: 320; height: 480
- Clock { anchors.centerIn: parent }
- }
-
- Item {
- property url icon: "pics/home-page.svg"
- width: 320; height: 480
- Smiley { }
- }
-
- Item {
- property url icon: "pics/yast-joystick.png"
- width: 320; height: 480
-
- Loader {
- anchors { top: parent.top; topMargin: 10; horizontalCenter: parent.horizontalCenter }
- width: 300; height: 400
- clip: true; resizeMode: Loader.SizeItemToLoader
- source: "../../../demos/declarative/samegame/samegame.qml"
- }
- }
-
- currentIndex: root.currentIndex
- }
-}
diff --git a/examples/declarative/parallax/qml/ParallaxView.qml b/examples/declarative/parallax/qml/ParallaxView.qml
deleted file mode 100644
index 4b38d45..0000000
--- a/examples/declarative/parallax/qml/ParallaxView.qml
+++ /dev/null
@@ -1,84 +0,0 @@
-import Qt 4.7
-
-Item {
- id: root
-
- property alias background: background.source
- default property alias content: visualModel.children
- property int currentIndex: 0
-
- Image {
- id: background
- fillMode: Image.TileHorizontally
- x: -list.contentX / 2
- width: Math.max(list.contentWidth, parent.width)
- }
-
- ListView {
- id: list
-
- currentIndex: root.currentIndex
- onCurrentIndexChanged: root.currentIndex = currentIndex
-
- orientation: "Horizontal"
- boundsBehavior: Flickable.DragOverBounds
- anchors.fill: parent
- model: VisualItemModel { id: visualModel }
-
- highlightRangeMode: ListView.StrictlyEnforceRange
- snapMode: ListView.SnapOneItem
- }
-
- ListView {
- id: selector
-
- Rectangle {
- color: "#60FFFFFF"
- x: -10; y: -10; radius: 10; z: -1
- width: parent.width + 20; height: parent.height + 20
- }
- currentIndex: root.currentIndex
- onCurrentIndexChanged: root.currentIndex = currentIndex
-
- height: 50
- anchors.bottom: parent.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- width: Math.min(count * 50, parent.width - 20)
- interactive: width == parent.width - 20
- orientation: "Horizontal"
-
- delegate: Item {
- width: 50; height: 50
- id: delegateRoot
-
- Image {
- id: image
- source: modelData.icon
- smooth: true
- scale: 0.8
- transformOrigin: "Center"
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: { root.currentIndex = index }
- }
-
- states: State {
- name: "Selected"
- when: delegateRoot.ListView.isCurrentItem == true
- PropertyChanges {
- target: image
- scale: 1
- y: -5
- }
- }
- transitions: Transition {
- NumberAnimation {
- properties: "scale,y"
- }
- }
- }
- model: visualModel.children
- }
-}
diff --git a/examples/declarative/parallax/qml/Smiley.qml b/examples/declarative/parallax/qml/Smiley.qml
deleted file mode 100644
index b1e1ae8..0000000
--- a/examples/declarative/parallax/qml/Smiley.qml
+++ /dev/null
@@ -1,47 +0,0 @@
-import Qt 4.7
-
-Item {
- id: window
- width: 320; height: 480
-
- // The shadow for the smiley face
- Image {
- anchors.horizontalCenter: parent.horizontalCenter
- source: "../pics/shadow.png"; y: smiley.minHeight + 58
- transformOrigin: Item.Center
-
- // The scale property depends on the y position of the smiley face.
- scale: smiley.y * 0.5 / (smiley.minHeight - smiley.maxHeight)
- }
-
- Image {
- id: smiley
- property int maxHeight: window.height / 3
- property int minHeight: 2 * window.height / 3
-
- anchors.horizontalCenter: parent.horizontalCenter
- source: "../pics/face-smile.png"; y: minHeight
-
- // Animate the y property. Setting repeat to true makes the
- // animation repeat indefinitely, otherwise it would only run once.
- SequentialAnimation on y {
- loops: Animation.Infinite
-
- // Move from minHeight to maxHeight in 300ms, using the OutExpo easing function
- NumberAnimation {
- from: smiley.minHeight; to: smiley.maxHeight
- easing.type: "OutExpo"; duration: 300
- }
-
- // Then move back to minHeight in 1 second, using the OutBounce easing function
- NumberAnimation {
- from: smiley.maxHeight; to: smiley.minHeight
- easing.type: "OutBounce"; duration: 1000
- }
-
- // Then pause for 500ms
- PauseAnimation { duration: 500 }
- }
- }
-}
-
diff --git a/examples/declarative/positioners/Button.qml b/examples/declarative/positioners/Button.qml
new file mode 100644
index 0000000..d03eeb5
--- /dev/null
+++ b/examples/declarative/positioners/Button.qml
@@ -0,0 +1,38 @@
+import Qt 4.7
+
+Rectangle {
+ id: page
+
+ property string text
+ property string icon
+ signal clicked
+
+ border.color: "black"; color: "steelblue"; radius: 5
+ width: pix.width + textelement.width + 13
+ height: pix.height + 10
+
+ Image { id: pix; x: 5; y:5; source: parent.icon }
+
+ Text {
+ id: textelement
+ text: page.text; color: "white"
+ x: pix.width + pix.x + 3
+ anchors.verticalCenter: pix.verticalCenter
+ }
+
+ MouseArea {
+ id: mr
+ anchors.fill: parent
+ onClicked: { parent.focus = true; page.clicked() }
+ }
+
+ states: State {
+ name: "pressed"; when: mr.pressed
+ PropertyChanges { target: textelement; x: 5 }
+ PropertyChanges { target: pix; x: textelement.x + textelement.width + 3 }
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "x,left"; easing.type: Easing.InOutQuad; duration: 200 }
+ }
+}
diff --git a/examples/declarative/layouts/add.png b/examples/declarative/positioners/add.png
index f29d84b..f29d84b 100644
--- a/examples/declarative/layouts/add.png
+++ b/examples/declarative/positioners/add.png
Binary files differ
diff --git a/examples/declarative/layouts/del.png b/examples/declarative/positioners/del.png
index 1d753a3..1d753a3 100644
--- a/examples/declarative/layouts/del.png
+++ b/examples/declarative/positioners/del.png
Binary files differ
diff --git a/examples/declarative/positioners/positioners.qml b/examples/declarative/positioners/positioners.qml
new file mode 100644
index 0000000..2cb0b8b
--- /dev/null
+++ b/examples/declarative/positioners/positioners.qml
@@ -0,0 +1,213 @@
+import Qt 4.7
+
+Rectangle {
+ id: page
+ width: 420; height: 420
+
+ Column {
+ id: layout1
+ y: 0
+ move: Transition {
+ NumberAnimation { properties: "y"; easing.type: Easing.OutBounce }
+ }
+ add: Transition {
+ NumberAnimation { properties: "y"; easing.type: Easing.OutQuad }
+ }
+
+ Rectangle { color: "red"; width: 100; height: 50; border.color: "black"; radius: 15 }
+
+ Rectangle {
+ id: blueV1
+ width: 100; height: 50
+ color: "lightsteelblue"
+ border.color: "black"
+ radius: 15
+ Behavior on opacity { NumberAnimation {} }
+ }
+
+ Rectangle { color: "green"; width: 100; height: 50; border.color: "black"; radius: 15 }
+
+ Rectangle {
+ id: blueV2
+ width: 100; height: 50
+ color: "lightsteelblue"
+ border.color: "black"
+ radius: 15
+ Behavior on opacity { NumberAnimation {} }
+ }
+
+ Rectangle { color: "orange"; width: 100; height: 50; border.color: "black"; radius: 15 }
+ }
+
+ Row {
+ id: layout2
+ y: 300
+ move: Transition {
+ NumberAnimation { properties: "x"; easing.type: Easing.OutBounce }
+ }
+ add: Transition {
+ NumberAnimation { properties: "x"; easing.type: Easing.OutQuad }
+ }
+
+ Rectangle { color: "red"; width: 50; height: 100; border.color: "black"; radius: 15 }
+
+ Rectangle {
+ id: blueH1
+ width: 50; height: 100
+ color: "lightsteelblue"
+ border.color: "black"
+ radius: 15
+ Behavior on opacity { NumberAnimation {} }
+ }
+
+ Rectangle { color: "green"; width: 50; height: 100; border.color: "black"; radius: 15 }
+
+ Rectangle {
+ id: blueH2
+ width: 50; height: 100
+ color: "lightsteelblue"
+ border.color: "black"
+ radius: 15
+ Behavior on opacity { NumberAnimation {} }
+ }
+
+ Rectangle { color: "orange"; width: 50; height: 100; border.color: "black"; radius: 15 }
+ }
+
+ Button {
+ x: 135; y: 90
+ text: "Remove"
+ icon: "del.png"
+
+ onClicked: {
+ blueH2.opacity = 0
+ blueH1.opacity = 0
+ blueV1.opacity = 0
+ blueV2.opacity = 0
+ blueG1.opacity = 0
+ blueG2.opacity = 0
+ blueG3.opacity = 0
+ blueF1.opacity = 0
+ blueF2.opacity = 0
+ blueF3.opacity = 0
+ }
+ }
+
+ Button {
+ x: 145; y: 140
+ text: "Add"
+ icon: "add.png"
+
+ onClicked: {
+ blueH2.opacity = 1
+ blueH1.opacity = 1
+ blueV1.opacity = 1
+ blueV2.opacity = 1
+ blueG1.opacity = 1
+ blueG2.opacity = 1
+ blueG3.opacity = 1
+ blueF1.opacity = 1
+ blueF2.opacity = 1
+ blueF3.opacity = 1
+ }
+ }
+
+ Grid {
+ x: 260; y: 0
+ columns: 3
+
+ move: Transition {
+ NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce }
+ }
+
+ add: Transition {
+ NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce }
+ }
+
+ Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 }
+
+ Rectangle {
+ id: blueG1
+ width: 50; height: 50
+ color: "lightsteelblue"
+ border.color: "black"
+ radius: 15
+ Behavior on opacity { NumberAnimation {} }
+ }
+
+ Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 }
+
+ Rectangle {
+ id: blueG2
+ width: 50; height: 50
+ color: "lightsteelblue"
+ border.color: "black"
+ radius: 15
+ Behavior on opacity { NumberAnimation {} }
+ }
+
+ Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 }
+
+ Rectangle {
+ id: blueG3
+ width: 50; height: 50
+ color: "lightsteelblue"
+ border.color: "black"
+ radius: 15
+ Behavior on opacity { NumberAnimation {} }
+ }
+
+ Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 }
+ Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 }
+ Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 }
+ }
+
+ Flow {
+ id: layout4
+ x: 260; y: 250; width: 150
+
+ move: Transition {
+ NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce }
+ }
+
+ add: Transition {
+ NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce }
+ }
+
+ Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 }
+
+ Rectangle {
+ id: blueF1
+ width: 60; height: 50
+ color: "lightsteelblue"
+ border.color: "black"
+ radius: 15
+ Behavior on opacity { NumberAnimation {} }
+ }
+
+ Rectangle { color: "green"; width: 30; height: 50; border.color: "black"; radius: 15 }
+
+ Rectangle {
+ id: blueF2
+ width: 60; height: 50
+ color: "lightsteelblue"
+ border.color: "black"
+ radius: 15
+ Behavior on opacity { NumberAnimation {} }
+ }
+
+ Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 }
+
+ Rectangle {
+ id: blueF3
+ width: 40; height: 50
+ color: "lightsteelblue"
+ border.color: "black"
+ radius: 15
+ Behavior on opacity { NumberAnimation {} }
+ }
+
+ Rectangle { color: "red"; width: 80; height: 50; border.color: "black"; radius: 15 }
+ }
+
+}
diff --git a/examples/declarative/positioners/positioners.qmlproject b/examples/declarative/positioners/positioners.qmlproject
new file mode 100644
index 0000000..e526217
--- /dev/null
+++ b/examples/declarative/positioners/positioners.qmlproject
@@ -0,0 +1,18 @@
+/* File generated by QtCreator */
+
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/positioners/positioners.qmlproject.user b/examples/declarative/positioners/positioners.qmlproject.user
new file mode 100644
index 0000000..593479d
--- /dev/null
+++ b/examples/declarative/positioners/positioners.qmlproject.user
@@ -0,0 +1,41 @@
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+ <variable>ProjectExplorer.Project.ActiveTarget</variable>
+ <value type="int">0</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.EditorSettings</variable>
+ <valuemap type="QVariantMap">
+ <value key="EditorConfiguration.Codec" type="QByteArray">UTF-8</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">QML Runtime</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QmlProjectManager.QmlTarget</value>
+ <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">-1</value>
+ <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
+ <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">0</value>
+ <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">QML Runtime</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QmlProjectManager.QmlRunConfiguration</value>
+ <value key="QmlProjectManager.QmlRunConfiguration.DebugServerAddress" type="QString">127.0.0.1</value>
+ <value key="QmlProjectManager.QmlRunConfiguration.DebugServerPort" type="int">3768</value>
+ <value key="QmlProjectManager.QmlRunConfiguration.MainScript" type="QString">positioners.qml</value>
+ <value key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewer" type="QString"></value>
+ <value key="QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.TargetCount</variable>
+ <value type="int">1</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+ <value type="int">4</value>
+ </data>
+</qtcreator>
diff --git a/examples/declarative/proxywidgets/README b/examples/declarative/proxywidgets/README
deleted file mode 100644
index f50fa22..0000000
--- a/examples/declarative/proxywidgets/README
+++ /dev/null
@@ -1,4 +0,0 @@
-To run:
-
- make install
- qml proxywidgets.qml
diff --git a/examples/declarative/proxywidgets/proxywidgets.cpp b/examples/declarative/proxywidgets/proxywidgets.cpp
deleted file mode 100644
index 067eb2c..0000000
--- a/examples/declarative/proxywidgets/proxywidgets.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** 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: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 <QtDeclarative/QDeclarativeExtensionPlugin>
-#include <QtDeclarative/qdeclarative.h>
-#include <QtGui/QGraphicsProxyWidget>
-#include <QtGui/QPushButton>
-#include <QDebug>
-
-class MyPushButton : public QGraphicsProxyWidget
-{
- Q_OBJECT
- Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
-
-public:
- MyPushButton(QGraphicsItem* parent = 0)
- : QGraphicsProxyWidget(parent)
- {
- widget = new QPushButton("MyPushButton");
- widget->setAttribute(Qt::WA_NoSystemBackground);
- setWidget(widget);
-
- QObject::connect(widget, SIGNAL(clicked(bool)), this, SIGNAL(clicked(bool)));
- }
-
- QString text() const
- {
- return widget->text();
- }
-
- void setText(const QString& text)
- {
- if (text != widget->text()) {
- widget->setText(text);
- emit textChanged();
- }
- }
-
-Q_SIGNALS:
- void clicked(bool);
- void textChanged();
-
-private:
- QPushButton *widget;
-};
-
-class ProxyWidgetsPlugin : public QDeclarativeExtensionPlugin
-{
- Q_OBJECT
-public:
- void registerTypes(const char *uri)
- {
- qmlRegisterType<MyPushButton>(uri, 1, 0, "MyPushButton");
- }
-};
-
-#include "proxywidgets.moc"
-
-Q_EXPORT_PLUGIN2(proxywidgetsplugin, ProxyWidgetsPlugin);
diff --git a/examples/declarative/proxywidgets/proxywidgets.pro b/examples/declarative/proxywidgets/proxywidgets.pro
deleted file mode 100644
index cb07d80..0000000
--- a/examples/declarative/proxywidgets/proxywidgets.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-TEMPLATE = lib
-DESTDIR = ProxyWidgets
-TARGET = proxywidgetsplugin
-CONFIG += qt plugin
-QT += declarative
-
-SOURCES += proxywidgets.cpp
-
-sources.files += proxywidgets.pro proxywidgets.cpp proxywidgets.qml
-
-sources.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins
-
-target.path += $$[QT_INSTALL_EXAMPLES]/declarative/plugins
-
-INSTALLS += sources target
-
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
-
-symbian:{
- TARGET.EPOCALLOWDLLDATA = 1
-} \ No newline at end of file
diff --git a/examples/declarative/proxywidgets/proxywidgets.qml b/examples/declarative/proxywidgets/proxywidgets.qml
deleted file mode 100644
index 46dcf99..0000000
--- a/examples/declarative/proxywidgets/proxywidgets.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-import Qt 4.7
-import "ProxyWidgets" 1.0
-
-Rectangle {
- id: window
-
- property int margin: 30
-
- width: 640; height: 480
- color: palette.window
-
- SystemPalette { id: palette }
-
- MyPushButton {
- id: button1
- x: margin; y: margin
- text: "Right"
- transformOriginPoint: Qt.point(width / 2, height / 2)
-
- onClicked: window.state = "right"
- }
-
- MyPushButton {
- id: button2
- x: margin; y: margin + 30
- text: "Bottom"
- transformOriginPoint: Qt.point(width / 2, height / 2)
-
- onClicked: window.state = "bottom"
- }
-
- MyPushButton {
- id: button3
- x: margin; y: margin + 60
- text: "Quit"
- transformOriginPoint: Qt.point(width / 2, height / 2)
-
- onClicked: Qt.quit()
- }
-
- states: [
- State {
- name: "right"
- PropertyChanges { target: button1; x: window.width - width - margin; text: "Left"; onClicked: window.state = "" }
- PropertyChanges { target: button2; x: window.width - width - margin }
- PropertyChanges { target: button3; x: window.width - width - margin }
- PropertyChanges { target: window; color: Qt.darker(palette.window) }
- },
- State {
- name: "bottom"
- PropertyChanges { target: button1; y: window.height - height - margin; rotation: 180 }
- PropertyChanges {
- target: button2
- x: button1.x + button1.width + 10; y: window.height - height - margin
- rotation: 180
- text: "Top"
- onClicked: window.state = ""
- }
- PropertyChanges { target: button3; x: button2.x + button2.width + 10; y: window.height - height - margin; rotation: 180 }
- PropertyChanges { target: window; color: Qt.lighter(palette.window) }
- }
- ]
-
- transitions: Transition {
- ParallelAnimation {
- NumberAnimation { properties: "x,y,rotation"; duration: 600; easing.type: "OutQuad" }
- ColorAnimation { target: window; duration: 600 }
- }
- }
-}
diff --git a/examples/declarative/scrollbar/ScrollBar.qml b/examples/declarative/scrollbar/ScrollBar.qml
deleted file mode 100644
index 5433156..0000000
--- a/examples/declarative/scrollbar/ScrollBar.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-import Qt 4.7
-
-Item {
- id: scrollBar
-
- // The properties that define the scrollbar's state.
- // position and pageSize are in the range 0.0 - 1.0. They are relative to the
- // height of the page, i.e. a pageSize of 0.5 means that you can see 50%
- // of the height of the view.
- // orientation can be either 'Vertical' or 'Horizontal'
- property real position
- property real pageSize
- property variant orientation : "Vertical"
-
- // A light, semi-transparent background
- Rectangle {
- id: background
- anchors.fill: parent
- radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
- color: "white"
- opacity: 0.3
- }
- // Size the bar to the required size, depending upon the orientation.
- Rectangle {
- x: orientation == 'Vertical' ? 1 : (scrollBar.position * (scrollBar.width-2) + 1)
- y: orientation == 'Vertical' ? (scrollBar.position * (scrollBar.height-2) + 1) : 1
- width: orientation == 'Vertical' ? (parent.width-2) : (scrollBar.pageSize * (scrollBar.width-2))
- height: orientation == 'Vertical' ? (scrollBar.pageSize * (scrollBar.height-2)) : (parent.height-2)
- radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
- color: "black"
- opacity: 0.7
- }
-}
diff --git a/examples/declarative/scrollbar/display.qml b/examples/declarative/scrollbar/display.qml
deleted file mode 100644
index cb1da16..0000000
--- a/examples/declarative/scrollbar/display.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- width: 640
- height: 480
-
- // Create a flickable to view a large image.
- Flickable {
- id: view
- anchors.fill: parent
- contentWidth: picture.width
- contentHeight: picture.height
-
- Image {
- id: picture
- source: "pics/niagara_falls.jpg"
- asynchronous: true
- }
-
- // Only show the scrollbars when the view is moving.
- states: State {
- name: "ShowBars"
- when: view.moving
- PropertyChanges { target: verticalScrollBar; opacity: 1 }
- PropertyChanges { target: horizontalScrollBar; opacity: 1 }
- }
-
- transitions: Transition {
- from: "*"; to: "*"
- NumberAnimation { properties: "opacity"; duration: 400 }
- }
- }
-
- // Attach scrollbars to the right and bottom edges of the view.
- ScrollBar {
- id: verticalScrollBar
- width: 12; height: view.height-12
- anchors.right: view.right
- opacity: 0
- orientation: "Vertical"
- position: view.visibleArea.yPosition
- pageSize: view.visibleArea.heightRatio
- }
-
- ScrollBar {
- id: horizontalScrollBar
- width: view.width-12; height: 12
- anchors.bottom: view.bottom
- opacity: 0
- orientation: "Horizontal"
- position: view.visibleArea.xPosition
- pageSize: view.visibleArea.widthRatio
- }
-}
diff --git a/examples/declarative/slideswitch/content/Switch.qml b/examples/declarative/slideswitch/content/Switch.qml
deleted file mode 100644
index a8fa6ef..0000000
--- a/examples/declarative/slideswitch/content/Switch.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-//![0]
-import Qt 4.7
-
-Item {
- id: toggleswitch
- width: background.width; height: background.height
-
-//![1]
- property bool on: false
-//![1]
-
-//![2]
- function toggle() {
- if (toggleswitch.state == "on")
- toggleswitch.state = "off";
- else toggleswitch.state = "on";
- }
-//![2]
-
-//![3]
- function dorelease() {
- if (knob.x == 1) {
- if (toggleswitch.state == "off") return;
- }
- if (knob.x == 78) {
- if (toggleswitch.state == "on") return;
- }
- toggle();
- }
-//![3]
-
-//![4]
- Image {
- id: background
- source: "background.svg"
- MouseArea { anchors.fill: parent; onClicked: toggle() }
- }
-//![4]
-
-//![5]
- Image {
- id: knob
- x: 1; y: 2
- source: "knob.svg"
-
- MouseArea {
- anchors.fill: parent
- drag.target: knob; drag.axis: "XAxis"; drag.minimumX: 1; drag.maximumX: 78
- onClicked: toggle()
- onReleased: dorelease()
- }
- }
-//![5]
-
-//![6]
- states: [
- State {
- name: "on"
- PropertyChanges { target: knob; x: 78 }
- PropertyChanges { target: toggleswitch; on: true }
- },
- State {
- name: "off"
- PropertyChanges { target: knob; x: 1 }
- PropertyChanges { target: toggleswitch; on: false }
- }
- ]
-//![6]
-
-//![7]
- transitions: Transition {
- NumberAnimation { properties: "x"; easing.type: "InOutQuad"; duration: 200 }
- }
-//![7]
-}
-//![0]
diff --git a/examples/declarative/sql/hello.qml b/examples/declarative/sqllocalstorage/hello.qml
index 8b021b7..8b021b7 100644
--- a/examples/declarative/sql/hello.qml
+++ b/examples/declarative/sqllocalstorage/hello.qml
diff --git a/examples/declarative/images/images.qmlproject b/examples/declarative/sqllocalstorage/sqllocalstorage.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/images/images.qmlproject
+++ b/examples/declarative/sqllocalstorage/sqllocalstorage.qmlproject
diff --git a/examples/declarative/states/transitions.qml b/examples/declarative/states/transitions.qml
deleted file mode 100644
index d1b1dd6..0000000
--- a/examples/declarative/states/transitions.qml
+++ /dev/null
@@ -1,90 +0,0 @@
-import Qt 4.7
-
-/*
- This is exactly the same as states.qml, except that we have appended
- a set of transitions to apply animations when the item changes
- between each state.
-*/
-
-Rectangle {
- id: page
- width: 640; height: 480
- color: "#343434"
-
- Image {
- id: userIcon
- x: topLeftRect.x; y: topLeftRect.y
- source: "user.png"
- }
-
- Rectangle {
- id: topLeftRect
-
- anchors { left: parent.left; top: parent.top; leftMargin: 10; topMargin: 20 }
- width: 64; height: 64
- color: "Transparent"; border.color: "Gray"; radius: 6
-
- // Clicking in here sets the state to the default state, returning the image to
- // its initial position
- MouseArea { anchors.fill: parent; onClicked: page.state = '' }
- }
-
- Rectangle {
- id: middleRightRect
-
- anchors { right: parent.right; verticalCenter: parent.verticalCenter; rightMargin: 20 }
- width: 64; height: 64
- color: "Transparent"; border.color: "Gray"; radius: 6
-
- // Clicking in here sets the state to 'middleRight'
- MouseArea { anchors.fill: parent; onClicked: page.state = 'middleRight' }
- }
-
- Rectangle {
- id: bottomLeftRect
-
- anchors { left: parent.left; bottom: parent.bottom; leftMargin: 10; bottomMargin: 20 }
- width: 64; height: 64
- color: "Transparent"; border.color: "Gray"; radius: 6
-
- // Clicking in here sets the state to 'bottomLeft'
- MouseArea { anchors.fill: parent; onClicked: page.state = 'bottomLeft' }
- }
-
- states: [
- // In state 'middleRight', move the image to middleRightRect
- State {
- name: "middleRight"
- PropertyChanges { target: userIcon; x: middleRightRect.x; y: middleRightRect.y }
- },
-
- // In state 'bottomLeft', move the image to bottomLeftRect
- State {
- name: "bottomLeft"
- PropertyChanges { target: userIcon; x: bottomLeftRect.x; y: bottomLeftRect.y }
- }
- ]
-
- // Transitions define how the properties change when the item moves between each state
- transitions: [
-
- // When transitioning to 'middleRight' move x,y over a duration of 1 second,
- // with OutBounce easing function.
- Transition {
- from: "*"; to: "middleRight"
- NumberAnimation { properties: "x,y"; easing.type: "OutBounce"; duration: 1000 }
- },
-
- // When transitioning to 'bottomLeft' move x,y over a duration of 2 seconds,
- // with InOutQuad easing function.
- Transition {
- from: "*"; to: "bottomLeft"
- NumberAnimation { properties: "x,y"; easing.type: "InOutQuad"; duration: 2000 }
- },
-
- // For any other state changes move x,y linearly over duration of 200ms.
- Transition {
- NumberAnimation { properties: "x,y"; duration: 200 }
- }
- ]
-}
diff --git a/examples/declarative/text/fonts/availableFonts.qml b/examples/declarative/text/fonts/availableFonts.qml
new file mode 100644
index 0000000..defa4ce
--- /dev/null
+++ b/examples/declarative/text/fonts/availableFonts.qml
@@ -0,0 +1,17 @@
+import Qt 4.7
+
+Rectangle {
+ width: 480; height: 640; color: "steelblue"
+
+ ListView {
+ anchors.fill: parent; model: Qt.fontFamilies()
+
+ delegate: Item {
+ height: 40; width: ListView.view.width
+ Text {
+ anchors.centerIn: parent
+ text: modelData; font.family: modelData; font.pixelSize: 24; color: "white"
+ }
+ }
+ }
+}
diff --git a/examples/declarative/fonts/banner.qml b/examples/declarative/text/fonts/banner.qml
index 353354a..353354a 100644
--- a/examples/declarative/fonts/banner.qml
+++ b/examples/declarative/text/fonts/banner.qml
diff --git a/examples/declarative/text/fonts/fonts.qml b/examples/declarative/text/fonts/fonts.qml
new file mode 100644
index 0000000..f3eac48
--- /dev/null
+++ b/examples/declarative/text/fonts/fonts.qml
@@ -0,0 +1,64 @@
+import Qt 4.7
+
+Rectangle {
+ property string myText: "The quick brown fox jumps over the lazy dog."
+
+ width: 800; height: 480
+ color: "steelblue"
+
+ FontLoader { id: fixedFont; name: "Courier" }
+ FontLoader { id: localFont; source: "fonts/tarzeau_ocr_a.ttf" }
+ FontLoader { id: webFont; source: "http://www.princexml.com/fonts/steffmann/Starburst.ttf" }
+
+ Column {
+ anchors { fill: parent; leftMargin: 10; rightMargin: 10 }
+ spacing: 15
+
+ Text {
+ text: myText
+ color: "lightsteelblue"
+ width: parent.width
+ elide: Text.ElideRight
+ font.family: "Times"; font.pointSize: 42
+ }
+ Text {
+ text: myText
+ color: "lightsteelblue"
+ width: parent.width
+ elide: Text.ElideLeft
+ font { family: "Times"; pointSize: 42; capitalization: Font.AllUppercase }
+ }
+ Text {
+ text: myText
+ color: "lightsteelblue"
+ width: parent.width
+ elide: Text.ElideMiddle
+ font { family: fixedFont.name; pointSize: 42; weight: Font.Bold; capitalization: Font.AllLowercase }
+ }
+ Text {
+ text: myText
+ color: "lightsteelblue"
+ width: parent.width
+ elide: Text.ElideRight
+ font { family: fixedFont.name; pointSize: 42; italic: true; capitalization: Font.SmallCaps }
+ }
+ Text {
+ text: myText
+ color: "lightsteelblue"
+ width: parent.width
+ elide: Text.ElideLeft
+ font { family: localFont.name; pointSize: 42; capitalization: Font.Capitalize }
+ }
+ Text {
+ text: {
+ if (webFont.status == FontLoader.Ready) myText
+ else if (webFont.status == FontLoader.Loading) "Loading..."
+ else if (webFont.status == FontLoader.Error) "Error loading font"
+ }
+ color: "lightsteelblue"
+ width: parent.width
+ elide: Text.ElideMiddle
+ font.family: webFont.name; font.pointSize: 42
+ }
+ }
+}
diff --git a/examples/declarative/fonts/fonts.qmlproject b/examples/declarative/text/fonts/fonts.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/fonts/fonts.qmlproject
+++ b/examples/declarative/text/fonts/fonts.qmlproject
diff --git a/examples/declarative/fonts/fonts/tarzeau_ocr_a.ttf b/examples/declarative/text/fonts/fonts/tarzeau_ocr_a.ttf
index cf93f96..cf93f96 100644
--- a/examples/declarative/fonts/fonts/tarzeau_ocr_a.ttf
+++ b/examples/declarative/text/fonts/fonts/tarzeau_ocr_a.ttf
Binary files differ
diff --git a/examples/declarative/text/fonts/hello.qml b/examples/declarative/text/fonts/hello.qml
new file mode 100644
index 0000000..0d6f4cd
--- /dev/null
+++ b/examples/declarative/text/fonts/hello.qml
@@ -0,0 +1,38 @@
+import Qt 4.7
+
+Rectangle {
+ id: screen
+
+ width: 800; height: 480
+ color: "black"
+
+ Item {
+ id: container
+ x: screen.width / 2; y: screen.height / 2
+
+ Text {
+ id: text
+ anchors.centerIn: parent
+ color: "white"
+ text: "Hello world!"
+ font.pixelSize: 60
+
+ SequentialAnimation on font.letterSpacing {
+ loops: Animation.Infinite;
+ NumberAnimation { from: 100; to: 300; easing.type: Easing.InQuad; duration: 3000 }
+ ScriptAction {
+ script: {
+ container.y = (screen.height / 4) + (Math.random() * screen.height / 2)
+ container.x = (screen.width / 4) + (Math.random() * screen.width / 2)
+ }
+ }
+ }
+
+ SequentialAnimation on opacity {
+ loops: Animation.Infinite;
+ NumberAnimation { from: 1; to: 0; duration: 2600 }
+ PauseAnimation { duration: 400 }
+ }
+ }
+ }
+}
diff --git a/examples/declarative/gestures/gestures.qmlproject b/examples/declarative/text/text.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/gestures/gestures.qmlproject
+++ b/examples/declarative/text/text.qmlproject
diff --git a/examples/declarative/listmodel-threaded/dataloader.js b/examples/declarative/threading/threadedlistmodel/dataloader.js
index d720f09..d720f09 100644
--- a/examples/declarative/listmodel-threaded/dataloader.js
+++ b/examples/declarative/threading/threadedlistmodel/dataloader.js
diff --git a/examples/declarative/flipable/flipable.qmlproject b/examples/declarative/threading/threadedlistmodel/threadedlistmodel.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/flipable/flipable.qmlproject
+++ b/examples/declarative/threading/threadedlistmodel/threadedlistmodel.qmlproject
diff --git a/examples/declarative/listmodel-threaded/timedisplay.qml b/examples/declarative/threading/threadedlistmodel/timedisplay.qml
index bad7010..bad7010 100644
--- a/examples/declarative/listmodel-threaded/timedisplay.qml
+++ b/examples/declarative/threading/threadedlistmodel/timedisplay.qml
diff --git a/examples/declarative/fillmode/fillmode.qmlproject b/examples/declarative/threading/threading.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/fillmode/fillmode.qmlproject
+++ b/examples/declarative/threading/threading.qmlproject
diff --git a/examples/declarative/workerscript/workerscript.js b/examples/declarative/threading/workerscript/workerscript.js
index f76471f..f76471f 100644
--- a/examples/declarative/workerscript/workerscript.js
+++ b/examples/declarative/threading/workerscript/workerscript.js
diff --git a/examples/declarative/workerscript/workerscript.qml b/examples/declarative/threading/workerscript/workerscript.qml
index 2294a81..2294a81 100644
--- a/examples/declarative/workerscript/workerscript.qml
+++ b/examples/declarative/threading/workerscript/workerscript.qml
diff --git a/examples/declarative/extending/extending.qmlproject b/examples/declarative/threading/workerscript/workerscript.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/extending/extending.qmlproject
+++ b/examples/declarative/threading/workerscript/workerscript.qmlproject
diff --git a/examples/declarative/gestures/experimental-gestures.qml b/examples/declarative/touchinteraction/gestures/experimental-gestures.qml
index cb190ea..cb190ea 100644
--- a/examples/declarative/gestures/experimental-gestures.qml
+++ b/examples/declarative/touchinteraction/gestures/experimental-gestures.qml
diff --git a/examples/declarative/dynamic/dynamic.qmlproject b/examples/declarative/touchinteraction/gestures/gestures.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/dynamic/dynamic.qmlproject
+++ b/examples/declarative/touchinteraction/gestures/gestures.qmlproject
diff --git a/examples/declarative/touchinteraction/mousearea/mouse.qml b/examples/declarative/touchinteraction/mousearea/mouse.qml
new file mode 100644
index 0000000..06134b7
--- /dev/null
+++ b/examples/declarative/touchinteraction/mousearea/mouse.qml
@@ -0,0 +1,47 @@
+import Qt 4.7
+
+Rectangle {
+ width: 200; height: 200
+
+ Rectangle {
+ width: 50; height: 50
+ color: "red"
+
+ Text { text: "Click"; anchors.centerIn: parent }
+
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ acceptedButtons: Qt.LeftButton | Qt.RightButton
+
+ onPressed: console.log('press (x: ' + mouse.x + ' y: ' + mouse.y + ' button: ' + (mouse.button == Qt.RightButton ? 'right' : 'left') + ' Shift: ' + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')')
+ onReleased: console.log('release (x: ' + mouse.x + ' y: ' + mouse.y + ' isClick: ' + mouse.isClick + ' wasHeld: ' + mouse.wasHeld + ')')
+ onClicked: console.log('click (x: ' + mouse.x + ' y: ' + mouse.y + ' wasHeld: ' + mouse.wasHeld + ')')
+ onDoubleClicked: console.log('double click (x: ' + mouse.x + ' y: ' + mouse.y + ')')
+ onPressAndHold: console.log('press and hold')
+ onEntered: console.log('entered ' + pressed)
+ onExited: console.log('exited ' + pressed)
+ }
+ }
+
+ Rectangle {
+ y: 100; width: 50; height: 50
+ color: "blue"
+
+ Text { text: "Drag"; anchors.centerIn: parent }
+
+ MouseArea {
+ anchors.fill: parent
+ drag.target: parent
+ drag.axis: Drag.XAxis
+ drag.minimumX: 0
+ drag.maximumX: 150
+
+ onPressed: console.log('press')
+ onReleased: console.log('release (isClick: ' + mouse.isClick + ') (wasHeld: ' + mouse.wasHeld + ')')
+ onClicked: console.log('click' + '(wasHeld: ' + mouse.wasHeld + ')')
+ onDoubleClicked: console.log('double click')
+ onPressAndHold: console.log('press and hold')
+ }
+ }
+}
diff --git a/examples/declarative/dial/dial.qmlproject b/examples/declarative/touchinteraction/mousearea/mousearea.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/dial/dial.qmlproject
+++ b/examples/declarative/touchinteraction/mousearea/mousearea.qmlproject
diff --git a/examples/declarative/connections/connections.qmlproject b/examples/declarative/touchinteraction/touchinteraction.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/connections/connections.qmlproject
+++ b/examples/declarative/touchinteraction/touchinteraction.qmlproject
diff --git a/examples/declarative/clocks/clocks.qml b/examples/declarative/toys/clocks/clocks.qml
index 22cf820..22cf820 100644
--- a/examples/declarative/clocks/clocks.qml
+++ b/examples/declarative/toys/clocks/clocks.qml
diff --git a/examples/declarative/clocks/clocks.qmlproject b/examples/declarative/toys/clocks/clocks.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/clocks/clocks.qmlproject
+++ b/examples/declarative/toys/clocks/clocks.qmlproject
diff --git a/examples/declarative/clocks/content/Clock.qml b/examples/declarative/toys/clocks/content/Clock.qml
index 3426e6a..3426e6a 100644
--- a/examples/declarative/clocks/content/Clock.qml
+++ b/examples/declarative/toys/clocks/content/Clock.qml
diff --git a/examples/declarative/clocks/content/background.png b/examples/declarative/toys/clocks/content/background.png
index a885950..a885950 100644
--- a/examples/declarative/clocks/content/background.png
+++ b/examples/declarative/toys/clocks/content/background.png
Binary files differ
diff --git a/examples/declarative/clocks/content/center.png b/examples/declarative/toys/clocks/content/center.png
index 7fbd802..7fbd802 100755
--- a/examples/declarative/clocks/content/center.png
+++ b/examples/declarative/toys/clocks/content/center.png
Binary files differ
diff --git a/examples/declarative/clocks/content/clock-night.png b/examples/declarative/toys/clocks/content/clock-night.png
index cc7151a..cc7151a 100755
--- a/examples/declarative/clocks/content/clock-night.png
+++ b/examples/declarative/toys/clocks/content/clock-night.png
Binary files differ
diff --git a/examples/declarative/clocks/content/clock.png b/examples/declarative/toys/clocks/content/clock.png
index 462edac..462edac 100755
--- a/examples/declarative/clocks/content/clock.png
+++ b/examples/declarative/toys/clocks/content/clock.png
Binary files differ
diff --git a/examples/declarative/clocks/content/hour.png b/examples/declarative/toys/clocks/content/hour.png
index f8061a1..f8061a1 100755
--- a/examples/declarative/clocks/content/hour.png
+++ b/examples/declarative/toys/clocks/content/hour.png
Binary files differ
diff --git a/examples/declarative/clocks/content/minute.png b/examples/declarative/toys/clocks/content/minute.png
index 1297ec7..1297ec7 100755
--- a/examples/declarative/clocks/content/minute.png
+++ b/examples/declarative/toys/clocks/content/minute.png
Binary files differ
diff --git a/examples/declarative/clocks/content/second.png b/examples/declarative/toys/clocks/content/second.png
index 4aa9fb5..4aa9fb5 100755
--- a/examples/declarative/clocks/content/second.png
+++ b/examples/declarative/toys/clocks/content/second.png
Binary files differ
diff --git a/examples/declarative/toys/corkboards/Day.qml b/examples/declarative/toys/corkboards/Day.qml
new file mode 100644
index 0000000..350c1c4
--- /dev/null
+++ b/examples/declarative/toys/corkboards/Day.qml
@@ -0,0 +1,101 @@
+import Qt 4.7
+
+Component {
+ Item {
+ property variant stickies
+
+ id: page
+ width: 840; height: 480
+
+ Image { source: "cork.jpg" }
+
+ Text {
+ text: name; x: 15; y: 8; height: 40; width: 370
+ font.pixelSize: 18; font.bold: true; color: "white"
+ style: Text.Outline; styleColor: "black"
+ }
+
+ Repeater {
+ model: notes
+ Item {
+ id: stickyPage
+
+ property int randomX: Math.random() * 500 + 100
+ property int randomY: Math.random() * 200 + 50
+
+ x: randomX; y: randomY
+
+ SpringFollow on rotation {
+ to: -flickable.horizontalVelocity / 100
+ spring: 2.0; damping: 0.15
+ }
+
+ Item {
+ id: sticky
+ scale: 0.7
+
+ Image {
+ id: stickyImage
+ x: 8 + -width * 0.6 / 2; y: -20
+ source: "note-yellow.png"
+ scale: 0.6; transformOrigin: Item.TopLeft
+ smooth: true
+ }
+
+ TextEdit {
+ id: myText
+ x: -104; y: 36; width: 215; height: 200
+ smooth: true
+ font.pixelSize: 24
+ readOnly: false
+ rotation: -8
+ text: noteText
+ }
+
+ Item {
+ x: stickyImage.x; y: -20
+ width: stickyImage.width * stickyImage.scale
+ height: stickyImage.height * stickyImage.scale
+
+ MouseArea {
+ id: mouse
+ anchors.fill: parent
+ drag.target: stickyPage
+ drag.axis: Drag.XandYAxis
+ drag.minimumY: 0
+ drag.maximumY: page.height - 80
+ drag.minimumX: 100
+ drag.maximumX: page.width - 140
+ onClicked: { myText.focus = true }
+ }
+ }
+ }
+
+ Image {
+ x: -width / 2; y: -height * 0.5 / 2
+ source: "tack.png"
+ scale: 0.7; transformOrigin: Item.TopLeft
+ }
+
+ states: State {
+ name: "pressed"
+ when: mouse.pressed
+ PropertyChanges { target: sticky; rotation: 8; scale: 1 }
+ PropertyChanges { target: page; z: 8 }
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "rotation,scale"; duration: 200 }
+ }
+ }
+ }
+ }
+}
+
+
+
+
+
+
+
+
diff --git a/examples/declarative/velocity/cork.jpg b/examples/declarative/toys/corkboards/cork.jpg
index 160bc00..160bc00 100644
--- a/examples/declarative/velocity/cork.jpg
+++ b/examples/declarative/toys/corkboards/cork.jpg
Binary files differ
diff --git a/examples/declarative/velocity/velocity.qml b/examples/declarative/toys/corkboards/corkboards.qml
index 871bafc..871bafc 100644
--- a/examples/declarative/velocity/velocity.qml
+++ b/examples/declarative/toys/corkboards/corkboards.qml
diff --git a/examples/declarative/border-image/border-image.qmlproject b/examples/declarative/toys/corkboards/corkboards.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/border-image/border-image.qmlproject
+++ b/examples/declarative/toys/corkboards/corkboards.qmlproject
diff --git a/examples/declarative/velocity/note-yellow.png b/examples/declarative/toys/corkboards/note-yellow.png
index 8ddecc8..8ddecc8 100644
--- a/examples/declarative/velocity/note-yellow.png
+++ b/examples/declarative/toys/corkboards/note-yellow.png
Binary files differ
diff --git a/examples/declarative/velocity/tack.png b/examples/declarative/toys/corkboards/tack.png
index cef2d1c..cef2d1c 100644
--- a/examples/declarative/velocity/tack.png
+++ b/examples/declarative/toys/corkboards/tack.png
Binary files differ
diff --git a/examples/declarative/toys/dial/content/Dial.qml b/examples/declarative/toys/dial/content/Dial.qml
new file mode 100644
index 0000000..6f24801
--- /dev/null
+++ b/examples/declarative/toys/dial/content/Dial.qml
@@ -0,0 +1,43 @@
+import Qt 4.7
+
+Item {
+ id: root
+ property real value : 0
+
+ width: 210; height: 210
+
+ Image { source: "background.png" }
+
+//! [needle_shadow]
+ Image {
+ x: 93
+ y: 35
+ source: "needle_shadow.png"
+ transform: Rotation {
+ origin.x: 11; origin.y: 67
+ angle: needleRotation.angle
+ }
+ }
+//! [needle_shadow]
+//! [needle]
+ Image {
+ id: needle
+ x: 95; y: 33
+ smooth: true
+ source: "needle.png"
+ transform: Rotation {
+ id: needleRotation
+ origin.x: 7; origin.y: 65
+ angle: -130
+ SpringFollow on angle {
+ spring: 1.4
+ damping: .15
+ to: Math.min(Math.max(-130, root.value*2.6 - 130), 133)
+ }
+ }
+ }
+//! [needle]
+//! [overlay]
+ Image { x: 21; y: 18; source: "overlay.png" }
+//! [overlay]
+}
diff --git a/examples/declarative/dial/content/background.png b/examples/declarative/toys/dial/content/background.png
index 75d555d..75d555d 100644
--- a/examples/declarative/dial/content/background.png
+++ b/examples/declarative/toys/dial/content/background.png
Binary files differ
diff --git a/examples/declarative/dial/content/needle.png b/examples/declarative/toys/dial/content/needle.png
index 2d19f75..2d19f75 100644
--- a/examples/declarative/dial/content/needle.png
+++ b/examples/declarative/toys/dial/content/needle.png
Binary files differ
diff --git a/examples/declarative/dial/content/needle_shadow.png b/examples/declarative/toys/dial/content/needle_shadow.png
index 8d8a928..8d8a928 100644
--- a/examples/declarative/dial/content/needle_shadow.png
+++ b/examples/declarative/toys/dial/content/needle_shadow.png
Binary files differ
diff --git a/examples/declarative/dial/content/overlay.png b/examples/declarative/toys/dial/content/overlay.png
index 3860a7b..3860a7b 100644
--- a/examples/declarative/dial/content/overlay.png
+++ b/examples/declarative/toys/dial/content/overlay.png
Binary files differ
diff --git a/examples/declarative/toys/dial/dial-example.qml b/examples/declarative/toys/dial/dial-example.qml
new file mode 100644
index 0000000..900954f
--- /dev/null
+++ b/examples/declarative/toys/dial/dial-example.qml
@@ -0,0 +1,50 @@
+import Qt 4.7
+import "content"
+
+//! [0]
+Rectangle {
+ color: "#545454"
+ width: 300; height: 300
+
+ // Dial with a slider to adjust it
+ Dial {
+ id: dial
+ anchors.centerIn: parent
+ value: slider.x * 100 / (container.width - 34)
+ }
+
+ Rectangle {
+ id: container
+ anchors { bottom: parent.bottom; left: parent.left
+ right: parent.right; leftMargin: 20; rightMargin: 20
+ bottomMargin: 10
+ }
+ height: 16
+
+ radius: 8
+ opacity: 0.7
+ smooth: true
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "gray" }
+ GradientStop { position: 1.0; color: "white" }
+ }
+
+ Rectangle {
+ id: slider
+ x: 1; y: 1; width: 30; height: 14
+ radius: 6
+ smooth: true
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#424242" }
+ GradientStop { position: 1.0; color: "black" }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ drag.target: parent; drag.axis: Drag.XAxis
+ drag.minimumX: 2; drag.maximumX: container.width - 32
+ }
+ }
+ }
+}
+//! [0] \ No newline at end of file
diff --git a/examples/declarative/aspectratio/aspectratio.qmlproject b/examples/declarative/toys/dial/dial.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/aspectratio/aspectratio.qmlproject
+++ b/examples/declarative/toys/dial/dial.qmlproject
diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.qml b/examples/declarative/toys/dynamicscene/dynamicscene.qml
new file mode 100644
index 0000000..52c7c1e
--- /dev/null
+++ b/examples/declarative/toys/dynamicscene/dynamicscene.qml
@@ -0,0 +1,176 @@
+import Qt 4.7
+import Qt.labs.particles 1.0
+import "qml"
+
+Item {
+ id: window
+
+ property int activeSuns: 0
+
+ //This is a desktop-sized example
+ width: 1024; height: 512
+
+ //This is the message box that pops up when there's an error
+ Rectangle {
+ id: dialog
+
+ opacity: 0
+ anchors.centerIn: parent
+ width: dialogText.width + 6; height: dialogText.height + 6
+ border.color: 'black'
+ color: 'lightsteelblue'
+ z: 65535 //Arbitrary number chosen to be above all the items, including the scaled perspective ones.
+
+ function show(str){
+ dialogText.text = str;
+ dialogAnim.start();
+ }
+
+ Text {
+ id: dialogText
+ x: 3; y: 3
+ font.pixelSize: 14
+ }
+
+ SequentialAnimation {
+ id: dialogAnim
+ NumberAnimation { target: dialog; property:"opacity"; to: 1; duration: 1000 }
+ PauseAnimation { duration: 5000 }
+ NumberAnimation { target: dialog; property:"opacity"; to: 0; duration: 1000 }
+ }
+ }
+
+ // sky
+ Rectangle {
+ id: sky
+ anchors { left: parent.left; top: parent.top; right: toolbox.right; bottom: parent.verticalCenter }
+ gradient: Gradient {
+ GradientStop { id: gradientStopA; position: 0.0; color: "#0E1533" }
+ GradientStop { id: gradientStopB; position: 1.0; color: "#437284" }
+ }
+ }
+
+ // stars (when there's no sun)
+ Particles {
+ id: stars
+ x: 0; y: 0; width: parent.width; height: parent.height / 2
+ source: "images/star.png"
+ angleDeviation: 360
+ velocity: 0; velocityDeviation: 0
+ count: parent.width / 10
+ fadeInDuration: 2800
+ opacity: 1
+ }
+
+ // ground
+ Rectangle {
+ id: ground
+ z: 2 // just above the sun so that the sun can set behind it
+ anchors { left: parent.left; top: parent.verticalCenter; right: toolbox.left; bottom: parent.bottom }
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "ForestGreen" }
+ GradientStop { position: 1.0; color: "DarkGreen" }
+ }
+ }
+
+ SystemPalette { id: activePalette }
+
+ // right-hand panel
+ Rectangle {
+ id: toolbox
+
+ width: 480
+ color: activePalette.window
+ anchors { right: parent.right; top: parent.top; bottom: parent.bottom }
+
+ Column {
+ anchors.centerIn: parent
+ spacing: 8
+
+ Text { text: "Drag an item into the scene." }
+
+ Rectangle {
+ width: childrenRect.width + 10; height: childrenRect.height + 10
+ border.color: "black"
+
+ Row {
+ anchors.centerIn: parent
+ spacing: 8
+
+ PaletteItem {
+ anchors.verticalCenter: parent.verticalCenter
+ componentFile: "Sun.qml"
+ image: "../images/sun.png"
+ }
+ PaletteItem {
+ anchors.verticalCenter: parent.verticalCenter
+ componentFile: "GenericSceneItem.qml"
+ image: "../images/moon.png"
+ }
+ PaletteItem {
+ anchors.verticalCenter: parent.verticalCenter
+ componentFile: "PerspectiveItem.qml"
+ image: "../images/tree_s.png"
+ }
+ PaletteItem {
+ anchors.verticalCenter: parent.verticalCenter
+ componentFile: "PerspectiveItem.qml"
+ image: "../images/rabbit_brown.png"
+ }
+ PaletteItem {
+ anchors.verticalCenter: parent.verticalCenter
+ componentFile: "PerspectiveItem.qml"
+ image: "../images/rabbit_bw.png"
+ }
+ }
+ }
+
+ Text { text: "Active Suns: " + activeSuns }
+
+ Rectangle { width: parent.width; height: 1; color: "black" }
+
+ Text { text: "Arbitrary QML:" }
+
+ Rectangle {
+ width: 460; height: 240
+
+ TextEdit {
+ id: qmlText
+ anchors.fill: parent; anchors.margins: 5
+ readOnly: false
+ focusOnPress: true
+ font.pixelSize: 14
+
+ text: "import Qt 4.7\nImage {\n id: smile\n x: 500 * Math.random()\n y: 200 * Math.random() \n source: 'images/face-smile.png'\n\n NumberAnimation on opacity { \n to: 0; duration: 1500\n }\n\n Component.onCompleted: smile.destroy(1500);\n}"
+ }
+ }
+
+ Button {
+ text: "Create"
+ onClicked: {
+ try {
+ Qt.createQmlObject(qmlText.text, window, 'CustomObject');
+ } catch(err) {
+ dialog.show('Error on line ' + err.qmlErrors[0].lineNumber + '\n' + err.qmlErrors[0].message);
+ }
+ }
+ }
+ }
+ }
+
+ //Day state, for when a sun is added to the scene
+ states: State {
+ name: "Day"
+ when: window.activeSuns > 0
+
+ PropertyChanges { target: gradientStopA; color: "DeepSkyBlue" }
+ PropertyChanges { target: gradientStopB; color: "SkyBlue" }
+ PropertyChanges { target: stars; opacity: 0 }
+ }
+
+ transitions: Transition {
+ PropertyAnimation { duration: 3000 }
+ ColorAnimation { duration: 3000 }
+ }
+
+}
diff --git a/examples/declarative/animations/animations.qmlproject b/examples/declarative/toys/dynamicscene/dynamicscene.qmlproject
index d4909f8..d4909f8 100644
--- a/examples/declarative/animations/animations.qmlproject
+++ b/examples/declarative/toys/dynamicscene/dynamicscene.qmlproject
diff --git a/examples/declarative/dynamic/images/NOTE b/examples/declarative/toys/dynamicscene/images/NOTE
index fcd87f9..fcd87f9 100644
--- a/examples/declarative/dynamic/images/NOTE
+++ b/examples/declarative/toys/dynamicscene/images/NOTE
diff --git a/examples/declarative/animations/images/face-smile.png b/examples/declarative/toys/dynamicscene/images/face-smile.png
index 3d66d72..3d66d72 100644
--- a/examples/declarative/animations/images/face-smile.png
+++ b/examples/declarative/toys/dynamicscene/images/face-smile.png
Binary files differ
diff --git a/examples/declarative/dynamic/images/moon.png b/examples/declarative/toys/dynamicscene/images/moon.png
index 1c0d606..1c0d606 100644
--- a/examples/declarative/dynamic/images/moon.png
+++ b/examples/declarative/toys/dynamicscene/images/moon.png
Binary files differ
diff --git a/examples/declarative/dynamic/images/rabbit_brown.png b/examples/declarative/toys/dynamicscene/images/rabbit_brown.png
index ebfdeed..ebfdeed 100644
--- a/examples/declarative/dynamic/images/rabbit_brown.png
+++ b/examples/declarative/toys/dynamicscene/images/rabbit_brown.png
Binary files differ
diff --git a/examples/declarative/dynamic/images/rabbit_bw.png b/examples/declarative/toys/dynamicscene/images/rabbit_bw.png
index 7bff9b9..7bff9b9 100644
--- a/examples/declarative/dynamic/images/rabbit_bw.png
+++ b/examples/declarative/toys/dynamicscene/images/rabbit_bw.png
Binary files differ
diff --git a/examples/declarative/animations/images/star.png b/examples/declarative/toys/dynamicscene/images/star.png
index 27ef924..27ef924 100644
--- a/examples/declarative/animations/images/star.png
+++ b/examples/declarative/toys/dynamicscene/images/star.png
Binary files differ
diff --git a/examples/declarative/animations/images/sun.png b/examples/declarative/toys/dynamicscene/images/sun.png
index 7713ca5..7713ca5 100644
--- a/examples/declarative/animations/images/sun.png
+++ b/examples/declarative/toys/dynamicscene/images/sun.png
Binary files differ
diff --git a/examples/declarative/dynamic/images/tree_s.png b/examples/declarative/toys/dynamicscene/images/tree_s.png
index 6eac35a..6eac35a 100644
--- a/examples/declarative/dynamic/images/tree_s.png
+++ b/examples/declarative/toys/dynamicscene/images/tree_s.png
Binary files differ
diff --git a/examples/declarative/toys/dynamicscene/qml/Button.qml b/examples/declarative/toys/dynamicscene/qml/Button.qml
new file mode 100644
index 0000000..963a850
--- /dev/null
+++ b/examples/declarative/toys/dynamicscene/qml/Button.qml
@@ -0,0 +1,40 @@
+import Qt 4.7
+
+Rectangle {
+ id: container
+
+ property variant text
+ signal clicked
+
+ height: text.height + 10; width: text.width + 20
+ border.width: 1
+ radius: 4
+ smooth: true
+
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: !mouseArea.pressed ? activePalette.light : activePalette.button
+ }
+ GradientStop {
+ position: 1.0
+ color: !mouseArea.pressed ? activePalette.button : activePalette.dark
+ }
+ }
+
+ SystemPalette { id: activePalette }
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: container.clicked()
+ }
+
+ Text {
+ id: text
+ anchors.centerIn:parent
+ font.pointSize: 10
+ text: parent.text
+ color: activePalette.buttonText
+ }
+}
diff --git a/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml b/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml
new file mode 100644
index 0000000..dcb5cc3
--- /dev/null
+++ b/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml
@@ -0,0 +1,19 @@
+import Qt 4.7
+import "itemCreation.js" as Code
+
+Image {
+ id: paletteItem
+
+ property string componentFile
+ property string image
+
+ source: image
+
+ MouseArea {
+ anchors.fill: parent
+
+ onPressed: Code.startDrag(mouse);
+ onPositionChanged: Code.continueDrag(mouse);
+ onReleased: Code.endDrag(mouse);
+ }
+}
diff --git a/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml b/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml
new file mode 100644
index 0000000..c04d3dc
--- /dev/null
+++ b/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml
@@ -0,0 +1,25 @@
+import Qt 4.7
+
+Image {
+ id: rootItem
+
+ property bool created: false
+ property string image
+
+ property double scaledBottom: y + (height + height*scale) / 2
+ property bool onLand: scaledBottom > window.height / 2
+
+ source: image
+ opacity: onLand ? 1 : 0.25
+ scale: Math.max((y + height - 250) * 0.01, 0.3)
+ smooth: true
+
+ onCreatedChanged: {
+ if (created && !onLand)
+ rootItem.destroy();
+ else
+ z = scaledBottom;
+ }
+
+ onYChanged: z = scaledBottom;
+}
diff --git a/examples/declarative/toys/dynamicscene/qml/Sun.qml b/examples/declarative/toys/dynamicscene/qml/Sun.qml
new file mode 100644
index 0000000..43dcb9a
--- /dev/null
+++ b/examples/declarative/toys/dynamicscene/qml/Sun.qml
@@ -0,0 +1,38 @@
+import Qt 4.7
+
+Image {
+ id: sun
+
+ property bool created: false
+ property string image: "../images/sun.png"
+
+ source: image
+
+ // once item is created, start moving offscreen
+ NumberAnimation on y {
+ to: window.height / 2
+ running: created
+ onRunningChanged: {
+ if (running)
+ duration = (window.height - sun.y) * 10;
+ else
+ state = "OffScreen"
+ }
+ }
+
+ states: State {
+ name: "OffScreen"
+ StateChangeScript {
+ script: { sun.created = false; sun.destroy() }
+ }
+ }
+
+ onCreatedChanged: {
+ if (created) {
+ sun.z = 1; // above the sky but below the ground layer
+ window.activeSuns++;
+ } else {
+ window.activeSuns--;
+ }
+ }
+}
diff --git a/examples/declarative/toys/dynamicscene/qml/itemCreation.js b/examples/declarative/toys/dynamicscene/qml/itemCreation.js
new file mode 100644
index 0000000..f92dd15
--- /dev/null
+++ b/examples/declarative/toys/dynamicscene/qml/itemCreation.js
@@ -0,0 +1,65 @@
+var itemComponent = null;
+var draggedItem = null;
+var startingMouse;
+var posnInWindow;
+
+function startDrag(mouse)
+{
+ posnInWindow = paletteItem.mapToItem(null, 0, 0);
+ startingMouse = { x: mouse.x, y: mouse.y }
+ loadComponent();
+}
+
+//Creation is split into two functions due to an asynchronous wait while
+//possible external files are loaded.
+
+function loadComponent() {
+ if (itemComponent != null) { // component has been previously loaded
+ createItem();
+ return;
+ }
+
+ itemComponent = Qt.createComponent(paletteItem.componentFile);
+ if (itemComponent.status == Component.Loading) //Depending on the content, it can be ready or error immediately
+ component.statusChanged.connect(createItem);
+ else
+ createItem();
+}
+
+function createItem() {
+ if (itemComponent.status == Component.Ready && draggedItem == null) {
+ draggedItem = itemComponent.createObject(window);
+ draggedItem.image = paletteItem.image;
+ draggedItem.x = posnInWindow.x;
+ draggedItem.y = posnInWindow.y;
+ draggedItem.z = 3; // make sure created item is above the ground layer
+ } else if (itemComponent.status == Component.Error) {
+ draggedItem = null;
+ console.log("error creating component");
+ console.log(component.errorString());
+ }
+}
+
+function continueDrag(mouse)
+{
+ if (draggedItem == null)
+ return;
+
+ draggedItem.x = mouse.x + posnInWindow.x - startingMouse.x;
+ draggedItem.y = mouse.y + posnInWindow.y - startingMouse.y;
+}
+
+function endDrag(mouse)
+{
+ if (draggedItem == null)
+ return;
+
+ if (draggedItem.x + draggedItem.width > toolbox.x) { //Don't drop it in the toolbox
+ draggedItem.destroy();
+ draggedItem = null;
+ } else {
+ draggedItem.created = true;
+ draggedItem = null;
+ }
+}
+
diff --git a/examples/declarative/tic-tac-toe/content/Button.qml b/examples/declarative/toys/tic-tac-toe/content/Button.qml
index ecf18cd..ecf18cd 100644
--- a/examples/declarative/tic-tac-toe/content/Button.qml
+++ b/examples/declarative/toys/tic-tac-toe/content/Button.qml
diff --git a/examples/declarative/tic-tac-toe/content/TicTac.qml b/examples/declarative/toys/tic-tac-toe/content/TicTac.qml
index d247943..d247943 100644
--- a/examples/declarative/tic-tac-toe/content/TicTac.qml
+++ b/examples/declarative/toys/tic-tac-toe/content/TicTac.qml
diff --git a/examples/declarative/tic-tac-toe/content/pics/board.png b/examples/declarative/toys/tic-tac-toe/content/pics/board.png
index 7e5b7ba..7e5b7ba 100644
--- a/examples/declarative/tic-tac-toe/content/pics/board.png
+++ b/examples/declarative/toys/tic-tac-toe/content/pics/board.png
Binary files differ
diff --git a/examples/declarative/tic-tac-toe/content/pics/o.png b/examples/declarative/toys/tic-tac-toe/content/pics/o.png
index abc7ee0..abc7ee0 100644
--- a/examples/declarative/tic-tac-toe/content/pics/o.png
+++ b/examples/declarative/toys/tic-tac-toe/content/pics/o.png
Binary files differ
diff --git a/examples/declarative/tic-tac-toe/content/pics/x.png b/examples/declarative/toys/tic-tac-toe/content/pics/x.png
index ddc65c8..ddc65c8 100644
--- a/examples/declarative/tic-tac-toe/content/pics/x.png
+++ b/examples/declarative/toys/tic-tac-toe/content/pics/x.png
Binary files differ
diff --git a/examples/declarative/tic-tac-toe/content/tic-tac-toe.js b/examples/declarative/toys/tic-tac-toe/content/tic-tac-toe.js
index f8d6d9f..f8d6d9f 100644
--- a/examples/declarative/tic-tac-toe/content/tic-tac-toe.js
+++ b/examples/declarative/toys/tic-tac-toe/content/tic-tac-toe.js
diff --git a/examples/declarative/tic-tac-toe/tic-tac-toe.qml b/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml
index dd13052..dd13052 100644
--- a/examples/declarative/tic-tac-toe/tic-tac-toe.qml
+++ b/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml
diff --git a/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qmlproject b/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/toys/toys.qmlproject b/examples/declarative/toys/toys.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/toys/toys.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/toys/tvtennis/tvtennis.qml b/examples/declarative/toys/tvtennis/tvtennis.qml
new file mode 100644
index 0000000..c90d9c5
--- /dev/null
+++ b/examples/declarative/toys/tvtennis/tvtennis.qml
@@ -0,0 +1,71 @@
+import Qt 4.7
+
+Rectangle {
+ id: page
+ width: 640; height: 480
+ color: "Black"
+
+ // Make a ball to bounce
+ Rectangle {
+ id: ball
+
+ // Add a property for the target y coordinate
+ property int targetY : page.height - 10
+ property variant direction : "right"
+
+ x: 20; width: 20; height: 20; z: 1
+ color: "Lime"
+
+ // Move the ball to the right and back to the left repeatedly
+ SequentialAnimation on x {
+ loops: Animation.Infinite
+ NumberAnimation { to: page.width - 40; duration: 2000 }
+ PropertyAction { target: ball; property: "direction"; value: "left" }
+ NumberAnimation { to: 20; duration: 2000 }
+ PropertyAction { target: ball; property: "direction"; value: "right" }
+ }
+
+ // Make y follow the target y coordinate, with a velocity of 200
+ SpringFollow on y { to: ball.targetY; velocity: 200 }
+
+ // Detect the ball hitting the top or bottom of the view and bounce it
+ onYChanged: {
+ if (y <= 0) {
+ targetY = page.height - 20;
+ } else if (y >= page.height - 20) {
+ targetY = 0;
+ }
+ }
+ }
+
+ // Place bats to the left and right of the view, following the y
+ // coordinates of the ball.
+ Rectangle {
+ id: leftBat
+ color: "Lime"
+ x: 2; width: 20; height: 90
+ SpringFollow on y {
+ to: ball.y - 45; velocity: 300
+ enabled: ball.direction == 'left'
+ }
+ }
+ Rectangle {
+ id: rightBat
+ color: "Lime"
+ x: page.width - 22; width: 20; height: 90
+ SpringFollow on y {
+ to: ball.y-45; velocity: 300
+ enabled: ball.direction == 'right'
+ }
+ }
+
+ // The rest, to make it look realistic, if neither ever scores...
+ Rectangle { color: "Lime"; x: page.width/2-80; y: 0; width: 40; height: 60 }
+ Rectangle { color: "Black"; x: page.width/2-70; y: 10; width: 20; height: 40 }
+ Rectangle { color: "Lime"; x: page.width/2+40; y: 0; width: 40; height: 60 }
+ Rectangle { color: "Black"; x: page.width/2+50; y: 10; width: 20; height: 40 }
+ Repeater {
+ model: page.height / 20
+ Rectangle { color: "Lime"; x: page.width/2-5; y: index * 20; width: 10; height: 10 }
+ }
+}
diff --git a/examples/declarative/toys/tvtennis/tvtennis.qmlproject b/examples/declarative/toys/tvtennis/tvtennis.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/toys/tvtennis/tvtennis.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro b/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro
index 7ec68e9..a8fb565 100644
--- a/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro
+++ b/examples/declarative/tutorials/extending/chapter5-plugins/chapter5-plugins.pro
@@ -13,3 +13,8 @@ SOURCES += musician.cpp \
DESTDIR = lib
OBJECTS_DIR = tmp
MOC_DIR = tmp
+
+symbian {
+ include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+ TARGET.EPOCALLOWDLLDATA = 1
+}
diff --git a/examples/declarative/tutorials/extending/extending.pro b/examples/declarative/tutorials/extending/extending.pro
new file mode 100644
index 0000000..0c86fed
--- /dev/null
+++ b/examples/declarative/tutorials/extending/extending.pro
@@ -0,0 +1,9 @@
+TEMPLATE = subdirs
+
+SUBDIRS += \
+ chapter1-basics \
+ chapter2-methods \
+ chapter3-bindings \
+ chapter4-customPropertyTypes \
+ chapter5-plugins
+
diff --git a/examples/declarative/tutorials/helloworld/tutorial1.qml b/examples/declarative/tutorials/helloworld/tutorial1.qml
index 5e27b45..04cd155 100644
--- a/examples/declarative/tutorials/helloworld/tutorial1.qml
+++ b/examples/declarative/tutorials/helloworld/tutorial1.qml
@@ -14,8 +14,9 @@ Rectangle {
Text {
id: helloText
text: "Hello world!"
+ y: 30
+ anchors.horizontalCenter: page.horizontalCenter
font.pointSize: 24; font.bold: true
- y: 30; anchors.horizontalCenter: page.horizontalCenter
}
//![2]
}
diff --git a/examples/declarative/tutorials/helloworld/tutorial2.qml b/examples/declarative/tutorials/helloworld/tutorial2.qml
index 085efa4..66be509 100644
--- a/examples/declarative/tutorials/helloworld/tutorial2.qml
+++ b/examples/declarative/tutorials/helloworld/tutorial2.qml
@@ -9,8 +9,9 @@ Rectangle {
Text {
id: helloText
text: "Hello world!"
+ y: 30
+ anchors.horizontalCenter: page.horizontalCenter
font.pointSize: 24; font.bold: true
- y: 30; anchors.horizontalCenter: page.horizontalCenter
}
Grid {
diff --git a/examples/declarative/tutorials/helloworld/tutorial3.qml b/examples/declarative/tutorials/helloworld/tutorial3.qml
index 4bf4970..0da762c 100644
--- a/examples/declarative/tutorials/helloworld/tutorial3.qml
+++ b/examples/declarative/tutorials/helloworld/tutorial3.qml
@@ -9,8 +9,9 @@ Rectangle {
Text {
id: helloText
text: "Hello world!"
+ y: 30
+ anchors.horizontalCenter: page.horizontalCenter
font.pointSize: 24; font.bold: true
- y: 30; anchors.horizontalCenter: page.horizontalCenter
//![1]
MouseArea { id: mouseArea; anchors.fill: parent }
@@ -27,7 +28,7 @@ Rectangle {
transitions: Transition {
from: ""; to: "down"; reversible: true
ParallelAnimation {
- NumberAnimation { properties: "y,rotation"; duration: 500; easing.type: "InOutQuad" }
+ NumberAnimation { properties: "y,rotation"; duration: 500; easing.type: Easing.InOutQuad }
ColorAnimation { duration: 500 }
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame1/Block.qml b/examples/declarative/tutorials/samegame/samegame1/Block.qml
index a23654b..11fd844 100644
--- a/examples/declarative/tutorials/samegame/samegame1/Block.qml
+++ b/examples/declarative/tutorials/samegame/samegame1/Block.qml
@@ -7,7 +7,7 @@ Item {
Image {
id: img
anchors.fill: parent
- source: "../shared/pics/redStone.png";
+ source: "../shared/pics/redStone.png"
}
}
//![0]
diff --git a/examples/declarative/tutorials/samegame/samegame1/Button.qml b/examples/declarative/tutorials/samegame/samegame1/Button.qml
index e84b1ce..96a80eb 100644
--- a/examples/declarative/tutorials/samegame/samegame1/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame1/Button.qml
@@ -8,9 +8,9 @@ Rectangle {
signal clicked
- width: buttonLabel.width + 20; height: buttonLabel.height + 6
- smooth: true
+ width: buttonLabel.width + 20; height: buttonLabel.height + 5
border { width: 1; color: Qt.darker(activePalette.button) }
+ smooth: true
radius: 8
// color the button with a gradient
@@ -27,8 +27,17 @@ Rectangle {
GradientStop { position: 1.0; color: activePalette.button }
}
- MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() }
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: container.clicked();
+ }
- Text { id: buttonLabel; text: container.text; anchors.centerIn: container; color: activePalette.buttonText }
+ Text {
+ id: buttonLabel
+ anchors.centerIn: container
+ color: activePalette.buttonText
+ text: container.text
+ }
}
//![0]
diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml
index b6e01fd..f2974be 100644
--- a/examples/declarative/tutorials/samegame/samegame1/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml
@@ -22,21 +22,20 @@ Rectangle {
Rectangle {
id: toolBar
- width: parent.width; height: 32
+ width: parent.width; height: 30
color: activePalette.window
anchors.bottom: screen.bottom
Button {
- anchors { left: parent.left; leftMargin: 3; verticalCenter: parent.verticalCenter }
+ anchors { left: parent.left; verticalCenter: parent.verticalCenter }
text: "New Game"
onClicked: console.log("This doesn't do anything yet...")
}
Text {
id: score
- anchors { right: parent.right; rightMargin: 3; verticalCenter: parent.verticalCenter }
+ anchors { right: parent.right; verticalCenter: parent.verticalCenter }
text: "Score: Who knows?"
- font.bold: true
}
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame2/Block.qml b/examples/declarative/tutorials/samegame/samegame2/Block.qml
index 4e71e60..39da84e 100644
--- a/examples/declarative/tutorials/samegame/samegame2/Block.qml
+++ b/examples/declarative/tutorials/samegame/samegame2/Block.qml
@@ -6,6 +6,6 @@ Item {
Image {
id: img
anchors.fill: parent
- source: "../shared/pics/redStone.png";
+ source: "../shared/pics/redStone.png"
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/declarative/tutorials/samegame/samegame2/Button.qml
index 737d886..4ed856b 100644
--- a/examples/declarative/tutorials/samegame/samegame2/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame2/Button.qml
@@ -7,9 +7,9 @@ Rectangle {
signal clicked
- width: buttonLabel.width + 20; height: buttonLabel.height + 6
- smooth: true
+ width: buttonLabel.width + 20; height: buttonLabel.height + 5
border { width: 1; color: Qt.darker(activePalette.button) }
+ smooth: true
radius: 8
// color the button with a gradient
@@ -26,7 +26,16 @@ Rectangle {
GradientStop { position: 1.0; color: activePalette.button }
}
- MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() }
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: container.clicked();
+ }
- Text { id: buttonLabel; text: container.text; anchors.centerIn: container; color: activePalette.buttonText }
+ Text {
+ id: buttonLabel
+ anchors.centerIn: container
+ color: activePalette.buttonText
+ text: container.text
+ }
}
diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.js b/examples/declarative/tutorials/samegame/samegame2/samegame.js
index e5c790d..c749dc1 100644
--- a/examples/declarative/tutorials/samegame/samegame2/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame2/samegame.js
@@ -37,17 +37,16 @@ function createBlock(column, row) {
if (component == null)
component = Qt.createComponent("Block.qml");
- // Note that if Block.qml was not a local file, component.isReady would be
- // false and we should wait for the component's statusChanged() signal to
- // know when the file is downloaded and fully loaded before calling createObject().
- if (component.isReady) {
- var dynamicObject = component.createObject();
+ // Note that if Block.qml was not a local file, component.status would be
+ // Loading and we should wait for the component's statusChanged() signal to
+ // know when the file is downloaded and ready before calling createObject().
+ if (component.status == Component.Ready) {
+ var dynamicObject = component.createObject(background);
if (dynamicObject == null) {
console.log("error creating block");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
- dynamicObject.parent = background;
dynamicObject.x = column * blockSize;
dynamicObject.y = row * blockSize;
dynamicObject.width = blockSize;
@@ -55,7 +54,7 @@ function createBlock(column, row) {
board[index(column, row)] = dynamicObject;
} else {
console.log("error loading block component");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
return true;
diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml
index a7d1fba..9b4d4d5 100644
--- a/examples/declarative/tutorials/samegame/samegame2/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml
@@ -30,7 +30,7 @@ Rectangle {
//![1]
Button {
- anchors { left: parent.left; leftMargin: 3; verticalCenter: parent.verticalCenter }
+ anchors { left: parent.left; verticalCenter: parent.verticalCenter }
text: "New Game"
onClicked: SameGame.startNewGame()
}
@@ -38,9 +38,8 @@ Rectangle {
Text {
id: score
- anchors { right: parent.right; rightMargin: 3; verticalCenter: parent.verticalCenter }
+ anchors { right: parent.right; verticalCenter: parent.verticalCenter }
text: "Score: Who knows?"
- font.bold: true
}
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame3/Button.qml b/examples/declarative/tutorials/samegame/samegame3/Button.qml
index 737d886..4ed856b 100644
--- a/examples/declarative/tutorials/samegame/samegame3/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/Button.qml
@@ -7,9 +7,9 @@ Rectangle {
signal clicked
- width: buttonLabel.width + 20; height: buttonLabel.height + 6
- smooth: true
+ width: buttonLabel.width + 20; height: buttonLabel.height + 5
border { width: 1; color: Qt.darker(activePalette.button) }
+ smooth: true
radius: 8
// color the button with a gradient
@@ -26,7 +26,16 @@ Rectangle {
GradientStop { position: 1.0; color: activePalette.button }
}
- MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() }
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: container.clicked();
+ }
- Text { id: buttonLabel; text: container.text; anchors.centerIn: container; color: activePalette.buttonText }
+ Text {
+ id: buttonLabel
+ anchors.centerIn: container
+ color: activePalette.buttonText
+ text: container.text
+ }
}
diff --git a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
index 15b3b2f..3efed2f 100644
--- a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml
@@ -2,31 +2,30 @@
import Qt 4.7
Rectangle {
- id: page
+ id: container
- signal closed
-
- function forceClose() {
- page.closed();
- page.opacity = 0;
+ function show(text) {
+ dialogText.text = text;
+ container.opacity = 1;
}
- function show(txt) {
- dialogText.text = txt;
- page.opacity = 1;
+ function hide() {
+ container.opacity = 0;
}
- width: dialogText.width + 20; height: dialogText.height + 20
- color: "white"
- border.width: 1
+ width: dialogText.width + 20
+ height: dialogText.height + 20
opacity: 0
- Behavior on opacity {
- NumberAnimation { duration: 1000 }
+ Text {
+ id: dialogText
+ anchors.centerIn: parent
+ text: ""
}
- Text { id: dialogText; anchors.centerIn: parent; text: "Hello World!" }
-
- MouseArea { anchors.fill: parent; onClicked: forceClose(); }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: hide();
+ }
}
//![0]
diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.js b/examples/declarative/tutorials/samegame/samegame3/samegame.js
index da0f76e..df5bdfb 100644
--- a/examples/declarative/tutorials/samegame/samegame3/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame3/samegame.js
@@ -17,7 +17,7 @@ function startNewGame() {
maxIndex = maxRow * maxColumn;
//Close dialogs
- dialog.forceClose();
+ dialog.hide();
//Initialize Board
board = new Array(maxIndex);
@@ -34,18 +34,17 @@ function createBlock(column, row) {
if (component == null)
component = Qt.createComponent("Block.qml");
- // Note that if Block.qml was not a local file, component.isReady would be
- // false and we should wait for the component's statusChanged() signal to
- // know when the file is downloaded and fully loaded before calling createObject().
- if (component.isReady) {
- var dynamicObject = component.createObject();
+ // Note that if Block.qml was not a local file, component.status would be
+ // Loading and we should wait for the component's statusChanged() signal to
+ // know when the file is downloaded and ready before calling createObject().
+ if (component.status == Component.Ready) {
+ var dynamicObject = component.createObject(gameCanvas);
if (dynamicObject == null) {
console.log("error creating block");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
dynamicObject.type = Math.floor(Math.random() * 3);
- dynamicObject.parent = gameCanvas;
dynamicObject.x = column * gameCanvas.blockSize;
dynamicObject.y = row * gameCanvas.blockSize;
dynamicObject.width = gameCanvas.blockSize;
@@ -53,16 +52,15 @@ function createBlock(column, row) {
board[index(column, row)] = dynamicObject;
} else {
console.log("error loading block component");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
return true;
}
-var fillFound;
-//Set after a floodFill call to the number of blocks found
-var floodBoard;
-//Set to 1 if the floodFill reaches off that node
+var fillFound; //Set after a floodFill call to the number of blocks found
+var floodBoard; //Set to 1 if the floodFill reaches off that node
+
//![1]
function handleClick(xPos, yPos) {
var column = Math.floor(xPos / gameCanvas.blockSize);
diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/declarative/tutorials/samegame/samegame3/samegame.qml
index 50f9d5d..ac93eb1 100644
--- a/examples/declarative/tutorials/samegame/samegame3/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame3/samegame.qml
@@ -30,7 +30,6 @@ Rectangle {
width: parent.width - (parent.width % blockSize)
height: parent.height - (parent.height % blockSize)
anchors.centerIn: parent
- z: 20
MouseArea {
anchors.fill: parent
@@ -41,26 +40,29 @@ Rectangle {
}
//![2]
- Dialog { id: dialog; anchors.centerIn: parent; z: 21 }
+ Dialog {
+ id: dialog
+ anchors.centerIn: parent
+ z: 100
+ }
//![2]
Rectangle {
id: toolBar
- width: parent.width; height: 32
+ width: parent.width; height: 30
color: activePalette.window
anchors.bottom: screen.bottom
Button {
- anchors { left: parent.left; leftMargin: 3; verticalCenter: parent.verticalCenter }
+ anchors { left: parent.left; verticalCenter: parent.verticalCenter }
text: "New Game"
onClicked: SameGame.startNewGame()
}
Text {
id: score
- anchors { right: parent.right; rightMargin: 3; verticalCenter: parent.verticalCenter }
+ anchors { right: parent.right; verticalCenter: parent.verticalCenter }
text: "Score: Who knows?"
- font.bold: true
}
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
index 737d886..4ed856b 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml
@@ -7,9 +7,9 @@ Rectangle {
signal clicked
- width: buttonLabel.width + 20; height: buttonLabel.height + 6
- smooth: true
+ width: buttonLabel.width + 20; height: buttonLabel.height + 5
border { width: 1; color: Qt.darker(activePalette.button) }
+ smooth: true
radius: 8
// color the button with a gradient
@@ -26,7 +26,16 @@ Rectangle {
GradientStop { position: 1.0; color: activePalette.button }
}
- MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() }
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: container.clicked();
+ }
- Text { id: buttonLabel; text: container.text; anchors.centerIn: container; color: activePalette.buttonText }
+ Text {
+ id: buttonLabel
+ anchors.centerIn: container
+ color: activePalette.buttonText
+ text: container.text
+ }
}
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
index 6848534..2f45362 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
@@ -1,30 +1,59 @@
import Qt 4.7
+//![0]
Rectangle {
- id: page
+ id: container
+//![0]
+//![1]
+ property string inputText: textInput.text
signal closed
- function forceClose() {
- page.closed();
- page.opacity = 0;
+ function show(text) {
+ dialogText.text = text;
+ container.opacity = 1;
+ textInput.opacity = 0;
}
- function show(txt) {
- dialogText.text = txt;
- page.opacity = 1;
+ function showWithInput(text) {
+ show(text);
+ textInput.opacity = 1;
+ textInput.text = ""
}
- width: dialogText.width + 20; height: dialogText.height + 20
- color: "white"
- border.width: 1
+ function hide() {
+ container.opacity = 0;
+ container.closed();
+ }
+//![1]
+
+ width: dialogText.width + textInput.width + 20
+ height: dialogText.height + 20
opacity: 0
- Behavior on opacity {
- NumberAnimation { duration: 1000 }
+ Text {
+ id: dialogText
+ anchors { verticalCenter: parent.verticalCenter; left: parent.left; leftMargin: 10 }
+ text: ""
+ }
+
+//![2]
+ TextInput {
+ id: textInput
+ anchors { verticalCenter: parent.verticalCenter; left: dialogText.right }
+ width: 80
+ focus: true
+ text: ""
+
+ onAccepted: container.hide() // close dialog when Enter is pressed
}
+//![2]
- Text { id: dialogText; anchors.centerIn: parent; text: "Hello World!" }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: hide();
+ }
- MouseArea { anchors.fill: parent; onClicked: forceClose(); }
+//![3]
}
+//![3]
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
index 1454f0b..930a3d8 100755
--- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
@@ -25,8 +25,8 @@ function startNewGame() {
maxIndex = maxRow * maxColumn;
//Close dialogs
- nameInputDialog.forceClose();
- dialog.forceClose();
+ nameInputDialog.hide();
+ dialog.hide();
//Initialize Board
board = new Array(maxIndex);
@@ -45,18 +45,17 @@ function createBlock(column, row) {
if (component == null)
component = Qt.createComponent("content/BoomBlock.qml");
- // Note that if Block.qml was not a local file, component.isReady would be
- // false and we should wait for the component's statusChanged() signal to
- // know when the file is downloaded and fully loaded before calling createObject().
- if (component.isReady) {
- var dynamicObject = component.createObject();
+ // Note that if Block.qml was not a local file, component.status would be
+ // Loading and we should wait for the component's statusChanged() signal to
+ // know when the file is downloaded and ready before calling createObject().
+ if (component.status == Component.Ready) {
+ var dynamicObject = component.createObject(gameCanvas);
if (dynamicObject == null) {
console.log("error creating block");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
dynamicObject.type = Math.floor(Math.random() * 3);
- dynamicObject.parent = gameCanvas;
dynamicObject.x = column * gameCanvas.blockSize;
dynamicObject.targetX = column * gameCanvas.blockSize;
dynamicObject.targetY = row * gameCanvas.blockSize;
@@ -66,16 +65,15 @@ function createBlock(column, row) {
board[index(column, row)] = dynamicObject;
} else {
console.log("error loading block component");
- console.log(component.errorsString());
+ console.log(component.errorString());
return false;
}
return true;
}
-var fillFound;
-//Set after a floodFill call to the number of blocks found
-var floodBoard;
-//Set to 1 if the floodFill reaches off that node
+var fillFound; //Set after a floodFill call to the number of blocks found
+var floodBoard; //Set to 1 if the floodFill reaches off that node
+
function handleClick(xPos, yPos) {
var column = Math.floor(xPos / gameCanvas.blockSize);
var row = Math.floor(yPos / gameCanvas.blockSize);
@@ -157,7 +155,9 @@ function shuffleDown() {
}
}
+//![3]
function victoryCheck() {
+//![3]
//Award bonus points if no blocks left
var deservesBonus = true;
for (var column = maxColumn - 1; column >= 0; column--)
@@ -166,12 +166,14 @@ function victoryCheck() {
if (deservesBonus)
gameCanvas.score += 500;
+//![4]
//Check whether game has finished
if (deservesBonus || !(floodMoveCheck(0, maxRow - 1, -1))) {
gameDuration = new Date() - gameDuration;
- nameInputDialog.show("You won! Please enter your name: ");
+ nameInputDialog.showWithInput("You won! Please enter your name: ");
}
}
+//![4]
//only floods up and right, to see if it can find adjacent same-typed blocks
function floodMoveCheck(column, row, type) {
diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
index 404af0a..feb61fd 100644
--- a/examples/declarative/tutorials/samegame/samegame4/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
@@ -25,7 +25,7 @@ Rectangle {
property int score: 0
property int blockSize: 40
- z: 20; anchors.centerIn: parent
+ anchors.centerIn: parent
width: parent.width - (parent.width % blockSize);
height: parent.height - (parent.height % blockSize);
@@ -35,53 +35,41 @@ Rectangle {
}
}
- Dialog { id: dialog; anchors.centerIn: parent; z: 21 }
+ Dialog {
+ id: dialog
+ anchors.centerIn: parent
+ z: 100
+ }
//![0]
Dialog {
id: nameInputDialog
-
anchors.centerIn: parent
- z: 22
+ z: 100
- Text {
- id: dialogText
- opacity: 0
- text: " You won! Please enter your name:"
- }
-
- TextInput {
- id: nameInput
- width: 72
- anchors { verticalCenter: parent.verticalCenter; left: dialogText.right }
- focus: true
-
- onAccepted: {
- if (nameInputDialog.opacity == 1 && nameInput.text != "")
- SameGame.saveHighScore(nameInput.text);
- nameInputDialog.forceClose();
- }
+ onClosed: {
+ if (nameInputDialog.inputText != "")
+ SameGame.saveHighScore(nameInputDialog.inputText);
}
}
//![0]
Rectangle {
id: toolBar
- width: parent.width; height: 32
+ width: parent.width; height: 30
color: activePalette.window
anchors.bottom: screen.bottom
Button {
- anchors { left: parent.left; leftMargin: 3; verticalCenter: parent.verticalCenter }
+ anchors { left: parent.left; verticalCenter: parent.verticalCenter }
text: "New Game"
onClicked: SameGame.startNewGame()
}
Text {
id: score
- anchors { right: parent.right; rightMargin: 3; verticalCenter: parent.verticalCenter }
+ anchors { right: parent.right; verticalCenter: parent.verticalCenter }
text: "Score: " + gameCanvas.score
- font.bold: true
}
}
}
diff --git a/examples/declarative/tutorials/tutorials.pro b/examples/declarative/tutorials/tutorials.pro
new file mode 100644
index 0000000..0a82c1e
--- /dev/null
+++ b/examples/declarative/tutorials/tutorials.pro
@@ -0,0 +1,5 @@
+TEMPLATE = subdirs
+
+SUBDIRS += \
+ extending
+
diff --git a/examples/declarative/tvtennis/click.wav b/examples/declarative/tvtennis/click.wav
deleted file mode 100644
index 26c46f8..0000000
--- a/examples/declarative/tvtennis/click.wav
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/tvtennis/paddle.wav b/examples/declarative/tvtennis/paddle.wav
deleted file mode 100644
index 604e0e5..0000000
--- a/examples/declarative/tvtennis/paddle.wav
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/tvtennis/tvtennis.qml b/examples/declarative/tvtennis/tvtennis.qml
deleted file mode 100644
index 354a16f..0000000
--- a/examples/declarative/tvtennis/tvtennis.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-import Qt 4.7
-import Qt.multimedia 4.7
-
-Rectangle {
- id: page
- width: 640; height: 480
- color: "Black"
-
- // Make a ball to bounce
- Rectangle {
- id: ball
-
- // Add a property for the target y coordinate
- property int targetY : page.height - 10
- property variant direction : "right"
-
- x: 20; width: 20; height: 20; z: 1
- color: "Lime"
-
- SoundEffect { id: paddle; source: "paddle.wav" }
- SoundEffect { id: wall; source: "click.wav" }
-
- // Move the ball to the right and back to the left repeatedly
- SequentialAnimation on x {
- loops: Animation.Infinite
- NumberAnimation { to: page.width - 40; duration: 2000 }
- ScriptAction { script: paddle.play() }
- PropertyAction { target: ball; property: "direction"; value: "left" }
- NumberAnimation { to: 20; duration: 2000 }
- ScriptAction { script: paddle.play() }
- PropertyAction { target: ball; property: "direction"; value: "right" }
- }
-
- // Make y follow the target y coordinate, with a velocity of 200
- SpringFollow on y { to: ball.targetY; velocity: 200 }
-
- // Detect the ball hitting the top or bottom of the view and bounce it
- onYChanged: {
- if (y <= 0) {
- wall.play();
- targetY = page.height - 20;
- } else if (y >= page.height - 20) {
- wall.play();
- targetY = 0;
- }
- }
- }
-
- // Place bats to the left and right of the view, following the y
- // coordinates of the ball.
- Rectangle {
- id: leftBat
- color: "Lime"
- x: 2; width: 20; height: 90
- SpringFollow on y {
- to: ball.y - 45; velocity: 300
- enabled: ball.direction == 'left'
- }
- }
- Rectangle {
- id: rightBat
- color: "Lime"
- x: page.width - 22; width: 20; height: 90
- SpringFollow on y {
- to: ball.y-45; velocity: 300
- enabled: ball.direction == 'right'
- }
- }
-
- // The rest, to make it look realistic, if neither ever scores...
- Rectangle { color: "Lime"; x: page.width/2-80; y: 0; width: 40; height: 60 }
- Rectangle { color: "Black"; x: page.width/2-70; y: 10; width: 20; height: 40 }
- Rectangle { color: "Lime"; x: page.width/2+40; y: 0; width: 40; height: 60 }
- Rectangle { color: "Black"; x: page.width/2+50; y: 10; width: 20; height: 40 }
- Repeater {
- model: page.height / 20
- Rectangle { color: "Lime"; x: page.width/2-5; y: index * 20; width: 10; height: 10 }
- }
-}
diff --git a/examples/declarative/flipable/content/5_heart.png b/examples/declarative/ui-components/flipable/content/5_heart.png
index fb59d81..fb59d81 100644
--- a/examples/declarative/flipable/content/5_heart.png
+++ b/examples/declarative/ui-components/flipable/content/5_heart.png
Binary files differ
diff --git a/examples/declarative/flipable/content/9_club.png b/examples/declarative/ui-components/flipable/content/9_club.png
index 2545001..2545001 100644
--- a/examples/declarative/flipable/content/9_club.png
+++ b/examples/declarative/ui-components/flipable/content/9_club.png
Binary files differ
diff --git a/examples/declarative/flipable/content/Card.qml b/examples/declarative/ui-components/flipable/content/Card.qml
index 2577d89..2577d89 100644
--- a/examples/declarative/flipable/content/Card.qml
+++ b/examples/declarative/ui-components/flipable/content/Card.qml
diff --git a/examples/declarative/flipable/content/back.png b/examples/declarative/ui-components/flipable/content/back.png
index f715d74..f715d74 100644
--- a/examples/declarative/flipable/content/back.png
+++ b/examples/declarative/ui-components/flipable/content/back.png
Binary files differ
diff --git a/examples/declarative/flipable/flipable-example.qml b/examples/declarative/ui-components/flipable/flipable-example.qml
index 4e09569..4e09569 100644
--- a/examples/declarative/flipable/flipable-example.qml
+++ b/examples/declarative/ui-components/flipable/flipable-example.qml
diff --git a/examples/declarative/ui-components/flipable/flipable.qmlproject b/examples/declarative/ui-components/flipable/flipable.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/ui-components/flipable/flipable.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/progressbar/content/ProgressBar.qml b/examples/declarative/ui-components/progressbar/content/ProgressBar.qml
index bc36df5..bc36df5 100644
--- a/examples/declarative/progressbar/content/ProgressBar.qml
+++ b/examples/declarative/ui-components/progressbar/content/ProgressBar.qml
diff --git a/examples/declarative/progressbar/content/background.png b/examples/declarative/ui-components/progressbar/content/background.png
index 9044226..9044226 100644
--- a/examples/declarative/progressbar/content/background.png
+++ b/examples/declarative/ui-components/progressbar/content/background.png
Binary files differ
diff --git a/examples/declarative/ui-components/progressbar/progressbar.qmlproject b/examples/declarative/ui-components/progressbar/progressbar.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/ui-components/progressbar/progressbar.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/progressbar/progressbars.qml b/examples/declarative/ui-components/progressbar/progressbars.qml
index 55fd682..55fd682 100644
--- a/examples/declarative/progressbar/progressbars.qml
+++ b/examples/declarative/ui-components/progressbar/progressbars.qml
diff --git a/examples/declarative/ui-components/scrollbar/ScrollBar.qml b/examples/declarative/ui-components/scrollbar/ScrollBar.qml
new file mode 100644
index 0000000..c628a20
--- /dev/null
+++ b/examples/declarative/ui-components/scrollbar/ScrollBar.qml
@@ -0,0 +1,33 @@
+import Qt 4.7
+
+Item {
+ id: scrollBar
+
+ // The properties that define the scrollbar's state.
+ // position and pageSize are in the range 0.0 - 1.0. They are relative to the
+ // height of the page, i.e. a pageSize of 0.5 means that you can see 50%
+ // of the height of the view.
+ // orientation can be either Qt.Vertical or Qt.Horizontal
+ property real position
+ property real pageSize
+ property variant orientation : Qt.Vertical
+
+ // A light, semi-transparent background
+ Rectangle {
+ id: background
+ anchors.fill: parent
+ radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1)
+ color: "white"
+ opacity: 0.3
+ }
+ // Size the bar to the required size, depending upon the orientation.
+ Rectangle {
+ x: orientation == Qt.Vertical ? 1 : (scrollBar.position * (scrollBar.width-2) + 1)
+ y: orientation == Qt.Vertical ? (scrollBar.position * (scrollBar.height-2) + 1) : 1
+ width: orientation == Qt.Vertical ? (parent.width-2) : (scrollBar.pageSize * (scrollBar.width-2))
+ height: orientation == Qt.Vertical ? (scrollBar.pageSize * (scrollBar.height-2)) : (parent.height-2)
+ radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1)
+ color: "black"
+ opacity: 0.7
+ }
+}
diff --git a/examples/declarative/ui-components/scrollbar/display.qml b/examples/declarative/ui-components/scrollbar/display.qml
new file mode 100644
index 0000000..6b12d85
--- /dev/null
+++ b/examples/declarative/ui-components/scrollbar/display.qml
@@ -0,0 +1,54 @@
+import Qt 4.7
+
+Rectangle {
+ width: 640
+ height: 480
+
+ // Create a flickable to view a large image.
+ Flickable {
+ id: view
+ anchors.fill: parent
+ contentWidth: picture.width
+ contentHeight: picture.height
+
+ Image {
+ id: picture
+ source: "pics/niagara_falls.jpg"
+ asynchronous: true
+ }
+
+ // Only show the scrollbars when the view is moving.
+ states: State {
+ name: "ShowBars"
+ when: view.movingVertically || view.movingHorizontally
+ PropertyChanges { target: verticalScrollBar; opacity: 1 }
+ PropertyChanges { target: horizontalScrollBar; opacity: 1 }
+ }
+
+ transitions: Transition {
+ from: "*"; to: "*"
+ NumberAnimation { properties: "opacity"; duration: 400 }
+ }
+ }
+
+ // Attach scrollbars to the right and bottom edges of the view.
+ ScrollBar {
+ id: verticalScrollBar
+ width: 12; height: view.height-12
+ anchors.right: view.right
+ opacity: 0
+ orientation: Qt.Vertical
+ position: view.visibleArea.yPosition
+ pageSize: view.visibleArea.heightRatio
+ }
+
+ ScrollBar {
+ id: horizontalScrollBar
+ width: view.width-12; height: 12
+ anchors.bottom: view.bottom
+ opacity: 0
+ orientation: Qt.Horizontal
+ position: view.visibleArea.xPosition
+ pageSize: view.visibleArea.widthRatio
+ }
+}
diff --git a/examples/declarative/scrollbar/pics/niagara_falls.jpg b/examples/declarative/ui-components/scrollbar/pics/niagara_falls.jpg
index 618d808..618d808 100644
--- a/examples/declarative/scrollbar/pics/niagara_falls.jpg
+++ b/examples/declarative/ui-components/scrollbar/pics/niagara_falls.jpg
Binary files differ
diff --git a/examples/declarative/ui-components/scrollbar/scrollbar.qmlproject b/examples/declarative/ui-components/scrollbar/scrollbar.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/ui-components/scrollbar/scrollbar.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/searchbox/SearchBox.qml b/examples/declarative/ui-components/searchbox/SearchBox.qml
index aae7ee9..aae7ee9 100644
--- a/examples/declarative/searchbox/SearchBox.qml
+++ b/examples/declarative/ui-components/searchbox/SearchBox.qml
diff --git a/examples/declarative/searchbox/images/edit-clear-locationbar-rtl.png b/examples/declarative/ui-components/searchbox/images/edit-clear-locationbar-rtl.png
index 91eb270..91eb270 100644
--- a/examples/declarative/searchbox/images/edit-clear-locationbar-rtl.png
+++ b/examples/declarative/ui-components/searchbox/images/edit-clear-locationbar-rtl.png
Binary files differ
diff --git a/examples/declarative/searchbox/images/lineedit-bg-focus.png b/examples/declarative/ui-components/searchbox/images/lineedit-bg-focus.png
index bbfac38..bbfac38 100644
--- a/examples/declarative/searchbox/images/lineedit-bg-focus.png
+++ b/examples/declarative/ui-components/searchbox/images/lineedit-bg-focus.png
Binary files differ
diff --git a/examples/declarative/searchbox/images/lineedit-bg.png b/examples/declarative/ui-components/searchbox/images/lineedit-bg.png
index 9044226..9044226 100644
--- a/examples/declarative/searchbox/images/lineedit-bg.png
+++ b/examples/declarative/ui-components/searchbox/images/lineedit-bg.png
Binary files differ
diff --git a/examples/declarative/searchbox/main.qml b/examples/declarative/ui-components/searchbox/main.qml
index 9f73473..9f73473 100644
--- a/examples/declarative/searchbox/main.qml
+++ b/examples/declarative/ui-components/searchbox/main.qml
diff --git a/examples/declarative/ui-components/searchbox/searchbox.qmlproject b/examples/declarative/ui-components/searchbox/searchbox.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/ui-components/searchbox/searchbox.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/ui-components/slideswitch/content/Switch.qml b/examples/declarative/ui-components/slideswitch/content/Switch.qml
new file mode 100644
index 0000000..526a171
--- /dev/null
+++ b/examples/declarative/ui-components/slideswitch/content/Switch.qml
@@ -0,0 +1,76 @@
+//![0]
+import Qt 4.7
+
+Item {
+ id: toggleswitch
+ width: background.width; height: background.height
+
+//![1]
+ property bool on: false
+//![1]
+
+//![2]
+ function toggle() {
+ if (toggleswitch.state == "on")
+ toggleswitch.state = "off";
+ else toggleswitch.state = "on";
+ }
+//![2]
+
+//![3]
+ function dorelease() {
+ if (knob.x == 1) {
+ if (toggleswitch.state == "off") return;
+ }
+ if (knob.x == 78) {
+ if (toggleswitch.state == "on") return;
+ }
+ toggle();
+ }
+//![3]
+
+//![4]
+ Image {
+ id: background
+ source: "background.svg"
+ MouseArea { anchors.fill: parent; onClicked: toggle() }
+ }
+//![4]
+
+//![5]
+ Image {
+ id: knob
+ x: 1; y: 2
+ source: "knob.svg"
+
+ MouseArea {
+ anchors.fill: parent
+ drag.target: knob; drag.axis: Drag.XAxis; drag.minimumX: 1; drag.maximumX: 78
+ onClicked: toggle()
+ onReleased: dorelease()
+ }
+ }
+//![5]
+
+//![6]
+ states: [
+ State {
+ name: "on"
+ PropertyChanges { target: knob; x: 78 }
+ PropertyChanges { target: toggleswitch; on: true }
+ },
+ State {
+ name: "off"
+ PropertyChanges { target: knob; x: 1 }
+ PropertyChanges { target: toggleswitch; on: false }
+ }
+ ]
+//![6]
+
+//![7]
+ transitions: Transition {
+ NumberAnimation { properties: "x"; easing.type: Easing.InOutQuad; duration: 200 }
+ }
+//![7]
+}
+//![0]
diff --git a/examples/declarative/slideswitch/content/background.svg b/examples/declarative/ui-components/slideswitch/content/background.svg
index f920d3e..f920d3e 100644
--- a/examples/declarative/slideswitch/content/background.svg
+++ b/examples/declarative/ui-components/slideswitch/content/background.svg
diff --git a/examples/declarative/slideswitch/content/knob.svg b/examples/declarative/ui-components/slideswitch/content/knob.svg
index fb69337..fb69337 100644
--- a/examples/declarative/slideswitch/content/knob.svg
+++ b/examples/declarative/ui-components/slideswitch/content/knob.svg
diff --git a/examples/declarative/slideswitch/slideswitch.qml b/examples/declarative/ui-components/slideswitch/slideswitch.qml
index 51c3c77..51c3c77 100644
--- a/examples/declarative/slideswitch/slideswitch.qml
+++ b/examples/declarative/ui-components/slideswitch/slideswitch.qml
diff --git a/examples/declarative/ui-components/slideswitch/slideswitch.qmlproject b/examples/declarative/ui-components/slideswitch/slideswitch.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/ui-components/slideswitch/slideswitch.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/ui-components/spinner/content/Spinner.qml b/examples/declarative/ui-components/spinner/content/Spinner.qml
new file mode 100644
index 0000000..8145a28
--- /dev/null
+++ b/examples/declarative/ui-components/spinner/content/Spinner.qml
@@ -0,0 +1,25 @@
+import Qt 4.7
+
+Image {
+ property alias model: view.model
+ property alias delegate: view.delegate
+ property alias currentIndex: view.currentIndex
+ property real itemHeight: 30
+ source: "spinner-bg.png"
+ clip: true
+ PathView {
+ id: view
+ anchors.fill: parent
+ pathItemCount: height/itemHeight
+ preferredHighlightBegin: 0.5
+ preferredHighlightEnd: 0.5
+ highlight: Image { source: "spinner-select.png"; width: view.width; height: itemHeight+4 }
+ dragMargin: view.width/2
+ path: Path {
+ startX: view.width/2; startY: -itemHeight/2
+ PathLine { x: view.width/2; y: view.pathItemCount*itemHeight + itemHeight }
+ }
+ }
+ Keys.onDownPressed: view.incrementCurrentIndex()
+ Keys.onUpPressed: view.decrementCurrentIndex()
+}
diff --git a/examples/declarative/ui-components/spinner/content/spinner-bg.png b/examples/declarative/ui-components/spinner/content/spinner-bg.png
new file mode 100644
index 0000000..b3556f1
--- /dev/null
+++ b/examples/declarative/ui-components/spinner/content/spinner-bg.png
Binary files differ
diff --git a/examples/declarative/ui-components/spinner/content/spinner-select.png b/examples/declarative/ui-components/spinner/content/spinner-select.png
new file mode 100644
index 0000000..95a17a1
--- /dev/null
+++ b/examples/declarative/ui-components/spinner/content/spinner-select.png
Binary files differ
diff --git a/examples/declarative/ui-components/spinner/main.qml b/examples/declarative/ui-components/spinner/main.qml
new file mode 100644
index 0000000..6be567a
--- /dev/null
+++ b/examples/declarative/ui-components/spinner/main.qml
@@ -0,0 +1,18 @@
+import Qt 4.7
+import "content"
+
+Rectangle {
+ width: 240; height: 320
+ Column {
+ y: 20; x: 20; spacing: 20
+ Spinner {
+ id: spinner
+ width: 200; height: 240
+ focus: true
+ model: 20
+ itemHeight: 30
+ delegate: Text { font.pixelSize: 25; text: index; height: 30 }
+ }
+ Text { text: "Current item index: " + spinner.currentIndex }
+ }
+}
diff --git a/examples/declarative/ui-components/spinner/spinner.qmlproject b/examples/declarative/ui-components/spinner/spinner.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/ui-components/spinner/spinner.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/tabwidget/TabWidget.qml b/examples/declarative/ui-components/tabwidget/TabWidget.qml
index 26d25b4..26d25b4 100644
--- a/examples/declarative/tabwidget/TabWidget.qml
+++ b/examples/declarative/ui-components/tabwidget/TabWidget.qml
diff --git a/examples/declarative/tabwidget/tab.png b/examples/declarative/ui-components/tabwidget/tab.png
index ad80216..ad80216 100644
--- a/examples/declarative/tabwidget/tab.png
+++ b/examples/declarative/ui-components/tabwidget/tab.png
Binary files differ
diff --git a/examples/declarative/tabwidget/tabs.qml b/examples/declarative/ui-components/tabwidget/tabs.qml
index fba203c..fba203c 100644
--- a/examples/declarative/tabwidget/tabs.qml
+++ b/examples/declarative/ui-components/tabwidget/tabs.qml
diff --git a/examples/declarative/ui-components/tabwidget/tabwidget.qmlproject b/examples/declarative/ui-components/tabwidget/tabwidget.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/ui-components/tabwidget/tabwidget.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/ui-components/ui-components.qmlproject b/examples/declarative/ui-components/ui-components.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/ui-components/ui-components.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/velocity/Day.qml b/examples/declarative/velocity/Day.qml
deleted file mode 100644
index 433295b..0000000
--- a/examples/declarative/velocity/Day.qml
+++ /dev/null
@@ -1,101 +0,0 @@
-import Qt 4.7
-
-Component {
- Item {
- property variant stickies
-
- id: page
- width: 840; height: 480
-
- Image { source: "cork.jpg" }
-
- Text {
- text: name; x: 15; y: 8; height: 40; width: 370
- font.pixelSize: 18; font.bold: true; color: "white"
- style: Text.Outline; styleColor: "black"
- }
-
- Repeater {
- model: notes
- Item {
- id: stickyPage
-
- property int randomX: Math.random() * 500 + 100
- property int randomY: Math.random() * 200 + 50
-
- x: randomX; y: randomY
-
- SpringFollow on rotation {
- to: -flickable.horizontalVelocity / 100
- spring: 2.0; damping: 0.15
- }
-
- Item {
- id: sticky
- scale: 0.7
-
- Image {
- id: stickyImage
- x: 8 + -width * 0.6 / 2; y: -20
- source: "note-yellow.png"
- scale: 0.6; transformOrigin: Item.TopLeft
- smooth: true
- }
-
- TextEdit {
- id: myText
- x: -104; y: 36; width: 215; height: 200
- smooth: true
- font.pixelSize: 24
- readOnly: false
- rotation: -8
- text: noteText
- }
-
- Item {
- x: stickyImage.x; y: -20
- width: stickyImage.width * stickyImage.scale
- height: stickyImage.height * stickyImage.scale
-
- MouseArea {
- id: mouse
- anchors.fill: parent
- drag.target: stickyPage
- drag.axis: "XandYAxis"
- drag.minimumY: 0
- drag.maximumY: page.height - 80
- drag.minimumX: 100
- drag.maximumX: page.width - 140
- onClicked: { myText.focus = true }
- }
- }
- }
-
- Image {
- x: -width / 2; y: -height * 0.5 / 2
- source: "tack.png"
- scale: 0.7; transformOrigin: Item.TopLeft
- }
-
- states: State {
- name: "pressed"
- when: mouse.pressed
- PropertyChanges { target: sticky; rotation: 8; scale: 1 }
- PropertyChanges { target: page; z: 8 }
- }
-
- transitions: Transition {
- NumberAnimation { properties: "rotation,scale"; duration: 200 }
- }
- }
- }
- }
-}
-
-
-
-
-
-
-
-
diff --git a/examples/declarative/webview/alerts.qml b/examples/declarative/webview/alerts.qml
deleted file mode 100644
index 6a5a0d2..0000000
--- a/examples/declarative/webview/alerts.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-import Qt 4.7
-import org.webkit 1.0
-
-WebView {
- id: webView
- width: 120
- height: 150
- url: "alerts.html"
-
- onAlert: popup.show(message)
-
- Rectangle {
- id: popup
-
- color: "red"
- border.color: "black"; border.width: 2
- radius: 4
-
- y: parent.height // off "screen"
- anchors.horizontalCenter: parent.horizontalCenter
- width: label.width+5
- height: label.height+5
-
- opacity: 0
-
- function show(t) {
- label.text = t
- popup.state = "visible"
- timer.start()
- }
- states: State {
- name: "visible"
- PropertyChanges { target: popup; opacity: 1 }
- PropertyChanges { target: popup; y: (webView.height-popup.height)/2 }
- }
-
- transitions: [
- Transition { from: ""; PropertyAnimation { properties: "opacity,y"; duration: 65 } },
- Transition { from: "visible"; PropertyAnimation { properties: "opacity,y"; duration: 500 } }
- ]
-
- Timer {
- id: timer
- interval: 1000
- onTriggered: popup.state = ""
- }
-
- Text {
- id: label
- anchors.centerIn: parent
- color: "white"
- font.pixelSize: 20
- width: webView.width*0.75
- wrapMode: Text.WordWrap
- horizontalAlignment: "AlignHCenter"
- }
- }
-}
diff --git a/examples/declarative/xml/xml.qmlproject b/examples/declarative/xml/xml.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/xml/xml.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/xmlhttprequest/test.qml b/examples/declarative/xml/xmlhttprequest/test.qml
index c7e7e6d..c7e7e6d 100644
--- a/examples/declarative/xmlhttprequest/test.qml
+++ b/examples/declarative/xml/xmlhttprequest/test.qml
diff --git a/examples/declarative/xmlhttprequest/test.xml b/examples/declarative/xml/xmlhttprequest/test.xml
index 8b7f1e1..8b7f1e1 100644
--- a/examples/declarative/xmlhttprequest/test.xml
+++ b/examples/declarative/xml/xmlhttprequest/test.xml
diff --git a/examples/declarative/xml/xmlhttprequest/xmlhttprequest.qmlproject b/examples/declarative/xml/xmlhttprequest/xmlhttprequest.qmlproject
new file mode 100644
index 0000000..d4909f8
--- /dev/null
+++ b/examples/declarative/xml/xmlhttprequest/xmlhttprequest.qmlproject
@@ -0,0 +1,16 @@
+import QmlProject 1.0
+
+Project {
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ " ../exampleplugin " ]
+}
diff --git a/examples/declarative/xmldata/daringfireball.qml b/examples/declarative/xmldata/daringfireball.qml
deleted file mode 100644
index a1df809..0000000
--- a/examples/declarative/xmldata/daringfireball.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- color: "white"
- width: 600; height: 600
-
- XmlListModel {
- id: feedModel
- source: "http://daringfireball.net/index.xml"
- query: "/feed/entry"
- namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';"
- XmlRole { name: "title"; query: "title/string()" }
- XmlRole { name: "tagline"; query: "author/name/string()" }
- XmlRole { name: "content"; query: "content/string()" }
- }
-
- Component {
- id: feedDelegate
- Item {
- height: childrenRect.height + 20
- Text {
- id: titleText
- x: 10
- text: title; font.bold: true
- }
- Text {
- anchors { left: titleText.right; leftMargin: 10 }
- text: 'by ' + tagline
- font.italic: true
- }
- Text {
- x: 10
- width: 580
- anchors.top: titleText.bottom
- text: content
- wrapMode: Text.WordWrap
-
- onLinkActivated: { console.log('link clicked: ' + link) }
- }
- }
- }
-
- ListView {
- anchors.fill: parent
- model: feedModel
- delegate: feedDelegate
- }
-}
diff --git a/examples/declarative/xmldata/yahoonews.qml b/examples/declarative/xmldata/yahoonews.qml
deleted file mode 100644
index 668778e..0000000
--- a/examples/declarative/xmldata/yahoonews.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-import Qt 4.7
-
-Rectangle {
- width: 600; height: 600
-
- gradient: Gradient {
- GradientStop { position: 0; color: "black" }
- GradientStop { position: 1.0; color: "#AAAAAA" }
- }
-
- XmlListModel {
- id: feedModel
- source: "http://rss.news.yahoo.com/rss/oceania"
- query: "/rss/channel/item"
- XmlRole { name: "title"; query: "title/string()" }
- XmlRole { name: "link"; query: "link/string()" }
- XmlRole { name: "description"; query: "description/string()" }
- }
-
- Component {
- id: feedDelegate
-
- Item {
- id: delegate
- height: wrapper.height + 10
-
- MouseArea {
- anchors.fill: wrapper
- onPressed: delegate.ListView.view.currentIndex = index;
- onClicked: if (wrapper.state == 'Details') wrapper.state = ''; else wrapper.state = 'Details';
- }
-
- Rectangle {
- id: wrapper
-
- width: 580; y: 5; height: titleText.height + 10
- color: "#F0F0F0"
- radius: 5
-
- Text {
- id: titleText
- x: 10; y: 5
- text: '<a href=\'' + link + '\'>' + title + '</a>'
- font { bold: true; family: "Helvetica"; pointSize: 14 }
-
- onLinkActivated: { console.log('link clicked: ' + link) }
- }
-
- Text {
- id: descriptionText
- x: 10; width: 560
- anchors.top: titleText.bottom; anchors.topMargin: 5
- text: description
- wrapMode: Text.WordWrap
- font.family: "Helvetica"
- opacity: 0
- }
-
- states: State {
- name: "Details"
- PropertyChanges { target: wrapper; height: childrenRect.height + 10 }
- PropertyChanges { target: descriptionText; opacity: 1 }
- }
-
- transitions: Transition {
- from: "*"; to: "Details"; reversible: true
- SequentialAnimation {
- NumberAnimation { duration: 200; properties: "height"; easing.type: "OutQuad" }
- NumberAnimation { duration: 200; properties: "opacity" }
- }
- }
- }
- }
- }
-
- ListView {
- id: list
- x: 10; y: 10
- width: parent.width - 20; height: parent.height - 20
- model: feedModel
- delegate: feedDelegate
- }
-}
diff --git a/examples/graphicsview/padnavigator/backside.ui b/examples/graphicsview/padnavigator/backside.ui
deleted file mode 100644
index afa488c..0000000
--- a/examples/graphicsview/padnavigator/backside.ui
+++ /dev/null
@@ -1,208 +0,0 @@
-<ui version="4.0" >
- <class>BackSide</class>
- <widget class="QWidget" name="BackSide" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>378</width>
- <height>385</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>BackSide</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2" >
- <item>
- <widget class="QGroupBox" name="groupBox" >
- <property name="title" >
- <string>Settings</string>
- </property>
- <property name="flat" >
- <bool>true</bool>
- </property>
- <property name="checkable" >
- <bool>true</bool>
- </property>
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>Title:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="hostName" >
- <property name="text" >
- <string>Pad Navigator Example</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_2" >
- <property name="text" >
- <string>Modified:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="label_3" >
- <property name="text" >
- <string>Extent</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <layout class="QHBoxLayout" name="horizontalLayout" >
- <item>
- <widget class="QSlider" name="horizontalSlider" >
- <property name="value" >
- <number>42</number>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="spinBox" >
- <property name="value" >
- <number>42</number>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="1" column="1" >
- <widget class="QDateTimeEdit" name="dateTimeEdit" />
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_2" >
- <property name="title" >
- <string>Other input</string>
- </property>
- <property name="flat" >
- <bool>true</bool>
- </property>
- <property name="checkable" >
- <bool>true</bool>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2" >
- <item>
- <widget class="QTreeWidget" name="treeWidget" >
- <column>
- <property name="text" >
- <string>Widgets On Graphics View</string>
- </property>
- </column>
- <item>
- <property name="text" >
- <string>QGraphicsProxyWidget</string>
- </property>
- <item>
- <property name="text" >
- <string>QGraphicsWidget</string>
- </property>
- <item>
- <property name="text" >
- <string>QObject</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>QGraphicsItem</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>QGraphicsLayoutItem</string>
- </property>
- </item>
- </item>
- </item>
- <item>
- <property name="text" >
- <string>QGraphicsGridLayout</string>
- </property>
- <item>
- <property name="text" >
- <string>QGraphicsLayout</string>
- </property>
- <item>
- <property name="text" >
- <string>QGraphicsLayoutItem</string>
- </property>
- </item>
- </item>
- </item>
- <item>
- <property name="text" >
- <string>QGraphicsLinearLayout</string>
- </property>
- <item>
- <property name="text" >
- <string>QGraphicsLayout</string>
- </property>
- <item>
- <property name="text" >
- <string>QGraphicsLayoutItem</string>
- </property>
- </item>
- </item>
- </item>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <tabstops>
- <tabstop>groupBox</tabstop>
- <tabstop>hostName</tabstop>
- <tabstop>dateTimeEdit</tabstop>
- <tabstop>horizontalSlider</tabstop>
- <tabstop>spinBox</tabstop>
- <tabstop>groupBox_2</tabstop>
- <tabstop>treeWidget</tabstop>
- </tabstops>
- <resources/>
- <connections>
- <connection>
- <sender>horizontalSlider</sender>
- <signal>valueChanged(int)</signal>
- <receiver>spinBox</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>184</x>
- <y>125</y>
- </hint>
- <hint type="destinationlabel" >
- <x>275</x>
- <y>127</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>spinBox</sender>
- <signal>valueChanged(int)</signal>
- <receiver>horizontalSlider</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>272</x>
- <y>114</y>
- </hint>
- <hint type="destinationlabel" >
- <x>190</x>
- <y>126</y>
- </hint>
- </hints>
- </connection>
- </connections>
-</ui>
diff --git a/examples/graphicsview/padnavigator/flippablepad.cpp b/examples/graphicsview/padnavigator/flippablepad.cpp
new file mode 100644
index 0000000..58aea00
--- /dev/null
+++ b/examples/graphicsview/padnavigator/flippablepad.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** 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: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 "flippablepad.h"
+
+#include <QtGui/QtGui>
+
+//! [0]
+static QRectF boundsFromSize(const QSize &size)
+{
+ return QRectF((-size.width() / 2.0) * 150, (-size.height() / 2.0) * 150,
+ size.width() * 150, size.height() * 150);
+}
+//! [0]
+
+//! [1]
+static QPointF posForLocation(int column, int row, const QSize &size)
+{
+ return QPointF(column * 150, row * 150)
+ - QPointF((size.width() - 1) * 75, (size.height() - 1) * 75);
+}
+//! [1]
+
+//! [2]
+FlippablePad::FlippablePad(const QSize &size, QGraphicsItem *parent)
+ : RoundRectItem(boundsFromSize(size), QColor(226, 255, 92, 64), parent)
+{
+//! [2]
+//! [3]
+ int numIcons = size.width() * size.height();
+ QList<QPixmap> pixmaps;
+ QDirIterator it(":/images", QStringList() << "*.png");
+ while (it.hasNext() && pixmaps.size() < numIcons)
+ pixmaps << it.next();
+//! [3]
+
+//! [4]
+ const QRectF iconRect(-54, -54, 108, 108);
+ const QColor iconColor(214, 240, 110, 128);
+ iconGrid.resize(size.height());
+ int n = 0;
+
+ for (int y = 0; y < size.height(); ++y) {
+ iconGrid[y].resize(size.width());
+ for (int x = 0; x < size.width(); ++x) {
+ RoundRectItem *rect = new RoundRectItem(iconRect, iconColor, this);
+ rect->setZValue(1);
+ rect->setPos(posForLocation(x, y, size));
+ rect->setPixmap(pixmaps.at(n++ % pixmaps.size()));
+ iconGrid[y][x] = rect;
+ }
+ }
+}
+//! [4]
+
+//! [5]
+RoundRectItem *FlippablePad::iconAt(int column, int row) const
+{
+ return iconGrid[row][column];
+}
+//! [5]
diff --git a/examples/graphicsview/padnavigator/flippablepad.h b/examples/graphicsview/padnavigator/flippablepad.h
new file mode 100644
index 0000000..7d99536
--- /dev/null
+++ b/examples/graphicsview/padnavigator/flippablepad.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: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 FLIPPABLEPAD_H
+#define FLIPPABLEPAD_H
+
+#include "roundrectitem.h"
+
+#include <QGraphicsObject>
+#include <QLinearGradient>
+#include <QVector>
+
+//! [0]
+class FlippablePad : public RoundRectItem
+{
+public:
+ FlippablePad(const QSize &size, QGraphicsItem *parent = 0);
+
+ RoundRectItem *iconAt(int column, int row) const;
+
+private:
+ QVector<QVector<RoundRectItem *> > iconGrid;
+};
+//! [0]
+
+#endif // FLIPPABLEPAD_H
diff --git a/examples/graphicsview/padnavigator/form.ui b/examples/graphicsview/padnavigator/form.ui
new file mode 100644
index 0000000..fc7d123
--- /dev/null
+++ b/examples/graphicsview/padnavigator/form.ui
@@ -0,0 +1,208 @@
+<ui version="4.0" >
+ <class>Form</class>
+ <widget class="QWidget" name="Form" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>378</width>
+ <height>385</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>BackSide</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Settings</string>
+ </property>
+ <property name="flat" >
+ <bool>true</bool>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <layout class="QGridLayout" name="gridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Title:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="hostName" >
+ <property name="text" >
+ <string>Pad Navigator Example</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Modified:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Extent</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <item>
+ <widget class="QSlider" name="horizontalSlider" >
+ <property name="value" >
+ <number>42</number>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="spinBox" >
+ <property name="value" >
+ <number>42</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QDateTimeEdit" name="dateTimeEdit" />
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_2" >
+ <property name="title" >
+ <string>Other input</string>
+ </property>
+ <property name="flat" >
+ <bool>true</bool>
+ </property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_2" >
+ <item>
+ <widget class="QTreeWidget" name="treeWidget" >
+ <column>
+ <property name="text" >
+ <string>Widgets On Graphics View</string>
+ </property>
+ </column>
+ <item>
+ <property name="text" >
+ <string>QGraphicsProxyWidget</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>QGraphicsWidget</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>QObject</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>QGraphicsItem</string>
+ </property>
+ </item>
+ <item>
+ <property name="text" >
+ <string>QGraphicsLayoutItem</string>
+ </property>
+ </item>
+ </item>
+ </item>
+ <item>
+ <property name="text" >
+ <string>QGraphicsGridLayout</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>QGraphicsLayout</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>QGraphicsLayoutItem</string>
+ </property>
+ </item>
+ </item>
+ </item>
+ <item>
+ <property name="text" >
+ <string>QGraphicsLinearLayout</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>QGraphicsLayout</string>
+ </property>
+ <item>
+ <property name="text" >
+ <string>QGraphicsLayoutItem</string>
+ </property>
+ </item>
+ </item>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <tabstops>
+ <tabstop>groupBox</tabstop>
+ <tabstop>hostName</tabstop>
+ <tabstop>dateTimeEdit</tabstop>
+ <tabstop>horizontalSlider</tabstop>
+ <tabstop>spinBox</tabstop>
+ <tabstop>groupBox_2</tabstop>
+ <tabstop>treeWidget</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>horizontalSlider</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>spinBox</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>184</x>
+ <y>125</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>275</x>
+ <y>127</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>spinBox</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>horizontalSlider</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>272</x>
+ <y>114</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>190</x>
+ <y>126</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/graphicsview/padnavigator/main.cpp b/examples/graphicsview/padnavigator/main.cpp
index fb6c120..984b976 100644
--- a/examples/graphicsview/padnavigator/main.cpp
+++ b/examples/graphicsview/padnavigator/main.cpp
@@ -39,21 +39,19 @@
**
****************************************************************************/
-#include <QtGui>
-#ifndef QT_NO_OPENGL
-# include <QtOpenGL>
-#endif
+#include "padnavigator.h"
-#include "panel.h"
+#include <QtGui/QtGui>
+//! [0]
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Q_INIT_RESOURCE(padnavigator);
- Panel panel(3, 3);
- panel.setFocus();
- panel.show();
+ PadNavigator navigator(QSize(3, 3));
+ navigator.show();
return app.exec();
}
+//! [0]
diff --git a/examples/graphicsview/padnavigator/padnavigator.cpp b/examples/graphicsview/padnavigator/padnavigator.cpp
new file mode 100644
index 0000000..b1d19f6
--- /dev/null
+++ b/examples/graphicsview/padnavigator/padnavigator.cpp
@@ -0,0 +1,307 @@
+/****************************************************************************
+**
+** 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: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 "flippablepad.h"
+#include "padnavigator.h"
+#include "splashitem.h"
+
+#include <QtGui/QtGui>
+#ifndef QT_NO_OPENGL
+#include <QtOpenGL/QtOpenGL>
+#endif
+
+//! [0]
+PadNavigator::PadNavigator(const QSize &size, QWidget *parent)
+ : QGraphicsView(parent)
+{
+//! [0]
+//! [1]
+ // Splash item
+ SplashItem *splash = new SplashItem;
+ splash->setZValue(1);
+//! [1]
+
+//! [2]
+ // Pad item
+ FlippablePad *pad = new FlippablePad(size);
+ QGraphicsRotation *flipRotation = new QGraphicsRotation(pad);
+ QGraphicsRotation *xRotation = new QGraphicsRotation(pad);
+ QGraphicsRotation *yRotation = new QGraphicsRotation(pad);
+ flipRotation->setAxis(Qt::YAxis);
+ xRotation->setAxis(Qt::YAxis);
+ yRotation->setAxis(Qt::XAxis);
+ pad->setTransformations(QList<QGraphicsTransform *>()
+ << flipRotation
+ << xRotation << yRotation);
+//! [2]
+
+//! [3]
+ // Back (proxy widget) item
+ QGraphicsProxyWidget *backItem = new QGraphicsProxyWidget(pad);
+ QWidget *widget = new QWidget;
+ form.setupUi(widget);
+ form.hostName->setFocus();
+ backItem->setWidget(widget);
+ backItem->setVisible(false);
+ backItem->setFocus();
+ backItem->setCacheMode(QGraphicsItem::ItemCoordinateCache);
+ const QRectF r = backItem->rect();
+ backItem->setTransform(QTransform()
+ .rotate(180, Qt::YAxis)
+ .translate(-r.width()/2, -r.height()/2));
+//! [3]
+
+//! [4]
+ // Selection item
+ RoundRectItem *selectionItem = new RoundRectItem(QRectF(-60, -60, 120, 120),
+ Qt::gray, pad);
+ selectionItem->setZValue(0.5);
+//! [4]
+
+//! [5]
+ // Splash animations
+ QPropertyAnimation *smoothSplashMove = new QPropertyAnimation(splash, "y");
+ QPropertyAnimation *smoothSplashOpacity = new QPropertyAnimation(splash, "opacity");
+ smoothSplashMove->setEasingCurve(QEasingCurve::InQuad);
+ smoothSplashMove->setDuration(250);
+ smoothSplashOpacity->setDuration(250);
+//! [5]
+
+//! [6]
+ // Selection animation
+ QPropertyAnimation *smoothXSelection = new QPropertyAnimation(selectionItem, "x");
+ QPropertyAnimation *smoothYSelection = new QPropertyAnimation(selectionItem, "y");
+ QPropertyAnimation *smoothXRotation = new QPropertyAnimation(xRotation, "angle");
+ QPropertyAnimation *smoothYRotation = new QPropertyAnimation(yRotation, "angle");
+ smoothXSelection->setDuration(125);
+ smoothYSelection->setDuration(125);
+ smoothXRotation->setDuration(125);
+ smoothYRotation->setDuration(125);
+ smoothXSelection->setEasingCurve(QEasingCurve::InOutQuad);
+ smoothYSelection->setEasingCurve(QEasingCurve::InOutQuad);
+ smoothXRotation->setEasingCurve(QEasingCurve::InOutQuad);
+ smoothYRotation->setEasingCurve(QEasingCurve::InOutQuad);
+//! [6]
+
+//! [7]
+ // Flip animation setup
+ QPropertyAnimation *smoothFlipRotation = new QPropertyAnimation(flipRotation, "angle");
+ QPropertyAnimation *smoothFlipScale = new QPropertyAnimation(pad, "scale");
+ QPropertyAnimation *smoothFlipXRotation = new QPropertyAnimation(xRotation, "angle");
+ QPropertyAnimation *smoothFlipYRotation = new QPropertyAnimation(yRotation, "angle");
+ QParallelAnimationGroup *flipAnimation = new QParallelAnimationGroup(this);
+ smoothFlipScale->setDuration(500);
+ smoothFlipRotation->setDuration(500);
+ smoothFlipXRotation->setDuration(500);
+ smoothFlipYRotation->setDuration(500);
+ smoothFlipScale->setEasingCurve(QEasingCurve::InOutQuad);
+ smoothFlipRotation->setEasingCurve(QEasingCurve::InOutQuad);
+ smoothFlipXRotation->setEasingCurve(QEasingCurve::InOutQuad);
+ smoothFlipYRotation->setEasingCurve(QEasingCurve::InOutQuad);
+ smoothFlipScale->setKeyValueAt(0, qVariantValue<qreal>(1.0));
+ smoothFlipScale->setKeyValueAt(0.5, qVariantValue<qreal>(0.7));
+ smoothFlipScale->setKeyValueAt(1, qVariantValue<qreal>(1.0));
+ flipAnimation->addAnimation(smoothFlipRotation);
+ flipAnimation->addAnimation(smoothFlipScale);
+ flipAnimation->addAnimation(smoothFlipXRotation);
+ flipAnimation->addAnimation(smoothFlipYRotation);
+//! [7]
+
+//! [8]
+ // Flip animation delayed property assignment
+ QSequentialAnimationGroup *setVariablesSequence = new QSequentialAnimationGroup;
+ QPropertyAnimation *setFillAnimation = new QPropertyAnimation(pad, "fill");
+ QPropertyAnimation *setBackItemVisibleAnimation = new QPropertyAnimation(backItem, "visible");
+ QPropertyAnimation *setSelectionItemVisibleAnimation = new QPropertyAnimation(selectionItem, "visible");
+ setFillAnimation->setDuration(0);
+ setBackItemVisibleAnimation->setDuration(0);
+ setSelectionItemVisibleAnimation->setDuration(0);
+ setVariablesSequence->addPause(250);
+ setVariablesSequence->addAnimation(setBackItemVisibleAnimation);
+ setVariablesSequence->addAnimation(setSelectionItemVisibleAnimation);
+ setVariablesSequence->addAnimation(setFillAnimation);
+ flipAnimation->addAnimation(setVariablesSequence);
+//! [8]
+
+//! [9]
+ // Build the state machine
+ QStateMachine *stateMachine = new QStateMachine(this);
+ QState *splashState = new QState(stateMachine);
+ QState *frontState = new QState(stateMachine);
+ QHistoryState *historyState = new QHistoryState(frontState);
+ QState *backState = new QState(stateMachine);
+//! [9]
+//! [10]
+ frontState->assignProperty(pad, "fill", false);
+ frontState->assignProperty(splash, "opacity", 0.0);
+ frontState->assignProperty(backItem, "visible", false);
+ frontState->assignProperty(flipRotation, "angle", qVariantValue<qreal>(0.0));
+ frontState->assignProperty(selectionItem, "visible", true);
+ backState->assignProperty(pad, "fill", true);
+ backState->assignProperty(backItem, "visible", true);
+ backState->assignProperty(xRotation, "angle", qVariantValue<qreal>(0.0));
+ backState->assignProperty(yRotation, "angle", qVariantValue<qreal>(0.0));
+ backState->assignProperty(flipRotation, "angle", qVariantValue<qreal>(180.0));
+ backState->assignProperty(selectionItem, "visible", false);
+ stateMachine->addDefaultAnimation(smoothXRotation);
+ stateMachine->addDefaultAnimation(smoothYRotation);
+ stateMachine->addDefaultAnimation(smoothXSelection);
+ stateMachine->addDefaultAnimation(smoothYSelection);
+ stateMachine->setInitialState(splashState);
+//! [10]
+
+//! [11]
+ // Transitions
+ QEventTransition *anyKeyTransition = new QEventTransition(this, QEvent::KeyPress, splashState);
+ anyKeyTransition->setTargetState(frontState);
+ anyKeyTransition->addAnimation(smoothSplashMove);
+ anyKeyTransition->addAnimation(smoothSplashOpacity);
+//! [11]
+
+//! [12]
+ QKeyEventTransition *enterTransition = new QKeyEventTransition(this, QEvent::KeyPress,
+ Qt::Key_Enter, backState);
+ QKeyEventTransition *returnTransition = new QKeyEventTransition(this, QEvent::KeyPress,
+ Qt::Key_Return, backState);
+ QKeyEventTransition *backEnterTransition = new QKeyEventTransition(this, QEvent::KeyPress,
+ Qt::Key_Enter, frontState);
+ QKeyEventTransition *backReturnTransition = new QKeyEventTransition(this, QEvent::KeyPress,
+ Qt::Key_Return, frontState);
+ enterTransition->setTargetState(historyState);
+ returnTransition->setTargetState(historyState);
+ backEnterTransition->setTargetState(backState);
+ backReturnTransition->setTargetState(backState);
+ enterTransition->addAnimation(flipAnimation);
+ returnTransition->addAnimation(flipAnimation);
+ backEnterTransition->addAnimation(flipAnimation);
+ backReturnTransition->addAnimation(flipAnimation);
+//! [12]
+
+//! [13]
+ // Create substates for each icon; store in temporary grid.
+ int columns = size.width();
+ int rows = size.height();
+ QVector< QVector< QState * > > stateGrid;
+ stateGrid.resize(rows);
+ for (int y = 0; y < rows; ++y) {
+ stateGrid[y].resize(columns);
+ for (int x = 0; x < columns; ++x)
+ stateGrid[y][x] = new QState(frontState);
+ }
+ frontState->setInitialState(stateGrid[0][0]);
+ selectionItem->setPos(pad->iconAt(0, 0)->pos());
+//! [13]
+
+//! [14]
+ // Enable key navigation using state transitions
+ for (int y = 0; y < rows; ++y) {
+ for (int x = 0; x < columns; ++x) {
+ QState *state = stateGrid[y][x];
+ QKeyEventTransition *rightTransition = new QKeyEventTransition(this, QEvent::KeyPress,
+ Qt::Key_Right, state);
+ QKeyEventTransition *leftTransition = new QKeyEventTransition(this, QEvent::KeyPress,
+ Qt::Key_Left, state);
+ QKeyEventTransition *downTransition = new QKeyEventTransition(this, QEvent::KeyPress,
+ Qt::Key_Down, state);
+ QKeyEventTransition *upTransition = new QKeyEventTransition(this, QEvent::KeyPress,
+ Qt::Key_Up, state);
+ rightTransition->setTargetState(stateGrid[y][(x + 1) % columns]);
+ leftTransition->setTargetState(stateGrid[y][((x - 1) + columns) % columns]);
+ downTransition->setTargetState(stateGrid[(y + 1) % rows][x]);
+ upTransition->setTargetState(stateGrid[((y - 1) + rows) % rows][x]);
+//! [14]
+//! [15]
+ RoundRectItem *icon = pad->iconAt(x, y);
+ state->assignProperty(xRotation, "angle", -icon->x() / 6.0);
+ state->assignProperty(yRotation, "angle", icon->y() / 6.0);
+ state->assignProperty(selectionItem, "x", icon->x());
+ state->assignProperty(selectionItem, "y", icon->y());
+ frontState->assignProperty(icon, "visible", true);
+ backState->assignProperty(icon, "visible", false);
+
+ QPropertyAnimation *setIconVisibleAnimation = new QPropertyAnimation(icon, "visible");
+ setIconVisibleAnimation->setDuration(0);
+ setVariablesSequence->addAnimation(setIconVisibleAnimation);
+ }
+ }
+//! [15]
+
+//! [16]
+ // Scene
+ QGraphicsScene *scene = new QGraphicsScene(this);
+ scene->setBackgroundBrush(QPixmap(":/images/blue_angle_swirl.jpg"));
+ scene->setItemIndexMethod(QGraphicsScene::NoIndex);
+ scene->addItem(pad);
+ scene->setSceneRect(scene->itemsBoundingRect());
+ setScene(scene);
+//! [16]
+
+//! [17]
+ // Adjust splash item to scene contents
+ const QRectF sbr = splash->boundingRect();
+ splash->setPos(-sbr.width() / 2, scene->sceneRect().top() - 2);
+ frontState->assignProperty(splash, "y", splash->y() - 100.0);
+ scene->addItem(splash);
+//! [17]
+
+//! [18]
+ // View
+ setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ setMinimumSize(50, 50);
+ setViewportUpdateMode(FullViewportUpdate);
+ setCacheMode(CacheBackground);
+ setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform | QPainter::TextAntialiasing);
+#ifndef QT_NO_OPENGL
+ setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
+#endif
+
+ stateMachine->start();
+//! [18]
+}
+
+//! [19]
+void PadNavigator::resizeEvent(QResizeEvent *event)
+{
+ QGraphicsView::resizeEvent(event);
+ fitInView(scene()->sceneRect(), Qt::KeepAspectRatio);
+}
+//! [19]
diff --git a/examples/graphicsview/padnavigator/padnavigator.h b/examples/graphicsview/padnavigator/padnavigator.h
new file mode 100644
index 0000000..d9298ae
--- /dev/null
+++ b/examples/graphicsview/padnavigator/padnavigator.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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: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 PADNAVIGATOR_H
+#define PADNAVIGATOR_H
+
+#include <QGraphicsView>
+#include "ui_form.h"
+
+QT_BEGIN_NAMESPACE
+
+class QState;
+class QStateMachine;
+class Ui_Form;
+
+QT_END_NAMESPACE
+
+//! [0]
+class PadNavigator : public QGraphicsView
+{
+ Q_OBJECT
+public:
+ explicit PadNavigator(const QSize &size, QWidget *parent = 0);
+
+protected:
+ void resizeEvent(QResizeEvent *event);
+
+private:
+ Ui_Form form;
+};
+//! [0]
+
+#endif // PADNAVIGATOR_H
diff --git a/examples/graphicsview/padnavigator/padnavigator.pro b/examples/graphicsview/padnavigator/padnavigator.pro
index d6f536c..93ea293 100644
--- a/examples/graphicsview/padnavigator/padnavigator.pro
+++ b/examples/graphicsview/padnavigator/padnavigator.pro
@@ -1,19 +1,20 @@
-HEADERS += \
- panel.h \
- roundrectitem.h \
- splashitem.h
+SOURCES += main.cpp \
+ roundrectitem.cpp \
+ flippablepad.cpp \
+ padnavigator.cpp \
+ splashitem.cpp
-SOURCES += \
- panel.cpp \
- roundrectitem.cpp \
- splashitem.cpp \
- main.cpp
+HEADERS += \
+ roundrectitem.h \
+ flippablepad.h \
+ padnavigator.h \
+ splashitem.h
RESOURCES += \
- padnavigator.qrc
+ padnavigator.qrc
FORMS += \
- backside.ui
+ form.ui
contains(QT_CONFIG, opengl):QT += opengl
diff --git a/examples/graphicsview/padnavigator/panel.cpp b/examples/graphicsview/padnavigator/panel.cpp
deleted file mode 100644
index c4a5cd9..0000000
--- a/examples/graphicsview/padnavigator/panel.cpp
+++ /dev/null
@@ -1,238 +0,0 @@
-/****************************************************************************
-**
-** 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: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 "panel.h"
-#include "roundrectitem.h"
-#include "splashitem.h"
-#include "ui_backside.h"
-
-#ifndef QT_NO_OPENGL
-#include <QtOpenGL/QtOpenGL>
-#else
-#endif
-#include <QtGui/QtGui>
-
-#include <math.h>
-
-Panel::Panel(int width, int height)
- : selectedX(0),
- selectedY(0),
- width(width),
- height(height),
- flipped(false),
- flipLeft(true)
-{
- setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- setCacheMode(CacheBackground);
- setViewportUpdateMode(FullViewportUpdate);
- setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform
- | QPainter::TextAntialiasing);
- setBackgroundBrush(QPixmap(":/images/blue_angle_swirl.jpg"));
-#ifndef QT_NO_OPENGL
- setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
-#endif
- setMinimumSize(50, 50);
-
- selectionTimeLine = new QTimeLine(150, this);
- flipTimeLine = new QTimeLine(500, this);
-
- QRectF bounds((-width / 2.0) * 150, (-height / 2.0) * 150, width * 150, height * 150);
-
- scene = new QGraphicsScene(bounds, this);
- scene->setItemIndexMethod(QGraphicsScene::NoIndex);
- setScene(scene);
-
- baseItem = new RoundRectItem(bounds, QColor(226, 255, 92, 64));
- scene->addItem(baseItem);
-
- QWidget *embed = new QWidget;
- ui = new Ui_BackSide;
- ui->setupUi(embed);
- ui->hostName->setFocus();
-
- backItem = new RoundRectItem(bounds, embed->palette().window(), embed);
- backItem->setTransform(QTransform().rotate(180, Qt::YAxis));
- backItem->setParentItem(baseItem);
-
- selectionItem = new RoundRectItem(QRectF(-60, -60, 120, 120), Qt::gray);
- selectionItem->setParentItem(baseItem);
- selectionItem->setZValue(-1);
- selectionItem->setPos(posForLocation(0, 0));
- startPos = selectionItem->pos();
-
- grid = new QGraphicsItem **[height];
-
- for (int y = 0; y < height; ++y) {
- grid[y] = new QGraphicsItem *[width];
-
- for (int x = 0; x < width; ++x) {
- RoundRectItem *item = new RoundRectItem(QRectF(-54, -54, 108, 108),
- QColor(214, 240, 110, 128));
- item->setPos(posForLocation(x, y));
-
- item->setParentItem(baseItem);
- item->setFlag(QGraphicsItem::ItemIsFocusable);
- grid[y][x] = item;
-
- switch (qrand() % 9) {
- case 0: item->setPixmap(QPixmap(":/images/kontact_contacts.png")); break;
- case 1: item->setPixmap(QPixmap(":/images/kontact_journal.png")); break;
- case 2: item->setPixmap(QPixmap(":/images/kontact_notes.png")); break;
- case 3: item->setPixmap(QPixmap(":/images/kopeteavailable.png")); break;
- case 4: item->setPixmap(QPixmap(":/images/metacontact_online.png")); break;
- case 5: item->setPixmap(QPixmap(":/images/minitools.png")); break;
- case 6: item->setPixmap(QPixmap(":/images/kontact_journal.png")); break;
- case 7: item->setPixmap(QPixmap(":/images/kontact_contacts.png")); break;
- case 8: item->setPixmap(QPixmap(":/images/kopeteavailable.png")); break;
- default:
- break;
- }
-
- connect(item, SIGNAL(activated()), this, SLOT(flip()));
- }
- }
-
- grid[0][0]->setFocus();
-
- connect(backItem, SIGNAL(activated()),
- this, SLOT(flip()));
- connect(selectionTimeLine, SIGNAL(valueChanged(qreal)),
- this, SLOT(updateSelectionStep(qreal)));
- connect(flipTimeLine, SIGNAL(valueChanged(qreal)),
- this, SLOT(updateFlipStep(qreal)));
-
- splash = new SplashItem;
- splash->setZValue(5);
- splash->setPos(-splash->rect().width() / 2, scene->sceneRect().top());
- scene->addItem(splash);
-
- splash->grabKeyboard();
-
- updateSelectionStep(0);
-
- setWindowTitle(tr("Pad Navigator Example"));
-}
-
-Panel::~Panel()
-{
- for (int y = 0; y < height; ++y)
- delete [] grid[y];
- delete [] grid;
-}
-
-void Panel::keyPressEvent(QKeyEvent *event)
-{
- if (splash->isVisible() || event->key() == Qt::Key_Return || flipped) {
- QGraphicsView::keyPressEvent(event);
- return;
- }
-
- selectedX = (selectedX + width + (event->key() == Qt::Key_Right) - (event->key() == Qt::Key_Left)) % width;
- selectedY = (selectedY + height + (event->key() == Qt::Key_Down) - (event->key() == Qt::Key_Up)) % height;
- grid[selectedY][selectedX]->setFocus();
-
- selectionTimeLine->stop();
- startPos = selectionItem->pos();
- endPos = posForLocation(selectedX, selectedY);
- selectionTimeLine->start();
-}
-
-void Panel::resizeEvent(QResizeEvent *event)
-{
- QGraphicsView::resizeEvent(event);
- fitInView(scene->sceneRect(), Qt::KeepAspectRatio);
-}
-
-void Panel::updateSelectionStep(qreal val)
-{
- QPointF newPos(startPos.x() + (endPos - startPos).x() * val,
- startPos.y() + (endPos - startPos).y() * val);
- selectionItem->setPos(newPos);
-
- QTransform transform;
- yrot = newPos.x() / 6.0;
- xrot = newPos.y() / 6.0;
- transform.rotate(newPos.x() / 6.0, Qt::YAxis);
- transform.rotate(newPos.y() / 6.0, Qt::XAxis);
- baseItem->setTransform(transform);
-}
-
-void Panel::updateFlipStep(qreal val)
-{
- qreal finalxrot = xrot - xrot * val;
- qreal finalyrot;
- if (flipLeft)
- finalyrot = yrot - yrot * val - 180 * val;
- else
- finalyrot = yrot - yrot * val + 180 * val;
- QTransform transform;
- transform.rotate(finalyrot, Qt::YAxis);
- transform.rotate(finalxrot, Qt::XAxis);
- qreal scale = 1 - sin(3.14 * val) * 0.3;
- transform.scale(scale, scale);
- baseItem->setTransform(transform);
- if (val == 0)
- grid[selectedY][selectedX]->setFocus();
-}
-
-void Panel::flip()
-{
- if (flipTimeLine->state() == QTimeLine::Running)
- return;
-
- if (flipTimeLine->currentValue() == 0) {
- flipTimeLine->setDirection(QTimeLine::Forward);
- flipTimeLine->start();
- flipped = true;
- flipLeft = selectionItem->pos().x() < 0;
- } else {
- flipTimeLine->setDirection(QTimeLine::Backward);
- flipTimeLine->start();
- flipped = false;
- }
-}
-
-QPointF Panel::posForLocation(int x, int y) const
-{
- return QPointF(x * 150, y * 150)
- - QPointF((width - 1) * 75, (height - 1) * 75);
-}
diff --git a/examples/graphicsview/padnavigator/panel.h b/examples/graphicsview/padnavigator/panel.h
deleted file mode 100644
index 908092b..0000000
--- a/examples/graphicsview/padnavigator/panel.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** 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: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/qgraphicsview.h>
-
-QT_BEGIN_NAMESPACE
-class QTimeLine;
-class Ui_BackSide;
-QT_END_NAMESPACE
-
-class RoundRectItem;
-
-class Panel : public QGraphicsView
-{
- Q_OBJECT
-public:
- Panel(int width, int height);
- ~Panel();
-
-protected:
- void keyPressEvent(QKeyEvent *event);
- void resizeEvent(QResizeEvent *event);
-
-private Q_SLOTS:
- void updateSelectionStep(qreal val);
- void updateFlipStep(qreal val);
- void flip();
-
-private:
- QPointF posForLocation(int x, int y) const;
-
- QGraphicsScene *scene;
- RoundRectItem *selectionItem;
- RoundRectItem *baseItem;
- RoundRectItem *backItem;
- QGraphicsWidget *splash;
- QTimeLine *selectionTimeLine;
- QTimeLine *flipTimeLine;
- int selectedX, selectedY;
-
- QGraphicsItem ***grid;
-
- QPointF startPos;
- QPointF endPos;
- qreal xrot, yrot;
- qreal xrot2, yrot2;
-
- int width;
- int height;
- bool flipped;
- bool flipLeft;
-
- Ui_BackSide *ui;
-};
diff --git a/examples/graphicsview/padnavigator/roundrectitem.cpp b/examples/graphicsview/padnavigator/roundrectitem.cpp
index d53eea4..7a0b279 100644
--- a/examples/graphicsview/padnavigator/roundrectitem.cpp
+++ b/examples/graphicsview/padnavigator/roundrectitem.cpp
@@ -43,122 +43,72 @@
#include <QtGui/QtGui>
-RoundRectItem::RoundRectItem(const QRectF &rect, const QBrush &brush, QWidget *embeddedWidget)
- : QGraphicsRectItem(rect),
- brush(brush),
- timeLine(75),
- lastVal(0),
- opa(1),
- proxyWidget(0)
+//! [0]
+RoundRectItem::RoundRectItem(const QRectF &bounds, const QColor &color,
+ QGraphicsItem *parent)
+ : QGraphicsObject(parent), fillRect(false), bounds(bounds)
{
- connect(&timeLine, SIGNAL(valueChanged(qreal)),
- this, SLOT(updateValue(qreal)));
-
- if (embeddedWidget) {
- proxyWidget = new QGraphicsProxyWidget(this);
- proxyWidget->setFocusPolicy(Qt::StrongFocus);
- proxyWidget->setWidget(embeddedWidget);
- proxyWidget->setGeometry(boundingRect().adjusted(25, 25, -25, -25));
- }
+ gradient.setStart(bounds.topLeft());
+ gradient.setFinalStop(bounds.bottomRight());
+ gradient.setColorAt(0, color);
+ gradient.setColorAt(1, color.dark(200));
+ setCacheMode(ItemCoordinateCache);
}
+//! [0]
-void RoundRectItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+//! [1]
+QPixmap RoundRectItem::pixmap() const
{
- QTransform x = painter->worldTransform();
-
- QLineF unit = x.map(QLineF(0, 0, 1, 1));
- if (unit.p1().x() > unit.p2().x() || unit.p1().y() > unit.p2().y()) {
- if (proxyWidget && proxyWidget->isVisible()) {
- proxyWidget->hide();
- proxyWidget->setGeometry(rect());
- }
- return;
- }
-
- if (proxyWidget && !proxyWidget->isVisible()) {
- proxyWidget->show();
- proxyWidget->setFocus();
- }
- if (proxyWidget && proxyWidget->pos() != QPoint())
- proxyWidget->setGeometry(boundingRect().adjusted(25, 25, -25, -25));
-
- painter->setOpacity(opacity());
- painter->setPen(Qt::NoPen);
- painter->setBrush(QColor(0, 0, 0, 64));
- painter->drawRoundRect(rect().translated(2, 2));
-
- if (!proxyWidget) {
- QLinearGradient gradient(rect().topLeft(), rect().bottomRight());
- const QColor col = brush.color();
- gradient.setColorAt(0, col);
- gradient.setColorAt(1, col.dark(int(200 + lastVal * 50)));
- painter->setBrush(gradient);
- } else {
- painter->setBrush(brush);
- }
-
- painter->setPen(QPen(Qt::black, 1));
- painter->drawRoundRect(rect());
- if (!pix.isNull()) {
- painter->scale(1.95, 1.95);
- painter->drawPixmap(-pix.width() / 2, -pix.height() / 2, pix);;
- }
+ return pix;
}
-
-QRectF RoundRectItem::boundingRect() const
-{
- qreal penW = 0.5;
- qreal shadowW = 2.0;
- return rect().adjusted(-penW, -penW, penW + shadowW, penW + shadowW);
-}
-
void RoundRectItem::setPixmap(const QPixmap &pixmap)
{
pix = pixmap;
- if (scene() && isVisible())
- update();
-}
-
-qreal RoundRectItem::opacity() const
-{
- RoundRectItem *parent = parentItem() ? (RoundRectItem *)parentItem() : 0;
- return opa + (parent ? parent->opacity() : 0);
+ update();
}
+//! [1]
-void RoundRectItem::setOpacity(qreal opacity)
+//! [2]
+QRectF RoundRectItem::boundingRect() const
{
- opa = opacity;
- update();
+ return bounds.adjusted(0, 0, 2, 2);
}
+//! [2]
-void RoundRectItem::keyPressEvent(QKeyEvent *event)
+//! [3]
+void RoundRectItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget)
{
- if (event->isAutoRepeat() || event->key() != Qt::Key_Return
- || (timeLine.state() == QTimeLine::Running && timeLine.direction() == QTimeLine::Forward)) {
- QGraphicsRectItem::keyPressEvent(event);
- return;
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(QColor(0, 0, 0, 64));
+ painter->drawRoundRect(bounds.translated(2, 2));
+//! [3]
+//! [4]
+ if (fillRect)
+ painter->setBrush(QApplication::palette().brush(QPalette::Window));
+ else
+ painter->setBrush(gradient);
+ painter->setPen(QPen(Qt::black, 1));
+ painter->drawRoundRect(bounds);
+//! [4]
+//! [5]
+ if (!pix.isNull()) {
+ painter->scale(1.95, 1.95);
+ painter->drawPixmap(-pix.width() / 2, -pix.height() / 2, pix);
}
-
- timeLine.stop();
- timeLine.setDirection(QTimeLine::Forward);
- timeLine.start();
- emit activated();
}
+//! [5]
-void RoundRectItem::keyReleaseEvent(QKeyEvent *event)
+//! [6]
+bool RoundRectItem::fill() const
{
- if (event->key() != Qt::Key_Return) {
- QGraphicsRectItem::keyReleaseEvent(event);
- return;
- }
- timeLine.stop();
- timeLine.setDirection(QTimeLine::Backward);
- timeLine.start();
+ return fillRect;
}
-
-void RoundRectItem::updateValue(qreal value)
+void RoundRectItem::setFill(bool fill)
{
- lastVal = value;
- if (!proxyWidget)
- setTransform(QTransform().scale(1 - value / 10.0, 1 - value / 10.0));
+ fillRect = fill;
+ update();
}
+//! [6]
diff --git a/examples/graphicsview/padnavigator/roundrectitem.h b/examples/graphicsview/padnavigator/roundrectitem.h
index 683c09f..bc58cec 100644
--- a/examples/graphicsview/padnavigator/roundrectitem.h
+++ b/examples/graphicsview/padnavigator/roundrectitem.h
@@ -39,45 +39,38 @@
**
****************************************************************************/
-#include <QtCore/qobject.h>
-#include <QtCore/qtimeline.h>
-#include <QtGui/qgraphicsitem.h>
-#include <QtGui/qbrush.h>
+#ifndef ROUNDRECTITEM_H
+#define ROUNDRECTITEM_H
-QT_BEGIN_NAMESPACE
-class QGraphicsProxyWidget;
-QT_END_NAMESPACE
+#include <QGraphicsObject>
+#include <QLinearGradient>
-class RoundRectItem : public QObject, public QGraphicsRectItem
+//! [0]
+class RoundRectItem : public QGraphicsObject
{
Q_OBJECT
+ Q_PROPERTY(bool fill READ fill WRITE setFill)
public:
- RoundRectItem(const QRectF &rect, const QBrush &brush, QWidget *embeddedWidget = 0);
-
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *);
- QRectF boundingRect() const;
+ RoundRectItem(const QRectF &bounds, const QColor &color,
+ QGraphicsItem *parent = 0);
+ QPixmap pixmap() const;
void setPixmap(const QPixmap &pixmap);
- qreal opacity() const;
- void setOpacity(qreal opacity);
-
-Q_SIGNALS:
- void activated();
-
-protected:
- void keyPressEvent(QKeyEvent *event);
- void keyReleaseEvent(QKeyEvent *event);
+ QRectF boundingRect() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
-private slots:
- void updateValue(qreal value);
+ bool fill() const;
+ void setFill(bool fill);
+//! [0]
+//! [1]
private:
- QBrush brush;
QPixmap pix;
- QTimeLine timeLine;
- qreal lastVal;
- qreal opa;
-
- QGraphicsProxyWidget *proxyWidget;
+ bool fillRect;
+ QRectF bounds;
+ QLinearGradient gradient;
};
+//! [1]
+
+#endif // ROUNDRECTITEM_H
diff --git a/examples/graphicsview/padnavigator/splashitem.cpp b/examples/graphicsview/padnavigator/splashitem.cpp
index b5b03d4..cd7074a 100644
--- a/examples/graphicsview/padnavigator/splashitem.cpp
+++ b/examples/graphicsview/padnavigator/splashitem.cpp
@@ -43,31 +43,36 @@
#include <QtGui/QtGui>
+//! [0]
SplashItem::SplashItem(QGraphicsItem *parent)
- : QGraphicsWidget(parent)
+ : QGraphicsObject(parent)
{
- opacity = 1.0;
-
-
- timeLine = new QTimeLine(350);
- timeLine->setCurveShape(QTimeLine::EaseInCurve);
- connect(timeLine, SIGNAL(valueChanged(qreal)), this, SLOT(setValue(qreal)));
-
text = tr("Welcome to the Pad Navigator Example. You can use the"
" keyboard arrows to navigate the icons, and press enter"
- " to activate an item. Please press any key to continue.");
- resize(400, 175);
+ " to activate an item. Press any key to begin.");
+ setCacheMode(DeviceCoordinateCache);
+}
+//! [0]
+
+//! [1]
+QRectF SplashItem::boundingRect() const
+{
+ return QRectF(0, 0, 400, 175);
}
+//! [1]
-void SplashItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+//! [2]
+void SplashItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
+ QWidget *widget)
{
- painter->setOpacity(opacity);
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
painter->setPen(QPen(Qt::black, 2));
painter->setBrush(QColor(245, 245, 255, 220));
- painter->setClipRect(rect());
+ painter->setClipRect(boundingRect());
painter->drawRoundRect(3, -100 + 3, 400 - 6, 250 - 6);
- QRectF textRect = rect().adjusted(10, 10, -10, -10);
+ QRectF textRect = boundingRect().adjusted(10, 10, -10, -10);
int flags = Qt::AlignTop | Qt::AlignLeft | Qt::TextWordWrap;
QFont font;
@@ -76,17 +81,4 @@ void SplashItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWid
painter->setFont(font);
painter->drawText(textRect, flags, text);
}
-
-void SplashItem::keyPressEvent(QKeyEvent * /* event */)
-{
- if (timeLine->state() == QTimeLine::NotRunning)
- timeLine->start();
-}
-
-void SplashItem::setValue(qreal value)
-{
- opacity = 1 - value;
- setPos(x(), scene()->sceneRect().top() - rect().height() * value);
- if (value == 1)
- hide();
-}
+//! [2]
diff --git a/examples/graphicsview/padnavigator/splashitem.h b/examples/graphicsview/padnavigator/splashitem.h
index 7a33bee..98c4a1f 100644
--- a/examples/graphicsview/padnavigator/splashitem.h
+++ b/examples/graphicsview/padnavigator/splashitem.h
@@ -39,25 +39,24 @@
**
****************************************************************************/
-#include <QtCore/qobject.h>
-#include <QtCore/qtimeline.h>
-#include <QtGui/qgraphicswidget.h>
+#ifndef SPLASHITEM_H
+#define SPLASHITEM_H
-class SplashItem : public QGraphicsWidget
+#include <QGraphicsObject>
+
+//! [0]
+class SplashItem : public QGraphicsObject
{
Q_OBJECT
public:
- SplashItem(QGraphicsItem *parent = 0);
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
-
-protected:
- void keyPressEvent(QKeyEvent *event);
+ explicit SplashItem(QGraphicsItem *parent = 0);
-private Q_SLOTS:
- void setValue(qreal value);
+ QRectF boundingRect() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
private:
- QTimeLine *timeLine;
QString text;
- qreal opacity;
};
+//! [0]
+
+#endif // SPLASHITEM_H
diff --git a/examples/multimedia/audiodevices/audiodevices.cpp b/examples/multimedia/audiodevices/audiodevices.cpp
index 7d09c38..1a7a7ee 100644
--- a/examples/multimedia/audiodevices/audiodevices.cpp
+++ b/examples/multimedia/audiodevices/audiodevices.cpp
@@ -44,6 +44,40 @@
#include "audiodevices.h"
+// Utility functions for converting QAudioFormat fields into text
+
+QString toString(QAudioFormat::SampleType sampleType)
+{
+ QString result("Unknown");
+ switch (sampleType) {
+ case QAudioFormat::SignedInt:
+ result = "SignedInt";
+ break;
+ case QAudioFormat::UnSignedInt:
+ result = "UnSignedInt";
+ break;
+ case QAudioFormat::Float:
+ result = "Float";
+ break;
+ }
+ return result;
+}
+
+QString toString(QAudioFormat::Endian endian)
+{
+ QString result("Unknown");
+ switch (endian) {
+ case QAudioFormat::LittleEndian:
+ result = "LittleEndian";
+ break;
+ case QAudioFormat::BigEndian:
+ result = "BigEndian";
+ break;
+ }
+ return result;
+}
+
+
AudioDevicesBase::AudioDevicesBase(QWidget *parent, Qt::WFlags f)
: QMainWindow(parent, f)
{
@@ -67,6 +101,7 @@ AudioTest::AudioTest(QWidget *parent, Qt::WFlags f)
connect(sampleSizesBox, SIGNAL(activated(int)), SLOT(sampleSizeChanged(int)));
connect(sampleTypesBox, SIGNAL(activated(int)), SLOT(sampleTypeChanged(int)));
connect(endianBox, SIGNAL(activated(int)), SLOT(endianChanged(int)));
+ connect(populateTableButton, SIGNAL(clicked()), SLOT(populateTable()));
modeBox->setCurrentIndex(0);
modeChanged(0);
@@ -81,12 +116,11 @@ AudioTest::~AudioTest()
void AudioTest::test()
{
// tries to set all the settings picked.
- logOutput->clear();
- logOutput->append("NOTE: an invalid codec audio/test exists for testing, to get a fail condition.");
+ testResult->clear();
if (!deviceInfo.isNull()) {
if (deviceInfo.isFormatSupported(settings)) {
- logOutput->append(tr("Success"));
+ testResult->setText(tr("Success"));
nearestFreq->setText("");
nearestChannel->setText("");
nearestCodec->setText("");
@@ -95,40 +129,23 @@ void AudioTest::test()
nearestEndian->setText("");
} else {
QAudioFormat nearest = deviceInfo.nearestFormat(settings);
- logOutput->append(tr("Failed"));
+ testResult->setText(tr("Failed"));
nearestFreq->setText(QString("%1").arg(nearest.frequency()));
nearestChannel->setText(QString("%1").arg(nearest.channels()));
nearestCodec->setText(nearest.codec());
nearestSampleSize->setText(QString("%1").arg(nearest.sampleSize()));
-
- switch(nearest.sampleType()) {
- case QAudioFormat::SignedInt:
- nearestSampleType->setText("SignedInt");
- break;
- case QAudioFormat::UnSignedInt:
- nearestSampleType->setText("UnSignedInt");
- break;
- case QAudioFormat::Float:
- nearestSampleType->setText("Float");
- break;
- case QAudioFormat::Unknown:
- nearestSampleType->setText("Unknown");
- }
- switch(nearest.byteOrder()) {
- case QAudioFormat::LittleEndian:
- nearestEndian->setText("LittleEndian");
- break;
- case QAudioFormat::BigEndian:
- nearestEndian->setText("BigEndian");
- }
+ nearestSampleType->setText(toString(nearest.sampleType()));
+ nearestEndian->setText(toString(nearest.byteOrder()));
}
}
else
- logOutput->append(tr("No Device"));
+ testResult->setText(tr("No Device"));
}
void AudioTest::modeChanged(int idx)
{
+ testResult->clear();
+
// mode has changed
if (idx == 0)
mode = QAudio::AudioInput;
@@ -138,10 +155,15 @@ void AudioTest::modeChanged(int idx)
deviceBox->clear();
foreach (const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(mode))
deviceBox->addItem(deviceInfo.deviceName(), qVariantFromValue(deviceInfo));
+
+ deviceBox->setCurrentIndex(0);
+ deviceChanged(0);
}
void AudioTest::deviceChanged(int idx)
{
+ testResult->clear();
+
if (deviceBox->count() == 0)
return;
@@ -180,38 +202,68 @@ void AudioTest::deviceChanged(int idx)
sampleTypesBox->clear();
QList<QAudioFormat::SampleType> sampleTypez = deviceInfo.supportedSampleTypes();
- for (int i = 0; i < sampleTypez.size(); ++i) {
- switch(sampleTypez.at(i)) {
- case QAudioFormat::SignedInt:
- sampleTypesBox->addItem("SignedInt");
- break;
- case QAudioFormat::UnSignedInt:
- sampleTypesBox->addItem("UnSignedInt");
- break;
- case QAudioFormat::Float:
- sampleTypesBox->addItem("Float");
- break;
- case QAudioFormat::Unknown:
- sampleTypesBox->addItem("Unknown");
- }
- if (sampleTypez.size())
- settings.setSampleType(sampleTypez.at(0));
- }
+
+ for (int i = 0; i < sampleTypez.size(); ++i)
+ sampleTypesBox->addItem(toString(sampleTypez.at(i)));
+ if (sampleTypez.size())
+ settings.setSampleType(sampleTypez.at(0));
endianBox->clear();
QList<QAudioFormat::Endian> endianz = deviceInfo.supportedByteOrders();
- for (int i = 0; i < endianz.size(); ++i) {
- switch (endianz.at(i)) {
- case QAudioFormat::LittleEndian:
- endianBox->addItem("Little Endian");
- break;
- case QAudioFormat::BigEndian:
- endianBox->addItem("Big Endian");
- break;
- }
- }
+ for (int i = 0; i < endianz.size(); ++i)
+ endianBox->addItem(toString(endianz.at(i)));
if (endianz.size())
settings.setByteOrder(endianz.at(0));
+
+ allFormatsTable->clearContents();
+}
+
+void AudioTest::populateTable()
+{
+ int row = 0;
+
+ QAudioFormat format;
+ foreach (QString codec, deviceInfo.supportedCodecs()) {
+ format.setCodec(codec);
+ foreach (int frequency, deviceInfo.supportedFrequencies()) {
+ format.setFrequency(frequency);
+ foreach (int channels, deviceInfo.supportedChannels()) {
+ format.setChannels(channels);
+ foreach (QAudioFormat::SampleType sampleType, deviceInfo.supportedSampleTypes()) {
+ format.setSampleType(sampleType);
+ foreach (int sampleSize, deviceInfo.supportedSampleSizes()) {
+ format.setSampleSize(sampleSize);
+ foreach (QAudioFormat::Endian endian, deviceInfo.supportedByteOrders()) {
+ format.setByteOrder(endian);
+ if (deviceInfo.isFormatSupported(format)) {
+ allFormatsTable->setRowCount(row + 1);
+
+ QTableWidgetItem *codecItem = new QTableWidgetItem(format.codec());
+ allFormatsTable->setItem(row, 0, codecItem);
+
+ QTableWidgetItem *frequencyItem = new QTableWidgetItem(QString("%1").arg(format.frequency()));
+ allFormatsTable->setItem(row, 1, frequencyItem);
+
+ QTableWidgetItem *channelsItem = new QTableWidgetItem(QString("%1").arg(format.channels()));
+ allFormatsTable->setItem(row, 2, channelsItem);
+
+ QTableWidgetItem *sampleTypeItem = new QTableWidgetItem(toString(format.sampleType()));
+ allFormatsTable->setItem(row, 3, sampleTypeItem);
+
+ QTableWidgetItem *sampleSizeItem = new QTableWidgetItem(QString("%1").arg(format.sampleSize()));
+ allFormatsTable->setItem(row, 4, sampleSizeItem);
+
+ QTableWidgetItem *byteOrderItem = new QTableWidgetItem(toString(format.byteOrder()));
+ allFormatsTable->setItem(row, 5, byteOrderItem);
+
+ ++row;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
void AudioTest::freqChanged(int idx)
diff --git a/examples/multimedia/audiodevices/audiodevices.h b/examples/multimedia/audiodevices/audiodevices.h
index 15ace92..b5b5204 100644
--- a/examples/multimedia/audiodevices/audiodevices.h
+++ b/examples/multimedia/audiodevices/audiodevices.h
@@ -74,5 +74,7 @@ private slots:
void sampleTypeChanged(int idx);
void endianChanged(int idx);
void test();
+ void populateTable();
+
};
diff --git a/examples/multimedia/audiodevices/audiodevicesbase.ui b/examples/multimedia/audiodevices/audiodevicesbase.ui
index 667a6e5..23b45d7 100644
--- a/examples/multimedia/audiodevices/audiodevicesbase.ui
+++ b/examples/multimedia/audiodevices/audiodevicesbase.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>320</width>
- <height>300</height>
+ <width>679</width>
+ <height>598</height>
</rect>
</property>
<property name="windowTitle">
@@ -30,58 +30,30 @@
<property name="geometry">
<rect>
<x>0</x>
- <y>-192</y>
- <width>282</width>
- <height>471</height>
+ <y>0</y>
+ <width>659</width>
+ <height>558</height>
</rect>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <layout class="QGridLayout" name="gridLayout">
+ <layout class="QGridLayout" name="gridLayout_4">
+ <item row="0" column="0">
+ <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
- <widget class="QLabel" name="deviceLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <widget class="QLabel" name="modeLabel">
<property name="text">
- <string>Device</string>
+ <string>Mode</string>
</property>
</widget>
</item>
<item row="0" column="1">
- <widget class="QLabel" name="modeLabel">
+ <widget class="QLabel" name="deviceLabel">
<property name="text">
- <string>Mode</string>
+ <string>Device</string>
</property>
</widget>
</item>
<item row="1" column="0">
- <widget class="QComboBox" name="deviceBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>150</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
<widget class="QComboBox" name="modeBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
<item>
<property name="text">
<string>Input</string>
@@ -94,203 +66,322 @@
</item>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QLabel" name="actualLabel">
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Actual Settings</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="nearestLabel">
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Nearest Settings</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="actualFreqLabel">
- <property name="text">
- <string>Frequency</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QLabel" name="nearestFreqLabel">
- <property name="text">
- <string>Frequency</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QComboBox" name="frequencyBox"/>
- </item>
- <item row="4" column="1">
- <widget class="QLineEdit" name="nearestFreq">
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="actualChannelsLabel">
- <property name="text">
- <string>Channels</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QLabel" name="nearestChannelLabel">
- <property name="text">
- <string>Channel</string>
- </property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QComboBox" name="channelsBox"/>
- </item>
- <item row="6" column="1">
- <widget class="QLineEdit" name="nearestChannel">
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="7" column="0">
- <widget class="QLabel" name="actualCodecLabel">
- <property name="text">
- <string>Codecs</string>
- </property>
- </widget>
- </item>
- <item row="7" column="1">
- <widget class="QLabel" name="nearestCodecLabel">
- <property name="text">
- <string>Codec</string>
- </property>
- </widget>
- </item>
- <item row="8" column="0">
- <widget class="QComboBox" name="codecsBox"/>
- </item>
- <item row="8" column="1">
- <widget class="QLineEdit" name="nearestCodec">
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="9" column="0">
- <widget class="QLabel" name="actualSampleSizeLabel">
- <property name="text">
- <string>SampleSize</string>
- </property>
- </widget>
- </item>
- <item row="9" column="1">
- <widget class="QLabel" name="nearestSampleSizeLabel">
- <property name="text">
- <string>SampleSize</string>
- </property>
- </widget>
- </item>
- <item row="10" column="0">
- <widget class="QComboBox" name="sampleSizesBox"/>
- </item>
- <item row="10" column="1">
- <widget class="QLineEdit" name="nearestSampleSize">
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="11" column="0">
- <widget class="QLabel" name="actualSampleTypeLabel">
- <property name="text">
- <string>SampleType</string>
- </property>
- </widget>
- </item>
- <item row="11" column="1">
- <widget class="QLabel" name="nearestSampleTypeLabel">
- <property name="text">
- <string>SampleType</string>
- </property>
- </widget>
- </item>
- <item row="12" column="0">
- <widget class="QComboBox" name="sampleTypesBox"/>
- </item>
- <item row="12" column="1">
- <widget class="QLineEdit" name="nearestSampleType">
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="13" column="0">
- <widget class="QLabel" name="actualEndianLabel">
- <property name="text">
- <string>Endianess</string>
- </property>
- </widget>
- </item>
- <item row="13" column="1">
- <widget class="QLabel" name="nearestEndianLabel">
- <property name="text">
- <string>Endianess</string>
- </property>
- </widget>
- </item>
- <item row="14" column="0">
- <widget class="QComboBox" name="endianBox"/>
- </item>
- <item row="14" column="1">
- <widget class="QLineEdit" name="nearestEndian">
- <property name="enabled">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="15" column="0" colspan="2">
- <widget class="QTextEdit" name="logOutput">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="horizontalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- </widget>
- </item>
- <item row="16" column="0" colspan="2">
- <widget class="QPushButton" name="testButton">
- <property name="text">
- <string>Test</string>
- </property>
+ <item row="1" column="1">
+ <widget class="QComboBox" name="deviceBox"/>
+ </item>
+ <item row="2" column="0" colspan="2">
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="testFormatTab">
+ <attribute name="title">
+ <string>Test format</string>
+ </attribute>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="1">
+ <widget class="QLabel" name="actualLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text">
+ <string>&lt;i&gt;Actual Settings&lt;/i&gt;</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="nearestLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="text">
+ <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; 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;Nearest Settings&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QComboBox" name="frequencyBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QLineEdit" name="nearestFreq">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QComboBox" name="channelsBox"/>
+ </item>
+ <item row="5" column="2">
+ <widget class="QLineEdit" name="nearestChannel">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="9" column="1">
+ <widget class="QComboBox" name="sampleSizesBox"/>
+ </item>
+ <item row="9" column="2">
+ <widget class="QLineEdit" name="nearestSampleSize">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="14" column="1">
+ <widget class="QComboBox" name="endianBox"/>
+ </item>
+ <item row="14" column="2">
+ <widget class="QLineEdit" name="nearestEndian">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="15" column="1">
+ <widget class="QPushButton" name="testButton">
+ <property name="text">
+ <string>Test</string>
+ </property>
+ </widget>
+ </item>
+ <item row="15" column="2">
+ <widget class="QLabel" name="testResult">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="actualFreqLabel">
+ <property name="text">
+ <string>Frequency (Hz)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="actualChannelLabel">
+ <property name="text">
+ <string>Channels</string>
+ </property>
+ </widget>
+ </item>
+ <item row="9" column="0">
+ <widget class="QLabel" name="actualSampleSizeLabel">
+ <property name="text">
+ <string>Sample size (bits)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="14" column="0">
+ <widget class="QLabel" name="actualEndianLabel">
+ <property name="text">
+ <string>Endianess</string>
+ </property>
+ </widget>
+ </item>
+ <item row="16" column="0" colspan="3">
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Note: an invalid codec 'audio/test' exists in order to allow an invalid format to be constructed, and therefore to trigger a 'nearest format' calculation.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="actualCodecLabel">
+ <property name="text">
+ <string>Codec</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QLineEdit" name="nearestCodec">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QComboBox" name="codecsBox"/>
+ </item>
+ <item row="6" column="0">
+ <widget class="QLabel" name="actualSampleTypeLabel">
+ <property name="text">
+ <string>SampleType</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1">
+ <widget class="QComboBox" name="sampleTypesBox"/>
+ </item>
+ <item row="6" column="2">
+ <widget class="QLineEdit" name="nearestSampleType">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab">
+ <attribute name="title">
+ <string>All formats</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QPushButton" name="populateTableButton">
+ <property name="text">
+ <string>Populate table</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTableWidget" name="allFormatsTable">
+ <property name="editTriggers">
+ <set>QAbstractItemView::NoEditTriggers</set>
+ </property>
+ <property name="dragDropOverwriteMode">
+ <bool>false</bool>
+ </property>
+ <property name="selectionMode">
+ <enum>QAbstractItemView::NoSelection</enum>
+ </property>
+ <property name="selectionBehavior">
+ <enum>QAbstractItemView::SelectItems</enum>
+ </property>
+ <property name="textElideMode">
+ <enum>Qt::ElideNone</enum>
+ </property>
+ <property name="sortingEnabled">
+ <bool>false</bool>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ <property name="cornerButtonEnabled">
+ <bool>false</bool>
+ </property>
+ <attribute name="horizontalHeaderHighlightSections">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="verticalHeaderVisible">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="verticalHeaderHighlightSections">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="verticalHeaderVisible">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="horizontalHeaderHighlightSections">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="verticalHeaderHighlightSections">
+ <bool>false</bool>
+ </attribute>
+ <column>
+ <property name="text">
+ <string>Codec</string>
+ </property>
+ <property name="textAlignment">
+ <set>AlignHCenter|AlignVCenter|AlignCenter</set>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Frequency (Hz)</string>
+ </property>
+ <property name="textAlignment">
+ <set>AlignHCenter|AlignVCenter|AlignCenter</set>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Channels</string>
+ </property>
+ <property name="textAlignment">
+ <set>AlignHCenter|AlignVCenter|AlignCenter</set>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Sample type</string>
+ </property>
+ <property name="textAlignment">
+ <set>AlignHCenter|AlignVCenter|AlignCenter</set>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Sample size (bits)</string>
+ </property>
+ <property name="textAlignment">
+ <set>AlignHCenter|AlignVCenter|AlignCenter</set>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Endianness</string>
+ </property>
+ <property name="textAlignment">
+ <set>AlignHCenter|AlignVCenter|AlignCenter</set>
+ </property>
+ </column>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
</layout>
diff --git a/examples/multimedia/audiodevices/main.cpp b/examples/multimedia/audiodevices/main.cpp
index 0ea18a1..8ca4932 100644
--- a/examples/multimedia/audiodevices/main.cpp
+++ b/examples/multimedia/audiodevices/main.cpp
@@ -49,7 +49,11 @@ int main(int argv, char **args)
app.setApplicationName("Audio Device Test");
AudioTest audio;
+#ifdef Q_OS_SYMBIAN
+ audio.showMaximized();
+#else
audio.show();
+#endif
return app.exec();
}
diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp
index 4a6c6ff..0d98eff 100644
--- a/examples/network/bearermonitor/bearermonitor.cpp
+++ b/examples/network/bearermonitor/bearermonitor.cpp
@@ -255,6 +255,7 @@ void BearerMonitor::onlineStateChanged(bool isOnline)
void BearerMonitor::registerNetwork()
{
QTreeWidgetItem *item = treeWidget->currentItem();
+ if (!item) return;
QNetworkConfiguration configuration =
manager.configurationFromIdentifier(item->data(0, Qt::UserRole).toString());
@@ -276,6 +277,7 @@ void BearerMonitor::registerNetwork()
void BearerMonitor::unregisterNetwork()
{
QTreeWidgetItem *item = treeWidget->currentItem();
+ if (!item) return;
QNetworkConfiguration configuration =
manager.configurationFromIdentifier(item->data(0, Qt::UserRole).toString());
@@ -384,6 +386,7 @@ void BearerMonitor::createSessionFor(QTreeWidgetItem *item)
void BearerMonitor::createNewSession()
{
QTreeWidgetItem *item = treeWidget->currentItem();
+ if (!item) return;
createSessionFor(item);
}
diff --git a/examples/network/bearermonitor/sessionwidget.cpp b/examples/network/bearermonitor/sessionwidget.cpp
index 443f4b2..3a8e5ea 100644
--- a/examples/network/bearermonitor/sessionwidget.cpp
+++ b/examples/network/bearermonitor/sessionwidget.cpp
@@ -59,7 +59,7 @@ SessionWidget::SessionWidget(const QNetworkConfiguration &config, QWidget *paren
connect(session, SIGNAL(stateChanged(QNetworkSession::State)),
this, SLOT(updateSession()));
connect(session, SIGNAL(error(QNetworkSession::SessionError)),
- this, SLOT(updateSession()));
+ this, SLOT(updateSessionError(QNetworkSession::SessionError)));
updateSession();
@@ -105,7 +105,6 @@ void SessionWidget::deleteSession()
void SessionWidget::updateSession()
{
updateSessionState(session->state());
- updateSessionError(session->error());
if (session->state() == QNetworkSession::Connected)
statsTimer = startTimer(1000);
@@ -128,12 +127,14 @@ void SessionWidget::updateSession()
void SessionWidget::openSession()
{
+ clearError();
session->open();
updateSession();
}
void SessionWidget::openSyncSession()
{
+ clearError();
session->open();
session->waitForOpened();
updateSession();
@@ -141,12 +142,14 @@ void SessionWidget::openSyncSession()
void SessionWidget::closeSession()
{
+ clearError();
session->close();
updateSession();
}
void SessionWidget::stopSession()
{
+ clearError();
session->stop();
updateSession();
}
@@ -195,3 +198,8 @@ void SessionWidget::updateSessionError(QNetworkSession::SessionError error)
errorString->setText(session->errorString());
}
+void SessionWidget::clearError()
+{
+ lastError->clear();
+ errorString->clear();
+}
diff --git a/examples/network/bearermonitor/sessionwidget.h b/examples/network/bearermonitor/sessionwidget.h
index 5e9d62c..b299b47 100644
--- a/examples/network/bearermonitor/sessionwidget.h
+++ b/examples/network/bearermonitor/sessionwidget.h
@@ -63,7 +63,7 @@ public:
private:
void updateSessionState(QNetworkSession::State state);
- void updateSessionError(QNetworkSession::SessionError error);
+ void clearError();
private Q_SLOTS:
void openSession();
@@ -71,9 +71,12 @@ private Q_SLOTS:
void closeSession();
void stopSession();
void updateSession();
+ void updateSessionError(QNetworkSession::SessionError error);
#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
void deleteSession();
#endif
+
+
private:
QNetworkSession *session;
int statsTimer;
diff --git a/examples/network/bearermonitor/sessionwidget.ui b/examples/network/bearermonitor/sessionwidget.ui
index 45135f5..56a2d0e 100644
--- a/examples/network/bearermonitor/sessionwidget.ui
+++ b/examples/network/bearermonitor/sessionwidget.ui
@@ -195,7 +195,7 @@
<item>
<widget class="QLabel" name="errorStringLabel">
<property name="text">
- <string>Error String</string>
+ <string>Error String:</string>
</property>
</widget>
</item>
diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf
index 3801eff..66b3d7f 100644
--- a/mkspecs/common/symbian/symbian-makefile.conf
+++ b/mkspecs/common/symbian/symbian-makefile.conf
@@ -13,13 +13,20 @@ QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
-QMAKE_ELF2E32_FLAGS +=
+QMAKE_ELF2E32_FLAGS = --dlldata \
+ --heap=0x00020000,0x00800000 \
+ --stack=0x00014000 \
+ --fpu=softvfp \
+ --unfrozen \
+ --compressionmethod bytepair \
+ --unpaged
include(../../common/unix.conf)
QMAKE_PREFIX_SHLIB =
QMAKE_EXTENSION_SHLIB = dll
CONFIG *= no_plugin_name_prefix
+CONFIG += run_on_phone
QMAKE_EXTENSION_PLUGIN = dll
QMAKE_PREFIX_STATICLIB =
QMAKE_EXTENSION_STATICLIB = lib
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 0bd0bf2..89034ca 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -66,7 +66,7 @@ QMAKE_LINK_OBJECT_MAX =
QMAKE_LINK_OBJECT_SCRIPT=
QMAKE_LIBS = -llibc -llibm -leuser -llibdl
-QMAKE_LIBS_CORE = $$QMAKE_LIBS -lefsrv -lhal
+QMAKE_LIBS_CORE = $$QMAKE_LIBS -lefsrv -lhal -lbafl
QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio -leikcoctl -leiksrv -lapparc -lcentralrepository
QMAKE_LIBS_NETWORK =
QMAKE_LIBS_EGL = -llibEGL
diff --git a/mkspecs/features/dbusadaptors.prf b/mkspecs/features/dbusadaptors.prf
index 241ace6..17dffa5 100644
--- a/mkspecs/features/dbusadaptors.prf
+++ b/mkspecs/features/dbusadaptors.prf
@@ -1,7 +1,4 @@
-isEmpty(QMAKE_QDBUSXML2CPP) {
- win32:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]\qdbusxml2cpp.exe
- else:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]/qdbusxml2cpp
-}
+qtPrepareTool(QMAKE_QDBUSXML2CPP, qdbusxml2cpp)
for(DBUS_ADAPTOR, $$list($$unique(DBUS_ADAPTORS))) {
diff --git a/mkspecs/features/dbusinterfaces.prf b/mkspecs/features/dbusinterfaces.prf
index c32597a..412e80f 100644
--- a/mkspecs/features/dbusinterfaces.prf
+++ b/mkspecs/features/dbusinterfaces.prf
@@ -1,9 +1,6 @@
load(moc)
-isEmpty(QMAKE_QDBUSXML2CPP) {
- win32:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]\qdbusxml2cpp.exe
- else:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]/qdbusxml2cpp
-}
+qtPrepareTool(QMAKE_QDBUSXML2CPP, qdbusxml2cpp)
for(DBUS_INTERFACE, $$list($$unique(DBUS_INTERFACES))) {
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index d12f5ad..e1032fd 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -1,9 +1,6 @@
#global defaults
-isEmpty(QMAKE_MOC) {
- contains(QMAKE_HOST.os,Windows):QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
- else:QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
-}
+qtPrepareTool(QMAKE_MOC, moc)
isEmpty(MOC_DIR):MOC_DIR = .
isEmpty(QMAKE_H_MOD_MOC):QMAKE_H_MOD_MOC = moc_
isEmpty(QMAKE_EXT_CPP_MOC):QMAKE_EXT_CPP_MOC = .moc
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 7b0b4af..62cce62 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -36,7 +36,7 @@ INCLUDEPATH = $$QMAKE_INCDIR_QT $$INCLUDEPATH #prepending prevents us from picki
win32:INCLUDEPATH += $$QMAKE_INCDIR_QT/ActiveQt
# As order does matter for static libs, we reorder the QT variable here
-TMPLIBS = declarative webkit phonon mediaservices multimedia dbus testlib script scripttools svg qt3support sql xmlpatterns xml egl opengl openvg gui network core
+TMPLIBS = declarative webkit phonon multimedia dbus testlib script scripttools svg qt3support sql xmlpatterns xml egl opengl openvg gui network core
for(QTLIB, $$list($$TMPLIBS)) {
contains(QT, $$QTLIB): QT_ORDERED += $$QTLIB
}
@@ -175,7 +175,6 @@ for(QTLIB, $$list($$lower($$unique(QT)))) {
}
} else:isEqual(QTLIB, declarative):qlib = QtDeclarative
else:isEqual(QTLIB, multimedia):qlib = QtMultimedia
- else:isEqual(QTLIB, mediaservices):qlib = QtMediaServices
else:message("Unknown QT: $$QTLIB"):qlib =
!isEmpty(qlib) {
target_qt:isEqual(TARGET, qlib) {
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 1be6d9b..a49c1a6 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -78,3 +78,14 @@ defineTest(qtAddLibrary) {
export(QMAKE_LFLAGS)
return(true)
}
+
+# variable, default
+defineTest(qtPrepareTool) {
+ isEmpty($$1) {
+ !isEmpty(QT_BUILD_TREE):$$1 = $$QT_BUILD_TREE/bin/$$2
+ else:$$1 = $$[QT_INSTALL_BINS]/$$2
+ }
+ $$1 ~= s,[/\\\\],$$QMAKE_DIR_SEP,
+ contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.exe$):$$1 = $$eval($$1).exe
+ export($$1)
+}
diff --git a/mkspecs/features/qttest_p4.prf b/mkspecs/features/qttest_p4.prf
index e3faef1..d2011d0 100644
--- a/mkspecs/features/qttest_p4.prf
+++ b/mkspecs/features/qttest_p4.prf
@@ -6,7 +6,7 @@ qtAddLibrary(QtTest)
symbian:{
TARGET.EPOCHEAPSIZE = 0x100000 0x2000000
# DEFINES += QTEST_NO_SPECIALIZATIONS
- TARGET.CAPABILITY="ALL -TCB"
+ TARGET.CAPABILITY="None"
RSS_RULES ="group_name=\"QtTests\";"
}
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
index eb33aab..5d00a4d 100644
--- a/mkspecs/features/resources.prf
+++ b/mkspecs/features/resources.prf
@@ -1,7 +1,4 @@
-isEmpty(QMAKE_RCC) {
- win32:QMAKE_RCC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}rcc.exe
- else:QMAKE_RCC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}rcc
-}
+qtPrepareTool(QMAKE_RCC, rcc)
isEmpty(RCC_DIR):RCC_DIR = .
isEmpty(QMAKE_RESOURCE_PREFIX):QMAKE_RESOURCE_PREFIX = /tmp/
diff --git a/mkspecs/features/sis_targets.prf b/mkspecs/features/sis_targets.prf
index 7d70fc6..da2d250 100644
--- a/mkspecs/features/sis_targets.prf
+++ b/mkspecs/features/sis_targets.prf
@@ -59,7 +59,7 @@ contains(TEMPLATE, app)|!count(DEPLOYMENT, 1) {
)
ok_stub_sis_target.target = ok_stub_sis
- ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \
+ ok_stub_sis_target.commands = createpackage.bat -s $(QT_SIS_OPTIONS) $$basename(TARGET)_stub.pkg \
$(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
QMAKE_EXTRA_TARGETS += sis_target \
diff --git a/mkspecs/features/static.prf b/mkspecs/features/static.prf
index ef3af07..288852d 100644
--- a/mkspecs/features/static.prf
+++ b/mkspecs/features/static.prf
@@ -11,9 +11,4 @@ mac {
QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB
}
-symbian {
- # we don't care about exports from static libraries, as they don't end up in DEF files
- MMP_RULES -= $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA
-}
-
!static_and_shared:fix_output_dirs:fixExclusiveOutputDirs(static, shared)
diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf
index a1f0c8d..8bcd096 100644
--- a/mkspecs/features/symbian/def_files.prf
+++ b/mkspecs/features/symbian/def_files.prf
@@ -64,14 +64,14 @@ symbian-abld|symbian-sbsv2 {
freeze_target.depends = first
# The perl part is to convert to unix line endings and remove comments, which the s60 tools refuse to do.
freeze_target.commands = perl -n -e \'next if (/; NEW/); s/\r//g; if (/MISSING:(.*)/x) { print(\"\$\$1 ABSENT\\n\"); } else { print; }\' < $$symbianObjdir/$${TARGET}.def > $$elf2e32FileToAdd
- #QMAKE_EXTRA_TARGETS += freeze_target
+ QMAKE_EXTRA_TARGETS += freeze_target
} else:contains(TEMPLATE, subdirs) {
freeze_target.target = freeze
freeze_target.CONFIG = recursive
freeze_target.recurse = $$SUBDIRS
- #QMAKE_EXTRA_TARGETS += freeze_target
+ QMAKE_EXTRA_TARGETS += freeze_target
} else {
freeze_target.target = freeze
freeze_target.commands =
- #QMAKE_EXTRA_TARGETS += freeze_target
+ QMAKE_EXTRA_TARGETS += freeze_target
}
diff --git a/mkspecs/features/symbian/run_on_phone.prf b/mkspecs/features/symbian/run_on_phone.prf
new file mode 100644
index 0000000..c4c7baf
--- /dev/null
+++ b/mkspecs/features/symbian/run_on_phone.prf
@@ -0,0 +1,9 @@
+# make sure we have a sis file and then call 'runonphone' to execute it on the phone
+
+contains(TEMPLATE, app) {
+ run_target.target = runonphone
+ run_target.depends = sis
+ run_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${TARGET}.sis" "$${TARGET}.exe" $(QT_RUN_OPTIONS)
+
+ QMAKE_EXTRA_TARGETS += run_target
+}
diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
index b0cc6f2..802adde 100644
--- a/mkspecs/features/symbian/symbian_building.prf
+++ b/mkspecs/features/symbian/symbian_building.prf
@@ -100,13 +100,19 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
# The comparison of dso files is to avoid extra building of modules that depend on this dso, in
# case it has not changed.
QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET}.dll $$symbianDestdir/$${TARGET}.sym \
- && elf2e32 --version=$$decVersion --sid=$$TARGET.SID --uid1=0x10000079 \
- --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 \
- --stack=0x00014000 --fpu=softvfp --targettype=DLL \
- --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.dll \
- --dso=$$symbianObjdir/$${TARGET}.dso --defoutput=$$symbianObjdir/$${TARGET}.def \
- --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \
- --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \
+ && elf2e32 --version=$$decVersion \
+ --sid=$$TARGET.SID \
+ --uid1=0x10000079 \
+ --uid2=$$TARGET.UID2 \
+ --uid3=$$TARGET.UID3 \
+ --targettype=DLL \
+ --elfinput=$${symbianDestdir}/$${TARGET}.sym \
+ --output=$${symbianDestdir}/$${TARGET}.dll \
+ --dso=$$symbianObjdir/$${TARGET}.dso \
+ --defoutput=$$symbianObjdir/$${TARGET}.def \
+ --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].dll \
+ $$elf2e32_LIBPATH \
+ $$capability \
$$QMAKE_ELF2E32_FLAGS \
| tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \
&& if ! diff -q $${symbianObjdir}/$${TARGET}.dso $${symbianDestdir}/$${TARGET}.dso \
@@ -120,9 +126,10 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) {
QMAKE_CLEAN += $${symbianObjdir}/$${TARGET}.def
linux-armcc: {
- QMAKE_LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\)
+ 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 {
- QMAKE_LIBS += \
+ LIBS += \
-l:edll.lib \
-l:usrt2_2.lib \
-l:dfpaeabi.dso \
@@ -144,12 +151,17 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") {
}
# the tee and grep at the end work around the issue that elf2e32 doesn't return non-null on error
QMAKE_POST_LINK = $$QMAKE_MOVE $$symbianDestdir/$${TARGET} $$symbianDestdir/$${TARGET}.sym \
- && elf2e32 --version $$decVersion --sid=$$TARGET.SID --uid1=0x1000007a \
- --uid2=$$TARGET.UID2 --uid3=$$TARGET.UID3 --dlldata --heap=0x00020000,0x00800000 \
- --stack=0x00014000 --fpu=softvfp --targettype=EXE \
- --elfinput=$${symbianDestdir}/$${TARGET}.sym --output=$${symbianDestdir}/$${TARGET}.exe \
- --unfrozen --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \
- --compressionmethod bytepair $$elf2e32_LIBPATH --unpaged $$capability \
+ && elf2e32 --version $$decVersion \
+ --sid=$$TARGET.SID \
+ --uid1=0x1000007a \
+ --uid2=$$TARGET.UID2 \
+ --uid3=$$TARGET.UID3 \
+ --targettype=EXE \
+ --elfinput=$${symbianDestdir}/$${TARGET}.sym \
+ --output=$${symbianDestdir}/$${TARGET}.exe \
+ --linkas=$${TARGET}\\{$${hexVersion}\\}\\[$${intUid3}\\].exe \
+ $$elf2e32_LIBPATH \
+ $$capability \
$$QMAKE_ELF2E32_FLAGS \
| tee elf2e32.log && test `grep -c 'Error:' elf2e32.log` = 0 && rm elf2e32.log \
&& ln "$${symbianDestdir}/$${TARGET}.exe" "$${symbianDestdir}/$$TARGET" \
@@ -159,6 +171,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@.*") {
QMAKE_CLEAN += $${symbianDestdir}/$${TARGET}
linux-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"):contains(QT, "core") { #if linking with QtCore
QMAKE_LIBS += -lqtmain$${QT_LIBINFIX}.lib
diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf
index 8ebe0ea..d108f24 100644
--- a/mkspecs/features/uic.prf
+++ b/mkspecs/features/uic.prf
@@ -1,13 +1,5 @@
-
-isEmpty(QMAKE_UIC3) {
- contains(QMAKE_HOST.os,Windows):QMAKE_UIC3 = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic3.exe
- else:QMAKE_UIC3 = $$[QT_INSTALL_BINS]/uic3
-}
-
-isEmpty(QMAKE_UIC) {
- contains(QMAKE_HOST.os,Windows):QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
- else:QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
-}
+qtPrepareTool(QMAKE_UIC3, uic3)
+qtPrepareTool(QMAKE_UIC, uic)
isEmpty(UI_DIR):UI_DIR = .
isEmpty(UI_SOURCES_DIR):UI_SOURCES_DIR = $$UI_DIR
diff --git a/mkspecs/features/win32/qaxcontainer.prf b/mkspecs/features/win32/qaxcontainer.prf
index 49edb2a..34c6dfe 100644
--- a/mkspecs/features/win32/qaxcontainer.prf
+++ b/mkspecs/features/win32/qaxcontainer.prf
@@ -8,9 +8,7 @@
LIBS += -lQAxContainer
}
-isEmpty(QMAKE_DUMPCPP) {
- win32:QMAKE_DUMPCPP = $$[QT_INSTALL_BINS]\dumpcpp.exe
-}
+qtPrepareTool(QMAKE_DUMPCPP, dumpcpp)
dumpcpp_decl.commands = $$QMAKE_DUMPCPP ${QMAKE_FILE_IN} -o ${QMAKE_FILE_BASE}
qaxcontainer_compat: dumpcpp_decl.commands += -compat
diff --git a/mkspecs/features/win32/qaxserver.prf b/mkspecs/features/win32/qaxserver.prf
index a18c421..1ff6825 100644
--- a/mkspecs/features/win32/qaxserver.prf
+++ b/mkspecs/features/win32/qaxserver.prf
@@ -14,7 +14,8 @@ equals(TEMPLATE, "vcapp"):ACTIVEQT_IDE = VisualStudio
equals(TEMPLATE, "vclib"):ACTIVEQT_IDE = VisualStudio
equals(ACTIVEQT_IDE, "VisualStudio") {
- ACTIVEQT_IDC = $${QMAKE_IDC}
+ ACTIVEQT_IDC = $${QMAKE_IDC} ### Qt5: remove me
+ qtPrepareTool(ACTIVEQT_IDC, idc)
ACTIVEQT_IDL = $${QMAKE_IDL}
ACTIVEQT_TARGET = "$(TargetPath)"
win32-msvc {
diff --git a/mkspecs/symbian/linux-armcc/qmake.conf b/mkspecs/symbian/linux-armcc/qmake.conf
index 599e552..77fb1ea 100644
--- a/mkspecs/symbian/linux-armcc/qmake.conf
+++ b/mkspecs/symbian/linux-armcc/qmake.conf
@@ -6,8 +6,6 @@ include(../../common/symbian/symbian-makefile.conf)
include(../../common/armcc.conf)
-QMAKE_LIBS += usrt2_2.lib dfpaeabi.dso dfprvct2_2.dso drtaeabi.dso scppnwdl.dso drtrvct2_2.dso h_t__uf.l\\(switch8.o\\)
-
QMAKE_RVCT_LINKSTYLE = 1
# notice that the middle part of the following set of vars matches the TARGET content of the libs
@@ -33,8 +31,8 @@ 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_CFLAGS += --dllimport_runtime --preinclude rvct2_2.h --diag_suppress 186,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --export_all_vtbl --no_vfe --apcs /inter $$QMAKE_CFLAGS.ARMCC
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS --no_parse_templates $$QMAKE_CXXFLAGS.ARMCC
+QMAKE_CFLAGS += --dllimport_runtime --preinclude rvct2_2.h --diag_suppress 186,654,1300 --thumb --fpu softvfp --cpu 5T --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --no_vfe --apcs /inter $$QMAKE_CFLAGS.ARMCC
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS $$QMAKE_CXXFLAGS.ARMCC
QMAKE_LFLAGS += --symver_soname --diag_suppress 6331,6780 --bpabi --reloc --datacompressor=off --split --dll --no_scanlib
QMAKE_LFLAGS_APP += --entry _E32Startup
QMAKE_LFLAGS_SHLIB += --entry _E32Dll
diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf
index 57bb56a..faac2f1 100644
--- a/mkspecs/symbian/linux-gcce/qmake.conf
+++ b/mkspecs/symbian/linux-gcce/qmake.conf
@@ -83,13 +83,13 @@ for(line, QMAKE_GCC_SEARCH_DIRS) {
}
}
-QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib
-
-INCLUDEPATH = ${EPOCROOT}epoc32/include/ \
- $${EPOCROOT}epoc32/include/variant \
- $${EPOCROOT}epoc32/include/stdapis \
- $${EPOCROOT}epoc32/include/gcce \
- ${EPOCROOT}epoc32/include/stdapis/sys \
- ${EPOCROOT}epoc32/include/stdapis/stlport \
+QMAKE_LIBDIR += $${EPOCROOT}/epoc32/release/armv5/lib
+
+INCLUDEPATH = ${EPOCROOT}/epoc32/include/ \
+ $${EPOCROOT}/epoc32/include/variant \
+ $${EPOCROOT}/epoc32/include/stdapis \
+ $${EPOCROOT}/epoc32/include/gcce \
+ ${EPOCROOT}/epoc32/include/stdapis/sys \
+ ${EPOCROOT}/epoc32/include/stdapis/stlport \
$$INCLUDEPATH
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
index b282f69..8881d02 100644
--- a/mkspecs/win32-g++/qmake.conf
+++ b/mkspecs/win32-g++/qmake.conf
@@ -75,6 +75,7 @@ QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
!isEmpty(QMAKE_SH) {
MINGW_IN_SHELL = 1
QMAKE_DIR_SEP = /
+ QMAKE_QMAKE ~= s,\\\\,/,
QMAKE_COPY = cp
QMAKE_COPY_DIR = xcopy /s /q /y /i
QMAKE_MOVE = mv
diff --git a/projects.pro b/projects.pro
index fc7db1d..45fb8da 100644
--- a/projects.pro
+++ b/projects.pro
@@ -165,6 +165,10 @@ unix {
DEFAULT_QMAKESPEC ~= s,^.*mkspecs/,,g
mkspecs.commands += $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default; $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default
}
+win32:!equals(QT_BUILD_TREE, $$QT_SOURCE_TREE) {
+ # When shadow building on Windows, the default mkspec only exists in the build tree.
+ mkspecs.files += $$QT_BUILD_TREE/mkspecs/default
+}
INSTALLS += mkspecs
false:macx { #mac install location
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index 956fa9c..b58757c 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -200,7 +200,7 @@ clean::
-del symmake.obj
-del symmake_abld.obj
-del symmake_sbsv2.obj
- -del symbiancommon.obj
+ -del symbiancommon.obj
-del initprojectdeploy_symbian.obj
-del registry.obj
-del epocroot.obj
@@ -442,7 +442,7 @@ pbuilder_pbx.obj: $(SOURCE_PATH)/qmake/generators/mac/pbuilder_pbx.cpp
makefiledeps.obj: $(SOURCE_PATH)/qmake/generators/makefiledeps.cpp
$(CXX) $(CXXFLAGS) generators/makefiledeps.cpp
-metamakefile.obj: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp $(SOURCE_PATH)/qmake/generators/symbian/symbiancommon.obj
+metamakefile.obj: $(SOURCE_PATH)/qmake/generators/metamakefile.cpp
$(CXX) $(CXXFLAGS) generators/metamakefile.cpp
xmloutput.obj: $(SOURCE_PATH)/qmake/generators/xmloutput.cpp
diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++
index 477203d..e52b8c6 100644
--- a/qmake/Makefile.win32-g++
+++ b/qmake/Makefile.win32-g++
@@ -27,7 +27,7 @@ CFLAGS = -c -o$@ -O \
-DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
-DQT_BOOTSTRAPPED
CXXFLAGS = $(CFLAGS)
-LFLAGS = -static-libgcc -s
+LFLAGS = -static-libgcc -static-libstdc++ -s
LIBS = -lole32 -luuid
LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
ADDCLEAN =
@@ -326,3 +326,4 @@ qxmlstream.o: $(SOURCE_PATH)/src/corelib/xml/qxmlstream.cpp
qxmlutils.o: $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp
$(CXX) $(CXXFLAGS) $(SOURCE_PATH)/src/corelib/xml/qxmlutils.cpp
+
diff --git a/qmake/Makefile.win32-g++-sh b/qmake/Makefile.win32-g++-sh
index 6aac39f..e4e2e6a 100644
--- a/qmake/Makefile.win32-g++-sh
+++ b/qmake/Makefile.win32-g++-sh
@@ -27,7 +27,7 @@ CFLAGS = -c -o$@ -O \
-DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
-DQT_BOOTSTRAPPED
CXXFLAGS = $(CFLAGS)
-LFLAGS = -static-libgcc -s
+LFLAGS = -static-libgcc -static-libstdc++ -s
LIBS = -lole32 -luuid
LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
ADDCLEAN =
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 29a2422..4c4f5bc 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1236,7 +1236,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
target += "\n";
do_default = false;
for(QStringList::Iterator wild_it = tmp.begin(); wild_it != tmp.end(); ++wild_it) {
- QString wild = Option::fixPathToLocalOS((*wild_it), false, false);
+ QString wild = Option::fixPathToTargetOS((*wild_it), false, false);
QString dirstr = qmake_getpwd(), filestr = wild;
int slsh = filestr.lastIndexOf(Option::dir_sep);
if(slsh != -1) {
@@ -1277,13 +1277,26 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
}
QString local_dirstr = Option::fixPathToLocalOS(dirstr, true);
QStringList files = QDir(local_dirstr).entryList(QStringList(filestr));
- if(project->values((*it) + ".CONFIG").indexOf("no_check_exist") != -1 && files.isEmpty()) {
+ const QStringList &installConfigValues = project->values((*it) + ".CONFIG");
+ if (installConfigValues.contains("no_check_exist") && files.isEmpty()) {
if(!target.isEmpty())
target += "\t";
QString dst_file = filePrefixRoot(root, dst);
QFileInfo fi(fileInfo(wild));
- QString cmd = QString(fi.isExecutable() ? "-$(INSTALL_PROGRAM)" : "-$(INSTALL_FILE)") + " " +
- wild + " " + dst_file + "\n";
+ QString cmd;
+ if (installConfigValues.contains("directory")) {
+ cmd = QLatin1String("-$(INSTALL_DIR)");
+ if (!dst_file.endsWith(Option::dir_sep))
+ dst_file += Option::dir_sep;
+ dst_file += fi.fileName();
+ } else if (installConfigValues.contains("executable")) {
+ cmd = QLatin1String("-$(INSTALL_PROGRAM)");
+ } else if (installConfigValues.contains("data")) {
+ cmd = QLatin1String("-$(INSTALL_FILE)");
+ } else {
+ cmd = QString(fi.isExecutable() ? "-$(INSTALL_PROGRAM)" : "-$(INSTALL_FILE)");
+ }
+ cmd += " " + wild + " " + dst_file + "\n";
target += cmd;
if(!uninst.isEmpty())
uninst.append("\n\t");
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 6407412..4552185 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -91,12 +91,13 @@ static void createPluginStub(const QFileInfo& info,
QStringList& generatedDirs,
QStringList& generatedFiles)
{
- QDir().mkpath(QLatin1String(PLUGIN_STUB_DIR));
- if (!generatedDirs.contains(PLUGIN_STUB_DIR))
- generatedDirs << PLUGIN_STUB_DIR;
+ QString pluginStubDir = Option::output_dir + QLatin1Char('/') + QLatin1String(PLUGIN_STUB_DIR);
+ QDir().mkpath(pluginStubDir);
+ if (!generatedDirs.contains(pluginStubDir))
+ generatedDirs << pluginStubDir;
// Plugin stubs must have different name from the actual plugins, because
// the toolchain for creating ROM images cannot handle non-binary .dll files properly.
- QFile stubFile(QLatin1String(PLUGIN_STUB_DIR "/") + info.completeBaseName() + "." SUFFIX_QTPLUGIN);
+ QFile stubFile(pluginStubDir + QLatin1Char('/') + info.completeBaseName() + QLatin1Char('.') + QLatin1String(SUFFIX_QTPLUGIN));
if (stubFile.open(QIODevice::WriteOnly)) {
if (!generatedFiles.contains(stubFile.fileName()))
generatedFiles << stubFile.fileName();
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index b730d9e..aa44afc 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -142,6 +142,13 @@ void SymbianCommonGenerator::removeEpocSpecialCharacters(QString& str)
removeSpecialCharacters(str);
}
+QString romPath(const QString& path)
+{
+ if(path.length() > 2 && path[1] == ':')
+ return QLatin1String("z:") + path.mid(2);
+ return QLatin1String("z:") + path;
+}
+
void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocBuild)
{
QMakeProject *project = generator->project;
@@ -150,9 +157,8 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
pkgTarget = project->first("TARGET");
pkgTarget = generator->unescapeFilePath(pkgTarget);
pkgTarget = removePathSeparators(pkgTarget);
- QString pkgFilename = QString("%1_template.%2").arg(pkgTarget).arg("pkg");
- if (!Option::output_dir.isEmpty())
- pkgFilename = Option::output_dir + '/' + pkgFilename;
+ QString pkgFilename = Option::output_dir + QLatin1Char('/') +
+ QString("%1_template.pkg").arg(pkgTarget);
QFile pkgFile(pkgFilename);
if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
@@ -160,8 +166,19 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
return;
}
+ QString stubPkgFileName = Option::output_dir + QLatin1Char('/') +
+ QString("%1_stub.pkg").arg(pkgTarget);
+
+ QFile stubPkgFile(stubPkgFileName);
+ if (!stubPkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
+ PRINT_FILE_CREATE_ERROR(stubPkgFileName);
+ return;
+ }
+
generatedFiles << pkgFile.fileName();
QTextStream t(&pkgFile);
+ generatedFiles << stubPkgFile.fileName();
+ QTextStream ts(&stubPkgFile);
QString installerSisHeader = project->values("DEPLOYMENT.installer_header").join("\n");
if (installerSisHeader.isEmpty())
@@ -173,14 +190,15 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
QString dateStr = QDateTime::currentDateTime().toString(Qt::ISODate);
// Header info
- QString wrapperPkgFilename = QString("%1_installer.%2")
- .arg(pkgTarget)
- .arg("pkg");
+ QString wrapperPkgFilename = Option::output_dir + QLatin1Char('/') + QString("%1_installer.%2")
+ .arg(pkgTarget).arg("pkg");
+
QString headerComment = "; %1 generated by qmake at %2\n"
"; This file is generated by qmake and should not be modified by the user\n"
";\n\n";
t << headerComment.arg(pkgFilename).arg(dateStr);
tw << headerComment.arg(wrapperPkgFilename).arg(dateStr);
+ ts << headerComment.arg(stubPkgFileName).arg(dateStr);
// Construct QStringList from pkg_prerules since we need search it before printed to file
// Note: Though there can't be more than one language or header line, use stringlists
@@ -230,6 +248,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
t << languageRules.join("\n") << endl;
tw << languageRules.join("\n") << endl;
+ ts << languageRules.join("\n") << endl;
// name of application, UID and version
QString applicationVersion = project->first("VERSION").isEmpty() ? "1,0,0" : project->first("VERSION").replace('.', ',');
@@ -245,10 +264,14 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
tw << installerSisHeader << endl;
}
- if (headerRules.isEmpty())
+ if (headerRules.isEmpty()) {
t << sisHeader.arg(visualTarget).arg(uid3).arg(applicationVersion);
- else
+ ts << sisHeader.arg(visualTarget).arg(uid3).arg(applicationVersion);
+ }
+ else {
t << headerRules.join("\n") << endl;
+ ts << headerRules.join("\n") << endl;
+ }
// Localized vendor name
QString vendorName;
@@ -263,22 +286,33 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
t << vendorName;
tw << vendorName;
+ ts << vendorName;
// PKG pre-rules - these are added before actual file installations i.e. SIS package body
if (rawPkgPreRules.size()) {
QString comment = "\n; Manual PKG pre-rules from PRO files\n";
t << comment;
tw << comment;
+ ts << comment;
foreach(QString item, rawPkgPreRules) {
- // Only regular pkg file should have package dependencies or pkg header if that is
- // defined using prerules.
- if (!item.startsWith("(") && !item.startsWith("#")) {
+ // Only regular pkg file should have package dependencies
+ if (item.startsWith("(")) {
+ t << item << endl;
+ }
+ // stub pkg file should not have platform dependencies
+ else if (item.startsWith("[")) {
+ t << item << endl;
+ tw << item << endl;
+ }
+ else {
+ t << item << endl;
+ ts << item << endl;
tw << item << endl;
}
- t << item << endl;
}
t << endl;
+ ts << endl;
tw << endl;
}
@@ -320,41 +354,54 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
// deploy .exe file
t << "; Executable and default resource files" << endl;
QString exeFile = fixedTarget + ".exe";
- t << QString("\"%1/%2\" - \"%3\\%4\"")
+ t << QString("\"%1/%2\" - \"%3\\%4\"")
.arg(destDirBin)
.arg(exeFile)
.arg(installPathBin)
.arg(exeFile) << endl;
+ ts << QString("\"\" - \"%1\\%2\"")
+ .arg(romPath(installPathBin))
+ .arg(exeFile) << endl;
// deploy rsc & reg_rsc file
if (!project->isActiveConfig("no_icon")) {
- t << QString("\"%1/%2\" - \"%3\\%4\"")
+ t << QString("\"%1/%2\" - \"%3\\%4\"")
.arg(destDirResource)
.arg(fixedTarget + ".rsc")
.arg(installPathResource)
.arg(fixedTarget + ".rsc") << endl;
+ ts << QString("\"\" - \"%1\\%2\"")
+ .arg(romPath(installPathResource))
+ .arg(fixedTarget + ".rsc") << endl;
- t << QString("\"%1/%2\" - \"%3\\%4\"")
+ t << QString("\"%1/%2\" - \"%3\\%4\"")
.arg(destDirRegResource)
.arg(fixedTarget + "_reg.rsc")
.arg(installPathRegResource)
.arg(fixedTarget + "_reg.rsc") << endl;
+ ts << QString("\"\" - \"%1\\%2\"")
+ .arg(romPath(installPathRegResource))
+ .arg(fixedTarget + "_reg.rsc") << endl;
if (!iconFile.isEmpty()) {
if (epocBuild) {
- t << QString("\"%1epoc32/data/z%2\" - \"!:%3\"")
+ t << QString("\"%1epoc32/data/z%2\" - \"!:%3\"")
.arg(epocRoot())
.arg(iconFile)
.arg(QDir::toNativeSeparators(iconFile)) << endl << endl;
+ ts << QString("\"\" - \"%1\"")
+ .arg(romPath(QDir::toNativeSeparators(iconFile))) << endl << endl;
} else {
QDir mifIconDir(project->first("DESTDIR"));
QFileInfo mifIcon(mifIconDir.relativeFilePath(project->first("TARGET")));
QString mifIconFileName = mifIcon.fileName();
mifIconFileName.append(".mif");
- t << QString("\"%1/%2\" - \"!:%3\"")
+ t << QString("\"%1/%2\" - \"!:%3\"")
.arg(mifIcon.path())
.arg(mifIconFileName)
.arg(QDir::toNativeSeparators(iconFile)) << endl << endl;
+ ts << QString("\"\" - \"%1\"")
+ .arg(romPath(QDir::toNativeSeparators(iconFile))) << endl << endl;
}
}
}
@@ -390,9 +437,11 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
}
}
- t << QString("\"%1\" - \"%2\"").arg(from.replace('\\','/')).arg(to) << endl;
+ t << QString("\"%1\" - \"%2\"").arg(from.replace('\\','/')).arg(to) << endl;
+ ts << QString("\"\" - \"%1\"").arg(romPath(to)) << endl;
}
t << endl;
+ ts << endl;
// PKG post-rules - these are added after actual file installations i.e. SIS package body
t << "; Manual PKG post-rules from PRO files" << endl;
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index faafb20..1006e39 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -175,6 +175,12 @@ void SymbianMakefileGenerator::writeHeader(QTextStream &t)
bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
{
+ if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) {
+ fprintf(stderr, "Project files not generated because all requirements are not met:\n\t%s\n",
+ qPrintable(var("QMAKE_FAILED_REQUIREMENTS")));
+ return false;
+ }
+
writeHeader(t);
QString numberOfIcons;
@@ -208,7 +214,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
// Generate empty wrapper makefile here, because wrapper makefile must exist before writeMkFile,
// but all required data is not yet available.
bool isPrimaryMakefile = true;
- QString wrapperFileName("Makefile");
+ QString wrapperFileName = Option::output_dir + QLatin1Char('/') + QLatin1String("Makefile");
QString outputFileName = fileInfo(Option::output.fileName()).fileName();
if (outputFileName != BLD_INF_FILENAME) {
wrapperFileName.append(".").append(outputFileName.startsWith(BLD_INF_FILENAME)
@@ -240,10 +246,8 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
shortProFilename.replace(0, shortProFilename.lastIndexOf("/") + 1, QString(""));
shortProFilename.replace(Option::pro_ext, QString(""));
- QString mmpFilename = shortProFilename;
- mmpFilename.append("_");
- mmpFilename.append(uid3);
- mmpFilename.append(Option::mmp_ext);
+ QString mmpFilename = Option::output_dir + QLatin1Char('/') + shortProFilename + QLatin1Char('_')
+ + uid3 + Option::mmp_ext;
writeMmpFile(mmpFilename, symbianLangCodes);
if (targetType == TypeExe) {
@@ -264,7 +268,7 @@ void SymbianMakefileGenerator::writeCustomDefFile()
{
if (targetType == TypePlugin && !project->isActiveConfig("stdbinary")) {
// Create custom def file for plugin
- QFile ft(QLatin1String(PLUGIN_COMMON_DEF_FILE_ACTUAL));
+ QFile ft(Option::output_dir + QLatin1Char('/') + QLatin1String(PLUGIN_COMMON_DEF_FILE_ACTUAL));
if (ft.open(QIODevice::WriteOnly)) {
generatedFiles << ft.fileName();
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 0ba1a3c..7e3fb45 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -199,7 +199,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
t << "# ==============================================================================" << "\n" << endl;
t << endl;
- t << "MAKEFILE = " << wrapperFile.fileName() << endl;
+ t << "MAKEFILE = " << fileInfo(wrapperFile.fileName()).fileName() << endl;
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 3a6706a..feacbef 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -143,7 +143,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo
t << "#" << endl;
t << "# ==============================================================================" << "\n" << endl;
t << endl;
- t << "MAKEFILE = " << wrapperFile.fileName() << endl;
+ t << "MAKEFILE = " << fileInfo(wrapperFile.fileName()).fileName() << endl;
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 522d517..99cdd11 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -396,6 +396,7 @@ VCXCLCompilerTool::VCXCLCompilerTool()
MultiProcessorCompilation(unset),
OmitDefaultLibName(unset),
OmitFramePointers(unset),
+ Optimization("Disabled"),
OpenMPSupport(unset),
PreprocessKeepComments(unset),
PreprocessSuppressLineNumbers(unset),
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index 3f60a13..97f8570 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -59,7 +59,7 @@ enum DotNET {
NET2003 = 0x71,
NET2005 = 0x80,
NET2008 = 0x90,
- NET2010 = 0x91
+ NET2010 = 0xa0
};
/*
diff --git a/qmake/generators/win32/msvc_vcxproj.cpp b/qmake/generators/win32/msvc_vcxproj.cpp
index da93fe3..05c1511 100644
--- a/qmake/generators/win32/msvc_vcxproj.cpp
+++ b/qmake/generators/win32/msvc_vcxproj.cpp
@@ -89,7 +89,6 @@ bool VcxprojGenerator::writeMakefile(QTextStream &t)
return true;
}
return project->isActiveConfig("build_pass");
- return true;
}
diff --git a/qmake/qmake.pri b/qmake/qmake.pri
index 0163839..6e0f8a2 100644
--- a/qmake/qmake.pri
+++ b/qmake/qmake.pri
@@ -13,7 +13,8 @@ SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \
generators/xmloutput.cpp generators/win32/borland_bmake.cpp \
generators/win32/msvc_nmake.cpp generators/projectgenerator.cpp \
generators/win32/msvc_vcproj.cpp \
- generators/win32/msvc_objectmodel.cpp \
+ generators/win32/msvc_vcxproj.cpp \
+ generators/win32/msvc_objectmodel.cpp generators/win32/msbuild_objectmodel.cpp \
generators/symbian/symbiancommon.cpp \
generators/symbian/symmake.cpp \
generators/symbian/symmake_abld.cpp \
@@ -24,11 +25,12 @@ SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \
HEADERS += project.h property.h generators/makefile.h \
generators/unix/unixmake.h meta.h option.h cachekeys.h \
- generators/win32/winmakefile.h generators/projectgenerator.h \
+ generators/win32/winmakefile.h generators/win32/mingw_make.h generators/projectgenerator.h \
generators/makefiledeps.h generators/metamakefile.h generators/mac/pbuilder_pbx.h \
generators/xmloutput.h generators/win32/borland_bmake.h generators/win32/msvc_nmake.h \
generators/win32/msvc_vcproj.h \
- generators/win32/mingw_make.h generators/win32/msvc_objectmodel.h \
+ generators/win32/msvc_vcxproj.h \
+ generators/win32/msvc_objectmodel.h generators/win32/msbuild_objectmodel.h \
generators/symbian/symbiancommon.h \
generators/symbian/symmake.h \
generators/symbian/symmake_abld.h \
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
index 11572b0..fd6125f 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-05-10 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ [Qt] Disable JIT support for mingw-w64
+ https://bugs.webkit.org/show_bug.cgi?id=38747
+
+ Disale JIT for mingw-w64 as it is reportedly
+ unstable.
+
+ Thanks for Vanboxem Rruben for the investigation.
+
+ * wtf/Platform.h:
+
2010-04-14 Kent Hansen <kent.hansen@nokia.com>
Reviewed by Maciej Stachowiak.
@@ -24,6 +38,20 @@
* wtf/VMTags.h:
+2010-04-02 Ruben Van Boxem <vanboxem.ruben@gmail.com>
+
+ Reviewed by Eric Seidel.
+
+ Mingw-w64 fixes for JavaScriptCore
+ https://bugs.webkit.org/show_bug.cgi?id=35607
+
+ * runtime/Collector.cpp: use the msvc code for mingw-w64 (but not mingw-w32)
+ (JSC::Heap::allocateBlock):
+ (JSC::Heap::freeBlockPtr):
+ (JSC::currentThreadStackBase):
+ (JSC::currentThreadStackBase):
+ * wtf/Platform.h: added COMPILER(MINGW64) check to differentiate between mingw.org and mingw-w64 functions
+
2010-03-29 Patrick Gansterer <paroga@paroga.com>
Reviewed by Darin Adler.
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
index 29df7a5..57f2a92 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
@@ -231,7 +231,7 @@ NEVER_INLINE CollectorBlock* Heap::allocateBlock()
#elif OS(WINCE)
void* address = VirtualAlloc(NULL, BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
#elif OS(WINDOWS)
-#if COMPILER(MINGW) && !CPU(X86_64)
+#if COMPILER(MINGW) && !COMPILER(MINGW64)
void* address = __mingw_aligned_malloc(BLOCK_SIZE, BLOCK_SIZE);
#else
void* address = _aligned_malloc(BLOCK_SIZE, BLOCK_SIZE);
@@ -324,7 +324,7 @@ NEVER_INLINE void Heap::freeBlockPtr(CollectorBlock* block)
#elif OS(WINCE)
VirtualFree(block, 0, MEM_RELEASE);
#elif OS(WINDOWS)
-#if COMPILER(MINGW) && !CPU(X86_64)
+#if COMPILER(MINGW) && !COMPILER(MINGW64)
__mingw_aligned_free(block);
#else
_aligned_free(block);
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
index b3e3dba..be5f51b 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
@@ -79,9 +79,14 @@
#endif
/* COMPILER(MINGW) - MinGW GCC */
-#if defined(MINGW) || defined(__MINGW32__)
+/* COMPILER(MINGW64) - mingw-w64 GCC - only used as additional check to exclude mingw.org specific functions */
+#if defined(__MINGW32__)
#define WTF_COMPILER_MINGW 1
-#endif
+#include <_mingw.h> /* private MinGW header */
+ #if defined(__MINGW64_VERSION_MAJOR) /* best way to check for mingw-w64 vs mingw.org */
+ #define WTF_COMPILER_MINGW64 1
+ #endif /* __MINGW64_VERSION_MAJOR */
+#endif /* __MINGW32__ */
/* COMPILER(SUNCC) - Sun CC compiler, also known as Sun Studio or Sun Pro */
#if defined(__SUNPRO_CC) || defined(__SUNPRO_C)
@@ -964,6 +969,7 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#if PLATFORM(QT)
#if (CPU(X86) && OS(WINDOWS) && COMPILER(MINGW) && GCC_VERSION >= 40100) \
+ || (CPU(X86_64) && OS(WINDOWS) && COMPILER(MINGW64) && GCC_VERSION >= 40100) \
|| (CPU(X86) && OS(WINDOWS) && COMPILER(MSVC)) \
|| (CPU(X86) && OS(LINUX) && GCC_VERSION >= 40100) \
|| (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100) \
diff --git a/src/3rdparty/javascriptcore/VERSION b/src/3rdparty/javascriptcore/VERSION
index 9a02027..1b5109a 100644
--- a/src/3rdparty/javascriptcore/VERSION
+++ b/src/3rdparty/javascriptcore/VERSION
@@ -4,8 +4,8 @@ This is a snapshot of JavaScriptCore from
The commit imported was from the
- javascriptcore-snapshot-20042010 branch/tag
+ javascriptcore-snapshot-19052010 branch/tag
and has the sha1 checksum
- c589321ffdda5e93cf77e2cf2cf43afe3e996f6e
+ 8039ba79702d6516cf6841c9f15b324ec499bbf3
diff --git a/src/3rdparty/phonon/qt7/audiodevice.mm b/src/3rdparty/phonon/qt7/audiodevice.mm
index 6bec62d..3aae0ee4 100644
--- a/src/3rdparty/phonon/qt7/audiodevice.mm
+++ b/src/3rdparty/phonon/qt7/audiodevice.mm
@@ -149,7 +149,6 @@ QString AudioDevice::deviceSourceName(AudioDeviceID deviceID)
size = sizeof(translation);
err = AudioDeviceGetProperty(deviceID, 0, 0, kAudioDevicePropertyDataSourceNameForIDCFString, &size, &translation);
if (err != noErr){
- CFRelease(cfName);
return QString();
}
QString name = PhononCFString::toQString(cfName);
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index b6feeb1..1973377 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-992e57ee469bd8c6a2afef6b15896a161ab8aeb3
+807157e42add842605ec67d9363dd3f1861748ca
diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog
index 70eff7d..8f9c7ac 100644
--- a/src/3rdparty/webkit/ChangeLog
+++ b/src/3rdparty/webkit/ChangeLog
@@ -1,3 +1,21 @@
+2010-05-14 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by Antti Koivisto.
+
+ [Qt] Rename QtLauncher to QtTestBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=37665
+
+ * WebKit.pro:
+
+2010-05-12 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Detect debug mode consistently
+ https://bugs.webkit.org/show_bug.cgi?id=38863
+
+ * WebKit.pri:
+
2010-04-09 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed crash fix.
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index eb22ea0..016e0dd 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,66 @@
+2010-04-20 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed speculative buildfix for WinCE after r57882
+ https://bugs.webkit.org/show_bug.cgi?id=37701
+
+ * JavaScriptCore.pri: missing wince* case added.
+
+2010-04-20 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Target(WebCore,jsc,...) must depends on static library of JavaScriptCore
+ https://bugs.webkit.org/show_bug.cgi?id=37701
+
+ * JavaScriptCore.pri: dependency added.
+
+2010-05-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Fix a VS2010 assert in std::copy
+ https://bugs.webkit.org/show_bug.cgi?id=38630
+
+ The assert complains that the output iterator is null.
+
+ * wtf/Vector.h:
+ (WTF::::operator):
+
+2010-05-12 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Detect debug mode consistently
+ https://bugs.webkit.org/show_bug.cgi?id=38863
+
+ * JavaScriptCore.pri:
+ * JavaScriptCore.pro:
+ * jsc.pro:
+ * qt/api/QtScript.pro:
+
+2010-05-10 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ [Qt] Disable JIT support for mingw-w64
+ https://bugs.webkit.org/show_bug.cgi?id=38747
+
+ Disale JIT for mingw-w64 as it is reportedly
+ unstable.
+
+ Thanks for Vanboxem Rruben for the investigation.
+
+ * wtf/Platform.h:
+
+2010-05-06 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Enable YARR_JIT for X86 Mac for QtWebKit
+ https://bugs.webkit.org/show_bug.cgi?id=38668
+
+ * wtf/Platform.h:
+
2010-04-28 Simon Hausmann <simon.hausmann@nokia.com>, Kent Hansen <kent.hansen@nokia.com>
Reviewed by Darin Adler.
diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
index b7f6665..cc4a1b3 100644
--- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
+++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
@@ -1,6 +1,6 @@
# JavaScriptCore - Qt4 build info
VPATH += $$PWD
-CONFIG(debug, debug|release) {
+!CONFIG(release, debug|release) {
# Output in JavaScriptCore/<config>
JAVASCRIPTCORE_DESTDIR = debug
# Use a config-specific target to prevent parallel builds file clashes on Mac
@@ -75,19 +75,22 @@ defineTest(addJavaScriptCoreLib) {
# Argument is the relative path to JavaScriptCore.pro's qmake output
pathToJavaScriptCoreOutput = $$ARGS/$$JAVASCRIPTCORE_DESTDIR
- win32-msvc* {
+ win32-msvc*|wince* {
LIBS += -L$$pathToJavaScriptCoreOutput
LIBS += -l$$JAVASCRIPTCORE_TARGET
+ POST_TARGETDEPS += $${pathToJavaScriptCoreOutput}$${QMAKE_DIR_SEP}$${JAVASCRIPTCORE_TARGET}.lib
} else:symbian {
LIBS += -l$${JAVASCRIPTCORE_TARGET}.lib
# The default symbian build system does not use library paths at all. However when building with
# qmake's symbian makespec that uses Makefiles
QMAKE_LIBDIR += $$pathToJavaScriptCoreOutput
+ POST_TARGETDEPS += $${pathToJavaScriptCoreOutput}$${QMAKE_DIR_SEP}$${JAVASCRIPTCORE_TARGET}.lib
} else {
# Make sure jscore will be early in the list of libraries to workaround a bug in MinGW
# that can't resolve symbols from QtCore if libjscore comes after.
QMAKE_LIBDIR = $$pathToJavaScriptCoreOutput $$QMAKE_LIBDIR
LIBS += -l$$JAVASCRIPTCORE_TARGET
+ POST_TARGETDEPS += $${pathToJavaScriptCoreOutput}$${QMAKE_DIR_SEP}lib$${JAVASCRIPTCORE_TARGET}.a
}
win32-* {
@@ -101,6 +104,7 @@ defineTest(addJavaScriptCoreLib) {
export(QMAKE_LIBDIR)
export(LIBS)
+ export(POST_TARGETDEPS)
export(CONFIG)
return(true)
diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
index 8e086b3..22fcc91 100644
--- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
+++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro
@@ -21,7 +21,7 @@ CONFIG(QTDIR_build) {
# This line was extracted from qbase.pri instead of including the whole file
win32|mac:!macx-xcode:CONFIG += debug_and_release
} else {
- CONFIG(debug, debug|release) {
+ !CONFIG(release, debug|release) {
OBJECTS_DIR = obj/debug
} else { # Release
OBJECTS_DIR = obj/release
diff --git a/src/3rdparty/webkit/JavaScriptCore/qt/api/QtScript.pro b/src/3rdparty/webkit/JavaScriptCore/qt/api/QtScript.pro
index 88629c7..3c2691e 100644
--- a/src/3rdparty/webkit/JavaScriptCore/qt/api/QtScript.pro
+++ b/src/3rdparty/webkit/JavaScriptCore/qt/api/QtScript.pro
@@ -7,7 +7,7 @@ INCLUDEPATH += $$PWD
CONFIG += building-libs
isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = ../../generated
-CONFIG(debug, debug|release) {
+!CONFIG(release, debug|release) {
OBJECTS_DIR = obj/debug
} else { # Release
OBJECTS_DIR = obj/release
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
index 96ed9bd..fac477e 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
@@ -927,8 +927,6 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#elif CPU(X86) && OS(WINDOWS) && COMPILER(MINGW) && GCC_VERSION >= 40100
#define ENABLE_JIT 1
#define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
-#elif CPU(X86_64) && OS(WINDOWS) && COMPILER(MINGW64) && GCC_VERSION >= 40100
- #define ENABLE_JIT 1
#elif CPU(X86) && OS(WINDOWS) && COMPILER(MSVC)
#define ENABLE_JIT 1
#define WTF_USE_JIT_STUB_ARGUMENT_REGISTER 1
@@ -1008,7 +1006,9 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
|| (CPU(X86) && OS(LINUX) && GCC_VERSION >= 40100) \
|| (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100) \
|| (CPU(ARM_TRADITIONAL) && OS(LINUX)) \
- || (CPU(MIPS) && OS(LINUX))
+ || (CPU(MIPS) && OS(LINUX)) \
+ || (CPU(X86) && OS(DARWIN)) \
+ || (CPU(X86_64) && OS(DARWIN))
#define ENABLE_YARR 1
#define ENABLE_YARR_JIT 1
#endif
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h
index e495067..4d9ea61 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h
@@ -686,6 +686,12 @@ namespace WTF {
return *this;
}
+// Works around an assert in VS2010. See https://connect.microsoft.com/VisualStudio/feedback/details/558044/std-copy-should-not-check-dest-when-first-last
+#if COMPILER(MSVC) && defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL
+ if (!begin())
+ return *this;
+#endif
+
std::copy(other.begin(), other.begin() + size(), begin());
TypeOperations::uninitializedCopy(other.begin() + size(), other.end(), end());
m_size = other.size();
@@ -709,6 +715,12 @@ namespace WTF {
return *this;
}
+// Works around an assert in VS2010. See https://connect.microsoft.com/VisualStudio/feedback/details/558044/std-copy-should-not-check-dest-when-first-last
+#if COMPILER(MSVC) && defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL
+ if (!begin())
+ return *this;
+#endif
+
std::copy(other.begin(), other.begin() + size(), begin());
TypeOperations::uninitializedCopy(other.begin() + size(), other.end(), end());
m_size = other.size();
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index c3d6314..79581d1 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from
and has the sha1 checksum
- 3f0f51f4c87e65bfe04165c6af4c00934b0ca1e2
+ cacbdf18fc917122834042d77a9164a490aafde4
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 05fc2af..481b416 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,533 @@
+2010-05-17 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Laszlo Gombos.
+
+ REGRESSION(59563): [Qt] JSValue QtClass::fallbackObject can be optimized
+
+ Patch declared a variable index, which shadowed an earlier declared
+ variable.
+
+ * bridge/qt/qt_class.cpp:
+ (JSC::Bindings::QtClass::fallbackObject):
+
+2010-05-14 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] GraphicsLayer caches directly composited images
+ https://bugs.webkit.org/show_bug.cgi?id=38444
+
+ Directly-composited images and solid fills shouldn't be cached, as that cache
+ is never used (see GraphicsLayerQtImpl::paint). Cache is only relevant for HTML content,
+ but we were missing that test.
+ The fix makes sure we only cache HTML content.
+
+ No new tests: this is a minor optimization.
+
+ * platform/graphics/qt/GraphicsLayerQt.cpp:
+ (WebCore::GraphicsLayerQtImpl::flushChanges):
+
+2010-05-15 Anders Bakken <agbakken@gmail.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Don't unnecessarily copy data when searching for methods in QtClass.
+
+ [Qt] JSValue QtClass::fallbackObject can be optimized
+ https://bugs.webkit.org/show_bug.cgi?id=37684
+
+ * bridge/qt/qt_class.cpp:
+ (JSC::Bindings::QtClass::fallbackObject):
+
+2010-05-06 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Rubber-stamped by Simon Hausmann.
+
+ [Qt] use QT_MOBILE_THEME in Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=38440
+
+ Putting QT_MOBILE_THEME into use for Symbian.
+
+ * WebCore.pro:
+
+2010-05-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ CSSParser::parseColor() shouldn't alter 'color' unless passed a valid color string.
+ https://bugs.webkit.org/show_bug.cgi?id=39031
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseColor):
+ * editing/ApplyStyleCommand.cpp:
+ (WebCore::StyleChange::extractTextStyles): Don't depend on old behavior.
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::setShadow): Remove dead code.
+
+2010-05-14 Aaron Kennedy <tffeeb@gmail.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] JavaScript unable to invoke methods declared in QML
+ https://bugs.webkit.org/show_bug.cgi?id=38949
+
+ JavaScript code executed by webkit cannot call into QML declared
+ methods, as it does not check for dynamic meta objects.
+
+ * bridge/qt/qt_instance.cpp:
+ (JSC::Bindings::QtInstance::stringValue): Use QMetaObject::metacall.
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::QtRuntimeMetaMethod::call): Ditto.
+
+2010-05-12 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Detect debug mode consistently
+ https://bugs.webkit.org/show_bug.cgi?id=38863
+
+ No new tests as there is no new functionality.
+
+ * WebCore.pro:
+
+2010-05-14 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Ignore invalid values for various CanvasRenderingContext2D properties
+ (lineWidth, miterLimit, shadowOffsetX, shadowOffsetY and shadowBlur)
+
+ https://bugs.webkit.org/show_bug.cgi?id=38841
+
+ Test: fast/canvas/canvas-invalid-values.html
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::setLineWidth):
+ (WebCore::CanvasRenderingContext2D::setMiterLimit):
+ (WebCore::CanvasRenderingContext2D::setShadowOffsetX):
+ (WebCore::CanvasRenderingContext2D::setShadowOffsetY):
+ (WebCore::CanvasRenderingContext2D::setShadowBlur):
+
+2010-05-12 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] GraphicsLayer: depth-test causes flicker in certain situations
+
+ This patch removes the simplistic 2D depth test as it leads to flickering side effects.
+ https://bugs.webkit.org/show_bug.cgi?id=38370
+
+ Tested by http://webkit.org/blog-files/3d-transforms/morphing-cubes.html
+
+ * platform/graphics/qt/GraphicsLayerQt.cpp:
+ (WebCore::GraphicsLayerQtImpl::updateTransform):
+
+2010-04-29 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ Calls FrameView::scrollPositionChanged whenever a ScrollView is scrolled
+ https://bugs.webkit.org/show_bug.cgi?id=38286
+
+ When a ScrollView's scroll position is changed, we have to call
+ FrameView::scrollPositionChanged to generate repaint invalidation for
+ fixed position elements. This ends up getting called indirectly when
+ the ScrollView has a platformWidget through the port layer
+ (see WebHTMLView.mm's _frameOrBoundsChanged method for how the mac
+ port does it) but not when there is no platformWidget.
+
+ This is tested by the fast/repaint/fixed-* tests when run in pixel
+ mode.
+
+ Test: fast/repaint/fixed-move-after-keyboard-scroll.html
+
+ * page/FrameView.h:
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::valueChanged):
+ * platform/ScrollView.h:
+ (WebCore::ScrollView::scrollPositionChanged):
+
+2010-04-23 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Unreviewed build fix.
+
+ Change Media to StyleMedia
+
+ * DerivedSources.make:
+
+2010-04-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Laszlo Gombos.
+
+ Rename window.media to window.styleMedia
+ https://bugs.webkit.org/show_bug.cgi?id=36187
+
+ Rename the interface Media to StyleMedia as required by the
+ new CSSOM View spec.
+
+ * Android.derived.jscbindings.mk:
+ * Android.derived.v8bindings.mk:
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pri:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/Media.cpp: Removed.
+ * css/Media.h: Removed.
+ * css/Media.idl: Removed.
+ * css/StyleMedia.cpp: Added.
+ (WebCore::StyleMedia::StyleMedia):
+ (WebCore::StyleMedia::type):
+ (WebCore::StyleMedia::matchMedium):
+ * css/StyleMedia.h: Added.
+ (WebCore::StyleMedia::create):
+ (WebCore::StyleMedia::disconnectFrame):
+ * css/StyleMedia.idl: Added.
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::styleMedia):
+ * page/DOMWindow.h:
+ (WebCore::DOMWindow::optionalMedia):
+ * page/DOMWindow.idl:
+
+2010-04-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ Rename window.media to window.styleMedia
+ https://bugs.webkit.org/show_bug.cgi?id=36187
+
+ It has been defined that the AbstractView media extension
+ defined in the CSSOM View spec should be renamed to styleMedia.
+ This patch does that and updates the current layout tests
+ making use of it.
+
+ * page/AbstractView.idl:
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::styleMedia):
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+
+2010-05-11 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] fast/text/find-hidden-text.html
+ https://bugs.webkit.org/show_bug.cgi?id=32922
+
+ Use the real page step for populating the QStyleOption otherwhise
+ the size can be negative, which can break the QStyle used.
+
+ * platform/qt/ScrollbarThemeQt.cpp:
+ (WebCore::styleOptionSlider):
+
+2010-05-03 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ Spatial Navigation: create a getter for the "fudgeFactor"
+ https://bugs.webkit.org/show_bug.cgi?id=38488
+
+ A couple of places in the Spatial Navigation code make use of a "fudge factor"
+ to improve precision by working around outline focus metrics and such. Patch adds
+ a helper method for unify getter operations of this value, instead of having it
+ declared locally in the various methods it is used.
+
+ No behaviour change.
+
+ * page/SpatialNavigation.cpp:
+ (WebCore::scrollIntoView):
+ (WebCore::deflateIfOverlapped):
+ * page/SpatialNavigation.h:
+ (WebCore::fudgeFactor):
+
+2010-05-10 Markus Goetz <Markus.Goetz@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Qt after 4.6.3 has its integrated DNS cache. Therefore some
+ code is not necessary anymore.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38834
+
+ * platform/network/qt/DnsPrefetchHelper.h:
+ (WebCore::DnsPrefetchHelper::lookup):
+ (WebCore::DnsPrefetchHelper::lookedUp):
+
+2010-05-06 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed, build fix WinCE for QtWebKit.
+
+ [Qt] Compilation with Plugins disabled is broken
+ https://bugs.webkit.org/show_bug.cgi?id=31407
+
+ Rename platform/qt/TemporaryLinkStubs.cpp to avoid name collition on
+ Windows.
+
+ Thanks for Ismail "cartman" Donmez for help.
+
+ No new tests, as there is no new functionality.
+
+ * WebCore.gypi:
+ * WebCore.pro:
+ * platform/qt/TemporaryLinkStubs.cpp: Removed.
+ * platform/qt/TemporaryLinkStubsQt.cpp: Copied from WebCore/platform/qt/TemporaryLinkStubs.cpp.
+
+2010-04-23 Qi Zhang <qi.2.zhang@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] LayoutTests/fast/canvas/pointInPath.html passed, actually it failed
+ https://bugs.webkit.org/show_bug.cgi?id=37276
+
+ QPainterPath::contains doesn't count the point on the bound.
+
+ * platform/graphics/qt/PathQt.cpp:
+ (WebCore::isPointOnPathBorder):
+ (WebCore::Path::contains):
+
+2010-05-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix rendering of -webkit-user-select: none
+
+ -webkit-user-select: none is implemented by filling
+ the area with an invalid default-constructed Color.
+ In most ports passing an invalid color down to the
+ graphics backend seems to produce transparent fills.
+
+ In Qt the behavior of painting with an invalid QColor
+ is undefined, and in practice it results in painting
+ black opaque areas.
+
+ One way to fix this would be to use Qt::transparent
+ when converting an undefined Color to a QColor, but
+ Qt does not have short circuits for fully transparent
+ painting, and we actually end up in slow code paths
+ due to the transparency. So, we're better of doing the
+ short circuit in WebKit.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38523
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+
+2010-04-05 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix infinite redirection loop in QNetworkReplyHandler
+
+ Put a maximum on consecutive redirections so we don't have to
+ worry about whether it's the same url or not.
+
+ Tolerate up to 10 consecutive redirections, anything beyond
+ that is considered a potentially infinite recursion in the
+ redirection requests. This is the same behaviour as Firefox.
+
+ https://bugs.webkit.org/show_bug.cgi?id=37097
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+ * platform/network/qt/QNetworkReplyHandler.h:
+
+2010-04-05 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Kenneth Rohde-Christiansen.
+
+ [Qt] Fix infinite redirection loop in QNetworkReplyHandler
+
+ Qt enters an infinite loop if a redirect response redirects to itself.
+
+ Fixes http/tests/xmlhttprequest/connection-error-sync.html
+
+ https://bugs.webkit.org/show_bug.cgi?id=37097
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
+
+2010-05-07 Ben Murdoch <benm@google.com>
+
+ Reviewed by Darin Adler.
+
+ Potential crash in EventHandler::handleTouchEvent
+ https://bugs.webkit.org/show_bug.cgi?id=38646
+
+ Fix a ref counting bug that can cause a crash if the m_originatingouchPointTargets
+ hashmap holds the last ref to an EventTarget when the user lifts their finger.
+
+ This is very hard to reproduce in a consistent way and clearly a
+ simple logic error in the code, therefore no new tests.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleTouchEvent): Don't let the RefPtr we get back from
+ the hasmap go out of scope so soon as it could delete the wrapped ptr if the
+ hashmap held the last ref (and we use the raw ptr that the RefPtr
+ wraps later in the WebCore::Touch constructor).
+
+2010-05-04 Ben Murdoch <benm@google.com>
+
+ Reviewed by Simon Hausmann.
+
+ Crash in handleTouchEvent: using dangling node ptrs in hashmap
+ https://bugs.webkit.org/show_bug.cgi?id=38514
+
+ When navigating away from a page, if you have your finger still
+ pressed and then lift it on the new page we see a crash if the
+ node got deleted as we still have a dangling pointer in the
+ m_originatingTouchPointTargets hashmap and try to use it as the
+ receiver to dispatch a touchend event.
+
+ Test: fast/events/touch/touch-stale-node-crash.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::clear): Clear the hashmap of touch targets.
+
+2010-05-04 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] QT_MOBILE_THEME compile time flag
+ https://bugs.webkit.org/show_bug.cgi?id=38439
+
+ Replacing preprocessor conditional used in RenderThemeQt from Q_WS_MAEMO_5 to
+ USE(QT_MOBILE_THEME).
+
+ * WebCore.pro:
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::RenderThemeQt):
+ (WebCore::RenderThemeQt::qStyle):
+ (WebCore::RenderThemeQt::extraDefaultStyleSheet):
+ (WebCore::RenderThemeQt::adjustMenuListButtonStyle):
+ (WebCore::RenderThemeQt::setPaletteFromPageClientIfExists):
+ * platform/qt/RenderThemeQt.h:
+
+2010-03-25 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt]Fix compile error with QT_NO_LIBRARY
+ https://bugs.webkit.org/show_bug.cgi?id=36533
+
+ * platform/FileSystem.h:
+ * platform/qt/FileSystemQt.cpp:
+ (WebCore::unloadModule):
+
+2010-05-06 Csaba Osztrogonác <ossy@webkit.org>
+
+ Unreviewed WinCE buildfix after r58842.
+ Preprocessor doesn't understand "true", changed to "1"
+
+ * platform/graphics/MediaPlayer.cpp:
+
+2010-05-06 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ Spatial Navigation: adapt the logic of {deep}findFocusableNodeInDirection to do traversal starting from Node* not Document*
+ https://bugs.webkit.org/show_bug.cgi?id=37803
+
+ Instead of receiving a Document pointer as incoming parameter, patch modifies
+ findFocusableNodeInDirection and deepFindFocusableNodeInDirection methods to
+ receive a Node pointer as start for content traversal.
+ This way we can make good use of deepFindFocusableNodeInDirection to traverse
+ other scrollable container like scrollable div's, and not only frames or iframes.
+
+ Patch also makes use of 'while' instead of 'for' to loop control, that gives move
+ flexibility to the incremental step: e.g. if a scrollable div was processed, the incremental
+ step in the loop does not have to do node->traverseNextNode() but node->traverseNextSibling().
+
+ No behavior change. It is a preparation for supporting scrollable containers in Spatial
+ Navigation.
+
+ * page/FocusController.cpp:
+ (WebCore::FocusController::advanceFocusDirectionally):
+ (WebCore::FocusController::findFocusableNodeInDirection):
+ (WebCore::FocusController::deepFindFocusableNodeInDirection):
+ * page/FocusController.h:
+
+2010-05-06 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] REGRESSION: Loading of external CSS and JS files over network fails in some cases
+ https://bugs.webkit.org/show_bug.cgi?id=36755
+
+ Enable the direct connection between QtNetwork and QtWebKit only for Qt versions
+ greater than 4.6.2, due to a bug in Qt that's been fixed after 4.6.2.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+
+2010-05-05 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt]Disable Qt Multimedia backend for HTML 5 Audio and Video elements
+ Fall back to the Phonon backend until the release situation has been cleared up.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38612
+
+ Buildfix for QT_VERSION >= 0x040700 after r58810.
+
+ * platform/graphics/MediaPlayer.cpp:
+
+2010-05-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix rendering of <button> elements on Mac OS X
+
+ The <button> element has ButtonPart appearance, not PushButton part,
+ so we have to include ButtonPart when we decide if we should draw the
+ button as raised on Mac OS X.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38458
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::initializeCommonQStyleOptions):
+
+2010-04-26 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ View modes names in CSSValueKeywords.in
+ https://bugs.webkit.org/show_bug.cgi?id=38125
+
+ View mode names has changed in previous patch but CSSValueKeywords.in file was
+ not updated.
+
+ * css/CSSValueKeywords.in:
+
+2010-04-28 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Simon Fraser.
+
+ Media queries empty values
+ https://bugs.webkit.org/show_bug.cgi?id=38116
+
+ Adding isValid() method to MediaQueryExp to make it possible to differentiate
+ between queries with empty values and queries with invalid values.
+
+ Test: fast/media/media-query-invalid-value.html
+
+ * css/MediaQueryEvaluator.cpp:
+ (WebCore::MediaQueryEvaluator::eval):
+ * css/MediaQueryExp.cpp:
+ (WebCore::MediaQueryExp::MediaQueryExp):
+ * css/MediaQueryExp.h:
+ (WebCore::MediaQueryExp::isValid):
+
+2010-05-05 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Disable Qt Multimedia backend for HTML 5 Audio and Video elements
+
+ Fall back to the Phonon backend until the release situation has been cleared up.
+
+ * WebCore.pro:
+
2010-05-03 Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.gypi b/src/3rdparty/webkit/WebCore/WebCore.gypi
index caa79f2..1e92f1f 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.gypi
+++ b/src/3rdparty/webkit/WebCore/WebCore.gypi
@@ -18,10 +18,10 @@
'css/CSSVariablesDeclaration.idl',
'css/CSSVariablesRule.idl',
'css/Counter.idl',
- 'css/Media.idl',
'css/MediaList.idl',
- 'css/RGBColor.idl',
'css/Rect.idl',
+ 'css/RGBColor.idl',
+ 'css/StyleMedia.idl',
'css/StyleSheet.idl',
'css/StyleSheetList.idl',
'css/WebKitCSSKeyframeRule.idl',
@@ -1003,33 +1003,33 @@
'css/FontValue.h',
'css/MediaFeatureNames.cpp',
'css/MediaFeatureNames.h',
- 'css/Media.cpp',
- 'css/Media.h',
'css/MediaList.cpp',
'css/MediaList.h',
'css/MediaQuery.cpp',
- 'css/MediaQuery.h',
'css/MediaQueryEvaluator.cpp',
'css/MediaQueryEvaluator.h',
'css/MediaQueryExp.cpp',
'css/MediaQueryExp.h',
+ 'css/MediaQuery.h',
'css/Pair.h',
'css/Rect.h',
'css/RGBColor.cpp',
'css/RGBColor.h',
- 'css/SVGCSSComputedStyleDeclaration.cpp',
- 'css/SVGCSSParser.cpp',
- 'css/SVGCSSStyleSelector.cpp',
'css/ShadowValue.cpp',
'css/ShadowValue.h',
'css/StyleBase.cpp',
'css/StyleBase.h',
'css/StyleList.cpp',
'css/StyleList.h',
+ 'css/StyleMedia.cpp',
+ 'css/StyleMedia.h',
'css/StyleSheet.cpp',
'css/StyleSheet.h',
'css/StyleSheetList.cpp',
'css/StyleSheetList.h',
+ 'css/SVGCSSComputedStyleDeclaration.cpp',
+ 'css/SVGCSSParser.cpp',
+ 'css/SVGCSSStyleSelector.cpp',
'css/WebKitCSSKeyframeRule.cpp',
'css/WebKitCSSKeyframeRule.h',
'css/WebKitCSSKeyframesRule.cpp',
@@ -2640,7 +2640,7 @@
'platform/qt/SharedBufferQt.cpp',
'platform/qt/SharedTimerQt.cpp',
'platform/qt/SoundQt.cpp',
- 'platform/qt/TemporaryLinkStubs.cpp',
+ 'platform/qt/TemporaryLinkStubsQt.cpp',
'platform/qt/WheelEventQt.cpp',
'platform/qt/WidgetQt.cpp',
'platform/sql/SQLValue.cpp',
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pri b/src/3rdparty/webkit/WebCore/WebCore.pri
index 039f26c..5f5987f 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pri
+++ b/src/3rdparty/webkit/WebCore/WebCore.pri
@@ -96,10 +96,9 @@ greaterThan(QT_MINOR_VERSION, 5) {
# Web Socket support.
!contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=1
-# XSLT support with QtXmlPatterns
+# Disable XSLT support with QtXmlPatterns in the 2.0 release
!contains(DEFINES, ENABLE_XSLT=.) {
- contains(QT_CONFIG, xmlpatterns):DEFINES += ENABLE_XSLT=1
- else:DEFINES += ENABLE_XSLT=0
+ DEFINES += ENABLE_XSLT=0
}
!CONFIG(QTDIR_build):!contains(DEFINES, ENABLE_QT_BEARER=.) {
@@ -228,10 +227,10 @@ IDL_BINDINGS += \
css/CSSValueList.idl \
css/CSSVariablesDeclaration.idl \
css/CSSVariablesRule.idl \
- css/Media.idl \
css/MediaList.idl \
- css/RGBColor.idl \
css/Rect.idl \
+ css/RGBColor.idl \
+ css/StyleMedia.idl \
css/StyleSheet.idl \
css/StyleSheetList.idl \
css/WebKitCSSKeyframeRule.idl \
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 3d57562..5def728 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -59,7 +59,7 @@ CONFIG(standalone_package) {
isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = generated
isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = ../JavaScriptCore/generated
- CONFIG(debug, debug|release) {
+ !CONFIG(release, debug|release) {
OBJECTS_DIR = obj/debug
} else { # Release
OBJECTS_DIR = obj/release
@@ -125,7 +125,11 @@ maemo5|symbian|embedded {
DEFINES += ENABLE_FAST_MOBILE_SCROLLING=1
}
-maemo5 {
+maemo5|symbian {
+ DEFINES += WTF_USE_QT_MOBILE_THEME=1
+}
+
+contains(DEFINES, WTF_USE_QT_MOBILE_THEME=1) {
DEFINES += ENABLE_NO_LISTBOX_RENDERING=1
}
@@ -134,17 +138,12 @@ addJavaScriptCoreLib(../JavaScriptCore)
# HTML5 Media Support
-# We require phonon for versions of Qt < 4.7
-# We require QtMultimedia for versions of Qt >= 4.7
+# We require phonon. QtMultimedia support is disabled currently.
!contains(DEFINES, ENABLE_VIDEO=.) {
DEFINES -= ENABLE_VIDEO=1
DEFINES += ENABLE_VIDEO=0
- lessThan(QT_MINOR_VERSION, 7):contains(QT_CONFIG, phonon) {
- DEFINES -= ENABLE_VIDEO=0
- DEFINES += ENABLE_VIDEO=1
- }
- !lessThan(QT_MINOR_VERSION, 7):contains(QT_CONFIG, mediaservices) {
+ contains(QT_CONFIG, phonon) {
DEFINES -= ENABLE_VIDEO=0
DEFINES += ENABLE_VIDEO=1
}
@@ -432,7 +431,6 @@ SOURCES += \
css/FontFamilyValue.cpp \
css/FontValue.cpp \
css/MediaFeatureNames.cpp \
- css/Media.cpp \
css/MediaList.cpp \
css/MediaQuery.cpp \
css/MediaQueryEvaluator.cpp \
@@ -441,6 +439,7 @@ SOURCES += \
css/ShadowValue.cpp \
css/StyleBase.cpp \
css/StyleList.cpp \
+ css/StyleMedia.cpp \
css/StyleSheet.cpp \
css/StyleSheetList.cpp \
css/WebKitCSSKeyframeRule.cpp \
@@ -1146,7 +1145,6 @@ HEADERS += \
css/FontFamilyValue.h \
css/FontValue.h \
css/MediaFeatureNames.h \
- css/Media.h \
css/MediaList.h \
css/MediaQueryEvaluator.h \
css/MediaQueryExp.h \
@@ -1155,6 +1153,7 @@ HEADERS += \
css/ShadowValue.h \
css/StyleBase.h \
css/StyleList.h \
+ css/StyleMedia.h \
css/StyleSheet.h \
css/StyleSheetList.h \
css/WebKitCSSKeyframeRule.h \
@@ -2082,7 +2081,7 @@ SOURCES += \
platform/qt/SoundQt.cpp \
platform/qt/LoggingQt.cpp \
platform/text/qt/StringQt.cpp \
- platform/qt/TemporaryLinkStubs.cpp \
+ platform/qt/TemporaryLinkStubsQt.cpp \
platform/text/qt/TextBoundariesQt.cpp \
platform/text/qt/TextBreakIteratorQt.cpp \
platform/text/qt/TextCodecQt.cpp \
@@ -2112,13 +2111,15 @@ SOURCES += \
../WebKit/qt/Api/qwebinspector.cpp \
../WebKit/qt/Api/qwebkitversion.cpp
+
+contains(DEFINES, WTF_USE_QT_MOBILE_THEME=1) {
+ HEADERS += platform/qt/Maemo5Webstyle.h
+ SOURCES += platform/qt/Maemo5Webstyle.cpp
+}
+
maemo5 {
- HEADERS += \
- ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h \
- platform/qt/Maemo5Webstyle.h
- SOURCES += \
- ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp \
- platform/qt/Maemo5Webstyle.cpp
+ HEADERS += ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h
+ SOURCES += ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp
}
@@ -2369,8 +2370,8 @@ contains(DEFINES, ENABLE_VIDEO=1) {
rendering/RenderMedia.cpp \
bindings/js/JSAudioConstructor.cpp
- # QtMultimedia since 4.7
- greaterThan(QT_MINOR_VERSION, 6) {
+ # QtMultimedia disabled currently
+ false:greaterThan(QT_MINOR_VERSION, 6) {
HEADERS += platform/graphics/qt/MediaPlayerPrivateQt.h
SOURCES += platform/graphics/qt/MediaPlayerPrivateQt.cpp
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp
index cfd74d9..2e1f6e6 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_class.cpp
@@ -98,10 +98,12 @@ JSValue QtClass::fallbackObject(ExecState* exec, Instance* inst, const Identifie
if (m.access() == QMetaMethod::Private)
continue;
- QByteArray signature = m.signature();
- signature.truncate(signature.indexOf('('));
+ int iter = 0;
+ const char* signature = m.signature();
+ while (signature[iter] && signature[iter] != '(')
+ ++iter;
- if (normal == signature) {
+ if (normal == QByteArray::fromRawData(signature, iter)) {
QtRuntimeMetaMethod* val = new (exec) QtRuntimeMetaMethod(exec, identifier, static_cast<QtInstance*>(inst), index, normal, false);
qtinst->m_methods.insert(name, val);
return val;
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp
index f6f368b..d40ab0b 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp
@@ -287,7 +287,7 @@ JSValue QtInstance::stringValue(ExecState* exec) const
void * qargs[1];
qargs[0] = ret.data();
- if (obj->qt_metacall(QMetaObject::InvokeMetaMethod, index, qargs) < 0) {
+ if (QMetaObject::metacall(obj, QMetaObject::InvokeMetaMethod, index, qargs) < 0) {
if (ret.isValid() && ret.canConvert(QVariant::String)) {
buf = ret.toString().toLatin1().constData(); // ### Latin 1? Ascii?
useDefault = false;
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
index 1775815..4524d97 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
@@ -1397,7 +1397,7 @@ JSValue QtRuntimeMetaMethod::call(ExecState* exec, JSObject* functionObject, JSV
int methodIndex;
JSObject* errorObj = 0;
if ((methodIndex = findMethodIndex(exec, obj->metaObject(), d->m_signature, d->m_allowPrivate, args, vargs, (void **)qargs, &errorObj)) != -1) {
- if (obj->qt_metacall(QMetaObject::InvokeMetaMethod, methodIndex, qargs) >= 0)
+ if (QMetaObject::metacall(obj, QMetaObject::InvokeMetaMethod, methodIndex, qargs) >= 0)
return jsUndefined();
if (vargs[0].isValid())
diff --git a/src/3rdparty/webkit/WebCore/css/CSSParser.cpp b/src/3rdparty/webkit/WebCore/css/CSSParser.cpp
index 214fc51..a5a8b5c 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSParser.cpp
+++ b/src/3rdparty/webkit/WebCore/css/CSSParser.cpp
@@ -279,7 +279,6 @@ bool CSSParser::parseValue(CSSMutableStyleDeclaration* declaration, int id, cons
// possible to set up a default color.
bool CSSParser::parseColor(RGBA32& color, const String& string, bool strict)
{
- color = 0;
CSSParser parser(true);
// First try creating a color specified by name or the "#" syntax.
diff --git a/src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in b/src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in
index 09d969a..1028dcf 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in
+++ b/src/3rdparty/webkit/WebCore/css/CSSValueKeywords.in
@@ -711,7 +711,8 @@ geometricPrecision
sRGB
# (-webkit-view-mode:) media feature:
-mini
floating
-application
fullscreen
+maximized
+minimized
+windowed
diff --git a/src/3rdparty/webkit/WebCore/css/Media.cpp b/src/3rdparty/webkit/WebCore/css/Media.cpp
deleted file mode 100644
index e238602..0000000
--- a/src/3rdparty/webkit/WebCore/css/Media.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "Media.h"
-#include "CSSStyleSelector.h"
-#include "Frame.h"
-#include "FrameView.h"
-#include "MediaList.h"
-#include "MediaQueryEvaluator.h"
-
-namespace WebCore {
-
-Media::Media(Frame* frame)
- : m_frame(frame)
-{
-}
-
-String Media::type() const
-{
- FrameView* view = m_frame ? m_frame->view() : 0;
- if (view)
- return view->mediaType();
-
- return String();
-}
-
-bool Media::matchMedium(const String& query) const
-{
- if (!m_frame)
- return false;
-
- Document* document = m_frame->document();
- ASSERT(document);
- Element* documentElement = document->documentElement();
- ASSERT(documentElement);
-
- CSSStyleSelector* styleSelector = document->styleSelector();
- if (!styleSelector)
- return false;
-
- RefPtr<RenderStyle> rootStyle = styleSelector->styleForElement(documentElement, 0 /*defaultParent*/, false /*allowSharing*/, true /*resolveForRootDefault*/);
- RefPtr<MediaList> media = MediaList::create();
-
- ExceptionCode ec = 0;
- media->setMediaText(query, ec);
- if (ec)
- return false;
-
- MediaQueryEvaluator screenEval(type(), m_frame, rootStyle.get());
- return screenEval.eval(media.get());
-}
-
-} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/css/Media.h b/src/3rdparty/webkit/WebCore/css/Media.h
deleted file mode 100644
index ee6961b..0000000
--- a/src/3rdparty/webkit/WebCore/css/Media.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef Media_h
-#define Media_h
-
-#include "DOMWindow.h"
-
-namespace WebCore {
-
-class Media : public RefCounted<Media> {
-public:
- static PassRefPtr<Media> create(Frame* frame)
- {
- return adoptRef(new Media(frame));
- }
-
- void disconnectFrame() { m_frame = 0; }
-
- String type() const;
-
- bool matchMedium(const String&) const;
-
-private:
- Media(Frame*);
-
- Frame* m_frame;
-};
-
-} // namespace
-
-#endif // Media_h
diff --git a/src/3rdparty/webkit/WebCore/css/Media.idl b/src/3rdparty/webkit/WebCore/css/Media.idl
deleted file mode 100644
index 1bf5900..0000000
--- a/src/3rdparty/webkit/WebCore/css/Media.idl
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-module view {
- interface Media {
- readonly attribute DOMString type;
- boolean matchMedium(in DOMString mediaquery);
- };
-}
diff --git a/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp b/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp
index ded40b5..20c7bb9 100644
--- a/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp
+++ b/src/3rdparty/webkit/WebCore/css/MediaQueryEvaluator.cpp
@@ -533,6 +533,9 @@ bool MediaQueryEvaluator::eval(const MediaQueryExp* expr) const
if (!m_frame || !m_style)
return m_expResult;
+ if (!expr->isValid())
+ return false;
+
if (!gFunctionMap)
createFunctionMap();
diff --git a/src/3rdparty/webkit/WebCore/css/MediaQueryExp.cpp b/src/3rdparty/webkit/WebCore/css/MediaQueryExp.cpp
index 7ba6d84..53c0b73 100644
--- a/src/3rdparty/webkit/WebCore/css/MediaQueryExp.cpp
+++ b/src/3rdparty/webkit/WebCore/css/MediaQueryExp.cpp
@@ -37,6 +37,7 @@ namespace WebCore {
MediaQueryExp::MediaQueryExp(const AtomicString& mediaFeature, CSSParserValueList* valueList)
: m_mediaFeature(mediaFeature)
, m_value(0)
+ , m_isValid(true)
{
if (valueList) {
if (valueList->size() == 1) {
@@ -73,6 +74,7 @@ MediaQueryExp::MediaQueryExp(const AtomicString& mediaFeature, CSSParserValueLis
if (isValid)
m_value = list.release();
}
+ m_isValid = m_value;
}
}
diff --git a/src/3rdparty/webkit/WebCore/css/MediaQueryExp.h b/src/3rdparty/webkit/WebCore/css/MediaQueryExp.h
index fd55cf6..9272402 100644
--- a/src/3rdparty/webkit/WebCore/css/MediaQueryExp.h
+++ b/src/3rdparty/webkit/WebCore/css/MediaQueryExp.h
@@ -52,6 +52,8 @@ public:
|| (other.m_value && m_value && other.m_value->cssText() == m_value->cssText()));
}
+ bool isValid() const { return m_isValid; }
+
bool isViewportDependent() const { return m_mediaFeature == MediaFeatureNames::widthMediaFeature ||
m_mediaFeature == MediaFeatureNames::heightMediaFeature ||
m_mediaFeature == MediaFeatureNames::min_widthMediaFeature ||
@@ -65,6 +67,7 @@ public:
private:
AtomicString m_mediaFeature;
RefPtr<CSSValue> m_value;
+ bool m_isValid;
};
} // namespace
diff --git a/src/3rdparty/webkit/WebCore/css/StyleMedia.cpp b/src/3rdparty/webkit/WebCore/css/StyleMedia.cpp
new file mode 100644
index 0000000..6cb662f
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/css/StyleMedia.cpp
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "StyleMedia.h"
+
+#include "CSSStyleSelector.h"
+#include "Frame.h"
+#include "FrameView.h"
+#include "MediaList.h"
+#include "MediaQueryEvaluator.h"
+
+namespace WebCore {
+
+StyleMedia::StyleMedia(Frame* frame)
+ : m_frame(frame)
+{
+}
+
+String StyleMedia::type() const
+{
+ FrameView* view = m_frame ? m_frame->view() : 0;
+ if (view)
+ return view->mediaType();
+
+ return String();
+}
+
+bool StyleMedia::matchMedium(const String& query) const
+{
+ if (!m_frame)
+ return false;
+
+ Document* document = m_frame->document();
+ ASSERT(document);
+ Element* documentElement = document->documentElement();
+ ASSERT(documentElement);
+
+ CSSStyleSelector* styleSelector = document->styleSelector();
+ if (!styleSelector)
+ return false;
+
+ RefPtr<RenderStyle> rootStyle = styleSelector->styleForElement(documentElement, 0 /*defaultParent*/, false /*allowSharing*/, true /*resolveForRootDefault*/);
+ RefPtr<MediaList> media = MediaList::create();
+
+ ExceptionCode ec = 0;
+ media->setMediaText(query, ec);
+ if (ec)
+ return false;
+
+ MediaQueryEvaluator screenEval(type(), m_frame, rootStyle.get());
+ return screenEval.eval(media.get());
+}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/css/StyleMedia.h b/src/3rdparty/webkit/WebCore/css/StyleMedia.h
new file mode 100644
index 0000000..761e6a3
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/css/StyleMedia.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef StyleMedia_h
+#define StyleMedia_h
+
+#include "DOMWindow.h"
+
+namespace WebCore {
+
+class StyleMedia : public RefCounted<StyleMedia> {
+public:
+ static PassRefPtr<StyleMedia> create(Frame* frame)
+ {
+ return adoptRef(new StyleMedia(frame));
+ }
+
+ void disconnectFrame() { m_frame = 0; }
+
+ String type() const;
+
+ bool matchMedium(const String&) const;
+
+private:
+ StyleMedia(Frame*);
+
+ Frame* m_frame;
+};
+
+} // namespace
+
+#endif // StyleMedia_h
diff --git a/src/3rdparty/webkit/WebCore/css/StyleMedia.idl b/src/3rdparty/webkit/WebCore/css/StyleMedia.idl
new file mode 100644
index 0000000..7be35cc
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/css/StyleMedia.idl
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module view {
+ interface StyleMedia {
+ readonly attribute DOMString type;
+ boolean matchMedium(in DOMString mediaquery);
+ };
+}
diff --git a/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp b/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp
index 1c739ec..529d9d3 100644
--- a/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp
+++ b/src/3rdparty/webkit/WebCore/editing/ApplyStyleCommand.cpp
@@ -212,7 +212,7 @@ void StyleChange::extractTextStyles(CSSMutableStyleDeclaration* style)
if (RefPtr<CSSValue> colorValue = style->getPropertyCSSValue(CSSPropertyColor)) {
ASSERT(colorValue->isPrimitiveValue());
CSSPrimitiveValue* primitiveColor = static_cast<CSSPrimitiveValue*>(colorValue.get());
- RGBA32 rgba;
+ RGBA32 rgba = 0;
if (primitiveColor->primitiveType() != CSSPrimitiveValue::CSS_RGBCOLOR) {
CSSParser::parseColor(rgba, colorValue->cssText());
// Need to take care of named color such as green and black
diff --git a/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c b/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c
index 6a2581e..b7bf3de 100644
--- a/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c
+++ b/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.c
@@ -203,7 +203,7 @@ findValue (register const char *str, register unsigned int len)
{
enum
{
- TOTAL_KEYWORDS = 613,
+ TOTAL_KEYWORDS = 614,
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 35,
MIN_HASH_VALUE = 0,
@@ -226,7 +226,7 @@ findValue (register const char *str, register unsigned int len)
{"end", CSSValueEnd},
#line 46 "CSSValueKeywords.gperf"
{"700", CSSValue700},
-#line 621 "CSSValueKeywords.gperf"
+#line 622 "CSSValueKeywords.gperf"
{"lr", CSSValueLr},
#line 45 "CSSValueKeywords.gperf"
{"600", CSSValue600},
@@ -236,17 +236,17 @@ findValue (register const char *str, register unsigned int len)
{"400", CSSValue400},
#line 41 "CSSValueKeywords.gperf"
{"200", CSSValue200},
-#line 623 "CSSValueKeywords.gperf"
+#line 624 "CSSValueKeywords.gperf"
{"tb", CSSValueTb},
#line 15 "CSSValueKeywords.gperf"
{"inset", CSSValueInset},
#line 146 "CSSValueKeywords.gperf"
{"sub", CSSValueSub},
-#line 520 "CSSValueKeywords.gperf"
+#line 521 "CSSValueKeywords.gperf"
{"indigo", CSSValueIndigo},
-#line 559 "CSSValueKeywords.gperf"
+#line 560 "CSSValueKeywords.gperf"
{"oldlace", CSSValueOldlace},
-#line 571 "CSSValueKeywords.gperf"
+#line 572 "CSSValueKeywords.gperf"
{"plum", CSSValuePlum},
#line 71 "CSSValueKeywords.gperf"
{"cursive", CSSValueCursive},
@@ -264,7 +264,7 @@ findValue (register const char *str, register unsigned int len)
{"armenian", CSSValueArmenian},
#line 299 "CSSValueKeywords.gperf"
{"above", CSSValueAbove},
-#line 590 "CSSValueKeywords.gperf"
+#line 591 "CSSValueKeywords.gperf"
{"tomato", CSSValueTomato},
#line 36 "CSSValueKeywords.gperf"
{"normal", CSSValueNormal},
@@ -272,7 +272,7 @@ findValue (register const char *str, register unsigned int len)
{"cross", CSSValueCross},
#line 352 "CSSValueKeywords.gperf"
{"multiple", CSSValueMultiple},
-#line 480 "CSSValueKeywords.gperf"
+#line 481 "CSSValueKeywords.gperf"
{"coral", CSSValueCoral},
#line 371 "CSSValueKeywords.gperf"
{"ellipsis", CSSValueEllipsis},
@@ -294,7 +294,7 @@ findValue (register const char *str, register unsigned int len)
{"contain", CSSValueContain},
#line 437 "CSSValueKeywords.gperf"
{"logical", CSSValueLogical},
-#line 616 "CSSValueKeywords.gperf"
+#line 617 "CSSValueKeywords.gperf"
{"no-change", CSSValueNoChange},
#line 308 "CSSValueKeywords.gperf"
{"crop", CSSValueCrop},
@@ -302,17 +302,17 @@ findValue (register const char *str, register unsigned int len)
{"blue", CSSValueBlue},
#line 444 "CSSValueKeywords.gperf"
{"ease", CSSValueEase},
-#line 588 "CSSValueKeywords.gperf"
+#line 589 "CSSValueKeywords.gperf"
{"tan", CSSValueTan},
#line 462 "CSSValueKeywords.gperf"
{"srgb", CSSValueSrgb},
#line 53 "CSSValueKeywords.gperf"
{"large", CSSValueLarge},
-#line 479 "CSSValueKeywords.gperf"
+#line 480 "CSSValueKeywords.gperf"
{"chocolate", CSSValueChocolate},
#line 258 "CSSValueKeywords.gperf"
{"auto", CSSValueAuto},
-#line 618 "CSSValueKeywords.gperf"
+#line 619 "CSSValueKeywords.gperf"
{"lr-tb", CSSValueLrTb},
#line 298 "CSSValueKeywords.gperf"
{"collapse", CSSValueCollapse},
@@ -326,9 +326,9 @@ findValue (register const char *str, register unsigned int len)
{"orange", CSSValueOrange},
#line 18 "CSSValueKeywords.gperf"
{"outset", CSSValueOutset},
-#line 576 "CSSValueKeywords.gperf"
+#line 577 "CSSValueKeywords.gperf"
{"salmon", CSSValueSalmon},
-#line 544 "CSSValueKeywords.gperf"
+#line 545 "CSSValueKeywords.gperf"
{"magenta", CSSValueMagenta},
#line 419 "CSSValueKeywords.gperf"
{"caret", CSSValueCaret},
@@ -338,9 +338,9 @@ findValue (register const char *str, register unsigned int len)
{"table", CSSValueTable},
#line 51 "CSSValueKeywords.gperf"
{"small", CSSValueSmall},
-#line 613 "CSSValueKeywords.gperf"
+#line 614 "CSSValueKeywords.gperf"
{"hanging", CSSValueHanging},
-#line 474 "CSSValueKeywords.gperf"
+#line 475 "CSSValueKeywords.gperf"
{"blueviolet", CSSValueBlueviolet},
#line 243 "CSSValueKeywords.gperf"
{"compact", CSSValueCompact},
@@ -368,10 +368,8 @@ findValue (register const char *str, register unsigned int len)
{"top", CSSValueTop},
#line 310 "CSSValueKeywords.gperf"
{"embed", CSSValueEmbed},
-#line 514 "CSSValueKeywords.gperf"
+#line 515 "CSSValueKeywords.gperf"
{"gold", CSSValueGold},
-#line 463 "CSSValueKeywords.gperf"
- {"mini", CSSValueMini},
#line 439 "CSSValueKeywords.gperf"
{"lines", CSSValueLines},
#line 351 "CSSValueKeywords.gperf"
@@ -386,11 +384,11 @@ findValue (register const char *str, register unsigned int len)
{"thin", CSSValueThin},
#line 21 "CSSValueKeywords.gperf"
{"solid", CSSValueSolid},
-#line 543 "CSSValueKeywords.gperf"
+#line 544 "CSSValueKeywords.gperf"
{"linen", CSSValueLinen},
#line 319 "CSSValueKeywords.gperf"
{"local", CSSValueLocal},
-#line 589 "CSSValueKeywords.gperf"
+#line 590 "CSSValueKeywords.gperf"
{"thistle", CSSValueThistle},
#line 392 "CSSValueKeywords.gperf"
{"listitem", CSSValueListitem},
@@ -402,31 +400,31 @@ findValue (register const char *str, register unsigned int len)
{"tibetan", CSSValueTibetan},
#line 105 "CSSValueKeywords.gperf"
{"highlight", CSSValueHighlight},
-#line 484 "CSSValueKeywords.gperf"
+#line 485 "CSSValueKeywords.gperf"
{"cyan", CSSValueCyan},
-#line 483 "CSSValueKeywords.gperf"
+#line 484 "CSSValueKeywords.gperf"
{"crimson", CSSValueCrimson},
#line 117 "CSSValueKeywords.gperf"
{"threedhighlight", CSSValueThreedhighlight},
-#line 592 "CSSValueKeywords.gperf"
+#line 593 "CSSValueKeywords.gperf"
{"violet", CSSValueViolet},
#line 164 "CSSValueKeywords.gperf"
{"circle", CSSValueCircle},
#line 370 "CSSValueKeywords.gperf"
{"clip", CSSValueClip},
-#line 535 "CSSValueKeywords.gperf"
+#line 536 "CSSValueKeywords.gperf"
{"lightsalmon", CSSValueLightsalmon},
-#line 557 "CSSValueKeywords.gperf"
+#line 558 "CSSValueKeywords.gperf"
{"moccasin", CSSValueMoccasin},
#line 206 "CSSValueKeywords.gperf"
{"ethiopic", CSSValueEthiopic},
-#line 603 "CSSValueKeywords.gperf"
+#line 604 "CSSValueKeywords.gperf"
{"butt", CSSValueButt},
#line 356 "CSSValueKeywords.gperf"
{"up", CSSValueUp},
#line 185 "CSSValueKeywords.gperf"
{"urdu", CSSValueUrdu},
-#line 622 "CSSValueKeywords.gperf"
+#line 623 "CSSValueKeywords.gperf"
{"rl", CSSValueRl},
#line 312 "CSSValueKeywords.gperf"
{"hand", CSSValueHand},
@@ -434,7 +432,7 @@ findValue (register const char *str, register unsigned int len)
{"aqua", CSSValueAqua},
#line 211 "CSSValueKeywords.gperf"
{"hangul", CSSValueHangul},
-#line 470 "CSSValueKeywords.gperf"
+#line 471 "CSSValueKeywords.gperf"
{"azure", CSSValueAzure},
#line 386 "CSSValueKeywords.gperf"
{"button", CSSValueButton},
@@ -450,7 +448,7 @@ findValue (register const char *str, register unsigned int len)
{"slow", CSSValueSlow},
#line 144 "CSSValueKeywords.gperf"
{"baseline", CSSValueBaseline},
-#line 585 "CSSValueKeywords.gperf"
+#line 586 "CSSValueKeywords.gperf"
{"snow", CSSValueSnow},
#line 338 "CSSValueKeywords.gperf"
{"static", CSSValueStatic},
@@ -460,7 +458,7 @@ findValue (register const char *str, register unsigned int len)
{"outside", CSSValueOutside},
#line 306 "CSSValueKeywords.gperf"
{"both", CSSValueBoth},
-#line 591 "CSSValueKeywords.gperf"
+#line 592 "CSSValueKeywords.gperf"
{"turquoise", CSSValueTurquoise},
#line 37 "CSSValueKeywords.gperf"
{"bold", CSSValueBold},
@@ -470,11 +468,11 @@ findValue (register const char *str, register unsigned int len)
{"inactivecaption", CSSValueInactivecaption},
#line 151 "CSSValueKeywords.gperf"
{"bottom", CSSValueBottom},
-#line 612 "CSSValueKeywords.gperf"
+#line 613 "CSSValueKeywords.gperf"
{"alphabetic", CSSValueAlphabetic},
-#line 562 "CSSValueKeywords.gperf"
+#line 563 "CSSValueKeywords.gperf"
{"orchid", CSSValueOrchid},
-#line 620 "CSSValueKeywords.gperf"
+#line 621 "CSSValueKeywords.gperf"
{"tb-rl", CSSValueTbRl},
#line 32 "CSSValueKeywords.gperf"
{"italic", CSSValueItalic},
@@ -486,7 +484,7 @@ findValue (register const char *str, register unsigned int len)
{"oblique", CSSValueOblique},
#line 438 "CSSValueKeywords.gperf"
{"visual", CSSValueVisual},
-#line 614 "CSSValueKeywords.gperf"
+#line 615 "CSSValueKeywords.gperf"
{"mathematical", CSSValueMathematical},
#line 22 "CSSValueKeywords.gperf"
{"double", CSSValueDouble},
@@ -506,7 +504,7 @@ findValue (register const char *str, register unsigned int len)
{"running", CSSValueRunning},
#line 279 "CSSValueKeywords.gperf"
{"w-resize", CSSValueWResize},
-#line 513 "CSSValueKeywords.gperf"
+#line 514 "CSSValueKeywords.gperf"
{"ghostwhite", CSSValueGhostwhite},
#line 163 "CSSValueKeywords.gperf"
{"disc", CSSValueDisc},
@@ -516,7 +514,7 @@ findValue (register const char *str, register unsigned int len)
{"padding", CSSValuePadding},
#line 200 "CSSValueKeywords.gperf"
{"amharic", CSSValueAmharic},
-#line 581 "CSSValueKeywords.gperf"
+#line 582 "CSSValueKeywords.gperf"
{"skyblue", CSSValueSkyblue},
#line 100 "CSSValueKeywords.gperf"
{"buttonhighlight", CSSValueButtonhighlight},
@@ -524,8 +522,6 @@ findValue (register const char *str, register unsigned int len)
{"landscape", CSSValueLandscape},
#line 246 "CSSValueKeywords.gperf"
{"inline-table", CSSValueInlineTable},
-#line 465 "CSSValueKeywords.gperf"
- {"application", CSSValueApplication},
#line 259 "CSSValueKeywords.gperf"
{"crosshair", CSSValueCrosshair},
#line 267 "CSSValueKeywords.gperf"
@@ -546,13 +542,13 @@ findValue (register const char *str, register unsigned int len)
{"portrait", CSSValuePortrait},
#line 130 "CSSValueKeywords.gperf"
{"no-repeat", CSSValueNoRepeat},
-#line 582 "CSSValueKeywords.gperf"
+#line 583 "CSSValueKeywords.gperf"
{"slateblue", CSSValueSlateblue},
#line 294 "CSSValueKeywords.gperf"
{"capitalize", CSSValueCapitalize},
-#line 619 "CSSValueKeywords.gperf"
+#line 620 "CSSValueKeywords.gperf"
{"rl-tb", CSSValueRlTb},
-#line 602 "CSSValueKeywords.gperf"
+#line 603 "CSSValueKeywords.gperf"
{"crispedges", CSSValueCrispedges},
#line 293 "CSSValueKeywords.gperf"
{"rtl", CSSValueRtl},
@@ -568,11 +564,13 @@ findValue (register const char *str, register unsigned int len)
{"small-caps", CSSValueSmallCaps},
#line 147 "CSSValueKeywords.gperf"
{"super", CSSValueSuper},
-#line 477 "CSSValueKeywords.gperf"
+#line 478 "CSSValueKeywords.gperf"
{"cadetblue", CSSValueCadetblue},
-#line 596 "CSSValueKeywords.gperf"
+#line 466 "CSSValueKeywords.gperf"
+ {"minimized", CSSValueMinimized},
+#line 597 "CSSValueKeywords.gperf"
{"nonzero", CSSValueNonzero},
-#line 475 "CSSValueKeywords.gperf"
+#line 476 "CSSValueKeywords.gperf"
{"brown", CSSValueBrown},
#line 90 "CSSValueKeywords.gperf"
{"white", CSSValueWhite},
@@ -606,29 +604,29 @@ findValue (register const char *str, register unsigned int len)
{"linear", CSSValueLinear},
#line 171 "CSSValueKeywords.gperf"
{"cambodian", CSSValueCambodian},
-#line 467 "CSSValueKeywords.gperf"
+#line 468 "CSSValueKeywords.gperf"
{"aliceblue", CSSValueAliceblue},
-#line 527 "CSSValueKeywords.gperf"
+#line 528 "CSSValueKeywords.gperf"
{"lightblue", CSSValueLightblue},
#line 314 "CSSValueKeywords.gperf"
{"higher", CSSValueHigher},
#line 19 "CSSValueKeywords.gperf"
{"dotted", CSSValueDotted},
-#line 564 "CSSValueKeywords.gperf"
+#line 565 "CSSValueKeywords.gperf"
{"palegreen", CSSValuePalegreen},
#line 141 "CSSValueKeywords.gperf"
{"xor", CSSValueXor},
#line 154 "CSSValueKeywords.gperf"
{"left", CSSValueLeft},
-#line 519 "CSSValueKeywords.gperf"
+#line 520 "CSSValueKeywords.gperf"
{"indianred", CSSValueIndianred},
#line 39 "CSSValueKeywords.gperf"
{"lighter", CSSValueLighter},
-#line 586 "CSSValueKeywords.gperf"
+#line 587 "CSSValueKeywords.gperf"
{"springgreen", CSSValueSpringgreen},
#line 80 "CSSValueKeywords.gperf"
{"green", CSSValueGreen},
-#line 482 "CSSValueKeywords.gperf"
+#line 483 "CSSValueKeywords.gperf"
{"cornsilk", CSSValueCornsilk},
#line 79 "CSSValueKeywords.gperf"
{"gray", CSSValueGray},
@@ -636,27 +634,27 @@ findValue (register const char *str, register unsigned int len)
{"round", CSSValueRound},
#line 181 "CSSValueKeywords.gperf"
{"myanmar", CSSValueMyanmar},
-#line 554 "CSSValueKeywords.gperf"
+#line 555 "CSSValueKeywords.gperf"
{"midnightblue", CSSValueMidnightblue},
#line 366 "CSSValueKeywords.gperf"
{"element", CSSValueElement},
-#line 555 "CSSValueKeywords.gperf"
+#line 556 "CSSValueKeywords.gperf"
{"mintcream", CSSValueMintcream},
#line 242 "CSSValueKeywords.gperf"
{"run-in", CSSValueRunIn},
#line 449 "CSSValueKeywords.gperf"
{"document", CSSValueDocument},
-#line 540 "CSSValueKeywords.gperf"
+#line 541 "CSSValueKeywords.gperf"
{"lightsteelblue", CSSValueLightsteelblue},
#line 264 "CSSValueKeywords.gperf"
{"cell", CSSValueCell},
#line 179 "CSSValueKeywords.gperf"
{"malayalam", CSSValueMalayalam},
-#line 532 "CSSValueKeywords.gperf"
+#line 533 "CSSValueKeywords.gperf"
{"lightgreen", CSSValueLightgreen},
#line 92 "CSSValueKeywords.gperf"
{"transparent", CSSValueTransparent},
-#line 542 "CSSValueKeywords.gperf"
+#line 543 "CSSValueKeywords.gperf"
{"limegreen", CSSValueLimegreen},
#line 456 "CSSValueKeywords.gperf"
{"stroke", CSSValueStroke},
@@ -664,7 +662,7 @@ findValue (register const char *str, register unsigned int len)
{"intrinsic", CSSValueIntrinsic},
#line 454 "CSSValueKeywords.gperf"
{"painted", CSSValuePainted},
-#line 536 "CSSValueKeywords.gperf"
+#line 537 "CSSValueKeywords.gperf"
{"lightseagreen", CSSValueLightseagreen},
#line 331 "CSSValueKeywords.gperf"
{"pre", CSSValuePre},
@@ -676,7 +674,7 @@ findValue (register const char *str, register unsigned int len)
{"gurmukhi", CSSValueGurmukhi},
#line 348 "CSSValueKeywords.gperf"
{"vertical", CSSValueVertical},
-#line 528 "CSSValueKeywords.gperf"
+#line 529 "CSSValueKeywords.gperf"
{"lightcoral", CSSValueLightcoral},
#line 384 "CSSValueKeywords.gperf"
{"push-button", CSSValuePushButton},
@@ -696,7 +694,7 @@ findValue (register const char *str, register unsigned int len)
{"close-quote", CSSValueCloseQuote},
#line 183 "CSSValueKeywords.gperf"
{"oriya", CSSValueOriya},
-#line 464 "CSSValueKeywords.gperf"
+#line 463 "CSSValueKeywords.gperf"
{"floating", CSSValueFloating},
#line 143 "CSSValueKeywords.gperf"
{"plus-lighter", CSSValuePlusLighter},
@@ -714,15 +712,15 @@ findValue (register const char *str, register unsigned int len)
{"source-in", CSSValueSourceIn},
#line 261 "CSSValueKeywords.gperf"
{"pointer", CSSValuePointer},
-#line 472 "CSSValueKeywords.gperf"
+#line 473 "CSSValueKeywords.gperf"
{"bisque", CSSValueBisque},
-#line 598 "CSSValueKeywords.gperf"
+#line 599 "CSSValueKeywords.gperf"
{"accumulate", CSSValueAccumulate},
#line 119 "CSSValueKeywords.gperf"
{"threedshadow", CSSValueThreedshadow},
#line 339 "CSSValueKeywords.gperf"
{"thick", CSSValueThick},
-#line 561 "CSSValueKeywords.gperf"
+#line 562 "CSSValueKeywords.gperf"
{"orangered", CSSValueOrangered},
#line 132 "CSSValueKeywords.gperf"
{"copy", CSSValueCopy},
@@ -732,9 +730,9 @@ findValue (register const char *str, register unsigned int len)
{"no-close-quote", CSSValueNoCloseQuote},
#line 459 "CSSValueKeywords.gperf"
{"optimizespeed", CSSValueOptimizespeed},
-#line 570 "CSSValueKeywords.gperf"
+#line 571 "CSSValueKeywords.gperf"
{"pink", CSSValuePink},
-#line 604 "CSSValueKeywords.gperf"
+#line 605 "CSSValueKeywords.gperf"
{"miter", CSSValueMiter},
#line 442 "CSSValueKeywords.gperf"
{"flat", CSSValueFlat},
@@ -744,7 +742,7 @@ findValue (register const char *str, register unsigned int len)
{"bolder", CSSValueBolder},
#line 436 "CSSValueKeywords.gperf"
{"cover", CSSValueCover},
-#line 469 "CSSValueKeywords.gperf"
+#line 470 "CSSValueKeywords.gperf"
{"aquamarine", CSSValueAquamarine},
#line 429 "CSSValueKeywords.gperf"
{"border", CSSValueBorder},
@@ -760,7 +758,7 @@ findValue (register const char *str, register unsigned int len)
{"button-bevel", CSSValueButtonBevel},
#line 325 "CSSValueKeywords.gperf"
{"no-open-quote", CSSValueNoOpenQuote},
-#line 529 "CSSValueKeywords.gperf"
+#line 530 "CSSValueKeywords.gperf"
{"lightcyan", CSSValueLightcyan},
#line 118 "CSSValueKeywords.gperf"
{"threedlightshadow", CSSValueThreedlightshadow},
@@ -772,13 +770,13 @@ findValue (register const char *str, register unsigned int len)
{"ahead", CSSValueAhead},
#line 284 "CSSValueKeywords.gperf"
{"col-resize", CSSValueColResize},
-#line 579 "CSSValueKeywords.gperf"
+#line 580 "CSSValueKeywords.gperf"
{"seashell", CSSValueSeashell},
-#line 473 "CSSValueKeywords.gperf"
+#line 474 "CSSValueKeywords.gperf"
{"blanchedalmond", CSSValueBlanchedalmond},
#line 76 "CSSValueKeywords.gperf"
{"black", CSSValueBlack},
-#line 518 "CSSValueKeywords.gperf"
+#line 519 "CSSValueKeywords.gperf"
{"hotpink", CSSValueHotpink},
#line 78 "CSSValueKeywords.gperf"
{"fuchsia", CSSValueFuchsia},
@@ -786,13 +784,13 @@ findValue (register const char *str, register unsigned int len)
{"down", CSSValueDown},
#line 409 "CSSValueKeywords.gperf"
{"menulist", CSSValueMenulist},
-#line 566 "CSSValueKeywords.gperf"
+#line 567 "CSSValueKeywords.gperf"
{"palevioletred", CSSValuePalevioletred},
-#line 515 "CSSValueKeywords.gperf"
+#line 516 "CSSValueKeywords.gperf"
{"goldenrod", CSSValueGoldenrod},
-#line 534 "CSSValueKeywords.gperf"
+#line 535 "CSSValueKeywords.gperf"
{"lightpink", CSSValueLightpink},
-#line 569 "CSSValueKeywords.gperf"
+#line 570 "CSSValueKeywords.gperf"
{"peru", CSSValuePeru},
#line 455 "CSSValueKeywords.gperf"
{"fill", CSSValueFill},
@@ -800,7 +798,7 @@ findValue (register const char *str, register unsigned int len)
{"kannada", CSSValueKannada},
#line 373 "CSSValueKeywords.gperf"
{"dot-dash", CSSValueDotDash},
-#line 492 "CSSValueKeywords.gperf"
+#line 493 "CSSValueKeywords.gperf"
{"darkmagenta", CSSValueDarkmagenta},
#line 174 "CSSValueKeywords.gperf"
{"gujarati", CSSValueGujarati},
@@ -816,17 +814,17 @@ findValue (register const char *str, register unsigned int len)
{"currentcolor", CSSValueCurrentcolor},
#line 172 "CSSValueKeywords.gperf"
{"khmer", CSSValueKhmer},
-#line 503 "CSSValueKeywords.gperf"
+#line 504 "CSSValueKeywords.gperf"
{"darkviolet", CSSValueDarkviolet},
#line 106 "CSSValueKeywords.gperf"
{"highlighttext", CSSValueHighlighttext},
-#line 497 "CSSValueKeywords.gperf"
+#line 498 "CSSValueKeywords.gperf"
{"darksalmon", CSSValueDarksalmon},
#line 305 "CSSValueKeywords.gperf"
{"blink", CSSValueBlink},
-#line 574 "CSSValueKeywords.gperf"
+#line 575 "CSSValueKeywords.gperf"
{"royalblue", CSSValueRoyalblue},
-#line 580 "CSSValueKeywords.gperf"
+#line 581 "CSSValueKeywords.gperf"
{"sienna", CSSValueSienna},
#line 349 "CSSValueKeywords.gperf"
{"inline-axis", CSSValueInlineAxis},
@@ -840,7 +838,7 @@ findValue (register const char *str, register unsigned int len)
{"buttonshadow", CSSValueButtonshadow},
#line 59 "CSSValueKeywords.gperf"
{"wider", CSSValueWider},
-#line 468 "CSSValueKeywords.gperf"
+#line 469 "CSSValueKeywords.gperf"
{"antiquewhite", CSSValueAntiquewhite},
#line 54 "CSSValueKeywords.gperf"
{"x-large", CSSValueXLarge},
@@ -848,7 +846,7 @@ findValue (register const char *str, register unsigned int len)
{"ethiopic-abegede", CSSValueEthiopicAbegede},
#line 207 "CSSValueKeywords.gperf"
{"ethiopic-halehame-gez", CSSValueEthiopicHalehameGez},
-#line 593 "CSSValueKeywords.gperf"
+#line 594 "CSSValueKeywords.gperf"
{"wheat", CSSValueWheat},
#line 295 "CSSValueKeywords.gperf"
{"uppercase", CSSValueUppercase},
@@ -856,19 +854,21 @@ findValue (register const char *str, register unsigned int len)
{"buttontext", CSSValueButtontext},
#line 317 "CSSValueKeywords.gperf"
{"level", CSSValueLevel},
-#line 560 "CSSValueKeywords.gperf"
+#line 561 "CSSValueKeywords.gperf"
{"olivedrab", CSSValueOlivedrab},
-#line 512 "CSSValueKeywords.gperf"
+#line 513 "CSSValueKeywords.gperf"
{"gainsboro", CSSValueGainsboro},
+#line 465 "CSSValueKeywords.gperf"
+ {"maximized", CSSValueMaximized},
#line 186 "CSSValueKeywords.gperf"
{"telugu", CSSValueTelugu},
-#line 607 "CSSValueKeywords.gperf"
+#line 608 "CSSValueKeywords.gperf"
{"after-edge", CSSValueAfterEdge},
#line 332 "CSSValueKeywords.gperf"
{"pre-line", CSSValuePreLine},
#line 87 "CSSValueKeywords.gperf"
{"red", CSSValueRed},
-#line 508 "CSSValueKeywords.gperf"
+#line 509 "CSSValueKeywords.gperf"
{"dodgerblue", CSSValueDodgerblue},
#line 83 "CSSValueKeywords.gperf"
{"navy", CSSValueNavy},
@@ -882,7 +882,7 @@ findValue (register const char *str, register unsigned int len)
{"inactivecaptiontext", CSSValueInactivecaptiontext},
#line 260 "CSSValueKeywords.gperf"
{"default", CSSValueDefault},
-#line 471 "CSSValueKeywords.gperf"
+#line 472 "CSSValueKeywords.gperf"
{"beige", CSSValueBeige},
#line 244 "CSSValueKeywords.gperf"
{"inline-block", CSSValueInlineBlock},
@@ -898,17 +898,17 @@ findValue (register const char *str, register unsigned int len)
{"captiontext", CSSValueCaptiontext},
#line 166 "CSSValueKeywords.gperf"
{"decimal", CSSValueDecimal},
-#line 583 "CSSValueKeywords.gperf"
+#line 584 "CSSValueKeywords.gperf"
{"slategray", CSSValueSlategray},
#line 156 "CSSValueKeywords.gperf"
{"center", CSSValueCenter},
-#line 584 "CSSValueKeywords.gperf"
+#line 585 "CSSValueKeywords.gperf"
{"slategrey", CSSValueSlategrey},
#line 99 "CSSValueKeywords.gperf"
{"buttonface", CSSValueButtonface},
-#line 563 "CSSValueKeywords.gperf"
+#line 564 "CSSValueKeywords.gperf"
{"palegoldenrod", CSSValuePalegoldenrod},
-#line 608 "CSSValueKeywords.gperf"
+#line 609 "CSSValueKeywords.gperf"
{"central", CSSValueCentral},
#line 269 "CSSValueKeywords.gperf"
{"not-allowed", CSSValueNotAllowed},
@@ -924,21 +924,21 @@ findValue (register const char *str, register unsigned int len)
{"sw-resize", CSSValueSwResize},
#line 318 "CSSValueKeywords.gperf"
{"line-through", CSSValueLineThrough},
-#line 594 "CSSValueKeywords.gperf"
+#line 595 "CSSValueKeywords.gperf"
{"whitesmoke", CSSValueWhitesmoke},
-#line 466 "CSSValueKeywords.gperf"
+#line 464 "CSSValueKeywords.gperf"
{"fullscreen", CSSValueFullscreen},
#line 120 "CSSValueKeywords.gperf"
{"window", CSSValueWindow},
#line 66 "CSSValueKeywords.gperf"
{"expanded", CSSValueExpanded},
-#line 517 "CSSValueKeywords.gperf"
+#line 518 "CSSValueKeywords.gperf"
{"honeydew", CSSValueHoneydew},
#line 274 "CSSValueKeywords.gperf"
{"nw-resize", CSSValueNwResize},
#line 326 "CSSValueKeywords.gperf"
{"nowrap", CSSValueNowrap},
-#line 523 "CSSValueKeywords.gperf"
+#line 524 "CSSValueKeywords.gperf"
{"lavender", CSSValueLavender},
#line 233 "CSSValueKeywords.gperf"
{"georgian", CSSValueGeorgian},
@@ -946,7 +946,7 @@ findValue (register const char *str, register unsigned int len)
{"xx-small", CSSValueXxSmall},
#line 133 "CSSValueKeywords.gperf"
{"source-over", CSSValueSourceOver},
-#line 511 "CSSValueKeywords.gperf"
+#line 512 "CSSValueKeywords.gperf"
{"forestgreen", CSSValueForestgreen},
#line 198 "CSSValueKeywords.gperf"
{"ethiopic-halehame-aa-et", CSSValueEthiopicHalehameAaEt},
@@ -956,99 +956,99 @@ findValue (register const char *str, register unsigned int len)
{"ethiopic-halehame-am-et", CSSValueEthiopicHalehameAmEt},
#line 452 "CSSValueKeywords.gperf"
{"visiblefill", CSSValueVisiblefill},
-#line 558 "CSSValueKeywords.gperf"
+#line 559 "CSSValueKeywords.gperf"
{"navajowhite", CSSValueNavajowhite},
#line 303 "CSSValueKeywords.gperf"
{"below", CSSValueBelow},
#line 286 "CSSValueKeywords.gperf"
{"text", CSSValueText},
-#line 605 "CSSValueKeywords.gperf"
+#line 606 "CSSValueKeywords.gperf"
{"bevel", CSSValueBevel},
#line 214 "CSSValueKeywords.gperf"
{"ethiopic-halehame-om-et", CSSValueEthiopicHalehameOmEt},
#line 276 "CSSValueKeywords.gperf"
{"se-resize", CSSValueSeResize},
-#line 556 "CSSValueKeywords.gperf"
+#line 557 "CSSValueKeywords.gperf"
{"mistyrose", CSSValueMistyrose},
#line 218 "CSSValueKeywords.gperf"
{"ethiopic-halehame-so-et", CSSValueEthiopicHalehameSoEt},
#line 432 "CSSValueKeywords.gperf"
{"content-box", CSSValueContentBox},
-#line 541 "CSSValueKeywords.gperf"
+#line 542 "CSSValueKeywords.gperf"
{"lightyellow", CSSValueLightyellow},
-#line 531 "CSSValueKeywords.gperf"
+#line 532 "CSSValueKeywords.gperf"
{"lightgray", CSSValueLightgray},
#line 226 "CSSValueKeywords.gperf"
{"ethiopic-halehame-ti-et", CSSValueEthiopicHalehameTiEt},
-#line 533 "CSSValueKeywords.gperf"
+#line 534 "CSSValueKeywords.gperf"
{"lightgrey", CSSValueLightgrey},
#line 265 "CSSValueKeywords.gperf"
{"context-menu", CSSValueContextMenu},
#line 273 "CSSValueKeywords.gperf"
{"ne-resize", CSSValueNeResize},
-#line 611 "CSSValueKeywords.gperf"
+#line 612 "CSSValueKeywords.gperf"
{"ideographic", CSSValueIdeographic},
-#line 478 "CSSValueKeywords.gperf"
+#line 479 "CSSValueKeywords.gperf"
{"chartreuse", CSSValueChartreuse},
-#line 522 "CSSValueKeywords.gperf"
+#line 523 "CSSValueKeywords.gperf"
{"khaki", CSSValueKhaki},
#line 250 "CSSValueKeywords.gperf"
{"table-row", CSSValueTableRow},
-#line 600 "CSSValueKeywords.gperf"
+#line 601 "CSSValueKeywords.gperf"
{"linearrgb", CSSValueLinearrgb},
-#line 538 "CSSValueKeywords.gperf"
- {"lightslategray", CSSValueLightslategray},
#line 539 "CSSValueKeywords.gperf"
+ {"lightslategray", CSSValueLightslategray},
+#line 540 "CSSValueKeywords.gperf"
{"lightslategrey", CSSValueLightslategrey},
-#line 525 "CSSValueKeywords.gperf"
+#line 526 "CSSValueKeywords.gperf"
{"lawngreen", CSSValueLawngreen},
-#line 587 "CSSValueKeywords.gperf"
+#line 588 "CSSValueKeywords.gperf"
{"steelblue", CSSValueSteelblue},
#line 127 "CSSValueKeywords.gperf"
{"repeat", CSSValueRepeat},
-#line 546 "CSSValueKeywords.gperf"
+#line 547 "CSSValueKeywords.gperf"
{"mediumblue", CSSValueMediumblue},
-#line 578 "CSSValueKeywords.gperf"
+#line 579 "CSSValueKeywords.gperf"
{"seagreen", CSSValueSeagreen},
#line 336 "CSSValueKeywords.gperf"
{"separate", CSSValueSeparate},
-#line 565 "CSSValueKeywords.gperf"
+#line 566 "CSSValueKeywords.gperf"
{"paleturquoise", CSSValuePaleturquoise},
-#line 485 "CSSValueKeywords.gperf"
+#line 486 "CSSValueKeywords.gperf"
{"darkblue", CSSValueDarkblue},
#line 138 "CSSValueKeywords.gperf"
{"destination-in", CSSValueDestinationIn},
-#line 476 "CSSValueKeywords.gperf"
+#line 477 "CSSValueKeywords.gperf"
{"burlywood", CSSValueBurlywood},
-#line 599 "CSSValueKeywords.gperf"
+#line 600 "CSSValueKeywords.gperf"
{"new", CSSValueNew},
-#line 550 "CSSValueKeywords.gperf"
+#line 551 "CSSValueKeywords.gperf"
{"mediumslateblue", CSSValueMediumslateblue},
#line 196 "CSSValueKeywords.gperf"
{"upper-latin", CSSValueUpperLatin},
-#line 499 "CSSValueKeywords.gperf"
+#line 500 "CSSValueKeywords.gperf"
{"darkslateblue", CSSValueDarkslateblue},
-#line 549 "CSSValueKeywords.gperf"
+#line 550 "CSSValueKeywords.gperf"
{"mediumseagreen", CSSValueMediumseagreen},
#line 104 "CSSValueKeywords.gperf"
{"graytext", CSSValueGraytext},
#line 458 "CSSValueKeywords.gperf"
{"subpixel-antialiased", CSSValueSubpixelAntialiased},
-#line 489 "CSSValueKeywords.gperf"
+#line 490 "CSSValueKeywords.gperf"
{"darkgreen", CSSValueDarkgreen},
#line 140 "CSSValueKeywords.gperf"
{"destination-atop", CSSValueDestinationAtop},
-#line 494 "CSSValueKeywords.gperf"
+#line 495 "CSSValueKeywords.gperf"
{"darkorange", CSSValueDarkorange},
#line 195 "CSSValueKeywords.gperf"
{"upper-alpha", CSSValueUpperAlpha},
-#line 498 "CSSValueKeywords.gperf"
+#line 499 "CSSValueKeywords.gperf"
{"darkseagreen", CSSValueDarkseagreen},
#line 377 "CSSValueKeywords.gperf"
{"skip-white-space", CSSValueSkipWhiteSpace},
#line 169 "CSSValueKeywords.gperf"
{"binary", CSSValueBinary},
-#line 521 "CSSValueKeywords.gperf"
+#line 522 "CSSValueKeywords.gperf"
{"ivory", CSSValueIvory},
#line 460 "CSSValueKeywords.gperf"
{"optimizelegibility", CSSValueOptimizelegibility},
@@ -1056,23 +1056,25 @@ findValue (register const char *str, register unsigned int len)
{"serif", CSSValueSerif},
#line 60 "CSSValueKeywords.gperf"
{"narrower", CSSValueNarrower},
-#line 575 "CSSValueKeywords.gperf"
+#line 576 "CSSValueKeywords.gperf"
{"saddlebrown", CSSValueSaddlebrown},
#line 209 "CSSValueKeywords.gperf"
{"ethiopic-abegede-gez", CSSValueEthiopicAbegedeGez},
+#line 467 "CSSValueKeywords.gperf"
+ {"windowed", CSSValueWindowed},
#line 72 "CSSValueKeywords.gperf"
{"fantasy", CSSValueFantasy},
#line 414 "CSSValueKeywords.gperf"
{"progress-bar", CSSValueProgressBar},
-#line 493 "CSSValueKeywords.gperf"
+#line 494 "CSSValueKeywords.gperf"
{"darkolivegreen", CSSValueDarkolivegreen},
#line 31 "CSSValueKeywords.gperf"
{"status-bar", CSSValueStatusBar},
-#line 506 "CSSValueKeywords.gperf"
- {"dimgray", CSSValueDimgray},
#line 507 "CSSValueKeywords.gperf"
+ {"dimgray", CSSValueDimgray},
+#line 508 "CSSValueKeywords.gperf"
{"dimgrey", CSSValueDimgrey},
-#line 567 "CSSValueKeywords.gperf"
+#line 568 "CSSValueKeywords.gperf"
{"papayawhip", CSSValuePapayawhip},
#line 453 "CSSValueKeywords.gperf"
{"visiblestroke", CSSValueVisiblestroke},
@@ -1092,9 +1094,9 @@ findValue (register const char *str, register unsigned int len)
{"destination-out", CSSValueDestinationOut},
#line 231 "CSSValueKeywords.gperf"
{"hebrew", CSSValueHebrew},
-#line 617 "CSSValueKeywords.gperf"
+#line 618 "CSSValueKeywords.gperf"
{"reset-size", CSSValueResetSize},
-#line 597 "CSSValueKeywords.gperf"
+#line 598 "CSSValueKeywords.gperf"
{"evenodd", CSSValueEvenodd},
#line 107 "CSSValueKeywords.gperf"
{"inactiveborder", CSSValueInactiveborder},
@@ -1106,7 +1108,7 @@ findValue (register const char *str, register unsigned int len)
{"overline", CSSValueOverline},
#line 389 "CSSValueKeywords.gperf"
{"inner-spin-button", CSSValueInnerSpinButton},
-#line 486 "CSSValueKeywords.gperf"
+#line 487 "CSSValueKeywords.gperf"
{"darkcyan", CSSValueDarkcyan},
#line 113 "CSSValueKeywords.gperf"
{"menutext", CSSValueMenutext},
@@ -1114,15 +1116,15 @@ findValue (register const char *str, register unsigned int len)
{"tigrinya-et", CSSValueTigrinyaEt},
#line 64 "CSSValueKeywords.gperf"
{"semi-condensed", CSSValueSemiCondensed},
-#line 496 "CSSValueKeywords.gperf"
+#line 497 "CSSValueKeywords.gperf"
{"darkred", CSSValueDarkred},
-#line 601 "CSSValueKeywords.gperf"
+#line 602 "CSSValueKeywords.gperf"
{"optimizequality", CSSValueOptimizequality},
#line 203 "CSSValueKeywords.gperf"
{"ethiopic-abegede-am-et", CSSValueEthiopicAbegedeAmEt},
#line 148 "CSSValueKeywords.gperf"
{"text-top", CSSValueTextTop},
-#line 510 "CSSValueKeywords.gperf"
+#line 511 "CSSValueKeywords.gperf"
{"floralwhite", CSSValueFloralwhite},
#line 70 "CSSValueKeywords.gperf"
{"sans-serif", CSSValueSansSerif},
@@ -1130,7 +1132,7 @@ findValue (register const char *str, register unsigned int len)
{"padding-box", CSSValuePaddingBox},
#line 55 "CSSValueKeywords.gperf"
{"xx-large", CSSValueXxLarge},
-#line 553 "CSSValueKeywords.gperf"
+#line 554 "CSSValueKeywords.gperf"
{"mediumvioletred", CSSValueMediumvioletred},
#line 228 "CSSValueKeywords.gperf"
{"ethiopic-abegede-ti-et", CSSValueEthiopicAbegedeTiEt},
@@ -1140,13 +1142,13 @@ findValue (register const char *str, register unsigned int len)
{"open-quote", CSSValueOpenQuote},
#line 61 "CSSValueKeywords.gperf"
{"ultra-condensed", CSSValueUltraCondensed},
-#line 547 "CSSValueKeywords.gperf"
+#line 548 "CSSValueKeywords.gperf"
{"mediumorchid", CSSValueMediumorchid},
-#line 524 "CSSValueKeywords.gperf"
+#line 525 "CSSValueKeywords.gperf"
{"lavenderblush", CSSValueLavenderblush},
#line 199 "CSSValueKeywords.gperf"
{"ethiopic-halehame-aa-er", CSSValueEthiopicHalehameAaEr},
-#line 495 "CSSValueKeywords.gperf"
+#line 496 "CSSValueKeywords.gperf"
{"darkorchid", CSSValueDarkorchid},
#line 410 "CSSValueKeywords.gperf"
{"menulist-button", CSSValueMenulistButton},
@@ -1166,11 +1168,11 @@ findValue (register const char *str, register unsigned int len)
{"ethiopic-halehame-ti-er", CSSValueEthiopicHalehameTiEr},
#line 95 "CSSValueKeywords.gperf"
{"activeborder", CSSValueActiveborder},
-#line 516 "CSSValueKeywords.gperf"
+#line 517 "CSSValueKeywords.gperf"
{"greenyellow", CSSValueGreenyellow},
#line 443 "CSSValueKeywords.gperf"
{"preserve-3d", CSSValuePreserve3d},
-#line 548 "CSSValueKeywords.gperf"
+#line 549 "CSSValueKeywords.gperf"
{"mediumpurple", CSSValueMediumpurple},
#line 263 "CSSValueKeywords.gperf"
{"vertical-text", CSSValueVerticalText},
@@ -1178,7 +1180,7 @@ findValue (register const char *str, register unsigned int len)
{"fixed", CSSValueFixed},
#line 378 "CSSValueKeywords.gperf"
{"break-all", CSSValueBreakAll},
-#line 615 "CSSValueKeywords.gperf"
+#line 616 "CSSValueKeywords.gperf"
{"use-script", CSSValueUseScript},
#line 413 "CSSValueKeywords.gperf"
{"outer-spin-button", CSSValueOuterSpinButton},
@@ -1198,23 +1200,23 @@ findValue (register const char *str, register unsigned int len)
{"forwards", CSSValueForwards},
#line 251 "CSSValueKeywords.gperf"
{"table-column-group", CSSValueTableColumnGroup},
-#line 606 "CSSValueKeywords.gperf"
+#line 607 "CSSValueKeywords.gperf"
{"before-edge", CSSValueBeforeEdge},
#line 415 "CSSValueKeywords.gperf"
{"slider-horizontal", CSSValueSliderHorizontal},
-#line 537 "CSSValueKeywords.gperf"
+#line 538 "CSSValueKeywords.gperf"
{"lightskyblue", CSSValueLightskyblue},
#line 26 "CSSValueKeywords.gperf"
{"message-box", CSSValueMessageBox},
-#line 545 "CSSValueKeywords.gperf"
+#line 546 "CSSValueKeywords.gperf"
{"mediumaquamarine", CSSValueMediumaquamarine},
#line 304 "CSSValueKeywords.gperf"
{"bidi-override", CSSValueBidiOverride},
-#line 572 "CSSValueKeywords.gperf"
+#line 573 "CSSValueKeywords.gperf"
{"powderblue", CSSValuePowderblue},
#line 388 "CSSValueKeywords.gperf"
{"default-button", CSSValueDefaultButton},
-#line 487 "CSSValueKeywords.gperf"
+#line 488 "CSSValueKeywords.gperf"
{"darkgoldenrod", CSSValueDarkgoldenrod},
#line 97 "CSSValueKeywords.gperf"
{"appworkspace", CSSValueAppworkspace},
@@ -1232,23 +1234,23 @@ findValue (register const char *str, register unsigned int len)
{"media-mute-button", CSSValueMediaMuteButton},
#line 346 "CSSValueKeywords.gperf"
{"reverse", CSSValueReverse},
-#line 488 "CSSValueKeywords.gperf"
+#line 489 "CSSValueKeywords.gperf"
{"darkgray", CSSValueDarkgray},
-#line 490 "CSSValueKeywords.gperf"
+#line 491 "CSSValueKeywords.gperf"
{"darkgrey", CSSValueDarkgrey},
#line 282 "CSSValueKeywords.gperf"
{"nesw-resize", CSSValueNeswResize},
-#line 551 "CSSValueKeywords.gperf"
+#line 552 "CSSValueKeywords.gperf"
{"mediumspringgreen", CSSValueMediumspringgreen},
#line 142 "CSSValueKeywords.gperf"
{"plus-darker", CSSValuePlusDarker},
-#line 500 "CSSValueKeywords.gperf"
- {"darkslategray", CSSValueDarkslategray},
#line 501 "CSSValueKeywords.gperf"
+ {"darkslategray", CSSValueDarkslategray},
+#line 502 "CSSValueKeywords.gperf"
{"darkslategrey", CSSValueDarkslategrey},
#line 285 "CSSValueKeywords.gperf"
{"row-resize", CSSValueRowResize},
-#line 577 "CSSValueKeywords.gperf"
+#line 578 "CSSValueKeywords.gperf"
{"sandybrown", CSSValueSandybrown},
#line 221 "CSSValueKeywords.gperf"
{"tigrinya-er", CSSValueTigrinyaEr},
@@ -1258,27 +1260,27 @@ findValue (register const char *str, register unsigned int len)
{"background", CSSValueBackground},
#line 430 "CSSValueKeywords.gperf"
{"border-box", CSSValueBorderBox},
-#line 552 "CSSValueKeywords.gperf"
+#line 553 "CSSValueKeywords.gperf"
{"mediumturquoise", CSSValueMediumturquoise},
-#line 502 "CSSValueKeywords.gperf"
+#line 503 "CSSValueKeywords.gperf"
{"darkturquoise", CSSValueDarkturquoise},
#line 115 "CSSValueKeywords.gperf"
{"threeddarkshadow", CSSValueThreeddarkshadow},
#line 224 "CSSValueKeywords.gperf"
{"ethiopic-abegede-ti-er", CSSValueEthiopicAbegedeTiEr},
-#line 573 "CSSValueKeywords.gperf"
+#line 574 "CSSValueKeywords.gperf"
{"rosybrown", CSSValueRosybrown},
#line 328 "CSSValueKeywords.gperf"
{"overlay", CSSValueOverlay},
-#line 491 "CSSValueKeywords.gperf"
+#line 492 "CSSValueKeywords.gperf"
{"darkkhaki", CSSValueDarkkhaki},
-#line 481 "CSSValueKeywords.gperf"
+#line 482 "CSSValueKeywords.gperf"
{"cornflowerblue", CSSValueCornflowerblue},
#line 402 "CSSValueKeywords.gperf"
{"media-sliderthumb", CSSValueMediaSliderthumb},
#line 418 "CSSValueKeywords.gperf"
{"sliderthumb-vertical", CSSValueSliderthumbVertical},
-#line 595 "CSSValueKeywords.gperf"
+#line 596 "CSSValueKeywords.gperf"
{"yellowgreen", CSSValueYellowgreen},
#line 354 "CSSValueKeywords.gperf"
{"backwards", CSSValueBackwards},
@@ -1286,7 +1288,7 @@ findValue (register const char *str, register unsigned int len)
{"table-header-group", CSSValueTableHeaderGroup},
#line 129 "CSSValueKeywords.gperf"
{"repeat-y", CSSValueRepeatY},
-#line 509 "CSSValueKeywords.gperf"
+#line 510 "CSSValueKeywords.gperf"
{"firebrick", CSSValueFirebrick},
#line 382 "CSSValueKeywords.gperf"
{"checkbox", CSSValueCheckbox},
@@ -1294,7 +1296,7 @@ findValue (register const char *str, register unsigned int len)
{"media-volume-slider", CSSValueMediaVolumeSlider},
#line 230 "CSSValueKeywords.gperf"
{"upper-norwegian", CSSValueUpperNorwegian},
-#line 530 "CSSValueKeywords.gperf"
+#line 531 "CSSValueKeywords.gperf"
{"lightgoldenrodyellow", CSSValueLightgoldenrodyellow},
#line 65 "CSSValueKeywords.gperf"
{"semi-expanded", CSSValueSemiExpanded},
@@ -1318,7 +1320,7 @@ findValue (register const char *str, register unsigned int len)
{"upper-greek", CSSValueUpperGreek},
#line 247 "CSSValueKeywords.gperf"
{"table-row-group", CSSValueTableRowGroup},
-#line 526 "CSSValueKeywords.gperf"
+#line 527 "CSSValueKeywords.gperf"
{"lemonchiffon", CSSValueLemonchiffon},
#line 212 "CSSValueKeywords.gperf"
{"lower-norwegian", CSSValueLowerNorwegian},
@@ -1328,7 +1330,7 @@ findValue (register const char *str, register unsigned int len)
{"media-play-button", CSSValueMediaPlayButton},
#line 427 "CSSValueKeywords.gperf"
{"caps-lock-indicator", CSSValueCapsLockIndicator},
-#line 504 "CSSValueKeywords.gperf"
+#line 505 "CSSValueKeywords.gperf"
{"deeppink", CSSValueDeeppink},
#line 121 "CSSValueKeywords.gperf"
{"windowframe", CSSValueWindowframe},
@@ -1350,7 +1352,7 @@ findValue (register const char *str, register unsigned int len)
{"table-footer-group", CSSValueTableFooterGroup},
#line 223 "CSSValueKeywords.gperf"
{"tigrinya-er-abegede", CSSValueTigrinyaErAbegede},
-#line 568 "CSSValueKeywords.gperf"
+#line 569 "CSSValueKeywords.gperf"
{"peachpuff", CSSValuePeachpuff},
#line 379 "CSSValueKeywords.gperf"
{"break-word", CSSValueBreakWord},
@@ -1376,11 +1378,11 @@ findValue (register const char *str, register unsigned int len)
{"-webkit-center", CSSValueWebkitCenter},
#line 393 "CSSValueKeywords.gperf"
{"media-fullscreen-button", CSSValueMediaFullscreenButton},
-#line 610 "CSSValueKeywords.gperf"
+#line 611 "CSSValueKeywords.gperf"
{"text-after-edge", CSSValueTextAfterEdge},
#line 30 "CSSValueKeywords.gperf"
{"-webkit-control", CSSValueWebkitControl},
-#line 505 "CSSValueKeywords.gperf"
+#line 506 "CSSValueKeywords.gperf"
{"deepskyblue", CSSValueDeepskyblue},
#line 290 "CSSValueKeywords.gperf"
{"-webkit-grab", CSSValueWebkitGrab},
@@ -1394,7 +1396,7 @@ findValue (register const char *str, register unsigned int len)
{"-webkit-text", CSSValueWebkitText},
#line 94 "CSSValueKeywords.gperf"
{"-webkit-activelink", CSSValueWebkitActivelink},
-#line 609 "CSSValueKeywords.gperf"
+#line 610 "CSSValueKeywords.gperf"
{"text-before-edge", CSSValueTextBeforeEdge},
#line 421 "CSSValueKeywords.gperf"
{"searchfield-decoration", CSSValueSearchfieldDecoration},
@@ -1482,118 +1484,118 @@ findValue (register const char *str, register unsigned int len)
-1, 66, -1, -1, -1, 67, 68, -1, -1, -1,
69, 70, 71, -1, -1, 72, -1, -1, 73, -1,
-1, 74, -1, -1, -1, 75, -1, 76, -1, -1,
- 77, 78, -1, -1, -1, -1, 79, -1, -1, -1,
- -1, 80, 81, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 82, -1, -1, 83, 84, -1, -1,
- -1, -1, -1, -1, -1, -1, 85, -1, -1, -1,
- 86, 87, -1, -1, -1, 88, 89, -1, -1, -1,
- -1, 90, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 91, 92, -1, -1, -1,
+ 77, 78, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 79, 80, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 81, -1, -1, 82, 83, -1, -1,
+ -1, -1, -1, -1, -1, -1, 84, -1, -1, -1,
+ 85, 86, -1, -1, -1, 87, 88, -1, -1, -1,
+ -1, 89, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 92, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 93, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 94, -1, -1, -1,
- 95, 96, -1, -1, -1, -1, -1, -1, -1, -1,
- 97, -1, -1, 98, -1, -1, 99, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 100, -1, 101, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 102, -1, -1, -1, -1,
- 103, -1, 104, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 105, -1, -1, 106, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 107, 108, 109, -1, -1,
- -1, -1, 110, -1, -1, -1, -1, 111, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 112, -1, -1,
- -1, 113, -1, -1, -1, -1, 114, 115, -1, -1,
- 116, 117, -1, -1, -1, 118, -1, -1, -1, -1,
- -1, 119, -1, -1, -1, -1, -1, -1, -1, -1,
- 120, -1, -1, -1, -1, -1, 121, 122, -1, -1,
- -1, 123, -1, -1, -1, -1, -1, -1, -1, 124,
- 125, 126, 127, -1, -1, 128, -1, -1, 129, -1,
- -1, 130, -1, 131, -1, 132, -1, 133, -1, -1,
- -1, 134, 135, 136, -1, -1, 137, -1, -1, -1,
- -1, -1, 138, 139, -1, 140, -1, 141, -1, -1,
- 142, 143, -1, -1, -1, -1, -1, -1, -1, -1,
- 144, -1, -1, 145, 146, -1, -1, -1, 147, -1,
- -1, -1, -1, -1, -1, -1, 148, 149, -1, -1,
- -1, 150, -1, -1, -1, 151, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 152, -1, -1, -1, -1,
- -1, -1, 153, -1, -1, -1, -1, -1, -1, -1,
+ 94, 95, -1, -1, -1, -1, -1, -1, -1, -1,
+ 96, -1, -1, 97, -1, -1, 98, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 99, -1, 100, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 101, -1, -1, -1, -1,
+ 102, -1, 103, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 104, -1, -1, 105, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 106, 107, 108, -1, -1,
+ -1, -1, 109, -1, -1, -1, -1, 110, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 111, -1, -1,
+ -1, 112, -1, -1, -1, -1, 113, 114, -1, -1,
+ 115, 116, -1, -1, -1, 117, -1, -1, -1, -1,
+ -1, 118, -1, -1, -1, -1, -1, -1, -1, -1,
+ 119, -1, -1, -1, -1, -1, 120, 121, -1, -1,
+ -1, 122, -1, -1, -1, -1, -1, -1, -1, 123,
+ 124, 125, 126, -1, -1, 127, -1, -1, 128, -1,
+ -1, 129, -1, 130, -1, 131, -1, 132, -1, -1,
+ -1, 133, 134, 135, -1, -1, 136, -1, -1, -1,
+ -1, -1, 137, 138, -1, 139, -1, 140, -1, -1,
+ 141, 142, -1, -1, -1, -1, -1, -1, -1, -1,
+ 143, -1, -1, 144, 145, -1, -1, -1, 146, -1,
+ -1, -1, -1, -1, -1, -1, 147, 148, -1, -1,
+ -1, 149, -1, -1, -1, 150, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 151, -1, -1, -1, -1,
+ -1, -1, 152, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 153, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 154, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 155, -1, -1, -1, 156,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 157, -1, -1, -1, -1, 158, -1, -1, -1,
- -1, 159, -1, -1, -1, 160, -1, -1, 161, -1,
- 162, 163, -1, -1, -1, 164, -1, -1, -1, -1,
- 165, -1, -1, 166, -1, 167, -1, 168, 169, -1,
- -1, -1, -1, -1, -1, -1, -1, 170, -1, -1,
- 171, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 172, 173, -1, -1, -1, -1, -1, -1, -1,
- 174, 175, -1, -1, -1, 176, -1, -1, -1, 177,
- 178, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 179, -1, -1, -1, -1, -1, 180, 181, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 182, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 183, -1, -1, -1, 184, -1, -1, -1, -1,
- 185, -1, -1, -1, -1, -1, -1, 186, -1, -1,
- -1, -1, -1, 187, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 188, -1, 189, -1, 190, -1, -1,
- 191, 192, -1, -1, -1, -1, -1, -1, 193, -1,
- 194, 195, -1, -1, -1, 196, 197, -1, 198, 199,
- 200, 201, -1, -1, -1, 202, 203, -1, -1, -1,
- 204, -1, -1, -1, -1, -1, -1, -1, 205, 206,
- -1, -1, -1, -1, -1, -1, 207, 208, -1, -1,
- -1, 209, 210, -1, -1, 211, -1, -1, 212, -1,
- 213, 214, 215, -1, -1, 216, -1, -1, -1, -1,
- -1, -1, -1, 217, -1, 218, -1, -1, -1, -1,
- 219, -1, -1, -1, 220, 221, -1, 222, -1, -1,
- -1, -1, 223, -1, -1, 224, 225, -1, -1, 226,
- 227, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 228, 229, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 230, -1, -1, -1, -1, -1, 231, 232, -1,
- -1, -1, -1, 233, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 234, 235, -1, -1, 236, -1, -1, -1, -1,
- 237, -1, -1, 238, -1, -1, 239, 240, -1, -1,
- -1, 241, -1, -1, -1, -1, 242, -1, -1, 243,
- 244, -1, -1, -1, -1, -1, -1, 245, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 246, 247, -1, -1, -1, 248, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 249, -1, -1,
- -1, 250, -1, 251, -1, 252, -1, 253, 254, -1,
- -1, 255, 256, -1, -1, -1, -1, -1, -1, -1,
- 257, -1, -1, -1, -1, 258, -1, 259, 260, -1,
- -1, 261, -1, -1, -1, 262, -1, -1, -1, -1,
- 263, -1, -1, -1, -1, 264, 265, 266, -1, -1,
- 267, -1, 268, -1, -1, 269, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 270, -1, 271, -1, 272,
- -1, -1, -1, -1, -1, 273, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 274, 275,
- 276, 277, -1, -1, -1, 278, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 279, -1, -1, -1, -1,
- -1, 280, -1, -1, -1, -1, 281, 282, 283, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 284, -1,
- 285, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 286, -1, 287, -1, -1, -1, 288, -1, -1, -1,
- 289, -1, -1, -1, -1, 290, 291, 292, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 293, -1, 294, -1, 295, -1, -1, -1, -1,
- 296, 297, -1, -1, -1, 298, -1, -1, -1, -1,
- -1, -1, -1, 299, -1, -1, -1, 300, -1, -1,
- -1, -1, 301, -1, 302, -1, 303, 304, 305, -1,
- -1, -1, -1, -1, -1, 306, 307, -1, -1, -1,
- 308, -1, -1, -1, -1, 309, -1, 310, -1, -1,
- -1, -1, -1, -1, 311, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 312,
- -1, -1, 313, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 314, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 315,
- -1, 316, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 317, -1, -1, 318, -1, -1, -1,
- -1, -1, -1, -1, 319, -1, -1, 320, -1, -1,
- -1, 321, -1, 322, -1, -1, -1, 323, -1, -1,
- -1, -1, -1, -1, -1, -1, 324, 325, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 155, -1, -1, -1, -1, 156, -1, -1, -1,
+ -1, 157, -1, -1, -1, 158, -1, -1, 159, -1,
+ 160, 161, -1, -1, -1, 162, -1, -1, -1, -1,
+ 163, -1, -1, 164, -1, 165, -1, 166, 167, -1,
+ -1, -1, -1, -1, -1, -1, -1, 168, -1, -1,
+ 169, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 170, 171, -1, -1, -1, -1, -1, -1, -1,
+ 172, 173, -1, -1, -1, 174, -1, -1, -1, 175,
+ 176, -1, -1, -1, -1, -1, 177, -1, -1, -1,
+ 178, -1, -1, -1, -1, -1, 179, 180, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 181, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 182, -1, -1, -1, 183, -1, -1, -1, -1,
+ 184, -1, -1, -1, -1, -1, -1, 185, -1, -1,
+ -1, -1, -1, 186, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 187, -1, 188, -1, 189, -1, -1,
+ 190, 191, -1, -1, -1, -1, -1, -1, 192, -1,
+ 193, 194, -1, -1, -1, 195, 196, -1, 197, 198,
+ 199, 200, -1, -1, -1, 201, 202, -1, -1, -1,
+ 203, -1, -1, -1, -1, -1, -1, -1, 204, 205,
+ -1, -1, -1, -1, -1, -1, 206, 207, -1, -1,
+ -1, 208, 209, -1, -1, 210, -1, -1, 211, -1,
+ 212, 213, 214, -1, -1, 215, -1, -1, -1, -1,
+ -1, -1, -1, 216, -1, 217, -1, -1, -1, -1,
+ 218, -1, -1, -1, 219, 220, -1, 221, -1, -1,
+ -1, -1, 222, -1, -1, 223, 224, -1, -1, 225,
+ 226, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 227, 228, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 229, -1, -1, -1, -1, -1, 230, 231, -1,
+ -1, -1, -1, 232, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 233, 234, -1, -1, 235, -1, -1, -1, -1,
+ 236, -1, -1, 237, -1, -1, 238, 239, -1, -1,
+ -1, 240, -1, -1, -1, -1, 241, -1, -1, 242,
+ 243, -1, -1, -1, -1, -1, -1, 244, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 245, 246, -1, -1, -1, 247, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 248, -1, -1,
+ -1, 249, -1, 250, -1, 251, -1, 252, 253, -1,
+ -1, 254, 255, -1, -1, -1, -1, -1, -1, -1,
+ 256, -1, -1, -1, -1, 257, -1, 258, 259, -1,
+ -1, 260, -1, -1, -1, 261, -1, -1, -1, -1,
+ 262, -1, -1, -1, -1, 263, 264, 265, -1, -1,
+ 266, -1, 267, -1, -1, 268, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 269, -1, 270, -1, 271,
+ -1, -1, -1, -1, -1, 272, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 273, 274,
+ 275, 276, -1, -1, -1, 277, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 278, -1, -1, -1, -1,
+ -1, 279, -1, -1, -1, -1, 280, 281, 282, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 283, -1,
+ 284, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 285, -1, 286, -1, -1, -1, 287, -1, -1, -1,
+ 288, -1, -1, -1, -1, 289, 290, 291, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 292, -1, 293, -1, 294, -1, -1, -1, -1,
+ 295, 296, -1, -1, -1, 297, -1, -1, -1, -1,
+ -1, -1, -1, 298, -1, -1, -1, 299, -1, -1,
+ -1, -1, 300, -1, 301, -1, 302, 303, 304, -1,
+ -1, -1, -1, -1, -1, 305, 306, -1, -1, -1,
+ 307, -1, -1, -1, -1, 308, -1, 309, -1, -1,
+ -1, -1, -1, -1, 310, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 311,
+ -1, -1, 312, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 313, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 314,
+ -1, 315, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 316, -1, -1, 317, -1, -1, -1,
+ -1, -1, -1, -1, 318, -1, -1, 319, -1, -1,
+ -1, 320, -1, 321, -1, -1, -1, 322, -1, -1,
+ -1, -1, -1, -1, -1, 323, 324, 325, -1, -1,
326, -1, -1, -1, -1, 327, -1, -1, -1, -1,
-1, 328, -1, -1, -1, -1, 329, -1, -1, -1,
-1, 330, -1, -1, -1, 331, -1, -1, -1, -1,
@@ -1639,136 +1641,135 @@ findValue (register const char *str, register unsigned int len)
-1, 417, -1, -1, -1, -1, 418, -1, 419, -1,
420, -1, -1, -1, -1, -1, 421, -1, -1, -1,
-1, 422, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 423, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 424, 425, -1, -1, -1,
- -1, -1, -1, -1, -1, 426, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 427, -1, 428, -1, -1, -1, -1, 429, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 430,
- 431, 432, -1, -1, -1, -1, -1, -1, -1, 433,
- 434, -1, 435, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 436, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 437, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 438, -1, 439, -1, -1, 440, 441, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 442, -1, -1,
- -1, -1, -1, 443, -1, -1, -1, -1, -1, -1,
- -1, -1, 444, -1, -1, -1, -1, -1, -1, -1,
- -1, 445, -1, -1, -1, 446, -1, 447, -1, -1,
- -1, -1, -1, -1, -1, 448, -1, 449, -1, -1,
- 450, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 451, -1, -1, -1, -1, -1, -1, 452,
- -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, 453, -1, -1, -1, 454, -1, 455, -1, -1,
- 456, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 457, -1, -1, -1, -1, -1, -1, -1, 458,
- -1, -1, 459, -1, -1, -1, 460, -1, -1, -1,
- -1, 461, -1, -1, 462, 463, -1, -1, -1, -1,
- -1, 464, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 465, -1, -1, -1, -1, 466, -1, -1,
- -1, -1, -1, 467, -1, -1, -1, -1, -1, -1,
- 468, -1, -1, -1, -1, 469, -1, -1, -1, -1,
- -1, -1, -1, -1, 470, 471, -1, -1, 472, 473,
- -1, -1, -1, 474, -1, -1, -1, 475, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 476, -1, -1,
- -1, -1, 477, -1, -1, -1, -1, 478, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 479, -1, 480, -1, -1,
- -1, -1, -1, -1, -1, -1, 481, 482, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 483, -1, 484, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 485, -1, -1, 486, -1, 487, -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, 488, 489, -1, -1, -1, -1,
- -1, -1, 490, -1, -1, -1, -1, -1, -1, -1,
- -1, 491, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 423, 424, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 425, 426, -1, -1, -1,
+ -1, -1, -1, -1, -1, 427, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 428, -1, 429, -1, -1, -1, -1, 430, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 431,
+ 432, 433, -1, -1, -1, -1, -1, -1, -1, 434,
+ 435, -1, 436, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 437, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 438, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 439, -1, 440, -1, -1, 441, 442, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 443, -1, -1,
+ -1, -1, -1, 444, -1, -1, -1, -1, -1, -1,
+ -1, -1, 445, -1, -1, -1, -1, -1, -1, -1,
+ -1, 446, -1, -1, -1, 447, -1, 448, -1, -1,
+ -1, -1, -1, -1, -1, 449, -1, 450, -1, -1,
+ 451, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 452, -1, -1, -1, -1, -1, -1, 453,
+ -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, 454, -1, -1, -1, 455, -1, 456, -1, -1,
+ 457, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 458, -1, -1, -1, -1, -1, -1, -1, 459,
+ -1, -1, 460, -1, -1, -1, 461, -1, -1, -1,
+ -1, 462, -1, -1, 463, 464, -1, -1, -1, -1,
+ -1, 465, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 466, -1, -1, -1, -1, 467, -1, -1,
+ -1, -1, -1, 468, -1, -1, -1, -1, -1, -1,
+ 469, -1, -1, -1, -1, 470, -1, -1, -1, -1,
+ -1, -1, -1, -1, 471, 472, -1, -1, 473, 474,
+ -1, -1, -1, 475, -1, -1, -1, 476, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 477, -1, -1,
+ -1, -1, 478, -1, -1, -1, -1, 479, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 480, -1, 481, -1, -1,
+ -1, -1, -1, -1, -1, -1, 482, 483, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 484, -1, 485, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 486, -1, -1, 487, -1, 488, -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, 489, 490, -1, -1, -1, -1,
+ -1, -1, 491, -1, -1, -1, -1, -1, -1, -1,
-1, 492, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 493, -1, -1,
+ -1, 493, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 494, -1, -1,
- -1, -1, -1, -1, -1, 495, -1, -1, -1, -1,
- -1, 496, 497, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 498, -1,
- 499, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 500, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 495, -1, -1,
+ -1, -1, -1, -1, -1, 496, -1, -1, -1, -1,
+ -1, 497, 498, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 499, -1,
+ 500, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 501, -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, 501, -1, -1, -1, -1, -1, -1,
- -1, -1, 502, -1, -1, 503, -1, -1, -1, -1,
- -1, -1, -1, 504, -1, -1, -1, -1, -1, -1,
- 505, 506, -1, -1, -1, -1, 507, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 508, 509, -1, -1, -1,
- -1, -1, -1, 510, -1, -1, -1, -1, 511, -1,
- -1, 512, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 502, -1, -1, -1, -1, -1, -1,
+ -1, -1, 503, -1, -1, 504, -1, -1, -1, -1,
+ -1, -1, -1, 505, -1, -1, -1, -1, -1, -1,
+ 506, 507, -1, -1, -1, -1, 508, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 513, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 514,
- -1, -1, -1, 515, -1, -1, -1, -1, 516, -1,
- 517, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 509, 510, -1, -1, -1,
+ -1, -1, -1, 511, -1, -1, -1, -1, 512, -1,
+ -1, 513, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 518, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 519, -1, -1,
+ -1, -1, 514, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 515,
+ -1, -1, -1, 516, -1, -1, -1, -1, 517, -1,
+ 518, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 520, -1, -1, -1, -1, -1, -1, -1, 521, -1,
- 522, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 523, -1, -1,
+ -1, 519, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 520, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 524,
+ 521, -1, -1, -1, -1, -1, -1, -1, 522, -1,
+ 523, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 524, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 525,
- -1, -1, -1, -1, -1, -1, 526, -1, -1, -1,
- -1, 527, -1, -1, -1, -1, 528, -1, -1, -1,
- -1, -1, 529, -1, -1, -1, -1, -1, -1, -1,
- -1, 530, -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, 526,
+ -1, -1, -1, -1, -1, -1, 527, -1, -1, -1,
+ -1, 528, -1, -1, -1, -1, 529, -1, -1, -1,
+ -1, -1, 530, -1, -1, -1, -1, -1, -1, -1,
-1, 531, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 532,
- -1, -1, 533, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 532, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 533,
+ -1, -1, 534, -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, 534, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 535, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 536, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 535, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 536, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 537, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 537, -1, -1, -1, 538, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 539, -1, -1,
- -1, 540, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 541, -1, -1, -1, -1, 542, -1, -1, -1, -1,
+ -1, -1, -1, 538, -1, -1, -1, 539, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 540, -1, -1,
+ -1, 541, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 543, -1, 544, -1, -1, -1, -1,
- 545, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 542, -1, -1, -1, -1, 543, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 546, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 547, -1,
+ -1, -1, -1, 544, -1, 545, -1, -1, -1, -1,
+ 546, -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, 547, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 548, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 548, -1, -1, 549, -1, -1, -1, -1,
- 550, -1, 551, -1, -1, -1, -1, 552, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 553, -1, -1, -1,
- -1, -1, 554, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 549, -1, -1, 550, -1, -1, -1, -1,
+ 551, -1, 552, -1, -1, -1, -1, 553, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 555, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 554, -1, -1, -1,
+ -1, -1, 555, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 556, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 556, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 557,
- -1, -1, 558, 559, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 557, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 558,
+ -1, -1, 559, 560, -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, 560, -1, -1, -1,
- -1, -1, -1, 561, -1, 562, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 561, -1, -1, -1,
+ -1, -1, -1, 562, -1, 563, -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,
@@ -1787,38 +1788,38 @@ findValue (register const char *str, register unsigned int len)
-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, 563, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 564, -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, 564, -1, -1, 565, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 565, -1, -1, 566, -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, 566, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 567, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 567, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 568, -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, 568, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 569, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 569, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 570, -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, 570, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 571, -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, 571, -1, -1, -1,
- -1, -1, 572, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 572, -1, -1, -1,
+ -1, -1, 573, -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,
@@ -1826,12 +1827,12 @@ findValue (register const char *str, register unsigned int len)
-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, 573, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 574, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 574, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 575, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 575, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 576, -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,
@@ -1847,58 +1848,59 @@ findValue (register const char *str, register unsigned int len)
-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, 576, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 577, -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, 577, -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, 578, -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, 578, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 579,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 579, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 580,
-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, 580, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 581, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 582, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 583, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 581, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 582, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 583, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 584, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 584, -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, 585, -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, 585, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 586, -1, -1, -1, -1, -1,
- -1, -1, 587, -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, 586, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 587, -1, -1, -1, -1, -1,
+ -1, -1, 588, -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, 588,
- -1, -1, 589, -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, 589,
+ -1, -1, 590, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 590, -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, 591, -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, 592, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 593, -1, -1, -1, -1, -1, -1, -1,
+ -1, 593, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 594, -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,
@@ -1907,37 +1909,37 @@ findValue (register const char *str, register unsigned int len)
-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, 594, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 595, -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, 595, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 596, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 596, -1, 597, -1, -1, -1, -1, 598,
- -1, -1, -1, -1, -1, -1, -1, 599, -1, -1,
+ -1, -1, 597, -1, 598, -1, -1, -1, -1, 599,
+ -1, -1, -1, -1, -1, -1, -1, 600, -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, 600, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 601, -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, 601, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 602, -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, 602, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 603, -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, 603, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 604, -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, 604, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 605, -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,
@@ -1959,14 +1961,14 @@ findValue (register const char *str, register unsigned int len)
-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, 605, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 606, -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, 606, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 607, -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,
@@ -1980,7 +1982,7 @@ findValue (register const char *str, register unsigned int len)
-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, 607, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 608, -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,
@@ -2023,7 +2025,7 @@ findValue (register const char *str, register unsigned int len)
-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, 608, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 609, -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,
@@ -2060,7 +2062,7 @@ findValue (register const char *str, register unsigned int len)
-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, 609, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 610, -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,
@@ -2074,7 +2076,7 @@ findValue (register const char *str, register unsigned int len)
-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, 610, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 611, -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,
@@ -2133,7 +2135,7 @@ findValue (register const char *str, register unsigned int len)
-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, 611, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 612, -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,
@@ -2157,7 +2159,7 @@ findValue (register const char *str, register unsigned int len)
-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, 612
+ -1, -1, -1, -1, -1, -1, -1, -1, 613
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -2179,7 +2181,7 @@ findValue (register const char *str, register unsigned int len)
}
return 0;
}
-#line 624 "CSSValueKeywords.gperf"
+#line 625 "CSSValueKeywords.gperf"
static const char * const valueList[] = {
"",
@@ -2635,10 +2637,11 @@ static const char * const valueList[] = {
"optimizelegibility",
"geometricprecision",
"srgb",
-"mini",
"floating",
-"application",
"fullscreen",
+"maximized",
+"minimized",
+"windowed",
"aliceblue",
"antiquewhite",
"aquamarine",
diff --git a/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h b/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h
index d79e658..71e8514 100644
--- a/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h
+++ b/src/3rdparty/webkit/WebCore/generated/CSSValueKeywords.h
@@ -456,168 +456,169 @@ const int CSSValueOptimizespeed = 449;
const int CSSValueOptimizelegibility = 450;
const int CSSValueGeometricprecision = 451;
const int CSSValueSrgb = 452;
-const int CSSValueMini = 453;
-const int CSSValueFloating = 454;
-const int CSSValueApplication = 455;
-const int CSSValueFullscreen = 456;
-const int CSSValueAliceblue = 457;
-const int CSSValueAntiquewhite = 458;
-const int CSSValueAquamarine = 459;
-const int CSSValueAzure = 460;
-const int CSSValueBeige = 461;
-const int CSSValueBisque = 462;
-const int CSSValueBlanchedalmond = 463;
-const int CSSValueBlueviolet = 464;
-const int CSSValueBrown = 465;
-const int CSSValueBurlywood = 466;
-const int CSSValueCadetblue = 467;
-const int CSSValueChartreuse = 468;
-const int CSSValueChocolate = 469;
-const int CSSValueCoral = 470;
-const int CSSValueCornflowerblue = 471;
-const int CSSValueCornsilk = 472;
-const int CSSValueCrimson = 473;
-const int CSSValueCyan = 474;
-const int CSSValueDarkblue = 475;
-const int CSSValueDarkcyan = 476;
-const int CSSValueDarkgoldenrod = 477;
-const int CSSValueDarkgray = 478;
-const int CSSValueDarkgreen = 479;
-const int CSSValueDarkgrey = 480;
-const int CSSValueDarkkhaki = 481;
-const int CSSValueDarkmagenta = 482;
-const int CSSValueDarkolivegreen = 483;
-const int CSSValueDarkorange = 484;
-const int CSSValueDarkorchid = 485;
-const int CSSValueDarkred = 486;
-const int CSSValueDarksalmon = 487;
-const int CSSValueDarkseagreen = 488;
-const int CSSValueDarkslateblue = 489;
-const int CSSValueDarkslategray = 490;
-const int CSSValueDarkslategrey = 491;
-const int CSSValueDarkturquoise = 492;
-const int CSSValueDarkviolet = 493;
-const int CSSValueDeeppink = 494;
-const int CSSValueDeepskyblue = 495;
-const int CSSValueDimgray = 496;
-const int CSSValueDimgrey = 497;
-const int CSSValueDodgerblue = 498;
-const int CSSValueFirebrick = 499;
-const int CSSValueFloralwhite = 500;
-const int CSSValueForestgreen = 501;
-const int CSSValueGainsboro = 502;
-const int CSSValueGhostwhite = 503;
-const int CSSValueGold = 504;
-const int CSSValueGoldenrod = 505;
-const int CSSValueGreenyellow = 506;
-const int CSSValueHoneydew = 507;
-const int CSSValueHotpink = 508;
-const int CSSValueIndianred = 509;
-const int CSSValueIndigo = 510;
-const int CSSValueIvory = 511;
-const int CSSValueKhaki = 512;
-const int CSSValueLavender = 513;
-const int CSSValueLavenderblush = 514;
-const int CSSValueLawngreen = 515;
-const int CSSValueLemonchiffon = 516;
-const int CSSValueLightblue = 517;
-const int CSSValueLightcoral = 518;
-const int CSSValueLightcyan = 519;
-const int CSSValueLightgoldenrodyellow = 520;
-const int CSSValueLightgray = 521;
-const int CSSValueLightgreen = 522;
-const int CSSValueLightgrey = 523;
-const int CSSValueLightpink = 524;
-const int CSSValueLightsalmon = 525;
-const int CSSValueLightseagreen = 526;
-const int CSSValueLightskyblue = 527;
-const int CSSValueLightslategray = 528;
-const int CSSValueLightslategrey = 529;
-const int CSSValueLightsteelblue = 530;
-const int CSSValueLightyellow = 531;
-const int CSSValueLimegreen = 532;
-const int CSSValueLinen = 533;
-const int CSSValueMagenta = 534;
-const int CSSValueMediumaquamarine = 535;
-const int CSSValueMediumblue = 536;
-const int CSSValueMediumorchid = 537;
-const int CSSValueMediumpurple = 538;
-const int CSSValueMediumseagreen = 539;
-const int CSSValueMediumslateblue = 540;
-const int CSSValueMediumspringgreen = 541;
-const int CSSValueMediumturquoise = 542;
-const int CSSValueMediumvioletred = 543;
-const int CSSValueMidnightblue = 544;
-const int CSSValueMintcream = 545;
-const int CSSValueMistyrose = 546;
-const int CSSValueMoccasin = 547;
-const int CSSValueNavajowhite = 548;
-const int CSSValueOldlace = 549;
-const int CSSValueOlivedrab = 550;
-const int CSSValueOrangered = 551;
-const int CSSValueOrchid = 552;
-const int CSSValuePalegoldenrod = 553;
-const int CSSValuePalegreen = 554;
-const int CSSValuePaleturquoise = 555;
-const int CSSValuePalevioletred = 556;
-const int CSSValuePapayawhip = 557;
-const int CSSValuePeachpuff = 558;
-const int CSSValuePeru = 559;
-const int CSSValuePink = 560;
-const int CSSValuePlum = 561;
-const int CSSValuePowderblue = 562;
-const int CSSValueRosybrown = 563;
-const int CSSValueRoyalblue = 564;
-const int CSSValueSaddlebrown = 565;
-const int CSSValueSalmon = 566;
-const int CSSValueSandybrown = 567;
-const int CSSValueSeagreen = 568;
-const int CSSValueSeashell = 569;
-const int CSSValueSienna = 570;
-const int CSSValueSkyblue = 571;
-const int CSSValueSlateblue = 572;
-const int CSSValueSlategray = 573;
-const int CSSValueSlategrey = 574;
-const int CSSValueSnow = 575;
-const int CSSValueSpringgreen = 576;
-const int CSSValueSteelblue = 577;
-const int CSSValueTan = 578;
-const int CSSValueThistle = 579;
-const int CSSValueTomato = 580;
-const int CSSValueTurquoise = 581;
-const int CSSValueViolet = 582;
-const int CSSValueWheat = 583;
-const int CSSValueWhitesmoke = 584;
-const int CSSValueYellowgreen = 585;
-const int CSSValueNonzero = 586;
-const int CSSValueEvenodd = 587;
-const int CSSValueAccumulate = 588;
-const int CSSValueNew = 589;
-const int CSSValueLinearrgb = 590;
-const int CSSValueOptimizequality = 591;
-const int CSSValueCrispedges = 592;
-const int CSSValueButt = 593;
-const int CSSValueMiter = 594;
-const int CSSValueBevel = 595;
-const int CSSValueBeforeEdge = 596;
-const int CSSValueAfterEdge = 597;
-const int CSSValueCentral = 598;
-const int CSSValueTextBeforeEdge = 599;
-const int CSSValueTextAfterEdge = 600;
-const int CSSValueIdeographic = 601;
-const int CSSValueAlphabetic = 602;
-const int CSSValueHanging = 603;
-const int CSSValueMathematical = 604;
-const int CSSValueUseScript = 605;
-const int CSSValueNoChange = 606;
-const int CSSValueResetSize = 607;
-const int CSSValueLrTb = 608;
-const int CSSValueRlTb = 609;
-const int CSSValueTbRl = 610;
-const int CSSValueLr = 611;
-const int CSSValueRl = 612;
-const int CSSValueTb = 613;
-const int numCSSValueKeywords = 614;
+const int CSSValueFloating = 453;
+const int CSSValueFullscreen = 454;
+const int CSSValueMaximized = 455;
+const int CSSValueMinimized = 456;
+const int CSSValueWindowed = 457;
+const int CSSValueAliceblue = 458;
+const int CSSValueAntiquewhite = 459;
+const int CSSValueAquamarine = 460;
+const int CSSValueAzure = 461;
+const int CSSValueBeige = 462;
+const int CSSValueBisque = 463;
+const int CSSValueBlanchedalmond = 464;
+const int CSSValueBlueviolet = 465;
+const int CSSValueBrown = 466;
+const int CSSValueBurlywood = 467;
+const int CSSValueCadetblue = 468;
+const int CSSValueChartreuse = 469;
+const int CSSValueChocolate = 470;
+const int CSSValueCoral = 471;
+const int CSSValueCornflowerblue = 472;
+const int CSSValueCornsilk = 473;
+const int CSSValueCrimson = 474;
+const int CSSValueCyan = 475;
+const int CSSValueDarkblue = 476;
+const int CSSValueDarkcyan = 477;
+const int CSSValueDarkgoldenrod = 478;
+const int CSSValueDarkgray = 479;
+const int CSSValueDarkgreen = 480;
+const int CSSValueDarkgrey = 481;
+const int CSSValueDarkkhaki = 482;
+const int CSSValueDarkmagenta = 483;
+const int CSSValueDarkolivegreen = 484;
+const int CSSValueDarkorange = 485;
+const int CSSValueDarkorchid = 486;
+const int CSSValueDarkred = 487;
+const int CSSValueDarksalmon = 488;
+const int CSSValueDarkseagreen = 489;
+const int CSSValueDarkslateblue = 490;
+const int CSSValueDarkslategray = 491;
+const int CSSValueDarkslategrey = 492;
+const int CSSValueDarkturquoise = 493;
+const int CSSValueDarkviolet = 494;
+const int CSSValueDeeppink = 495;
+const int CSSValueDeepskyblue = 496;
+const int CSSValueDimgray = 497;
+const int CSSValueDimgrey = 498;
+const int CSSValueDodgerblue = 499;
+const int CSSValueFirebrick = 500;
+const int CSSValueFloralwhite = 501;
+const int CSSValueForestgreen = 502;
+const int CSSValueGainsboro = 503;
+const int CSSValueGhostwhite = 504;
+const int CSSValueGold = 505;
+const int CSSValueGoldenrod = 506;
+const int CSSValueGreenyellow = 507;
+const int CSSValueHoneydew = 508;
+const int CSSValueHotpink = 509;
+const int CSSValueIndianred = 510;
+const int CSSValueIndigo = 511;
+const int CSSValueIvory = 512;
+const int CSSValueKhaki = 513;
+const int CSSValueLavender = 514;
+const int CSSValueLavenderblush = 515;
+const int CSSValueLawngreen = 516;
+const int CSSValueLemonchiffon = 517;
+const int CSSValueLightblue = 518;
+const int CSSValueLightcoral = 519;
+const int CSSValueLightcyan = 520;
+const int CSSValueLightgoldenrodyellow = 521;
+const int CSSValueLightgray = 522;
+const int CSSValueLightgreen = 523;
+const int CSSValueLightgrey = 524;
+const int CSSValueLightpink = 525;
+const int CSSValueLightsalmon = 526;
+const int CSSValueLightseagreen = 527;
+const int CSSValueLightskyblue = 528;
+const int CSSValueLightslategray = 529;
+const int CSSValueLightslategrey = 530;
+const int CSSValueLightsteelblue = 531;
+const int CSSValueLightyellow = 532;
+const int CSSValueLimegreen = 533;
+const int CSSValueLinen = 534;
+const int CSSValueMagenta = 535;
+const int CSSValueMediumaquamarine = 536;
+const int CSSValueMediumblue = 537;
+const int CSSValueMediumorchid = 538;
+const int CSSValueMediumpurple = 539;
+const int CSSValueMediumseagreen = 540;
+const int CSSValueMediumslateblue = 541;
+const int CSSValueMediumspringgreen = 542;
+const int CSSValueMediumturquoise = 543;
+const int CSSValueMediumvioletred = 544;
+const int CSSValueMidnightblue = 545;
+const int CSSValueMintcream = 546;
+const int CSSValueMistyrose = 547;
+const int CSSValueMoccasin = 548;
+const int CSSValueNavajowhite = 549;
+const int CSSValueOldlace = 550;
+const int CSSValueOlivedrab = 551;
+const int CSSValueOrangered = 552;
+const int CSSValueOrchid = 553;
+const int CSSValuePalegoldenrod = 554;
+const int CSSValuePalegreen = 555;
+const int CSSValuePaleturquoise = 556;
+const int CSSValuePalevioletred = 557;
+const int CSSValuePapayawhip = 558;
+const int CSSValuePeachpuff = 559;
+const int CSSValuePeru = 560;
+const int CSSValuePink = 561;
+const int CSSValuePlum = 562;
+const int CSSValuePowderblue = 563;
+const int CSSValueRosybrown = 564;
+const int CSSValueRoyalblue = 565;
+const int CSSValueSaddlebrown = 566;
+const int CSSValueSalmon = 567;
+const int CSSValueSandybrown = 568;
+const int CSSValueSeagreen = 569;
+const int CSSValueSeashell = 570;
+const int CSSValueSienna = 571;
+const int CSSValueSkyblue = 572;
+const int CSSValueSlateblue = 573;
+const int CSSValueSlategray = 574;
+const int CSSValueSlategrey = 575;
+const int CSSValueSnow = 576;
+const int CSSValueSpringgreen = 577;
+const int CSSValueSteelblue = 578;
+const int CSSValueTan = 579;
+const int CSSValueThistle = 580;
+const int CSSValueTomato = 581;
+const int CSSValueTurquoise = 582;
+const int CSSValueViolet = 583;
+const int CSSValueWheat = 584;
+const int CSSValueWhitesmoke = 585;
+const int CSSValueYellowgreen = 586;
+const int CSSValueNonzero = 587;
+const int CSSValueEvenodd = 588;
+const int CSSValueAccumulate = 589;
+const int CSSValueNew = 590;
+const int CSSValueLinearrgb = 591;
+const int CSSValueOptimizequality = 592;
+const int CSSValueCrispedges = 593;
+const int CSSValueButt = 594;
+const int CSSValueMiter = 595;
+const int CSSValueBevel = 596;
+const int CSSValueBeforeEdge = 597;
+const int CSSValueAfterEdge = 598;
+const int CSSValueCentral = 599;
+const int CSSValueTextBeforeEdge = 600;
+const int CSSValueTextAfterEdge = 601;
+const int CSSValueIdeographic = 602;
+const int CSSValueAlphabetic = 603;
+const int CSSValueHanging = 604;
+const int CSSValueMathematical = 605;
+const int CSSValueUseScript = 606;
+const int CSSValueNoChange = 607;
+const int CSSValueResetSize = 608;
+const int CSSValueLrTb = 609;
+const int CSSValueRlTb = 610;
+const int CSSValueTbRl = 611;
+const int CSSValueLr = 612;
+const int CSSValueRl = 613;
+const int CSSValueTb = 614;
+const int numCSSValueKeywords = 615;
const size_t maxCSSValueKeywordLength = 35;
const char* getValueName(unsigned short id);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
index 04238bc..11dfd2e 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
@@ -152,7 +152,6 @@
#include "JSHTMLVideoElement.h"
#include "JSImageData.h"
#include "JSKeyboardEvent.h"
-#include "JSMedia.h"
#include "JSMediaError.h"
#include "JSMediaList.h"
#include "JSMessageChannel.h"
@@ -299,6 +298,7 @@
#include "JSSharedWorker.h"
#include "JSStorage.h"
#include "JSStorageEvent.h"
+#include "JSStyleMedia.h"
#include "JSStyleSheet.h"
#include "JSStyleSheetList.h"
#include "JSText.h"
@@ -334,11 +334,11 @@
#include "JSXPathResult.h"
#include "JSXSLTProcessor.h"
#include "KURL.h"
-#include "Media.h"
#include "Navigator.h"
#include "RegisteredEventListener.h"
#include "Screen.h"
#include "Storage.h"
+#include "StyleMedia.h"
#include "WebKitPoint.h"
#include <runtime/Error.h>
#include <runtime/JSNumberCell.h>
@@ -395,7 +395,7 @@ static const HashTableValue JSDOMWindowTableValues[409] =
{ "parent", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowParent), (intptr_t)setJSDOMWindowParent },
{ "top", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowTop), (intptr_t)setJSDOMWindowTop },
{ "document", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowDocument), (intptr_t)0 },
- { "media", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowMedia), (intptr_t)0 },
+ { "styleMedia", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowStyleMedia), (intptr_t)0 },
{ "devicePixelRatio", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowDevicePixelRatio), (intptr_t)setJSDOMWindowDevicePixelRatio },
{ "applicationCache", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowApplicationCache), (intptr_t)0 },
{ "sessionStorage", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDOMWindowSessionStorage), (intptr_t)0 },
@@ -1304,14 +1304,14 @@ JSValue jsDOMWindowDocument(ExecState* exec, JSValue slotBase, const Identifier&
return result;
}
-JSValue jsDOMWindowMedia(ExecState* exec, JSValue slotBase, const Identifier&)
+JSValue jsDOMWindowStyleMedia(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSDOMWindow* castedThis = static_cast<JSDOMWindow*>(asObject(slotBase));
if (!castedThis->allowsAccessFrom(exec))
return jsUndefined();
UNUSED_PARAM(exec);
DOMWindow* imp = static_cast<DOMWindow*>(castedThis->impl());
- JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->media()));
+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->styleMedia()));
return result;
}
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
index a6f3253..7e50556 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSDOMWindow.h
@@ -231,7 +231,7 @@ void setJSDOMWindowParent(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowTop(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
void setJSDOMWindowTop(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowDocument(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
-JSC::JSValue jsDOMWindowMedia(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsDOMWindowStyleMedia(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
JSC::JSValue jsDOMWindowDevicePixelRatio(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
void setJSDOMWindowDevicePixelRatio(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDOMWindowApplicationCache(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSMedia.cpp b/src/3rdparty/webkit/WebCore/generated/JSMedia.cpp
deleted file mode 100644
index 1579c2b..0000000
--- a/src/3rdparty/webkit/WebCore/generated/JSMedia.cpp
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- This file is part of the WebKit open source project.
- This file has been generated by generate-bindings.pl. DO NOT MODIFY!
-
- 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.
-*/
-
-#include "config.h"
-#include "JSMedia.h"
-
-#include "KURL.h"
-#include "Media.h"
-#include <runtime/Error.h>
-#include <runtime/JSString.h>
-#include <wtf/GetPtr.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-ASSERT_CLASS_FITS_IN_CELL(JSMedia);
-
-/* Hash table */
-
-static const HashTableValue JSMediaTableValues[3] =
-{
- { "type", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMediaType), (intptr_t)0 },
- { "constructor", DontEnum|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsMediaConstructor), (intptr_t)0 },
- { 0, 0, 0, 0 }
-};
-
-static JSC_CONST_HASHTABLE HashTable JSMediaTable =
-#if ENABLE(PERFECT_HASH_SIZE)
- { 3, JSMediaTableValues, 0 };
-#else
- { 4, 3, JSMediaTableValues, 0 };
-#endif
-
-/* Hash table for constructor */
-
-static const HashTableValue JSMediaConstructorTableValues[1] =
-{
- { 0, 0, 0, 0 }
-};
-
-static JSC_CONST_HASHTABLE HashTable JSMediaConstructorTable =
-#if ENABLE(PERFECT_HASH_SIZE)
- { 0, JSMediaConstructorTableValues, 0 };
-#else
- { 1, 0, JSMediaConstructorTableValues, 0 };
-#endif
-
-class JSMediaConstructor : public DOMConstructorObject {
-public:
- JSMediaConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
- : DOMConstructorObject(JSMediaConstructor::createStructure(globalObject->objectPrototype()), globalObject)
- {
- putDirect(exec->propertyNames().prototype, JSMediaPrototype::self(exec, globalObject), None);
- }
- virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
- virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
- virtual const ClassInfo* classInfo() const { return &s_info; }
- static const ClassInfo s_info;
-
- static PassRefPtr<Structure> createStructure(JSValue proto)
- {
- return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
- }
-
-protected:
- static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | DOMConstructorObject::StructureFlags;
-};
-
-const ClassInfo JSMediaConstructor::s_info = { "MediaConstructor", 0, &JSMediaConstructorTable, 0 };
-
-bool JSMediaConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
-{
- return getStaticValueSlot<JSMediaConstructor, DOMObject>(exec, &JSMediaConstructorTable, this, propertyName, slot);
-}
-
-bool JSMediaConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
-{
- return getStaticValueDescriptor<JSMediaConstructor, DOMObject>(exec, &JSMediaConstructorTable, this, propertyName, descriptor);
-}
-
-/* Hash table for prototype */
-
-static const HashTableValue JSMediaPrototypeTableValues[2] =
-{
- { "matchMedium", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsMediaPrototypeFunctionMatchMedium), (intptr_t)1 },
- { 0, 0, 0, 0 }
-};
-
-static JSC_CONST_HASHTABLE HashTable JSMediaPrototypeTable =
-#if ENABLE(PERFECT_HASH_SIZE)
- { 0, JSMediaPrototypeTableValues, 0 };
-#else
- { 2, 1, JSMediaPrototypeTableValues, 0 };
-#endif
-
-const ClassInfo JSMediaPrototype::s_info = { "MediaPrototype", 0, &JSMediaPrototypeTable, 0 };
-
-JSObject* JSMediaPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSMedia>(exec, globalObject);
-}
-
-bool JSMediaPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
-{
- return getStaticFunctionSlot<JSObject>(exec, &JSMediaPrototypeTable, this, propertyName, slot);
-}
-
-bool JSMediaPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
-{
- return getStaticFunctionDescriptor<JSObject>(exec, &JSMediaPrototypeTable, this, propertyName, descriptor);
-}
-
-const ClassInfo JSMedia::s_info = { "Media", 0, &JSMediaTable, 0 };
-
-JSMedia::JSMedia(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Media> impl)
- : DOMObjectWithGlobalPointer(structure, globalObject)
- , m_impl(impl)
-{
-}
-
-JSMedia::~JSMedia()
-{
- forgetDOMObject(this, impl());
-}
-
-JSObject* JSMedia::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
-{
- return new (exec) JSMediaPrototype(JSMediaPrototype::createStructure(globalObject->objectPrototype()));
-}
-
-bool JSMedia::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
-{
- return getStaticValueSlot<JSMedia, Base>(exec, &JSMediaTable, this, propertyName, slot);
-}
-
-bool JSMedia::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
-{
- return getStaticValueDescriptor<JSMedia, Base>(exec, &JSMediaTable, this, propertyName, descriptor);
-}
-
-JSValue jsMediaType(ExecState* exec, JSValue slotBase, const Identifier&)
-{
- JSMedia* castedThis = static_cast<JSMedia*>(asObject(slotBase));
- UNUSED_PARAM(exec);
- Media* imp = static_cast<Media*>(castedThis->impl());
- JSValue result = jsString(exec, imp->type());
- return result;
-}
-
-JSValue jsMediaConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
-{
- JSMedia* domObject = static_cast<JSMedia*>(asObject(slotBase));
- return JSMedia::getConstructor(exec, domObject->globalObject());
-}
-JSValue JSMedia::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
-{
- return getDOMConstructor<JSMediaConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
-}
-
-JSValue JSC_HOST_CALL jsMediaPrototypeFunctionMatchMedium(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
-{
- UNUSED_PARAM(args);
- if (!thisValue.inherits(&JSMedia::s_info))
- return throwError(exec, TypeError);
- JSMedia* castedThisObj = static_cast<JSMedia*>(asObject(thisValue));
- Media* imp = static_cast<Media*>(castedThisObj->impl());
- const UString& mediaquery = args.at(0).toString(exec);
-
-
- JSC::JSValue result = jsBoolean(imp->matchMedium(mediaquery));
- return result;
-}
-
-JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Media* object)
-{
- return getDOMObjectWrapper<JSMedia>(exec, globalObject, object);
-}
-Media* toMedia(JSC::JSValue value)
-{
- return value.inherits(&JSMedia::s_info) ? static_cast<JSMedia*>(asObject(value))->impl() : 0;
-}
-
-}
diff --git a/src/3rdparty/webkit/WebCore/generated/JSMedia.h b/src/3rdparty/webkit/WebCore/generated/JSMedia.h
deleted file mode 100644
index 28515c9..0000000
--- a/src/3rdparty/webkit/WebCore/generated/JSMedia.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- This file is part of the WebKit open source project.
- This file has been generated by generate-bindings.pl. DO NOT MODIFY!
-
- 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.
-*/
-
-#ifndef JSMedia_h
-#define JSMedia_h
-
-#include "JSDOMBinding.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/ObjectPrototype.h>
-
-namespace WebCore {
-
-class Media;
-
-class JSMedia : public DOMObjectWithGlobalPointer {
- typedef DOMObjectWithGlobalPointer Base;
-public:
- JSMedia(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<Media>);
- virtual ~JSMedia();
- static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
- virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
- virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
- virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
- static const JSC::ClassInfo s_info;
-
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
- {
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
- }
-
- static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
- Media* impl() const { return m_impl.get(); }
-
-private:
- RefPtr<Media> m_impl;
-protected:
- static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
-};
-
-JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Media*);
-Media* toMedia(JSC::JSValue);
-
-class JSMediaPrototype : public JSC::JSObject {
- typedef JSC::JSObject Base;
-public:
- static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
- virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
- static const JSC::ClassInfo s_info;
- virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
- virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
- static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
- {
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
- }
- JSMediaPrototype(NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { }
-protected:
- static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
-};
-
-// Functions
-
-JSC::JSValue JSC_HOST_CALL jsMediaPrototypeFunctionMatchMedium(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
-// Attributes
-
-JSC::JSValue jsMediaType(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
-JSC::JSValue jsMediaConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
-
-} // namespace WebCore
-
-#endif
diff --git a/src/3rdparty/webkit/WebCore/generated/JSStyleMedia.cpp b/src/3rdparty/webkit/WebCore/generated/JSStyleMedia.cpp
new file mode 100644
index 0000000..b06bf09
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/generated/JSStyleMedia.cpp
@@ -0,0 +1,201 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ 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.
+*/
+
+#include "config.h"
+#include "JSStyleMedia.h"
+
+#include "KURL.h"
+#include "StyleMedia.h"
+#include <runtime/Error.h>
+#include <runtime/JSString.h>
+#include <wtf/GetPtr.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+ASSERT_CLASS_FITS_IN_CELL(JSStyleMedia);
+
+/* Hash table */
+
+static const HashTableValue JSStyleMediaTableValues[3] =
+{
+ { "type", DontDelete|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsStyleMediaType), (intptr_t)0 },
+ { "constructor", DontEnum|ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsStyleMediaConstructor), (intptr_t)0 },
+ { 0, 0, 0, 0 }
+};
+
+static JSC_CONST_HASHTABLE HashTable JSStyleMediaTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 3, JSStyleMediaTableValues, 0 };
+#else
+ { 4, 3, JSStyleMediaTableValues, 0 };
+#endif
+
+/* Hash table for constructor */
+
+static const HashTableValue JSStyleMediaConstructorTableValues[1] =
+{
+ { 0, 0, 0, 0 }
+};
+
+static JSC_CONST_HASHTABLE HashTable JSStyleMediaConstructorTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 0, JSStyleMediaConstructorTableValues, 0 };
+#else
+ { 1, 0, JSStyleMediaConstructorTableValues, 0 };
+#endif
+
+class JSStyleMediaConstructor : public DOMConstructorObject {
+public:
+ JSStyleMediaConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
+ : DOMConstructorObject(JSStyleMediaConstructor::createStructure(globalObject->objectPrototype()), globalObject)
+ {
+ putDirect(exec->propertyNames().prototype, JSStyleMediaPrototype::self(exec, globalObject), None);
+ }
+ virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
+ virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
+ virtual const ClassInfo* classInfo() const { return &s_info; }
+ static const ClassInfo s_info;
+
+ static PassRefPtr<Structure> createStructure(JSValue proto)
+ {
+ return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount);
+ }
+
+protected:
+ static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | DOMConstructorObject::StructureFlags;
+};
+
+const ClassInfo JSStyleMediaConstructor::s_info = { "StyleMediaConstructor", 0, &JSStyleMediaConstructorTable, 0 };
+
+bool JSStyleMediaConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+ return getStaticValueSlot<JSStyleMediaConstructor, DOMObject>(exec, &JSStyleMediaConstructorTable, this, propertyName, slot);
+}
+
+bool JSStyleMediaConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ return getStaticValueDescriptor<JSStyleMediaConstructor, DOMObject>(exec, &JSStyleMediaConstructorTable, this, propertyName, descriptor);
+}
+
+/* Hash table for prototype */
+
+static const HashTableValue JSStyleMediaPrototypeTableValues[2] =
+{
+ { "matchMedium", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsStyleMediaPrototypeFunctionMatchMedium), (intptr_t)1 },
+ { 0, 0, 0, 0 }
+};
+
+static JSC_CONST_HASHTABLE HashTable JSStyleMediaPrototypeTable =
+#if ENABLE(PERFECT_HASH_SIZE)
+ { 0, JSStyleMediaPrototypeTableValues, 0 };
+#else
+ { 2, 1, JSStyleMediaPrototypeTableValues, 0 };
+#endif
+
+const ClassInfo JSStyleMediaPrototype::s_info = { "StyleMediaPrototype", 0, &JSStyleMediaPrototypeTable, 0 };
+
+JSObject* JSStyleMediaPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSStyleMedia>(exec, globalObject);
+}
+
+bool JSStyleMediaPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+ return getStaticFunctionSlot<JSObject>(exec, &JSStyleMediaPrototypeTable, this, propertyName, slot);
+}
+
+bool JSStyleMediaPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ return getStaticFunctionDescriptor<JSObject>(exec, &JSStyleMediaPrototypeTable, this, propertyName, descriptor);
+}
+
+const ClassInfo JSStyleMedia::s_info = { "StyleMedia", 0, &JSStyleMediaTable, 0 };
+
+JSStyleMedia::JSStyleMedia(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<StyleMedia> impl)
+ : DOMObjectWithGlobalPointer(structure, globalObject)
+ , m_impl(impl)
+{
+}
+
+JSStyleMedia::~JSStyleMedia()
+{
+ forgetDOMObject(this, impl());
+}
+
+JSObject* JSStyleMedia::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
+{
+ return new (exec) JSStyleMediaPrototype(JSStyleMediaPrototype::createStructure(globalObject->objectPrototype()));
+}
+
+bool JSStyleMedia::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
+{
+ return getStaticValueSlot<JSStyleMedia, Base>(exec, &JSStyleMediaTable, this, propertyName, slot);
+}
+
+bool JSStyleMedia::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
+{
+ return getStaticValueDescriptor<JSStyleMedia, Base>(exec, &JSStyleMediaTable, this, propertyName, descriptor);
+}
+
+JSValue jsStyleMediaType(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSStyleMedia* castedThis = static_cast<JSStyleMedia*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ StyleMedia* imp = static_cast<StyleMedia*>(castedThis->impl());
+ JSValue result = jsString(exec, imp->type());
+ return result;
+}
+
+JSValue jsStyleMediaConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSStyleMedia* domObject = static_cast<JSStyleMedia*>(asObject(slotBase));
+ return JSStyleMedia::getConstructor(exec, domObject->globalObject());
+}
+JSValue JSStyleMedia::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
+{
+ return getDOMConstructor<JSStyleMediaConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
+}
+
+JSValue JSC_HOST_CALL jsStyleMediaPrototypeFunctionMatchMedium(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSStyleMedia::s_info))
+ return throwError(exec, TypeError);
+ JSStyleMedia* castedThisObj = static_cast<JSStyleMedia*>(asObject(thisValue));
+ StyleMedia* imp = static_cast<StyleMedia*>(castedThisObj->impl());
+ const UString& mediaquery = args.at(0).toString(exec);
+
+
+ JSC::JSValue result = jsBoolean(imp->matchMedium(mediaquery));
+ return result;
+}
+
+JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, StyleMedia* object)
+{
+ return getDOMObjectWrapper<JSStyleMedia>(exec, globalObject, object);
+}
+StyleMedia* toStyleMedia(JSC::JSValue value)
+{
+ return value.inherits(&JSStyleMedia::s_info) ? static_cast<JSStyleMedia*>(asObject(value))->impl() : 0;
+}
+
+}
diff --git a/src/3rdparty/webkit/WebCore/generated/JSStyleMedia.h b/src/3rdparty/webkit/WebCore/generated/JSStyleMedia.h
new file mode 100644
index 0000000..12601d5
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/generated/JSStyleMedia.h
@@ -0,0 +1,87 @@
+/*
+ This file is part of the WebKit open source project.
+ This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+ 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.
+*/
+
+#ifndef JSStyleMedia_h
+#define JSStyleMedia_h
+
+#include "JSDOMBinding.h"
+#include <runtime/JSGlobalObject.h>
+#include <runtime/ObjectPrototype.h>
+
+namespace WebCore {
+
+class StyleMedia;
+
+class JSStyleMedia : public DOMObjectWithGlobalPointer {
+ typedef DOMObjectWithGlobalPointer Base;
+public:
+ JSStyleMedia(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<StyleMedia>);
+ virtual ~JSStyleMedia();
+ static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
+ virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
+ virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
+ virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
+ static const JSC::ClassInfo s_info;
+
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
+ }
+
+ static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
+ StyleMedia* impl() const { return m_impl.get(); }
+
+private:
+ RefPtr<StyleMedia> m_impl;
+protected:
+ static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
+};
+
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, StyleMedia*);
+StyleMedia* toStyleMedia(JSC::JSValue);
+
+class JSStyleMediaPrototype : public JSC::JSObject {
+ typedef JSC::JSObject Base;
+public:
+ static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
+ virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
+ static const JSC::ClassInfo s_info;
+ virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
+ virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
+ }
+ JSStyleMediaPrototype(NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { }
+protected:
+ static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
+};
+
+// Functions
+
+JSC::JSValue JSC_HOST_CALL jsStyleMediaPrototypeFunctionMatchMedium(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+// Attributes
+
+JSC::JSValue jsStyleMediaType(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+JSC::JSValue jsStyleMediaConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+
+} // namespace WebCore
+
+#endif
diff --git a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index 8add19c..398e4d8 100644
--- a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -209,7 +209,7 @@ float CanvasRenderingContext2D::lineWidth() const
void CanvasRenderingContext2D::setLineWidth(float width)
{
- if (!(width > 0))
+ if (!(isfinite(width) && width > 0))
return;
state().m_lineWidth = width;
GraphicsContext* c = drawingContext();
@@ -259,7 +259,7 @@ float CanvasRenderingContext2D::miterLimit() const
void CanvasRenderingContext2D::setMiterLimit(float limit)
{
- if (!(limit > 0))
+ if (!(isfinite(limit) && limit > 0))
return;
state().m_miterLimit = limit;
GraphicsContext* c = drawingContext();
@@ -275,6 +275,8 @@ float CanvasRenderingContext2D::shadowOffsetX() const
void CanvasRenderingContext2D::setShadowOffsetX(float x)
{
+ if (!isfinite(x))
+ return;
state().m_shadowOffset.setWidth(x);
applyShadow();
}
@@ -286,6 +288,8 @@ float CanvasRenderingContext2D::shadowOffsetY() const
void CanvasRenderingContext2D::setShadowOffsetY(float y)
{
+ if (!isfinite(y))
+ return;
state().m_shadowOffset.setHeight(y);
applyShadow();
}
@@ -297,6 +301,8 @@ float CanvasRenderingContext2D::shadowBlur() const
void CanvasRenderingContext2D::setShadowBlur(float blur)
{
+ if (!(isfinite(blur) && blur >= 0))
+ return;
state().m_shadowBlur = blur;
applyShadow();
}
@@ -867,8 +873,6 @@ void CanvasRenderingContext2D::setShadow(float width, float height, float blur,
return;
RGBA32 rgba = makeRGBA32FromFloats(r, g, b, a); // default is transparent black
- if (!state().m_shadowColor.isEmpty())
- CSSParser::parseColor(rgba, state().m_shadowColor);
c->setShadow(IntSize(width, -height), state().m_shadowBlur, Color(rgba), DeviceColorSpace);
}
diff --git a/src/3rdparty/webkit/WebCore/page/AbstractView.idl b/src/3rdparty/webkit/WebCore/page/AbstractView.idl
index 290bf48..e4ece0f 100644
--- a/src/3rdparty/webkit/WebCore/page/AbstractView.idl
+++ b/src/3rdparty/webkit/WebCore/page/AbstractView.idl
@@ -32,7 +32,7 @@ module views {
OmitConstructor
] AbstractView {
readonly attribute Document document;
- readonly attribute Media media;
+ readonly attribute Media styleMedia;
};
}
diff --git a/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp b/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp
index dd90200..8dcff5c 100644
--- a/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp
+++ b/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp
@@ -57,7 +57,7 @@
#include "InspectorController.h"
#include "InspectorTimelineAgent.h"
#include "Location.h"
-#include "Media.h"
+#include "StyleMedia.h"
#include "MessageEvent.h"
#include "Navigator.h"
#include "NotificationCenter.h"
@@ -1112,10 +1112,10 @@ Document* DOMWindow::document() const
return m_frame->document();
}
-PassRefPtr<Media> DOMWindow::media() const
+PassRefPtr<StyleMedia> DOMWindow::styleMedia() const
{
if (!m_media)
- m_media = Media::create(m_frame);
+ m_media = StyleMedia::create(m_frame);
return m_media.get();
}
diff --git a/src/3rdparty/webkit/WebCore/page/DOMWindow.h b/src/3rdparty/webkit/WebCore/page/DOMWindow.h
index a70713b..cf9bc88 100644
--- a/src/3rdparty/webkit/WebCore/page/DOMWindow.h
+++ b/src/3rdparty/webkit/WebCore/page/DOMWindow.h
@@ -56,7 +56,7 @@ namespace WebCore {
class IndexedDatabaseRequest;
class InspectorTimelineAgent;
class Location;
- class Media;
+ class StyleMedia;
class Navigator;
class Node;
class NotificationCenter;
@@ -187,7 +187,7 @@ namespace WebCore {
// DOM Level 2 AbstractView Interface
Document* document() const;
// CSSOM View Module
- PassRefPtr<Media> media() const;
+ PassRefPtr<StyleMedia> styleMedia() const;
// DOM Level 2 Style Interface
PassRefPtr<CSSStyleDeclaration> getComputedStyle(Element*, const String& pseudoElt) const;
@@ -353,7 +353,7 @@ namespace WebCore {
Console* optionalConsole() const { return m_console.get(); }
Navigator* optionalNavigator() const { return m_navigator.get(); }
Location* optionalLocation() const { return m_location.get(); }
- Media* optionalMedia() const { return m_media.get(); }
+ StyleMedia* optionalMedia() const { return m_media.get(); }
#if ENABLE(DOM_STORAGE)
Storage* optionalSessionStorage() const { return m_sessionStorage.get(); }
Storage* optionalLocalStorage() const { return m_localStorage.get(); }
@@ -390,7 +390,7 @@ namespace WebCore {
mutable RefPtr<Console> m_console;
mutable RefPtr<Navigator> m_navigator;
mutable RefPtr<Location> m_location;
- mutable RefPtr<Media> m_media;
+ mutable RefPtr<StyleMedia> m_media;
#if ENABLE(DOM_STORAGE)
mutable RefPtr<Storage> m_sessionStorage;
mutable RefPtr<Storage> m_localStorage;
diff --git a/src/3rdparty/webkit/WebCore/page/DOMWindow.idl b/src/3rdparty/webkit/WebCore/page/DOMWindow.idl
index 31e4d4f..33e49e8 100644
--- a/src/3rdparty/webkit/WebCore/page/DOMWindow.idl
+++ b/src/3rdparty/webkit/WebCore/page/DOMWindow.idl
@@ -141,7 +141,7 @@ module window {
readonly attribute Document document;
// CSSOM View Module
- readonly attribute Media media;
+ readonly attribute StyleMedia styleMedia;
// DOM Level 2 Style Interface
CSSStyleDeclaration getComputedStyle(in Element element,
diff --git a/src/3rdparty/webkit/WebCore/page/EventHandler.cpp b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp
index 0a0e8c6..46dd7ae 100644
--- a/src/3rdparty/webkit/WebCore/page/EventHandler.cpp
+++ b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp
@@ -230,6 +230,9 @@ void EventHandler::clear()
m_capturingMouseEventsNode = 0;
m_latchedWheelEventNode = 0;
m_previousWheelScrolledNode = 0;
+#if ENABLE(TOUCH_EVENTS)
+ m_originatingTouchPointTargets.clear();
+#endif
}
void EventHandler::selectClosestWordFromMouseEvent(const MouseEventWithHitTestResults& result)
@@ -2714,21 +2717,21 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
// Increment the platform touch id by 1 to avoid storing a key of 0 in the hashmap.
unsigned touchPointTargetKey = point.id() + 1;
- EventTarget* touchTarget = 0;
+ RefPtr<EventTarget> touchTarget;
if (point.state() == PlatformTouchPoint::TouchPressed) {
m_originatingTouchPointTargets.set(touchPointTargetKey, target);
touchTarget = target;
} else if (point.state() == PlatformTouchPoint::TouchReleased || point.state() == PlatformTouchPoint::TouchCancelled) {
// The target should be the original target for this touch, so get it from the hashmap. As it's a release or cancel
// we also remove it from the map.
- touchTarget = m_originatingTouchPointTargets.take(touchPointTargetKey).get();
+ touchTarget = m_originatingTouchPointTargets.take(touchPointTargetKey);
} else
- touchTarget = m_originatingTouchPointTargets.get(touchPointTargetKey).get();
+ touchTarget = m_originatingTouchPointTargets.get(touchPointTargetKey);
- if (!touchTarget)
+ if (!touchTarget.get())
continue;
- RefPtr<Touch> touch = Touch::create(doc->frame(), touchTarget, point.id(),
+ RefPtr<Touch> touch = Touch::create(doc->frame(), touchTarget.get(), point.id(),
point.screenPos().x(), point.screenPos().y(),
adjustedPageX, adjustedPageY);
diff --git a/src/3rdparty/webkit/WebCore/page/FocusController.cpp b/src/3rdparty/webkit/WebCore/page/FocusController.cpp
index fdd117b..6c2a956 100644
--- a/src/3rdparty/webkit/WebCore/page/FocusController.cpp
+++ b/src/3rdparty/webkit/WebCore/page/FocusController.cpp
@@ -304,7 +304,7 @@ bool FocusController::advanceFocusDirectionally(FocusDirection direction, Keyboa
frame = frame->tree()->top();
FocusCandidate focusCandidate;
- findFocusableNodeInDirection(frame->document(), focusedNode, direction, event, focusCandidate);
+ findFocusableNodeInDirection(frame->document()->firstChild(), focusedNode, direction, event, focusCandidate);
Node* node = focusCandidate.node;
if (!node || !node->isElementNode()) {
@@ -391,20 +391,23 @@ static void updateFocusCandidateIfCloser(Node* focusedNode, const FocusCandidate
}
}
-void FocusController::findFocusableNodeInDirection(Document* document, Node* focusedNode,
+void FocusController::findFocusableNodeInDirection(Node* outer, Node* focusedNode,
FocusDirection direction, KeyboardEvent* event,
FocusCandidate& closestFocusCandidate,
const FocusCandidate& candidateParent)
{
- ASSERT(document);
- ASSERT(candidateParent.isNull() || static_cast<HTMLFrameOwnerElement*>(candidateParent.node));
+ ASSERT(outer);
+ ASSERT(candidateParent.isNull()
+ || candidateParent.node->hasTagName(frameTag)
+ || candidateParent.node->hasTagName(iframeTag));
// Walk all the child nodes and update closestFocusCandidate if we find a nearer node.
- for (Node* candidate = document->firstChild(); candidate; candidate = candidate->traverseNextNode()) {
+ Node* candidate = outer;
+ while (candidate) {
// Inner documents case.
if (candidate->isFrameOwnerElement())
- deepFindFocusableNodeInDirection(focusedNode, candidate, direction, event, closestFocusCandidate);
+ deepFindFocusableNodeInDirection(candidate, focusedNode, direction, event, closestFocusCandidate);
else if (candidate != focusedNode && candidate->isKeyboardFocusable(event)) {
FocusCandidate currentFocusCandidate(candidate);
@@ -412,8 +415,10 @@ void FocusController::findFocusableNodeInDirection(Document* document, Node* foc
distanceDataForNode(direction, focusedNode, currentFocusCandidate);
// Bail out if distance is maximum.
- if (currentFocusCandidate.distance == maxDistance())
+ if (currentFocusCandidate.distance == maxDistance()) {
+ candidate = candidate->traverseNextNode(outer->parent());
continue;
+ }
// If candidateParent is not null, it means that we are in a recursive call
// from deepFineFocusableNodeInDirection (i.e. processing an element in an iframe),
@@ -425,33 +430,54 @@ void FocusController::findFocusableNodeInDirection(Document* document, Node* foc
updateFocusCandidateIfCloser(focusedNode, currentFocusCandidate, closestFocusCandidate);
}
+
+ candidate = candidate->traverseNextNode(outer->parent());
}
}
-void FocusController::deepFindFocusableNodeInDirection(Node* focusedNode, Node* candidate,
+void FocusController::deepFindFocusableNodeInDirection(Node* container, Node* focusedNode,
FocusDirection direction, KeyboardEvent* event,
FocusCandidate& closestFocusCandidate)
{
- HTMLFrameOwnerElement* owner = static_cast<HTMLFrameOwnerElement*>(candidate);
- if (!owner->contentFrame())
+ ASSERT(container->hasTagName(frameTag) || container->hasTagName(iframeTag));
+
+ // Track if focusedNode is a descendant of the current container node being processed.
+ bool descendantOfContainer = false;
+ Node* firstChild = 0;
+
+ // Iframe or Frame.
+ if (container->hasTagName(frameTag) || container->hasTagName(iframeTag)) {
+
+ HTMLFrameOwnerElement* owner = static_cast<HTMLFrameOwnerElement*>(container);
+ if (!owner->contentFrame())
+ return;
+
+ Document* innerDocument = owner->contentFrame()->document();
+ if (!innerDocument)
+ return;
+
+ descendantOfContainer = innerDocument == focusedNode->document();
+ firstChild = innerDocument->firstChild();
+
+ }
+
+ if (descendantOfContainer) {
+ findFocusableNodeInDirection(firstChild, focusedNode, direction, event, closestFocusCandidate);
return;
+ }
- Document* innerDocument = owner->contentFrame()->document();
- if (!innerDocument)
+ // Check if the current container element itself is a good candidate
+ // to move focus to. If it is, then we traverse its inner nodes.
+ FocusCandidate candidateParent = FocusCandidate(container);
+ distanceDataForNode(direction, focusedNode, candidateParent);
+
+ // Bail out if distance is maximum.
+ if (candidateParent.distance == maxDistance())
return;
- if (innerDocument == focusedNode->document())
- findFocusableNodeInDirection(innerDocument, focusedNode, direction, event, closestFocusCandidate);
- else {
- // Check if the current {i}frame element itself is a good candidate
- // to move focus to. If it is, then we traverse its inner nodes.
- FocusCandidate candidateParent = FocusCandidate(candidate);
- distanceDataForNode(direction, focusedNode, candidateParent);
-
- // FIXME: Consider alignment?
- if (candidateParent.distance < closestFocusCandidate.distance)
- findFocusableNodeInDirection(innerDocument, focusedNode, direction, event, closestFocusCandidate, candidateParent);
- }
+ // FIXME: Consider alignment?
+ if (candidateParent.distance < closestFocusCandidate.distance)
+ findFocusableNodeInDirection(firstChild, focusedNode, direction, event, closestFocusCandidate, candidateParent);
}
static bool relinquishesEditingFocus(Node *node)
diff --git a/src/3rdparty/webkit/WebCore/page/FocusController.h b/src/3rdparty/webkit/WebCore/page/FocusController.h
index dfa3780..4410833 100644
--- a/src/3rdparty/webkit/WebCore/page/FocusController.h
+++ b/src/3rdparty/webkit/WebCore/page/FocusController.h
@@ -63,9 +63,10 @@ private:
bool advanceFocusDirectionally(FocusDirection, KeyboardEvent*);
bool advanceFocusInDocumentOrder(FocusDirection, KeyboardEvent*, bool initialFocus);
- void findFocusableNodeInDirection(Document*, Node*, FocusDirection, KeyboardEvent*, FocusCandidate& closestFocusCandidate,
+ void findFocusableNodeInDirection(Node* outter, Node*, FocusDirection, KeyboardEvent*,
+ FocusCandidate& closestFocusCandidate,
const FocusCandidate& parentCandidate = FocusCandidate());
- void deepFindFocusableNodeInDirection(Node*, Node*, FocusDirection, KeyboardEvent*, FocusCandidate&);
+ void deepFindFocusableNodeInDirection(Node* container, Node* focused, FocusDirection, KeyboardEvent*, FocusCandidate&);
Page* m_page;
RefPtr<Frame> m_focusedFrame;
diff --git a/src/3rdparty/webkit/WebCore/page/FrameView.h b/src/3rdparty/webkit/WebCore/page/FrameView.h
index 7371d13..7119975 100644
--- a/src/3rdparty/webkit/WebCore/page/FrameView.h
+++ b/src/3rdparty/webkit/WebCore/page/FrameView.h
@@ -139,7 +139,7 @@ public:
virtual void scrollRectIntoViewRecursively(const IntRect&);
virtual void setScrollPosition(const IntPoint&);
- void scrollPositionChanged();
+ virtual void scrollPositionChanged();
String mediaType() const;
void setMediaType(const String&);
diff --git a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
index 890eacd..d7eaf25 100644
--- a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
+++ b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
@@ -477,9 +477,8 @@ void scrollIntoView(Element* element)
// it is preferable to inflate |element|'s bounding rect a bit before
// scrolling it for accurate reason.
// Element's scrollIntoView method does not provide this flexibility.
- static const int fudgeFactor = 2;
IntRect bounds = element->getRect();
- bounds.inflate(fudgeFactor);
+ bounds.inflate(fudgeFactor());
element->renderer()->enclosingLayer()->scrollRectToVisible(bounds);
}
@@ -497,14 +496,14 @@ static void deflateIfOverlapped(IntRect& a, IntRect& b)
if (!a.intersects(b) || a.contains(b) || b.contains(a))
return;
- static const int fudgeFactor = -2;
+ int deflateFactor = -fudgeFactor();
// Avoid negative width or height values.
- if ((a.width() + 2 * fudgeFactor > 0) && (a.height() + 2 * fudgeFactor > 0))
- a.inflate(fudgeFactor);
+ if ((a.width() + 2 * deflateFactor > 0) && (a.height() + 2 * deflateFactor > 0))
+ a.inflate(deflateFactor);
- if ((b.width() + 2 * fudgeFactor > 0) && (b.height() + 2 * fudgeFactor > 0))
- b.inflate(fudgeFactor);
+ if ((b.width() + 2 * deflateFactor > 0) && (b.height() + 2 * deflateFactor > 0))
+ b.inflate(deflateFactor);
}
static bool checkNegativeCoordsForNode(Node* node, const IntRect& curRect)
diff --git a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.h b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.h
index 90ff1cf..309b095 100644
--- a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.h
+++ b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.h
@@ -40,6 +40,11 @@ inline long long maxDistance()
return numeric_limits<long long>::max();
}
+inline unsigned int fudgeFactor()
+{
+ return 2;
+}
+
// Spatially speaking, two given elements in a web page can be:
// 1) Fully aligned: There is a full intersection between the rects, either
// vertically or horizontally.
diff --git a/src/3rdparty/webkit/WebCore/platform/FileSystem.h b/src/3rdparty/webkit/WebCore/platform/FileSystem.h
index 856d5bb..c236831 100644
--- a/src/3rdparty/webkit/WebCore/platform/FileSystem.h
+++ b/src/3rdparty/webkit/WebCore/platform/FileSystem.h
@@ -69,9 +69,11 @@ typedef HMODULE PlatformModule;
#elif PLATFORM(QT)
#if defined(Q_WS_MAC)
typedef CFBundleRef PlatformModule;
-#else
+#elif !defined(QT_NO_LIBRARY)
typedef QLibrary* PlatformModule;
-#endif // defined(Q_WS_MAC)
+#else
+typedef void* PlatformModule;
+#endif
#elif PLATFORM(GTK)
typedef GModule* PlatformModule;
#elif PLATFORM(CF)
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
index 5c70eff..e50ab55 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
@@ -292,6 +292,7 @@ void ScrollView::valueChanged(Scrollbar* scrollbar)
if (scrollbarsSuppressed())
return;
+ scrollPositionChanged();
scrollContents(scrollDelta);
}
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.h b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
index 9134ddf..118a310 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.h
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
@@ -302,6 +302,9 @@ private:
// Called to update the scrollbars to accurately reflect the state of the view.
void updateScrollbars(const IntSize& desiredOffset);
+ // Called when the scroll position within this view changes. FrameView overrides this to generate repaint invalidations.
+ virtual void scrollPositionChanged() {}
+
void platformInit();
void platformDestroy();
void platformAddChild(Widget*);
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp
index 1fdc1e5..035d1c5 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp
@@ -50,7 +50,8 @@
#elif PLATFORM(GTK)
#include "MediaPlayerPrivateGStreamer.h"
#elif PLATFORM(QT)
-#if QT_VERSION < 0x040700
+// QtMultimedia support is disabled currently.
+#if 1 || (QT_VERSION < 0x040700)
#include "MediaPlayerPrivatePhonon.h"
#else
#include "MediaPlayerPrivateQt.h"
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index edac268..0100b72 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -641,12 +641,12 @@ void GraphicsContext::fillRect(const FloatRect& rect)
}
}
-void GraphicsContext::fillRect(const FloatRect& rect, const Color& c, ColorSpace colorSpace)
+void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorSpace colorSpace)
{
- if (paintingDisabled())
+ if (paintingDisabled() || !color.isValid())
return;
- m_data->solidColor.setColor(c);
+ m_data->solidColor.setColor(color);
QPainter* p = m_data->p();
if (m_common->state.shadowColor.isValid())
drawBorderlessRectShadow(this, p, rect);
@@ -655,7 +655,7 @@ void GraphicsContext::fillRect(const FloatRect& rect, const Color& c, ColorSpace
void GraphicsContext::fillRoundedRect(const IntRect& rect, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color& color, ColorSpace colorSpace)
{
- if (paintingDisabled() || !color.alpha())
+ if (paintingDisabled() || !color.isValid() || !color.alpha())
return;
Path path = Path::createRoundedRectangle(rect, topLeft, topRight, bottomLeft, bottomRight);
@@ -717,7 +717,7 @@ void GraphicsContext::drawFocusRing(const Vector<Path>& paths, int width, int of
*/
void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int /* width */, int /* offset */, const Color& color)
{
- if (paintingDisabled())
+ if (paintingDisabled() || !color.isValid())
return;
unsigned rectCount = rects.size();
@@ -1141,8 +1141,9 @@ void GraphicsContext::setURLForRect(const KURL&, const IntRect&)
void GraphicsContext::setPlatformStrokeColor(const Color& color, ColorSpace colorSpace)
{
- if (paintingDisabled())
+ if (paintingDisabled() || !color.isValid())
return;
+
QPainter* p = m_data->p();
QPen newPen(p->pen());
m_data->solidColor.setColor(color);
@@ -1172,8 +1173,9 @@ void GraphicsContext::setPlatformStrokeThickness(float thickness)
void GraphicsContext::setPlatformFillColor(const Color& color, ColorSpace colorSpace)
{
- if (paintingDisabled())
+ if (paintingDisabled() || !color.isValid())
return;
+
m_data->solidColor.setColor(color);
m_data->p()->setBrush(m_data->solidColor);
}
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
index 1c4c275..969e00a 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
@@ -357,14 +357,6 @@ void GraphicsLayerQtImpl::updateTransform()
return;
}
- // Simplistic depth test - we stack the item behind its parent if its computed z is lower than the parent's computed z at the item's center point.
- if (parent) {
- const QPointF centerPointMappedToRoot = rootLayer()->mapFromItem(this, m_size.width() / 2, m_size.height() / 2);
- setFlag(ItemStacksBehindParent,
- m_transformRelativeToRootLayer.mapPoint(FloatPoint3D(centerPointMappedToRoot.x(), centerPointMappedToRoot.y(), 0)).z() <
- parent->m_transformRelativeToRootLayer.mapPoint(FloatPoint3D(centerPointMappedToRoot.x(), centerPointMappedToRoot.y(), 0)).z());
- }
-
// The item is front-facing or backface-visibility is on.
setVisible(true);
@@ -607,8 +599,10 @@ void GraphicsLayerQtImpl::flushChanges(bool recursive, bool forceUpdateTransform
if (m_maskEffect)
m_maskEffect.data()->update();
else if (m_changeMask & DisplayChange) {
- // Recache now: all the content is ready and we don't want to wait until the paint event.
- recache(m_pendingContent.regionToUpdate);
+ // Recache now: all the content is ready and we don't want to wait until the paint event. We only need to do this for HTML content,
+ // there's no point in caching directly composited content like images or solid rectangles.
+ if (m_pendingContent.contentType == HTMLContentType)
+ recache(m_pendingContent.regionToUpdate);
update(m_pendingContent.regionToUpdate.boundingRect());
m_pendingContent.regionToUpdate = QRegion();
}
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp
index ee4af7f..4b0c21f 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp
@@ -69,12 +69,41 @@ Path& Path::operator=(const Path& other)
return *this;
}
+// Check whether a point is on the border
+bool isPointOnPathBorder(const QPolygonF& border, const QPointF& p)
+{
+ QPointF p1 = border.at(0);
+ QPointF p2;
+
+ for (int i = 1; i < border.size(); ++i) {
+ p2 = border.at(i);
+ // (x1<=x<=x2||x1=>x>=x2) && (y1<=y<=y2||y1=>y>=y2) && (y2-y1)(x-x1) == (y-y1)(x2-x1)
+ // In which, (y2-y1)(x-x1) == (y-y1)(x2-x1) is from (y2-y1)/(x2-x1) == (y-y1)/(x-x1)
+ // it want to check the slope between p1 and p2 is same with slope between p and p1,
+ // if so then the three points lie on the same line.
+ // In which, (x1<=x<=x2||x1=>x>=x2) && (y1<=y<=y2||y1=>y>=y2) want to make sure p is
+ // between p1 and p2, not outside.
+ if (((p.x() <= p1.x() && p.x() >= p2.x()) || (p.x() >= p1.x() && p.x() <= p2.x()))
+ && ((p.y() <= p1.y() && p.y() >= p2.y()) || (p.y() >= p1.y() && p.y() <= p2.y()))
+ && (p2.y() - p1.y()) * (p.x() - p1.x()) == (p.y() - p1.y()) * (p2.x() - p1.x())) {
+ return true;
+ }
+ p1 = p2;
+ }
+ return false;
+}
+
bool Path::contains(const FloatPoint& point, WindRule rule) const
{
Qt::FillRule savedRule = m_path.fillRule();
const_cast<QPainterPath*>(&m_path)->setFillRule(rule == RULE_EVENODD ? Qt::OddEvenFill : Qt::WindingFill);
bool contains = m_path.contains(point);
+
+ if (!contains) {
+ // check whether the point is on the border
+ contains = isPointOnPathBorder(m_path.toFillPolygon(), point);
+ }
const_cast<QPainterPath*>(&m_path)->setFillRule(savedRule);
return contains;
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h b/src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h
index 0d98fcb..e355025 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/DnsPrefetchHelper.h
@@ -42,6 +42,13 @@ namespace WebCore {
if (currentLookups >= 10)
return; // do not launch more than 10 lookups at the same time
+#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 3)
+ currentLookups++;
+ QHostInfo::lookupHost(hostname, this, SLOT(lookedUp(QHostInfo)));
+#else
+ // This code is only needed for Qt versions that do not have
+ // the small Qt DNS cache yet.
+
QTime* entryTime = lookupCache.object(hostname);
if (entryTime && entryTime->elapsed() > 300*1000) {
// delete knowledge about lookup if it is already 300 seconds old
@@ -54,6 +61,7 @@ namespace WebCore {
currentLookups++;
QHostInfo::lookupHost(hostname, this, SLOT(lookedUp(QHostInfo)));
}
+#endif
}
void lookedUp(const QHostInfo&)
@@ -61,11 +69,14 @@ namespace WebCore {
// we do not cache the result, we throw it away.
// we currently rely on the OS to cache the results. If it does not do that
// then at least the ISP nameserver did it.
+ // Since Qt 4.6.3, Qt also has a small DNS cache.
currentLookups--;
}
protected:
+#if QT_VERSION < QT_VERSION_CHECK(4, 6, 3)
QCache<QString, QTime> lookupCache; // 100 entries
+#endif
int currentLookups;
};
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index 4237fca..abeb895 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -41,13 +41,15 @@
// What type of connection should be used for the signals of the
// QNetworkReply? This depends on if Qt has a bugfix for this or not.
-// It is fixed in Qt 4.6.1. See https://bugs.webkit.org/show_bug.cgi?id=32113
-#if QT_VERSION > QT_VERSION_CHECK(4, 6, 0)
+// It is fixed in Qt 4.6.3. See https://bugs.webkit.org/show_bug.cgi?id=32113
+// and https://bugs.webkit.org/show_bug.cgi?id=36755
+#if QT_VERSION > QT_VERSION_CHECK(4, 6, 2)
#define SIGNAL_CONN Qt::DirectConnection
#else
#define SIGNAL_CONN Qt::QueuedConnection
#endif
+static const int gMaxRecursionLimit = 10;
namespace WebCore {
@@ -138,6 +140,7 @@ QNetworkReplyHandler::QNetworkReplyHandler(ResourceHandle* handle, LoadMode load
, m_shouldFinish(false)
, m_shouldSendResponse(false)
, m_shouldForwardData(false)
+ , m_redirectionTries(gMaxRecursionLimit)
{
const ResourceRequest &r = m_resourceHandle->request();
@@ -335,9 +338,18 @@ void QNetworkReplyHandler::sendResponseIfNeeded()
QUrl redirection = m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
if (redirection.isValid()) {
+ QUrl newUrl = m_reply->url().resolved(redirection);
+
+ m_redirectionTries--;
+ if (m_redirectionTries == 0) { // 10 or more redirections to the same url is considered infinite recursion
+ ResourceError error(newUrl.host(), 400 /*bad request*/,
+ newUrl.toString(),
+ QCoreApplication::translate("QWebPage", "Redirection limit reached"));
+ client->didFail(m_resourceHandle, error);
+ return;
+ }
m_redirected = true;
- QUrl newUrl = m_reply->url().resolved(redirection);
ResourceRequest newRequest = m_resourceHandle->request();
newRequest.setURL(newUrl);
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.h b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.h
index eb5ae3c..1abad4e 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.h
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.h
@@ -82,6 +82,7 @@ private:
bool m_shouldFinish;
bool m_shouldSendResponse;
bool m_shouldForwardData;
+ int m_redirectionTries;
};
// Self destructing QIODevice for FormData
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp
index 4093fad..f9ced98 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp
@@ -154,11 +154,12 @@ bool unloadModule(PlatformModule module)
return ::FreeLibrary(module);
#else
+#ifndef QT_NO_LIBRARY
if (module->unload()) {
delete module;
return true;
}
-
+#endif
return false;
#endif
}
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
index 0163adc..577903b 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
@@ -42,7 +42,7 @@
#include "HTMLInputElement.h"
#include "HTMLMediaElement.h"
#include "HTMLNames.h"
-#ifdef Q_WS_MAEMO_5
+#if USE(QT_MOBILE_THEME)
#include "Maemo5Webstyle.h"
#endif
#include "NotImplemented.h"
@@ -153,7 +153,7 @@ RenderThemeQt::RenderThemeQt(Page* page)
m_buttonFontPixelSize = fontInfo.pixelSize();
#endif
-#ifdef Q_WS_MAEMO_5
+#if USE(QT_MOBILE_THEME)
m_fallbackStyle = new Maemo5WebStyle;
#else
m_fallbackStyle = QStyleFactory::create(QLatin1String("windows"));
@@ -166,7 +166,7 @@ RenderThemeQt::~RenderThemeQt()
delete m_lineEdit;
}
-#ifdef Q_WS_MAEMO_5
+#if USE(QT_MOBILE_THEME)
bool RenderThemeQt::isControlStyled(const RenderStyle* style, const BorderData& border, const FillLayer& fill, const Color& backgroundColor) const
{
switch (style->appearance()) {
@@ -198,7 +198,7 @@ QStyle* RenderThemeQt::fallbackStyle() const
QStyle* RenderThemeQt::qStyle() const
{
-#ifdef Q_WS_MAEMO_5
+#if USE(QT_MOBILE_THEME)
return fallbackStyle();
#endif
@@ -218,7 +218,7 @@ String RenderThemeQt::extraDefaultStyleSheet()
#if ENABLE(NO_LISTBOX_RENDERING)
result += String(themeQtNoListboxesUserAgentStyleSheet, sizeof(themeQtNoListboxesUserAgentStyleSheet));
#endif
-#ifdef Q_WS_MAEMO_5
+#if USE(QT_MOBILE_THEME)
result += String(themeQtMaemo5UserAgentStyleSheet, sizeof(themeQtMaemo5UserAgentStyleSheet));
#endif
return result;
@@ -648,7 +648,9 @@ bool RenderThemeQt::paintMenuList(RenderObject* o, const RenderObject::PaintInfo
void RenderThemeQt::adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
{
-#ifndef Q_WS_MAEMO_5
+#if USE(QT_MOBILE_THEME)
+ // Mobile theme uses border radius.
+#else
// WORKAROUND because html.css specifies -webkit-border-radius for <select> so we override it here
// see also http://bugs.webkit.org/show_bug.cgi?id=18399
style->resetBorderRadius();
@@ -870,7 +872,7 @@ bool RenderThemeQt::supportsFocus(ControlPart appearance) const
void RenderThemeQt::setPaletteFromPageClientIfExists(QPalette& palette) const
{
-#ifdef Q_WS_MAEMO_5
+#if USE(QT_MOBILE_THEME)
static QPalette lightGrayPalette(Qt::lightGray);
palette = lightGrayPalette;
return;
@@ -932,7 +934,7 @@ ControlPart RenderThemeQt::initializeCommonQStyleOptions(QStyleOption& option, R
case SearchFieldCancelButtonPart: {
if (isPressed(o))
option.state |= QStyle::State_Sunken;
- else if (result == PushButtonPart)
+ else if (result == PushButtonPart || result == ButtonPart)
option.state |= QStyle::State_Raised;
break;
}
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h
index b16918a..591dd27 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h
@@ -75,7 +75,7 @@ public:
virtual double caretBlinkInterval() const;
-#ifdef Q_WS_MAEMO_5
+#if USE(QT_MOBILE_THEME)
virtual bool isControlStyled(const RenderStyle*, const BorderData&, const FillLayer&, const Color& backgroundColor) const;
virtual int popupInternalPaddingBottom(RenderStyle*) const;
#endif
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp
index 04a2b1b..eb2d934 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/ScrollbarThemeQt.cpp
@@ -114,7 +114,7 @@ static QStyleOptionSlider* styleOptionSlider(Scrollbar* scrollbar, QWidget* widg
opt.state |= QStyle::State_Horizontal;
opt.sliderValue = scrollbar->value();
opt.sliderPosition = opt.sliderValue;
- opt.pageStep = scrollbar->visibleSize();
+ opt.pageStep = scrollbar->pageStep();
opt.singleStep = scrollbar->lineStep();
opt.minimum = 0;
opt.maximum = qMax(0, scrollbar->maximum());
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp b/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubsQt.cpp
index 814f961..814f961 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubs.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/TemporaryLinkStubsQt.cpp
diff --git a/src/3rdparty/webkit/WebKit.pri b/src/3rdparty/webkit/WebKit.pri
index e737039..a3ccd9d 100644
--- a/src/3rdparty/webkit/WebKit.pri
+++ b/src/3rdparty/webkit/WebKit.pri
@@ -22,7 +22,7 @@ building-libs {
QMAKE_FRAMEWORKPATH = $$OUTPUT_DIR/lib $$QMAKE_FRAMEWORKPATH
} else {
win32-*|wince* {
- CONFIG(debug, debug|release):build_pass: QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}d
+ !CONFIG(release, debug|release):build_pass: QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}d
QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}$${QT_MAJOR_VERSION}
win32-g++: LIBS += -l$$QTWEBKITLIBNAME
else: LIBS += $${QTWEBKITLIBNAME}.lib
diff --git a/src/3rdparty/webkit/WebKit.pro b/src/3rdparty/webkit/WebKit.pro
index 6d466e2..84fcb56 100644
--- a/src/3rdparty/webkit/WebKit.pro
+++ b/src/3rdparty/webkit/WebKit.pro
@@ -8,7 +8,7 @@ SUBDIRS += \
WebCore
# If the source exists, built it
-exists($$PWD/WebKitTools/QtLauncher): SUBDIRS += WebKitTools/QtLauncher
+exists($$PWD/WebKitTools/QtTestBrowser): SUBDIRS += WebKitTools/QtTestBrowser
exists($$PWD/JavaScriptCore/jsc.pro): SUBDIRS += JavaScriptCore/jsc.pro
exists($$PWD/WebKit/qt/tests): SUBDIRS += WebKit/qt/tests
exists($$PWD/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro): SUBDIRS += WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
index 1efae16..75a23d9 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp
@@ -82,7 +82,6 @@ public:
, page(0)
, resizesToContents(false)
#if USE(ACCELERATED_COMPOSITING)
- , rootGraphicsLayer(0)
, shouldSync(false)
#endif
{
@@ -158,7 +157,7 @@ public:
enum { RootGraphicsLayerZValue, OverlayZValue };
#if USE(ACCELERATED_COMPOSITING)
- QGraphicsItem* rootGraphicsLayer;
+ QWeakPointer<QGraphicsObject> rootGraphicsLayer;
// we need to sync the layers if we get a special call from the WebCore
// compositor telling us to do so. We'll get that call from ChromeClientQt
bool shouldSync;
@@ -171,12 +170,11 @@ public:
QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate()
{
#if USE(ACCELERATED_COMPOSITING)
- if (rootGraphicsLayer) {
- // we don't need to delete the root graphics layer
- // The lifecycle is managed in GraphicsLayerQt.cpp
- rootGraphicsLayer->setParentItem(0);
- q->scene()->removeItem(rootGraphicsLayer);
- }
+ if (!rootGraphicsLayer)
+ return;
+ // we don't need to delete the root graphics layer. The lifecycle is managed in GraphicsLayerQt.cpp.
+ rootGraphicsLayer.data()->setParentItem(0);
+ q->scene()->removeItem(rootGraphicsLayer.data());
#endif
}
@@ -204,12 +202,12 @@ void QGraphicsWebViewPrivate::createOrDeleteOverlay()
void QGraphicsWebViewPrivate::setRootGraphicsLayer(QGraphicsItem* layer)
{
if (rootGraphicsLayer) {
- rootGraphicsLayer->setParentItem(0);
- q->scene()->removeItem(rootGraphicsLayer);
+ rootGraphicsLayer.data()->setParentItem(0);
+ q->scene()->removeItem(rootGraphicsLayer.data());
QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive();
}
- rootGraphicsLayer = layer;
+ rootGraphicsLayer = layer ? layer->toGraphicsObject() : 0;
if (layer) {
layer->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
@@ -231,7 +229,7 @@ void QGraphicsWebViewPrivate::updateCompositingScrollPosition()
{
if (rootGraphicsLayer && q->page() && q->page()->mainFrame()) {
const QPoint scrollPosition = q->page()->mainFrame()->scrollPosition();
- rootGraphicsLayer->setPos(-scrollPosition);
+ rootGraphicsLayer.data()->setPos(-scrollPosition);
}
}
#endif
@@ -428,7 +426,9 @@ QRectF QGraphicsWebViewPrivate::graphicsItemVisibleRect() const
return QRectF();
QList<QGraphicsView*> views = q->scene()->views();
if (views.size() > 1) {
+#ifndef QT_NO_DEBUG_STREAM
qDebug() << "QGraphicsWebView is in more than one graphics views, unable to compute the visible rect";
+#endif
return QRectF();
}
if (views.size() < 1)
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
index 4e8fd30..ba039c7 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebdatabase.cpp
@@ -39,8 +39,10 @@ using namespace WebCore;
access on a local computer through JavaScript. QWebDatabase is the C++ interface to these
databases.
- To get access to all databases defined by a security origin, use QWebSecurityOrigin::databases().
- Each database has an internal name(), as well as a user-friendly name, provided by displayName().
+ Databases are grouped together in security origins. To get access to all databases defined by
+ a security origin, use QWebSecurityOrigin::databases(). Each database has an internal name(),
+ as well as a user-friendly name, provided by displayName(). These names are specified when
+ creating the database in the JavaScript code.
WebKit uses SQLite to create and access the local SQL databases. The location of the database
file in the local file system is returned by fileName(). You can access the database directly
@@ -49,7 +51,7 @@ using namespace WebCore;
For each database the web site can define an expectedSize(). The current size of the database
in bytes is returned by size().
- For more information refer to the \l{http://dev.w3.org/html5/webdatabase/}{HTML 5 Draft Standard}.
+ For more information refer to the \l{http://dev.w3.org/html5/webdatabase/}{HTML5 Web SQL Database Draft Standard}.
\sa QWebSecurityOrigin
*/
@@ -80,7 +82,7 @@ QString QWebDatabase::name() const
}
/*!
- Returns the name of the database as seen by the user.
+ Returns the name of the database in a format that is suitable for display to the user.
*/
QString QWebDatabase::displayName() const
{
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp
index 955206d..69146a2 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp
@@ -84,13 +84,27 @@ public:
\snippet webkitsnippets/webelement/main.cpp Traversing with QWebElement
+ Individual elements can be inspected or changed using methods such as attribute()
+ or setAttribute(). For examle, to capture the user's input in a text field for later
+ use (auto-completion), a browser could do something like this:
+
+ \snippet webkitsnippets/webelement/main.cpp autocomplete1
+
+ When the same page is later revisited, the browser can fill in the text field automatically
+ by modifying the value attribute of the input element:
+
+ \snippet webkitsnippets/webelement/main.cpp autocomplete2
+
+ Another use case is to emulate a click event on an element. The following
+ code snippet demonstrates how to call the JavaScript DOM method click() of
+ a submit button:
+
+ \snippet webkitsnippets/webelement/main.cpp Calling a DOM element method
+
The underlying content of QWebElement is explicitly shared. Creating a copy
of a QWebElement does not create a copy of the content. Instead, both
instances point to the same element.
- The element's attributes can be read using attribute() and modified with
- setAttribute().
-
The contents of child elements can be converted to plain text with
toPlainText(); to XHTML using toInnerXml(). To include the element's tag in
the output, use toOuterXml().
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
index 394ea17..44cc3b5 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
@@ -552,8 +552,10 @@ void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame:
can connect to the web page's \l{QWebPage::}{frameCreated()} signal
to be notified when a new frame is created.
- The hitTestContent() function can be used to programmatically examine the
- contents of a frame.
+ There are multiple ways to programmatically examine the contents of a frame.
+ The hitTestContent() function can be used to find elements by coordinate.
+ For access to the underlying DOM tree, there is documentElement(),
+ findAllElements() and findFirstElement().
A QWebFrame can be printed onto a QPrinter using the print() function.
This function is marked as a slot and can be conveniently connected to
@@ -781,6 +783,10 @@ static inline QUrl ensureAbsoluteUrl(const QUrl &url)
\property QWebFrame::url
\brief the url of the frame currently viewed
+ Setting this property clears the view and loads the URL.
+
+ By default, this property contains an empty, invalid URL.
+
\sa urlChanged()
*/
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.cpp
index 80567d1..61cf5af 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistoryinterface.cpp
@@ -41,7 +41,7 @@ static void gCleanupInterface()
/*!
Sets a new default interface, \a defaultInterface, that will be used by all of WebKit
- for managing history.
+ to keep track of visited links.
If an interface without a parent has already been set, the old interface will be deleted.
When the application exists QWebHistoryInterface will automatically delete the
@@ -68,8 +68,9 @@ void QWebHistoryInterface::setDefaultInterface(QWebHistoryInterface* defaultInte
}
/*!
- Returns the default interface that will be used by WebKit. If no
- default interface has been set, QtWebkit will not track history.
+ Returns the default interface that will be used by WebKit. If no default interface has been set,
+ Webkit will not keep track of visited links and a null pointer will be returned.
+ \sa setDefaultInterface
*/
QWebHistoryInterface* QWebHistoryInterface::defaultInterface()
{
@@ -84,11 +85,15 @@ QWebHistoryInterface* QWebHistoryInterface::defaultInterface()
\inmodule QtWebKit
The QWebHistoryInterface is an interface that can be used to
- implement link history. It contains two pure virtual methods that
- are called by the WebKit engine. addHistoryEntry() is used to add
- pages that have been visited to the interface, while
- historyContains() is used to query whether this page has been
- visited by the user.
+ keep track of visited links. It contains two pure virtual methods that
+ are called by the WebKit engine: addHistoryEntry() is used to add
+ urls that have been visited to the interface, while
+ historyContains() is used to query whether the given url has been
+ visited by the user. By default the QWebHistoryInterface is not set, so WebKit does not keep
+ track of visited links.
+
+ \note The history tracked by QWebHistoryInterface is not specific to an instance of QWebPage
+ but applies to all pages.
*/
/*!
@@ -100,7 +105,7 @@ QWebHistoryInterface::QWebHistoryInterface(QObject* parent)
}
/*!
- Destructor. If this is currently the default interface it will be unset.
+ Destroys the interface. If this is currently the default interface it will be unset.
*/
QWebHistoryInterface::~QWebHistoryInterface()
{
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp
index c0e5277..802ea98 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp
@@ -31,17 +31,23 @@
/*!
\class QWebInspector
\since 4.6
+ \inmodule QtWebKit
\brief The QWebInspector class allows the placement and control of a
QWebPage's inspector.
- The inspector allows you to see a page current hierarchy and loading
- statistics.
+ The inspector can display a page's hierarchy, its loading statistics and
+ the current state of its individual elements. It is mostly used by web
+ developers.
- The QWebPage to be inspected is determined with the setPage() method.
+ The QWebPage to be inspected must be specified using the setPage() method.
A typical use of QWebInspector follows:
\snippet webkitsnippets/qtwebkit_qwebinspector_snippet.cpp 0
+ A QWebInspector can be made visible either programmatically using
+ setVisible(), or by the user through the attached QWebPage's context
+ menu.
+
\note A QWebInspector will display a blank widget if either:
\list
\o page() is null
@@ -61,17 +67,16 @@
\section1 Inspector configuration persistence
The inspector allows the user to configure some options through its
- interface (e.g. the resource tracking "Always enable" option).
- These settings are persisted automatically by QtWebKit using QSettings.
-
- However since the QSettings object is instantiated using the empty
- constructor, QCoreApplication::setOrganizationName() and
- QCoreApplication::setApplicationName() must be called within your
- application to enable the persistence of these options.
+ user interface (e.g. the resource tracking "Always enable" option).
+ These settings will be persisted automatically by QtWebKit only if
+ your application previously called QCoreApplication::setOrganizationName()
+ and QCoreApplication::setApplicationName().
+ See QSettings's default constructor documentation for an explanation
+ of why this is necessary.
*/
/*!
- Constructs an empty QWebInspector with parent \a parent.
+ Constructs an unbound QWebInspector with \a parent as its parent.
*/
QWebInspector::QWebInspector(QWidget* parent)
: QWidget(parent)
@@ -89,16 +94,16 @@ QWebInspector::~QWebInspector()
}
/*!
- Sets the QWebPage to be inspected.
-
- There can only be one QWebInspector associated with a QWebPage
- and vices versa.
+ Bind this inspector to the QWebPage to be inspected.
- Calling with \a page as null will break the current association, if any.
-
- If \a page is already associated to another QWebInspector, the association
- will be replaced and the previous QWebInspector will have no page
- associated.
+ \bold {Notes:}
+ \list
+ \o There can only be one QWebInspector associated with a QWebPage
+ and vice versa.
+ \o Calling this method with a null \a page will break the current association, if any.
+ \o If \a page is already associated to another QWebInspector, the association
+ will be replaced and the previous QWebInspector will become unbound
+ \endlist
\sa page()
*/
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebkitversion.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebkitversion.cpp
index 062839f..181913b 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebkitversion.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebkitversion.cpp
@@ -22,11 +22,21 @@
#include <WebKitVersion.h>
/*!
-
+ \relates QWebPage
+ \since 4.6
Returns the version number of WebKit at run-time as a string (for
- example, "531.3"). This is the version of WebKit the application
- was compiled against.
+ example, "531.3").
+
+ This version is commonly used in WebKit based browsers as part
+ of the user agent string. Web servers and JavaScript might use
+ it to identify the presence of certain WebKit engine features
+ and behaviour.
+ The evolution of this version is bound to the releases of Apple's
+ Safari browser. For a version specific to the QtWebKit library,
+ see QTWEBKIT_VERSION
+
+ \sa QWebPage::userAgentForUrl()
*/
QString qWebKitVersion()
{
@@ -34,11 +44,13 @@ QString qWebKitVersion()
}
/*!
-
+ \relates QWebPage
+ \since 4.6
Returns the 'major' version number of WebKit at run-time as an integer
(for example, 531). This is the version of WebKit the application
was compiled against.
+ \sa qWebKitVersion()
*/
int qWebKitMajorVersion()
{
@@ -46,13 +58,57 @@ int qWebKitMajorVersion()
}
/*!
-
+ \relates QWebPage
+ \since 4.6
Returns the 'minor' version number of WebKit at run-time as an integer
(for example, 3). This is the version of WebKit the application
was compiled against.
+ \sa qWebKitVersion()
*/
int qWebKitMinorVersion()
{
return WEBKIT_MINOR_VERSION;
}
+
+/*!
+ \macro QTWEBKIT_VERSION
+ \relates QWebPage
+
+ This macro expands a numeric value of the form 0xMMNNPP (MM =
+ major, NN = minor, PP = patch) that specifies QtWebKit's version
+ number. For example, if you compile your application against QtWebKit
+ 2.1.2, the QTWEBKIT_VERSION macro will expand to 0x020102.
+
+ You can use QTWEBKIT_VERSION to use the latest QtWebKit API where
+ available.
+
+ \sa QT_VERSION
+*/
+
+/*!
+ \macro QTWEBKIT_VERSION_STR
+ \relates QWebPage
+
+ This macro expands to a string that specifies QtWebKit's version number
+ (for example, "2.1.2"). This is the version against which the
+ application is compiled.
+
+ \sa QTWEBKIT_VERSION
+*/
+
+/*!
+ \macro QTWEBKIT_VERSION_CHECK
+ \relates QWebPage
+
+ Turns the major, minor and patch numbers of a version into an
+ integer, 0xMMNNPP (MM = major, NN = minor, PP = patch). This can
+ be compared with another similarly processed version id, for example
+ in a preprocessor statement:
+
+ \code
+ #if QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 1, 0)
+ // code to use API new in QtWebKit 2.1.0
+ #endif
+ \endcode
+*/
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index b8b50b7..c5f508f 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -119,15 +119,6 @@
using namespace WebCore;
-void QWEBKIT_EXPORT qt_wrt_setViewMode(QWebPage* page, const QString& mode)
-{
- QWebPagePrivate::priv(page)->viewMode = mode;
- WebCore::Frame* frame = QWebFramePrivate::core(page->mainFrame());
- WebCore::FrameView* view = frame->view();
- frame->document()->updateStyleSelector();
- view->forceLayout();
-}
-
void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories()
{
PluginDatabase* db = PluginDatabase::installedPlugins(/* populate */ false);
@@ -1361,6 +1352,26 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
ev->accept();
}
+void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* event)
+{
+ if (event->propertyName() == "_q_viewMode") {
+ QString mode = q->property("_q_viewMode").toString();
+ if (mode != viewMode) {
+ viewMode = mode;
+ WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
+ WebCore::FrameView* view = frame->view();
+ frame->document()->updateStyleSelector();
+ view->forceLayout();
+ }
+ } else if (event->propertyName() == "_q_HTMLTokenizerChunkSize") {
+ int chunkSize = q->property("_q_HTMLTokenizerChunkSize").toInt();
+ q->handle()->page->setCustomHTMLTokenizerChunkSize(chunkSize);
+ } else if (event->propertyName() == "_q_HTMLTokenizerTimeDelay") {
+ double timeDelay = q->property("_q_HTMLTokenizerTimeDelay").toDouble();
+ q->handle()->page->setCustomHTMLTokenizerTimeDelay(timeDelay);
+ }
+}
+
void QWebPagePrivate::shortcutOverrideEvent(QKeyEvent* event)
{
WebCore::Frame* frame = page->focusController()->focusedOrMainFrame();
@@ -1616,7 +1627,7 @@ InspectorController* QWebPagePrivate::inspectorController()
/*!
\enum QWebPage::FindFlag
- This enum describes the options available to QWebPage's findText() function. The options
+ This enum describes the options available to the findText() function. The options
can be OR-ed together from the following list:
\value FindBackward Searches backwards instead of forwards.
@@ -1637,6 +1648,8 @@ InspectorController* QWebPagePrivate::inspectorController()
\value DelegateExternalLinks When activating links that point to documents not stored on the
local filesystem or an equivalent - such as the Qt resource system - then linkClicked() is emitted.
\value DelegateAllLinks Whenever a link is activated the linkClicked() signal is emitted.
+
+ \sa QWebPage::linkDelegationPolicy
*/
/*!
@@ -1651,6 +1664,8 @@ InspectorController* QWebPagePrivate::inspectorController()
\value NavigationTypeReload The user activated the reload action.
\value NavigationTypeFormResubmitted An HTML form was submitted a second time.
\value NavigationTypeOther A navigation to another document using a method not listed above.
+
+ \sa acceptNavigationRequest()
*/
/*!
@@ -1660,7 +1675,7 @@ InspectorController* QWebPagePrivate::inspectorController()
Actions only have an effect when they are applicable. The availability of
actions can be be determined by checking \l{QAction::}{isEnabled()} on the
- action returned by \l{QWebPage::}{action()}.
+ action returned by action().
One method of enabling the text editing, cursor movement, and text selection actions
is by setting \l contentEditable to true.
@@ -1742,6 +1757,8 @@ InspectorController* QWebPagePrivate::inspectorController()
/*!
\enum QWebPage::WebWindowType
+ This enum describes the types of window that can be created by the createWindow() function.
+
\value WebBrowserWindow The window is a regular web browser window.
\value WebModalDialog The window acts as modal dialog.
*/
@@ -1758,11 +1775,13 @@ InspectorController* QWebPagePrivate::inspectorController()
to provide functionality like QWebView in a widget-less environment.
QWebPage's API is very similar to QWebView, as you are still provided with
- common functions like action() (known as \l{QWebView::}{pageAction()} in
- QWebView), triggerAction(), findText() and settings(). More QWebView-like
- functions can be found in the main frame of QWebPage, obtained via
- QWebPage::mainFrame(). For example, the load(), setUrl() and setHtml()
- unctions for QWebPage can be accessed using QWebFrame.
+ common functions like action() (known as
+ \l{QWebView::pageAction()}{pageAction}() in QWebView), triggerAction(),
+ findText() and settings(). More QWebView-like functions can be found in the
+ main frame of QWebPage, obtained via the mainFrame() function. For example,
+ the \l{QWebFrame::load()}{load}(), \l{QWebFrame::setUrl()}{setUrl}() and
+ \l{QWebFrame::setHtml()}{setHtml}() functions for QWebPage can be accessed
+ using QWebFrame.
The loadStarted() signal is emitted when the page begins to load.The
loadProgress() signal, on the other hand, is emitted whenever an element
@@ -1866,7 +1885,8 @@ QWebFrame *QWebPage::currentFrame() const
/*!
\since 4.6
- Returns the frame at the given point \a pos.
+ Returns the frame at the given point \a pos, or 0 if there is no frame at
+ that position.
\sa mainFrame(), currentFrame()
*/
@@ -1985,7 +2005,7 @@ bool QWebPage::javaScriptConfirm(QWebFrame *frame, const QString& msg)
result should be written to \a result and true should be returned. If the prompt was not cancelled by the
user, the implementation should return true and the result string must not be null.
- The default implementation uses QInputDialog::getText.
+ The default implementation uses QInputDialog::getText().
*/
bool QWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QString& defaultValue, QString* result)
{
@@ -2199,6 +2219,8 @@ QSize QWebPage::viewportSize() const
By default, for a newly-created Web page, this property contains a size with
zero width and height.
+
+ \sa QWebFrame::render(), preferredContentsSize
*/
void QWebPage::setViewportSize(const QSize &size) const
{
@@ -2227,11 +2249,12 @@ QSize QWebPage::preferredContentsSize() const
/*!
\property QWebPage::preferredContentsSize
\since 4.6
- \brief the size of the fixed layout
+ \brief the preferred size of the contents
- The size affects the layout of the page in the viewport. If set to a fixed size of
- 1024x768 for example then webkit will layout the page as if the viewport were that size
- rather than something different.
+ If this property is set to a valid size, it is used to lay out the page.
+ If it is not set (the default), the viewport size is used instead.
+
+ \sa viewportSize
*/
void QWebPage::setPreferredContentsSize(const QSize &size) const
{
@@ -2579,9 +2602,11 @@ QAction *QWebPage::action(WebAction action) const
/*!
\property QWebPage::modified
- \brief whether the page contains unsubmitted form data
+ \brief whether the page contains unsubmitted form data, or the contents have been changed.
By default, this property is false.
+
+ \sa contentsChanged(), contentEditable, undoStack()
*/
bool QWebPage::isModified() const
{
@@ -2597,6 +2622,8 @@ bool QWebPage::isModified() const
#ifndef QT_NO_UNDOSTACK
/*!
Returns a pointer to the undo stack used for editable content.
+
+ \sa modified
*/
QUndoStack *QWebPage::undoStack() const
{
@@ -2708,6 +2735,9 @@ bool QWebPage::event(QEvent *ev)
d->touchEvent(static_cast<QTouchEvent*>(ev));
break;
#endif
+ case QEvent::DynamicPropertyChange:
+ d->dynamicPropertyChangeEvent(static_cast<QDynamicPropertyChangeEvent*>(ev));
+ break;
default:
return QObject::event(ev);
}
@@ -2716,7 +2746,7 @@ bool QWebPage::event(QEvent *ev)
}
/*!
- Similar to QWidget::focusNextPrevChild it focuses the next focusable web element
+ Similar to QWidget::focusNextPrevChild() it focuses the next focusable web element
if \a next is true; otherwise the previous element is focused.
Returns true if it can find a new focusable element, or false if it can't.
@@ -2743,6 +2773,8 @@ bool QWebPage::focusNextPrevChild(bool next)
If this property is enabled the contents of the page can be edited by the user through a visible
cursor. If disabled (the default) only HTML elements in the web page with their
\c{contenteditable} attribute set are editable.
+
+ \sa modified, contentsChanged(), WebAction
*/
void QWebPage::setContentEditable(bool editable)
{
@@ -2912,17 +2944,21 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos)
as a result of the user clicking on a "file upload" button in a HTML form where multiple
file selection is allowed.
- \omitvalue ErrorPageExtension (introduced in Qt 4.6)
+ \value ErrorPageExtension Whether the web page can provide an error page when loading fails.
+ (introduced in Qt 4.6)
+
+ \sa ChooseMultipleFilesExtensionOption, ChooseMultipleFilesExtensionReturn, ErrorPageExtensionOption, ErrorPageExtensionReturn
*/
/*!
\enum QWebPage::ErrorDomain
\since 4.6
- \internal
- \value QtNetwork
- \value Http
- \value WebKit
+ This enum describes the domain of an ErrorPageExtensionOption object (i.e. the layer in which the error occurred).
+
+ \value QtNetwork The error occurred in the QtNetwork layer; the error code is of type QNetworkReply::NetworkError.
+ \value Http The error occurred in the HTTP layer; the error code is a HTTP status code (see QNetworkRequest::HttpStatusCodeAttribute).
+ \value WebKit The error is an internal WebKit error.
*/
/*!
@@ -2932,7 +2968,18 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos)
\inmodule QtWebKit
- \sa QWebPage::extension()
+ \sa QWebPage::extension() QWebPage::ExtensionReturn
+*/
+
+
+/*!
+ \class QWebPage::ExtensionReturn
+ \since 4.4
+ \brief The ExtensionReturn class provides an output result from a QWebPage's extension.
+
+ \inmodule QtWebKit
+
+ \sa QWebPage::extension() QWebPage::ExtensionOption
*/
/*!
@@ -2943,12 +2990,38 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos)
\inmodule QtWebKit
- The ErrorPageExtensionOption class holds the \a url for which an error occoured as well as
+ The ErrorPageExtensionOption class holds the \a url for which an error occurred as well as
the associated \a frame.
The error itself is reported by an error \a domain, the \a error code as well as \a errorString.
- \sa QWebPage::ErrorPageExtensionReturn
+ \sa QWebPage::extension() QWebPage::ErrorPageExtensionReturn
+*/
+
+/*!
+ \variable QWebPage::ErrorPageExtensionOption::url
+ \brief the url for which an error occurred
+*/
+
+/*!
+ \variable QWebPage::ErrorPageExtensionOption::frame
+ \brief the frame associated with the error
+*/
+
+/*!
+ \variable QWebPage::ErrorPageExtensionOption::domain
+ \brief the domain that reported the error
+*/
+
+/*!
+ \variable QWebPage::ErrorPageExtensionOption::error
+ \brief the error code. Interpretation of the value depends on the \a domain
+ \sa QWebPage::ErrorDomain
+*/
+
+/*!
+ \variable QWebPage::ErrorPageExtensionOption::errorString
+ \brief a string that describes the error
*/
/*!
@@ -2969,7 +3042,7 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos)
External objects such as stylesheets or images referenced in the HTML are located relative to
\a baseUrl.
- \sa QWebPage::ErrorPageExtensionOption, QString::toUtf8()
+ \sa QWebPage::extension() QWebPage::ErrorPageExtensionOption, QString::toUtf8()
*/
/*!
@@ -2978,6 +3051,29 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos)
Constructs a new error page object.
*/
+
+/*!
+ \variable QWebPage::ErrorPageExtensionReturn::contentType
+ \brief the error page's content type
+*/
+
+/*!
+ \variable QWebPage::ErrorPageExtensionReturn::encoding
+ \brief the error page encoding
+*/
+
+/*!
+ \variable QWebPage::ErrorPageExtensionReturn::baseUrl
+ \brief the base url
+
+ External objects such as stylesheets or images referenced in the HTML are located relative to this url.
+*/
+
+/*!
+ \variable QWebPage::ErrorPageExtensionReturn::content
+ \brief the HTML content of the error page
+*/
+
/*!
\class QWebPage::ChooseMultipleFilesExtensionOption
\since 4.5
@@ -2989,7 +3085,22 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos)
The ChooseMultipleFilesExtensionOption class holds the frame originating the request
and the suggested filenames which might be provided.
- \sa QWebPage::chooseFile(), QWebPage::ChooseMultipleFilesExtensionReturn
+ \sa QWebPage::extension() QWebPage::chooseFile(), QWebPage::ChooseMultipleFilesExtensionReturn
+*/
+
+/*!
+ \variable QWebPage::ChooseMultipleFilesExtensionOption::parentFrame
+ \brief The frame in which the request originated
+*/
+
+/*!
+ \variable QWebPage::ChooseMultipleFilesExtensionOption::suggestedFileNames
+ \brief The suggested filenames
+*/
+
+/*!
+ \variable QWebPage::ChooseMultipleFilesExtensionReturn::fileNames
+ \brief The selected filenames
*/
/*!
@@ -3003,14 +3114,17 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos)
The ChooseMultipleFilesExtensionReturn class holds the filenames selected by the user
when the extension is invoked.
- \sa QWebPage::ChooseMultipleFilesExtensionOption
+ \sa QWebPage::extension() QWebPage::ChooseMultipleFilesExtensionOption
*/
/*!
This virtual function can be reimplemented in a QWebPage subclass to provide support for extensions. The \a option
argument is provided as input to the extension; the output results can be stored in \a output.
- The behavior of this function is determined by \a extension.
+ The behavior of this function is determined by \a extension. The \a option
+ and \a output values are typically casted to the corresponding types (for
+ example, ChooseMultipleFilesExtensionOption and
+ ChooseMultipleFilesExtensionReturn for ChooseMultipleFilesExtension).
You can call supportsExtension() to check if an extension is supported by the page.
@@ -3102,6 +3216,8 @@ QWebSettings *QWebPage::settings() const
A suggested filename may be provided in \a suggestedFile. The frame originating the
request is provided as \a parentFrame.
+
+ \sa ChooseMultipleFilesExtension
*/
QString QWebPage::chooseFile(QWebFrame *parentFrame, const QString& suggestedFile)
{
@@ -3355,6 +3471,15 @@ QString QWebPage::userAgentForUrl(const QUrl&) const
case QSysInfo::SV_9_4:
firstPartTemp += QString::fromLatin1("/9.4");
break;
+ case QSysInfo::SV_SF_2:
+ firstPartTemp += QString::fromLatin1("^2");
+ break;
+ case QSysInfo::SV_SF_3:
+ firstPartTemp += QString::fromLatin1("^3");
+ break;
+ case QSysInfo::SV_SF_4:
+ firstPartTemp += QString::fromLatin1("^4");
+ break;
default:
firstPartTemp += QString::fromLatin1("/Unknown");
}
@@ -3465,7 +3590,7 @@ quint64 QWebPage::totalBytes() const
/*!
Returns the number of bytes that were received from the network to render the current page.
- \sa totalBytes()
+ \sa totalBytes(), loadProgress()
*/
quint64 QWebPage::bytesReceived() const
{
@@ -3497,7 +3622,7 @@ quint64 QWebPage::bytesReceived() const
This signal is emitted when a load of the page is finished.
\a ok will indicate whether the load was successful or any error occurred.
- \sa loadStarted()
+ \sa loadStarted(), ErrorPageExtension
*/
/*!
@@ -3524,12 +3649,15 @@ quint64 QWebPage::bytesReceived() const
\fn void QWebPage::frameCreated(QWebFrame *frame)
This signal is emitted whenever the page creates a new \a frame.
+
+ \sa currentFrame()
*/
/*!
\fn void QWebPage::selectionChanged()
- This signal is emitted whenever the selection changes.
+ This signal is emitted whenever the selection changes, either interactively
+ or programmatically (e.g. by calling triggerAction() with a selection action).
\sa selectedText()
*/
@@ -3541,7 +3669,7 @@ quint64 QWebPage::bytesReceived() const
This signal is emitted whenever the text in form elements changes
as well as other editable content.
- \sa contentEditable, QWebFrame::toHtml(), QWebFrame::toPlainText()
+ \sa contentEditable, modified, QWebFrame::toHtml(), QWebFrame::toPlainText()
*/
/*!
@@ -3617,9 +3745,9 @@ quint64 QWebPage::bytesReceived() const
\fn void QWebPage::microFocusChanged()
This signal is emitted when for example the position of the cursor in an editable form
- element changes. It is used inform input methods about the new on-screen position where
- the user is able to enter text. This signal is usually connected to QWidget's updateMicroFocus()
- slot.
+ element changes. It is used to inform input methods about the new on-screen position where
+ the user is able to enter text. This signal is usually connected to the
+ QWidget::updateMicroFocus() slot.
*/
/*!
@@ -3660,6 +3788,8 @@ quint64 QWebPage::bytesReceived() const
This signal is emitted whenever the web site shown in \a frame is asking to store data
to the database \a databaseName and the quota allocated to that web site is exceeded.
+
+ \sa QWebDatabase
*/
/*!
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
index 0712d0c..5350cd9 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
@@ -112,6 +112,8 @@ public:
void inputMethodEvent(QInputMethodEvent*);
+ void dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent*);
+
void shortcutOverrideEvent(QKeyEvent*);
void leaveEvent(QEvent*);
void handleClipboard(QEvent*, Qt::MouseButton);
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp
index 8ff13b1..f715430 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp
@@ -23,25 +23,40 @@
/*!
\class QWebPluginFactory
\since 4.4
- \brief The QWebPluginFactory class creates plugins to be embedded into web
- pages.
+ \brief The QWebPluginFactory class is used to embed custom data types in web pages.
\inmodule QtWebKit
- QWebPluginFactory is a factory for creating plugins for QWebPage. A plugin
- factory can be installed on a QWebPage using QWebPage::setPluginFactory().
+ The HTML \c{<object>} tag is used to embed arbitrary content into a web page,
+ for example:
+
+ \code
+ <object type="application/x-pdf" data="http://qt.nokia.com/document.pdf" width="500" height="400"></object>
+ \endcode
+
+ QtWebkit will natively handle the most basic data types like \c{text/html} and
+ \c{image/jpeg}, but for any advanced or custom data types you will need to
+ provide a handler yourself.
+
+ QWebPluginFactory is a factory for creating plugins for QWebPage, where each
+ plugin provides support for one or more data types. A plugin factory can be
+ installed on a QWebPage using QWebPage::setPluginFactory().
\note The plugin factory is only used if plugins are enabled through QWebSettings.
- You can provide a QWebPluginFactory by implementing the plugins() and the
- create() method. For plugins() it is necessary to describe the plugins the
+ You provide a QWebPluginFactory by implementing the plugins() and the
+ create() methods. For plugins() it is necessary to describe the plugins the
factory can create, including a description and the supported MIME types.
The MIME types each plugin can handle should match the ones specified in
- in the HTML \c{<object>} tag.
+ in the HTML \c{<object>} tag of your content.
The create() method is called if the requested MIME type is supported. The
implementation has to return a new instance of the plugin requested for the
given MIME type and the specified URL.
+
+ The plugins themselves are subclasses of QObject, but currently only plugins
+ based on either QWidget or QGraphicsWidget are supported.
+
*/
@@ -183,6 +198,7 @@ void QWebPluginFactory::refreshPlugins()
/*!
\enum QWebPluginFactory::Extension
+ \internal
This enum describes the types of extensions that the plugin factory can support. Before using these extensions, you
should verify that the extension is supported by calling supportsExtension().
@@ -192,6 +208,7 @@ void QWebPluginFactory::refreshPlugins()
/*!
\class QWebPluginFactory::ExtensionOption
+ \internal
\since 4.4
\brief The ExtensionOption class provides an extended input argument to QWebPluginFactory's extension support.
@@ -202,6 +219,7 @@ void QWebPluginFactory::refreshPlugins()
/*!
\class QWebPluginFactory::ExtensionReturn
+ \internal
\since 4.4
\brief The ExtensionOption class provides an extended output argument to QWebPluginFactory's extension support.
@@ -214,6 +232,8 @@ void QWebPluginFactory::refreshPlugins()
This virtual function can be reimplemented in a QWebPluginFactory subclass to provide support for extensions. The \a option
argument is provided as input to the extension; the output results can be stored in \a output.
+ \internal
+
The behaviour of this function is determined by \a extension.
You can call supportsExtension() to check if an extension is supported by the factory.
@@ -233,6 +253,8 @@ bool QWebPluginFactory::extension(Extension extension, const ExtensionOption *op
/*!
This virtual function returns true if the plugin factory supports \a extension; otherwise false is returned.
+ \internal
+
\sa extension()
*/
bool QWebPluginFactory::supportsExtension(Extension extension) const
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp
index 6c26bd7..7179eaa 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsecurityorigin.cpp
@@ -63,6 +63,16 @@ void QWEBKIT_EXPORT qt_drt_setDomainRelaxationForbiddenForURLScheme(bool forbidd
\c{http://www.malicious.com/evil.html} from accessing \c{http://www.example.com/}'s resources,
because they are of a different security origin.
+ By default local schemes like \c{file://} and \c{qrc://} are concidered to be in the same
+ security origin, and can access each other's resources. You can add additional local schemes
+ by using QWebSecurityOrigin::addLocalScheme(), or override the default same-origin behavior
+ by setting QWebSettings::LocalContentCanAccessFileUrls to \c{false}.
+
+ \note Local resources are by default restricted from accessing remote content, which
+ means your \c{file://} will not be able to access \c{http://domain.com/foo.html}. You
+ can relax this restriction by setting QWebSettings::LocalContentCanAccessRemoteUrls to
+ \c{true}.
+
Call QWebFrame::securityOrigin() to get the QWebSecurityOrigin for a frame in a
web page, and use host(), scheme() and port() to identify the security origin.
@@ -219,7 +229,11 @@ QList<QWebDatabase> QWebSecurityOrigin::databases() const
\since 4.6
Adds the given \a scheme to the list of schemes that are considered equivalent
- to the \c file: scheme. They are not subject to cross domain restrictions.
+ to the \c file: scheme.
+
+ Cross domain restrictions depend on the two web settings QWebSettings::LocalContentCanAccessFileUrls
+ and QWebSettings::LocalContentCanAccessFileUrls. By default all local schemes are concidered to be
+ in the same security origin, and local schemes can not access remote content.
*/
void QWebSecurityOrigin::addLocalScheme(const QString& scheme)
{
@@ -231,6 +245,9 @@ void QWebSecurityOrigin::addLocalScheme(const QString& scheme)
Removes the given \a scheme from the list of local schemes.
+ \note You can not remove the \c{file://} scheme from the list
+ of local schemes.
+
\sa addLocalScheme()
*/
void QWebSecurityOrigin::removeLocalScheme(const QString& scheme)
@@ -240,7 +257,10 @@ void QWebSecurityOrigin::removeLocalScheme(const QString& scheme)
/*!
\since 4.6
- Returns a list of all the schemes that were set by the application as local schemes,
+ Returns a list of all the schemes concidered to be local.
+
+ By default this is \c{file://} and \c{qrc://}.
+
\sa addLocalScheme(), removeLocalScheme()
*/
QStringList QWebSecurityOrigin::localSchemes()
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
index 2305c7f..115f9fc 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
@@ -289,8 +289,8 @@ QWebSettings* QWebSettings::globalSettings()
function. The \l{QWebSettings::WebAttribute}{WebAttribute} enum further describes
each attribute.
- QWebSettings also configures global properties such as the Web page memory
- cache and the Web page icon database, local database storage and offline
+ QWebSettings also configures global properties such as the web page memory
+ cache, icon database, local database storage and offline
applications storage.
\section1 Enabling Plugins
@@ -299,8 +299,8 @@ QWebSettings* QWebSettings::globalSettings()
\l{QWebSettings::PluginsEnabled}{PluginsEnabled} attribute. For many applications,
this attribute is enabled for all pages by setting it on the
\l{globalSettings()}{global settings object}. QtWebKit will always ignore this setting
- \when processing Qt plugins. The decision to allow a Qt plugin is made by the client
- \in its reimplementation of QWebPage::createPlugin.
+ when processing Qt plugins. The decision to allow a Qt plugin is made by the client
+ in its reimplementation of QWebPage::createPlugin().
\section1 Web Application Support
@@ -339,7 +339,7 @@ QWebSettings* QWebSettings::globalSettings()
\value MinimumFontSize The hard minimum font size.
\value MinimumLogicalFontSize The minimum logical font size that is applied
- after zooming with QWebFrame's textSizeMultiplier().
+ when zooming out with QWebFrame::setTextSizeMultiplier().
\value DefaultFontSize The default font size for regular text.
\value DefaultFixedFontSize The default font size for fixed-pitch text.
*/
@@ -361,66 +361,74 @@ QWebSettings* QWebSettings::globalSettings()
This enum describes various attributes that are configurable through QWebSettings.
\value AutoLoadImages Specifies whether images are automatically loaded in
- web pages.
+ web pages. This is enabled by default.
\value DnsPrefetchEnabled Specifies whether QtWebkit will try to pre-fetch DNS entries to
- speed up browsing. This only works as a global attribute. Only for Qt 4.6 and later.
+ speed up browsing. This only works as a global attribute. Only for Qt 4.6 and later. This is disabled by default.
\value JavascriptEnabled Enables or disables the running of JavaScript
- programs.
+ programs. This is enabled by default
\value JavaEnabled Enables or disables Java applets.
Currently Java applets are not supported.
- \value PluginsEnabled Enables or disables plugins in Web pages. Qt plugins
- with a mimetype such as "application/x-qt-plugin" are not affected by this setting.
+ \value PluginsEnabled Enables or disables plugins in Web pages (e.g. using NPAPI). Qt plugins
+ with a mimetype such as "application/x-qt-plugin" are not affected by this setting. This is disabled by default.
\value PrivateBrowsingEnabled Private browsing prevents WebKit from
- recording visited pages in the history and storing web page icons.
+ recording visited pages in the history and storing web page icons. This is disabled by default.
\value JavascriptCanOpenWindows Specifies whether JavaScript programs
- can open new windows.
+ can open new windows. This is disabled by default.
\value JavascriptCanAccessClipboard Specifies whether JavaScript programs
- can read or write to the clipboard.
+ can read or write to the clipboard. This is disabled by default.
\value DeveloperExtrasEnabled Enables extra tools for Web developers.
Currently this enables the "Inspect" element in the context menu as
- well as the use of QWebInspector which controls the WebKit WebInspector
- for web site debugging.
+ well as the use of QWebInspector which controls the web inspector
+ for web site debugging. This is disabled by default.
\value SpatialNavigationEnabled Enables or disables the Spatial Navigation
feature, which consists in the ability to navigate between focusable
elements in a Web page, such as hyperlinks and form controls, by using
- Left, Right, Up and Down arrow keys. For example, if an user presses the
+ Left, Right, Up and Down arrow keys. For example, if a user presses the
Right key, heuristics determine whether there is an element he might be
- trying to reach towards the right, and if there are multiple elements,
- which element he probably wants.
+ trying to reach towards the right and which element he probably wants.
+ This is disabled by default.
\value LinksIncludedInFocusChain Specifies whether hyperlinks should be
- included in the keyboard focus chain.
- \value ZoomTextOnly Specifies whether the zoom factor on a frame applies to
- only the text or all content.
+ included in the keyboard focus chain. This is enabled by default.
+ \value ZoomTextOnly Specifies whether the zoom factor on a frame applies
+ only to the text or to all content. This is disabled by default.
\value PrintElementBackgrounds Specifies whether the background color and images
- are also drawn when the page is printed.
+ are also drawn when the page is printed. This is enabled by default.
\value OfflineStorageDatabaseEnabled Specifies whether support for the HTML 5
- offline storage feature is enabled or not. Disabled by default.
+ offline storage feature is enabled or not. This is disabled by default.
\value OfflineWebApplicationCacheEnabled Specifies whether support for the HTML 5
- web application cache feature is enabled or not. Disabled by default.
+ web application cache feature is enabled or not. This is disabled by default.
\value LocalStorageEnabled Specifies whether support for the HTML 5
- local storage feature is enabled or not. Disabled by default.
+ local storage feature is enabled or not. This is disabled by default.
\value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use
QWebSettings::LocalStorageEnabled instead.
- \value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls.
- \value LocalContentCanAccessFileUrls Specifies whether locally loaded documents are allowed to access other local urls.
- \value XSSAuditorEnabled Specifies whether load requests should be monitored for cross-site scripting attempts.
+ \value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are
+ allowed to access remote urls. This is disabled by default. For more information
+ about security origins and local vs. remote content see QWebSecurityOrigin.
+ \value LocalContentCanAccessFileUrls Specifies whether locally loaded documents are
+ allowed to access other local urls. This is enabled by default. For more information
+ about security origins and local vs. remote content see QWebSecurityOrigin.
+ \value XSSAuditingEnabled Specifies whether load requests should be monitored for cross-site
+ scripting attempts. Suspicious scripts will be blocked and reported in the inspector's
+ JavaScript console. Enabling this feature might have an impact on performance
+ and it is disabled by default.
\value AcceleratedCompositingEnabled This feature, when used in conjunction with
QGraphicsWebView, accelerates animations of web content. CSS animations of the transform and
opacity properties will be rendered by composing the cached content of the animated elements.
- This feature is enabled by default
+ This is enabled by default.
\value TiledBackingStoreEnabled This setting enables the tiled backing store feature
for a QGraphicsWebView. With the tiled backing store enabled, the web page contents in and around
the current visible area is speculatively cached to bitmap tiles. The tiles are automatically kept
in sync with the web page as it changes. Enabling tiling can significantly speed up painting heavy
operations like scrolling. Enabling the feature increases memory consumption. It does not work well
with contents using CSS fixed positioning (see also \l{QGraphicsWebView::}{resizesToContents} property).
- \l{QGraphicsWebView::}{tiledBackingStoreFrozen} property allows application to temporarily freeze the contents of the backing store.
+ \l{QGraphicsWebView::}{tiledBackingStoreFrozen} property allows application to temporarily
+ freeze the contents of the backing store. This is disabled by default.
\value FrameFlatteningEnabled With this setting each subframe is expanded to its contents.
On touch devices, it is desired to not have any scrollable sub parts of the page
as it results in a confusing user experience, with scrolling sometimes scrolling sub parts
and at other times scrolling the page itself. For this reason iframes and framesets are
barely usable on touch devices. This will flatten all the frames to become one scrollable page.
- Disabled by default.
+ This is disabled by default.
*/
/*!
@@ -454,7 +462,6 @@ QWebSettings::QWebSettings()
d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false);
d->attributes.insert(QWebSettings::LocalContentCanAccessFileUrls, true);
d->attributes.insert(QWebSettings::AcceleratedCompositingEnabled, true);
- d->attributes.insert(QWebSettings::WebGLEnabled, false);
d->attributes.insert(QWebSettings::TiledBackingStoreEnabled, false);
d->attributes.insert(QWebSettings::FrameFlatteningEnabled, false);
d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
@@ -526,7 +533,8 @@ void QWebSettings::resetFontSize(FontSize type)
with UTF-8 and Base64 encoded data, such as:
"data:text/css;charset=utf-8;base64,cCB7IGJhY2tncm91bmQtY29sb3I6IHJlZCB9Ow=="
- NOTE: In case the base 64 data is not valid the style will not be applied.
+
+ \note If the base64 data is not valid, the style will not be applied.
\sa userStyleSheetUrl()
*/
@@ -577,9 +585,11 @@ QString QWebSettings::defaultTextEncoding() const
Sets the path of the icon database to \a path. The icon database is used
to store "favicons" associated with web sites.
- \a path must point to an existing directory where the icons are stored.
+ \a path must point to an existing directory.
Setting an empty path disables the icon database.
+
+ \sa iconDatabasePath(), clearIconDatabase()
*/
void QWebSettings::setIconDatabasePath(const QString& path)
{
@@ -622,7 +632,7 @@ void QWebSettings::clearIconDatabase()
/*!
Returns the web site's icon for \a url.
- If the web site does not specify an icon, or the icon is not in the
+ If the web site does not specify an icon \bold OR if the icon is not in the
database, a null QIcon is returned.
\note The returned icon's size is arbitrary.
@@ -659,7 +669,7 @@ QWebPluginDatabase *QWebSettings::pluginDatabase()
Sets \a graphic to be drawn when QtWebKit needs to draw an image of the
given \a type.
- For example, when an image cannot be loaded the pixmap specified by
+ For example, when an image cannot be loaded, the pixmap specified by
\l{QWebSettings::WebGraphic}{MissingImageGraphic} is drawn instead.
\sa webGraphic()
@@ -677,9 +687,6 @@ void QWebSettings::setWebGraphic(WebGraphic type, const QPixmap& graphic)
Returns a previously set pixmap used to draw replacement graphics of the
specified \a type.
- For example, when an image cannot be loaded the pixmap specified by
- \l{QWebSettings::WebGraphic}{MissingImageGraphic} is drawn instead.
-
\sa setWebGraphic()
*/
QPixmap QWebSettings::webGraphic(WebGraphic type)
@@ -720,8 +727,7 @@ void QWebSettings::clearMemoryCaches()
Sets the maximum number of pages to hold in the memory page cache to \a pages.
The Page Cache allows for a nicer user experience when navigating forth or back
- to pages in the forward/back history, by pausing and resuming up to \a pages
- per page group.
+ to pages in the forward/back history, by pausing and resuming up to \a pages.
For more information about the feature, please refer to:
@@ -793,8 +799,8 @@ QString QWebSettings::fontFamily(FontFamily which) const
}
/*!
- Resets the actual font family to the default font family, specified by
- \a which.
+ Resets the actual font family specified by \a which to the one set
+ in the global QWebSettings instance.
This function has no effect on the global QWebSettings instance.
*/
@@ -836,7 +842,9 @@ bool QWebSettings::testAttribute(WebAttribute attr) const
/*!
\fn void QWebSettings::resetAttribute(WebAttribute attribute)
- Resets the setting of \a attribute.
+ Resets the setting of \a attribute to the value specified in the
+ global QWebSettings instance.
+
This function has no effect on the global QWebSettings instance.
\sa globalSettings()
@@ -852,12 +860,15 @@ void QWebSettings::resetAttribute(WebAttribute attr)
/*!
\since 4.5
- Sets the path for HTML5 offline storage to \a path.
+ Sets \a path as the save location for HTML5 client-side database storage data.
- \a path must point to an existing directory where the databases are stored.
+ \a path must point to an existing directory.
Setting an empty path disables the feature.
+ Support for client-side databases can enabled by setting the
+ \l{QWebSettings::OfflineStorageDatabaseEnabled}{OfflineStorageDatabaseEnabled} attribute.
+
\sa offlineStoragePath()
*/
void QWebSettings::setOfflineStoragePath(const QString& path)
@@ -870,7 +881,7 @@ void QWebSettings::setOfflineStoragePath(const QString& path)
/*!
\since 4.5
- Returns the path of the HTML5 offline storage or an empty string if the
+ Returns the path of the HTML5 client-side database storage or an empty string if the
feature is disabled.
\sa setOfflineStoragePath()
@@ -907,22 +918,24 @@ qint64 QWebSettings::offlineStorageDefaultQuota()
/*!
\since 4.6
- \relates QWebSettings
Sets the path for HTML5 offline web application cache storage to \a path.
An application cache acts like an HTTP cache in some sense. For documents
- that use the application cache via JavaScript, the loader mechinery will
+ that use the application cache via JavaScript, the loader engine will
first ask the application cache for the contents, before hitting the
network.
The feature is described in details at:
http://dev.w3.org/html5/spec/Overview.html#appcache
- \a path must point to an existing directory where the cache is stored.
+ \a path must point to an existing directory.
Setting an empty path disables the feature.
+ Support for offline web application cache storage can enabled by setting the
+ \l{QWebSettings::OfflineWebApplicationCacheEnabled}{OfflineWebApplicationCacheEnabled} attribute.
+
\sa offlineWebApplicationCachePath()
*/
void QWebSettings::setOfflineWebApplicationCachePath(const QString& path)
@@ -934,7 +947,6 @@ void QWebSettings::setOfflineWebApplicationCachePath(const QString& path)
/*!
\since 4.6
- \relates QWebSettings
Returns the path of the HTML5 offline web application cache storage
or an empty string if the feature is disabled.
@@ -981,7 +993,6 @@ qint64 QWebSettings::offlineWebApplicationCacheQuota()
/*!
\since 4.6
- \relates QWebSettings
Sets the path for HTML5 local storage to \a path.
@@ -1026,7 +1037,6 @@ QUrl QWebSettings::inspectorUrl() const
/*!
\since 4.6
- \relates QWebSettings
Returns the path for HTML5 local storage.
@@ -1039,13 +1049,14 @@ QString QWebSettings::localStoragePath() const
/*!
\since 4.6
- \relates QWebSettings
- Enables WebKit persistent data and sets the path to \a path.
- If the \a path is empty the path for persistent data is set to the
- user-specific data location specified by
- \l{QDesktopServices::DataLocation}{DataLocation}.
-
+ Enables WebKit data persistence and sets the path to \a path.
+ If \a path is empty, the user-specific data location specified by
+ \l{QDesktopServices::DataLocation}{DataLocation} will be used instead.
+
+ This method will simultaneously set and enable the iconDatabasePath(),
+ localStoragePath(), offlineStoragePath() and offlineWebApplicationCachePath().
+
\sa localStoragePath()
*/
void QWebSettings::enablePersistentStorage(const QString& path)
@@ -1053,8 +1064,9 @@ void QWebSettings::enablePersistentStorage(const QString& path)
QString storagePath;
if (path.isEmpty()) {
+#ifndef QT_NO_DESKTOPSERVICES
storagePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
-
+#endif
if (storagePath.isEmpty())
storagePath = WebCore::pathByAppendingComponent(QDir::homePath(), QCoreApplication::applicationName());
} else
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h
index caba0d5..3592e2c 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h
@@ -63,14 +63,13 @@ public:
OfflineStorageDatabaseEnabled,
OfflineWebApplicationCacheEnabled,
LocalStorageEnabled,
-#ifdef QT_DEPRECATED
+#if defined(QT_DEPRECATED) || defined(qdoc)
LocalStorageDatabaseEnabled = LocalStorageEnabled,
#endif
LocalContentCanAccessRemoteUrls,
DnsPrefetchEnabled,
XSSAuditorEnabled,
AcceleratedCompositingEnabled,
- WebGLEnabled,
SpatialNavigationEnabled,
LocalContentCanAccessFileUrls,
TiledBackingStoreEnabled,
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 6e450c2..efc8f27 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,203 @@
+2010-05-14 Kent Hansen <kent.hansen@nokia.com>, Jocelyn Turcotte <jocelyn.turcotte@nokia.com>, Tor Arne Vestbø <tor.arne.vestbo@nokia.com>, Henry Haverinen <henry.haverinen@nokia.com>, Jedrzej Nowacki <jedrzej.nowacki@nokia.com>, Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Merge overhaul of the QtWebKit API documentation
+
+ Numerous improvements in wording, qdoc warning fixes and
+ clarifications, done in a team work effort.
+
+ No functional changes.
+
+ * Api/qwebdatabase.cpp:
+ * Api/qwebelement.cpp:
+ * Api/qwebframe.cpp:
+ * Api/qwebhistoryinterface.cpp:
+ * Api/qwebinspector.cpp:
+ * Api/qwebkitversion.cpp:
+ * Api/qwebpage.cpp:
+ * Api/qwebpluginfactory.cpp:
+ * Api/qwebsecurityorigin.cpp:
+ * Api/qwebsettings.cpp:
+ * Api/qwebsettings.h:
+ * docs/qtwebkit.qdoc:
+ * docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp:
+ (wrapInFunction):
+ * docs/webkitsnippets/webelement/main.cpp:
+ (findButtonAndClick):
+ (autocomplete1):
+ (autocomplete2):
+ (main):
+
+2010-05-14 Martin Smith <msmith@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ Documentation: Fix overview grouping.
+
+ * docs/qtwebkit.qdoc:
+
+2010-05-14 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [QT] Update the Symbian version for the user agent
+ https://bugs.webkit.org/show_bug.cgi?id=38389
+
+ Update the user agent for Symbian^2 to Symbian^4
+
+ * Api/qwebpage.cpp:
+ (QWebPage::userAgentForUrl):
+
+2010-05-11 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Kenneth Christiansen.
+
+ [Qt] emit initialLayoutCompleted signal from FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout
+ https://bugs.webkit.org/show_bug.cgi?id=38921
+
+ Emit initialLayoutCompleted signal from FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout
+ instead of FrameLoaderClientQt::dispatchDidFirstLayout , because the former ensures that a
+ visual content layed out on the frame.
+
+ It matches to QWebFrame::initialLayoutCompleted signal documentation at:
+
+ "... This is the first time you will see contents displayed on the frame ..."
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDidFirstLayout):
+ (WebCore::FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout):
+
+2010-05-11 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] REGRESSION(r58497) tst_QGraphicsWebView::crashOnViewlessWebPages() is failing
+ https://bugs.webkit.org/show_bug.cgi?id=38655
+
+ Fix double free by moving the connect till after the resize.
+
+ The bug is causes by the fact that a resize of an empty page causes a
+ layout, thus deleting the qgraphicswebview before setHtml is called,
+ which then deletes it again, causing a double free.
+
+ * tests/qgraphicswebview/tst_qgraphicswebview.cpp:
+ (tst_QGraphicsWebView::crashOnViewlessWebPages):
+
+2010-05-11 Diego Gonzalez <diegohcg@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] tst_QWebPage::inputMethods failing on Maemo5
+ https://bugs.webkit.org/show_bug.cgi?id=38685
+
+ Check if the SIP (Software Input Panel) is triggered, which normally
+ happens on mobile platforms, when a user input form receives a mouse click.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::inputMethods):
+
+2010-05-09 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Crash in QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate when animation were used
+ https://bugs.webkit.org/show_bug.cgi?id=38574
+
+ The fix uses a QWeakPointer for rootGraphicsLayer, protecting from a crash in case the layer is deleted before the QGraphicsWebView.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate):
+ (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate):
+ (QGraphicsWebViewPrivate::setRootGraphicsLayer):
+ (QGraphicsWebViewPrivate::updateCompositingScrollPosition):
+
+2010-05-03 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Expose HTMLTokenizer yielding parameters
+ https://bugs.webkit.org/show_bug.cgi?id=37023
+
+ Enables to set TimeDelay and ChunkSize for
+ HTMLTokenizer.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dynamicPropertyChangeEvent):
+
+2010-05-04 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QWebPage viewMode property
+ https://bugs.webkit.org/show_bug.cgi?id=38119
+
+ Rename the property from wrt_viewMode to _q_viewMode.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dynamicPropertyChangeEvent):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::viewModes):
+
+2010-04-28 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QWebPage viewMode property
+ https://bugs.webkit.org/show_bug.cgi?id=38119
+
+ Replacing method qt_wrt_setViewMode by wrt_viewMode property.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dynamicPropertyChangeEvent):
+ (QWebPage::event):
+ * Api/qwebpage_p.h:
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::wrt_viewModes):
+
+2010-04-09 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt]Fix compile error with QT_NO_IM
+ https://bugs.webkit.org/show_bug.cgi?id=36533
+
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ (WebCore::QtFallbackWebPopupCombo::hidePopup):
+
+2010-04-02 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt]Fix compile error with QT_NO_SETTINGS
+ https://bugs.webkit.org/show_bug.cgi?id=36533
+
+ If QT_NO_SETTINGS is defined, QSettings is not available.
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::populateSetting):
+ (WebCore::InspectorClientQt::storeSetting):
+
+2010-03-25 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt]Fix compile error with QT_NO_DESKTOPSERVICES
+ https://bugs.webkit.org/show_bug.cgi?id=36533
+
+ * Api/qwebsettings.cpp:
+ (QWebSettings::enablePersistentStorage):
+
+2010-03-25 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt]Fix compile error with QT_NO_DEBUG_STREAM
+ https://bugs.webkit.org/show_bug.cgi?id=36533
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::graphicsItemVisibleRect):
+
2010-04-29 Janne Koskinen <janne.p.koskinen@digia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 4ad008b..686bfcc 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -414,13 +414,13 @@ void FrameLoaderClientQt::dispatchDidFinishLoad()
void FrameLoaderClientQt::dispatchDidFirstLayout()
{
- if (m_webFrame)
- emit m_webFrame->initialLayoutCompleted();
+ notImplemented();
}
void FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout()
{
- notImplemented();
+ if (m_webFrame)
+ emit m_webFrame->initialLayoutCompleted();
}
void FrameLoaderClientQt::dispatchShow()
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index c0c78ba..7fabbda 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -110,6 +110,11 @@ void InspectorClientQt::hideHighlight()
void InspectorClientQt::populateSetting(const String& key, String* setting)
{
+#ifdef QT_NO_SETTINGS
+ Q_UNUSED(key)
+ Q_UNUSED(setting)
+ qWarning("QWebInspector: QSettings is not supported by Qt.");
+#else
QSettings qsettings;
if (qsettings.status() == QSettings::AccessError) {
// QCoreApplication::setOrganizationName and QCoreApplication::setApplicationName haven't been called
@@ -123,10 +128,16 @@ void InspectorClientQt::populateSetting(const String& key, String* setting)
QVariant storedValue = qsettings.value(settingKey);
storedValue.convert(QVariant::nameToType(storedValueType.toAscii().data()));
*setting = variantToSetting(storedValue);
+#endif // QT_NO_SETTINGS
}
void InspectorClientQt::storeSetting(const String& key, const String& setting)
{
+#ifdef QT_NO_SETTINGS
+ Q_UNUSED(key)
+ Q_UNUSED(setting)
+ qWarning("QWebInspector: QSettings is not supported by Qt.");
+#else
QSettings qsettings;
if (qsettings.status() == QSettings::AccessError) {
qWarning("QWebInspector: QSettings couldn't persist configuration setting [%s].",
@@ -138,6 +149,7 @@ void InspectorClientQt::storeSetting(const String& key, const String& setting)
QString settingKey(settingStoragePrefix + QString(key));
qsettings.setValue(settingKey, valueToStore);
qsettings.setValue(settingKey + settingStorageTypeSuffix, QVariant::typeToName(valueToStore.type()));
+#endif // QT_NO_SETTINGS
}
static String variantToSetting(const QVariant& qvariant)
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
index 65a28fe..7514077 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
@@ -55,6 +55,7 @@ void QtFallbackWebPopupCombo::showPopup()
void QtFallbackWebPopupCombo::hidePopup()
{
+#ifndef QT_NO_IM
QWidget* activeFocus = QApplication::focusWidget();
if (activeFocus && activeFocus == QComboBox::view()
&& activeFocus->testAttribute(Qt::WA_InputMethodEnabled)) {
@@ -64,6 +65,7 @@ void QtFallbackWebPopupCombo::hidePopup()
qic->setFocusWidget(0);
}
}
+#endif // QT_NO_IM
QComboBox::hidePopup();
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
index 9e653e4..c6dd550 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
+++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
@@ -5,63 +5,11 @@
\previouspage QtSvg
\nextpage QtXml
\ingroup modules
+ \ingroup technology-apis
+
\brief The QtWebKit module provides a web browser engine as well as
classes to render and interact with web content.
- To include the definitions of the module's classes, use the
- following directive:
-
- \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 1
-
- To link against the module, add this line to your \l qmake \c
- .pro file:
-
- \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 0
-
- \section1 License Information
-
- This is a snapshot of the Qt port of WebKit. The exact version information
- can be found in the \c{src/3rdparty/webkit/VERSION} file supplied with Qt.
-
- Qt Commercial Edition licensees that wish to distribute applications that
- use the QtWebKit module need to be aware of their obligations under the
- GNU Library General Public License (LGPL).
-
- Developers using the Open Source Edition can choose to redistribute
- the module under the appropriate version of the GNU LGPL.
-
- \legalese
- WebKit is licensed under the GNU Library General Public License.
- 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.
- \endlegalese
-*/
-
-/*!
- \page webintegration.html
- \title Integrating Web Content with QtWebKit
- \since 4.4
-
- \ingroup frameworks-technologies
-
- \keyword Browser
- \keyword Web Browser
-
QtWebKit provides a Web browser engine that makes it easy to embed content
from the World Wide Web into your Qt application. At the same time Web
content can be enhanced with native controls.
@@ -83,6 +31,20 @@
QtWebKit is based on the Open Source WebKit engine. More information about
WebKit itself can be found on the \l{WebKit Open Source Project} Web site.
+ \section1 Including In Your Project
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 1
+
+ To link against the module, add this line to your \l qmake \c
+ .pro file:
+
+ \snippet webkitsnippets/qtwebkit_build_snippet.qdoc 0
+
+ \section1 Notes
+
\note Building the QtWebKit module with debugging symbols is problematic
on many platforms due to the size of the WebKit engine. We recommend
building the module only in release mode for embedded platforms.
@@ -97,10 +59,6 @@
Embedded Linux systems. See the \l{Qt for Embedded Linux Requirements}
document for more information.
- Topics:
-
- \tableofcontents
-
\section1 Architecture
The easiest way to render content is through the QWebView class. As a
@@ -193,4 +151,39 @@
\o The system \c{/Library/Internet Plug-Ins} directory
\endlist
\endtable
+
+
+ \section1 License Information
+
+ This is a snapshot of the Qt port of WebKit. The exact version information
+ can be found in the \c{src/3rdparty/webkit/VERSION} file supplied with Qt.
+
+ Qt Commercial Edition licensees that wish to distribute applications that
+ use the QtWebKit module need to be aware of their obligations under the
+ GNU Library General Public License (LGPL).
+
+ Developers using the Open Source Edition can choose to redistribute
+ the module under the appropriate version of the GNU LGPL.
+
+ \legalese
+ WebKit is licensed under the GNU Library General Public License.
+ 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.
+ \endlegalese
*/
+
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp
index a6b6620..07f1d45 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp
@@ -9,8 +9,6 @@ void wrapInFunction()
QWebInspector *inspector = new QWebInspector;
inspector->setPage(page);
-
- connect(page, SIGNAL(webInspectorTriggered(QWebElement)), inspector, SLOT(show()));
//! [0]
}
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webelement/main.cpp b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webelement/main.cpp
index 822b61c..b1781a6 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webelement/main.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/webelement/main.cpp
@@ -36,6 +36,59 @@ static void traverse()
//! [Traversing with QWebElement]
}
+static void findButtonAndClick()
+{
+
+ frame->setHtml("<form name=\"myform\" action=\"submit_form.asp\" method=\"get\">"
+ "<input type=\"text\" name=\"myfield\">"
+ "<input type=\"submit\" value=\"Submit\">"
+ "</form>");
+
+//! [Calling a DOM element method]
+
+ QWebElement document = frame->documentElement();
+ /* Assume that the document has the following structure:
+
+ <form name="myform" action="submit_form.asp" method="get">
+ <input type="text" name="myfield">
+ <input type="submit" value="Submit">
+ </form>
+
+ */
+
+ QWebElement button = document.findFirst("input[type=submit]");
+ button.evaluateJavaScript("click()");
+
+//! [Calling a DOM element method]
+
+ }
+
+static void autocomplete1()
+{
+ QWebElement document = frame->documentElement();
+
+//! [autocomplete1]
+ QWebElement firstTextInput = document.findFirst("input[type=text]");
+ QString storedText = firstTextInput.attribute("value");
+//! [autocomplete1]
+
+}
+
+
+static void autocomplete2()
+{
+
+ QWebElement document = frame->documentElement();
+ QString storedText = "text";
+
+//! [autocomplete2]
+ QWebElement firstTextInput = document.findFirst("input[type=text]");
+ textInput.setAttribute("value", storedText);
+//! [autocomplete2]
+
+}
+
+
static void findAll()
{
//! [FindAll]
@@ -65,5 +118,8 @@ int main(int argc, char *argv[])
frame = view->page()->mainFrame();
traverse();
findAll();
+ findButtonAndClick();
+ autocomplete1();
+ autocomplete2();
return 0;
}
diff --git a/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def b/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def
index a450f9e..910ba8f 100644
--- a/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def
+++ b/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def
@@ -642,7 +642,7 @@ EXPORTS
?qt_drt_webinspector_executeScript@@YAXPAVQWebPage@@JABVQString@@@Z @ 641 NONAME ; void qt_drt_webinspector_executeScript(class QWebPage *, long, class QString const &)
?qt_drt_webinspector_show@@YAXPAVQWebPage@@@Z @ 642 NONAME ; void qt_drt_webinspector_show(class QWebPage *)
?qt_drt_workerThreadCount@@YAHXZ @ 643 NONAME ; int qt_drt_workerThreadCount(void)
- ?qt_wrt_setViewMode@@YAXPAVQWebPage@@ABVQString@@@Z @ 644 NONAME ; void qt_wrt_setViewMode(class QWebPage *, class QString const &)
+ ?qt_wrt_setViewMode@@YAXPAVQWebPage@@ABVQString@@@Z @ 644 NONAME ABSENT ; void qt_wrt_setViewMode(class QWebPage *, class QString const &)
?qtwebkit_webframe_scrollRecursively@@YAXPAVQWebFrame@@HHABVQPoint@@@Z @ 645 NONAME ; void qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int, class QPoint const &)
?resizesToContents@QGraphicsWebView@@QBE_NXZ @ 646 NONAME ; bool QGraphicsWebView::resizesToContents(void) const
?scrollToAnchor@QWebFrame@@QAEXABVQString@@@Z @ 647 NONAME ; void QWebFrame::scrollToAnchor(class QString const &)
diff --git a/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def b/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
index 145fe0b..ca462d0 100644
--- a/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
+++ b/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
@@ -716,7 +716,7 @@ EXPORTS
_ZN13QWebInspector10closeEventEP11QCloseEvent @ 715 NONAME
_ZN16QGraphicsWebView26setTiledBackingStoreFrozenEb @ 716 NONAME
_ZNK16QGraphicsWebView25isTiledBackingStoreFrozenEv @ 717 NONAME
- _Z18qt_wrt_setViewModeP8QWebPageRK7QString @ 718 NONAME
+ _Z18qt_wrt_setViewModeP8QWebPageRK7QString @ 718 NONAME ABSENT
_Z19qt_drt_setMediaTypeP9QWebFrameRK7QString @ 719 NONAME
_Z26qt_drt_enableCaretBrowsingP8QWebPageb @ 720 NONAME
_ZNK12QWebSettings12inspectorUrlEv @ 721 NONAME
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
index 14f5820..ebe847d 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
@@ -84,16 +84,19 @@ void tst_QGraphicsWebView::crashOnViewlessWebPages()
WebPage* page = new WebPage;
webView->setPage(page);
page->webView = webView;
- connect(page->mainFrame(), SIGNAL(initialLayoutCompleted()), page, SLOT(aborting()));
-
scene.addItem(webView);
view.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
view.resize(600, 480);
webView->resize(view.geometry().size());
+
QCoreApplication::processEvents();
view.show();
+ // Resizing the page will resize and layout the empty "about:blank"
+ // page, so we first connect the signal afterward.
+ connect(page->mainFrame(), SIGNAL(initialLayoutCompleted()), page, SLOT(aborting()));
+
page->mainFrame()->setHtml(QString("data:text/html,"
"<frameset cols=\"25%,75%\">"
"<frame src=\"data:text/html,foo \">"
@@ -101,6 +104,7 @@ void tst_QGraphicsWebView::crashOnViewlessWebPages()
"</frameset>"));
QVERIFY(waitForSignal(page, SIGNAL(loadFinished(bool))));
+ delete page;
}
void tst_QGraphicsWebView::microFocusCoordinates()
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index f7eddd5..12fb9b3 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -26,6 +26,7 @@
#include <QLocale>
#include <QMenu>
#include <QPushButton>
+#include <QStyle>
#include <QtTest/QtTest>
#include <QTextCharFormat>
#include <qgraphicsscene.h>
@@ -110,6 +111,8 @@ private slots:
void userAgentApplicationName();
void userAgentLocaleChange();
+ void viewModes();
+
void crashTests_LazyInitializationOfMainFrame();
void screenshot_data();
@@ -357,6 +360,21 @@ void tst_QWebPage::userStyleSheet()
QCOMPARE(networkManager->requestedUrls.at(0), QUrl("http://does.not/exist.png"));
}
+void tst_QWebPage::viewModes()
+{
+ m_view->setHtml("<body></body>");
+ m_page->setProperty("_q_viewMode", "minimized");
+
+ QVariant empty = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode)\")");
+ QVERIFY(empty.type() == QVariant::Bool && empty.toBool());
+
+ QVariant minimized = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode: minimized)\")");
+ QVERIFY(minimized.type() == QVariant::Bool && minimized.toBool());
+
+ QVariant maximized = m_page->mainFrame()->evaluateJavaScript("window.styleMedia.matchMedium(\"(-webkit-view-mode: maximized)\")");
+ QVERIFY(maximized.type() == QVariant::Bool && !maximized.toBool());
+}
+
void tst_QWebPage::modified()
{
m_page->mainFrame()->setUrl(QUrl("data:text/html,<body>blub"));
@@ -1350,7 +1368,27 @@ void tst_QWebPage::inputMethods()
page->event(&evrel);
#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
- QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel));
+ // This part of the test checks if the SIP (Software Input Panel) is triggered,
+ // which normally happens on mobile platforms, when a user input form receives
+ // a mouse click.
+ int inputPanel = 0;
+ if (viewType == "QWebView") {
+ if (QWebView* wv = qobject_cast<QWebView*>(view))
+ inputPanel = wv->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel);
+ } else if (viewType == "QGraphicsWebView") {
+ if (QGraphicsWebView* wv = qobject_cast<QGraphicsWebView*>(view))
+ inputPanel = wv->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel);
+ }
+
+ // For non-mobile platforms RequestSoftwareInputPanel event is not called
+ // because there is no SIP (Software Input Panel) triggered. In the case of a
+ // mobile platform, an input panel, e.g. virtual keyboard, is usually invoked
+ // and the RequestSoftwareInputPanel event is called. For these two situations
+ // this part of the test can verified as the checks below.
+ if (inputPanel)
+ QVERIFY(viewEventSpy.contains(QEvent::RequestSoftwareInputPanel));
+ else
+ QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel));
#endif
viewEventSpy.clear();
diff --git a/src/activeqt/control/qaxbindable.cpp b/src/activeqt/control/qaxbindable.cpp
index 1a3fb61..4816142 100644
--- a/src/activeqt/control/qaxbindable.cpp
+++ b/src/activeqt/control/qaxbindable.cpp
@@ -254,7 +254,7 @@ bool QAxBindable::writeData(QIODevice *sink)
in your subclass (unless you use QPointer), as the QWidget can
be destroyed by the ActiveQt framework at any time.
- \sa QAxBindable, QAxFactory, {ActiveQt Framework}
+ \sa QAxBindable, QAxFactory, {Qt's ActiveX Framework (ActiveQt)}
*/
/*!
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 01570ad..04342e7 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -369,6 +369,9 @@ void QAbstractAnimationPrivate::setState(QAbstractAnimation::State newState)
if (state == newState)
return;
+ if (loopCount == 0)
+ return;
+
QAbstractAnimation::State oldState = state;
int oldCurrentTime = currentTime;
int oldCurrentLoop = currentLoop;
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index dd8e6ca..7359b6d 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1243,11 +1243,6 @@ class QDataStream;
# else
# define Q_MULTIMEDIA_EXPORT Q_DECL_IMPORT
# endif
-# if defined(QT_BUILD_MEDIASERVICES_LIB)
-# define Q_MEDIASERVICES_EXPORT Q_DECL_EXPORT
-# else
-# define Q_MEDIASERVICES_EXPORT Q_DECL_IMPORT
-# endif
# if defined(QT_BUILD_OPENVG_LIB)
# define Q_OPENVG_EXPORT Q_DECL_EXPORT
# else
@@ -1294,7 +1289,6 @@ class QDataStream;
# define Q_CANVAS_EXPORT Q_DECL_IMPORT
# define Q_OPENGL_EXPORT Q_DECL_IMPORT
# define Q_MULTIMEDIA_EXPORT Q_DECL_IMPORT
-# define Q_MEDIASERVICES_EXPORT Q_DECL_IMPORT
# define Q_OPENVG_EXPORT Q_DECL_IMPORT
# define Q_XML_EXPORT Q_DECL_IMPORT
# define Q_XMLPATTERNS_EXPORT Q_DECL_IMPORT
@@ -1323,7 +1317,6 @@ class QDataStream;
# define Q_DECLARATIVE_EXPORT Q_DECL_EXPORT
# define Q_OPENGL_EXPORT Q_DECL_EXPORT
# define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT
-# define Q_MEDIASERVICES_EXPORT Q_DECL_EXPORT
# define Q_OPENVG_EXPORT Q_DECL_EXPORT
# define Q_XML_EXPORT Q_DECL_EXPORT
# define Q_XMLPATTERNS_EXPORT Q_DECL_EXPORT
@@ -1339,7 +1332,6 @@ class QDataStream;
# define Q_DECLARATIVE_EXPORT
# define Q_OPENGL_EXPORT
# define Q_MULTIMEDIA_EXPORT
-# define Q_MEDIASERVICES_EXPORT
# define Q_XML_EXPORT
# define Q_XMLPATTERNS_EXPORT
# define Q_SCRIPT_EXPORT
diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp
index 3a9d284..58f0190 100644
--- a/src/corelib/io/qdatastream.cpp
+++ b/src/corelib/io/qdatastream.cpp
@@ -91,8 +91,7 @@ QT_BEGIN_NAMESPACE
format that varies depending on the item's type. Supported Qt
types include QBrush, QColor, QDateTime, QFont, QPixmap, QString,
QVariant and many others. For the complete list of all Qt types
- supporting data streaming see the \l{Format of the QDataStream
- operators}.
+ supporting data streaming see \l{Serializing Qt Data Types}.
For integers it is best to always cast to a Qt integer type for
writing, and to read back into the same Qt integer type. This
diff --git a/src/corelib/io/qfilesystemwatcher_symbian.cpp b/src/corelib/io/qfilesystemwatcher_symbian.cpp
index 69daae7..6136742 100644
--- a/src/corelib/io/qfilesystemwatcher_symbian.cpp
+++ b/src/corelib/io/qfilesystemwatcher_symbian.cpp
@@ -106,7 +106,7 @@ void QNotifyChangeEvent::DoCancel()
}
QSymbianFileSystemWatcherEngine::QSymbianFileSystemWatcherEngine() :
- errorCode(KErrNone), watcherStarted(false)
+ watcherStarted(false)
{
moveToThread(this);
}
@@ -122,11 +122,7 @@ QStringList QSymbianFileSystemWatcherEngine::addPaths(const QStringList &paths,
QMutexLocker locker(&mutex);
QStringList p = paths;
- if (!startWatcher()) {
- qWarning("Could not start QSymbianFileSystemWatcherEngine thread");
-
- return p;
- }
+ startWatcher();
QMutableListIterator<QString> it(p);
while (it.hasNext()) {
@@ -150,18 +146,17 @@ QStringList QSymbianFileSystemWatcherEngine::addPaths(const QStringList &paths,
filePath += QChar(L'/');
}
- currentEvent = NULL;
+ currentAddEvent = NULL;
QMetaObject::invokeMethod(this,
"addNativeListener",
Qt::QueuedConnection,
Q_ARG(QString, filePath));
syncCondition.wait(&mutex);
+ if (currentAddEvent) {
+ currentAddEvent->isDir = isDir;
- if (currentEvent) {
- currentEvent->isDir = isDir;
-
- activeObjectToPath.insert(currentEvent, path);
+ activeObjectToPath.insert(currentAddEvent, path);
it.remove();
if (isDir)
@@ -185,10 +180,10 @@ QStringList QSymbianFileSystemWatcherEngine::removePaths(const QStringList &path
while (it.hasNext()) {
QString path = it.next();
- currentEvent = activeObjectToPath.key(path);
- if (!currentEvent)
+ currentRemoveEvent = activeObjectToPath.key(path);
+ if (!currentRemoveEvent)
continue;
- activeObjectToPath.remove(currentEvent);
+ activeObjectToPath.remove(currentRemoveEvent);
QMetaObject::invokeMethod(this,
"removeNativeListener",
@@ -202,9 +197,6 @@ QStringList QSymbianFileSystemWatcherEngine::removePaths(const QStringList &path
directories->removeAll(path);
}
- if (activeObjectToPath.size() == 0)
- stop();
-
return p;
}
@@ -228,44 +220,31 @@ void QSymbianFileSystemWatcherEngine::stop()
}
// This method must be called inside mutex
-bool QSymbianFileSystemWatcherEngine::startWatcher()
+void QSymbianFileSystemWatcherEngine::startWatcher()
{
- bool retval = true;
-
if (!watcherStarted) {
setStackSize(0x5000);
start();
syncCondition.wait(&mutex);
-
- if (errorCode != KErrNone) {
- retval = false;
- } else {
- watcherStarted = true;
- }
+ watcherStarted = true;
}
- return retval;
}
void QSymbianFileSystemWatcherEngine::run()
{
- // Initialize file session
-
mutex.lock();
syncCondition.wakeOne();
mutex.unlock();
- if (errorCode == KErrNone) {
- exec();
+ exec();
- foreach(QNotifyChangeEvent *e, activeObjectToPath.keys()) {
- e->Cancel();
- delete e;
- }
-
- activeObjectToPath.clear();
- watcherStarted = false;
+ foreach(QNotifyChangeEvent *e, activeObjectToPath.keys()) {
+ e->Cancel();
+ delete e;
}
+
+ activeObjectToPath.clear();
}
void QSymbianFileSystemWatcherEngine::addNativeListener(const QString &directoryPath)
@@ -273,16 +252,16 @@ void QSymbianFileSystemWatcherEngine::addNativeListener(const QString &directory
QMutexLocker locker(&mutex);
QString nativeDir(QDir::toNativeSeparators(directoryPath));
TPtrC ptr(qt_QString2TPtrC(nativeDir));
- currentEvent = new QNotifyChangeEvent(qt_s60GetRFs(), ptr, this, directoryPath.endsWith(QChar(L'/'), Qt::CaseSensitive));
+ currentAddEvent = new QNotifyChangeEvent(qt_s60GetRFs(), ptr, this, directoryPath.endsWith(QChar(L'/'), Qt::CaseSensitive));
syncCondition.wakeOne();
}
void QSymbianFileSystemWatcherEngine::removeNativeListener()
{
QMutexLocker locker(&mutex);
- currentEvent->Cancel();
- delete currentEvent;
- currentEvent = NULL;
+ currentRemoveEvent->Cancel();
+ delete currentRemoveEvent;
+ currentRemoveEvent = NULL;
syncCondition.wakeOne();
}
diff --git a/src/corelib/io/qfilesystemwatcher_symbian_p.h b/src/corelib/io/qfilesystemwatcher_symbian_p.h
index 7e3f045..e687a4a 100644
--- a/src/corelib/io/qfilesystemwatcher_symbian_p.h
+++ b/src/corelib/io/qfilesystemwatcher_symbian_p.h
@@ -113,14 +113,14 @@ private:
friend class QNotifyChangeEvent;
void emitPathChanged(QNotifyChangeEvent *e);
- bool startWatcher();
+ void startWatcher();
QHash<QNotifyChangeEvent*, QString> activeObjectToPath;
QMutex mutex;
QWaitCondition syncCondition;
- int errorCode;
bool watcherStarted;
- QNotifyChangeEvent *currentEvent;
+ QNotifyChangeEvent *currentAddEvent;
+ QNotifyChangeEvent *currentRemoveEvent;
};
#endif // QT_NO_FILESYSTEMWATCHER
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index bb11d6b..223df9b 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -810,6 +810,9 @@ qint64 QIODevice::read(char *data, qint64 maxSize)
}
}
+ if (!maxSize)
+ return readSoFar;
+
if ((d->openMode & Unbuffered) == 0 && maxSize < QIODEVICE_BUFFERSIZE) {
// In buffered mode, we try to fill up the QIODevice buffer before
// we do anything else.
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 7725ca8..b5e7a97 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -2022,7 +2022,7 @@ void QProcess::start(const QString &program, OpenMode mode)
\note Terminating running processes from other processes will typically
cause a panic in Symbian due to platform security.
- \sa \l {Symbian Platform Security Requirements}
+ \sa {Symbian Platform Security Requirements}
\sa kill()
*/
void QProcess::terminate()
@@ -2040,7 +2040,7 @@ void QProcess::terminate()
On Symbian, this function requires platform security capability
\c PowerMgmt. If absent, the process will panic with KERN-EXEC 46.
- \sa \l {Symbian Platform Security Requirements}
+ \sa {Symbian Platform Security Requirements}
\sa terminate()
*/
void QProcess::kill()
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 4e580dd..79a8ce4 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -345,6 +345,7 @@ public:
bool hasQuery;
bool hasFragment;
bool isValid;
+ bool isHostValid;
char valueDelimiter;
char pairDelimiter;
@@ -3138,10 +3139,11 @@ static void toPunycodeHelper(const QChar *s, int ucLength, QString *output)
static const char * const idn_whitelist[] = {
- "ac", "at",
- "br",
+ "ac", "ar", "at",
+ "biz", "br",
"cat", "ch", "cl", "cn",
"de", "dk",
+ "es",
"fi",
"gr",
"hu",
@@ -3155,6 +3157,9 @@ static const char * const idn_whitelist[] = {
"se", "sh",
"th", "tm", "tw",
"vn",
+ "xn--mgbaam7a8h", // UAE
+ "xn--mgberp4a5d4ar", // Saudi Arabia
+ "xn--wgbh1c" // Egypt
};
static QStringList *user_idn_whitelist = 0;
@@ -3313,6 +3318,7 @@ static QString qt_ACE_do(const QString &domain, AceOperation op)
qt_nameprep(&result, prevLen);
labelLength = result.length() - prevLen;
register int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes
+ aceForm.resize(0);
if (toReserve > aceForm.capacity())
aceForm.reserve(toReserve);
toPunycodeHelper(result.constData() + prevLen, result.size() - prevLen, &aceForm);
@@ -3349,6 +3355,7 @@ QUrlPrivate::QUrlPrivate()
ref = 1;
port = -1;
isValid = false;
+ isHostValid = true;
parsingMode = QUrl::TolerantMode;
valueDelimiter = '=';
pairDelimiter = '&';
@@ -3375,6 +3382,7 @@ QUrlPrivate::QUrlPrivate(const QUrlPrivate &copy)
hasQuery(copy.hasQuery),
hasFragment(copy.hasFragment),
isValid(copy.isValid),
+ isHostValid(copy.isHostValid),
valueDelimiter(copy.valueDelimiter),
pairDelimiter(copy.pairDelimiter),
stateFlags(copy.stateFlags),
@@ -3405,6 +3413,8 @@ QString QUrlPrivate::canonicalHost() const
that->host = host.toLower();
} else {
that->host = qt_ACE_do(host, NormalizeAce);
+ if (that->host.isNull())
+ that->isHostValid = false;
}
return that->host;
}
@@ -3481,6 +3491,7 @@ QString QUrlPrivate::authority(QUrl::FormattingOptions options) const
void QUrlPrivate::setAuthority(const QString &auth)
{
+ isHostValid = true;
if (auth.isEmpty()) {
setUserInfo(QString());
host.clear();
@@ -4175,7 +4186,7 @@ bool QUrl::isValid() const
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse();
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Validated)) d->validate();
- return d->isValid;
+ return d->isValid && d->isHostValid;
}
/*!
@@ -4427,7 +4438,6 @@ void QUrl::setAuthority(const QString &authority)
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse();
detach();
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized);
-
d->setAuthority(authority);
}
@@ -4648,6 +4658,7 @@ void QUrl::setHost(const QString &host)
if (!d) d = new QUrlPrivate;
if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse();
detach();
+ d->isHostValid = true;
QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized | QUrlPrivate::HostCanonicalized);
d->host = host;
@@ -5557,6 +5568,12 @@ QUrl QUrl::resolved(const QUrl &relative) const
removeDotsFromPath(&t.d->encodedPath);
t.d->path.clear();
+#if defined(QURL_DEBUG)
+ qDebug("QUrl(\"%s\").resolved(\"%s\") = \"%s\"",
+ toEncoded().constData(),
+ relative.toEncoded().constData(),
+ t.toEncoded().constData());
+#endif
return t;
}
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp
index b0503be..3660a3c 100644
--- a/src/corelib/kernel/qabstractitemmodel.cpp
+++ b/src/corelib/kernel/qabstractitemmodel.cpp
@@ -2530,6 +2530,62 @@ bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int star
condition is true, in which case you should abort your move
operation.
+ \table 80%
+ \row
+ \o \inlineimage modelview-move-rows-1.png Moving rows to another parent
+ \o Specify the first and last row numbers for the span of rows in
+ the source parent you want to move in the model. Also specify
+ the row in the destination parent to move the span to.
+
+ For example, as shown in the diagram, we move three rows from
+ row 2 to 4 in the source, so \a sourceFirst is 2 and \a sourceLast is 4.
+ We move those items to above row 2 in the destination, so \a destinationRow is 2.
+
+ \snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 6
+
+ This moves the three rows rows 2, 3, and 4 in the source to become 2, 3 and 4 in
+ the destination. Other affected siblings are displaced accordingly.
+ \row
+ \o \inlineimage modelview-move-rows-2.png Moving rows to append to another parent
+ \o To append rows to another parent, move them to after the last row.
+
+ For example, as shown in the diagram, we move three rows to a
+ collection of 6 existing rows (ending in row 5), so \a destinationStart is 6:
+
+ \snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 7
+
+ This moves the target rows to the end of the target parent as 6, 7 and 8.
+ \row
+ \o \inlineimage modelview-move-rows-3.png Moving rows in the same parent up
+ \o To move rows within the same parent, specify the row to move them to.
+
+ For example, as shown in the diagram, we move one item from row 2 to row 0,
+ so \a sourceFirst and \a sourceLast are 2 and \a destinationChild is 0.
+
+ \snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 8
+
+ Note that other rows may be displaced accordingly. Note also that when moving
+ items within the same parent you should not attempt invalid or no-op moves. In
+ the above example, item 2 is at row 2 before the move, so it can not be moved
+ to row 2 (where it is already) or row 3 (no-op as row 3 means above row 3, where
+ it is already)
+
+ \row
+ \o \inlineimage modelview-move-rows-4.png Moving rows in the same parent down
+ \o To move rows within the same parent, specify the row to move them to.
+
+ For example, as shown in the diagram, we move one item from row 2 to row 4,
+ so \a sourceFirst and \a sourceLast are 2 and \a destinationChild is 4.
+
+ \snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 9
+
+ Note that other rows may be displaced accordingly.
+ \endtable
+
+ \note This function emits the rowsAboutToBeInserted() signal which
+ connected views (or proxies) must handle before the data is inserted.
+ Otherwise, the views may end up in an invalid state.
+
\sa endMoveRows()
\since 4.6
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 609e6b3..4e6e6b9 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -63,6 +63,7 @@
#include <qvarlengtharray.h>
#include <private/qfactoryloader_p.h>
#include <private/qfunctions_p.h>
+#include <private/qlocale_p.h>
#ifdef Q_OS_SYMBIAN
# include <exception>
@@ -521,6 +522,9 @@ QCoreApplication::QCoreApplication(int &argc, char **argv)
QFactoryLoader::refreshAll();
#endif
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SYSTEMLOCALE)
+ d_func()->symbianInit();
+#endif
}
// ### move to QCoreApplicationPrivate constructor?
@@ -597,6 +601,15 @@ void QCoreApplication::init()
qt_startup_hook();
}
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SYSTEMLOCALE)
+void QCoreApplicationPrivate::symbianInit()
+{
+ if (!environmentChangeNotifier)
+ environmentChangeNotifier.reset(new QEnvironmentChangeNotifier);
+}
+#endif
+
+
/*!
Destroys the QCoreApplication object.
*/
diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h
index 77188d3..e066137 100644
--- a/src/corelib/kernel/qcoreapplication_p.h
+++ b/src/corelib/kernel/qcoreapplication_p.h
@@ -65,6 +65,9 @@ QT_BEGIN_NAMESPACE
typedef QList<QTranslator*> QTranslatorList;
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SYSTEMLOCALE)
+class QEnvironmentChangeNotifier;
+#endif
class QAbstractEventDispatcher;
class Q_CORE_EXPORT QCoreApplicationPrivate : public QObjectPrivate
@@ -113,6 +116,10 @@ public:
bool aboutToQuitEmitted;
QString cachedApplicationDirPath;
QString cachedApplicationFilePath;
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SYSTEMLOCALE)
+ QScopedPointer<QEnvironmentChangeNotifier> environmentChangeNotifier;
+ void symbianInit();
+#endif
static bool isTranslatorInstalled(QTranslator *translator);
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index a6d486e..33775d2 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -47,6 +47,8 @@
#include <unistd.h>
#include <errno.h>
+#include <net/if.h>
+
QT_BEGIN_NAMESPACE
#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
@@ -569,13 +571,17 @@ void QSelectThread::updateActivatedNotifiers(QSocketNotifier::Type type, fd_set
* check if socket is in exception set
* then signal RequestComplete for it
*/
- qWarning("exception on %d [will close the socket handle - hack]", i.key()->socket());
+ qWarning("exception on %d [will do setdefaultif(0) - hack]", i.key()->socket());
// quick fix; there is a bug
// when doing read on socket
// errors not preoperly mapped
// after offline-ing the device
// on some devices we do get exception
- ::close(i.key()->socket());
+ // close all exiting sockets
+ // and reset default IAP
+ if(::setdefaultif(0) != KErrNone) // well we can't do much about it
+ qWarning("setdefaultif(0) failed");
+
toRemove.append(i.key());
TRequestStatus *status = i.value();
QEventDispatcherSymbian::RequestComplete(d->threadData->symbian_thread_handle, status, KErrNone);
@@ -1105,3 +1111,5 @@ void CQtActiveScheduler::Error(TInt aError) const
}
QT_END_NAMESPACE
+
+#include "moc_qeventdispatcher_symbian_p.cpp"
diff --git a/src/corelib/kernel/qeventdispatcher_symbian_p.h b/src/corelib/kernel/qeventdispatcher_symbian_p.h
index 05758ca..bc42753 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian_p.h
+++ b/src/corelib/kernel/qeventdispatcher_symbian_p.h
@@ -221,6 +221,7 @@ public: // from CActiveScheduler
class Q_CORE_EXPORT QEventDispatcherSymbian : public QAbstractEventDispatcher
{
+ Q_OBJECT
Q_DECLARE_PRIVATE(QAbstractEventDispatcher)
public:
diff --git a/src/corelib/kernel/qfunctions_wince.cpp b/src/corelib/kernel/qfunctions_wince.cpp
index 8ad6126..e58feb3 100644
--- a/src/corelib/kernel/qfunctions_wince.cpp
+++ b/src/corelib/kernel/qfunctions_wince.cpp
@@ -352,16 +352,18 @@ void *qt_wince_bsearch(const void *key,
size_t low = 0;
size_t high = num - 1;
while (low <= high) {
- unsigned int mid = ((unsigned) (low + high)) >> 1;
+ size_t mid = (low + high) >> 1;
int c = compare(key, (char*)base + mid * size);
- if (c < 0)
+ if (c < 0) {
+ if (!mid)
+ break;
high = mid - 1;
- else if (c > 0)
+ } else if (c > 0)
low = mid + 1;
else
return (char*) base + mid * size;
}
- return (NULL);
+ return 0;
}
void *lfind(const void* key, const void* base, size_t* elements, size_t size,
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 8a4304e..2648e6e 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -149,9 +149,11 @@ QObjectPrivate::QObjectPrivate(int version)
postedEvents = 0;
extraData = 0;
connectedSignals[0] = connectedSignals[1] = 0;
- inEventHandler = false;
inThreadChangeEvent = false;
+#ifdef QT_JAMBI_BUILD
+ inEventHandler = false;
deleteWatch = 0;
+#endif
metaObject = 0;
hasGuards = false;
}
@@ -159,8 +161,10 @@ QObjectPrivate::QObjectPrivate(int version)
QObjectPrivate::~QObjectPrivate()
{
delete static_cast<QAbstractDynamicMetaObject*>(metaObject);
+#ifdef QT_JAMBI_BUILD
if (deleteWatch)
*deleteWatch = 1;
+#endif
#ifndef QT_NO_USERDATA
if (extraData)
qDeleteAll(extraData->userData);
@@ -169,6 +173,7 @@ QObjectPrivate::~QObjectPrivate()
}
+#ifdef QT_JAMBI_BUILD
int *QObjectPrivate::setDeleteWatch(QObjectPrivate *d, int *w) {
int *old = d->deleteWatch;
d->deleteWatch = w;
@@ -183,10 +188,7 @@ void QObjectPrivate::resetDeleteWatch(QObjectPrivate *d, int *oldWatch, int dele
if (oldWatch)
*oldWatch = deleteWatch;
}
-
-
-
-
+#endif
#ifdef QT3_SUPPORT
void QObjectPrivate::sendPendingChildInsertedEvents()
@@ -476,11 +478,6 @@ void QMetaObject::changeGuard(QObject **ptr, QObject *o)
*/
void QObjectPrivate::clearGuards(QObject *object)
{
- QObjectPrivate *priv = QObjectPrivate::get(object);
-
- if (!priv->hasGuards)
- return;
-
GuardHash *hash = 0;
QMutex *mutex = 0;
QT_TRY {
@@ -544,7 +541,7 @@ int QMetaCallEvent::placeMetaCall(QObject *object)
\reentrant
- QObject is the heart of the \l{Qt object model}. The central
+ 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
@@ -553,13 +550,13 @@ int QMetaCallEvent::placeMetaCall(QObject *object)
protected functions connectNotify() and disconnectNotify() make
it possible to track connections.
- QObjects organize themselves in \l {Object Trees and Object
- 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().
+ 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()).
@@ -611,7 +608,7 @@ int QMetaCallEvent::placeMetaCall(QObject *object)
Qt classes derived from QObject (direct or indirect) use this
macro to declare their copy constructor and assignment operator to
be private. The reasoning is found in the discussion on
- \l{Identity vs Value} {Identity vs Value} on the \l{Qt Object
+ \l{Identity vs Value} {Identity vs Value} on the Qt \l{Object
Model} page.
The main consequence is that you should use pointers to QObject
@@ -658,7 +655,7 @@ int QMetaCallEvent::placeMetaCall(QObject *object)
\l{Writing Source Code for Translation} document.
\sa QMetaObject, QPointer, QObjectCleanupHandler, Q_DISABLE_COPY()
- \sa {Object Trees and Object Ownership}
+ \sa {Object Trees & Ownership}
*/
/*!
@@ -732,13 +729,15 @@ QObject::QObject(QObject *parent)
d_ptr->q_ptr = this;
d->threadData = (parent && !parent->thread()) ? parent->d_func()->threadData : QThreadData::current();
d->threadData->ref();
- QT_TRY {
- if (!check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData))
- parent = 0;
- setParent(parent);
- } QT_CATCH(...) {
- d->threadData->deref();
- QT_RETHROW;
+ if (parent) {
+ QT_TRY {
+ if (!check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData))
+ parent = 0;
+ setParent(parent);
+ } QT_CATCH(...) {
+ d->threadData->deref();
+ QT_RETHROW;
+ }
}
qt_addObject(this);
}
@@ -757,9 +756,11 @@ QObject::QObject(QObject *parent, const char *name)
qt_addObject(d_ptr->q_ptr = this);
d->threadData = (parent && !parent->thread()) ? parent->d_func()->threadData : QThreadData::current();
d->threadData->ref();
- if (!check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData))
- parent = 0;
- setParent(parent);
+ if (parent) {
+ if (!check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData))
+ parent = 0;
+ setParent(parent);
+ }
setObjectName(QString::fromAscii(name));
}
#endif
@@ -773,21 +774,23 @@ QObject::QObject(QObjectPrivate &dd, QObject *parent)
d_ptr->q_ptr = this;
d->threadData = (parent && !parent->thread()) ? parent->d_func()->threadData : QThreadData::current();
d->threadData->ref();
- QT_TRY {
- if (!check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData))
- parent = 0;
- if (d->isWidget) {
- if (parent) {
- d->parent = parent;
- d->parent->d_func()->children.append(this);
+ if (parent) {
+ QT_TRY {
+ if (!check_parent_thread(parent, parent ? parent->d_func()->threadData : 0, d->threadData))
+ parent = 0;
+ if (d->isWidget) {
+ if (parent) {
+ d->parent = parent;
+ d->parent->d_func()->children.append(this);
+ }
+ // no events sent here, this is done at the end of the QWidget constructor
+ } else {
+ setParent(parent);
}
- // no events sent here, this is done at the end of the QWidget constructor
- } else {
- setParent(parent);
+ } QT_CATCH(...) {
+ d->threadData->deref();
+ QT_RETHROW;
}
- } QT_CATCH(...) {
- d->threadData->deref();
- QT_RETHROW;
}
qt_addObject(this);
}
@@ -822,7 +825,7 @@ QObject::~QObject()
d->wasDeleted = true;
d->blockSig = 0; // unblock signals so we always emit destroyed()
- if (!d->isWidget) {
+ if (d->hasGuards && !d->isWidget) {
// set all QPointers for this object to zero - note that
// ~QWidget() does this for us, so we don't have to do it twice
QObjectPrivate::clearGuards(this);
@@ -840,22 +843,16 @@ QObject::~QObject()
delete d->sharedRefcount;
}
- QT_TRY {
- emit destroyed(this);
- } QT_CATCH(...) {
- // all the signal/slots connections are still in place - if we don't
- // quit now, we will crash pretty soon.
- qWarning("Detected an unexpected exception in ~QObject while emitting destroyed().");
-#if defined(Q_BUILD_INTERNAL) && !defined(QT_NO_EXCEPTIONS)
- struct AutotestException : public std::exception
- {
- const char *what() const throw() { return "autotest swallow"; }
- } autotestException;
- // throw autotestException;
-#else
- QT_RETHROW;
-#endif
+ if (d->isSignalConnected(0)) {
+ QT_TRY {
+ emit destroyed(this);
+ } QT_CATCH(...) {
+ // all the signal/slots connections are still in place - if we don't
+ // quit now, we will crash pretty soon.
+ qWarning("Detected an unexpected exception in ~QObject while emitting destroyed().");
+ QT_RETHROW;
+ }
}
if (d->declarativeData)
@@ -893,7 +890,7 @@ QObject::~QObject()
if (c->next) c->next->prev = c->prev;
}
if (needToUnlock)
- m->unlock();
+ m->unlockInline();
connectionList.first = c->nextConnectionList;
delete c;
@@ -917,7 +914,7 @@ QObject::~QObject()
bool needToUnlock = QOrderedMutexLocker::relock(signalSlotMutex, m);
//the node has maybe been removed while the mutex was unlocked in relock?
if (!node || node->sender != sender) {
- m->unlock();
+ m->unlockInline();
continue;
}
node->receiver = 0;
@@ -927,7 +924,7 @@ QObject::~QObject()
node = node->next;
if (needToUnlock)
- m->unlock();
+ m->unlockInline();
}
}
@@ -937,12 +934,6 @@ QObject::~QObject()
d->threadData->eventDispatcher->unregisterTimers(this);
}
-#ifdef QT3_SUPPORT
- d->pendingChildInsertedEvents.clear();
-#endif
-
- d->eventFilters.clear();
-
if (!d->children.isEmpty())
d->deleteChildren();
@@ -1198,7 +1189,9 @@ bool QObject::event(QEvent *e)
case QEvent::MetaCall:
{
+#ifdef QT_JAMBI_BUILD
d_func()->inEventHandler = false;
+#endif
QMetaCallEvent *mce = static_cast<QMetaCallEvent*>(e);
QObjectPrivate::Sender currentSender;
currentSender.sender = const_cast<QObject*>(mce->sender());
@@ -1516,11 +1509,14 @@ void QObjectPrivate::setThreadData_helper(QThreadData *currentData, QThreadData
currentSender->ref = 0;
currentSender = 0;
+#ifdef QT_JAMBI_BUILD
// the current event thread also shouldn't restore the delete watch
inEventHandler = false;
+
if (deleteWatch)
*deleteWatch = 1;
deleteWatch = 0;
+#endif
// set new thread data
targetData->ref();
@@ -2983,7 +2979,7 @@ bool QMetaObjectPrivate::disconnectHelper(QObjectPrivate::Connection *c,
}
if (needToUnlock)
- receiverMutex->unlock();
+ receiverMutex->unlockInline();
c->receiver = 0;
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index 1b613a6..44e7ce5 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -109,7 +109,7 @@ public:
uint ownObjectName : 1;
uint sendChildEvents : 1;
uint receiveChildEvents : 1;
- uint inEventHandler : 1;
+ uint inEventHandler : 1; //only used if QT_JAMBI_BUILD
uint inThreadChangeEvent : 1;
uint hasGuards : 1; //true iff there is one or more QPointer attached to this object
uint unused : 22;
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index 4800e6a..35b4540 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -161,8 +161,10 @@ public:
static inline void resetCurrentSender(QObject *receiver,
Sender *currentSender,
Sender *previousSender);
+#ifdef QT_JAMBI_BUILD
static int *setDeleteWatch(QObjectPrivate *d, int *newWatch);
static void resetDeleteWatch(QObjectPrivate *d, int *oldWatch, int deleteWatch);
+#endif
static void clearGuards(QObject *);
static QObjectPrivate *get(QObject *o) {
@@ -200,7 +202,9 @@ public:
// these objects are all used to indicate that a QObject was deleted
// plus QPointer, which keeps a separate list
QAtomicPointer<QtSharedPointer::ExternalRefCountData> sharedRefcount;
+#ifdef QT_JAMBI_BUILD
int *deleteWatch;
+#endif
};
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp
index 43df13a..eb6f729 100644
--- a/src/corelib/thread/qmutex.cpp
+++ b/src/corelib/thread/qmutex.cpp
@@ -130,7 +130,7 @@ QMutex::QMutex(RecursionMode mode)
\warning Destroying a locked mutex may result in undefined behavior.
*/
QMutex::~QMutex()
-{ delete d; }
+{ delete static_cast<QMutexPrivate *>(d); }
/*!
Locks the mutex. If another thread has locked the mutex then this
@@ -146,6 +146,7 @@ QMutex::~QMutex()
*/
void QMutex::lock()
{
+ QMutexPrivate *d = static_cast<QMutexPrivate *>(this->d);
Qt::HANDLE self;
if (d->recursive) {
@@ -184,43 +185,7 @@ void QMutex::lock()
bool isLocked = d->contenders == 0 && d->contenders.testAndSetAcquire(0, 1);
if (!isLocked) {
- int spinCount = 0;
- int lastSpinCount = d->lastSpinCount;
-
- enum { AdditionalSpins = 20, SpinCountPenalizationDivisor = 4 };
- const int maximumSpinCount = lastSpinCount + AdditionalSpins;
-
- do {
- if (spinCount++ > maximumSpinCount) {
- // puts("spinning useless, sleeping");
- isLocked = d->contenders.fetchAndAddAcquire(1) == 0;
- if (!isLocked) {
-#ifndef QT_NO_DEBUG
- if (d->owner == self)
- qWarning() << "QMutex::lock: Deadlock detected in thread" << d->owner;
-#endif
-
- // didn't get the lock, wait for it
- isLocked = d->wait();
- Q_ASSERT_X(isLocked, "QMutex::lock",
- "Internal error, infinite wait has timed out.");
-
- // don't need to wait for the lock anymore
- d->contenders.deref();
- }
- // decrease the lastSpinCount since we didn't actually get the lock by spinning
- spinCount = -d->lastSpinCount / SpinCountPenalizationDivisor;
- break;
- }
-
- isLocked = d->contenders == 0 && d->contenders.testAndSetAcquire(0, 1);
- } while (!isLocked);
-
- // adjust the last spin lock count
- lastSpinCount = d->lastSpinCount;
- d->lastSpinCount = spinCount >= 0
- ? qMax(lastSpinCount, spinCount)
- : lastSpinCount + spinCount;
+ lockInternal();
}
#ifndef QT_NO_DEBUG
@@ -247,6 +212,7 @@ void QMutex::lock()
*/
bool QMutex::tryLock()
{
+ QMutexPrivate *d = static_cast<QMutexPrivate *>(this->d);
Qt::HANDLE self;
if (d->recursive) {
@@ -310,6 +276,7 @@ bool QMutex::tryLock()
*/
bool QMutex::tryLock(int timeout)
{
+ QMutexPrivate *d = static_cast<QMutexPrivate *>(this->d);
Qt::HANDLE self;
if (d->recursive) {
@@ -366,8 +333,13 @@ bool QMutex::tryLock(int timeout)
*/
void QMutex::unlock()
{
- Q_ASSERT_X(d->owner == QThread::currentThreadId(), "QMutex::unlock()",
- "A mutex must be unlocked in the same thread that locked it.");
+ QMutexPrivate *d = static_cast<QMutexPrivate *>(this->d);
+#ifndef QT_NO_DEBUG
+ //note: if the mutex has been locked with (try)lockInline, d->owner could have not been set, and this would be a false warning
+ if ((d->owner || d->recursive) && d->owner != QThread::currentThreadId())
+ qWarning("QMutex::unlock(): A mutex must be unlocked in the same thread that locked it.");
+#endif
+
if (d->recursive) {
if (!--d->count) {
@@ -506,6 +478,87 @@ void QMutex::unlock()
Use the constructor that takes a RecursionMode parameter instead.
*/
+/*!
+ \internal helper for lockInline()
+ */
+void QMutex::lockInternal()
+{
+ QMutexPrivate *d = static_cast<QMutexPrivate *>(this->d);
+ int spinCount = 0;
+ int lastSpinCount = d->lastSpinCount;
+
+ enum { AdditionalSpins = 20, SpinCountPenalizationDivisor = 4 };
+ const int maximumSpinCount = lastSpinCount + AdditionalSpins;
+
+#ifndef QT_NO_DEBUG
+ Qt::HANDLE self = QThread::currentThreadId();
+#endif
+
+ do {
+ if (spinCount++ > maximumSpinCount) {
+ // puts("spinning useless, sleeping");
+ bool isLocked = d->contenders.fetchAndAddAcquire(1) == 0;
+ if (!isLocked) {
+#ifndef QT_NO_DEBUG
+ if (d->owner == self)
+ qWarning() << "QMutex::lock: Deadlock detected in thread" << d->owner;
+#endif
+
+ // didn't get the lock, wait for it
+ isLocked = d->wait();
+ Q_ASSERT_X(isLocked, "QMutex::lock",
+ "Internal error, infinite wait has timed out.");
+
+ // don't need to wait for the lock anymore
+ d->contenders.deref();
+ }
+ // decrease the lastSpinCount since we didn't actually get the lock by spinning
+ spinCount = -d->lastSpinCount / SpinCountPenalizationDivisor;
+ break;
+ }
+ } while (d->contenders != 0 || !d->contenders.testAndSetAcquire(0, 1));
+
+ // adjust the last spin lock count
+ lastSpinCount = d->lastSpinCount;
+ d->lastSpinCount = spinCount >= 0
+ ? qMax(lastSpinCount, spinCount)
+ : lastSpinCount + spinCount;
+
+#ifndef QT_NO_DEBUG
+ d->owner = self;
+#endif
+}
+
+/*!
+ \internal
+*/
+void QMutex::unlockInternal()
+{
+#ifndef QT_NO_DEBUG
+ static_cast<QMutexPrivate *>(d)->owner = 0;
+#endif
+ static_cast<QMutexPrivate *>(d)->wakeUp();
+}
+
+/*!
+ \fn QMutex::lockInline()
+ \internal
+ inline version of QMutex::lock()
+*/
+
+/*!
+ \fn QMutex::unlockInline()
+ \internal
+ inline version of QMutex::unlock()
+*/
+
+/*!
+ \fn QMutex::tryLockInline()
+ \internal
+ inline version of QMutex::tryLock()
+*/
+
+
QT_END_NAMESPACE
#endif // QT_NO_THREAD
diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h
index 509f300..710b794 100644
--- a/src/corelib/thread/qmutex.h
+++ b/src/corelib/thread/qmutex.h
@@ -43,6 +43,7 @@
#define QMUTEX_H
#include <QtCore/qglobal.h>
+#include <QtCore/qatomic.h>
#include <new>
QT_BEGIN_HEADER
@@ -53,7 +54,8 @@ QT_MODULE(Core)
#ifndef QT_NO_THREAD
-class QMutexPrivate;
+class QAtomicInt;
+class QMutexData;
class Q_CORE_EXPORT QMutex
{
@@ -66,10 +68,13 @@ public:
explicit QMutex(RecursionMode mode = NonRecursive);
~QMutex();
- void lock();
- bool tryLock();
+ void lock(); //### Qt5: make inline;
+ inline void lockInline();
+ bool tryLock(); //### Qt5: make inline;
bool tryLock(int timeout);
- void unlock();
+ inline bool tryLockInline();
+ void unlock(); //### Qt5: make inline;
+ inline void unlockInline();
#if defined(QT3_SUPPORT)
inline QT3_SUPPORT bool locked()
@@ -86,9 +91,11 @@ public:
#endif
private:
+ void lockInternal();
+ void unlockInternal();
Q_DISABLE_COPY(QMutex)
- QMutexPrivate *d;
+ QMutexData *d;
};
class Q_CORE_EXPORT QMutexLocker
@@ -99,7 +106,7 @@ public:
Q_ASSERT_X((reinterpret_cast<quintptr>(m) & quintptr(1u)) == quintptr(0),
"QMutexLocker", "QMutex pointer is misaligned");
if (m) {
- m->lock();
+ m->lockInline();
val = reinterpret_cast<quintptr>(m) | quintptr(1u);
} else {
val = 0;
@@ -111,7 +118,7 @@ public:
{
if ((val & quintptr(1u)) == quintptr(1u)) {
val &= ~quintptr(1u);
- mutex()->unlock();
+ mutex()->unlockInline();
}
}
@@ -119,7 +126,7 @@ public:
{
if (val) {
if ((val & quintptr(1u)) == quintptr(0u)) {
- mutex()->lock();
+ mutex()->lockInline();
val |= quintptr(1u);
}
}
@@ -145,6 +152,46 @@ private:
quintptr val;
};
+class QMutexData
+{
+ public:
+ QAtomicInt contenders;
+ const uint recursive : 1;
+ uint reserved : 31;
+ protected:
+ QMutexData(QMutex::RecursionMode mode);
+ ~QMutexData();
+};
+
+inline void QMutex::unlockInline()
+{
+ if (d->recursive) {
+ unlock();
+ } else if (!d->contenders.testAndSetRelease(1, 0)) {
+ unlockInternal();
+ }
+}
+
+inline bool QMutex::tryLockInline()
+{
+ if (d->recursive) {
+ return tryLock();
+ } else {
+ return d->contenders.testAndSetAcquire(0, 1);
+ }
+}
+
+inline void QMutex::lockInline()
+{
+ if (d->recursive) {
+ lock();
+ } else if(!tryLockInline()) {
+ lockInternal();
+ }
+}
+
+
+
#else // QT_NO_THREAD
@@ -157,9 +204,11 @@ public:
inline ~QMutex() {}
static inline void lock() {}
- static inline bool tryLock() { return true; }
- static inline bool tryLock(int timeout) { Q_UNUSED(timeout); return true; }
- static void unlock() {}
+ static inline void lockInline() {}
+ static inline bool tryLock(int timeout = 0) { Q_UNUSED(timeout); return true; }
+ static inline bool tryLockInline() { return true; }
+ static inline void unlock() {}
+ static inline void unlockInline() {}
#if defined(QT3_SUPPORT)
static inline QT3_SUPPORT bool locked() { return false; }
diff --git a/src/corelib/thread/qmutex_p.h b/src/corelib/thread/qmutex_p.h
index dce162a..6126423 100644
--- a/src/corelib/thread/qmutex_p.h
+++ b/src/corelib/thread/qmutex_p.h
@@ -56,10 +56,11 @@
#include <QtCore/qglobal.h>
#include <QtCore/qnamespace.h>
+#include <QtCore/qmutex.h>
QT_BEGIN_NAMESPACE
-class QMutexPrivate {
+class QMutexPrivate : public QMutexData {
public:
QMutexPrivate(QMutex::RecursionMode mode);
~QMutexPrivate();
@@ -68,8 +69,6 @@ public:
bool wait(int timeout = -1);
void wakeUp();
- const bool recursive;
- QAtomicInt contenders;
volatile int lastSpinCount;
Qt::HANDLE owner;
uint count;
@@ -83,6 +82,12 @@ public:
#endif
};
+inline QMutexData::QMutexData(QMutex::RecursionMode mode)
+ : recursive(mode == QMutex::Recursive)
+{}
+
+inline QMutexData::~QMutexData() {}
+
QT_END_NAMESPACE
#endif // QMUTEX_P_H
diff --git a/src/corelib/thread/qmutex_unix.cpp b/src/corelib/thread/qmutex_unix.cpp
index a58368c..7e7ef22 100644
--- a/src/corelib/thread/qmutex_unix.cpp
+++ b/src/corelib/thread/qmutex_unix.cpp
@@ -63,7 +63,7 @@ static void report_error(int code, const char *where, const char *what)
QMutexPrivate::QMutexPrivate(QMutex::RecursionMode mode)
- : recursive(mode == QMutex::Recursive), contenders(0), lastSpinCount(0), owner(0), count(0), wakeup(false)
+ : QMutexData(mode), lastSpinCount(0), owner(0), count(0), wakeup(false)
{
report_error(pthread_mutex_init(&mutex, NULL), "QMutex", "mutex init");
report_error(pthread_cond_init(&cond, NULL), "QMutex", "cv init");
diff --git a/src/corelib/thread/qmutex_win.cpp b/src/corelib/thread/qmutex_win.cpp
index 9d58953..a810000 100644
--- a/src/corelib/thread/qmutex_win.cpp
+++ b/src/corelib/thread/qmutex_win.cpp
@@ -48,7 +48,7 @@
QT_BEGIN_NAMESPACE
QMutexPrivate::QMutexPrivate(QMutex::RecursionMode mode)
- : recursive(mode == QMutex::Recursive), contenders(0), lastSpinCount(0), owner(0), count(0)
+ : QMutexData(mode), lastSpinCount(0), owner(0), count(0)
{
event = CreateEvent(0, FALSE, FALSE, 0);
if (!event)
diff --git a/src/corelib/thread/qorderedmutexlocker_p.h b/src/corelib/thread/qorderedmutexlocker_p.h
index 702125c..375ded1 100644
--- a/src/corelib/thread/qorderedmutexlocker_p.h
+++ b/src/corelib/thread/qorderedmutexlocker_p.h
@@ -55,7 +55,7 @@
QT_BEGIN_NAMESPACE
-class QMutex;
+#include <QtCore/qmutex.h>
/*
Locks 2 mutexes in a defined order, avoiding a recursive lock if
@@ -79,8 +79,8 @@ public:
void relock()
{
if (!locked) {
- if (mtx1) mtx1->lock();
- if (mtx2) mtx2->lock();
+ if (mtx1) mtx1->lockInline();
+ if (mtx2) mtx2->lockInline();
locked = true;
}
}
@@ -88,8 +88,8 @@ public:
void unlock()
{
if (locked) {
- if (mtx1) mtx1->unlock();
- if (mtx2) mtx2->unlock();
+ if (mtx1) mtx1->unlockInline();
+ if (mtx2) mtx2->unlockInline();
locked = false;
}
}
@@ -100,10 +100,10 @@ public:
if (mtx1 == mtx2)
return false;
if (mtx1 < mtx2) {
- mtx2->lock();
+ mtx2->lockInline();
return true;
}
- if (!mtx2->tryLock()) {
+ if (!mtx2->tryLockInline()) {
mtx1->unlock();
mtx2->lock();
mtx1->lock();
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 29a7263..05d38f6 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -2681,7 +2681,7 @@ void QByteArray::clear()
Writes byte array \a ba to the stream \a out and returns a reference
to the stream.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &out, const QByteArray &ba)
@@ -2698,7 +2698,7 @@ QDataStream &operator<<(QDataStream &out, const QByteArray &ba)
Reads a byte array into \a ba from the stream \a in and returns a
reference to the stream.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &in, QByteArray &ba)
diff --git a/src/corelib/tools/qcache.h b/src/corelib/tools/qcache.h
index 44477d7..debab7d 100644
--- a/src/corelib/tools/qcache.h
+++ b/src/corelib/tools/qcache.h
@@ -61,7 +61,7 @@ class QCache
};
Node *f, *l;
QHash<Key, Node> hash;
- void *unused;
+ void *unused; // ### Qt5: remove
int mx, total;
inline void unlink(Node &n) {
diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp
index 67ea00d..ddb1516 100644
--- a/src/corelib/tools/qchar.cpp
+++ b/src/corelib/tools/qchar.cpp
@@ -653,14 +653,41 @@ bool QChar::isSymbol() const
\fn bool QChar::isHighSurrogate() const
Returns true if the QChar is the high part of a utf16 surrogate
- (ie. if its code point is between 0xd800 and 0xdbff).
+ (ie. if its code point is between 0xd800 and 0xdbff, inclusive).
*/
/*!
\fn bool QChar::isLowSurrogate() const
Returns true if the QChar is the low part of a utf16 surrogate
- (ie. if its code point is between 0xdc00 and 0xdfff).
+ (ie. if its code point is between 0xdc00 and 0xdfff, inclusive).
+*/
+
+/*!
+ \fn static bool QChar::isHighSurrogate(uint ucs4)
+ \since 4.7
+
+ Returns true if the UCS-4-encoded character specified by \a ucs4
+ is the high part of a utf16 surrogate
+ (ie. if its code point is between 0xd800 and 0xdbff, inclusive).
+*/
+
+/*!
+ \fn static bool QChar::isLowSurrogate(uint ucs4)
+ \since 4.7
+
+ Returns true if the UCS-4-encoded character specified by \a ucs4
+ is the high part of a utf16 surrogate
+ (ie. if its code point is between 0xdc00 and 0xdfff, inclusive).
+*/
+
+/*!
+ \fn static bool QChar::requiresSurrogates(uint ucs4)
+ \since 4.7
+
+ Returns true if the UCS-4-encoded character specified by \a ucs4
+ can be splited to the high and low parts of a utf16 surrogate
+ (ie. if its code point is greater than or equals to 0x10000).
*/
/*!
@@ -1306,7 +1333,7 @@ QChar QChar::fromAscii(char c)
Writes the char \a chr to the stream \a out.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &out, const QChar &chr)
{
@@ -1319,7 +1346,7 @@ QDataStream &operator<<(QDataStream &out, const QChar &chr)
Reads a char from the stream \a in into char \a chr.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &in, QChar &chr)
{
diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h
index 1432c7f..205f911 100644
--- a/src/corelib/tools/qchar.h
+++ b/src/corelib/tools/qchar.h
@@ -285,6 +285,15 @@ public:
inline void setCell(uchar cell);
inline void setRow(uchar row);
+ static inline bool isHighSurrogate(uint ucs4) {
+ return ((ucs4 & 0xfffffc00) == 0xd800);
+ }
+ static inline bool isLowSurrogate(uint ucs4) {
+ return ((ucs4 & 0xfffffc00) == 0xdc00);
+ }
+ static inline bool requiresSurrogates(uint ucs4) {
+ return (ucs4 >= 0x10000);
+ }
static inline uint surrogateToUcs4(ushort high, ushort low) {
return (uint(high)<<10) + low - 0x35fdc00;
}
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 9afcd80..14b4a26 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -1705,7 +1705,7 @@ int QTime::secsTo(const QTime &t) const
Note that the time will wrap if it passes midnight. See addSecs()
for an example.
- \sa addSecs(), msecsTo()
+ \sa addSecs(), msecsTo(), QDateTime::addMSecs()
*/
QTime QTime::addMSecs(int ms) const
@@ -1734,7 +1734,7 @@ QTime QTime::addMSecs(int ms) const
seconds in a day, the result is always between -86400000 and
86400000 ms.
- \sa secsTo(), addMSecs()
+ \sa secsTo(), addMSecs(), QDateTime::msecsTo()
*/
int QTime::msecsTo(const QTime &t) const
@@ -2042,10 +2042,11 @@ int QTime::elapsed() const
later.
You can increment (or decrement) a datetime by a given number of
- seconds using addSecs(), or days using addDays(). Similarly you can
- use addMonths() and addYears(). The daysTo() function returns the
- number of days between two datetimes, and secsTo() returns the
- number of seconds between two datetimes.
+ milliseconds using addMSecs(), seconds using addSecs(), or days
+ using addDays(). Similarly you can use addMonths() and addYears().
+ The daysTo() function returns the number of days between two datetimes,
+ secsTo() returns the number of seconds between two datetimes, and
+ msecsTo() returns the number of milliseconds between two datetimes.
QDateTime can store datetimes as \l{Qt::LocalTime}{local time} or
as \l{Qt::UTC}{UTC}. QDateTime::currentDateTime() returns a
@@ -2719,7 +2720,7 @@ QDateTime QDateTime::addSecs(int s) const
later than the datetime of this object (or earlier if \a msecs is
negative).
- \sa addSecs(), secsTo(), addDays(), addMonths(), addYears()
+ \sa addSecs(), msecsTo(), addDays(), addMonths(), addYears()
*/
QDateTime QDateTime::addMSecs(qint64 msecs) const
{
@@ -2731,7 +2732,7 @@ QDateTime QDateTime::addMSecs(qint64 msecs) const
datetime. If the \a other datetime is earlier than this datetime,
the value returned is negative.
- \sa addDays(), secsTo()
+ \sa addDays(), secsTo(), msecsTo()
*/
int QDateTime::daysTo(const QDateTime &other) const
@@ -2766,6 +2767,33 @@ int QDateTime::secsTo(const QDateTime &other) const
}
/*!
+ Returns the number of milliseconds from this datetime to the \a other
+ datetime. If the \a other datetime is earlier than this datetime,
+ the value returned is negative.
+
+ Before performing the comparison, the two datetimes are converted
+ to Qt::UTC to ensure that the result is correct if one of the two
+ datetimes has daylight saving time (DST) and the other doesn't.
+
+ \sa addMSecs(), daysTo(), QTime::msecsTo()
+*/
+
+qint64 QDateTime::msecsTo(const QDateTime &other) const
+{
+ QDate selfDate;
+ QDate otherDate;
+ QTime selfTime;
+ QTime otherTime;
+
+ d->getUTC(selfDate, selfTime);
+ other.d->getUTC(otherDate, otherTime);
+
+ return (static_cast<qint64>(selfDate.daysTo(otherDate)) * static_cast<qint64>(MSECS_PER_DAY))
+ + static_cast<qint64>(selfTime.msecsTo(otherTime));
+}
+
+
+/*!
\fn QDateTime QDateTime::toTimeSpec(Qt::TimeSpec specification) const
Returns a copy of this datetime configured to use the given time
@@ -3545,7 +3573,7 @@ void QDateTime::detach()
Writes the \a date to stream \a out.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &out, const QDate &date)
@@ -3558,7 +3586,7 @@ QDataStream &operator<<(QDataStream &out, const QDate &date)
Reads a date from stream \a in into the \a date.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &in, QDate &date)
@@ -3574,7 +3602,7 @@ QDataStream &operator>>(QDataStream &in, QDate &date)
Writes \a time to stream \a out.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &out, const QTime &time)
@@ -3587,7 +3615,7 @@ QDataStream &operator<<(QDataStream &out, const QTime &time)
Reads a time from stream \a in into the given \a time.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &in, QTime &time)
@@ -3603,7 +3631,7 @@ QDataStream &operator>>(QDataStream &in, QTime &time)
Writes \a dateTime to the \a out stream.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &out, const QDateTime &dateTime)
{
@@ -3618,7 +3646,7 @@ QDataStream &operator<<(QDataStream &out, const QDateTime &dateTime)
Reads a datetime from the stream \a in into \a dateTime.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &in, QDateTime &dateTime)
diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h
index f445f1c..2466aeb 100644
--- a/src/corelib/tools/qdatetime.h
+++ b/src/corelib/tools/qdatetime.h
@@ -251,6 +251,7 @@ public:
inline QDateTime toUTC() const { return toTimeSpec(Qt::UTC); }
int daysTo(const QDateTime &) const;
int secsTo(const QDateTime &) const;
+ qint64 msecsTo(const QDateTime &) const;
bool operator==(const QDateTime &other) const;
inline bool operator!=(const QDateTime &other) const { return !(*this == other); }
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp
index 8fab963..1734b03 100644
--- a/src/corelib/tools/qeasingcurve.cpp
+++ b/src/corelib/tools/qeasingcurve.cpp
@@ -859,7 +859,7 @@ QDebug operator<<(QDebug debug, const QEasingCurve &item)
Writes the given \a easing curve to the given \a stream and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &stream, const QEasingCurve &easing)
@@ -884,7 +884,7 @@ QDataStream &operator<<(QDataStream &stream, const QEasingCurve &easing)
Reads an easing curve from the given \a stream into the given \a
easing curve and returns a reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &stream, QEasingCurve &easing)
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 85a8b63..2971c06 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -1666,7 +1666,7 @@ void QHashData::checkSanity()
This function requires the key and value types to implement \c
operator<<().
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
/*! \fn QDataStream &operator>>(QDataStream &in, QHash<Key, T> &hash)
@@ -1677,7 +1677,7 @@ void QHashData::checkSanity()
This function requires the key and value types to implement \c
operator>>().
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
/*! \class QMultiHash
diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp
index 7275a96..babc1d8 100644
--- a/src/corelib/tools/qline.cpp
+++ b/src/corelib/tools/qline.cpp
@@ -272,7 +272,7 @@ QDebug operator<<(QDebug d, const QLine &p)
Writes the given \a line to the given \a stream and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &stream, const QLine &line)
@@ -287,7 +287,7 @@ QDataStream &operator<<(QDataStream &stream, const QLine &line)
Reads a line from the given \a stream into the given \a line and
returns a reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &stream, QLine &line)
@@ -834,7 +834,7 @@ QDebug operator<<(QDebug d, const QLineF &p)
Writes the given \a line to the given \a stream and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &stream, const QLineF &line)
@@ -849,7 +849,7 @@ QDataStream &operator<<(QDataStream &stream, const QLineF &line)
Reads a line from the given \a stream into the given \a line and
returns a reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &stream, QLineF &line)
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 722744c..99c9795 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -712,7 +712,7 @@ Q_OUTOFLINE_TEMPLATE void QList<T>::detach_helper()
template <typename T>
Q_OUTOFLINE_TEMPLATE QList<T>::~QList()
{
- if (d && !d->ref.deref())
+ if (!d->ref.deref())
free(d);
}
@@ -740,8 +740,7 @@ Q_OUTOFLINE_TEMPLATE void QList<T>::free(QListData::Data *data)
{
node_destruct(reinterpret_cast<Node *>(data->array + data->begin),
reinterpret_cast<Node *>(data->array + data->end));
- if (data->ref == 0)
- qFree(data);
+ qFree(data);
}
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index c3f6783..519ff3d 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -129,6 +129,11 @@ inline bool isascii(int c)
}
#endif
+#if defined(Q_OS_SYMBIAN)
+void qt_symbianUpdateSystemPrivate();
+void qt_symbianInitSystemLocale();
+#endif
+
/******************************************************************************
** Helpers for accessing Qt locale database
*/
@@ -170,16 +175,17 @@ static QLocale::Language codeToLanguage(const QChar *code)
}
// Assumes that code is a
-// QChar code[2];
+// QChar code[3];
static QLocale::Country codeToCountry(const QChar *code)
{
ushort uc1 = code[0].unicode();
ushort uc2 = code[1].unicode();
+ ushort uc3 = code[2].unicode();
const unsigned char *c = country_code_list;
- for (; *c != 0; c += 2) {
- if (uc1 == c[0] && uc2 == c[1])
- return QLocale::Country((c - country_code_list)/2);
+ for (; *c != 0; c += 3) {
+ if (uc1 == c[0] && uc2 == c[1] && uc3 == c[2])
+ return QLocale::Country((c - country_code_list)/3);
}
return QLocale::AnyCountry;
@@ -207,10 +213,15 @@ static QString countryToCode(QLocale::Country country)
if (country == QLocale::AnyCountry)
return QString();
- QString code(2, Qt::Uninitialized);
- const unsigned char *c = country_code_list + 2*(uint(country));
+ const unsigned char *c = country_code_list + 3*(uint(country));
+
+ QString code(c[2] == 0 ? 2 : 3, Qt::Uninitialized);
+
code[0] = ushort(c[0]);
code[1] = ushort(c[1]);
+ if (c[2] != 0)
+ code[2] = ushort(c[2]);
+
return code;
}
@@ -246,7 +257,7 @@ static bool splitLocaleName(const QString &name, QChar *lang_begin, QChar *cntry
{
for (int i = 0; i < 3; ++i)
lang_begin[i] = 0;
- for (int i = 0; i < 2; ++i)
+ for (int i = 0; i < 3; ++i)
cntry_begin[i] = 0;
int l = name.length();
@@ -277,7 +288,7 @@ static bool splitLocaleName(const QString &name, QChar *lang_begin, QChar *cntry
break;
case 1:
// parsing country
- if (cntry - cntry_begin == 2) {
+ if (cntry - cntry_begin == 3) {
cntry_begin[0] = 0;
break;
}
@@ -301,7 +312,7 @@ void getLangAndCountry(const QString &name, QLocale::Language &lang, QLocale::Co
cntry = QLocale::AnyCountry;
QChar lang_code[3];
- QChar cntry_code[2];
+ QChar cntry_code[3];
if (!splitLocaleName(name, lang_code, cntry_code))
return;
@@ -419,7 +430,7 @@ QByteArray getWinLocaleName(LCID id = LOCALE_USER_DEFAULT)
if (id == LOCALE_USER_DEFAULT) {
result = envVarLocale();
QChar lang[3];
- QChar cntry[2];
+ QChar cntry[3];
if ( result == "C" || (!result.isEmpty()
&& splitLocaleName(QString::fromLocal8Bit(result), lang, cntry)) ) {
long id = 0;
@@ -945,7 +956,7 @@ static QByteArray getMacLocaleName()
QByteArray result = envVarLocale();
QChar lang[3];
- QChar cntry[2];
+ QChar cntry[3];
if (result.isEmpty() || result != "C"
&& !splitLocaleName(QString::fromLocal8Bit(result), lang, cntry)) {
QCFType<CFLocaleRef> l = CFLocaleCopyCurrent();
@@ -1215,7 +1226,7 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
case LanguageId:
case CountryId: {
QString preferredLanguage;
- QString preferredCountry;
+ QString preferredCountry(3, QChar()); // codeToCountry assumes QChar[3]
getMacPreferredLanguageAndCountry(&preferredLanguage, &preferredCountry);
QLocale::Language languageCode = (preferredLanguage.isEmpty() ? QLocale::C : codeToLanguage(preferredLanguage.data()));
QLocale::Country countryCode = (preferredCountry.isEmpty() ? QLocale::AnyCountry : codeToCountry(preferredCountry.data()));
@@ -1407,6 +1418,9 @@ static const QSystemLocale *systemLocale()
{
if (_systemLocale)
return _systemLocale;
+#if defined(Q_OS_SYMBIAN)
+ qt_symbianInitSystemLocale();
+#endif
return QSystemLocale_globalSystemLocale();
}
@@ -1417,6 +1431,10 @@ void QLocalePrivate::updateSystemPrivate()
system_lp = globalLocalePrivate();
*system_lp = *sys_locale->fallbackLocale().d();
+#if defined(Q_OS_SYMBIAN)
+ qt_symbianUpdateSystemPrivate();
+#endif
+
QVariant res = sys_locale->query(QSystemLocale::LanguageId, QVariant());
if (!res.isNull())
system_lp->m_language_id = res.toInt();
@@ -1570,7 +1588,7 @@ QDataStream &operator>>(QDataStream &ds, QLocale &l)
This constructor converts the locale name to a language/country
pair; it does not use the system locale database.
- QLocale's data is based on Common Locale Data Repository v1.8.0.
+ QLocale's data is based on Common Locale Data Repository v1.8.1.
The double-to-string and string-to-double conversion functions are
covered by the following licenses:
diff --git a/src/corelib/tools/qlocale.h b/src/corelib/tools/qlocale.h
index ac05c86..5023201 100644
--- a/src/corelib/tools/qlocale.h
+++ b/src/corelib/tools/qlocale.h
@@ -586,7 +586,8 @@ public:
Serbia = 243,
SaintBarthelemy = 244,
SaintMartin = 245,
- LastCountry = SaintMartin
+ LatinAmericaAndTheCaribbean = 246,
+ LastCountry = LatinAmericaAndTheCaribbean
};
enum MeasurementSystem { MetricSystem, ImperialSystem };
diff --git a/src/corelib/tools/qlocale_data_p.h b/src/corelib/tools/qlocale_data_p.h
index 13e95f7..5f4a9c2 100644
--- a/src/corelib/tools/qlocale_data_p.h
+++ b/src/corelib/tools/qlocale_data_p.h
@@ -73,8 +73,8 @@ static const int ImperialMeasurementSystemsCount =
sizeof(ImperialMeasurementSystems)/sizeof(ImperialMeasurementSystems[0]);
/*
- This part of the file was generated on 2010-03-19 from the
- Common Locale Data Repository v1.8.0
+ This part of the file was generated on 2010-05-19 from the
+ Common Locale Data Repository v1.8.1
http://www.unicode.org/cldr/
@@ -197,108 +197,108 @@ static const quint16 locale_index[] = {
189, // Somali
193, // Spanish
0, // Sundanese
- 214, // Swahili
- 216, // Swedish
+ 215, // Swahili
+ 217, // Swedish
0, // Tagalog
- 218, // Tajik
- 219, // Tamil
- 221, // Tatar
- 222, // Telugu
- 223, // Thai
- 224, // Tibetan
- 226, // Tigrinya
- 228, // Tonga
- 229, // Tsonga
- 230, // Turkish
+ 219, // Tajik
+ 220, // Tamil
+ 222, // Tatar
+ 223, // Telugu
+ 224, // Thai
+ 225, // Tibetan
+ 227, // Tigrinya
+ 229, // Tonga
+ 230, // Tsonga
+ 231, // Turkish
0, // Turkmen
0, // Twi
- 231, // Uigur
- 232, // Ukrainian
- 233, // Urdu
- 235, // Uzbek
- 237, // Vietnamese
+ 232, // Uigur
+ 233, // Ukrainian
+ 234, // Urdu
+ 236, // Uzbek
+ 238, // Vietnamese
0, // Volapuk
- 238, // Welsh
- 239, // Wolof
- 240, // Xhosa
+ 239, // Welsh
+ 240, // Wolof
+ 241, // Xhosa
0, // Yiddish
- 241, // Yoruba
+ 242, // Yoruba
0, // Zhuang
- 242, // Zulu
- 243, // Nynorsk
- 244, // Bosnian
- 245, // Divehi
- 246, // Manx
- 247, // Cornish
- 248, // Akan
- 249, // Konkani
- 250, // Ga
- 251, // Igbo
- 252, // Kamba
- 253, // Syriac
- 254, // Blin
- 255, // Geez
- 257, // Koro
- 258, // Sidamo
- 259, // Atsam
- 260, // Tigre
- 261, // Jju
- 262, // Friulian
- 263, // Venda
- 264, // Ewe
- 266, // Walamo
- 267, // Hawaiian
- 268, // Tyap
- 269, // Chewa
- 270, // Filipino
- 271, // Swiss German
- 272, // Sichuan Yi
- 273, // Kpelle
- 275, // Low German
- 276, // South Ndebele
- 277, // Northern Sotho
- 278, // Northern Sami
- 280, // Taroko
- 281, // Gusii
- 282, // Taita
- 283, // Fulah
- 284, // Kikuyu
- 285, // Samburu
- 286, // Sena
- 287, // North Ndebele
- 288, // Rombo
- 289, // Tachelhit
- 290, // Kabyle
- 291, // Nyankole
- 292, // Bena
- 293, // Vunjo
- 294, // Bambara
- 295, // Embu
- 296, // Cherokee
- 297, // Morisyen
- 298, // Makonde
- 299, // Langi
- 300, // Ganda
- 301, // Bemba
- 302, // Kabuverdianu
- 303, // Meru
- 304, // Kalenjin
- 305, // Nama
- 306, // Machame
- 307, // Colognian
- 308, // Masai
- 310, // Soga
- 311, // Luyia
- 312, // Asu
- 313, // Teso
- 315, // Saho
- 316, // Koyra Chiini
- 317, // Rwa
- 318, // Luo
- 319, // Chiga
- 320, // Central Morocco Tamazight
- 321, // Koyraboro Senni
- 322, // Shambala
+ 243, // Zulu
+ 244, // Nynorsk
+ 245, // Bosnian
+ 246, // Divehi
+ 247, // Manx
+ 248, // Cornish
+ 249, // Akan
+ 250, // Konkani
+ 251, // Ga
+ 252, // Igbo
+ 253, // Kamba
+ 254, // Syriac
+ 255, // Blin
+ 256, // Geez
+ 258, // Koro
+ 259, // Sidamo
+ 260, // Atsam
+ 261, // Tigre
+ 262, // Jju
+ 263, // Friulian
+ 264, // Venda
+ 265, // Ewe
+ 267, // Walamo
+ 268, // Hawaiian
+ 269, // Tyap
+ 270, // Chewa
+ 271, // Filipino
+ 272, // Swiss German
+ 273, // Sichuan Yi
+ 274, // Kpelle
+ 276, // Low German
+ 277, // South Ndebele
+ 278, // Northern Sotho
+ 279, // Northern Sami
+ 281, // Taroko
+ 282, // Gusii
+ 283, // Taita
+ 284, // Fulah
+ 285, // Kikuyu
+ 286, // Samburu
+ 287, // Sena
+ 288, // North Ndebele
+ 289, // Rombo
+ 290, // Tachelhit
+ 291, // Kabyle
+ 292, // Nyankole
+ 293, // Bena
+ 294, // Vunjo
+ 295, // Bambara
+ 296, // Embu
+ 297, // Cherokee
+ 298, // Morisyen
+ 299, // Makonde
+ 300, // Langi
+ 301, // Ganda
+ 302, // Bemba
+ 303, // Kabuverdianu
+ 304, // Meru
+ 305, // Kalenjin
+ 306, // Nama
+ 307, // Machame
+ 308, // Colognian
+ 309, // Masai
+ 311, // Soga
+ 312, // Luyia
+ 313, // Asu
+ 314, // Teso
+ 316, // Saho
+ 317, // Koyra Chiini
+ 318, // Rwa
+ 319, // Luo
+ 320, // Chiga
+ 321, // Central Morocco Tamazight
+ 322, // Koyraboro Senni
+ 323, // Shambala
0 // trailing 0
};
@@ -315,7 +315,7 @@ static const QLocalePrivate locale_data[] = {
{ 6, 2, 44, 46, 59, 37, 48, 45, 43, 101, 115,8 , 123,18 , 42,7 , 49,12 , 776,48 , 824,78 , 902,24 , 803,48 , 851,78 , 929,24 , 383,28 , 411,58 , 469,14 , 383,28 , 411,58 , 469,14 , 7,2 , 7,2 }, // Albanian/Albania
{ 7, 69, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 926,46 , 972,62 , 1034,24 , 953,46 , 999,62 , 1061,24 , 483,27 , 510,28 , 538,14 , 483,27 , 510,28 , 538,14 , 9,3 , 9,4 }, // Amharic/Ethiopia
{ 8, 186, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 552,52 , 604,52 , 656,14 , 552,52 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/SaudiArabia
- { 8, 3, 44, 46, 59, 37, 48, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 670,38 , 604,52 , 656,14 , 670,38 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Algeria
+ { 8, 3, 44, 46, 59, 37, 48, 45, 43, 101, 179,8 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 670,38 , 604,52 , 656,14 , 670,38 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Algeria
{ 8, 17, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 670,38 , 604,52 , 656,14 , 670,38 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Bahrain
{ 8, 64, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 670,38 , 604,52 , 656,14 , 670,38 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Egypt
{ 8, 103, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 670,38 , 604,52 , 656,14 , 670,38 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Iraq
@@ -323,70 +323,70 @@ static const QLocalePrivate locale_data[] = {
{ 8, 115, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 670,38 , 604,52 , 656,14 , 670,38 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Kuwait
{ 8, 119, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1249,92 , 1249,92 , 1133,24 , 1276,92 , 1276,92 , 1160,24 , 552,52 , 604,52 , 656,14 , 552,52 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Lebanon
{ 8, 122, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 670,38 , 604,52 , 656,14 , 670,38 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/LibyanArabJamahiriya
- { 8, 145, 44, 46, 59, 37, 48, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 670,38 , 604,52 , 656,14 , 670,38 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Morocco
+ { 8, 145, 44, 46, 59, 37, 48, 45, 43, 101, 179,8 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 670,38 , 604,52 , 656,14 , 670,38 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Morocco
{ 8, 162, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 670,38 , 604,52 , 656,14 , 670,38 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Oman
{ 8, 175, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 552,52 , 604,52 , 656,14 , 552,52 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Qatar
{ 8, 201, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 670,38 , 604,52 , 656,14 , 670,38 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Sudan
{ 8, 207, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1249,92 , 1249,92 , 1133,24 , 1276,92 , 1276,92 , 1160,24 , 552,52 , 604,52 , 656,14 , 552,52 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/SyrianArabRepublic
- { 8, 216, 44, 46, 59, 37, 48, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 552,52 , 604,52 , 656,14 , 552,52 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Tunisia
+ { 8, 216, 44, 46, 59, 37, 48, 45, 43, 101, 179,8 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 552,52 , 604,52 , 656,14 , 552,52 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Tunisia
{ 8, 223, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 670,38 , 604,52 , 656,14 , 670,38 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/UnitedArabEmirates
{ 8, 237, 1643, 1644, 1563, 1642, 1632, 45, 43, 101, 151,10 , 161,18 , 18,7 , 61,12 , 1058,75 , 1058,75 , 1133,24 , 1085,75 , 1085,75 , 1160,24 , 552,52 , 604,52 , 656,14 , 552,52 , 604,52 , 656,14 , 12,1 , 13,1 }, // Arabic/Yemen
- { 9, 11, 44, 46, 59, 37, 48, 45, 43, 101, 179,8 , 35,18 , 37,5 , 8,10 , 1341,48 , 1389,94 , 1483,27 , 1368,48 , 1416,94 , 134,27 , 708,28 , 736,62 , 798,14 , 708,28 , 736,62 , 798,14 , 13,3 , 14,3 }, // Armenian/Armenia
- { 10, 100, 46, 44, 59, 37, 48, 45, 43, 101, 187,8 , 195,18 , 73,8 , 81,12 , 1510,62 , 1572,88 , 1483,27 , 1510,62 , 1572,88 , 134,27 , 812,37 , 849,58 , 798,14 , 812,37 , 849,58 , 798,14 , 16,9 , 17,7 }, // Assamese/India
- { 12, 15, 44, 46, 59, 37, 48, 45, 43, 101, 213,8 , 221,19 , 37,5 , 8,10 , 1660,48 , 1708,77 , 1483,27 , 1660,48 , 1708,77 , 134,27 , 907,26 , 933,67 , 99,14 , 907,26 , 933,67 , 99,14 , 0,2 , 0,2 }, // Azerbaijani/Azerbaijan
- { 12, 102, 44, 46, 59, 37, 48, 45, 43, 101, 213,8 , 221,19 , 37,5 , 8,10 , 1660,48 , 1708,77 , 1483,27 , 1660,48 , 1708,77 , 134,27 , 907,26 , 933,67 , 99,14 , 907,26 , 933,67 , 99,14 , 0,2 , 0,2 }, // Azerbaijani/Iran
- { 14, 197, 44, 46, 59, 37, 48, 45, 43, 101, 72,10 , 240,31 , 37,5 , 8,10 , 1785,48 , 1833,93 , 1926,24 , 1785,48 , 1833,93 , 1926,24 , 1000,21 , 1021,68 , 798,14 , 1000,21 , 1021,68 , 798,14 , 0,2 , 0,2 }, // Basque/Spain
- { 15, 18, 46, 44, 59, 37, 2534, 45, 43, 101, 271,6 , 195,18 , 18,7 , 25,12 , 1950,90 , 1950,90 , 2040,33 , 1950,90 , 1950,90 , 2040,33 , 1089,37 , 1126,58 , 1184,18 , 1089,37 , 1126,58 , 1184,18 , 25,9 , 24,7 }, // Bengali/Bangladesh
- { 15, 100, 46, 44, 59, 37, 2534, 45, 43, 101, 271,6 , 195,18 , 18,7 , 25,12 , 1950,90 , 1950,90 , 2040,33 , 1950,90 , 1950,90 , 2040,33 , 1089,37 , 1126,58 , 1184,18 , 1089,37 , 1126,58 , 1184,18 , 25,9 , 24,7 }, // Bengali/India
- { 16, 25, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 277,29 , 93,22 , 115,35 , 2073,75 , 2148,205 , 1483,27 , 2073,75 , 2148,205 , 134,27 , 1202,34 , 1236,79 , 798,14 , 1202,34 , 1236,79 , 798,14 , 0,2 , 0,2 }, // Bhutani/Bhutan
- { 19, 74, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Breton/France
- { 20, 33, 44, 160, 59, 37, 48, 45, 43, 101, 324,8 , 332,18 , 37,5 , 8,10 , 2353,59 , 2412,82 , 2494,24 , 2353,59 , 2412,82 , 2494,24 , 1315,21 , 1336,55 , 1391,14 , 1315,21 , 1336,55 , 1391,14 , 0,2 , 0,2 }, // Bulgarian/Bulgaria
- { 21, 147, 46, 44, 4170, 37, 4160, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 2518,43 , 2561,88 , 2649,24 , 2518,43 , 2561,88 , 2649,24 , 1405,25 , 1430,54 , 1484,14 , 1405,25 , 1430,54 , 1484,14 , 0,2 , 0,2 }, // Burmese/Myanmar
- { 22, 20, 44, 160, 59, 37, 48, 45, 43, 101, 350,6 , 10,17 , 150,5 , 155,10 , 2673,48 , 2721,99 , 2820,24 , 2673,48 , 2721,95 , 2816,24 , 1498,21 , 1519,56 , 1575,14 , 1498,21 , 1519,56 , 1575,14 , 34,10 , 31,13 }, // Byelorussian/Belarus
- { 23, 36, 44, 46, 59, 37, 48, 45, 43, 101, 356,8 , 364,30 , 165,4 , 169,26 , 2844,27 , 2871,71 , 1483,27 , 2840,27 , 2867,71 , 134,27 , 1589,19 , 1608,76 , 798,14 , 1589,19 , 1608,76 , 798,14 , 44,5 , 44,5 }, // Cambodian/Cambodia
- { 24, 197, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 394,21 , 165,4 , 195,9 , 2942,60 , 3002,82 , 3084,24 , 2938,93 , 3031,115 , 3146,24 , 1684,21 , 1705,60 , 1765,14 , 1779,28 , 1807,60 , 1867,14 , 49,4 , 49,4 }, // Catalan/Spain
- { 25, 44, 46, 44, 59, 37, 48, 45, 43, 101, 415,6 , 421,13 , 204,6 , 210,11 , 3108,38 , 3108,38 , 3146,39 , 3170,39 , 3170,39 , 3170,39 , 1881,21 , 1902,28 , 1930,14 , 1881,21 , 1902,28 , 1930,14 , 0,2 , 0,2 }, // Chinese/China
- { 25, 97, 46, 44, 59, 37, 48, 45, 43, 101, 434,7 , 421,13 , 204,6 , 221,11 , 3108,38 , 3108,38 , 1483,27 , 3170,39 , 3170,39 , 134,27 , 1944,21 , 1902,28 , 1930,14 , 1944,21 , 1902,28 , 1930,14 , 0,2 , 0,2 }, // Chinese/HongKong
- { 25, 126, 46, 44, 59, 37, 48, 45, 43, 101, 434,7 , 441,15 , 204,6 , 221,11 , 3108,38 , 3108,38 , 1483,27 , 3170,39 , 3170,39 , 134,27 , 1944,21 , 1902,28 , 1930,14 , 1944,21 , 1902,28 , 1930,14 , 0,2 , 0,2 }, // Chinese/Macau
- { 25, 190, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 421,13 , 232,7 , 210,11 , 3108,38 , 3108,38 , 3146,39 , 3170,39 , 3170,39 , 3170,39 , 1881,21 , 1902,28 , 1930,14 , 1881,21 , 1902,28 , 1930,14 , 0,2 , 0,2 }, // Chinese/Singapore
- { 25, 208, 46, 44, 59, 37, 48, 45, 43, 101, 456,6 , 421,13 , 204,6 , 221,11 , 3108,38 , 3108,38 , 1483,27 , 3170,39 , 3170,39 , 134,27 , 1944,21 , 1902,28 , 1930,14 , 1944,21 , 1902,28 , 1930,14 , 0,2 , 0,2 }, // Chinese/Taiwan
- { 27, 54, 44, 46, 59, 37, 48, 45, 43, 101, 462,13 , 475,19 , 37,5 , 8,10 , 3185,49 , 3234,94 , 3328,39 , 3209,49 , 3258,98 , 3356,39 , 1965,28 , 1993,58 , 2051,14 , 1965,28 , 1993,58 , 2051,14 , 0,2 , 0,2 }, // Croatian/Croatia
- { 28, 57, 44, 160, 59, 37, 48, 45, 43, 101, 350,6 , 494,18 , 165,4 , 195,9 , 3328,39 , 3367,82 , 3449,24 , 134,27 , 3395,84 , 3479,24 , 2065,21 , 2086,49 , 2135,14 , 2065,21 , 2086,49 , 2135,14 , 53,4 , 53,4 }, // Czech/CzechRepublic
- { 29, 58, 44, 46, 44, 37, 48, 45, 43, 101, 27,8 , 512,23 , 150,5 , 155,10 , 3473,48 , 3521,84 , 134,24 , 3503,59 , 3562,84 , 320,24 , 2149,28 , 2177,51 , 2228,14 , 2149,28 , 2177,51 , 2228,14 , 57,4 , 57,4 }, // Danish/Denmark
- { 30, 151, 44, 46, 59, 37, 48, 45, 43, 101, 535,8 , 99,16 , 37,5 , 8,10 , 3605,48 , 3653,88 , 134,24 , 3646,59 , 3705,88 , 320,24 , 2242,21 , 2263,59 , 2322,14 , 2242,21 , 2263,59 , 2322,14 , 0,2 , 0,2 }, // Dutch/Netherlands
- { 30, 21, 44, 46, 59, 37, 48, 45, 43, 101, 543,7 , 99,16 , 37,5 , 8,10 , 3605,48 , 3653,88 , 134,24 , 3646,59 , 3705,88 , 320,24 , 2242,21 , 2263,59 , 2322,14 , 2242,21 , 2263,59 , 2322,14 , 0,2 , 0,2 }, // Dutch/Belgium
- { 31, 225, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/UnitedStates
- { 31, 4, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/AmericanSamoa
- { 31, 13, 46, 44, 59, 37, 48, 45, 43, 101, 543,7 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Australia
+ { 9, 11, 44, 46, 59, 37, 48, 45, 43, 101, 187,8 , 35,18 , 37,5 , 8,10 , 1341,48 , 1389,94 , 1483,27 , 1368,48 , 1416,94 , 134,27 , 708,28 , 736,62 , 798,14 , 708,28 , 736,62 , 798,14 , 13,3 , 14,3 }, // Armenian/Armenia
+ { 10, 100, 46, 44, 59, 37, 48, 45, 43, 101, 195,8 , 203,18 , 73,8 , 81,12 , 1510,62 , 1572,88 , 1483,27 , 1510,62 , 1572,88 , 134,27 , 812,37 , 849,58 , 798,14 , 812,37 , 849,58 , 798,14 , 16,9 , 17,7 }, // Assamese/India
+ { 12, 15, 44, 46, 59, 37, 48, 45, 43, 101, 221,8 , 229,19 , 37,5 , 8,10 , 1660,48 , 1708,77 , 1483,27 , 1660,48 , 1708,77 , 134,27 , 907,26 , 933,67 , 99,14 , 907,26 , 933,67 , 99,14 , 0,2 , 0,2 }, // Azerbaijani/Azerbaijan
+ { 12, 102, 44, 46, 59, 37, 48, 45, 43, 101, 221,8 , 229,19 , 37,5 , 8,10 , 1660,48 , 1708,77 , 1483,27 , 1660,48 , 1708,77 , 134,27 , 907,26 , 933,67 , 99,14 , 907,26 , 933,67 , 99,14 , 0,2 , 0,2 }, // Azerbaijani/Iran
+ { 14, 197, 44, 46, 59, 37, 48, 45, 43, 101, 72,10 , 248,31 , 37,5 , 8,10 , 1785,48 , 1833,93 , 1926,24 , 1785,48 , 1833,93 , 1926,24 , 1000,21 , 1021,68 , 798,14 , 1000,21 , 1021,68 , 798,14 , 0,2 , 0,2 }, // Basque/Spain
+ { 15, 18, 46, 44, 59, 37, 2534, 45, 43, 101, 279,6 , 203,18 , 18,7 , 25,12 , 1950,90 , 1950,90 , 2040,33 , 1950,90 , 1950,90 , 2040,33 , 1089,37 , 1126,58 , 1184,18 , 1089,37 , 1126,58 , 1184,18 , 25,9 , 24,7 }, // Bengali/Bangladesh
+ { 15, 100, 46, 44, 59, 37, 2534, 45, 43, 101, 279,6 , 203,18 , 18,7 , 25,12 , 1950,90 , 1950,90 , 2040,33 , 1950,90 , 1950,90 , 2040,33 , 1089,37 , 1126,58 , 1184,18 , 1089,37 , 1126,58 , 1184,18 , 25,9 , 24,7 }, // Bengali/India
+ { 16, 25, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 285,29 , 93,22 , 115,35 , 2073,75 , 2148,205 , 1483,27 , 2073,75 , 2148,205 , 134,27 , 1202,34 , 1236,79 , 798,14 , 1202,34 , 1236,79 , 798,14 , 0,2 , 0,2 }, // Bhutani/Bhutan
+ { 19, 74, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Breton/France
+ { 20, 33, 44, 160, 59, 37, 48, 45, 43, 101, 332,8 , 340,18 , 37,5 , 8,10 , 2353,59 , 2412,82 , 2494,24 , 2353,59 , 2412,82 , 2494,24 , 1315,21 , 1336,55 , 1391,14 , 1315,21 , 1336,55 , 1391,14 , 34,7 , 31,7 }, // Bulgarian/Bulgaria
+ { 21, 147, 46, 44, 4170, 37, 4160, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 2518,43 , 2561,88 , 2649,24 , 2518,43 , 2561,88 , 2649,24 , 1405,25 , 1430,54 , 1484,14 , 1405,25 , 1430,54 , 1484,14 , 0,2 , 0,2 }, // Burmese/Myanmar
+ { 22, 20, 44, 160, 59, 37, 48, 45, 43, 101, 358,6 , 10,17 , 150,5 , 155,10 , 2673,48 , 2721,99 , 2820,24 , 2673,48 , 2721,95 , 2816,24 , 1498,21 , 1519,56 , 1575,14 , 1498,21 , 1519,56 , 1575,14 , 41,10 , 38,13 }, // Byelorussian/Belarus
+ { 23, 36, 44, 46, 59, 37, 48, 45, 43, 101, 364,8 , 372,30 , 165,4 , 169,26 , 2844,27 , 2871,71 , 1483,27 , 2840,27 , 2867,71 , 134,27 , 1589,19 , 1608,76 , 798,14 , 1589,19 , 1608,76 , 798,14 , 51,5 , 51,5 }, // Cambodian/Cambodia
+ { 24, 197, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 402,21 , 165,4 , 195,9 , 2942,60 , 3002,82 , 3084,24 , 2938,93 , 3031,115 , 3146,24 , 1684,21 , 1705,60 , 1765,14 , 1779,28 , 1807,60 , 1867,14 , 56,4 , 56,4 }, // Catalan/Spain
+ { 25, 44, 46, 44, 59, 37, 48, 45, 43, 101, 423,6 , 429,13 , 204,6 , 210,11 , 3108,38 , 3108,38 , 3146,39 , 3170,39 , 3170,39 , 3170,39 , 1881,21 , 1902,28 , 1930,14 , 1881,21 , 1902,28 , 1930,14 , 60,2 , 60,2 }, // Chinese/China
+ { 25, 97, 46, 44, 59, 37, 48, 45, 43, 101, 442,7 , 429,13 , 204,6 , 221,11 , 3108,38 , 3108,38 , 1483,27 , 3170,39 , 3170,39 , 134,27 , 1944,21 , 1902,28 , 1930,14 , 1944,21 , 1902,28 , 1930,14 , 60,2 , 60,2 }, // Chinese/HongKong
+ { 25, 126, 46, 44, 59, 37, 48, 45, 43, 101, 442,7 , 449,15 , 204,6 , 221,11 , 3108,38 , 3108,38 , 1483,27 , 3170,39 , 3170,39 , 134,27 , 1944,21 , 1902,28 , 1930,14 , 1944,21 , 1902,28 , 1930,14 , 60,2 , 60,2 }, // Chinese/Macau
+ { 25, 190, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 429,13 , 232,7 , 210,11 , 3108,38 , 3108,38 , 3146,39 , 3170,39 , 3170,39 , 3170,39 , 1881,21 , 1902,28 , 1930,14 , 1881,21 , 1902,28 , 1930,14 , 60,2 , 60,2 }, // Chinese/Singapore
+ { 25, 208, 46, 44, 59, 37, 48, 45, 43, 101, 464,6 , 429,13 , 204,6 , 221,11 , 3108,38 , 3108,38 , 1483,27 , 3170,39 , 3170,39 , 134,27 , 1944,21 , 1902,28 , 1930,14 , 1944,21 , 1902,28 , 1930,14 , 60,2 , 60,2 }, // Chinese/Taiwan
+ { 27, 54, 44, 46, 59, 37, 48, 45, 43, 101, 470,13 , 483,19 , 37,5 , 8,10 , 3185,49 , 3234,94 , 3328,39 , 3209,49 , 3258,98 , 3356,39 , 1965,28 , 1993,58 , 2051,14 , 1965,28 , 1993,58 , 2051,14 , 0,2 , 0,2 }, // Croatian/Croatia
+ { 28, 57, 44, 160, 59, 37, 48, 45, 43, 101, 358,6 , 502,18 , 165,4 , 195,9 , 3328,39 , 3367,82 , 3449,24 , 134,27 , 3395,84 , 3479,24 , 2065,21 , 2086,49 , 2135,14 , 2065,21 , 2086,49 , 2135,14 , 62,4 , 62,4 }, // Czech/CzechRepublic
+ { 29, 58, 44, 46, 44, 37, 48, 45, 43, 101, 27,8 , 520,23 , 150,5 , 155,10 , 3473,48 , 3521,84 , 134,24 , 3503,59 , 3562,84 , 320,24 , 2149,28 , 2177,51 , 2228,14 , 2149,28 , 2177,51 , 2228,14 , 66,4 , 66,4 }, // Danish/Denmark
+ { 30, 151, 44, 46, 59, 37, 48, 45, 43, 101, 543,8 , 99,16 , 37,5 , 8,10 , 3605,48 , 3653,88 , 134,24 , 3646,59 , 3705,88 , 320,24 , 2242,21 , 2263,59 , 2322,14 , 2242,21 , 2263,59 , 2322,14 , 0,2 , 0,2 }, // Dutch/Netherlands
+ { 30, 21, 44, 46, 59, 37, 48, 45, 43, 101, 551,7 , 99,16 , 37,5 , 8,10 , 3605,48 , 3653,88 , 134,24 , 3646,59 , 3705,88 , 320,24 , 2242,21 , 2263,59 , 2322,14 , 2242,21 , 2263,59 , 2322,14 , 0,2 , 0,2 }, // Dutch/Belgium
+ { 31, 225, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/UnitedStates
+ { 31, 4, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/AmericanSamoa
+ { 31, 13, 46, 44, 59, 37, 48, 45, 43, 101, 551,7 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Australia
{ 31, 21, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 99,16 , 37,5 , 239,24 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Belgium
- { 31, 22, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 556,12 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Belize
+ { 31, 22, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 564,12 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Belize
{ 31, 28, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 82,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Botswana
- { 31, 38, 46, 44, 59, 37, 48, 45, 43, 101, 115,8 , 568,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Canada
- { 31, 89, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Guam
- { 31, 97, 46, 44, 59, 37, 48, 45, 43, 101, 271,6 , 195,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/HongKong
+ { 31, 38, 46, 44, 59, 37, 48, 45, 43, 101, 115,8 , 203,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Canada
+ { 31, 89, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Guam
+ { 31, 97, 46, 44, 59, 37, 48, 45, 43, 101, 279,6 , 203,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/HongKong
{ 31, 100, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 99,16 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/India
- { 31, 104, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 99,16 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 49,4 , 49,4 }, // English/Ireland
- { 31, 107, 46, 44, 59, 37, 48, 45, 43, 101, 271,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Jamaica
+ { 31, 104, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 99,16 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 56,4 , 56,4 }, // English/Ireland
+ { 31, 107, 46, 44, 59, 37, 48, 45, 43, 101, 279,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Jamaica
{ 31, 133, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Malta
- { 31, 134, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/MarshallIslands
- { 31, 137, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Mauritius
- { 31, 148, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Namibia
- { 31, 154, 46, 44, 59, 37, 48, 45, 43, 101, 543,7 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/NewZealand
- { 31, 160, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/NorthernMarianaIslands
+ { 31, 134, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/MarshallIslands
+ { 31, 137, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Mauritius
+ { 31, 148, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Namibia
+ { 31, 154, 46, 44, 59, 37, 48, 45, 43, 101, 551,7 , 10,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/NewZealand
+ { 31, 160, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/NorthernMarianaIslands
{ 31, 163, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 99,16 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Pakistan
- { 31, 170, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Philippines
- { 31, 190, 46, 44, 59, 37, 48, 45, 43, 101, 271,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Singapore
- { 31, 195, 44, 160, 59, 37, 48, 45, 43, 101, 585,10 , 82,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/SouthAfrica
- { 31, 215, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/TrinidadAndTobago
+ { 31, 170, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Philippines
+ { 31, 190, 46, 44, 59, 37, 48, 45, 43, 101, 279,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Singapore
+ { 31, 195, 44, 160, 59, 37, 48, 45, 43, 101, 576,10 , 82,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/SouthAfrica
+ { 31, 215, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/TrinidadAndTobago
{ 31, 224, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 37,5 , 8,10 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/UnitedKingdom
- { 31, 226, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/UnitedStatesMinorOutlyingIslands
- { 31, 234, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/USVirginIslands
- { 31, 240, 46, 44, 59, 37, 48, 45, 43, 101, 356,8 , 82,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Zimbabwe
- { 33, 68, 44, 160, 59, 37, 48, 45, 43, 101, 324,8 , 494,18 , 165,4 , 263,9 , 3741,59 , 3800,91 , 3891,24 , 3793,59 , 3852,91 , 3943,24 , 2336,14 , 2350,63 , 2336,14 , 2336,14 , 2350,63 , 2336,14 , 61,14 , 61,16 }, // Estonian/Estonia
- { 34, 71, 44, 46, 59, 37, 48, 8722, 43, 101, 535,8 , 82,17 , 37,5 , 8,10 , 3915,48 , 3963,83 , 134,24 , 3967,48 , 4015,83 , 320,24 , 2413,28 , 2441,74 , 2515,14 , 2413,28 , 2441,74 , 2515,14 , 0,2 , 0,2 }, // Faroese/FaroeIslands
- { 36, 73, 44, 160, 59, 37, 48, 45, 43, 101, 595,8 , 603,17 , 272,4 , 276,9 , 4046,69 , 4115,105 , 4220,24 , 4098,129 , 4098,129 , 4227,24 , 2529,21 , 2550,67 , 2617,14 , 2529,21 , 2631,81 , 2617,14 , 75,3 , 77,3 }, // Finnish/Finland
+ { 31, 226, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/UnitedStatesMinorOutlyingIslands
+ { 31, 234, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 35,18 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/USVirginIslands
+ { 31, 240, 46, 44, 59, 37, 48, 45, 43, 101, 364,8 , 82,17 , 18,7 , 25,12 , 0,48 , 48,86 , 134,24 , 0,48 , 48,86 , 320,24 , 0,28 , 28,57 , 85,14 , 0,28 , 28,57 , 85,14 , 0,2 , 0,2 }, // English/Zimbabwe
+ { 33, 68, 44, 160, 59, 37, 48, 45, 43, 101, 332,8 , 502,18 , 165,4 , 263,9 , 3741,59 , 3800,91 , 3891,24 , 3793,59 , 3852,91 , 3943,24 , 2336,14 , 2350,63 , 2336,14 , 2336,14 , 2350,63 , 2336,14 , 70,14 , 70,16 }, // Estonian/Estonia
+ { 34, 71, 44, 46, 59, 37, 48, 8722, 43, 101, 543,8 , 82,17 , 37,5 , 8,10 , 3915,48 , 3963,83 , 134,24 , 3967,48 , 4015,83 , 320,24 , 2413,28 , 2441,74 , 2515,14 , 2413,28 , 2441,74 , 2515,14 , 0,2 , 0,2 }, // Faroese/FaroeIslands
+ { 36, 73, 44, 160, 59, 37, 48, 45, 43, 101, 586,8 , 594,17 , 272,4 , 276,9 , 4046,69 , 4115,105 , 4220,24 , 4098,129 , 4098,129 , 4227,24 , 2529,21 , 2550,67 , 2617,14 , 2529,21 , 2631,81 , 2617,14 , 84,3 , 86,3 }, // Finnish/Finland
{ 37, 74, 44, 160, 59, 37, 48, 45, 43, 101, 27,8 , 99,16 , 37,5 , 8,10 , 4244,63 , 4307,85 , 134,24 , 4251,63 , 4314,85 , 320,24 , 2712,35 , 2747,52 , 2799,14 , 2712,35 , 2747,52 , 2799,14 , 0,2 , 0,2 }, // French/France
- { 37, 21, 44, 46, 59, 37, 48, 45, 43, 101, 543,7 , 99,16 , 37,5 , 285,23 , 4244,63 , 4307,85 , 134,24 , 4251,63 , 4314,85 , 320,24 , 2712,35 , 2747,52 , 2799,14 , 2712,35 , 2747,52 , 2799,14 , 0,2 , 0,2 }, // French/Belgium
+ { 37, 21, 44, 46, 59, 37, 48, 45, 43, 101, 551,7 , 99,16 , 37,5 , 285,23 , 4244,63 , 4307,85 , 134,24 , 4251,63 , 4314,85 , 320,24 , 2712,35 , 2747,52 , 2799,14 , 2712,35 , 2747,52 , 2799,14 , 0,2 , 0,2 }, // French/Belgium
{ 37, 37, 44, 160, 59, 37, 48, 45, 43, 101, 27,8 , 99,16 , 37,5 , 8,10 , 4244,63 , 4307,85 , 134,24 , 4251,63 , 4314,85 , 320,24 , 2712,35 , 2747,52 , 2799,14 , 2712,35 , 2747,52 , 2799,14 , 0,2 , 0,2 }, // French/Cameroon
{ 37, 38, 44, 160, 59, 37, 48, 45, 43, 101, 115,8 , 99,16 , 37,5 , 239,24 , 4244,63 , 4307,85 , 134,24 , 4251,63 , 4314,85 , 320,24 , 2712,35 , 2747,52 , 2799,14 , 2712,35 , 2747,52 , 2799,14 , 0,2 , 0,2 }, // French/Canada
{ 37, 41, 44, 160, 59, 37, 48, 45, 43, 101, 27,8 , 99,16 , 37,5 , 8,10 , 4244,63 , 4307,85 , 134,24 , 4251,63 , 4314,85 , 320,24 , 2712,35 , 2747,52 , 2799,14 , 2712,35 , 2747,52 , 2799,14 , 0,2 , 0,2 }, // French/CentralAfricanRepublic
@@ -401,232 +401,233 @@ static const QLocalePrivate locale_data[] = {
{ 37, 156, 44, 160, 59, 37, 48, 45, 43, 101, 27,8 , 99,16 , 37,5 , 8,10 , 4244,63 , 4307,85 , 134,24 , 4251,63 , 4314,85 , 320,24 , 2712,35 , 2747,52 , 2799,14 , 2712,35 , 2747,52 , 2799,14 , 0,2 , 0,2 }, // French/Niger
{ 37, 176, 44, 160, 59, 37, 48, 45, 43, 101, 27,8 , 99,16 , 37,5 , 8,10 , 4244,63 , 4307,85 , 134,24 , 4251,63 , 4314,85 , 320,24 , 2712,35 , 2747,52 , 2799,14 , 2712,35 , 2747,52 , 2799,14 , 0,2 , 0,2 }, // French/Reunion
{ 37, 187, 44, 160, 59, 37, 48, 45, 43, 101, 27,8 , 99,16 , 37,5 , 8,10 , 4244,63 , 4307,85 , 134,24 , 4251,63 , 4314,85 , 320,24 , 2712,35 , 2747,52 , 2799,14 , 2712,35 , 2747,52 , 2799,14 , 0,2 , 0,2 }, // French/Senegal
- { 37, 206, 46, 39, 59, 37, 48, 45, 43, 101, 324,8 , 10,17 , 37,5 , 308,14 , 4244,63 , 4307,85 , 134,24 , 4251,63 , 4314,85 , 320,24 , 2712,35 , 2747,52 , 2799,14 , 2712,35 , 2747,52 , 2799,14 , 0,2 , 0,2 }, // French/Switzerland
+ { 37, 206, 46, 39, 59, 37, 48, 45, 43, 101, 332,8 , 10,17 , 37,5 , 308,14 , 4244,63 , 4307,85 , 134,24 , 4251,63 , 4314,85 , 320,24 , 2712,35 , 2747,52 , 2799,14 , 2712,35 , 2747,52 , 2799,14 , 0,2 , 0,2 }, // French/Switzerland
{ 37, 244, 44, 160, 59, 37, 48, 45, 43, 101, 27,8 , 99,16 , 37,5 , 8,10 , 4244,63 , 4307,85 , 134,24 , 4251,63 , 4314,85 , 320,24 , 2712,35 , 2747,52 , 2799,14 , 2712,35 , 2747,52 , 2799,14 , 0,2 , 0,2 }, // French/Saint Barthelemy
{ 37, 245, 44, 160, 59, 37, 48, 45, 43, 101, 27,8 , 99,16 , 37,5 , 8,10 , 4244,63 , 4307,85 , 134,24 , 4251,63 , 4314,85 , 320,24 , 2712,35 , 2747,52 , 2799,14 , 2712,35 , 2747,52 , 2799,14 , 0,2 , 0,2 }, // French/Saint Martin
{ 40, 197, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 82,17 , 37,5 , 8,10 , 4392,48 , 4440,87 , 4527,24 , 4399,48 , 4447,87 , 4534,24 , 2813,28 , 2841,49 , 2890,14 , 2813,28 , 2841,49 , 2890,14 , 0,2 , 0,2 }, // Galician/Spain
- { 41, 81, 44, 46, 59, 37, 48, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 4551,48 , 4599,99 , 4698,24 , 4558,48 , 4606,99 , 4705,24 , 2904,28 , 2932,62 , 2994,14 , 2904,28 , 2932,62 , 2994,14 , 0,2 , 0,2 }, // Georgian/Georgia
- { 42, 82, 44, 46, 59, 37, 48, 45, 43, 101, 324,8 , 494,18 , 37,5 , 8,10 , 4722,52 , 4774,83 , 134,24 , 4729,48 , 4777,83 , 320,24 , 3008,21 , 3029,60 , 3089,14 , 3103,28 , 3029,60 , 3089,14 , 0,2 , 0,2 }, // German/Germany
- { 42, 14, 44, 46, 59, 37, 48, 45, 43, 101, 324,8 , 620,19 , 37,5 , 8,10 , 4722,52 , 4857,83 , 134,24 , 4860,48 , 4908,83 , 320,24 , 3008,21 , 3029,60 , 3089,14 , 3103,28 , 3029,60 , 3089,14 , 0,2 , 0,2 }, // German/Austria
- { 42, 21, 44, 46, 59, 37, 48, 45, 43, 101, 543,7 , 99,16 , 37,5 , 239,24 , 4722,52 , 4774,83 , 134,24 , 4729,48 , 4777,83 , 320,24 , 3008,21 , 3029,60 , 3089,14 , 3131,28 , 3029,60 , 3089,14 , 0,2 , 0,2 }, // German/Belgium
- { 42, 123, 46, 39, 59, 37, 48, 45, 43, 101, 324,8 , 494,18 , 37,5 , 8,10 , 4722,52 , 4774,83 , 134,24 , 4729,48 , 4777,83 , 320,24 , 3008,21 , 3029,60 , 3089,14 , 3103,28 , 3029,60 , 3089,14 , 0,2 , 0,2 }, // German/Liechtenstein
- { 42, 125, 44, 46, 59, 37, 48, 45, 43, 101, 324,8 , 494,18 , 37,5 , 8,10 , 4722,52 , 4774,83 , 134,24 , 4729,48 , 4777,83 , 320,24 , 3008,21 , 3029,60 , 3089,14 , 3103,28 , 3029,60 , 3089,14 , 0,2 , 0,2 }, // German/Luxembourg
- { 42, 206, 46, 39, 59, 37, 48, 45, 43, 101, 324,8 , 494,18 , 37,5 , 8,10 , 4722,52 , 4774,83 , 134,24 , 4729,48 , 4777,83 , 320,24 , 3008,21 , 3029,60 , 3089,14 , 3103,28 , 3029,60 , 3089,14 , 0,2 , 0,2 }, // German/Switzerland
- { 43, 85, 44, 46, 44, 37, 48, 45, 43, 101, 271,6 , 10,17 , 18,7 , 25,12 , 4940,50 , 4990,115 , 5105,24 , 4991,50 , 5041,115 , 5156,24 , 3159,28 , 3187,55 , 3242,14 , 3159,28 , 3187,55 , 3242,14 , 78,4 , 80,4 }, // Greek/Greece
- { 43, 56, 44, 46, 44, 37, 48, 45, 43, 101, 271,6 , 10,17 , 18,7 , 25,12 , 4940,50 , 4990,115 , 5105,24 , 4991,50 , 5041,115 , 5156,24 , 3159,28 , 3187,55 , 3242,14 , 3159,28 , 3187,55 , 3242,14 , 78,4 , 80,4 }, // Greek/Cyprus
+ { 41, 81, 44, 46, 59, 37, 48, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 4551,48 , 4599,99 , 4698,24 , 4558,48 , 4606,99 , 4705,24 , 2904,28 , 2932,62 , 2994,14 , 2904,28 , 2932,62 , 2994,14 , 0,2 , 0,2 }, // Georgian/Georgia
+ { 42, 82, 44, 46, 59, 37, 48, 45, 43, 101, 332,8 , 502,18 , 37,5 , 8,10 , 4722,52 , 4774,83 , 134,24 , 4729,48 , 4777,83 , 320,24 , 3008,21 , 3029,60 , 3089,14 , 3103,28 , 3029,60 , 3089,14 , 87,5 , 89,6 }, // German/Germany
+ { 42, 14, 44, 46, 59, 37, 48, 45, 43, 101, 332,8 , 611,19 , 37,5 , 8,10 , 4722,52 , 4857,83 , 134,24 , 4860,48 , 4908,83 , 320,24 , 3008,21 , 3029,60 , 3089,14 , 3103,28 , 3029,60 , 3089,14 , 87,5 , 89,6 }, // German/Austria
+ { 42, 21, 44, 46, 59, 37, 48, 45, 43, 101, 551,7 , 99,16 , 37,5 , 239,24 , 4722,52 , 4774,83 , 134,24 , 4729,48 , 4777,83 , 320,24 , 3008,21 , 3029,60 , 3089,14 , 3131,28 , 3029,60 , 3089,14 , 87,5 , 89,6 }, // German/Belgium
+ { 42, 123, 46, 39, 59, 37, 48, 45, 43, 101, 332,8 , 502,18 , 37,5 , 8,10 , 4722,52 , 4774,83 , 134,24 , 4729,48 , 4777,83 , 320,24 , 3008,21 , 3029,60 , 3089,14 , 3103,28 , 3029,60 , 3089,14 , 87,5 , 89,6 }, // German/Liechtenstein
+ { 42, 125, 44, 46, 59, 37, 48, 45, 43, 101, 332,8 , 502,18 , 37,5 , 8,10 , 4722,52 , 4774,83 , 134,24 , 4729,48 , 4777,83 , 320,24 , 3008,21 , 3029,60 , 3089,14 , 3103,28 , 3029,60 , 3089,14 , 87,5 , 89,6 }, // German/Luxembourg
+ { 42, 206, 46, 39, 59, 37, 48, 45, 43, 101, 332,8 , 502,18 , 37,5 , 8,10 , 4722,52 , 4774,83 , 134,24 , 4729,48 , 4777,83 , 320,24 , 3008,21 , 3029,60 , 3089,14 , 3103,28 , 3029,60 , 3089,14 , 87,5 , 89,6 }, // German/Switzerland
+ { 43, 85, 44, 46, 44, 37, 48, 45, 43, 101, 279,6 , 10,17 , 18,7 , 25,12 , 4940,50 , 4990,115 , 5105,24 , 4991,50 , 5041,115 , 5156,24 , 3159,28 , 3187,55 , 3242,14 , 3159,28 , 3187,55 , 3242,14 , 92,4 , 95,4 }, // Greek/Greece
+ { 43, 56, 44, 46, 44, 37, 48, 45, 43, 101, 279,6 , 10,17 , 18,7 , 25,12 , 4940,50 , 4990,115 , 5105,24 , 4991,50 , 5041,115 , 5156,24 , 3159,28 , 3187,55 , 3242,14 , 3159,28 , 3187,55 , 3242,14 , 92,4 , 95,4 }, // Greek/Cyprus
{ 44, 86, 44, 46, 59, 37, 48, 8722, 43, 101, 72,10 , 82,17 , 18,7 , 25,12 , 3473,48 , 5129,96 , 134,24 , 5180,48 , 5228,96 , 320,24 , 3256,28 , 3284,98 , 3382,14 , 3256,28 , 3284,98 , 3382,14 , 0,2 , 0,2 }, // Greenlandic/Greenland
- { 46, 100, 46, 44, 59, 37, 48, 45, 43, 101, 639,7 , 195,18 , 322,8 , 330,13 , 5225,67 , 5292,87 , 5379,31 , 5324,67 , 5391,87 , 5478,31 , 3396,32 , 3428,53 , 3481,19 , 3396,32 , 3428,53 , 3481,19 , 82,14 , 84,14 }, // Gujarati/India
- { 47, 83, 46, 44, 59, 37, 48, 45, 43, 101, 271,6 , 195,18 , 37,5 , 8,10 , 5410,48 , 5458,85 , 5543,24 , 5509,48 , 5557,85 , 5642,24 , 3500,21 , 3521,52 , 3573,14 , 3500,21 , 3521,52 , 3573,14 , 0,2 , 0,2 }, // Hausa/Ghana
- { 47, 156, 46, 44, 59, 37, 48, 45, 43, 101, 271,6 , 195,18 , 37,5 , 8,10 , 5410,48 , 5458,85 , 5543,24 , 5509,48 , 5557,85 , 5642,24 , 3500,21 , 3521,52 , 3573,14 , 3500,21 , 3521,52 , 3573,14 , 0,2 , 0,2 }, // Hausa/Niger
- { 47, 157, 46, 44, 59, 37, 48, 45, 43, 101, 271,6 , 195,18 , 37,5 , 8,10 , 5410,48 , 5458,85 , 5543,24 , 5509,48 , 5557,85 , 5642,24 , 3500,21 , 3521,52 , 3573,14 , 3500,21 , 3521,52 , 3573,14 , 0,2 , 0,2 }, // Hausa/Nigeria
- { 47, 201, 46, 44, 59, 37, 48, 45, 43, 101, 271,6 , 195,18 , 37,5 , 8,10 , 5567,55 , 5622,99 , 5543,24 , 5666,55 , 5721,99 , 5642,24 , 3587,31 , 3618,57 , 3573,14 , 3587,31 , 3618,57 , 3573,14 , 0,2 , 0,2 }, // Hausa/Sudan
- { 48, 105, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 646,18 , 37,5 , 8,10 , 5721,58 , 5779,72 , 1483,27 , 5820,48 , 5868,72 , 134,27 , 3675,46 , 3721,65 , 3786,14 , 3675,46 , 3721,65 , 3786,14 , 96,6 , 98,5 }, // Hebrew/Israel
- { 49, 100, 46, 44, 59, 37, 2406, 45, 43, 101, 664,6 , 10,17 , 18,7 , 25,12 , 5851,75 , 5851,75 , 5926,30 , 5940,75 , 5940,75 , 6015,30 , 3800,38 , 3838,57 , 3895,19 , 3800,38 , 3838,57 , 3895,19 , 102,9 , 103,7 }, // Hindi/India
- { 50, 98, 44, 160, 59, 37, 48, 45, 43, 101, 670,11 , 681,19 , 165,4 , 195,9 , 5956,64 , 6020,98 , 6118,25 , 6045,64 , 6109,98 , 6207,25 , 3914,19 , 3933,52 , 3985,17 , 3914,19 , 3933,52 , 3985,17 , 111,3 , 110,3 }, // Hungarian/Hungary
- { 51, 99, 44, 46, 59, 37, 48, 8722, 43, 101, 595,8 , 494,18 , 37,5 , 8,10 , 6143,48 , 6191,82 , 6273,24 , 6232,48 , 6280,82 , 6362,24 , 4002,28 , 4030,81 , 4111,14 , 4002,28 , 4030,81 , 4125,14 , 114,4 , 113,4 }, // Icelandic/Iceland
+ { 46, 100, 46, 44, 59, 37, 48, 45, 43, 101, 630,7 , 203,18 , 322,8 , 330,13 , 5225,67 , 5292,87 , 5379,31 , 5324,67 , 5391,87 , 5478,31 , 3396,32 , 3428,53 , 3481,19 , 3396,32 , 3428,53 , 3481,19 , 96,14 , 99,14 }, // Gujarati/India
+ { 47, 83, 46, 44, 59, 37, 48, 45, 43, 101, 279,6 , 203,18 , 37,5 , 8,10 , 5410,48 , 5458,85 , 5543,24 , 5509,48 , 5557,85 , 5642,24 , 3500,21 , 3521,52 , 3573,14 , 3500,21 , 3521,52 , 3573,14 , 0,2 , 0,2 }, // Hausa/Ghana
+ { 47, 156, 46, 44, 59, 37, 48, 45, 43, 101, 279,6 , 203,18 , 37,5 , 8,10 , 5410,48 , 5458,85 , 5543,24 , 5509,48 , 5557,85 , 5642,24 , 3500,21 , 3521,52 , 3573,14 , 3500,21 , 3521,52 , 3573,14 , 0,2 , 0,2 }, // Hausa/Niger
+ { 47, 157, 46, 44, 59, 37, 48, 45, 43, 101, 279,6 , 203,18 , 37,5 , 8,10 , 5410,48 , 5458,85 , 5543,24 , 5509,48 , 5557,85 , 5642,24 , 3500,21 , 3521,52 , 3573,14 , 3500,21 , 3521,52 , 3573,14 , 0,2 , 0,2 }, // Hausa/Nigeria
+ { 47, 201, 46, 44, 59, 37, 48, 45, 43, 101, 279,6 , 203,18 , 37,5 , 8,10 , 5567,55 , 5622,99 , 5543,24 , 5666,55 , 5721,99 , 5642,24 , 3587,31 , 3618,57 , 3573,14 , 3587,31 , 3618,57 , 3573,14 , 0,2 , 0,2 }, // Hausa/Sudan
+ { 48, 105, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 637,18 , 37,5 , 8,10 , 5721,58 , 5779,72 , 1483,27 , 5820,48 , 5868,72 , 134,27 , 3675,46 , 3721,65 , 3786,14 , 3675,46 , 3721,65 , 3786,14 , 110,6 , 113,5 }, // Hebrew/Israel
+ { 49, 100, 46, 44, 59, 37, 2406, 45, 43, 101, 655,6 , 10,17 , 18,7 , 25,12 , 5851,75 , 5851,75 , 5926,30 , 5940,75 , 5940,75 , 6015,30 , 3800,38 , 3838,57 , 3895,19 , 3800,38 , 3838,57 , 3895,19 , 116,9 , 118,7 }, // Hindi/India
+ { 50, 98, 44, 160, 59, 37, 48, 45, 43, 101, 661,11 , 672,19 , 165,4 , 195,9 , 5956,64 , 6020,98 , 6118,25 , 6045,64 , 6109,98 , 6207,25 , 3914,19 , 3933,52 , 3985,17 , 3914,19 , 3933,52 , 3985,17 , 125,3 , 125,3 }, // Hungarian/Hungary
+ { 51, 99, 44, 46, 59, 37, 48, 8722, 43, 101, 586,8 , 502,18 , 37,5 , 8,10 , 6143,48 , 6191,82 , 6273,24 , 6232,48 , 6280,82 , 6362,24 , 4002,28 , 4030,81 , 4111,14 , 4002,28 , 4030,81 , 4125,14 , 128,4 , 128,4 }, // Icelandic/Iceland
{ 52, 101, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 123,18 , 150,5 , 276,9 , 6297,48 , 6345,87 , 134,24 , 6386,48 , 6434,87 , 320,24 , 4139,28 , 4167,43 , 4210,14 , 4139,28 , 4167,43 , 4210,14 , 0,2 , 0,2 }, // Indonesian/Indonesia
- { 57, 104, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 99,16 , 37,5 , 8,10 , 6432,62 , 6494,107 , 6601,24 , 6521,62 , 6583,107 , 6690,24 , 4224,37 , 4261,75 , 4336,14 , 4224,37 , 4261,75 , 4336,14 , 49,4 , 49,4 }, // Irish/Ireland
- { 58, 106, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 99,16 , 37,5 , 8,10 , 6625,48 , 6673,94 , 6767,24 , 6714,48 , 6762,94 , 6856,24 , 4350,28 , 4378,57 , 4435,14 , 4350,28 , 4449,57 , 4435,14 , 118,2 , 117,2 }, // Italian/Italy
- { 58, 206, 46, 39, 59, 37, 48, 45, 43, 101, 324,8 , 10,17 , 37,5 , 308,14 , 6625,48 , 6673,94 , 6767,24 , 6714,48 , 6762,94 , 6856,24 , 4350,28 , 4378,57 , 4435,14 , 4350,28 , 4449,57 , 4435,14 , 118,2 , 117,2 }, // Italian/Switzerland
- { 59, 108, 46, 44, 59, 37, 48, 45, 43, 101, 213,8 , 421,13 , 165,4 , 343,10 , 3146,39 , 3146,39 , 1483,27 , 3170,39 , 3170,39 , 134,27 , 4506,14 , 4520,28 , 4506,14 , 4506,14 , 4520,28 , 4506,14 , 120,2 , 119,2 }, // Japanese/Japan
- { 61, 100, 46, 44, 59, 37, 3302, 45, 43, 101, 664,6 , 99,16 , 322,8 , 330,13 , 6791,86 , 6791,86 , 6877,31 , 6880,86 , 6880,86 , 6966,31 , 4548,28 , 4576,53 , 4629,19 , 4548,28 , 4576,53 , 4629,19 , 122,2 , 121,2 }, // Kannada/India
- { 63, 110, 44, 160, 59, 37, 48, 45, 43, 101, 324,8 , 700,22 , 37,5 , 8,10 , 6908,61 , 6969,83 , 1483,27 , 6997,61 , 7058,83 , 134,27 , 4648,28 , 4676,54 , 798,14 , 4648,28 , 4676,54 , 798,14 , 0,2 , 0,2 }, // Kazakh/Kazakhstan
- { 64, 179, 44, 46, 59, 37, 48, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 7052,60 , 7112,101 , 1483,27 , 7141,60 , 7201,101 , 134,27 , 4730,35 , 4765,84 , 798,14 , 4730,35 , 4765,84 , 798,14 , 0,2 , 0,2 }, // Kinyarwanda/Rwanda
- { 65, 116, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Kirghiz/Kyrgyzstan
- { 66, 114, 46, 44, 59, 37, 48, 45, 43, 101, 722,9 , 731,16 , 353,7 , 360,13 , 7213,39 , 7213,39 , 7213,39 , 7302,39 , 7302,39 , 7302,39 , 4849,14 , 4863,28 , 4849,14 , 4849,14 , 4863,28 , 4849,14 , 124,2 , 123,2 }, // Korean/RepublicOfKorea
- { 67, 102, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 4891,42 , 4891,42 , 4933,14 , 4891,42 , 4891,42 , 4933,14 , 0,2 , 0,2 }, // Kurdish/Iran
- { 67, 103, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 4891,42 , 4891,42 , 4933,14 , 4891,42 , 4891,42 , 4933,14 , 0,2 , 0,2 }, // Kurdish/Iraq
- { 67, 207, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 7252,41 , 7293,51 , 7344,27 , 7341,41 , 7382,51 , 7433,27 , 4947,20 , 4967,39 , 5006,14 , 4947,20 , 4967,39 , 5006,14 , 0,2 , 0,2 }, // Kurdish/SyrianArabRepublic
- { 67, 217, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 7252,41 , 7293,51 , 7344,27 , 7341,41 , 7382,51 , 7433,27 , 4947,20 , 4967,39 , 5006,14 , 4947,20 , 4967,39 , 5006,14 , 0,2 , 0,2 }, // Kurdish/Turkey
- { 69, 117, 46, 44, 59, 37, 48, 45, 43, 101, 356,8 , 747,18 , 165,4 , 373,21 , 7371,63 , 7434,75 , 1483,27 , 7460,63 , 7523,75 , 134,27 , 5020,24 , 5044,57 , 798,14 , 5020,24 , 5044,57 , 798,14 , 0,2 , 0,2 }, // Laothian/Lao
- { 71, 118, 44, 160, 59, 37, 48, 8722, 43, 101, 324,8 , 765,26 , 37,5 , 8,10 , 7509,65 , 7574,101 , 134,24 , 7598,65 , 7663,101 , 320,24 , 5101,21 , 5122,72 , 5194,14 , 5101,21 , 5122,72 , 5194,14 , 126,14 , 125,11 }, // Latvian/Latvia
- { 72, 49, 46, 44, 59, 37, 48, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 7675,39 , 7714,203 , 1483,27 , 7764,39 , 7803,203 , 134,27 , 5208,23 , 5231,98 , 798,14 , 5208,23 , 5231,98 , 798,14 , 0,2 , 0,2 }, // Lingala/DemocraticRepublicOfCongo
- { 72, 50, 46, 44, 59, 37, 48, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 7675,39 , 7714,203 , 1483,27 , 7764,39 , 7803,203 , 134,27 , 5208,23 , 5231,98 , 798,14 , 5208,23 , 5231,98 , 798,14 , 0,2 , 0,2 }, // Lingala/PeoplesRepublicOfCongo
- { 73, 124, 44, 46, 59, 37, 48, 8722, 43, 101, 72,10 , 791,26 , 37,5 , 8,10 , 7917,69 , 7986,96 , 8082,24 , 8006,48 , 8054,96 , 8150,24 , 5329,17 , 5346,89 , 5435,14 , 5449,21 , 5346,89 , 5435,14 , 140,9 , 136,6 }, // Lithuanian/Lithuania
- { 74, 127, 44, 46, 59, 37, 48, 45, 43, 101, 817,7 , 123,18 , 37,5 , 8,10 , 8106,63 , 8169,85 , 8254,24 , 8174,63 , 8237,85 , 8322,24 , 5470,34 , 5504,54 , 1391,14 , 5470,34 , 5504,54 , 1391,14 , 149,10 , 142,8 }, // Macedonian/Macedonia
- { 75, 128, 46, 44, 59, 37, 48, 45, 43, 101, 356,8 , 99,16 , 37,5 , 8,10 , 8278,48 , 8326,92 , 134,24 , 8346,48 , 8394,92 , 320,24 , 5558,34 , 5592,60 , 5652,14 , 5558,34 , 5592,60 , 5652,14 , 0,2 , 0,2 }, // Malagasy/Madagascar
- { 76, 130, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 824,16 , 394,4 , 25,12 , 8418,49 , 8467,82 , 1483,27 , 8486,49 , 8535,82 , 134,27 , 5666,28 , 5694,43 , 798,14 , 5666,28 , 5694,43 , 798,14 , 0,2 , 0,2 }, // Malay/Malaysia
- { 76, 32, 44, 46, 59, 37, 48, 45, 43, 101, 141,10 , 556,12 , 165,4 , 398,14 , 8418,49 , 8467,82 , 1483,27 , 8486,49 , 8535,82 , 134,27 , 5666,28 , 5694,43 , 798,14 , 5666,28 , 5694,43 , 798,14 , 0,2 , 0,2 }, // Malay/BruneiDarussalam
- { 77, 100, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 840,18 , 18,7 , 25,12 , 8549,66 , 8615,101 , 8716,31 , 8617,66 , 8683,101 , 8784,31 , 5737,47 , 5784,70 , 5854,22 , 5737,47 , 5784,70 , 5854,22 , 159,6 , 150,10 }, // Malayalam/India
- { 78, 133, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 858,23 , 37,5 , 8,10 , 8747,48 , 8795,86 , 8881,24 , 8815,48 , 8863,86 , 8949,24 , 5876,28 , 5904,63 , 5967,14 , 5876,28 , 5904,63 , 5967,14 , 165,2 , 160,2 }, // Maltese/Malta
- { 79, 154, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 8905,83 , 8905,83 , 1483,27 , 8973,83 , 8973,83 , 134,27 , 5981,48 , 5981,48 , 798,14 , 5981,48 , 5981,48 , 798,14 , 0,2 , 0,2 }, // Maori/NewZealand
- { 80, 100, 46, 44, 59, 37, 2406, 45, 43, 101, 664,6 , 99,16 , 412,7 , 419,12 , 8988,86 , 8988,86 , 9074,32 , 9056,86 , 9056,86 , 9142,32 , 6029,32 , 6061,53 , 3895,19 , 6029,32 , 6061,53 , 3895,19 , 122,2 , 121,2 }, // Marathi/India
- { 82, 44, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 9106,48 , 9154,66 , 1483,27 , 9174,48 , 9222,66 , 134,27 , 6114,21 , 6135,43 , 798,14 , 6114,21 , 6135,43 , 798,14 , 0,2 , 0,2 }, // Mongolian/China
- { 82, 143, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 9106,48 , 9154,66 , 1483,27 , 9174,48 , 9222,66 , 134,27 , 6114,21 , 6135,43 , 798,14 , 6114,21 , 6135,43 , 798,14 , 0,2 , 0,2 }, // Mongolian/Mongolia
- { 84, 100, 46, 44, 59, 37, 2406, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 9220,56 , 9276,80 , 9356,27 , 9288,56 , 9344,80 , 9424,27 , 6178,33 , 6211,54 , 6265,14 , 6178,33 , 6211,54 , 6265,14 , 102,9 , 103,7 }, // Nepali/India
- { 84, 150, 46, 44, 59, 37, 2406, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 9220,56 , 9383,85 , 9356,27 , 9288,56 , 9451,85 , 9424,27 , 6178,33 , 6279,54 , 6265,14 , 6178,33 , 6279,54 , 6265,14 , 167,14 , 162,14 }, // Nepali/Nepal
- { 85, 161, 44, 160, 59, 37, 48, 45, 43, 101, 324,8 , 603,17 , 37,5 , 431,16 , 9468,59 , 9527,83 , 134,24 , 9536,59 , 9595,83 , 320,24 , 6333,28 , 2177,51 , 2228,14 , 6361,35 , 2177,51 , 2228,14 , 0,2 , 0,2 }, // Norwegian/Norway
- { 86, 74, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 9610,83 , 9610,83 , 1483,27 , 9678,83 , 9678,83 , 134,27 , 6396,57 , 6396,57 , 798,14 , 6396,57 , 6396,57 , 798,14 , 0,2 , 0,2 }, // Occitan/France
- { 87, 100, 46, 44, 59, 37, 2918, 45, 43, 101, 664,6 , 10,17 , 18,7 , 25,12 , 9693,89 , 9693,89 , 9782,32 , 9761,89 , 9761,89 , 9850,32 , 6453,33 , 6486,54 , 6540,18 , 6453,33 , 6486,54 , 6540,18 , 122,2 , 121,2 }, // Oriya/India
- { 88, 1, 1643, 1644, 59, 1642, 1776, 8722, 43, 101, 881,8 , 889,20 , 165,4 , 447,11 , 9814,68 , 9814,68 , 1483,27 , 9882,68 , 9882,68 , 134,27 , 6558,49 , 6558,49 , 798,14 , 6558,49 , 6558,49 , 798,14 , 181,4 , 176,4 }, // Pashto/Afghanistan
- { 89, 102, 1643, 1644, 1563, 1642, 1776, 8722, 43, 101, 550,6 , 35,18 , 165,4 , 447,11 , 9882,71 , 9953,70 , 10023,25 , 9950,71 , 10021,73 , 10094,25 , 6558,49 , 6558,49 , 6607,14 , 6558,49 , 6558,49 , 6607,14 , 185,10 , 180,10 }, // Persian/Iran
- { 89, 1, 1643, 1644, 1563, 1642, 1776, 8722, 43, 101, 550,6 , 35,18 , 165,4 , 447,11 , 10048,63 , 9953,70 , 10111,24 , 10119,63 , 10182,68 , 10250,24 , 6558,49 , 6558,49 , 6607,14 , 6558,49 , 6558,49 , 6607,14 , 185,10 , 180,10 }, // Persian/Afghanistan
- { 90, 172, 44, 160, 59, 37, 48, 45, 43, 101, 535,8 , 10,17 , 37,5 , 8,10 , 10135,48 , 10183,97 , 10280,24 , 10274,48 , 10322,99 , 10421,24 , 6621,34 , 6655,59 , 6714,14 , 6621,34 , 6655,59 , 6714,14 , 0,2 , 0,2 }, // Polish/Poland
- { 91, 173, 44, 160, 59, 37, 48, 45, 43, 101, 27,8 , 909,27 , 37,5 , 458,19 , 10304,48 , 10352,89 , 134,24 , 10445,48 , 10493,89 , 320,24 , 6728,28 , 6756,79 , 6835,14 , 6728,28 , 6756,79 , 6835,14 , 195,17 , 190,18 }, // Portuguese/Portugal
- { 91, 30, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 909,27 , 37,5 , 458,19 , 10441,48 , 10489,89 , 134,24 , 10582,48 , 10630,89 , 320,24 , 6728,28 , 6849,79 , 6835,14 , 6728,28 , 6849,79 , 6835,14 , 0,2 , 0,2 }, // Portuguese/Brazil
- { 91, 92, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 909,27 , 37,5 , 458,19 , 10441,48 , 10489,89 , 134,24 , 10582,48 , 10630,89 , 320,24 , 6728,28 , 6849,79 , 6835,14 , 6728,28 , 6849,79 , 6835,14 , 0,2 , 0,2 }, // Portuguese/GuineaBissau
- { 91, 146, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 909,27 , 37,5 , 458,19 , 10441,48 , 10489,89 , 134,24 , 10582,48 , 10630,89 , 320,24 , 6728,28 , 6849,79 , 6835,14 , 6728,28 , 6849,79 , 6835,14 , 0,2 , 0,2 }, // Portuguese/Mozambique
- { 92, 100, 46, 44, 59, 37, 2662, 45, 43, 101, 141,10 , 123,18 , 18,7 , 25,12 , 10578,68 , 10578,68 , 10646,27 , 10719,68 , 10719,68 , 10787,27 , 6928,38 , 6966,55 , 7021,23 , 6928,38 , 6966,55 , 7021,23 , 212,5 , 208,4 }, // Punjabi/India
- { 92, 163, 46, 44, 59, 37, 2662, 45, 43, 101, 141,10 , 123,18 , 18,7 , 25,12 , 10673,67 , 10673,67 , 10646,27 , 10814,67 , 10814,67 , 10787,27 , 6928,38 , 7044,37 , 7021,23 , 6928,38 , 7044,37 , 7021,23 , 212,5 , 208,4 }, // Punjabi/Pakistan
- { 94, 206, 46, 8217, 59, 37, 48, 8722, 43, 101, 324,8 , 494,18 , 37,5 , 8,10 , 10740,67 , 10807,92 , 10899,24 , 10881,67 , 10948,92 , 11040,24 , 7081,23 , 7104,56 , 7160,14 , 7081,23 , 7104,56 , 7160,14 , 122,2 , 212,2 }, // RhaetoRomance/Switzerland
- { 95, 141, 44, 46, 59, 37, 48, 45, 43, 101, 936,10 , 10,17 , 37,5 , 8,10 , 10923,60 , 10983,98 , 11081,24 , 11064,60 , 11124,98 , 11222,24 , 7174,21 , 7195,48 , 2799,14 , 7174,21 , 7195,48 , 2799,14 , 0,2 , 0,2 }, // Romanian/Moldova
- { 95, 177, 44, 46, 59, 37, 48, 45, 43, 101, 936,10 , 10,17 , 37,5 , 8,10 , 10923,60 , 10983,98 , 11081,24 , 11064,60 , 11124,98 , 11222,24 , 7174,21 , 7195,48 , 2799,14 , 7174,21 , 7195,48 , 2799,14 , 0,2 , 0,2 }, // Romanian/Romania
- { 96, 178, 44, 160, 59, 37, 48, 45, 43, 101, 324,8 , 946,22 , 165,4 , 195,9 , 11105,62 , 11167,80 , 11247,24 , 11246,63 , 11309,82 , 11391,24 , 7243,21 , 7264,62 , 7326,14 , 7243,21 , 7340,62 , 7326,14 , 0,2 , 0,2 }, // Russian/RussianFederation
- { 96, 141, 44, 160, 59, 37, 48, 45, 43, 101, 324,8 , 946,22 , 165,4 , 195,9 , 11105,62 , 11167,80 , 11247,24 , 11246,63 , 11309,82 , 11391,24 , 7243,21 , 7264,62 , 7326,14 , 7243,21 , 7340,62 , 7326,14 , 0,2 , 0,2 }, // Russian/Moldova
- { 96, 222, 44, 160, 59, 37, 48, 45, 43, 101, 324,8 , 946,22 , 37,5 , 8,10 , 11105,62 , 11167,80 , 11247,24 , 11246,63 , 11309,82 , 11391,24 , 7243,21 , 7264,62 , 7326,14 , 7243,21 , 7340,62 , 7326,14 , 0,2 , 0,2 }, // Russian/Ukraine
- { 98, 41, 44, 46, 59, 37, 48, 45, 43, 101, 356,8 , 99,16 , 37,5 , 8,10 , 11271,48 , 11319,91 , 11410,24 , 11415,48 , 11463,91 , 11554,24 , 7402,28 , 7430,66 , 7496,14 , 7402,28 , 7430,66 , 7496,14 , 217,2 , 214,2 }, // Sangho/CentralAfricanRepublic
- { 99, 100, 46, 44, 59, 37, 2406, 45, 43, 101, 639,7 , 99,16 , 322,8 , 330,13 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Sanskrit/India
- { 100, 241, 46, 44, 59, 37, 48, 45, 43, 101, 968,7 , 975,20 , 150,5 , 155,10 , 11434,48 , 11482,81 , 8254,24 , 11578,48 , 11626,81 , 8322,24 , 7510,28 , 7538,52 , 7590,14 , 7510,28 , 7538,52 , 7590,14 , 219,9 , 216,7 }, // Serbian/SerbiaAndMontenegro
- { 100, 27, 46, 44, 59, 37, 48, 45, 43, 101, 115,8 , 975,20 , 37,5 , 477,40 , 11434,48 , 11563,83 , 8254,24 , 11578,48 , 11707,83 , 8322,24 , 7604,28 , 7632,54 , 7590,14 , 7604,28 , 7632,54 , 7590,14 , 219,9 , 216,7 }, // Serbian/BosniaAndHerzegowina
- { 100, 238, 46, 44, 59, 37, 48, 45, 43, 101, 968,7 , 975,20 , 150,5 , 155,10 , 11434,48 , 11482,81 , 8254,24 , 11578,48 , 11626,81 , 8322,24 , 7510,28 , 7538,52 , 7590,14 , 7510,28 , 7538,52 , 7590,14 , 219,9 , 216,7 }, // Serbian/Yugoslavia
- { 100, 242, 46, 44, 59, 37, 48, 45, 43, 101, 968,7 , 975,20 , 150,5 , 155,10 , 11646,48 , 11694,81 , 11775,24 , 11790,48 , 11838,81 , 11919,24 , 7686,28 , 7714,54 , 2051,14 , 7686,28 , 7714,54 , 2051,14 , 228,9 , 223,7 }, // Serbian/Montenegro
- { 100, 243, 46, 44, 59, 37, 48, 45, 43, 101, 968,7 , 975,20 , 150,5 , 155,10 , 11434,48 , 11482,81 , 8254,24 , 11578,48 , 11626,81 , 8322,24 , 7510,28 , 7538,52 , 7590,14 , 7510,28 , 7538,52 , 7590,14 , 219,9 , 216,7 }, // Serbian/Serbia
- { 101, 241, 46, 44, 59, 37, 48, 45, 43, 101, 968,7 , 975,20 , 150,5 , 155,10 , 11646,48 , 11694,81 , 11775,24 , 11790,48 , 11838,81 , 11919,24 , 7686,28 , 7714,54 , 2051,14 , 7686,28 , 7714,54 , 2051,14 , 228,9 , 223,7 }, // SerboCroatian/SerbiaAndMontenegro
- { 101, 27, 46, 44, 59, 37, 48, 45, 43, 101, 968,7 , 975,20 , 150,5 , 155,10 , 11646,48 , 11694,81 , 11775,24 , 11790,48 , 11838,81 , 11919,24 , 7686,28 , 7714,54 , 2051,14 , 7686,28 , 7714,54 , 2051,14 , 228,9 , 223,7 }, // SerboCroatian/BosniaAndHerzegowina
- { 101, 238, 46, 44, 59, 37, 48, 45, 43, 101, 968,7 , 975,20 , 150,5 , 155,10 , 11646,48 , 11694,81 , 11775,24 , 11790,48 , 11838,81 , 11919,24 , 7686,28 , 7714,54 , 2051,14 , 7686,28 , 7714,54 , 2051,14 , 228,9 , 223,7 }, // SerboCroatian/Yugoslavia
- { 102, 120, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 11799,48 , 11847,105 , 1483,27 , 11943,48 , 11991,105 , 134,27 , 7768,27 , 7795,61 , 798,14 , 7768,27 , 7795,61 , 798,14 , 0,2 , 0,2 }, // Sesotho/Lesotho
- { 102, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 11799,48 , 11847,105 , 1483,27 , 11943,48 , 11991,105 , 134,27 , 7768,27 , 7795,61 , 798,14 , 7768,27 , 7795,61 , 798,14 , 0,2 , 0,2 }, // Sesotho/SouthAfrica
- { 103, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 11952,48 , 12000,117 , 1483,27 , 12096,48 , 12144,117 , 134,27 , 7856,27 , 7883,64 , 798,14 , 7856,27 , 7883,64 , 798,14 , 0,2 , 0,2 }, // Setswana/SouthAfrica
+ { 57, 104, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 99,16 , 37,5 , 8,10 , 6432,62 , 6494,107 , 6601,24 , 6521,62 , 6583,107 , 6690,24 , 4224,37 , 4261,75 , 4336,14 , 4224,37 , 4261,75 , 4336,14 , 56,4 , 56,4 }, // Irish/Ireland
+ { 58, 106, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 99,16 , 37,5 , 8,10 , 6625,48 , 6673,94 , 6767,24 , 6714,48 , 6762,94 , 6856,24 , 4350,28 , 4378,57 , 4435,14 , 4350,28 , 4449,57 , 4435,14 , 132,2 , 132,2 }, // Italian/Italy
+ { 58, 206, 46, 39, 59, 37, 48, 45, 43, 101, 332,8 , 10,17 , 37,5 , 308,14 , 6625,48 , 6673,94 , 6767,24 , 6714,48 , 6762,94 , 6856,24 , 4350,28 , 4378,57 , 4435,14 , 4350,28 , 4449,57 , 4435,14 , 132,2 , 132,2 }, // Italian/Switzerland
+ { 59, 108, 46, 44, 59, 37, 48, 45, 43, 101, 221,8 , 429,13 , 165,4 , 343,10 , 3146,39 , 3146,39 , 1483,27 , 3170,39 , 3170,39 , 134,27 , 4506,14 , 4520,28 , 4506,14 , 4506,14 , 4520,28 , 4506,14 , 134,2 , 134,2 }, // Japanese/Japan
+ { 61, 100, 46, 44, 59, 37, 3302, 45, 43, 101, 655,6 , 99,16 , 322,8 , 330,13 , 6791,86 , 6791,86 , 6877,31 , 6880,86 , 6880,86 , 6966,31 , 4548,28 , 4576,53 , 4629,19 , 4548,28 , 4576,53 , 4629,19 , 136,2 , 136,2 }, // Kannada/India
+ { 63, 110, 44, 160, 59, 37, 48, 45, 43, 101, 332,8 , 691,22 , 37,5 , 8,10 , 6908,61 , 6969,83 , 1483,27 , 6997,61 , 7058,83 , 134,27 , 4648,28 , 4676,54 , 798,14 , 4648,28 , 4676,54 , 798,14 , 0,2 , 0,2 }, // Kazakh/Kazakhstan
+ { 64, 179, 44, 46, 59, 37, 48, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 7052,60 , 7112,101 , 1483,27 , 7141,60 , 7201,101 , 134,27 , 4730,35 , 4765,84 , 798,14 , 4730,35 , 4765,84 , 798,14 , 0,2 , 0,2 }, // Kinyarwanda/Rwanda
+ { 65, 116, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Kirghiz/Kyrgyzstan
+ { 66, 114, 46, 44, 59, 37, 48, 45, 43, 101, 713,9 , 722,16 , 353,7 , 360,13 , 7213,39 , 7213,39 , 7213,39 , 7302,39 , 7302,39 , 7302,39 , 4849,14 , 4863,28 , 4849,14 , 4849,14 , 4863,28 , 4849,14 , 138,2 , 138,2 }, // Korean/RepublicOfKorea
+ { 67, 102, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 4891,42 , 4891,42 , 4933,14 , 4891,42 , 4891,42 , 4933,14 , 0,2 , 0,2 }, // Kurdish/Iran
+ { 67, 103, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 4891,42 , 4891,42 , 4933,14 , 4891,42 , 4891,42 , 4933,14 , 0,2 , 0,2 }, // Kurdish/Iraq
+ { 67, 207, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 7252,41 , 7293,51 , 7344,27 , 7341,41 , 7382,51 , 7433,27 , 4947,20 , 4967,39 , 5006,14 , 4947,20 , 4967,39 , 5006,14 , 0,2 , 0,2 }, // Kurdish/SyrianArabRepublic
+ { 67, 217, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 7252,41 , 7293,51 , 7344,27 , 7341,41 , 7382,51 , 7433,27 , 4947,20 , 4967,39 , 5006,14 , 4947,20 , 4967,39 , 5006,14 , 0,2 , 0,2 }, // Kurdish/Turkey
+ { 69, 117, 46, 44, 59, 37, 48, 45, 43, 101, 364,8 , 738,18 , 165,4 , 373,21 , 7371,63 , 7434,75 , 1483,27 , 7460,63 , 7523,75 , 134,27 , 5020,24 , 5044,57 , 798,14 , 5020,24 , 5044,57 , 798,14 , 0,2 , 0,2 }, // Laothian/Lao
+ { 71, 118, 44, 160, 59, 37, 48, 8722, 43, 101, 332,8 , 756,26 , 37,5 , 8,10 , 7509,65 , 7574,101 , 134,24 , 7598,65 , 7663,101 , 320,24 , 5101,21 , 5122,72 , 5194,14 , 5101,21 , 5122,72 , 5194,14 , 140,14 , 140,11 }, // Latvian/Latvia
+ { 72, 49, 46, 44, 59, 37, 48, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 7675,39 , 7714,203 , 1483,27 , 7764,39 , 7803,203 , 134,27 , 5208,23 , 5231,98 , 798,14 , 5208,23 , 5231,98 , 798,14 , 0,2 , 0,2 }, // Lingala/DemocraticRepublicOfCongo
+ { 72, 50, 46, 44, 59, 37, 48, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 7675,39 , 7714,203 , 1483,27 , 7764,39 , 7803,203 , 134,27 , 5208,23 , 5231,98 , 798,14 , 5208,23 , 5231,98 , 798,14 , 0,2 , 0,2 }, // Lingala/PeoplesRepublicOfCongo
+ { 73, 124, 44, 46, 59, 37, 48, 8722, 43, 101, 72,10 , 782,26 , 37,5 , 8,10 , 7917,69 , 7986,96 , 8082,24 , 8006,48 , 8054,96 , 8150,24 , 5329,17 , 5346,89 , 5435,14 , 5449,21 , 5346,89 , 5435,14 , 154,9 , 151,6 }, // Lithuanian/Lithuania
+ { 74, 127, 44, 46, 59, 37, 48, 45, 43, 101, 808,7 , 123,18 , 37,5 , 8,10 , 8106,63 , 8169,85 , 8254,24 , 8174,63 , 8237,85 , 8322,24 , 5470,34 , 5504,54 , 1391,14 , 5470,34 , 5504,54 , 1391,14 , 163,10 , 157,8 }, // Macedonian/Macedonia
+ { 75, 128, 46, 44, 59, 37, 48, 45, 43, 101, 364,8 , 99,16 , 37,5 , 8,10 , 8278,48 , 8326,92 , 134,24 , 8346,48 , 8394,92 , 320,24 , 5558,34 , 5592,60 , 5652,14 , 5558,34 , 5592,60 , 5652,14 , 0,2 , 0,2 }, // Malagasy/Madagascar
+ { 76, 130, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 815,16 , 394,4 , 25,12 , 8418,49 , 8467,82 , 1483,27 , 8486,49 , 8535,82 , 134,27 , 5666,28 , 5694,43 , 798,14 , 5666,28 , 5694,43 , 798,14 , 0,2 , 0,2 }, // Malay/Malaysia
+ { 76, 32, 44, 46, 59, 37, 48, 45, 43, 101, 141,10 , 564,12 , 165,4 , 398,14 , 8418,49 , 8467,82 , 1483,27 , 8486,49 , 8535,82 , 134,27 , 5666,28 , 5694,43 , 798,14 , 5666,28 , 5694,43 , 798,14 , 0,2 , 0,2 }, // Malay/BruneiDarussalam
+ { 77, 100, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 831,18 , 18,7 , 25,12 , 8549,66 , 8615,101 , 8716,31 , 8617,66 , 8683,101 , 8784,31 , 5737,47 , 5784,70 , 5854,22 , 5737,47 , 5784,70 , 5854,22 , 173,6 , 165,10 }, // Malayalam/India
+ { 78, 133, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 849,23 , 37,5 , 8,10 , 8747,48 , 8795,86 , 8881,24 , 8815,48 , 8863,86 , 8949,24 , 5876,28 , 5904,63 , 5967,14 , 5876,28 , 5904,63 , 5967,14 , 179,2 , 175,2 }, // Maltese/Malta
+ { 79, 154, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 8905,83 , 8905,83 , 1483,27 , 8973,83 , 8973,83 , 134,27 , 5981,48 , 5981,48 , 798,14 , 5981,48 , 5981,48 , 798,14 , 0,2 , 0,2 }, // Maori/NewZealand
+ { 80, 100, 46, 44, 59, 37, 2406, 45, 43, 101, 655,6 , 99,16 , 412,7 , 419,12 , 8988,86 , 8988,86 , 9074,32 , 9056,86 , 9056,86 , 9142,32 , 6029,32 , 6061,53 , 3895,19 , 6029,32 , 6061,53 , 3895,19 , 136,2 , 136,2 }, // Marathi/India
+ { 82, 143, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 9106,48 , 9154,66 , 1483,27 , 9174,48 , 9222,66 , 134,27 , 6114,21 , 6135,43 , 798,14 , 6114,21 , 6135,43 , 798,14 , 0,2 , 0,2 }, // Mongolian/Mongolia
+ { 82, 44, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 9106,48 , 9154,66 , 1483,27 , 9174,48 , 9222,66 , 134,27 , 6114,21 , 6135,43 , 798,14 , 6114,21 , 6135,43 , 798,14 , 0,2 , 0,2 }, // Mongolian/China
+ { 84, 150, 46, 44, 59, 37, 2406, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 9220,56 , 9276,85 , 9361,27 , 9288,56 , 9344,85 , 9429,27 , 6178,33 , 6211,54 , 6265,14 , 6178,33 , 6211,54 , 6265,14 , 181,14 , 177,14 }, // Nepali/Nepal
+ { 84, 100, 46, 44, 59, 37, 2406, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 9220,56 , 9388,80 , 9361,27 , 9288,56 , 9456,80 , 9429,27 , 6178,33 , 6279,54 , 6265,14 , 6178,33 , 6279,54 , 6265,14 , 116,9 , 118,7 }, // Nepali/India
+ { 85, 161, 44, 160, 59, 37, 48, 45, 43, 101, 332,8 , 594,17 , 37,5 , 431,16 , 9468,59 , 9527,83 , 134,24 , 9536,59 , 9595,83 , 320,24 , 6333,28 , 2177,51 , 2228,14 , 6361,35 , 2177,51 , 2228,14 , 0,2 , 0,2 }, // Norwegian/Norway
+ { 86, 74, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 9610,83 , 9610,83 , 1483,27 , 9678,83 , 9678,83 , 134,27 , 6396,57 , 6396,57 , 798,14 , 6396,57 , 6396,57 , 798,14 , 0,2 , 0,2 }, // Occitan/France
+ { 87, 100, 46, 44, 59, 37, 2918, 45, 43, 101, 655,6 , 10,17 , 18,7 , 25,12 , 9693,89 , 9693,89 , 9782,32 , 9761,89 , 9761,89 , 9850,32 , 6453,33 , 6486,54 , 6540,18 , 6453,33 , 6486,54 , 6540,18 , 136,2 , 136,2 }, // Oriya/India
+ { 88, 1, 1643, 1644, 59, 1642, 1776, 8722, 43, 101, 179,8 , 872,20 , 165,4 , 447,11 , 9814,68 , 9814,68 , 1483,27 , 9882,68 , 9882,68 , 134,27 , 6558,49 , 6558,49 , 798,14 , 6558,49 , 6558,49 , 798,14 , 195,4 , 191,4 }, // Pashto/Afghanistan
+ { 89, 102, 1643, 1644, 1563, 1642, 1776, 8722, 43, 101, 558,6 , 35,18 , 165,4 , 447,11 , 9882,71 , 9953,70 , 10023,25 , 9950,71 , 10021,73 , 10094,25 , 6558,49 , 6558,49 , 6607,14 , 6558,49 , 6558,49 , 6607,14 , 199,10 , 195,10 }, // Persian/Iran
+ { 89, 1, 1643, 1644, 1563, 1642, 1776, 8722, 43, 101, 558,6 , 35,18 , 165,4 , 447,11 , 10048,63 , 9953,70 , 10111,24 , 10119,63 , 10182,68 , 10250,24 , 6558,49 , 6558,49 , 6607,14 , 6558,49 , 6558,49 , 6607,14 , 199,10 , 195,10 }, // Persian/Afghanistan
+ { 90, 172, 44, 160, 59, 37, 48, 45, 43, 101, 892,10 , 10,17 , 37,5 , 8,10 , 10135,48 , 10183,97 , 10280,24 , 10274,48 , 10322,99 , 10421,24 , 6621,34 , 6655,59 , 6714,14 , 6621,34 , 6655,59 , 6714,14 , 0,2 , 0,2 }, // Polish/Poland
+ { 91, 173, 44, 160, 59, 37, 48, 45, 43, 101, 27,8 , 902,27 , 37,5 , 458,19 , 10304,48 , 10352,89 , 134,24 , 10445,48 , 10493,89 , 320,24 , 6728,28 , 6756,79 , 6835,14 , 6728,28 , 6756,79 , 6835,14 , 209,17 , 205,18 }, // Portuguese/Portugal
+ { 91, 30, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 902,27 , 37,5 , 458,19 , 10441,48 , 10489,89 , 134,24 , 10582,48 , 10630,89 , 320,24 , 6728,28 , 6849,79 , 6835,14 , 6728,28 , 6849,79 , 6835,14 , 0,2 , 0,2 }, // Portuguese/Brazil
+ { 91, 92, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 902,27 , 37,5 , 458,19 , 10441,48 , 10489,89 , 134,24 , 10582,48 , 10630,89 , 320,24 , 6728,28 , 6849,79 , 6835,14 , 6728,28 , 6849,79 , 6835,14 , 0,2 , 0,2 }, // Portuguese/GuineaBissau
+ { 91, 146, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 902,27 , 37,5 , 458,19 , 10441,48 , 10489,89 , 134,24 , 10582,48 , 10630,89 , 320,24 , 6728,28 , 6849,79 , 6835,14 , 6728,28 , 6849,79 , 6835,14 , 0,2 , 0,2 }, // Portuguese/Mozambique
+ { 92, 100, 46, 44, 59, 37, 2662, 45, 43, 101, 141,10 , 123,18 , 18,7 , 25,12 , 10578,68 , 10578,68 , 10646,27 , 10719,68 , 10719,68 , 10787,27 , 6928,38 , 6966,55 , 7021,23 , 6928,38 , 6966,55 , 7021,23 , 226,5 , 223,4 }, // Punjabi/India
+ { 92, 163, 46, 44, 59, 37, 1632, 45, 43, 101, 141,10 , 123,18 , 18,7 , 25,12 , 10673,67 , 10673,67 , 10646,27 , 10814,67 , 10814,67 , 10787,27 , 6928,38 , 7044,37 , 7021,23 , 6928,38 , 7044,37 , 7021,23 , 226,5 , 223,4 }, // Punjabi/Pakistan
+ { 94, 206, 46, 8217, 59, 37, 48, 8722, 43, 101, 332,8 , 502,18 , 37,5 , 8,10 , 10740,67 , 10807,92 , 10899,24 , 10881,67 , 10948,92 , 11040,24 , 7081,23 , 7104,56 , 7160,14 , 7081,23 , 7104,56 , 7160,14 , 136,2 , 227,2 }, // RhaetoRomance/Switzerland
+ { 95, 141, 44, 46, 59, 37, 48, 45, 43, 101, 929,10 , 10,17 , 37,5 , 8,10 , 10923,60 , 10983,98 , 11081,24 , 11064,60 , 11124,98 , 11222,24 , 7174,21 , 7195,48 , 2799,14 , 7174,21 , 7195,48 , 2799,14 , 0,2 , 0,2 }, // Romanian/Moldova
+ { 95, 177, 44, 46, 59, 37, 48, 45, 43, 101, 929,10 , 10,17 , 37,5 , 8,10 , 10923,60 , 10983,98 , 11081,24 , 11064,60 , 11124,98 , 11222,24 , 7174,21 , 7195,48 , 2799,14 , 7174,21 , 7195,48 , 2799,14 , 0,2 , 0,2 }, // Romanian/Romania
+ { 96, 178, 44, 160, 59, 37, 48, 45, 43, 101, 332,8 , 939,22 , 165,4 , 195,9 , 11105,62 , 11167,80 , 11247,24 , 11246,63 , 11309,82 , 11391,24 , 7243,21 , 7264,62 , 7326,14 , 7243,21 , 7340,62 , 7326,14 , 0,2 , 0,2 }, // Russian/RussianFederation
+ { 96, 141, 44, 160, 59, 37, 48, 45, 43, 101, 332,8 , 939,22 , 165,4 , 195,9 , 11105,62 , 11167,80 , 11247,24 , 11246,63 , 11309,82 , 11391,24 , 7243,21 , 7264,62 , 7326,14 , 7243,21 , 7340,62 , 7326,14 , 0,2 , 0,2 }, // Russian/Moldova
+ { 96, 222, 44, 160, 59, 37, 48, 45, 43, 101, 332,8 , 939,22 , 37,5 , 8,10 , 11105,62 , 11167,80 , 11247,24 , 11246,63 , 11309,82 , 11391,24 , 7243,21 , 7264,62 , 7326,14 , 7243,21 , 7340,62 , 7326,14 , 0,2 , 0,2 }, // Russian/Ukraine
+ { 98, 41, 44, 46, 59, 37, 48, 45, 43, 101, 364,8 , 99,16 , 37,5 , 8,10 , 11271,48 , 11319,91 , 11410,24 , 11415,48 , 11463,91 , 11554,24 , 7402,28 , 7430,66 , 7496,14 , 7402,28 , 7430,66 , 7496,14 , 231,2 , 229,2 }, // Sangho/CentralAfricanRepublic
+ { 99, 100, 46, 44, 59, 37, 2406, 45, 43, 101, 630,7 , 99,16 , 322,8 , 330,13 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Sanskrit/India
+ { 100, 241, 46, 44, 59, 37, 48, 45, 43, 101, 961,7 , 968,20 , 150,5 , 155,10 , 11434,48 , 11482,81 , 8254,24 , 11578,48 , 11626,81 , 8322,24 , 7510,28 , 7538,52 , 7590,14 , 7510,28 , 7538,52 , 7590,14 , 233,9 , 231,7 }, // Serbian/SerbiaAndMontenegro
+ { 100, 27, 46, 44, 59, 37, 48, 45, 43, 101, 115,8 , 968,20 , 37,5 , 477,40 , 11434,48 , 11563,83 , 8254,24 , 11578,48 , 11707,83 , 8322,24 , 7604,28 , 7632,54 , 7590,14 , 7604,28 , 7632,54 , 7590,14 , 233,9 , 231,7 }, // Serbian/BosniaAndHerzegowina
+ { 100, 238, 46, 44, 59, 37, 48, 45, 43, 101, 961,7 , 968,20 , 150,5 , 155,10 , 11434,48 , 11482,81 , 8254,24 , 11578,48 , 11626,81 , 8322,24 , 7510,28 , 7538,52 , 7590,14 , 7510,28 , 7538,52 , 7590,14 , 233,9 , 231,7 }, // Serbian/Yugoslavia
+ { 100, 242, 46, 44, 59, 37, 48, 45, 43, 101, 961,7 , 968,20 , 150,5 , 155,10 , 11646,48 , 11694,81 , 11775,24 , 11790,48 , 11838,81 , 11919,24 , 7686,28 , 7714,54 , 2051,14 , 7686,28 , 7714,54 , 2051,14 , 242,9 , 238,7 }, // Serbian/Montenegro
+ { 100, 243, 46, 44, 59, 37, 48, 45, 43, 101, 961,7 , 968,20 , 150,5 , 155,10 , 11434,48 , 11482,81 , 8254,24 , 11578,48 , 11626,81 , 8322,24 , 7510,28 , 7538,52 , 7590,14 , 7510,28 , 7538,52 , 7590,14 , 233,9 , 231,7 }, // Serbian/Serbia
+ { 101, 241, 46, 44, 59, 37, 48, 45, 43, 101, 961,7 , 968,20 , 150,5 , 155,10 , 11646,48 , 11694,81 , 11775,24 , 11790,48 , 11838,81 , 11919,24 , 7686,28 , 7714,54 , 2051,14 , 7686,28 , 7714,54 , 2051,14 , 242,9 , 238,7 }, // SerboCroatian/SerbiaAndMontenegro
+ { 101, 27, 46, 44, 59, 37, 48, 45, 43, 101, 961,7 , 968,20 , 150,5 , 155,10 , 11646,48 , 11694,81 , 11775,24 , 11790,48 , 11838,81 , 11919,24 , 7686,28 , 7714,54 , 2051,14 , 7686,28 , 7714,54 , 2051,14 , 242,9 , 238,7 }, // SerboCroatian/BosniaAndHerzegowina
+ { 101, 238, 46, 44, 59, 37, 48, 45, 43, 101, 961,7 , 968,20 , 150,5 , 155,10 , 11646,48 , 11694,81 , 11775,24 , 11790,48 , 11838,81 , 11919,24 , 7686,28 , 7714,54 , 2051,14 , 7686,28 , 7714,54 , 2051,14 , 242,9 , 238,7 }, // SerboCroatian/Yugoslavia
+ { 102, 120, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 11799,48 , 11847,105 , 1483,27 , 11943,48 , 11991,105 , 134,27 , 7768,27 , 7795,61 , 798,14 , 7768,27 , 7795,61 , 798,14 , 0,2 , 0,2 }, // Sesotho/Lesotho
+ { 102, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 11799,48 , 11847,105 , 1483,27 , 11943,48 , 11991,105 , 134,27 , 7768,27 , 7795,61 , 798,14 , 7768,27 , 7795,61 , 798,14 , 0,2 , 0,2 }, // Sesotho/SouthAfrica
+ { 103, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 11952,48 , 12000,117 , 1483,27 , 12096,48 , 12144,117 , 134,27 , 7856,27 , 7883,64 , 798,14 , 7856,27 , 7883,64 , 798,14 , 0,2 , 0,2 }, // Setswana/SouthAfrica
{ 104, 240, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 12117,47 , 12164,100 , 12264,24 , 12261,47 , 12308,100 , 12408,24 , 7947,32 , 7979,55 , 8034,14 , 7947,32 , 7979,55 , 8034,14 , 0,2 , 0,2 }, // Shona/Zimbabwe
- { 106, 198, 46, 44, 59, 37, 48, 45, 43, 101, 585,10 , 995,17 , 18,7 , 25,12 , 12288,54 , 12342,92 , 12434,32 , 12432,54 , 12486,92 , 12578,32 , 8048,30 , 8078,62 , 8140,19 , 8048,30 , 8078,62 , 8140,19 , 237,5 , 230,4 }, // Singhalese/SriLanka
- { 107, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 12466,48 , 12514,114 , 1483,27 , 12610,48 , 12658,114 , 134,27 , 8159,27 , 8186,68 , 798,14 , 8159,27 , 8186,68 , 798,14 , 0,2 , 0,2 }, // Siswati/SouthAfrica
- { 107, 204, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 12466,48 , 12514,114 , 1483,27 , 12610,48 , 12658,114 , 134,27 , 8159,27 , 8186,68 , 798,14 , 8159,27 , 8186,68 , 798,14 , 0,2 , 0,2 }, // Siswati/Swaziland
- { 108, 191, 44, 160, 59, 37, 48, 45, 43, 101, 595,8 , 494,18 , 165,4 , 195,9 , 12628,48 , 12676,82 , 11775,24 , 12772,48 , 12820,89 , 11919,24 , 8254,21 , 8275,52 , 8327,14 , 8254,21 , 8275,52 , 8327,14 , 242,10 , 234,9 }, // Slovak/Slovakia
- { 109, 192, 44, 46, 59, 37, 48, 45, 43, 101, 1012,9 , 620,19 , 37,5 , 8,10 , 11646,48 , 12758,86 , 11775,24 , 11790,48 , 12909,86 , 11919,24 , 8341,28 , 8369,52 , 8421,14 , 8341,28 , 8369,52 , 8421,14 , 53,4 , 243,4 }, // Slovenian/Slovenia
- { 110, 194, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 53,19 , 18,7 , 25,12 , 12844,48 , 12892,189 , 13081,24 , 12995,48 , 13043,189 , 13232,24 , 8435,28 , 8463,47 , 8510,14 , 8435,28 , 8463,47 , 8510,14 , 252,3 , 247,3 }, // Somali/Somalia
- { 110, 59, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 53,19 , 18,7 , 25,12 , 12844,48 , 12892,189 , 13081,24 , 12995,48 , 13043,189 , 13232,24 , 8435,28 , 8463,47 , 8510,14 , 8435,28 , 8463,47 , 8510,14 , 252,3 , 247,3 }, // Somali/Djibouti
- { 110, 69, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 53,19 , 18,7 , 25,12 , 12844,48 , 12892,189 , 13081,24 , 12995,48 , 13043,189 , 13232,24 , 8435,28 , 8463,47 , 8510,14 , 8435,28 , 8463,47 , 8510,14 , 252,3 , 247,3 }, // Somali/Ethiopia
- { 110, 111, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 53,19 , 18,7 , 25,12 , 12844,48 , 12892,189 , 13081,24 , 12995,48 , 13043,189 , 13232,24 , 8435,28 , 8463,47 , 8510,14 , 8435,28 , 8463,47 , 8510,14 , 252,3 , 247,3 }, // Somali/Kenya
- { 111, 197, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Spain
- { 111, 10, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1021,26 , 37,5 , 517,14 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Argentina
- { 111, 26, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Bolivia
- { 111, 43, 44, 46, 59, 37, 48, 45, 43, 101, 535,8 , 1021,26 , 165,4 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Chile
- { 111, 47, 44, 46, 59, 37, 48, 45, 43, 101, 543,7 , 1021,26 , 165,4 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Colombia
- { 111, 52, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/CostaRica
- { 111, 61, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/DominicanRepublic
- { 111, 63, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1021,26 , 165,4 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Ecuador
- { 111, 65, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/ElSalvador
- { 111, 66, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/EquatorialGuinea
- { 111, 90, 46, 44, 59, 37, 48, 45, 43, 101, 543,7 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Guatemala
- { 111, 96, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1047,27 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Honduras
- { 111, 139, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Mexico
- { 111, 155, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Nicaragua
- { 111, 166, 46, 44, 59, 37, 48, 45, 43, 101, 179,8 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Panama
- { 111, 168, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Paraguay
- { 111, 169, 46, 44, 59, 37, 48, 45, 43, 101, 543,7 , 1021,26 , 37,5 , 531,15 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Peru
- { 111, 174, 46, 44, 59, 37, 48, 45, 43, 101, 179,8 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/PuertoRico
- { 111, 225, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 1021,26 , 18,7 , 25,12 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/UnitedStates
- { 111, 227, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Uruguay
- { 111, 231, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1021,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 49,4 , 49,4 }, // Spanish/Venezuela
- { 113, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 13314,84 , 134,24 , 13417,48 , 13465,84 , 320,24 , 8605,22 , 8627,60 , 8687,14 , 8605,22 , 8627,60 , 8687,14 , 255,7 , 250,7 }, // Swahili/Kenya
- { 113, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 13314,84 , 134,24 , 13417,48 , 13465,84 , 320,24 , 8605,22 , 8627,60 , 8687,14 , 8605,22 , 8627,60 , 8687,14 , 255,7 , 250,7 }, // Swahili/Tanzania
- { 114, 205, 44, 160, 59, 37, 48, 8722, 43, 101, 72,10 , 1074,30 , 37,5 , 431,16 , 3473,48 , 13398,86 , 134,24 , 5180,48 , 13549,86 , 320,24 , 8701,29 , 8730,50 , 2228,14 , 8701,29 , 8730,50 , 2228,14 , 262,2 , 257,2 }, // Swedish/Sweden
- { 114, 73, 44, 160, 59, 37, 48, 8722, 43, 101, 72,10 , 1074,30 , 37,5 , 431,16 , 3473,48 , 13398,86 , 134,24 , 5180,48 , 13549,86 , 320,24 , 8701,29 , 8730,50 , 2228,14 , 8701,29 , 8730,50 , 2228,14 , 262,2 , 257,2 }, // Swedish/Finland
- { 116, 209, 46, 44, 59, 37, 48, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 13484,48 , 13532,71 , 1483,27 , 13635,48 , 13683,71 , 134,27 , 8780,28 , 8808,55 , 798,14 , 8780,28 , 8808,55 , 798,14 , 0,2 , 0,2 }, // Tajik/Tajikistan
- { 117, 100, 46, 44, 59, 37, 48, 45, 43, 101, 664,6 , 195,18 , 18,7 , 25,12 , 13603,58 , 13661,86 , 13747,31 , 13754,58 , 13812,86 , 13898,31 , 8863,20 , 8883,49 , 8863,20 , 8863,20 , 8883,49 , 8863,20 , 122,2 , 121,2 }, // Tamil/India
- { 117, 198, 46, 44, 59, 37, 48, 45, 43, 101, 664,6 , 195,18 , 18,7 , 25,12 , 13603,58 , 13661,86 , 13747,31 , 13754,58 , 13812,86 , 13898,31 , 8863,20 , 8883,49 , 8863,20 , 8863,20 , 8883,49 , 8863,20 , 122,2 , 121,2 }, // Tamil/SriLanka
- { 118, 178, 44, 160, 59, 37, 48, 45, 43, 101, 936,10 , 1104,11 , 165,4 , 25,12 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Tatar/RussianFederation
- { 119, 100, 46, 44, 59, 37, 48, 45, 43, 101, 535,8 , 99,16 , 18,7 , 25,12 , 13778,86 , 13778,86 , 13864,30 , 13929,86 , 13929,86 , 14015,30 , 8932,32 , 8964,60 , 9024,18 , 8932,32 , 8964,60 , 9024,18 , 0,2 , 0,2 }, // Telugu/India
- { 120, 211, 46, 44, 59, 37, 48, 45, 43, 101, 356,8 , 1115,19 , 165,4 , 546,27 , 13894,63 , 13957,98 , 13894,63 , 14045,63 , 14108,98 , 14206,24 , 9042,23 , 9065,68 , 9133,14 , 9042,23 , 9065,68 , 9133,14 , 264,10 , 259,10 }, // Thai/Thailand
- { 121, 44, 46, 44, 59, 37, 3872, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 14055,63 , 14118,158 , 1483,27 , 14230,63 , 14293,158 , 134,27 , 9147,49 , 9196,77 , 9273,21 , 9147,49 , 9196,77 , 9273,21 , 274,7 , 269,8 }, // Tibetan/China
- { 121, 100, 46, 44, 59, 37, 3872, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 14055,63 , 14118,158 , 1483,27 , 14230,63 , 14293,158 , 134,27 , 9147,49 , 9196,77 , 9273,21 , 9147,49 , 9196,77 , 9273,21 , 274,7 , 269,8 }, // Tibetan/India
- { 122, 67, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1134,23 , 18,7 , 25,12 , 14276,46 , 14322,54 , 1034,24 , 14451,46 , 14497,54 , 1061,24 , 9294,29 , 9294,29 , 9323,14 , 9294,29 , 9294,29 , 9323,14 , 281,7 , 277,7 }, // Tigrinya/Eritrea
- { 122, 69, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1157,23 , 18,7 , 25,12 , 926,46 , 972,62 , 1034,24 , 953,46 , 999,62 , 1061,24 , 9337,29 , 9337,29 , 9323,14 , 9337,29 , 9337,29 , 9323,14 , 281,7 , 277,7 }, // Tigrinya/Ethiopia
- { 123, 214, 46, 44, 59, 37, 48, 45, 43, 101, 271,6 , 99,16 , 37,5 , 8,10 , 14376,51 , 14427,87 , 14514,24 , 14551,51 , 14602,87 , 14689,24 , 9366,29 , 9395,60 , 9455,14 , 9366,29 , 9395,60 , 9455,14 , 0,2 , 0,2 }, // Tonga/Tonga
- { 124, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 14538,48 , 14586,122 , 1483,27 , 14713,48 , 14761,122 , 134,27 , 9469,27 , 9496,72 , 798,14 , 9469,27 , 9496,72 , 798,14 , 0,2 , 0,2 }, // Tsonga/SouthAfrica
- { 125, 217, 44, 46, 59, 37, 48, 45, 43, 101, 936,10 , 1180,17 , 37,5 , 8,10 , 14708,48 , 14756,75 , 14831,24 , 14883,48 , 14931,75 , 15006,24 , 9568,28 , 9596,54 , 9650,14 , 9568,28 , 9596,54 , 9650,14 , 0,2 , 0,2 }, // Turkish/Turkey
- { 128, 44, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Uigur/China
- { 129, 222, 44, 160, 59, 37, 48, 45, 43, 101, 324,8 , 1197,22 , 37,5 , 8,10 , 14855,48 , 14903,95 , 14998,24 , 15030,67 , 15097,87 , 15184,24 , 9664,21 , 9685,56 , 9741,14 , 9664,21 , 9685,56 , 9741,14 , 288,2 , 284,2 }, // Ukrainian/Ukraine
- { 130, 100, 46, 44, 59, 37, 48, 45, 43, 101, 271,6 , 1219,18 , 18,7 , 25,12 , 15022,67 , 15022,67 , 10111,24 , 15208,67 , 15208,67 , 10250,24 , 9755,36 , 9755,36 , 9791,14 , 9755,36 , 9755,36 , 9791,14 , 0,2 , 0,2 }, // Urdu/India
- { 130, 163, 46, 44, 59, 37, 48, 45, 43, 101, 271,6 , 1219,18 , 18,7 , 25,12 , 15022,67 , 15022,67 , 10111,24 , 15208,67 , 15208,67 , 10250,24 , 9755,36 , 9755,36 , 9791,14 , 9755,36 , 9755,36 , 9791,14 , 0,2 , 0,2 }, // Urdu/Pakistan
- { 131, 228, 44, 160, 59, 37, 48, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 13484,48 , 15089,115 , 11247,24 , 13635,48 , 15275,115 , 11391,24 , 9805,28 , 9833,53 , 9886,14 , 9805,28 , 9833,53 , 9886,14 , 0,2 , 0,2 }, // Uzbek/Uzbekistan
- { 131, 1, 44, 46, 59, 1642, 1776, 8722, 43, 101, 881,8 , 1237,33 , 165,4 , 447,11 , 15204,48 , 15252,68 , 11247,24 , 15390,48 , 10182,68 , 11391,24 , 9900,21 , 6558,49 , 9886,14 , 9900,21 , 6558,49 , 9886,14 , 0,2 , 0,2 }, // Uzbek/Afghanistan
- { 132, 232, 44, 46, 59, 37, 48, 45, 43, 101, 141,10 , 1270,31 , 37,5 , 8,10 , 15320,75 , 15395,130 , 1483,27 , 15438,75 , 15513,130 , 134,27 , 9921,33 , 9954,55 , 10009,21 , 9921,33 , 9954,55 , 10009,21 , 290,2 , 286,2 }, // Vietnamese/VietNam
- { 134, 224, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 123,18 , 18,7 , 25,12 , 15525,53 , 15578,87 , 15665,24 , 15643,62 , 15705,86 , 15791,24 , 10030,29 , 10059,77 , 10136,14 , 10150,30 , 10059,77 , 10136,14 , 0,2 , 0,2 }, // Welsh/UnitedKingdom
- { 135, 187, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Wolof/Senegal
- { 136, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 15689,48 , 15737,91 , 1483,27 , 15815,48 , 15863,91 , 134,27 , 10180,28 , 10208,61 , 798,14 , 10180,28 , 10208,61 , 798,14 , 0,2 , 0,2 }, // Xhosa/SouthAfrica
- { 138, 157, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 15828,73 , 15901,121 , 1483,27 , 15954,73 , 16027,121 , 134,27 , 10269,44 , 10313,69 , 798,14 , 10269,44 , 10313,69 , 798,14 , 292,5 , 288,5 }, // Yoruba/Nigeria
- { 140, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 82,17 , 18,7 , 25,12 , 16022,48 , 16070,104 , 134,24 , 16148,48 , 16196,90 , 320,24 , 10382,28 , 10410,68 , 10478,14 , 10382,28 , 10410,68 , 10478,14 , 0,2 , 0,2 }, // Zulu/SouthAfrica
- { 141, 161, 44, 160, 59, 37, 48, 8722, 43, 101, 324,8 , 603,17 , 37,5 , 431,16 , 3915,48 , 9527,83 , 134,24 , 3967,48 , 9595,83 , 320,24 , 10492,28 , 10520,51 , 2228,14 , 10492,28 , 10520,51 , 2228,14 , 297,9 , 293,11 }, // Nynorsk/Norway
- { 142, 27, 44, 46, 59, 37, 48, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 16174,48 , 16222,83 , 1483,27 , 16286,48 , 16334,83 , 134,27 , 10571,28 , 10599,58 , 798,14 , 10571,28 , 10599,58 , 798,14 , 0,2 , 0,2 }, // Bosnian/BosniaAndHerzegowina
- { 143, 131, 46, 44, 44, 37, 48, 45, 43, 101, 664,6 , 99,16 , 322,8 , 330,13 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Divehi/Maldives
- { 144, 224, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 82,17 , 37,5 , 8,10 , 16305,102 , 16407,140 , 1483,27 , 16417,102 , 16519,140 , 134,27 , 10657,30 , 10687,57 , 798,14 , 10657,30 , 10687,57 , 798,14 , 49,4 , 49,4 }, // Manx/UnitedKingdom
- { 145, 224, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 99,16 , 37,5 , 8,10 , 16547,46 , 16593,124 , 1483,27 , 16659,46 , 16705,124 , 134,27 , 10744,28 , 10772,60 , 798,14 , 10744,28 , 10772,60 , 798,14 , 49,4 , 49,4 }, // Cornish/UnitedKingdom
- { 146, 83, 46, 160, 59, 37, 48, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 16717,48 , 16765,192 , 1483,27 , 16829,48 , 16877,192 , 134,27 , 10832,28 , 10860,49 , 10909,14 , 10832,28 , 10860,49 , 10909,14 , 306,2 , 304,2 }, // Akan/Ghana
- { 147, 100, 46, 44, 59, 37, 48, 45, 43, 101, 664,6 , 99,16 , 18,7 , 25,12 , 16957,87 , 16957,87 , 1483,27 , 17069,87 , 17069,87 , 134,27 , 6029,32 , 10923,55 , 798,14 , 6029,32 , 10923,55 , 798,14 , 308,5 , 306,5 }, // Konkani/India
- { 148, 83, 46, 44, 59, 37, 48, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 17044,48 , 17092,94 , 1483,27 , 17156,48 , 17204,94 , 134,27 , 10978,26 , 11004,34 , 798,14 , 10978,26 , 11004,34 , 798,14 , 0,2 , 0,2 }, // Ga/Ghana
- { 149, 157, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 17186,48 , 17234,86 , 1483,27 , 17298,48 , 17346,86 , 134,27 , 11038,29 , 11067,57 , 798,14 , 11038,29 , 11067,57 , 798,14 , 313,4 , 311,4 }, // Igbo/Nigeria
- { 150, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 17320,48 , 17368,189 , 17557,24 , 17432,48 , 17480,189 , 17669,24 , 11124,28 , 11152,74 , 11226,14 , 11124,28 , 11152,74 , 11226,14 , 317,9 , 315,7 }, // Kamba/Kenya
- { 151, 207, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 1301,13 , 394,4 , 25,12 , 17581,65 , 17581,65 , 1483,27 , 17693,65 , 17693,65 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Syriac/SyrianArabRepublic
- { 152, 67, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1314,22 , 18,7 , 25,12 , 17646,47 , 17693,77 , 17770,24 , 17758,47 , 17805,77 , 17882,24 , 11240,26 , 11266,43 , 11309,14 , 11240,26 , 11266,43 , 11309,14 , 0,2 , 0,2 }, // Blin/Eritrea
- { 153, 67, 46, 4808, 59, 37, 48, 45, 43, 101, 27,8 , 1336,23 , 18,7 , 25,12 , 17794,49 , 17794,49 , 17843,24 , 17906,49 , 17906,49 , 17955,24 , 11323,29 , 11323,29 , 11352,14 , 11323,29 , 11323,29 , 11352,14 , 0,2 , 0,2 }, // Geez/Eritrea
- { 153, 69, 46, 4808, 59, 37, 48, 45, 43, 101, 27,8 , 1336,23 , 18,7 , 25,12 , 17794,49 , 17794,49 , 17843,24 , 17906,49 , 17906,49 , 17955,24 , 11323,29 , 11323,29 , 11352,14 , 11323,29 , 11323,29 , 11352,14 , 0,2 , 0,2 }, // Geez/Ethiopia
- { 154, 53, 46, 44, 59, 37, 48, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 17867,48 , 17915,124 , 1483,27 , 17979,48 , 18027,124 , 134,27 , 11366,28 , 11394,54 , 798,14 , 11366,28 , 11394,54 , 798,14 , 0,2 , 0,2 }, // Koro/IvoryCoast
+ { 106, 198, 46, 44, 59, 37, 48, 45, 43, 101, 576,10 , 988,17 , 18,7 , 25,12 , 12288,54 , 12342,92 , 12434,32 , 12432,54 , 12486,92 , 12578,32 , 8048,30 , 8078,62 , 8140,19 , 8048,30 , 8078,62 , 8140,19 , 251,5 , 245,4 }, // Singhalese/SriLanka
+ { 107, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 12466,48 , 12514,114 , 1483,27 , 12610,48 , 12658,114 , 134,27 , 8159,27 , 8186,68 , 798,14 , 8159,27 , 8186,68 , 798,14 , 0,2 , 0,2 }, // Siswati/SouthAfrica
+ { 107, 204, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 12466,48 , 12514,114 , 1483,27 , 12610,48 , 12658,114 , 134,27 , 8159,27 , 8186,68 , 798,14 , 8159,27 , 8186,68 , 798,14 , 0,2 , 0,2 }, // Siswati/Swaziland
+ { 108, 191, 44, 160, 59, 37, 48, 45, 43, 101, 586,8 , 502,18 , 165,4 , 195,9 , 12628,48 , 12676,82 , 11775,24 , 12772,48 , 12820,89 , 11919,24 , 8254,21 , 8275,52 , 8327,14 , 8254,21 , 8275,52 , 8327,14 , 256,10 , 249,9 }, // Slovak/Slovakia
+ { 109, 192, 44, 46, 59, 37, 48, 45, 43, 101, 1005,9 , 611,19 , 37,5 , 8,10 , 11646,48 , 12758,86 , 11775,24 , 11790,48 , 12909,86 , 11919,24 , 8341,28 , 8369,52 , 8421,14 , 8341,28 , 8369,52 , 8421,14 , 62,4 , 258,4 }, // Slovenian/Slovenia
+ { 110, 194, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 53,19 , 18,7 , 25,12 , 12844,48 , 12892,189 , 13081,24 , 12995,48 , 13043,189 , 13232,24 , 8435,28 , 8463,47 , 8510,14 , 8435,28 , 8463,47 , 8510,14 , 266,3 , 262,3 }, // Somali/Somalia
+ { 110, 59, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 53,19 , 18,7 , 25,12 , 12844,48 , 12892,189 , 13081,24 , 12995,48 , 13043,189 , 13232,24 , 8435,28 , 8463,47 , 8510,14 , 8435,28 , 8463,47 , 8510,14 , 266,3 , 262,3 }, // Somali/Djibouti
+ { 110, 69, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 53,19 , 18,7 , 25,12 , 12844,48 , 12892,189 , 13081,24 , 12995,48 , 13043,189 , 13232,24 , 8435,28 , 8463,47 , 8510,14 , 8435,28 , 8463,47 , 8510,14 , 266,3 , 262,3 }, // Somali/Ethiopia
+ { 110, 111, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 53,19 , 18,7 , 25,12 , 12844,48 , 12892,189 , 13081,24 , 12995,48 , 13043,189 , 13232,24 , 8435,28 , 8463,47 , 8510,14 , 8435,28 , 8463,47 , 8510,14 , 266,3 , 262,3 }, // Somali/Kenya
+ { 111, 197, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Spain
+ { 111, 10, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 37,5 , 517,14 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Argentina
+ { 111, 26, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Bolivia
+ { 111, 43, 44, 46, 59, 37, 48, 45, 43, 101, 543,8 , 1014,26 , 165,4 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Chile
+ { 111, 47, 44, 46, 59, 37, 48, 45, 43, 101, 551,7 , 1014,26 , 165,4 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Colombia
+ { 111, 52, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/CostaRica
+ { 111, 61, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/DominicanRepublic
+ { 111, 63, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 165,4 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Ecuador
+ { 111, 65, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/ElSalvador
+ { 111, 66, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/EquatorialGuinea
+ { 111, 90, 46, 44, 59, 37, 48, 45, 43, 101, 551,7 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Guatemala
+ { 111, 96, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1040,27 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Honduras
+ { 111, 139, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Mexico
+ { 111, 155, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Nicaragua
+ { 111, 166, 46, 44, 59, 37, 48, 45, 43, 101, 187,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Panama
+ { 111, 168, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Paraguay
+ { 111, 169, 46, 44, 59, 37, 48, 45, 43, 101, 551,7 , 1014,26 , 37,5 , 531,15 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Peru
+ { 111, 174, 46, 44, 59, 37, 48, 45, 43, 101, 187,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/PuertoRico
+ { 111, 225, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 1014,26 , 18,7 , 25,12 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/UnitedStates
+ { 111, 227, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Uruguay
+ { 111, 231, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/Venezuela
+ { 111, 246, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1014,26 , 37,5 , 8,10 , 13105,48 , 13153,89 , 13242,24 , 13256,48 , 13304,89 , 13393,24 , 8524,28 , 8552,53 , 2799,14 , 8524,28 , 8552,53 , 2799,14 , 56,4 , 56,4 }, // Spanish/LatinAmericaAndTheCaribbean
+ { 113, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 13314,84 , 134,24 , 13417,48 , 13465,84 , 320,24 , 8605,22 , 8627,60 , 8687,14 , 8605,22 , 8627,60 , 8687,14 , 269,7 , 265,7 }, // Swahili/Kenya
+ { 113, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 13314,84 , 134,24 , 13417,48 , 13465,84 , 320,24 , 8605,22 , 8627,60 , 8687,14 , 8605,22 , 8627,60 , 8687,14 , 269,7 , 265,7 }, // Swahili/Tanzania
+ { 114, 205, 44, 160, 59, 37, 48, 8722, 43, 101, 72,10 , 1067,30 , 37,5 , 431,16 , 3473,48 , 13398,86 , 134,24 , 5180,48 , 13549,86 , 320,24 , 8701,29 , 8730,50 , 2228,14 , 8701,29 , 8730,50 , 2228,14 , 276,2 , 272,2 }, // Swedish/Sweden
+ { 114, 73, 44, 160, 59, 37, 48, 8722, 43, 101, 72,10 , 1067,30 , 37,5 , 431,16 , 3473,48 , 13398,86 , 134,24 , 5180,48 , 13549,86 , 320,24 , 8701,29 , 8730,50 , 2228,14 , 8701,29 , 8730,50 , 2228,14 , 276,2 , 272,2 }, // Swedish/Finland
+ { 116, 209, 46, 44, 59, 37, 48, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 13484,48 , 13532,71 , 1483,27 , 13635,48 , 13683,71 , 134,27 , 8780,28 , 8808,55 , 798,14 , 8780,28 , 8808,55 , 798,14 , 0,2 , 0,2 }, // Tajik/Tajikistan
+ { 117, 100, 46, 44, 59, 37, 48, 45, 43, 101, 655,6 , 203,18 , 18,7 , 25,12 , 13603,58 , 13661,88 , 13749,31 , 13754,58 , 13812,88 , 13900,31 , 8863,20 , 8883,49 , 8863,20 , 8863,20 , 8883,49 , 8863,20 , 136,2 , 136,2 }, // Tamil/India
+ { 117, 198, 46, 44, 59, 37, 48, 45, 43, 101, 655,6 , 203,18 , 18,7 , 25,12 , 13603,58 , 13661,88 , 13749,31 , 13754,58 , 13812,88 , 13900,31 , 8863,20 , 8883,49 , 8863,20 , 8863,20 , 8883,49 , 8863,20 , 136,2 , 136,2 }, // Tamil/SriLanka
+ { 118, 178, 44, 160, 59, 37, 48, 45, 43, 101, 929,10 , 1097,11 , 165,4 , 25,12 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Tatar/RussianFederation
+ { 119, 100, 46, 44, 59, 37, 48, 45, 43, 101, 543,8 , 99,16 , 18,7 , 25,12 , 13780,86 , 13780,86 , 13866,30 , 13931,86 , 13931,86 , 14017,30 , 8932,32 , 8964,60 , 9024,18 , 8932,32 , 8964,60 , 9024,18 , 278,1 , 274,2 }, // Telugu/India
+ { 120, 211, 46, 44, 59, 37, 48, 45, 43, 101, 364,8 , 1108,19 , 165,4 , 546,27 , 13896,63 , 13959,98 , 13896,63 , 14047,63 , 14110,98 , 14208,24 , 9042,23 , 9065,68 , 9133,14 , 9042,23 , 9065,68 , 9133,14 , 279,10 , 276,10 }, // Thai/Thailand
+ { 121, 44, 46, 44, 59, 37, 3872, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 14057,63 , 14120,158 , 1483,27 , 14232,63 , 14295,158 , 134,27 , 9147,49 , 9196,77 , 9273,21 , 9147,49 , 9196,77 , 9273,21 , 289,7 , 286,8 }, // Tibetan/China
+ { 121, 100, 46, 44, 59, 37, 3872, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 14057,63 , 14120,158 , 1483,27 , 14232,63 , 14295,158 , 134,27 , 9147,49 , 9196,77 , 9273,21 , 9147,49 , 9196,77 , 9273,21 , 289,7 , 286,8 }, // Tibetan/India
+ { 122, 67, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1127,23 , 18,7 , 25,12 , 14278,46 , 14324,54 , 1034,24 , 14453,46 , 14499,54 , 1061,24 , 9294,29 , 9294,29 , 9323,14 , 9294,29 , 9294,29 , 9323,14 , 296,7 , 294,7 }, // Tigrinya/Eritrea
+ { 122, 69, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1150,23 , 18,7 , 25,12 , 926,46 , 972,62 , 1034,24 , 953,46 , 999,62 , 1061,24 , 9337,29 , 9337,29 , 9323,14 , 9337,29 , 9337,29 , 9323,14 , 296,7 , 294,7 }, // Tigrinya/Ethiopia
+ { 123, 214, 46, 44, 59, 37, 48, 45, 43, 101, 279,6 , 99,16 , 37,5 , 8,10 , 14378,51 , 14429,87 , 14516,24 , 14553,51 , 14604,87 , 14691,24 , 9366,29 , 9395,60 , 9455,14 , 9366,29 , 9395,60 , 9455,14 , 0,2 , 0,2 }, // Tonga/Tonga
+ { 124, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 14540,48 , 14588,122 , 1483,27 , 14715,48 , 14763,122 , 134,27 , 9469,27 , 9496,72 , 798,14 , 9469,27 , 9496,72 , 798,14 , 0,2 , 0,2 }, // Tsonga/SouthAfrica
+ { 125, 217, 44, 46, 59, 37, 48, 45, 43, 101, 929,10 , 1173,17 , 37,5 , 8,10 , 14710,48 , 14758,75 , 14833,24 , 14885,48 , 14933,75 , 15008,24 , 9568,28 , 9596,54 , 9650,14 , 9568,28 , 9596,54 , 9650,14 , 0,2 , 0,2 }, // Turkish/Turkey
+ { 128, 44, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Uigur/China
+ { 129, 222, 44, 160, 59, 37, 48, 45, 43, 101, 332,8 , 1190,22 , 37,5 , 8,10 , 14857,48 , 14905,95 , 15000,24 , 15032,67 , 15099,87 , 15186,24 , 9664,21 , 9685,56 , 9741,14 , 9664,21 , 9685,56 , 9741,14 , 303,2 , 301,2 }, // Ukrainian/Ukraine
+ { 130, 100, 46, 44, 59, 37, 48, 45, 43, 101, 279,6 , 1212,18 , 18,7 , 25,12 , 15024,67 , 15024,67 , 10111,24 , 15210,67 , 15210,67 , 10250,24 , 9755,36 , 9755,36 , 9791,14 , 9755,36 , 9755,36 , 9791,14 , 0,2 , 0,2 }, // Urdu/India
+ { 130, 163, 46, 44, 59, 37, 48, 45, 43, 101, 279,6 , 1212,18 , 18,7 , 25,12 , 15024,67 , 15024,67 , 10111,24 , 15210,67 , 15210,67 , 10250,24 , 9755,36 , 9755,36 , 9791,14 , 9755,36 , 9755,36 , 9791,14 , 0,2 , 0,2 }, // Urdu/Pakistan
+ { 131, 228, 44, 160, 59, 37, 48, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 13484,48 , 15091,115 , 11247,24 , 13635,48 , 15277,115 , 11391,24 , 9805,28 , 9833,53 , 9886,14 , 9805,28 , 9833,53 , 9886,14 , 0,2 , 0,2 }, // Uzbek/Uzbekistan
+ { 131, 1, 1643, 1644, 59, 1642, 1776, 8722, 43, 101, 179,8 , 1230,33 , 165,4 , 447,11 , 15206,48 , 15254,68 , 11247,24 , 15392,48 , 10182,68 , 11391,24 , 9900,21 , 6558,49 , 9886,14 , 9900,21 , 6558,49 , 9886,14 , 0,2 , 0,2 }, // Uzbek/Afghanistan
+ { 132, 232, 44, 46, 59, 37, 48, 45, 43, 101, 141,10 , 1263,31 , 37,5 , 8,10 , 15322,75 , 15397,130 , 1483,27 , 15440,75 , 15515,130 , 134,27 , 9921,33 , 9954,55 , 10009,21 , 9921,33 , 9954,55 , 10009,21 , 305,2 , 303,2 }, // Vietnamese/VietNam
+ { 134, 224, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 123,18 , 18,7 , 25,12 , 15527,53 , 15580,87 , 15667,24 , 15645,62 , 15707,86 , 15793,24 , 10030,29 , 10059,77 , 10136,14 , 10150,30 , 10059,77 , 10136,14 , 0,2 , 0,2 }, // Welsh/UnitedKingdom
+ { 135, 187, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Wolof/Senegal
+ { 136, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 15691,48 , 15739,91 , 1483,27 , 15817,48 , 15865,91 , 134,27 , 10180,28 , 10208,61 , 798,14 , 10180,28 , 10208,61 , 798,14 , 0,2 , 0,2 }, // Xhosa/SouthAfrica
+ { 138, 157, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 15830,73 , 15903,121 , 1483,27 , 15956,73 , 16029,121 , 134,27 , 10269,44 , 10313,69 , 798,14 , 10269,44 , 10313,69 , 798,14 , 307,5 , 305,5 }, // Yoruba/Nigeria
+ { 140, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 82,17 , 18,7 , 25,12 , 16024,48 , 16072,104 , 134,24 , 16150,48 , 16198,90 , 320,24 , 10382,28 , 10410,68 , 10478,14 , 10382,28 , 10410,68 , 10478,14 , 0,2 , 0,2 }, // Zulu/SouthAfrica
+ { 141, 161, 44, 160, 59, 37, 48, 8722, 43, 101, 332,8 , 594,17 , 37,5 , 431,16 , 3915,48 , 9527,83 , 134,24 , 3967,48 , 9595,83 , 320,24 , 10492,28 , 10520,51 , 2228,14 , 10492,28 , 10520,51 , 2228,14 , 312,9 , 310,11 }, // Nynorsk/Norway
+ { 142, 27, 44, 46, 59, 37, 48, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 16176,48 , 16224,83 , 1483,27 , 16288,48 , 16336,83 , 134,27 , 10571,28 , 10599,58 , 798,14 , 10571,28 , 10599,58 , 798,14 , 0,2 , 0,2 }, // Bosnian/BosniaAndHerzegowina
+ { 143, 131, 46, 44, 44, 37, 48, 45, 43, 101, 655,6 , 99,16 , 322,8 , 330,13 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Divehi/Maldives
+ { 144, 224, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 82,17 , 37,5 , 8,10 , 16307,102 , 16409,140 , 1483,27 , 16419,102 , 16521,140 , 134,27 , 10657,30 , 10687,57 , 798,14 , 10657,30 , 10687,57 , 798,14 , 56,4 , 56,4 }, // Manx/UnitedKingdom
+ { 145, 224, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 99,16 , 37,5 , 8,10 , 16549,46 , 16595,124 , 1483,27 , 16661,46 , 16707,124 , 134,27 , 10744,28 , 10772,60 , 798,14 , 10744,28 , 10772,60 , 798,14 , 56,4 , 56,4 }, // Cornish/UnitedKingdom
+ { 146, 83, 46, 160, 59, 37, 48, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 16719,48 , 16767,192 , 1483,27 , 16831,48 , 16879,192 , 134,27 , 10832,28 , 10860,49 , 10909,14 , 10832,28 , 10860,49 , 10909,14 , 321,2 , 321,2 }, // Akan/Ghana
+ { 147, 100, 46, 44, 59, 37, 48, 45, 43, 101, 655,6 , 99,16 , 18,7 , 25,12 , 16959,87 , 16959,87 , 1483,27 , 17071,87 , 17071,87 , 134,27 , 6029,32 , 10923,55 , 798,14 , 6029,32 , 10923,55 , 798,14 , 323,5 , 323,5 }, // Konkani/India
+ { 148, 83, 46, 44, 59, 37, 48, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 17046,48 , 17094,94 , 1483,27 , 17158,48 , 17206,94 , 134,27 , 10978,26 , 11004,34 , 798,14 , 10978,26 , 11004,34 , 798,14 , 0,2 , 0,2 }, // Ga/Ghana
+ { 149, 157, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 17188,48 , 17236,86 , 1483,27 , 17300,48 , 17348,86 , 134,27 , 11038,29 , 11067,57 , 798,14 , 11038,29 , 11067,57 , 798,14 , 328,4 , 328,4 }, // Igbo/Nigeria
+ { 150, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 17322,48 , 17370,189 , 17559,24 , 17434,48 , 17482,189 , 17671,24 , 11124,28 , 11152,74 , 11226,14 , 11124,28 , 11152,74 , 11226,14 , 332,9 , 332,7 }, // Kamba/Kenya
+ { 151, 207, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 1294,13 , 394,4 , 25,12 , 17583,65 , 17583,65 , 1483,27 , 17695,65 , 17695,65 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Syriac/SyrianArabRepublic
+ { 152, 67, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1307,22 , 18,7 , 25,12 , 17648,47 , 17695,77 , 17772,24 , 17760,47 , 17807,77 , 17884,24 , 11240,26 , 11266,43 , 11309,14 , 11240,26 , 11266,43 , 11309,14 , 0,2 , 0,2 }, // Blin/Eritrea
+ { 153, 67, 46, 4808, 59, 37, 48, 45, 43, 101, 27,8 , 1329,23 , 18,7 , 25,12 , 17796,49 , 17796,49 , 17845,24 , 17908,49 , 17908,49 , 17957,24 , 11323,29 , 11323,29 , 11352,14 , 11323,29 , 11323,29 , 11352,14 , 0,2 , 0,2 }, // Geez/Eritrea
+ { 153, 69, 46, 4808, 59, 37, 48, 45, 43, 101, 27,8 , 1329,23 , 18,7 , 25,12 , 17796,49 , 17796,49 , 17845,24 , 17908,49 , 17908,49 , 17957,24 , 11323,29 , 11323,29 , 11352,14 , 11323,29 , 11323,29 , 11352,14 , 0,2 , 0,2 }, // Geez/Ethiopia
+ { 154, 53, 46, 44, 59, 37, 48, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 17869,48 , 17917,124 , 1483,27 , 17981,48 , 18029,124 , 134,27 , 11366,28 , 11394,54 , 798,14 , 11366,28 , 11394,54 , 798,14 , 0,2 , 0,2 }, // Koro/IvoryCoast
{ 155, 69, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 53,19 , 18,7 , 25,12 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 11448,28 , 11476,51 , 11527,14 , 11448,28 , 11476,51 , 11527,14 , 0,2 , 0,2 }, // Sidamo/Ethiopia
- { 156, 157, 46, 44, 59, 37, 48, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 18039,59 , 18098,129 , 1483,27 , 18151,59 , 18210,129 , 134,27 , 11541,35 , 11576,87 , 798,14 , 11541,35 , 11576,87 , 798,14 , 0,2 , 0,2 }, // Atsam/Nigeria
- { 157, 67, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1359,21 , 18,7 , 25,12 , 926,46 , 972,62 , 1034,24 , 953,46 , 999,62 , 1061,24 , 11663,27 , 11690,41 , 11731,14 , 11663,27 , 11690,41 , 11731,14 , 0,2 , 0,2 }, // Tigre/Eritrea
- { 158, 157, 46, 44, 59, 37, 48, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 18227,57 , 18284,178 , 1483,27 , 18339,57 , 18396,178 , 134,27 , 11745,28 , 11773,44 , 798,14 , 11745,28 , 11773,44 , 798,14 , 0,2 , 0,2 }, // Jju/Nigeria
- { 159, 106, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1380,27 , 37,5 , 8,10 , 18462,48 , 18510,77 , 18587,24 , 18574,48 , 18622,77 , 18699,24 , 11817,28 , 11845,50 , 2799,14 , 11817,28 , 11845,50 , 2799,14 , 0,2 , 0,2 }, // Friulian/Italy
- { 160, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 18611,48 , 18659,111 , 1483,27 , 18723,48 , 18771,111 , 134,27 , 11895,27 , 11922,70 , 798,14 , 11895,27 , 11922,70 , 798,14 , 0,2 , 0,2 }, // Venda/SouthAfrica
- { 161, 83, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 18770,48 , 18818,87 , 18905,24 , 18882,48 , 18930,87 , 19017,24 , 11992,32 , 12024,44 , 12068,14 , 11992,32 , 12024,44 , 12068,14 , 306,2 , 304,2 }, // Ewe/Ghana
- { 161, 212, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 18770,48 , 18818,87 , 18905,24 , 18882,48 , 18930,87 , 19017,24 , 11992,32 , 12024,44 , 12068,14 , 11992,32 , 12024,44 , 12068,14 , 306,2 , 304,2 }, // Ewe/Togo
- { 162, 69, 46, 8217, 59, 37, 48, 45, 43, 101, 27,8 , 1407,22 , 18,7 , 25,12 , 926,46 , 972,62 , 1034,24 , 953,46 , 999,62 , 1061,24 , 12082,27 , 12082,27 , 12109,14 , 12082,27 , 12082,27 , 12109,14 , 0,2 , 0,2 }, // Walamo/Ethiopia
- { 163, 225, 46, 44, 59, 37, 48, 45, 43, 101, 271,6 , 10,17 , 18,7 , 25,12 , 18929,59 , 18988,95 , 1483,27 , 19041,59 , 19100,95 , 134,27 , 12123,21 , 12144,57 , 798,14 , 12123,21 , 12144,57 , 798,14 , 0,2 , 0,2 }, // Hawaiian/UnitedStates
- { 164, 157, 46, 44, 59, 37, 48, 45, 43, 101, 213,8 , 306,18 , 37,5 , 8,10 , 19083,48 , 19131,153 , 1483,27 , 19195,48 , 19243,153 , 134,27 , 12201,28 , 12229,42 , 798,14 , 12201,28 , 12229,42 , 798,14 , 0,2 , 0,2 }, // Tyap/Nigeria
- { 165, 129, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 19284,48 , 19332,91 , 1483,27 , 19396,48 , 19444,91 , 134,27 , 12271,28 , 12299,67 , 798,14 , 12271,28 , 12299,67 , 798,14 , 0,2 , 0,2 }, // Chewa/Malawi
- { 166, 170, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 1429,18 , 37,5 , 8,10 , 19423,48 , 19471,88 , 19559,24 , 19535,48 , 19583,88 , 19671,24 , 12366,28 , 12394,55 , 12449,14 , 12463,28 , 12394,55 , 12449,14 , 0,2 , 0,2 }, // Filipino/Philippines
- { 167, 206, 46, 8217, 59, 37, 48, 8722, 43, 101, 324,8 , 494,18 , 37,5 , 8,10 , 19583,48 , 19631,86 , 134,24 , 4729,48 , 19695,86 , 320,24 , 12491,28 , 12519,63 , 3089,14 , 12491,28 , 12519,63 , 3089,14 , 326,5 , 322,4 }, // Swiss German/Switzerland
- { 168, 44, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 1483,27 , 19717,38 , 1483,27 , 134,27 , 19781,38 , 134,27 , 12582,21 , 12603,28 , 12631,14 , 12582,21 , 12603,28 , 12631,14 , 331,2 , 326,2 }, // Sichuan Yi/China
- { 169, 91, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Kpelle/Guinea
- { 169, 121, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Kpelle/Liberia
- { 170, 82, 44, 46, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Low German/Germany
- { 171, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 19755,48 , 19803,100 , 1483,27 , 19819,48 , 19867,100 , 134,27 , 12645,27 , 12672,66 , 798,14 , 12645,27 , 12672,66 , 798,14 , 0,2 , 0,2 }, // South Ndebele/SouthAfrica
- { 172, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 19903,48 , 19951,94 , 1483,27 , 19967,48 , 20015,94 , 134,27 , 12738,27 , 12765,63 , 798,14 , 12738,27 , 12765,63 , 798,14 , 0,2 , 0,2 }, // Northern Sotho/SouthAfrica
- { 173, 73, 44, 160, 59, 37, 48, 8722, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 20045,85 , 20130,145 , 20275,24 , 20109,85 , 20194,145 , 20339,24 , 12828,33 , 12861,65 , 12926,14 , 12828,33 , 12861,65 , 12926,14 , 0,2 , 0,2 }, // Northern Sami/Finland
- { 173, 161, 44, 160, 59, 37, 48, 8722, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 20299,59 , 20130,145 , 20275,24 , 20363,59 , 20194,145 , 20339,24 , 12828,33 , 12940,75 , 13015,14 , 12828,33 , 12940,75 , 13015,14 , 0,2 , 0,2 }, // Northern Sami/Norway
- { 174, 208, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 306,18 , 37,5 , 8,10 , 20358,48 , 20406,142 , 20548,24 , 20422,48 , 20470,142 , 20612,24 , 13029,28 , 13057,172 , 13229,14 , 13029,28 , 13057,172 , 13229,14 , 0,2 , 0,2 }, // Taroko/Taiwan
- { 175, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 20572,48 , 20620,88 , 20708,24 , 20636,48 , 20684,88 , 20772,24 , 13243,28 , 13271,62 , 13333,14 , 13243,28 , 13271,62 , 13333,14 , 333,5 , 328,10 }, // Gusii/Kenya
- { 176, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 20732,48 , 20780,221 , 21001,24 , 20796,48 , 20844,221 , 21065,24 , 13347,28 , 13375,106 , 13481,14 , 13347,28 , 13375,106 , 13481,14 , 338,10 , 338,10 }, // Taita/Kenya
- { 177, 187, 44, 160, 59, 37, 48, 45, 43, 101, 356,8 , 99,16 , 37,5 , 8,10 , 21025,48 , 21073,77 , 21150,24 , 21089,48 , 21137,77 , 21214,24 , 13495,28 , 13523,59 , 13582,14 , 13495,28 , 13523,59 , 13582,14 , 348,6 , 348,7 }, // Fulah/Senegal
- { 178, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 21174,48 , 21222,185 , 21407,24 , 21238,48 , 21286,185 , 21471,24 , 13596,28 , 13624,63 , 13687,14 , 13596,28 , 13624,63 , 13687,14 , 354,6 , 355,8 }, // Kikuyu/Kenya
- { 179, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 21431,48 , 21479,173 , 21652,24 , 21495,48 , 21543,173 , 21716,24 , 13701,28 , 13729,105 , 13834,14 , 13701,28 , 13729,105 , 13834,14 , 360,7 , 363,5 }, // Samburu/Kenya
- { 180, 146, 44, 46, 59, 37, 48, 45, 43, 101, 356,8 , 909,27 , 37,5 , 8,10 , 21676,48 , 21724,88 , 134,24 , 21740,48 , 21788,88 , 320,24 , 13848,28 , 13876,55 , 13931,14 , 13848,28 , 13876,55 , 13931,14 , 0,2 , 0,2 }, // Sena/Mozambique
- { 181, 240, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 21812,48 , 21860,112 , 21972,24 , 21876,48 , 21924,112 , 22036,24 , 13945,28 , 13973,50 , 14023,14 , 13945,28 , 13973,50 , 14023,14 , 0,2 , 0,2 }, // North Ndebele/Zimbabwe
- { 182, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 21996,39 , 22035,194 , 22229,24 , 22060,39 , 22099,194 , 22293,24 , 14037,28 , 14065,65 , 14130,14 , 14037,28 , 14065,65 , 14130,14 , 367,8 , 368,7 }, // Rombo/Tanzania
- { 183, 145, 44, 160, 59, 37, 48, 45, 43, 101, 356,8 , 99,16 , 37,5 , 8,10 , 22253,48 , 22301,81 , 22382,24 , 22317,48 , 22365,81 , 22446,24 , 14144,30 , 14174,48 , 798,14 , 14144,30 , 14174,48 , 798,14 , 375,6 , 375,8 }, // Tachelhit/Morocco
- { 184, 3, 44, 160, 59, 37, 48, 45, 43, 101, 356,8 , 99,16 , 37,5 , 8,10 , 22406,48 , 22454,84 , 22538,24 , 22470,48 , 22518,84 , 22602,24 , 14222,30 , 14252,51 , 14303,14 , 14222,30 , 14252,51 , 14303,14 , 381,7 , 383,9 }, // Kabyle/Algeria
- { 185, 221, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 22562,48 , 22610,152 , 134,24 , 22626,48 , 22674,152 , 320,24 , 14317,28 , 14345,74 , 14419,14 , 14317,28 , 14345,74 , 14419,14 , 0,2 , 0,2 }, // Nyankole/Uganda
- { 186, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 22762,48 , 22810,254 , 23064,24 , 22826,48 , 22874,254 , 23128,24 , 14433,28 , 14461,82 , 14543,14 , 14433,28 , 14461,82 , 14543,14 , 388,7 , 392,7 }, // Bena/Tanzania
- { 187, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 23088,87 , 134,24 , 13417,48 , 23152,87 , 320,24 , 14557,28 , 14585,62 , 14647,14 , 14557,28 , 14585,62 , 14647,14 , 395,5 , 399,9 }, // Vunjo/Tanzania
- { 188, 132, 46, 44, 59, 37, 48, 45, 43, 101, 356,8 , 99,16 , 37,5 , 8,10 , 23175,47 , 23222,92 , 23314,24 , 23239,47 , 23286,92 , 23378,24 , 14661,28 , 14689,44 , 14733,14 , 14661,28 , 14689,44 , 14733,14 , 0,2 , 0,2 }, // Bambara/Mali
- { 189, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 23338,48 , 23386,207 , 23593,24 , 23402,48 , 23450,207 , 23657,24 , 14747,28 , 14775,64 , 14839,14 , 14747,28 , 14775,64 , 14839,14 , 400,2 , 408,2 }, // Embu/Kenya
- { 190, 225, 46, 44, 59, 37, 48, 45, 43, 101, 550,6 , 35,18 , 18,7 , 25,12 , 23617,36 , 23653,58 , 23711,24 , 23681,36 , 23717,58 , 23775,24 , 14853,28 , 14881,49 , 14930,14 , 14853,28 , 14881,49 , 14930,14 , 402,3 , 410,6 }, // Cherokee/UnitedStates
- { 191, 137, 46, 160, 59, 37, 48, 45, 43, 101, 356,8 , 99,16 , 37,5 , 8,10 , 23735,47 , 23782,68 , 23850,24 , 23799,47 , 23846,68 , 23914,24 , 14944,27 , 14971,48 , 15019,14 , 14944,27 , 14971,48 , 15019,14 , 0,2 , 0,2 }, // Morisyen/Mauritius
- { 192, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 23874,264 , 134,24 , 13417,48 , 23938,264 , 320,24 , 15033,28 , 15061,133 , 14130,14 , 15033,28 , 15061,133 , 14130,14 , 405,4 , 416,5 }, // Makonde/Tanzania
- { 193, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 24138,83 , 24221,111 , 24332,24 , 24202,83 , 24285,111 , 24396,24 , 15194,36 , 15230,63 , 15293,14 , 15194,36 , 15230,63 , 15293,14 , 409,3 , 421,3 }, // Langi/Tanzania
- { 194, 221, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 24356,48 , 24404,97 , 134,24 , 24420,48 , 24468,97 , 320,24 , 15307,28 , 15335,66 , 15401,14 , 15307,28 , 15335,66 , 15401,14 , 0,2 , 0,2 }, // Ganda/Uganda
- { 195, 239, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 24501,48 , 24549,83 , 24632,24 , 24565,48 , 24613,83 , 24696,24 , 15415,80 , 15415,80 , 798,14 , 15415,80 , 15415,80 , 798,14 , 412,8 , 424,7 }, // Bemba/Zambia
- { 196, 39, 44, 46, 59, 37, 48, 45, 43, 101, 356,8 , 909,27 , 37,5 , 8,10 , 24656,48 , 24704,86 , 134,24 , 24720,48 , 24768,86 , 320,24 , 15495,28 , 15523,73 , 15596,14 , 15495,28 , 15523,73 , 15596,14 , 122,2 , 121,2 }, // Kabuverdianu/CapeVerde
- { 197, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 24790,48 , 24838,86 , 24924,24 , 24854,48 , 24902,86 , 24988,24 , 15610,28 , 15638,51 , 15689,14 , 15610,28 , 15638,51 , 15689,14 , 420,2 , 431,2 }, // Meru/Kenya
- { 198, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 24948,48 , 24996,111 , 25107,24 , 25012,48 , 25060,111 , 25171,24 , 15703,28 , 15731,93 , 15824,14 , 15703,28 , 15731,93 , 15824,14 , 422,4 , 433,4 }, // Kalenjin/Kenya
- { 199, 148, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 0,48 , 25131,136 , 134,24 , 0,48 , 25195,136 , 320,24 , 15838,23 , 15861,92 , 15953,14 , 15838,23 , 15861,92 , 15953,14 , 426,7 , 437,5 }, // Nama/Namibia
- { 200, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 23088,87 , 134,24 , 13417,48 , 23152,87 , 320,24 , 14557,28 , 14585,62 , 14647,14 , 14557,28 , 14585,62 , 14647,14 , 395,5 , 399,9 }, // Machame/Tanzania
- { 201, 82, 44, 160, 59, 37, 48, 8722, 43, 101, 1447,10 , 1457,23 , 37,5 , 8,10 , 25267,59 , 25326,87 , 134,24 , 25331,59 , 25390,87 , 320,24 , 15967,28 , 15995,72 , 3089,14 , 15967,28 , 15995,72 , 3089,14 , 0,2 , 0,2 }, // Colognian/Germany
- { 202, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 25413,51 , 25464,132 , 1483,27 , 25477,51 , 25528,132 , 134,27 , 14557,28 , 16067,58 , 14130,14 , 14557,28 , 16067,58 , 14130,14 , 433,9 , 442,6 }, // Masai/Kenya
- { 202, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 25413,51 , 25464,132 , 1483,27 , 25477,51 , 25528,132 , 134,27 , 14557,28 , 16067,58 , 14130,14 , 14557,28 , 16067,58 , 14130,14 , 433,9 , 442,6 }, // Masai/Tanzania
- { 203, 221, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 24356,48 , 24404,97 , 134,24 , 24420,48 , 24468,97 , 320,24 , 16125,35 , 16160,65 , 16225,14 , 16125,35 , 16160,65 , 16225,14 , 442,6 , 448,6 }, // Soga/Uganda
- { 204, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 25596,48 , 13314,84 , 134,24 , 25660,48 , 13465,84 , 320,24 , 16239,21 , 16260,75 , 85,14 , 16239,21 , 16260,75 , 85,14 , 49,4 , 49,4 }, // Luyia/Kenya
- { 205, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 25644,48 , 13314,84 , 134,24 , 25708,48 , 13465,84 , 320,24 , 16335,28 , 8627,60 , 14647,14 , 16335,28 , 8627,60 , 14647,14 , 448,9 , 454,8 }, // Asu/Tanzania
- { 206, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 25692,48 , 25740,94 , 25834,24 , 25756,48 , 25804,94 , 25898,24 , 16363,28 , 16391,69 , 16460,14 , 16363,28 , 16391,69 , 16460,14 , 457,9 , 462,6 }, // Teso/Kenya
- { 206, 221, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 25692,48 , 25740,94 , 25834,24 , 25756,48 , 25804,94 , 25898,24 , 16363,28 , 16391,69 , 16460,14 , 16363,28 , 16391,69 , 16460,14 , 457,9 , 462,6 }, // Teso/Uganda
+ { 156, 157, 46, 44, 59, 37, 48, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 18041,59 , 18100,129 , 1483,27 , 18153,59 , 18212,129 , 134,27 , 11541,35 , 11576,87 , 798,14 , 11541,35 , 11576,87 , 798,14 , 0,2 , 0,2 }, // Atsam/Nigeria
+ { 157, 67, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 1352,21 , 18,7 , 25,12 , 926,46 , 972,62 , 1034,24 , 953,46 , 999,62 , 1061,24 , 11663,27 , 11690,41 , 11731,14 , 11663,27 , 11690,41 , 11731,14 , 0,2 , 0,2 }, // Tigre/Eritrea
+ { 158, 157, 46, 44, 59, 37, 48, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 18229,57 , 18286,178 , 1483,27 , 18341,57 , 18398,178 , 134,27 , 11745,28 , 11773,44 , 798,14 , 11745,28 , 11773,44 , 798,14 , 0,2 , 0,2 }, // Jju/Nigeria
+ { 159, 106, 44, 46, 59, 37, 48, 45, 43, 101, 27,8 , 1373,27 , 37,5 , 8,10 , 18464,48 , 18512,77 , 18589,24 , 18576,48 , 18624,77 , 18701,24 , 11817,28 , 11845,50 , 2799,14 , 11817,28 , 11845,50 , 2799,14 , 0,2 , 0,2 }, // Friulian/Italy
+ { 160, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 18613,48 , 18661,111 , 1483,27 , 18725,48 , 18773,111 , 134,27 , 11895,27 , 11922,70 , 798,14 , 11895,27 , 11922,70 , 798,14 , 0,2 , 0,2 }, // Venda/SouthAfrica
+ { 161, 83, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 18772,48 , 18820,87 , 18907,24 , 18884,48 , 18932,87 , 19019,24 , 11992,32 , 12024,44 , 12068,14 , 11992,32 , 12024,44 , 12068,14 , 321,2 , 321,2 }, // Ewe/Ghana
+ { 161, 212, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 18772,48 , 18820,87 , 18907,24 , 18884,48 , 18932,87 , 19019,24 , 11992,32 , 12024,44 , 12068,14 , 11992,32 , 12024,44 , 12068,14 , 321,2 , 321,2 }, // Ewe/Togo
+ { 162, 69, 46, 8217, 59, 37, 48, 45, 43, 101, 27,8 , 1400,22 , 18,7 , 25,12 , 926,46 , 972,62 , 1034,24 , 953,46 , 999,62 , 1061,24 , 12082,27 , 12082,27 , 12109,14 , 12082,27 , 12082,27 , 12109,14 , 0,2 , 0,2 }, // Walamo/Ethiopia
+ { 163, 225, 46, 44, 59, 37, 48, 45, 43, 101, 279,6 , 10,17 , 18,7 , 25,12 , 18931,59 , 18990,95 , 1483,27 , 19043,59 , 19102,95 , 134,27 , 12123,21 , 12144,57 , 798,14 , 12123,21 , 12144,57 , 798,14 , 0,2 , 0,2 }, // Hawaiian/UnitedStates
+ { 164, 157, 46, 44, 59, 37, 48, 45, 43, 101, 221,8 , 314,18 , 37,5 , 8,10 , 19085,48 , 19133,153 , 1483,27 , 19197,48 , 19245,153 , 134,27 , 12201,28 , 12229,42 , 798,14 , 12201,28 , 12229,42 , 798,14 , 0,2 , 0,2 }, // Tyap/Nigeria
+ { 165, 129, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 19286,48 , 19334,91 , 1483,27 , 19398,48 , 19446,91 , 134,27 , 12271,28 , 12299,67 , 798,14 , 12271,28 , 12299,67 , 798,14 , 0,2 , 0,2 }, // Chewa/Malawi
+ { 166, 170, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 1422,18 , 37,5 , 8,10 , 19425,48 , 19473,88 , 19561,24 , 19537,48 , 19585,88 , 19673,24 , 12366,28 , 12394,55 , 12449,14 , 12463,28 , 12394,55 , 12449,14 , 0,2 , 0,2 }, // Filipino/Philippines
+ { 167, 206, 46, 8217, 59, 37, 48, 8722, 43, 101, 332,8 , 502,18 , 37,5 , 8,10 , 19585,48 , 19633,86 , 134,24 , 4729,48 , 19697,86 , 320,24 , 12491,28 , 12519,63 , 3089,14 , 12491,28 , 12519,63 , 3089,14 , 87,5 , 339,4 }, // Swiss German/Switzerland
+ { 168, 44, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 1483,27 , 19719,38 , 1483,27 , 134,27 , 19783,38 , 134,27 , 12582,21 , 12603,28 , 12631,14 , 12582,21 , 12603,28 , 12631,14 , 341,2 , 343,2 }, // Sichuan Yi/China
+ { 169, 91, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Kpelle/Guinea
+ { 169, 121, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Kpelle/Liberia
+ { 170, 82, 44, 46, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 1483,27 , 1483,27 , 1483,27 , 134,27 , 134,27 , 134,27 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 798,14 , 0,2 , 0,2 }, // Low German/Germany
+ { 171, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 19757,48 , 19805,100 , 1483,27 , 19821,48 , 19869,100 , 134,27 , 12645,27 , 12672,66 , 798,14 , 12645,27 , 12672,66 , 798,14 , 0,2 , 0,2 }, // South Ndebele/SouthAfrica
+ { 172, 195, 44, 160, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 19905,48 , 19953,94 , 1483,27 , 19969,48 , 20017,94 , 134,27 , 12738,27 , 12765,63 , 798,14 , 12738,27 , 12765,63 , 798,14 , 0,2 , 0,2 }, // Northern Sotho/SouthAfrica
+ { 173, 73, 44, 160, 59, 37, 48, 8722, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 20047,85 , 20132,145 , 20277,24 , 20111,85 , 20196,145 , 20341,24 , 12828,33 , 12861,65 , 12926,14 , 12828,33 , 12861,65 , 12926,14 , 0,2 , 0,2 }, // Northern Sami/Finland
+ { 173, 161, 44, 160, 59, 37, 48, 8722, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 20301,59 , 20132,145 , 20277,24 , 20365,59 , 20196,145 , 20341,24 , 12828,33 , 12940,75 , 13015,14 , 12828,33 , 12940,75 , 13015,14 , 0,2 , 0,2 }, // Northern Sami/Norway
+ { 174, 208, 46, 44, 59, 37, 48, 45, 43, 101, 72,10 , 314,18 , 37,5 , 8,10 , 20360,48 , 20408,142 , 20550,24 , 20424,48 , 20472,142 , 20614,24 , 13029,28 , 13057,172 , 13229,14 , 13029,28 , 13057,172 , 13229,14 , 0,2 , 0,2 }, // Taroko/Taiwan
+ { 175, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 20574,48 , 20622,88 , 20710,24 , 20638,48 , 20686,88 , 20774,24 , 13243,28 , 13271,62 , 13333,14 , 13243,28 , 13271,62 , 13333,14 , 343,5 , 345,10 }, // Gusii/Kenya
+ { 176, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 20734,48 , 20782,221 , 21003,24 , 20798,48 , 20846,221 , 21067,24 , 13347,28 , 13375,106 , 13481,14 , 13347,28 , 13375,106 , 13481,14 , 348,10 , 355,10 }, // Taita/Kenya
+ { 177, 187, 44, 160, 59, 37, 48, 45, 43, 101, 364,8 , 99,16 , 37,5 , 8,10 , 21027,48 , 21075,77 , 21152,24 , 21091,48 , 21139,77 , 21216,24 , 13495,28 , 13523,59 , 13582,14 , 13495,28 , 13523,59 , 13582,14 , 358,6 , 365,7 }, // Fulah/Senegal
+ { 178, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 21176,48 , 21224,185 , 21409,24 , 21240,48 , 21288,185 , 21473,24 , 13596,28 , 13624,63 , 13687,14 , 13596,28 , 13624,63 , 13687,14 , 364,6 , 372,8 }, // Kikuyu/Kenya
+ { 179, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 21433,48 , 21481,173 , 21654,24 , 21497,48 , 21545,173 , 21718,24 , 13701,28 , 13729,105 , 13834,14 , 13701,28 , 13729,105 , 13834,14 , 370,7 , 380,5 }, // Samburu/Kenya
+ { 180, 146, 44, 46, 59, 37, 48, 45, 43, 101, 364,8 , 902,27 , 37,5 , 8,10 , 21678,48 , 21726,88 , 134,24 , 21742,48 , 21790,88 , 320,24 , 13848,28 , 13876,55 , 13931,14 , 13848,28 , 13876,55 , 13931,14 , 0,2 , 0,2 }, // Sena/Mozambique
+ { 181, 240, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 21814,48 , 21862,112 , 21974,24 , 21878,48 , 21926,112 , 22038,24 , 13945,28 , 13973,50 , 14023,14 , 13945,28 , 13973,50 , 14023,14 , 0,2 , 0,2 }, // North Ndebele/Zimbabwe
+ { 182, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 21998,39 , 22037,194 , 22231,24 , 22062,39 , 22101,194 , 22295,24 , 14037,28 , 14065,65 , 14130,14 , 14037,28 , 14065,65 , 14130,14 , 377,8 , 385,7 }, // Rombo/Tanzania
+ { 183, 145, 44, 160, 59, 37, 48, 45, 43, 101, 364,8 , 99,16 , 37,5 , 8,10 , 22255,48 , 22303,81 , 22384,24 , 22319,48 , 22367,81 , 22448,24 , 14144,30 , 14174,48 , 798,14 , 14144,30 , 14174,48 , 798,14 , 385,6 , 392,8 }, // Tachelhit/Morocco
+ { 184, 3, 44, 160, 59, 37, 48, 45, 43, 101, 364,8 , 99,16 , 37,5 , 8,10 , 22408,48 , 22456,84 , 22540,24 , 22472,48 , 22520,84 , 22604,24 , 14222,30 , 14252,51 , 14303,14 , 14222,30 , 14252,51 , 14303,14 , 391,7 , 400,9 }, // Kabyle/Algeria
+ { 185, 221, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 22564,48 , 22612,152 , 134,24 , 22628,48 , 22676,152 , 320,24 , 14317,28 , 14345,74 , 14419,14 , 14317,28 , 14345,74 , 14419,14 , 0,2 , 0,2 }, // Nyankole/Uganda
+ { 186, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 22764,48 , 22812,254 , 23066,24 , 22828,48 , 22876,254 , 23130,24 , 14433,28 , 14461,82 , 14543,14 , 14433,28 , 14461,82 , 14543,14 , 398,7 , 409,7 }, // Bena/Tanzania
+ { 187, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 23090,87 , 134,24 , 13417,48 , 23154,87 , 320,24 , 14557,28 , 14585,62 , 14647,14 , 14557,28 , 14585,62 , 14647,14 , 405,5 , 416,9 }, // Vunjo/Tanzania
+ { 188, 132, 46, 44, 59, 37, 48, 45, 43, 101, 364,8 , 99,16 , 37,5 , 8,10 , 23177,47 , 23224,92 , 23316,24 , 23241,47 , 23288,92 , 23380,24 , 14661,28 , 14689,44 , 14733,14 , 14661,28 , 14689,44 , 14733,14 , 0,2 , 0,2 }, // Bambara/Mali
+ { 189, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 23340,48 , 23388,207 , 23595,24 , 23404,48 , 23452,207 , 23659,24 , 14747,28 , 14775,64 , 14839,14 , 14747,28 , 14775,64 , 14839,14 , 410,2 , 425,2 }, // Embu/Kenya
+ { 190, 225, 46, 44, 59, 37, 48, 45, 43, 101, 558,6 , 35,18 , 18,7 , 25,12 , 23619,36 , 23655,58 , 23713,24 , 23683,36 , 23719,58 , 23777,24 , 14853,28 , 14881,49 , 14930,14 , 14853,28 , 14881,49 , 14930,14 , 412,3 , 427,6 }, // Cherokee/UnitedStates
+ { 191, 137, 46, 160, 59, 37, 48, 45, 43, 101, 364,8 , 99,16 , 37,5 , 8,10 , 23737,47 , 23784,68 , 23852,24 , 23801,47 , 23848,68 , 23916,24 , 14944,27 , 14971,48 , 15019,14 , 14944,27 , 14971,48 , 15019,14 , 0,2 , 0,2 }, // Morisyen/Mauritius
+ { 192, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 23876,264 , 134,24 , 13417,48 , 23940,264 , 320,24 , 15033,28 , 15061,133 , 14130,14 , 15033,28 , 15061,133 , 14130,14 , 415,4 , 433,5 }, // Makonde/Tanzania
+ { 193, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 24140,83 , 24223,111 , 24334,24 , 24204,83 , 24287,111 , 24398,24 , 15194,36 , 15230,63 , 15293,14 , 15194,36 , 15230,63 , 15293,14 , 419,3 , 438,3 }, // Langi/Tanzania
+ { 194, 221, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 24358,48 , 24406,97 , 134,24 , 24422,48 , 24470,97 , 320,24 , 15307,28 , 15335,66 , 15401,14 , 15307,28 , 15335,66 , 15401,14 , 0,2 , 0,2 }, // Ganda/Uganda
+ { 195, 239, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 24503,48 , 24551,83 , 24634,24 , 24567,48 , 24615,83 , 24698,24 , 15415,80 , 15415,80 , 798,14 , 15415,80 , 15415,80 , 798,14 , 422,8 , 441,7 }, // Bemba/Zambia
+ { 196, 39, 44, 46, 59, 37, 48, 45, 43, 101, 364,8 , 902,27 , 37,5 , 8,10 , 24658,48 , 24706,86 , 134,24 , 24722,48 , 24770,86 , 320,24 , 15495,28 , 15523,73 , 15596,14 , 15495,28 , 15523,73 , 15596,14 , 136,2 , 136,2 }, // Kabuverdianu/CapeVerde
+ { 197, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 24792,48 , 24840,86 , 24926,24 , 24856,48 , 24904,86 , 24990,24 , 15610,28 , 15638,51 , 15689,14 , 15610,28 , 15638,51 , 15689,14 , 430,2 , 448,2 }, // Meru/Kenya
+ { 198, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 24950,48 , 24998,111 , 25109,24 , 25014,48 , 25062,111 , 25173,24 , 15703,28 , 15731,93 , 15824,14 , 15703,28 , 15731,93 , 15824,14 , 432,4 , 450,4 }, // Kalenjin/Kenya
+ { 199, 148, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 0,48 , 25133,136 , 134,24 , 0,48 , 25197,136 , 320,24 , 15838,23 , 15861,92 , 15953,14 , 15838,23 , 15861,92 , 15953,14 , 436,7 , 454,5 }, // Nama/Namibia
+ { 200, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 23090,87 , 134,24 , 13417,48 , 23154,87 , 320,24 , 14557,28 , 14585,62 , 14647,14 , 14557,28 , 14585,62 , 14647,14 , 405,5 , 416,9 }, // Machame/Tanzania
+ { 201, 82, 44, 160, 59, 37, 48, 8722, 43, 101, 1440,10 , 1450,23 , 37,5 , 8,10 , 25269,59 , 25328,87 , 134,24 , 25333,59 , 25392,87 , 320,24 , 15967,28 , 15995,72 , 3089,14 , 15967,28 , 15995,72 , 3089,14 , 0,2 , 0,2 }, // Colognian/Germany
+ { 202, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 25415,51 , 25466,132 , 1483,27 , 25479,51 , 25530,132 , 134,27 , 14557,28 , 16067,58 , 14130,14 , 14557,28 , 16067,58 , 14130,14 , 443,9 , 459,6 }, // Masai/Kenya
+ { 202, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 25415,51 , 25466,132 , 1483,27 , 25479,51 , 25530,132 , 134,27 , 14557,28 , 16067,58 , 14130,14 , 14557,28 , 16067,58 , 14130,14 , 443,9 , 459,6 }, // Masai/Tanzania
+ { 203, 221, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 24358,48 , 24406,97 , 134,24 , 24422,48 , 24470,97 , 320,24 , 16125,35 , 16160,65 , 16225,14 , 16125,35 , 16160,65 , 16225,14 , 452,6 , 465,6 }, // Soga/Uganda
+ { 204, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 25598,48 , 13314,84 , 134,24 , 25662,48 , 13465,84 , 320,24 , 16239,21 , 16260,75 , 85,14 , 16239,21 , 16260,75 , 85,14 , 56,4 , 56,4 }, // Luyia/Kenya
+ { 205, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 25646,48 , 13314,84 , 134,24 , 25710,48 , 13465,84 , 320,24 , 16335,28 , 8627,60 , 14647,14 , 16335,28 , 8627,60 , 14647,14 , 458,9 , 471,8 }, // Asu/Tanzania
+ { 206, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 25694,48 , 25742,94 , 25836,24 , 25758,48 , 25806,94 , 25900,24 , 16363,28 , 16391,69 , 16460,14 , 16363,28 , 16391,69 , 16460,14 , 467,9 , 479,6 }, // Teso/Kenya
+ { 206, 221, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 25694,48 , 25742,94 , 25836,24 , 25758,48 , 25806,94 , 25900,24 , 16363,28 , 16391,69 , 16460,14 , 16363,28 , 16391,69 , 16460,14 , 467,9 , 479,6 }, // Teso/Uganda
{ 207, 67, 46, 44, 59, 37, 48, 45, 43, 101, 27,8 , 53,19 , 18,7 , 25,12 , 317,48 , 518,118 , 494,24 , 344,48 , 545,118 , 521,24 , 16474,28 , 16502,56 , 16558,14 , 16474,28 , 16502,56 , 16558,14 , 0,2 , 0,2 }, // Saho/Eritrea
- { 208, 132, 46, 160, 59, 37, 48, 45, 43, 101, 356,8 , 99,16 , 37,5 , 8,10 , 25858,46 , 25904,88 , 25992,24 , 25922,46 , 25968,88 , 26056,24 , 16572,28 , 16600,53 , 16653,14 , 16572,28 , 16600,53 , 16653,14 , 466,6 , 468,6 }, // Koyra Chiini/Mali
- { 209, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 23088,87 , 134,24 , 13417,48 , 23152,87 , 320,24 , 14557,28 , 14585,62 , 14647,14 , 14557,28 , 14585,62 , 14647,14 , 395,5 , 399,9 }, // Rwa/Tanzania
- { 210, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 26016,48 , 26064,186 , 26250,24 , 26080,48 , 26128,186 , 26314,24 , 16667,28 , 16695,69 , 16764,14 , 16667,28 , 16695,69 , 16764,14 , 472,2 , 474,2 }, // Luo/Kenya
- { 211, 221, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 22562,48 , 22610,152 , 134,24 , 22626,48 , 22674,152 , 320,24 , 14317,28 , 14345,74 , 14419,14 , 14317,28 , 14345,74 , 14419,14 , 0,2 , 0,2 }, // Chiga/Uganda
- { 212, 145, 44, 160, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 26274,48 , 26322,86 , 26408,24 , 26338,48 , 26386,86 , 26472,24 , 16778,28 , 16806,48 , 16854,14 , 16778,28 , 16806,48 , 16854,14 , 474,9 , 476,10 }, // Central Morocco Tamazight/Morocco
- { 213, 132, 46, 160, 59, 37, 48, 45, 43, 101, 356,8 , 99,16 , 37,5 , 8,10 , 25858,46 , 25904,88 , 25992,24 , 25922,46 , 25968,88 , 26056,24 , 16868,28 , 16896,54 , 16653,14 , 16868,28 , 16896,54 , 16653,14 , 466,6 , 468,6 }, // Koyraboro Senni/Mali
- { 214, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 26432,84 , 134,24 , 13417,48 , 26496,84 , 320,24 , 16950,28 , 16978,63 , 8687,14 , 16950,28 , 16978,63 , 8687,14 , 483,5 , 486,8 }, // Shambala/Tanzania
+ { 208, 132, 46, 160, 59, 37, 48, 45, 43, 101, 364,8 , 99,16 , 37,5 , 8,10 , 25860,46 , 25906,88 , 25994,24 , 25924,46 , 25970,88 , 26058,24 , 16572,28 , 16600,53 , 16653,14 , 16572,28 , 16600,53 , 16653,14 , 476,6 , 485,6 }, // Koyra Chiini/Mali
+ { 209, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 23090,87 , 134,24 , 13417,48 , 23154,87 , 320,24 , 14557,28 , 14585,62 , 14647,14 , 14557,28 , 14585,62 , 14647,14 , 405,5 , 416,9 }, // Rwa/Tanzania
+ { 210, 111, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 26018,48 , 26066,186 , 26252,24 , 26082,48 , 26130,186 , 26316,24 , 16667,28 , 16695,69 , 16764,14 , 16667,28 , 16695,69 , 16764,14 , 482,2 , 491,2 }, // Luo/Kenya
+ { 211, 221, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 22564,48 , 22612,152 , 134,24 , 22628,48 , 22676,152 , 320,24 , 14317,28 , 14345,74 , 14419,14 , 14317,28 , 14345,74 , 14419,14 , 0,2 , 0,2 }, // Chiga/Uganda
+ { 212, 145, 44, 160, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 26276,48 , 26324,86 , 26410,24 , 26340,48 , 26388,86 , 26474,24 , 16778,28 , 16806,48 , 16854,14 , 16778,28 , 16806,48 , 16854,14 , 484,9 , 493,10 }, // Central Morocco Tamazight/Morocco
+ { 213, 132, 46, 160, 59, 37, 48, 45, 43, 101, 364,8 , 99,16 , 37,5 , 8,10 , 25860,46 , 25906,88 , 25994,24 , 25924,46 , 25970,88 , 26058,24 , 16868,28 , 16896,54 , 16653,14 , 16868,28 , 16896,54 , 16653,14 , 476,6 , 485,6 }, // Koyraboro Senni/Mali
+ { 214, 210, 46, 44, 59, 37, 48, 45, 43, 101, 141,10 , 10,17 , 18,7 , 25,12 , 13266,48 , 26434,84 , 134,24 , 13417,48 , 26498,84 , 320,24 , 16950,28 , 16978,63 , 8687,14 , 16950,28 , 16978,63 , 8687,14 , 493,5 , 503,8 }, // Shambala/Tanzania
{ 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 } // trailing 0s
};
@@ -639,73 +640,72 @@ static const ushort date_format_data[] = {
0x64, 0x64, 0x64, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2d, 0x4d, 0x4d,
0x2d, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79,
0x79, 0x64, 0x64, 0x2f, 0x4d, 0x4d, 0x2f, 0x79, 0x79, 0x79, 0x79, 0x64, 0x200f, 0x2f, 0x4d, 0x200f, 0x2f, 0x79, 0x79, 0x79,
-0x79, 0x64, 0x64, 0x64, 0x64, 0x60c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x60c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x4d,
-0x4d, 0x2f, 0x64, 0x64, 0x2f, 0x79, 0x79, 0x64, 0x2d, 0x4d, 0x2d, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c,
-0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2f, 0x4d, 0x4d, 0x2f, 0x64,
-0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79,
-0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x27, 0x65, 0x6b, 0x6f, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d,
-0x27, 0x72, 0x65, 0x6e, 0x27, 0x20, 0x64, 0x64, 0x27, 0x61, 0x27, 0x64, 0x2f, 0x4d, 0x2f, 0x79, 0x79, 0xf66, 0xfa4, 0xfb1,
-0xf72, 0xf0b, 0xf63, 0xf7c, 0xf0b, 0x79, 0x79, 0x79, 0x79, 0x20, 0xf5f, 0xfb3, 0xf0b, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0xf5a,
-0xf7a, 0xf66, 0xf0b, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x4d, 0x4d, 0x4d,
-0x4d, 0x20, 0x64, 0x64, 0x64, 0x64, 0x2e, 0x4d, 0x4d, 0x2e, 0x79, 0x79, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20,
-0x79, 0x79, 0x79, 0x79, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2e, 0x4d, 0x2e, 0x79, 0x79, 0x64, 0x2f, 0x4d, 0x2f,
-0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x1790, 0x17d2, 0x1784, 0x17c3, 0x20, 0x64, 0x20, 0x1781, 0x17c2, 0x20, 0x4d,
-0x4d, 0x4d, 0x4d, 0x20, 0x1786, 0x17d2, 0x1793, 0x17b6, 0x17c6, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64,
-0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2d, 0x4d, 0x2d,
-0x64, 0x79, 0x79, 0x79, 0x79, 0x5e74, 0x4d, 0x6708, 0x64, 0x65e5, 0x64, 0x64, 0x64, 0x64, 0x79, 0x79, 0x5e74, 0x4d, 0x6708, 0x64,
-0x65e5, 0x79, 0x79, 0x79, 0x79, 0x5e74, 0x4d, 0x4d, 0x6708, 0x64, 0x64, 0x65e5, 0x64, 0x64, 0x64, 0x64, 0x79, 0x79, 0x2f, 0x4d,
-0x2f, 0x64, 0x64, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x2e, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c,
-0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20,
-0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x27, 0x64, 0x65,
-0x6e, 0x27, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x2d, 0x4d, 0x4d,
-0x2d, 0x79, 0x79, 0x64, 0x2f, 0x4d, 0x4d, 0x2f, 0x79, 0x79, 0x4d, 0x2f, 0x64, 0x2f, 0x79, 0x79, 0x64, 0x64, 0x20, 0x4d,
-0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c,
-0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2f, 0x4d, 0x4d, 0x2f, 0x64, 0x64, 0x64, 0x2e, 0x4d, 0x2e, 0x79,
-0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79,
-0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64,
-0x2d, 0x4d, 0x4d, 0x2d, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x5d1, 0x4d, 0x4d, 0x4d, 0x4d, 0x20,
-0x79, 0x79, 0x79, 0x79, 0x64, 0x2d, 0x4d, 0x2d, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x4d, 0x4d, 0x2e, 0x64, 0x64,
-0x2e, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x2e, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64,
-0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x436,
-0x27, 0x2e, 0x79, 0x79, 0x2e, 0x20, 0x4d, 0x2e, 0x20, 0x64, 0x2e, 0x79, 0x79, 0x79, 0x79, 0xb144, 0x20, 0x4d, 0xc6d4, 0x20,
-0x64, 0xc77c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0xe97, 0xeb5, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d,
-0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x20, 0x27, 0x67, 0x61,
-0x64, 0x61, 0x27, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x6d, 0x27, 0x2e,
-0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x20, 0x27, 0x64, 0x27, 0x2e, 0x2c, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2e,
-0x4d, 0x2e, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79,
-0x79, 0x79, 0x79, 0x79, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64,
-0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x27, 0x74, 0x61, 0x27, 0x2019, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79,
-0x79, 0x79, 0x79, 0x79, 0x79, 0x2f, 0x4d, 0x2f, 0x64, 0x64, 0x64, 0x64, 0x64, 0x20, 0x62f, 0x20, 0x79, 0x79, 0x79, 0x79,
-0x20, 0x62f, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x27, 0x64, 0x65,
-0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x2e, 0x4d,
-0x4d, 0x2e, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79,
-0x79, 0x79, 0x79, 0xa0, 0x27, 0x433, 0x27, 0x2e, 0x64, 0x2e, 0x4d, 0x2e, 0x79, 0x79, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c,
-0x20, 0x64, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c,
-0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x2e, 0x20, 0x79,
-0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64,
-0x65, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x64, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20,
-0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x27, 0x65,
-0x6e, 0x27, 0x20, 0x27, 0x64, 0x65, 0x6e, 0x27, 0x20, 0x64, 0x3a, 0x27, 0x65, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20,
-0x79, 0x79, 0x79, 0x79, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0xe17,
-0xe35, 0xe48, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x1361, 0x20,
-0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x1218, 0x12d3, 0x120d, 0x1272, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64,
-0x64, 0x1363, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x1218, 0x12d3, 0x120d, 0x1272, 0x20, 0x79, 0x79, 0x79, 0x79,
-0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64,
-0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x440, 0x27, 0x2e, 0x64,
-0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79,
-0x79, 0x20, 0x646, 0x686, 0x6cc, 0x20, 0x6cc, 0x6cc, 0x644, 0x20, 0x64, 0x20, 0x646, 0x686, 0x6cc, 0x20, 0x4d, 0x4d, 0x4d, 0x4d,
-0x20, 0x64, 0x64, 0x64, 0x64, 0x20, 0x6a9, 0x648, 0x646, 0x6cc, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x27, 0x6e, 0x67, 0xe0,
-0x79, 0x27, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x6e, 0x103, 0x6d, 0x27, 0x20, 0x79, 0x79, 0x79,
-0x79, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x1361, 0x20,
-0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x130d, 0x122d, 0x130b, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64,
-0x1365, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x1218, 0x12d3, 0x120d, 0x1275, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64,
-0x64, 0x64, 0x64, 0x1361, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x12ee, 0x121d, 0x20, 0x79, 0x79, 0x79, 0x79,
-0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x20, 0x27, 0x64, 0x69, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64, 0x61,
-0x6c, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x1365, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d,
-0x20, 0x130b, 0x120b, 0x1233, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20,
-0x64, 0x64, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2e, 0x20, 0x4d, 0x2e, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64,
-0x64, 0x2c, 0x20, 0x27, 0x64, 0xe4, 0x27, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79,
-
+0x79, 0x64, 0x64, 0x64, 0x64, 0x60c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x60c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79,
+0x79, 0x79, 0x79, 0x2f, 0x4d, 0x2f, 0x64, 0x4d, 0x4d, 0x2f, 0x64, 0x64, 0x2f, 0x79, 0x79, 0x64, 0x2d, 0x4d, 0x2d, 0x79,
+0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79,
+0x79, 0x79, 0x79, 0x2f, 0x4d, 0x4d, 0x2f, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x2c, 0x20, 0x4d, 0x4d,
+0x4d, 0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x27, 0x65,
+0x6b, 0x6f, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x27, 0x72, 0x65, 0x6e, 0x27, 0x20, 0x64, 0x64, 0x27, 0x61, 0x27, 0x64,
+0x2f, 0x4d, 0x2f, 0x79, 0x79, 0xf66, 0xfa4, 0xfb1, 0xf72, 0xf0b, 0xf63, 0xf7c, 0xf0b, 0x79, 0x79, 0x79, 0x79, 0x20, 0xf5f, 0xfb3,
+0xf0b, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0xf5a, 0xf7a, 0xf66, 0xf0b, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20,
+0x79, 0x79, 0x79, 0x79, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x64, 0x64, 0x2e, 0x4d, 0x4d, 0x2e, 0x79, 0x79,
+0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2e,
+0x4d, 0x2e, 0x79, 0x79, 0x64, 0x2f, 0x4d, 0x2f, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x1790, 0x17d2, 0x1784,
+0x17c3, 0x20, 0x64, 0x20, 0x1781, 0x17c2, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x1786, 0x17d2, 0x1793, 0x17b6, 0x17c6, 0x20, 0x79, 0x79,
+0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x79,
+0x79, 0x79, 0x79, 0x79, 0x79, 0x2d, 0x4d, 0x2d, 0x64, 0x79, 0x79, 0x79, 0x79, 0x5e74, 0x4d, 0x6708, 0x64, 0x65e5, 0x64, 0x64,
+0x64, 0x64, 0x79, 0x79, 0x5e74, 0x4d, 0x6708, 0x64, 0x65e5, 0x79, 0x79, 0x79, 0x79, 0x5e74, 0x4d, 0x4d, 0x6708, 0x64, 0x64, 0x65e5,
+0x64, 0x64, 0x64, 0x64, 0x79, 0x79, 0x2f, 0x4d, 0x2f, 0x64, 0x64, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x2e, 0x20, 0x79, 0x79,
+0x79, 0x79, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79,
+0x79, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79,
+0x64, 0x64, 0x64, 0x64, 0x20, 0x27, 0x64, 0x65, 0x6e, 0x27, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79,
+0x79, 0x79, 0x79, 0x64, 0x64, 0x2d, 0x4d, 0x4d, 0x2d, 0x79, 0x79, 0x64, 0x2f, 0x4d, 0x4d, 0x2f, 0x79, 0x79, 0x4d, 0x2f,
+0x64, 0x2f, 0x79, 0x79, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79,
+0x2f, 0x4d, 0x4d, 0x2f, 0x64, 0x64, 0x64, 0x2e, 0x4d, 0x2e, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64,
+0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x2e,
+0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2d, 0x4d, 0x4d, 0x2d, 0x79, 0x79, 0x64, 0x64, 0x64,
+0x64, 0x2c, 0x20, 0x64, 0x20, 0x5d1, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x2d, 0x4d, 0x2d, 0x79,
+0x79, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x4d, 0x4d, 0x2e, 0x64, 0x64, 0x2e, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x20, 0x4d, 0x4d,
+0x4d, 0x4d, 0x20, 0x64, 0x2e, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d,
+0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x436, 0x27, 0x2e, 0x79, 0x79, 0x2e, 0x20, 0x4d, 0x2e, 0x20,
+0x64, 0x2e, 0x79, 0x79, 0x79, 0x79, 0xb144, 0x20, 0x4d, 0xc6d4, 0x20, 0x64, 0xc77c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64,
+0x64, 0x64, 0xe97, 0xeb5, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64,
+0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x20, 0x27, 0x67, 0x61, 0x64, 0x61, 0x27, 0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d,
+0x4d, 0x4d, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x6d, 0x27, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x20, 0x27,
+0x64, 0x27, 0x2e, 0x2c, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2e, 0x4d, 0x2e, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20,
+0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x2c, 0x20, 0x4d, 0x4d, 0x4d,
+0x4d, 0x20, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x27, 0x74, 0x61,
+0x27, 0x2019, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x62f, 0x20, 0x79,
+0x79, 0x79, 0x79, 0x20, 0x62f, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x64, 0x2d, 0x4d, 0x4d, 0x2d, 0x79, 0x79,
+0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20,
+0x27, 0x64, 0x65, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x2e, 0x4d, 0x4d, 0x2e, 0x79, 0x79, 0x79, 0x79, 0x64,
+0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0xa0, 0x27, 0x433, 0x27,
+0x2e, 0x64, 0x2e, 0x4d, 0x2e, 0x79, 0x79, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x64, 0x2e, 0x20, 0x4d, 0x4d,
+0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x4d,
+0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x2e, 0x20, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64,
+0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79,
+0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x64, 0x20, 0x27, 0x64, 0x65, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64,
+0x65, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x27, 0x65, 0x6e, 0x27, 0x20, 0x27, 0x64, 0x65, 0x6e,
+0x27, 0x20, 0x64, 0x3a, 0x27, 0x65, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x20, 0x4d,
+0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0xe17, 0xe35, 0xe48, 0x20, 0x64, 0x20, 0x4d, 0x4d,
+0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x1361, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d,
+0x20, 0x1218, 0x12d3, 0x120d, 0x1272, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x1363, 0x20, 0x64, 0x64, 0x20, 0x4d,
+0x4d, 0x4d, 0x4d, 0x20, 0x1218, 0x12d3, 0x120d, 0x1272, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d,
+0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x20, 0x4d, 0x4d,
+0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x20, 0x27, 0x440, 0x27, 0x2e, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x64, 0x2c,
+0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x79, 0x20, 0x646, 0x686, 0x6cc, 0x20, 0x6cc,
+0x6cc, 0x644, 0x20, 0x64, 0x20, 0x646, 0x686, 0x6cc, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x64, 0x64, 0x20, 0x6a9,
+0x648, 0x646, 0x6cc, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x27, 0x6e, 0x67, 0xe0, 0x79, 0x27, 0x20, 0x64, 0x64, 0x20, 0x4d,
+0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x6e, 0x103, 0x6d, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d,
+0x4d, 0x2c, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x1361, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d,
+0x20, 0x130d, 0x122d, 0x130b, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x1365, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d,
+0x4d, 0x4d, 0x20, 0x1218, 0x12d3, 0x120d, 0x1275, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x1361, 0x20, 0x64, 0x64,
+0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x12ee, 0x121d, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x20, 0x64, 0x20,
+0x27, 0x64, 0x69, 0x27, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x27, 0x64, 0x61, 0x6c, 0x27, 0x20, 0x79, 0x79, 0x79, 0x79,
+0x64, 0x64, 0x64, 0x64, 0x1365, 0x20, 0x64, 0x64, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x130b, 0x120b, 0x1233, 0x20, 0x79, 0x79,
+0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x64, 0x64, 0x20, 0x79, 0x79, 0x79, 0x79,
+0x64, 0x2e, 0x20, 0x4d, 0x2e, 0x20, 0x79, 0x79, 0x79, 0x79, 0x64, 0x64, 0x64, 0x64, 0x2c, 0x20, 0x27, 0x64, 0xe4, 0x27,
+0x20, 0x64, 0x2e, 0x20, 0x4d, 0x4d, 0x4d, 0x4d, 0x20, 0x79, 0x79, 0x79, 0x79
};
static const ushort time_format_data[] = {
@@ -1208,16 +1208,16 @@ static const ushort months_data[] = {
0x439, 0x3b, 0x413, 0x430, 0x445, 0x430, 0x439, 0x3b, 0x91c, 0x928, 0x3b, 0x92b, 0x947, 0x92c, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a,
0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x93f, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x941, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x93e, 0x3b, 0x905,
0x917, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x3b, 0x905, 0x915, 0x94d, 0x91f, 0x94b, 0x3b, 0x928, 0x94b, 0x92d, 0x947, 0x3b, 0x921,
-0x93f, 0x938, 0x947, 0x3b, 0x91c, 0x928, 0x935, 0x930, 0x940, 0x3b, 0x92b, 0x930, 0x935, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d,
-0x91a, 0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x947, 0x932, 0x3b, 0x92e, 0x908, 0x3b, 0x91c, 0x941, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x93e,
-0x908, 0x3b, 0x905, 0x917, 0x938, 0x94d, 0x924, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x905,
-0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928, 0x94b, 0x92d, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x926, 0x93f, 0x938, 0x92e,
-0x94d, 0x92c, 0x930, 0x3b, 0x967, 0x3b, 0x968, 0x3b, 0x969, 0x3b, 0x96a, 0x3b, 0x96b, 0x3b, 0x96c, 0x3b, 0x96d, 0x3b, 0x96e, 0x3b,
-0x96f, 0x3b, 0x967, 0x966, 0x3b, 0x967, 0x967, 0x3b, 0x967, 0x968, 0x3b, 0x91c, 0x928, 0x935, 0x930, 0x940, 0x3b, 0x92b, 0x947, 0x92c,
-0x94d, 0x930, 0x941, 0x905, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x93f, 0x932, 0x3b,
-0x92e, 0x947, 0x3b, 0x91c, 0x941, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x93e, 0x908, 0x3b, 0x905, 0x917, 0x938, 0x94d, 0x924, 0x3b, 0x938,
-0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x905, 0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928, 0x94b,
-0x92d, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x6a, 0x61, 0x6e, 0x2e,
+0x93f, 0x938, 0x947, 0x3b, 0x91c, 0x928, 0x935, 0x930, 0x940, 0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x905, 0x930, 0x940, 0x3b,
+0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x941, 0x928, 0x3b,
+0x91c, 0x941, 0x932, 0x93e, 0x908, 0x3b, 0x905, 0x917, 0x938, 0x94d, 0x924, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x92e, 0x94d,
+0x92c, 0x930, 0x3b, 0x905, 0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928, 0x94b, 0x92d, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b,
+0x921, 0x93f, 0x938, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x967, 0x3b, 0x968, 0x3b, 0x969, 0x3b, 0x96a, 0x3b, 0x96b, 0x3b, 0x96c,
+0x3b, 0x96d, 0x3b, 0x96e, 0x3b, 0x96f, 0x3b, 0x967, 0x966, 0x3b, 0x967, 0x967, 0x3b, 0x967, 0x968, 0x3b, 0x91c, 0x928, 0x935, 0x930,
+0x940, 0x3b, 0x92b, 0x930, 0x935, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x947, 0x932,
+0x3b, 0x92e, 0x908, 0x3b, 0x91c, 0x941, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x93e, 0x908, 0x3b, 0x905, 0x917, 0x938, 0x94d, 0x924, 0x3b,
+0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x905, 0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928,
+0x94b, 0x92d, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x926, 0x93f, 0x938, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x6a, 0x61, 0x6e, 0x2e,
0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x3b,
0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c, 0x69, 0x3b, 0x61, 0x75, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b,
0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76, 0x2e, 0x3b, 0x64, 0x65, 0x73, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61,
@@ -1434,643 +1434,643 @@ static const ushort months_data[] = {
0xbcd, 0x2e, 0x3b, 0xba8, 0xbb5, 0x2e, 0x3b, 0xb9f, 0xbbf, 0xb9a, 0x2e, 0x3b, 0xb9c, 0xba9, 0xbb5, 0xbb0, 0xbbf, 0x3b, 0xbaa, 0xbbf,
0xbaa, 0xbcd, 0xbb0, 0xbb5, 0xbb0, 0xbbf, 0x3b, 0xbae, 0xbbe, 0xbb0, 0xbcd, 0xb9a, 0xbcd, 0x3b, 0xb8f, 0xbaa, 0xbcd, 0xbb0, 0xbb2, 0xbcd,
0x3b, 0xbae, 0xbc7, 0x3b, 0xb9c, 0xbc2, 0xba9, 0xbcd, 0x3b, 0xb9c, 0xbc2, 0xbb2, 0xbc8, 0x3b, 0xb86, 0xb95, 0xbb8, 0xbcd, 0xb9f, 0xbcd,
-0x3b, 0xb9a, 0xbc6, 0xbaa, 0xbcd, 0xb9f, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xb85, 0xb95, 0xbcd, 0xb9f, 0xbcb, 0xbaa, 0xbb0, 0xbcd,
-0x3b, 0xba8, 0xbb5, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xb9f, 0xbbf, 0xb9a, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xb9c, 0x3b,
-0xbaa, 0xbbf, 0x3b, 0xbae, 0xbbe, 0x3b, 0xb8f, 0x3b, 0xbae, 0xbc7, 0x3b, 0xb9c, 0xbc2, 0x3b, 0xb9c, 0xbc2, 0x3b, 0xb86, 0x3b, 0xb9a,
-0xbc6, 0x3b, 0xb85, 0x3b, 0xba8, 0x3b, 0xb9f, 0xbbf, 0x3b, 0xc1c, 0xc28, 0xc35, 0xc30, 0xc3f, 0x3b, 0xc2b, 0xc3f, 0xc2c, 0xc4d, 0xc30,
-0xc35, 0xc30, 0xc3f, 0x3b, 0xc2e, 0xc3e, 0xc30, 0xc4d, 0xc1a, 0xc3f, 0x3b, 0xc0f, 0xc2a, 0xc4d, 0xc30, 0xc3f, 0xc32, 0xc4d, 0x3b, 0xc2e,
-0xc47, 0x3b, 0xc1c, 0xc42, 0xc28, 0xc4d, 0x3b, 0xc1c, 0xc42, 0xc32, 0xc48, 0x3b, 0xc06, 0xc17, 0xc38, 0xc4d, 0xc1f, 0xc41, 0x3b, 0xc38,
-0xc46, 0xc2a, 0xc4d, 0xc1f, 0xc46, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc05, 0xc15, 0xc4d, 0xc1f, 0xc4b, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc28,
-0xc35, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc21, 0xc3f, 0xc38, 0xc46, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc1c, 0x3b, 0xc2b, 0xc3f, 0x3b,
-0xc2e, 0x3b, 0xc0e, 0x3b, 0xc2e, 0xc46, 0x3b, 0xc1c, 0xc41, 0x3b, 0xc1c, 0xc41, 0x3b, 0xc06, 0x3b, 0xc38, 0xc46, 0x3b, 0xc05, 0x3b,
-0xc28, 0x3b, 0xc21, 0xc3f, 0x3b, 0xe21, 0x2e, 0xe04, 0x2e, 0x3b, 0xe01, 0x2e, 0xe1e, 0x2e, 0x3b, 0xe21, 0xe35, 0x2e, 0xe04, 0x2e,
-0x3b, 0xe40, 0xe21, 0x2e, 0xe22, 0x2e, 0x3b, 0xe1e, 0x2e, 0xe04, 0x2e, 0x3b, 0xe21, 0xe34, 0x2e, 0xe22, 0x2e, 0x3b, 0xe01, 0x2e,
-0xe04, 0x2e, 0x3b, 0xe2a, 0x2e, 0xe04, 0x2e, 0x3b, 0xe01, 0x2e, 0xe22, 0x2e, 0x3b, 0xe15, 0x2e, 0xe04, 0x2e, 0x3b, 0xe1e, 0x2e,
-0xe22, 0x2e, 0x3b, 0xe18, 0x2e, 0xe04, 0x2e, 0x3b, 0xe21, 0xe01, 0xe23, 0xe32, 0xe04, 0xe21, 0x3b, 0xe01, 0xe38, 0xe21, 0xe20, 0xe32,
-0xe1e, 0xe31, 0xe19, 0xe18, 0xe4c, 0x3b, 0xe21, 0xe35, 0xe19, 0xe32, 0xe04, 0xe21, 0x3b, 0xe40, 0xe21, 0xe29, 0xe32, 0xe22, 0xe19, 0x3b,
-0xe1e, 0xe24, 0xe29, 0xe20, 0xe32, 0xe04, 0xe21, 0x3b, 0xe21, 0xe34, 0xe16, 0xe38, 0xe19, 0xe32, 0xe22, 0xe19, 0x3b, 0xe01, 0xe23, 0xe01,
-0xe0e, 0xe32, 0xe04, 0xe21, 0x3b, 0xe2a, 0xe34, 0xe07, 0xe2b, 0xe32, 0xe04, 0xe21, 0x3b, 0xe01, 0xe31, 0xe19, 0xe22, 0xe32, 0xe22, 0xe19,
-0x3b, 0xe15, 0xe38, 0xe25, 0xe32, 0xe04, 0xe21, 0x3b, 0xe1e, 0xe24, 0xe28, 0xe08, 0xe34, 0xe01, 0xe32, 0xe22, 0xe19, 0x3b, 0xe18, 0xe31,
-0xe19, 0xe27, 0xe32, 0xe04, 0xe21, 0x3b, 0xe21, 0x3b, 0xe01, 0x3b, 0xe21, 0x3b, 0xe21, 0x3b, 0xe1e, 0x3b, 0xe21, 0x3b, 0xe01, 0x3b,
-0xe2a, 0x3b, 0xe01, 0x3b, 0xe15, 0x3b, 0xe1e, 0x3b, 0xe18, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf22, 0x3b,
-0xf5f, 0xfb3, 0xf0b, 0xf23, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf24, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf25, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf26, 0x3b,
-0xf5f, 0xfb3, 0xf0b, 0xf27, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf28, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf29, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf20,
-0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf21, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf22, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xf44,
-0xf0b, 0xf54, 0xf7c, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3,
-0xf0b, 0xf56, 0xf0b, 0xf66, 0xf74, 0xf58, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf5e, 0xf72, 0xf0b, 0xf54,
-0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf63, 0xf94, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xfb2,
-0xf74, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf51, 0xf74, 0xf53, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f,
-0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf62, 0xf92, 0xfb1, 0xf51, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xf42,
-0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b,
-0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf45, 0xf72, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56,
-0xf45, 0xf74, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0x1325, 0x122a, 0x3b, 0x1208, 0x12ab, 0x1272, 0x3b, 0x1218, 0x130b,
-0x1262, 0x3b, 0x121a, 0x12eb, 0x12dd, 0x3b, 0x130d, 0x1295, 0x1266, 0x3b, 0x1230, 0x1290, 0x3b, 0x1213, 0x121d, 0x1208, 0x3b, 0x1290, 0x1213, 0x1230,
-0x3b, 0x1218, 0x1235, 0x12a8, 0x3b, 0x1325, 0x1245, 0x121d, 0x3b, 0x1215, 0x12f3, 0x122d, 0x3b, 0x1273, 0x1215, 0x1233, 0x3b, 0x1325, 0x122a, 0x3b,
-0x1208, 0x12ab, 0x1272, 0x1275, 0x3b, 0x1218, 0x130b, 0x1262, 0x1275, 0x3b, 0x121a, 0x12eb, 0x12dd, 0x12eb, 0x3b, 0x130d, 0x1295, 0x1266, 0x1275, 0x3b,
-0x1230, 0x1290, 0x3b, 0x1213, 0x121d, 0x1208, 0x3b, 0x1290, 0x1213, 0x1230, 0x3b, 0x1218, 0x1235, 0x12a8, 0x1228, 0x121d, 0x3b, 0x1325, 0x1245, 0x121d,
-0x1272, 0x3b, 0x1215, 0x12f3, 0x122d, 0x3b, 0x1273, 0x1215, 0x1233, 0x1235, 0x3b, 0x53, 0x101, 0x6e, 0x3b, 0x46, 0x113, 0x70, 0x3b, 0x4d,
-0x61, 0x2bb, 0x61, 0x3b, 0x2bb, 0x45, 0x70, 0x65, 0x3b, 0x4d, 0x113, 0x3b, 0x53, 0x75, 0x6e, 0x3b, 0x53, 0x69, 0x75, 0x3b,
-0x2bb, 0x41, 0x6f, 0x6b, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x3b, 0x4e, 0x14d, 0x76, 0x3b, 0x54, 0x12b,
-0x73, 0x3b, 0x53, 0x101, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x46, 0x113, 0x70, 0x75, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x61,
-0x2bb, 0x61, 0x73, 0x69, 0x3b, 0x2bb, 0x45, 0x70, 0x65, 0x6c, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x113, 0x3b, 0x53, 0x75, 0x6e,
-0x65, 0x3b, 0x53, 0x69, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x2bb, 0x41, 0x6f, 0x6b, 0x6f, 0x73, 0x69, 0x3b, 0x53, 0x65, 0x70,
-0x69, 0x74, 0x65, 0x6d, 0x61, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x74, 0x6f, 0x70, 0x61, 0x3b, 0x4e, 0x14d, 0x76, 0x65, 0x6d,
-0x61, 0x3b, 0x54, 0x12b, 0x73, 0x65, 0x6d, 0x61, 0x3b, 0x53, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x4d, 0x3b, 0x53,
-0x3b, 0x53, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x53, 0x75, 0x6e, 0x3b, 0x59, 0x61, 0x6e,
-0x3b, 0x4b, 0x75, 0x6c, 0x3b, 0x44, 0x7a, 0x69, 0x3b, 0x4d, 0x75, 0x64, 0x3b, 0x4b, 0x68, 0x6f, 0x3b, 0x4d, 0x61, 0x77,
-0x3b, 0x4d, 0x68, 0x61, 0x3b, 0x4e, 0x64, 0x7a, 0x3b, 0x4e, 0x68, 0x6c, 0x3b, 0x48, 0x75, 0x6b, 0x3b, 0x4e, 0x27, 0x77,
-0x3b, 0x53, 0x75, 0x6e, 0x67, 0x75, 0x74, 0x69, 0x3b, 0x4e, 0x79, 0x65, 0x6e, 0x79, 0x65, 0x6e, 0x79, 0x61, 0x6e, 0x69,
-0x3b, 0x4e, 0x79, 0x65, 0x6e, 0x79, 0x61, 0x6e, 0x6b, 0x75, 0x6c, 0x75, 0x3b, 0x44, 0x7a, 0x69, 0x76, 0x61, 0x6d, 0x69,
-0x73, 0x6f, 0x6b, 0x6f, 0x3b, 0x4d, 0x75, 0x64, 0x79, 0x61, 0x78, 0x69, 0x68, 0x69, 0x3b, 0x4b, 0x68, 0x6f, 0x74, 0x61,
-0x76, 0x75, 0x78, 0x69, 0x6b, 0x61, 0x3b, 0x4d, 0x61, 0x77, 0x75, 0x77, 0x61, 0x6e, 0x69, 0x3b, 0x4d, 0x68, 0x61, 0x77,
-0x75, 0x72, 0x69, 0x3b, 0x4e, 0x64, 0x7a, 0x68, 0x61, 0x74, 0x69, 0x3b, 0x4e, 0x68, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x6c,
-0x61, 0x3b, 0x48, 0x75, 0x6b, 0x75, 0x72, 0x69, 0x3b, 0x4e, 0x27, 0x77, 0x65, 0x6e, 0x64, 0x7a, 0x61, 0x6d, 0x68, 0x61,
-0x6c, 0x61, 0x3b, 0x4f, 0x63, 0x61, 0x3b, 0x15e, 0x75, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4e, 0x69, 0x73, 0x3b, 0x4d,
-0x61, 0x79, 0x3b, 0x48, 0x61, 0x7a, 0x3b, 0x54, 0x65, 0x6d, 0x3b, 0x41, 0x11f, 0x75, 0x3b, 0x45, 0x79, 0x6c, 0x3b, 0x45,
-0x6b, 0x69, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x41, 0x72, 0x61, 0x3b, 0x4f, 0x63, 0x61, 0x6b, 0x3b, 0x15e, 0x75, 0x62, 0x61,
-0x74, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x3b, 0x4e, 0x69, 0x73, 0x61, 0x6e, 0x3b, 0x4d, 0x61, 0x79, 0x131, 0x73, 0x3b, 0x48,
-0x61, 0x7a, 0x69, 0x72, 0x61, 0x6e, 0x3b, 0x54, 0x65, 0x6d, 0x6d, 0x75, 0x7a, 0x3b, 0x41, 0x11f, 0x75, 0x73, 0x74, 0x6f,
-0x73, 0x3b, 0x45, 0x79, 0x6c, 0xfc, 0x6c, 0x3b, 0x45, 0x6b, 0x69, 0x6d, 0x3b, 0x4b, 0x61, 0x73, 0x131, 0x6d, 0x3b, 0x41,
-0x72, 0x61, 0x6c, 0x131, 0x6b, 0x3b, 0x4f, 0x3b, 0x15e, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x54, 0x3b,
-0x41, 0x3b, 0x45, 0x3b, 0x45, 0x3b, 0x4b, 0x3b, 0x41, 0x3b, 0x441, 0x456, 0x447, 0x2e, 0x3b, 0x43b, 0x44e, 0x442, 0x2e, 0x3b,
-0x431, 0x435, 0x440, 0x2e, 0x3b, 0x43a, 0x432, 0x456, 0x442, 0x2e, 0x3b, 0x442, 0x440, 0x430, 0x432, 0x2e, 0x3b, 0x447, 0x435, 0x440,
-0x432, 0x2e, 0x3b, 0x43b, 0x438, 0x43f, 0x2e, 0x3b, 0x441, 0x435, 0x440, 0x43f, 0x2e, 0x3b, 0x432, 0x435, 0x440, 0x2e, 0x3b, 0x436,
-0x43e, 0x432, 0x442, 0x2e, 0x3b, 0x43b, 0x438, 0x441, 0x442, 0x2e, 0x3b, 0x433, 0x440, 0x443, 0x434, 0x2e, 0x3b, 0x441, 0x456, 0x447,
-0x43d, 0x44f, 0x3b, 0x43b, 0x44e, 0x442, 0x43e, 0x433, 0x43e, 0x3b, 0x431, 0x435, 0x440, 0x435, 0x437, 0x43d, 0x44f, 0x3b, 0x43a, 0x432,
-0x456, 0x442, 0x43d, 0x44f, 0x3b, 0x442, 0x440, 0x430, 0x432, 0x43d, 0x44f, 0x3b, 0x447, 0x435, 0x440, 0x432, 0x43d, 0x44f, 0x3b, 0x43b,
-0x438, 0x43f, 0x43d, 0x44f, 0x3b, 0x441, 0x435, 0x440, 0x43f, 0x43d, 0x44f, 0x3b, 0x432, 0x435, 0x440, 0x435, 0x441, 0x43d, 0x44f, 0x3b,
-0x436, 0x43e, 0x432, 0x442, 0x43d, 0x44f, 0x3b, 0x43b, 0x438, 0x441, 0x442, 0x43e, 0x43f, 0x430, 0x434, 0x430, 0x3b, 0x433, 0x440, 0x443,
-0x434, 0x43d, 0x44f, 0x3b, 0x421, 0x3b, 0x41b, 0x3b, 0x411, 0x3b, 0x41a, 0x3b, 0x422, 0x3b, 0x427, 0x3b, 0x41b, 0x3b, 0x421, 0x3b,
-0x412, 0x3b, 0x416, 0x3b, 0x41b, 0x3b, 0x413, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x6cc, 0x3b, 0x641, 0x631, 0x648, 0x631, 0x6cc, 0x3b,
-0x645, 0x627, 0x631, 0x20, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x64a, 0x644, 0x3b, 0x645, 0x626, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c,
-0x648, 0x644, 0x627, 0x626, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x648,
-0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x41c, 0x443, 0x4b3, 0x430, 0x440,
-0x440, 0x430, 0x43c, 0x3b, 0x421, 0x430, 0x444, 0x430, 0x440, 0x3b, 0x420, 0x430, 0x431, 0x438, 0x443, 0x43b, 0x2d, 0x430, 0x432, 0x432,
-0x430, 0x43b, 0x3b, 0x420, 0x430, 0x431, 0x438, 0x443, 0x43b, 0x2d, 0x43e, 0x445, 0x438, 0x440, 0x3b, 0x416, 0x443, 0x43c, 0x43e, 0x434,
-0x438, 0x443, 0x43b, 0x2d, 0x443, 0x43b, 0x43e, 0x3b, 0x416, 0x443, 0x43c, 0x43e, 0x434, 0x438, 0x443, 0x43b, 0x2d, 0x443, 0x445, 0x440,
-0x43e, 0x3b, 0x420, 0x430, 0x436, 0x430, 0x431, 0x3b, 0x428, 0x430, 0x44a, 0x431, 0x43e, 0x43d, 0x3b, 0x420, 0x430, 0x43c, 0x430, 0x437,
-0x43e, 0x43d, 0x3b, 0x428, 0x430, 0x432, 0x432, 0x43e, 0x43b, 0x3b, 0x417, 0x438, 0x43b, 0x2d, 0x49b, 0x430, 0x44a, 0x434, 0x430, 0x3b,
-0x417, 0x438, 0x43b, 0x2d, 0x4b3, 0x438, 0x436, 0x436, 0x430, 0x3b, 0x62c, 0x646, 0x648, 0x3b, 0x641, 0x628, 0x631, 0x3b, 0x645, 0x627,
-0x631, 0x3b, 0x627, 0x67e, 0x631, 0x3b, 0x645, 0x640, 0x6cc, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x3b, 0x627, 0x6af,
-0x633, 0x3b, 0x633, 0x67e, 0x62a, 0x3b, 0x627, 0x6a9, 0x62a, 0x3b, 0x646, 0x648, 0x645, 0x3b, 0x62f, 0x633, 0x645, 0x3b, 0x74, 0x68,
-0x67, 0x20, 0x31, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x32, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x33, 0x3b, 0x74, 0x68, 0x67, 0x20,
-0x34, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x35, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x36, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x37, 0x3b,
-0x74, 0x68, 0x67, 0x20, 0x38, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x39, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x30, 0x3b, 0x74,
-0x68, 0x67, 0x20, 0x31, 0x31, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x32, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x6d,
-0x1ed9, 0x74, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x68, 0x61, 0x69, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x62,
-0x61, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x74, 0x1b0, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x6e, 0x103, 0x6d,
-0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x73, 0xe1, 0x75, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x62, 0x1ea3, 0x79,
-0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x74, 0xe1, 0x6d, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x63, 0x68, 0xed,
-0x6e, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x6d, 0x1b0, 0x1edd, 0x69, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x6d,
-0x1b0, 0x1edd, 0x69, 0x20, 0x6d, 0x1ed9, 0x74, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x6d, 0x1b0, 0x1edd, 0x69, 0x20, 0x68,
-0x61, 0x69, 0x3b, 0x49, 0x6f, 0x6e, 0x3b, 0x43, 0x68, 0x77, 0x65, 0x66, 0x3b, 0x4d, 0x61, 0x77, 0x72, 0x74, 0x68, 0x3b,
-0x45, 0x62, 0x72, 0x69, 0x6c, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d, 0x65, 0x68, 0x3b, 0x47, 0x6f, 0x72, 0x66, 0x66,
-0x3b, 0x41, 0x77, 0x73, 0x74, 0x3b, 0x4d, 0x65, 0x64, 0x69, 0x3b, 0x48, 0x79, 0x64, 0x3b, 0x54, 0x61, 0x63, 0x68, 0x3b,
-0x52, 0x68, 0x61, 0x67, 0x3b, 0x49, 0x6f, 0x6e, 0x61, 0x77, 0x72, 0x3b, 0x43, 0x68, 0x77, 0x65, 0x66, 0x72, 0x6f, 0x72,
-0x3b, 0x4d, 0x61, 0x77, 0x72, 0x74, 0x68, 0x3b, 0x45, 0x62, 0x72, 0x69, 0x6c, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d,
-0x65, 0x68, 0x65, 0x66, 0x69, 0x6e, 0x3b, 0x47, 0x6f, 0x72, 0x66, 0x66, 0x65, 0x6e, 0x61, 0x66, 0x3b, 0x41, 0x77, 0x73,
-0x74, 0x3b, 0x4d, 0x65, 0x64, 0x69, 0x3b, 0x48, 0x79, 0x64, 0x72, 0x65, 0x66, 0x3b, 0x54, 0x61, 0x63, 0x68, 0x77, 0x65,
-0x64, 0x64, 0x3b, 0x52, 0x68, 0x61, 0x67, 0x66, 0x79, 0x72, 0x3b, 0x49, 0x3b, 0x43, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x4d,
-0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x52, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46,
-0x65, 0x62, 0x3b, 0x4d, 0x61, 0x74, 0x3b, 0x45, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a,
-0x75, 0x6c, 0x3b, 0x41, 0x67, 0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44,
-0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x79, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x77, 0x61,
-0x72, 0x69, 0x3b, 0x4d, 0x61, 0x74, 0x73, 0x68, 0x69, 0x3b, 0x45, 0x70, 0x72, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x65, 0x79,
-0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x79, 0x69, 0x3b, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69,
-0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x68, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f,
-0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x1e62, 0x1eb9, 0x301, 0x72, 0x1eb9, 0x323,
-0x3b, 0xc8, 0x72, 0xe8, 0x6c, 0xe8, 0x3b, 0x1eb8, 0x72, 0x1eb9, 0x300, 0x6e, 0xe0, 0x3b, 0xcc, 0x67, 0x62, 0xe9, 0x3b, 0x1eb8,
-0x300, 0x62, 0x69, 0x62, 0x69, 0x3b, 0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x41, 0x67, 0x1eb9, 0x6d, 0x1ecd, 0x3b, 0xd2, 0x67,
-0xfa, 0x6e, 0x3b, 0x4f, 0x77, 0x65, 0x77, 0x65, 0x3b, 0x1ecc, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x42, 0xe9, 0x6c, 0xfa,
-0x3b, 0x1ecc, 0x300, 0x70, 0x1eb9, 0x300, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1e62, 0x1eb8, 0x301, 0x72, 0x1eb9, 0x301, 0x3b, 0x4f, 0x1e62,
-0xf9, 0x20, 0xc8, 0x72, 0xe8, 0x6c, 0xe8, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1eb8, 0x72, 0x1eb9, 0x300, 0x6e, 0xe0, 0x3b, 0x4f,
-0x1e62, 0xf9, 0x20, 0xcc, 0x67, 0x62, 0xe9, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1eb8, 0x300, 0x62, 0x69, 0x62, 0x69, 0x3b, 0x4f,
-0x1e62, 0xf9, 0x20, 0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x41, 0x67, 0x1eb9, 0x6d, 0x1ecd, 0x3b, 0x4f,
-0x1e62, 0xf9, 0x20, 0xd2, 0x67, 0xfa, 0x6e, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x4f, 0x77, 0x65, 0x77, 0x65, 0x3b, 0x4f, 0x1e62,
-0xf9, 0x20, 0x1ecc, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x42, 0xe9, 0x6c, 0xfa, 0x3b, 0x4f, 0x1e62,
-0xf9, 0x20, 0x1ecc, 0x300, 0x70, 0x1eb9, 0x300, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x73, 0x3b,
-0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x61, 0x3b,
-0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75,
-0x77, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x73, 0x68, 0x69,
-0x3b, 0x41, 0x70, 0x72, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x65, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75,
-0x6c, 0x61, 0x79, 0x69, 0x3b, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x68, 0x65, 0x6d, 0x62,
-0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x68, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69,
-0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70,
-0x72, 0x3b, 0x4d, 0x61, 0x6a, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x76, 0x67, 0x3b, 0x53, 0x65,
-0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x63, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72,
-0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b,
-0x4d, 0x61, 0x6a, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x76, 0x67, 0x75, 0x73, 0x74,
-0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x72, 0x3b, 0x4e,
-0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4a, 0x2d, 0x67,
-0x75, 0x65, 0x72, 0x3b, 0x54, 0x2d, 0x61, 0x72, 0x72, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x79, 0x72, 0x6e, 0x74, 0x3b, 0x41,
-0x76, 0x72, 0x72, 0x69, 0x6c, 0x3b, 0x42, 0x6f, 0x61, 0x6c, 0x64, 0x79, 0x6e, 0x3b, 0x4d, 0x2d, 0x73, 0x6f, 0x75, 0x72,
-0x65, 0x65, 0x3b, 0x4a, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4c, 0x75, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x79,
-0x6e, 0x3b, 0x4d, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4a, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b,
-0x4d, 0x2e, 0x48, 0x6f, 0x75, 0x6e, 0x65, 0x79, 0x3b, 0x4d, 0x2e, 0x4e, 0x6f, 0x6c, 0x6c, 0x69, 0x63, 0x6b, 0x3b, 0x4a,
-0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x67, 0x65, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x54, 0x6f, 0x73, 0x68, 0x69, 0x61, 0x67,
-0x68, 0x74, 0x2d, 0x61, 0x72, 0x72, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x79, 0x72, 0x6e, 0x74, 0x3b, 0x41, 0x76, 0x65, 0x72,
-0x69, 0x6c, 0x3b, 0x42, 0x6f, 0x61, 0x6c, 0x64, 0x79, 0x6e, 0x3b, 0x4d, 0x65, 0x61, 0x6e, 0x2d, 0x73, 0x6f, 0x75, 0x72,
-0x65, 0x65, 0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4c, 0x75, 0x61,
-0x6e, 0x69, 0x73, 0x74, 0x79, 0x6e, 0x3b, 0x4d, 0x65, 0x61, 0x6e, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4a,
-0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4d, 0x65, 0x65, 0x20, 0x48, 0x6f, 0x75,
-0x6e, 0x65, 0x79, 0x3b, 0x4d, 0x65, 0x65, 0x20, 0x6e, 0x79, 0x20, 0x4e, 0x6f, 0x6c, 0x6c, 0x69, 0x63, 0x6b, 0x3b, 0x47,
-0x65, 0x6e, 0x3b, 0x57, 0x68, 0x65, 0x3b, 0x4d, 0x65, 0x72, 0x3b, 0x45, 0x62, 0x72, 0x3b, 0x4d, 0x65, 0x3b, 0x45, 0x66,
-0x6e, 0x3b, 0x47, 0x6f, 0x72, 0x3b, 0x45, 0x73, 0x74, 0x3b, 0x47, 0x77, 0x6e, 0x3b, 0x48, 0x65, 0x64, 0x3b, 0x44, 0x75,
-0x3b, 0x4b, 0x65, 0x76, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x47, 0x65, 0x6e, 0x76, 0x65, 0x72, 0x3b, 0x4d, 0x79, 0x73, 0x20,
-0x57, 0x68, 0x65, 0x76, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x4d, 0x65, 0x72, 0x74, 0x68, 0x3b, 0x4d, 0x79,
-0x73, 0x20, 0x45, 0x62, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x4d, 0x65, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x45,
-0x66, 0x61, 0x6e, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x47, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x72, 0x65, 0x6e, 0x3b, 0x4d, 0x79,
-0x65, 0x20, 0x45, 0x73, 0x74, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x47, 0x77, 0x79, 0x6e, 0x67, 0x61, 0x6c, 0x61, 0x3b, 0x4d,
-0x79, 0x73, 0x20, 0x48, 0x65, 0x64, 0x72, 0x61, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x44, 0x75, 0x3b, 0x4d, 0x79, 0x73, 0x20,
-0x4b, 0x65, 0x76, 0x61, 0x72, 0x64, 0x68, 0x75, 0x3b, 0x53, 0x2d, 0x186, 0x3b, 0x4b, 0x2d, 0x186, 0x3b, 0x45, 0x2d, 0x186,
-0x3b, 0x45, 0x2d, 0x4f, 0x3b, 0x45, 0x2d, 0x4b, 0x3b, 0x4f, 0x2d, 0x41, 0x3b, 0x41, 0x2d, 0x4b, 0x3b, 0x44, 0x2d, 0x186,
-0x3b, 0x46, 0x2d, 0x190, 0x3b, 0x186, 0x2d, 0x41, 0x3b, 0x186, 0x2d, 0x4f, 0x3b, 0x4d, 0x2d, 0x186, 0x3b, 0x53, 0x61, 0x6e,
-0x64, 0x61, 0x2d, 0x186, 0x70, 0x25b, 0x70, 0x254, 0x6e, 0x3b, 0x4b, 0x77, 0x61, 0x6b, 0x77, 0x61, 0x72, 0x2d, 0x186, 0x67,
-0x79, 0x65, 0x66, 0x75, 0x6f, 0x3b, 0x45, 0x62, 0x254, 0x77, 0x2d, 0x186, 0x62, 0x65, 0x6e, 0x65, 0x6d, 0x3b, 0x45, 0x62,
-0x254, 0x62, 0x69, 0x72, 0x61, 0x2d, 0x4f, 0x66, 0x6f, 0x72, 0x69, 0x73, 0x75, 0x6f, 0x3b, 0x45, 0x73, 0x75, 0x73, 0x6f,
-0x77, 0x20, 0x41, 0x6b, 0x65, 0x74, 0x73, 0x65, 0x61, 0x62, 0x61, 0x2d, 0x4b, 0x254, 0x74, 0x254, 0x6e, 0x69, 0x6d, 0x62,
-0x61, 0x3b, 0x4f, 0x62, 0x69, 0x72, 0x61, 0x64, 0x65, 0x2d, 0x41, 0x79, 0x25b, 0x77, 0x6f, 0x68, 0x6f, 0x6d, 0x75, 0x6d,
-0x75, 0x3b, 0x41, 0x79, 0x25b, 0x77, 0x6f, 0x68, 0x6f, 0x2d, 0x4b, 0x69, 0x74, 0x61, 0x77, 0x6f, 0x6e, 0x73, 0x61, 0x3b,
-0x44, 0x69, 0x66, 0x75, 0x75, 0x2d, 0x186, 0x73, 0x61, 0x6e, 0x64, 0x61, 0x61, 0x3b, 0x46, 0x61, 0x6e, 0x6b, 0x77, 0x61,
-0x2d, 0x190, 0x62, 0x254, 0x3b, 0x186, 0x62, 0x25b, 0x73, 0x25b, 0x2d, 0x41, 0x68, 0x69, 0x6e, 0x69, 0x6d, 0x65, 0x3b, 0x186,
-0x62, 0x65, 0x72, 0x25b, 0x66, 0x25b, 0x77, 0x2d, 0x4f, 0x62, 0x75, 0x62, 0x75, 0x6f, 0x3b, 0x4d, 0x75, 0x6d, 0x75, 0x2d,
-0x186, 0x70, 0x25b, 0x6e, 0x69, 0x6d, 0x62, 0x61, 0x3b, 0x91c, 0x93e, 0x928, 0x947, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92b, 0x947,
-0x92c, 0x94d, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x90f, 0x92a, 0x94d, 0x930, 0x93f,
-0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x942, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x948, 0x3b, 0x913, 0x917, 0x938, 0x94d, 0x91f, 0x3b,
-0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x913, 0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928, 0x94b,
-0x935, 0x94d, 0x939, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x41, 0x68, 0x61, 0x3b,
-0x4f, 0x66, 0x6c, 0x3b, 0x4f, 0x63, 0x68, 0x3b, 0x41, 0x62, 0x65, 0x3b, 0x41, 0x67, 0x62, 0x3b, 0x4f, 0x74, 0x75, 0x3b,
-0x4d, 0x61, 0x61, 0x3b, 0x4d, 0x61, 0x6e, 0x3b, 0x47, 0x62, 0x6f, 0x3b, 0x41, 0x6e, 0x74, 0x3b, 0x41, 0x6c, 0x65, 0x3b,
-0x41, 0x66, 0x75, 0x3b, 0x41, 0x68, 0x61, 0x72, 0x61, 0x62, 0x61, 0x74, 0x61, 0x3b, 0x4f, 0x66, 0x6c, 0x6f, 0x3b, 0x4f,
-0x63, 0x68, 0x6f, 0x6b, 0x72, 0x69, 0x6b, 0x72, 0x69, 0x3b, 0x41, 0x62, 0x65, 0x69, 0x62, 0x65, 0x65, 0x3b, 0x41, 0x67,
-0x62, 0x65, 0x69, 0x6e, 0x61, 0x61, 0x3b, 0x4f, 0x74, 0x75, 0x6b, 0x77, 0x61, 0x64, 0x61, 0x6e, 0x3b, 0x4d, 0x61, 0x61,
-0x77, 0x65, 0x3b, 0x4d, 0x61, 0x6e, 0x79, 0x61, 0x77, 0x61, 0x6c, 0x65, 0x3b, 0x47, 0x62, 0x6f, 0x3b, 0x41, 0x6e, 0x74,
-0x6f, 0x6e, 0x3b, 0x41, 0x6c, 0x65, 0x6d, 0x6c, 0x65, 0x3b, 0x41, 0x66, 0x75, 0x61, 0x62, 0x65, 0x65, 0x3b, 0x4a, 0x65,
-0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x61, 0x3b, 0x45, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x65, 0x3b, 0x4a, 0x75,
-0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x1ecc, 0x67, 0x1ecd, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x1ecc, 0x6b, 0x74, 0x3b, 0x4e, 0x6f,
-0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x65, 0x6e, 0x1ee5, 0x77, 0x61, 0x72, 0x1ecb, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x1ee5,
-0x77, 0x61, 0x72, 0x1ecb, 0x3b, 0x4d, 0x61, 0x61, 0x63, 0x68, 0x1ecb, 0x3b, 0x45, 0x70, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x65,
-0x65, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x1ecb, 0x3b, 0x1ecc, 0x67, 0x1ecd, 0x1ecd, 0x73, 0x74, 0x3b,
-0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x1ecc, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65,
-0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4d, 0x62, 0x65, 0x3b, 0x4b, 0x65, 0x6c, 0x3b,
-0x4b, 0x74, 0x169, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x4b, 0x74, 0x6e, 0x3b, 0x54, 0x68, 0x61, 0x3b, 0x4d, 0x6f, 0x6f, 0x3b,
-0x4e, 0x79, 0x61, 0x3b, 0x4b, 0x6e, 0x64, 0x3b, 0x128, 0x6b, 0x75, 0x3b, 0x128, 0x6b, 0x6d, 0x3b, 0x128, 0x6b, 0x6c, 0x3b,
-0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x62, 0x65, 0x65, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61,
-0x20, 0x6b, 0x65, 0x6c, 0x129, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x74, 0x169,
-0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77,
-0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x74, 0x68, 0x61,
-0x6e, 0x74, 0x68, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x75, 0x6f, 0x6e, 0x7a,
-0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6e, 0x79, 0x61, 0x61, 0x6e, 0x79, 0x61, 0x3b, 0x4d, 0x77,
-0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20,
-0x129, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x129, 0x6b, 0x75, 0x6d, 0x69, 0x20,
-0x6e, 0x61, 0x20, 0x129, 0x6d, 0x77, 0x65, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x129, 0x6b, 0x75, 0x6d,
-0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x6c, 0x129, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x54,
-0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x128, 0x3b, 0x128, 0x3b, 0x128, 0x3b, 0x70f, 0x71f, 0x722, 0x20, 0x70f, 0x712, 0x3b,
-0x72b, 0x712, 0x71b, 0x3b, 0x710, 0x715, 0x72a, 0x3b, 0x722, 0x71d, 0x723, 0x722, 0x3b, 0x710, 0x71d, 0x72a, 0x3b, 0x71a, 0x719, 0x71d,
-0x72a, 0x722, 0x3b, 0x72c, 0x721, 0x718, 0x719, 0x3b, 0x710, 0x712, 0x3b, 0x710, 0x71d, 0x720, 0x718, 0x720, 0x3b, 0x70f, 0x72c, 0x72b,
-0x20, 0x70f, 0x710, 0x3b, 0x70f, 0x72c, 0x72b, 0x20, 0x70f, 0x712, 0x3b, 0x70f, 0x71f, 0x722, 0x20, 0x70f, 0x710, 0x3b, 0x120d, 0x12f0,
-0x1275, 0x3b, 0x12ab, 0x1265, 0x12bd, 0x3b, 0x12ad, 0x1265, 0x120b, 0x3b, 0x134b, 0x1305, 0x12ba, 0x3b, 0x12ad, 0x1262, 0x1245, 0x3b, 0x121d, 0x2f,
-0x1275, 0x3b, 0x12b0, 0x122d, 0x3b, 0x121b, 0x122d, 0x12eb, 0x3b, 0x12eb, 0x12b8, 0x1292, 0x3b, 0x1218, 0x1270, 0x1209, 0x3b, 0x121d, 0x2f, 0x121d,
-0x3b, 0x1270, 0x1215, 0x1233, 0x3b, 0x120d, 0x12f0, 0x1275, 0x122a, 0x3b, 0x12ab, 0x1265, 0x12bd, 0x1265, 0x1272, 0x3b, 0x12ad, 0x1265, 0x120b, 0x3b,
-0x134b, 0x1305, 0x12ba, 0x122a, 0x3b, 0x12ad, 0x1262, 0x1245, 0x122a, 0x3b, 0x121d, 0x12aa, 0x12a4, 0x120d, 0x20, 0x1275, 0x131f, 0x1292, 0x122a, 0x3b,
-0x12b0, 0x122d, 0x12a9, 0x3b, 0x121b, 0x122d, 0x12eb, 0x121d, 0x20, 0x1275, 0x122a, 0x3b, 0x12eb, 0x12b8, 0x1292, 0x20, 0x1218, 0x1233, 0x1245, 0x1208,
-0x122a, 0x3b, 0x1218, 0x1270, 0x1209, 0x3b, 0x121d, 0x12aa, 0x12a4, 0x120d, 0x20, 0x1218, 0x123d, 0x12c8, 0x122a, 0x3b, 0x1270, 0x1215, 0x1233, 0x1235,
-0x122a, 0x3b, 0x120d, 0x3b, 0x12ab, 0x3b, 0x12ad, 0x3b, 0x134b, 0x3b, 0x12ad, 0x3b, 0x121d, 0x3b, 0x12b0, 0x3b, 0x121b, 0x3b, 0x12eb, 0x3b,
-0x1218, 0x3b, 0x121d, 0x3b, 0x1270, 0x3b, 0x1320, 0x1210, 0x1228, 0x3b, 0x12a8, 0x1270, 0x1270, 0x3b, 0x1218, 0x1308, 0x1260, 0x3b, 0x12a0, 0x1280,
-0x12d8, 0x3b, 0x130d, 0x1295, 0x1263, 0x1275, 0x3b, 0x1220, 0x1295, 0x12e8, 0x3b, 0x1210, 0x1218, 0x1208, 0x3b, 0x1290, 0x1210, 0x1230, 0x3b, 0x12a8,
-0x1228, 0x1218, 0x3b, 0x1320, 0x1240, 0x1218, 0x3b, 0x1280, 0x12f0, 0x1228, 0x3b, 0x1280, 0x1220, 0x1220, 0x3b, 0x1320, 0x3b, 0x12a8, 0x3b, 0x1218,
-0x3b, 0x12a0, 0x3b, 0x130d, 0x3b, 0x1220, 0x3b, 0x1210, 0x3b, 0x1290, 0x3b, 0x12a8, 0x3b, 0x1320, 0x3b, 0x1280, 0x3b, 0x1280, 0x3b, 0x57,
-0x65, 0x79, 0x3b, 0x46, 0x61, 0x6e, 0x3b, 0x54, 0x61, 0x74, 0x3b, 0x4e, 0x61, 0x6e, 0x3b, 0x54, 0x75, 0x79, 0x3b, 0x54,
-0x73, 0x6f, 0x3b, 0x54, 0x61, 0x66, 0x3b, 0x57, 0x61, 0x72, 0x3b, 0x4b, 0x75, 0x6e, 0x3b, 0x42, 0x61, 0x6e, 0x3b, 0x4b,
-0x6f, 0x6d, 0x3b, 0x53, 0x61, 0x75, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x57, 0x65, 0x79, 0x65, 0x6e, 0x65, 0x3b, 0x46, 0x61,
-0x69, 0x20, 0x46, 0x61, 0x6e, 0x69, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x54, 0x61, 0x74, 0x61, 0x6b, 0x61, 0x3b, 0x46, 0x61,
-0x69, 0x20, 0x4e, 0x61, 0x6e, 0x67, 0x72, 0x61, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x54, 0x75, 0x79, 0x6f, 0x3b, 0x46, 0x61,
-0x69, 0x20, 0x54, 0x73, 0x6f, 0x79, 0x69, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x54, 0x61, 0x66, 0x61, 0x6b, 0x61, 0x3b, 0x46,
-0x61, 0x69, 0x20, 0x57, 0x61, 0x72, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x4b, 0x75, 0x6e, 0x6f, 0x62,
-0x6f, 0x6b, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x42, 0x61, 0x6e, 0x73, 0x6f, 0x6b, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x4b, 0x6f,
-0x6d, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x53, 0x61, 0x75, 0x6b, 0x3b, 0x44, 0x79, 0x6f, 0x6e, 0x3b, 0x42, 0x61, 0x61, 0x3b,
-0x41, 0x74, 0x61, 0x74, 0x3b, 0x41, 0x6e, 0x61, 0x73, 0x3b, 0x41, 0x74, 0x79, 0x6f, 0x3b, 0x41, 0x63, 0x68, 0x69, 0x3b,
-0x41, 0x74, 0x61, 0x72, 0x3b, 0x41, 0x77, 0x75, 0x72, 0x3b, 0x53, 0x68, 0x61, 0x64, 0x3b, 0x53, 0x68, 0x61, 0x6b, 0x3b,
-0x4e, 0x61, 0x62, 0x61, 0x3b, 0x4e, 0x61, 0x74, 0x61, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x44, 0x79, 0x6f, 0x6e, 0x3b, 0x50,
-0x65, 0x6e, 0x20, 0x42, 0x61, 0x27, 0x61, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x74, 0x61, 0x74, 0x3b, 0x50, 0x65, 0x6e,
-0x20, 0x41, 0x6e, 0x61, 0x73, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x74, 0x79, 0x6f, 0x6e, 0x3b, 0x50, 0x65, 0x6e, 0x20,
-0x41, 0x63, 0x68, 0x69, 0x72, 0x69, 0x6d, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x74, 0x61, 0x72, 0x69, 0x62, 0x61, 0x3b,
-0x50, 0x65, 0x6e, 0x20, 0x41, 0x77, 0x75, 0x72, 0x72, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x53, 0x68, 0x61, 0x64, 0x6f, 0x6e,
-0x3b, 0x50, 0x65, 0x6e, 0x20, 0x53, 0x68, 0x61, 0x6b, 0x75, 0x72, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x4b, 0x75, 0x72, 0x20,
-0x4e, 0x61, 0x62, 0x61, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x4b, 0x75, 0x72, 0x20, 0x4e, 0x61, 0x74, 0x61, 0x74, 0x3b, 0x41,
-0x331, 0x79, 0x72, 0x3b, 0x41, 0x331, 0x68, 0x77, 0x3b, 0x41, 0x331, 0x74, 0x61, 0x3b, 0x41, 0x331, 0x6e, 0x61, 0x3b, 0x41,
-0x331, 0x70, 0x66, 0x3b, 0x41, 0x331, 0x6b, 0x69, 0x3b, 0x41, 0x331, 0x74, 0x79, 0x3b, 0x41, 0x331, 0x6e, 0x69, 0x3b, 0x41,
-0x331, 0x6b, 0x75, 0x3b, 0x53, 0x77, 0x61, 0x3b, 0x53, 0x62, 0x79, 0x3b, 0x53, 0x62, 0x68, 0x3b, 0x48, 0x79, 0x77, 0x61,
-0x6e, 0x20, 0x41, 0x331, 0x79, 0x72, 0x6e, 0x69, 0x67, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x68, 0x77,
-0x61, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x74, 0x61, 0x74, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20,
-0x41, 0x331, 0x6e, 0x61, 0x61, 0x69, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x70, 0x66, 0x77, 0x6f, 0x6e,
-0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x6b, 0x69, 0x74, 0x61, 0x74, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e,
-0x20, 0x41, 0x331, 0x74, 0x79, 0x69, 0x72, 0x69, 0x6e, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x6e, 0x69,
-0x6e, 0x61, 0x69, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x6b, 0x75, 0x6d, 0x76, 0x69, 0x72, 0x69, 0x79,
-0x69, 0x6e, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x53, 0x77, 0x61, 0x6b, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20,
-0x53, 0x77, 0x61, 0x6b, 0x20, 0x42, 0x27, 0x61, 0x331, 0x79, 0x72, 0x6e, 0x69, 0x67, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e,
-0x20, 0x53, 0x77, 0x61, 0x6b, 0x20, 0x42, 0x27, 0x61, 0x331, 0x68, 0x77, 0x61, 0x3b, 0x5a, 0x65, 0x6e, 0x3b, 0x46, 0x65,
-0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x76, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x67, 0x3b, 0x4c, 0x75,
-0x69, 0x3b, 0x41, 0x76, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x75, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69,
-0x63, 0x3b, 0x5a, 0x65, 0x6e, 0xe2, 0x72, 0x3b, 0x46, 0x65, 0x76, 0x72, 0xe2, 0x72, 0x3b, 0x4d, 0x61, 0x72, 0xe7, 0x3b,
-0x41, 0x76, 0x72, 0xee, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x67, 0x6e, 0x3b, 0x4c, 0x75, 0x69, 0x3b, 0x41,
-0x76, 0x6f, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x61, 0x72,
-0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x44, 0x69, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x5a,
-0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4c, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e,
-0x3b, 0x44, 0x3b, 0x50, 0x68, 0x61, 0x3b, 0x4c, 0x75, 0x68, 0x3b, 0x1e70, 0x68, 0x61, 0x3b, 0x4c, 0x61, 0x6d, 0x3b, 0x53,
-0x68, 0x75, 0x3b, 0x4c, 0x77, 0x69, 0x3b, 0x4c, 0x77, 0x61, 0x3b, 0x1e70, 0x68, 0x61, 0x3b, 0x4b, 0x68, 0x75, 0x3b, 0x54,
-0x73, 0x68, 0x3b, 0x1e3c, 0x61, 0x72, 0x3b, 0x4e, 0x79, 0x65, 0x3b, 0x50, 0x68, 0x61, 0x6e, 0x64, 0x6f, 0x3b, 0x4c, 0x75,
-0x68, 0x75, 0x68, 0x69, 0x3b, 0x1e70, 0x68, 0x61, 0x66, 0x61, 0x6d, 0x75, 0x68, 0x77, 0x65, 0x3b, 0x4c, 0x61, 0x6d, 0x62,
-0x61, 0x6d, 0x61, 0x69, 0x3b, 0x53, 0x68, 0x75, 0x6e, 0x64, 0x75, 0x6e, 0x74, 0x68, 0x75, 0x6c, 0x65, 0x3b, 0x46, 0x75,
-0x6c, 0x77, 0x69, 0x3b, 0x46, 0x75, 0x6c, 0x77, 0x61, 0x6e, 0x61, 0x3b, 0x1e70, 0x68, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x65,
-0x3b, 0x4b, 0x68, 0x75, 0x62, 0x76, 0x75, 0x6d, 0x65, 0x64, 0x7a, 0x69, 0x3b, 0x54, 0x73, 0x68, 0x69, 0x6d, 0x65, 0x64,
-0x7a, 0x69, 0x3b, 0x1e3c, 0x61, 0x72, 0x61, 0x3b, 0x4e, 0x79, 0x65, 0x6e, 0x64, 0x61, 0x76, 0x68, 0x75, 0x73, 0x69, 0x6b,
-0x75, 0x3b, 0x44, 0x7a, 0x76, 0x3b, 0x44, 0x7a, 0x64, 0x3b, 0x54, 0x65, 0x64, 0x3b, 0x41, 0x66, 0x254, 0x3b, 0x44, 0x61,
-0x6d, 0x3b, 0x4d, 0x61, 0x73, 0x3b, 0x53, 0x69, 0x61, 0x3b, 0x44, 0x65, 0x61, 0x3b, 0x41, 0x6e, 0x79, 0x3b, 0x4b, 0x65,
-0x6c, 0x3b, 0x41, 0x64, 0x65, 0x3b, 0x44, 0x7a, 0x6d, 0x3b, 0x44, 0x7a, 0x6f, 0x76, 0x65, 0x3b, 0x44, 0x7a, 0x6f, 0x64,
-0x7a, 0x65, 0x3b, 0x54, 0x65, 0x64, 0x6f, 0x78, 0x65, 0x3b, 0x41, 0x66, 0x254, 0x66, 0x69, 0x25b, 0x3b, 0x44, 0x61, 0x6d,
-0x61, 0x3b, 0x4d, 0x61, 0x73, 0x61, 0x3b, 0x53, 0x69, 0x61, 0x6d, 0x6c, 0x254, 0x6d, 0x3b, 0x44, 0x65, 0x61, 0x73, 0x69,
-0x61, 0x6d, 0x69, 0x6d, 0x65, 0x3b, 0x41, 0x6e, 0x79, 0x254, 0x6e, 0x79, 0x254, 0x3b, 0x4b, 0x65, 0x6c, 0x65, 0x3b, 0x41,
-0x64, 0x65, 0x25b, 0x6d, 0x65, 0x6b, 0x70, 0x254, 0x78, 0x65, 0x3b, 0x44, 0x7a, 0x6f, 0x6d, 0x65, 0x3b, 0x44, 0x3b, 0x44,
-0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x44, 0x3b, 0x4d, 0x3b, 0x53, 0x3b, 0x44, 0x3b, 0x41, 0x3b, 0x4b, 0x3b, 0x41, 0x3b, 0x44,
-0x3b, 0x49, 0x61, 0x6e, 0x2e, 0x3b, 0x50, 0x65, 0x70, 0x2e, 0x3b, 0x4d, 0x61, 0x6c, 0x2e, 0x3b, 0x2bb, 0x41, 0x70, 0x2e,
-0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x49, 0x75, 0x6e, 0x2e, 0x3b, 0x49, 0x75, 0x6c, 0x2e, 0x3b, 0x2bb, 0x41, 0x75, 0x2e, 0x3b,
-0x4b, 0x65, 0x70, 0x2e, 0x3b, 0x2bb, 0x4f, 0x6b, 0x2e, 0x3b, 0x4e, 0x6f, 0x77, 0x2e, 0x3b, 0x4b, 0x65, 0x6b, 0x2e, 0x3b,
-0x49, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x50, 0x65, 0x70, 0x65, 0x6c, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x4d, 0x61,
-0x6c, 0x61, 0x6b, 0x69, 0x3b, 0x2bb, 0x41, 0x70, 0x65, 0x6c, 0x69, 0x6c, 0x61, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x49, 0x75,
-0x6e, 0x65, 0x3b, 0x49, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x2bb, 0x41, 0x75, 0x6b, 0x61, 0x6b, 0x65, 0x3b, 0x4b, 0x65, 0x70,
-0x61, 0x6b, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x6b, 0x6f, 0x70, 0x61, 0x3b, 0x4e, 0x6f, 0x77,
-0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x4b, 0x65, 0x6b, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x4a, 0x75, 0x77, 0x3b, 0x53,
-0x77, 0x69, 0x3b, 0x54, 0x73, 0x61, 0x3b, 0x4e, 0x79, 0x61, 0x3b, 0x54, 0x73, 0x77, 0x3b, 0x41, 0x74, 0x61, 0x3b, 0x41,
-0x6e, 0x61, 0x3b, 0x41, 0x72, 0x69, 0x3b, 0x41, 0x6b, 0x75, 0x3b, 0x53, 0x77, 0x61, 0x3b, 0x4d, 0x61, 0x6e, 0x3b, 0x4d,
-0x61, 0x73, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x4a, 0x75, 0x77, 0x75, 0x6e, 0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20,
-0x53, 0x77, 0x69, 0x79, 0x61, 0x6e, 0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x54, 0x73, 0x61, 0x74, 0x3b, 0x5a, 0x77,
-0x61, 0x74, 0x20, 0x4e, 0x79, 0x61, 0x69, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x54, 0x73, 0x77, 0x6f, 0x6e, 0x3b, 0x5a,
-0x77, 0x61, 0x74, 0x20, 0x41, 0x74, 0x61, 0x61, 0x68, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x41, 0x6e, 0x61, 0x74, 0x61,
-0x74, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x41, 0x72, 0x69, 0x6e, 0x61, 0x69, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x41,
-0x6b, 0x75, 0x62, 0x75, 0x6e, 0x79, 0x75, 0x6e, 0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x53, 0x77, 0x61, 0x67, 0x3b,
-0x5a, 0x77, 0x61, 0x74, 0x20, 0x4d, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x77, 0x61, 0x6e, 0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74,
-0x20, 0x53, 0x77, 0x61, 0x67, 0x2d, 0x4d, 0x61, 0x2d, 0x53, 0x75, 0x79, 0x61, 0x6e, 0x67, 0x3b, 0x4a, 0x61, 0x6e, 0x3b,
-0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x6c, 0x3b, 0x45, 0x70, 0x75, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b,
-0x4a, 0x75, 0x6c, 0x3b, 0x4f, 0x67, 0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x75, 0x3b, 0x4e, 0x6f, 0x76, 0x3b,
-0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x77, 0x61, 0x6c, 0x65, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x6c, 0x75, 0x77,
-0x61, 0x6c, 0x65, 0x3b, 0x4d, 0x61, 0x6c, 0x69, 0x63, 0x68, 0x69, 0x3b, 0x45, 0x70, 0x75, 0x6c, 0x6f, 0x3b, 0x4d, 0x65,
-0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x4f, 0x67, 0x61, 0x73, 0x69, 0x74, 0x69,
-0x3b, 0x53, 0x65, 0x70, 0x75, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x75, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e,
-0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x45, 0x6e, 0x65, 0x3b, 0x50,
-0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x48, 0x75, 0x6e, 0x3b, 0x48,
-0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x62, 0x3b, 0x44,
-0x69, 0x73, 0x3b, 0x45, 0x6e, 0x65, 0x72, 0x6f, 0x3b, 0x50, 0x65, 0x62, 0x72, 0x65, 0x72, 0x6f, 0x3b, 0x4d, 0x61, 0x72,
-0x73, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x79, 0x6f, 0x3b, 0x48, 0x75, 0x6e, 0x79, 0x6f, 0x3b,
-0x48, 0x75, 0x6c, 0x79, 0x6f, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x79, 0x65, 0x6d, 0x62,
-0x72, 0x65, 0x3b, 0x4f, 0x6b, 0x74, 0x75, 0x62, 0x72, 0x65, 0x3b, 0x4e, 0x6f, 0x62, 0x79, 0x65, 0x6d, 0x62, 0x72, 0x65,
-0x3b, 0x44, 0x69, 0x73, 0x79, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x45, 0x3b, 0x50, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d,
-0x3b, 0x48, 0x3b, 0x48, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61,
-0x72, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c,
-0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73,
-0x63, 0x68, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62,
-0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0xe4, 0x6d, 0x62, 0x65, 0x72,
-0x3b, 0xa2cd, 0xa1aa, 0x3b, 0xa44d, 0xa1aa, 0x3b, 0xa315, 0xa1aa, 0x3b, 0xa1d6, 0xa1aa, 0x3b, 0xa26c, 0xa1aa, 0x3b, 0xa0d8, 0xa1aa, 0x3b, 0xa3c3,
-0xa1aa, 0x3b, 0xa246, 0xa1aa, 0x3b, 0xa22c, 0xa1aa, 0x3b, 0xa2b0, 0xa1aa, 0x3b, 0xa2b0, 0xa2aa, 0xa1aa, 0x3b, 0xa2b0, 0xa44b, 0xa1aa, 0x3b, 0x4a,
-0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a,
-0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x72, 0x68, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x55,
-0x73, 0x69, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x61, 0x62, 0x61, 0x72, 0x69, 0x3b, 0x75, 0x46, 0x65, 0x62,
-0x65, 0x72, 0x62, 0x61, 0x72, 0x69, 0x3b, 0x75, 0x4d, 0x61, 0x74, 0x6a, 0x68, 0x69, 0x3b, 0x75, 0x2d, 0x41, 0x70, 0x72,
-0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x65, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x79, 0x69,
-0x3b, 0x41, 0x72, 0x68, 0x6f, 0x73, 0x74, 0x6f, 0x73, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b,
-0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x55, 0x73, 0x69, 0x6e, 0x79, 0x69, 0x6b, 0x68, 0x61, 0x62, 0x61, 0x3b, 0x44,
-0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x74, 0x3b, 0x41,
-0x70, 0x6f, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53,
-0x65, 0x74, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x66, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x61, 0x77,
-0x61, 0x72, 0x65, 0x3b, 0x46, 0x65, 0x62, 0x65, 0x72, 0x77, 0x61, 0x72, 0x65, 0x3b, 0x4d, 0x61, 0x74, 0x161, 0x68, 0x65,
-0x3b, 0x41, 0x70, 0x6f, 0x72, 0x65, 0x6c, 0x65, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x65, 0x3b, 0x4a, 0x75,
-0x6c, 0x61, 0x65, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x73, 0x65, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d, 0x65, 0x72,
-0x65, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x6f, 0x72, 0x65, 0x3b, 0x4e, 0x6f, 0x66, 0x65, 0x6d, 0x65, 0x72, 0x65, 0x3b,
-0x44, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x72, 0x65, 0x3b, 0x6f, 0x111, 0x111, 0x61, 0x6a, 0x61, 0x67, 0x65, 0x3b, 0x67, 0x75,
-0x6f, 0x76, 0x76, 0x61, 0x3b, 0x6e, 0x6a, 0x75, 0x6b, 0x10d, 0x61, 0x3b, 0x63, 0x75, 0x6f, 0x14b, 0x6f, 0x3b, 0x6d, 0x69,
-0x65, 0x73, 0x73, 0x65, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x73, 0x65, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x64, 0x6e, 0x65, 0x3b,
-0x62, 0x6f, 0x72, 0x67, 0x65, 0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x61, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x67, 0x6f, 0x74, 0x3b,
-0x73, 0x6b, 0xe1, 0x62, 0x6d, 0x61, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x6c, 0x61, 0x3b, 0x6f, 0x111, 0x111, 0x61, 0x6a, 0x61,
-0x67, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x75, 0x6f, 0x76, 0x76, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b,
-0x6e, 0x6a, 0x75, 0x6b, 0x10d, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x63, 0x75, 0x6f, 0x14b, 0x6f, 0x6d, 0xe1, 0x6e,
-0x6e, 0x75, 0x3b, 0x6d, 0x69, 0x65, 0x73, 0x73, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x73,
-0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x64, 0x6e, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b,
-0x62, 0x6f, 0x72, 0x67, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x61, 0x6d, 0xe1, 0x6e, 0x6e,
-0x75, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x67, 0x6f, 0x74, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x73, 0x6b, 0xe1, 0x62, 0x6d,
-0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x6c, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x4f,
-0x3b, 0x47, 0x3b, 0x4e, 0x3b, 0x43, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x53, 0x3b, 0x42, 0x3b, 0x10c, 0x3b, 0x47, 0x3b, 0x53,
-0x3b, 0x4a, 0x3b, 0x6f, 0x111, 0x111, 0x6a, 0x3b, 0x67, 0x75, 0x6f, 0x76, 0x3b, 0x6e, 0x6a, 0x75, 0x6b, 0x3b, 0x63, 0x75,
-0x6f, 0x3b, 0x6d, 0x69, 0x65, 0x73, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x3b, 0x62, 0x6f, 0x72,
-0x67, 0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x3b, 0x73, 0x6b, 0xe1, 0x62, 0x3b, 0x6a, 0x75, 0x6f,
-0x76, 0x3b, 0x4b, 0x69, 0x69, 0x3b, 0x44, 0x68, 0x69, 0x3b, 0x54, 0x72, 0x69, 0x3b, 0x53, 0x70, 0x69, 0x3b, 0x52, 0x69,
-0x69, 0x3b, 0x4d, 0x74, 0x69, 0x3b, 0x45, 0x6d, 0x69, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d, 0x6e, 0x69, 0x3b, 0x4d, 0x78,
-0x69, 0x3b, 0x4d, 0x78, 0x6b, 0x3b, 0x4d, 0x78, 0x64, 0x3b, 0x4b, 0x69, 0x6e, 0x67, 0x61, 0x6c, 0x20, 0x69, 0x64, 0x61,
-0x73, 0x3b, 0x44, 0x68, 0x61, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x54, 0x72, 0x75, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b,
-0x53, 0x70, 0x61, 0x74, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x52, 0x69, 0x6d, 0x61, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b,
-0x4d, 0x61, 0x74, 0x61, 0x72, 0x75, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x45, 0x6d, 0x70, 0x69, 0x74, 0x75, 0x20, 0x69,
-0x64, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x73, 0x70, 0x61, 0x74, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x6e, 0x67, 0x61,
-0x72, 0x69, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x78, 0x61, 0x6c, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d,
-0x61, 0x78, 0x61, 0x6c, 0x20, 0x6b, 0x69, 0x6e, 0x67, 0x61, 0x6c, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x78,
-0x61, 0x6c, 0x20, 0x64, 0x68, 0x61, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x53, 0x3b,
-0x52, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x50, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x43, 0x61, 0x6e, 0x3b,
-0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b,
-0x43, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x62, 0x3b,
-0x44, 0x69, 0x73, 0x3b, 0x43, 0x68, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x72, 0x61, 0x72,
-0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x69, 0x72, 0x69, 0x72, 0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b,
-0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x43, 0x68, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x69, 0x3b, 0x53,
-0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x69, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x62, 0x65,
-0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x43, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b,
-0x4d, 0x3b, 0x4a, 0x3b, 0x43, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x49, 0x6d, 0x62, 0x3b,
-0x4b, 0x61, 0x77, 0x3b, 0x4b, 0x61, 0x64, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x4b, 0x61, 0x72, 0x3b,
-0x4d, 0x66, 0x75, 0x3b, 0x57, 0x75, 0x6e, 0x3b, 0x49, 0x6b, 0x65, 0x3b, 0x49, 0x6b, 0x75, 0x3b, 0x49, 0x6d, 0x77, 0x3b,
-0x49, 0x77, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6d, 0x62, 0x69, 0x72, 0x69,
-0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x77, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69,
-0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x64, 0x61, 0x64, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68,
-0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61,
-0x73, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x72, 0x61, 0x6e,
-0x64, 0x61, 0x64, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6d, 0x66, 0x75, 0x6e, 0x67,
-0x61, 0x64, 0x65, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x77, 0x75, 0x6e, 0x79, 0x61, 0x6e,
-0x79, 0x61, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b,
-0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69,
-0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x6d, 0x77, 0x65, 0x72,
-0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61,
-0x20, 0x69, 0x77, 0x69, 0x3b, 0x49, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4d, 0x3b, 0x57,
-0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x73, 0x69, 0x69, 0x3b, 0x63, 0x6f, 0x6c, 0x3b, 0x6d, 0x62, 0x6f,
-0x3b, 0x73, 0x65, 0x65, 0x3b, 0x64, 0x75, 0x75, 0x3b, 0x6b, 0x6f, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x3b, 0x6a, 0x75, 0x6b,
-0x3b, 0x73, 0x6c, 0x74, 0x3b, 0x79, 0x61, 0x72, 0x3b, 0x6a, 0x6f, 0x6c, 0x3b, 0x62, 0x6f, 0x77, 0x3b, 0x73, 0x69, 0x69,
-0x6c, 0x6f, 0x3b, 0x63, 0x6f, 0x6c, 0x74, 0x65, 0x3b, 0x6d, 0x62, 0x6f, 0x6f, 0x79, 0x3b, 0x73, 0x65, 0x65, 0x257, 0x74,
-0x6f, 0x3b, 0x64, 0x75, 0x75, 0x6a, 0x61, 0x6c, 0x3b, 0x6b, 0x6f, 0x72, 0x73, 0x65, 0x3b, 0x6d, 0x6f, 0x72, 0x73, 0x6f,
-0x3b, 0x6a, 0x75, 0x6b, 0x6f, 0x3b, 0x73, 0x69, 0x69, 0x6c, 0x74, 0x6f, 0x3b, 0x79, 0x61, 0x72, 0x6b, 0x6f, 0x6d, 0x61,
-0x61, 0x3b, 0x6a, 0x6f, 0x6c, 0x61, 0x6c, 0x3b, 0x62, 0x6f, 0x77, 0x74, 0x65, 0x3b, 0x73, 0x3b, 0x63, 0x3b, 0x6d, 0x3b,
-0x73, 0x3b, 0x64, 0x3b, 0x6b, 0x3b, 0x6d, 0x3b, 0x6a, 0x3b, 0x73, 0x3b, 0x79, 0x3b, 0x6a, 0x3b, 0x62, 0x3b, 0x4a, 0x45,
-0x4e, 0x3b, 0x57, 0x4b, 0x52, 0x3b, 0x57, 0x47, 0x54, 0x3b, 0x57, 0x4b, 0x4e, 0x3b, 0x57, 0x54, 0x4e, 0x3b, 0x57, 0x54,
-0x44, 0x3b, 0x57, 0x4d, 0x4a, 0x3b, 0x57, 0x4e, 0x4e, 0x3b, 0x57, 0x4b, 0x44, 0x3b, 0x57, 0x49, 0x4b, 0x3b, 0x57, 0x4d,
-0x57, 0x3b, 0x44, 0x49, 0x54, 0x3b, 0x4e, 0x6a, 0x65, 0x6e, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65,
-0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x72, 0x129, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61,
-0x74, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d,
-0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65,
-0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20,
-0x77, 0x61, 0x20, 0x6d, 0x169, 0x67, 0x77, 0x61, 0x6e, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61,
-0x20, 0x6b, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e,
-0x64, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x3b, 0x4d, 0x77,
-0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x169, 0x6d, 0x77, 0x65,
-0x3b, 0x4e, 0x64, 0x69, 0x74, 0x68, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x4b, 0x3b, 0x47,
-0x3b, 0x47, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x44, 0x3b, 0x4f, 0x62, 0x6f, 0x3b, 0x57,
-0x61, 0x61, 0x3b, 0x4f, 0x6b, 0x75, 0x3b, 0x4f, 0x6e, 0x67, 0x3b, 0x49, 0x6d, 0x65, 0x3b, 0x49, 0x6c, 0x65, 0x3b, 0x53,
-0x61, 0x70, 0x3b, 0x49, 0x73, 0x69, 0x3b, 0x53, 0x61, 0x61, 0x3b, 0x54, 0x6f, 0x6d, 0x3b, 0x54, 0x6f, 0x62, 0x3b, 0x54,
-0x6f, 0x77, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x62, 0x6f, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20,
-0x6c, 0x65, 0x20, 0x77, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x6b, 0x75,
-0x6e, 0x69, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x6e, 0x67, 0x27, 0x77, 0x61, 0x6e, 0x3b, 0x4c,
-0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x69, 0x6d, 0x65, 0x74, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20,
-0x69, 0x6c, 0x65, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x73, 0x61, 0x70, 0x61, 0x3b, 0x4c, 0x61, 0x70,
-0x61, 0x20, 0x6c, 0x65, 0x20, 0x69, 0x73, 0x69, 0x65, 0x74, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x73,
-0x61, 0x61, 0x6c, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x3b, 0x4c, 0x61,
-0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6f, 0x3b, 0x4c, 0x61, 0x70, 0x61,
-0x20, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x77, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x4f, 0x3b, 0x57, 0x3b,
-0x4f, 0x3b, 0x4f, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x54, 0x3b,
-0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b,
-0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x75, 0x67, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x75, 0x3b,
-0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x63, 0x3b, 0x4a, 0x61, 0x6e, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x46, 0x65, 0x76, 0x72,
-0x65, 0x69, 0x72, 0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x63, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69,
-0x6f, 0x3b, 0x4a, 0x75, 0x6e, 0x68, 0x6f, 0x3b, 0x4a, 0x75, 0x6c, 0x68, 0x6f, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74,
-0x6f, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x72, 0x6f, 0x3b, 0x4e, 0x6f,
-0x76, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x44, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x5a, 0x69, 0x62, 0x3b,
-0x4e, 0x68, 0x6c, 0x3b, 0x4d, 0x62, 0x69, 0x3b, 0x4d, 0x61, 0x62, 0x3b, 0x4e, 0x6b, 0x77, 0x3b, 0x4e, 0x68, 0x6c, 0x3b,
-0x4e, 0x74, 0x75, 0x3b, 0x4e, 0x63, 0x77, 0x3b, 0x4d, 0x70, 0x61, 0x3b, 0x4d, 0x66, 0x75, 0x3b, 0x4c, 0x77, 0x65, 0x3b,
-0x4d, 0x70, 0x61, 0x3b, 0x5a, 0x69, 0x62, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x6c, 0x61, 0x3b, 0x4e, 0x68, 0x6c, 0x6f, 0x6c,
-0x61, 0x6e, 0x6a, 0x61, 0x3b, 0x4d, 0x62, 0x69, 0x6d, 0x62, 0x69, 0x74, 0x68, 0x6f, 0x3b, 0x4d, 0x61, 0x62, 0x61, 0x73,
-0x61, 0x3b, 0x4e, 0x6b, 0x77, 0x65, 0x6e, 0x6b, 0x77, 0x65, 0x7a, 0x69, 0x3b, 0x4e, 0x68, 0x6c, 0x61, 0x6e, 0x67, 0x75,
-0x6c, 0x61, 0x3b, 0x4e, 0x74, 0x75, 0x6c, 0x69, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x4e, 0x63, 0x77, 0x61, 0x62, 0x61, 0x6b,
-0x61, 0x7a, 0x69, 0x3b, 0x4d, 0x70, 0x61, 0x6e, 0x64, 0x75, 0x6c, 0x61, 0x3b, 0x4d, 0x66, 0x75, 0x6d, 0x66, 0x75, 0x3b,
-0x4c, 0x77, 0x65, 0x7a, 0x69, 0x3b, 0x4d, 0x70, 0x61, 0x6c, 0x61, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x5a, 0x3b, 0x4e, 0x3b,
-0x4d, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b,
-0x4d, 0x31, 0x3b, 0x4d, 0x32, 0x3b, 0x4d, 0x33, 0x3b, 0x4d, 0x34, 0x3b, 0x4d, 0x35, 0x3b, 0x4d, 0x36, 0x3b, 0x4d, 0x37,
-0x3b, 0x4d, 0x38, 0x3b, 0x4d, 0x39, 0x3b, 0x4d, 0x31, 0x30, 0x3b, 0x4d, 0x31, 0x31, 0x3b, 0x4d, 0x31, 0x32, 0x3b, 0x4d,
-0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x77, 0x61, 0x6e, 0x7a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69,
-0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b,
-0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x61, 0x6e, 0x61,
-0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x74, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69,
-0x20, 0x77, 0x61, 0x20, 0x73, 0x69, 0x74, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x73, 0x61,
-0x62, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x4d, 0x77, 0x65,
-0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x74, 0x69, 0x73, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20,
-0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69,
-0x20, 0x6e, 0x61, 0x20, 0x6d, 0x6f, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b,
-0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x62, 0x69, 0x6c, 0x69, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b,
-0x3b, 0x54, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x69, 0x6e, 0x6e,
-0x3b, 0x62, 0x1e5b, 0x61, 0x3b, 0x6d, 0x61, 0x1e5b, 0x3b, 0x69, 0x62, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x79, 0x75, 0x6e,
-0x3b, 0x79, 0x75, 0x6c, 0x3b, 0x263, 0x75, 0x63, 0x3b, 0x63, 0x75, 0x74, 0x3b, 0x6b, 0x74, 0x75, 0x3b, 0x6e, 0x75, 0x77,
-0x3b, 0x64, 0x75, 0x6a, 0x3b, 0x69, 0x6e, 0x6e, 0x61, 0x79, 0x72, 0x3b, 0x62, 0x1e5b, 0x61, 0x79, 0x1e5b, 0x3b, 0x6d, 0x61,
-0x1e5b, 0x1e63, 0x3b, 0x69, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x79, 0x75, 0x6e, 0x79, 0x75,
-0x3b, 0x79, 0x75, 0x6c, 0x79, 0x75, 0x7a, 0x3b, 0x263, 0x75, 0x63, 0x74, 0x3b, 0x63, 0x75, 0x74, 0x61, 0x6e, 0x62, 0x69,
-0x72, 0x3b, 0x6b, 0x74, 0x75, 0x62, 0x72, 0x3b, 0x6e, 0x75, 0x77, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x64, 0x75, 0x6a,
-0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x69, 0x3b, 0x62, 0x3b, 0x6d, 0x3b, 0x69, 0x3b, 0x6d, 0x3b, 0x79, 0x3b, 0x79, 0x3b,
-0x263, 0x3b, 0x63, 0x3b, 0x6b, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x59, 0x65, 0x6e, 0x3b, 0x46, 0x75, 0x72, 0x3b, 0x4d, 0x65,
-0x263, 0x3b, 0x59, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x59, 0x75, 0x6e, 0x3b, 0x59, 0x75, 0x6c, 0x3b, 0x194, 0x75,
-0x63, 0x3b, 0x43, 0x74, 0x65, 0x3b, 0x54, 0x75, 0x62, 0x3b, 0x4e, 0x75, 0x6e, 0x3b, 0x44, 0x75, 0x1e7, 0x3b, 0x59, 0x65,
-0x6e, 0x6e, 0x61, 0x79, 0x65, 0x72, 0x3b, 0x46, 0x75, 0x1e5b, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x263, 0x72, 0x65, 0x73, 0x3b,
-0x59, 0x65, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6e, 0x79, 0x75, 0x3b, 0x59,
-0x75, 0x6c, 0x79, 0x75, 0x3b, 0x194, 0x75, 0x63, 0x74, 0x3b, 0x43, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x54, 0x75,
-0x62, 0x65, 0x1e5b, 0x3b, 0x4e, 0x75, 0x6e, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x44, 0x75, 0x1e7, 0x65, 0x6d, 0x62, 0x65,
-0x1e5b, 0x3b, 0x59, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x194, 0x3b, 0x43, 0x3b,
-0x54, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4b, 0x42, 0x5a, 0x3b, 0x4b, 0x42, 0x52, 0x3b, 0x4b, 0x53, 0x54, 0x3b, 0x4b, 0x4b,
-0x4e, 0x3b, 0x4b, 0x54, 0x4e, 0x3b, 0x4b, 0x4d, 0x4b, 0x3b, 0x4b, 0x4d, 0x53, 0x3b, 0x4b, 0x4d, 0x4e, 0x3b, 0x4b, 0x4d,
-0x4e, 0x3b, 0x4b, 0x4b, 0x4d, 0x3b, 0x4b, 0x4e, 0x4b, 0x3b, 0x4b, 0x4e, 0x42, 0x3b, 0x4f, 0x6b, 0x77, 0x6f, 0x6b, 0x75,
-0x62, 0x61, 0x6e, 0x7a, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4f, 0x6b, 0x77,
-0x61, 0x6b, 0x61, 0x73, 0x68, 0x61, 0x74, 0x75, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b,
-0x77, 0x61, 0x6b, 0x61, 0x74, 0x61, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x61, 0x67,
-0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x75, 0x73, 0x68, 0x61, 0x6e, 0x6a, 0x75, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d,
-0x75, 0x6e, 0x61, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x77, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4f, 0x6b,
-0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61,
-0x20, 0x6b, 0x75, 0x6d, 0x77, 0x65, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20,
-0x69, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x48, 0x75, 0x74, 0x3b, 0x56, 0x69, 0x6c, 0x3b, 0x44, 0x61, 0x74, 0x3b, 0x54, 0x61,
-0x69, 0x3b, 0x48, 0x61, 0x6e, 0x3b, 0x53, 0x69, 0x74, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x4e, 0x61, 0x6e, 0x3b, 0x54, 0x69,
-0x73, 0x3b, 0x4b, 0x75, 0x6d, 0x3b, 0x4b, 0x6d, 0x6a, 0x3b, 0x4b, 0x6d, 0x62, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65,
-0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x68, 0x75, 0x74, 0x61, 0x6c, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77,
-0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x76, 0x69, 0x6c, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x6d,
-0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x64, 0x61, 0x74, 0x75, 0x3b, 0x70, 0x61, 0x20,
-0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x74, 0x61, 0x69, 0x3b, 0x70, 0x61, 0x20,
-0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x68, 0x61, 0x6e, 0x75, 0x3b, 0x70, 0x61,
-0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x73, 0x69, 0x74, 0x61, 0x3b, 0x70, 0x61, 0x20,
-0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x73, 0x61, 0x62, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d,
-0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77,
-0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x74, 0x69, 0x73, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65,
-0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64,
-0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x6f, 0x6a, 0x61, 0x3b,
-0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e,
-0x61, 0x20, 0x6d, 0x62, 0x69, 0x6c, 0x69, 0x3b, 0x48, 0x3b, 0x56, 0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x48, 0x3b, 0x53, 0x3b,
-0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b,
-0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c,
-0x79, 0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x79, 0x61, 0x69, 0x3b,
-0x41, 0x67, 0x75, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f,
-0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x7a,
-0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6e, 0x61, 0x72, 0x3b, 0x61, 0x77, 0x69, 0x3b, 0x6d, 0x25b, 0x3b, 0x7a, 0x75,
-0x77, 0x3b, 0x7a, 0x75, 0x6c, 0x3b, 0x75, 0x74, 0x69, 0x3b, 0x73, 0x25b, 0x74, 0x3b, 0x254, 0x6b, 0x75, 0x3b, 0x6e, 0x6f,
-0x77, 0x3b, 0x64, 0x65, 0x73, 0x3b, 0x7a, 0x61, 0x6e, 0x77, 0x75, 0x79, 0x65, 0x3b, 0x66, 0x65, 0x62, 0x75, 0x72, 0x75,
-0x79, 0x65, 0x3b, 0x6d, 0x61, 0x72, 0x69, 0x73, 0x69, 0x3b, 0x61, 0x77, 0x69, 0x72, 0x69, 0x6c, 0x69, 0x3b, 0x6d, 0x25b,
-0x3b, 0x7a, 0x75, 0x77, 0x25b, 0x6e, 0x3b, 0x7a, 0x75, 0x6c, 0x75, 0x79, 0x65, 0x3b, 0x75, 0x74, 0x69, 0x3b, 0x73, 0x25b,
-0x74, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x254, 0x6b, 0x75, 0x74, 0x254, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x6e, 0x6f,
-0x77, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x64, 0x65, 0x73, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x5a, 0x3b,
-0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x5a, 0x3b, 0x5a, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x186, 0x3b, 0x4e, 0x3b,
-0x44, 0x3b, 0x4d, 0x62, 0x65, 0x3b, 0x4b, 0x61, 0x69, 0x3b, 0x4b, 0x61, 0x74, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x47, 0x61,
-0x74, 0x3b, 0x47, 0x61, 0x6e, 0x3b, 0x4d, 0x75, 0x67, 0x3b, 0x4b, 0x6e, 0x6e, 0x3b, 0x4b, 0x65, 0x6e, 0x3b, 0x49, 0x6b,
-0x75, 0x3b, 0x49, 0x6d, 0x77, 0x3b, 0x49, 0x67, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d,
-0x62, 0x65, 0x72, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x129, 0x72, 0x69, 0x3b,
-0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x68, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65,
-0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20,
-0x67, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61,
-0x6e, 0x74, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x169, 0x67, 0x77, 0x61,
-0x6e, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x3b,
-0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69,
-0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69,
-0x6b, 0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x169, 0x6d, 0x77, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77,
-0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x4b, 0x61, 0x129, 0x72, 0x129, 0x3b, 0x4d, 0x3b, 0x4b,
-0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x47, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49,
-0x3b, 0x13a4, 0x13c3, 0x3b, 0x13a7, 0x13a6, 0x3b, 0x13a0, 0x13c5, 0x3b, 0x13a7, 0x13ec, 0x3b, 0x13a0, 0x13c2, 0x3b, 0x13d5, 0x13ad, 0x3b, 0x13ab,
-0x13f0, 0x3b, 0x13a6, 0x13b6, 0x3b, 0x13da, 0x13b5, 0x3b, 0x13da, 0x13c2, 0x3b, 0x13c5, 0x13d3, 0x3b, 0x13a4, 0x13cd, 0x3b, 0x13a4, 0x13c3, 0x13b8,
-0x13d4, 0x13c5, 0x3b, 0x13a7, 0x13a6, 0x13b5, 0x3b, 0x13a0, 0x13c5, 0x13f1, 0x3b, 0x13a7, 0x13ec, 0x13c2, 0x3b, 0x13a0, 0x13c2, 0x13cd, 0x13ac, 0x13d8,
-0x3b, 0x13d5, 0x13ad, 0x13b7, 0x13f1, 0x3b, 0x13ab, 0x13f0, 0x13c9, 0x13c2, 0x3b, 0x13a6, 0x13b6, 0x13c2, 0x3b, 0x13da, 0x13b5, 0x13cd, 0x13d7, 0x3b,
-0x13da, 0x13c2, 0x13c5, 0x13d7, 0x3b, 0x13c5, 0x13d3, 0x13d5, 0x13c6, 0x3b, 0x13a4, 0x13cd, 0x13a9, 0x13f1, 0x3b, 0x13a4, 0x3b, 0x13a7, 0x3b, 0x13a0,
-0x3b, 0x13a7, 0x3b, 0x13a0, 0x3b, 0x13d5, 0x3b, 0x13ab, 0x3b, 0x13a6, 0x3b, 0x13da, 0x3b, 0x13da, 0x3b, 0x13c5, 0x3b, 0x13a4, 0x3b, 0x7a,
-0x61, 0x6e, 0x3b, 0x66, 0x65, 0x76, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x76, 0x72, 0x3b, 0x6d, 0x65, 0x3b, 0x7a, 0x69,
-0x6e, 0x3b, 0x7a, 0x69, 0x6c, 0x3b, 0x6f, 0x75, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f,
-0x76, 0x3b, 0x64, 0x65, 0x73, 0x3b, 0x7a, 0x61, 0x6e, 0x76, 0x69, 0x65, 0x3b, 0x66, 0x65, 0x76, 0x72, 0x69, 0x79, 0x65,
-0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x76, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x65, 0x3b, 0x7a, 0x69, 0x6e, 0x3b, 0x7a,
-0x69, 0x6c, 0x79, 0x65, 0x3b, 0x6f, 0x75, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x61, 0x6d, 0x3b, 0x6f, 0x6b, 0x74, 0x6f,
-0x62, 0x3b, 0x6e, 0x6f, 0x76, 0x61, 0x6d, 0x3b, 0x64, 0x65, 0x73, 0x61, 0x6d, 0x3b, 0x7a, 0x3b, 0x66, 0x3b, 0x6d, 0x3b,
-0x61, 0x3b, 0x6d, 0x3b, 0x7a, 0x3b, 0x7a, 0x3b, 0x6f, 0x3b, 0x73, 0x3b, 0x6f, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x4d, 0x77,
-0x65, 0x64, 0x69, 0x20, 0x4e, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20,
-0x50, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x54, 0x61, 0x74, 0x75, 0x3b, 0x4d,
-0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x63, 0x68, 0x65, 0x63, 0x68, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64,
-0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61,
-0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x55, 0x6d, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69,
-0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4d, 0x69, 0x76, 0x69, 0x6c, 0x69,
-0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20,
-0x4d, 0x69, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61,
-0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x63, 0x68, 0x65, 0x63, 0x68, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20,
-0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x3b,
-0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e,
-0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x55, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20,
-0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20,
-0x4d, 0x3b, 0x46, 0xfa, 0x6e, 0x67, 0x61, 0x74, 0x268, 0x3b, 0x4e, 0x61, 0x61, 0x6e, 0x268, 0x3b, 0x4b, 0x65, 0x65, 0x6e,
-0x64, 0x61, 0x3b, 0x49, 0x6b, 0xfa, 0x6d, 0x69, 0x3b, 0x49, 0x6e, 0x79, 0x61, 0x6d, 0x62, 0x61, 0x6c, 0x61, 0x3b, 0x49,
-0x64, 0x77, 0x61, 0x61, 0x74, 0x61, 0x3b, 0x4d, 0x289, 0x289, 0x6e, 0x63, 0x68, 0x268, 0x3b, 0x56, 0x268, 0x268, 0x72, 0x268,
-0x3b, 0x53, 0x61, 0x61, 0x74, 0x289, 0x3b, 0x49, 0x6e, 0x79, 0x69, 0x3b, 0x53, 0x61, 0x61, 0x6e, 0x6f, 0x3b, 0x53, 0x61,
-0x73, 0x61, 0x74, 0x289, 0x3b, 0x4b, 0x289, 0x66, 0xfa, 0x6e, 0x67, 0x61, 0x74, 0x268, 0x3b, 0x4b, 0x289, 0x6e, 0x61, 0x61,
-0x6e, 0x268, 0x3b, 0x4b, 0x289, 0x6b, 0x65, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6b, 0x75, 0x6d, 0x69,
-0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6e, 0x79, 0x61, 0x6d, 0x62, 0xe1, 0x6c, 0x61, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x64, 0x77,
-0x61, 0x61, 0x74, 0x61, 0x3b, 0x4b, 0x289, 0x6d, 0x289, 0x289, 0x6e, 0x63, 0x68, 0x268, 0x3b, 0x4b, 0x289, 0x76, 0x268, 0x268,
-0x72, 0x268, 0x3b, 0x4b, 0x289, 0x73, 0x61, 0x61, 0x74, 0x289, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6e, 0x79, 0x69, 0x3b, 0x4b,
-0x289, 0x73, 0x61, 0x61, 0x6e, 0x6f, 0x3b, 0x4b, 0x289, 0x73, 0x61, 0x73, 0x61, 0x74, 0x289, 0x3b, 0x46, 0x3b, 0x4e, 0x3b,
-0x4b, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x4d, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x53, 0x3b,
-0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x75, 0x3b, 0x4d, 0x61, 0x61, 0x3b,
-0x4a, 0x75, 0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x75, 0x3b, 0x53, 0x65, 0x62, 0x3b, 0x4f, 0x6b, 0x69, 0x3b,
-0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x77, 0x61, 0x6c, 0x69, 0x79, 0x6f, 0x3b, 0x46, 0x65,
-0x62, 0x77, 0x61, 0x6c, 0x69, 0x79, 0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x69, 0x73, 0x69, 0x3b, 0x41, 0x70, 0x75, 0x6c, 0x69,
-0x3b, 0x4d, 0x61, 0x61, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x61, 0x79, 0x69,
-0x3b, 0x41, 0x67, 0x75, 0x73, 0x69, 0x74, 0x6f, 0x3b, 0x53, 0x65, 0x62, 0x75, 0x74, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b,
-0x4f, 0x6b, 0x69, 0x74, 0x6f, 0x62, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73,
-0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x45, 0x70, 0x72,
-0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x4f, 0x67, 0x61, 0x3b, 0x53, 0x65, 0x70,
-0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69,
-0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x45, 0x70, 0x72, 0x65,
-0x6f, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x4f, 0x67, 0x61,
-0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b,
-0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x46, 0x3b,
-0x4d, 0x3b, 0x45, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x4f, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b,
-0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b,
-0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x75, 0x3b,
-0x4e, 0x75, 0x76, 0x3b, 0x44, 0x69, 0x7a, 0x3b, 0x4a, 0x61, 0x6e, 0x65, 0x72, 0x75, 0x3b, 0x46, 0x65, 0x76, 0x65, 0x72,
-0x65, 0x72, 0x75, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x75, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x75,
-0x3b, 0x4a, 0x75, 0x6e, 0x68, 0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x68, 0x75, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x75, 0x3b,
-0x53, 0x65, 0x74, 0x65, 0x6e, 0x62, 0x72, 0x75, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x72, 0x75, 0x3b, 0x4e, 0x75, 0x76, 0x65,
-0x6e, 0x62, 0x72, 0x75, 0x3b, 0x44, 0x69, 0x7a, 0x65, 0x6e, 0x62, 0x72, 0x75, 0x3b, 0x4a, 0x41, 0x4e, 0x3b, 0x46, 0x45,
-0x42, 0x3b, 0x4d, 0x41, 0x43, 0x3b, 0x128, 0x50, 0x55, 0x3b, 0x4d, 0x128, 0x128, 0x3b, 0x4e, 0x4a, 0x55, 0x3b, 0x4e, 0x4a,
-0x52, 0x3b, 0x41, 0x47, 0x41, 0x3b, 0x53, 0x50, 0x54, 0x3b, 0x4f, 0x4b, 0x54, 0x3b, 0x4e, 0x4f, 0x56, 0x3b, 0x44, 0x45,
-0x43, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x72, 0x75, 0x61, 0x72, 0x129, 0x3b,
-0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x128, 0x70, 0x75, 0x72, 0x169, 0x3b, 0x4d, 0x129, 0x129, 0x3b, 0x4e, 0x6a, 0x75, 0x6e,
-0x69, 0x3b, 0x4e, 0x6a, 0x75, 0x72, 0x61, 0x129, 0x3b, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74,
-0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x169, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b,
-0x44, 0x69, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x128, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b,
-0x4e, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4d, 0x75, 0x6c, 0x3b, 0x4e, 0x67, 0x61, 0x3b,
-0x4b, 0x69, 0x70, 0x3b, 0x49, 0x77, 0x61, 0x3b, 0x4e, 0x67, 0x65, 0x3b, 0x57, 0x61, 0x6b, 0x3b, 0x52, 0x6f, 0x70, 0x3b,
-0x4b, 0x6f, 0x67, 0x3b, 0x42, 0x75, 0x72, 0x3b, 0x45, 0x70, 0x65, 0x3b, 0x54, 0x61, 0x69, 0x3b, 0x41, 0x65, 0x6e, 0x3b,
-0x4d, 0x75, 0x6c, 0x67, 0x75, 0x6c, 0x3b, 0x4e, 0x67, 0x27, 0x61, 0x74, 0x79, 0x61, 0x74, 0x6f, 0x3b, 0x4b, 0x69, 0x70,
-0x74, 0x61, 0x6d, 0x6f, 0x3b, 0x49, 0x77, 0x61, 0x74, 0x20, 0x6b, 0x75, 0x74, 0x3b, 0x4e, 0x67, 0x27, 0x65, 0x69, 0x79,
-0x65, 0x74, 0x3b, 0x57, 0x61, 0x6b, 0x69, 0x3b, 0x52, 0x6f, 0x70, 0x74, 0x75, 0x69, 0x3b, 0x4b, 0x69, 0x70, 0x6b, 0x6f,
-0x67, 0x61, 0x67, 0x61, 0x3b, 0x42, 0x75, 0x72, 0x65, 0x74, 0x3b, 0x45, 0x70, 0x65, 0x73, 0x6f, 0x3b, 0x4b, 0x69, 0x70,
-0x73, 0x75, 0x6e, 0x64, 0x65, 0x20, 0x6e, 0x65, 0x74, 0x61, 0x69, 0x3b, 0x4b, 0x69, 0x70, 0x73, 0x75, 0x6e, 0x64, 0x65,
-0x20, 0x6e, 0x65, 0x62, 0x6f, 0x20, 0x61, 0x65, 0x6e, 0x67, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x4e,
-0x3b, 0x57, 0x3b, 0x52, 0x3b, 0x4b, 0x3b, 0x42, 0x3b, 0x45, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x1c3, 0x4b, 0x68, 0x61, 0x6e,
-0x6e, 0x69, 0x3b, 0x1c3, 0x4b, 0x68, 0x61, 0x6e, 0x1c0, 0x67, 0xf4, 0x61, 0x62, 0x3b, 0x1c0, 0x4b, 0x68, 0x75, 0x75, 0x1c1,
-0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x1c3, 0x48, 0xf4, 0x61, 0x1c2, 0x6b, 0x68, 0x61, 0x69, 0x62, 0x3b, 0x1c3, 0x4b, 0x68, 0x61,
-0x69, 0x74, 0x73, 0xe2, 0x62, 0x3b, 0x47, 0x61, 0x6d, 0x61, 0x1c0, 0x61, 0x65, 0x62, 0x3b, 0x1c2, 0x4b, 0x68, 0x6f, 0x65,
-0x73, 0x61, 0x6f, 0x62, 0x3b, 0x41, 0x6f, 0x1c1, 0x6b, 0x68, 0x75, 0x75, 0x6d, 0xfb, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b,
-0x54, 0x61, 0x72, 0x61, 0x1c0, 0x6b, 0x68, 0x75, 0x75, 0x6d, 0xfb, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x1c2, 0x4e, 0xfb,
-0x1c1, 0x6e, 0xe2, 0x69, 0x73, 0x65, 0x62, 0x3b, 0x1c0, 0x48, 0x6f, 0x6f, 0x1c2, 0x67, 0x61, 0x65, 0x62, 0x3b, 0x48, 0xf4,
-0x61, 0x73, 0x6f, 0x72, 0x65, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x4a, 0x61, 0x6e, 0x2e, 0x3b, 0x46, 0xe4, 0x62, 0x2e,
-0x3b, 0x4d, 0x61, 0x72, 0x2e, 0x3b, 0x41, 0x70, 0x72, 0x2e, 0x3b, 0x4d, 0xe4, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x2e, 0x3b,
-0x4a, 0x75, 0x6c, 0x2e, 0x3b, 0x4f, 0x75, 0x67, 0x2e, 0x3b, 0x53, 0xe4, 0x70, 0x2e, 0x3b, 0x4f, 0x6b, 0x74, 0x2e, 0x3b,
-0x4e, 0x6f, 0x76, 0x2e, 0x3b, 0x44, 0x65, 0x7a, 0x2e, 0x3b, 0x4a, 0x61, 0x6e, 0x6e, 0x65, 0x77, 0x61, 0x3b, 0x46, 0xe4,
-0x62, 0x72, 0x6f, 0x77, 0x61, 0x3b, 0x4d, 0xe4, 0xe4, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x65, 0x6c, 0x6c, 0x3b, 0x4d, 0xe4,
-0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6c, 0x69, 0x3b, 0x4f, 0x75, 0x6a, 0x6f, 0xdf, 0x3b,
-0x53, 0x65, 0x70, 0x74, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e,
-0x6f, 0x76, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x61, 0x6c,
-0x3b, 0x41, 0x72, 0xe1, 0x3b, 0x186, 0x25b, 0x6e, 0x3b, 0x44, 0x6f, 0x79, 0x3b, 0x4c, 0xe9, 0x70, 0x3b, 0x52, 0x6f, 0x6b,
-0x3b, 0x53, 0xe1, 0x73, 0x3b, 0x42, 0x254, 0x301, 0x72, 0x3b, 0x4b, 0xfa, 0x73, 0x3b, 0x47, 0xed, 0x73, 0x3b, 0x53, 0x68,
-0x289, 0x301, 0x3b, 0x4e, 0x74, 0x289, 0x301, 0x3b, 0x4f, 0x6c, 0x61, 0x64, 0x61, 0x6c, 0x289, 0x301, 0x3b, 0x41, 0x72, 0xe1,
-0x74, 0x3b, 0x186, 0x25b, 0x6e, 0x268, 0x301, 0x254, 0x268, 0x14b, 0x254, 0x6b, 0x3b, 0x4f, 0x6c, 0x6f, 0x64, 0x6f, 0x79, 0xed,
-0xf3, 0x72, 0xed, 0xea, 0x20, 0x69, 0x6e, 0x6b, 0xf3, 0x6b, 0xfa, 0xe2, 0x3b, 0x4f, 0x6c, 0x6f, 0x69, 0x6c, 0xe9, 0x70,
-0x16b, 0x6e, 0x79, 0x12b, 0x113, 0x20, 0x69, 0x6e, 0x6b, 0xf3, 0x6b, 0xfa, 0xe2, 0x3b, 0x4b, 0xfa, 0x6a, 0xfa, 0x254, 0x72,
-0x254, 0x6b, 0x3b, 0x4d, 0xf3, 0x72, 0x75, 0x73, 0xe1, 0x73, 0x69, 0x6e, 0x3b, 0x186, 0x6c, 0x254, 0x301, 0x268, 0x301, 0x62,
-0x254, 0x301, 0x72, 0xe1, 0x72, 0x25b, 0x3b, 0x4b, 0xfa, 0x73, 0x68, 0xee, 0x6e, 0x3b, 0x4f, 0x6c, 0x67, 0xed, 0x73, 0x61,
-0x6e, 0x3b, 0x50, 0x289, 0x73, 0x68, 0x289, 0x301, 0x6b, 0x61, 0x3b, 0x4e, 0x74, 0x289, 0x301, 0x14b, 0x289, 0x301, 0x73, 0x3b,
-0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b,
-0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b,
-0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b,
-0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b,
-0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x63, 0x3b, 0x52, 0x61, 0x72, 0x3b,
-0x4d, 0x75, 0x6b, 0x3b, 0x4b, 0x77, 0x61, 0x3b, 0x44, 0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4d, 0x6f, 0x64, 0x3b,
-0x4a, 0x6f, 0x6c, 0x3b, 0x50, 0x65, 0x64, 0x3b, 0x53, 0x6f, 0x6b, 0x3b, 0x54, 0x69, 0x62, 0x3b, 0x4c, 0x61, 0x62, 0x3b,
-0x50, 0x6f, 0x6f, 0x3b, 0x4f, 0x72, 0x61, 0x72, 0x61, 0x3b, 0x4f, 0x6d, 0x75, 0x6b, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d,
-0x67, 0x27, 0x3b, 0x4f, 0x64, 0x75, 0x6e, 0x67, 0x27, 0x65, 0x6c, 0x3b, 0x4f, 0x6d, 0x61, 0x72, 0x75, 0x6b, 0x3b, 0x4f,
-0x6d, 0x6f, 0x64, 0x6f, 0x6b, 0x27, 0x6b, 0x69, 0x6e, 0x67, 0x27, 0x6f, 0x6c, 0x3b, 0x4f, 0x6a, 0x6f, 0x6c, 0x61, 0x3b,
-0x4f, 0x70, 0x65, 0x64, 0x65, 0x6c, 0x3b, 0x4f, 0x73, 0x6f, 0x6b, 0x6f, 0x73, 0x6f, 0x6b, 0x6f, 0x6d, 0x61, 0x3b, 0x4f,
-0x74, 0x69, 0x62, 0x61, 0x72, 0x3b, 0x4f, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x3b, 0x4f, 0x70, 0x6f, 0x6f, 0x3b, 0x52, 0x3b,
-0x4d, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x4c, 0x3b,
-0x50, 0x3b, 0x17d, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x77, 0x69, 0x3b, 0x4d, 0x65,
-0x3b, 0x17d, 0x75, 0x77, 0x3b, 0x17d, 0x75, 0x79, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x6b, 0x3b, 0x4f, 0x6b, 0x74, 0x3b,
-0x4e, 0x6f, 0x6f, 0x3b, 0x44, 0x65, 0x65, 0x3b, 0x17d, 0x61, 0x6e, 0x77, 0x69, 0x79, 0x65, 0x3b, 0x46, 0x65, 0x65, 0x77,
-0x69, 0x72, 0x69, 0x79, 0x65, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x69, 0x3b, 0x41, 0x77, 0x69, 0x72, 0x69, 0x6c, 0x3b, 0x4d,
-0x65, 0x3b, 0x17d, 0x75, 0x77, 0x65, 0x14b, 0x3b, 0x17d, 0x75, 0x79, 0x79, 0x65, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x6b,
-0x74, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x75, 0x72, 0x3b, 0x4e, 0x6f, 0x6f, 0x77,
-0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x44, 0x65, 0x65, 0x73, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x17d, 0x3b, 0x46, 0x3b,
-0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x17d, 0x3b, 0x17d, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b,
-0x44, 0x41, 0x43, 0x3b, 0x44, 0x41, 0x52, 0x3b, 0x44, 0x41, 0x44, 0x3b, 0x44, 0x41, 0x4e, 0x3b, 0x44, 0x41, 0x48, 0x3b,
-0x44, 0x41, 0x55, 0x3b, 0x44, 0x41, 0x4f, 0x3b, 0x44, 0x41, 0x42, 0x3b, 0x44, 0x4f, 0x43, 0x3b, 0x44, 0x41, 0x50, 0x3b,
-0x44, 0x47, 0x49, 0x3b, 0x44, 0x41, 0x47, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x63, 0x68, 0x69,
-0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x44, 0x77, 0x65,
-0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x64, 0x65, 0x6b, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x6e,
-0x67, 0x27, 0x77, 0x65, 0x6e, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x62, 0x69, 0x63, 0x68, 0x3b,
-0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x75, 0x63, 0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20,
-0x6d, 0x61, 0x72, 0x20, 0x41, 0x62, 0x69, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20,
-0x41, 0x62, 0x6f, 0x72, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x4f, 0x63, 0x68, 0x69, 0x6b, 0x6f,
-0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x70, 0x61, 0x72, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61,
-0x72, 0x20, 0x67, 0x69, 0x20, 0x61, 0x63, 0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20,
-0x41, 0x70, 0x61, 0x72, 0x20, 0x67, 0x69, 0x20, 0x61, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x43, 0x3b, 0x52, 0x3b, 0x44, 0x3b,
-0x4e, 0x3b, 0x42, 0x3b, 0x55, 0x3b, 0x42, 0x3b, 0x42, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x59, 0x65,
-0x6e, 0x3b, 0x59, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x49, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x59, 0x75,
-0x6e, 0x3b, 0x59, 0x75, 0x6c, 0x3b, 0x194, 0x75, 0x63, 0x3b, 0x43, 0x75, 0x74, 0x3b, 0x4b, 0x1e6d, 0x75, 0x3b, 0x4e, 0x77,
-0x61, 0x3b, 0x44, 0x75, 0x6a, 0x3b, 0x59, 0x65, 0x6e, 0x6e, 0x61, 0x79, 0x65, 0x72, 0x3b, 0x59, 0x65, 0x62, 0x72, 0x61,
-0x79, 0x65, 0x72, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x3b, 0x49, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x79, 0x75,
-0x3b, 0x59, 0x75, 0x6e, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6c, 0x79, 0x75, 0x7a, 0x3b, 0x194, 0x75, 0x63, 0x74, 0x3b, 0x43,
-0x75, 0x74, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x4b, 0x1e6d, 0x75, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x77, 0x61, 0x6e, 0x62,
-0x69, 0x72, 0x3b, 0x44, 0x75, 0x6a, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x4d, 0x3b, 0x49, 0x3b,
-0x4d, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x194, 0x3b, 0x43, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4a, 0x61, 0x6e, 0x75,
-0x61, 0x6c, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x6c, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41,
-0x70, 0x6c, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69,
-0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74,
-0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b,
-
+0x3b, 0xb9a, 0xbc6, 0xbaa, 0xbcd, 0xb9f, 0xbc6, 0xbae, 0xbcd, 0xbaa, 0xbcd, 0xbb0, 0xbcd, 0x3b, 0xb85, 0xb95, 0xbcd, 0xb9f, 0xbcb, 0xbaa,
+0xbb0, 0xbcd, 0x3b, 0xba8, 0xbb5, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xb9f, 0xbbf, 0xb9a, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b,
+0xb9c, 0x3b, 0xbaa, 0xbbf, 0x3b, 0xbae, 0xbbe, 0x3b, 0xb8f, 0x3b, 0xbae, 0xbc7, 0x3b, 0xb9c, 0xbc2, 0x3b, 0xb9c, 0xbc2, 0x3b, 0xb86,
+0x3b, 0xb9a, 0xbc6, 0x3b, 0xb85, 0x3b, 0xba8, 0x3b, 0xb9f, 0xbbf, 0x3b, 0xc1c, 0xc28, 0xc35, 0xc30, 0xc3f, 0x3b, 0xc2b, 0xc3f, 0xc2c,
+0xc4d, 0xc30, 0xc35, 0xc30, 0xc3f, 0x3b, 0xc2e, 0xc3e, 0xc30, 0xc4d, 0xc1a, 0xc3f, 0x3b, 0xc0f, 0xc2a, 0xc4d, 0xc30, 0xc3f, 0xc32, 0xc4d,
+0x3b, 0xc2e, 0xc47, 0x3b, 0xc1c, 0xc42, 0xc28, 0xc4d, 0x3b, 0xc1c, 0xc42, 0xc32, 0xc48, 0x3b, 0xc06, 0xc17, 0xc38, 0xc4d, 0xc1f, 0xc41,
+0x3b, 0xc38, 0xc46, 0xc2a, 0xc4d, 0xc1f, 0xc46, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc05, 0xc15, 0xc4d, 0xc1f, 0xc4b, 0xc2c, 0xc30, 0xc4d,
+0x3b, 0xc28, 0xc35, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc21, 0xc3f, 0xc38, 0xc46, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc1c, 0x3b, 0xc2b,
+0xc3f, 0x3b, 0xc2e, 0x3b, 0xc0e, 0x3b, 0xc2e, 0xc46, 0x3b, 0xc1c, 0xc41, 0x3b, 0xc1c, 0xc41, 0x3b, 0xc06, 0x3b, 0xc38, 0xc46, 0x3b,
+0xc05, 0x3b, 0xc28, 0x3b, 0xc21, 0xc3f, 0x3b, 0xe21, 0x2e, 0xe04, 0x2e, 0x3b, 0xe01, 0x2e, 0xe1e, 0x2e, 0x3b, 0xe21, 0xe35, 0x2e,
+0xe04, 0x2e, 0x3b, 0xe40, 0xe21, 0x2e, 0xe22, 0x2e, 0x3b, 0xe1e, 0x2e, 0xe04, 0x2e, 0x3b, 0xe21, 0xe34, 0x2e, 0xe22, 0x2e, 0x3b,
+0xe01, 0x2e, 0xe04, 0x2e, 0x3b, 0xe2a, 0x2e, 0xe04, 0x2e, 0x3b, 0xe01, 0x2e, 0xe22, 0x2e, 0x3b, 0xe15, 0x2e, 0xe04, 0x2e, 0x3b,
+0xe1e, 0x2e, 0xe22, 0x2e, 0x3b, 0xe18, 0x2e, 0xe04, 0x2e, 0x3b, 0xe21, 0xe01, 0xe23, 0xe32, 0xe04, 0xe21, 0x3b, 0xe01, 0xe38, 0xe21,
+0xe20, 0xe32, 0xe1e, 0xe31, 0xe19, 0xe18, 0xe4c, 0x3b, 0xe21, 0xe35, 0xe19, 0xe32, 0xe04, 0xe21, 0x3b, 0xe40, 0xe21, 0xe29, 0xe32, 0xe22,
+0xe19, 0x3b, 0xe1e, 0xe24, 0xe29, 0xe20, 0xe32, 0xe04, 0xe21, 0x3b, 0xe21, 0xe34, 0xe16, 0xe38, 0xe19, 0xe32, 0xe22, 0xe19, 0x3b, 0xe01,
+0xe23, 0xe01, 0xe0e, 0xe32, 0xe04, 0xe21, 0x3b, 0xe2a, 0xe34, 0xe07, 0xe2b, 0xe32, 0xe04, 0xe21, 0x3b, 0xe01, 0xe31, 0xe19, 0xe22, 0xe32,
+0xe22, 0xe19, 0x3b, 0xe15, 0xe38, 0xe25, 0xe32, 0xe04, 0xe21, 0x3b, 0xe1e, 0xe24, 0xe28, 0xe08, 0xe34, 0xe01, 0xe32, 0xe22, 0xe19, 0x3b,
+0xe18, 0xe31, 0xe19, 0xe27, 0xe32, 0xe04, 0xe21, 0x3b, 0xe21, 0x3b, 0xe01, 0x3b, 0xe21, 0x3b, 0xe21, 0x3b, 0xe1e, 0x3b, 0xe21, 0x3b,
+0xe01, 0x3b, 0xe2a, 0x3b, 0xe01, 0x3b, 0xe15, 0x3b, 0xe1e, 0x3b, 0xe18, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0x3b, 0xf5f, 0xfb3, 0xf0b,
+0xf22, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf23, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf24, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf25, 0x3b, 0xf5f, 0xfb3, 0xf0b,
+0xf26, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf27, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf28, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf29, 0x3b, 0xf5f, 0xfb3, 0xf0b,
+0xf21, 0xf20, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf21, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf22, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b,
+0xf51, 0xf44, 0xf0b, 0xf54, 0xf7c, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b,
+0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf66, 0xf74, 0xf58, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf5e, 0xf72,
+0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf63, 0xf94, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b,
+0xf51, 0xfb2, 0xf74, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf51, 0xf74, 0xf53, 0xf0b, 0xf54, 0xf0b,
+0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf62, 0xf92, 0xfb1, 0xf51, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b,
+0xf51, 0xf42, 0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f,
+0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf45, 0xf72, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56,
+0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0x1325, 0x122a, 0x3b, 0x1208, 0x12ab, 0x1272, 0x3b,
+0x1218, 0x130b, 0x1262, 0x3b, 0x121a, 0x12eb, 0x12dd, 0x3b, 0x130d, 0x1295, 0x1266, 0x3b, 0x1230, 0x1290, 0x3b, 0x1213, 0x121d, 0x1208, 0x3b, 0x1290,
+0x1213, 0x1230, 0x3b, 0x1218, 0x1235, 0x12a8, 0x3b, 0x1325, 0x1245, 0x121d, 0x3b, 0x1215, 0x12f3, 0x122d, 0x3b, 0x1273, 0x1215, 0x1233, 0x3b, 0x1325,
+0x122a, 0x3b, 0x1208, 0x12ab, 0x1272, 0x1275, 0x3b, 0x1218, 0x130b, 0x1262, 0x1275, 0x3b, 0x121a, 0x12eb, 0x12dd, 0x12eb, 0x3b, 0x130d, 0x1295, 0x1266,
+0x1275, 0x3b, 0x1230, 0x1290, 0x3b, 0x1213, 0x121d, 0x1208, 0x3b, 0x1290, 0x1213, 0x1230, 0x3b, 0x1218, 0x1235, 0x12a8, 0x1228, 0x121d, 0x3b, 0x1325,
+0x1245, 0x121d, 0x1272, 0x3b, 0x1215, 0x12f3, 0x122d, 0x3b, 0x1273, 0x1215, 0x1233, 0x1235, 0x3b, 0x53, 0x101, 0x6e, 0x3b, 0x46, 0x113, 0x70,
+0x3b, 0x4d, 0x61, 0x2bb, 0x61, 0x3b, 0x2bb, 0x45, 0x70, 0x65, 0x3b, 0x4d, 0x113, 0x3b, 0x53, 0x75, 0x6e, 0x3b, 0x53, 0x69,
+0x75, 0x3b, 0x2bb, 0x41, 0x6f, 0x6b, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x3b, 0x4e, 0x14d, 0x76, 0x3b,
+0x54, 0x12b, 0x73, 0x3b, 0x53, 0x101, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x46, 0x113, 0x70, 0x75, 0x65, 0x6c, 0x69, 0x3b,
+0x4d, 0x61, 0x2bb, 0x61, 0x73, 0x69, 0x3b, 0x2bb, 0x45, 0x70, 0x65, 0x6c, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x113, 0x3b, 0x53,
+0x75, 0x6e, 0x65, 0x3b, 0x53, 0x69, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x2bb, 0x41, 0x6f, 0x6b, 0x6f, 0x73, 0x69, 0x3b, 0x53,
+0x65, 0x70, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x74, 0x6f, 0x70, 0x61, 0x3b, 0x4e, 0x14d, 0x76,
+0x65, 0x6d, 0x61, 0x3b, 0x54, 0x12b, 0x73, 0x65, 0x6d, 0x61, 0x3b, 0x53, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x4d,
+0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x53, 0x75, 0x6e, 0x3b, 0x59,
+0x61, 0x6e, 0x3b, 0x4b, 0x75, 0x6c, 0x3b, 0x44, 0x7a, 0x69, 0x3b, 0x4d, 0x75, 0x64, 0x3b, 0x4b, 0x68, 0x6f, 0x3b, 0x4d,
+0x61, 0x77, 0x3b, 0x4d, 0x68, 0x61, 0x3b, 0x4e, 0x64, 0x7a, 0x3b, 0x4e, 0x68, 0x6c, 0x3b, 0x48, 0x75, 0x6b, 0x3b, 0x4e,
+0x27, 0x77, 0x3b, 0x53, 0x75, 0x6e, 0x67, 0x75, 0x74, 0x69, 0x3b, 0x4e, 0x79, 0x65, 0x6e, 0x79, 0x65, 0x6e, 0x79, 0x61,
+0x6e, 0x69, 0x3b, 0x4e, 0x79, 0x65, 0x6e, 0x79, 0x61, 0x6e, 0x6b, 0x75, 0x6c, 0x75, 0x3b, 0x44, 0x7a, 0x69, 0x76, 0x61,
+0x6d, 0x69, 0x73, 0x6f, 0x6b, 0x6f, 0x3b, 0x4d, 0x75, 0x64, 0x79, 0x61, 0x78, 0x69, 0x68, 0x69, 0x3b, 0x4b, 0x68, 0x6f,
+0x74, 0x61, 0x76, 0x75, 0x78, 0x69, 0x6b, 0x61, 0x3b, 0x4d, 0x61, 0x77, 0x75, 0x77, 0x61, 0x6e, 0x69, 0x3b, 0x4d, 0x68,
+0x61, 0x77, 0x75, 0x72, 0x69, 0x3b, 0x4e, 0x64, 0x7a, 0x68, 0x61, 0x74, 0x69, 0x3b, 0x4e, 0x68, 0x6c, 0x61, 0x6e, 0x67,
+0x75, 0x6c, 0x61, 0x3b, 0x48, 0x75, 0x6b, 0x75, 0x72, 0x69, 0x3b, 0x4e, 0x27, 0x77, 0x65, 0x6e, 0x64, 0x7a, 0x61, 0x6d,
+0x68, 0x61, 0x6c, 0x61, 0x3b, 0x4f, 0x63, 0x61, 0x3b, 0x15e, 0x75, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4e, 0x69, 0x73,
+0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x48, 0x61, 0x7a, 0x3b, 0x54, 0x65, 0x6d, 0x3b, 0x41, 0x11f, 0x75, 0x3b, 0x45, 0x79, 0x6c,
+0x3b, 0x45, 0x6b, 0x69, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x41, 0x72, 0x61, 0x3b, 0x4f, 0x63, 0x61, 0x6b, 0x3b, 0x15e, 0x75,
+0x62, 0x61, 0x74, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x3b, 0x4e, 0x69, 0x73, 0x61, 0x6e, 0x3b, 0x4d, 0x61, 0x79, 0x131, 0x73,
+0x3b, 0x48, 0x61, 0x7a, 0x69, 0x72, 0x61, 0x6e, 0x3b, 0x54, 0x65, 0x6d, 0x6d, 0x75, 0x7a, 0x3b, 0x41, 0x11f, 0x75, 0x73,
+0x74, 0x6f, 0x73, 0x3b, 0x45, 0x79, 0x6c, 0xfc, 0x6c, 0x3b, 0x45, 0x6b, 0x69, 0x6d, 0x3b, 0x4b, 0x61, 0x73, 0x131, 0x6d,
+0x3b, 0x41, 0x72, 0x61, 0x6c, 0x131, 0x6b, 0x3b, 0x4f, 0x3b, 0x15e, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4d, 0x3b, 0x48, 0x3b,
+0x54, 0x3b, 0x41, 0x3b, 0x45, 0x3b, 0x45, 0x3b, 0x4b, 0x3b, 0x41, 0x3b, 0x441, 0x456, 0x447, 0x2e, 0x3b, 0x43b, 0x44e, 0x442,
+0x2e, 0x3b, 0x431, 0x435, 0x440, 0x2e, 0x3b, 0x43a, 0x432, 0x456, 0x442, 0x2e, 0x3b, 0x442, 0x440, 0x430, 0x432, 0x2e, 0x3b, 0x447,
+0x435, 0x440, 0x432, 0x2e, 0x3b, 0x43b, 0x438, 0x43f, 0x2e, 0x3b, 0x441, 0x435, 0x440, 0x43f, 0x2e, 0x3b, 0x432, 0x435, 0x440, 0x2e,
+0x3b, 0x436, 0x43e, 0x432, 0x442, 0x2e, 0x3b, 0x43b, 0x438, 0x441, 0x442, 0x2e, 0x3b, 0x433, 0x440, 0x443, 0x434, 0x2e, 0x3b, 0x441,
+0x456, 0x447, 0x43d, 0x44f, 0x3b, 0x43b, 0x44e, 0x442, 0x43e, 0x433, 0x43e, 0x3b, 0x431, 0x435, 0x440, 0x435, 0x437, 0x43d, 0x44f, 0x3b,
+0x43a, 0x432, 0x456, 0x442, 0x43d, 0x44f, 0x3b, 0x442, 0x440, 0x430, 0x432, 0x43d, 0x44f, 0x3b, 0x447, 0x435, 0x440, 0x432, 0x43d, 0x44f,
+0x3b, 0x43b, 0x438, 0x43f, 0x43d, 0x44f, 0x3b, 0x441, 0x435, 0x440, 0x43f, 0x43d, 0x44f, 0x3b, 0x432, 0x435, 0x440, 0x435, 0x441, 0x43d,
+0x44f, 0x3b, 0x436, 0x43e, 0x432, 0x442, 0x43d, 0x44f, 0x3b, 0x43b, 0x438, 0x441, 0x442, 0x43e, 0x43f, 0x430, 0x434, 0x430, 0x3b, 0x433,
+0x440, 0x443, 0x434, 0x43d, 0x44f, 0x3b, 0x421, 0x3b, 0x41b, 0x3b, 0x411, 0x3b, 0x41a, 0x3b, 0x422, 0x3b, 0x427, 0x3b, 0x41b, 0x3b,
+0x421, 0x3b, 0x412, 0x3b, 0x416, 0x3b, 0x41b, 0x3b, 0x413, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x6cc, 0x3b, 0x641, 0x631, 0x648, 0x631,
+0x6cc, 0x3b, 0x645, 0x627, 0x631, 0x20, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x64a, 0x644, 0x3b, 0x645, 0x626, 0x3b, 0x62c, 0x648, 0x646,
+0x3b, 0x62c, 0x648, 0x644, 0x627, 0x626, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9,
+0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x41c, 0x443, 0x4b3,
+0x430, 0x440, 0x440, 0x430, 0x43c, 0x3b, 0x421, 0x430, 0x444, 0x430, 0x440, 0x3b, 0x420, 0x430, 0x431, 0x438, 0x443, 0x43b, 0x2d, 0x430,
+0x432, 0x432, 0x430, 0x43b, 0x3b, 0x420, 0x430, 0x431, 0x438, 0x443, 0x43b, 0x2d, 0x43e, 0x445, 0x438, 0x440, 0x3b, 0x416, 0x443, 0x43c,
+0x43e, 0x434, 0x438, 0x443, 0x43b, 0x2d, 0x443, 0x43b, 0x43e, 0x3b, 0x416, 0x443, 0x43c, 0x43e, 0x434, 0x438, 0x443, 0x43b, 0x2d, 0x443,
+0x445, 0x440, 0x43e, 0x3b, 0x420, 0x430, 0x436, 0x430, 0x431, 0x3b, 0x428, 0x430, 0x44a, 0x431, 0x43e, 0x43d, 0x3b, 0x420, 0x430, 0x43c,
+0x430, 0x437, 0x43e, 0x43d, 0x3b, 0x428, 0x430, 0x432, 0x432, 0x43e, 0x43b, 0x3b, 0x417, 0x438, 0x43b, 0x2d, 0x49b, 0x430, 0x44a, 0x434,
+0x430, 0x3b, 0x417, 0x438, 0x43b, 0x2d, 0x4b3, 0x438, 0x436, 0x436, 0x430, 0x3b, 0x62c, 0x646, 0x648, 0x3b, 0x641, 0x628, 0x631, 0x3b,
+0x645, 0x627, 0x631, 0x3b, 0x627, 0x67e, 0x631, 0x3b, 0x645, 0x640, 0x6cc, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x3b,
+0x627, 0x6af, 0x633, 0x3b, 0x633, 0x67e, 0x62a, 0x3b, 0x627, 0x6a9, 0x62a, 0x3b, 0x646, 0x648, 0x645, 0x3b, 0x62f, 0x633, 0x645, 0x3b,
+0x74, 0x68, 0x67, 0x20, 0x31, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x32, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x33, 0x3b, 0x74, 0x68,
+0x67, 0x20, 0x34, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x35, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x36, 0x3b, 0x74, 0x68, 0x67, 0x20,
+0x37, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x38, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x39, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x30,
+0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x31, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x32, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67,
+0x20, 0x6d, 0x1ed9, 0x74, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x68, 0x61, 0x69, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67,
+0x20, 0x62, 0x61, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x74, 0x1b0, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x6e,
+0x103, 0x6d, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x73, 0xe1, 0x75, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x62,
+0x1ea3, 0x79, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x74, 0xe1, 0x6d, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x63,
+0x68, 0xed, 0x6e, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x6d, 0x1b0, 0x1edd, 0x69, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67,
+0x20, 0x6d, 0x1b0, 0x1edd, 0x69, 0x20, 0x6d, 0x1ed9, 0x74, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x6d, 0x1b0, 0x1edd, 0x69,
+0x20, 0x68, 0x61, 0x69, 0x3b, 0x49, 0x6f, 0x6e, 0x3b, 0x43, 0x68, 0x77, 0x65, 0x66, 0x3b, 0x4d, 0x61, 0x77, 0x72, 0x74,
+0x68, 0x3b, 0x45, 0x62, 0x72, 0x69, 0x6c, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d, 0x65, 0x68, 0x3b, 0x47, 0x6f, 0x72,
+0x66, 0x66, 0x3b, 0x41, 0x77, 0x73, 0x74, 0x3b, 0x4d, 0x65, 0x64, 0x69, 0x3b, 0x48, 0x79, 0x64, 0x3b, 0x54, 0x61, 0x63,
+0x68, 0x3b, 0x52, 0x68, 0x61, 0x67, 0x3b, 0x49, 0x6f, 0x6e, 0x61, 0x77, 0x72, 0x3b, 0x43, 0x68, 0x77, 0x65, 0x66, 0x72,
+0x6f, 0x72, 0x3b, 0x4d, 0x61, 0x77, 0x72, 0x74, 0x68, 0x3b, 0x45, 0x62, 0x72, 0x69, 0x6c, 0x6c, 0x3b, 0x4d, 0x61, 0x69,
+0x3b, 0x4d, 0x65, 0x68, 0x65, 0x66, 0x69, 0x6e, 0x3b, 0x47, 0x6f, 0x72, 0x66, 0x66, 0x65, 0x6e, 0x61, 0x66, 0x3b, 0x41,
+0x77, 0x73, 0x74, 0x3b, 0x4d, 0x65, 0x64, 0x69, 0x3b, 0x48, 0x79, 0x64, 0x72, 0x65, 0x66, 0x3b, 0x54, 0x61, 0x63, 0x68,
+0x77, 0x65, 0x64, 0x64, 0x3b, 0x52, 0x68, 0x61, 0x67, 0x66, 0x79, 0x72, 0x3b, 0x49, 0x3b, 0x43, 0x3b, 0x4d, 0x3b, 0x45,
+0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x52, 0x3b, 0x4a, 0x61, 0x6e,
+0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x74, 0x3b, 0x45, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a, 0x75, 0x6e,
+0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76,
+0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x79, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75,
+0x77, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x74, 0x73, 0x68, 0x69, 0x3b, 0x45, 0x70, 0x72, 0x65, 0x6c, 0x69, 0x3b, 0x4d,
+0x65, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x79, 0x69, 0x3b, 0x41, 0x67, 0x61, 0x73,
+0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x68, 0x6f, 0x62, 0x61, 0x3b,
+0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x1e62, 0x1eb9, 0x301, 0x72,
+0x1eb9, 0x323, 0x3b, 0xc8, 0x72, 0xe8, 0x6c, 0xe8, 0x3b, 0x1eb8, 0x72, 0x1eb9, 0x300, 0x6e, 0xe0, 0x3b, 0xcc, 0x67, 0x62, 0xe9,
+0x3b, 0x1eb8, 0x300, 0x62, 0x69, 0x62, 0x69, 0x3b, 0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x41, 0x67, 0x1eb9, 0x6d, 0x1ecd, 0x3b,
+0xd2, 0x67, 0xfa, 0x6e, 0x3b, 0x4f, 0x77, 0x65, 0x77, 0x65, 0x3b, 0x1ecc, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x42, 0xe9,
+0x6c, 0xfa, 0x3b, 0x1ecc, 0x300, 0x70, 0x1eb9, 0x300, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1e62, 0x1eb8, 0x301, 0x72, 0x1eb9, 0x301, 0x3b,
+0x4f, 0x1e62, 0xf9, 0x20, 0xc8, 0x72, 0xe8, 0x6c, 0xe8, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1eb8, 0x72, 0x1eb9, 0x300, 0x6e, 0xe0,
+0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0xcc, 0x67, 0x62, 0xe9, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1eb8, 0x300, 0x62, 0x69, 0x62, 0x69,
+0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x41, 0x67, 0x1eb9, 0x6d, 0x1ecd,
+0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0xd2, 0x67, 0xfa, 0x6e, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x4f, 0x77, 0x65, 0x77, 0x65, 0x3b,
+0x4f, 0x1e62, 0xf9, 0x20, 0x1ecc, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x42, 0xe9, 0x6c, 0xfa, 0x3b,
+0x4f, 0x1e62, 0xf9, 0x20, 0x1ecc, 0x300, 0x70, 0x1eb9, 0x300, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61,
+0x73, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67,
+0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61,
+0x6e, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x73,
+0x68, 0x69, 0x3b, 0x41, 0x70, 0x72, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x65, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b,
+0x4a, 0x75, 0x6c, 0x61, 0x79, 0x69, 0x3b, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x68, 0x65,
+0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x68, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b,
+0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b,
+0x41, 0x70, 0x72, 0x3b, 0x4d, 0x61, 0x6a, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x76, 0x67, 0x3b,
+0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x63, 0x3b, 0x4a, 0x61, 0x6e, 0x75,
+0x61, 0x72, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x69,
+0x6c, 0x3b, 0x4d, 0x61, 0x6a, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x76, 0x67, 0x75,
+0x73, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x72,
+0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4a,
+0x2d, 0x67, 0x75, 0x65, 0x72, 0x3b, 0x54, 0x2d, 0x61, 0x72, 0x72, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x79, 0x72, 0x6e, 0x74,
+0x3b, 0x41, 0x76, 0x72, 0x72, 0x69, 0x6c, 0x3b, 0x42, 0x6f, 0x61, 0x6c, 0x64, 0x79, 0x6e, 0x3b, 0x4d, 0x2d, 0x73, 0x6f,
+0x75, 0x72, 0x65, 0x65, 0x3b, 0x4a, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4c, 0x75, 0x61, 0x6e, 0x69, 0x73,
+0x74, 0x79, 0x6e, 0x3b, 0x4d, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4a, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69,
+0x72, 0x3b, 0x4d, 0x2e, 0x48, 0x6f, 0x75, 0x6e, 0x65, 0x79, 0x3b, 0x4d, 0x2e, 0x4e, 0x6f, 0x6c, 0x6c, 0x69, 0x63, 0x6b,
+0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x67, 0x65, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x54, 0x6f, 0x73, 0x68, 0x69,
+0x61, 0x67, 0x68, 0x74, 0x2d, 0x61, 0x72, 0x72, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x79, 0x72, 0x6e, 0x74, 0x3b, 0x41, 0x76,
+0x65, 0x72, 0x69, 0x6c, 0x3b, 0x42, 0x6f, 0x61, 0x6c, 0x64, 0x79, 0x6e, 0x3b, 0x4d, 0x65, 0x61, 0x6e, 0x2d, 0x73, 0x6f,
+0x75, 0x72, 0x65, 0x65, 0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4c,
+0x75, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x79, 0x6e, 0x3b, 0x4d, 0x65, 0x61, 0x6e, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72,
+0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4d, 0x65, 0x65, 0x20, 0x48,
+0x6f, 0x75, 0x6e, 0x65, 0x79, 0x3b, 0x4d, 0x65, 0x65, 0x20, 0x6e, 0x79, 0x20, 0x4e, 0x6f, 0x6c, 0x6c, 0x69, 0x63, 0x6b,
+0x3b, 0x47, 0x65, 0x6e, 0x3b, 0x57, 0x68, 0x65, 0x3b, 0x4d, 0x65, 0x72, 0x3b, 0x45, 0x62, 0x72, 0x3b, 0x4d, 0x65, 0x3b,
+0x45, 0x66, 0x6e, 0x3b, 0x47, 0x6f, 0x72, 0x3b, 0x45, 0x73, 0x74, 0x3b, 0x47, 0x77, 0x6e, 0x3b, 0x48, 0x65, 0x64, 0x3b,
+0x44, 0x75, 0x3b, 0x4b, 0x65, 0x76, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x47, 0x65, 0x6e, 0x76, 0x65, 0x72, 0x3b, 0x4d, 0x79,
+0x73, 0x20, 0x57, 0x68, 0x65, 0x76, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x4d, 0x65, 0x72, 0x74, 0x68, 0x3b,
+0x4d, 0x79, 0x73, 0x20, 0x45, 0x62, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x4d, 0x65, 0x3b, 0x4d, 0x79, 0x73,
+0x20, 0x45, 0x66, 0x61, 0x6e, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x47, 0x6f, 0x72, 0x74, 0x68, 0x65, 0x72, 0x65, 0x6e, 0x3b,
+0x4d, 0x79, 0x65, 0x20, 0x45, 0x73, 0x74, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x47, 0x77, 0x79, 0x6e, 0x67, 0x61, 0x6c, 0x61,
+0x3b, 0x4d, 0x79, 0x73, 0x20, 0x48, 0x65, 0x64, 0x72, 0x61, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x44, 0x75, 0x3b, 0x4d, 0x79,
+0x73, 0x20, 0x4b, 0x65, 0x76, 0x61, 0x72, 0x64, 0x68, 0x75, 0x3b, 0x53, 0x2d, 0x186, 0x3b, 0x4b, 0x2d, 0x186, 0x3b, 0x45,
+0x2d, 0x186, 0x3b, 0x45, 0x2d, 0x4f, 0x3b, 0x45, 0x2d, 0x4b, 0x3b, 0x4f, 0x2d, 0x41, 0x3b, 0x41, 0x2d, 0x4b, 0x3b, 0x44,
+0x2d, 0x186, 0x3b, 0x46, 0x2d, 0x190, 0x3b, 0x186, 0x2d, 0x41, 0x3b, 0x186, 0x2d, 0x4f, 0x3b, 0x4d, 0x2d, 0x186, 0x3b, 0x53,
+0x61, 0x6e, 0x64, 0x61, 0x2d, 0x186, 0x70, 0x25b, 0x70, 0x254, 0x6e, 0x3b, 0x4b, 0x77, 0x61, 0x6b, 0x77, 0x61, 0x72, 0x2d,
+0x186, 0x67, 0x79, 0x65, 0x66, 0x75, 0x6f, 0x3b, 0x45, 0x62, 0x254, 0x77, 0x2d, 0x186, 0x62, 0x65, 0x6e, 0x65, 0x6d, 0x3b,
+0x45, 0x62, 0x254, 0x62, 0x69, 0x72, 0x61, 0x2d, 0x4f, 0x66, 0x6f, 0x72, 0x69, 0x73, 0x75, 0x6f, 0x3b, 0x45, 0x73, 0x75,
+0x73, 0x6f, 0x77, 0x20, 0x41, 0x6b, 0x65, 0x74, 0x73, 0x65, 0x61, 0x62, 0x61, 0x2d, 0x4b, 0x254, 0x74, 0x254, 0x6e, 0x69,
+0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x62, 0x69, 0x72, 0x61, 0x64, 0x65, 0x2d, 0x41, 0x79, 0x25b, 0x77, 0x6f, 0x68, 0x6f, 0x6d,
+0x75, 0x6d, 0x75, 0x3b, 0x41, 0x79, 0x25b, 0x77, 0x6f, 0x68, 0x6f, 0x2d, 0x4b, 0x69, 0x74, 0x61, 0x77, 0x6f, 0x6e, 0x73,
+0x61, 0x3b, 0x44, 0x69, 0x66, 0x75, 0x75, 0x2d, 0x186, 0x73, 0x61, 0x6e, 0x64, 0x61, 0x61, 0x3b, 0x46, 0x61, 0x6e, 0x6b,
+0x77, 0x61, 0x2d, 0x190, 0x62, 0x254, 0x3b, 0x186, 0x62, 0x25b, 0x73, 0x25b, 0x2d, 0x41, 0x68, 0x69, 0x6e, 0x69, 0x6d, 0x65,
+0x3b, 0x186, 0x62, 0x65, 0x72, 0x25b, 0x66, 0x25b, 0x77, 0x2d, 0x4f, 0x62, 0x75, 0x62, 0x75, 0x6f, 0x3b, 0x4d, 0x75, 0x6d,
+0x75, 0x2d, 0x186, 0x70, 0x25b, 0x6e, 0x69, 0x6d, 0x62, 0x61, 0x3b, 0x91c, 0x93e, 0x928, 0x947, 0x935, 0x93e, 0x930, 0x940, 0x3b,
+0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x90f, 0x92a, 0x94d,
+0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x942, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x948, 0x3b, 0x913, 0x917, 0x938, 0x94d,
+0x91f, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x913, 0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b,
+0x928, 0x94b, 0x935, 0x94d, 0x939, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x41, 0x68,
+0x61, 0x3b, 0x4f, 0x66, 0x6c, 0x3b, 0x4f, 0x63, 0x68, 0x3b, 0x41, 0x62, 0x65, 0x3b, 0x41, 0x67, 0x62, 0x3b, 0x4f, 0x74,
+0x75, 0x3b, 0x4d, 0x61, 0x61, 0x3b, 0x4d, 0x61, 0x6e, 0x3b, 0x47, 0x62, 0x6f, 0x3b, 0x41, 0x6e, 0x74, 0x3b, 0x41, 0x6c,
+0x65, 0x3b, 0x41, 0x66, 0x75, 0x3b, 0x41, 0x68, 0x61, 0x72, 0x61, 0x62, 0x61, 0x74, 0x61, 0x3b, 0x4f, 0x66, 0x6c, 0x6f,
+0x3b, 0x4f, 0x63, 0x68, 0x6f, 0x6b, 0x72, 0x69, 0x6b, 0x72, 0x69, 0x3b, 0x41, 0x62, 0x65, 0x69, 0x62, 0x65, 0x65, 0x3b,
+0x41, 0x67, 0x62, 0x65, 0x69, 0x6e, 0x61, 0x61, 0x3b, 0x4f, 0x74, 0x75, 0x6b, 0x77, 0x61, 0x64, 0x61, 0x6e, 0x3b, 0x4d,
+0x61, 0x61, 0x77, 0x65, 0x3b, 0x4d, 0x61, 0x6e, 0x79, 0x61, 0x77, 0x61, 0x6c, 0x65, 0x3b, 0x47, 0x62, 0x6f, 0x3b, 0x41,
+0x6e, 0x74, 0x6f, 0x6e, 0x3b, 0x41, 0x6c, 0x65, 0x6d, 0x6c, 0x65, 0x3b, 0x41, 0x66, 0x75, 0x61, 0x62, 0x65, 0x65, 0x3b,
+0x4a, 0x65, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x61, 0x3b, 0x45, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x65, 0x3b,
+0x4a, 0x75, 0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x1ecc, 0x67, 0x1ecd, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x1ecc, 0x6b, 0x74, 0x3b,
+0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x65, 0x6e, 0x1ee5, 0x77, 0x61, 0x72, 0x1ecb, 0x3b, 0x46, 0x65, 0x62,
+0x72, 0x1ee5, 0x77, 0x61, 0x72, 0x1ecb, 0x3b, 0x4d, 0x61, 0x61, 0x63, 0x68, 0x1ecb, 0x3b, 0x45, 0x70, 0x72, 0x65, 0x6c, 0x3b,
+0x4d, 0x65, 0x65, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x1ecb, 0x3b, 0x1ecc, 0x67, 0x1ecd, 0x1ecd, 0x73,
+0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x1ecc, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f,
+0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4d, 0x62, 0x65, 0x3b, 0x4b, 0x65,
+0x6c, 0x3b, 0x4b, 0x74, 0x169, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x4b, 0x74, 0x6e, 0x3b, 0x54, 0x68, 0x61, 0x3b, 0x4d, 0x6f,
+0x6f, 0x3b, 0x4e, 0x79, 0x61, 0x3b, 0x4b, 0x6e, 0x64, 0x3b, 0x128, 0x6b, 0x75, 0x3b, 0x128, 0x6b, 0x6d, 0x3b, 0x128, 0x6b,
+0x6c, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x62, 0x65, 0x65, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20,
+0x77, 0x61, 0x20, 0x6b, 0x65, 0x6c, 0x129, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61,
+0x74, 0x169, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69,
+0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x74,
+0x68, 0x61, 0x6e, 0x74, 0x68, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x75, 0x6f,
+0x6e, 0x7a, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6e, 0x79, 0x61, 0x61, 0x6e, 0x79, 0x61, 0x3b,
+0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77,
+0x61, 0x20, 0x129, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x129, 0x6b, 0x75, 0x6d,
+0x69, 0x20, 0x6e, 0x61, 0x20, 0x129, 0x6d, 0x77, 0x65, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x129, 0x6b,
+0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x6c, 0x129, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b,
+0x3b, 0x54, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x128, 0x3b, 0x128, 0x3b, 0x128, 0x3b, 0x70f, 0x71f, 0x722, 0x20, 0x70f,
+0x712, 0x3b, 0x72b, 0x712, 0x71b, 0x3b, 0x710, 0x715, 0x72a, 0x3b, 0x722, 0x71d, 0x723, 0x722, 0x3b, 0x710, 0x71d, 0x72a, 0x3b, 0x71a,
+0x719, 0x71d, 0x72a, 0x722, 0x3b, 0x72c, 0x721, 0x718, 0x719, 0x3b, 0x710, 0x712, 0x3b, 0x710, 0x71d, 0x720, 0x718, 0x720, 0x3b, 0x70f,
+0x72c, 0x72b, 0x20, 0x70f, 0x710, 0x3b, 0x70f, 0x72c, 0x72b, 0x20, 0x70f, 0x712, 0x3b, 0x70f, 0x71f, 0x722, 0x20, 0x70f, 0x710, 0x3b,
+0x120d, 0x12f0, 0x1275, 0x3b, 0x12ab, 0x1265, 0x12bd, 0x3b, 0x12ad, 0x1265, 0x120b, 0x3b, 0x134b, 0x1305, 0x12ba, 0x3b, 0x12ad, 0x1262, 0x1245, 0x3b,
+0x121d, 0x2f, 0x1275, 0x3b, 0x12b0, 0x122d, 0x3b, 0x121b, 0x122d, 0x12eb, 0x3b, 0x12eb, 0x12b8, 0x1292, 0x3b, 0x1218, 0x1270, 0x1209, 0x3b, 0x121d,
+0x2f, 0x121d, 0x3b, 0x1270, 0x1215, 0x1233, 0x3b, 0x120d, 0x12f0, 0x1275, 0x122a, 0x3b, 0x12ab, 0x1265, 0x12bd, 0x1265, 0x1272, 0x3b, 0x12ad, 0x1265,
+0x120b, 0x3b, 0x134b, 0x1305, 0x12ba, 0x122a, 0x3b, 0x12ad, 0x1262, 0x1245, 0x122a, 0x3b, 0x121d, 0x12aa, 0x12a4, 0x120d, 0x20, 0x1275, 0x131f, 0x1292,
+0x122a, 0x3b, 0x12b0, 0x122d, 0x12a9, 0x3b, 0x121b, 0x122d, 0x12eb, 0x121d, 0x20, 0x1275, 0x122a, 0x3b, 0x12eb, 0x12b8, 0x1292, 0x20, 0x1218, 0x1233,
+0x1245, 0x1208, 0x122a, 0x3b, 0x1218, 0x1270, 0x1209, 0x3b, 0x121d, 0x12aa, 0x12a4, 0x120d, 0x20, 0x1218, 0x123d, 0x12c8, 0x122a, 0x3b, 0x1270, 0x1215,
+0x1233, 0x1235, 0x122a, 0x3b, 0x120d, 0x3b, 0x12ab, 0x3b, 0x12ad, 0x3b, 0x134b, 0x3b, 0x12ad, 0x3b, 0x121d, 0x3b, 0x12b0, 0x3b, 0x121b, 0x3b,
+0x12eb, 0x3b, 0x1218, 0x3b, 0x121d, 0x3b, 0x1270, 0x3b, 0x1320, 0x1210, 0x1228, 0x3b, 0x12a8, 0x1270, 0x1270, 0x3b, 0x1218, 0x1308, 0x1260, 0x3b,
+0x12a0, 0x1280, 0x12d8, 0x3b, 0x130d, 0x1295, 0x1263, 0x1275, 0x3b, 0x1220, 0x1295, 0x12e8, 0x3b, 0x1210, 0x1218, 0x1208, 0x3b, 0x1290, 0x1210, 0x1230,
+0x3b, 0x12a8, 0x1228, 0x1218, 0x3b, 0x1320, 0x1240, 0x1218, 0x3b, 0x1280, 0x12f0, 0x1228, 0x3b, 0x1280, 0x1220, 0x1220, 0x3b, 0x1320, 0x3b, 0x12a8,
+0x3b, 0x1218, 0x3b, 0x12a0, 0x3b, 0x130d, 0x3b, 0x1220, 0x3b, 0x1210, 0x3b, 0x1290, 0x3b, 0x12a8, 0x3b, 0x1320, 0x3b, 0x1280, 0x3b, 0x1280,
+0x3b, 0x57, 0x65, 0x79, 0x3b, 0x46, 0x61, 0x6e, 0x3b, 0x54, 0x61, 0x74, 0x3b, 0x4e, 0x61, 0x6e, 0x3b, 0x54, 0x75, 0x79,
+0x3b, 0x54, 0x73, 0x6f, 0x3b, 0x54, 0x61, 0x66, 0x3b, 0x57, 0x61, 0x72, 0x3b, 0x4b, 0x75, 0x6e, 0x3b, 0x42, 0x61, 0x6e,
+0x3b, 0x4b, 0x6f, 0x6d, 0x3b, 0x53, 0x61, 0x75, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x57, 0x65, 0x79, 0x65, 0x6e, 0x65, 0x3b,
+0x46, 0x61, 0x69, 0x20, 0x46, 0x61, 0x6e, 0x69, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x54, 0x61, 0x74, 0x61, 0x6b, 0x61, 0x3b,
+0x46, 0x61, 0x69, 0x20, 0x4e, 0x61, 0x6e, 0x67, 0x72, 0x61, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x54, 0x75, 0x79, 0x6f, 0x3b,
+0x46, 0x61, 0x69, 0x20, 0x54, 0x73, 0x6f, 0x79, 0x69, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x54, 0x61, 0x66, 0x61, 0x6b, 0x61,
+0x3b, 0x46, 0x61, 0x69, 0x20, 0x57, 0x61, 0x72, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x4b, 0x75, 0x6e,
+0x6f, 0x62, 0x6f, 0x6b, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x42, 0x61, 0x6e, 0x73, 0x6f, 0x6b, 0x3b, 0x46, 0x61, 0x69, 0x20,
+0x4b, 0x6f, 0x6d, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x53, 0x61, 0x75, 0x6b, 0x3b, 0x44, 0x79, 0x6f, 0x6e, 0x3b, 0x42, 0x61,
+0x61, 0x3b, 0x41, 0x74, 0x61, 0x74, 0x3b, 0x41, 0x6e, 0x61, 0x73, 0x3b, 0x41, 0x74, 0x79, 0x6f, 0x3b, 0x41, 0x63, 0x68,
+0x69, 0x3b, 0x41, 0x74, 0x61, 0x72, 0x3b, 0x41, 0x77, 0x75, 0x72, 0x3b, 0x53, 0x68, 0x61, 0x64, 0x3b, 0x53, 0x68, 0x61,
+0x6b, 0x3b, 0x4e, 0x61, 0x62, 0x61, 0x3b, 0x4e, 0x61, 0x74, 0x61, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x44, 0x79, 0x6f, 0x6e,
+0x3b, 0x50, 0x65, 0x6e, 0x20, 0x42, 0x61, 0x27, 0x61, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x74, 0x61, 0x74, 0x3b, 0x50,
+0x65, 0x6e, 0x20, 0x41, 0x6e, 0x61, 0x73, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x74, 0x79, 0x6f, 0x6e, 0x3b, 0x50, 0x65,
+0x6e, 0x20, 0x41, 0x63, 0x68, 0x69, 0x72, 0x69, 0x6d, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x74, 0x61, 0x72, 0x69, 0x62,
+0x61, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x77, 0x75, 0x72, 0x72, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x53, 0x68, 0x61, 0x64,
+0x6f, 0x6e, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x53, 0x68, 0x61, 0x6b, 0x75, 0x72, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x4b, 0x75,
+0x72, 0x20, 0x4e, 0x61, 0x62, 0x61, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x4b, 0x75, 0x72, 0x20, 0x4e, 0x61, 0x74, 0x61, 0x74,
+0x3b, 0x41, 0x331, 0x79, 0x72, 0x3b, 0x41, 0x331, 0x68, 0x77, 0x3b, 0x41, 0x331, 0x74, 0x61, 0x3b, 0x41, 0x331, 0x6e, 0x61,
+0x3b, 0x41, 0x331, 0x70, 0x66, 0x3b, 0x41, 0x331, 0x6b, 0x69, 0x3b, 0x41, 0x331, 0x74, 0x79, 0x3b, 0x41, 0x331, 0x6e, 0x69,
+0x3b, 0x41, 0x331, 0x6b, 0x75, 0x3b, 0x53, 0x77, 0x61, 0x3b, 0x53, 0x62, 0x79, 0x3b, 0x53, 0x62, 0x68, 0x3b, 0x48, 0x79,
+0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x79, 0x72, 0x6e, 0x69, 0x67, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331,
+0x68, 0x77, 0x61, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x74, 0x61, 0x74, 0x3b, 0x48, 0x79, 0x77, 0x61,
+0x6e, 0x20, 0x41, 0x331, 0x6e, 0x61, 0x61, 0x69, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x70, 0x66, 0x77,
+0x6f, 0x6e, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x6b, 0x69, 0x74, 0x61, 0x74, 0x3b, 0x48, 0x79, 0x77,
+0x61, 0x6e, 0x20, 0x41, 0x331, 0x74, 0x79, 0x69, 0x72, 0x69, 0x6e, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331,
+0x6e, 0x69, 0x6e, 0x61, 0x69, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x6b, 0x75, 0x6d, 0x76, 0x69, 0x72,
+0x69, 0x79, 0x69, 0x6e, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x53, 0x77, 0x61, 0x6b, 0x3b, 0x48, 0x79, 0x77, 0x61,
+0x6e, 0x20, 0x53, 0x77, 0x61, 0x6b, 0x20, 0x42, 0x27, 0x61, 0x331, 0x79, 0x72, 0x6e, 0x69, 0x67, 0x3b, 0x48, 0x79, 0x77,
+0x61, 0x6e, 0x20, 0x53, 0x77, 0x61, 0x6b, 0x20, 0x42, 0x27, 0x61, 0x331, 0x68, 0x77, 0x61, 0x3b, 0x5a, 0x65, 0x6e, 0x3b,
+0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x76, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x67, 0x3b,
+0x4c, 0x75, 0x69, 0x3b, 0x41, 0x76, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x75, 0x3b, 0x4e, 0x6f, 0x76, 0x3b,
+0x44, 0x69, 0x63, 0x3b, 0x5a, 0x65, 0x6e, 0xe2, 0x72, 0x3b, 0x46, 0x65, 0x76, 0x72, 0xe2, 0x72, 0x3b, 0x4d, 0x61, 0x72,
+0xe7, 0x3b, 0x41, 0x76, 0x72, 0xee, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x67, 0x6e, 0x3b, 0x4c, 0x75, 0x69,
+0x3b, 0x41, 0x76, 0x6f, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4f, 0x74, 0x75, 0x62,
+0x61, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x44, 0x69, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x72,
+0x3b, 0x5a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4c, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f,
+0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x50, 0x68, 0x61, 0x3b, 0x4c, 0x75, 0x68, 0x3b, 0x1e70, 0x68, 0x61, 0x3b, 0x4c, 0x61, 0x6d,
+0x3b, 0x53, 0x68, 0x75, 0x3b, 0x4c, 0x77, 0x69, 0x3b, 0x4c, 0x77, 0x61, 0x3b, 0x1e70, 0x68, 0x61, 0x3b, 0x4b, 0x68, 0x75,
+0x3b, 0x54, 0x73, 0x68, 0x3b, 0x1e3c, 0x61, 0x72, 0x3b, 0x4e, 0x79, 0x65, 0x3b, 0x50, 0x68, 0x61, 0x6e, 0x64, 0x6f, 0x3b,
+0x4c, 0x75, 0x68, 0x75, 0x68, 0x69, 0x3b, 0x1e70, 0x68, 0x61, 0x66, 0x61, 0x6d, 0x75, 0x68, 0x77, 0x65, 0x3b, 0x4c, 0x61,
+0x6d, 0x62, 0x61, 0x6d, 0x61, 0x69, 0x3b, 0x53, 0x68, 0x75, 0x6e, 0x64, 0x75, 0x6e, 0x74, 0x68, 0x75, 0x6c, 0x65, 0x3b,
+0x46, 0x75, 0x6c, 0x77, 0x69, 0x3b, 0x46, 0x75, 0x6c, 0x77, 0x61, 0x6e, 0x61, 0x3b, 0x1e70, 0x68, 0x61, 0x6e, 0x67, 0x75,
+0x6c, 0x65, 0x3b, 0x4b, 0x68, 0x75, 0x62, 0x76, 0x75, 0x6d, 0x65, 0x64, 0x7a, 0x69, 0x3b, 0x54, 0x73, 0x68, 0x69, 0x6d,
+0x65, 0x64, 0x7a, 0x69, 0x3b, 0x1e3c, 0x61, 0x72, 0x61, 0x3b, 0x4e, 0x79, 0x65, 0x6e, 0x64, 0x61, 0x76, 0x68, 0x75, 0x73,
+0x69, 0x6b, 0x75, 0x3b, 0x44, 0x7a, 0x76, 0x3b, 0x44, 0x7a, 0x64, 0x3b, 0x54, 0x65, 0x64, 0x3b, 0x41, 0x66, 0x254, 0x3b,
+0x44, 0x61, 0x6d, 0x3b, 0x4d, 0x61, 0x73, 0x3b, 0x53, 0x69, 0x61, 0x3b, 0x44, 0x65, 0x61, 0x3b, 0x41, 0x6e, 0x79, 0x3b,
+0x4b, 0x65, 0x6c, 0x3b, 0x41, 0x64, 0x65, 0x3b, 0x44, 0x7a, 0x6d, 0x3b, 0x44, 0x7a, 0x6f, 0x76, 0x65, 0x3b, 0x44, 0x7a,
+0x6f, 0x64, 0x7a, 0x65, 0x3b, 0x54, 0x65, 0x64, 0x6f, 0x78, 0x65, 0x3b, 0x41, 0x66, 0x254, 0x66, 0x69, 0x25b, 0x3b, 0x44,
+0x61, 0x6d, 0x61, 0x3b, 0x4d, 0x61, 0x73, 0x61, 0x3b, 0x53, 0x69, 0x61, 0x6d, 0x6c, 0x254, 0x6d, 0x3b, 0x44, 0x65, 0x61,
+0x73, 0x69, 0x61, 0x6d, 0x69, 0x6d, 0x65, 0x3b, 0x41, 0x6e, 0x79, 0x254, 0x6e, 0x79, 0x254, 0x3b, 0x4b, 0x65, 0x6c, 0x65,
+0x3b, 0x41, 0x64, 0x65, 0x25b, 0x6d, 0x65, 0x6b, 0x70, 0x254, 0x78, 0x65, 0x3b, 0x44, 0x7a, 0x6f, 0x6d, 0x65, 0x3b, 0x44,
+0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x44, 0x3b, 0x4d, 0x3b, 0x53, 0x3b, 0x44, 0x3b, 0x41, 0x3b, 0x4b, 0x3b, 0x41,
+0x3b, 0x44, 0x3b, 0x49, 0x61, 0x6e, 0x2e, 0x3b, 0x50, 0x65, 0x70, 0x2e, 0x3b, 0x4d, 0x61, 0x6c, 0x2e, 0x3b, 0x2bb, 0x41,
+0x70, 0x2e, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x49, 0x75, 0x6e, 0x2e, 0x3b, 0x49, 0x75, 0x6c, 0x2e, 0x3b, 0x2bb, 0x41, 0x75,
+0x2e, 0x3b, 0x4b, 0x65, 0x70, 0x2e, 0x3b, 0x2bb, 0x4f, 0x6b, 0x2e, 0x3b, 0x4e, 0x6f, 0x77, 0x2e, 0x3b, 0x4b, 0x65, 0x6b,
+0x2e, 0x3b, 0x49, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x50, 0x65, 0x70, 0x65, 0x6c, 0x75, 0x61, 0x6c, 0x69, 0x3b,
+0x4d, 0x61, 0x6c, 0x61, 0x6b, 0x69, 0x3b, 0x2bb, 0x41, 0x70, 0x65, 0x6c, 0x69, 0x6c, 0x61, 0x3b, 0x4d, 0x65, 0x69, 0x3b,
+0x49, 0x75, 0x6e, 0x65, 0x3b, 0x49, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x2bb, 0x41, 0x75, 0x6b, 0x61, 0x6b, 0x65, 0x3b, 0x4b,
+0x65, 0x70, 0x61, 0x6b, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x6b, 0x6f, 0x70, 0x61, 0x3b, 0x4e,
+0x6f, 0x77, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x4b, 0x65, 0x6b, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x4a, 0x75, 0x77,
+0x3b, 0x53, 0x77, 0x69, 0x3b, 0x54, 0x73, 0x61, 0x3b, 0x4e, 0x79, 0x61, 0x3b, 0x54, 0x73, 0x77, 0x3b, 0x41, 0x74, 0x61,
+0x3b, 0x41, 0x6e, 0x61, 0x3b, 0x41, 0x72, 0x69, 0x3b, 0x41, 0x6b, 0x75, 0x3b, 0x53, 0x77, 0x61, 0x3b, 0x4d, 0x61, 0x6e,
+0x3b, 0x4d, 0x61, 0x73, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x4a, 0x75, 0x77, 0x75, 0x6e, 0x67, 0x3b, 0x5a, 0x77, 0x61,
+0x74, 0x20, 0x53, 0x77, 0x69, 0x79, 0x61, 0x6e, 0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x54, 0x73, 0x61, 0x74, 0x3b,
+0x5a, 0x77, 0x61, 0x74, 0x20, 0x4e, 0x79, 0x61, 0x69, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x54, 0x73, 0x77, 0x6f, 0x6e,
+0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x41, 0x74, 0x61, 0x61, 0x68, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x41, 0x6e, 0x61,
+0x74, 0x61, 0x74, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x41, 0x72, 0x69, 0x6e, 0x61, 0x69, 0x3b, 0x5a, 0x77, 0x61, 0x74,
+0x20, 0x41, 0x6b, 0x75, 0x62, 0x75, 0x6e, 0x79, 0x75, 0x6e, 0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x53, 0x77, 0x61,
+0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x4d, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x77, 0x61, 0x6e, 0x67, 0x3b, 0x5a, 0x77,
+0x61, 0x74, 0x20, 0x53, 0x77, 0x61, 0x67, 0x2d, 0x4d, 0x61, 0x2d, 0x53, 0x75, 0x79, 0x61, 0x6e, 0x67, 0x3b, 0x4a, 0x61,
+0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x6c, 0x3b, 0x45, 0x70, 0x75, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75,
+0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x4f, 0x67, 0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x75, 0x3b, 0x4e, 0x6f,
+0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x77, 0x61, 0x6c, 0x65, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x6c,
+0x75, 0x77, 0x61, 0x6c, 0x65, 0x3b, 0x4d, 0x61, 0x6c, 0x69, 0x63, 0x68, 0x69, 0x3b, 0x45, 0x70, 0x75, 0x6c, 0x6f, 0x3b,
+0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x4f, 0x67, 0x61, 0x73, 0x69,
+0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x75, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x75, 0x74, 0x6f, 0x62, 0x61,
+0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x45, 0x6e, 0x65,
+0x3b, 0x50, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x48, 0x75, 0x6e,
+0x3b, 0x48, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x62,
+0x3b, 0x44, 0x69, 0x73, 0x3b, 0x45, 0x6e, 0x65, 0x72, 0x6f, 0x3b, 0x50, 0x65, 0x62, 0x72, 0x65, 0x72, 0x6f, 0x3b, 0x4d,
+0x61, 0x72, 0x73, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x79, 0x6f, 0x3b, 0x48, 0x75, 0x6e, 0x79,
+0x6f, 0x3b, 0x48, 0x75, 0x6c, 0x79, 0x6f, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x79, 0x65,
+0x6d, 0x62, 0x72, 0x65, 0x3b, 0x4f, 0x6b, 0x74, 0x75, 0x62, 0x72, 0x65, 0x3b, 0x4e, 0x6f, 0x62, 0x79, 0x65, 0x6d, 0x62,
+0x72, 0x65, 0x3b, 0x44, 0x69, 0x73, 0x79, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x45, 0x3b, 0x50, 0x3b, 0x4d, 0x3b, 0x41,
+0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x48, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4a, 0x61, 0x6e,
+0x75, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70, 0x72,
+0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67,
+0x75, 0x73, 0x63, 0x68, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f,
+0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0xe4, 0x6d, 0x62,
+0x65, 0x72, 0x3b, 0xa2cd, 0xa1aa, 0x3b, 0xa44d, 0xa1aa, 0x3b, 0xa315, 0xa1aa, 0x3b, 0xa1d6, 0xa1aa, 0x3b, 0xa26c, 0xa1aa, 0x3b, 0xa0d8, 0xa1aa,
+0x3b, 0xa3c3, 0xa1aa, 0x3b, 0xa246, 0xa1aa, 0x3b, 0xa22c, 0xa1aa, 0x3b, 0xa2b0, 0xa1aa, 0x3b, 0xa2b0, 0xa2aa, 0xa1aa, 0x3b, 0xa2b0, 0xa44b, 0xa1aa,
+0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x79,
+0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x72, 0x68, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74,
+0x3b, 0x55, 0x73, 0x69, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x61, 0x62, 0x61, 0x72, 0x69, 0x3b, 0x75, 0x46,
+0x65, 0x62, 0x65, 0x72, 0x62, 0x61, 0x72, 0x69, 0x3b, 0x75, 0x4d, 0x61, 0x74, 0x6a, 0x68, 0x69, 0x3b, 0x75, 0x2d, 0x41,
+0x70, 0x72, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x65, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61,
+0x79, 0x69, 0x3b, 0x41, 0x72, 0x68, 0x6f, 0x73, 0x74, 0x6f, 0x73, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62,
+0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x55, 0x73, 0x69, 0x6e, 0x79, 0x69, 0x6b, 0x68, 0x61, 0x62, 0x61,
+0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x74,
+0x3b, 0x41, 0x70, 0x6f, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f,
+0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x66, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e,
+0x61, 0x77, 0x61, 0x72, 0x65, 0x3b, 0x46, 0x65, 0x62, 0x65, 0x72, 0x77, 0x61, 0x72, 0x65, 0x3b, 0x4d, 0x61, 0x74, 0x161,
+0x68, 0x65, 0x3b, 0x41, 0x70, 0x6f, 0x72, 0x65, 0x6c, 0x65, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x65, 0x3b,
+0x4a, 0x75, 0x6c, 0x61, 0x65, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x73, 0x65, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d,
+0x65, 0x72, 0x65, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x6f, 0x72, 0x65, 0x3b, 0x4e, 0x6f, 0x66, 0x65, 0x6d, 0x65, 0x72,
+0x65, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x65, 0x72, 0x65, 0x3b, 0x6f, 0x111, 0x111, 0x61, 0x6a, 0x61, 0x67, 0x65, 0x3b,
+0x67, 0x75, 0x6f, 0x76, 0x76, 0x61, 0x3b, 0x6e, 0x6a, 0x75, 0x6b, 0x10d, 0x61, 0x3b, 0x63, 0x75, 0x6f, 0x14b, 0x6f, 0x3b,
+0x6d, 0x69, 0x65, 0x73, 0x73, 0x65, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x73, 0x65, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x64, 0x6e,
+0x65, 0x3b, 0x62, 0x6f, 0x72, 0x67, 0x65, 0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x61, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x67, 0x6f,
+0x74, 0x3b, 0x73, 0x6b, 0xe1, 0x62, 0x6d, 0x61, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x6c, 0x61, 0x3b, 0x6f, 0x111, 0x111, 0x61,
+0x6a, 0x61, 0x67, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x75, 0x6f, 0x76, 0x76, 0x61, 0x6d, 0xe1, 0x6e, 0x6e,
+0x75, 0x3b, 0x6e, 0x6a, 0x75, 0x6b, 0x10d, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x63, 0x75, 0x6f, 0x14b, 0x6f, 0x6d,
+0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x6d, 0x69, 0x65, 0x73, 0x73, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x65, 0x61,
+0x73, 0x73, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x64, 0x6e, 0x65, 0x6d, 0xe1, 0x6e, 0x6e,
+0x75, 0x3b, 0x62, 0x6f, 0x72, 0x67, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x61, 0x6d, 0xe1,
+0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x67, 0x6f, 0x74, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x73, 0x6b, 0xe1,
+0x62, 0x6d, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x6c, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75,
+0x3b, 0x4f, 0x3b, 0x47, 0x3b, 0x4e, 0x3b, 0x43, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x53, 0x3b, 0x42, 0x3b, 0x10c, 0x3b, 0x47,
+0x3b, 0x53, 0x3b, 0x4a, 0x3b, 0x6f, 0x111, 0x111, 0x6a, 0x3b, 0x67, 0x75, 0x6f, 0x76, 0x3b, 0x6e, 0x6a, 0x75, 0x6b, 0x3b,
+0x63, 0x75, 0x6f, 0x3b, 0x6d, 0x69, 0x65, 0x73, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x3b, 0x62,
+0x6f, 0x72, 0x67, 0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x3b, 0x73, 0x6b, 0xe1, 0x62, 0x3b, 0x6a,
+0x75, 0x6f, 0x76, 0x3b, 0x4b, 0x69, 0x69, 0x3b, 0x44, 0x68, 0x69, 0x3b, 0x54, 0x72, 0x69, 0x3b, 0x53, 0x70, 0x69, 0x3b,
+0x52, 0x69, 0x69, 0x3b, 0x4d, 0x74, 0x69, 0x3b, 0x45, 0x6d, 0x69, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d, 0x6e, 0x69, 0x3b,
+0x4d, 0x78, 0x69, 0x3b, 0x4d, 0x78, 0x6b, 0x3b, 0x4d, 0x78, 0x64, 0x3b, 0x4b, 0x69, 0x6e, 0x67, 0x61, 0x6c, 0x20, 0x69,
+0x64, 0x61, 0x73, 0x3b, 0x44, 0x68, 0x61, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x54, 0x72, 0x75, 0x20, 0x69, 0x64, 0x61,
+0x73, 0x3b, 0x53, 0x70, 0x61, 0x74, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x52, 0x69, 0x6d, 0x61, 0x20, 0x69, 0x64, 0x61,
+0x73, 0x3b, 0x4d, 0x61, 0x74, 0x61, 0x72, 0x75, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x45, 0x6d, 0x70, 0x69, 0x74, 0x75,
+0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x73, 0x70, 0x61, 0x74, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x6e,
+0x67, 0x61, 0x72, 0x69, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x78, 0x61, 0x6c, 0x20, 0x69, 0x64, 0x61, 0x73,
+0x3b, 0x4d, 0x61, 0x78, 0x61, 0x6c, 0x20, 0x6b, 0x69, 0x6e, 0x67, 0x61, 0x6c, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d,
+0x61, 0x78, 0x61, 0x6c, 0x20, 0x64, 0x68, 0x61, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x54, 0x3b,
+0x53, 0x3b, 0x52, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x50, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x43, 0x61,
+0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75,
+0x6e, 0x3b, 0x43, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f,
+0x62, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x43, 0x68, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x72,
+0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x69, 0x72, 0x69, 0x72, 0x69, 0x3b, 0x4d, 0x65,
+0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x43, 0x68, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x69,
+0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x69, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f,
+0x62, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x43, 0x3b, 0x46, 0x3b, 0x4d, 0x3b,
+0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x43, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x49, 0x6d,
+0x62, 0x3b, 0x4b, 0x61, 0x77, 0x3b, 0x4b, 0x61, 0x64, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x4b, 0x61,
+0x72, 0x3b, 0x4d, 0x66, 0x75, 0x3b, 0x57, 0x75, 0x6e, 0x3b, 0x49, 0x6b, 0x65, 0x3b, 0x49, 0x6b, 0x75, 0x3b, 0x49, 0x6d,
+0x77, 0x3b, 0x49, 0x77, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6d, 0x62, 0x69,
+0x72, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x77, 0x69, 0x3b, 0x4d, 0x6f,
+0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x64, 0x61, 0x64, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20,
+0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20,
+0x6b, 0x61, 0x73, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x72,
+0x61, 0x6e, 0x64, 0x61, 0x64, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6d, 0x66, 0x75,
+0x6e, 0x67, 0x61, 0x64, 0x65, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x77, 0x75, 0x6e, 0x79,
+0x61, 0x6e, 0x79, 0x61, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x65, 0x6e, 0x64,
+0x61, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x6f,
+0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x6d, 0x77,
+0x65, 0x72, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20,
+0x6e, 0x61, 0x20, 0x69, 0x77, 0x69, 0x3b, 0x49, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4d,
+0x3b, 0x57, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x73, 0x69, 0x69, 0x3b, 0x63, 0x6f, 0x6c, 0x3b, 0x6d,
+0x62, 0x6f, 0x3b, 0x73, 0x65, 0x65, 0x3b, 0x64, 0x75, 0x75, 0x3b, 0x6b, 0x6f, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x3b, 0x6a,
+0x75, 0x6b, 0x3b, 0x73, 0x6c, 0x74, 0x3b, 0x79, 0x61, 0x72, 0x3b, 0x6a, 0x6f, 0x6c, 0x3b, 0x62, 0x6f, 0x77, 0x3b, 0x73,
+0x69, 0x69, 0x6c, 0x6f, 0x3b, 0x63, 0x6f, 0x6c, 0x74, 0x65, 0x3b, 0x6d, 0x62, 0x6f, 0x6f, 0x79, 0x3b, 0x73, 0x65, 0x65,
+0x257, 0x74, 0x6f, 0x3b, 0x64, 0x75, 0x75, 0x6a, 0x61, 0x6c, 0x3b, 0x6b, 0x6f, 0x72, 0x73, 0x65, 0x3b, 0x6d, 0x6f, 0x72,
+0x73, 0x6f, 0x3b, 0x6a, 0x75, 0x6b, 0x6f, 0x3b, 0x73, 0x69, 0x69, 0x6c, 0x74, 0x6f, 0x3b, 0x79, 0x61, 0x72, 0x6b, 0x6f,
+0x6d, 0x61, 0x61, 0x3b, 0x6a, 0x6f, 0x6c, 0x61, 0x6c, 0x3b, 0x62, 0x6f, 0x77, 0x74, 0x65, 0x3b, 0x73, 0x3b, 0x63, 0x3b,
+0x6d, 0x3b, 0x73, 0x3b, 0x64, 0x3b, 0x6b, 0x3b, 0x6d, 0x3b, 0x6a, 0x3b, 0x73, 0x3b, 0x79, 0x3b, 0x6a, 0x3b, 0x62, 0x3b,
+0x4a, 0x45, 0x4e, 0x3b, 0x57, 0x4b, 0x52, 0x3b, 0x57, 0x47, 0x54, 0x3b, 0x57, 0x4b, 0x4e, 0x3b, 0x57, 0x54, 0x4e, 0x3b,
+0x57, 0x54, 0x44, 0x3b, 0x57, 0x4d, 0x4a, 0x3b, 0x57, 0x4e, 0x4e, 0x3b, 0x57, 0x4b, 0x44, 0x3b, 0x57, 0x49, 0x4b, 0x3b,
+0x57, 0x4d, 0x57, 0x3b, 0x44, 0x49, 0x54, 0x3b, 0x4e, 0x6a, 0x65, 0x6e, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x4d, 0x77, 0x65,
+0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x72, 0x129, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20,
+0x67, 0x61, 0x74, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61,
+0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65,
+0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72,
+0x65, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x169, 0x67, 0x77, 0x61, 0x6e, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20,
+0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b,
+0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x3b,
+0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x169, 0x6d,
+0x77, 0x65, 0x3b, 0x4e, 0x64, 0x69, 0x74, 0x68, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x4b,
+0x3b, 0x47, 0x3b, 0x47, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x44, 0x3b, 0x4f, 0x62, 0x6f,
+0x3b, 0x57, 0x61, 0x61, 0x3b, 0x4f, 0x6b, 0x75, 0x3b, 0x4f, 0x6e, 0x67, 0x3b, 0x49, 0x6d, 0x65, 0x3b, 0x49, 0x6c, 0x65,
+0x3b, 0x53, 0x61, 0x70, 0x3b, 0x49, 0x73, 0x69, 0x3b, 0x53, 0x61, 0x61, 0x3b, 0x54, 0x6f, 0x6d, 0x3b, 0x54, 0x6f, 0x62,
+0x3b, 0x54, 0x6f, 0x77, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x62, 0x6f, 0x3b, 0x4c, 0x61, 0x70,
+0x61, 0x20, 0x6c, 0x65, 0x20, 0x77, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f,
+0x6b, 0x75, 0x6e, 0x69, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x6e, 0x67, 0x27, 0x77, 0x61, 0x6e,
+0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x69, 0x6d, 0x65, 0x74, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c,
+0x65, 0x20, 0x69, 0x6c, 0x65, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x73, 0x61, 0x70, 0x61, 0x3b, 0x4c,
+0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x69, 0x73, 0x69, 0x65, 0x74, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65,
+0x20, 0x73, 0x61, 0x61, 0x6c, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x3b,
+0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6f, 0x3b, 0x4c, 0x61,
+0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x77, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x4f, 0x3b,
+0x57, 0x3b, 0x4f, 0x3b, 0x4f, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x54, 0x3b,
+0x54, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61,
+0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x75, 0x67, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74,
+0x75, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x63, 0x3b, 0x4a, 0x61, 0x6e, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x46, 0x65,
+0x76, 0x72, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x63, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d,
+0x61, 0x69, 0x6f, 0x3b, 0x4a, 0x75, 0x6e, 0x68, 0x6f, 0x3b, 0x4a, 0x75, 0x6c, 0x68, 0x6f, 0x3b, 0x41, 0x75, 0x67, 0x75,
+0x73, 0x74, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x72, 0x6f, 0x3b,
+0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x44, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x5a, 0x69,
+0x62, 0x3b, 0x4e, 0x68, 0x6c, 0x3b, 0x4d, 0x62, 0x69, 0x3b, 0x4d, 0x61, 0x62, 0x3b, 0x4e, 0x6b, 0x77, 0x3b, 0x4e, 0x68,
+0x6c, 0x3b, 0x4e, 0x74, 0x75, 0x3b, 0x4e, 0x63, 0x77, 0x3b, 0x4d, 0x70, 0x61, 0x3b, 0x4d, 0x66, 0x75, 0x3b, 0x4c, 0x77,
+0x65, 0x3b, 0x4d, 0x70, 0x61, 0x3b, 0x5a, 0x69, 0x62, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x6c, 0x61, 0x3b, 0x4e, 0x68, 0x6c,
+0x6f, 0x6c, 0x61, 0x6e, 0x6a, 0x61, 0x3b, 0x4d, 0x62, 0x69, 0x6d, 0x62, 0x69, 0x74, 0x68, 0x6f, 0x3b, 0x4d, 0x61, 0x62,
+0x61, 0x73, 0x61, 0x3b, 0x4e, 0x6b, 0x77, 0x65, 0x6e, 0x6b, 0x77, 0x65, 0x7a, 0x69, 0x3b, 0x4e, 0x68, 0x6c, 0x61, 0x6e,
+0x67, 0x75, 0x6c, 0x61, 0x3b, 0x4e, 0x74, 0x75, 0x6c, 0x69, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x4e, 0x63, 0x77, 0x61, 0x62,
+0x61, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x4d, 0x70, 0x61, 0x6e, 0x64, 0x75, 0x6c, 0x61, 0x3b, 0x4d, 0x66, 0x75, 0x6d, 0x66,
+0x75, 0x3b, 0x4c, 0x77, 0x65, 0x7a, 0x69, 0x3b, 0x4d, 0x70, 0x61, 0x6c, 0x61, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x5a, 0x3b,
+0x4e, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4c, 0x3b,
+0x4d, 0x3b, 0x4d, 0x31, 0x3b, 0x4d, 0x32, 0x3b, 0x4d, 0x33, 0x3b, 0x4d, 0x34, 0x3b, 0x4d, 0x35, 0x3b, 0x4d, 0x36, 0x3b,
+0x4d, 0x37, 0x3b, 0x4d, 0x38, 0x3b, 0x4d, 0x39, 0x3b, 0x4d, 0x31, 0x30, 0x3b, 0x4d, 0x31, 0x31, 0x3b, 0x4d, 0x31, 0x32,
+0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x77, 0x61, 0x6e, 0x7a, 0x61, 0x3b, 0x4d, 0x77, 0x65,
+0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61,
+0x20, 0x6b, 0x61, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x61,
+0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x74, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x77, 0x65,
+0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x73, 0x69, 0x74, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20,
+0x73, 0x61, 0x62, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x4d,
+0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x74, 0x69, 0x73, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77,
+0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75,
+0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x6f, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20,
+0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x62, 0x69, 0x6c, 0x69, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b,
+0x3b, 0x4b, 0x3b, 0x54, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x69,
+0x6e, 0x6e, 0x3b, 0x62, 0x1e5b, 0x61, 0x3b, 0x6d, 0x61, 0x1e5b, 0x3b, 0x69, 0x62, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x79,
+0x75, 0x6e, 0x3b, 0x79, 0x75, 0x6c, 0x3b, 0x263, 0x75, 0x63, 0x3b, 0x63, 0x75, 0x74, 0x3b, 0x6b, 0x74, 0x75, 0x3b, 0x6e,
+0x75, 0x77, 0x3b, 0x64, 0x75, 0x6a, 0x3b, 0x69, 0x6e, 0x6e, 0x61, 0x79, 0x72, 0x3b, 0x62, 0x1e5b, 0x61, 0x79, 0x1e5b, 0x3b,
+0x6d, 0x61, 0x1e5b, 0x1e63, 0x3b, 0x69, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x79, 0x75, 0x6e,
+0x79, 0x75, 0x3b, 0x79, 0x75, 0x6c, 0x79, 0x75, 0x7a, 0x3b, 0x263, 0x75, 0x63, 0x74, 0x3b, 0x63, 0x75, 0x74, 0x61, 0x6e,
+0x62, 0x69, 0x72, 0x3b, 0x6b, 0x74, 0x75, 0x62, 0x72, 0x3b, 0x6e, 0x75, 0x77, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x64,
+0x75, 0x6a, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x69, 0x3b, 0x62, 0x3b, 0x6d, 0x3b, 0x69, 0x3b, 0x6d, 0x3b, 0x79, 0x3b,
+0x79, 0x3b, 0x263, 0x3b, 0x63, 0x3b, 0x6b, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x59, 0x65, 0x6e, 0x3b, 0x46, 0x75, 0x72, 0x3b,
+0x4d, 0x65, 0x263, 0x3b, 0x59, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x59, 0x75, 0x6e, 0x3b, 0x59, 0x75, 0x6c, 0x3b,
+0x194, 0x75, 0x63, 0x3b, 0x43, 0x74, 0x65, 0x3b, 0x54, 0x75, 0x62, 0x3b, 0x4e, 0x75, 0x6e, 0x3b, 0x44, 0x75, 0x1e7, 0x3b,
+0x59, 0x65, 0x6e, 0x6e, 0x61, 0x79, 0x65, 0x72, 0x3b, 0x46, 0x75, 0x1e5b, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x263, 0x72, 0x65,
+0x73, 0x3b, 0x59, 0x65, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6e, 0x79, 0x75,
+0x3b, 0x59, 0x75, 0x6c, 0x79, 0x75, 0x3b, 0x194, 0x75, 0x63, 0x74, 0x3b, 0x43, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b,
+0x54, 0x75, 0x62, 0x65, 0x1e5b, 0x3b, 0x4e, 0x75, 0x6e, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x44, 0x75, 0x1e7, 0x65, 0x6d,
+0x62, 0x65, 0x1e5b, 0x3b, 0x59, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x194, 0x3b,
+0x43, 0x3b, 0x54, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4b, 0x42, 0x5a, 0x3b, 0x4b, 0x42, 0x52, 0x3b, 0x4b, 0x53, 0x54, 0x3b,
+0x4b, 0x4b, 0x4e, 0x3b, 0x4b, 0x54, 0x4e, 0x3b, 0x4b, 0x4d, 0x4b, 0x3b, 0x4b, 0x4d, 0x53, 0x3b, 0x4b, 0x4d, 0x4e, 0x3b,
+0x4b, 0x4d, 0x4e, 0x3b, 0x4b, 0x4b, 0x4d, 0x3b, 0x4b, 0x4e, 0x4b, 0x3b, 0x4b, 0x4e, 0x42, 0x3b, 0x4f, 0x6b, 0x77, 0x6f,
+0x6b, 0x75, 0x62, 0x61, 0x6e, 0x7a, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4f,
+0x6b, 0x77, 0x61, 0x6b, 0x61, 0x73, 0x68, 0x61, 0x74, 0x75, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x6e, 0x61, 0x3b,
+0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x74, 0x61, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x75, 0x6b, 0x61,
+0x61, 0x67, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x75, 0x73, 0x68, 0x61, 0x6e, 0x6a, 0x75, 0x3b, 0x4f, 0x6b, 0x77,
+0x61, 0x6d, 0x75, 0x6e, 0x61, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x77, 0x65, 0x6e, 0x64, 0x61, 0x3b,
+0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20,
+0x6e, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x77, 0x65, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e,
+0x61, 0x20, 0x69, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x48, 0x75, 0x74, 0x3b, 0x56, 0x69, 0x6c, 0x3b, 0x44, 0x61, 0x74, 0x3b,
+0x54, 0x61, 0x69, 0x3b, 0x48, 0x61, 0x6e, 0x3b, 0x53, 0x69, 0x74, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x4e, 0x61, 0x6e, 0x3b,
+0x54, 0x69, 0x73, 0x3b, 0x4b, 0x75, 0x6d, 0x3b, 0x4b, 0x6d, 0x6a, 0x3b, 0x4b, 0x6d, 0x62, 0x3b, 0x70, 0x61, 0x20, 0x6d,
+0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x68, 0x75, 0x74, 0x61, 0x6c, 0x61, 0x3b, 0x70, 0x61, 0x20,
+0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x76, 0x69, 0x6c, 0x69, 0x3b, 0x70, 0x61,
+0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x64, 0x61, 0x74, 0x75, 0x3b, 0x70,
+0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x74, 0x61, 0x69, 0x3b, 0x70,
+0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x68, 0x61, 0x6e, 0x75, 0x3b,
+0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x73, 0x69, 0x74, 0x61, 0x3b, 0x70,
+0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x73, 0x61, 0x62, 0x61, 0x3b, 0x70, 0x61,
+0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x70, 0x61, 0x20,
+0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x74, 0x69, 0x73, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d,
+0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77,
+0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x6f, 0x6a,
+0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69,
+0x20, 0x6e, 0x61, 0x20, 0x6d, 0x62, 0x69, 0x6c, 0x69, 0x3b, 0x48, 0x3b, 0x56, 0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x48, 0x3b,
+0x53, 0x3b, 0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72,
+0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x72,
+0x69, 0x6c, 0x79, 0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x79, 0x61,
+0x69, 0x3b, 0x41, 0x67, 0x75, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b,
+0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61,
+0x3b, 0x7a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6e, 0x61, 0x72, 0x3b, 0x61, 0x77, 0x69, 0x3b, 0x6d, 0x25b, 0x3b,
+0x7a, 0x75, 0x77, 0x3b, 0x7a, 0x75, 0x6c, 0x3b, 0x75, 0x74, 0x69, 0x3b, 0x73, 0x25b, 0x74, 0x3b, 0x254, 0x6b, 0x75, 0x3b,
+0x6e, 0x6f, 0x77, 0x3b, 0x64, 0x65, 0x73, 0x3b, 0x7a, 0x61, 0x6e, 0x77, 0x75, 0x79, 0x65, 0x3b, 0x66, 0x65, 0x62, 0x75,
+0x72, 0x75, 0x79, 0x65, 0x3b, 0x6d, 0x61, 0x72, 0x69, 0x73, 0x69, 0x3b, 0x61, 0x77, 0x69, 0x72, 0x69, 0x6c, 0x69, 0x3b,
+0x6d, 0x25b, 0x3b, 0x7a, 0x75, 0x77, 0x25b, 0x6e, 0x3b, 0x7a, 0x75, 0x6c, 0x75, 0x79, 0x65, 0x3b, 0x75, 0x74, 0x69, 0x3b,
+0x73, 0x25b, 0x74, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x254, 0x6b, 0x75, 0x74, 0x254, 0x62, 0x75, 0x72, 0x75, 0x3b,
+0x6e, 0x6f, 0x77, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x64, 0x65, 0x73, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b,
+0x5a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x5a, 0x3b, 0x5a, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x186, 0x3b,
+0x4e, 0x3b, 0x44, 0x3b, 0x4d, 0x62, 0x65, 0x3b, 0x4b, 0x61, 0x69, 0x3b, 0x4b, 0x61, 0x74, 0x3b, 0x4b, 0x61, 0x6e, 0x3b,
+0x47, 0x61, 0x74, 0x3b, 0x47, 0x61, 0x6e, 0x3b, 0x4d, 0x75, 0x67, 0x3b, 0x4b, 0x6e, 0x6e, 0x3b, 0x4b, 0x65, 0x6e, 0x3b,
+0x49, 0x6b, 0x75, 0x3b, 0x49, 0x6d, 0x77, 0x3b, 0x49, 0x67, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61,
+0x20, 0x6d, 0x62, 0x65, 0x72, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x129, 0x72,
+0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x68, 0x61, 0x74, 0x169, 0x3b, 0x4d,
+0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77,
+0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61,
+0x74, 0x61, 0x6e, 0x74, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x169, 0x67,
+0x77, 0x61, 0x6e, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x6e,
+0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x77, 0x65,
+0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61,
+0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x169, 0x6d, 0x77, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69,
+0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x4b, 0x61, 0x129, 0x72, 0x129, 0x3b, 0x4d,
+0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x47, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49,
+0x3b, 0x49, 0x3b, 0x13a4, 0x13c3, 0x3b, 0x13a7, 0x13a6, 0x3b, 0x13a0, 0x13c5, 0x3b, 0x13a7, 0x13ec, 0x3b, 0x13a0, 0x13c2, 0x3b, 0x13d5, 0x13ad,
+0x3b, 0x13ab, 0x13f0, 0x3b, 0x13a6, 0x13b6, 0x3b, 0x13da, 0x13b5, 0x3b, 0x13da, 0x13c2, 0x3b, 0x13c5, 0x13d3, 0x3b, 0x13a4, 0x13cd, 0x3b, 0x13a4,
+0x13c3, 0x13b8, 0x13d4, 0x13c5, 0x3b, 0x13a7, 0x13a6, 0x13b5, 0x3b, 0x13a0, 0x13c5, 0x13f1, 0x3b, 0x13a7, 0x13ec, 0x13c2, 0x3b, 0x13a0, 0x13c2, 0x13cd,
+0x13ac, 0x13d8, 0x3b, 0x13d5, 0x13ad, 0x13b7, 0x13f1, 0x3b, 0x13ab, 0x13f0, 0x13c9, 0x13c2, 0x3b, 0x13a6, 0x13b6, 0x13c2, 0x3b, 0x13da, 0x13b5, 0x13cd,
+0x13d7, 0x3b, 0x13da, 0x13c2, 0x13c5, 0x13d7, 0x3b, 0x13c5, 0x13d3, 0x13d5, 0x13c6, 0x3b, 0x13a4, 0x13cd, 0x13a9, 0x13f1, 0x3b, 0x13a4, 0x3b, 0x13a7,
+0x3b, 0x13a0, 0x3b, 0x13a7, 0x3b, 0x13a0, 0x3b, 0x13d5, 0x3b, 0x13ab, 0x3b, 0x13a6, 0x3b, 0x13da, 0x3b, 0x13da, 0x3b, 0x13c5, 0x3b, 0x13a4,
+0x3b, 0x7a, 0x61, 0x6e, 0x3b, 0x66, 0x65, 0x76, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x76, 0x72, 0x3b, 0x6d, 0x65, 0x3b,
+0x7a, 0x69, 0x6e, 0x3b, 0x7a, 0x69, 0x6c, 0x3b, 0x6f, 0x75, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b,
+0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65, 0x73, 0x3b, 0x7a, 0x61, 0x6e, 0x76, 0x69, 0x65, 0x3b, 0x66, 0x65, 0x76, 0x72, 0x69,
+0x79, 0x65, 0x3b, 0x6d, 0x61, 0x72, 0x73, 0x3b, 0x61, 0x76, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x65, 0x3b, 0x7a, 0x69, 0x6e,
+0x3b, 0x7a, 0x69, 0x6c, 0x79, 0x65, 0x3b, 0x6f, 0x75, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x61, 0x6d, 0x3b, 0x6f, 0x6b,
+0x74, 0x6f, 0x62, 0x3b, 0x6e, 0x6f, 0x76, 0x61, 0x6d, 0x3b, 0x64, 0x65, 0x73, 0x61, 0x6d, 0x3b, 0x7a, 0x3b, 0x66, 0x3b,
+0x6d, 0x3b, 0x61, 0x3b, 0x6d, 0x3b, 0x7a, 0x3b, 0x7a, 0x3b, 0x6f, 0x3b, 0x73, 0x3b, 0x6f, 0x3b, 0x6e, 0x3b, 0x64, 0x3b,
+0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x4e, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77,
+0x61, 0x20, 0x50, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x54, 0x61, 0x74, 0x75,
+0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x63, 0x68, 0x65, 0x63, 0x68, 0x69, 0x3b, 0x4d, 0x77,
+0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20,
+0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x55, 0x6d, 0x6f, 0x3b, 0x4d, 0x77, 0x65,
+0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4d, 0x69, 0x76, 0x69,
+0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e,
+0x61, 0x20, 0x4d, 0x69, 0x74, 0x61, 0x74, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e,
+0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x63, 0x68, 0x65, 0x63, 0x68, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64,
+0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e,
+0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61,
+0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x55, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77,
+0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e,
+0x61, 0x20, 0x4d, 0x3b, 0x46, 0xfa, 0x6e, 0x67, 0x61, 0x74, 0x268, 0x3b, 0x4e, 0x61, 0x61, 0x6e, 0x268, 0x3b, 0x4b, 0x65,
+0x65, 0x6e, 0x64, 0x61, 0x3b, 0x49, 0x6b, 0xfa, 0x6d, 0x69, 0x3b, 0x49, 0x6e, 0x79, 0x61, 0x6d, 0x62, 0x61, 0x6c, 0x61,
+0x3b, 0x49, 0x64, 0x77, 0x61, 0x61, 0x74, 0x61, 0x3b, 0x4d, 0x289, 0x289, 0x6e, 0x63, 0x68, 0x268, 0x3b, 0x56, 0x268, 0x268,
+0x72, 0x268, 0x3b, 0x53, 0x61, 0x61, 0x74, 0x289, 0x3b, 0x49, 0x6e, 0x79, 0x69, 0x3b, 0x53, 0x61, 0x61, 0x6e, 0x6f, 0x3b,
+0x53, 0x61, 0x73, 0x61, 0x74, 0x289, 0x3b, 0x4b, 0x289, 0x66, 0xfa, 0x6e, 0x67, 0x61, 0x74, 0x268, 0x3b, 0x4b, 0x289, 0x6e,
+0x61, 0x61, 0x6e, 0x268, 0x3b, 0x4b, 0x289, 0x6b, 0x65, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6b, 0x75,
+0x6d, 0x69, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6e, 0x79, 0x61, 0x6d, 0x62, 0xe1, 0x6c, 0x61, 0x3b, 0x4b, 0x77, 0x69, 0x69,
+0x64, 0x77, 0x61, 0x61, 0x74, 0x61, 0x3b, 0x4b, 0x289, 0x6d, 0x289, 0x289, 0x6e, 0x63, 0x68, 0x268, 0x3b, 0x4b, 0x289, 0x76,
+0x268, 0x268, 0x72, 0x268, 0x3b, 0x4b, 0x289, 0x73, 0x61, 0x61, 0x74, 0x289, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6e, 0x79, 0x69,
+0x3b, 0x4b, 0x289, 0x73, 0x61, 0x61, 0x6e, 0x6f, 0x3b, 0x4b, 0x289, 0x73, 0x61, 0x73, 0x61, 0x74, 0x289, 0x3b, 0x46, 0x3b,
+0x4e, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x4d, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x49, 0x3b, 0x53, 0x3b,
+0x53, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x75, 0x3b, 0x4d, 0x61,
+0x61, 0x3b, 0x4a, 0x75, 0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x75, 0x3b, 0x53, 0x65, 0x62, 0x3b, 0x4f, 0x6b,
+0x69, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x77, 0x61, 0x6c, 0x69, 0x79, 0x6f, 0x3b,
+0x46, 0x65, 0x62, 0x77, 0x61, 0x6c, 0x69, 0x79, 0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x69, 0x73, 0x69, 0x3b, 0x41, 0x70, 0x75,
+0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x61, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x61,
+0x79, 0x69, 0x3b, 0x41, 0x67, 0x75, 0x73, 0x69, 0x74, 0x6f, 0x3b, 0x53, 0x65, 0x62, 0x75, 0x74, 0x74, 0x65, 0x6d, 0x62,
+0x61, 0x3b, 0x4f, 0x6b, 0x69, 0x74, 0x6f, 0x62, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44,
+0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x45,
+0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x4f, 0x67, 0x61, 0x3b, 0x53,
+0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61,
+0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x45, 0x70,
+0x72, 0x65, 0x6f, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x4f,
+0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62,
+0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b,
+0x46, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x4f, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b,
+0x44, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61,
+0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74,
+0x75, 0x3b, 0x4e, 0x75, 0x76, 0x3b, 0x44, 0x69, 0x7a, 0x3b, 0x4a, 0x61, 0x6e, 0x65, 0x72, 0x75, 0x3b, 0x46, 0x65, 0x76,
+0x65, 0x72, 0x65, 0x72, 0x75, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x75, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61,
+0x69, 0x75, 0x3b, 0x4a, 0x75, 0x6e, 0x68, 0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x68, 0x75, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74,
+0x75, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6e, 0x62, 0x72, 0x75, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x72, 0x75, 0x3b, 0x4e, 0x75,
+0x76, 0x65, 0x6e, 0x62, 0x72, 0x75, 0x3b, 0x44, 0x69, 0x7a, 0x65, 0x6e, 0x62, 0x72, 0x75, 0x3b, 0x4a, 0x41, 0x4e, 0x3b,
+0x46, 0x45, 0x42, 0x3b, 0x4d, 0x41, 0x43, 0x3b, 0x128, 0x50, 0x55, 0x3b, 0x4d, 0x128, 0x128, 0x3b, 0x4e, 0x4a, 0x55, 0x3b,
+0x4e, 0x4a, 0x52, 0x3b, 0x41, 0x47, 0x41, 0x3b, 0x53, 0x50, 0x54, 0x3b, 0x4f, 0x4b, 0x54, 0x3b, 0x4e, 0x4f, 0x56, 0x3b,
+0x44, 0x45, 0x43, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x72, 0x75, 0x61, 0x72,
+0x129, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x128, 0x70, 0x75, 0x72, 0x169, 0x3b, 0x4d, 0x129, 0x129, 0x3b, 0x4e, 0x6a,
+0x75, 0x6e, 0x69, 0x3b, 0x4e, 0x6a, 0x75, 0x72, 0x61, 0x129, 0x3b, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65,
+0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x169, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62,
+0x61, 0x3b, 0x44, 0x69, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x128, 0x3b, 0x4d, 0x3b,
+0x4e, 0x3b, 0x4e, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4d, 0x75, 0x6c, 0x3b, 0x4e, 0x67,
+0x61, 0x3b, 0x4b, 0x69, 0x70, 0x3b, 0x49, 0x77, 0x61, 0x3b, 0x4e, 0x67, 0x65, 0x3b, 0x57, 0x61, 0x6b, 0x3b, 0x52, 0x6f,
+0x70, 0x3b, 0x4b, 0x6f, 0x67, 0x3b, 0x42, 0x75, 0x72, 0x3b, 0x45, 0x70, 0x65, 0x3b, 0x54, 0x61, 0x69, 0x3b, 0x41, 0x65,
+0x6e, 0x3b, 0x4d, 0x75, 0x6c, 0x67, 0x75, 0x6c, 0x3b, 0x4e, 0x67, 0x27, 0x61, 0x74, 0x79, 0x61, 0x74, 0x6f, 0x3b, 0x4b,
+0x69, 0x70, 0x74, 0x61, 0x6d, 0x6f, 0x3b, 0x49, 0x77, 0x61, 0x74, 0x20, 0x6b, 0x75, 0x74, 0x3b, 0x4e, 0x67, 0x27, 0x65,
+0x69, 0x79, 0x65, 0x74, 0x3b, 0x57, 0x61, 0x6b, 0x69, 0x3b, 0x52, 0x6f, 0x70, 0x74, 0x75, 0x69, 0x3b, 0x4b, 0x69, 0x70,
+0x6b, 0x6f, 0x67, 0x61, 0x67, 0x61, 0x3b, 0x42, 0x75, 0x72, 0x65, 0x74, 0x3b, 0x45, 0x70, 0x65, 0x73, 0x6f, 0x3b, 0x4b,
+0x69, 0x70, 0x73, 0x75, 0x6e, 0x64, 0x65, 0x20, 0x6e, 0x65, 0x74, 0x61, 0x69, 0x3b, 0x4b, 0x69, 0x70, 0x73, 0x75, 0x6e,
+0x64, 0x65, 0x20, 0x6e, 0x65, 0x62, 0x6f, 0x20, 0x61, 0x65, 0x6e, 0x67, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x49,
+0x3b, 0x4e, 0x3b, 0x57, 0x3b, 0x52, 0x3b, 0x4b, 0x3b, 0x42, 0x3b, 0x45, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x1c3, 0x4b, 0x68,
+0x61, 0x6e, 0x6e, 0x69, 0x3b, 0x1c3, 0x4b, 0x68, 0x61, 0x6e, 0x1c0, 0x67, 0xf4, 0x61, 0x62, 0x3b, 0x1c0, 0x4b, 0x68, 0x75,
+0x75, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x1c3, 0x48, 0xf4, 0x61, 0x1c2, 0x6b, 0x68, 0x61, 0x69, 0x62, 0x3b, 0x1c3, 0x4b,
+0x68, 0x61, 0x69, 0x74, 0x73, 0xe2, 0x62, 0x3b, 0x47, 0x61, 0x6d, 0x61, 0x1c0, 0x61, 0x65, 0x62, 0x3b, 0x1c2, 0x4b, 0x68,
+0x6f, 0x65, 0x73, 0x61, 0x6f, 0x62, 0x3b, 0x41, 0x6f, 0x1c1, 0x6b, 0x68, 0x75, 0x75, 0x6d, 0xfb, 0x1c1, 0x6b, 0x68, 0xe2,
+0x62, 0x3b, 0x54, 0x61, 0x72, 0x61, 0x1c0, 0x6b, 0x68, 0x75, 0x75, 0x6d, 0xfb, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x1c2,
+0x4e, 0xfb, 0x1c1, 0x6e, 0xe2, 0x69, 0x73, 0x65, 0x62, 0x3b, 0x1c0, 0x48, 0x6f, 0x6f, 0x1c2, 0x67, 0x61, 0x65, 0x62, 0x3b,
+0x48, 0xf4, 0x61, 0x73, 0x6f, 0x72, 0x65, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x4a, 0x61, 0x6e, 0x2e, 0x3b, 0x46, 0xe4,
+0x62, 0x2e, 0x3b, 0x4d, 0x61, 0x72, 0x2e, 0x3b, 0x41, 0x70, 0x72, 0x2e, 0x3b, 0x4d, 0xe4, 0x69, 0x3b, 0x4a, 0x75, 0x6e,
+0x2e, 0x3b, 0x4a, 0x75, 0x6c, 0x2e, 0x3b, 0x4f, 0x75, 0x67, 0x2e, 0x3b, 0x53, 0xe4, 0x70, 0x2e, 0x3b, 0x4f, 0x6b, 0x74,
+0x2e, 0x3b, 0x4e, 0x6f, 0x76, 0x2e, 0x3b, 0x44, 0x65, 0x7a, 0x2e, 0x3b, 0x4a, 0x61, 0x6e, 0x6e, 0x65, 0x77, 0x61, 0x3b,
+0x46, 0xe4, 0x62, 0x72, 0x6f, 0x77, 0x61, 0x3b, 0x4d, 0xe4, 0xe4, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x65, 0x6c, 0x6c, 0x3b,
+0x4d, 0xe4, 0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6c, 0x69, 0x3b, 0x4f, 0x75, 0x6a, 0x6f,
+0xdf, 0x3b, 0x53, 0x65, 0x70, 0x74, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x65, 0x72,
+0x3b, 0x4e, 0x6f, 0x76, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44,
+0x61, 0x6c, 0x3b, 0x41, 0x72, 0xe1, 0x3b, 0x186, 0x25b, 0x6e, 0x3b, 0x44, 0x6f, 0x79, 0x3b, 0x4c, 0xe9, 0x70, 0x3b, 0x52,
+0x6f, 0x6b, 0x3b, 0x53, 0xe1, 0x73, 0x3b, 0x42, 0x254, 0x301, 0x72, 0x3b, 0x4b, 0xfa, 0x73, 0x3b, 0x47, 0xed, 0x73, 0x3b,
+0x53, 0x68, 0x289, 0x301, 0x3b, 0x4e, 0x74, 0x289, 0x301, 0x3b, 0x4f, 0x6c, 0x61, 0x64, 0x61, 0x6c, 0x289, 0x301, 0x3b, 0x41,
+0x72, 0xe1, 0x74, 0x3b, 0x186, 0x25b, 0x6e, 0x268, 0x301, 0x254, 0x268, 0x14b, 0x254, 0x6b, 0x3b, 0x4f, 0x6c, 0x6f, 0x64, 0x6f,
+0x79, 0xed, 0xf3, 0x72, 0xed, 0xea, 0x20, 0x69, 0x6e, 0x6b, 0xf3, 0x6b, 0xfa, 0xe2, 0x3b, 0x4f, 0x6c, 0x6f, 0x69, 0x6c,
+0xe9, 0x70, 0x16b, 0x6e, 0x79, 0x12b, 0x113, 0x20, 0x69, 0x6e, 0x6b, 0xf3, 0x6b, 0xfa, 0xe2, 0x3b, 0x4b, 0xfa, 0x6a, 0xfa,
+0x254, 0x72, 0x254, 0x6b, 0x3b, 0x4d, 0xf3, 0x72, 0x75, 0x73, 0xe1, 0x73, 0x69, 0x6e, 0x3b, 0x186, 0x6c, 0x254, 0x301, 0x268,
+0x301, 0x62, 0x254, 0x301, 0x72, 0xe1, 0x72, 0x25b, 0x3b, 0x4b, 0xfa, 0x73, 0x68, 0xee, 0x6e, 0x3b, 0x4f, 0x6c, 0x67, 0xed,
+0x73, 0x61, 0x6e, 0x3b, 0x50, 0x289, 0x73, 0x68, 0x289, 0x301, 0x6b, 0x61, 0x3b, 0x4e, 0x74, 0x289, 0x301, 0x14b, 0x289, 0x301,
+0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65,
+0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b,
+0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61,
+0x63, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67,
+0x6f, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x63, 0x3b, 0x52, 0x61,
+0x72, 0x3b, 0x4d, 0x75, 0x6b, 0x3b, 0x4b, 0x77, 0x61, 0x3b, 0x44, 0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4d, 0x6f,
+0x64, 0x3b, 0x4a, 0x6f, 0x6c, 0x3b, 0x50, 0x65, 0x64, 0x3b, 0x53, 0x6f, 0x6b, 0x3b, 0x54, 0x69, 0x62, 0x3b, 0x4c, 0x61,
+0x62, 0x3b, 0x50, 0x6f, 0x6f, 0x3b, 0x4f, 0x72, 0x61, 0x72, 0x61, 0x3b, 0x4f, 0x6d, 0x75, 0x6b, 0x3b, 0x4f, 0x6b, 0x77,
+0x61, 0x6d, 0x67, 0x27, 0x3b, 0x4f, 0x64, 0x75, 0x6e, 0x67, 0x27, 0x65, 0x6c, 0x3b, 0x4f, 0x6d, 0x61, 0x72, 0x75, 0x6b,
+0x3b, 0x4f, 0x6d, 0x6f, 0x64, 0x6f, 0x6b, 0x27, 0x6b, 0x69, 0x6e, 0x67, 0x27, 0x6f, 0x6c, 0x3b, 0x4f, 0x6a, 0x6f, 0x6c,
+0x61, 0x3b, 0x4f, 0x70, 0x65, 0x64, 0x65, 0x6c, 0x3b, 0x4f, 0x73, 0x6f, 0x6b, 0x6f, 0x73, 0x6f, 0x6b, 0x6f, 0x6d, 0x61,
+0x3b, 0x4f, 0x74, 0x69, 0x62, 0x61, 0x72, 0x3b, 0x4f, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x3b, 0x4f, 0x70, 0x6f, 0x6f, 0x3b,
+0x52, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x54, 0x3b,
+0x4c, 0x3b, 0x50, 0x3b, 0x17d, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x77, 0x69, 0x3b,
+0x4d, 0x65, 0x3b, 0x17d, 0x75, 0x77, 0x3b, 0x17d, 0x75, 0x79, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x6b, 0x3b, 0x4f, 0x6b,
+0x74, 0x3b, 0x4e, 0x6f, 0x6f, 0x3b, 0x44, 0x65, 0x65, 0x3b, 0x17d, 0x61, 0x6e, 0x77, 0x69, 0x79, 0x65, 0x3b, 0x46, 0x65,
+0x65, 0x77, 0x69, 0x72, 0x69, 0x79, 0x65, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x69, 0x3b, 0x41, 0x77, 0x69, 0x72, 0x69, 0x6c,
+0x3b, 0x4d, 0x65, 0x3b, 0x17d, 0x75, 0x77, 0x65, 0x14b, 0x3b, 0x17d, 0x75, 0x79, 0x79, 0x65, 0x3b, 0x55, 0x74, 0x3b, 0x53,
+0x65, 0x6b, 0x74, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x75, 0x72, 0x3b, 0x4e, 0x6f,
+0x6f, 0x77, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x44, 0x65, 0x65, 0x73, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x17d, 0x3b,
+0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x17d, 0x3b, 0x17d, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b,
+0x44, 0x3b, 0x44, 0x41, 0x43, 0x3b, 0x44, 0x41, 0x52, 0x3b, 0x44, 0x41, 0x44, 0x3b, 0x44, 0x41, 0x4e, 0x3b, 0x44, 0x41,
+0x48, 0x3b, 0x44, 0x41, 0x55, 0x3b, 0x44, 0x41, 0x4f, 0x3b, 0x44, 0x41, 0x42, 0x3b, 0x44, 0x4f, 0x43, 0x3b, 0x44, 0x41,
+0x50, 0x3b, 0x44, 0x47, 0x49, 0x3b, 0x44, 0x41, 0x47, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x63,
+0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x44,
+0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x64, 0x65, 0x6b, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20,
+0x41, 0x6e, 0x67, 0x27, 0x77, 0x65, 0x6e, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x62, 0x69, 0x63,
+0x68, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x75, 0x63, 0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77,
+0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x62, 0x69, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61,
+0x72, 0x20, 0x41, 0x62, 0x6f, 0x72, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x4f, 0x63, 0x68, 0x69,
+0x6b, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x70, 0x61, 0x72, 0x3b, 0x44, 0x77, 0x65, 0x20,
+0x6d, 0x61, 0x72, 0x20, 0x67, 0x69, 0x20, 0x61, 0x63, 0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61,
+0x72, 0x20, 0x41, 0x70, 0x61, 0x72, 0x20, 0x67, 0x69, 0x20, 0x61, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x43, 0x3b, 0x52, 0x3b,
+0x44, 0x3b, 0x4e, 0x3b, 0x42, 0x3b, 0x55, 0x3b, 0x42, 0x3b, 0x42, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x43, 0x3b, 0x50, 0x3b,
+0x59, 0x65, 0x6e, 0x3b, 0x59, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x49, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b,
+0x59, 0x75, 0x6e, 0x3b, 0x59, 0x75, 0x6c, 0x3b, 0x194, 0x75, 0x63, 0x3b, 0x43, 0x75, 0x74, 0x3b, 0x4b, 0x1e6d, 0x75, 0x3b,
+0x4e, 0x77, 0x61, 0x3b, 0x44, 0x75, 0x6a, 0x3b, 0x59, 0x65, 0x6e, 0x6e, 0x61, 0x79, 0x65, 0x72, 0x3b, 0x59, 0x65, 0x62,
+0x72, 0x61, 0x79, 0x65, 0x72, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x3b, 0x49, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x4d, 0x61, 0x79,
+0x79, 0x75, 0x3b, 0x59, 0x75, 0x6e, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6c, 0x79, 0x75, 0x7a, 0x3b, 0x194, 0x75, 0x63, 0x74,
+0x3b, 0x43, 0x75, 0x74, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x4b, 0x1e6d, 0x75, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x77, 0x61,
+0x6e, 0x62, 0x69, 0x72, 0x3b, 0x44, 0x75, 0x6a, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x4d, 0x3b,
+0x49, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x194, 0x3b, 0x43, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4a, 0x61,
+0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x6c, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69,
+0x3b, 0x41, 0x70, 0x6c, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c,
+0x61, 0x69, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f,
+0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62,
+0x61, 0x3b
};
static const ushort standalone_months_data[] = {
@@ -2538,16 +2538,16 @@ static const ushort standalone_months_data[] = {
0x91c, 0x928, 0x3b, 0x92b, 0x947, 0x92c, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x93f, 0x3b, 0x92e,
0x947, 0x3b, 0x91c, 0x941, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x93e, 0x3b, 0x905, 0x917, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x3b,
0x905, 0x915, 0x94d, 0x91f, 0x94b, 0x3b, 0x928, 0x94b, 0x92d, 0x947, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x3b, 0x91c, 0x928, 0x935, 0x930,
-0x940, 0x3b, 0x92b, 0x930, 0x935, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x947, 0x932,
-0x3b, 0x92e, 0x908, 0x3b, 0x91c, 0x941, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x93e, 0x908, 0x3b, 0x905, 0x917, 0x938, 0x94d, 0x924, 0x3b,
-0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x905, 0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928,
-0x94b, 0x92d, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x926, 0x93f, 0x938, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x967, 0x3b, 0x968, 0x3b,
-0x969, 0x3b, 0x96a, 0x3b, 0x96b, 0x3b, 0x96c, 0x3b, 0x96d, 0x3b, 0x96e, 0x3b, 0x96f, 0x3b, 0x967, 0x966, 0x3b, 0x967, 0x967, 0x3b,
-0x967, 0x968, 0x3b, 0x91c, 0x928, 0x935, 0x930, 0x940, 0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x905, 0x930, 0x940, 0x3b, 0x92e,
-0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x941, 0x928, 0x3b, 0x91c,
-0x941, 0x932, 0x93e, 0x908, 0x3b, 0x905, 0x917, 0x938, 0x94d, 0x924, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x92e, 0x94d, 0x92c,
-0x930, 0x3b, 0x905, 0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928, 0x94b, 0x92d, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x921,
-0x93f, 0x938, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61,
+0x940, 0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x905, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a,
+0x94d, 0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x941, 0x928, 0x3b, 0x91c, 0x941, 0x932, 0x93e, 0x908, 0x3b, 0x905, 0x917,
+0x938, 0x94d, 0x924, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x905, 0x915, 0x94d, 0x91f, 0x94b,
+0x92c, 0x930, 0x3b, 0x928, 0x94b, 0x92d, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x921, 0x93f, 0x938, 0x947, 0x92e, 0x94d, 0x92c, 0x930,
+0x3b, 0x967, 0x3b, 0x968, 0x3b, 0x969, 0x3b, 0x96a, 0x3b, 0x96b, 0x3b, 0x96c, 0x3b, 0x96d, 0x3b, 0x96e, 0x3b, 0x96f, 0x3b, 0x967,
+0x966, 0x3b, 0x967, 0x967, 0x3b, 0x967, 0x968, 0x3b, 0x91c, 0x928, 0x935, 0x930, 0x940, 0x3b, 0x92b, 0x930, 0x935, 0x930, 0x940, 0x3b,
+0x92e, 0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x905, 0x92a, 0x94d, 0x930, 0x947, 0x932, 0x3b, 0x92e, 0x908, 0x3b, 0x91c, 0x941, 0x928, 0x3b,
+0x91c, 0x941, 0x932, 0x93e, 0x908, 0x3b, 0x905, 0x917, 0x938, 0x94d, 0x924, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x92e, 0x94d,
+0x92c, 0x930, 0x3b, 0x905, 0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928, 0x94b, 0x92d, 0x947, 0x92e, 0x94d, 0x92c, 0x930, 0x3b,
+0x926, 0x93f, 0x938, 0x92e, 0x94d, 0x92c, 0x930, 0x3b, 0x6a, 0x61, 0x6e, 0x2e, 0x3b, 0x66, 0x65, 0x62, 0x2e, 0x3b, 0x6d, 0x61,
0x72, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x3b, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x6a, 0x75, 0x6c,
0x69, 0x3b, 0x61, 0x75, 0x67, 0x2e, 0x3b, 0x73, 0x65, 0x70, 0x2e, 0x3b, 0x6f, 0x6b, 0x74, 0x2e, 0x3b, 0x6e, 0x6f, 0x76,
0x2e, 0x3b, 0x64, 0x65, 0x73, 0x2e, 0x3b, 0x6a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x66, 0x65, 0x62, 0x72, 0x75, 0x61,
@@ -2759,647 +2759,647 @@ static const ushort standalone_months_data[] = {
0x3b, 0xb9a, 0xbc6, 0xbaa, 0xbcd, 0x2e, 0x3b, 0xb85, 0xb95, 0xbcd, 0x2e, 0x3b, 0xba8, 0xbb5, 0x2e, 0x3b, 0xb9f, 0xbbf, 0xb9a, 0x2e,
0x3b, 0xb9c, 0xba9, 0xbb5, 0xbb0, 0xbbf, 0x3b, 0xbaa, 0xbbf, 0xbaa, 0xbcd, 0xbb0, 0xbb5, 0xbb0, 0xbbf, 0x3b, 0xbae, 0xbbe, 0xbb0, 0xbcd,
0xb9a, 0xbcd, 0x3b, 0xb8f, 0xbaa, 0xbcd, 0xbb0, 0xbb2, 0xbcd, 0x3b, 0xbae, 0xbc7, 0x3b, 0xb9c, 0xbc2, 0xba9, 0xbcd, 0x3b, 0xb9c, 0xbc2,
-0xbb2, 0xbc8, 0x3b, 0xb86, 0xb95, 0xbb8, 0xbcd, 0xb9f, 0xbcd, 0x3b, 0xb9a, 0xbc6, 0xbaa, 0xbcd, 0xb9f, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd,
-0x3b, 0xb85, 0xb95, 0xbcd, 0xb9f, 0xbcb, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xba8, 0xbb5, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xb9f, 0xbbf,
-0xb9a, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xb9c, 0x3b, 0xbaa, 0xbbf, 0x3b, 0xbae, 0xbbe, 0x3b, 0xb8f, 0x3b, 0xbae, 0xbc7, 0x3b,
-0xb9c, 0xbc2, 0x3b, 0xb9c, 0xbc2, 0x3b, 0xb86, 0x3b, 0xb9a, 0xbc6, 0x3b, 0xb85, 0x3b, 0xba8, 0x3b, 0xb9f, 0xbbf, 0x3b, 0xc1c, 0xc28,
-0xc35, 0xc30, 0xc3f, 0x3b, 0xc2b, 0xc3f, 0xc2c, 0xc4d, 0xc30, 0xc35, 0xc30, 0xc3f, 0x3b, 0xc2e, 0xc3e, 0xc30, 0xc4d, 0xc1a, 0xc3f, 0x3b,
-0xc0f, 0xc2a, 0xc4d, 0xc30, 0xc3f, 0xc32, 0xc4d, 0x3b, 0xc2e, 0xc47, 0x3b, 0xc1c, 0xc42, 0xc28, 0xc4d, 0x3b, 0xc1c, 0xc42, 0xc32, 0xc48,
-0x3b, 0xc06, 0xc17, 0xc38, 0xc4d, 0xc1f, 0xc41, 0x3b, 0xc38, 0xc46, 0xc2a, 0xc4d, 0xc1f, 0xc46, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc05,
-0xc15, 0xc4d, 0xc1f, 0xc4b, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc28, 0xc35, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc21, 0xc3f, 0xc38, 0xc46, 0xc02,
-0xc2c, 0xc30, 0xc4d, 0x3b, 0xc1c, 0x3b, 0xc2b, 0xc3f, 0x3b, 0xc2e, 0x3b, 0xc0e, 0x3b, 0xc2e, 0xc46, 0x3b, 0xc1c, 0xc41, 0x3b, 0xc1c,
-0xc41, 0x3b, 0xc06, 0x3b, 0xc38, 0xc46, 0x3b, 0xc05, 0x3b, 0xc28, 0x3b, 0xc21, 0xc3f, 0x3b, 0xe21, 0x2e, 0xe04, 0x2e, 0x3b, 0xe01,
-0x2e, 0xe1e, 0x2e, 0x3b, 0xe21, 0xe35, 0x2e, 0xe04, 0x2e, 0x3b, 0xe40, 0xe21, 0x2e, 0xe22, 0x2e, 0x3b, 0xe1e, 0x2e, 0xe04, 0x2e,
-0x3b, 0xe21, 0xe34, 0x2e, 0xe22, 0x2e, 0x3b, 0xe01, 0x2e, 0xe04, 0x2e, 0x3b, 0xe2a, 0x2e, 0xe04, 0x2e, 0x3b, 0xe01, 0x2e, 0xe22,
-0x2e, 0x3b, 0xe15, 0x2e, 0xe04, 0x2e, 0x3b, 0xe1e, 0x2e, 0xe22, 0x2e, 0x3b, 0xe18, 0x2e, 0xe04, 0x2e, 0x3b, 0xe21, 0xe01, 0xe23,
-0xe32, 0xe04, 0xe21, 0x3b, 0xe01, 0xe38, 0xe21, 0xe20, 0xe32, 0xe1e, 0xe31, 0xe19, 0xe18, 0xe4c, 0x3b, 0xe21, 0xe35, 0xe19, 0xe32, 0xe04,
-0xe21, 0x3b, 0xe40, 0xe21, 0xe29, 0xe32, 0xe22, 0xe19, 0x3b, 0xe1e, 0xe24, 0xe29, 0xe20, 0xe32, 0xe04, 0xe21, 0x3b, 0xe21, 0xe34, 0xe16,
-0xe38, 0xe19, 0xe32, 0xe22, 0xe19, 0x3b, 0xe01, 0xe23, 0xe01, 0xe0e, 0xe32, 0xe04, 0xe21, 0x3b, 0xe2a, 0xe34, 0xe07, 0xe2b, 0xe32, 0xe04,
-0xe21, 0x3b, 0xe01, 0xe31, 0xe19, 0xe22, 0xe32, 0xe22, 0xe19, 0x3b, 0xe15, 0xe38, 0xe25, 0xe32, 0xe04, 0xe21, 0x3b, 0xe1e, 0xe24, 0xe28,
-0xe08, 0xe34, 0xe01, 0xe32, 0xe22, 0xe19, 0x3b, 0xe18, 0xe31, 0xe19, 0xe27, 0xe32, 0xe04, 0xe21, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0x3b,
-0xf5f, 0xfb3, 0xf0b, 0xf22, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf23, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf24, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf25, 0x3b,
-0xf5f, 0xfb3, 0xf0b, 0xf26, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf27, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf28, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf29, 0x3b,
-0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf20, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf21, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf22, 0x3b, 0xf5f, 0xfb3,
-0xf0b, 0xf56, 0xf0b, 0xf51, 0xf44, 0xf0b, 0xf54, 0xf7c, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b,
-0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf66, 0xf74, 0xf58, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b,
-0xf56, 0xf5e, 0xf72, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf63, 0xf94, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3,
-0xf0b, 0xf56, 0xf0b, 0xf51, 0xfb2, 0xf74, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf51, 0xf74, 0xf53,
-0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf62, 0xf92, 0xfb1, 0xf51, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3,
-0xf0b, 0xf56, 0xf0b, 0xf51, 0xf42, 0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf54,
-0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf45, 0xf72, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f,
-0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0x1325, 0x122a, 0x3b, 0x1208,
-0x12ab, 0x1272, 0x3b, 0x1218, 0x130b, 0x1262, 0x3b, 0x121a, 0x12eb, 0x12dd, 0x3b, 0x130d, 0x1295, 0x1266, 0x3b, 0x1230, 0x1290, 0x3b, 0x1213, 0x121d,
-0x1208, 0x3b, 0x1290, 0x1213, 0x1230, 0x3b, 0x1218, 0x1235, 0x12a8, 0x3b, 0x1325, 0x1245, 0x121d, 0x3b, 0x1215, 0x12f3, 0x122d, 0x3b, 0x1273, 0x1215,
-0x1233, 0x3b, 0x1325, 0x122a, 0x3b, 0x1208, 0x12ab, 0x1272, 0x1275, 0x3b, 0x1218, 0x130b, 0x1262, 0x1275, 0x3b, 0x121a, 0x12eb, 0x12dd, 0x12eb, 0x3b,
-0x130d, 0x1295, 0x1266, 0x1275, 0x3b, 0x1230, 0x1290, 0x3b, 0x1213, 0x121d, 0x1208, 0x3b, 0x1290, 0x1213, 0x1230, 0x3b, 0x1218, 0x1235, 0x12a8, 0x1228,
-0x121d, 0x3b, 0x1325, 0x1245, 0x121d, 0x1272, 0x3b, 0x1215, 0x12f3, 0x122d, 0x3b, 0x1273, 0x1215, 0x1233, 0x1235, 0x3b, 0x53, 0x101, 0x6e, 0x3b,
-0x46, 0x113, 0x70, 0x3b, 0x4d, 0x61, 0x2bb, 0x61, 0x3b, 0x2bb, 0x45, 0x70, 0x65, 0x3b, 0x4d, 0x113, 0x3b, 0x53, 0x75, 0x6e,
-0x3b, 0x53, 0x69, 0x75, 0x3b, 0x2bb, 0x41, 0x6f, 0x6b, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x3b, 0x4e,
-0x14d, 0x76, 0x3b, 0x54, 0x12b, 0x73, 0x3b, 0x53, 0x101, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x46, 0x113, 0x70, 0x75, 0x65,
-0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x2bb, 0x61, 0x73, 0x69, 0x3b, 0x2bb, 0x45, 0x70, 0x65, 0x6c, 0x65, 0x6c, 0x69, 0x3b, 0x4d,
-0x113, 0x3b, 0x53, 0x75, 0x6e, 0x65, 0x3b, 0x53, 0x69, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x2bb, 0x41, 0x6f, 0x6b, 0x6f, 0x73,
-0x69, 0x3b, 0x53, 0x65, 0x70, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x74, 0x6f, 0x70, 0x61, 0x3b,
-0x4e, 0x14d, 0x76, 0x65, 0x6d, 0x61, 0x3b, 0x54, 0x12b, 0x73, 0x65, 0x6d, 0x61, 0x3b, 0x53, 0x3b, 0x46, 0x3b, 0x4d, 0x3b,
-0x45, 0x3b, 0x4d, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x53, 0x75,
-0x6e, 0x3b, 0x59, 0x61, 0x6e, 0x3b, 0x4b, 0x75, 0x6c, 0x3b, 0x44, 0x7a, 0x69, 0x3b, 0x4d, 0x75, 0x64, 0x3b, 0x4b, 0x68,
-0x6f, 0x3b, 0x4d, 0x61, 0x77, 0x3b, 0x4d, 0x68, 0x61, 0x3b, 0x4e, 0x64, 0x7a, 0x3b, 0x4e, 0x68, 0x6c, 0x3b, 0x48, 0x75,
-0x6b, 0x3b, 0x4e, 0x27, 0x77, 0x3b, 0x53, 0x75, 0x6e, 0x67, 0x75, 0x74, 0x69, 0x3b, 0x4e, 0x79, 0x65, 0x6e, 0x79, 0x65,
-0x6e, 0x79, 0x61, 0x6e, 0x69, 0x3b, 0x4e, 0x79, 0x65, 0x6e, 0x79, 0x61, 0x6e, 0x6b, 0x75, 0x6c, 0x75, 0x3b, 0x44, 0x7a,
-0x69, 0x76, 0x61, 0x6d, 0x69, 0x73, 0x6f, 0x6b, 0x6f, 0x3b, 0x4d, 0x75, 0x64, 0x79, 0x61, 0x78, 0x69, 0x68, 0x69, 0x3b,
-0x4b, 0x68, 0x6f, 0x74, 0x61, 0x76, 0x75, 0x78, 0x69, 0x6b, 0x61, 0x3b, 0x4d, 0x61, 0x77, 0x75, 0x77, 0x61, 0x6e, 0x69,
-0x3b, 0x4d, 0x68, 0x61, 0x77, 0x75, 0x72, 0x69, 0x3b, 0x4e, 0x64, 0x7a, 0x68, 0x61, 0x74, 0x69, 0x3b, 0x4e, 0x68, 0x6c,
-0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x3b, 0x48, 0x75, 0x6b, 0x75, 0x72, 0x69, 0x3b, 0x4e, 0x27, 0x77, 0x65, 0x6e, 0x64,
-0x7a, 0x61, 0x6d, 0x68, 0x61, 0x6c, 0x61, 0x3b, 0x4f, 0x63, 0x61, 0x3b, 0x15e, 0x75, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b,
-0x4e, 0x69, 0x73, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x48, 0x61, 0x7a, 0x3b, 0x54, 0x65, 0x6d, 0x3b, 0x41, 0x11f, 0x75, 0x3b,
-0x45, 0x79, 0x6c, 0x3b, 0x45, 0x6b, 0x69, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x41, 0x72, 0x61, 0x3b, 0x4f, 0x63, 0x61, 0x6b,
-0x3b, 0x15e, 0x75, 0x62, 0x61, 0x74, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x3b, 0x4e, 0x69, 0x73, 0x61, 0x6e, 0x3b, 0x4d, 0x61,
-0x79, 0x131, 0x73, 0x3b, 0x48, 0x61, 0x7a, 0x69, 0x72, 0x61, 0x6e, 0x3b, 0x54, 0x65, 0x6d, 0x6d, 0x75, 0x7a, 0x3b, 0x41,
-0x11f, 0x75, 0x73, 0x74, 0x6f, 0x73, 0x3b, 0x45, 0x79, 0x6c, 0xfc, 0x6c, 0x3b, 0x45, 0x6b, 0x69, 0x6d, 0x3b, 0x4b, 0x61,
-0x73, 0x131, 0x6d, 0x3b, 0x41, 0x72, 0x61, 0x6c, 0x131, 0x6b, 0x3b, 0x4f, 0x3b, 0x15e, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4d,
-0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x45, 0x3b, 0x45, 0x3b, 0x4b, 0x3b, 0x41, 0x3b, 0x421, 0x456, 0x447, 0x3b, 0x41b,
-0x44e, 0x442, 0x3b, 0x411, 0x435, 0x440, 0x3b, 0x41a, 0x432, 0x456, 0x3b, 0x422, 0x440, 0x430, 0x3b, 0x427, 0x435, 0x440, 0x3b, 0x41b,
-0x438, 0x43f, 0x3b, 0x421, 0x435, 0x440, 0x3b, 0x412, 0x435, 0x440, 0x3b, 0x416, 0x43e, 0x432, 0x3b, 0x41b, 0x438, 0x441, 0x3b, 0x413,
-0x440, 0x443, 0x3b, 0x421, 0x456, 0x447, 0x435, 0x43d, 0x44c, 0x3b, 0x41b, 0x44e, 0x442, 0x438, 0x439, 0x3b, 0x411, 0x435, 0x440, 0x435,
-0x437, 0x435, 0x43d, 0x44c, 0x3b, 0x41a, 0x432, 0x456, 0x442, 0x435, 0x43d, 0x44c, 0x3b, 0x422, 0x440, 0x430, 0x432, 0x435, 0x43d, 0x44c,
-0x3b, 0x427, 0x435, 0x440, 0x432, 0x435, 0x43d, 0x44c, 0x3b, 0x41b, 0x438, 0x43f, 0x435, 0x43d, 0x44c, 0x3b, 0x421, 0x435, 0x440, 0x43f,
-0x435, 0x43d, 0x44c, 0x3b, 0x412, 0x435, 0x440, 0x435, 0x441, 0x435, 0x43d, 0x44c, 0x3b, 0x416, 0x43e, 0x432, 0x442, 0x435, 0x43d, 0x44c,
-0x3b, 0x41b, 0x438, 0x441, 0x442, 0x43e, 0x43f, 0x430, 0x434, 0x3b, 0x413, 0x440, 0x443, 0x434, 0x435, 0x43d, 0x44c, 0x3b, 0x421, 0x3b,
-0x41b, 0x3b, 0x411, 0x3b, 0x41a, 0x3b, 0x422, 0x3b, 0x427, 0x3b, 0x41b, 0x3b, 0x421, 0x3b, 0x412, 0x3b, 0x416, 0x3b, 0x41b, 0x3b,
-0x413, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x6cc, 0x3b, 0x641, 0x631, 0x648, 0x631, 0x6cc, 0x3b, 0x645, 0x627, 0x631, 0x20, 0x686, 0x3b,
-0x627, 0x67e, 0x631, 0x64a, 0x644, 0x3b, 0x645, 0x626, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x627, 0x626, 0x3b, 0x627,
-0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645,
-0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x41c, 0x443, 0x4b3, 0x430, 0x440, 0x440, 0x430, 0x43c, 0x3b, 0x421, 0x430,
-0x444, 0x430, 0x440, 0x3b, 0x420, 0x430, 0x431, 0x438, 0x443, 0x43b, 0x2d, 0x430, 0x432, 0x432, 0x430, 0x43b, 0x3b, 0x420, 0x430, 0x431,
-0x438, 0x443, 0x43b, 0x2d, 0x43e, 0x445, 0x438, 0x440, 0x3b, 0x416, 0x443, 0x43c, 0x43e, 0x434, 0x438, 0x443, 0x43b, 0x2d, 0x443, 0x43b,
-0x43e, 0x3b, 0x416, 0x443, 0x43c, 0x43e, 0x434, 0x438, 0x443, 0x43b, 0x2d, 0x443, 0x445, 0x440, 0x43e, 0x3b, 0x420, 0x430, 0x436, 0x430,
-0x431, 0x3b, 0x428, 0x430, 0x44a, 0x431, 0x43e, 0x43d, 0x3b, 0x420, 0x430, 0x43c, 0x430, 0x437, 0x43e, 0x43d, 0x3b, 0x428, 0x430, 0x432,
-0x432, 0x43e, 0x43b, 0x3b, 0x417, 0x438, 0x43b, 0x2d, 0x49b, 0x430, 0x44a, 0x434, 0x430, 0x3b, 0x417, 0x438, 0x43b, 0x2d, 0x4b3, 0x438,
-0x436, 0x436, 0x430, 0x3b, 0x62c, 0x646, 0x648, 0x3b, 0x641, 0x628, 0x631, 0x3b, 0x645, 0x627, 0x631, 0x3b, 0x627, 0x67e, 0x631, 0x3b,
-0x645, 0x640, 0x6cc, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x3b, 0x627, 0x6af, 0x633, 0x3b, 0x633, 0x67e, 0x62a, 0x3b,
-0x627, 0x6a9, 0x62a, 0x3b, 0x646, 0x648, 0x645, 0x3b, 0x62f, 0x633, 0x645, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x6cc, 0x3b, 0x641, 0x628,
-0x631, 0x648, 0x631, 0x6cc, 0x3b, 0x645, 0x627, 0x631, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x6cc, 0x3b, 0x62c,
-0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x627, 0x6cc, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x67e, 0x62a, 0x645, 0x628, 0x631,
-0x3b, 0x627, 0x6a9, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b,
-0x74, 0x68, 0x67, 0x20, 0x31, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x32, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x33, 0x3b, 0x74, 0x68,
-0x67, 0x20, 0x34, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x35, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x36, 0x3b, 0x74, 0x68, 0x67, 0x20,
-0x37, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x38, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x39, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x30,
-0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x31, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x32, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67,
-0x20, 0x6d, 0x1ed9, 0x74, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x68, 0x61, 0x69, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67,
-0x20, 0x62, 0x61, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x74, 0x1b0, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x6e,
-0x103, 0x6d, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x73, 0xe1, 0x75, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x62,
-0x1ea3, 0x79, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x74, 0xe1, 0x6d, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x63,
-0x68, 0xed, 0x6e, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x6d, 0x1b0, 0x1edd, 0x69, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67,
-0x20, 0x6d, 0x1b0, 0x1edd, 0x69, 0x20, 0x6d, 0x1ed9, 0x74, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x6d, 0x1b0, 0x1edd, 0x69,
-0x20, 0x68, 0x61, 0x69, 0x3b, 0x49, 0x6f, 0x6e, 0x3b, 0x43, 0x68, 0x77, 0x65, 0x3b, 0x4d, 0x61, 0x77, 0x3b, 0x45, 0x62,
-0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d, 0x65, 0x68, 0x3b, 0x47, 0x6f, 0x72, 0x3b, 0x41, 0x77, 0x73, 0x74, 0x3b, 0x4d,
-0x65, 0x64, 0x69, 0x3b, 0x48, 0x79, 0x64, 0x3b, 0x54, 0x61, 0x63, 0x68, 0x3b, 0x52, 0x68, 0x61, 0x67, 0x3b, 0x49, 0x6f,
-0x6e, 0x61, 0x77, 0x72, 0x3b, 0x43, 0x68, 0x77, 0x65, 0x66, 0x72, 0x6f, 0x72, 0x3b, 0x4d, 0x61, 0x77, 0x72, 0x74, 0x68,
-0x3b, 0x45, 0x62, 0x72, 0x69, 0x6c, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d, 0x65, 0x68, 0x65, 0x66, 0x69, 0x6e, 0x3b,
-0x47, 0x6f, 0x72, 0x66, 0x66, 0x65, 0x6e, 0x6e, 0x61, 0x66, 0x3b, 0x41, 0x77, 0x73, 0x74, 0x3b, 0x4d, 0x65, 0x64, 0x69,
-0x3b, 0x48, 0x79, 0x64, 0x72, 0x65, 0x66, 0x3b, 0x54, 0x61, 0x63, 0x68, 0x77, 0x65, 0x64, 0x64, 0x3b, 0x52, 0x68, 0x61,
-0x67, 0x66, 0x79, 0x72, 0x3b, 0x49, 0x3b, 0x43, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x41,
-0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x52, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x74,
-0x3b, 0x45, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x61,
-0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e,
-0x79, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x74,
-0x73, 0x68, 0x69, 0x3b, 0x45, 0x70, 0x72, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x65, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69,
-0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x79, 0x69, 0x3b, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65,
-0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x68, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b,
-0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x1e62, 0x1eb9, 0x301, 0x72, 0x1eb9, 0x323, 0x3b, 0xc8, 0x72, 0xe8, 0x6c, 0xe8,
-0x3b, 0x1eb8, 0x72, 0x1eb9, 0x300, 0x6e, 0xe0, 0x3b, 0xcc, 0x67, 0x62, 0xe9, 0x3b, 0x1eb8, 0x300, 0x62, 0x69, 0x62, 0x69, 0x3b,
-0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x41, 0x67, 0x1eb9, 0x6d, 0x1ecd, 0x3b, 0xd2, 0x67, 0xfa, 0x6e, 0x3b, 0x4f, 0x77, 0x65,
-0x77, 0x65, 0x3b, 0x1ecc, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x42, 0xe9, 0x6c, 0xfa, 0x3b, 0x1ecc, 0x300, 0x70, 0x1eb9, 0x300,
-0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1e62, 0x1eb8, 0x301, 0x72, 0x1eb9, 0x301, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0xc8, 0x72, 0xe8, 0x6c,
-0xe8, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1eb8, 0x72, 0x1eb9, 0x300, 0x6e, 0xe0, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0xcc, 0x67, 0x62,
-0xe9, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1eb8, 0x300, 0x62, 0x69, 0x62, 0x69, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0xd2, 0x6b, 0xfa,
-0x64, 0x75, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x41, 0x67, 0x1eb9, 0x6d, 0x1ecd, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0xd2, 0x67, 0xfa,
-0x6e, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x4f, 0x77, 0x65, 0x77, 0x65, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1ecc, 0x300, 0x77, 0xe0,
-0x72, 0xe0, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x42, 0xe9, 0x6c, 0xfa, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1ecc, 0x300, 0x70, 0x1eb9,
-0x300, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x73, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65,
-0x79, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b,
-0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x75, 0x4a, 0x61, 0x6e, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b,
-0x75, 0x46, 0x65, 0x62, 0x72, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x75, 0x4d, 0x61, 0x73, 0x68, 0x69, 0x3b, 0x75, 0x2d,
-0x41, 0x70, 0x72, 0x65, 0x6c, 0x69, 0x3b, 0x75, 0x4d, 0x65, 0x79, 0x69, 0x3b, 0x75, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x75,
-0x4a, 0x75, 0x6c, 0x61, 0x79, 0x69, 0x3b, 0x75, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x75, 0x53, 0x65, 0x70, 0x74,
-0x68, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x75, 0x2d, 0x4f, 0x6b, 0x74, 0x68, 0x6f, 0x62, 0x61, 0x3b, 0x75, 0x4e, 0x6f, 0x76,
-0x65, 0x6d, 0x62, 0x61, 0x3b, 0x75, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65,
-0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x61, 0x6a, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75,
-0x6c, 0x3b, 0x41, 0x76, 0x67, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65,
-0x63, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d, 0x61, 0x72,
-0x74, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x6a, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c,
-0x69, 0x3b, 0x41, 0x76, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4f,
-0x6b, 0x74, 0x6f, 0x62, 0x61, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x44, 0x65, 0x63, 0x65,
-0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4a, 0x2d, 0x67, 0x75, 0x65, 0x72, 0x3b, 0x54, 0x2d, 0x61, 0x72, 0x72, 0x65, 0x65, 0x3b,
-0x4d, 0x61, 0x79, 0x72, 0x6e, 0x74, 0x3b, 0x41, 0x76, 0x72, 0x72, 0x69, 0x6c, 0x3b, 0x42, 0x6f, 0x61, 0x6c, 0x64, 0x79,
-0x6e, 0x3b, 0x4d, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4a, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b,
-0x4c, 0x75, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x79, 0x6e, 0x3b, 0x4d, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4a,
-0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4d, 0x2e, 0x48, 0x6f, 0x75, 0x6e, 0x65, 0x79, 0x3b, 0x4d, 0x2e, 0x4e,
-0x6f, 0x6c, 0x6c, 0x69, 0x63, 0x6b, 0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x67, 0x65, 0x75, 0x72, 0x65, 0x65,
-0x3b, 0x54, 0x6f, 0x73, 0x68, 0x69, 0x61, 0x67, 0x68, 0x74, 0x2d, 0x61, 0x72, 0x72, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x79,
-0x72, 0x6e, 0x74, 0x3b, 0x41, 0x76, 0x65, 0x72, 0x69, 0x6c, 0x3b, 0x42, 0x6f, 0x61, 0x6c, 0x64, 0x79, 0x6e, 0x3b, 0x4d,
-0x65, 0x61, 0x6e, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x73, 0x6f,
-0x75, 0x72, 0x65, 0x65, 0x3b, 0x4c, 0x75, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x79, 0x6e, 0x3b, 0x4d, 0x65, 0x61, 0x6e, 0x2d,
-0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72,
-0x3b, 0x4d, 0x65, 0x65, 0x20, 0x48, 0x6f, 0x75, 0x6e, 0x65, 0x79, 0x3b, 0x4d, 0x65, 0x65, 0x20, 0x6e, 0x79, 0x20, 0x4e,
-0x6f, 0x6c, 0x6c, 0x69, 0x63, 0x6b, 0x3b, 0x47, 0x65, 0x6e, 0x3b, 0x57, 0x68, 0x65, 0x3b, 0x4d, 0x65, 0x72, 0x3b, 0x45,
-0x62, 0x72, 0x3b, 0x4d, 0x65, 0x3b, 0x45, 0x66, 0x6e, 0x3b, 0x47, 0x6f, 0x72, 0x3b, 0x45, 0x73, 0x74, 0x3b, 0x47, 0x77,
-0x6e, 0x3b, 0x48, 0x65, 0x64, 0x3b, 0x44, 0x75, 0x3b, 0x4b, 0x65, 0x76, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x47, 0x65, 0x6e,
-0x76, 0x65, 0x72, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x57, 0x68, 0x65, 0x76, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x79, 0x73, 0x20,
-0x4d, 0x65, 0x72, 0x74, 0x68, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x45, 0x62, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x79, 0x73, 0x20,
-0x4d, 0x65, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x45, 0x66, 0x61, 0x6e, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x47, 0x6f, 0x72, 0x74,
-0x68, 0x65, 0x72, 0x65, 0x6e, 0x3b, 0x4d, 0x79, 0x65, 0x20, 0x45, 0x73, 0x74, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x47, 0x77,
-0x79, 0x6e, 0x67, 0x61, 0x6c, 0x61, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x48, 0x65, 0x64, 0x72, 0x61, 0x3b, 0x4d, 0x79, 0x73,
-0x20, 0x44, 0x75, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x4b, 0x65, 0x76, 0x61, 0x72, 0x64, 0x68, 0x75, 0x3b, 0x53, 0x2d, 0x186,
-0x3b, 0x4b, 0x2d, 0x186, 0x3b, 0x45, 0x2d, 0x186, 0x3b, 0x45, 0x2d, 0x4f, 0x3b, 0x45, 0x2d, 0x4b, 0x3b, 0x4f, 0x2d, 0x41,
-0x3b, 0x41, 0x2d, 0x4b, 0x3b, 0x44, 0x2d, 0x186, 0x3b, 0x46, 0x2d, 0x190, 0x3b, 0x186, 0x2d, 0x41, 0x3b, 0x186, 0x2d, 0x4f,
-0x3b, 0x4d, 0x2d, 0x186, 0x3b, 0x53, 0x61, 0x6e, 0x64, 0x61, 0x2d, 0x186, 0x70, 0x25b, 0x70, 0x254, 0x6e, 0x3b, 0x4b, 0x77,
-0x61, 0x6b, 0x77, 0x61, 0x72, 0x2d, 0x186, 0x67, 0x79, 0x65, 0x66, 0x75, 0x6f, 0x3b, 0x45, 0x62, 0x254, 0x77, 0x2d, 0x186,
-0x62, 0x65, 0x6e, 0x65, 0x6d, 0x3b, 0x45, 0x62, 0x254, 0x62, 0x69, 0x72, 0x61, 0x2d, 0x4f, 0x66, 0x6f, 0x72, 0x69, 0x73,
-0x75, 0x6f, 0x3b, 0x45, 0x73, 0x75, 0x73, 0x6f, 0x77, 0x20, 0x41, 0x6b, 0x65, 0x74, 0x73, 0x65, 0x61, 0x62, 0x61, 0x2d,
-0x4b, 0x254, 0x74, 0x254, 0x6e, 0x69, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x62, 0x69, 0x72, 0x61, 0x64, 0x65, 0x2d, 0x41, 0x79,
-0x25b, 0x77, 0x6f, 0x68, 0x6f, 0x6d, 0x75, 0x6d, 0x75, 0x3b, 0x41, 0x79, 0x25b, 0x77, 0x6f, 0x68, 0x6f, 0x2d, 0x4b, 0x69,
-0x74, 0x61, 0x77, 0x6f, 0x6e, 0x73, 0x61, 0x3b, 0x44, 0x69, 0x66, 0x75, 0x75, 0x2d, 0x186, 0x73, 0x61, 0x6e, 0x64, 0x61,
-0x61, 0x3b, 0x46, 0x61, 0x6e, 0x6b, 0x77, 0x61, 0x2d, 0x190, 0x62, 0x254, 0x3b, 0x186, 0x62, 0x25b, 0x73, 0x25b, 0x2d, 0x41,
-0x68, 0x69, 0x6e, 0x69, 0x6d, 0x65, 0x3b, 0x186, 0x62, 0x65, 0x72, 0x25b, 0x66, 0x25b, 0x77, 0x2d, 0x4f, 0x62, 0x75, 0x62,
-0x75, 0x6f, 0x3b, 0x4d, 0x75, 0x6d, 0x75, 0x2d, 0x186, 0x70, 0x25b, 0x6e, 0x69, 0x6d, 0x62, 0x61, 0x3b, 0x91c, 0x93e, 0x928,
-0x947, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92e, 0x93e, 0x930,
-0x94d, 0x91a, 0x3b, 0x90f, 0x92a, 0x94d, 0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x942, 0x928, 0x3b, 0x91c, 0x941, 0x932,
-0x948, 0x3b, 0x913, 0x917, 0x938, 0x94d, 0x91f, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x913, 0x915,
-0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928, 0x94b, 0x935, 0x94d, 0x939, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x921, 0x93f, 0x938, 0x947,
-0x902, 0x92c, 0x930, 0x3b, 0x41, 0x68, 0x61, 0x3b, 0x4f, 0x66, 0x6c, 0x3b, 0x4f, 0x63, 0x68, 0x3b, 0x41, 0x62, 0x65, 0x3b,
-0x41, 0x67, 0x62, 0x3b, 0x4f, 0x74, 0x75, 0x3b, 0x4d, 0x61, 0x61, 0x3b, 0x4d, 0x61, 0x6e, 0x3b, 0x47, 0x62, 0x6f, 0x3b,
-0x41, 0x6e, 0x74, 0x3b, 0x41, 0x6c, 0x65, 0x3b, 0x41, 0x66, 0x75, 0x3b, 0x41, 0x68, 0x61, 0x72, 0x61, 0x62, 0x61, 0x74,
-0x61, 0x3b, 0x4f, 0x66, 0x6c, 0x6f, 0x3b, 0x4f, 0x63, 0x68, 0x6f, 0x6b, 0x72, 0x69, 0x6b, 0x72, 0x69, 0x3b, 0x41, 0x62,
-0x65, 0x69, 0x62, 0x65, 0x65, 0x3b, 0x41, 0x67, 0x62, 0x65, 0x69, 0x6e, 0x61, 0x61, 0x3b, 0x4f, 0x74, 0x75, 0x6b, 0x77,
-0x61, 0x64, 0x61, 0x6e, 0x3b, 0x4d, 0x61, 0x61, 0x77, 0x65, 0x3b, 0x4d, 0x61, 0x6e, 0x79, 0x61, 0x77, 0x61, 0x6c, 0x65,
-0x3b, 0x47, 0x62, 0x6f, 0x3b, 0x41, 0x6e, 0x74, 0x6f, 0x6e, 0x3b, 0x41, 0x6c, 0x65, 0x6d, 0x6c, 0x65, 0x3b, 0x41, 0x66,
-0x75, 0x61, 0x62, 0x65, 0x65, 0x3b, 0x4a, 0x65, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x61, 0x3b, 0x45, 0x70,
-0x72, 0x3b, 0x4d, 0x65, 0x65, 0x3b, 0x4a, 0x75, 0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x1ecc, 0x67, 0x1ecd, 0x3b, 0x53, 0x65,
-0x70, 0x3b, 0x1ecc, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x65, 0x6e, 0x1ee5, 0x77, 0x61,
-0x72, 0x1ecb, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x1ee5, 0x77, 0x61, 0x72, 0x1ecb, 0x3b, 0x4d, 0x61, 0x61, 0x63, 0x68, 0x1ecb, 0x3b,
-0x45, 0x70, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x65, 0x65, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x1ecb,
-0x3b, 0x1ecc, 0x67, 0x1ecd, 0x1ecd, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x1ecc, 0x6b, 0x74,
-0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b,
-0x4d, 0x62, 0x65, 0x3b, 0x4b, 0x65, 0x6c, 0x3b, 0x4b, 0x74, 0x169, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x4b, 0x74, 0x6e, 0x3b,
-0x54, 0x68, 0x61, 0x3b, 0x4d, 0x6f, 0x6f, 0x3b, 0x4e, 0x79, 0x61, 0x3b, 0x4b, 0x6e, 0x64, 0x3b, 0x128, 0x6b, 0x75, 0x3b,
-0x128, 0x6b, 0x6d, 0x3b, 0x128, 0x6b, 0x6c, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x62, 0x65, 0x65,
-0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6c, 0x129, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77,
-0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e,
-0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x61,
-0x69, 0x20, 0x77, 0x61, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x74, 0x68, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20,
-0x77, 0x61, 0x20, 0x6d, 0x75, 0x6f, 0x6e, 0x7a, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6e, 0x79,
-0x61, 0x61, 0x6e, 0x79, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b,
-0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x129, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77,
-0x61, 0x20, 0x129, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x129, 0x6d, 0x77, 0x65, 0x3b, 0x4d, 0x77, 0x61, 0x69,
-0x20, 0x77, 0x61, 0x20, 0x129, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x6c, 0x129, 0x3b, 0x4d, 0x3b, 0x4b,
-0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x54, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x128, 0x3b, 0x128, 0x3b, 0x128,
-0x3b, 0x70f, 0x71f, 0x722, 0x20, 0x70f, 0x712, 0x3b, 0x72b, 0x712, 0x71b, 0x3b, 0x710, 0x715, 0x72a, 0x3b, 0x722, 0x71d, 0x723, 0x722,
-0x3b, 0x710, 0x71d, 0x72a, 0x3b, 0x71a, 0x719, 0x71d, 0x72a, 0x722, 0x3b, 0x72c, 0x721, 0x718, 0x719, 0x3b, 0x710, 0x712, 0x3b, 0x710,
-0x71d, 0x720, 0x718, 0x720, 0x3b, 0x70f, 0x72c, 0x72b, 0x20, 0x70f, 0x710, 0x3b, 0x70f, 0x72c, 0x72b, 0x20, 0x70f, 0x712, 0x3b, 0x70f,
-0x71f, 0x722, 0x20, 0x70f, 0x710, 0x3b, 0x120d, 0x12f0, 0x1275, 0x3b, 0x12ab, 0x1265, 0x12bd, 0x3b, 0x12ad, 0x1265, 0x120b, 0x3b, 0x134b, 0x1305,
-0x12ba, 0x3b, 0x12ad, 0x1262, 0x1245, 0x3b, 0x121d, 0x2f, 0x1275, 0x3b, 0x12b0, 0x122d, 0x3b, 0x121b, 0x122d, 0x12eb, 0x3b, 0x12eb, 0x12b8, 0x1292,
-0x3b, 0x1218, 0x1270, 0x1209, 0x3b, 0x121d, 0x2f, 0x121d, 0x3b, 0x1270, 0x1215, 0x1233, 0x3b, 0x120d, 0x12f0, 0x1275, 0x122a, 0x3b, 0x12ab, 0x1265,
-0x12bd, 0x1265, 0x1272, 0x3b, 0x12ad, 0x1265, 0x120b, 0x3b, 0x134b, 0x1305, 0x12ba, 0x122a, 0x3b, 0x12ad, 0x1262, 0x1245, 0x122a, 0x3b, 0x121d, 0x12aa,
-0x12a4, 0x120d, 0x20, 0x1275, 0x131f, 0x1292, 0x122a, 0x3b, 0x12b0, 0x122d, 0x12a9, 0x3b, 0x121b, 0x122d, 0x12eb, 0x121d, 0x20, 0x1275, 0x122a, 0x3b,
-0x12eb, 0x12b8, 0x1292, 0x20, 0x1218, 0x1233, 0x1245, 0x1208, 0x122a, 0x3b, 0x1218, 0x1270, 0x1209, 0x3b, 0x121d, 0x12aa, 0x12a4, 0x120d, 0x20, 0x1218,
-0x123d, 0x12c8, 0x122a, 0x3b, 0x1270, 0x1215, 0x1233, 0x1235, 0x122a, 0x3b, 0x120d, 0x3b, 0x12ab, 0x3b, 0x12ad, 0x3b, 0x134b, 0x3b, 0x12ad, 0x3b,
-0x121d, 0x3b, 0x12b0, 0x3b, 0x121b, 0x3b, 0x12eb, 0x3b, 0x1218, 0x3b, 0x121d, 0x3b, 0x1270, 0x3b, 0x1320, 0x1210, 0x1228, 0x3b, 0x12a8, 0x1270,
-0x1270, 0x3b, 0x1218, 0x1308, 0x1260, 0x3b, 0x12a0, 0x1280, 0x12d8, 0x3b, 0x130d, 0x1295, 0x1263, 0x1275, 0x3b, 0x1220, 0x1295, 0x12e8, 0x3b, 0x1210,
-0x1218, 0x1208, 0x3b, 0x1290, 0x1210, 0x1230, 0x3b, 0x12a8, 0x1228, 0x1218, 0x3b, 0x1320, 0x1240, 0x1218, 0x3b, 0x1280, 0x12f0, 0x1228, 0x3b, 0x1280,
-0x1220, 0x1220, 0x3b, 0x1320, 0x3b, 0x12a8, 0x3b, 0x1218, 0x3b, 0x12a0, 0x3b, 0x130d, 0x3b, 0x1220, 0x3b, 0x1210, 0x3b, 0x1290, 0x3b, 0x12a8,
-0x3b, 0x1320, 0x3b, 0x1280, 0x3b, 0x1280, 0x3b, 0x57, 0x65, 0x79, 0x3b, 0x46, 0x61, 0x6e, 0x3b, 0x54, 0x61, 0x74, 0x3b, 0x4e,
-0x61, 0x6e, 0x3b, 0x54, 0x75, 0x79, 0x3b, 0x54, 0x73, 0x6f, 0x3b, 0x54, 0x61, 0x66, 0x3b, 0x57, 0x61, 0x72, 0x3b, 0x4b,
-0x75, 0x6e, 0x3b, 0x42, 0x61, 0x6e, 0x3b, 0x4b, 0x6f, 0x6d, 0x3b, 0x53, 0x61, 0x75, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x57,
-0x65, 0x79, 0x65, 0x6e, 0x65, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x46, 0x61, 0x6e, 0x69, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x54,
-0x61, 0x74, 0x61, 0x6b, 0x61, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x4e, 0x61, 0x6e, 0x67, 0x72, 0x61, 0x3b, 0x46, 0x61, 0x69,
-0x20, 0x54, 0x75, 0x79, 0x6f, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x54, 0x73, 0x6f, 0x79, 0x69, 0x3b, 0x46, 0x61, 0x69, 0x20,
-0x54, 0x61, 0x66, 0x61, 0x6b, 0x61, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x57, 0x61, 0x72, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x46,
-0x61, 0x69, 0x20, 0x4b, 0x75, 0x6e, 0x6f, 0x62, 0x6f, 0x6b, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x42, 0x61, 0x6e, 0x73, 0x6f,
-0x6b, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x4b, 0x6f, 0x6d, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x53, 0x61, 0x75, 0x6b, 0x3b, 0x44,
-0x79, 0x6f, 0x6e, 0x3b, 0x42, 0x61, 0x61, 0x3b, 0x41, 0x74, 0x61, 0x74, 0x3b, 0x41, 0x6e, 0x61, 0x73, 0x3b, 0x41, 0x74,
-0x79, 0x6f, 0x3b, 0x41, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x74, 0x61, 0x72, 0x3b, 0x41, 0x77, 0x75, 0x72, 0x3b, 0x53, 0x68,
-0x61, 0x64, 0x3b, 0x53, 0x68, 0x61, 0x6b, 0x3b, 0x4e, 0x61, 0x62, 0x61, 0x3b, 0x4e, 0x61, 0x74, 0x61, 0x3b, 0x50, 0x65,
-0x6e, 0x20, 0x44, 0x79, 0x6f, 0x6e, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x42, 0x61, 0x27, 0x61, 0x3b, 0x50, 0x65, 0x6e, 0x20,
-0x41, 0x74, 0x61, 0x74, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x6e, 0x61, 0x73, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x74,
-0x79, 0x6f, 0x6e, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x63, 0x68, 0x69, 0x72, 0x69, 0x6d, 0x3b, 0x50, 0x65, 0x6e, 0x20,
-0x41, 0x74, 0x61, 0x72, 0x69, 0x62, 0x61, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x77, 0x75, 0x72, 0x72, 0x3b, 0x50, 0x65,
-0x6e, 0x20, 0x53, 0x68, 0x61, 0x64, 0x6f, 0x6e, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x53, 0x68, 0x61, 0x6b, 0x75, 0x72, 0x3b,
-0x50, 0x65, 0x6e, 0x20, 0x4b, 0x75, 0x72, 0x20, 0x4e, 0x61, 0x62, 0x61, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x4b, 0x75, 0x72,
-0x20, 0x4e, 0x61, 0x74, 0x61, 0x74, 0x3b, 0x41, 0x331, 0x79, 0x72, 0x3b, 0x41, 0x331, 0x68, 0x77, 0x3b, 0x41, 0x331, 0x74,
-0x61, 0x3b, 0x41, 0x331, 0x6e, 0x61, 0x3b, 0x41, 0x331, 0x70, 0x66, 0x3b, 0x41, 0x331, 0x6b, 0x69, 0x3b, 0x41, 0x331, 0x74,
-0x79, 0x3b, 0x41, 0x331, 0x6e, 0x69, 0x3b, 0x41, 0x331, 0x6b, 0x75, 0x3b, 0x53, 0x77, 0x61, 0x3b, 0x53, 0x62, 0x79, 0x3b,
-0x53, 0x62, 0x68, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x79, 0x72, 0x6e, 0x69, 0x67, 0x3b, 0x48, 0x79,
-0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x68, 0x77, 0x61, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x74, 0x61,
-0x74, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x6e, 0x61, 0x61, 0x69, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e,
-0x20, 0x41, 0x331, 0x70, 0x66, 0x77, 0x6f, 0x6e, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x6b, 0x69, 0x74,
-0x61, 0x74, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x74, 0x79, 0x69, 0x72, 0x69, 0x6e, 0x3b, 0x48, 0x79,
-0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x6e, 0x69, 0x6e, 0x61, 0x69, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331,
-0x6b, 0x75, 0x6d, 0x76, 0x69, 0x72, 0x69, 0x79, 0x69, 0x6e, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x53, 0x77, 0x61,
-0x6b, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x53, 0x77, 0x61, 0x6b, 0x20, 0x42, 0x27, 0x61, 0x331, 0x79, 0x72, 0x6e,
-0x69, 0x67, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x53, 0x77, 0x61, 0x6b, 0x20, 0x42, 0x27, 0x61, 0x331, 0x68, 0x77,
-0x61, 0x3b, 0x5a, 0x65, 0x6e, 0x3b, 0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x76, 0x72, 0x3b, 0x4d, 0x61,
-0x69, 0x3b, 0x4a, 0x75, 0x67, 0x3b, 0x4c, 0x75, 0x69, 0x3b, 0x41, 0x76, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74,
-0x75, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x63, 0x3b, 0x5a, 0x65, 0x6e, 0xe2, 0x72, 0x3b, 0x46, 0x65, 0x76, 0x72,
-0xe2, 0x72, 0x3b, 0x4d, 0x61, 0x72, 0xe7, 0x3b, 0x41, 0x76, 0x72, 0xee, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75,
-0x67, 0x6e, 0x3b, 0x4c, 0x75, 0x69, 0x3b, 0x41, 0x76, 0x6f, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x61,
-0x72, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x61, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x44, 0x69,
-0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x5a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4c,
-0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x50, 0x68, 0x61, 0x3b, 0x4c, 0x75, 0x68, 0x3b, 0x1e70,
-0x68, 0x61, 0x3b, 0x4c, 0x61, 0x6d, 0x3b, 0x53, 0x68, 0x75, 0x3b, 0x4c, 0x77, 0x69, 0x3b, 0x4c, 0x77, 0x61, 0x3b, 0x1e70,
-0x68, 0x61, 0x3b, 0x4b, 0x68, 0x75, 0x3b, 0x54, 0x73, 0x68, 0x3b, 0x1e3c, 0x61, 0x72, 0x3b, 0x4e, 0x79, 0x65, 0x3b, 0x50,
-0x68, 0x61, 0x6e, 0x64, 0x6f, 0x3b, 0x4c, 0x75, 0x68, 0x75, 0x68, 0x69, 0x3b, 0x1e70, 0x68, 0x61, 0x66, 0x61, 0x6d, 0x75,
-0x68, 0x77, 0x65, 0x3b, 0x4c, 0x61, 0x6d, 0x62, 0x61, 0x6d, 0x61, 0x69, 0x3b, 0x53, 0x68, 0x75, 0x6e, 0x64, 0x75, 0x6e,
-0x74, 0x68, 0x75, 0x6c, 0x65, 0x3b, 0x46, 0x75, 0x6c, 0x77, 0x69, 0x3b, 0x46, 0x75, 0x6c, 0x77, 0x61, 0x6e, 0x61, 0x3b,
-0x1e70, 0x68, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x65, 0x3b, 0x4b, 0x68, 0x75, 0x62, 0x76, 0x75, 0x6d, 0x65, 0x64, 0x7a, 0x69,
-0x3b, 0x54, 0x73, 0x68, 0x69, 0x6d, 0x65, 0x64, 0x7a, 0x69, 0x3b, 0x1e3c, 0x61, 0x72, 0x61, 0x3b, 0x4e, 0x79, 0x65, 0x6e,
-0x64, 0x61, 0x76, 0x68, 0x75, 0x73, 0x69, 0x6b, 0x75, 0x3b, 0x44, 0x7a, 0x76, 0x3b, 0x44, 0x7a, 0x64, 0x3b, 0x54, 0x65,
-0x64, 0x3b, 0x41, 0x66, 0x254, 0x3b, 0x44, 0x61, 0x6d, 0x3b, 0x4d, 0x61, 0x73, 0x3b, 0x53, 0x69, 0x61, 0x3b, 0x44, 0x65,
-0x61, 0x3b, 0x41, 0x6e, 0x79, 0x3b, 0x4b, 0x65, 0x6c, 0x3b, 0x41, 0x64, 0x65, 0x3b, 0x44, 0x7a, 0x6d, 0x3b, 0x44, 0x7a,
-0x6f, 0x76, 0x65, 0x3b, 0x44, 0x7a, 0x6f, 0x64, 0x7a, 0x65, 0x3b, 0x54, 0x65, 0x64, 0x6f, 0x78, 0x65, 0x3b, 0x41, 0x66,
-0x254, 0x66, 0x69, 0x25b, 0x3b, 0x44, 0x61, 0x6d, 0x61, 0x3b, 0x4d, 0x61, 0x73, 0x61, 0x3b, 0x53, 0x69, 0x61, 0x6d, 0x6c,
-0x254, 0x6d, 0x3b, 0x44, 0x65, 0x61, 0x73, 0x69, 0x61, 0x6d, 0x69, 0x6d, 0x65, 0x3b, 0x41, 0x6e, 0x79, 0x254, 0x6e, 0x79,
-0x254, 0x3b, 0x4b, 0x65, 0x6c, 0x65, 0x3b, 0x41, 0x64, 0x65, 0x25b, 0x6d, 0x65, 0x6b, 0x70, 0x254, 0x78, 0x65, 0x3b, 0x44,
-0x7a, 0x6f, 0x6d, 0x65, 0x3b, 0x44, 0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x44, 0x3b, 0x4d, 0x3b, 0x53, 0x3b, 0x44,
-0x3b, 0x41, 0x3b, 0x4b, 0x3b, 0x41, 0x3b, 0x44, 0x3b, 0x49, 0x61, 0x6e, 0x2e, 0x3b, 0x50, 0x65, 0x70, 0x2e, 0x3b, 0x4d,
-0x61, 0x6c, 0x2e, 0x3b, 0x2bb, 0x41, 0x70, 0x2e, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x49, 0x75, 0x6e, 0x2e, 0x3b, 0x49, 0x75,
-0x6c, 0x2e, 0x3b, 0x2bb, 0x41, 0x75, 0x2e, 0x3b, 0x4b, 0x65, 0x70, 0x2e, 0x3b, 0x2bb, 0x4f, 0x6b, 0x2e, 0x3b, 0x4e, 0x6f,
-0x77, 0x2e, 0x3b, 0x4b, 0x65, 0x6b, 0x2e, 0x3b, 0x49, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x50, 0x65, 0x70, 0x65,
-0x6c, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x6b, 0x69, 0x3b, 0x2bb, 0x41, 0x70, 0x65, 0x6c, 0x69, 0x6c,
-0x61, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x49, 0x75, 0x6e, 0x65, 0x3b, 0x49, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x2bb, 0x41, 0x75,
-0x6b, 0x61, 0x6b, 0x65, 0x3b, 0x4b, 0x65, 0x70, 0x61, 0x6b, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61,
-0x6b, 0x6f, 0x70, 0x61, 0x3b, 0x4e, 0x6f, 0x77, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x4b, 0x65, 0x6b, 0x65, 0x6d, 0x61,
-0x70, 0x61, 0x3b, 0x4a, 0x75, 0x77, 0x3b, 0x53, 0x77, 0x69, 0x3b, 0x54, 0x73, 0x61, 0x3b, 0x4e, 0x79, 0x61, 0x3b, 0x54,
-0x73, 0x77, 0x3b, 0x41, 0x74, 0x61, 0x3b, 0x41, 0x6e, 0x61, 0x3b, 0x41, 0x72, 0x69, 0x3b, 0x41, 0x6b, 0x75, 0x3b, 0x53,
-0x77, 0x61, 0x3b, 0x4d, 0x61, 0x6e, 0x3b, 0x4d, 0x61, 0x73, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x4a, 0x75, 0x77, 0x75,
-0x6e, 0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x53, 0x77, 0x69, 0x79, 0x61, 0x6e, 0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74,
-0x20, 0x54, 0x73, 0x61, 0x74, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x4e, 0x79, 0x61, 0x69, 0x3b, 0x5a, 0x77, 0x61, 0x74,
-0x20, 0x54, 0x73, 0x77, 0x6f, 0x6e, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x41, 0x74, 0x61, 0x61, 0x68, 0x3b, 0x5a, 0x77,
-0x61, 0x74, 0x20, 0x41, 0x6e, 0x61, 0x74, 0x61, 0x74, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x41, 0x72, 0x69, 0x6e, 0x61,
-0x69, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x41, 0x6b, 0x75, 0x62, 0x75, 0x6e, 0x79, 0x75, 0x6e, 0x67, 0x3b, 0x5a, 0x77,
-0x61, 0x74, 0x20, 0x53, 0x77, 0x61, 0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x4d, 0x61, 0x6e, 0x67, 0x6a, 0x75, 0x77,
-0x61, 0x6e, 0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x53, 0x77, 0x61, 0x67, 0x2d, 0x4d, 0x61, 0x2d, 0x53, 0x75, 0x79,
-0x61, 0x6e, 0x67, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x6c, 0x3b, 0x45, 0x70, 0x75, 0x3b,
-0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x4f, 0x67, 0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b,
-0x4f, 0x6b, 0x75, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x77, 0x61, 0x6c, 0x65,
-0x3b, 0x46, 0x65, 0x62, 0x75, 0x6c, 0x75, 0x77, 0x61, 0x6c, 0x65, 0x3b, 0x4d, 0x61, 0x6c, 0x69, 0x63, 0x68, 0x69, 0x3b,
-0x45, 0x70, 0x75, 0x6c, 0x6f, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69,
-0x3b, 0x4f, 0x67, 0x61, 0x73, 0x69, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x75, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f,
-0x6b, 0x75, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d,
-0x62, 0x61, 0x3b, 0x45, 0x6e, 0x65, 0x3b, 0x50, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d,
-0x61, 0x79, 0x3b, 0x48, 0x75, 0x6e, 0x3b, 0x48, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f,
-0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x62, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x45, 0x6e, 0x65, 0x72, 0x6f, 0x3b, 0x50, 0x65, 0x62,
-0x72, 0x65, 0x72, 0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x79,
-0x6f, 0x3b, 0x48, 0x75, 0x6e, 0x79, 0x6f, 0x3b, 0x48, 0x75, 0x6c, 0x79, 0x6f, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x6f,
-0x3b, 0x53, 0x65, 0x74, 0x79, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x4f, 0x6b, 0x74, 0x75, 0x62, 0x72, 0x65, 0x3b, 0x4e,
-0x6f, 0x62, 0x79, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x44, 0x69, 0x73, 0x79, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x45,
-0x3b, 0x50, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x48, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e,
-0x3b, 0x44, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0xe4, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d,
-0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x75, 0x67, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f,
-0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x7a, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x46, 0x65,
-0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69,
-0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x63, 0x68, 0x74, 0x3b,
-0x53, 0x65, 0x70, 0x74, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e,
-0x6f, 0x76, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0xa2cd, 0xa1aa, 0x3b,
-0xa44d, 0xa1aa, 0x3b, 0xa315, 0xa1aa, 0x3b, 0xa1d6, 0xa1aa, 0x3b, 0xa26c, 0xa1aa, 0x3b, 0xa0d8, 0xa1aa, 0x3b, 0xa3c3, 0xa1aa, 0x3b, 0xa246, 0xa1aa,
-0x3b, 0xa22c, 0xa1aa, 0x3b, 0xa2b0, 0xa1aa, 0x3b, 0xa2b0, 0xa2aa, 0xa1aa, 0x3b, 0xa2b0, 0xa44b, 0xa1aa, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46,
-0x65, 0x62, 0x3b, 0x4d, 0x61, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a,
-0x75, 0x6c, 0x3b, 0x41, 0x72, 0x68, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x55, 0x73, 0x69, 0x3b, 0x44,
-0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x61, 0x62, 0x61, 0x72, 0x69, 0x3b, 0x75, 0x46, 0x65, 0x62, 0x65, 0x72, 0x62, 0x61,
-0x72, 0x69, 0x3b, 0x75, 0x4d, 0x61, 0x74, 0x6a, 0x68, 0x69, 0x3b, 0x75, 0x2d, 0x41, 0x70, 0x72, 0x65, 0x6c, 0x69, 0x3b,
-0x4d, 0x65, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x79, 0x69, 0x3b, 0x41, 0x72, 0x68,
-0x6f, 0x73, 0x74, 0x6f, 0x73, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f,
-0x62, 0x61, 0x3b, 0x55, 0x73, 0x69, 0x6e, 0x79, 0x69, 0x6b, 0x68, 0x61, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d,
-0x62, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x74, 0x3b, 0x41, 0x70, 0x6f, 0x3b, 0x4d,
-0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f,
-0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x66, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x61, 0x77, 0x61, 0x72, 0x65, 0x3b,
-0x46, 0x65, 0x62, 0x65, 0x72, 0x77, 0x61, 0x72, 0x65, 0x3b, 0x4d, 0x61, 0x74, 0x161, 0x68, 0x65, 0x3b, 0x41, 0x70, 0x6f,
-0x72, 0x65, 0x6c, 0x65, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x65, 0x3b,
-0x41, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x73, 0x65, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d, 0x65, 0x72, 0x65, 0x3b, 0x4f, 0x6b,
-0x74, 0x6f, 0x62, 0x6f, 0x72, 0x65, 0x3b, 0x4e, 0x6f, 0x66, 0x65, 0x6d, 0x65, 0x72, 0x65, 0x3b, 0x44, 0x69, 0x73, 0x65,
-0x6d, 0x65, 0x72, 0x65, 0x3b, 0x6f, 0x111, 0x111, 0x61, 0x6a, 0x61, 0x67, 0x65, 0x3b, 0x67, 0x75, 0x6f, 0x76, 0x76, 0x61,
-0x3b, 0x6e, 0x6a, 0x75, 0x6b, 0x10d, 0x61, 0x3b, 0x63, 0x75, 0x6f, 0x14b, 0x6f, 0x3b, 0x6d, 0x69, 0x65, 0x73, 0x73, 0x65,
-0x3b, 0x67, 0x65, 0x61, 0x73, 0x73, 0x65, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x64, 0x6e, 0x65, 0x3b, 0x62, 0x6f, 0x72, 0x67,
-0x65, 0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x61, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x67, 0x6f, 0x74, 0x3b, 0x73, 0x6b, 0xe1, 0x62,
-0x6d, 0x61, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x6c, 0x61, 0x3b, 0x6f, 0x111, 0x111, 0x61, 0x6a, 0x61, 0x67, 0x65, 0x6d, 0xe1,
-0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x75, 0x6f, 0x76, 0x76, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x6e, 0x6a, 0x75, 0x6b,
-0x10d, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x63, 0x75, 0x6f, 0x14b, 0x6f, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x6d,
-0x69, 0x65, 0x73, 0x73, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x73, 0x65, 0x6d, 0xe1, 0x6e,
-0x6e, 0x75, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x64, 0x6e, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x62, 0x6f, 0x72, 0x67,
-0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x6f,
-0x6c, 0x67, 0x67, 0x6f, 0x74, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x73, 0x6b, 0xe1, 0x62, 0x6d, 0x61, 0x6d, 0xe1, 0x6e,
-0x6e, 0x75, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x6c, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x4f, 0x3b, 0x47, 0x3b, 0x4e,
-0x3b, 0x43, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x53, 0x3b, 0x42, 0x3b, 0x10c, 0x3b, 0x47, 0x3b, 0x53, 0x3b, 0x4a, 0x3b, 0x6f,
-0x111, 0x111, 0x6a, 0x3b, 0x67, 0x75, 0x6f, 0x76, 0x3b, 0x6e, 0x6a, 0x75, 0x6b, 0x3b, 0x63, 0x75, 0x6f, 0x3b, 0x6d, 0x69,
-0x65, 0x73, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x3b, 0x62, 0x6f, 0x72, 0x67, 0x3b, 0x10d, 0x61,
-0x6b, 0x10d, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x3b, 0x73, 0x6b, 0xe1, 0x62, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x3b, 0x4b, 0x69,
-0x69, 0x3b, 0x44, 0x68, 0x69, 0x3b, 0x54, 0x72, 0x69, 0x3b, 0x53, 0x70, 0x69, 0x3b, 0x52, 0x69, 0x69, 0x3b, 0x4d, 0x74,
-0x69, 0x3b, 0x45, 0x6d, 0x69, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d, 0x6e, 0x69, 0x3b, 0x4d, 0x78, 0x69, 0x3b, 0x4d, 0x78,
-0x6b, 0x3b, 0x4d, 0x78, 0x64, 0x3b, 0x4b, 0x69, 0x6e, 0x67, 0x61, 0x6c, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x44, 0x68,
-0x61, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x54, 0x72, 0x75, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x53, 0x70, 0x61, 0x74,
-0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x52, 0x69, 0x6d, 0x61, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x74, 0x61,
-0x72, 0x75, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x45, 0x6d, 0x70, 0x69, 0x74, 0x75, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b,
-0x4d, 0x61, 0x73, 0x70, 0x61, 0x74, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x6e, 0x67, 0x61, 0x72, 0x69, 0x20, 0x69,
-0x64, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x78, 0x61, 0x6c, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x78, 0x61, 0x6c,
-0x20, 0x6b, 0x69, 0x6e, 0x67, 0x61, 0x6c, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x78, 0x61, 0x6c, 0x20, 0x64,
-0x68, 0x61, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x53, 0x3b, 0x52, 0x3b, 0x4d, 0x3b,
-0x45, 0x3b, 0x50, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x43, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b,
-0x4d, 0x61, 0x63, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x43, 0x75, 0x6c, 0x3b,
-0x41, 0x67, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x62, 0x3b, 0x44, 0x69, 0x73, 0x3b,
-0x43, 0x68, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x72, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61,
-0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x69, 0x72, 0x69, 0x72, 0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69,
-0x3b, 0x43, 0x68, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65,
-0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x69, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x62, 0x65, 0x6d, 0x62, 0x61, 0x3b,
-0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x43, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b,
-0x43, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x49, 0x6d, 0x62, 0x3b, 0x4b, 0x61, 0x77, 0x3b,
-0x4b, 0x61, 0x64, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x4b, 0x61, 0x72, 0x3b, 0x4d, 0x66, 0x75, 0x3b,
-0x57, 0x75, 0x6e, 0x3b, 0x49, 0x6b, 0x65, 0x3b, 0x49, 0x6b, 0x75, 0x3b, 0x49, 0x6d, 0x77, 0x3b, 0x49, 0x77, 0x69, 0x3b,
-0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6d, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4d, 0x6f, 0x72,
-0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x77, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77,
-0x61, 0x20, 0x6b, 0x61, 0x64, 0x61, 0x64, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b,
-0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x73, 0x61, 0x6e, 0x75,
-0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x72, 0x61, 0x6e, 0x64, 0x61, 0x64, 0x75,
-0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6d, 0x66, 0x75, 0x6e, 0x67, 0x61, 0x64, 0x65, 0x3b,
-0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x77, 0x75, 0x6e, 0x79, 0x61, 0x6e, 0x79, 0x61, 0x3b, 0x4d,
-0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x6f, 0x72, 0x69,
-0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77,
-0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x6d, 0x77, 0x65, 0x72, 0x69, 0x3b, 0x4d, 0x6f,
-0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x77, 0x69,
-0x3b, 0x49, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4d, 0x3b, 0x57, 0x3b, 0x49, 0x3b, 0x49,
-0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x73, 0x69, 0x69, 0x3b, 0x63, 0x6f, 0x6c, 0x3b, 0x6d, 0x62, 0x6f, 0x3b, 0x73, 0x65, 0x65,
-0x3b, 0x64, 0x75, 0x75, 0x3b, 0x6b, 0x6f, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x3b, 0x6a, 0x75, 0x6b, 0x3b, 0x73, 0x6c, 0x74,
-0x3b, 0x79, 0x61, 0x72, 0x3b, 0x6a, 0x6f, 0x6c, 0x3b, 0x62, 0x6f, 0x77, 0x3b, 0x73, 0x69, 0x69, 0x6c, 0x6f, 0x3b, 0x63,
-0x6f, 0x6c, 0x74, 0x65, 0x3b, 0x6d, 0x62, 0x6f, 0x6f, 0x79, 0x3b, 0x73, 0x65, 0x65, 0x257, 0x74, 0x6f, 0x3b, 0x64, 0x75,
-0x75, 0x6a, 0x61, 0x6c, 0x3b, 0x6b, 0x6f, 0x72, 0x73, 0x65, 0x3b, 0x6d, 0x6f, 0x72, 0x73, 0x6f, 0x3b, 0x6a, 0x75, 0x6b,
-0x6f, 0x3b, 0x73, 0x69, 0x69, 0x6c, 0x74, 0x6f, 0x3b, 0x79, 0x61, 0x72, 0x6b, 0x6f, 0x6d, 0x61, 0x61, 0x3b, 0x6a, 0x6f,
-0x6c, 0x61, 0x6c, 0x3b, 0x62, 0x6f, 0x77, 0x74, 0x65, 0x3b, 0x73, 0x3b, 0x63, 0x3b, 0x6d, 0x3b, 0x73, 0x3b, 0x64, 0x3b,
-0x6b, 0x3b, 0x6d, 0x3b, 0x6a, 0x3b, 0x73, 0x3b, 0x79, 0x3b, 0x6a, 0x3b, 0x62, 0x3b, 0x4a, 0x45, 0x4e, 0x3b, 0x57, 0x4b,
-0x52, 0x3b, 0x57, 0x47, 0x54, 0x3b, 0x57, 0x4b, 0x4e, 0x3b, 0x57, 0x54, 0x4e, 0x3b, 0x57, 0x54, 0x44, 0x3b, 0x57, 0x4d,
-0x4a, 0x3b, 0x57, 0x4e, 0x4e, 0x3b, 0x57, 0x4b, 0x44, 0x3b, 0x57, 0x49, 0x4b, 0x3b, 0x57, 0x4d, 0x57, 0x3b, 0x44, 0x49,
-0x54, 0x3b, 0x4e, 0x6a, 0x65, 0x6e, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20,
-0x6b, 0x65, 0x72, 0x129, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x74, 0x169,
-0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65,
-0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20,
-0x67, 0x61, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6d,
-0x169, 0x67, 0x77, 0x61, 0x6e, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e,
-0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d,
-0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20,
-0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x169, 0x6d, 0x77, 0x65, 0x3b, 0x4e, 0x64, 0x69,
-0x74, 0x68, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x47, 0x3b, 0x4d,
-0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x44, 0x3b, 0x4f, 0x62, 0x6f, 0x3b, 0x57, 0x61, 0x61, 0x3b, 0x4f,
-0x6b, 0x75, 0x3b, 0x4f, 0x6e, 0x67, 0x3b, 0x49, 0x6d, 0x65, 0x3b, 0x49, 0x6c, 0x65, 0x3b, 0x53, 0x61, 0x70, 0x3b, 0x49,
-0x73, 0x69, 0x3b, 0x53, 0x61, 0x61, 0x3b, 0x54, 0x6f, 0x6d, 0x3b, 0x54, 0x6f, 0x62, 0x3b, 0x54, 0x6f, 0x77, 0x3b, 0x4c,
-0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x62, 0x6f, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x77,
-0x61, 0x61, 0x72, 0x65, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x6b, 0x75, 0x6e, 0x69, 0x3b, 0x4c,
-0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x6e, 0x67, 0x27, 0x77, 0x61, 0x6e, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20,
-0x6c, 0x65, 0x20, 0x69, 0x6d, 0x65, 0x74, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x69, 0x6c, 0x65, 0x3b,
-0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x73, 0x61, 0x70, 0x61, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65,
-0x20, 0x69, 0x73, 0x69, 0x65, 0x74, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x73, 0x61, 0x61, 0x6c, 0x3b,
-0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c,
-0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6f, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20,
-0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x77, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x4f, 0x3b, 0x57, 0x3b, 0x4f, 0x3b, 0x4f, 0x3b,
-0x49, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x4a, 0x61, 0x6e, 0x3b,
-0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b,
-0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x75, 0x67, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x75, 0x3b, 0x4e, 0x6f, 0x76, 0x3b,
-0x44, 0x65, 0x63, 0x3b, 0x4a, 0x61, 0x6e, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x46, 0x65, 0x76, 0x72, 0x65, 0x69, 0x72, 0x6f,
-0x3b, 0x4d, 0x61, 0x72, 0x63, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x6f, 0x3b, 0x4a, 0x75,
-0x6e, 0x68, 0x6f, 0x3b, 0x4a, 0x75, 0x6c, 0x68, 0x6f, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x6f, 0x3b, 0x53, 0x65,
-0x74, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x72, 0x6f, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62,
-0x72, 0x6f, 0x3b, 0x44, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x5a, 0x69, 0x62, 0x3b, 0x4e, 0x68, 0x6c, 0x3b,
-0x4d, 0x62, 0x69, 0x3b, 0x4d, 0x61, 0x62, 0x3b, 0x4e, 0x6b, 0x77, 0x3b, 0x4e, 0x68, 0x6c, 0x3b, 0x4e, 0x74, 0x75, 0x3b,
-0x4e, 0x63, 0x77, 0x3b, 0x4d, 0x70, 0x61, 0x3b, 0x4d, 0x66, 0x75, 0x3b, 0x4c, 0x77, 0x65, 0x3b, 0x4d, 0x70, 0x61, 0x3b,
-0x5a, 0x69, 0x62, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x6c, 0x61, 0x3b, 0x4e, 0x68, 0x6c, 0x6f, 0x6c, 0x61, 0x6e, 0x6a, 0x61,
-0x3b, 0x4d, 0x62, 0x69, 0x6d, 0x62, 0x69, 0x74, 0x68, 0x6f, 0x3b, 0x4d, 0x61, 0x62, 0x61, 0x73, 0x61, 0x3b, 0x4e, 0x6b,
-0x77, 0x65, 0x6e, 0x6b, 0x77, 0x65, 0x7a, 0x69, 0x3b, 0x4e, 0x68, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x3b, 0x4e,
-0x74, 0x75, 0x6c, 0x69, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x4e, 0x63, 0x77, 0x61, 0x62, 0x61, 0x6b, 0x61, 0x7a, 0x69, 0x3b,
-0x4d, 0x70, 0x61, 0x6e, 0x64, 0x75, 0x6c, 0x61, 0x3b, 0x4d, 0x66, 0x75, 0x6d, 0x66, 0x75, 0x3b, 0x4c, 0x77, 0x65, 0x7a,
-0x69, 0x3b, 0x4d, 0x70, 0x61, 0x6c, 0x61, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x5a, 0x3b, 0x4e, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b,
-0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x4d, 0x31, 0x3b, 0x4d,
-0x32, 0x3b, 0x4d, 0x33, 0x3b, 0x4d, 0x34, 0x3b, 0x4d, 0x35, 0x3b, 0x4d, 0x36, 0x3b, 0x4d, 0x37, 0x3b, 0x4d, 0x38, 0x3b,
-0x4d, 0x39, 0x3b, 0x4d, 0x31, 0x30, 0x3b, 0x4d, 0x31, 0x31, 0x3b, 0x4d, 0x31, 0x32, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69,
-0x20, 0x77, 0x61, 0x20, 0x6b, 0x77, 0x61, 0x6e, 0x7a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20,
-0x6b, 0x61, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x74,
-0x75, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65,
-0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x74, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20,
-0x73, 0x69, 0x74, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x73, 0x61, 0x62, 0x61, 0x3b, 0x4d,
-0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77,
-0x61, 0x20, 0x74, 0x69, 0x73, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d,
-0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20,
-0x6d, 0x6f, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20,
-0x6e, 0x61, 0x20, 0x6d, 0x62, 0x69, 0x6c, 0x69, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x54, 0x3b, 0x53,
-0x3b, 0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x69, 0x6e, 0x6e, 0x3b, 0x62, 0x1e5b, 0x61,
-0x3b, 0x6d, 0x61, 0x1e5b, 0x3b, 0x69, 0x62, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x79, 0x75, 0x6e, 0x3b, 0x79, 0x75, 0x6c,
-0x3b, 0x263, 0x75, 0x63, 0x3b, 0x63, 0x75, 0x74, 0x3b, 0x6b, 0x74, 0x75, 0x3b, 0x6e, 0x75, 0x77, 0x3b, 0x64, 0x75, 0x6a,
-0x3b, 0x69, 0x6e, 0x6e, 0x61, 0x79, 0x72, 0x3b, 0x62, 0x1e5b, 0x61, 0x79, 0x1e5b, 0x3b, 0x6d, 0x61, 0x1e5b, 0x1e63, 0x3b, 0x69,
-0x62, 0x72, 0x69, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x79, 0x75, 0x6e, 0x79, 0x75, 0x3b, 0x79, 0x75, 0x6c,
-0x79, 0x75, 0x7a, 0x3b, 0x263, 0x75, 0x63, 0x74, 0x3b, 0x63, 0x75, 0x74, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x6b, 0x74,
-0x75, 0x62, 0x72, 0x3b, 0x6e, 0x75, 0x77, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x64, 0x75, 0x6a, 0x61, 0x6e, 0x62, 0x69,
-0x72, 0x3b, 0x69, 0x3b, 0x62, 0x3b, 0x6d, 0x3b, 0x69, 0x3b, 0x6d, 0x3b, 0x79, 0x3b, 0x79, 0x3b, 0x263, 0x3b, 0x63, 0x3b,
-0x6b, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x59, 0x65, 0x6e, 0x3b, 0x46, 0x75, 0x72, 0x3b, 0x4d, 0x65, 0x263, 0x3b, 0x59, 0x65,
-0x62, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x59, 0x75, 0x6e, 0x3b, 0x59, 0x75, 0x6c, 0x3b, 0x194, 0x75, 0x63, 0x3b, 0x43, 0x74,
-0x65, 0x3b, 0x54, 0x75, 0x62, 0x3b, 0x4e, 0x75, 0x6e, 0x3b, 0x44, 0x75, 0x1e7, 0x3b, 0x59, 0x65, 0x6e, 0x6e, 0x61, 0x79,
-0x65, 0x72, 0x3b, 0x46, 0x75, 0x1e5b, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x263, 0x72, 0x65, 0x73, 0x3b, 0x59, 0x65, 0x62, 0x72,
-0x69, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6e, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6c, 0x79, 0x75,
-0x3b, 0x194, 0x75, 0x63, 0x74, 0x3b, 0x43, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x54, 0x75, 0x62, 0x65, 0x1e5b, 0x3b,
-0x4e, 0x75, 0x6e, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x44, 0x75, 0x1e7, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x59, 0x3b,
-0x46, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x194, 0x3b, 0x43, 0x3b, 0x54, 0x3b, 0x4e, 0x3b,
-0x44, 0x3b, 0x4b, 0x42, 0x5a, 0x3b, 0x4b, 0x42, 0x52, 0x3b, 0x4b, 0x53, 0x54, 0x3b, 0x4b, 0x4b, 0x4e, 0x3b, 0x4b, 0x54,
-0x4e, 0x3b, 0x4b, 0x4d, 0x4b, 0x3b, 0x4b, 0x4d, 0x53, 0x3b, 0x4b, 0x4d, 0x4e, 0x3b, 0x4b, 0x4d, 0x4e, 0x3b, 0x4b, 0x4b,
-0x4d, 0x3b, 0x4b, 0x4e, 0x4b, 0x3b, 0x4b, 0x4e, 0x42, 0x3b, 0x4f, 0x6b, 0x77, 0x6f, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x7a,
-0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x73,
-0x68, 0x61, 0x74, 0x75, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61,
-0x74, 0x61, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x61, 0x67, 0x61, 0x3b, 0x4f, 0x6b,
-0x77, 0x61, 0x6d, 0x75, 0x73, 0x68, 0x61, 0x6e, 0x6a, 0x75, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x75, 0x6e, 0x61, 0x61,
-0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x77, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b,
-0x75, 0x6d, 0x69, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6b, 0x75, 0x6d,
-0x77, 0x65, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x62, 0x69, 0x72,
-0x69, 0x3b, 0x48, 0x75, 0x74, 0x3b, 0x56, 0x69, 0x6c, 0x3b, 0x44, 0x61, 0x74, 0x3b, 0x54, 0x61, 0x69, 0x3b, 0x48, 0x61,
-0x6e, 0x3b, 0x53, 0x69, 0x74, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x4e, 0x61, 0x6e, 0x3b, 0x54, 0x69, 0x73, 0x3b, 0x4b, 0x75,
-0x6d, 0x3b, 0x4b, 0x6d, 0x6a, 0x3b, 0x4b, 0x6d, 0x62, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20,
-0x67, 0x77, 0x61, 0x20, 0x68, 0x75, 0x74, 0x61, 0x6c, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69,
-0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x76, 0x69, 0x6c, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a,
-0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x64, 0x61, 0x74, 0x75, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64,
-0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x74, 0x61, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64,
-0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x68, 0x61, 0x6e, 0x75, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65,
-0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x73, 0x69, 0x74, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64,
-0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x73, 0x61, 0x62, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a,
-0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69,
-0x20, 0x67, 0x77, 0x61, 0x20, 0x74, 0x69, 0x73, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20,
-0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67,
-0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x6f, 0x6a, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d,
-0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x62,
-0x69, 0x6c, 0x69, 0x3b, 0x48, 0x3b, 0x56, 0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x48, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x4e, 0x3b,
-0x54, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72,
-0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x79, 0x69, 0x3b, 0x4d,
-0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x79, 0x61, 0x69, 0x3b, 0x41, 0x67, 0x75, 0x73,
-0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e,
-0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x7a, 0x61, 0x6e, 0x3b, 0x66,
-0x65, 0x62, 0x3b, 0x6e, 0x61, 0x72, 0x3b, 0x61, 0x77, 0x69, 0x3b, 0x6d, 0x25b, 0x3b, 0x7a, 0x75, 0x77, 0x3b, 0x7a, 0x75,
-0x6c, 0x3b, 0x75, 0x74, 0x69, 0x3b, 0x73, 0x25b, 0x74, 0x3b, 0x254, 0x6b, 0x75, 0x3b, 0x6e, 0x6f, 0x77, 0x3b, 0x64, 0x65,
-0x73, 0x3b, 0x7a, 0x61, 0x6e, 0x77, 0x75, 0x79, 0x65, 0x3b, 0x66, 0x65, 0x62, 0x75, 0x72, 0x75, 0x79, 0x65, 0x3b, 0x6d,
-0x61, 0x72, 0x69, 0x73, 0x69, 0x3b, 0x61, 0x77, 0x69, 0x72, 0x69, 0x6c, 0x69, 0x3b, 0x6d, 0x25b, 0x3b, 0x7a, 0x75, 0x77,
-0x25b, 0x6e, 0x3b, 0x7a, 0x75, 0x6c, 0x75, 0x79, 0x65, 0x3b, 0x75, 0x74, 0x69, 0x3b, 0x73, 0x25b, 0x74, 0x61, 0x6e, 0x62,
-0x75, 0x72, 0x75, 0x3b, 0x254, 0x6b, 0x75, 0x74, 0x254, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x6e, 0x6f, 0x77, 0x61, 0x6e, 0x62,
-0x75, 0x72, 0x75, 0x3b, 0x64, 0x65, 0x73, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x5a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b,
-0x41, 0x3b, 0x4d, 0x3b, 0x5a, 0x3b, 0x5a, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x186, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4d, 0x62,
-0x65, 0x3b, 0x4b, 0x61, 0x69, 0x3b, 0x4b, 0x61, 0x74, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x47, 0x61, 0x74, 0x3b, 0x47, 0x61,
-0x6e, 0x3b, 0x4d, 0x75, 0x67, 0x3b, 0x4b, 0x6e, 0x6e, 0x3b, 0x4b, 0x65, 0x6e, 0x3b, 0x49, 0x6b, 0x75, 0x3b, 0x49, 0x6d,
-0x77, 0x3b, 0x49, 0x67, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x62, 0x65, 0x72, 0x65,
-0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x129, 0x72, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72,
-0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x68, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77,
-0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61,
-0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x74, 0x61, 0x74,
-0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x169, 0x67, 0x77, 0x61, 0x6e, 0x6a, 0x61, 0x3b,
-0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72,
-0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20,
-0x69, 0x6b, 0x169, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69,
-0x20, 0x6e, 0x61, 0x20, 0x169, 0x6d, 0x77, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b,
-0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x4b, 0x61, 0x129, 0x72, 0x129, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b,
-0x3b, 0x47, 0x3b, 0x47, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x13a4, 0x13c3, 0x3b,
-0x13a7, 0x13a6, 0x3b, 0x13a0, 0x13c5, 0x3b, 0x13a7, 0x13ec, 0x3b, 0x13a0, 0x13c2, 0x3b, 0x13d5, 0x13ad, 0x3b, 0x13ab, 0x13f0, 0x3b, 0x13a6, 0x13b6,
-0x3b, 0x13da, 0x13b5, 0x3b, 0x13da, 0x13c2, 0x3b, 0x13c5, 0x13d3, 0x3b, 0x13a4, 0x13cd, 0x3b, 0x13a4, 0x13c3, 0x13b8, 0x13d4, 0x13c5, 0x3b, 0x13a7,
-0x13a6, 0x13b5, 0x3b, 0x13a0, 0x13c5, 0x13f1, 0x3b, 0x13a7, 0x13ec, 0x13c2, 0x3b, 0x13a0, 0x13c2, 0x13cd, 0x13ac, 0x13d8, 0x3b, 0x13d5, 0x13ad, 0x13b7,
-0x13f1, 0x3b, 0x13ab, 0x13f0, 0x13c9, 0x13c2, 0x3b, 0x13a6, 0x13b6, 0x13c2, 0x3b, 0x13da, 0x13b5, 0x13cd, 0x13d7, 0x3b, 0x13da, 0x13c2, 0x13c5, 0x13d7,
-0x3b, 0x13c5, 0x13d3, 0x13d5, 0x13c6, 0x3b, 0x13a4, 0x13cd, 0x13a9, 0x13f1, 0x3b, 0x13a4, 0x3b, 0x13a7, 0x3b, 0x13a0, 0x3b, 0x13a7, 0x3b, 0x13a0,
-0x3b, 0x13d5, 0x3b, 0x13ab, 0x3b, 0x13a6, 0x3b, 0x13da, 0x3b, 0x13da, 0x3b, 0x13c5, 0x3b, 0x13a4, 0x3b, 0x7a, 0x61, 0x6e, 0x3b, 0x66,
-0x65, 0x76, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x76, 0x72, 0x3b, 0x6d, 0x65, 0x3b, 0x7a, 0x69, 0x6e, 0x3b, 0x7a, 0x69,
-0x6c, 0x3b, 0x6f, 0x75, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b, 0x64, 0x65,
-0x73, 0x3b, 0x7a, 0x61, 0x6e, 0x76, 0x69, 0x65, 0x3b, 0x66, 0x65, 0x76, 0x72, 0x69, 0x79, 0x65, 0x3b, 0x6d, 0x61, 0x72,
-0x73, 0x3b, 0x61, 0x76, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x65, 0x3b, 0x7a, 0x69, 0x6e, 0x3b, 0x7a, 0x69, 0x6c, 0x79, 0x65,
-0x3b, 0x6f, 0x75, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x61, 0x6d, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x3b, 0x6e, 0x6f,
-0x76, 0x61, 0x6d, 0x3b, 0x64, 0x65, 0x73, 0x61, 0x6d, 0x3b, 0x7a, 0x3b, 0x66, 0x3b, 0x6d, 0x3b, 0x61, 0x3b, 0x6d, 0x3b,
-0x7a, 0x3b, 0x7a, 0x3b, 0x6f, 0x3b, 0x73, 0x3b, 0x6f, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20,
-0x4e, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x50, 0x69, 0x6c, 0x69,
-0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x54, 0x61, 0x74, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69,
-0x20, 0x77, 0x61, 0x20, 0x4e, 0x63, 0x68, 0x65, 0x63, 0x68, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61,
-0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79,
-0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x55, 0x6d, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20,
-0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4d, 0x69, 0x76, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65,
-0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4d, 0x69, 0x74, 0x61,
-0x74, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e,
-0x61, 0x20, 0x4e, 0x63, 0x68, 0x65, 0x63, 0x68, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e,
-0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64,
-0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e,
-0x6f, 0x20, 0x6e, 0x61, 0x20, 0x55, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61,
-0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4d, 0x3b, 0x46, 0xfa,
-0x6e, 0x67, 0x61, 0x74, 0x268, 0x3b, 0x4e, 0x61, 0x61, 0x6e, 0x268, 0x3b, 0x4b, 0x65, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x49,
-0x6b, 0xfa, 0x6d, 0x69, 0x3b, 0x49, 0x6e, 0x79, 0x61, 0x6d, 0x62, 0x61, 0x6c, 0x61, 0x3b, 0x49, 0x64, 0x77, 0x61, 0x61,
-0x74, 0x61, 0x3b, 0x4d, 0x289, 0x289, 0x6e, 0x63, 0x68, 0x268, 0x3b, 0x56, 0x268, 0x268, 0x72, 0x268, 0x3b, 0x53, 0x61, 0x61,
-0x74, 0x289, 0x3b, 0x49, 0x6e, 0x79, 0x69, 0x3b, 0x53, 0x61, 0x61, 0x6e, 0x6f, 0x3b, 0x53, 0x61, 0x73, 0x61, 0x74, 0x289,
-0x3b, 0x4b, 0x289, 0x66, 0xfa, 0x6e, 0x67, 0x61, 0x74, 0x268, 0x3b, 0x4b, 0x289, 0x6e, 0x61, 0x61, 0x6e, 0x268, 0x3b, 0x4b,
-0x289, 0x6b, 0x65, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4b, 0x77, 0x69,
-0x69, 0x6e, 0x79, 0x61, 0x6d, 0x62, 0xe1, 0x6c, 0x61, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x64, 0x77, 0x61, 0x61, 0x74, 0x61,
-0x3b, 0x4b, 0x289, 0x6d, 0x289, 0x289, 0x6e, 0x63, 0x68, 0x268, 0x3b, 0x4b, 0x289, 0x76, 0x268, 0x268, 0x72, 0x268, 0x3b, 0x4b,
-0x289, 0x73, 0x61, 0x61, 0x74, 0x289, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6e, 0x79, 0x69, 0x3b, 0x4b, 0x289, 0x73, 0x61, 0x61,
-0x6e, 0x6f, 0x3b, 0x4b, 0x289, 0x73, 0x61, 0x73, 0x61, 0x74, 0x289, 0x3b, 0x46, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x49, 0x3b,
-0x49, 0x3b, 0x49, 0x3b, 0x4d, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x4a, 0x61, 0x6e, 0x3b,
-0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x75, 0x3b, 0x4d, 0x61, 0x61, 0x3b, 0x4a, 0x75, 0x75, 0x3b,
-0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x75, 0x3b, 0x53, 0x65, 0x62, 0x3b, 0x4f, 0x6b, 0x69, 0x3b, 0x4e, 0x6f, 0x76, 0x3b,
-0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x77, 0x61, 0x6c, 0x69, 0x79, 0x6f, 0x3b, 0x46, 0x65, 0x62, 0x77, 0x61, 0x6c,
-0x69, 0x79, 0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x69, 0x73, 0x69, 0x3b, 0x41, 0x70, 0x75, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x61,
-0x79, 0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x61, 0x79, 0x69, 0x3b, 0x41, 0x67, 0x75,
-0x73, 0x69, 0x74, 0x6f, 0x3b, 0x53, 0x65, 0x62, 0x75, 0x74, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x69, 0x74,
-0x6f, 0x62, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61,
-0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x45, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69,
-0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x4f, 0x67, 0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74,
-0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62,
-0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x45, 0x70, 0x72, 0x65, 0x6f, 0x3b, 0x4d, 0x65,
-0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x4f, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b,
-0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65,
-0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x45, 0x3b,
-0x4d, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x4f, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4a, 0x61, 0x6e, 0x3b,
-0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b,
-0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x75, 0x3b, 0x4e, 0x75, 0x76, 0x3b,
-0x44, 0x69, 0x7a, 0x3b, 0x4a, 0x61, 0x6e, 0x65, 0x72, 0x75, 0x3b, 0x46, 0x65, 0x76, 0x65, 0x72, 0x65, 0x72, 0x75, 0x3b,
-0x4d, 0x61, 0x72, 0x73, 0x75, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x75, 0x3b, 0x4a, 0x75, 0x6e,
-0x68, 0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x68, 0x75, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x75, 0x3b, 0x53, 0x65, 0x74, 0x65,
-0x6e, 0x62, 0x72, 0x75, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x72, 0x75, 0x3b, 0x4e, 0x75, 0x76, 0x65, 0x6e, 0x62, 0x72, 0x75,
-0x3b, 0x44, 0x69, 0x7a, 0x65, 0x6e, 0x62, 0x72, 0x75, 0x3b, 0x4a, 0x41, 0x4e, 0x3b, 0x46, 0x45, 0x42, 0x3b, 0x4d, 0x41,
-0x43, 0x3b, 0x128, 0x50, 0x55, 0x3b, 0x4d, 0x128, 0x128, 0x3b, 0x4e, 0x4a, 0x55, 0x3b, 0x4e, 0x4a, 0x52, 0x3b, 0x41, 0x47,
-0x41, 0x3b, 0x53, 0x50, 0x54, 0x3b, 0x4f, 0x4b, 0x54, 0x3b, 0x4e, 0x4f, 0x56, 0x3b, 0x44, 0x45, 0x43, 0x3b, 0x4a, 0x61,
-0x6e, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x72, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x4d, 0x61, 0x63, 0x68,
-0x69, 0x3b, 0x128, 0x70, 0x75, 0x72, 0x169, 0x3b, 0x4d, 0x129, 0x129, 0x3b, 0x4e, 0x6a, 0x75, 0x6e, 0x69, 0x3b, 0x4e, 0x6a,
-0x75, 0x72, 0x61, 0x129, 0x3b, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61,
-0x3b, 0x4f, 0x6b, 0x74, 0x169, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x63, 0x65,
-0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x128, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x41, 0x3b,
-0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4d, 0x75, 0x6c, 0x3b, 0x4e, 0x67, 0x61, 0x3b, 0x4b, 0x69, 0x70, 0x3b,
-0x49, 0x77, 0x61, 0x3b, 0x4e, 0x67, 0x65, 0x3b, 0x57, 0x61, 0x6b, 0x3b, 0x52, 0x6f, 0x70, 0x3b, 0x4b, 0x6f, 0x67, 0x3b,
-0x42, 0x75, 0x72, 0x3b, 0x45, 0x70, 0x65, 0x3b, 0x54, 0x61, 0x69, 0x3b, 0x41, 0x65, 0x6e, 0x3b, 0x4d, 0x75, 0x6c, 0x67,
-0x75, 0x6c, 0x3b, 0x4e, 0x67, 0x27, 0x61, 0x74, 0x79, 0x61, 0x74, 0x6f, 0x3b, 0x4b, 0x69, 0x70, 0x74, 0x61, 0x6d, 0x6f,
-0x3b, 0x49, 0x77, 0x61, 0x74, 0x20, 0x6b, 0x75, 0x74, 0x3b, 0x4e, 0x67, 0x27, 0x65, 0x69, 0x79, 0x65, 0x74, 0x3b, 0x57,
-0x61, 0x6b, 0x69, 0x3b, 0x52, 0x6f, 0x70, 0x74, 0x75, 0x69, 0x3b, 0x4b, 0x69, 0x70, 0x6b, 0x6f, 0x67, 0x61, 0x67, 0x61,
-0x3b, 0x42, 0x75, 0x72, 0x65, 0x74, 0x3b, 0x45, 0x70, 0x65, 0x73, 0x6f, 0x3b, 0x4b, 0x69, 0x70, 0x73, 0x75, 0x6e, 0x64,
-0x65, 0x20, 0x6e, 0x65, 0x74, 0x61, 0x69, 0x3b, 0x4b, 0x69, 0x70, 0x73, 0x75, 0x6e, 0x64, 0x65, 0x20, 0x6e, 0x65, 0x62,
-0x6f, 0x20, 0x61, 0x65, 0x6e, 0x67, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x4e, 0x3b, 0x57, 0x3b, 0x52,
-0x3b, 0x4b, 0x3b, 0x42, 0x3b, 0x45, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x1c3, 0x4b, 0x68, 0x61, 0x6e, 0x6e, 0x69, 0x3b, 0x1c3,
-0x4b, 0x68, 0x61, 0x6e, 0x1c0, 0x67, 0xf4, 0x61, 0x62, 0x3b, 0x1c0, 0x4b, 0x68, 0x75, 0x75, 0x1c1, 0x6b, 0x68, 0xe2, 0x62,
-0x3b, 0x1c3, 0x48, 0xf4, 0x61, 0x1c2, 0x6b, 0x68, 0x61, 0x69, 0x62, 0x3b, 0x1c3, 0x4b, 0x68, 0x61, 0x69, 0x74, 0x73, 0xe2,
-0x62, 0x3b, 0x47, 0x61, 0x6d, 0x61, 0x1c0, 0x61, 0x65, 0x62, 0x3b, 0x1c2, 0x4b, 0x68, 0x6f, 0x65, 0x73, 0x61, 0x6f, 0x62,
-0x3b, 0x41, 0x6f, 0x1c1, 0x6b, 0x68, 0x75, 0x75, 0x6d, 0xfb, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x54, 0x61, 0x72, 0x61,
-0x1c0, 0x6b, 0x68, 0x75, 0x75, 0x6d, 0xfb, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x1c2, 0x4e, 0xfb, 0x1c1, 0x6e, 0xe2, 0x69,
-0x73, 0x65, 0x62, 0x3b, 0x1c0, 0x48, 0x6f, 0x6f, 0x1c2, 0x67, 0x61, 0x65, 0x62, 0x3b, 0x48, 0xf4, 0x61, 0x73, 0x6f, 0x72,
-0x65, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x4a, 0x61, 0x6e, 0x2e, 0x3b, 0x46, 0xe4, 0x62, 0x2e, 0x3b, 0x4d, 0x61, 0x72,
-0x2e, 0x3b, 0x41, 0x70, 0x72, 0x2e, 0x3b, 0x4d, 0xe4, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x2e, 0x3b, 0x4a, 0x75, 0x6c, 0x2e,
-0x3b, 0x4f, 0x75, 0x67, 0x2e, 0x3b, 0x53, 0xe4, 0x70, 0x2e, 0x3b, 0x4f, 0x6b, 0x74, 0x2e, 0x3b, 0x4e, 0x6f, 0x76, 0x2e,
-0x3b, 0x44, 0x65, 0x7a, 0x2e, 0x3b, 0x4a, 0x61, 0x6e, 0x6e, 0x65, 0x77, 0x61, 0x3b, 0x46, 0xe4, 0x62, 0x72, 0x6f, 0x77,
-0x61, 0x3b, 0x4d, 0xe4, 0xe4, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x65, 0x6c, 0x6c, 0x3b, 0x4d, 0xe4, 0x69, 0x3b, 0x4a, 0x75,
-0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6c, 0x69, 0x3b, 0x4f, 0x75, 0x6a, 0x6f, 0xdf, 0x3b, 0x53, 0x65, 0x70, 0x74,
-0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0xe4, 0x6d,
-0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x61, 0x6c, 0x3b, 0x41, 0x72, 0xe1,
-0x3b, 0x186, 0x25b, 0x6e, 0x3b, 0x44, 0x6f, 0x79, 0x3b, 0x4c, 0xe9, 0x70, 0x3b, 0x52, 0x6f, 0x6b, 0x3b, 0x53, 0xe1, 0x73,
-0x3b, 0x42, 0x254, 0x301, 0x72, 0x3b, 0x4b, 0xfa, 0x73, 0x3b, 0x47, 0xed, 0x73, 0x3b, 0x53, 0x68, 0x289, 0x301, 0x3b, 0x4e,
-0x74, 0x289, 0x301, 0x3b, 0x4f, 0x6c, 0x61, 0x64, 0x61, 0x6c, 0x289, 0x301, 0x3b, 0x41, 0x72, 0xe1, 0x74, 0x3b, 0x186, 0x25b,
-0x6e, 0x268, 0x301, 0x254, 0x268, 0x14b, 0x254, 0x6b, 0x3b, 0x4f, 0x6c, 0x6f, 0x64, 0x6f, 0x79, 0xed, 0xf3, 0x72, 0xed, 0xea,
-0x20, 0x69, 0x6e, 0x6b, 0xf3, 0x6b, 0xfa, 0xe2, 0x3b, 0x4f, 0x6c, 0x6f, 0x69, 0x6c, 0xe9, 0x70, 0x16b, 0x6e, 0x79, 0x12b,
-0x113, 0x20, 0x69, 0x6e, 0x6b, 0xf3, 0x6b, 0xfa, 0xe2, 0x3b, 0x4b, 0xfa, 0x6a, 0xfa, 0x254, 0x72, 0x254, 0x6b, 0x3b, 0x4d,
-0xf3, 0x72, 0x75, 0x73, 0xe1, 0x73, 0x69, 0x6e, 0x3b, 0x186, 0x6c, 0x254, 0x301, 0x268, 0x301, 0x62, 0x254, 0x301, 0x72, 0xe1,
-0x72, 0x25b, 0x3b, 0x4b, 0xfa, 0x73, 0x68, 0xee, 0x6e, 0x3b, 0x4f, 0x6c, 0x67, 0xed, 0x73, 0x61, 0x6e, 0x3b, 0x50, 0x289,
-0x73, 0x68, 0x289, 0x301, 0x6b, 0x61, 0x3b, 0x4e, 0x74, 0x289, 0x301, 0x14b, 0x289, 0x301, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x3b,
-0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b,
-0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b,
-0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x41, 0x70, 0x72, 0x3b,
-0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x70, 0x3b,
-0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x63, 0x3b, 0x52, 0x61, 0x72, 0x3b, 0x4d, 0x75, 0x6b, 0x3b,
-0x4b, 0x77, 0x61, 0x3b, 0x44, 0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4d, 0x6f, 0x64, 0x3b, 0x4a, 0x6f, 0x6c, 0x3b,
-0x50, 0x65, 0x64, 0x3b, 0x53, 0x6f, 0x6b, 0x3b, 0x54, 0x69, 0x62, 0x3b, 0x4c, 0x61, 0x62, 0x3b, 0x50, 0x6f, 0x6f, 0x3b,
-0x4f, 0x72, 0x61, 0x72, 0x61, 0x3b, 0x4f, 0x6d, 0x75, 0x6b, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x67, 0x27, 0x3b, 0x4f,
-0x64, 0x75, 0x6e, 0x67, 0x27, 0x65, 0x6c, 0x3b, 0x4f, 0x6d, 0x61, 0x72, 0x75, 0x6b, 0x3b, 0x4f, 0x6d, 0x6f, 0x64, 0x6f,
-0x6b, 0x27, 0x6b, 0x69, 0x6e, 0x67, 0x27, 0x6f, 0x6c, 0x3b, 0x4f, 0x6a, 0x6f, 0x6c, 0x61, 0x3b, 0x4f, 0x70, 0x65, 0x64,
-0x65, 0x6c, 0x3b, 0x4f, 0x73, 0x6f, 0x6b, 0x6f, 0x73, 0x6f, 0x6b, 0x6f, 0x6d, 0x61, 0x3b, 0x4f, 0x74, 0x69, 0x62, 0x61,
-0x72, 0x3b, 0x4f, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x3b, 0x4f, 0x70, 0x6f, 0x6f, 0x3b, 0x52, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b,
-0x44, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x4c, 0x3b, 0x50, 0x3b, 0x17d, 0x61,
-0x6e, 0x3b, 0x46, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x77, 0x69, 0x3b, 0x4d, 0x65, 0x3b, 0x17d, 0x75, 0x77,
-0x3b, 0x17d, 0x75, 0x79, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x6b, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x6f, 0x3b,
-0x44, 0x65, 0x65, 0x3b, 0x17d, 0x61, 0x6e, 0x77, 0x69, 0x79, 0x65, 0x3b, 0x46, 0x65, 0x65, 0x77, 0x69, 0x72, 0x69, 0x79,
-0x65, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x69, 0x3b, 0x41, 0x77, 0x69, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x65, 0x3b, 0x17d, 0x75,
-0x77, 0x65, 0x14b, 0x3b, 0x17d, 0x75, 0x79, 0x79, 0x65, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x6b, 0x74, 0x61, 0x6e, 0x62,
-0x75, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x75, 0x72, 0x3b, 0x4e, 0x6f, 0x6f, 0x77, 0x61, 0x6e, 0x62, 0x75,
-0x72, 0x3b, 0x44, 0x65, 0x65, 0x73, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x17d, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b,
-0x4d, 0x3b, 0x17d, 0x3b, 0x17d, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x44, 0x41, 0x43, 0x3b,
-0x44, 0x41, 0x52, 0x3b, 0x44, 0x41, 0x44, 0x3b, 0x44, 0x41, 0x4e, 0x3b, 0x44, 0x41, 0x48, 0x3b, 0x44, 0x41, 0x55, 0x3b,
-0x44, 0x41, 0x4f, 0x3b, 0x44, 0x41, 0x42, 0x3b, 0x44, 0x4f, 0x43, 0x3b, 0x44, 0x41, 0x50, 0x3b, 0x44, 0x47, 0x49, 0x3b,
-0x44, 0x41, 0x47, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x63, 0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44,
-0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72,
-0x20, 0x41, 0x64, 0x65, 0x6b, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x6e, 0x67, 0x27, 0x77, 0x65,
-0x6e, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x62, 0x69, 0x63, 0x68, 0x3b, 0x44, 0x77, 0x65, 0x20,
-0x6d, 0x61, 0x72, 0x20, 0x41, 0x75, 0x63, 0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20,
-0x41, 0x62, 0x69, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x62, 0x6f, 0x72,
-0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x4f, 0x63, 0x68, 0x69, 0x6b, 0x6f, 0x3b, 0x44, 0x77, 0x65,
-0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x70, 0x61, 0x72, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x67, 0x69,
-0x20, 0x61, 0x63, 0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x70, 0x61, 0x72,
-0x20, 0x67, 0x69, 0x20, 0x61, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x43, 0x3b, 0x52, 0x3b, 0x44, 0x3b, 0x4e, 0x3b, 0x42, 0x3b,
-0x55, 0x3b, 0x42, 0x3b, 0x42, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x59, 0x65, 0x6e, 0x3b, 0x59, 0x65,
-0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x49, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x59, 0x75, 0x6e, 0x3b, 0x59, 0x75,
-0x6c, 0x3b, 0x194, 0x75, 0x63, 0x3b, 0x43, 0x75, 0x74, 0x3b, 0x4b, 0x1e6d, 0x75, 0x3b, 0x4e, 0x77, 0x61, 0x3b, 0x44, 0x75,
-0x6a, 0x3b, 0x59, 0x65, 0x6e, 0x6e, 0x61, 0x79, 0x65, 0x72, 0x3b, 0x59, 0x65, 0x62, 0x72, 0x61, 0x79, 0x65, 0x72, 0x3b,
-0x4d, 0x61, 0x72, 0x73, 0x3b, 0x49, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6e,
-0x79, 0x75, 0x3b, 0x59, 0x75, 0x6c, 0x79, 0x75, 0x7a, 0x3b, 0x194, 0x75, 0x63, 0x74, 0x3b, 0x43, 0x75, 0x74, 0x61, 0x6e,
-0x62, 0x69, 0x72, 0x3b, 0x4b, 0x1e6d, 0x75, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x77, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x44,
-0x75, 0x6a, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x4d, 0x3b, 0x49, 0x3b, 0x4d, 0x3b, 0x59, 0x3b,
-0x59, 0x3b, 0x194, 0x3b, 0x43, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b,
-0x46, 0x65, 0x62, 0x6c, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x6c, 0x69, 0x6c,
-0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x41, 0x67, 0x6f,
-0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b,
-0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b
+0xbb2, 0xbc8, 0x3b, 0xb86, 0xb95, 0xbb8, 0xbcd, 0xb9f, 0xbcd, 0x3b, 0xb9a, 0xbc6, 0xbaa, 0xbcd, 0xb9f, 0xbc6, 0xbae, 0xbcd, 0xbaa, 0xbcd,
+0xbb0, 0xbcd, 0x3b, 0xb85, 0xb95, 0xbcd, 0xb9f, 0xbcb, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xba8, 0xbb5, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b,
+0xb9f, 0xbbf, 0xb9a, 0xbae, 0xbcd, 0xbaa, 0xbb0, 0xbcd, 0x3b, 0xb9c, 0x3b, 0xbaa, 0xbbf, 0x3b, 0xbae, 0xbbe, 0x3b, 0xb8f, 0x3b, 0xbae,
+0xbc7, 0x3b, 0xb9c, 0xbc2, 0x3b, 0xb9c, 0xbc2, 0x3b, 0xb86, 0x3b, 0xb9a, 0xbc6, 0x3b, 0xb85, 0x3b, 0xba8, 0x3b, 0xb9f, 0xbbf, 0x3b,
+0xc1c, 0xc28, 0xc35, 0xc30, 0xc3f, 0x3b, 0xc2b, 0xc3f, 0xc2c, 0xc4d, 0xc30, 0xc35, 0xc30, 0xc3f, 0x3b, 0xc2e, 0xc3e, 0xc30, 0xc4d, 0xc1a,
+0xc3f, 0x3b, 0xc0f, 0xc2a, 0xc4d, 0xc30, 0xc3f, 0xc32, 0xc4d, 0x3b, 0xc2e, 0xc47, 0x3b, 0xc1c, 0xc42, 0xc28, 0xc4d, 0x3b, 0xc1c, 0xc42,
+0xc32, 0xc48, 0x3b, 0xc06, 0xc17, 0xc38, 0xc4d, 0xc1f, 0xc41, 0x3b, 0xc38, 0xc46, 0xc2a, 0xc4d, 0xc1f, 0xc46, 0xc02, 0xc2c, 0xc30, 0xc4d,
+0x3b, 0xc05, 0xc15, 0xc4d, 0xc1f, 0xc4b, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc28, 0xc35, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc21, 0xc3f, 0xc38,
+0xc46, 0xc02, 0xc2c, 0xc30, 0xc4d, 0x3b, 0xc1c, 0x3b, 0xc2b, 0xc3f, 0x3b, 0xc2e, 0x3b, 0xc0e, 0x3b, 0xc2e, 0xc46, 0x3b, 0xc1c, 0xc41,
+0x3b, 0xc1c, 0xc41, 0x3b, 0xc06, 0x3b, 0xc38, 0xc46, 0x3b, 0xc05, 0x3b, 0xc28, 0x3b, 0xc21, 0xc3f, 0x3b, 0xe21, 0x2e, 0xe04, 0x2e,
+0x3b, 0xe01, 0x2e, 0xe1e, 0x2e, 0x3b, 0xe21, 0xe35, 0x2e, 0xe04, 0x2e, 0x3b, 0xe40, 0xe21, 0x2e, 0xe22, 0x2e, 0x3b, 0xe1e, 0x2e,
+0xe04, 0x2e, 0x3b, 0xe21, 0xe34, 0x2e, 0xe22, 0x2e, 0x3b, 0xe01, 0x2e, 0xe04, 0x2e, 0x3b, 0xe2a, 0x2e, 0xe04, 0x2e, 0x3b, 0xe01,
+0x2e, 0xe22, 0x2e, 0x3b, 0xe15, 0x2e, 0xe04, 0x2e, 0x3b, 0xe1e, 0x2e, 0xe22, 0x2e, 0x3b, 0xe18, 0x2e, 0xe04, 0x2e, 0x3b, 0xe21,
+0xe01, 0xe23, 0xe32, 0xe04, 0xe21, 0x3b, 0xe01, 0xe38, 0xe21, 0xe20, 0xe32, 0xe1e, 0xe31, 0xe19, 0xe18, 0xe4c, 0x3b, 0xe21, 0xe35, 0xe19,
+0xe32, 0xe04, 0xe21, 0x3b, 0xe40, 0xe21, 0xe29, 0xe32, 0xe22, 0xe19, 0x3b, 0xe1e, 0xe24, 0xe29, 0xe20, 0xe32, 0xe04, 0xe21, 0x3b, 0xe21,
+0xe34, 0xe16, 0xe38, 0xe19, 0xe32, 0xe22, 0xe19, 0x3b, 0xe01, 0xe23, 0xe01, 0xe0e, 0xe32, 0xe04, 0xe21, 0x3b, 0xe2a, 0xe34, 0xe07, 0xe2b,
+0xe32, 0xe04, 0xe21, 0x3b, 0xe01, 0xe31, 0xe19, 0xe22, 0xe32, 0xe22, 0xe19, 0x3b, 0xe15, 0xe38, 0xe25, 0xe32, 0xe04, 0xe21, 0x3b, 0xe1e,
+0xe24, 0xe28, 0xe08, 0xe34, 0xe01, 0xe32, 0xe22, 0xe19, 0x3b, 0xe18, 0xe31, 0xe19, 0xe27, 0xe32, 0xe04, 0xe21, 0x3b, 0xf5f, 0xfb3, 0xf0b,
+0xf21, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf22, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf23, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf24, 0x3b, 0xf5f, 0xfb3, 0xf0b,
+0xf25, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf26, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf27, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf28, 0x3b, 0xf5f, 0xfb3, 0xf0b,
+0xf29, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf20, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf21, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf21, 0xf22, 0x3b,
+0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xf44, 0xf0b, 0xf54, 0xf7c, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf42, 0xf49, 0xf72,
+0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf66, 0xf74, 0xf58, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b,
+0xf56, 0xf0b, 0xf56, 0xf5e, 0xf72, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf63, 0xf94, 0xf0b, 0xf54, 0xf0b, 0x3b,
+0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xfb2, 0xf74, 0xf42, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf51,
+0xf74, 0xf53, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf62, 0xf92, 0xfb1, 0xf51, 0xf0b, 0xf54, 0xf0b, 0x3b,
+0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf51, 0xf42, 0xf74, 0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74,
+0xf0b, 0xf54, 0xf0b, 0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf45, 0xf72, 0xf42, 0xf0b, 0xf54, 0xf0b,
+0x3b, 0xf5f, 0xfb3, 0xf0b, 0xf56, 0xf0b, 0xf56, 0xf45, 0xf74, 0xf0b, 0xf42, 0xf49, 0xf72, 0xf66, 0xf0b, 0xf54, 0xf0b, 0x3b, 0x1325, 0x122a,
+0x3b, 0x1208, 0x12ab, 0x1272, 0x3b, 0x1218, 0x130b, 0x1262, 0x3b, 0x121a, 0x12eb, 0x12dd, 0x3b, 0x130d, 0x1295, 0x1266, 0x3b, 0x1230, 0x1290, 0x3b,
+0x1213, 0x121d, 0x1208, 0x3b, 0x1290, 0x1213, 0x1230, 0x3b, 0x1218, 0x1235, 0x12a8, 0x3b, 0x1325, 0x1245, 0x121d, 0x3b, 0x1215, 0x12f3, 0x122d, 0x3b,
+0x1273, 0x1215, 0x1233, 0x3b, 0x1325, 0x122a, 0x3b, 0x1208, 0x12ab, 0x1272, 0x1275, 0x3b, 0x1218, 0x130b, 0x1262, 0x1275, 0x3b, 0x121a, 0x12eb, 0x12dd,
+0x12eb, 0x3b, 0x130d, 0x1295, 0x1266, 0x1275, 0x3b, 0x1230, 0x1290, 0x3b, 0x1213, 0x121d, 0x1208, 0x3b, 0x1290, 0x1213, 0x1230, 0x3b, 0x1218, 0x1235,
+0x12a8, 0x1228, 0x121d, 0x3b, 0x1325, 0x1245, 0x121d, 0x1272, 0x3b, 0x1215, 0x12f3, 0x122d, 0x3b, 0x1273, 0x1215, 0x1233, 0x1235, 0x3b, 0x53, 0x101,
+0x6e, 0x3b, 0x46, 0x113, 0x70, 0x3b, 0x4d, 0x61, 0x2bb, 0x61, 0x3b, 0x2bb, 0x45, 0x70, 0x65, 0x3b, 0x4d, 0x113, 0x3b, 0x53,
+0x75, 0x6e, 0x3b, 0x53, 0x69, 0x75, 0x3b, 0x2bb, 0x41, 0x6f, 0x6b, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61,
+0x3b, 0x4e, 0x14d, 0x76, 0x3b, 0x54, 0x12b, 0x73, 0x3b, 0x53, 0x101, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x46, 0x113, 0x70,
+0x75, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x2bb, 0x61, 0x73, 0x69, 0x3b, 0x2bb, 0x45, 0x70, 0x65, 0x6c, 0x65, 0x6c, 0x69,
+0x3b, 0x4d, 0x113, 0x3b, 0x53, 0x75, 0x6e, 0x65, 0x3b, 0x53, 0x69, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x2bb, 0x41, 0x6f, 0x6b,
+0x6f, 0x73, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x69, 0x74, 0x65, 0x6d, 0x61, 0x3b, 0x2bb, 0x4f, 0x6b, 0x61, 0x74, 0x6f, 0x70,
+0x61, 0x3b, 0x4e, 0x14d, 0x76, 0x65, 0x6d, 0x61, 0x3b, 0x54, 0x12b, 0x73, 0x65, 0x6d, 0x61, 0x3b, 0x53, 0x3b, 0x46, 0x3b,
+0x4d, 0x3b, 0x45, 0x3b, 0x4d, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x54, 0x3b,
+0x53, 0x75, 0x6e, 0x3b, 0x59, 0x61, 0x6e, 0x3b, 0x4b, 0x75, 0x6c, 0x3b, 0x44, 0x7a, 0x69, 0x3b, 0x4d, 0x75, 0x64, 0x3b,
+0x4b, 0x68, 0x6f, 0x3b, 0x4d, 0x61, 0x77, 0x3b, 0x4d, 0x68, 0x61, 0x3b, 0x4e, 0x64, 0x7a, 0x3b, 0x4e, 0x68, 0x6c, 0x3b,
+0x48, 0x75, 0x6b, 0x3b, 0x4e, 0x27, 0x77, 0x3b, 0x53, 0x75, 0x6e, 0x67, 0x75, 0x74, 0x69, 0x3b, 0x4e, 0x79, 0x65, 0x6e,
+0x79, 0x65, 0x6e, 0x79, 0x61, 0x6e, 0x69, 0x3b, 0x4e, 0x79, 0x65, 0x6e, 0x79, 0x61, 0x6e, 0x6b, 0x75, 0x6c, 0x75, 0x3b,
+0x44, 0x7a, 0x69, 0x76, 0x61, 0x6d, 0x69, 0x73, 0x6f, 0x6b, 0x6f, 0x3b, 0x4d, 0x75, 0x64, 0x79, 0x61, 0x78, 0x69, 0x68,
+0x69, 0x3b, 0x4b, 0x68, 0x6f, 0x74, 0x61, 0x76, 0x75, 0x78, 0x69, 0x6b, 0x61, 0x3b, 0x4d, 0x61, 0x77, 0x75, 0x77, 0x61,
+0x6e, 0x69, 0x3b, 0x4d, 0x68, 0x61, 0x77, 0x75, 0x72, 0x69, 0x3b, 0x4e, 0x64, 0x7a, 0x68, 0x61, 0x74, 0x69, 0x3b, 0x4e,
+0x68, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x3b, 0x48, 0x75, 0x6b, 0x75, 0x72, 0x69, 0x3b, 0x4e, 0x27, 0x77, 0x65,
+0x6e, 0x64, 0x7a, 0x61, 0x6d, 0x68, 0x61, 0x6c, 0x61, 0x3b, 0x4f, 0x63, 0x61, 0x3b, 0x15e, 0x75, 0x62, 0x3b, 0x4d, 0x61,
+0x72, 0x3b, 0x4e, 0x69, 0x73, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x48, 0x61, 0x7a, 0x3b, 0x54, 0x65, 0x6d, 0x3b, 0x41, 0x11f,
+0x75, 0x3b, 0x45, 0x79, 0x6c, 0x3b, 0x45, 0x6b, 0x69, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x41, 0x72, 0x61, 0x3b, 0x4f, 0x63,
+0x61, 0x6b, 0x3b, 0x15e, 0x75, 0x62, 0x61, 0x74, 0x3b, 0x4d, 0x61, 0x72, 0x74, 0x3b, 0x4e, 0x69, 0x73, 0x61, 0x6e, 0x3b,
+0x4d, 0x61, 0x79, 0x131, 0x73, 0x3b, 0x48, 0x61, 0x7a, 0x69, 0x72, 0x61, 0x6e, 0x3b, 0x54, 0x65, 0x6d, 0x6d, 0x75, 0x7a,
+0x3b, 0x41, 0x11f, 0x75, 0x73, 0x74, 0x6f, 0x73, 0x3b, 0x45, 0x79, 0x6c, 0xfc, 0x6c, 0x3b, 0x45, 0x6b, 0x69, 0x6d, 0x3b,
+0x4b, 0x61, 0x73, 0x131, 0x6d, 0x3b, 0x41, 0x72, 0x61, 0x6c, 0x131, 0x6b, 0x3b, 0x4f, 0x3b, 0x15e, 0x3b, 0x4d, 0x3b, 0x4e,
+0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x45, 0x3b, 0x45, 0x3b, 0x4b, 0x3b, 0x41, 0x3b, 0x421, 0x456, 0x447,
+0x3b, 0x41b, 0x44e, 0x442, 0x3b, 0x411, 0x435, 0x440, 0x3b, 0x41a, 0x432, 0x456, 0x3b, 0x422, 0x440, 0x430, 0x3b, 0x427, 0x435, 0x440,
+0x3b, 0x41b, 0x438, 0x43f, 0x3b, 0x421, 0x435, 0x440, 0x3b, 0x412, 0x435, 0x440, 0x3b, 0x416, 0x43e, 0x432, 0x3b, 0x41b, 0x438, 0x441,
+0x3b, 0x413, 0x440, 0x443, 0x3b, 0x421, 0x456, 0x447, 0x435, 0x43d, 0x44c, 0x3b, 0x41b, 0x44e, 0x442, 0x438, 0x439, 0x3b, 0x411, 0x435,
+0x440, 0x435, 0x437, 0x435, 0x43d, 0x44c, 0x3b, 0x41a, 0x432, 0x456, 0x442, 0x435, 0x43d, 0x44c, 0x3b, 0x422, 0x440, 0x430, 0x432, 0x435,
+0x43d, 0x44c, 0x3b, 0x427, 0x435, 0x440, 0x432, 0x435, 0x43d, 0x44c, 0x3b, 0x41b, 0x438, 0x43f, 0x435, 0x43d, 0x44c, 0x3b, 0x421, 0x435,
+0x440, 0x43f, 0x435, 0x43d, 0x44c, 0x3b, 0x412, 0x435, 0x440, 0x435, 0x441, 0x435, 0x43d, 0x44c, 0x3b, 0x416, 0x43e, 0x432, 0x442, 0x435,
+0x43d, 0x44c, 0x3b, 0x41b, 0x438, 0x441, 0x442, 0x43e, 0x43f, 0x430, 0x434, 0x3b, 0x413, 0x440, 0x443, 0x434, 0x435, 0x43d, 0x44c, 0x3b,
+0x421, 0x3b, 0x41b, 0x3b, 0x411, 0x3b, 0x41a, 0x3b, 0x422, 0x3b, 0x427, 0x3b, 0x41b, 0x3b, 0x421, 0x3b, 0x412, 0x3b, 0x416, 0x3b,
+0x41b, 0x3b, 0x413, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x6cc, 0x3b, 0x641, 0x631, 0x648, 0x631, 0x6cc, 0x3b, 0x645, 0x627, 0x631, 0x20,
+0x686, 0x3b, 0x627, 0x67e, 0x631, 0x64a, 0x644, 0x3b, 0x645, 0x626, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x627, 0x626,
+0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x62a, 0x645, 0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646,
+0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628, 0x631, 0x3b, 0x41c, 0x443, 0x4b3, 0x430, 0x440, 0x440, 0x430, 0x43c, 0x3b,
+0x421, 0x430, 0x444, 0x430, 0x440, 0x3b, 0x420, 0x430, 0x431, 0x438, 0x443, 0x43b, 0x2d, 0x430, 0x432, 0x432, 0x430, 0x43b, 0x3b, 0x420,
+0x430, 0x431, 0x438, 0x443, 0x43b, 0x2d, 0x43e, 0x445, 0x438, 0x440, 0x3b, 0x416, 0x443, 0x43c, 0x43e, 0x434, 0x438, 0x443, 0x43b, 0x2d,
+0x443, 0x43b, 0x43e, 0x3b, 0x416, 0x443, 0x43c, 0x43e, 0x434, 0x438, 0x443, 0x43b, 0x2d, 0x443, 0x445, 0x440, 0x43e, 0x3b, 0x420, 0x430,
+0x436, 0x430, 0x431, 0x3b, 0x428, 0x430, 0x44a, 0x431, 0x43e, 0x43d, 0x3b, 0x420, 0x430, 0x43c, 0x430, 0x437, 0x43e, 0x43d, 0x3b, 0x428,
+0x430, 0x432, 0x432, 0x43e, 0x43b, 0x3b, 0x417, 0x438, 0x43b, 0x2d, 0x49b, 0x430, 0x44a, 0x434, 0x430, 0x3b, 0x417, 0x438, 0x43b, 0x2d,
+0x4b3, 0x438, 0x436, 0x436, 0x430, 0x3b, 0x62c, 0x646, 0x648, 0x3b, 0x641, 0x628, 0x631, 0x3b, 0x645, 0x627, 0x631, 0x3b, 0x627, 0x67e,
+0x631, 0x3b, 0x645, 0x640, 0x6cc, 0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x3b, 0x627, 0x6af, 0x633, 0x3b, 0x633, 0x67e,
+0x62a, 0x3b, 0x627, 0x6a9, 0x62a, 0x3b, 0x646, 0x648, 0x645, 0x3b, 0x62f, 0x633, 0x645, 0x3b, 0x62c, 0x646, 0x648, 0x631, 0x6cc, 0x3b,
+0x641, 0x628, 0x631, 0x648, 0x631, 0x6cc, 0x3b, 0x645, 0x627, 0x631, 0x686, 0x3b, 0x627, 0x67e, 0x631, 0x6cc, 0x644, 0x3b, 0x645, 0x6cc,
+0x3b, 0x62c, 0x648, 0x646, 0x3b, 0x62c, 0x648, 0x644, 0x627, 0x6cc, 0x3b, 0x627, 0x6af, 0x633, 0x62a, 0x3b, 0x633, 0x67e, 0x62a, 0x645,
+0x628, 0x631, 0x3b, 0x627, 0x6a9, 0x62a, 0x648, 0x628, 0x631, 0x3b, 0x646, 0x648, 0x645, 0x628, 0x631, 0x3b, 0x62f, 0x633, 0x645, 0x628,
+0x631, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x32, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x33, 0x3b,
+0x74, 0x68, 0x67, 0x20, 0x34, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x35, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x36, 0x3b, 0x74, 0x68,
+0x67, 0x20, 0x37, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x38, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x39, 0x3b, 0x74, 0x68, 0x67, 0x20,
+0x31, 0x30, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x31, 0x3b, 0x74, 0x68, 0x67, 0x20, 0x31, 0x32, 0x3b, 0x74, 0x68, 0xe1,
+0x6e, 0x67, 0x20, 0x6d, 0x1ed9, 0x74, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x68, 0x61, 0x69, 0x3b, 0x74, 0x68, 0xe1,
+0x6e, 0x67, 0x20, 0x62, 0x61, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x74, 0x1b0, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67,
+0x20, 0x6e, 0x103, 0x6d, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x73, 0xe1, 0x75, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67,
+0x20, 0x62, 0x1ea3, 0x79, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x74, 0xe1, 0x6d, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67,
+0x20, 0x63, 0x68, 0xed, 0x6e, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x6d, 0x1b0, 0x1edd, 0x69, 0x3b, 0x74, 0x68, 0xe1,
+0x6e, 0x67, 0x20, 0x6d, 0x1b0, 0x1edd, 0x69, 0x20, 0x6d, 0x1ed9, 0x74, 0x3b, 0x74, 0x68, 0xe1, 0x6e, 0x67, 0x20, 0x6d, 0x1b0,
+0x1edd, 0x69, 0x20, 0x68, 0x61, 0x69, 0x3b, 0x49, 0x6f, 0x6e, 0x3b, 0x43, 0x68, 0x77, 0x65, 0x3b, 0x4d, 0x61, 0x77, 0x3b,
+0x45, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d, 0x65, 0x68, 0x3b, 0x47, 0x6f, 0x72, 0x3b, 0x41, 0x77, 0x73, 0x74,
+0x3b, 0x4d, 0x65, 0x64, 0x69, 0x3b, 0x48, 0x79, 0x64, 0x3b, 0x54, 0x61, 0x63, 0x68, 0x3b, 0x52, 0x68, 0x61, 0x67, 0x3b,
+0x49, 0x6f, 0x6e, 0x61, 0x77, 0x72, 0x3b, 0x43, 0x68, 0x77, 0x65, 0x66, 0x72, 0x6f, 0x72, 0x3b, 0x4d, 0x61, 0x77, 0x72,
+0x74, 0x68, 0x3b, 0x45, 0x62, 0x72, 0x69, 0x6c, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d, 0x65, 0x68, 0x65, 0x66, 0x69,
+0x6e, 0x3b, 0x47, 0x6f, 0x72, 0x66, 0x66, 0x65, 0x6e, 0x6e, 0x61, 0x66, 0x3b, 0x41, 0x77, 0x73, 0x74, 0x3b, 0x4d, 0x65,
+0x64, 0x69, 0x3b, 0x48, 0x79, 0x64, 0x72, 0x65, 0x66, 0x3b, 0x54, 0x61, 0x63, 0x68, 0x77, 0x65, 0x64, 0x64, 0x3b, 0x52,
+0x68, 0x61, 0x67, 0x66, 0x79, 0x72, 0x3b, 0x49, 0x3b, 0x43, 0x3b, 0x4d, 0x3b, 0x45, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x47,
+0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x54, 0x3b, 0x52, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d,
+0x61, 0x74, 0x3b, 0x45, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41,
+0x67, 0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a,
+0x61, 0x6e, 0x79, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x4d,
+0x61, 0x74, 0x73, 0x68, 0x69, 0x3b, 0x45, 0x70, 0x72, 0x65, 0x6c, 0x69, 0x3b, 0x4d, 0x65, 0x79, 0x69, 0x3b, 0x4a, 0x75,
+0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x79, 0x69, 0x3b, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70,
+0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x68, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62,
+0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x1e62, 0x1eb9, 0x301, 0x72, 0x1eb9, 0x323, 0x3b, 0xc8, 0x72, 0xe8,
+0x6c, 0xe8, 0x3b, 0x1eb8, 0x72, 0x1eb9, 0x300, 0x6e, 0xe0, 0x3b, 0xcc, 0x67, 0x62, 0xe9, 0x3b, 0x1eb8, 0x300, 0x62, 0x69, 0x62,
+0x69, 0x3b, 0xd2, 0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x41, 0x67, 0x1eb9, 0x6d, 0x1ecd, 0x3b, 0xd2, 0x67, 0xfa, 0x6e, 0x3b, 0x4f,
+0x77, 0x65, 0x77, 0x65, 0x3b, 0x1ecc, 0x300, 0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x42, 0xe9, 0x6c, 0xfa, 0x3b, 0x1ecc, 0x300, 0x70,
+0x1eb9, 0x300, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1e62, 0x1eb8, 0x301, 0x72, 0x1eb9, 0x301, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0xc8, 0x72,
+0xe8, 0x6c, 0xe8, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1eb8, 0x72, 0x1eb9, 0x300, 0x6e, 0xe0, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0xcc,
+0x67, 0x62, 0xe9, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1eb8, 0x300, 0x62, 0x69, 0x62, 0x69, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0xd2,
+0x6b, 0xfa, 0x64, 0x75, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x41, 0x67, 0x1eb9, 0x6d, 0x1ecd, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0xd2,
+0x67, 0xfa, 0x6e, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x4f, 0x77, 0x65, 0x77, 0x65, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1ecc, 0x300,
+0x77, 0xe0, 0x72, 0xe0, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x42, 0xe9, 0x6c, 0xfa, 0x3b, 0x4f, 0x1e62, 0xf9, 0x20, 0x1ecc, 0x300,
+0x70, 0x1eb9, 0x300, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x73, 0x3b, 0x41, 0x70, 0x72, 0x3b,
+0x4d, 0x65, 0x79, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b,
+0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x75, 0x4a, 0x61, 0x6e, 0x75, 0x77, 0x61, 0x72,
+0x69, 0x3b, 0x75, 0x46, 0x65, 0x62, 0x72, 0x75, 0x77, 0x61, 0x72, 0x69, 0x3b, 0x75, 0x4d, 0x61, 0x73, 0x68, 0x69, 0x3b,
+0x75, 0x2d, 0x41, 0x70, 0x72, 0x65, 0x6c, 0x69, 0x3b, 0x75, 0x4d, 0x65, 0x79, 0x69, 0x3b, 0x75, 0x4a, 0x75, 0x6e, 0x69,
+0x3b, 0x75, 0x4a, 0x75, 0x6c, 0x61, 0x79, 0x69, 0x3b, 0x75, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x75, 0x53, 0x65,
+0x70, 0x74, 0x68, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x75, 0x2d, 0x4f, 0x6b, 0x74, 0x68, 0x6f, 0x62, 0x61, 0x3b, 0x75, 0x4e,
+0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x75, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b,
+0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x61, 0x6a, 0x3b, 0x4a, 0x75, 0x6e, 0x3b,
+0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x76, 0x67, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b,
+0x44, 0x65, 0x63, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d,
+0x61, 0x72, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x6a, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a,
+0x75, 0x6c, 0x69, 0x3b, 0x41, 0x76, 0x67, 0x75, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x72,
+0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x44, 0x65,
+0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x4a, 0x2d, 0x67, 0x75, 0x65, 0x72, 0x3b, 0x54, 0x2d, 0x61, 0x72, 0x72, 0x65,
+0x65, 0x3b, 0x4d, 0x61, 0x79, 0x72, 0x6e, 0x74, 0x3b, 0x41, 0x76, 0x72, 0x72, 0x69, 0x6c, 0x3b, 0x42, 0x6f, 0x61, 0x6c,
+0x64, 0x79, 0x6e, 0x3b, 0x4d, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4a, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65,
+0x65, 0x3b, 0x4c, 0x75, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x79, 0x6e, 0x3b, 0x4d, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72,
+0x3b, 0x4a, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4d, 0x2e, 0x48, 0x6f, 0x75, 0x6e, 0x65, 0x79, 0x3b, 0x4d,
+0x2e, 0x4e, 0x6f, 0x6c, 0x6c, 0x69, 0x63, 0x6b, 0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x67, 0x65, 0x75, 0x72,
+0x65, 0x65, 0x3b, 0x54, 0x6f, 0x73, 0x68, 0x69, 0x61, 0x67, 0x68, 0x74, 0x2d, 0x61, 0x72, 0x72, 0x65, 0x65, 0x3b, 0x4d,
+0x61, 0x79, 0x72, 0x6e, 0x74, 0x3b, 0x41, 0x76, 0x65, 0x72, 0x69, 0x6c, 0x3b, 0x42, 0x6f, 0x61, 0x6c, 0x64, 0x79, 0x6e,
+0x3b, 0x4d, 0x65, 0x61, 0x6e, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65, 0x79, 0x2d,
+0x73, 0x6f, 0x75, 0x72, 0x65, 0x65, 0x3b, 0x4c, 0x75, 0x61, 0x6e, 0x69, 0x73, 0x74, 0x79, 0x6e, 0x3b, 0x4d, 0x65, 0x61,
+0x6e, 0x2d, 0x66, 0x6f, 0x75, 0x79, 0x69, 0x72, 0x3b, 0x4a, 0x65, 0x72, 0x72, 0x65, 0x79, 0x2d, 0x66, 0x6f, 0x75, 0x79,
+0x69, 0x72, 0x3b, 0x4d, 0x65, 0x65, 0x20, 0x48, 0x6f, 0x75, 0x6e, 0x65, 0x79, 0x3b, 0x4d, 0x65, 0x65, 0x20, 0x6e, 0x79,
+0x20, 0x4e, 0x6f, 0x6c, 0x6c, 0x69, 0x63, 0x6b, 0x3b, 0x47, 0x65, 0x6e, 0x3b, 0x57, 0x68, 0x65, 0x3b, 0x4d, 0x65, 0x72,
+0x3b, 0x45, 0x62, 0x72, 0x3b, 0x4d, 0x65, 0x3b, 0x45, 0x66, 0x6e, 0x3b, 0x47, 0x6f, 0x72, 0x3b, 0x45, 0x73, 0x74, 0x3b,
+0x47, 0x77, 0x6e, 0x3b, 0x48, 0x65, 0x64, 0x3b, 0x44, 0x75, 0x3b, 0x4b, 0x65, 0x76, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x47,
+0x65, 0x6e, 0x76, 0x65, 0x72, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x57, 0x68, 0x65, 0x76, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x79,
+0x73, 0x20, 0x4d, 0x65, 0x72, 0x74, 0x68, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x45, 0x62, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x79,
+0x73, 0x20, 0x4d, 0x65, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x45, 0x66, 0x61, 0x6e, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x47, 0x6f,
+0x72, 0x74, 0x68, 0x65, 0x72, 0x65, 0x6e, 0x3b, 0x4d, 0x79, 0x65, 0x20, 0x45, 0x73, 0x74, 0x3b, 0x4d, 0x79, 0x73, 0x20,
+0x47, 0x77, 0x79, 0x6e, 0x67, 0x61, 0x6c, 0x61, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x48, 0x65, 0x64, 0x72, 0x61, 0x3b, 0x4d,
+0x79, 0x73, 0x20, 0x44, 0x75, 0x3b, 0x4d, 0x79, 0x73, 0x20, 0x4b, 0x65, 0x76, 0x61, 0x72, 0x64, 0x68, 0x75, 0x3b, 0x53,
+0x2d, 0x186, 0x3b, 0x4b, 0x2d, 0x186, 0x3b, 0x45, 0x2d, 0x186, 0x3b, 0x45, 0x2d, 0x4f, 0x3b, 0x45, 0x2d, 0x4b, 0x3b, 0x4f,
+0x2d, 0x41, 0x3b, 0x41, 0x2d, 0x4b, 0x3b, 0x44, 0x2d, 0x186, 0x3b, 0x46, 0x2d, 0x190, 0x3b, 0x186, 0x2d, 0x41, 0x3b, 0x186,
+0x2d, 0x4f, 0x3b, 0x4d, 0x2d, 0x186, 0x3b, 0x53, 0x61, 0x6e, 0x64, 0x61, 0x2d, 0x186, 0x70, 0x25b, 0x70, 0x254, 0x6e, 0x3b,
+0x4b, 0x77, 0x61, 0x6b, 0x77, 0x61, 0x72, 0x2d, 0x186, 0x67, 0x79, 0x65, 0x66, 0x75, 0x6f, 0x3b, 0x45, 0x62, 0x254, 0x77,
+0x2d, 0x186, 0x62, 0x65, 0x6e, 0x65, 0x6d, 0x3b, 0x45, 0x62, 0x254, 0x62, 0x69, 0x72, 0x61, 0x2d, 0x4f, 0x66, 0x6f, 0x72,
+0x69, 0x73, 0x75, 0x6f, 0x3b, 0x45, 0x73, 0x75, 0x73, 0x6f, 0x77, 0x20, 0x41, 0x6b, 0x65, 0x74, 0x73, 0x65, 0x61, 0x62,
+0x61, 0x2d, 0x4b, 0x254, 0x74, 0x254, 0x6e, 0x69, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x62, 0x69, 0x72, 0x61, 0x64, 0x65, 0x2d,
+0x41, 0x79, 0x25b, 0x77, 0x6f, 0x68, 0x6f, 0x6d, 0x75, 0x6d, 0x75, 0x3b, 0x41, 0x79, 0x25b, 0x77, 0x6f, 0x68, 0x6f, 0x2d,
+0x4b, 0x69, 0x74, 0x61, 0x77, 0x6f, 0x6e, 0x73, 0x61, 0x3b, 0x44, 0x69, 0x66, 0x75, 0x75, 0x2d, 0x186, 0x73, 0x61, 0x6e,
+0x64, 0x61, 0x61, 0x3b, 0x46, 0x61, 0x6e, 0x6b, 0x77, 0x61, 0x2d, 0x190, 0x62, 0x254, 0x3b, 0x186, 0x62, 0x25b, 0x73, 0x25b,
+0x2d, 0x41, 0x68, 0x69, 0x6e, 0x69, 0x6d, 0x65, 0x3b, 0x186, 0x62, 0x65, 0x72, 0x25b, 0x66, 0x25b, 0x77, 0x2d, 0x4f, 0x62,
+0x75, 0x62, 0x75, 0x6f, 0x3b, 0x4d, 0x75, 0x6d, 0x75, 0x2d, 0x186, 0x70, 0x25b, 0x6e, 0x69, 0x6d, 0x62, 0x61, 0x3b, 0x91c,
+0x93e, 0x928, 0x947, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92b, 0x947, 0x92c, 0x94d, 0x930, 0x941, 0x935, 0x93e, 0x930, 0x940, 0x3b, 0x92e,
+0x93e, 0x930, 0x94d, 0x91a, 0x3b, 0x90f, 0x92a, 0x94d, 0x930, 0x93f, 0x932, 0x3b, 0x92e, 0x947, 0x3b, 0x91c, 0x942, 0x928, 0x3b, 0x91c,
+0x941, 0x932, 0x948, 0x3b, 0x913, 0x917, 0x938, 0x94d, 0x91f, 0x3b, 0x938, 0x947, 0x92a, 0x94d, 0x91f, 0x947, 0x902, 0x92c, 0x930, 0x3b,
+0x913, 0x915, 0x94d, 0x91f, 0x94b, 0x92c, 0x930, 0x3b, 0x928, 0x94b, 0x935, 0x94d, 0x939, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x921, 0x93f,
+0x938, 0x947, 0x902, 0x92c, 0x930, 0x3b, 0x41, 0x68, 0x61, 0x3b, 0x4f, 0x66, 0x6c, 0x3b, 0x4f, 0x63, 0x68, 0x3b, 0x41, 0x62,
+0x65, 0x3b, 0x41, 0x67, 0x62, 0x3b, 0x4f, 0x74, 0x75, 0x3b, 0x4d, 0x61, 0x61, 0x3b, 0x4d, 0x61, 0x6e, 0x3b, 0x47, 0x62,
+0x6f, 0x3b, 0x41, 0x6e, 0x74, 0x3b, 0x41, 0x6c, 0x65, 0x3b, 0x41, 0x66, 0x75, 0x3b, 0x41, 0x68, 0x61, 0x72, 0x61, 0x62,
+0x61, 0x74, 0x61, 0x3b, 0x4f, 0x66, 0x6c, 0x6f, 0x3b, 0x4f, 0x63, 0x68, 0x6f, 0x6b, 0x72, 0x69, 0x6b, 0x72, 0x69, 0x3b,
+0x41, 0x62, 0x65, 0x69, 0x62, 0x65, 0x65, 0x3b, 0x41, 0x67, 0x62, 0x65, 0x69, 0x6e, 0x61, 0x61, 0x3b, 0x4f, 0x74, 0x75,
+0x6b, 0x77, 0x61, 0x64, 0x61, 0x6e, 0x3b, 0x4d, 0x61, 0x61, 0x77, 0x65, 0x3b, 0x4d, 0x61, 0x6e, 0x79, 0x61, 0x77, 0x61,
+0x6c, 0x65, 0x3b, 0x47, 0x62, 0x6f, 0x3b, 0x41, 0x6e, 0x74, 0x6f, 0x6e, 0x3b, 0x41, 0x6c, 0x65, 0x6d, 0x6c, 0x65, 0x3b,
+0x41, 0x66, 0x75, 0x61, 0x62, 0x65, 0x65, 0x3b, 0x4a, 0x65, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x61, 0x3b,
+0x45, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x65, 0x3b, 0x4a, 0x75, 0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x1ecc, 0x67, 0x1ecd, 0x3b,
+0x53, 0x65, 0x70, 0x3b, 0x1ecc, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x65, 0x6e, 0x1ee5,
+0x77, 0x61, 0x72, 0x1ecb, 0x3b, 0x46, 0x65, 0x62, 0x72, 0x1ee5, 0x77, 0x61, 0x72, 0x1ecb, 0x3b, 0x4d, 0x61, 0x61, 0x63, 0x68,
+0x1ecb, 0x3b, 0x45, 0x70, 0x72, 0x65, 0x6c, 0x3b, 0x4d, 0x65, 0x65, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c,
+0x61, 0x1ecb, 0x3b, 0x1ecc, 0x67, 0x1ecd, 0x1ecd, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x1ecc,
+0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62,
+0x61, 0x3b, 0x4d, 0x62, 0x65, 0x3b, 0x4b, 0x65, 0x6c, 0x3b, 0x4b, 0x74, 0x169, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x4b, 0x74,
+0x6e, 0x3b, 0x54, 0x68, 0x61, 0x3b, 0x4d, 0x6f, 0x6f, 0x3b, 0x4e, 0x79, 0x61, 0x3b, 0x4b, 0x6e, 0x64, 0x3b, 0x128, 0x6b,
+0x75, 0x3b, 0x128, 0x6b, 0x6d, 0x3b, 0x128, 0x6b, 0x6c, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x62,
+0x65, 0x65, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6c, 0x129, 0x3b, 0x4d, 0x77, 0x61, 0x69,
+0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b,
+0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d,
+0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x74, 0x68, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x61,
+0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x75, 0x6f, 0x6e, 0x7a, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20,
+0x6e, 0x79, 0x61, 0x61, 0x6e, 0x79, 0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64,
+0x61, 0x3b, 0x4d, 0x77, 0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x129, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x61, 0x69,
+0x20, 0x77, 0x61, 0x20, 0x129, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x129, 0x6d, 0x77, 0x65, 0x3b, 0x4d, 0x77,
+0x61, 0x69, 0x20, 0x77, 0x61, 0x20, 0x129, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x6c, 0x129, 0x3b, 0x4d,
+0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x54, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x128, 0x3b, 0x128,
+0x3b, 0x128, 0x3b, 0x70f, 0x71f, 0x722, 0x20, 0x70f, 0x712, 0x3b, 0x72b, 0x712, 0x71b, 0x3b, 0x710, 0x715, 0x72a, 0x3b, 0x722, 0x71d,
+0x723, 0x722, 0x3b, 0x710, 0x71d, 0x72a, 0x3b, 0x71a, 0x719, 0x71d, 0x72a, 0x722, 0x3b, 0x72c, 0x721, 0x718, 0x719, 0x3b, 0x710, 0x712,
+0x3b, 0x710, 0x71d, 0x720, 0x718, 0x720, 0x3b, 0x70f, 0x72c, 0x72b, 0x20, 0x70f, 0x710, 0x3b, 0x70f, 0x72c, 0x72b, 0x20, 0x70f, 0x712,
+0x3b, 0x70f, 0x71f, 0x722, 0x20, 0x70f, 0x710, 0x3b, 0x120d, 0x12f0, 0x1275, 0x3b, 0x12ab, 0x1265, 0x12bd, 0x3b, 0x12ad, 0x1265, 0x120b, 0x3b,
+0x134b, 0x1305, 0x12ba, 0x3b, 0x12ad, 0x1262, 0x1245, 0x3b, 0x121d, 0x2f, 0x1275, 0x3b, 0x12b0, 0x122d, 0x3b, 0x121b, 0x122d, 0x12eb, 0x3b, 0x12eb,
+0x12b8, 0x1292, 0x3b, 0x1218, 0x1270, 0x1209, 0x3b, 0x121d, 0x2f, 0x121d, 0x3b, 0x1270, 0x1215, 0x1233, 0x3b, 0x120d, 0x12f0, 0x1275, 0x122a, 0x3b,
+0x12ab, 0x1265, 0x12bd, 0x1265, 0x1272, 0x3b, 0x12ad, 0x1265, 0x120b, 0x3b, 0x134b, 0x1305, 0x12ba, 0x122a, 0x3b, 0x12ad, 0x1262, 0x1245, 0x122a, 0x3b,
+0x121d, 0x12aa, 0x12a4, 0x120d, 0x20, 0x1275, 0x131f, 0x1292, 0x122a, 0x3b, 0x12b0, 0x122d, 0x12a9, 0x3b, 0x121b, 0x122d, 0x12eb, 0x121d, 0x20, 0x1275,
+0x122a, 0x3b, 0x12eb, 0x12b8, 0x1292, 0x20, 0x1218, 0x1233, 0x1245, 0x1208, 0x122a, 0x3b, 0x1218, 0x1270, 0x1209, 0x3b, 0x121d, 0x12aa, 0x12a4, 0x120d,
+0x20, 0x1218, 0x123d, 0x12c8, 0x122a, 0x3b, 0x1270, 0x1215, 0x1233, 0x1235, 0x122a, 0x3b, 0x120d, 0x3b, 0x12ab, 0x3b, 0x12ad, 0x3b, 0x134b, 0x3b,
+0x12ad, 0x3b, 0x121d, 0x3b, 0x12b0, 0x3b, 0x121b, 0x3b, 0x12eb, 0x3b, 0x1218, 0x3b, 0x121d, 0x3b, 0x1270, 0x3b, 0x1320, 0x1210, 0x1228, 0x3b,
+0x12a8, 0x1270, 0x1270, 0x3b, 0x1218, 0x1308, 0x1260, 0x3b, 0x12a0, 0x1280, 0x12d8, 0x3b, 0x130d, 0x1295, 0x1263, 0x1275, 0x3b, 0x1220, 0x1295, 0x12e8,
+0x3b, 0x1210, 0x1218, 0x1208, 0x3b, 0x1290, 0x1210, 0x1230, 0x3b, 0x12a8, 0x1228, 0x1218, 0x3b, 0x1320, 0x1240, 0x1218, 0x3b, 0x1280, 0x12f0, 0x1228,
+0x3b, 0x1280, 0x1220, 0x1220, 0x3b, 0x1320, 0x3b, 0x12a8, 0x3b, 0x1218, 0x3b, 0x12a0, 0x3b, 0x130d, 0x3b, 0x1220, 0x3b, 0x1210, 0x3b, 0x1290,
+0x3b, 0x12a8, 0x3b, 0x1320, 0x3b, 0x1280, 0x3b, 0x1280, 0x3b, 0x57, 0x65, 0x79, 0x3b, 0x46, 0x61, 0x6e, 0x3b, 0x54, 0x61, 0x74,
+0x3b, 0x4e, 0x61, 0x6e, 0x3b, 0x54, 0x75, 0x79, 0x3b, 0x54, 0x73, 0x6f, 0x3b, 0x54, 0x61, 0x66, 0x3b, 0x57, 0x61, 0x72,
+0x3b, 0x4b, 0x75, 0x6e, 0x3b, 0x42, 0x61, 0x6e, 0x3b, 0x4b, 0x6f, 0x6d, 0x3b, 0x53, 0x61, 0x75, 0x3b, 0x46, 0x61, 0x69,
+0x20, 0x57, 0x65, 0x79, 0x65, 0x6e, 0x65, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x46, 0x61, 0x6e, 0x69, 0x3b, 0x46, 0x61, 0x69,
+0x20, 0x54, 0x61, 0x74, 0x61, 0x6b, 0x61, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x4e, 0x61, 0x6e, 0x67, 0x72, 0x61, 0x3b, 0x46,
+0x61, 0x69, 0x20, 0x54, 0x75, 0x79, 0x6f, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x54, 0x73, 0x6f, 0x79, 0x69, 0x3b, 0x46, 0x61,
+0x69, 0x20, 0x54, 0x61, 0x66, 0x61, 0x6b, 0x61, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x57, 0x61, 0x72, 0x61, 0x63, 0x68, 0x69,
+0x3b, 0x46, 0x61, 0x69, 0x20, 0x4b, 0x75, 0x6e, 0x6f, 0x62, 0x6f, 0x6b, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x42, 0x61, 0x6e,
+0x73, 0x6f, 0x6b, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x4b, 0x6f, 0x6d, 0x3b, 0x46, 0x61, 0x69, 0x20, 0x53, 0x61, 0x75, 0x6b,
+0x3b, 0x44, 0x79, 0x6f, 0x6e, 0x3b, 0x42, 0x61, 0x61, 0x3b, 0x41, 0x74, 0x61, 0x74, 0x3b, 0x41, 0x6e, 0x61, 0x73, 0x3b,
+0x41, 0x74, 0x79, 0x6f, 0x3b, 0x41, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x74, 0x61, 0x72, 0x3b, 0x41, 0x77, 0x75, 0x72, 0x3b,
+0x53, 0x68, 0x61, 0x64, 0x3b, 0x53, 0x68, 0x61, 0x6b, 0x3b, 0x4e, 0x61, 0x62, 0x61, 0x3b, 0x4e, 0x61, 0x74, 0x61, 0x3b,
+0x50, 0x65, 0x6e, 0x20, 0x44, 0x79, 0x6f, 0x6e, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x42, 0x61, 0x27, 0x61, 0x3b, 0x50, 0x65,
+0x6e, 0x20, 0x41, 0x74, 0x61, 0x74, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x6e, 0x61, 0x73, 0x3b, 0x50, 0x65, 0x6e, 0x20,
+0x41, 0x74, 0x79, 0x6f, 0x6e, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x63, 0x68, 0x69, 0x72, 0x69, 0x6d, 0x3b, 0x50, 0x65,
+0x6e, 0x20, 0x41, 0x74, 0x61, 0x72, 0x69, 0x62, 0x61, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x41, 0x77, 0x75, 0x72, 0x72, 0x3b,
+0x50, 0x65, 0x6e, 0x20, 0x53, 0x68, 0x61, 0x64, 0x6f, 0x6e, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x53, 0x68, 0x61, 0x6b, 0x75,
+0x72, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x4b, 0x75, 0x72, 0x20, 0x4e, 0x61, 0x62, 0x61, 0x3b, 0x50, 0x65, 0x6e, 0x20, 0x4b,
+0x75, 0x72, 0x20, 0x4e, 0x61, 0x74, 0x61, 0x74, 0x3b, 0x41, 0x331, 0x79, 0x72, 0x3b, 0x41, 0x331, 0x68, 0x77, 0x3b, 0x41,
+0x331, 0x74, 0x61, 0x3b, 0x41, 0x331, 0x6e, 0x61, 0x3b, 0x41, 0x331, 0x70, 0x66, 0x3b, 0x41, 0x331, 0x6b, 0x69, 0x3b, 0x41,
+0x331, 0x74, 0x79, 0x3b, 0x41, 0x331, 0x6e, 0x69, 0x3b, 0x41, 0x331, 0x6b, 0x75, 0x3b, 0x53, 0x77, 0x61, 0x3b, 0x53, 0x62,
+0x79, 0x3b, 0x53, 0x62, 0x68, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x79, 0x72, 0x6e, 0x69, 0x67, 0x3b,
+0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x68, 0x77, 0x61, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331,
+0x74, 0x61, 0x74, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x6e, 0x61, 0x61, 0x69, 0x3b, 0x48, 0x79, 0x77,
+0x61, 0x6e, 0x20, 0x41, 0x331, 0x70, 0x66, 0x77, 0x6f, 0x6e, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x6b,
+0x69, 0x74, 0x61, 0x74, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x74, 0x79, 0x69, 0x72, 0x69, 0x6e, 0x3b,
+0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x41, 0x331, 0x6e, 0x69, 0x6e, 0x61, 0x69, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20,
+0x41, 0x331, 0x6b, 0x75, 0x6d, 0x76, 0x69, 0x72, 0x69, 0x79, 0x69, 0x6e, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x53,
+0x77, 0x61, 0x6b, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x53, 0x77, 0x61, 0x6b, 0x20, 0x42, 0x27, 0x61, 0x331, 0x79,
+0x72, 0x6e, 0x69, 0x67, 0x3b, 0x48, 0x79, 0x77, 0x61, 0x6e, 0x20, 0x53, 0x77, 0x61, 0x6b, 0x20, 0x42, 0x27, 0x61, 0x331,
+0x68, 0x77, 0x61, 0x3b, 0x5a, 0x65, 0x6e, 0x3b, 0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x76, 0x72, 0x3b,
+0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x67, 0x3b, 0x4c, 0x75, 0x69, 0x3b, 0x41, 0x76, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b,
+0x4f, 0x74, 0x75, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x63, 0x3b, 0x5a, 0x65, 0x6e, 0xe2, 0x72, 0x3b, 0x46, 0x65,
+0x76, 0x72, 0xe2, 0x72, 0x3b, 0x4d, 0x61, 0x72, 0xe7, 0x3b, 0x41, 0x76, 0x72, 0xee, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x3b,
+0x4a, 0x75, 0x67, 0x6e, 0x3b, 0x4c, 0x75, 0x69, 0x3b, 0x41, 0x76, 0x6f, 0x73, 0x74, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d,
+0x62, 0x61, 0x72, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x61, 0x72, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b,
+0x44, 0x69, 0x63, 0x65, 0x6d, 0x62, 0x61, 0x72, 0x3b, 0x5a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4a,
+0x3b, 0x4c, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x50, 0x68, 0x61, 0x3b, 0x4c, 0x75, 0x68,
+0x3b, 0x1e70, 0x68, 0x61, 0x3b, 0x4c, 0x61, 0x6d, 0x3b, 0x53, 0x68, 0x75, 0x3b, 0x4c, 0x77, 0x69, 0x3b, 0x4c, 0x77, 0x61,
+0x3b, 0x1e70, 0x68, 0x61, 0x3b, 0x4b, 0x68, 0x75, 0x3b, 0x54, 0x73, 0x68, 0x3b, 0x1e3c, 0x61, 0x72, 0x3b, 0x4e, 0x79, 0x65,
+0x3b, 0x50, 0x68, 0x61, 0x6e, 0x64, 0x6f, 0x3b, 0x4c, 0x75, 0x68, 0x75, 0x68, 0x69, 0x3b, 0x1e70, 0x68, 0x61, 0x66, 0x61,
+0x6d, 0x75, 0x68, 0x77, 0x65, 0x3b, 0x4c, 0x61, 0x6d, 0x62, 0x61, 0x6d, 0x61, 0x69, 0x3b, 0x53, 0x68, 0x75, 0x6e, 0x64,
+0x75, 0x6e, 0x74, 0x68, 0x75, 0x6c, 0x65, 0x3b, 0x46, 0x75, 0x6c, 0x77, 0x69, 0x3b, 0x46, 0x75, 0x6c, 0x77, 0x61, 0x6e,
+0x61, 0x3b, 0x1e70, 0x68, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x65, 0x3b, 0x4b, 0x68, 0x75, 0x62, 0x76, 0x75, 0x6d, 0x65, 0x64,
+0x7a, 0x69, 0x3b, 0x54, 0x73, 0x68, 0x69, 0x6d, 0x65, 0x64, 0x7a, 0x69, 0x3b, 0x1e3c, 0x61, 0x72, 0x61, 0x3b, 0x4e, 0x79,
+0x65, 0x6e, 0x64, 0x61, 0x76, 0x68, 0x75, 0x73, 0x69, 0x6b, 0x75, 0x3b, 0x44, 0x7a, 0x76, 0x3b, 0x44, 0x7a, 0x64, 0x3b,
+0x54, 0x65, 0x64, 0x3b, 0x41, 0x66, 0x254, 0x3b, 0x44, 0x61, 0x6d, 0x3b, 0x4d, 0x61, 0x73, 0x3b, 0x53, 0x69, 0x61, 0x3b,
+0x44, 0x65, 0x61, 0x3b, 0x41, 0x6e, 0x79, 0x3b, 0x4b, 0x65, 0x6c, 0x3b, 0x41, 0x64, 0x65, 0x3b, 0x44, 0x7a, 0x6d, 0x3b,
+0x44, 0x7a, 0x6f, 0x76, 0x65, 0x3b, 0x44, 0x7a, 0x6f, 0x64, 0x7a, 0x65, 0x3b, 0x54, 0x65, 0x64, 0x6f, 0x78, 0x65, 0x3b,
+0x41, 0x66, 0x254, 0x66, 0x69, 0x25b, 0x3b, 0x44, 0x61, 0x6d, 0x61, 0x3b, 0x4d, 0x61, 0x73, 0x61, 0x3b, 0x53, 0x69, 0x61,
+0x6d, 0x6c, 0x254, 0x6d, 0x3b, 0x44, 0x65, 0x61, 0x73, 0x69, 0x61, 0x6d, 0x69, 0x6d, 0x65, 0x3b, 0x41, 0x6e, 0x79, 0x254,
+0x6e, 0x79, 0x254, 0x3b, 0x4b, 0x65, 0x6c, 0x65, 0x3b, 0x41, 0x64, 0x65, 0x25b, 0x6d, 0x65, 0x6b, 0x70, 0x254, 0x78, 0x65,
+0x3b, 0x44, 0x7a, 0x6f, 0x6d, 0x65, 0x3b, 0x44, 0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x41, 0x3b, 0x44, 0x3b, 0x4d, 0x3b, 0x53,
+0x3b, 0x44, 0x3b, 0x41, 0x3b, 0x4b, 0x3b, 0x41, 0x3b, 0x44, 0x3b, 0x49, 0x61, 0x6e, 0x2e, 0x3b, 0x50, 0x65, 0x70, 0x2e,
+0x3b, 0x4d, 0x61, 0x6c, 0x2e, 0x3b, 0x2bb, 0x41, 0x70, 0x2e, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x49, 0x75, 0x6e, 0x2e, 0x3b,
+0x49, 0x75, 0x6c, 0x2e, 0x3b, 0x2bb, 0x41, 0x75, 0x2e, 0x3b, 0x4b, 0x65, 0x70, 0x2e, 0x3b, 0x2bb, 0x4f, 0x6b, 0x2e, 0x3b,
+0x4e, 0x6f, 0x77, 0x2e, 0x3b, 0x4b, 0x65, 0x6b, 0x2e, 0x3b, 0x49, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x50, 0x65,
+0x70, 0x65, 0x6c, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x6c, 0x61, 0x6b, 0x69, 0x3b, 0x2bb, 0x41, 0x70, 0x65, 0x6c,
+0x69, 0x6c, 0x61, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x49, 0x75, 0x6e, 0x65, 0x3b, 0x49, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x2bb,
+0x41, 0x75, 0x6b, 0x61, 0x6b, 0x65, 0x3b, 0x4b, 0x65, 0x70, 0x61, 0x6b, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x2bb, 0x4f,
+0x6b, 0x61, 0x6b, 0x6f, 0x70, 0x61, 0x3b, 0x4e, 0x6f, 0x77, 0x65, 0x6d, 0x61, 0x70, 0x61, 0x3b, 0x4b, 0x65, 0x6b, 0x65,
+0x6d, 0x61, 0x70, 0x61, 0x3b, 0x4a, 0x75, 0x77, 0x3b, 0x53, 0x77, 0x69, 0x3b, 0x54, 0x73, 0x61, 0x3b, 0x4e, 0x79, 0x61,
+0x3b, 0x54, 0x73, 0x77, 0x3b, 0x41, 0x74, 0x61, 0x3b, 0x41, 0x6e, 0x61, 0x3b, 0x41, 0x72, 0x69, 0x3b, 0x41, 0x6b, 0x75,
+0x3b, 0x53, 0x77, 0x61, 0x3b, 0x4d, 0x61, 0x6e, 0x3b, 0x4d, 0x61, 0x73, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x4a, 0x75,
+0x77, 0x75, 0x6e, 0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x53, 0x77, 0x69, 0x79, 0x61, 0x6e, 0x67, 0x3b, 0x5a, 0x77,
+0x61, 0x74, 0x20, 0x54, 0x73, 0x61, 0x74, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x4e, 0x79, 0x61, 0x69, 0x3b, 0x5a, 0x77,
+0x61, 0x74, 0x20, 0x54, 0x73, 0x77, 0x6f, 0x6e, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x41, 0x74, 0x61, 0x61, 0x68, 0x3b,
+0x5a, 0x77, 0x61, 0x74, 0x20, 0x41, 0x6e, 0x61, 0x74, 0x61, 0x74, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x41, 0x72, 0x69,
+0x6e, 0x61, 0x69, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x41, 0x6b, 0x75, 0x62, 0x75, 0x6e, 0x79, 0x75, 0x6e, 0x67, 0x3b,
+0x5a, 0x77, 0x61, 0x74, 0x20, 0x53, 0x77, 0x61, 0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x4d, 0x61, 0x6e, 0x67, 0x6a,
+0x75, 0x77, 0x61, 0x6e, 0x67, 0x3b, 0x5a, 0x77, 0x61, 0x74, 0x20, 0x53, 0x77, 0x61, 0x67, 0x2d, 0x4d, 0x61, 0x2d, 0x53,
+0x75, 0x79, 0x61, 0x6e, 0x67, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x6c, 0x3b, 0x45, 0x70,
+0x75, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x4f, 0x67, 0x61, 0x3b, 0x53, 0x65,
+0x70, 0x3b, 0x4f, 0x6b, 0x75, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x77, 0x61,
+0x6c, 0x65, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x6c, 0x75, 0x77, 0x61, 0x6c, 0x65, 0x3b, 0x4d, 0x61, 0x6c, 0x69, 0x63, 0x68,
+0x69, 0x3b, 0x45, 0x70, 0x75, 0x6c, 0x6f, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c,
+0x61, 0x69, 0x3b, 0x4f, 0x67, 0x61, 0x73, 0x69, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x75, 0x74, 0x65, 0x6d, 0x62, 0x61,
+0x3b, 0x4f, 0x6b, 0x75, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73,
+0x65, 0x6d, 0x62, 0x61, 0x3b, 0x45, 0x6e, 0x65, 0x3b, 0x50, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72,
+0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x48, 0x75, 0x6e, 0x3b, 0x48, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74,
+0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x62, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x45, 0x6e, 0x65, 0x72, 0x6f, 0x3b, 0x50,
+0x65, 0x62, 0x72, 0x65, 0x72, 0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d,
+0x61, 0x79, 0x6f, 0x3b, 0x48, 0x75, 0x6e, 0x79, 0x6f, 0x3b, 0x48, 0x75, 0x6c, 0x79, 0x6f, 0x3b, 0x41, 0x67, 0x6f, 0x73,
+0x74, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x79, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x4f, 0x6b, 0x74, 0x75, 0x62, 0x72, 0x65,
+0x3b, 0x4e, 0x6f, 0x62, 0x79, 0x65, 0x6d, 0x62, 0x72, 0x65, 0x3b, 0x44, 0x69, 0x73, 0x79, 0x65, 0x6d, 0x62, 0x72, 0x65,
+0x3b, 0x45, 0x3b, 0x50, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x48, 0x3b, 0x48, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f,
+0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0xe4, 0x72, 0x3b, 0x41, 0x70, 0x72,
+0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x75, 0x67, 0x3b, 0x53, 0x65, 0x70,
+0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x7a, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x3b,
+0x46, 0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x3b, 0x4d, 0xe4, 0x72, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x3b, 0x4d,
+0x61, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x69, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x63, 0x68,
+0x74, 0x3b, 0x53, 0x65, 0x70, 0x74, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x65, 0x72,
+0x3b, 0x4e, 0x6f, 0x76, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0xa2cd,
+0xa1aa, 0x3b, 0xa44d, 0xa1aa, 0x3b, 0xa315, 0xa1aa, 0x3b, 0xa1d6, 0xa1aa, 0x3b, 0xa26c, 0xa1aa, 0x3b, 0xa0d8, 0xa1aa, 0x3b, 0xa3c3, 0xa1aa, 0x3b,
+0xa246, 0xa1aa, 0x3b, 0xa22c, 0xa1aa, 0x3b, 0xa2b0, 0xa1aa, 0x3b, 0xa2b0, 0xa2aa, 0xa1aa, 0x3b, 0xa2b0, 0xa44b, 0xa1aa, 0x3b, 0x4a, 0x61, 0x6e,
+0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x74, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x79, 0x3b, 0x4a, 0x75, 0x6e,
+0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x72, 0x68, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x55, 0x73, 0x69,
+0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x61, 0x62, 0x61, 0x72, 0x69, 0x3b, 0x75, 0x46, 0x65, 0x62, 0x65, 0x72,
+0x62, 0x61, 0x72, 0x69, 0x3b, 0x75, 0x4d, 0x61, 0x74, 0x6a, 0x68, 0x69, 0x3b, 0x75, 0x2d, 0x41, 0x70, 0x72, 0x65, 0x6c,
+0x69, 0x3b, 0x4d, 0x65, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x79, 0x69, 0x3b, 0x41,
+0x72, 0x68, 0x6f, 0x73, 0x74, 0x6f, 0x73, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b,
+0x74, 0x6f, 0x62, 0x61, 0x3b, 0x55, 0x73, 0x69, 0x6e, 0x79, 0x69, 0x6b, 0x68, 0x61, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73,
+0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x74, 0x3b, 0x41, 0x70, 0x6f,
+0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74,
+0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x66, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x61, 0x77, 0x61, 0x72,
+0x65, 0x3b, 0x46, 0x65, 0x62, 0x65, 0x72, 0x77, 0x61, 0x72, 0x65, 0x3b, 0x4d, 0x61, 0x74, 0x161, 0x68, 0x65, 0x3b, 0x41,
+0x70, 0x6f, 0x72, 0x65, 0x6c, 0x65, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x65, 0x3b, 0x4a, 0x75, 0x6c, 0x61,
+0x65, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x6f, 0x73, 0x65, 0x3b, 0x53, 0x65, 0x74, 0x65, 0x6d, 0x65, 0x72, 0x65, 0x3b,
+0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x6f, 0x72, 0x65, 0x3b, 0x4e, 0x6f, 0x66, 0x65, 0x6d, 0x65, 0x72, 0x65, 0x3b, 0x44, 0x69,
+0x73, 0x65, 0x6d, 0x65, 0x72, 0x65, 0x3b, 0x6f, 0x111, 0x111, 0x61, 0x6a, 0x61, 0x67, 0x65, 0x3b, 0x67, 0x75, 0x6f, 0x76,
+0x76, 0x61, 0x3b, 0x6e, 0x6a, 0x75, 0x6b, 0x10d, 0x61, 0x3b, 0x63, 0x75, 0x6f, 0x14b, 0x6f, 0x3b, 0x6d, 0x69, 0x65, 0x73,
+0x73, 0x65, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x73, 0x65, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x64, 0x6e, 0x65, 0x3b, 0x62, 0x6f,
+0x72, 0x67, 0x65, 0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x61, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x67, 0x6f, 0x74, 0x3b, 0x73, 0x6b,
+0xe1, 0x62, 0x6d, 0x61, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x6c, 0x61, 0x3b, 0x6f, 0x111, 0x111, 0x61, 0x6a, 0x61, 0x67, 0x65,
+0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x75, 0x6f, 0x76, 0x76, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x6e, 0x6a,
+0x75, 0x6b, 0x10d, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x63, 0x75, 0x6f, 0x14b, 0x6f, 0x6d, 0xe1, 0x6e, 0x6e, 0x75,
+0x3b, 0x6d, 0x69, 0x65, 0x73, 0x73, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x73, 0x65, 0x6d,
+0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x64, 0x6e, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x62, 0x6f,
+0x72, 0x67, 0x65, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x10d, 0x61, 0x6b, 0x10d, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b,
+0x67, 0x6f, 0x6c, 0x67, 0x67, 0x6f, 0x74, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x73, 0x6b, 0xe1, 0x62, 0x6d, 0x61, 0x6d,
+0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x6c, 0x61, 0x6d, 0xe1, 0x6e, 0x6e, 0x75, 0x3b, 0x4f, 0x3b, 0x47,
+0x3b, 0x4e, 0x3b, 0x43, 0x3b, 0x4d, 0x3b, 0x47, 0x3b, 0x53, 0x3b, 0x42, 0x3b, 0x10c, 0x3b, 0x47, 0x3b, 0x53, 0x3b, 0x4a,
+0x3b, 0x6f, 0x111, 0x111, 0x6a, 0x3b, 0x67, 0x75, 0x6f, 0x76, 0x3b, 0x6e, 0x6a, 0x75, 0x6b, 0x3b, 0x63, 0x75, 0x6f, 0x3b,
+0x6d, 0x69, 0x65, 0x73, 0x3b, 0x67, 0x65, 0x61, 0x73, 0x3b, 0x73, 0x75, 0x6f, 0x69, 0x3b, 0x62, 0x6f, 0x72, 0x67, 0x3b,
+0x10d, 0x61, 0x6b, 0x10d, 0x3b, 0x67, 0x6f, 0x6c, 0x67, 0x3b, 0x73, 0x6b, 0xe1, 0x62, 0x3b, 0x6a, 0x75, 0x6f, 0x76, 0x3b,
+0x4b, 0x69, 0x69, 0x3b, 0x44, 0x68, 0x69, 0x3b, 0x54, 0x72, 0x69, 0x3b, 0x53, 0x70, 0x69, 0x3b, 0x52, 0x69, 0x69, 0x3b,
+0x4d, 0x74, 0x69, 0x3b, 0x45, 0x6d, 0x69, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4d, 0x6e, 0x69, 0x3b, 0x4d, 0x78, 0x69, 0x3b,
+0x4d, 0x78, 0x6b, 0x3b, 0x4d, 0x78, 0x64, 0x3b, 0x4b, 0x69, 0x6e, 0x67, 0x61, 0x6c, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b,
+0x44, 0x68, 0x61, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x54, 0x72, 0x75, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x53, 0x70,
+0x61, 0x74, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x52, 0x69, 0x6d, 0x61, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x61,
+0x74, 0x61, 0x72, 0x75, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x45, 0x6d, 0x70, 0x69, 0x74, 0x75, 0x20, 0x69, 0x64, 0x61,
+0x73, 0x3b, 0x4d, 0x61, 0x73, 0x70, 0x61, 0x74, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x6e, 0x67, 0x61, 0x72, 0x69,
+0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x78, 0x61, 0x6c, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x78,
+0x61, 0x6c, 0x20, 0x6b, 0x69, 0x6e, 0x67, 0x61, 0x6c, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4d, 0x61, 0x78, 0x61, 0x6c,
+0x20, 0x64, 0x68, 0x61, 0x20, 0x69, 0x64, 0x61, 0x73, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x53, 0x3b, 0x52, 0x3b,
+0x4d, 0x3b, 0x45, 0x3b, 0x50, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x44, 0x3b, 0x43, 0x61, 0x6e, 0x3b, 0x46, 0x65,
+0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x43, 0x75,
+0x6c, 0x3b, 0x41, 0x67, 0x74, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x62, 0x3b, 0x44, 0x69,
+0x73, 0x3b, 0x43, 0x68, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x72, 0x61, 0x72, 0x69, 0x3b,
+0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x69, 0x72, 0x69, 0x72, 0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75,
+0x6e, 0x69, 0x3b, 0x43, 0x68, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70,
+0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x69, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x62, 0x65, 0x6d, 0x62,
+0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x43, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b,
+0x4a, 0x3b, 0x43, 0x3b, 0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x49, 0x6d, 0x62, 0x3b, 0x4b, 0x61,
+0x77, 0x3b, 0x4b, 0x61, 0x64, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x4b, 0x61, 0x73, 0x3b, 0x4b, 0x61, 0x72, 0x3b, 0x4d, 0x66,
+0x75, 0x3b, 0x57, 0x75, 0x6e, 0x3b, 0x49, 0x6b, 0x65, 0x3b, 0x49, 0x6b, 0x75, 0x3b, 0x49, 0x6d, 0x77, 0x3b, 0x49, 0x77,
+0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6d, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4d,
+0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x77, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67,
+0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x64, 0x61, 0x64, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61,
+0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x73, 0x61,
+0x6e, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x72, 0x61, 0x6e, 0x64, 0x61,
+0x64, 0x75, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x6d, 0x66, 0x75, 0x6e, 0x67, 0x61, 0x64,
+0x65, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x77, 0x75, 0x6e, 0x79, 0x61, 0x6e, 0x79, 0x61,
+0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x6f,
+0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67,
+0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x6d, 0x77, 0x65, 0x72, 0x69, 0x3b,
+0x4d, 0x6f, 0x72, 0x69, 0x20, 0x67, 0x68, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69,
+0x77, 0x69, 0x3b, 0x49, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4d, 0x3b, 0x57, 0x3b, 0x49,
+0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x73, 0x69, 0x69, 0x3b, 0x63, 0x6f, 0x6c, 0x3b, 0x6d, 0x62, 0x6f, 0x3b, 0x73,
+0x65, 0x65, 0x3b, 0x64, 0x75, 0x75, 0x3b, 0x6b, 0x6f, 0x72, 0x3b, 0x6d, 0x6f, 0x72, 0x3b, 0x6a, 0x75, 0x6b, 0x3b, 0x73,
+0x6c, 0x74, 0x3b, 0x79, 0x61, 0x72, 0x3b, 0x6a, 0x6f, 0x6c, 0x3b, 0x62, 0x6f, 0x77, 0x3b, 0x73, 0x69, 0x69, 0x6c, 0x6f,
+0x3b, 0x63, 0x6f, 0x6c, 0x74, 0x65, 0x3b, 0x6d, 0x62, 0x6f, 0x6f, 0x79, 0x3b, 0x73, 0x65, 0x65, 0x257, 0x74, 0x6f, 0x3b,
+0x64, 0x75, 0x75, 0x6a, 0x61, 0x6c, 0x3b, 0x6b, 0x6f, 0x72, 0x73, 0x65, 0x3b, 0x6d, 0x6f, 0x72, 0x73, 0x6f, 0x3b, 0x6a,
+0x75, 0x6b, 0x6f, 0x3b, 0x73, 0x69, 0x69, 0x6c, 0x74, 0x6f, 0x3b, 0x79, 0x61, 0x72, 0x6b, 0x6f, 0x6d, 0x61, 0x61, 0x3b,
+0x6a, 0x6f, 0x6c, 0x61, 0x6c, 0x3b, 0x62, 0x6f, 0x77, 0x74, 0x65, 0x3b, 0x73, 0x3b, 0x63, 0x3b, 0x6d, 0x3b, 0x73, 0x3b,
+0x64, 0x3b, 0x6b, 0x3b, 0x6d, 0x3b, 0x6a, 0x3b, 0x73, 0x3b, 0x79, 0x3b, 0x6a, 0x3b, 0x62, 0x3b, 0x4a, 0x45, 0x4e, 0x3b,
+0x57, 0x4b, 0x52, 0x3b, 0x57, 0x47, 0x54, 0x3b, 0x57, 0x4b, 0x4e, 0x3b, 0x57, 0x54, 0x4e, 0x3b, 0x57, 0x54, 0x44, 0x3b,
+0x57, 0x4d, 0x4a, 0x3b, 0x57, 0x4e, 0x4e, 0x3b, 0x57, 0x4b, 0x44, 0x3b, 0x57, 0x49, 0x4b, 0x3b, 0x57, 0x4d, 0x57, 0x3b,
+0x44, 0x49, 0x54, 0x3b, 0x4e, 0x6a, 0x65, 0x6e, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77,
+0x61, 0x20, 0x6b, 0x65, 0x72, 0x129, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61,
+0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65,
+0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77,
+0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61,
+0x20, 0x6d, 0x169, 0x67, 0x77, 0x61, 0x6e, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b,
+0x61, 0x6e, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61,
+0x3b, 0x4d, 0x77, 0x65, 0x72, 0x65, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72,
+0x65, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x169, 0x6d, 0x77, 0x65, 0x3b, 0x4e,
+0x64, 0x69, 0x74, 0x68, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x47,
+0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x44, 0x3b, 0x4f, 0x62, 0x6f, 0x3b, 0x57, 0x61, 0x61,
+0x3b, 0x4f, 0x6b, 0x75, 0x3b, 0x4f, 0x6e, 0x67, 0x3b, 0x49, 0x6d, 0x65, 0x3b, 0x49, 0x6c, 0x65, 0x3b, 0x53, 0x61, 0x70,
+0x3b, 0x49, 0x73, 0x69, 0x3b, 0x53, 0x61, 0x61, 0x3b, 0x54, 0x6f, 0x6d, 0x3b, 0x54, 0x6f, 0x62, 0x3b, 0x54, 0x6f, 0x77,
+0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x62, 0x6f, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65,
+0x20, 0x77, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x6b, 0x75, 0x6e, 0x69,
+0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x6f, 0x6e, 0x67, 0x27, 0x77, 0x61, 0x6e, 0x3b, 0x4c, 0x61, 0x70,
+0x61, 0x20, 0x6c, 0x65, 0x20, 0x69, 0x6d, 0x65, 0x74, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x69, 0x6c,
+0x65, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x73, 0x61, 0x70, 0x61, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20,
+0x6c, 0x65, 0x20, 0x69, 0x73, 0x69, 0x65, 0x74, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x73, 0x61, 0x61,
+0x6c, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x3b, 0x4c, 0x61, 0x70, 0x61,
+0x20, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6f, 0x3b, 0x4c, 0x61, 0x70, 0x61, 0x20, 0x6c,
+0x65, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x6e, 0x20, 0x77, 0x61, 0x61, 0x72, 0x65, 0x3b, 0x4f, 0x3b, 0x57, 0x3b, 0x4f, 0x3b,
+0x4f, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x54, 0x3b, 0x4a, 0x61,
+0x6e, 0x3b, 0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75,
+0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x75, 0x67, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x75, 0x3b, 0x4e, 0x6f,
+0x76, 0x3b, 0x44, 0x65, 0x63, 0x3b, 0x4a, 0x61, 0x6e, 0x65, 0x69, 0x72, 0x6f, 0x3b, 0x46, 0x65, 0x76, 0x72, 0x65, 0x69,
+0x72, 0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x63, 0x6f, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x6f, 0x3b,
+0x4a, 0x75, 0x6e, 0x68, 0x6f, 0x3b, 0x4a, 0x75, 0x6c, 0x68, 0x6f, 0x3b, 0x41, 0x75, 0x67, 0x75, 0x73, 0x74, 0x6f, 0x3b,
+0x53, 0x65, 0x74, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x72, 0x6f, 0x3b, 0x4e, 0x6f, 0x76, 0x65,
+0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x44, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x72, 0x6f, 0x3b, 0x5a, 0x69, 0x62, 0x3b, 0x4e, 0x68,
+0x6c, 0x3b, 0x4d, 0x62, 0x69, 0x3b, 0x4d, 0x61, 0x62, 0x3b, 0x4e, 0x6b, 0x77, 0x3b, 0x4e, 0x68, 0x6c, 0x3b, 0x4e, 0x74,
+0x75, 0x3b, 0x4e, 0x63, 0x77, 0x3b, 0x4d, 0x70, 0x61, 0x3b, 0x4d, 0x66, 0x75, 0x3b, 0x4c, 0x77, 0x65, 0x3b, 0x4d, 0x70,
+0x61, 0x3b, 0x5a, 0x69, 0x62, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x6c, 0x61, 0x3b, 0x4e, 0x68, 0x6c, 0x6f, 0x6c, 0x61, 0x6e,
+0x6a, 0x61, 0x3b, 0x4d, 0x62, 0x69, 0x6d, 0x62, 0x69, 0x74, 0x68, 0x6f, 0x3b, 0x4d, 0x61, 0x62, 0x61, 0x73, 0x61, 0x3b,
+0x4e, 0x6b, 0x77, 0x65, 0x6e, 0x6b, 0x77, 0x65, 0x7a, 0x69, 0x3b, 0x4e, 0x68, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x6c, 0x61,
+0x3b, 0x4e, 0x74, 0x75, 0x6c, 0x69, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x4e, 0x63, 0x77, 0x61, 0x62, 0x61, 0x6b, 0x61, 0x7a,
+0x69, 0x3b, 0x4d, 0x70, 0x61, 0x6e, 0x64, 0x75, 0x6c, 0x61, 0x3b, 0x4d, 0x66, 0x75, 0x6d, 0x66, 0x75, 0x3b, 0x4c, 0x77,
+0x65, 0x7a, 0x69, 0x3b, 0x4d, 0x70, 0x61, 0x6c, 0x61, 0x6b, 0x61, 0x7a, 0x69, 0x3b, 0x5a, 0x3b, 0x4e, 0x3b, 0x4d, 0x3b,
+0x4d, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4c, 0x3b, 0x4d, 0x3b, 0x4d, 0x31,
+0x3b, 0x4d, 0x32, 0x3b, 0x4d, 0x33, 0x3b, 0x4d, 0x34, 0x3b, 0x4d, 0x35, 0x3b, 0x4d, 0x36, 0x3b, 0x4d, 0x37, 0x3b, 0x4d,
+0x38, 0x3b, 0x4d, 0x39, 0x3b, 0x4d, 0x31, 0x30, 0x3b, 0x4d, 0x31, 0x31, 0x3b, 0x4d, 0x31, 0x32, 0x3b, 0x4d, 0x77, 0x65,
+0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x77, 0x61, 0x6e, 0x7a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77,
+0x61, 0x20, 0x6b, 0x61, 0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74,
+0x61, 0x74, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x61, 0x6e, 0x61, 0x3b, 0x4d,
+0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x74, 0x61, 0x6e, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77,
+0x61, 0x20, 0x73, 0x69, 0x74, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x73, 0x61, 0x62, 0x61,
+0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69,
+0x20, 0x77, 0x61, 0x20, 0x74, 0x69, 0x73, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b,
+0x75, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e,
+0x61, 0x20, 0x6d, 0x6f, 0x6a, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x75, 0x6d,
+0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x62, 0x69, 0x6c, 0x69, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x54,
+0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x4e, 0x3b, 0x54, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x69, 0x6e, 0x6e, 0x3b, 0x62,
+0x1e5b, 0x61, 0x3b, 0x6d, 0x61, 0x1e5b, 0x3b, 0x69, 0x62, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x3b, 0x79, 0x75, 0x6e, 0x3b, 0x79,
+0x75, 0x6c, 0x3b, 0x263, 0x75, 0x63, 0x3b, 0x63, 0x75, 0x74, 0x3b, 0x6b, 0x74, 0x75, 0x3b, 0x6e, 0x75, 0x77, 0x3b, 0x64,
+0x75, 0x6a, 0x3b, 0x69, 0x6e, 0x6e, 0x61, 0x79, 0x72, 0x3b, 0x62, 0x1e5b, 0x61, 0x79, 0x1e5b, 0x3b, 0x6d, 0x61, 0x1e5b, 0x1e63,
+0x3b, 0x69, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x6d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x79, 0x75, 0x6e, 0x79, 0x75, 0x3b, 0x79,
+0x75, 0x6c, 0x79, 0x75, 0x7a, 0x3b, 0x263, 0x75, 0x63, 0x74, 0x3b, 0x63, 0x75, 0x74, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b,
+0x6b, 0x74, 0x75, 0x62, 0x72, 0x3b, 0x6e, 0x75, 0x77, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x64, 0x75, 0x6a, 0x61, 0x6e,
+0x62, 0x69, 0x72, 0x3b, 0x69, 0x3b, 0x62, 0x3b, 0x6d, 0x3b, 0x69, 0x3b, 0x6d, 0x3b, 0x79, 0x3b, 0x79, 0x3b, 0x263, 0x3b,
+0x63, 0x3b, 0x6b, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x59, 0x65, 0x6e, 0x3b, 0x46, 0x75, 0x72, 0x3b, 0x4d, 0x65, 0x263, 0x3b,
+0x59, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x59, 0x75, 0x6e, 0x3b, 0x59, 0x75, 0x6c, 0x3b, 0x194, 0x75, 0x63, 0x3b,
+0x43, 0x74, 0x65, 0x3b, 0x54, 0x75, 0x62, 0x3b, 0x4e, 0x75, 0x6e, 0x3b, 0x44, 0x75, 0x1e7, 0x3b, 0x59, 0x65, 0x6e, 0x6e,
+0x61, 0x79, 0x65, 0x72, 0x3b, 0x46, 0x75, 0x1e5b, 0x61, 0x72, 0x3b, 0x4d, 0x65, 0x263, 0x72, 0x65, 0x73, 0x3b, 0x59, 0x65,
+0x62, 0x72, 0x69, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6e, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6c,
+0x79, 0x75, 0x3b, 0x194, 0x75, 0x63, 0x74, 0x3b, 0x43, 0x74, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x54, 0x75, 0x62, 0x65,
+0x1e5b, 0x3b, 0x4e, 0x75, 0x6e, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b, 0x44, 0x75, 0x1e7, 0x65, 0x6d, 0x62, 0x65, 0x1e5b, 0x3b,
+0x59, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x4d, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x194, 0x3b, 0x43, 0x3b, 0x54, 0x3b,
+0x4e, 0x3b, 0x44, 0x3b, 0x4b, 0x42, 0x5a, 0x3b, 0x4b, 0x42, 0x52, 0x3b, 0x4b, 0x53, 0x54, 0x3b, 0x4b, 0x4b, 0x4e, 0x3b,
+0x4b, 0x54, 0x4e, 0x3b, 0x4b, 0x4d, 0x4b, 0x3b, 0x4b, 0x4d, 0x53, 0x3b, 0x4b, 0x4d, 0x4e, 0x3b, 0x4b, 0x4d, 0x4e, 0x3b,
+0x4b, 0x4b, 0x4d, 0x3b, 0x4b, 0x4e, 0x4b, 0x3b, 0x4b, 0x4e, 0x42, 0x3b, 0x4f, 0x6b, 0x77, 0x6f, 0x6b, 0x75, 0x62, 0x61,
+0x6e, 0x7a, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x62, 0x69, 0x72, 0x69, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b,
+0x61, 0x73, 0x68, 0x61, 0x74, 0x75, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61,
+0x6b, 0x61, 0x74, 0x61, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x75, 0x6b, 0x61, 0x61, 0x67, 0x61, 0x3b,
+0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x75, 0x73, 0x68, 0x61, 0x6e, 0x6a, 0x75, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x75, 0x6e,
+0x61, 0x61, 0x6e, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x77, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4f, 0x6b, 0x77, 0x61,
+0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6b,
+0x75, 0x6d, 0x77, 0x65, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x69, 0x62,
+0x69, 0x72, 0x69, 0x3b, 0x48, 0x75, 0x74, 0x3b, 0x56, 0x69, 0x6c, 0x3b, 0x44, 0x61, 0x74, 0x3b, 0x54, 0x61, 0x69, 0x3b,
+0x48, 0x61, 0x6e, 0x3b, 0x53, 0x69, 0x74, 0x3b, 0x53, 0x61, 0x62, 0x3b, 0x4e, 0x61, 0x6e, 0x3b, 0x54, 0x69, 0x73, 0x3b,
+0x4b, 0x75, 0x6d, 0x3b, 0x4b, 0x6d, 0x6a, 0x3b, 0x4b, 0x6d, 0x62, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a,
+0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x68, 0x75, 0x74, 0x61, 0x6c, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64,
+0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x76, 0x69, 0x6c, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65,
+0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x64, 0x61, 0x74, 0x75, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77,
+0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x74, 0x61, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77,
+0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x77, 0x75, 0x68, 0x61, 0x6e, 0x75, 0x3b, 0x70, 0x61, 0x20, 0x6d,
+0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x73, 0x69, 0x74, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77,
+0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x73, 0x61, 0x62, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65,
+0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6e, 0x61, 0x6e, 0x65, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64,
+0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x74, 0x69, 0x73, 0x61, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a,
+0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x70, 0x61, 0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69,
+0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x6d, 0x6f, 0x6a, 0x61, 0x3b, 0x70, 0x61,
+0x20, 0x6d, 0x77, 0x65, 0x64, 0x7a, 0x69, 0x20, 0x67, 0x77, 0x61, 0x20, 0x6b, 0x75, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20,
+0x6d, 0x62, 0x69, 0x6c, 0x69, 0x3b, 0x48, 0x3b, 0x56, 0x3b, 0x44, 0x3b, 0x54, 0x3b, 0x48, 0x3b, 0x53, 0x3b, 0x53, 0x3b,
+0x4e, 0x3b, 0x54, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46, 0x65,
+0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x72, 0x69, 0x6c, 0x79, 0x69,
+0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x79, 0x61, 0x69, 0x3b, 0x41, 0x67,
+0x75, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61,
+0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x7a, 0x61, 0x6e,
+0x3b, 0x66, 0x65, 0x62, 0x3b, 0x6e, 0x61, 0x72, 0x3b, 0x61, 0x77, 0x69, 0x3b, 0x6d, 0x25b, 0x3b, 0x7a, 0x75, 0x77, 0x3b,
+0x7a, 0x75, 0x6c, 0x3b, 0x75, 0x74, 0x69, 0x3b, 0x73, 0x25b, 0x74, 0x3b, 0x254, 0x6b, 0x75, 0x3b, 0x6e, 0x6f, 0x77, 0x3b,
+0x64, 0x65, 0x73, 0x3b, 0x7a, 0x61, 0x6e, 0x77, 0x75, 0x79, 0x65, 0x3b, 0x66, 0x65, 0x62, 0x75, 0x72, 0x75, 0x79, 0x65,
+0x3b, 0x6d, 0x61, 0x72, 0x69, 0x73, 0x69, 0x3b, 0x61, 0x77, 0x69, 0x72, 0x69, 0x6c, 0x69, 0x3b, 0x6d, 0x25b, 0x3b, 0x7a,
+0x75, 0x77, 0x25b, 0x6e, 0x3b, 0x7a, 0x75, 0x6c, 0x75, 0x79, 0x65, 0x3b, 0x75, 0x74, 0x69, 0x3b, 0x73, 0x25b, 0x74, 0x61,
+0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x254, 0x6b, 0x75, 0x74, 0x254, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x6e, 0x6f, 0x77, 0x61,
+0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x64, 0x65, 0x73, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x75, 0x3b, 0x5a, 0x3b, 0x46, 0x3b,
+0x4d, 0x3b, 0x41, 0x3b, 0x4d, 0x3b, 0x5a, 0x3b, 0x5a, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x186, 0x3b, 0x4e, 0x3b, 0x44, 0x3b,
+0x4d, 0x62, 0x65, 0x3b, 0x4b, 0x61, 0x69, 0x3b, 0x4b, 0x61, 0x74, 0x3b, 0x4b, 0x61, 0x6e, 0x3b, 0x47, 0x61, 0x74, 0x3b,
+0x47, 0x61, 0x6e, 0x3b, 0x4d, 0x75, 0x67, 0x3b, 0x4b, 0x6e, 0x6e, 0x3b, 0x4b, 0x65, 0x6e, 0x3b, 0x49, 0x6b, 0x75, 0x3b,
+0x49, 0x6d, 0x77, 0x3b, 0x49, 0x67, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x62, 0x65,
+0x72, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x129, 0x72, 0x69, 0x3b, 0x4d, 0x77,
+0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x74, 0x68, 0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69,
+0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61,
+0x74, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x67, 0x61, 0x74, 0x61, 0x6e, 0x74,
+0x61, 0x74, 0x169, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6d, 0x169, 0x67, 0x77, 0x61, 0x6e, 0x6a,
+0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x61, 0x6e, 0x61, 0x6e, 0x61, 0x3b, 0x4d, 0x77,
+0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x6b, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77,
+0x61, 0x20, 0x69, 0x6b, 0x169, 0x6d, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20, 0x69, 0x6b, 0x169,
+0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x169, 0x6d, 0x77, 0x65, 0x3b, 0x4d, 0x77, 0x65, 0x72, 0x69, 0x20, 0x77, 0x61, 0x20,
+0x69, 0x6b, 0x169, 0x6d, 0x69, 0x20, 0x6e, 0x61, 0x20, 0x4b, 0x61, 0x129, 0x72, 0x129, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b,
+0x3b, 0x4b, 0x3b, 0x47, 0x3b, 0x47, 0x3b, 0x4d, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x13a4,
+0x13c3, 0x3b, 0x13a7, 0x13a6, 0x3b, 0x13a0, 0x13c5, 0x3b, 0x13a7, 0x13ec, 0x3b, 0x13a0, 0x13c2, 0x3b, 0x13d5, 0x13ad, 0x3b, 0x13ab, 0x13f0, 0x3b,
+0x13a6, 0x13b6, 0x3b, 0x13da, 0x13b5, 0x3b, 0x13da, 0x13c2, 0x3b, 0x13c5, 0x13d3, 0x3b, 0x13a4, 0x13cd, 0x3b, 0x13a4, 0x13c3, 0x13b8, 0x13d4, 0x13c5,
+0x3b, 0x13a7, 0x13a6, 0x13b5, 0x3b, 0x13a0, 0x13c5, 0x13f1, 0x3b, 0x13a7, 0x13ec, 0x13c2, 0x3b, 0x13a0, 0x13c2, 0x13cd, 0x13ac, 0x13d8, 0x3b, 0x13d5,
+0x13ad, 0x13b7, 0x13f1, 0x3b, 0x13ab, 0x13f0, 0x13c9, 0x13c2, 0x3b, 0x13a6, 0x13b6, 0x13c2, 0x3b, 0x13da, 0x13b5, 0x13cd, 0x13d7, 0x3b, 0x13da, 0x13c2,
+0x13c5, 0x13d7, 0x3b, 0x13c5, 0x13d3, 0x13d5, 0x13c6, 0x3b, 0x13a4, 0x13cd, 0x13a9, 0x13f1, 0x3b, 0x13a4, 0x3b, 0x13a7, 0x3b, 0x13a0, 0x3b, 0x13a7,
+0x3b, 0x13a0, 0x3b, 0x13d5, 0x3b, 0x13ab, 0x3b, 0x13a6, 0x3b, 0x13da, 0x3b, 0x13da, 0x3b, 0x13c5, 0x3b, 0x13a4, 0x3b, 0x7a, 0x61, 0x6e,
+0x3b, 0x66, 0x65, 0x76, 0x3b, 0x6d, 0x61, 0x72, 0x3b, 0x61, 0x76, 0x72, 0x3b, 0x6d, 0x65, 0x3b, 0x7a, 0x69, 0x6e, 0x3b,
+0x7a, 0x69, 0x6c, 0x3b, 0x6f, 0x75, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x3b, 0x6f, 0x6b, 0x74, 0x3b, 0x6e, 0x6f, 0x76, 0x3b,
+0x64, 0x65, 0x73, 0x3b, 0x7a, 0x61, 0x6e, 0x76, 0x69, 0x65, 0x3b, 0x66, 0x65, 0x76, 0x72, 0x69, 0x79, 0x65, 0x3b, 0x6d,
+0x61, 0x72, 0x73, 0x3b, 0x61, 0x76, 0x72, 0x69, 0x6c, 0x3b, 0x6d, 0x65, 0x3b, 0x7a, 0x69, 0x6e, 0x3b, 0x7a, 0x69, 0x6c,
+0x79, 0x65, 0x3b, 0x6f, 0x75, 0x74, 0x3b, 0x73, 0x65, 0x70, 0x74, 0x61, 0x6d, 0x3b, 0x6f, 0x6b, 0x74, 0x6f, 0x62, 0x3b,
+0x6e, 0x6f, 0x76, 0x61, 0x6d, 0x3b, 0x64, 0x65, 0x73, 0x61, 0x6d, 0x3b, 0x7a, 0x3b, 0x66, 0x3b, 0x6d, 0x3b, 0x61, 0x3b,
+0x6d, 0x3b, 0x7a, 0x3b, 0x7a, 0x3b, 0x6f, 0x3b, 0x73, 0x3b, 0x6f, 0x3b, 0x6e, 0x3b, 0x64, 0x3b, 0x4d, 0x77, 0x65, 0x64,
+0x69, 0x20, 0x4e, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x50, 0x69,
+0x6c, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x54, 0x61, 0x74, 0x75, 0x3b, 0x4d, 0x77, 0x65,
+0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x63, 0x68, 0x65, 0x63, 0x68, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20,
+0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e,
+0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x55, 0x6d, 0x6f, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77,
+0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4d, 0x69, 0x76, 0x69, 0x6c, 0x69, 0x3b, 0x4d,
+0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4d, 0x69,
+0x74, 0x61, 0x74, 0x75, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f,
+0x20, 0x6e, 0x61, 0x20, 0x4e, 0x63, 0x68, 0x65, 0x63, 0x68, 0x69, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61,
+0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x3b, 0x4d, 0x77,
+0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79,
+0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x55, 0x3b, 0x4d, 0x77, 0x65, 0x64, 0x69, 0x20, 0x77, 0x61, 0x20, 0x4e, 0x6e,
+0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4e, 0x6e, 0x79, 0x61, 0x6e, 0x6f, 0x20, 0x6e, 0x61, 0x20, 0x4d, 0x3b,
+0x46, 0xfa, 0x6e, 0x67, 0x61, 0x74, 0x268, 0x3b, 0x4e, 0x61, 0x61, 0x6e, 0x268, 0x3b, 0x4b, 0x65, 0x65, 0x6e, 0x64, 0x61,
+0x3b, 0x49, 0x6b, 0xfa, 0x6d, 0x69, 0x3b, 0x49, 0x6e, 0x79, 0x61, 0x6d, 0x62, 0x61, 0x6c, 0x61, 0x3b, 0x49, 0x64, 0x77,
+0x61, 0x61, 0x74, 0x61, 0x3b, 0x4d, 0x289, 0x289, 0x6e, 0x63, 0x68, 0x268, 0x3b, 0x56, 0x268, 0x268, 0x72, 0x268, 0x3b, 0x53,
+0x61, 0x61, 0x74, 0x289, 0x3b, 0x49, 0x6e, 0x79, 0x69, 0x3b, 0x53, 0x61, 0x61, 0x6e, 0x6f, 0x3b, 0x53, 0x61, 0x73, 0x61,
+0x74, 0x289, 0x3b, 0x4b, 0x289, 0x66, 0xfa, 0x6e, 0x67, 0x61, 0x74, 0x268, 0x3b, 0x4b, 0x289, 0x6e, 0x61, 0x61, 0x6e, 0x268,
+0x3b, 0x4b, 0x289, 0x6b, 0x65, 0x65, 0x6e, 0x64, 0x61, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6b, 0x75, 0x6d, 0x69, 0x3b, 0x4b,
+0x77, 0x69, 0x69, 0x6e, 0x79, 0x61, 0x6d, 0x62, 0xe1, 0x6c, 0x61, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x64, 0x77, 0x61, 0x61,
+0x74, 0x61, 0x3b, 0x4b, 0x289, 0x6d, 0x289, 0x289, 0x6e, 0x63, 0x68, 0x268, 0x3b, 0x4b, 0x289, 0x76, 0x268, 0x268, 0x72, 0x268,
+0x3b, 0x4b, 0x289, 0x73, 0x61, 0x61, 0x74, 0x289, 0x3b, 0x4b, 0x77, 0x69, 0x69, 0x6e, 0x79, 0x69, 0x3b, 0x4b, 0x289, 0x73,
+0x61, 0x61, 0x6e, 0x6f, 0x3b, 0x4b, 0x289, 0x73, 0x61, 0x73, 0x61, 0x74, 0x289, 0x3b, 0x46, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b,
+0x49, 0x3b, 0x49, 0x3b, 0x49, 0x3b, 0x4d, 0x3b, 0x56, 0x3b, 0x53, 0x3b, 0x49, 0x3b, 0x53, 0x3b, 0x53, 0x3b, 0x4a, 0x61,
+0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x75, 0x3b, 0x4d, 0x61, 0x61, 0x3b, 0x4a, 0x75,
+0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x75, 0x3b, 0x53, 0x65, 0x62, 0x3b, 0x4f, 0x6b, 0x69, 0x3b, 0x4e, 0x6f,
+0x76, 0x3b, 0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x77, 0x61, 0x6c, 0x69, 0x79, 0x6f, 0x3b, 0x46, 0x65, 0x62, 0x77,
+0x61, 0x6c, 0x69, 0x79, 0x6f, 0x3b, 0x4d, 0x61, 0x72, 0x69, 0x73, 0x69, 0x3b, 0x41, 0x70, 0x75, 0x6c, 0x69, 0x3b, 0x4d,
+0x61, 0x61, 0x79, 0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x61, 0x79, 0x69, 0x3b, 0x41,
+0x67, 0x75, 0x73, 0x69, 0x74, 0x6f, 0x3b, 0x53, 0x65, 0x62, 0x75, 0x74, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b,
+0x69, 0x74, 0x6f, 0x62, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d,
+0x62, 0x61, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x45, 0x70, 0x72, 0x3b, 0x4d,
+0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x4f, 0x67, 0x61, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f,
+0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x69, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x46,
+0x65, 0x62, 0x72, 0x75, 0x61, 0x72, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x45, 0x70, 0x72, 0x65, 0x6f, 0x3b,
+0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x4f, 0x67, 0x61, 0x73, 0x74,
+0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62, 0x61, 0x3b, 0x4e, 0x6f,
+0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b,
+0x45, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x4a, 0x3b, 0x4f, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4a, 0x61,
+0x6e, 0x3b, 0x46, 0x65, 0x76, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x69, 0x3b, 0x4a, 0x75,
+0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x74, 0x3b, 0x4f, 0x74, 0x75, 0x3b, 0x4e, 0x75,
+0x76, 0x3b, 0x44, 0x69, 0x7a, 0x3b, 0x4a, 0x61, 0x6e, 0x65, 0x72, 0x75, 0x3b, 0x46, 0x65, 0x76, 0x65, 0x72, 0x65, 0x72,
+0x75, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x75, 0x3b, 0x41, 0x62, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x61, 0x69, 0x75, 0x3b, 0x4a,
+0x75, 0x6e, 0x68, 0x75, 0x3b, 0x4a, 0x75, 0x6c, 0x68, 0x75, 0x3b, 0x41, 0x67, 0x6f, 0x73, 0x74, 0x75, 0x3b, 0x53, 0x65,
+0x74, 0x65, 0x6e, 0x62, 0x72, 0x75, 0x3b, 0x4f, 0x74, 0x75, 0x62, 0x72, 0x75, 0x3b, 0x4e, 0x75, 0x76, 0x65, 0x6e, 0x62,
+0x72, 0x75, 0x3b, 0x44, 0x69, 0x7a, 0x65, 0x6e, 0x62, 0x72, 0x75, 0x3b, 0x4a, 0x41, 0x4e, 0x3b, 0x46, 0x45, 0x42, 0x3b,
+0x4d, 0x41, 0x43, 0x3b, 0x128, 0x50, 0x55, 0x3b, 0x4d, 0x128, 0x128, 0x3b, 0x4e, 0x4a, 0x55, 0x3b, 0x4e, 0x4a, 0x52, 0x3b,
+0x41, 0x47, 0x41, 0x3b, 0x53, 0x50, 0x54, 0x3b, 0x4f, 0x4b, 0x54, 0x3b, 0x4e, 0x4f, 0x56, 0x3b, 0x44, 0x45, 0x43, 0x3b,
+0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x46, 0x65, 0x62, 0x75, 0x72, 0x75, 0x61, 0x72, 0x129, 0x3b, 0x4d, 0x61,
+0x63, 0x68, 0x69, 0x3b, 0x128, 0x70, 0x75, 0x72, 0x169, 0x3b, 0x4d, 0x129, 0x129, 0x3b, 0x4e, 0x6a, 0x75, 0x6e, 0x69, 0x3b,
+0x4e, 0x6a, 0x75, 0x72, 0x61, 0x129, 0x3b, 0x41, 0x67, 0x61, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d,
+0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x169, 0x62, 0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x69,
+0x63, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4a, 0x3b, 0x46, 0x3b, 0x4d, 0x3b, 0x128, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4e, 0x3b,
+0x41, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4d, 0x75, 0x6c, 0x3b, 0x4e, 0x67, 0x61, 0x3b, 0x4b, 0x69,
+0x70, 0x3b, 0x49, 0x77, 0x61, 0x3b, 0x4e, 0x67, 0x65, 0x3b, 0x57, 0x61, 0x6b, 0x3b, 0x52, 0x6f, 0x70, 0x3b, 0x4b, 0x6f,
+0x67, 0x3b, 0x42, 0x75, 0x72, 0x3b, 0x45, 0x70, 0x65, 0x3b, 0x54, 0x61, 0x69, 0x3b, 0x41, 0x65, 0x6e, 0x3b, 0x4d, 0x75,
+0x6c, 0x67, 0x75, 0x6c, 0x3b, 0x4e, 0x67, 0x27, 0x61, 0x74, 0x79, 0x61, 0x74, 0x6f, 0x3b, 0x4b, 0x69, 0x70, 0x74, 0x61,
+0x6d, 0x6f, 0x3b, 0x49, 0x77, 0x61, 0x74, 0x20, 0x6b, 0x75, 0x74, 0x3b, 0x4e, 0x67, 0x27, 0x65, 0x69, 0x79, 0x65, 0x74,
+0x3b, 0x57, 0x61, 0x6b, 0x69, 0x3b, 0x52, 0x6f, 0x70, 0x74, 0x75, 0x69, 0x3b, 0x4b, 0x69, 0x70, 0x6b, 0x6f, 0x67, 0x61,
+0x67, 0x61, 0x3b, 0x42, 0x75, 0x72, 0x65, 0x74, 0x3b, 0x45, 0x70, 0x65, 0x73, 0x6f, 0x3b, 0x4b, 0x69, 0x70, 0x73, 0x75,
+0x6e, 0x64, 0x65, 0x20, 0x6e, 0x65, 0x74, 0x61, 0x69, 0x3b, 0x4b, 0x69, 0x70, 0x73, 0x75, 0x6e, 0x64, 0x65, 0x20, 0x6e,
+0x65, 0x62, 0x6f, 0x20, 0x61, 0x65, 0x6e, 0x67, 0x3b, 0x4d, 0x3b, 0x4e, 0x3b, 0x4b, 0x3b, 0x49, 0x3b, 0x4e, 0x3b, 0x57,
+0x3b, 0x52, 0x3b, 0x4b, 0x3b, 0x42, 0x3b, 0x45, 0x3b, 0x4b, 0x3b, 0x4b, 0x3b, 0x1c3, 0x4b, 0x68, 0x61, 0x6e, 0x6e, 0x69,
+0x3b, 0x1c3, 0x4b, 0x68, 0x61, 0x6e, 0x1c0, 0x67, 0xf4, 0x61, 0x62, 0x3b, 0x1c0, 0x4b, 0x68, 0x75, 0x75, 0x1c1, 0x6b, 0x68,
+0xe2, 0x62, 0x3b, 0x1c3, 0x48, 0xf4, 0x61, 0x1c2, 0x6b, 0x68, 0x61, 0x69, 0x62, 0x3b, 0x1c3, 0x4b, 0x68, 0x61, 0x69, 0x74,
+0x73, 0xe2, 0x62, 0x3b, 0x47, 0x61, 0x6d, 0x61, 0x1c0, 0x61, 0x65, 0x62, 0x3b, 0x1c2, 0x4b, 0x68, 0x6f, 0x65, 0x73, 0x61,
+0x6f, 0x62, 0x3b, 0x41, 0x6f, 0x1c1, 0x6b, 0x68, 0x75, 0x75, 0x6d, 0xfb, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x54, 0x61,
+0x72, 0x61, 0x1c0, 0x6b, 0x68, 0x75, 0x75, 0x6d, 0xfb, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x1c2, 0x4e, 0xfb, 0x1c1, 0x6e,
+0xe2, 0x69, 0x73, 0x65, 0x62, 0x3b, 0x1c0, 0x48, 0x6f, 0x6f, 0x1c2, 0x67, 0x61, 0x65, 0x62, 0x3b, 0x48, 0xf4, 0x61, 0x73,
+0x6f, 0x72, 0x65, 0x1c1, 0x6b, 0x68, 0xe2, 0x62, 0x3b, 0x4a, 0x61, 0x6e, 0x2e, 0x3b, 0x46, 0xe4, 0x62, 0x2e, 0x3b, 0x4d,
+0x61, 0x72, 0x2e, 0x3b, 0x41, 0x70, 0x72, 0x2e, 0x3b, 0x4d, 0xe4, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x2e, 0x3b, 0x4a, 0x75,
+0x6c, 0x2e, 0x3b, 0x4f, 0x75, 0x67, 0x2e, 0x3b, 0x53, 0xe4, 0x70, 0x2e, 0x3b, 0x4f, 0x6b, 0x74, 0x2e, 0x3b, 0x4e, 0x6f,
+0x76, 0x2e, 0x3b, 0x44, 0x65, 0x7a, 0x2e, 0x3b, 0x4a, 0x61, 0x6e, 0x6e, 0x65, 0x77, 0x61, 0x3b, 0x46, 0xe4, 0x62, 0x72,
+0x6f, 0x77, 0x61, 0x3b, 0x4d, 0xe4, 0xe4, 0x7a, 0x3b, 0x41, 0x70, 0x72, 0x65, 0x6c, 0x6c, 0x3b, 0x4d, 0xe4, 0x69, 0x3b,
+0x4a, 0x75, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x75, 0x6c, 0x69, 0x3b, 0x4f, 0x75, 0x6a, 0x6f, 0xdf, 0x3b, 0x53, 0x65,
+0x70, 0x74, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x6f, 0x76,
+0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x65, 0x7a, 0xe4, 0x6d, 0x62, 0x65, 0x72, 0x3b, 0x44, 0x61, 0x6c, 0x3b, 0x41,
+0x72, 0xe1, 0x3b, 0x186, 0x25b, 0x6e, 0x3b, 0x44, 0x6f, 0x79, 0x3b, 0x4c, 0xe9, 0x70, 0x3b, 0x52, 0x6f, 0x6b, 0x3b, 0x53,
+0xe1, 0x73, 0x3b, 0x42, 0x254, 0x301, 0x72, 0x3b, 0x4b, 0xfa, 0x73, 0x3b, 0x47, 0xed, 0x73, 0x3b, 0x53, 0x68, 0x289, 0x301,
+0x3b, 0x4e, 0x74, 0x289, 0x301, 0x3b, 0x4f, 0x6c, 0x61, 0x64, 0x61, 0x6c, 0x289, 0x301, 0x3b, 0x41, 0x72, 0xe1, 0x74, 0x3b,
+0x186, 0x25b, 0x6e, 0x268, 0x301, 0x254, 0x268, 0x14b, 0x254, 0x6b, 0x3b, 0x4f, 0x6c, 0x6f, 0x64, 0x6f, 0x79, 0xed, 0xf3, 0x72,
+0xed, 0xea, 0x20, 0x69, 0x6e, 0x6b, 0xf3, 0x6b, 0xfa, 0xe2, 0x3b, 0x4f, 0x6c, 0x6f, 0x69, 0x6c, 0xe9, 0x70, 0x16b, 0x6e,
+0x79, 0x12b, 0x113, 0x20, 0x69, 0x6e, 0x6b, 0xf3, 0x6b, 0xfa, 0xe2, 0x3b, 0x4b, 0xfa, 0x6a, 0xfa, 0x254, 0x72, 0x254, 0x6b,
+0x3b, 0x4d, 0xf3, 0x72, 0x75, 0x73, 0xe1, 0x73, 0x69, 0x6e, 0x3b, 0x186, 0x6c, 0x254, 0x301, 0x268, 0x301, 0x62, 0x254, 0x301,
+0x72, 0xe1, 0x72, 0x25b, 0x3b, 0x4b, 0xfa, 0x73, 0x68, 0xee, 0x6e, 0x3b, 0x4f, 0x6c, 0x67, 0xed, 0x73, 0x61, 0x6e, 0x3b,
+0x50, 0x289, 0x73, 0x68, 0x289, 0x301, 0x6b, 0x61, 0x3b, 0x4e, 0x74, 0x289, 0x301, 0x14b, 0x289, 0x301, 0x73, 0x3b, 0x4a, 0x61,
+0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x70, 0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75,
+0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65, 0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f,
+0x76, 0x3b, 0x44, 0x65, 0x73, 0x3b, 0x4a, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x63, 0x3b, 0x41, 0x70,
+0x72, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x3b, 0x4a, 0x75, 0x6c, 0x3b, 0x41, 0x67, 0x6f, 0x3b, 0x53, 0x65,
+0x70, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f, 0x76, 0x3b, 0x44, 0x65, 0x63, 0x3b, 0x52, 0x61, 0x72, 0x3b, 0x4d, 0x75,
+0x6b, 0x3b, 0x4b, 0x77, 0x61, 0x3b, 0x44, 0x75, 0x6e, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x4d, 0x6f, 0x64, 0x3b, 0x4a, 0x6f,
+0x6c, 0x3b, 0x50, 0x65, 0x64, 0x3b, 0x53, 0x6f, 0x6b, 0x3b, 0x54, 0x69, 0x62, 0x3b, 0x4c, 0x61, 0x62, 0x3b, 0x50, 0x6f,
+0x6f, 0x3b, 0x4f, 0x72, 0x61, 0x72, 0x61, 0x3b, 0x4f, 0x6d, 0x75, 0x6b, 0x3b, 0x4f, 0x6b, 0x77, 0x61, 0x6d, 0x67, 0x27,
+0x3b, 0x4f, 0x64, 0x75, 0x6e, 0x67, 0x27, 0x65, 0x6c, 0x3b, 0x4f, 0x6d, 0x61, 0x72, 0x75, 0x6b, 0x3b, 0x4f, 0x6d, 0x6f,
+0x64, 0x6f, 0x6b, 0x27, 0x6b, 0x69, 0x6e, 0x67, 0x27, 0x6f, 0x6c, 0x3b, 0x4f, 0x6a, 0x6f, 0x6c, 0x61, 0x3b, 0x4f, 0x70,
+0x65, 0x64, 0x65, 0x6c, 0x3b, 0x4f, 0x73, 0x6f, 0x6b, 0x6f, 0x73, 0x6f, 0x6b, 0x6f, 0x6d, 0x61, 0x3b, 0x4f, 0x74, 0x69,
+0x62, 0x61, 0x72, 0x3b, 0x4f, 0x6c, 0x61, 0x62, 0x6f, 0x72, 0x3b, 0x4f, 0x70, 0x6f, 0x6f, 0x3b, 0x52, 0x3b, 0x4d, 0x3b,
+0x4b, 0x3b, 0x44, 0x3b, 0x4d, 0x3b, 0x4d, 0x3b, 0x4a, 0x3b, 0x50, 0x3b, 0x53, 0x3b, 0x54, 0x3b, 0x4c, 0x3b, 0x50, 0x3b,
+0x17d, 0x61, 0x6e, 0x3b, 0x46, 0x65, 0x65, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x41, 0x77, 0x69, 0x3b, 0x4d, 0x65, 0x3b, 0x17d,
+0x75, 0x77, 0x3b, 0x17d, 0x75, 0x79, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x6b, 0x3b, 0x4f, 0x6b, 0x74, 0x3b, 0x4e, 0x6f,
+0x6f, 0x3b, 0x44, 0x65, 0x65, 0x3b, 0x17d, 0x61, 0x6e, 0x77, 0x69, 0x79, 0x65, 0x3b, 0x46, 0x65, 0x65, 0x77, 0x69, 0x72,
+0x69, 0x79, 0x65, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x69, 0x3b, 0x41, 0x77, 0x69, 0x72, 0x69, 0x6c, 0x3b, 0x4d, 0x65, 0x3b,
+0x17d, 0x75, 0x77, 0x65, 0x14b, 0x3b, 0x17d, 0x75, 0x79, 0x79, 0x65, 0x3b, 0x55, 0x74, 0x3b, 0x53, 0x65, 0x6b, 0x74, 0x61,
+0x6e, 0x62, 0x75, 0x72, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x6f, 0x62, 0x75, 0x72, 0x3b, 0x4e, 0x6f, 0x6f, 0x77, 0x61, 0x6e,
+0x62, 0x75, 0x72, 0x3b, 0x44, 0x65, 0x65, 0x73, 0x61, 0x6e, 0x62, 0x75, 0x72, 0x3b, 0x17d, 0x3b, 0x46, 0x3b, 0x4d, 0x3b,
+0x41, 0x3b, 0x4d, 0x3b, 0x17d, 0x3b, 0x17d, 0x3b, 0x55, 0x3b, 0x53, 0x3b, 0x4f, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x44, 0x41,
+0x43, 0x3b, 0x44, 0x41, 0x52, 0x3b, 0x44, 0x41, 0x44, 0x3b, 0x44, 0x41, 0x4e, 0x3b, 0x44, 0x41, 0x48, 0x3b, 0x44, 0x41,
+0x55, 0x3b, 0x44, 0x41, 0x4f, 0x3b, 0x44, 0x41, 0x42, 0x3b, 0x44, 0x4f, 0x43, 0x3b, 0x44, 0x41, 0x50, 0x3b, 0x44, 0x47,
+0x49, 0x3b, 0x44, 0x41, 0x47, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x63, 0x68, 0x69, 0x65, 0x6c,
+0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d,
+0x61, 0x72, 0x20, 0x41, 0x64, 0x65, 0x6b, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x6e, 0x67, 0x27,
+0x77, 0x65, 0x6e, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x62, 0x69, 0x63, 0x68, 0x3b, 0x44, 0x77,
+0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x75, 0x63, 0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61,
+0x72, 0x20, 0x41, 0x62, 0x69, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x62,
+0x6f, 0x72, 0x6f, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x4f, 0x63, 0x68, 0x69, 0x6b, 0x6f, 0x3b, 0x44,
+0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x70, 0x61, 0x72, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20,
+0x67, 0x69, 0x20, 0x61, 0x63, 0x68, 0x69, 0x65, 0x6c, 0x3b, 0x44, 0x77, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x20, 0x41, 0x70,
+0x61, 0x72, 0x20, 0x67, 0x69, 0x20, 0x61, 0x72, 0x69, 0x79, 0x6f, 0x3b, 0x43, 0x3b, 0x52, 0x3b, 0x44, 0x3b, 0x4e, 0x3b,
+0x42, 0x3b, 0x55, 0x3b, 0x42, 0x3b, 0x42, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x43, 0x3b, 0x50, 0x3b, 0x59, 0x65, 0x6e, 0x3b,
+0x59, 0x65, 0x62, 0x3b, 0x4d, 0x61, 0x72, 0x3b, 0x49, 0x62, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x3b, 0x59, 0x75, 0x6e, 0x3b,
+0x59, 0x75, 0x6c, 0x3b, 0x194, 0x75, 0x63, 0x3b, 0x43, 0x75, 0x74, 0x3b, 0x4b, 0x1e6d, 0x75, 0x3b, 0x4e, 0x77, 0x61, 0x3b,
+0x44, 0x75, 0x6a, 0x3b, 0x59, 0x65, 0x6e, 0x6e, 0x61, 0x79, 0x65, 0x72, 0x3b, 0x59, 0x65, 0x62, 0x72, 0x61, 0x79, 0x65,
+0x72, 0x3b, 0x4d, 0x61, 0x72, 0x73, 0x3b, 0x49, 0x62, 0x72, 0x69, 0x72, 0x3b, 0x4d, 0x61, 0x79, 0x79, 0x75, 0x3b, 0x59,
+0x75, 0x6e, 0x79, 0x75, 0x3b, 0x59, 0x75, 0x6c, 0x79, 0x75, 0x7a, 0x3b, 0x194, 0x75, 0x63, 0x74, 0x3b, 0x43, 0x75, 0x74,
+0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x4b, 0x1e6d, 0x75, 0x62, 0x65, 0x72, 0x3b, 0x4e, 0x77, 0x61, 0x6e, 0x62, 0x69, 0x72,
+0x3b, 0x44, 0x75, 0x6a, 0x61, 0x6e, 0x62, 0x69, 0x72, 0x3b, 0x59, 0x3b, 0x59, 0x3b, 0x4d, 0x3b, 0x49, 0x3b, 0x4d, 0x3b,
+0x59, 0x3b, 0x59, 0x3b, 0x194, 0x3b, 0x43, 0x3b, 0x4b, 0x3b, 0x4e, 0x3b, 0x44, 0x3b, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x6c,
+0x69, 0x3b, 0x46, 0x65, 0x62, 0x6c, 0x75, 0x61, 0x6c, 0x69, 0x3b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x3b, 0x41, 0x70, 0x6c,
+0x69, 0x6c, 0x69, 0x3b, 0x4d, 0x65, 0x69, 0x3b, 0x4a, 0x75, 0x6e, 0x69, 0x3b, 0x4a, 0x75, 0x6c, 0x61, 0x69, 0x3b, 0x41,
+0x67, 0x6f, 0x73, 0x74, 0x69, 0x3b, 0x53, 0x65, 0x70, 0x74, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x4f, 0x6b, 0x74, 0x6f, 0x62,
+0x61, 0x3b, 0x4e, 0x6f, 0x76, 0x65, 0x6d, 0x62, 0x61, 0x3b, 0x44, 0x65, 0x73, 0x65, 0x6d, 0x62, 0x61, 0x3b
};
static const ushort days_data[] = {
@@ -3713,13 +3713,13 @@ static const ushort days_data[] = {
0x430, 0x432, 0x430, 0x430, 0x3b, 0x43c, 0x44f, 0x433, 0x43c, 0x430, 0x440, 0x3b, 0x43b, 0x445, 0x430, 0x433, 0x432, 0x430, 0x3b, 0x43f,
0x4af, 0x440, 0x44d, 0x432, 0x3b, 0x431, 0x430, 0x430, 0x441, 0x430, 0x43d, 0x3b, 0x431, 0x44f, 0x43c, 0x431, 0x430, 0x3b, 0x906, 0x907,
0x924, 0x3b, 0x938, 0x94b, 0x92e, 0x3b, 0x92e, 0x919, 0x94d, 0x917, 0x932, 0x3b, 0x92c, 0x941, 0x927, 0x3b, 0x92c, 0x93f, 0x939, 0x940,
-0x3b, 0x936, 0x941, 0x915, 0x94d, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x3b, 0x906, 0x907, 0x924, 0x935, 0x93e, 0x930, 0x3b, 0x938, 0x94b,
-0x92e, 0x935, 0x93e, 0x930, 0x3b, 0x92e, 0x919, 0x94d, 0x917, 0x932, 0x935, 0x93e, 0x930, 0x3b, 0x92c, 0x941, 0x927, 0x935, 0x93e, 0x930,
-0x3b, 0x92c, 0x93f, 0x939, 0x940, 0x935, 0x93e, 0x930, 0x3b, 0x936, 0x941, 0x915, 0x94d, 0x930, 0x935, 0x93e, 0x930, 0x3b, 0x936, 0x928,
-0x93f, 0x935, 0x93e, 0x930, 0x3b, 0x967, 0x3b, 0x968, 0x3b, 0x969, 0x3b, 0x96a, 0x3b, 0x96b, 0x3b, 0x96c, 0x3b, 0x96d, 0x3b, 0x906,
-0x907, 0x924, 0x92c, 0x93e, 0x930, 0x3b, 0x938, 0x94b, 0x92e, 0x92c, 0x93e, 0x930, 0x3b, 0x92e, 0x919, 0x94d, 0x917, 0x932, 0x92c, 0x93e,
-0x930, 0x3b, 0x92c, 0x941, 0x927, 0x92c, 0x93e, 0x930, 0x3b, 0x92c, 0x93f, 0x939, 0x940, 0x92c, 0x93e, 0x930, 0x3b, 0x936, 0x941, 0x915,
-0x94d, 0x930, 0x92c, 0x93e, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x92c, 0x93e, 0x930, 0x3b, 0x73, 0xf8, 0x2e, 0x3b, 0x6d, 0x61, 0x2e,
+0x3b, 0x936, 0x941, 0x915, 0x94d, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x3b, 0x906, 0x907, 0x924, 0x92c, 0x93e, 0x930, 0x3b, 0x938, 0x94b,
+0x92e, 0x92c, 0x93e, 0x930, 0x3b, 0x92e, 0x919, 0x94d, 0x917, 0x932, 0x92c, 0x93e, 0x930, 0x3b, 0x92c, 0x941, 0x927, 0x92c, 0x93e, 0x930,
+0x3b, 0x92c, 0x93f, 0x939, 0x940, 0x92c, 0x93e, 0x930, 0x3b, 0x936, 0x941, 0x915, 0x94d, 0x930, 0x92c, 0x93e, 0x930, 0x3b, 0x936, 0x928,
+0x93f, 0x92c, 0x93e, 0x930, 0x3b, 0x967, 0x3b, 0x968, 0x3b, 0x969, 0x3b, 0x96a, 0x3b, 0x96b, 0x3b, 0x96c, 0x3b, 0x96d, 0x3b, 0x906,
+0x907, 0x924, 0x935, 0x93e, 0x930, 0x3b, 0x938, 0x94b, 0x92e, 0x935, 0x93e, 0x930, 0x3b, 0x92e, 0x919, 0x94d, 0x917, 0x932, 0x935, 0x93e,
+0x930, 0x3b, 0x92c, 0x941, 0x927, 0x935, 0x93e, 0x930, 0x3b, 0x92c, 0x93f, 0x939, 0x940, 0x935, 0x93e, 0x930, 0x3b, 0x936, 0x941, 0x915,
+0x94d, 0x930, 0x935, 0x93e, 0x930, 0x3b, 0x936, 0x928, 0x93f, 0x935, 0x93e, 0x930, 0x3b, 0x73, 0xf8, 0x2e, 0x3b, 0x6d, 0x61, 0x2e,
0x3b, 0x74, 0x69, 0x2e, 0x3b, 0x6f, 0x6e, 0x2e, 0x3b, 0x74, 0x6f, 0x2e, 0x3b, 0x66, 0x72, 0x2e, 0x3b, 0x6c, 0xf8, 0x2e,
0x3b, 0x73, 0xf8, 0x6e, 0x2e, 0x3b, 0x6d, 0x61, 0x6e, 0x2e, 0x3b, 0x74, 0x69, 0x72, 0x2e, 0x3b, 0x6f, 0x6e, 0x73, 0x2e,
0x3b, 0x74, 0x6f, 0x72, 0x2e, 0x3b, 0x66, 0x72, 0x65, 0x2e, 0x3b, 0x6c, 0xf8, 0x72, 0x2e, 0x3b, 0x44, 0x69, 0x6d, 0x65,
@@ -4260,58 +4260,59 @@ static const ushort days_data[] = {
static const ushort am_data[] = {
0x41, 0x4d, 0x57, 0x44, 0x76, 0x6d, 0x2e, 0x50, 0x44, 0x1321, 0x12cb, 0x1275, 0x635, 0x531, 0x57c, 0x2024, 0x9aa, 0x9c2, 0x9f0, 0x9cd,
-0x9ac, 0x9be, 0x9b9, 0x9cd, 0x9a3, 0x9aa, 0x9c2, 0x9b0, 0x9cd, 0x9ac, 0x9be, 0x9b9, 0x9cd, 0x9a3, 0x434, 0x430, 0x20, 0x43f, 0x430, 0x43b,
-0x443, 0x434, 0x43d, 0x44f, 0x1796, 0x17d2, 0x179a, 0x17b9, 0x1780, 0x61, 0x2e, 0x6d, 0x2e, 0x64, 0x6f, 0x70, 0x2e, 0x66, 0x2e, 0x6d,
-0x2e, 0x65, 0x6e, 0x6e, 0x65, 0x20, 0x6b, 0x65, 0x73, 0x6b, 0x70, 0xe4, 0x65, 0x76, 0x61, 0x61, 0x70, 0x2e, 0x3c0, 0x2e,
-0x3bc, 0x2e, 0xaaa, 0xac2, 0xab0, 0xacd, 0xab5, 0x20, 0xaae, 0xaa7, 0xacd, 0xaaf, 0xabe, 0xab9, 0xacd, 0xaa8, 0x5dc, 0x5e4, 0x5e0, 0x5d4,
-0x5f4, 0x5e6, 0x92a, 0x942, 0x930, 0x94d, 0x935, 0x93e, 0x939, 0x94d, 0x928, 0x64, 0x65, 0x2e, 0x66, 0x2e, 0x68, 0x2e, 0x6d, 0x2e,
-0x5348, 0x524d, 0x61, 0x6d, 0xc624, 0xc804, 0x70, 0x72, 0x69, 0x65, 0x6b, 0x161, 0x70, 0x75, 0x73, 0x64, 0x69, 0x65, 0x6e, 0x101,
-0x70, 0x72, 0x69, 0x65, 0x161, 0x70, 0x69, 0x65, 0x74, 0x43f, 0x440, 0x435, 0x442, 0x43f, 0x43b, 0x430, 0x434, 0x43d, 0x435, 0xd30,
-0xd3e, 0xd35, 0xd3f, 0xd32, 0xd46, 0x51, 0x4e, 0x92a, 0x942, 0x930, 0x94d, 0x935, 0x20, 0x92e, 0x927, 0x94d, 0x92f, 0x93e, 0x928, 0x94d,
-0x939, 0x63a, 0x2e, 0x645, 0x2e, 0x642, 0x628, 0x644, 0x20, 0x627, 0x632, 0x20, 0x638, 0x647, 0x631, 0x41, 0x6e, 0x74, 0x65, 0x73,
-0x20, 0x64, 0x6f, 0x20, 0x6d, 0x65, 0x69, 0x6f, 0x2d, 0x64, 0x69, 0x61, 0xa38, 0xa35, 0xa47, 0xa30, 0xa47, 0x4e, 0x44, 0x43f,
-0x440, 0x435, 0x20, 0x43f, 0x43e, 0x434, 0x43d, 0x435, 0x70, 0x72, 0x65, 0x20, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0xdb4, 0xdd9, 0x2e,
-0xdc0, 0x2e, 0x64, 0x6f, 0x70, 0x6f, 0x6c, 0x75, 0x64, 0x6e, 0x69, 0x61, 0x73, 0x6e, 0x2e, 0x61, 0x73, 0x75, 0x62, 0x75,
-0x68, 0x69, 0x66, 0x6d, 0xe01, 0xe48, 0xe2d, 0xe19, 0xe40, 0xe17, 0xe35, 0xe48, 0xe22, 0xe07, 0xf66, 0xf94, 0xf0b, 0xf51, 0xfb2, 0xf7c,
-0xf0b, 0x1295, 0x1309, 0x1206, 0x20, 0x1230, 0x12d3, 0x1270, 0x434, 0x43f, 0x53, 0x41, 0xc0, 0xe1, 0x72, 0x1ecd, 0x300, 0x66, 0x6f, 0x72,
-0x6d, 0x69, 0x64, 0x64, 0x61, 0x67, 0x41, 0x4e, 0x92e, 0x2e, 0x92a, 0x942, 0x2e, 0x41, 0x2e, 0x4d, 0x2e, 0x128, 0x79, 0x61,
-0x6b, 0x77, 0x61, 0x6b, 0x79, 0x61, 0x76, 0x6f, 0x72, 0x6d, 0x2e, 0xa3b8, 0xa111, 0x4d, 0x61, 0x2f, 0x4d, 0x6f, 0x4c, 0x75,
-0x6d, 0x61, 0x20, 0x6c, 0x77, 0x61, 0x20, 0x4b, 0x73, 0x75, 0x62, 0x61, 0x6b, 0x61, 0x4b, 0x69, 0x72, 0x6f, 0x6b, 0x6f,
-0x54, 0x65, 0x73, 0x69, 0x72, 0x61, 0x6e, 0x6b, 0x61, 0x6e, 0x67, 0x27, 0x61, 0x6d, 0x61, 0x74, 0x69, 0x66, 0x61, 0x77,
-0x74, 0x6e, 0x20, 0x74, 0x75, 0x66, 0x61, 0x74, 0x70, 0x61, 0x6d, 0x69, 0x6c, 0x61, 0x75, 0x75, 0x74, 0x75, 0x6b, 0x6f,
-0x4b, 0x49, 0x13cc, 0x13be, 0x13b4, 0x4d, 0x75, 0x68, 0x69, 0x54, 0x4f, 0x4f, 0x75, 0x6c, 0x75, 0x63, 0x68, 0x65, 0x6c, 0x6f,
-0x52, 0x168, 0x42, 0x65, 0x65, 0x74, 0x1c1, 0x67, 0x6f, 0x61, 0x67, 0x61, 0x73, 0x190, 0x6e, 0x6b, 0x61, 0x6b, 0x25b, 0x6e,
-0x79, 0xe1, 0x4d, 0x75, 0x6e, 0x6b, 0x79, 0x6f, 0x69, 0x63, 0x68, 0x65, 0x68, 0x65, 0x61, 0x76, 0x6f, 0x54, 0x61, 0x70,
-0x61, 0x72, 0x61, 0x63, 0x68, 0x75, 0x41, 0x64, 0x64, 0x75, 0x68, 0x61, 0x4f, 0x44, 0x5a, 0x64, 0x61, 0x74, 0x20, 0x61,
-0x7a, 0x61, 0x6c, 0x6d, 0x61, 0x6b, 0x65, 0x6f
+0x9ac, 0x9be, 0x9b9, 0x9cd, 0x9a3, 0x9aa, 0x9c2, 0x9b0, 0x9cd, 0x9ac, 0x9be, 0x9b9, 0x9cd, 0x9a3, 0x43f, 0x440, 0x2e, 0x20, 0x43e, 0x431,
+0x2e, 0x434, 0x430, 0x20, 0x43f, 0x430, 0x43b, 0x443, 0x434, 0x43d, 0x44f, 0x1796, 0x17d2, 0x179a, 0x17b9, 0x1780, 0x61, 0x2e, 0x6d, 0x2e,
+0x4e0a, 0x5348, 0x64, 0x6f, 0x70, 0x2e, 0x66, 0x2e, 0x6d, 0x2e, 0x65, 0x6e, 0x6e, 0x65, 0x20, 0x6b, 0x65, 0x73, 0x6b, 0x70,
+0xe4, 0x65, 0x76, 0x61, 0x61, 0x70, 0x2e, 0x76, 0x6f, 0x72, 0x6d, 0x2e, 0x3c0, 0x2e, 0x3bc, 0x2e, 0xaaa, 0xac2, 0xab0, 0xacd,
+0xab5, 0x20, 0xaae, 0xaa7, 0xacd, 0xaaf, 0xabe, 0xab9, 0xacd, 0xaa8, 0x5dc, 0x5e4, 0x5e0, 0x5d4, 0x5f4, 0x5e6, 0x92a, 0x942, 0x930, 0x94d,
+0x935, 0x93e, 0x939, 0x94d, 0x928, 0x64, 0x65, 0x2e, 0x66, 0x2e, 0x68, 0x2e, 0x6d, 0x2e, 0x5348, 0x524d, 0x61, 0x6d, 0xc624, 0xc804,
+0x70, 0x72, 0x69, 0x65, 0x6b, 0x161, 0x70, 0x75, 0x73, 0x64, 0x69, 0x65, 0x6e, 0x101, 0x70, 0x72, 0x69, 0x65, 0x161, 0x70,
+0x69, 0x65, 0x74, 0x43f, 0x440, 0x435, 0x442, 0x43f, 0x43b, 0x430, 0x434, 0x43d, 0x435, 0xd30, 0xd3e, 0xd35, 0xd3f, 0xd32, 0xd46, 0x51,
+0x4e, 0x92a, 0x942, 0x930, 0x94d, 0x935, 0x20, 0x92e, 0x927, 0x94d, 0x92f, 0x93e, 0x928, 0x94d, 0x939, 0x63a, 0x2e, 0x645, 0x2e, 0x642,
+0x628, 0x644, 0x20, 0x627, 0x632, 0x20, 0x638, 0x647, 0x631, 0x41, 0x6e, 0x74, 0x65, 0x73, 0x20, 0x64, 0x6f, 0x20, 0x6d, 0x65,
+0x69, 0x6f, 0x2d, 0x64, 0x69, 0x61, 0xa38, 0xa35, 0xa47, 0xa30, 0xa47, 0x4e, 0x44, 0x43f, 0x440, 0x435, 0x20, 0x43f, 0x43e, 0x434,
+0x43d, 0x435, 0x70, 0x72, 0x65, 0x20, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0xdb4, 0xdd9, 0x2e, 0xdc0, 0x2e, 0x64, 0x6f, 0x70, 0x6f,
+0x6c, 0x75, 0x64, 0x6e, 0x69, 0x61, 0x73, 0x6e, 0x2e, 0x61, 0x73, 0x75, 0x62, 0x75, 0x68, 0x69, 0x66, 0x6d, 0xc09, 0xe01,
+0xe48, 0xe2d, 0xe19, 0xe40, 0xe17, 0xe35, 0xe48, 0xe22, 0xe07, 0xf66, 0xf94, 0xf0b, 0xf51, 0xfb2, 0xf7c, 0xf0b, 0x1295, 0x1309, 0x1206, 0x20,
+0x1230, 0x12d3, 0x1270, 0x434, 0x43f, 0x53, 0x41, 0xc0, 0xe1, 0x72, 0x1ecd, 0x300, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x64, 0x64, 0x61,
+0x67, 0x41, 0x4e, 0x92e, 0x2e, 0x92a, 0x942, 0x2e, 0x41, 0x2e, 0x4d, 0x2e, 0x128, 0x79, 0x61, 0x6b, 0x77, 0x61, 0x6b, 0x79,
+0x61, 0xa3b8, 0xa111, 0x4d, 0x61, 0x2f, 0x4d, 0x6f, 0x4c, 0x75, 0x6d, 0x61, 0x20, 0x6c, 0x77, 0x61, 0x20, 0x4b, 0x73, 0x75,
+0x62, 0x61, 0x6b, 0x61, 0x4b, 0x69, 0x72, 0x6f, 0x6b, 0x6f, 0x54, 0x65, 0x73, 0x69, 0x72, 0x61, 0x6e, 0x6b, 0x61, 0x6e,
+0x67, 0x27, 0x61, 0x6d, 0x61, 0x74, 0x69, 0x66, 0x61, 0x77, 0x74, 0x6e, 0x20, 0x74, 0x75, 0x66, 0x61, 0x74, 0x70, 0x61,
+0x6d, 0x69, 0x6c, 0x61, 0x75, 0x75, 0x74, 0x75, 0x6b, 0x6f, 0x4b, 0x49, 0x13cc, 0x13be, 0x13b4, 0x4d, 0x75, 0x68, 0x69, 0x54,
+0x4f, 0x4f, 0x75, 0x6c, 0x75, 0x63, 0x68, 0x65, 0x6c, 0x6f, 0x52, 0x168, 0x42, 0x65, 0x65, 0x74, 0x1c1, 0x67, 0x6f, 0x61,
+0x67, 0x61, 0x73, 0x190, 0x6e, 0x6b, 0x61, 0x6b, 0x25b, 0x6e, 0x79, 0xe1, 0x4d, 0x75, 0x6e, 0x6b, 0x79, 0x6f, 0x69, 0x63,
+0x68, 0x65, 0x68, 0x65, 0x61, 0x76, 0x6f, 0x54, 0x61, 0x70, 0x61, 0x72, 0x61, 0x63, 0x68, 0x75, 0x41, 0x64, 0x64, 0x75,
+0x68, 0x61, 0x4f, 0x44, 0x5a, 0x64, 0x61, 0x74, 0x20, 0x61, 0x7a, 0x61, 0x6c, 0x6d, 0x61, 0x6b, 0x65, 0x6f
};
static const ushort pm_data[] = {
0x50, 0x4d, 0x57, 0x42, 0x6e, 0x6d, 0x2e, 0x4d, 0x44, 0x12a8, 0x1233, 0x12d3, 0x1275, 0x645, 0x53f, 0x565, 0x2024, 0x985, 0x9aa, 0x9f0,
-0x9be, 0x9b9, 0x9cd, 0x9a3, 0x985, 0x9aa, 0x9b0, 0x9be, 0x9b9, 0x9cd, 0x9a3, 0x43f, 0x430, 0x441, 0x43b, 0x44f, 0x20, 0x43f, 0x430, 0x43b,
-0x443, 0x434, 0x43d, 0x44f, 0x179b, 0x17d2, 0x1784, 0x17b6, 0x1785, 0x70, 0x2e, 0x6d, 0x2e, 0x6f, 0x64, 0x70, 0x2e, 0x65, 0x2e, 0x6d,
-0x2e, 0x70, 0xe4, 0x72, 0x61, 0x73, 0x74, 0x20, 0x6b, 0x65, 0x73, 0x6b, 0x70, 0xe4, 0x65, 0x76, 0x61, 0x69, 0x70, 0x2e,
-0x3bc, 0x2e, 0x3bc, 0x2e, 0xa89, 0xaa4, 0xacd, 0xaa4, 0xab0, 0x20, 0xaae, 0xaa7, 0xacd, 0xaaf, 0xabe, 0xab9, 0xacd, 0xaa8, 0x5d0, 0x5d7,
-0x5d4, 0x5f4, 0x5e6, 0x905, 0x92a, 0x930, 0x93e, 0x939, 0x94d, 0x928, 0x64, 0x75, 0x2e, 0x65, 0x2e, 0x68, 0x2e, 0x70, 0x2e, 0x5348,
-0x5f8c, 0x70, 0x6d, 0xc624, 0xd6c4, 0x70, 0x113, 0x63, 0x70, 0x75, 0x73, 0x64, 0x69, 0x65, 0x6e, 0x101, 0x70, 0x6f, 0x70, 0x69,
-0x65, 0x74, 0x43f, 0x43e, 0x43f, 0x43b, 0x430, 0x434, 0x43d, 0x435, 0xd35, 0xd48, 0xd15, 0xd41, 0xd28, 0xd4d, 0xd28, 0xd47, 0xd30, 0xd02,
-0x57, 0x4e, 0x909, 0x924, 0x94d, 0x924, 0x930, 0x20, 0x92e, 0x927, 0x94d, 0x92f, 0x93e, 0x928, 0x94d, 0x939, 0x63a, 0x2e, 0x648, 0x2e,
-0x628, 0x639, 0x62f, 0x20, 0x627, 0x632, 0x20, 0x638, 0x647, 0x631, 0x44, 0x65, 0x70, 0x6f, 0x69, 0x73, 0x20, 0x64, 0x6f, 0x20,
-0x6d, 0x65, 0x69, 0x6f, 0x2d, 0x64, 0x69, 0x61, 0xa38, 0xa3c, 0xa3e, 0xa2e, 0x73, 0x6d, 0x4c, 0x4b, 0x43f, 0x43e, 0x43f, 0x43e,
-0x434, 0x43d, 0x435, 0x70, 0x6f, 0x70, 0x6f, 0x64, 0x6e, 0x65, 0xdb4, 0x2e, 0xdc0, 0x2e, 0x70, 0x6f, 0x70, 0x6f, 0x6c, 0x75,
-0x64, 0x6e, 0xed, 0x70, 0x6f, 0x70, 0x2e, 0x67, 0x6e, 0x2e, 0x61, 0x6c, 0x61, 0x73, 0x69, 0x72, 0x69, 0x65, 0x6d, 0xe2b,
-0xe25, 0xe31, 0xe07, 0xe40, 0xe17, 0xe35, 0xe48, 0xe22, 0xe07, 0xf55, 0xfb1, 0xf72, 0xf0b, 0xf51, 0xfb2, 0xf7c, 0xf0b, 0x12f5, 0x1215, 0x122d,
-0x20, 0x1230, 0x12d3, 0x1275, 0x43f, 0x43f, 0x43, 0x48, 0x1ecc, 0x300, 0x73, 0xe1, 0x6e, 0x65, 0x74, 0x74, 0x65, 0x72, 0x6d, 0x69,
-0x64, 0x64, 0x61, 0x67, 0x45, 0x57, 0x92e, 0x2e, 0x928, 0x902, 0x2e, 0x50, 0x2e, 0x4d, 0x2e, 0x128, 0x79, 0x61, 0x77, 0x129,
-0x6f, 0x6f, 0x6e, 0x61, 0x6d, 0x2e, 0xa06f, 0xa2d2, 0x4d, 0x61, 0x6d, 0x62, 0x69, 0x61, 0x2f, 0x4d, 0x6f, 0x67, 0x6c, 0x75,
-0x6d, 0x61, 0x20, 0x6c, 0x77, 0x61, 0x20, 0x70, 0x6b, 0x69, 0x6b, 0x69, 0x69, 0x257, 0x65, 0x48, 0x77, 0x61, 0x129, 0x2d,
-0x69, 0x6e, 0x129, 0x54, 0x65, 0x69, 0x70, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x6f, 0x74, 0x6f, 0x74, 0x61, 0x64, 0x67, 0x67,
-0x2b7, 0x61, 0x74, 0x6e, 0x20, 0x74, 0x6d, 0x65, 0x64, 0x64, 0x69, 0x74, 0x70, 0x61, 0x6d, 0x75, 0x6e, 0x79, 0x69, 0x6b,
-0x79, 0x69, 0x75, 0x6b, 0x6f, 0x6e, 0x79, 0x69, 0x55, 0x54, 0x13d2, 0x13af, 0x13f1, 0x13a2, 0x13d7, 0x13e2, 0x43, 0x68, 0x69, 0x6c,
-0x6f, 0x4d, 0x55, 0x55, 0x61, 0x6b, 0x61, 0x73, 0x75, 0x62, 0x61, 0x168, 0x47, 0x4b, 0x65, 0x6d, 0x6f, 0x1c3, 0x75, 0x69,
-0x61, 0x73, 0x190, 0x6e, 0x64, 0xe1, 0x6d, 0xe2, 0x45, 0x69, 0x67, 0x75, 0x6c, 0x6f, 0x69, 0x63, 0x68, 0x61, 0x6d, 0x74,
-0x68, 0x69, 0x45, 0x62, 0x6f, 0x6e, 0x67, 0x69, 0x41, 0x6c, 0x75, 0x75, 0x6c, 0x61, 0x4f, 0x54, 0x1e0c, 0x65, 0x66, 0x66,
-0x69, 0x72, 0x20, 0x61, 0x7a, 0x61, 0x6e, 0x79, 0x69, 0x61, 0x67, 0x68, 0x75, 0x6f
+0x9be, 0x9b9, 0x9cd, 0x9a3, 0x985, 0x9aa, 0x9b0, 0x9be, 0x9b9, 0x9cd, 0x9a3, 0x441, 0x43b, 0x2e, 0x20, 0x43e, 0x431, 0x2e, 0x43f, 0x430,
+0x441, 0x43b, 0x44f, 0x20, 0x43f, 0x430, 0x43b, 0x443, 0x434, 0x43d, 0x44f, 0x179b, 0x17d2, 0x1784, 0x17b6, 0x1785, 0x70, 0x2e, 0x6d, 0x2e,
+0x4e0b, 0x5348, 0x6f, 0x64, 0x70, 0x2e, 0x65, 0x2e, 0x6d, 0x2e, 0x70, 0xe4, 0x72, 0x61, 0x73, 0x74, 0x20, 0x6b, 0x65, 0x73,
+0x6b, 0x70, 0xe4, 0x65, 0x76, 0x61, 0x69, 0x70, 0x2e, 0x6e, 0x61, 0x63, 0x68, 0x6d, 0x2e, 0x3bc, 0x2e, 0x3bc, 0x2e, 0xa89,
+0xaa4, 0xacd, 0xaa4, 0xab0, 0x20, 0xaae, 0xaa7, 0xacd, 0xaaf, 0xabe, 0xab9, 0xacd, 0xaa8, 0x5d0, 0x5d7, 0x5d4, 0x5f4, 0x5e6, 0x905, 0x92a,
+0x930, 0x93e, 0x939, 0x94d, 0x928, 0x64, 0x75, 0x2e, 0x65, 0x2e, 0x68, 0x2e, 0x70, 0x2e, 0x5348, 0x5f8c, 0x70, 0x6d, 0xc624, 0xd6c4,
+0x70, 0x113, 0x63, 0x70, 0x75, 0x73, 0x64, 0x69, 0x65, 0x6e, 0x101, 0x70, 0x6f, 0x70, 0x69, 0x65, 0x74, 0x43f, 0x43e, 0x43f,
+0x43b, 0x430, 0x434, 0x43d, 0x435, 0xd35, 0xd48, 0xd15, 0xd41, 0xd28, 0xd4d, 0xd28, 0xd47, 0xd30, 0xd02, 0x57, 0x4e, 0x909, 0x924, 0x94d,
+0x924, 0x930, 0x20, 0x92e, 0x927, 0x94d, 0x92f, 0x93e, 0x928, 0x94d, 0x939, 0x63a, 0x2e, 0x648, 0x2e, 0x628, 0x639, 0x62f, 0x20, 0x627,
+0x632, 0x20, 0x638, 0x647, 0x631, 0x44, 0x65, 0x70, 0x6f, 0x69, 0x73, 0x20, 0x64, 0x6f, 0x20, 0x6d, 0x65, 0x69, 0x6f, 0x2d,
+0x64, 0x69, 0x61, 0xa38, 0xa3c, 0xa3e, 0xa2e, 0x73, 0x6d, 0x4c, 0x4b, 0x43f, 0x43e, 0x43f, 0x43e, 0x434, 0x43d, 0x435, 0x70, 0x6f,
+0x70, 0x6f, 0x64, 0x6e, 0x65, 0xdb4, 0x2e, 0xdc0, 0x2e, 0x70, 0x6f, 0x70, 0x6f, 0x6c, 0x75, 0x64, 0x6e, 0xed, 0x70, 0x6f,
+0x70, 0x2e, 0x67, 0x6e, 0x2e, 0x61, 0x6c, 0x61, 0x73, 0x69, 0x72, 0x69, 0x65, 0x6d, 0xc38, 0xc3e, 0xe2b, 0xe25, 0xe31, 0xe07,
+0xe40, 0xe17, 0xe35, 0xe48, 0xe22, 0xe07, 0xf55, 0xfb1, 0xf72, 0xf0b, 0xf51, 0xfb2, 0xf7c, 0xf0b, 0x12f5, 0x1215, 0x122d, 0x20, 0x1230, 0x12d3,
+0x1275, 0x43f, 0x43f, 0x43, 0x48, 0x1ecc, 0x300, 0x73, 0xe1, 0x6e, 0x65, 0x74, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x64, 0x64, 0x61,
+0x67, 0x45, 0x57, 0x92e, 0x2e, 0x928, 0x902, 0x2e, 0x50, 0x2e, 0x4d, 0x2e, 0x128, 0x79, 0x61, 0x77, 0x129, 0x6f, 0x6f, 0x6e,
+0x61, 0x6d, 0x2e, 0xa06f, 0xa2d2, 0x4d, 0x61, 0x6d, 0x62, 0x69, 0x61, 0x2f, 0x4d, 0x6f, 0x67, 0x6c, 0x75, 0x6d, 0x61, 0x20,
+0x6c, 0x77, 0x61, 0x20, 0x70, 0x6b, 0x69, 0x6b, 0x69, 0x69, 0x257, 0x65, 0x48, 0x77, 0x61, 0x129, 0x2d, 0x69, 0x6e, 0x129,
+0x54, 0x65, 0x69, 0x70, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x6f, 0x74, 0x6f, 0x74, 0x61, 0x64, 0x67, 0x67, 0x2b7, 0x61, 0x74,
+0x6e, 0x20, 0x74, 0x6d, 0x65, 0x64, 0x64, 0x69, 0x74, 0x70, 0x61, 0x6d, 0x75, 0x6e, 0x79, 0x69, 0x6b, 0x79, 0x69, 0x75,
+0x6b, 0x6f, 0x6e, 0x79, 0x69, 0x55, 0x54, 0x13d2, 0x13af, 0x13f1, 0x13a2, 0x13d7, 0x13e2, 0x43, 0x68, 0x69, 0x6c, 0x6f, 0x4d, 0x55,
+0x55, 0x61, 0x6b, 0x61, 0x73, 0x75, 0x62, 0x61, 0x168, 0x47, 0x4b, 0x65, 0x6d, 0x6f, 0x1c3, 0x75, 0x69, 0x61, 0x73, 0x190,
+0x6e, 0x64, 0xe1, 0x6d, 0xe2, 0x45, 0x69, 0x67, 0x75, 0x6c, 0x6f, 0x69, 0x63, 0x68, 0x61, 0x6d, 0x74, 0x68, 0x69, 0x45,
+0x62, 0x6f, 0x6e, 0x67, 0x69, 0x41, 0x6c, 0x75, 0x75, 0x6c, 0x61, 0x4f, 0x54, 0x1e0c, 0x65, 0x66, 0x66, 0x69, 0x72, 0x20,
+0x61, 0x7a, 0x61, 0x6e, 0x79, 0x69, 0x61, 0x67, 0x68, 0x75, 0x6f
};
static const char language_name_list[] =
@@ -4997,6 +4998,7 @@ static const char country_name_list[] =
"Serbia\0"
"Saint Barthelemy\0"
"Saint Martin\0"
+"LatinAmericaAndTheCaribbean\0"
;
static const quint16 country_name_index[] = {
@@ -5246,6 +5248,7 @@ static const quint16 country_name_index[] = {
2606, // Serbia
2613, // Saint Barthelemy
2630, // Saint Martin
+ 2643, // LatinAmericaAndTheCaribbean
};
static const unsigned char language_code_list[] =
@@ -5467,252 +5470,253 @@ static const unsigned char language_code_list[] =
;
static const unsigned char country_code_list[] =
-" " // AnyCountry
-"AF" // Afghanistan
-"AL" // Albania
-"DZ" // Algeria
-"AS" // AmericanSamoa
-"AD" // Andorra
-"AO" // Angola
-"AI" // Anguilla
-"AQ" // Antarctica
-"AG" // AntiguaAndBarbuda
-"AR" // Argentina
-"AM" // Armenia
-"AW" // Aruba
-"AU" // Australia
-"AT" // Austria
-"AZ" // Azerbaijan
-"BS" // Bahamas
-"BH" // Bahrain
-"BD" // Bangladesh
-"BB" // Barbados
-"BY" // Belarus
-"BE" // Belgium
-"BZ" // Belize
-"BJ" // Benin
-"BM" // Bermuda
-"BT" // Bhutan
-"BO" // Bolivia
-"BA" // BosniaAndHerzegowina
-"BW" // Botswana
-"BV" // BouvetIsland
-"BR" // Brazil
-"IO" // BritishIndianOceanTerritory
-"BN" // BruneiDarussalam
-"BG" // Bulgaria
-"BF" // BurkinaFaso
-"BI" // Burundi
-"KH" // Cambodia
-"CM" // Cameroon
-"CA" // Canada
-"CV" // CapeVerde
-"KY" // CaymanIslands
-"CF" // CentralAfricanRepublic
-"TD" // Chad
-"CL" // Chile
-"CN" // China
-"CX" // ChristmasIsland
-"CC" // CocosIslands
-"CO" // Colombia
-"KM" // Comoros
-"CD" // DemocraticRepublicOfCongo
-"CG" // PeoplesRepublicOfCongo
-"CK" // CookIslands
-"CR" // CostaRica
-"CI" // IvoryCoast
-"HR" // Croatia
-"CU" // Cuba
-"CY" // Cyprus
-"CZ" // CzechRepublic
-"DK" // Denmark
-"DJ" // Djibouti
-"DM" // Dominica
-"DO" // DominicanRepublic
-"TL" // EastTimor
-"EC" // Ecuador
-"EG" // Egypt
-"SV" // ElSalvador
-"GQ" // EquatorialGuinea
-"ER" // Eritrea
-"EE" // Estonia
-"ET" // Ethiopia
-"FK" // FalklandIslands
-"FO" // FaroeIslands
-"FJ" // Fiji
-"FI" // Finland
-"FR" // France
-"FX" // MetropolitanFrance
-"GF" // FrenchGuiana
-"PF" // FrenchPolynesia
-"TF" // FrenchSouthernTerritories
-"GA" // Gabon
-"GM" // Gambia
-"GE" // Georgia
-"DE" // Germany
-"GH" // Ghana
-"GI" // Gibraltar
-"GR" // Greece
-"GL" // Greenland
-"GD" // Grenada
-"GP" // Guadeloupe
-"GU" // Guam
-"GT" // Guatemala
-"GN" // Guinea
-"GW" // GuineaBissau
-"GY" // Guyana
-"HT" // Haiti
-"HM" // HeardAndMcDonaldIslands
-"HN" // Honduras
-"HK" // HongKong
-"HU" // Hungary
-"IS" // Iceland
-"IN" // India
-"ID" // Indonesia
-"IR" // Iran
-"IQ" // Iraq
-"IE" // Ireland
-"IL" // Israel
-"IT" // Italy
-"JM" // Jamaica
-"JP" // Japan
-"JO" // Jordan
-"KZ" // Kazakhstan
-"KE" // Kenya
-"KI" // Kiribati
-"KP" // DemocraticRepublicOfKorea
-"KR" // RepublicOfKorea
-"KW" // Kuwait
-"KG" // Kyrgyzstan
-"LA" // Lao
-"LV" // Latvia
-"LB" // Lebanon
-"LS" // Lesotho
-"LR" // Liberia
-"LY" // LibyanArabJamahiriya
-"LI" // Liechtenstein
-"LT" // Lithuania
-"LU" // Luxembourg
-"MO" // Macau
-"MK" // Macedonia
-"MG" // Madagascar
-"MW" // Malawi
-"MY" // Malaysia
-"MV" // Maldives
-"ML" // Mali
-"MT" // Malta
-"MH" // MarshallIslands
-"MQ" // Martinique
-"MR" // Mauritania
-"MU" // Mauritius
-"YT" // Mayotte
-"MX" // Mexico
-"FM" // Micronesia
-"MD" // Moldova
-"MC" // Monaco
-"MN" // Mongolia
-"MS" // Montserrat
-"MA" // Morocco
-"MZ" // Mozambique
-"MM" // Myanmar
-"NA" // Namibia
-"NR" // Nauru
-"NP" // Nepal
-"NL" // Netherlands
-"AN" // NetherlandsAntilles
-"NC" // NewCaledonia
-"NZ" // NewZealand
-"NI" // Nicaragua
-"NE" // Niger
-"NG" // Nigeria
-"NU" // Niue
-"NF" // NorfolkIsland
-"MP" // NorthernMarianaIslands
-"NO" // Norway
-"OM" // Oman
-"PK" // Pakistan
-"PW" // Palau
-"PS" // PalestinianTerritory
-"PA" // Panama
-"PG" // PapuaNewGuinea
-"PY" // Paraguay
-"PE" // Peru
-"PH" // Philippines
-"PN" // Pitcairn
-"PL" // Poland
-"PT" // Portugal
-"PR" // PuertoRico
-"QA" // Qatar
-"RE" // Reunion
-"RO" // Romania
-"RU" // RussianFederation
-"RW" // Rwanda
-"KN" // SaintKittsAndNevis
-"LC" // StLucia
-"VC" // StVincentAndTheGrenadines
-"WS" // Samoa
-"SM" // SanMarino
-"ST" // SaoTomeAndPrincipe
-"SA" // SaudiArabia
-"SN" // Senegal
-"SC" // Seychelles
-"SL" // SierraLeone
-"SG" // Singapore
-"SK" // Slovakia
-"SI" // Slovenia
-"SB" // SolomonIslands
-"SO" // Somalia
-"ZA" // SouthAfrica
-"GS" // SouthGeorgiaAndTheSouthSandwichIslands
-"ES" // Spain
-"LK" // SriLanka
-"SH" // StHelena
-"PM" // StPierreAndMiquelon
-"SD" // Sudan
-"SR" // Suriname
-"SJ" // SvalbardAndJanMayenIslands
-"SZ" // Swaziland
-"SE" // Sweden
-"CH" // Switzerland
-"SY" // SyrianArabRepublic
-"TW" // Taiwan
-"TJ" // Tajikistan
-"TZ" // Tanzania
-"TH" // Thailand
-"TG" // Togo
-"TK" // Tokelau
-"TO" // Tonga
-"TT" // TrinidadAndTobago
-"TN" // Tunisia
-"TR" // Turkey
-"TM" // Turkmenistan
-"TC" // TurksAndCaicosIslands
-"TV" // Tuvalu
-"UG" // Uganda
-"UA" // Ukraine
-"AE" // UnitedArabEmirates
-"GB" // UnitedKingdom
-"US" // UnitedStates
-"UM" // UnitedStatesMinorOutlyingIslands
-"UY" // Uruguay
-"UZ" // Uzbekistan
-"VU" // Vanuatu
-"VA" // VaticanCityState
-"VE" // Venezuela
-"VN" // VietNam
-"VG" // BritishVirginIslands
-"VI" // USVirginIslands
-"WF" // WallisAndFutunaIslands
-"EH" // WesternSahara
-"YE" // Yemen
-"YU" // Yugoslavia
-"ZM" // Zambia
-"ZW" // Zimbabwe
-"CS" // SerbiaAndMontenegro
-"ME" // Montenegro
-"RS" // Serbia
-"BL" // Saint Barthelemy
-"MF" // Saint Martin
+" \0" // AnyCountry
+"AF\0" // Afghanistan
+"AL\0" // Albania
+"DZ\0" // Algeria
+"AS\0" // AmericanSamoa
+"AD\0" // Andorra
+"AO\0" // Angola
+"AI\0" // Anguilla
+"AQ\0" // Antarctica
+"AG\0" // AntiguaAndBarbuda
+"AR\0" // Argentina
+"AM\0" // Armenia
+"AW\0" // Aruba
+"AU\0" // Australia
+"AT\0" // Austria
+"AZ\0" // Azerbaijan
+"BS\0" // Bahamas
+"BH\0" // Bahrain
+"BD\0" // Bangladesh
+"BB\0" // Barbados
+"BY\0" // Belarus
+"BE\0" // Belgium
+"BZ\0" // Belize
+"BJ\0" // Benin
+"BM\0" // Bermuda
+"BT\0" // Bhutan
+"BO\0" // Bolivia
+"BA\0" // BosniaAndHerzegowina
+"BW\0" // Botswana
+"BV\0" // BouvetIsland
+"BR\0" // Brazil
+"IO\0" // BritishIndianOceanTerritory
+"BN\0" // BruneiDarussalam
+"BG\0" // Bulgaria
+"BF\0" // BurkinaFaso
+"BI\0" // Burundi
+"KH\0" // Cambodia
+"CM\0" // Cameroon
+"CA\0" // Canada
+"CV\0" // CapeVerde
+"KY\0" // CaymanIslands
+"CF\0" // CentralAfricanRepublic
+"TD\0" // Chad
+"CL\0" // Chile
+"CN\0" // China
+"CX\0" // ChristmasIsland
+"CC\0" // CocosIslands
+"CO\0" // Colombia
+"KM\0" // Comoros
+"CD\0" // DemocraticRepublicOfCongo
+"CG\0" // PeoplesRepublicOfCongo
+"CK\0" // CookIslands
+"CR\0" // CostaRica
+"CI\0" // IvoryCoast
+"HR\0" // Croatia
+"CU\0" // Cuba
+"CY\0" // Cyprus
+"CZ\0" // CzechRepublic
+"DK\0" // Denmark
+"DJ\0" // Djibouti
+"DM\0" // Dominica
+"DO\0" // DominicanRepublic
+"TL\0" // EastTimor
+"EC\0" // Ecuador
+"EG\0" // Egypt
+"SV\0" // ElSalvador
+"GQ\0" // EquatorialGuinea
+"ER\0" // Eritrea
+"EE\0" // Estonia
+"ET\0" // Ethiopia
+"FK\0" // FalklandIslands
+"FO\0" // FaroeIslands
+"FJ\0" // Fiji
+"FI\0" // Finland
+"FR\0" // France
+"FX\0" // MetropolitanFrance
+"GF\0" // FrenchGuiana
+"PF\0" // FrenchPolynesia
+"TF\0" // FrenchSouthernTerritories
+"GA\0" // Gabon
+"GM\0" // Gambia
+"GE\0" // Georgia
+"DE\0" // Germany
+"GH\0" // Ghana
+"GI\0" // Gibraltar
+"GR\0" // Greece
+"GL\0" // Greenland
+"GD\0" // Grenada
+"GP\0" // Guadeloupe
+"GU\0" // Guam
+"GT\0" // Guatemala
+"GN\0" // Guinea
+"GW\0" // GuineaBissau
+"GY\0" // Guyana
+"HT\0" // Haiti
+"HM\0" // HeardAndMcDonaldIslands
+"HN\0" // Honduras
+"HK\0" // HongKong
+"HU\0" // Hungary
+"IS\0" // Iceland
+"IN\0" // India
+"ID\0" // Indonesia
+"IR\0" // Iran
+"IQ\0" // Iraq
+"IE\0" // Ireland
+"IL\0" // Israel
+"IT\0" // Italy
+"JM\0" // Jamaica
+"JP\0" // Japan
+"JO\0" // Jordan
+"KZ\0" // Kazakhstan
+"KE\0" // Kenya
+"KI\0" // Kiribati
+"KP\0" // DemocraticRepublicOfKorea
+"KR\0" // RepublicOfKorea
+"KW\0" // Kuwait
+"KG\0" // Kyrgyzstan
+"LA\0" // Lao
+"LV\0" // Latvia
+"LB\0" // Lebanon
+"LS\0" // Lesotho
+"LR\0" // Liberia
+"LY\0" // LibyanArabJamahiriya
+"LI\0" // Liechtenstein
+"LT\0" // Lithuania
+"LU\0" // Luxembourg
+"MO\0" // Macau
+"MK\0" // Macedonia
+"MG\0" // Madagascar
+"MW\0" // Malawi
+"MY\0" // Malaysia
+"MV\0" // Maldives
+"ML\0" // Mali
+"MT\0" // Malta
+"MH\0" // MarshallIslands
+"MQ\0" // Martinique
+"MR\0" // Mauritania
+"MU\0" // Mauritius
+"YT\0" // Mayotte
+"MX\0" // Mexico
+"FM\0" // Micronesia
+"MD\0" // Moldova
+"MC\0" // Monaco
+"MN\0" // Mongolia
+"MS\0" // Montserrat
+"MA\0" // Morocco
+"MZ\0" // Mozambique
+"MM\0" // Myanmar
+"NA\0" // Namibia
+"NR\0" // Nauru
+"NP\0" // Nepal
+"NL\0" // Netherlands
+"AN\0" // NetherlandsAntilles
+"NC\0" // NewCaledonia
+"NZ\0" // NewZealand
+"NI\0" // Nicaragua
+"NE\0" // Niger
+"NG\0" // Nigeria
+"NU\0" // Niue
+"NF\0" // NorfolkIsland
+"MP\0" // NorthernMarianaIslands
+"NO\0" // Norway
+"OM\0" // Oman
+"PK\0" // Pakistan
+"PW\0" // Palau
+"PS\0" // PalestinianTerritory
+"PA\0" // Panama
+"PG\0" // PapuaNewGuinea
+"PY\0" // Paraguay
+"PE\0" // Peru
+"PH\0" // Philippines
+"PN\0" // Pitcairn
+"PL\0" // Poland
+"PT\0" // Portugal
+"PR\0" // PuertoRico
+"QA\0" // Qatar
+"RE\0" // Reunion
+"RO\0" // Romania
+"RU\0" // RussianFederation
+"RW\0" // Rwanda
+"KN\0" // SaintKittsAndNevis
+"LC\0" // StLucia
+"VC\0" // StVincentAndTheGrenadines
+"WS\0" // Samoa
+"SM\0" // SanMarino
+"ST\0" // SaoTomeAndPrincipe
+"SA\0" // SaudiArabia
+"SN\0" // Senegal
+"SC\0" // Seychelles
+"SL\0" // SierraLeone
+"SG\0" // Singapore
+"SK\0" // Slovakia
+"SI\0" // Slovenia
+"SB\0" // SolomonIslands
+"SO\0" // Somalia
+"ZA\0" // SouthAfrica
+"GS\0" // SouthGeorgiaAndTheSouthSandwichIslands
+"ES\0" // Spain
+"LK\0" // SriLanka
+"SH\0" // StHelena
+"PM\0" // StPierreAndMiquelon
+"SD\0" // Sudan
+"SR\0" // Suriname
+"SJ\0" // SvalbardAndJanMayenIslands
+"SZ\0" // Swaziland
+"SE\0" // Sweden
+"CH\0" // Switzerland
+"SY\0" // SyrianArabRepublic
+"TW\0" // Taiwan
+"TJ\0" // Tajikistan
+"TZ\0" // Tanzania
+"TH\0" // Thailand
+"TG\0" // Togo
+"TK\0" // Tokelau
+"TO\0" // Tonga
+"TT\0" // TrinidadAndTobago
+"TN\0" // Tunisia
+"TR\0" // Turkey
+"TM\0" // Turkmenistan
+"TC\0" // TurksAndCaicosIslands
+"TV\0" // Tuvalu
+"UG\0" // Uganda
+"UA\0" // Ukraine
+"AE\0" // UnitedArabEmirates
+"GB\0" // UnitedKingdom
+"US\0" // UnitedStates
+"UM\0" // UnitedStatesMinorOutlyingIslands
+"UY\0" // Uruguay
+"UZ\0" // Uzbekistan
+"VU\0" // Vanuatu
+"VA\0" // VaticanCityState
+"VE\0" // Venezuela
+"VN\0" // VietNam
+"VG\0" // BritishVirginIslands
+"VI\0" // USVirginIslands
+"WF\0" // WallisAndFutunaIslands
+"EH\0" // WesternSahara
+"YE\0" // Yemen
+"YU\0" // Yugoslavia
+"ZM\0" // Zambia
+"ZW\0" // Zimbabwe
+"CS\0" // SerbiaAndMontenegro
+"ME\0" // Montenegro
+"RS\0" // Serbia
+"BL\0" // Saint Barthelemy
+"MF\0" // Saint Martin
+"419" // LatinAmericaAndTheCaribbean
;
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index ecf79e9..6205745 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -58,6 +58,10 @@
#include "qlocale.h"
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SYSTEMLOCALE)
+class CEnvironmentChangeNotifier;
+#endif
+
QT_BEGIN_NAMESPACE
struct Q_CORE_EXPORT QLocalePrivate
@@ -201,6 +205,20 @@ inline char QLocalePrivate::digitToCLocale(const QChar &in) const
return 0;
}
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SYSTEMLOCALE)
+class QEnvironmentChangeNotifier
+{
+public:
+ QEnvironmentChangeNotifier();
+ ~QEnvironmentChangeNotifier();
+
+ static TInt localeChanged(TAny *data);
+
+private:
+ CEnvironmentChangeNotifier *iChangeNotifier;
+};
+#endif
+
QT_END_NAMESPACE
#endif // QLOCALE_P_H
diff --git a/src/corelib/tools/qlocale_symbian.cpp b/src/corelib/tools/qlocale_symbian.cpp
index 01f56cc..b6afa12 100644
--- a/src/corelib/tools/qlocale_symbian.cpp
+++ b/src/corelib/tools/qlocale_symbian.cpp
@@ -46,8 +46,14 @@
#include <QThread>
#include <e32std.h>
+#include <e32const.h>
+#include <e32base.h>
+#include <e32property.h>
+#include <bacntf.h>
#include "private/qcore_symbian_p.h"
-
+#include "private/qcoreapplication_p.h"
+#include "private/qlocale_p.h"
+#include <qdebug.h>
QT_BEGIN_NAMESPACE
@@ -98,6 +104,7 @@ static const symbianToISO symbian_to_iso_list[] = {
{ ELangSwedish, "sv_SE" },
{ ELangDanish, "da_DK" },
{ ELangNorwegian, "no_NO" },
+ { ELangNorwegianNynorsk, "nn_NO" },
{ ELangFinnish, "fi_FI" },
{ ELangAmerican, "en_US" },
{ ELangPortuguese, "pt_PT" },
@@ -134,10 +141,11 @@ static const symbianToISO symbian_to_iso_list[] = {
{ ELangBrazilianPortuguese, "pt_BR" },
{ ELangRomanian, "ro_RO" },
{ ELangSerbian, "sr_RS" },
- { ELangLatinAmericanSpanish, "es" },
+ { ELangLatinAmericanSpanish,"es_419" },
{ ELangUkrainian, "uk_UA" },
{ ELangUrdu, "ur_PK" }, // India/Pakistan
{ ELangVietnamese, "vi_VN" },
+ { ELangKorean, "ko_KO" },
#ifdef __E32LANG_H__
// 5.0
{ ELangBasque, "eu_ES" },
@@ -771,13 +779,18 @@ static QLocale::MeasurementSystem symbianMeasurementSystem()
return QLocale::MetricSystem;
}
-QLocale QSystemLocale::fallbackLocale() const
+void qt_symbianUpdateSystemPrivate()
{
// load system data before query calls
+ _s60Locale.LoadSystemSettings();
+}
+
+void qt_symbianInitSystemLocale()
+{
static QBasicAtomicInt initDone = Q_BASIC_ATOMIC_INITIALIZER(0);
+ if (initDone == 2)
+ return;
if (initDone.testAndSetRelaxed(0, 1)) {
- _s60Locale.LoadSystemSettings();
-
// Initialize platform version dependent function pointers
ptrTimeFormatL = reinterpret_cast<FormatFunc>
(qt_resolveS60PluginFunc(S60Plugin_TimeFormatL));
@@ -801,7 +814,10 @@ QLocale QSystemLocale::fallbackLocale() const
}
while(initDone != 2)
QThread::yieldCurrentThread();
+}
+QLocale QSystemLocale::fallbackLocale() const
+{
TLanguage lang = User::Language();
QString locale = QLatin1String(qt_symbianLocaleName(lang));
return QLocale(locale);
@@ -884,4 +900,35 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
return QVariant();
}
+#if !defined(QT_NO_SYSTEMLOCALE)
+QEnvironmentChangeNotifier::QEnvironmentChangeNotifier()
+{
+ // Create the change notifier and install the callback function
+ const TCallBack callback(&QEnvironmentChangeNotifier::localeChanged, this);
+ QT_TRAP_THROWING(iChangeNotifier = CEnvironmentChangeNotifier::NewL(CActive::EPriorityStandard, callback));
+ iChangeNotifier->Start();
+}
+
+TInt QEnvironmentChangeNotifier::localeChanged(TAny *data)
+{
+ QEnvironmentChangeNotifier *that = reinterpret_cast<QEnvironmentChangeNotifier *>(data);
+
+ TInt flag = that->iChangeNotifier->Change();
+ if (flag & EChangesLocale) {
+ static bool first = true;
+ if (!first) { // skip the first notification on app startup
+ QT_TRYCATCH_LEAVING(QLocalePrivate::updateSystemPrivate());
+ QT_TRYCATCH_LEAVING(QCoreApplication::postEvent(qApp, new QEvent(QEvent::LocaleChange)));
+ }
+ first = false;
+ }
+ return KErrNone;
+}
+
+QEnvironmentChangeNotifier::~QEnvironmentChangeNotifier()
+{
+ delete iChangeNotifier;
+}
+#endif
+
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index df0ae46..5696ba6 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -125,6 +125,10 @@ template <class Key, class T>
struct QMapNode {
Key key;
T value;
+
+private:
+ // never access these members through this structure.
+ // see below
QMapData::Node *backward;
QMapData::Node *forward[1];
};
@@ -134,6 +138,22 @@ struct QMapPayloadNode
{
Key key;
T value;
+
+private:
+ // QMap::e is a pointer to QMapData::Node, which matches the member
+ // below. However, the memory allocation node in QMapData::node_create
+ // allocates sizeof(QMapPayloNode) and incorrectly calculates the offset
+ // of 'backward' below. If the alignment of QMapPayloadNode is larger
+ // than the alignment of a pointer, the 'backward' member is aligned to
+ // the end of this structure, not to 'value' above, and will occupy the
+ // tail-padding area.
+ //
+ // e.g., on a 32-bit archictecture with Key = int and
+ // sizeof(T) = alignof(T) = 8
+ // 0 4 8 12 16 20 24 byte
+ // | key | PAD | value |backward| PAD | correct layout
+ // | key | PAD | value | |backward| how it's actually used
+ // |<----- value of QMap::payload() = 20 ----->|
QMapData::Node *backward;
};
diff --git a/src/corelib/tools/qpair.qdoc b/src/corelib/tools/qpair.qdoc
index c9cbb29..34c43ed 100644
--- a/src/corelib/tools/qpair.qdoc
+++ b/src/corelib/tools/qpair.qdoc
@@ -214,7 +214,7 @@
This function requires the T1 and T2 types to implement \c operator>>().
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
/*! \fn QDataStream &operator<<(QDataStream &out, const QPair<T1, T2> &pair)
@@ -225,5 +225,5 @@
This function requires the T1 and T2 types to implement \c operator<<().
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
diff --git a/src/corelib/tools/qpoint.cpp b/src/corelib/tools/qpoint.cpp
index 9850ee7..66f06e9 100644
--- a/src/corelib/tools/qpoint.cpp
+++ b/src/corelib/tools/qpoint.cpp
@@ -306,7 +306,7 @@ QT_BEGIN_NAMESPACE
Writes the given \a point to the given \a stream and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QPoint &p)
@@ -325,7 +325,7 @@ QDataStream &operator<<(QDataStream &s, const QPoint &p)
Reads a point from the given \a stream into the given \a point
and returns a reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QPoint &p)
@@ -647,7 +647,7 @@ qreal QPointF::manhattanLength() const
Writes the given \a point to the given \a stream and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QPointF &p)
@@ -663,7 +663,7 @@ QDataStream &operator<<(QDataStream &s, const QPointF &p)
Reads a point from the given \a stream into the given \a point
and returns a reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QPointF &p)
diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp
index 80563ae..308a561 100644
--- a/src/corelib/tools/qrect.cpp
+++ b/src/corelib/tools/qrect.cpp
@@ -1272,7 +1272,7 @@ bool QRect::intersects(const QRect &r) const
Writes the given \a rectangle to the given \a stream, and returns
a reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QRect &r)
@@ -1293,7 +1293,7 @@ QDataStream &operator<<(QDataStream &s, const QRect &r)
Reads a rectangle from the given \a stream into the given \a
rectangle, and returns a reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QRect &r)
@@ -2420,7 +2420,7 @@ QRect QRectF::toAlignedRect() const
Writes the \a rectangle to the \a stream, and returns a reference to the
stream.
- \sa \link datastreamformat.html Format of the QDataStream operators \endlink
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QRectF &r)
@@ -2437,7 +2437,7 @@ QDataStream &operator<<(QDataStream &s, const QRectF &r)
Reads a \a rectangle from the \a stream, and returns a reference to the
stream.
- \sa \link datastreamformat.html Format of the QDataStream operators \endlink
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QRectF &r)
diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp
index eb104a8..36827d0 100644
--- a/src/corelib/tools/qregexp.cpp
+++ b/src/corelib/tools/qregexp.cpp
@@ -4459,7 +4459,7 @@ QString QRegExp::escape(const QString &str)
Writes the regular expression \a regExp to stream \a out.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &out, const QRegExp &regExp)
{
@@ -4473,7 +4473,7 @@ QDataStream &operator<<(QDataStream &out, const QRegExp &regExp)
Reads a regular expression from stream \a in into \a regExp.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &in, QRegExp &regExp)
{
diff --git a/src/corelib/tools/qsize.cpp b/src/corelib/tools/qsize.cpp
index f85a0c3..20ac344 100644
--- a/src/corelib/tools/qsize.cpp
+++ b/src/corelib/tools/qsize.cpp
@@ -380,7 +380,7 @@ void QSize::scale(const QSize &s, Qt::AspectRatioMode mode)
Writes the given \a size to the given \a stream, and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QSize &sz)
@@ -399,7 +399,7 @@ QDataStream &operator<<(QDataStream &s, const QSize &sz)
Reads a size from the given \a stream into the given \a size, and
returns a reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QSize &sz)
@@ -784,7 +784,7 @@ void QSizeF::scale(const QSizeF &s, Qt::AspectRatioMode mode)
Writes the given \a size to the given \a stream and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QSizeF &sz)
@@ -800,7 +800,7 @@ QDataStream &operator<<(QDataStream &s, const QSizeF &sz)
Reads a size from the given \a stream into the given \a size and
returns a reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QSizeF &sz)
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 0169b20..612c492 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -7385,7 +7385,7 @@ QString &QString::setRawData(const QChar *unicode, int size)
Writes the given \a string to the specified \a stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &out, const QString &str)
@@ -7433,7 +7433,7 @@ QDataStream &operator<<(QDataStream &out, const QString &str)
Reads a string from the specified \a stream into the given \a string.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &in, QString &str)
diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp
index 32a0b1e..82a46d4 100644
--- a/src/corelib/tools/qstringlist.cpp
+++ b/src/corelib/tools/qstringlist.cpp
@@ -460,7 +460,7 @@ QString QtPrivate::QStringList_join(const QStringList *that, const QString &sep)
Reads a string list from the given \a in stream into the specified
\a list.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
/*!
@@ -469,7 +469,7 @@ QString QtPrivate::QStringList_join(const QStringList *that, const QString &sep)
Writes the given string \a list to the specified \a out stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
#endif // QT_NO_DATASTREAM
diff --git a/src/dbus/qdbusinternalfilters.cpp b/src/dbus/qdbusinternalfilters.cpp
index 8fc219a..78abf94 100644
--- a/src/dbus/qdbusinternalfilters.cpp
+++ b/src/dbus/qdbusinternalfilters.cpp
@@ -87,7 +87,7 @@ static const char propertiesInterfaceXml[] =
" <method name=\"GetAll\">\n"
" <arg name=\"interface_name\" type=\"s\" direction=\"in\"/>\n"
" <arg name=\"values\" type=\"a{sv}\" direction=\"out\"/>\n"
- " <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"QVariantMap\"/>"
+ " <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"QVariantMap\"/>\n"
" </method>\n"
" </interface>\n";
diff --git a/src/dbus/qdbusmacros.h b/src/dbus/qdbusmacros.h
index 77122fc..693a350 100644
--- a/src/dbus/qdbusmacros.h
+++ b/src/dbus/qdbusmacros.h
@@ -48,8 +48,10 @@
#if defined(QDBUS_MAKEDLL)
# define QDBUS_EXPORT Q_DECL_EXPORT
-#else
+#elif defined(QT_SHARED)
# define QDBUS_EXPORT Q_DECL_IMPORT
+#else
+# define QDBUS_EXPORT
#endif
#ifndef Q_MOC_RUN
diff --git a/src/dbus/qdbusxmlgenerator.cpp b/src/dbus/qdbusxmlgenerator.cpp
index 9c25d82..463ac73 100644
--- a/src/dbus/qdbusxmlgenerator.cpp
+++ b/src/dbus/qdbusxmlgenerator.cpp
@@ -160,7 +160,7 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method
// do we need to describe this argument?
if (QDBusMetaType::signatureToType(typeName) == QVariant::Invalid)
xml += QString::fromLatin1(" <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"%1\"/>\n")
- .arg(typeNameToXml(mm.typeName()));
+ .arg(typeNameToXml(QVariant::typeToName(QVariant::Type(typeId))));
} else
continue;
}
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
index 9c46467..25c2417 100644
--- a/src/declarative/QmlChanges.txt
+++ b/src/declarative/QmlChanges.txt
@@ -1,15 +1,38 @@
=============================================================================
The changes below are pre Qt 4.7.0 RC
-Flickable: overShoot is replaced by boundsBehavior enumeration.
+Flickable:
+ - overShoot is replaced by boundsBehavior enumeration
+ - flickingHorizontally and flickingVertically properties added
+ - movingHorizontally and movingVertically properties added
+ - flickDirection is renamed flickableDirection
+Component:
+ - isReady, isLoading, isError and isNull properties removed, use
+ status property instead
+ - errorsString() renamed to errorString()
+
+QList<QObject*> models no longer provide properties in model object. The
+properties are now updated when the object changes. An object's property
+"foo" may now be accessed as "foo", modelData.foo" or model.modelData.foo"
+component.createObject has gained a mandatory "parent" argument
C++ API
-------
QDeclarativeExpression::value() has been renamed to
QDeclarativeExpression::evaluate()
+The QDeclarativeExpression constructor has changed from
+ QDeclarativeExpression(context, expression, scope)
+to
+ QDeclarativeExpression(context, scope, expression, parent = 0)
+
+QML Viewer
+------------
+The standalone qml executable has been renamed back to Qml Viewer. Runtime warnings
+can be now accessed via the menu (Debugging->Show Warnings).
+
=============================================================================
-The changes below are pre Qt 4.7.0 beta
+The changes below are pre Qt 4.7.0 beta 1
TextEdit: wrap property is replaced by wrapMode enumeration.
Text: wrap property is replaced by wrapMode enumeration.
diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro
index 4287e25..8037a16 100644
--- a/src/declarative/declarative.pro
+++ b/src/declarative/declarative.pro
@@ -1,13 +1,13 @@
TARGET = QtDeclarative
QPRO_PWD = $$PWD
-QT = core gui xml script network
+QT = core gui script network
contains(QT_CONFIG, svg): QT += svg
contains(QT_CONFIG, opengl): QT += opengl
DEFINES += QT_BUILD_DECLARATIVE_LIB QT_NO_URL_CAST_FROM_STRING
win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000
solaris-cc*:QMAKE_CXXFLAGS_RELEASE -= -O2
-unix:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui QtXml
+unix:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
exists("qdeclarative_enable_gcov") {
QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage -fno-elide-constructors
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors.cpp b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
index f15316b..ef07cbb 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
@@ -128,7 +128,6 @@ static qreal adjustedPosition(QGraphicsObject *item, QDeclarativeAnchorLine::Anc
\internal
\class QDeclarativeAnchors
\since 4.7
- \ingroup group_layouts
\brief The QDeclarativeAnchors class provides a way to lay out items relative to other items.
\warning Currently, only anchoring to siblings or parent is supported.
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index 06f8363..229e15b 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -57,9 +57,25 @@ QT_BEGIN_NAMESPACE
\inherits Item
\since 4.7
- \snippet snippets/declarative/border-image.qml 0
+ A BorderImage breaks an image into 9 sections, as shown below:
+
+ \image declarative-scalegrid.png
+
+ When the image is scaled:
+ \list
+ \i the corners (sections 1, 3, 7, and 9) are not scaled at all
+ \i sections 2 and 8 are scaled according to \l{BorderImage::horizontalTileMode}{horizontalTileMode}
+ \i sections 4 and 6 are scaled according to \l{BorderImage::verticalTileMode}{verticalTileMode}
+ \i the middle (section 5) is scaled according to both \l{BorderImage::horizontalTileMode}{horizontalTileMode} and \l{BorderImage::verticalTileMode}{verticalTileMode}
+ \endlist
+
+ Examples:
+ \snippet snippets/declarative/borderimage.qml 0
\image BorderImage.png
+
+ The \l{declarative/imageelements/borderimage}{BorderImage example} shows how a BorderImage can be used to simulate a shadow effect on a
+ rectangular item.
*/
/*!
@@ -86,10 +102,10 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage()
This property holds the status of image loading. It can be one of:
\list
- \o Null - no image has been set
- \o Ready - the image has been loaded
- \o Loading - the image is currently being loaded
- \o Error - an error occurred while loading the image
+ \o BorderImage.Null - no image has been set
+ \o BorderImage.Ready - the image has been loaded
+ \o BorderImage.Loading - the image is currently being loaded
+ \o BorderImage.Error - an error occurred while loading the image
\endlist
\sa progress
@@ -255,21 +271,17 @@ void QDeclarativeBorderImage::load()
\qmlproperty int BorderImage::border.top
\qmlproperty int BorderImage::border.bottom
- \target ImagexmlpropertiesscaleGrid
-
- The 4 border lines (2 horizontal and 2 vertical) break an image into 9 sections, as shown below:
+ The 4 border lines (2 horizontal and 2 vertical) break the image into 9 sections, as shown below:
\image declarative-scalegrid.png
- When the image is scaled:
- \list
- \i the corners (sections 1, 3, 7, and 9) are not scaled at all
- \i sections 2 and 8 are scaled according to \l{BorderImage::horizontalTileMode}{horizontalTileMode}
- \i sections 4 and 6 are scaled according to \l{BorderImage::verticalTileMode}{verticalTileMode}
- \i the middle (section 5) is scaled according to both \l{BorderImage::horizontalTileMode}{horizontalTileMode} and \l{BorderImage::verticalTileMode}{verticalTileMode}
- \endlist
+ Each border line (left, right, top, and bottom) specifies an offset in pixels from the respective side.
- Each border line (left, right, top, and bottom) specifies an offset from the respective side. For example, \c{border.bottom: 10} sets the bottom line 10 pixels up from the bottom of the image.
+ For example:
+ \qml
+ border.bottom: 10
+ \endqml
+ sets the bottom line 10 pixels up from the bottom of the image.
The border lines can also be specified using a
\l {BorderImage::source}{.sci file}.
@@ -288,9 +300,9 @@ QDeclarativeScaleGrid *QDeclarativeBorderImage::border()
This property describes how to repeat or stretch the middle parts of the border image.
\list
- \o Stretch - Scale the image to fit to the available area.
- \o Repeat - Tile the image until there is no more space. May crop the last image.
- \o Round - Like Repeat, but scales the images down to ensure that the last image is not cropped.
+ \o BorderImage.Stretch - Scale the image to fit to the available area.
+ \o BorderImage.Repeat - Tile the image until there is no more space. May crop the last image.
+ \o BorderImage.Round - Like Repeat, but scales the images down to ensure that the last image is not cropped.
\endlist
*/
QDeclarativeBorderImage::TileMode QDeclarativeBorderImage::horizontalTileMode() const
diff --git a/src/declarative/graphicsitems/qdeclarativeevents.cpp b/src/declarative/graphicsitems/qdeclarativeevents.cpp
index 4425c97..81ec6e1 100644
--- a/src/declarative/graphicsitems/qdeclarativeevents.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeevents.cpp
@@ -151,7 +151,7 @@ Item {
\list
\o Qt.LeftButton
\o Qt.RightButton
- \o Qt.MidButton
+ \o Qt.MiddleButton
\endlist
*/
@@ -174,7 +174,7 @@ Item {
\list
\o Qt.LeftButton
\o Qt.RightButton
- \o Qt.MidButton
+ \o Qt.MiddleButton
\endlist
*/
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index b462443..560d586 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -125,12 +125,14 @@ QDeclarativeFlickablePrivate::QDeclarativeFlickablePrivate()
: viewport(new QDeclarativeItem)
, hData(this, &QDeclarativeFlickablePrivate::setRoundedViewportX)
, vData(this, &QDeclarativeFlickablePrivate::setRoundedViewportY)
- , flicked(false), moving(false), stealMouse(false)
- , pressed(false)
+ , flickingHorizontally(false), flickingVertically(false)
+ , hMoved(false), vMoved(false)
+ , movingHorizontally(false), movingVertically(false)
+ , stealMouse(false), pressed(false)
, interactive(true), deceleration(500), maxVelocity(2000), reportedVelocitySmoothing(100)
, delayedPressEvent(0), delayedPressTarget(0), pressDelay(0), fixupDuration(600)
, vTime(0), visibleArea(0)
- , flickDirection(QDeclarativeFlickable::AutoFlickDirection)
+ , flickableDirection(QDeclarativeFlickable::AutoFlickDirection)
, boundsBehavior(QDeclarativeFlickable::DragAndOvershootBounds)
{
}
@@ -226,10 +228,19 @@ void QDeclarativeFlickablePrivate::flick(AxisData &data, qreal minExtent, qreal
timeline.reset(data.move);
timeline.accel(data.move, v, deceleration, maxDistance);
timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this));
- if (!flicked) {
- flicked = true;
+ if (!flickingHorizontally && q->xflick()) {
+ flickingHorizontally = true;
emit q->flickingChanged();
- emit q->flickStarted();
+ emit q->flickingHorizontallyChanged();
+ if (!flickingVertically)
+ emit q->flickStarted();
+ }
+ if (!flickingVertically && q->yflick()) {
+ flickingVertically = true;
+ emit q->flickingChanged();
+ emit q->flickingVerticallyChanged();
+ if (!flickingHorizontally)
+ emit q->flickStarted();
}
} else {
timeline.reset(data.move);
@@ -274,7 +285,6 @@ void QDeclarativeFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal
q->viewportMoved();
}
}
- //emit flickingChanged();
} else if (data.move.value() < maxExtent) {
timeline.reset(data.move);
if (fixupDuration) {
@@ -285,11 +295,7 @@ void QDeclarativeFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal
data.move.setValue(maxExtent);
q->viewportMoved();
}
- //emit flickingChanged();
- } else {
- flicked = false;
}
-
vTime = timeline.time();
}
@@ -345,19 +351,21 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd()
\code
Flickable {
- width: 200; height: 200; contentWidth: image.width; contentHeight: image.height
- Image { id: image; source: "bigimage.png" }
+ width: 200; height: 200
+ contentWidth: image.width; contentHeight: image.height
+
+ Image { id: image; source: "bigImage.png" }
}
\endcode
\image flickable.gif
- \note Flickable does not automatically clip its contents. If
- it is not full-screen it is likely that \c clip should be set
- to true.
+ Flickable does not automatically clip its contents. If
+ it is not full-screen it is likely that \l {Item::clip}{clip} should be set
+ to \c true.
- \note Due to an implementation detail items placed inside a flickable cannot anchor to it by
- id, use 'parent' instead.
+ \note Due to an implementation detail, items placed inside a Flickable cannot anchor to it by
+ \c id. Use \c parent instead.
*/
/*!
@@ -400,18 +408,17 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd()
These properties describe the position and size of the currently viewed area.
The size is defined as the percentage of the full view currently visible,
scaled to 0.0 - 1.0. The page position is usually in the range 0.0 (beginning) to
- 1.0 minus size ratio (end), i.e. yPosition is in the range 0.0 to 1.0-heightRatio.
+ 1.0 minus size ratio (end), i.e. \c yPosition is in the range 0.0 to 1.0-\c heightRatio.
However, it is possible for the contents to be dragged outside of the normal
range, resulting in the page positions also being outside the normal range.
- These properties are typically used to draw a scrollbar, for example:
- \code
- Rectangle {
- opacity: 0.5; anchors.right: MyListView.right-2; width: 6
- y: MyListView.visibleArea.yPosition * MyListView.height
- height: MyListView.visibleArea.heightRatio * MyListView.height
- }
- \endcode
+ These properties are typically used to draw a scrollbar. For example:
+
+ \snippet doc/src/snippets/declarative/flickableScrollbar.qml 0
+ \dots 8
+ \snippet doc/src/snippets/declarative/flickableScrollbar.qml 1
+
+ \sa {declarative/ui-components/scrollbar}{scrollbar example}
*/
QDeclarativeFlickable::QDeclarativeFlickable(QDeclarativeItem *parent)
@@ -479,11 +486,12 @@ void QDeclarativeFlickable::setContentY(qreal pos)
/*!
\qmlproperty bool Flickable::interactive
- A user cannot drag or flick a Flickable that is not interactive.
+ This property holds whether the user can interact with the Flickable. A user
+ cannot drag or flick a Flickable that is not interactive.
This property is useful for temporarily disabling flicking. This allows
special interaction with Flickable's children: for example, you might want to
- freeze a flickable map while viewing detailed information on a location popup that is a child of the Flickable.
+ freeze a flickable map while scrolling through a pop-up dialog that is a child of the Flickable.
*/
bool QDeclarativeFlickable::isInteractive() const
{
@@ -496,11 +504,14 @@ void QDeclarativeFlickable::setInteractive(bool interactive)
Q_D(QDeclarativeFlickable);
if (interactive != d->interactive) {
d->interactive = interactive;
- if (!interactive && d->flicked) {
+ if (!interactive && (d->flickingHorizontally || d->flickingVertically)) {
d->timeline.clear();
d->vTime = d->timeline.time();
- d->flicked = false;
+ d->flickingHorizontally = false;
+ d->flickingVertically = false;
emit flickingChanged();
+ emit flickingHorizontallyChanged();
+ emit flickingVerticallyChanged();
emit flickEnded();
}
emit interactiveChanged();
@@ -580,35 +591,47 @@ QDeclarativeFlickableVisibleArea *QDeclarativeFlickable::visibleArea()
}
/*!
- \qmlproperty enumeration Flickable::flickDirection
+ \qmlproperty enumeration Flickable::flickableDirection
This property determines which directions the view can be flicked.
\list
- \o AutoFlickDirection (default) - allows flicking vertically if the
+ \o Flickable.AutoFlickDirection (default) - allows flicking vertically if the
\e contentHeight is not equal to the \e height of the Flickable.
Allows flicking horizontally if the \e contentWidth is not equal
to the \e width of the Flickable.
- \o HorizontalFlick - allows flicking horizontally.
- \o VerticalFlick - allows flicking vertically.
- \o HorizontalAndVerticalFlick - allows flicking in both directions.
+ \o Flickable.HorizontalFlick - allows flicking horizontally.
+ \o Flickable.VerticalFlick - allows flicking vertically.
+ \o Flickable.HorizontalAndVerticalFlick - allows flicking in both directions.
\endlist
*/
-QDeclarativeFlickable::FlickDirection QDeclarativeFlickable::flickDirection() const
+QDeclarativeFlickable::FlickableDirection QDeclarativeFlickable::flickableDirection() const
{
Q_D(const QDeclarativeFlickable);
- return d->flickDirection;
+ return d->flickableDirection;
}
-void QDeclarativeFlickable::setFlickDirection(FlickDirection direction)
+void QDeclarativeFlickable::setFlickableDirection(FlickableDirection direction)
{
Q_D(QDeclarativeFlickable);
- if (direction != d->flickDirection) {
- d->flickDirection = direction;
- emit flickDirectionChanged();
+ if (direction != d->flickableDirection) {
+ d->flickableDirection = direction;
+ emit flickableDirectionChanged();
}
}
+QDeclarativeFlickable::FlickableDirection QDeclarativeFlickable::flickDirection() const
+{
+ qmlInfo(this) << "'flickDirection' is deprecated. Please use 'flickableDirection' instead.";
+ return flickableDirection();
+}
+
+void QDeclarativeFlickable::setFlickDirection(FlickableDirection direction)
+{
+ qmlInfo(this) << "'flickDirection' is deprecated. Please use 'flickableDirection' instead.";
+ setFlickableDirection(direction);
+}
+
void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event)
{
if (interactive && timeline.isActive() && (qAbs(hData.velocity) > 10 || qAbs(vData.velocity) > 10))
@@ -624,7 +647,8 @@ void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEven
pressPos = event->pos();
hData.pressPos = hData.move.value();
vData.pressPos = vData.move.value();
- flicked = false;
+ flickingHorizontally = false;
+ flickingVertically = false;
QDeclarativeItemPrivate::start(pressTime);
QDeclarativeItemPrivate::start(velocityTime);
}
@@ -636,7 +660,6 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
return;
bool rejectY = false;
bool rejectX = false;
- bool moved = false;
if (q->yflick()) {
int dy = int(event->pos().y() - pressPos.y());
@@ -658,7 +681,7 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
}
if (!rejectY && stealMouse) {
vData.move.setValue(qRound(newY));
- moved = true;
+ vMoved = true;
}
if (qAbs(dy) > QApplication::startDragDistance())
stealMouse = true;
@@ -685,7 +708,7 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
}
if (!rejectX && stealMouse) {
hData.move.setValue(qRound(newX));
- moved = true;
+ hMoved = true;
}
if (qAbs(dx) > QApplication::startDragDistance())
@@ -715,7 +738,7 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
if (rejectY) vData.velocity = 0;
if (rejectX) hData.velocity = 0;
- if (moved) {
+ if (hMoved || vMoved) {
q->movementStarting();
q->viewportMoved();
}
@@ -810,20 +833,24 @@ void QDeclarativeFlickable::wheelEvent(QGraphicsSceneWheelEvent *event)
d->vData.velocity = qMax(event->delta() - d->vData.smoothVelocity.value(), qreal(250.0));
else
d->vData.velocity = qMin(event->delta() - d->vData.smoothVelocity.value(), qreal(-250.0));
- d->flicked = false;
+ d->flickingVertically = false;
d->flickY(d->vData.velocity);
- if (d->flicked)
+ if (d->flickingVertically) {
+ d->vMoved = true;
movementStarting();
+ }
event->accept();
} else if (xflick()) {
if (event->delta() > 0)
d->hData.velocity = qMax(event->delta() - d->hData.smoothVelocity.value(), qreal(250.0));
else
d->hData.velocity = qMin(event->delta() - d->hData.smoothVelocity.value(), qreal(-250.0));
- d->flicked = false;
+ d->flickingHorizontally = false;
d->flickX(d->hData.velocity);
- if (d->flicked)
+ if (d->flickingHorizontally) {
+ d->hMoved = true;
movementStarting();
+ }
event->accept();
} else {
QDeclarativeItem::wheelEvent(event);
@@ -1026,14 +1053,14 @@ void QDeclarativeFlickable::setOverShoot(bool o)
This enables the feeling that the edges of the view are soft,
rather than a hard physical boundary.
- boundsBehavior can be one of:
+ The \c boundsBehavior can be one of:
\list
- \o \e StopAtBounds - the contents can not be dragged beyond the boundary
+ \o \e Flickable.StopAtBounds - the contents can not be dragged beyond the boundary
of the flickable, and flicks will not overshoot.
- \o \e DragOverBounds - the contents can be dragged beyond the boundary
+ \o \e Flickable.DragOverBounds - the contents can be dragged beyond the boundary
of the Flickable, but flicks will not overshoot.
- \o \e DragAndOvershootBounds (default) - the contents can be dragged
+ \o \e Flickable.DragAndOvershootBounds (default) - the contents can be dragged
beyond the boundary of the Flickable, and can overshoot the
boundary when flicked.
\endlist
@@ -1059,12 +1086,16 @@ void QDeclarativeFlickable::setBoundsBehavior(BoundsBehavior b)
\qmlproperty int Flickable::contentHeight
The dimensions of the content (the surface controlled by Flickable). Typically this
- should be set to the combined size of the items placed in the Flickable.
+ should be set to the combined size of the items placed in the Flickable. Note this
+ can be set automatically using \l {Item::childrenRect.width}{childrenRect.width}
+ and \l {Item::childrenRect.height}{childrenRect.height}. For example:
\code
Flickable {
- width: 320; height: 480; contentWidth: image.width; contentHeight: image.height
- Image { id: image; source: "bigimage.png" }
+ width: 320; height: 480
+ contentWidth: childrenRect.width; contentHeight: childrenRect.height
+
+ Image { id: image; source: "bigImage.png" }
}
\endcode
*/
@@ -1085,7 +1116,7 @@ void QDeclarativeFlickable::setContentWidth(qreal w)
else
d->viewport->setWidth(w);
// Make sure that we're entirely in view.
- if (!d->pressed) {
+ if (!d->pressed && !d->movingHorizontally && !d->movingVertically) {
int oldDuration = d->fixupDuration;
d->fixupDuration = 0;
d->fixupX();
@@ -1112,7 +1143,7 @@ void QDeclarativeFlickable::setContentHeight(qreal h)
else
d->viewport->setHeight(h);
// Make sure that we're entirely in view.
- if (!d->pressed) {
+ if (!d->pressed && !d->movingHorizontally && !d->movingVertically) {
int oldDuration = d->fixupDuration;
d->fixupDuration = 0;
d->fixupY();
@@ -1143,17 +1174,17 @@ qreal QDeclarativeFlickable::vHeight() const
bool QDeclarativeFlickable::xflick() const
{
Q_D(const QDeclarativeFlickable);
- if (d->flickDirection == QDeclarativeFlickable::AutoFlickDirection)
+ if (d->flickableDirection == QDeclarativeFlickable::AutoFlickDirection)
return vWidth() != width();
- return d->flickDirection & QDeclarativeFlickable::HorizontalFlick;
+ return d->flickableDirection & QDeclarativeFlickable::HorizontalFlick;
}
bool QDeclarativeFlickable::yflick() const
{
Q_D(const QDeclarativeFlickable);
- if (d->flickDirection == QDeclarativeFlickable::AutoFlickDirection)
+ if (d->flickableDirection == QDeclarativeFlickable::AutoFlickDirection)
return vHeight() != height();
- return d->flickDirection & QDeclarativeFlickable::VerticalFlick;
+ return d->flickableDirection & QDeclarativeFlickable::VerticalFlick;
}
bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
@@ -1275,16 +1306,30 @@ void QDeclarativeFlickable::setFlickDeceleration(qreal deceleration)
emit flickDecelerationChanged();
}
+bool QDeclarativeFlickable::isFlicking() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->flickingHorizontally || d->flickingVertically;
+}
+
/*!
\qmlproperty bool Flickable::flicking
+ \qmlproperty bool Flickable::flickingHorizontally
+ \qmlproperty bool Flickable::flickingVertically
- This property holds whether the view is currently moving due to
- the user flicking the view.
+ These properties hold whether the view is currently moving horizontally
+ or vertically due to the user flicking the view.
*/
-bool QDeclarativeFlickable::isFlicking() const
+bool QDeclarativeFlickable::isFlickingHorizontally() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->flickingHorizontally;
+}
+
+bool QDeclarativeFlickable::isFlickingVertically() const
{
Q_D(const QDeclarativeFlickable);
- return d->flicked;
+ return d->flickingVertically;
}
/*!
@@ -1313,40 +1358,84 @@ void QDeclarativeFlickable::setPressDelay(int delay)
emit pressDelayChanged();
}
+
+bool QDeclarativeFlickable::isMoving() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->movingHorizontally || d->movingVertically;
+}
+
/*!
\qmlproperty bool Flickable::moving
+ \qmlproperty bool Flickable::movingHorizontally
+ \qmlproperty bool Flickable::movingVertically
- This property holds whether the view is currently moving due to
- the user either dragging or flicking the view.
+ These properties hold whether the view is currently moving horizontally
+ or vertically due to the user either dragging or flicking the view.
*/
-bool QDeclarativeFlickable::isMoving() const
+bool QDeclarativeFlickable::isMovingHorizontally() const
{
Q_D(const QDeclarativeFlickable);
- return d->moving;
+ return d->movingHorizontally;
+}
+
+bool QDeclarativeFlickable::isMovingVertically() const
+{
+ Q_D(const QDeclarativeFlickable);
+ return d->movingVertically;
}
void QDeclarativeFlickable::movementStarting()
{
Q_D(QDeclarativeFlickable);
- if (!d->moving) {
- d->moving = true;
+ if (d->hMoved && !d->movingHorizontally) {
+ d->movingHorizontally = true;
+ emit movingChanged();
+ emit movingHorizontallyChanged();
+ if (!d->movingVertically)
+ emit movementStarted();
+ }
+ else if (d->vMoved && !d->movingVertically) {
+ d->movingVertically = true;
emit movingChanged();
- emit movementStarted();
+ emit movingVerticallyChanged();
+ if (!d->movingHorizontally)
+ emit movementStarted();
}
}
void QDeclarativeFlickable::movementEnding()
{
Q_D(QDeclarativeFlickable);
- if (d->moving) {
- d->moving = false;
- emit movingChanged();
- emit movementEnded();
+ if (d->flickingHorizontally) {
+ d->flickingHorizontally = false;
+ emit flickingChanged();
+ emit flickingHorizontallyChanged();
+ if (!d->flickingVertically)
+ emit flickEnded();
}
- if (d->flicked) {
- d->flicked = false;
+ if (d->flickingVertically) {
+ d->flickingVertically = false;
emit flickingChanged();
- emit flickEnded();
+ emit flickingVerticallyChanged();
+ if (!d->flickingHorizontally)
+ emit flickEnded();
+ }
+ if (d->movingHorizontally) {
+ d->movingHorizontally = false;
+ d->hMoved = false;
+ emit movingChanged();
+ emit movingHorizontallyChanged();
+ if (!d->movingVertically)
+ emit movementEnded();
+ }
+ if (d->movingVertically) {
+ d->movingVertically = false;
+ d->vMoved = false;
+ emit movingChanged();
+ emit movingVerticallyChanged();
+ if (!d->movingHorizontally)
+ emit movementEnded();
}
d->hData.smoothVelocity.setValue(0);
d->vData.smoothVelocity.setValue(0);
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p.h
index f031a24..05887b8 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p.h
@@ -69,8 +69,13 @@ class Q_DECLARATIVE_EXPORT QDeclarativeFlickable : public QDeclarativeItem
Q_PROPERTY(qreal maximumFlickVelocity READ maximumFlickVelocity WRITE setMaximumFlickVelocity NOTIFY maximumFlickVelocityChanged)
Q_PROPERTY(qreal flickDeceleration READ flickDeceleration WRITE setFlickDeceleration NOTIFY flickDecelerationChanged)
Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged)
+ Q_PROPERTY(bool movingHorizontally READ isMovingHorizontally NOTIFY movingHorizontallyChanged)
+ Q_PROPERTY(bool movingVertically READ isMovingVertically NOTIFY movingVerticallyChanged)
Q_PROPERTY(bool flicking READ isFlicking NOTIFY flickingChanged)
- Q_PROPERTY(FlickDirection flickDirection READ flickDirection WRITE setFlickDirection NOTIFY flickDirectionChanged)
+ Q_PROPERTY(bool flickingHorizontally READ isFlickingHorizontally NOTIFY flickingHorizontallyChanged)
+ Q_PROPERTY(bool flickingVertically READ isFlickingVertically NOTIFY flickingVerticallyChanged)
+ Q_PROPERTY(FlickableDirection flickDirection READ flickDirection WRITE setFlickDirection NOTIFY flickableDirectionChanged) // deprecated
+ Q_PROPERTY(FlickableDirection flickableDirection READ flickableDirection WRITE setFlickableDirection NOTIFY flickableDirectionChanged)
Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged)
Q_PROPERTY(int pressDelay READ pressDelay WRITE setPressDelay NOTIFY pressDelayChanged)
@@ -86,7 +91,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeFlickable : public QDeclarativeItem
Q_PROPERTY(QDeclarativeListProperty<QGraphicsObject> flickableChildren READ flickableChildren)
Q_CLASSINFO("DefaultProperty", "flickableData")
- Q_ENUMS(FlickDirection)
+ Q_ENUMS(FlickableDirection)
Q_ENUMS(BoundsBehavior)
public:
@@ -116,7 +121,11 @@ public:
void setContentY(qreal pos);
bool isMoving() const;
+ bool isMovingHorizontally() const;
+ bool isMovingVertically() const;
bool isFlicking() const;
+ bool isFlickingHorizontally() const;
+ bool isFlickingVertically() const;
int pressDelay() const;
void setPressDelay(int delay);
@@ -140,9 +149,11 @@ public:
QDeclarativeItem *viewport();
- enum FlickDirection { AutoFlickDirection=0x00, HorizontalFlick=0x01, VerticalFlick=0x02, HorizontalAndVerticalFlick=0x03 };
- FlickDirection flickDirection() const;
- void setFlickDirection(FlickDirection);
+ enum FlickableDirection { AutoFlickDirection=0x00, HorizontalFlick=0x01, VerticalFlick=0x02, HorizontalAndVerticalFlick=0x03 };
+ FlickableDirection flickDirection() const; // deprecated
+ void setFlickDirection(FlickableDirection); // deprecated
+ FlickableDirection flickableDirection() const;
+ void setFlickableDirection(FlickableDirection);
Q_SIGNALS:
void contentWidthChanged();
@@ -150,22 +161,26 @@ Q_SIGNALS:
void contentXChanged();
void contentYChanged();
void movingChanged();
+ void movingHorizontallyChanged();
+ void movingVerticallyChanged();
void flickingChanged();
- void movementStarted();
- void movementEnded();
- void flickStarted();
- void flickEnded();
+ void flickingHorizontallyChanged();
+ void flickingVerticallyChanged();
void horizontalVelocityChanged();
void verticalVelocityChanged();
void isAtBoundaryChanged();
void pageChanged();
- void flickDirectionChanged();
+ void flickableDirectionChanged();
void interactiveChanged();
void overShootChanged();
void boundsBehaviorChanged();
void maximumFlickVelocityChanged();
void flickDecelerationChanged();
void pressDelayChanged();
+ void movementStarted();
+ void movementEnded();
+ void flickStarted();
+ void flickEnded();
protected:
virtual bool sceneEventFilter(QGraphicsItem *, QEvent *);
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
index 01cfb18..b467ed2 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
@@ -131,8 +131,12 @@ public:
AxisData vData;
QDeclarativeTimeLine timeline;
- bool flicked : 1;
- bool moving : 1;
+ bool flickingHorizontally : 1;
+ bool flickingVertically : 1;
+ bool hMoved : 1;
+ bool vMoved : 1;
+ bool movingHorizontally : 1;
+ bool movingVertically : 1;
bool stealMouse : 1;
bool pressed : 1;
bool interactive : 1;
@@ -158,7 +162,7 @@ public:
int vTime;
QDeclarativeTimeLine velocityTimeline;
QDeclarativeFlickableVisibleArea *visibleArea;
- QDeclarativeFlickable::FlickDirection flickDirection;
+ QDeclarativeFlickable::FlickableDirection flickableDirection;
QDeclarativeFlickable::BoundsBehavior boundsBehavior;
void handleMousePressEvent(QGraphicsSceneMouseEvent *);
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
index 57045f1..d926119 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
@@ -94,8 +94,6 @@ public:
\class QDeclarativeFlipable
\brief The Flipable item provides a surface that can be flipped.
- \ingroup group_widgets
-
Flipable is an item that can be visibly "flipped" between its front and
back sides.
*/
@@ -169,7 +167,7 @@ void QDeclarativeFlipable::retransformBack()
\qmlproperty enumeration Flipable::side
The side of the Flippable currently visible. Possible values are \c
- Front and \c Back.
+ Flippable.Front and \c Flippable.Back.
*/
QDeclarativeFlipable::Side QDeclarativeFlipable::side() const
{
@@ -192,12 +190,15 @@ void QDeclarativeFlipablePrivate::updateSceneTransformFromParent()
QPointF p2(1, 0);
QPointF p3(1, 1);
- p1 = sceneTransform.map(p1);
- p2 = sceneTransform.map(p2);
- p3 = sceneTransform.map(p3);
+ QPointF scenep1 = sceneTransform.map(p1);
+ QPointF scenep2 = sceneTransform.map(p2);
+ QPointF scenep3 = sceneTransform.map(p3);
+ p1 = q->mapToParent(p1);
+ p2 = q->mapToParent(p2);
+ p3 = q->mapToParent(p3);
- qreal cross = (p1.x() - p2.x()) * (p3.y() - p2.y()) -
- (p1.y() - p2.y()) * (p3.x() - p2.x());
+ qreal cross = (scenep1.x() - scenep2.x()) * (scenep3.y() - scenep2.y()) -
+ (scenep1.y() - scenep2.y()) * (scenep3.x() - scenep2.x());
wantBackYFlipped = p1.x() >= p2.x();
wantBackXFlipped = p2.y() >= p3.y();
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index f79a853..906f1fc 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -108,7 +108,7 @@ public:
, highlightComponent(0), highlight(0), trackedItem(0)
, moveReason(Other), buffer(0), highlightXAnimator(0), highlightYAnimator(0)
, highlightMoveDuration(150)
- , bufferMode(NoBuffer), snapMode(QDeclarativeGridView::NoSnap)
+ , bufferMode(BufferBefore | BufferAfter), snapMode(QDeclarativeGridView::NoSnap)
, ownModel(false), wrap(false), autoHighlight(true)
, fixCurrentVisibility(false), lazyRelease(false), layoutScheduled(false)
, deferredRelease(false), haveHighlightRange(false) {}
@@ -331,7 +331,7 @@ public:
QSmoothedAnimation *highlightYAnimator;
int highlightMoveDuration;
enum BufferMode { NoBuffer = 0x00, BufferBefore = 0x01, BufferAfter = 0x02 };
- BufferMode bufferMode;
+ int bufferMode;
QDeclarativeGridView::SnapMode snapMode;
bool ownModel : 1;
@@ -349,7 +349,7 @@ void QDeclarativeGridViewPrivate::init()
Q_Q(QDeclarativeGridView);
QObject::connect(q, SIGNAL(movementEnded()), q, SLOT(animStopped()));
q->setFlag(QGraphicsItem::ItemIsFocusScope);
- q->setFlickDirection(QDeclarativeFlickable::VerticalFlick);
+ q->setFlickableDirection(QDeclarativeFlickable::VerticalFlick);
addItemChangeListener(this, Geometry);
}
@@ -378,9 +378,11 @@ FxGridItem *QDeclarativeGridViewPrivate::createItem(int modelIndex)
if (model->completePending()) {
// complete
listItem->item->setZValue(1);
+ listItem->item->setParentItem(q->viewport());
model->completeItem();
+ } else {
+ listItem->item->setParentItem(q->viewport());
}
- listItem->item->setParentItem(q->viewport());
unrequestedItems.remove(listItem->item);
}
requestedIndex = -1;
@@ -677,8 +679,10 @@ void QDeclarativeGridViewPrivate::createHighlight()
highlightYAnimator = new QSmoothedAnimation(q);
highlightYAnimator->target = QDeclarativeProperty(highlight->item, QLatin1String("y"));
highlightYAnimator->userDuration = highlightMoveDuration;
- highlightXAnimator->restart();
- highlightYAnimator->restart();
+ if (autoHighlight) {
+ highlightXAnimator->restart();
+ highlightYAnimator->restart();
+ }
changed = true;
}
}
@@ -690,7 +694,7 @@ void QDeclarativeGridViewPrivate::updateHighlight()
{
if ((!currentItem && highlight) || (currentItem && !highlight))
createHighlight();
- if (currentItem && autoHighlight && highlight && !moving) {
+ if (currentItem && autoHighlight && highlight && !movingHorizontally && !movingVertically) {
// auto-update highlight
highlightXAnimator->to = currentItem->item->x();
highlightYAnimator->to = currentItem->item->y();
@@ -804,7 +808,8 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
Q_Q(QDeclarativeGridView);
moveReason = Mouse;
- if ((!haveHighlightRange || highlightRange != QDeclarativeGridView::StrictlyEnforceRange) && snapMode == QDeclarativeGridView::NoSnap) {
+ if ((!haveHighlightRange || highlightRange != QDeclarativeGridView::StrictlyEnforceRange)
+ && snapMode == QDeclarativeGridView::NoSnap) {
QDeclarativeFlickablePrivate::flick(data, minExtent, maxExtent, vSize, fixupCallback, velocity);
return;
}
@@ -855,10 +860,13 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
qreal adjDist = -data.flickTarget + data.move.value();
if (qAbs(adjDist) > qAbs(dist)) {
// Prevent painfully slow flicking - adjust velocity to suit flickDeceleration
- v2 = accel * 2.0f * qAbs(dist);
- v = qSqrt(v2);
- if (dist > 0)
- v = -v;
+ qreal adjv2 = accel * 2.0f * qAbs(adjDist);
+ if (adjv2 > v2) {
+ v2 = adjv2;
+ v = qSqrt(v2);
+ if (dist > 0)
+ v = -v;
+ }
}
dist = adjDist;
accel = v2 / (2.0f * qAbs(dist));
@@ -869,9 +877,18 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
timeline.reset(data.move);
timeline.accel(data.move, v, accel, maxDistance + overshootDist);
timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this));
- flicked = true;
- emit q->flickingChanged();
- emit q->flickStarted();
+ if (!flickingHorizontally && q->xflick()) {
+ flickingHorizontally = true;
+ emit q->flickingChanged();
+ emit q->flickingHorizontallyChanged();
+ emit q->flickStarted();
+ }
+ if (!flickingVertically && q->yflick()) {
+ flickingVertically = true;
+ emit q->flickingChanged();
+ emit q->flickingVerticallyChanged();
+ emit q->flickStarted();
+ }
} else {
timeline.reset(data.move);
fixup(data, minExtent, maxExtent);
@@ -905,6 +922,9 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
In this case ListModel is a handy way for us to test our UI. In practice
the model would be implemented in C++, or perhaps via a SQL data source.
+ Delegates are instantiated as needed and may be destroyed at any time.
+ State should \e never be stored in a delegate.
+
\bold Note that views do not enable \e clip automatically. If the view
is not clipped by another item or the screen, it will be necessary
to set \e {clip: true} in order to have the out of view items clipped
@@ -958,7 +978,7 @@ QDeclarativeGridView::~QDeclarativeGridView()
id: wrapper
GridView.onRemove: SequentialAnimation {
PropertyAction { target: wrapper; property: "GridView.delayRemove"; value: true }
- NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing.type: "InOutQuad" }
+ NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing.type: Easing.InOutQuad }
PropertyAction { target: wrapper; property: "GridView.delayRemove"; value: false }
}
}
@@ -1019,13 +1039,14 @@ void QDeclarativeGridView::setModel(const QVariant &model)
d->model = vim;
} else {
if (!d->ownModel) {
- d->model = new QDeclarativeVisualDataModel(qmlContext(this));
+ d->model = new QDeclarativeVisualDataModel(qmlContext(this), this);
d->ownModel = true;
}
if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model))
dataModel->setModel(model);
}
if (d->model) {
+ d->bufferMode = QDeclarativeGridViewPrivate::BufferBefore | QDeclarativeGridViewPrivate::BufferAfter;
if (isComponentComplete()) {
refill();
if (d->currentIndex >= d->model->count() || d->currentIndex < 0) {
@@ -1047,12 +1068,17 @@ void QDeclarativeGridView::setModel(const QVariant &model)
}
/*!
- \qmlproperty component GridView::delegate
+ \qmlproperty Component GridView::delegate
The delegate provides a template defining each item instantiated by the view.
The index is exposed as an accessible \c index property. Properties of the
model are also available depending upon the type of \l {qmlmodels}{Data Model}.
+ The number of elements in the delegate has a direct effect on the
+ flicking performance of the view. If at all possible, place functionality
+ that is not needed for the normal display of the delegate in a \l Loader which
+ can load additional elements when needed.
+
Note that the GridView will layout the items based on the size of the root item
in the delegate.
@@ -1160,7 +1186,7 @@ int QDeclarativeGridView::count() const
}
/*!
- \qmlproperty component GridView::highlight
+ \qmlproperty Component GridView::highlight
This property holds the component to use as the highlight.
An instance of the highlight component will be created for each view.
@@ -1202,8 +1228,8 @@ void QDeclarativeGridView::setHighlight(QDeclarativeComponent *highlight)
id: myHighlight
Rectangle {
id: wrapper; color: "lightsteelblue"; radius: 4; width: 320; height: 60
- SpringFollow on y { source: Wrapper.GridView.view.currentItem.y; spring: 3; damping: 0.2 }
- SpringFollow on x { source: Wrapper.GridView.view.currentItem.x; spring: 3; damping: 0.2 }
+ SpringFollow on y { source: wrapper.GridView.view.currentItem.y; spring: 3; damping: 0.2 }
+ SpringFollow on x { source: wrapper.GridView.view.currentItem.x; spring: 3; damping: 0.2 }
}
}
\endcode
@@ -1219,7 +1245,12 @@ void QDeclarativeGridView::setHighlightFollowsCurrentItem(bool autoHighlight)
Q_D(QDeclarativeGridView);
if (d->autoHighlight != autoHighlight) {
d->autoHighlight = autoHighlight;
- d->updateHighlight();
+ if (autoHighlight) {
+ d->updateHighlight();
+ } else if (d->highlightXAnimator) {
+ d->highlightXAnimator->stop();
+ d->highlightYAnimator->stop();
+ }
}
}
@@ -1271,17 +1302,17 @@ void QDeclarativeGridView::setHighlightMoveDuration(int duration)
highlight range. Furthermore, the behaviour of the current item index will occur
whether or not a highlight exists.
- If highlightRangeMode is set to \e ApplyRange the view will
+ If highlightRangeMode is set to \e GridView.ApplyRange the view will
attempt to maintain the highlight within the range, however
the highlight can move outside of the range at the ends of the list
or due to a mouse interaction.
- If highlightRangeMode is set to \e StrictlyEnforceRange the highlight will never
+ If highlightRangeMode is set to \e GridView.StrictlyEnforceRange the highlight will never
move outside of the range. This means that the current item will change
if a keyboard or mouse action would cause the highlight to move
outside of the range.
- The default value is \e NoHighlightRange.
+ The default value is \e GridView.NoHighlightRange.
Note that a valid range requires preferredHighlightEnd to be greater
than or equal to preferredHighlightBegin.
@@ -1339,10 +1370,10 @@ void QDeclarativeGridView::setHighlightRangeMode(HighlightRangeMode mode)
\qmlproperty enumeration GridView::flow
This property holds the flow of the grid.
- Possible values are \c LeftToRight (default) and \c TopToBottom.
+ Possible values are \c GridView.LeftToRight (default) and \c GridView.TopToBottom.
- If \a flow is \c LeftToRight, the view will scroll vertically.
- If \a flow is \c TopToBottom, the view will scroll horizontally.
+ If \a flow is \c GridView.LeftToRight, the view will scroll vertically.
+ If \a flow is \c GridView.TopToBottom, the view will scroll horizontally.
*/
QDeclarativeGridView::Flow QDeclarativeGridView::flow() const
{
@@ -1357,10 +1388,10 @@ void QDeclarativeGridView::setFlow(Flow flow)
d->flow = flow;
if (d->flow == LeftToRight) {
setContentWidth(-1);
- setFlickDirection(QDeclarativeFlickable::VerticalFlick);
+ setFlickableDirection(QDeclarativeFlickable::VerticalFlick);
} else {
setContentHeight(-1);
- setFlickDirection(QDeclarativeFlickable::HorizontalFlick);
+ setFlickableDirection(QDeclarativeFlickable::HorizontalFlick);
}
d->clear();
d->updateGrid();
@@ -1393,12 +1424,23 @@ void QDeclarativeGridView::setWrapEnabled(bool wrap)
}
/*!
- \qmlproperty int GridView::cacheBuffer
- This property holds the number of off-screen pixels to cache.
-
- This property determines the number of pixels above the top of the view
- and below the bottom of the view to cache. Setting this value can make
- scrolling the view smoother at the expense of additional memory usage.
+ \qmlproperty int GridView::cacheBuffer
+ This property determines whether delegates are retained outside the
+ visible area of the view.
+
+ If non-zero the view will keep as many delegates
+ instantiated as will fit within the buffer specified. For example,
+ if in a vertical view the delegate is 20 pixels high and \c cacheBuffer is
+ set to 40, then up to 2 delegates above and 2 delegates below the visible
+ area may be retained.
+
+ Note that cacheBuffer is not a pixel buffer - it only maintains additional
+ instantiated delegates.
+
+ Setting this value can make scrolling the list smoother at the expense
+ of additional memory usage. It is not a substitute for creating efficient
+ delegates; the fewer elements in a delegate, the faster a view may be
+ scrolled.
*/
int QDeclarativeGridView::cacheBuffer() const
{
@@ -1465,10 +1507,10 @@ void QDeclarativeGridView::setCellHeight(int cellHeight)
The allowed values are:
\list
- \o NoSnap (default) - the view will stop anywhere within the visible area.
- \o SnapToRow - the view will settle with a row (or column for TopToBottom flow)
+ \o GridView.NoSnap (default) - the view will stop anywhere within the visible area.
+ \o GridView.SnapToRow - the view will settle with a row (or column for TopToBottom flow)
aligned with the start of the view.
- \o SnapOneRow - the view will settle no more than one row (or column for TopToBottom flow)
+ \o GridView.SnapOneRow - the view will settle no more than one row (or column for TopToBottom flow)
away from the first visible row at the time the mouse button is released.
This mode is particularly useful for moving one page at a time.
\endlist
@@ -1505,7 +1547,7 @@ void QDeclarativeGridView::viewportMoved()
Q_D(QDeclarativeGridView);
QDeclarativeFlickable::viewportMoved();
d->lazyRelease = true;
- if (d->flicked) {
+ if (d->flickingHorizontally || d->flickingVertically) {
if (yflick()) {
if (d->vData.velocity > 0)
d->bufferMode = QDeclarativeGridViewPrivate::BufferBefore;
@@ -1521,7 +1563,7 @@ void QDeclarativeGridView::viewportMoved()
}
}
refill();
- if (isFlicking() || d->moving)
+ if (d->flickingHorizontally || d->flickingVertically || d->movingHorizontally || d->movingVertically)
d->moveReason = QDeclarativeGridViewPrivate::Mouse;
if (d->moveReason != QDeclarativeGridViewPrivate::SetIndex) {
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange && d->highlight) {
@@ -1616,6 +1658,9 @@ qreal QDeclarativeGridView::maxXExtent() const
void QDeclarativeGridView::keyPressEvent(QKeyEvent *event)
{
Q_D(QDeclarativeGridView);
+ keyPressPreHandler(event);
+ if (event->isAccepted())
+ return;
if (d->model && d->model->count() && d->interactive) {
d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
int oldCurrent = currentIndex();
@@ -1641,10 +1686,8 @@ void QDeclarativeGridView::keyPressEvent(QKeyEvent *event)
}
}
d->moveReason = QDeclarativeGridViewPrivate::Other;
- QDeclarativeFlickable::keyPressEvent(event);
- if (event->isAccepted())
- return;
event->ignore();
+ QDeclarativeFlickable::keyPressEvent(event);
}
/*!
@@ -1860,7 +1903,8 @@ void QDeclarativeGridView::trackedPositionChanged()
Q_D(QDeclarativeGridView);
if (!d->trackedItem || !d->currentItem)
return;
- if (!isFlicking() && !d->moving && d->moveReason == QDeclarativeGridViewPrivate::SetIndex) {
+ if (!d->flickingHorizontally && !d->flickingVertically && !d->movingHorizontally && !d->movingVertically
+ && d->moveReason == QDeclarativeGridViewPrivate::SetIndex) {
const qreal trackedPos = d->trackedItem->rowPos();
const qreal viewPos = d->position();
if (d->haveHighlightRange) {
diff --git a/src/declarative/graphicsitems/qdeclarativegridview_p.h b/src/declarative/graphicsitems/qdeclarativegridview_p.h
index c06879e..2bf154c 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativegridview_p.h
@@ -82,6 +82,8 @@ class Q_DECLARATIVE_EXPORT QDeclarativeGridView : public QDeclarativeFlickable
Q_ENUMS(HighlightRangeMode)
Q_ENUMS(SnapMode)
+ Q_ENUMS(Flow)
+ Q_ENUMS(PositionMode)
Q_CLASSINFO("DefaultProperty", "data")
public:
@@ -120,7 +122,6 @@ public:
qreal preferredHighlightEnd() const;
void setPreferredHighlightEnd(qreal);
- Q_ENUMS(Flow)
enum Flow { LeftToRight, TopToBottom };
Flow flow() const;
void setFlow(Flow);
@@ -142,7 +143,6 @@ public:
void setSnapMode(SnapMode mode);
enum PositionMode { Beginning, Center, End, Visible, Contain };
- Q_ENUMS(PositionMode);
Q_INVOKABLE void positionViewAtIndex(int index, int mode);
Q_INVOKABLE int indexAt(int x, int y) const;
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index 247e348..4593cf8 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -54,68 +54,42 @@ QT_BEGIN_NAMESPACE
\brief The Image element allows you to add bitmaps to a scene.
\inherits Item
- The Image element supports untransformed, stretched and tiled.
+ An Image element displays a specified \l source image:
- For an explanation of stretching and tiling, see the fillMode property description.
-
- Examples:
\table
\row
- \o \image declarative-qtlogo1.png
- \o Untransformed
- \qml
- Image { source: "pics/qtlogo.png" }
- \endqml
- \row
- \o \image declarative-qtlogo2.png
- \o fillMode: Stretch (default)
- \qml
- Image {
- width: 160
- height: 160
- source: "pics/qtlogo.png"
- }
- \endqml
- \row
- \o \image declarative-qtlogo3.png
- \o fillMode: Tile
- \qml
- Image {
- fillMode: Image.Tile
- width: 160; height: 160
- source: "pics/qtlogo.png"
- }
- \endqml
- \row
- \o \image declarative-qtlogo6.png
- \o fillMode: TileVertically
- \qml
- Image {
- fillMode: Image.TileVertically
- width: 160; height: 160
- source: "pics/qtlogo.png"
- }
- \endqml
- \row
- \o \image declarative-qtlogo5.png
- \o fillMode: TileHorizontally
- \qml
- Image {
- fillMode: Image.TileHorizontally
- width: 160; height: 160
- source: "pics/qtlogo.png"
- }
+ \o \image declarative-qtlogo.png
+ \o \qml
+ import Qt 4.7
+
+ Image { source: "qtlogo.png" }
\endqml
\endtable
- */
+
+ If a size is not specified explicitly, the Image element is sized to the loaded image.
+ Image elements can be stretched and tiled using the \l fillMode property.
+
+ If the image \l source is a network resource, the image is loaded asynchronous and the
+ \l progress and \l status properties are updated appropriately. Otherwise, if the image is
+ available locally, it is loaded immediately and the user interface is blocked until loading is
+ complete. (This is typically the correct behavior for user interface elements.)
+ For large local images, which do not need to be visible immediately, it may be preferable to
+ enable \l asynchronous loading. This loads the image in the background using a low priority thread.
+
+ Images are cached and shared internally, so if several Image elements have the same source
+ only one copy of the image will be loaded.
+
+ \bold Note: Images are often the greatest user of memory in QML user interfaces. It is recommended
+ that images which do not form part of the user interface have their
+ size bounded via the \l sourceSize property. This is especially important for content
+ that is loaded from external sources or provided by the user.
+*/
/*!
\internal
\class QDeclarativeImage Image
\brief The QDeclarativeImage class provides an image item that you can add to a QDeclarativeView.
- \ingroup group_coreitems
-
Example:
\qml
Image { source: "pics/star.png" }
@@ -181,15 +155,85 @@ void QDeclarativeImagePrivate::setPixmap(const QPixmap &pixmap)
than the size of the item.
\list
- \o Stretch - the image is scaled to fit
- \o PreserveAspectFit - the image is scaled uniformly to fit without cropping
- \o PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary
- \o Tile - the image is duplicated horizontally and vertically
- \o TileVertically - the image is stretched horizontally and tiled vertically
- \o TileHorizontally - the image is stretched vertically and tiled horizontally
+ \o Image.Stretch - the image is scaled to fit
+ \o Image.PreserveAspectFit - the image is scaled uniformly to fit without cropping
+ \o Image.PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary
+ \o Image.Tile - the image is duplicated horizontally and vertically
+ \o Image.TileVertically - the image is stretched horizontally and tiled vertically
+ \o Image.TileHorizontally - the image is stretched vertically and tiled horizontally
\endlist
- \image declarative-image_fillMode.gif
+ \table
+
+ \row
+ \o \image declarative-qtlogo-stretch.png
+ \o Stretch (default)
+ \qml
+ Image {
+ width: 130; height: 100
+ smooth: true
+ source: "qtlogo.png"
+ }
+ \endqml
+
+ \row
+ \o \image declarative-qtlogo-preserveaspectfit.png
+ \o PreserveAspectFit
+ \qml
+ Image {
+ width: 130; height: 100
+ fillMode: Image.PreserveAspectFit
+ smooth: true
+ source: "qtlogo.png"
+ }
+ \endqml
+
+ \row
+ \o \image declarative-qtlogo-preserveaspectcrop.png
+ \o PreserveAspectCrop
+ \qml
+ Image {
+ width: 130; height: 100
+ fillMode: Image.PreserveAspectCrop
+ smooth: true
+ source: "qtlogo.png"
+ }
+ \endqml
+
+ \row
+ \o \image declarative-qtlogo-tile.png
+ \o Tile
+ \qml
+ Image {
+ width: 120; height: 120
+ fillMode: Image.Tile
+ source: "qtlogo.png"
+ }
+ \endqml
+
+ \row
+ \o \image declarative-qtlogo-tilevertically.png
+ \o TileVertically
+ \qml
+ Image {
+ width: 120; height: 120
+ fillMode: Image.TileVertically
+ source: "qtlogo.png"
+ }
+ \endqml
+
+ \row
+ \o \image declarative-qtlogo-tilehorizontally.png
+ \o TileHorizontally
+ \qml
+ Image {
+ width: 120; height: 120
+ fillMode: Image.TileHorizontally
+ source: "qtlogo.png"
+ }
+ \endqml
+
+ \endtable
*/
QDeclarativeImage::FillMode QDeclarativeImage::fillMode() const
{
@@ -225,24 +269,37 @@ qreal QDeclarativeImage::paintedHeight() const
This property holds the status of image loading. It can be one of:
\list
- \o Null - no image has been set
- \o Ready - the image has been loaded
- \o Loading - the image is currently being loaded
- \o Error - an error occurred while loading the image
+ \o Image.Null - no image has been set
+ \o Image.Ready - the image has been loaded
+ \o Image.Loading - the image is currently being loaded
+ \o Image.Error - an error occurred while loading the image
\endlist
Note that a change in the status property does not cause anything to happen
(although it reflects what has happened with the image internally). If you wish
to react to the change in status you need to do it yourself, for example in one
of the following ways:
- \list
- \o Create a state, so that a state change occurs, e.g.
- \qml State { name: 'loaded'; when: image.status = Image.Ready } \endqml
- \o Do something inside the onStatusChanged signal handler, e.g.
- \qml Image { id: image; onStatusChanged: if (image.status == Image.Ready) console.log('Loaded') } \endqml
- \o Bind to the status variable somewhere, e.g.
- \qml Text { text: if (image.status != Image.Ready) { 'Not Loaded' } else { 'Loaded' } } \endqml
- \endlist
+
+ Use this status to provide an update or respond to the status change in some way.
+ For example, you could:
+
+ \e {Trigger a state change:}
+ \qml
+ State { name: 'loaded'; when: image.status = Image.Ready }
+ \endqml
+
+ \e {Implement an \c onStatusChanged signal handler:}
+ \qml
+ Image {
+ id: image
+ onStatusChanged: if (image.status == Image.Ready) console.log('Loaded')
+ }
+ \endqml
+
+ \e {Bind to the status value:}
+ \qml
+ Text { text: image.status != Image.Ready ? 'Not Loaded' : 'Loaded' }
+ \endqml
\sa progress
*/
@@ -272,30 +329,54 @@ qreal QDeclarativeImage::paintedHeight() const
/*!
\qmlproperty QSize Image::sourceSize
- This properties is the size of the loaded image, in pixels.
-
- If you set this property explicitly, you can to control the storage
- used by a loaded image. The image will be scaled down if its intrinsic size
- is greater than this value.
-
- If only one dimension of the size is set (and the other left at 0), the
- unset dimension will be set in proportion to the set dimension to preserve
- the source image aspect ratio. The fillMode is independent of this.
+ This property holds the size of the loaded image, in pixels.
- Unlike setting the width and height properties, which merely scale the painting
- of the image, this property affects the number of pixels stored.
-
- \e{Changing this property dynamically will lead to the image source being reloaded,
- potentially even from the network if it is not in the disk cache.}
+ This is used to control the storage used by a loaded image. Unlike
+ the width and height properties, which scale the painting of the image, this property
+ affects the number of pixels stored.
+ If the image's actual size is larger than the sourceSize, the image is scaled down.
+ If only one dimension of the size is set to greater than 0, the
+ other dimension is set in proportion to preserve the source image's aspect ratio.
+ (The \l fillMode is independent of this.)
+
If the source is an instrinsically scalable image (eg. SVG), this property
- determines the size of the loaded image regardless of intrinsic size. You should
- avoid changing this property dynamically - rendering an SVG is \e slow compared
+ determines the size of the loaded image regardless of intrinsic size.
+ Avoid changing this property dynamically; rendering an SVG is \e slow compared
to an image.
If the source is a non-scalable image (eg. JPEG), the loaded image will
be no greater than this property specifies. For some formats (currently only JPEG),
the whole image will never actually be loaded into memory.
+
+ \note \e{Changing this property dynamically will lead to the image source being reloaded,
+ potentially even from the network if it is not in the disk cache.}
+
+ Here is an example that ensures the size of the image in memory is
+ no larger than 1024x1024 pixels, regardless of the size of the Image element.
+
+ \code
+ Image {
+ anchors.fill: parent
+ source: "images/reallyBigImage.jpg"
+ sourceSize.width: 1024
+ sourceSize.height: 1024
+ }
+ \endcode
+
+ The example below ensures the memory used by the image is no more than necessary
+ to display the image at the size of the Image element.
+ Of course if the Image element is resized a costly reload will be required, so
+ use this technique \e only when the Image size is fixed.
+
+ \code
+ Image {
+ anchors.fill: parent
+ source: "images/reallyBigImage.jpg"
+ sourceSize.width: width
+ sourceSize.height: height
+ }
+ \endcode
*/
void QDeclarativeImage::updatePaintedGeometry()
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 096e4bf..9547884 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -219,46 +219,9 @@ QT_BEGIN_NAMESPACE
The angle to rotate, in degrees clockwise.
*/
-
-/*!
- \group group_animation
- \title Animation
-*/
-
-/*!
- \group group_coreitems
- \title Basic Items
-*/
-
-/*!
- \group group_layouts
- \title Layouts
-*/
-
-/*!
- \group group_states
- \title States and Transitions
-*/
-
-/*!
- \group group_utility
- \title Utility
-*/
-
-/*!
- \group group_views
- \title Views
-*/
-
-/*!
- \group group_widgets
- \title Widgets
-*/
-
/*!
\internal
\class QDeclarativeContents
- \ingroup group_utility
\brief The QDeclarativeContents class gives access to the height and width of an item's contents.
*/
@@ -267,62 +230,93 @@ QDeclarativeContents::QDeclarativeContents() : m_x(0), m_y(0), m_width(0), m_hei
{
}
+QDeclarativeContents::~QDeclarativeContents()
+{
+ QList<QGraphicsItem *> children = m_item->childItems();
+ for (int i = 0; i < children.count(); ++i) {
+ QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(i));
+ if(!child)//### Should this be ignoring non-QDeclarativeItem graphicsobjects?
+ continue;
+ QDeclarativeItemPrivate::get(child)->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry | QDeclarativeItemPrivate::Destroyed);
+ }
+}
+
QRectF QDeclarativeContents::rectF() const
{
return QRectF(m_x, m_y, m_width, m_height);
}
-//TODO: optimization: only check sender(), if there is one
-void QDeclarativeContents::calcHeight()
+void QDeclarativeContents::calcHeight(QDeclarativeItem *changed)
{
qreal oldy = m_y;
qreal oldheight = m_height;
- qreal top = FLT_MAX;
- qreal bottom = 0;
-
- QList<QGraphicsItem *> children = m_item->childItems();
- for (int i = 0; i < children.count(); ++i) {
- QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(i));
- if(!child)//### Should this be ignoring non-QDeclarativeItem graphicsobjects?
- continue;
- qreal y = child->y();
- if (y + child->height() > bottom)
- bottom = y + child->height();
+ if (changed) {
+ qreal top = oldy;
+ qreal bottom = oldy + oldheight;
+ qreal y = changed->y();
+ if (y + changed->height() > bottom)
+ bottom = y + changed->height();
if (y < top)
top = y;
- }
- if (!children.isEmpty())
m_y = top;
- m_height = qMax(bottom - top, qreal(0.0));
+ m_height = bottom - top;
+ } else {
+ qreal top = FLT_MAX;
+ qreal bottom = 0;
+ QList<QGraphicsItem *> children = m_item->childItems();
+ for (int i = 0; i < children.count(); ++i) {
+ QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(i));
+ if(!child)//### Should this be ignoring non-QDeclarativeItem graphicsobjects?
+ continue;
+ qreal y = child->y();
+ if (y + child->height() > bottom)
+ bottom = y + child->height();
+ if (y < top)
+ top = y;
+ }
+ if (!children.isEmpty())
+ m_y = top;
+ m_height = qMax(bottom - top, qreal(0.0));
+ }
if (m_height != oldheight || m_y != oldy)
emit rectChanged(rectF());
}
-//TODO: optimization: only check sender(), if there is one
-void QDeclarativeContents::calcWidth()
+void QDeclarativeContents::calcWidth(QDeclarativeItem *changed)
{
qreal oldx = m_x;
qreal oldwidth = m_width;
- qreal left = FLT_MAX;
- qreal right = 0;
-
- QList<QGraphicsItem *> children = m_item->childItems();
- for (int i = 0; i < children.count(); ++i) {
- QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(i));
- if(!child)//### Should this be ignoring non-QDeclarativeItem graphicsobjects?
- continue;
- qreal x = child->x();
- if (x + child->width() > right)
- right = x + child->width();
+ if (changed) {
+ qreal left = oldx;
+ qreal right = oldx + oldwidth;
+ qreal x = changed->x();
+ if (x + changed->width() > right)
+ right = x + changed->width();
if (x < left)
left = x;
- }
- if (!children.isEmpty())
m_x = left;
- m_width = qMax(right - left, qreal(0.0));
+ m_width = right - left;
+ } else {
+ qreal left = FLT_MAX;
+ qreal right = 0;
+ QList<QGraphicsItem *> children = m_item->childItems();
+ for (int i = 0; i < children.count(); ++i) {
+ QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(i));
+ if(!child)//### Should this be ignoring non-QDeclarativeItem graphicsobjects?
+ continue;
+ qreal x = child->x();
+ if (x + child->width() > right)
+ right = x + child->width();
+ if (x < left)
+ left = x;
+ }
+ if (!children.isEmpty())
+ m_x = left;
+ m_width = qMax(right - left, qreal(0.0));
+ }
if (m_width != oldwidth || m_x != oldx)
emit rectChanged(rectF());
@@ -331,25 +325,57 @@ void QDeclarativeContents::calcWidth()
void QDeclarativeContents::setItem(QDeclarativeItem *item)
{
m_item = item;
+ //### optimize
+ connect(this, SIGNAL(rectChanged(QRectF)), m_item, SIGNAL(childrenRectChanged(QRectF)));
QList<QGraphicsItem *> children = m_item->childItems();
for (int i = 0; i < children.count(); ++i) {
QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(children.at(i));
if(!child)//### Should this be ignoring non-QDeclarativeItem graphicsobjects?
continue;
- connect(child, SIGNAL(heightChanged()), this, SLOT(calcHeight()));
- connect(child, SIGNAL(yChanged()), this, SLOT(calcHeight()));
- connect(child, SIGNAL(widthChanged()), this, SLOT(calcWidth()));
- connect(child, SIGNAL(xChanged()), this, SLOT(calcWidth()));
- connect(this, SIGNAL(rectChanged(QRectF)), m_item, SIGNAL(childrenRectChanged(QRectF)));
+ QDeclarativeItemPrivate::get(child)->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry | QDeclarativeItemPrivate::Destroyed);
+ //###what about changes to visibility?
}
+ //### defer until componentComplete
+ calcHeight();
+ calcWidth();
+}
+
+void QDeclarativeContents::itemGeometryChanged(QDeclarativeItem *changed, const QRectF &newGeometry, const QRectF &oldGeometry)
+{
+ if (newGeometry.width() != oldGeometry.width())
+ calcWidth(changed);
+ if (newGeometry.height() != oldGeometry.height())
+ calcHeight(changed);
+}
+
+void QDeclarativeContents::itemDestroyed(QDeclarativeItem *item)
+{
+ if (item)
+ QDeclarativeItemPrivate::get(item)->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry | QDeclarativeItemPrivate::Destroyed);
+ calcWidth();
calcHeight();
+}
+
+void QDeclarativeContents::childRemoved(QDeclarativeItem *item)
+{
+ if (item)
+ QDeclarativeItemPrivate::get(item)->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry | QDeclarativeItemPrivate::Destroyed);
calcWidth();
+ calcHeight();
+}
+
+void QDeclarativeContents::childAdded(QDeclarativeItem *item)
+{
+ if (item)
+ QDeclarativeItemPrivate::get(item)->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry | QDeclarativeItemPrivate::Destroyed);
+ calcWidth(item);
+ calcHeight(item);
}
QDeclarativeItemKeyFilter::QDeclarativeItemKeyFilter(QDeclarativeItem *item)
-: m_next(0)
+: m_processPost(false), m_next(0)
{
QDeclarativeItemPrivate *p =
item?static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(item)):0;
@@ -363,19 +389,19 @@ QDeclarativeItemKeyFilter::~QDeclarativeItemKeyFilter()
{
}
-void QDeclarativeItemKeyFilter::keyPressed(QKeyEvent *event)
+void QDeclarativeItemKeyFilter::keyPressed(QKeyEvent *event, bool post)
{
- if (m_next) m_next->keyPressed(event);
+ if (m_next) m_next->keyPressed(event, post);
}
-void QDeclarativeItemKeyFilter::keyReleased(QKeyEvent *event)
+void QDeclarativeItemKeyFilter::keyReleased(QKeyEvent *event, bool post)
{
- if (m_next) m_next->keyReleased(event);
+ if (m_next) m_next->keyReleased(event, post);
}
-void QDeclarativeItemKeyFilter::inputMethodEvent(QInputMethodEvent *event)
+void QDeclarativeItemKeyFilter::inputMethodEvent(QInputMethodEvent *event, bool post)
{
- if (m_next) m_next->inputMethodEvent(event);
+ if (m_next) m_next->inputMethodEvent(event, post);
}
QVariant QDeclarativeItemKeyFilter::inputMethodQuery(Qt::InputMethodQuery query) const
@@ -437,14 +463,16 @@ void QDeclarativeItemKeyFilter::componentComplete()
}
\endcode
- KeyNavigation receives key events after the item it is attached to.
+ By default KeyNavigation receives key events after the item it is attached to.
If the item accepts an arrow key event, the KeyNavigation
- attached property will not receive an event for that key.
+ attached property will not receive an event for that key. Setting the
+ \l priority property to KeyNavigation.BeforeItem allows handling
+ of the key events before normal item processing.
If an item has been set for a direction and the KeyNavigation
attached property receives the corresponding
key press and release events, the events will be accepted by
- KeyNaviagtion and will not propagate any further.
+ KeyNavigation and will not propagate any further.
\sa {Keys}{Keys attached property}
*/
@@ -464,6 +492,7 @@ QDeclarativeKeyNavigationAttached::QDeclarativeKeyNavigationAttached(QObject *pa
: QObject(*(new QDeclarativeKeyNavigationAttachedPrivate), parent),
QDeclarativeItemKeyFilter(qobject_cast<QDeclarativeItem*>(parent))
{
+ m_processPost = true;
}
QDeclarativeKeyNavigationAttached *
@@ -550,12 +579,45 @@ void QDeclarativeKeyNavigationAttached::setBacktab(QDeclarativeItem *i)
emit changed();
}
-void QDeclarativeKeyNavigationAttached::keyPressed(QKeyEvent *event)
+/*!
+ \qmlproperty enumeration KeyNavigation::priority
+
+ This property determines whether the keys are processed before
+ or after the attached item's own key handling.
+
+ \list
+ \o KeyNavigation.BeforeItem - process the key events before normal
+ item key processing. If the event is accepted it will not
+ be passed on to the item.
+ \o KeyNavigation.AfterItem (default) - process the key events after normal item key
+ handling. If the item accepts the key event it will not be
+ handled by the KeyNavigation attached property handler.
+ \endlist
+*/
+QDeclarativeKeyNavigationAttached::Priority QDeclarativeKeyNavigationAttached::priority() const
+{
+ return m_processPost ? AfterItem : BeforeItem;
+}
+
+void QDeclarativeKeyNavigationAttached::setPriority(Priority order)
{
- Q_D(QDeclarativeKeyNavigationAttached);
+ bool processPost = order == AfterItem;
+ if (processPost != m_processPost) {
+ m_processPost = processPost;
+ emit priorityChanged();
+ }
+}
+void QDeclarativeKeyNavigationAttached::keyPressed(QKeyEvent *event, bool post)
+{
+ Q_D(QDeclarativeKeyNavigationAttached);
event->ignore();
+ if (post != m_processPost) {
+ QDeclarativeItemKeyFilter::keyPressed(event, post);
+ return;
+ }
+
switch(event->key()) {
case Qt::Key_Left:
if (d->left) {
@@ -597,15 +659,19 @@ void QDeclarativeKeyNavigationAttached::keyPressed(QKeyEvent *event)
break;
}
- if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyPressed(event);
+ if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyPressed(event, post);
}
-void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event)
+void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post)
{
Q_D(QDeclarativeKeyNavigationAttached);
-
event->ignore();
+ if (post != m_processPost) {
+ QDeclarativeItemKeyFilter::keyReleased(event, post);
+ return;
+ }
+
switch(event->key()) {
case Qt::Key_Left:
if (d->left) {
@@ -641,7 +707,7 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event)
break;
}
- if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyReleased(event);
+ if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyReleased(event, post);
}
/*!
@@ -683,6 +749,28 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event)
See \l {Qt::Key}{Qt.Key} for the list of keyboard codes.
+ If priority is Keys.BeforeItem (default) the order of key event processing is:
+
+ \list 1
+ \o Items specified in \c forwardTo
+ \o specific key handlers, e.g. onReturnPressed
+ \o onKeyPress, onKeyRelease handlers
+ \o Item specific key handling, e.g. TextInput key handling
+ \o parent item
+ \endlist
+
+ If priority is Keys.AfterItem the order of key event processing is:
+ \list 1
+ \o Item specific key handling, e.g. TextInput key handling
+ \o Items specified in \c forwardTo
+ \o specific key handlers, e.g. onReturnPressed
+ \o onKeyPress, onKeyRelease handlers
+ \o parent item
+ \endlist
+
+ If the event is accepted during any of the above steps, key
+ propagation stops.
+
\sa KeyEvent, {KeyNavigation}{KeyNavigation attached property}
*/
@@ -694,7 +782,23 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event)
*/
/*!
- \qmlproperty List<Object> Keys::forwardTo
+ \qmlproperty enumeration Keys::priority
+
+ This property determines whether the keys are processed before
+ or after the attached item's own key handling.
+
+ \list
+ \o Keys.BeforeItem (default) - process the key events before normal
+ item key processing. If the event is accepted it will not
+ be passed on to the item.
+ \o Keys.AfterItem - process the key events after normal item key
+ handling. If the item accepts the key event it will not be
+ handled by the Keys attached property handler.
+ \endlist
+*/
+
+/*!
+ \qmlproperty list<Object> Keys::forwardTo
This property provides a way to forward key presses, key releases, and keyboard input
coming from input methods to other items. This can be useful when you want
@@ -1013,6 +1117,7 @@ QDeclarativeKeysAttached::QDeclarativeKeysAttached(QObject *parent)
QDeclarativeItemKeyFilter(qobject_cast<QDeclarativeItem*>(parent))
{
Q_D(QDeclarativeKeysAttached);
+ m_processPost = false;
d->item = qobject_cast<QDeclarativeItem*>(parent);
}
@@ -1020,6 +1125,20 @@ QDeclarativeKeysAttached::~QDeclarativeKeysAttached()
{
}
+QDeclarativeKeysAttached::Priority QDeclarativeKeysAttached::priority() const
+{
+ return m_processPost ? AfterItem : BeforeItem;
+}
+
+void QDeclarativeKeysAttached::setPriority(Priority order)
+{
+ bool processPost = order == AfterItem;
+ if (processPost != m_processPost) {
+ m_processPost = processPost;
+ emit priorityChanged();
+ }
+}
+
void QDeclarativeKeysAttached::componentComplete()
{
Q_D(QDeclarativeKeysAttached);
@@ -1034,11 +1153,12 @@ void QDeclarativeKeysAttached::componentComplete()
}
}
-void QDeclarativeKeysAttached::keyPressed(QKeyEvent *event)
+void QDeclarativeKeysAttached::keyPressed(QKeyEvent *event, bool post)
{
Q_D(QDeclarativeKeysAttached);
- if (!d->enabled || d->inPress) {
+ if (post != m_processPost || !d->enabled || d->inPress) {
event->ignore();
+ QDeclarativeItemKeyFilter::keyPressed(event, post);
return;
}
@@ -1073,14 +1193,15 @@ void QDeclarativeKeysAttached::keyPressed(QKeyEvent *event)
emit pressed(&ke);
event->setAccepted(ke.isAccepted());
- if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyPressed(event);
+ if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyPressed(event, post);
}
-void QDeclarativeKeysAttached::keyReleased(QKeyEvent *event)
+void QDeclarativeKeysAttached::keyReleased(QKeyEvent *event, bool post)
{
Q_D(QDeclarativeKeysAttached);
- if (!d->enabled || d->inRelease) {
+ if (post != m_processPost || !d->enabled || d->inRelease) {
event->ignore();
+ QDeclarativeItemKeyFilter::keyReleased(event, post);
return;
}
@@ -1103,13 +1224,13 @@ void QDeclarativeKeysAttached::keyReleased(QKeyEvent *event)
emit released(&ke);
event->setAccepted(ke.isAccepted());
- if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyReleased(event);
+ if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyReleased(event, post);
}
-void QDeclarativeKeysAttached::inputMethodEvent(QInputMethodEvent *event)
+void QDeclarativeKeysAttached::inputMethodEvent(QInputMethodEvent *event, bool post)
{
Q_D(QDeclarativeKeysAttached);
- if (d->item && !d->inIM && d->item->scene()) {
+ if (post == m_processPost && d->item && !d->inIM && d->item->scene()) {
d->inIM = true;
for (int ii = 0; ii < d->targets.count(); ++ii) {
QGraphicsItem *i = d->finalFocusProxy(d->targets.at(ii));
@@ -1124,7 +1245,7 @@ void QDeclarativeKeysAttached::inputMethodEvent(QInputMethodEvent *event)
}
d->inIM = false;
}
- if (!event->isAccepted()) QDeclarativeItemKeyFilter::inputMethodEvent(event);
+ if (!event->isAccepted()) QDeclarativeItemKeyFilter::inputMethodEvent(event, post);
}
class QDeclarativeItemAccessor : public QGraphicsItem
@@ -1168,7 +1289,10 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec
width and height, \l {anchor-layout}{anchoring} and key handling.
You can subclass QDeclarativeItem to provide your own custom visual item that inherits
- these features.
+ these features. Note that, because it does not draw anything, QDeclarativeItem sets the
+ QGraphicsItem::ItemHasNoContents flag. If you subclass QDeclarativeItem to create a visual
+ item, you will need to unset this flag.
+
*/
/*!
@@ -1258,8 +1382,6 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec
changes. For many properties in Item or Item derivatives this can be used
to add a touch of imperative logic to your application (when absolutely
necessary).
-
- \ingroup group_coreitems
*/
/*!
@@ -1388,6 +1510,7 @@ QDeclarativeItem::~QDeclarativeItem()
delete d->_anchorLines; d->_anchorLines = 0;
delete d->_anchors; d->_anchors = 0;
delete d->_stateGroup; d->_stateGroup = 0;
+ delete d->_contents; d->_contents = 0;
}
/*!
@@ -1407,7 +1530,7 @@ QDeclarativeItem::~QDeclarativeItem()
}
\endqml
- The default transform origin is \c Center.
+ The default transform origin is \c Item.Center.
*/
/*!
@@ -1472,11 +1595,6 @@ QDeclarativeItem *QDeclarativeItem::parentItem() const
*/
/*!
- \property QDeclarativeItem::resources
- \internal
-*/
-
-/*!
Returns true if construction of the QML component is complete; otherwise
returns false.
@@ -1491,18 +1609,6 @@ bool QDeclarativeItem::isComponentComplete() const
return d->_componentComplete;
}
-/*!
- \property QDeclarativeItem::anchors
- \internal
-*/
-
-/*! \internal */
-QDeclarativeAnchors *QDeclarativeItem::anchors()
-{
- Q_D(QDeclarativeItem);
- return d->anchors();
-}
-
void QDeclarativeItemPrivate::data_append(QDeclarativeListProperty<QObject> *prop, QObject *o)
{
if (!o)
@@ -1624,29 +1730,23 @@ void QDeclarativeItemPrivate::parentProperty(QObject *o, void *rv, QDeclarativeN
specify it.
*/
-/*!
- \property QDeclarativeItem::data
- \internal
-*/
-
/*! \internal */
-QDeclarativeListProperty<QObject> QDeclarativeItem::data()
+QDeclarativeListProperty<QObject> QDeclarativeItemPrivate::data()
{
- return QDeclarativeListProperty<QObject>(this, 0, QDeclarativeItemPrivate::data_append);
+ return QDeclarativeListProperty<QObject>(q_func(), 0, QDeclarativeItemPrivate::data_append);
}
/*!
\property QDeclarativeItem::childrenRect
\brief The geometry of an item's children.
- childrenRect provides an easy way to access the (collective) position and size of the item's children.
+ This property holds the (collective) position and size of the item's children.
*/
QRectF QDeclarativeItem::childrenRect()
{
Q_D(QDeclarativeItem);
if (!d->_contents) {
d->_contents = new QDeclarativeContents;
- QDeclarative_setParent_noEvent(d->_contents, this);
d->_contents->setItem(this);
}
return d->_contents->rectF();
@@ -1817,8 +1917,11 @@ void QDeclarativeItemPrivate::removeItemChangeListener(QDeclarativeItemChangeLis
void QDeclarativeItem::keyPressEvent(QKeyEvent *event)
{
Q_D(QDeclarativeItem);
+ keyPressPreHandler(event);
+ if (event->isAccepted())
+ return;
if (d->keyHandler)
- d->keyHandler->keyPressed(event);
+ d->keyHandler->keyPressed(event, true);
else
event->ignore();
}
@@ -1827,8 +1930,11 @@ void QDeclarativeItem::keyPressEvent(QKeyEvent *event)
void QDeclarativeItem::keyReleaseEvent(QKeyEvent *event)
{
Q_D(QDeclarativeItem);
+ keyReleasePreHandler(event);
+ if (event->isAccepted())
+ return;
if (d->keyHandler)
- d->keyHandler->keyReleased(event);
+ d->keyHandler->keyReleased(event, true);
else
event->ignore();
}
@@ -1837,8 +1943,11 @@ void QDeclarativeItem::keyReleaseEvent(QKeyEvent *event)
void QDeclarativeItem::inputMethodEvent(QInputMethodEvent *event)
{
Q_D(QDeclarativeItem);
+ inputMethodPreHandler(event);
+ if (event->isAccepted())
+ return;
if (d->keyHandler)
- d->keyHandler->inputMethodEvent(event);
+ d->keyHandler->inputMethodEvent(event, true);
else
event->ignore();
}
@@ -1857,99 +1966,93 @@ QVariant QDeclarativeItem::inputMethodQuery(Qt::InputMethodQuery query) const
return v;
}
-/*!
- \internal
-*/
-QDeclarativeAnchorLine QDeclarativeItem::left() const
+void QDeclarativeItem::keyPressPreHandler(QKeyEvent *event)
{
- Q_D(const QDeclarativeItem);
- return d->anchorLines()->left;
+ Q_D(QDeclarativeItem);
+ if (d->keyHandler && !d->doneEventPreHandler)
+ d->keyHandler->keyPressed(event, false);
+ else
+ event->ignore();
+ d->doneEventPreHandler = true;
}
-/*!
- \internal
-*/
-QDeclarativeAnchorLine QDeclarativeItem::right() const
+void QDeclarativeItem::keyReleasePreHandler(QKeyEvent *event)
{
- Q_D(const QDeclarativeItem);
- return d->anchorLines()->right;
+ Q_D(QDeclarativeItem);
+ if (d->keyHandler && !d->doneEventPreHandler)
+ d->keyHandler->keyReleased(event, false);
+ else
+ event->ignore();
+ d->doneEventPreHandler = true;
}
-/*!
- \internal
-*/
-QDeclarativeAnchorLine QDeclarativeItem::horizontalCenter() const
+void QDeclarativeItem::inputMethodPreHandler(QInputMethodEvent *event)
{
- Q_D(const QDeclarativeItem);
- return d->anchorLines()->hCenter;
+ Q_D(QDeclarativeItem);
+ if (d->keyHandler && !d->doneEventPreHandler)
+ d->keyHandler->inputMethodEvent(event, false);
+ else
+ event->ignore();
+ d->doneEventPreHandler = true;
}
+
/*!
\internal
*/
-QDeclarativeAnchorLine QDeclarativeItem::top() const
+QDeclarativeAnchorLine QDeclarativeItemPrivate::left() const
{
- Q_D(const QDeclarativeItem);
- return d->anchorLines()->top;
+ return anchorLines()->left;
}
/*!
\internal
*/
-QDeclarativeAnchorLine QDeclarativeItem::bottom() const
+QDeclarativeAnchorLine QDeclarativeItemPrivate::right() const
{
- Q_D(const QDeclarativeItem);
- return d->anchorLines()->bottom;
+ return anchorLines()->right;
}
/*!
\internal
*/
-QDeclarativeAnchorLine QDeclarativeItem::verticalCenter() const
+QDeclarativeAnchorLine QDeclarativeItemPrivate::horizontalCenter() const
{
- Q_D(const QDeclarativeItem);
- return d->anchorLines()->vCenter;
+ return anchorLines()->hCenter;
}
-
/*!
\internal
*/
-QDeclarativeAnchorLine QDeclarativeItem::baseline() const
+QDeclarativeAnchorLine QDeclarativeItemPrivate::top() const
{
- Q_D(const QDeclarativeItem);
- return d->anchorLines()->baseline;
+ return anchorLines()->top;
}
/*!
- \property QDeclarativeItem::top
- \internal
-*/
-
-/*!
- \property QDeclarativeItem::bottom
- \internal
-*/
-
-/*!
- \property QDeclarativeItem::left
- \internal
+ \internal
*/
+QDeclarativeAnchorLine QDeclarativeItemPrivate::bottom() const
+{
+ return anchorLines()->bottom;
+}
/*!
- \property QDeclarativeItem::right
- \internal
+ \internal
*/
+QDeclarativeAnchorLine QDeclarativeItemPrivate::verticalCenter() const
+{
+ return anchorLines()->vCenter;
+}
-/*!
- \property QDeclarativeItem::horizontalCenter
- \internal
-*/
/*!
- \property QDeclarativeItem::verticalCenter
- \internal
+ \internal
*/
+QDeclarativeAnchorLine QDeclarativeItemPrivate::baseline() const
+{
+ return anchorLines()->baseline;
+}
/*!
\qmlproperty AnchorLine Item::top
@@ -2291,9 +2394,9 @@ void QDeclarativeItemPrivate::focusChanged(bool flag)
}
/*! \internal */
-QDeclarativeListProperty<QObject> QDeclarativeItem::resources()
+QDeclarativeListProperty<QObject> QDeclarativeItemPrivate::resources()
{
- return QDeclarativeListProperty<QObject>(this, 0, QDeclarativeItemPrivate::resources_append,
+ return QDeclarativeListProperty<QObject>(q_func(), 0, QDeclarativeItemPrivate::resources_append,
QDeclarativeItemPrivate::resources_count,
QDeclarativeItemPrivate::resources_at);
}
@@ -2315,15 +2418,10 @@ QDeclarativeListProperty<QObject> QDeclarativeItem::resources()
\sa {qmlstate}{States}
*/
-/*!
- \property QDeclarativeItem::states
- \internal
-*/
/*! \internal */
-QDeclarativeListProperty<QDeclarativeState> QDeclarativeItem::states()
+QDeclarativeListProperty<QDeclarativeState> QDeclarativeItemPrivate::states()
{
- Q_D(QDeclarativeItem);
- return d->states()->statesProperty();
+ return _states()->statesProperty();
}
/*!
@@ -2343,16 +2441,11 @@ QDeclarativeListProperty<QDeclarativeState> QDeclarativeItem::states()
\sa {state-transitions}{Transitions}
*/
-/*!
- \property QDeclarativeItem::transitions
- \internal
-*/
/*! \internal */
-QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItem::transitions()
+QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transitions()
{
- Q_D(QDeclarativeItem);
- return d->states()->transitionsProperty();
+ return _states()->transitionsProperty();
}
/*
@@ -2426,20 +2519,18 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItem::transitions()
*/
/*! \internal */
-QString QDeclarativeItem::state() const
+QString QDeclarativeItemPrivate::state() const
{
- Q_D(const QDeclarativeItem);
- if (!d->_stateGroup)
+ if (!_stateGroup)
return QString();
else
- return d->_stateGroup->state();
+ return _stateGroup->state();
}
/*! \internal */
-void QDeclarativeItem::setState(const QString &state)
+void QDeclarativeItemPrivate::setState(const QString &state)
{
- Q_D(QDeclarativeItem);
- d->states()->setState(state);
+ _states()->setState(state);
}
/*!
@@ -2502,7 +2593,7 @@ void QDeclarativeItem::componentComplete()
d->keyHandler->componentComplete();
}
-QDeclarativeStateGroup *QDeclarativeItemPrivate::states()
+QDeclarativeStateGroup *QDeclarativeItemPrivate::_states()
{
Q_Q(QDeclarativeItem);
if (!_stateGroup) {
@@ -2618,6 +2709,16 @@ QVariant QDeclarativeItem::itemChange(GraphicsItemChange change,
}
}
break;
+ case ItemChildAddedChange:
+ if (d->_contents)
+ d->_contents->childAdded(qobject_cast<QDeclarativeItem*>(
+ value.value<QGraphicsItem*>()));
+ break;
+ case ItemChildRemovedChange:
+ if (d->_contents)
+ d->_contents->childRemoved(qobject_cast<QDeclarativeItem*>(
+ value.value<QGraphicsItem*>()));
+ break;
default:
break;
}
@@ -2723,29 +2824,48 @@ void QDeclarativeItem::setSmooth(bool smooth)
update();
}
+/*!
+ \internal
+ Return the width of the item
+*/
qreal QDeclarativeItem::width() const
{
Q_D(const QDeclarativeItem);
return d->width();
}
+/*!
+ \internal
+ Set the width of the item
+*/
void QDeclarativeItem::setWidth(qreal w)
{
Q_D(QDeclarativeItem);
d->setWidth(w);
}
+/*!
+ \internal
+ Reset the width of the item
+*/
void QDeclarativeItem::resetWidth()
{
Q_D(QDeclarativeItem);
d->resetWidth();
}
+/*!
+ \internal
+ Return the width of the item
+*/
qreal QDeclarativeItemPrivate::width() const
{
return mWidth;
}
+/*!
+ \internal
+*/
void QDeclarativeItemPrivate::setWidth(qreal w)
{
Q_Q(QDeclarativeItem);
@@ -2765,7 +2885,10 @@ void QDeclarativeItemPrivate::setWidth(qreal w)
QRectF(q->x(), q->y(), oldWidth, height()));
}
-void QDeclarativeItemPrivate ::resetWidth()
+/*!
+ \internal
+*/
+void QDeclarativeItemPrivate::resetWidth()
{
Q_Q(QDeclarativeItem);
widthValid = false;
@@ -2810,29 +2933,47 @@ bool QDeclarativeItem::widthValid() const
return d->widthValid;
}
+/*!
+ \internal
+ Return the height of the item
+*/
qreal QDeclarativeItem::height() const
{
Q_D(const QDeclarativeItem);
return d->height();
}
+/*!
+ \internal
+ Set the height of the item
+*/
void QDeclarativeItem::setHeight(qreal h)
{
Q_D(QDeclarativeItem);
d->setHeight(h);
}
+/*!
+ \internal
+ Reset the height of the item
+*/
void QDeclarativeItem::resetHeight()
{
Q_D(QDeclarativeItem);
d->resetHeight();
}
+/*!
+ \internal
+*/
qreal QDeclarativeItemPrivate::height() const
{
return mHeight;
}
+/*!
+ \internal
+*/
void QDeclarativeItemPrivate::setHeight(qreal h)
{
Q_Q(QDeclarativeItem);
@@ -2852,6 +2993,9 @@ void QDeclarativeItemPrivate::setHeight(qreal h)
QRectF(q->x(), q->y(), width(), oldHeight));
}
+/*!
+ \internal
+*/
void QDeclarativeItemPrivate::resetHeight()
{
Q_Q(QDeclarativeItem);
@@ -2956,7 +3100,6 @@ void QDeclarativeItem::setFocus(bool focus)
}
/*!
- \reimp
\internal
*/
void QDeclarativeItem::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
@@ -2964,11 +3107,21 @@ void QDeclarativeItem::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidg
}
/*!
- \reimp
\internal
*/
bool QDeclarativeItem::event(QEvent *ev)
{
+ Q_D(QDeclarativeItem);
+ switch (ev->type()) {
+ case QEvent::KeyPress:
+ case QEvent::KeyRelease:
+ case QEvent::InputMethod:
+ d->doneEventPreHandler = false;
+ break;
+ default:
+ break;
+ }
+
return QGraphicsObject::event(ev);
}
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h
index da5a36e..29fd241 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem.h
@@ -70,20 +70,20 @@ class Q_DECLARATIVE_EXPORT QDeclarativeItem : public QGraphicsObject, public QDe
Q_INTERFACES(QDeclarativeParserStatus)
Q_PROPERTY(QDeclarativeItem * parent READ parentItem WRITE setParentItem NOTIFY parentChanged DESIGNABLE false FINAL)
- Q_PROPERTY(QDeclarativeListProperty<QObject> data READ data DESIGNABLE false)
- Q_PROPERTY(QDeclarativeListProperty<QObject> resources READ resources DESIGNABLE false)
- Q_PROPERTY(QDeclarativeListProperty<QDeclarativeState> states READ states DESIGNABLE false)
- Q_PROPERTY(QDeclarativeListProperty<QDeclarativeTransition> transitions READ transitions DESIGNABLE false)
- Q_PROPERTY(QString state READ state WRITE setState NOTIFY stateChanged)
+ Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeListProperty<QObject> data READ data DESIGNABLE false)
+ Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeListProperty<QObject> resources READ resources DESIGNABLE false)
+ Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeListProperty<QDeclarativeState> states READ states DESIGNABLE false)
+ Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeListProperty<QDeclarativeTransition> transitions READ transitions DESIGNABLE false)
+ Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QString state READ state WRITE setState NOTIFY stateChanged)
Q_PROPERTY(QRectF childrenRect READ childrenRect NOTIFY childrenRectChanged DESIGNABLE false FINAL)
- Q_PROPERTY(QDeclarativeAnchors * anchors READ anchors DESIGNABLE false CONSTANT FINAL)
- Q_PROPERTY(QDeclarativeAnchorLine left READ left CONSTANT FINAL)
- Q_PROPERTY(QDeclarativeAnchorLine right READ right CONSTANT FINAL)
- Q_PROPERTY(QDeclarativeAnchorLine horizontalCenter READ horizontalCenter CONSTANT FINAL)
- Q_PROPERTY(QDeclarativeAnchorLine top READ top CONSTANT FINAL)
- Q_PROPERTY(QDeclarativeAnchorLine bottom READ bottom CONSTANT FINAL)
- Q_PROPERTY(QDeclarativeAnchorLine verticalCenter READ verticalCenter CONSTANT FINAL)
- Q_PROPERTY(QDeclarativeAnchorLine baseline READ baseline CONSTANT FINAL)
+ Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeAnchors * anchors READ anchors DESIGNABLE false CONSTANT FINAL)
+ Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeAnchorLine left READ left CONSTANT FINAL)
+ Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeAnchorLine right READ right CONSTANT FINAL)
+ Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeAnchorLine horizontalCenter READ horizontalCenter CONSTANT FINAL)
+ Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeAnchorLine top READ top CONSTANT FINAL)
+ Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeAnchorLine bottom READ bottom CONSTANT FINAL)
+ Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeAnchorLine verticalCenter READ verticalCenter CONSTANT FINAL)
+ Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeAnchorLine baseline READ baseline CONSTANT FINAL)
Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged)
Q_PROPERTY(bool clip READ clip WRITE setClip NOTIFY clipChanged) // ### move to QGI/QGO, NOTIFY
Q_PROPERTY(bool focus READ hasFocus WRITE setFocus NOTIFY focusChanged FINAL)
@@ -107,21 +107,11 @@ public:
QDeclarativeItem *parentItem() const;
void setParentItem(QDeclarativeItem *parent);
- QDeclarativeListProperty<QObject> data();
- QDeclarativeListProperty<QObject> resources();
-
- QDeclarativeAnchors *anchors();
QRectF childrenRect();
bool clip() const;
void setClip(bool);
- QDeclarativeListProperty<QDeclarativeState> states();
- QDeclarativeListProperty<QDeclarativeTransition> transitions();
-
- QString state() const;
- void setState(const QString &);
-
qreal baselineOffset() const;
void setBaselineOffset(qreal);
@@ -159,14 +149,6 @@ public:
Q_INVOKABLE QScriptValue mapToItem(const QScriptValue &item, qreal x, qreal y) const;
Q_INVOKABLE void forceFocus();
- QDeclarativeAnchorLine left() const;
- QDeclarativeAnchorLine right() const;
- QDeclarativeAnchorLine horizontalCenter() const;
- QDeclarativeAnchorLine top() const;
- QDeclarativeAnchorLine bottom() const;
- QDeclarativeAnchorLine verticalCenter() const;
- QDeclarativeAnchorLine baseline() const;
-
Q_SIGNALS:
void childrenChanged();
void childrenRectChanged(const QRectF &);
@@ -196,6 +178,10 @@ protected:
virtual void keyReleaseEvent(QKeyEvent *event);
virtual void inputMethodEvent(QInputMethodEvent *);
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
+ void keyPressPreHandler(QKeyEvent *);
+ void keyReleasePreHandler(QKeyEvent *);
+ void inputMethodPreHandler(QInputMethodEvent *);
+
virtual void geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry);
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h
index 3f5bf1a..15b34f0 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h
@@ -79,24 +79,32 @@ class QNetworkReply;
class QDeclarativeItemKeyFilter;
//### merge into private?
-class QDeclarativeContents : public QObject
+class QDeclarativeContents : public QObject, public QDeclarativeItemChangeListener
{
Q_OBJECT
public:
QDeclarativeContents();
+ ~QDeclarativeContents();
QRectF rectF() const;
void setItem(QDeclarativeItem *item);
-public Q_SLOTS:
- void calcHeight();
- void calcWidth();
+ void childRemoved(QDeclarativeItem *item);
+ void childAdded(QDeclarativeItem *item);
Q_SIGNALS:
void rectChanged(QRectF);
+protected:
+ void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry);
+ void itemDestroyed(QDeclarativeItem *item);
+ //void itemVisibilityChanged(QDeclarativeItem *item)
+
private:
+ void calcHeight(QDeclarativeItem *changed = 0);
+ void calcWidth(QDeclarativeItem *changed = 0);
+
QDeclarativeItem *m_item;
qreal m_x;
qreal m_y;
@@ -116,7 +124,7 @@ public:
_stateGroup(0), origin(QDeclarativeItem::Center),
widthValid(false), heightValid(false),
_componentComplete(true), _keepMouse(false),
- smooth(false), transformOriginDirty(true), keyHandler(0),
+ smooth(false), transformOriginDirty(true), doneEventPreHandler(false), keyHandler(0),
mWidth(0), mHeight(0), implicitWidth(0), implicitHeight(0)
{
QGraphicsItemPrivate::acceptedMouseButtons = 0;
@@ -150,6 +158,22 @@ public:
void setHeight(qreal);
void resetHeight();
+ QDeclarativeListProperty<QObject> data();
+ QDeclarativeListProperty<QObject> resources();
+
+ QDeclarativeListProperty<QDeclarativeState> states();
+ QDeclarativeListProperty<QDeclarativeTransition> transitions();
+
+ QString state() const;
+ void setState(const QString &);
+
+ QDeclarativeAnchorLine left() const;
+ QDeclarativeAnchorLine right() const;
+ QDeclarativeAnchorLine horizontalCenter() const;
+ QDeclarativeAnchorLine top() const;
+ QDeclarativeAnchorLine bottom() const;
+ QDeclarativeAnchorLine verticalCenter() const;
+ QDeclarativeAnchorLine baseline() const;
// data property
static void data_append(QDeclarativeListProperty<QObject> *, QObject *);
@@ -165,6 +189,11 @@ public:
static QGraphicsTransform *transform_at(QDeclarativeListProperty<QGraphicsTransform> *list, int);
static void transform_clear(QDeclarativeListProperty<QGraphicsTransform> *list);
+ static QDeclarativeItemPrivate* get(QDeclarativeItem *item)
+ {
+ return item->d_func();
+ }
+
// Accelerated property accessors
QDeclarativeNotifier parentNotifier;
static void parentProperty(QObject *o, void *rv, QDeclarativeNotifierEndpoint *e);
@@ -224,7 +253,7 @@ public:
void removeItemChangeListener(QDeclarativeItemChangeListener *, ChangeTypes types);
QPODVector<ChangeListener,4> changeListeners;
- QDeclarativeStateGroup *states();
+ QDeclarativeStateGroup *_states();
QDeclarativeStateGroup *_stateGroup;
QDeclarativeItem::TransformOrigin origin:4;
@@ -234,6 +263,7 @@ public:
bool _keepMouse:1;
bool smooth:1;
bool transformOriginDirty : 1;
+ bool doneEventPreHandler : 1;
QDeclarativeItemKeyFilter *keyHandler;
@@ -295,12 +325,14 @@ public:
QDeclarativeItemKeyFilter(QDeclarativeItem * = 0);
virtual ~QDeclarativeItemKeyFilter();
- virtual void keyPressed(QKeyEvent *event);
- virtual void keyReleased(QKeyEvent *event);
- virtual void inputMethodEvent(QInputMethodEvent *event);
+ virtual void keyPressed(QKeyEvent *event, bool post);
+ virtual void keyReleased(QKeyEvent *event, bool post);
+ virtual void inputMethodEvent(QInputMethodEvent *event, bool post);
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
virtual void componentComplete();
+ bool m_processPost;
+
private:
QDeclarativeItemKeyFilter *m_next;
};
@@ -330,6 +362,9 @@ class QDeclarativeKeyNavigationAttached : public QObject, public QDeclarativeIte
Q_PROPERTY(QDeclarativeItem *down READ down WRITE setDown NOTIFY changed)
Q_PROPERTY(QDeclarativeItem *tab READ tab WRITE setTab NOTIFY changed)
Q_PROPERTY(QDeclarativeItem *backtab READ backtab WRITE setBacktab NOTIFY changed)
+ Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY priorityChanged)
+
+ Q_ENUMS(Priority)
public:
QDeclarativeKeyNavigationAttached(QObject * = 0);
@@ -347,14 +382,19 @@ public:
QDeclarativeItem *backtab() const;
void setBacktab(QDeclarativeItem *);
+ enum Priority { BeforeItem, AfterItem };
+ Priority priority() const;
+ void setPriority(Priority);
+
static QDeclarativeKeyNavigationAttached *qmlAttachedProperties(QObject *);
Q_SIGNALS:
void changed();
+ void priorityChanged();
private:
- virtual void keyPressed(QKeyEvent *event);
- virtual void keyReleased(QKeyEvent *event);
+ virtual void keyPressed(QKeyEvent *event, bool post);
+ virtual void keyReleased(QKeyEvent *event, bool post);
};
class QDeclarativeKeysAttachedPrivate : public QObjectPrivate
@@ -394,6 +434,9 @@ class QDeclarativeKeysAttached : public QObject, public QDeclarativeItemKeyFilte
Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
Q_PROPERTY(QDeclarativeListProperty<QDeclarativeItem> forwardTo READ forwardTo)
+ Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY priorityChanged)
+
+ Q_ENUMS(Priority)
public:
QDeclarativeKeysAttached(QObject *parent=0);
@@ -408,6 +451,10 @@ public:
}
}
+ enum Priority { BeforeItem, AfterItem};
+ Priority priority() const;
+ void setPriority(Priority);
+
QDeclarativeListProperty<QDeclarativeItem> forwardTo() {
Q_D(QDeclarativeKeysAttached);
return QDeclarativeListProperty<QDeclarativeItem>(this, d->targets);
@@ -419,6 +466,7 @@ public:
Q_SIGNALS:
void enabledChanged();
+ void priorityChanged();
void pressed(QDeclarativeKeyEvent *event);
void released(QDeclarativeKeyEvent *event);
void digit0Pressed(QDeclarativeKeyEvent *event);
@@ -463,9 +511,9 @@ Q_SIGNALS:
void volumeDownPressed(QDeclarativeKeyEvent *event);
private:
- virtual void keyPressed(QKeyEvent *event);
- virtual void keyReleased(QKeyEvent *event);
- virtual void inputMethodEvent(QInputMethodEvent *);
+ virtual void keyPressed(QKeyEvent *event, bool post);
+ virtual void keyReleased(QKeyEvent *event, bool post);
+ virtual void inputMethodEvent(QInputMethodEvent *, bool post);
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
const QByteArray keyToSignal(int key) {
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
index 2945b6c..7c55009 100644
--- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
@@ -143,7 +143,9 @@ void QDeclarativeItemModule::defineModule()
qmlRegisterType<QAction>();
qmlRegisterType<QDeclarativePen>();
qmlRegisterType<QDeclarativeFlickableVisibleArea>();
+#ifndef QT_NO_GRAPHICSEFFECT
qmlRegisterType<QGraphicsEffect>();
+#endif
qmlRegisterUncreatableType<QDeclarativeKeyNavigationAttached>("Qt",4,7,"KeyNavigation",QDeclarativeKeyNavigationAttached::tr("KeyNavigation is only available via attached properties"));
qmlRegisterUncreatableType<QDeclarativeKeysAttached>("Qt",4,7,"Keys",QDeclarativeKeysAttached::tr("Keys is only available via attached properties"));
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index c88dab2..78c56d6 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -48,6 +48,7 @@
#include <qdeclarativeexpression.h>
#include <qdeclarativeengine.h>
#include <qdeclarativeguard_p.h>
+#include <qdeclarativeinfo.h>
#include <qlistmodelinterface_p.h>
#include <qmath.h>
@@ -161,9 +162,9 @@ public:
, highlightResizeSpeed(400), highlightResizeDuration(-1), highlightRange(QDeclarativeListView::NoHighlightRange)
, snapMode(QDeclarativeListView::NoSnap), overshootDist(0.0)
, footerComponent(0), footer(0), headerComponent(0), header(0)
- , bufferMode(NoBuffer)
+ , bufferMode(BufferBefore | BufferAfter)
, ownModel(false), wrap(false), autoHighlight(true), haveHighlightRange(false)
- , correctFlick(true), inFlickCorrection(false), lazyRelease(false)
+ , correctFlick(false), inFlickCorrection(false), lazyRelease(false)
, deferredRelease(false), layoutScheduled(false), minExtentDirty(true), maxExtentDirty(true)
{}
@@ -525,7 +526,7 @@ void QDeclarativeListViewPrivate::init()
q->setFlag(QGraphicsItem::ItemIsFocusScope);
addItemChangeListener(this, Geometry);
QObject::connect(q, SIGNAL(movementEnded()), q, SLOT(animStopped()));
- q->setFlickDirection(QDeclarativeFlickable::VerticalFlick);
+ q->setFlickableDirection(QDeclarativeFlickable::VerticalFlick);
::memset(sectionCache, 0, sizeof(QDeclarativeItem*) * sectionCacheSize);
}
@@ -573,9 +574,11 @@ FxListItem *QDeclarativeListViewPrivate::createItem(int modelIndex)
if (model->completePending()) {
// complete
listItem->item->setZValue(1);
+ listItem->item->setParentItem(q->viewport());
model->completeItem();
+ } else {
+ listItem->item->setParentItem(q->viewport());
}
- listItem->item->setParentItem(q->viewport());
QDeclarativeItemPrivate *itemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(item));
itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
if (sectionCriteria && sectionCriteria->delegate()) {
@@ -648,7 +651,7 @@ void QDeclarativeListViewPrivate::refill(qreal from, qreal to, bool doBuffer)
FxListItem *item = 0;
int pos = itemEnd + 1;
while (modelIndex < model->count() && pos <= fillTo) {
- //qDebug() << "refill: append item" << modelIndex << "pos" << pos;
+// qDebug() << "refill: append item" << modelIndex << "pos" << pos;
if (!(item = createItem(modelIndex)))
break;
item->setPosition(pos);
@@ -659,8 +662,8 @@ void QDeclarativeListViewPrivate::refill(qreal from, qreal to, bool doBuffer)
if (doBuffer) // never buffer more than one item per frame
break;
}
- while (visibleIndex > 0 && visibleIndex <= model->count() && visiblePos > fillFrom) {
- //qDebug() << "refill: prepend item" << visibleIndex-1 << "current top pos" << visiblePos;
+ while (visibleIndex > 0 && visibleIndex <= model->count() && visiblePos-1 >= fillFrom) {
+// qDebug() << "refill: prepend item" << visibleIndex-1 << "current top pos" << visiblePos;
if (!(item = createItem(visibleIndex-1)))
break;
--visibleIndex;
@@ -676,7 +679,7 @@ void QDeclarativeListViewPrivate::refill(qreal from, qreal to, bool doBuffer)
while (visibleItems.count() > 1 && (item = visibleItems.first()) && item->endPosition() < bufferFrom) {
if (item->attached->delayRemove())
break;
- //qDebug() << "refill: remove first" << visibleIndex << "top end pos" << item->endPosition();
+// qDebug() << "refill: remove first" << visibleIndex << "top end pos" << item->endPosition();
if (item->index != -1)
visibleIndex++;
visibleItems.removeFirst();
@@ -686,7 +689,7 @@ void QDeclarativeListViewPrivate::refill(qreal from, qreal to, bool doBuffer)
while (visibleItems.count() > 1 && (item = visibleItems.last()) && item->position() > bufferTo) {
if (item->attached->delayRemove())
break;
- //qDebug() << "refill: remove last" << visibleIndex+visibleItems.count()-1;
+// qDebug() << "refill: remove last" << visibleIndex+visibleItems.count()-1 << item->position();
visibleItems.removeLast();
releaseItem(item);
changed = true;
@@ -848,13 +851,15 @@ void QDeclarativeListViewPrivate::createHighlight()
highlightPosAnimator->target = QDeclarativeProperty(highlight->item, posProp);
highlightPosAnimator->velocity = highlightMoveSpeed;
highlightPosAnimator->userDuration = highlightMoveDuration;
- highlightPosAnimator->restart();
const QLatin1String sizeProp(orient == QDeclarativeListView::Vertical ? "height" : "width");
highlightSizeAnimator = new QSmoothedAnimation(q);
highlightSizeAnimator->velocity = highlightResizeSpeed;
highlightSizeAnimator->userDuration = highlightResizeDuration;
highlightSizeAnimator->target = QDeclarativeProperty(highlight->item, sizeProp);
- highlightSizeAnimator->restart();
+ if (autoHighlight) {
+ highlightPosAnimator->restart();
+ highlightSizeAnimator->restart();
+ }
changed = true;
}
}
@@ -866,7 +871,7 @@ void QDeclarativeListViewPrivate::updateHighlight()
{
if ((!currentItem && highlight) || (currentItem && !highlight))
createHighlight();
- if (currentItem && autoHighlight && highlight && !moving) {
+ if (currentItem && autoHighlight && highlight && !movingHorizontally && !movingVertically) {
// auto-update highlight
highlightPosAnimator->to = currentItem->position();
highlightSizeAnimator->to = currentItem->size();
@@ -1164,6 +1169,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
moveReason = Mouse;
if ((!haveHighlightRange || highlightRange != QDeclarativeListView::StrictlyEnforceRange) && snapMode == QDeclarativeListView::NoSnap) {
+ correctFlick = true;
QDeclarativeFlickablePrivate::flick(data, minExtent, maxExtent, vSize, fixupCallback, velocity);
return;
}
@@ -1205,7 +1211,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
else
v = maxVelocity;
}
- if (!flicked) {
+ if (!flickingHorizontally && !flickingVertically) {
// the initial flick - estimate boundary
qreal accel = deceleration;
qreal v2 = v * v;
@@ -1230,10 +1236,13 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
qreal adjDist = -data.flickTarget + data.move.value();
if (qAbs(adjDist) > qAbs(dist)) {
// Prevent painfully slow flicking - adjust velocity to suit flickDeceleration
- v2 = accel * 2.0f * qAbs(dist);
- v = qSqrt(v2);
- if (dist > 0)
- v = -v;
+ qreal adjv2 = accel * 2.0f * qAbs(adjDist);
+ if (adjv2 > v2) {
+ v2 = adjv2;
+ v = qSqrt(v2);
+ if (dist > 0)
+ v = -v;
+ }
}
dist = adjDist;
accel = v2 / (2.0f * qAbs(dist));
@@ -1250,9 +1259,18 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
timeline.reset(data.move);
timeline.accel(data.move, v, accel, maxDistance + overshootDist);
timeline.callback(QDeclarativeTimeLineCallback(&data.move, fixupCallback, this));
- flicked = true;
- emit q->flickingChanged();
- emit q->flickStarted();
+ if (!flickingHorizontally && q->xflick()) {
+ flickingHorizontally = true;
+ emit q->flickingChanged();
+ emit q->flickingHorizontallyChanged();
+ emit q->flickStarted();
+ }
+ if (!flickingVertically && q->yflick()) {
+ flickingVertically = true;
+ emit q->flickingChanged();
+ emit q->flickingVerticallyChanged();
+ emit q->flickStarted();
+ }
correctFlick = true;
} else {
// reevaluate the target boundary.
@@ -1292,25 +1310,48 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
\inherits Flickable
\brief The ListView item provides a list view of items provided by a model.
- The model is typically provided by a QAbstractListModel "C++ model object",
- but can also be created directly in QML. The items are laid out vertically
- or horizontally and may be flicked to scroll.
+ A ListView displays data from models created from built-in QML elements like ListModel
+ and XmlListModel, or custom model classes defined in C++ that inherit from
+ QAbstractListModel.
- The below example creates a very simple vertical list, using a QML model.
- \image trivialListView.png
+ A ListView has a \l model, which defines the data to be displayed, and
+ a \l delegate, which defines how the data should be displayed. Items in a
+ ListView are laid out horizontally or vertically. List views are inherently flickable
+ as ListView inherits from \l Flickable.
- The user interface defines a delegate to display an item, a highlight,
- and the ListView which uses the above.
+ For example, if there is a simple list model defined in a file \c ContactModel.qml like this:
- \snippet doc/src/snippets/declarative/listview/listview.qml 3
+ \snippet doc/src/snippets/declarative/listview/ContactModel.qml 0
- The model is defined as a ListModel using QML:
- \quotefile doc/src/snippets/declarative/listview/dummydata/ContactModel.qml
+ Another component can display this model data in a ListView, like this:
- In this case ListModel is a handy way for us to test our UI. In practice
- the model would be implemented in C++, or perhaps via a SQL data source.
+ \table
+ \row
+ \o \snippet doc/src/snippets/declarative/listview/listview.qml import
+ \codeline
+ \snippet doc/src/snippets/declarative/listview/listview.qml classdocs simple
+ \o \image listview-simple.png
+ \endtable
- \bold Note that views do not enable \e clip automatically. If the view
+ Here, the ListView creates a \c ContactModel component for its model, and a \l Text element
+ for its delegate. The view will create a new \l Text component for each item in the model. Notice
+ the delegate is able to access the model's \c name and \c number data directly.
+
+ An improved list view is shown below. The delegate is visually improved and is moved
+ into a separate \c contactDelegate component. Also, the currently selected item is highlighted
+ with a blue \l Rectangle using the \l highlight property, and \c focus is set to \c true
+ to enable keyboard navigation for the list view.
+
+ \table
+ \row
+ \o \snippet doc/src/snippets/declarative/listview/listview.qml classdocs advanced
+ \o \image listview-highlight.png
+ \endtable
+
+ In a ListView, delegates are instantiated as needed and may be destroyed at any time.
+ State should \e never be stored in a delegate.
+
+ \note Views do not enable \e clip automatically. If the view
is not clipped by another item or the screen, it will be necessary
to set \e {clip: true} in order to have the out of view items clipped
nicely.
@@ -1341,7 +1382,7 @@ QDeclarativeListView::~QDeclarativeListView()
This property may be used to adjust the appearance of the current item, for example:
- \snippet doc/src/snippets/declarative/listview/highlight.qml 0
+ \snippet doc/src/snippets/declarative/listview/listview.qml isCurrentItem
*/
/*!
@@ -1378,22 +1419,10 @@ QDeclarativeListView::~QDeclarativeListView()
It is sometimes necessary to delay the destruction of an item
until an animation completes.
- The example below ensures that the animation completes before
+ The example delegate below ensures that the animation completes before
the item is removed from the list.
- \code
- Component {
- id: myDelegate
- Item {
- id: wrapper
- ListView.onRemove: SequentialAnimation {
- PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: true }
- NumberAnimation { target: wrapper; property: "scale"; to: 0; duration: 250; easing.type: "InOutQuad" }
- PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: false }
- }
- }
- }
- \endcode
+ \snippet doc/src/snippets/declarative/listview/listview.qml delayRemove
*/
/*!
@@ -1410,13 +1439,10 @@ QDeclarativeListView::~QDeclarativeListView()
\qmlproperty model ListView::model
This property holds the model providing data for the list.
- The model provides a set of data that is used to create the items
- for the view. For large or dynamic datasets the model is usually
- provided by a C++ model object. The C++ model object must be a \l
- {QAbstractItemModel} subclass or a simple list.
-
- Models can also be created directly in QML, using a \l{ListModel},
- \l{XmlListModel} or \l{VisualItemModel}.
+ The model provides the set of data that is used to create the items
+ in the view. Models can be created directly in QML using \l ListModel, \l XmlListModel
+ or \l VisualItemModel, or provided by C++ model classes. If a C++ model class is
+ used, it must be a subclass of \l QAbstractItemModel or a simple list.
\sa {qmlmodels}{Data Models}
*/
@@ -1452,13 +1478,14 @@ void QDeclarativeListView::setModel(const QVariant &model)
d->model = vim;
} else {
if (!d->ownModel) {
- d->model = new QDeclarativeVisualDataModel(qmlContext(this));
+ d->model = new QDeclarativeVisualDataModel(qmlContext(this), this);
d->ownModel = true;
}
if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model))
dataModel->setModel(model);
}
if (d->model) {
+ d->bufferMode = QDeclarativeListViewPrivate::BufferBefore | QDeclarativeListViewPrivate::BufferAfter;
if (isComponentComplete()) {
refill();
if (d->currentIndex >= d->model->count() || d->currentIndex < 0) {
@@ -1480,17 +1507,22 @@ void QDeclarativeListView::setModel(const QVariant &model)
}
/*!
- \qmlproperty component ListView::delegate
+ \qmlproperty Component ListView::delegate
The delegate provides a template defining each item instantiated by the view.
The index is exposed as an accessible \c index property. Properties of the
model are also available depending upon the type of \l {qmlmodels}{Data Model}.
- Note that the ListView will layout the items based on the size of the root item
+ The number of elements in the delegate has a direct effect on the
+ flicking performance of the view. If at all possible, place functionality
+ that is not needed for the normal display of the delegate in a \l Loader which
+ can load additional elements when needed.
+
+ Tthe ListView will lay out the items based on the size of the root item
in the delegate.
- Here is an example delegate:
- \snippet doc/src/snippets/declarative/listview/listview.qml 0
+ \note Delegates are instantiated as needed and may be destroyed at any time.
+ State should \e never be stored in a delegate.
*/
QDeclarativeComponent *QDeclarativeListView::delegate() const
{
@@ -1566,10 +1598,9 @@ QDeclarativeItem *QDeclarativeListView::currentItem()
/*!
\qmlproperty Item ListView::highlightItem
- \c highlightItem holds the highlight item, which was created
- from the \l highlight component.
+ This holds the highlight item created from the \l highlight component.
- The highlightItem is managed by the view unless
+ The \c highlightItem is managed by the view unless
\l highlightFollowsCurrentItem is set to false.
\sa highlight, highlightFollowsCurrentItem
@@ -1595,20 +1626,14 @@ int QDeclarativeListView::count() const
}
/*!
- \qmlproperty component ListView::highlight
+ \qmlproperty Component ListView::highlight
This property holds the component to use as the highlight.
- An instance of the highlight component will be created for each list.
- The geometry of the resultant component instance will be managed by the list
+ An instance of the highlight component is created for each list.
+ The geometry of the resultant component instance is managed by the list
so as to stay with the current item, unless the highlightFollowsCurrentItem
property is false.
- The below example demonstrates how to make a simple highlight
- for a vertical list.
-
- \snippet doc/src/snippets/declarative/listview/listview.qml 1
- \image trivialListView.png
-
\sa highlightItem, highlightFollowsCurrentItem
*/
QDeclarativeComponent *QDeclarativeListView::highlight() const
@@ -1633,13 +1658,14 @@ void QDeclarativeListView::setHighlight(QDeclarativeComponent *highlight)
\qmlproperty bool ListView::highlightFollowsCurrentItem
This property holds whether the highlight is managed by the view.
- If highlightFollowsCurrentItem is true, the highlight will be moved smoothly
- to follow the current item. If highlightFollowsCurrentItem is false, the
- highlight will not be moved by the view, and must be implemented
- by the highlight. The following example creates a highlight with
- its motion defined by the spring \l {SpringFollow}:
+ If this property is true, the highlight is moved smoothly
+ to follow the current item. Otherwise, the
+ highlight is not moved by the view, and any movement must be implemented
+ by the highlight.
+
+ Here is a highlight with its motion defined by the a \l {SpringFollow} item:
- \snippet doc/src/snippets/declarative/listview/highlight.qml 1
+ \snippet doc/src/snippets/declarative/listview/listview.qml highlightFollowsCurrentItem
Note that the highlight animation also affects the way that the view
is scrolled. This is because the view moves to maintain the
@@ -1658,7 +1684,14 @@ void QDeclarativeListView::setHighlightFollowsCurrentItem(bool autoHighlight)
Q_D(QDeclarativeListView);
if (d->autoHighlight != autoHighlight) {
d->autoHighlight = autoHighlight;
- d->updateHighlight();
+ if (autoHighlight) {
+ d->updateHighlight();
+ } else {
+ if (d->highlightPosAnimator)
+ d->highlightPosAnimator->stop();
+ if (d->highlightSizeAnimator)
+ d->highlightSizeAnimator->stop();
+ }
emit highlightFollowsCurrentItemChanged();
}
}
@@ -1669,32 +1702,30 @@ void QDeclarativeListView::setHighlightFollowsCurrentItem(bool autoHighlight)
\qmlproperty real ListView::preferredHighlightEnd
\qmlproperty enumeration ListView::highlightRangeMode
- These properties set the preferred range of the highlight (current item)
- within the view.
-
- Note that this is the correct way to influence where the
- current item ends up when the list scrolls. For example, if you want the
- currently selected item to be in the middle of the list, then set the
- highlight range to be where the middle item would go. Then, when the list scrolls,
- the currently selected item will be the item at that spot. This also applies to
- when the currently selected item changes - it will scroll to within the preferred
- highlight range. Furthermore, the behaviour of the current item index will occur
- whether or not a highlight exists.
-
- If highlightRangeMode is set to \e ApplyRange the view will
- attempt to maintain the highlight within the range, however
- the highlight can move outside of the range at the ends of the list
- or due to a mouse interaction.
+ These properties define the preferred range of the highlight (for the current item)
+ within the view. The \c preferredHighlightBegin value must be less than the
+ \c preferredHighlightEnd value.
- If highlightRangeMode is set to \e StrictlyEnforceRange the highlight will never
- move outside of the range. This means that the current item will change
- if a keyboard or mouse action would cause the highlight to move
- outside of the range.
+ These properties affect the position of the current item when the list is scrolled.
+ For example, if the currently selected item should stay in the middle of the
+ list when the view is scrolled, set the \c preferredHighlightBegin and
+ \c preferredHighlightEnd values to the top and bottom coordinates of where the middle
+ item would be. If the \c currentItem is changed programmatically, the list will
+ automatically scroll so that the current item is in the middle of the view.
+ Furthermore, the behavior of the current item index will occur whether or not a
+ highlight exists.
- The default value is \e NoHighlightRange.
+ Valid values for \c highlightRangeMode are:
- Note that a valid range requires preferredHighlightEnd to be greater
- than or equal to preferredHighlightBegin.
+ \list
+ \o ListView.ApplyRange - the view attempts to maintain the highlight within the range.
+ However, the highlight can move outside of the range at the ends of the list or due
+ to mouse interaction.
+ \o ListView.StrictlyEnforceRange - the highlight never moves outside of the range.
+ The current item changes if a keyboard or mouse action would cause the highlight to move
+ outside of the range.
+ \o ListView.NoHighlightRange - this is the default value.
+ \endlist
*/
qreal QDeclarativeListView::preferredHighlightBegin() const
{
@@ -1747,7 +1778,7 @@ void QDeclarativeListView::setHighlightRangeMode(HighlightRangeMode mode)
/*!
\qmlproperty real ListView::spacing
- This property holds the spacing to leave between items.
+ This property holds the spacing between items.
*/
qreal QDeclarativeListView::spacing() const
{
@@ -1769,12 +1800,22 @@ void QDeclarativeListView::setSpacing(qreal spacing)
\qmlproperty enumeration ListView::orientation
This property holds the orientation of the list.
- Possible values are \c Vertical (default) and \c Horizontal.
+ Possible values:
- Vertical Example:
- \image trivialListView.png
- Horizontal Example:
+ \list
+ \o ListView.Horizontal - Items are laid out horizontally
+ \o ListView.Vertical (default) - Items are laid out vertically
+ \endlist
+
+ \table
+ \row
+ \o Horizontal orientation:
\image ListViewHorizontal.png
+
+ \row
+ \o Vertical orientation:
+ \image listview-highlight.png
+ \endtable
*/
QDeclarativeListView::Orientation QDeclarativeListView::orientation() const
{
@@ -1789,10 +1830,10 @@ void QDeclarativeListView::setOrientation(QDeclarativeListView::Orientation orie
d->orient = orientation;
if (d->orient == QDeclarativeListView::Vertical) {
setContentWidth(-1);
- setFlickDirection(VerticalFlick);
+ setFlickableDirection(VerticalFlick);
} else {
setContentHeight(-1);
- setFlickDirection(HorizontalFlick);
+ setFlickableDirection(HorizontalFlick);
}
d->clear();
d->setPosition(0);
@@ -1804,10 +1845,11 @@ void QDeclarativeListView::setOrientation(QDeclarativeListView::Orientation orie
/*!
\qmlproperty bool ListView::keyNavigationWraps
- This property holds whether the list wraps key navigation
+ This property holds whether the list wraps key navigation.
- If this property is true then key presses to move off of one end of the list will cause the
- current item to jump to the other end.
+ If this is true, key navigation that would move the current item selection
+ past the end of the list instead wraps around and moves the selection to
+ the start of the list, and vice-versa.
*/
bool QDeclarativeListView::isWrapEnabled() const
{
@@ -1826,11 +1868,22 @@ void QDeclarativeListView::setWrapEnabled(bool wrap)
/*!
\qmlproperty int ListView::cacheBuffer
- This property holds the number of off-screen pixels to cache.
-
- This property determines the number of pixels above the top of the list
- and below the bottom of the list to cache. Setting this value can make
- scrolling the list smoother at the expense of additional memory usage.
+ This property determines whether delegates are retained outside the
+ visible area of the view.
+
+ If this value is non-zero, the view keeps as many delegates
+ instantiated as it can fit within the buffer specified. For example,
+ if in a vertical view the delegate is 20 pixels high and \c cacheBuffer is
+ set to 40, then up to 2 delegates above and 2 delegates below the visible
+ area may be retained.
+
+ Note that cacheBuffer is not a pixel buffer - it only maintains additional
+ instantiated delegates.
+
+ Setting this value can improve the smoothness of scrolling behavior at the expense
+ of additional memory usage. It is not a substitute for creating efficient
+ delegates; the fewer elements in a delegate, the faster a view can be
+ scrolled.
*/
int QDeclarativeListView::cacheBuffer() const
{
@@ -1854,13 +1907,14 @@ void QDeclarativeListView::setCacheBuffer(int b)
/*!
\qmlproperty string ListView::section.property
\qmlproperty enumeration ListView::section.criteria
- These properties hold the expression to be evaluated for the section attached property.
+ These properties hold the expression to be evaluated for the \l section attached property.
- section.property hold the name of the property to use to determine
- the section the item is in.
+ \c section.property hold the name of the property to use to determine
+ the section that holds the item.
- section.criteria holds the criteria to use to get the section. It
+ \c section.criteria holds the criteria to use to access the section. It
can be either:
+
\list
\o ViewSection.FullString (default) - section is the value of the property.
\o ViewSection.FirstCharacter - section is the first character of the property value.
@@ -1872,7 +1926,7 @@ void QDeclarativeListView::setCacheBuffer(int b)
pet. The section expression is the size property. If \c ListView.section and
\c ListView.prevSection differ, the item will display a section header.
- \snippet examples/declarative/listview/sections.qml 0
+ \snippet examples/declarative/modelviews/listview/sections.qml 0
\image ListViewSections.png
*/
@@ -1899,9 +1953,10 @@ QString QDeclarativeListView::currentSection() const
\qmlproperty int ListView::highlightMoveDuration
\qmlproperty real ListView::highlightResizeSpeed
\qmlproperty int ListView::highlightResizeDuration
+
These properties hold the move and resize animation speed of the highlight delegate.
- highlightFollowsCurrentItem must be true for these properties
+ \c highlightFollowsCurrentItem must be true for these properties
to have effect.
The default value for the speed properties is 400 pixels/second.
@@ -1983,21 +2038,21 @@ void QDeclarativeListView::setHighlightResizeDuration(int duration)
/*!
\qmlproperty enumeration ListView::snapMode
- This property determines where the view will settle following a drag or flick.
+ This property determines where the view's scrolling behavior stops following a drag or flick.
The allowed values are:
\list
- \o NoSnap (default) - the view will stop anywhere within the visible area.
- \o SnapToItem - the view will settle with an item aligned with the start of
+ \o ListView.NoSnap (default) - the view stops anywhere within the visible area.
+ \o ListView.SnapToItem - the view settles with an item aligned with the start of
the view.
- \o SnapOneItem - the view will settle no more than one item away from the first
+ \o ListView.SnapOneItem - the view settles no more than one item away from the first
visible item at the time the mouse button is released. This mode is particularly
useful for moving one page at a time.
\endlist
- snapMode does not affect the currentIndex. To update the
- currentIndex as the list is moved set \e highlightRangeMode
- to \e StrictlyEnforceRange.
+ \c snapMode does not affect the \l currentIndex. To update the
+ \l currentIndex as the list is moved, set \l highlightRangeMode
+ to \c ListView.StrictlyEnforceRange.
\sa highlightRangeMode
*/
@@ -2080,7 +2135,7 @@ void QDeclarativeListView::viewportMoved()
QDeclarativeFlickable::viewportMoved();
d->lazyRelease = true;
refill();
- if (isFlicking() || d->moving)
+ if (d->flickingHorizontally || d->flickingVertically || d->movingHorizontally || d->movingVertically)
d->moveReason = QDeclarativeListViewPrivate::Mouse;
if (d->moveReason != QDeclarativeListViewPrivate::SetIndex) {
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange && d->highlight) {
@@ -2100,7 +2155,7 @@ void QDeclarativeListView::viewportMoved()
}
}
- if (d->flicked && d->correctFlick && !d->inFlickCorrection) {
+ if ((d->flickingHorizontally || d->flickingVertically) && d->correctFlick && !d->inFlickCorrection) {
d->inFlickCorrection = true;
// Near an end and it seems that the extent has changed?
// Recalculate the flick so that we don't end up in an odd position.
@@ -2227,6 +2282,9 @@ qreal QDeclarativeListView::maxXExtent() const
void QDeclarativeListView::keyPressEvent(QKeyEvent *event)
{
Q_D(QDeclarativeListView);
+ keyPressPreHandler(event);
+ if (event->isAccepted())
+ return;
if (d->model && d->model->count() && d->interactive) {
if ((d->orient == QDeclarativeListView::Horizontal && event->key() == Qt::Key_Left)
@@ -2251,10 +2309,8 @@ void QDeclarativeListView::keyPressEvent(QKeyEvent *event)
}
}
}
- QDeclarativeFlickable::keyPressEvent(event);
- if (event->isAccepted())
- return;
event->ignore();
+ QDeclarativeFlickable::keyPressEvent(event);
}
/*!
@@ -2298,23 +2354,23 @@ void QDeclarativeListView::decrementCurrentIndex()
\a mode:
\list
- \o Beginning - position item at the top (or left for horizontal orientation) of the view.
- \o Center- position item in the center of the view.
- \o End - position item at bottom (or right for horizontal orientation) of the view.
- \o Visible - if any part of the item is visible then take no action, otherwise
+ \o ListView.Beginning - position item at the top (or left for horizontal orientation) of the view.
+ \o ListView.Center - position item in the center of the view.
+ \o ListView.End - position item at bottom (or right for horizontal orientation) of the view.
+ \o ListView.Visible - if any part of the item is visible then take no action, otherwise
bring the item into view.
- \o Contain - ensure the entire item is visible. If the item is larger than
+ \o ListView.Contain - ensure the entire item is visible. If the item is larger than
the view the item is positioned at the top (or left for horizontal orientation) of the view.
\endlist
- If positioning the view at the index would cause empty space to be displayed at
+ If positioning the view at \a index would cause empty space to be displayed at
the beginning or end of the view, the view will be positioned at the boundary.
- It is not recommended to use contentX or contentY to position the view
+ It is not recommended to use \l {Flickable::}{contentX} or \l {Flickable::}{contentY} to position the view
at a particular index. This is unreliable since removing items from the start
of the list does not cause all other items to be repositioned, and because
the actual start of the view can vary based on the size of the delegates.
- The correct way to bring an item into view is with positionViewAtIndex.
+ The correct way to bring an item into view is with \c positionViewAtIndex.
*/
void QDeclarativeListView::positionViewAtIndex(int index, int mode)
{
@@ -2420,7 +2476,8 @@ void QDeclarativeListView::trackedPositionChanged()
Q_D(QDeclarativeListView);
if (!d->trackedItem || !d->currentItem)
return;
- if (!isFlicking() && !d->moving && d->moveReason == QDeclarativeListViewPrivate::SetIndex) {
+ if (!d->flickingHorizontally && !d->flickingVertically && !d->movingHorizontally && !d->movingVertically
+ && d->moveReason == QDeclarativeListViewPrivate::SetIndex) {
const qreal trackedPos = qCeil(d->trackedItem->position());
const qreal viewPos = d->position();
if (d->haveHighlightRange) {
diff --git a/src/declarative/graphicsitems/qdeclarativelistview_p.h b/src/declarative/graphicsitems/qdeclarativelistview_p.h
index 9c0b7dd..d6e8023 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativelistview_p.h
@@ -124,6 +124,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeListView : public QDeclarativeFlickable
Q_ENUMS(HighlightRangeMode)
Q_ENUMS(Orientation)
Q_ENUMS(SnapMode)
+ Q_ENUMS(PositionMode)
Q_CLASSINFO("DefaultProperty", "data")
public:
@@ -200,7 +201,6 @@ public:
static QDeclarativeListViewAttached *qmlAttachedProperties(QObject *);
enum PositionMode { Beginning, Center, End, Visible, Contain };
- Q_ENUMS(PositionMode);
Q_INVOKABLE void positionViewAtIndex(int index, int mode);
Q_INVOKABLE int indexAt(int x, int y) const;
diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
index bdd2c87..4995baf 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
@@ -49,7 +49,6 @@ QT_BEGIN_NAMESPACE
QDeclarativeLoaderPrivate::QDeclarativeLoaderPrivate()
: item(0), component(0), ownComponent(false)
- , resizeMode(QDeclarativeLoader::SizeLoaderToItem)
{
}
@@ -59,9 +58,8 @@ QDeclarativeLoaderPrivate::~QDeclarativeLoaderPrivate()
void QDeclarativeLoaderPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem, const QRectF &newGeometry, const QRectF &oldGeometry)
{
- if (resizeItem == item && resizeMode == QDeclarativeLoader::SizeLoaderToItem) {
- _q_updateSize();
- }
+ if (resizeItem == item)
+ _q_updateSize(false);
QDeclarativeItemChangeListener::itemGeometryChanged(resizeItem, newGeometry, oldGeometry);
}
@@ -76,17 +74,19 @@ void QDeclarativeLoaderPrivate::clear()
if (item) {
if (QDeclarativeItem *qmlItem = qobject_cast<QDeclarativeItem*>(item)) {
- if (resizeMode == QDeclarativeLoader::SizeLoaderToItem) {
- QDeclarativeItemPrivate *p =
+ QDeclarativeItemPrivate *p =
static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(qmlItem));
- p->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
- }
+ p->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
}
// We can't delete immediately because our item may have triggered
// the Loader to load a different item.
- item->setVisible(false);
- item->setParentItem(0);
+ if (item->scene()) {
+ item->scene()->removeItem(item);
+ } else {
+ item->setParentItem(0);
+ item->setVisible(false);
+ }
item->deleteLater();
item = 0;
}
@@ -96,16 +96,12 @@ void QDeclarativeLoaderPrivate::initResize()
{
Q_Q(QDeclarativeLoader);
if (QDeclarativeItem *qmlItem = qobject_cast<QDeclarativeItem*>(item)) {
- if (resizeMode == QDeclarativeLoader::SizeLoaderToItem) {
- QDeclarativeItemPrivate *p =
+ QDeclarativeItemPrivate *p =
static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(qmlItem));
- p->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
- }
+ p->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
} else if (item && item->isWidget()) {
QGraphicsWidget *widget = static_cast<QGraphicsWidget*>(item);
- if (resizeMode == QDeclarativeLoader::SizeLoaderToItem) {
- widget->installEventFilter(q);
- }
+ widget->installEventFilter(q);
}
_q_updateSize();
}
@@ -329,6 +325,7 @@ void QDeclarativeLoaderPrivate::_q_sourceLoaded()
emit q->statusChanged();
emit q->progressChanged();
emit q->itemChanged();
+ emit q->loaded();
}
}
@@ -337,10 +334,10 @@ void QDeclarativeLoaderPrivate::_q_sourceLoaded()
This property holds the status of QML loading. It can be one of:
\list
- \o Null - no QML source has been set
- \o Ready - the QML source has been loaded
- \o Loading - the QML source is currently being loaded
- \o Error - an error occurred while loading the QML source
+ \o Loader.Null - no QML source has been set
+ \o Loader.Ready - the QML source has been loaded
+ \o Loader.Loading - the QML source is currently being loaded
+ \o Loader.Error - an error occurred while loading the QML source
\endlist
Note that a change in the status property does not cause anything to happen
@@ -349,10 +346,13 @@ void QDeclarativeLoaderPrivate::_q_sourceLoaded()
of the following ways:
\list
\o Create a state, so that a state change occurs, e.g. State{name: 'loaded'; when: loader.status = Loader.Ready;}
- \o Do something inside the onStatusChanged signal handler, e.g. Loader{id: loader; onStatusChanged: if(loader.status == Loader.Ready) console.log('Loaded');}
+ \o Do something inside the onLoaded signal handler, e.g. Loader{id: loader; onLoaded: console.log('Loaded');}
\o Bind to the status variable somewhere, e.g. Text{text: if(loader.status!=Loader.Ready){'Not Loaded';}else{'Loaded';}}
\endlist
\sa progress
+
+ Note that if the source is a local file, the status will initially be Ready (or Error). While
+ there will be no onStatusChanged signal in that case, the onLoaded will still be invoked.
*/
QDeclarativeLoader::Status QDeclarativeLoader::status() const
@@ -368,6 +368,22 @@ QDeclarativeLoader::Status QDeclarativeLoader::status() const
return d->source.isEmpty() ? Null : Error;
}
+void QDeclarativeLoader::componentComplete()
+{
+ QDeclarativeItem::componentComplete();
+ if (status() == Ready)
+ emit loaded();
+}
+
+
+/*!
+ \qmlsignal Loader::onLoaded()
+
+ This handler is called when the \l status becomes Loader.Ready, or on successful
+ initial load.
+*/
+
+
/*!
\qmlproperty real Loader::progress
@@ -390,83 +406,29 @@ qreal QDeclarativeLoader::progress() const
return 0.0;
}
-/*!
- \qmlproperty enumeration Loader::resizeMode
-
- This property determines how the Loader or item are resized:
- \list
- \o NoResize - no item will be resized
- \o SizeLoaderToItem - the Loader will be sized to the size of the item, unless the size of the Loader has been otherwise specified.
- \o SizeItemToLoader - the item will be sized to the size of the Loader.
- \endlist
-
- Note that changing from SizeItemToLoader to SizeLoaderToItem
- after the component is loaded will not return the item or Loader
- to it's original size. This is due to the item size being adjusted
- to the Loader size, thereby losing the original size of the item.
- Future changes to the item's size will affect the loader, however.
-
- The default resizeMode is SizeLoaderToItem.
-*/
-QDeclarativeLoader::ResizeMode QDeclarativeLoader::resizeMode() const
-{
- Q_D(const QDeclarativeLoader);
- return d->resizeMode;
-}
-
-void QDeclarativeLoader::setResizeMode(ResizeMode mode)
-{
- Q_D(QDeclarativeLoader);
- if (mode == d->resizeMode)
- return;
-
- if (QDeclarativeItem *qmlItem = qobject_cast<QDeclarativeItem*>(d->item)) {
- if (d->resizeMode == SizeLoaderToItem) {
- QDeclarativeItemPrivate *p =
- static_cast<QDeclarativeItemPrivate *>(QGraphicsItemPrivate::get(qmlItem));
- p->removeItemChangeListener(d, QDeclarativeItemPrivate::Geometry);
- }
- } else if (d->item && d->item->isWidget()) {
- if (d->resizeMode == SizeLoaderToItem)
- d->item->removeEventFilter(this);
- }
-
- d->resizeMode = mode;
- emit resizeModeChanged();
- d->initResize();
-}
-
-void QDeclarativeLoaderPrivate::_q_updateSize()
+void QDeclarativeLoaderPrivate::_q_updateSize(bool loaderGeometryChanged)
{
Q_Q(QDeclarativeLoader);
if (!item)
return;
if (QDeclarativeItem *qmlItem = qobject_cast<QDeclarativeItem*>(item)) {
- if (resizeMode == QDeclarativeLoader::SizeLoaderToItem) {
- q->setWidth(qmlItem->width());
- q->setHeight(qmlItem->height());
- } else if (resizeMode == QDeclarativeLoader::SizeItemToLoader) {
+ q->setImplicitWidth(qmlItem->width());
+ if (loaderGeometryChanged && q->widthValid())
qmlItem->setWidth(q->width());
+ q->setImplicitHeight(qmlItem->height());
+ if (loaderGeometryChanged && q->heightValid())
qmlItem->setHeight(q->height());
- }
} else if (item && item->isWidget()) {
QGraphicsWidget *widget = static_cast<QGraphicsWidget*>(item);
- if (resizeMode == QDeclarativeLoader::SizeLoaderToItem) {
- QSizeF newSize = widget->size();
- if (newSize.isValid()) {
- q->setWidth(newSize.width());
- q->setHeight(newSize.height());
- }
- } else if (resizeMode == QDeclarativeLoader::SizeItemToLoader) {
- QSizeF oldSize = widget->size();
- QSizeF newSize = oldSize;
- if (q->heightValid())
- newSize.setHeight(q->height());
- if (q->widthValid())
- newSize.setWidth(q->width());
- if (oldSize != newSize)
- widget->resize(newSize);
- }
+ QSizeF widgetSize = widget->size();
+ q->setImplicitWidth(widgetSize.width());
+ if (loaderGeometryChanged && q->widthValid())
+ widgetSize.setWidth(q->width());
+ q->setImplicitHeight(widgetSize.height());
+ if (loaderGeometryChanged && q->heightValid())
+ widgetSize.setHeight(q->height());
+ if (widget->size() != widgetSize)
+ widget->resize(widgetSize);
}
}
@@ -484,9 +446,7 @@ void QDeclarativeLoader::geometryChanged(const QRectF &newGeometry, const QRectF
{
Q_D(QDeclarativeLoader);
if (newGeometry != oldGeometry) {
- if (d->resizeMode == SizeItemToLoader) {
- d->_q_updateSize();
- }
+ d->_q_updateSize();
}
QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
}
@@ -496,10 +456,8 @@ QVariant QDeclarativeLoader::itemChange(GraphicsItemChange change, const QVarian
Q_D(QDeclarativeLoader);
if (change == ItemSceneHasChanged) {
if (d->item && d->item->isWidget()) {
- if (d->resizeMode == SizeLoaderToItem) {
- d->item->removeEventFilter(this);
- d->item->installEventFilter(this);
- }
+ d->item->removeEventFilter(this);
+ d->item->installEventFilter(this);
}
}
return QDeclarativeItem::itemChange(change, value);
@@ -509,9 +467,8 @@ bool QDeclarativeLoader::eventFilter(QObject *watched, QEvent *e)
{
Q_D(QDeclarativeLoader);
if (watched == d->item && e->type() == QEvent::GraphicsSceneResize) {
- if (d->item && d->item->isWidget() && d->resizeMode == SizeLoaderToItem) {
- d->_q_updateSize();
- }
+ if (d->item && d->item->isWidget())
+ d->_q_updateSize(false);
}
return QDeclarativeItem::eventFilter(watched, e);
}
diff --git a/src/declarative/graphicsitems/qdeclarativeloader_p.h b/src/declarative/graphicsitems/qdeclarativeloader_p.h
index e9fd8e9..ec7ffe9 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeloader_p.h
@@ -55,11 +55,9 @@ class Q_DECLARATIVE_EXPORT QDeclarativeLoader : public QDeclarativeItem
{
Q_OBJECT
Q_ENUMS(Status)
- Q_ENUMS(ResizeMode)
Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
Q_PROPERTY(QDeclarativeComponent *sourceComponent READ sourceComponent WRITE setSourceComponent RESET resetSourceComponent NOTIFY sourceChanged)
- Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode NOTIFY resizeModeChanged)
Q_PROPERTY(QGraphicsObject *item READ item NOTIFY itemChanged)
Q_PROPERTY(Status status READ status NOTIFY statusChanged)
Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
@@ -79,10 +77,6 @@ public:
Status status() const;
qreal progress() const;
- enum ResizeMode { NoResize, SizeLoaderToItem, SizeItemToLoader };
- ResizeMode resizeMode() const;
- void setResizeMode(ResizeMode mode);
-
QGraphicsObject *item() const;
Q_SIGNALS:
@@ -90,12 +84,14 @@ Q_SIGNALS:
void sourceChanged();
void statusChanged();
void progressChanged();
- void resizeModeChanged();
+ void loaded();
protected:
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
bool eventFilter(QObject *watched, QEvent *e);
+ void componentComplete();
+
private:
Q_DISABLE_COPY(QDeclarativeLoader)
Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeLoader)
diff --git a/src/declarative/graphicsitems/qdeclarativeloader_p_p.h b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
index 49069f9..0d4c4d0 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
@@ -77,10 +77,9 @@ public:
QGraphicsObject *item;
QDeclarativeComponent *component;
bool ownComponent : 1;
- QDeclarativeLoader::ResizeMode resizeMode;
void _q_sourceLoaded();
- void _q_updateSize();
+ void _q_updateSize(bool loaderGeometryChanged = true);
};
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index 126d041..1947c00 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -197,8 +197,8 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
This handler is called when the mouse enters the mouse area.
By default the onEntered handler is only called while a button is
- pressed. Setting hoverEnabled to true enables handling of
- onExited when no mouse button is pressed.
+ pressed. Setting hoverEnabled to true enables handling of
+ onEntered when no mouse button is pressed.
\sa hoverEnabled
*/
@@ -209,7 +209,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
This handler is called when the mouse exists the mouse area.
By default the onExited handler is only called while a button is
- pressed. Setting hoverEnabled to true enables handling of
+ pressed. Setting hoverEnabled to true enables handling of
onExited when no mouse button is pressed.
\sa hoverEnabled
@@ -288,12 +288,21 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
*/
/*!
+ \qmlsignal MouseArea::onCanceled()
+
+ This handler is called when the mouse events are canceled, either because the event was not accepted or
+ another element stole the mouse event handling. This signal is for advanced users, it's useful in case there
+ is more than one mouse areas handling input, or when there is a mouse area inside a flickable. In the latter
+ case, if you do some logic on pressed and then start dragging, the flickable will steal the mouse handling
+ from the mouse area. In these cases, to reset the logic when there is no mouse handling anymore, you should
+ use onCanceled, in addition to onReleased.
+*/
+
+/*!
\internal
\class QDeclarativeMouseArea
\brief The QDeclarativeMouseArea class provides a simple mouse handling abstraction for use within Qml.
- \ingroup group_coreitems
-
All QDeclarativeItem derived classes can do mouse handling but the QDeclarativeMouseArea class exposes mouse
handling data as properties and tracks flicking and dragging of the mouse.
@@ -365,7 +374,7 @@ void QDeclarativeMouseArea::setEnabled(bool a)
\list
\o Qt.LeftButton
\o Qt.RightButton
- \o Qt.MidButton
+ \o Qt.MiddleButton
\endlist
The code below displays "right" when the right mouse buttons is pressed:
@@ -564,10 +573,12 @@ bool QDeclarativeMouseArea::sceneEvent(QEvent *event)
// state
d->pressed = false;
setKeepMouseGrab(false);
- QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, false);
- emit released(&me);
+ emit canceled();
emit pressedChanged();
- setHovered(false);
+ if (d->hovered) {
+ d->hovered = false;
+ emit hoveredChanged();
+ }
}
}
return rv;
@@ -599,6 +610,23 @@ void QDeclarativeMouseArea::geometryChanged(const QRectF &newGeometry,
d->lastPos = mapFromScene(d->lastScenePos);
}
+/*! \internal */
+QVariant QDeclarativeMouseArea::itemChange(GraphicsItemChange change,
+ const QVariant &value)
+{
+ Q_D(QDeclarativeMouseArea);
+ switch (change) {
+ case ItemVisibleHasChanged:
+ if (acceptHoverEvents() && d->hovered != (isVisible() && isUnderMouse()))
+ setHovered(!d->hovered);
+ break;
+ default:
+ break;
+ }
+
+ return QDeclarativeItem::itemChange(change, value);
+}
+
/*!
\qmlproperty bool MouseArea::hoverEnabled
This property holds whether hover events are handled.
@@ -609,6 +637,22 @@ void QDeclarativeMouseArea::geometryChanged(const QRectF &newGeometry,
This property affects the containsMouse property and the onEntered, onExited and onPositionChanged signals.
*/
+bool QDeclarativeMouseArea::hoverEnabled() const
+{
+ return acceptHoverEvents();
+}
+
+void QDeclarativeMouseArea::setHoverEnabled(bool h)
+{
+ Q_D(QDeclarativeMouseArea);
+ if (h == acceptHoverEvents())
+ return;
+
+ setAcceptHoverEvents(h);
+ emit hoverEnabledChanged();
+ if (d->hovered != isUnderMouse())
+ setHovered(!d->hovered);
+}
/*!
\qmlproperty bool MouseArea::containsMouse
@@ -651,7 +695,7 @@ void QDeclarativeMouseArea::setHovered(bool h)
\list
\o Qt.LeftButton
\o Qt.RightButton
- \o Qt.MidButton
+ \o Qt.MiddleButton
\endlist
To accept more than one button the flags can be combined with the
@@ -715,7 +759,7 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag()
/*!
\qmlproperty Item MouseArea::drag.target
\qmlproperty bool MouseArea::drag.active
- \qmlproperty Axis MouseArea::drag.axis
+ \qmlproperty enumeration MouseArea::drag.axis
\qmlproperty real MouseArea::drag.minimumX
\qmlproperty real MouseArea::drag.maximumX
\qmlproperty real MouseArea::drag.minimumY
@@ -726,7 +770,7 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag()
\list
\i \c target specifies the item to drag.
\i \c active specifies if the target item is being currently dragged.
- \i \c axis specifies whether dragging can be done horizontally (XAxis), vertically (YAxis), or both (XandYAxis)
+ \i \c axis specifies whether dragging can be done horizontally (Drag.XAxis), vertically (Drag.YAxis), or both (Drag.XandYAxis)
\i the minimum and maximum properties limit how far the target can be dragged along the corresponding axes.
\endlist
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
index 4f7df62..df77ac6 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea_p.h
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
@@ -121,7 +121,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeMouseArea : public QDeclarativeItem
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
Q_PROPERTY(Qt::MouseButtons pressedButtons READ pressedButtons NOTIFY pressedChanged)
Q_PROPERTY(Qt::MouseButtons acceptedButtons READ acceptedButtons WRITE setAcceptedButtons NOTIFY acceptedButtonsChanged)
- Q_PROPERTY(bool hoverEnabled READ acceptHoverEvents WRITE setAcceptHoverEvents)
+ Q_PROPERTY(bool hoverEnabled READ hoverEnabled WRITE setHoverEnabled NOTIFY hoverEnabledChanged)
Q_PROPERTY(QDeclarativeDrag *drag READ drag CONSTANT) //### add flicking to QDeclarativeDrag or add a QDeclarativeFlick ???
public:
@@ -142,6 +142,9 @@ public:
Qt::MouseButtons acceptedButtons() const;
void setAcceptedButtons(Qt::MouseButtons buttons);
+ bool hoverEnabled() const;
+ void setHoverEnabled(bool h);
+
QDeclarativeDrag *drag();
Q_SIGNALS:
@@ -149,6 +152,7 @@ Q_SIGNALS:
void pressedChanged();
void enabledChanged();
void acceptedButtonsChanged();
+ void hoverEnabledChanged();
void positionChanged(QDeclarativeMouseEvent *mouse);
void mousePositionChanged(QDeclarativeMouseEvent *mouse);
@@ -159,6 +163,7 @@ Q_SIGNALS:
void doubleClicked(QDeclarativeMouseEvent *mouse);
void entered();
void exited();
+ void canceled();
protected:
void setHovered(bool);
@@ -176,6 +181,7 @@ protected:
virtual void geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry);
+ virtual QVariant itemChange(GraphicsItemChange change, const QVariant& value);
private:
void handlePress();
diff --git a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
index f52636f..c4f0b86 100644
--- a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
@@ -59,8 +59,8 @@ QT_BEGIN_NAMESPACE
\brief The QDeclarativePaintedItem class is an abstract base class for QDeclarativeView items that want cached painting.
\internal
- This is a convenience class for implementing items that paint their contents
- using a QPainter. The contents of the item are cached behind the scenes.
+ This is a convenience class for implementing items that cache their painting.
+ The contents of the item are cached behind the scenes.
The dirtyCache() function should be called if the contents change to
ensure the cache is refreshed the next time painting occurs.
@@ -184,7 +184,6 @@ void QDeclarativePaintedItem::setContentsScale(qreal scale)
QDeclarativePaintedItem::QDeclarativePaintedItem(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativePaintedItemPrivate), parent)
{
- init();
}
/*!
@@ -195,7 +194,6 @@ QDeclarativePaintedItem::QDeclarativePaintedItem(QDeclarativeItem *parent)
QDeclarativePaintedItem::QDeclarativePaintedItem(QDeclarativePaintedItemPrivate &dd, QDeclarativeItem *parent)
: QDeclarativeItem(dd, parent)
{
- init();
}
/*!
@@ -206,14 +204,23 @@ QDeclarativePaintedItem::~QDeclarativePaintedItem()
clearCache();
}
-/*!
- \internal
-*/
-void QDeclarativePaintedItem::init()
+void QDeclarativePaintedItem::geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry)
{
- connect(this,SIGNAL(widthChanged()),this,SLOT(clearCache()));
- connect(this,SIGNAL(heightChanged()),this,SLOT(clearCache()));
- connect(this,SIGNAL(visibleChanged()),this,SLOT(clearCache()));
+ if (newGeometry.width() != oldGeometry.width() ||
+ newGeometry.height() != oldGeometry.height())
+ clearCache();
+
+ QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
+}
+
+QVariant QDeclarativePaintedItem::itemChange(GraphicsItemChange change,
+ const QVariant &value)
+{
+ if (change == ItemVisibleHasChanged)
+ clearCache();
+
+ return QDeclarativeItem::itemChange(change, value);
}
void QDeclarativePaintedItem::setCacheFrozen(bool frozen)
@@ -226,7 +233,7 @@ void QDeclarativePaintedItem::setCacheFrozen(bool frozen)
}
/*!
- \reimp
+ \internal
*/
void QDeclarativePaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
diff --git a/src/declarative/graphicsitems/qdeclarativepainteditem_p.h b/src/declarative/graphicsitems/qdeclarativepainteditem_p.h
index cc616af..8d08ba2 100644
--- a/src/declarative/graphicsitems/qdeclarativepainteditem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepainteditem_p.h
@@ -87,6 +87,10 @@ protected:
QDeclarativePaintedItem(QDeclarativePaintedItemPrivate &dd, QDeclarativeItem *parent);
virtual void drawContents(QPainter *p, const QRect &) = 0;
+ virtual void geometryChanged(const QRectF &newGeometry,
+ const QRectF &oldGeometry);
+ virtual QVariant itemChange(GraphicsItemChange change,
+ const QVariant &value);
void setCacheFrozen(bool);
@@ -100,7 +104,6 @@ protected Q_SLOTS:
void clearCache();
private:
- void init();
Q_DISABLE_COPY(QDeclarativePaintedItem)
Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativePaintedItem)
};
diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp
index e2042fc..2d08c7c 100644
--- a/src/declarative/graphicsitems/qdeclarativepath.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepath.cpp
@@ -63,7 +63,6 @@ QT_BEGIN_NAMESPACE
/*!
\internal
\class QDeclarativePathElement
- \ingroup group_utility
*/
/*!
@@ -86,7 +85,6 @@ QT_BEGIN_NAMESPACE
/*!
\internal
\class QDeclarativePath
- \ingroup group_utility
\brief The QDeclarativePath class defines a path.
\sa QDeclarativePathView
*/
@@ -117,6 +115,7 @@ void QDeclarativePath::setStartX(qreal x)
return;
d->startX = x;
emit startXChanged();
+ processPath();
}
qreal QDeclarativePath::startY() const
@@ -132,6 +131,7 @@ void QDeclarativePath::setStartY(qreal y)
return;
d->startY = y;
emit startYChanged();
+ processPath();
}
/*!
@@ -220,6 +220,9 @@ void QDeclarativePath::processPath()
{
Q_D(QDeclarativePath);
+ if (!d->componentComplete)
+ return;
+
d->_pointCache.clear();
d->_attributePoints.clear();
d->_path = QPainterPath();
@@ -284,10 +287,18 @@ void QDeclarativePath::processPath()
emit changed();
}
+void QDeclarativePath::classBegin()
+{
+ Q_D(QDeclarativePath);
+ d->componentComplete = false;
+}
+
void QDeclarativePath::componentComplete()
{
Q_D(QDeclarativePath);
QSet<QString> attrs;
+ d->componentComplete = true;
+
// First gather up all the attributes
foreach (QDeclarativePathElement *pathElement, d->_pathElements) {
if (QDeclarativePathAttribute *attribute =
@@ -311,6 +322,17 @@ QPainterPath QDeclarativePath::path() const
QStringList QDeclarativePath::attributes() const
{
Q_D(const QDeclarativePath);
+ if (!d->componentComplete) {
+ QSet<QString> attrs;
+
+ // First gather up all the attributes
+ foreach (QDeclarativePathElement *pathElement, d->_pathElements) {
+ if (QDeclarativePathAttribute *attribute =
+ qobject_cast<QDeclarativePathAttribute *>(pathElement))
+ attrs.insert(attribute->name());
+ }
+ return attrs.toList();
+ }
return d->_attributes;
}
@@ -355,7 +377,9 @@ void QDeclarativePath::createPointCache() const
{
Q_D(const QDeclarativePath);
qreal pathLength = d->_path.length();
- const int points = int(pathLength*2);
+ // more points means less jitter between items as they move along the
+ // path, but takes longer to generate
+ const int points = int(pathLength*5);
const int lastElement = d->_path.elementCount() - 1;
d->_pointCache.resize(points+1);
@@ -500,7 +524,6 @@ void QDeclarativeCurve::setY(qreal y)
/*!
\internal
\class QDeclarativePathAttribute
- \ingroup group_utility
\brief The QDeclarativePathAttribute class allows to set the value of an attribute at a given position in the path.
\sa QDeclarativePath
@@ -573,7 +596,6 @@ void QDeclarativePathAttribute::setValue(qreal value)
/*!
\internal
\class QDeclarativePathLine
- \ingroup group_utility
\brief The QDeclarativePathLine class defines a straight line.
\sa QDeclarativePath
@@ -617,7 +639,6 @@ void QDeclarativePathLine::addToPath(QPainterPath &path)
/*!
\internal
\class QDeclarativePathQuad
- \ingroup group_utility
\brief The QDeclarativePathQuad class defines a quadratic Bezier curve with a control point.
\sa QDeclarativePath
@@ -705,7 +726,6 @@ void QDeclarativePathQuad::addToPath(QPainterPath &path)
/*!
\internal
\class QDeclarativePathCubic
- \ingroup group_utility
\brief The QDeclarativePathCubic class defines a cubic Bezier curve with two control points.
\sa QDeclarativePath
@@ -831,7 +851,6 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path)
/*!
\internal
\class QDeclarativePathPercent
- \ingroup group_utility
\brief The QDeclarativePathPercent class manipulates the way a path is interpreted.
QDeclarativePathPercent allows you to bunch up items (or spread out items) along various
diff --git a/src/declarative/graphicsitems/qdeclarativepath_p.h b/src/declarative/graphicsitems/qdeclarativepath_p.h
index d7cfca1..17a2ea3 100644
--- a/src/declarative/graphicsitems/qdeclarativepath_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepath_p.h
@@ -224,6 +224,7 @@ Q_SIGNALS:
protected:
virtual void componentComplete();
+ virtual void classBegin();
private Q_SLOTS:
void processPath();
diff --git a/src/declarative/graphicsitems/qdeclarativepath_p_p.h b/src/declarative/graphicsitems/qdeclarativepath_p_p.h
index e82bcf5..994090e 100644
--- a/src/declarative/graphicsitems/qdeclarativepath_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepath_p_p.h
@@ -65,7 +65,7 @@ class QDeclarativePathPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QDeclarativePath)
public:
- QDeclarativePathPrivate() : startX(0), startY(0), closed(false) { }
+ QDeclarativePathPrivate() : startX(0), startY(0), closed(false), componentComplete(true) { }
QPainterPath _path;
QList<QDeclarativePathElement*> _pathElements;
@@ -75,6 +75,7 @@ public:
int startX;
int startY;
bool closed;
+ bool componentComplete;
};
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index d0a3cd1..207cc25 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -49,6 +49,7 @@
#include <qlistmodelinterface_p.h>
#include <QGraphicsSceneEvent>
+#include <qmath.h>
#include <math.h>
QT_BEGIN_NAMESPACE
@@ -98,9 +99,8 @@ QDeclarativeItem *QDeclarativePathViewPrivate::getItem(int modelIndex)
if (!attType) {
// pre-create one metatype to share with all attached objects
attType = new QDeclarativeOpenMetaObjectType(&QDeclarativePathViewAttached::staticMetaObject, qmlEngine(q));
- foreach(const QString &attr, path->attributes()) {
+ foreach(const QString &attr, path->attributes())
attType->createProperty(attr.toUtf8());
- }
}
qPathViewAttachedType = attType;
QDeclarativePathViewAttached *att = static_cast<QDeclarativePathViewAttached *>(qmlAttachedPropertiesObject<QDeclarativePathView>(item));
@@ -280,8 +280,8 @@ void QDeclarativePathViewPrivate::updateItem(QDeclarativeItem *item, qreal perce
att->setValue(attr.toUtf8(), path->attributeAt(attr, percent));
}
QPointF pf = path->pointAt(percent);
- item->setX(pf.x() - item->width()*item->scale()/2);
- item->setY(pf.y() - item->height()*item->scale()/2);
+ item->setX(qRound(pf.x() - item->width()*item->scale()/2));
+ item->setY(qRound(pf.y() - item->height()*item->scale()/2));
}
void QDeclarativePathViewPrivate::regenerate()
@@ -308,12 +308,16 @@ void QDeclarativePathViewPrivate::regenerate()
The model is typically provided by a QAbstractListModel "C++ model object", but can also be created directly in QML.
- The items are laid out along a path defined by a \l Path and may be flicked to scroll.
+ The \l delegate is instantiated for each item on the \l path.
+ The items may be flicked to move them along the path.
\snippet doc/src/snippets/declarative/pathview/pathview.qml 0
\image pathview.gif
+ Delegates are instantiated as needed and may be destroyed at any time.
+ State should \e never be stored in a delegate.
+
\bold Note that views do not enable \e clip automatically. If the view
is not clipped by another item or the screen, it will be necessary
to set \e {clip: true} in order to have the out of view items clipped
@@ -414,7 +418,7 @@ void QDeclarativePathView::setModel(const QVariant &model)
d->model = vim;
} else {
if (!d->ownModel) {
- d->model = new QDeclarativeVisualDataModel(qmlContext(this));
+ d->model = new QDeclarativeVisualDataModel(qmlContext(this), this);
d->ownModel = true;
}
if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model))
@@ -467,12 +471,14 @@ void QDeclarativePathView::setPath(QDeclarativePath *path)
disconnect(d->path, SIGNAL(changed()), this, SLOT(refill()));
d->path = path;
connect(d->path, SIGNAL(changed()), this, SLOT(refill()));
- d->clear();
- if (d->attType) {
- d->attType->release();
- d->attType = 0;
+ if (d->isValid() && isComponentComplete()) {
+ d->clear();
+ if (d->attType) {
+ d->attType->release();
+ d->attType = 0;
+ }
+ d->regenerate();
}
- d->regenerate();
emit pathChanged();
}
@@ -522,6 +528,33 @@ void QDeclarativePathView::setCurrentIndex(int idx)
}
/*!
+ \qmlmethod PathView::incrementCurrentIndex()
+
+ Increments the current index.
+*/
+void QDeclarativePathView::incrementCurrentIndex()
+{
+ setCurrentIndex(currentIndex()+1);
+}
+
+
+/*!
+ \qmlmethod PathView::decrementCurrentIndex()
+
+ Decrements the current index.
+*/
+void QDeclarativePathView::decrementCurrentIndex()
+{
+ Q_D(QDeclarativePathView);
+ if (d->model && d->model->count()) {
+ int idx = currentIndex()-1;
+ if (idx < 0)
+ idx = d->model->count() - 1;
+ setCurrentIndex(idx);
+ }
+}
+
+/*!
\qmlproperty real PathView::offset
The offset specifies how far along the path the items are from their initial positions.
@@ -557,7 +590,7 @@ void QDeclarativePathViewPrivate::setOffset(qreal o)
}
/*!
- \qmlproperty component PathView::highlight
+ \qmlproperty Component PathView::highlight
This property holds the component to use as the highlight.
An instance of the highlight component will be created for each view.
@@ -618,12 +651,12 @@ QDeclarativeItem *QDeclarativePathView::highlightItem()
These properties set the preferred range of the highlight (current item)
within the view. The preferred values must be in the range 0.0-1.0.
- If highlightRangeMode is set to \e ApplyRange the view will
+ If highlightRangeMode is set to \e PathView.ApplyRange the view will
attempt to maintain the highlight within the range, however
the highlight can move outside of the range at the ends of the path
or due to a mouse interaction.
- If highlightRangeMode is set to \e StrictlyEnforceRange the highlight will never
+ If highlightRangeMode is set to \e PathView.StrictlyEnforceRange the highlight will never
move outside of the range. This means that the current item will change
if a keyboard or mouse action would cause the highlight to move
outside of the range.
@@ -631,14 +664,14 @@ QDeclarativeItem *QDeclarativePathView::highlightItem()
Note that this is the correct way to influence where the
current item ends up when the view moves. For example, if you want the
currently selected item to be in the middle of the path, then set the
- highlight range to be 0.5,0.5 and highlightRangeMode to StrictlyEnforceRange.
+ highlight range to be 0.5,0.5 and highlightRangeMode to PathView.StrictlyEnforceRange.
Then, when the path scrolls,
the currently selected item will be the item at that position. This also applies to
when the currently selected item changes - it will scroll to within the preferred
highlight range. Furthermore, the behaviour of the current item index will occur
whether or not a highlight exists.
- The default value is \e StrictlyEnforceRange.
+ The default value is \e PathView.StrictlyEnforceRange.
Note that a valid range requires preferredHighlightEnd to be greater
than or equal to preferredHighlightBegin.
@@ -786,12 +819,17 @@ void QDeclarativePathView::setInteractive(bool interactive)
}
/*!
- \qmlproperty component PathView::delegate
+ \qmlproperty Component PathView::delegate
The delegate provides a template defining each item instantiated by the view.
The index is exposed as an accessible \c index property. Properties of the
model are also available depending upon the type of \l {qmlmodels}{Data Model}.
+ The number of elements in the delegate has a direct effect on the
+ flicking performance of the view when pathItemCount is specified. If at all possible, place functionality
+ that is not needed for the normal display of the delegate in a \l Loader which
+ can load additional elements when needed.
+
Note that the PathView will layout the items based on the size of the root
item in the delegate.
@@ -961,7 +999,12 @@ void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
else
dist = qRound(dist - d->offset) + d->offset;
// Calculate accel required to stop on item boundary
- accel = v2 / (2.0f * qAbs(dist));
+ if (dist <= 0.) {
+ dist = 0.;
+ accel = 0.;
+ } else {
+ accel = v2 / (2.0f * qAbs(dist));
+ }
}
d->moveOffset.setValue(d->offset);
d->tl.accel(d->moveOffset, velocity, accel, dist);
@@ -1046,7 +1089,11 @@ void QDeclarativePathView::componentComplete()
Q_D(QDeclarativePathView);
QDeclarativeItem::componentComplete();
d->createHighlight();
- d->regenerate();
+ // It is possible that a refill has already happended to to Path
+ // bindings being handled in the componentComplete(). If so
+ // don't do it again.
+ if (d->items.count() == 0)
+ d->regenerate();
d->updateHighlight();
}
@@ -1101,7 +1148,8 @@ void QDeclarativePathView::refill()
while ((pos > startPos || !d->items.count()) && d->items.count() < count) {
// qDebug() << "append" << idx;
QDeclarativeItem *item = d->getItem(idx);
- item->setZValue(idx+1);
+ if (d->model->completePending())
+ item->setZValue(idx+1);
if (d->currentIndex == idx) {
item->setFocus(true);
if (QDeclarativePathViewAttached *att = d->attached(item))
@@ -1114,7 +1162,8 @@ void QDeclarativePathView::refill()
d->firstIndex = idx;
d->items.append(item);
d->updateItem(item, pos);
- d->model->completeItem();
+ if (d->model->completePending())
+ d->model->completeItem();
++idx;
if (idx >= d->model->count())
idx = 0;
@@ -1128,7 +1177,8 @@ void QDeclarativePathView::refill()
while (pos >= 0.0 && pos < startPos) {
// qDebug() << "prepend" << idx;
QDeclarativeItem *item = d->getItem(idx);
- item->setZValue(idx+1);
+ if (d->model->completePending())
+ item->setZValue(idx+1);
if (d->currentIndex == idx) {
item->setFocus(true);
if (QDeclarativePathViewAttached *att = d->attached(item))
@@ -1139,7 +1189,8 @@ void QDeclarativePathView::refill()
}
d->items.prepend(item);
d->updateItem(item, pos);
- d->model->completeItem();
+ if (d->model->completePending())
+ d->model->completeItem();
d->firstIndex = idx;
idx = d->firstIndex - 1;
if (idx < 0)
@@ -1251,6 +1302,19 @@ void QDeclarativePathView::createdItem(int index, QDeclarativeItem *item)
{
Q_D(QDeclarativePathView);
if (d->requestedIndex != index) {
+ if (!d->attType) {
+ // pre-create one metatype to share with all attached objects
+ d->attType = new QDeclarativeOpenMetaObjectType(&QDeclarativePathViewAttached::staticMetaObject, qmlEngine(this));
+ foreach(const QString &attr, d->path->attributes())
+ d->attType->createProperty(attr.toUtf8());
+ }
+ qPathViewAttachedType = d->attType;
+ QDeclarativePathViewAttached *att = static_cast<QDeclarativePathViewAttached *>(qmlAttachedPropertiesObject<QDeclarativePathView>(item));
+ qPathViewAttachedType = 0;
+ if (att) {
+ att->m_view = this;
+ att->setOnPath(false);
+ }
item->setParentItem(this);
d->updateItem(item, index < d->firstIndex ? 0.0 : 1.0);
}
@@ -1276,6 +1340,7 @@ int QDeclarativePathViewPrivate::calcCurrentIndex()
if (offset < 0)
offset += model->count();
current = qRound(qAbs(qmlMod(model->count() - offset, model->count())));
+ current = current % model->count();
}
return current;
diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p.h
index 7240578..349a01c 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepathview_p.h
@@ -132,6 +132,10 @@ public:
static QDeclarativePathViewAttached *qmlAttachedProperties(QObject *);
+public Q_SLOTS:
+ void incrementCurrentIndex();
+ void decrementCurrentIndex();
+
Q_SIGNALS:
void currentIndexChanged();
void offsetChanged();
@@ -215,6 +219,7 @@ Q_SIGNALS:
private:
friend class QDeclarativePathViewPrivate;
+ friend class QDeclarativePathView;
QDeclarativePathView *m_view;
QDeclarativeOpenMetaObject *m_metaobject;
bool m_onPath : 1;
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
index 21c33e2..8796e63 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
@@ -46,6 +46,7 @@
#include <qdeclarativestate_p.h>
#include <qdeclarativestategroup_p.h>
#include <qdeclarativestateoperations_p.h>
+#include <qdeclarativeinfo.h>
#include <QtCore/qmath.h>
#include <QDebug>
@@ -75,7 +76,6 @@ void QDeclarativeBasePositionerPrivate::unwatchChanges(QDeclarativeItem* other)
/*!
\internal
\class QDeclarativeBasePositioner
- \ingroup group_layouts
\brief The QDeclarativeBasePositioner class provides a base for QDeclarativeGraphics layouts.
To create a QDeclarativeGraphics Positioner, simply subclass QDeclarativeBasePositioner and implement
@@ -165,6 +165,7 @@ void QDeclarativeBasePositioner::componentComplete()
QDeclarativeItem::componentComplete();
positionedItems.reserve(d->QGraphicsItemPrivate::children.count());
prePositioning();
+ reportConflictingAnchors();
}
QVariant QDeclarativeBasePositioner::itemChange(GraphicsItemChange change,
@@ -203,7 +204,11 @@ void QDeclarativeBasePositioner::prePositioning()
if (!isComponentComplete())
return;
+ if (d->doingPositioning)
+ return;
+
d->queuedPositioning = false;
+ d->doingPositioning = true;
//Need to order children by creation order modified by stacking order
QList<QGraphicsItem *> children = d->QGraphicsItemPrivate::children;
qSort(children.begin(), children.end(), d->insertionOrder);
@@ -241,6 +246,7 @@ void QDeclarativeBasePositioner::prePositioning()
doPositioning(&contentSize);
if(d->addTransition || d->moveTransition)
finishApplyTransitions();
+ d->doingPositioning = false;
//Set implicit size to the size of its children
setImplicitHeight(contentSize.height());
setImplicitWidth(contentSize.width());
@@ -329,7 +335,6 @@ Column {
\qml
Column {
spacing: 2
- remove: ...
add: ...
move: ...
...
@@ -339,7 +344,8 @@ Column {
Note that the positioner assumes that the x and y positions of its children
will not change. If you manually change the x or y properties in script, bind
- the x or y properties, or use anchors on a child of a positioner, then the
+ the x or y properties, use anchors on a child of a positioner, or have the
+ height of a child depend on the position of a child, then the
positioner may exhibit strange behaviour.
*/
@@ -377,7 +383,7 @@ Column {
move: Transition {
NumberAnimation {
properties: "y"
- easing.type: "OutBounce"
+ easing.type: Easing.OutBounce
}
}
}
@@ -403,7 +409,6 @@ Column {
\internal
\class QDeclarativeColumn
\brief The QDeclarativeColumn class lines up items vertically.
- \ingroup group_positioners
*/
QDeclarativeColumn::QDeclarativeColumn(QDeclarativeItem *parent)
: QDeclarativeBasePositioner(Vertical, parent)
@@ -436,6 +441,30 @@ void QDeclarativeColumn::doPositioning(QSizeF *contentSize)
contentSize->setHeight(voffset - spacing());
}
+void QDeclarativeColumn::reportConflictingAnchors()
+{
+ QDeclarativeBasePositionerPrivate *d = static_cast<QDeclarativeBasePositionerPrivate*>(QDeclarativeBasePositionerPrivate::get(this));
+ for (int ii = 0; ii < positionedItems.count(); ++ii) {
+ const PositionedItem &child = positionedItems.at(ii);
+ if (child.item) {
+ QDeclarativeAnchors *anchors = QDeclarativeItemPrivate::get(child.item)->_anchors;
+ if (anchors) {
+ QDeclarativeAnchors::Anchors usedAnchors = anchors->usedAnchors();
+ if (usedAnchors & QDeclarativeAnchors::TopAnchor ||
+ usedAnchors & QDeclarativeAnchors::BottomAnchor ||
+ usedAnchors & QDeclarativeAnchors::VCenterAnchor ||
+ anchors->fill() || anchors->centerIn()) {
+ d->anchorConflict = true;
+ break;
+ }
+ }
+ }
+ }
+ if (d->anchorConflict) {
+ qmlInfo(this) << "Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column";
+ }
+}
+
/*!
\qmlclass Row QDeclarativeRow
\since 4.7
@@ -464,7 +493,8 @@ Row {
Note that the positioner assumes that the x and y positions of its children
will not change. If you manually change the x or y properties in script, bind
- the x or y properties, or use anchors on a child of a positioner, then the
+ the x or y properties, use anchors on a child of a positioner, or have the
+ width of a child depend on the position of a child, then the
positioner may exhibit strange behaviour.
*/
@@ -523,7 +553,6 @@ Row {
\internal
\class QDeclarativeRow
\brief The QDeclarativeRow class lines up items horizontally.
- \ingroup group_positioners
*/
QDeclarativeRow::QDeclarativeRow(QDeclarativeItem *parent)
: QDeclarativeBasePositioner(Horizontal, parent)
@@ -551,6 +580,28 @@ void QDeclarativeRow::doPositioning(QSizeF *contentSize)
contentSize->setWidth(hoffset - spacing());
}
+void QDeclarativeRow::reportConflictingAnchors()
+{
+ QDeclarativeBasePositionerPrivate *d = static_cast<QDeclarativeBasePositionerPrivate*>(QDeclarativeBasePositionerPrivate::get(this));
+ for (int ii = 0; ii < positionedItems.count(); ++ii) {
+ const PositionedItem &child = positionedItems.at(ii);
+ if (child.item) {
+ QDeclarativeAnchors *anchors = QDeclarativeItemPrivate::get(child.item)->_anchors;
+ if (anchors) {
+ QDeclarativeAnchors::Anchors usedAnchors = anchors->usedAnchors();
+ if (usedAnchors & QDeclarativeAnchors::LeftAnchor ||
+ usedAnchors & QDeclarativeAnchors::RightAnchor ||
+ usedAnchors & QDeclarativeAnchors::HCenterAnchor ||
+ anchors->fill() || anchors->centerIn()) {
+ d->anchorConflict = true;
+ break;
+ }
+ }
+ }
+ }
+ if (d->anchorConflict)
+ qmlInfo(this) << "Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row";
+}
/*!
\qmlclass Grid QDeclarativeGrid
@@ -595,7 +646,8 @@ Grid {
Note that the positioner assumes that the x and y positions of its children
will not change. If you manually change the x or y properties in script, bind
- the x or y properties, or use anchors on a child of a positioner, then the
+ the x or y properties, use anchors on a child of a positioner, or have the
+ width or height of a child depend on the position of a child, then the
positioner may exhibit strange behaviour.
*/
/*!
@@ -652,8 +704,6 @@ Grid {
\internal
\class QDeclarativeGrid
\brief The QDeclarativeGrid class lays out items in a grid.
- \ingroup group_layouts
-
*/
QDeclarativeGrid::QDeclarativeGrid(QDeclarativeItem *parent) :
QDeclarativeBasePositioner(Both, parent), m_rows(-1), m_columns(-1), m_flow(LeftToRight)
@@ -697,14 +747,14 @@ void QDeclarativeGrid::setRows(const int rows)
}
/*!
- \qmlproperty enumeration Flow::flow
+ \qmlproperty enumeration Grid::flow
This property holds the flow of the layout.
- Possible values are \c LeftToRight (default) and \c TopToBottom.
+ Possible values are \c Grid.LeftToRight (default) and \c Grid.TopToBottom.
- If \a flow is \c LeftToRight, the items are positioned next to
+ If \a flow is \c Grid.LeftToRight, the items are positioned next to
to each other from left to right, then wrapped to the next line.
- If \a flow is \c TopToBottom, the items are positioned next to each
+ If \a flow is \c Grid.TopToBottom, the items are positioned next to each
other from top to bottom, then wrapped to the next column.
*/
QDeclarativeGrid::Flow QDeclarativeGrid::flow() const
@@ -823,6 +873,22 @@ void QDeclarativeGrid::doPositioning(QSizeF *contentSize)
}
}
+void QDeclarativeGrid::reportConflictingAnchors()
+{
+ QDeclarativeBasePositionerPrivate *d = static_cast<QDeclarativeBasePositionerPrivate*>(QDeclarativeBasePositionerPrivate::get(this));
+ for (int ii = 0; ii < positionedItems.count(); ++ii) {
+ const PositionedItem &child = positionedItems.at(ii);
+ if (child.item) {
+ QDeclarativeAnchors *anchors = QDeclarativeItemPrivate::get(child.item)->_anchors;
+ if (anchors && (anchors->usedAnchors() || anchors->fill() || anchors->centerIn())) {
+ d->anchorConflict = true;
+ break;
+ }
+ }
+ }
+ if (d->anchorConflict)
+ qmlInfo(this) << "Cannot specify anchors for items inside Grid";
+}
/*!
\qmlclass Flow QDeclarativeFlow
@@ -830,6 +896,11 @@ void QDeclarativeGrid::doPositioning(QSizeF *contentSize)
\brief The Flow item lines up its children side by side, wrapping as necessary.
\inherits Item
+ Note that the positioner assumes that the x and y positions of its children
+ will not change. If you manually change the x or y properties in script, bind
+ the x or y properties, use anchors on a child of a positioner, or have the
+ width or height of a child depend on the position of a child, then the
+ positioner may exhibit strange behaviour.
*/
/*!
@@ -894,12 +965,12 @@ QDeclarativeFlow::QDeclarativeFlow(QDeclarativeItem *parent)
\qmlproperty enumeration Flow::flow
This property holds the flow of the layout.
- Possible values are \c LeftToRight (default) and \c TopToBottom.
+ Possible values are \c Flow.LeftToRight (default) and \c Flow.TopToBottom.
- If \a flow is \c LeftToRight, the items are positioned next to
+ If \a flow is \c Flow.LeftToRight, the items are positioned next to
to each other from left to right until the width of the Flow
is exceeded, then wrapped to the next line.
- If \a flow is \c TopToBottom, the items are positioned next to each
+ If \a flow is \c Flow.TopToBottom, the items are positioned next to each
other from top to bottom until the height of the Flow is exceeded,
then wrapped to the next column.
*/
@@ -966,5 +1037,21 @@ void QDeclarativeFlow::doPositioning(QSizeF *contentSize)
}
}
+void QDeclarativeFlow::reportConflictingAnchors()
+{
+ Q_D(QDeclarativeFlow);
+ for (int ii = 0; ii < positionedItems.count(); ++ii) {
+ const PositionedItem &child = positionedItems.at(ii);
+ if (child.item) {
+ QDeclarativeAnchors *anchors = QDeclarativeItemPrivate::get(child.item)->_anchors;
+ if (anchors && (anchors->usedAnchors() || anchors->fill() || anchors->centerIn())) {
+ d->anchorConflict = true;
+ break;
+ }
+ }
+ }
+ if (d->anchorConflict)
+ qmlInfo(this) << "Cannot specify anchors for items inside Flow";
+}
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
index b5fc979..787dcd3 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
@@ -94,6 +94,7 @@ protected Q_SLOTS:
protected:
virtual void doPositioning(QSizeF *contentSize)=0;
+ virtual void reportConflictingAnchors()=0;
struct PositionedItem {
PositionedItem(QDeclarativeItem *i) : item(i), isNew(false), isVisible(true) {}
bool operator==(const PositionedItem &other) const { return other.item == item; }
@@ -118,6 +119,7 @@ public:
QDeclarativeColumn(QDeclarativeItem *parent=0);
protected:
virtual void doPositioning(QSizeF *contentSize);
+ virtual void reportConflictingAnchors();
private:
Q_DISABLE_COPY(QDeclarativeColumn)
};
@@ -129,6 +131,7 @@ public:
QDeclarativeRow(QDeclarativeItem *parent=0);
protected:
virtual void doPositioning(QSizeF *contentSize);
+ virtual void reportConflictingAnchors();
private:
Q_DISABLE_COPY(QDeclarativeRow)
};
@@ -161,6 +164,7 @@ Q_SIGNALS:
protected:
virtual void doPositioning(QSizeF *contentSize);
+ virtual void reportConflictingAnchors();
private:
int m_rows;
@@ -187,7 +191,7 @@ Q_SIGNALS:
protected:
virtual void doPositioning(QSizeF *contentSize);
-
+ virtual void reportConflictingAnchors();
protected:
QDeclarativeFlow(QDeclarativeFlowPrivate &dd, QDeclarativeItem *parent);
private:
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h
index 576f35b..04f0181 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h
@@ -75,6 +75,7 @@ public:
QDeclarativeBasePositionerPrivate()
: spacing(0), type(QDeclarativeBasePositioner::None)
, moveTransition(0), addTransition(0), queuedPositioning(false)
+ , doingPositioning(false), anchorConflict(false)
{
}
@@ -95,7 +96,9 @@ public:
void watchChanges(QDeclarativeItem *other);
void unwatchChanges(QDeclarativeItem* other);
- bool queuedPositioning;
+ bool queuedPositioning : 1;
+ bool doingPositioning : 1;
+ bool anchorConflict : 1;
virtual void itemSiblingOrderChanged(QDeclarativeItem* other)
{
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
index 0328f91..ccabbde 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -43,6 +43,7 @@
#include "private/qdeclarativerectangle_p_p.h"
#include <QPainter>
+#include <QStringBuilder>
#include <QtCore/qmath.h>
QT_BEGIN_NAMESPACE
@@ -155,8 +156,8 @@ void QDeclarativeGradient::doUpdate()
\brief The Rectangle item allows you to add rectangles to a scene.
\inherits Item
- A Rectangle is painted having a solid fill (color) and an optional border.
- You can also create rounded rectangles using the radius property.
+ A Rectangle is painted using a solid fill (color) and an optional border.
+ You can also create rounded rectangles using the \l radius property.
\qml
Rectangle {
@@ -223,14 +224,22 @@ QDeclarativePen *QDeclarativeRectangle::border()
\o \image declarative-rect_gradient.png
\o
\qml
- Rectangle { y: 0; width: 80; height: 80; color: "lightsteelblue" }
- Rectangle { y: 100; width: 80; height: 80
+ Rectangle {
+ y: 0; width: 80; height: 80
+ color: "lightsteelblue"
+ }
+
+ Rectangle {
+ y: 100; width: 80; height: 80
gradient: Gradient {
GradientStop { position: 0.0; color: "lightsteelblue" }
GradientStop { position: 1.0; color: "blue" }
}
}
- Rectangle { rotation: 90; y: 200; width: 80; height: 80
+
+ Rectangle {
+ y: 200; width: 80; height: 80
+ rotation: 90
gradient: Gradient {
GradientStop { position: 0.0; color: "lightsteelblue" }
GradientStop { position: 1.0; color: "blue" }
@@ -334,21 +343,29 @@ void QDeclarativeRectangle::generateRoundedRect()
if (d->rectImage.isNull()) {
const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
const int radius = qCeil(d->radius); //ensure odd numbered width/height so we get 1-pixel center
- d->rectImage = QPixmap(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2);
- d->rectImage.fill(Qt::transparent);
- QPainter p(&(d->rectImage));
- p.setRenderHint(QPainter::Antialiasing);
- if (d->pen && d->pen->isValid()) {
- QPen pn(QColor(d->pen->color()), d->pen->width());
- p.setPen(pn);
- } else {
- p.setPen(Qt::NoPen);
+
+ QString key = QLatin1String("q_") % QString::number(pw) % d->color.name() % QString::number(d->color.alpha(), 16) % QLatin1Char('_') % QString::number(radius);
+ if (d->pen && d->pen->isValid())
+ key += d->pen->color().name() % QString::number(d->pen->color().alpha(), 16);
+
+ if (!QPixmapCache::find(key, &d->rectImage)) {
+ d->rectImage = QPixmap(radius*2 + 3 + pw*2, radius*2 + 3 + pw*2);
+ d->rectImage.fill(Qt::transparent);
+ QPainter p(&(d->rectImage));
+ p.setRenderHint(QPainter::Antialiasing);
+ if (d->pen && d->pen->isValid()) {
+ QPen pn(QColor(d->pen->color()), d->pen->width());
+ p.setPen(pn);
+ } else {
+ p.setPen(Qt::NoPen);
+ }
+ p.setBrush(d->color);
+ if (pw%2)
+ p.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, d->rectImage.width()-(pw+1), d->rectImage.height()-(pw+1)), d->radius, d->radius);
+ else
+ p.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, d->rectImage.width()-pw, d->rectImage.height()-pw), d->radius, d->radius);
+ QPixmapCache::insert(key, d->rectImage);
}
- p.setBrush(d->color);
- if (pw%2)
- p.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, d->rectImage.width()-(pw+1), d->rectImage.height()-(pw+1)), d->radius, d->radius);
- else
- p.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, d->rectImage.width()-pw, d->rectImage.height()-pw), d->radius, d->radius);
}
}
@@ -357,22 +374,30 @@ void QDeclarativeRectangle::generateBorderedRect()
Q_D(QDeclarativeRectangle);
if (d->rectImage.isNull()) {
const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
- d->rectImage = QPixmap(pw*2 + 3, pw*2 + 3);
- d->rectImage.fill(Qt::transparent);
- QPainter p(&(d->rectImage));
- p.setRenderHint(QPainter::Antialiasing);
- if (d->pen && d->pen->isValid()) {
- QPen pn(QColor(d->pen->color()), d->pen->width());
- pn.setJoinStyle(Qt::MiterJoin);
- p.setPen(pn);
- } else {
- p.setPen(Qt::NoPen);
+
+ QString key = QLatin1String("q_") % QString::number(pw) % d->color.name() % QString::number(d->color.alpha(), 16);
+ if (d->pen && d->pen->isValid())
+ key += d->pen->color().name() % QString::number(d->pen->color().alpha(), 16);
+
+ if (!QPixmapCache::find(key, &d->rectImage)) {
+ d->rectImage = QPixmap(pw*2 + 3, pw*2 + 3);
+ d->rectImage.fill(Qt::transparent);
+ QPainter p(&(d->rectImage));
+ p.setRenderHint(QPainter::Antialiasing);
+ if (d->pen && d->pen->isValid()) {
+ QPen pn(QColor(d->pen->color()), d->pen->width());
+ pn.setJoinStyle(Qt::MiterJoin);
+ p.setPen(pn);
+ } else {
+ p.setPen(Qt::NoPen);
+ }
+ p.setBrush(d->color);
+ if (pw%2)
+ p.drawRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, d->rectImage.width()-(pw+1), d->rectImage.height()-(pw+1)));
+ else
+ p.drawRect(QRectF(qreal(pw)/2, qreal(pw)/2, d->rectImage.width()-pw, d->rectImage.height()-pw));
+ QPixmapCache::insert(key, d->rectImage);
}
- p.setBrush(d->color);
- if (pw%2)
- p.drawRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, d->rectImage.width()-(pw+1), d->rectImage.height()-(pw+1)));
- else
- p.drawRect(QRectF(qreal(pw)/2, qreal(pw)/2, d->rectImage.width()-pw, d->rectImage.height()-pw));
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
index d49bb02..04076f8 100644
--- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
@@ -67,7 +67,7 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
\brief The Repeater item allows you to repeat an Item-based component using a model.
- The Repeater item is used when you want to create a large number of
+ The Repeater item is used to create a large number of
similar items. For each entry in the model, an item is instantiated
in a context seeded with data from the model. If the repeater will
be instantiating a large number of instances, it may be more efficient to
@@ -193,7 +193,7 @@ void QDeclarativeRepeater::setModel(const QVariant &model)
d->model = vim;
} else {
if (!d->ownModel) {
- d->model = new QDeclarativeVisualDataModel(qmlContext(this));
+ d->model = new QDeclarativeVisualDataModel(qmlContext(this), this);
d->ownModel = true;
}
if (QDeclarativeVisualDataModel *dataModel = qobject_cast<QDeclarativeVisualDataModel*>(d->model))
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index 2b8da8e..4e7e0fd 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -116,7 +116,7 @@ QSet<QUrl> QTextDocumentWithImageResources::errors;
\brief The Text item allows you to add formatted text to a scene.
\inherits Item
- It can display both plain and rich text. For example:
+ A Text item can display both plain and rich text. For example:
\qml
Text { text: "Hello World!"; font.family: "Helvetica"; font.pointSize: 24; color: "red" }
@@ -132,8 +132,8 @@ QSet<QUrl> QTextDocumentWithImageResources::errors;
The \c elide property can alternatively be used to fit a single line of
plain text to a set width.
- Note that the \l{Supported HTML Subset} is limited, and that if IMG tags
- load remote images, the text reloads (see resourcesLoading).
+ Note that the \l{Supported HTML Subset} is limited. Also, if the text contains
+ HTML img tags that load remote images, the text is reloaded.
Text provides read-only text. For editable text, see \l TextEdit.
*/
@@ -142,7 +142,6 @@ QSet<QUrl> QTextDocumentWithImageResources::errors;
\internal
\class QDeclarativeText
\qmlclass Text
- \ingroup group_coreitems
\brief The QDeclarativeText class provides a formatted text item that you can add to a QDeclarativeView.
@@ -191,7 +190,7 @@ QDeclarativeTextPrivate::~QDeclarativeTextPrivate()
/*!
\qmlproperty bool Text::font.bold
- Sets the font's weight to bold.
+ Sets whether the font weight is bold.
*/
/*!
@@ -201,11 +200,11 @@ QDeclarativeTextPrivate::~QDeclarativeTextPrivate()
The weight can be one of:
\list
- \o Light
- \o Normal - the default
- \o DemiBold
- \o Bold
- \o Black
+ \o Font.Light
+ \o Font.Normal - the default
+ \o Font.DemiBold
+ \o Font.Bold
+ \o Font.Black
\endlist
\qml
@@ -216,25 +215,25 @@ QDeclarativeTextPrivate::~QDeclarativeTextPrivate()
/*!
\qmlproperty bool Text::font.italic
- Sets the style of the text to italic.
+ Sets whether the font has an italic style.
*/
/*!
\qmlproperty bool Text::font.underline
- Set the style of the text to underline.
+ Sets whether the text is underlined.
*/
/*!
\qmlproperty bool Text::font.outline
- Set the style of the text to outline.
+ Sets whether the font has an outline style.
*/
/*!
\qmlproperty bool Text::font.strikeout
- Set the style of the text to strikeout.
+ Sets whether the font has a strikeout style.
*/
/*!
@@ -278,11 +277,11 @@ QDeclarativeTextPrivate::~QDeclarativeTextPrivate()
Sets the capitalization for the text.
\list
- \o MixedCase - This is the normal text rendering option where no capitalization change is applied.
- \o AllUppercase - This alters the text to be rendered in all uppercase type.
- \o AllLowercase - This alters the text to be rendered in all lowercase type.
- \o SmallCaps - This alters the text to be rendered in small-caps type.
- \o Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
+ \o Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.
+ \o Font.AllUppercase - This alters the text to be rendered in all uppercase type.
+ \o Font.AllLowercase - This alters the text to be rendered in all lowercase type.
+ \o Font.SmallCaps - This alters the text to be rendered in small-caps type.
+ \o Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
\endlist
\qml
@@ -381,10 +380,10 @@ QColor QDeclarativeText::color() const
Supported text styles are:
\list
- \o Normal - the default
- \o Outline
- \o Raised
- \o Sunken
+ \o Text.Normal - the default
+ \o Text.Outline
+ \o Text.Raised
+ \o Text.Sunken
\endlist
\qml
@@ -452,9 +451,14 @@ QColor QDeclarativeText::styleColor() const
Sets the horizontal and vertical alignment of the text within the Text items
width and height. By default, the text is top-left aligned.
- The valid values for \c horizontalAlignment are \c AlignLeft, \c AlignRight and
- \c AlignHCenter. The valid values for \c verticalAlignment are \c AlignTop, \c AlignBottom
- and \c AlignVCenter.
+ The valid values for \c horizontalAlignment are \c Text.AlignLeft, \c Text.AlignRight and
+ \c Text.AlignHCenter. The valid values for \c verticalAlignment are \c Text.AlignTop, \c Text.AlignBottom
+ and \c Text.AlignVCenter.
+
+ Note that for a single line of text, the size of the text is the area of the text. In this common case,
+ all alignments are equivalent. If you want the text to be, say, centered in it parent, then you will
+ need to either modify the Item::anchors, or set horizontalAlignment to Text.AlignHCenter and bind the width to
+ that of the parent.
*/
QDeclarativeText::HAlignment QDeclarativeText::hAlign() const
{
@@ -495,16 +499,16 @@ void QDeclarativeText::setVAlign(VAlignment align)
wrap if an explicit width has been set. wrapMode can be one of:
\list
- \o NoWrap - no wrapping will be performed.
- \o WordWrap - wrapping is done on word boundaries. If the text cannot be
+ \o Text.NoWrap - no wrapping will be performed.
+ \o Text.WordWrap - wrapping is done on word boundaries. If the text cannot be
word-wrapped to the specified width it will be partially drawn outside of the item's bounds.
If this is undesirable then enable clipping on the item (Item::clip).
- \o WrapAnywhere - Text can be wrapped at any point on a line, even if it occurs in the middle of a word.
- \o WrapAtWordBoundaryOrAnywhere - If possible, wrapping occurs at a word boundary; otherwise it
+ \o Text.WrapAnywhere - Text can be wrapped at any point on a line, even if it occurs in the middle of a word.
+ \o Text.WrapAtWordBoundaryOrAnywhere - If possible, wrapping occurs at a word boundary; otherwise it
will occur at the appropriate point on the line, even in the middle of a word.
\endlist
- The default is NoWrap.
+ The default is Text.NoWrap.
*/
QDeclarativeText::WrapMode QDeclarativeText::wrapMode() const
{
@@ -531,13 +535,20 @@ void QDeclarativeText::setWrapMode(WrapMode mode)
The way the text property should be displayed.
- Supported text formats are \c AutoText, \c PlainText, \c RichText and \c StyledText
+ Supported text formats are:
+
+ \list
+ \o Text.AutoText
+ \o Text.PlainText
+ \o Text.RichText
+ \o Text.StyledText
+ \endlist
- The default is AutoText. If the text format is AutoText the text element
+ The default is Text.AutoText. If the text format is Text.AutoText the text element
will automatically determine whether the text should be treated as
rich text. This determination is made using Qt::mightBeRichText().
- StyledText is an optimized format supporting some basic text
+ Text.StyledText is an optimized format supporting some basic text
styling markup, in the style of html 3.2:
\code
@@ -548,7 +559,7 @@ void QDeclarativeText::setWrapMode(WrapMode mode)
&gt; &lt; &amp;
\endcode
- \c StyledText parser is strict, requiring tags to be correctly nested.
+ \c Text.StyledText parser is strict, requiring tags to be correctly nested.
\table
\row
@@ -616,13 +627,13 @@ void QDeclarativeText::setTextFormat(TextFormat format)
Eliding can be:
\list
- \o ElideNone - the default
- \o ElideLeft
- \o ElideMiddle
- \o ElideRight
+ \o Text.ElideNone - the default
+ \o Text.ElideLeft
+ \o Text.ElideMiddle
+ \o Text.ElideRight
\endlist
- If the text is a multi-length string, and the mode is not \c ElideNone,
+ If the text is a multi-length string, and the mode is not \c Text.ElideNone,
the first string that fits will be used, otherwise the last will be elided.
Multi-length strings are ordered from longest to shortest, separated by the
@@ -1069,8 +1080,9 @@ void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWid
/*!
\qmlproperty bool Text::smooth
- Set this property if you want the text to be smoothly scaled or
- transformed. Smooth filtering gives better visual quality, but is slower. If
+ This property holds whether the text is smoothly scaled or transformed.
+
+ Smooth filtering gives better visual quality, but is slower. If
the item is displayed at its natural size, this property has no visual or
performance effect.
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index 25eaef6..40d37a2 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -46,6 +46,8 @@
#include <private/qdeclarativeglobal_p.h>
#include <qdeclarativeinfo.h>
+#include <QtCore/qmath.h>
+
#include <QTextLayout>
#include <QTextLine>
#include <QTextDocument>
@@ -85,7 +87,6 @@ TextEdit {
\internal
\class QDeclarativeTextEdit
\qmlclass TextEdit
- \ingroup group_coreitems
\brief The QDeclarativeTextEdit class provides an editable formatted text item that you can add to a QDeclarativeView.
@@ -129,7 +130,7 @@ QString QDeclarativeTextEdit::text() const
/*!
\qmlproperty bool TextEdit::font.bold
- Sets the font's weight to bold.
+ Sets whether the font weight is bold.
*/
/*!
@@ -139,11 +140,11 @@ QString QDeclarativeTextEdit::text() const
The weight can be one of:
\list
- \o Light
- \o Normal - the default
- \o DemiBold
- \o Bold
- \o Black
+ \o Font.Light
+ \o Font.Normal - the default
+ \o Font.DemiBold
+ \o Font.Bold
+ \o Font.Black
\endlist
\qml
@@ -154,25 +155,25 @@ QString QDeclarativeTextEdit::text() const
/*!
\qmlproperty bool TextEdit::font.italic
- Sets the style of the text to italic.
+ Sets whether the font has an italic style.
*/
/*!
\qmlproperty bool TextEdit::font.underline
- Set the style of the text to underline.
+ Sets whether the text is underlined.
*/
/*!
\qmlproperty bool TextEdit::font.outline
- Set the style of the text to outline.
+ Sets whether the font has an outline style.
*/
/*!
\qmlproperty bool TextEdit::font.strikeout
- Set the style of the text to strikeout.
+ Sets whether the font has a strikeout style.
*/
/*!
@@ -216,11 +217,11 @@ QString QDeclarativeTextEdit::text() const
Sets the capitalization for the text.
\list
- \o MixedCase - This is the normal text rendering option where no capitalization change is applied.
- \o AllUppercase - This alters the text to be rendered in all uppercase type.
- \o AllLowercase - This alters the text to be rendered in all lowercase type.
- \o SmallCaps - This alters the text to be rendered in small-caps type.
- \o Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
+ \o Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.
+ \o Font.AllUppercase - This alters the text to be rendered in all uppercase type.
+ \o Font.AllLowercase - This alters the text to be rendered in all lowercase type.
+ \o Font.SmallCaps - This alters the text to be rendered in small-caps type.
+ \o Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
\endlist
\qml
@@ -255,9 +256,14 @@ void QDeclarativeTextEdit::setText(const QString &text)
The way the text property should be displayed.
- Supported text formats are \c AutoText, \c PlainText and \c RichText.
+ \list
+ \o TextEdit.AutoText
+ \o TextEdit.PlainText
+ \o TextEdit.RichText
+ \o TextEdit.StyledText
+ \endlist
- The default is AutoText. If the text format is AutoText the text edit
+ The default is TextEdit.AutoText. If the text format is TextEdit.AutoText the text edit
will automatically determine whether the text should be treated as
rich text. This determination is made using Qt::mightBeRichText().
@@ -424,9 +430,9 @@ void QDeclarativeTextEdit::setSelectedTextColor(const QColor &color)
Sets the horizontal and vertical alignment of the text within the TextEdit items
width and height. By default, the text is top-left aligned.
- The valid values for \c horizontalAlignment are \c AlignLeft, \c AlignRight and
- \c AlignHCenter. The valid values for \c verticalAlignment are \c AlignTop, \c AlignBottom
- and \c AlignVCenter.
+ The valid values for \c horizontalAlignment are \c TextEdit.AlignLeft, \c TextEdit.AlignRight and
+ \c TextEdit.AlignHCenter. The valid values for \c verticalAlignment are \c TextEdit.AlignTop, \c TextEdit.AlignBottom
+ and \c TextEdit.AlignVCenter.
*/
QDeclarativeTextEdit::HAlignment QDeclarativeTextEdit::hAlign() const
{
@@ -469,14 +475,14 @@ void QDeclarativeTextEdit::setVAlign(QDeclarativeTextEdit::VAlignment alignment)
The text will only wrap if an explicit width has been set.
\list
- \o NoWrap - no wrapping will be performed.
- \o WordWrap - wrapping is done on word boundaries.
- \o WrapAnywhere - Text can be wrapped at any point on a line, even if it occurs in the middle of a word.
- \o WrapAtWordBoundaryOrAnywhere - If possible, wrapping occurs at a word boundary; otherwise it
+ \o TextEdit.NoWrap - no wrapping will be performed.
+ \o TextEdit.WordWrap - wrapping is done on word boundaries.
+ \o TextEdit.WrapAnywhere - Text can be wrapped at any point on a line, even if it occurs in the middle of a word.
+ \o TextEdit.WrapAtWordBoundaryOrAnywhere - If possible, wrapping occurs at a word boundary; otherwise it
will occur at the appropriate point on the line, even in the middle of a word.
\endlist
- The default is NoWrap.
+ The default is TextEdit.NoWrap.
*/
QDeclarativeTextEdit::WrapMode QDeclarativeTextEdit::wrapMode() const
{
@@ -724,7 +730,7 @@ void QDeclarativeTextEdit::setPersistentSelection(bool on)
}
/*
- \qmlproperty number TextEdit::textMargin
+ \qmlproperty real TextEdit::textMargin
The margin, in pixels, around the text in the TextEdit.
*/
@@ -767,6 +773,33 @@ void QDeclarativeTextEdit::componentComplete()
}
/*!
+ \qmlproperty string TextEdit::selectByMouse
+
+ Defaults to false.
+
+ If true, the user can use the mouse to select text in some
+ platform-specific way. Note that for some platforms this may
+ not be an appropriate interaction (eg. may conflict with how
+ the text needs to behave inside a Flickable.
+*/
+bool QDeclarativeTextEdit::selectByMouse() const
+{
+ Q_D(const QDeclarativeTextEdit);
+ return d->selectByMouse;
+}
+
+void QDeclarativeTextEdit::setSelectByMouse(bool on)
+{
+ Q_D(QDeclarativeTextEdit);
+ if (d->selectByMouse != on) {
+ d->selectByMouse = on;
+ emit selectByMouseChanged(on);
+ }
+}
+
+
+
+/*!
\qmlproperty bool TextEdit::readOnly
Whether the user an interact with the TextEdit item. If this
@@ -852,8 +885,9 @@ Handles the given key \a event.
void QDeclarativeTextEdit::keyPressEvent(QKeyEvent *event)
{
Q_D(QDeclarativeTextEdit);
- d->control->processEvent(event, QPointF(0, 0));
-
+ keyPressPreHandler(event);
+ if (!event->isAccepted())
+ d->control->processEvent(event, QPointF(0, 0));
if (!event->isAccepted())
QDeclarativePaintedItem::keyPressEvent(event);
}
@@ -865,7 +899,9 @@ Handles the given key \a event.
void QDeclarativeTextEdit::keyReleaseEvent(QKeyEvent *event)
{
Q_D(QDeclarativeTextEdit);
- d->control->processEvent(event, QPointF(0, 0));
+ keyReleasePreHandler(event);
+ if (!event->isAccepted())
+ d->control->processEvent(event, QPointF(0, 0));
if (!event->isAccepted())
QDeclarativePaintedItem::keyReleaseEvent(event);
}
@@ -893,18 +929,20 @@ Handles the given mouse \a event.
void QDeclarativeTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeTextEdit);
+ bool hadFocus = hasFocus();
if (d->focusOnPress){
QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope?
while(p) {
- if(p->flags() & QGraphicsItem::ItemIsFocusScope){
+ if (p->flags() & QGraphicsItem::ItemIsFocusScope)
p->setFocus();
- break;
- }
p = p->parentItem();
}
setFocus(true);
}
- d->control->processEvent(event, QPointF(0, 0));
+ if (!hadFocus && hasFocus())
+ d->clickCausedFocus = true;
+ if (event->type() != QEvent::GraphicsSceneMouseDoubleClick || d->selectByMouse)
+ d->control->processEvent(event, QPointF(0, 0));
if (!event->isAccepted())
QDeclarativePaintedItem::mousePressEvent(event);
}
@@ -918,11 +956,12 @@ void QDeclarativeTextEdit::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Q_D(QDeclarativeTextEdit);
QWidget *widget = event->widget();
if (widget && (d->control->textInteractionFlags() & Qt::TextEditable) && boundingRect().contains(event->pos()))
- qt_widget_private(widget)->handleSoftwareInputPanel(event->button(), d->focusOnPress);
+ qt_widget_private(widget)->handleSoftwareInputPanel(event->button(), d->clickCausedFocus);
+ d->clickCausedFocus = false;
d->control->processEvent(event, QPointF(0, 0));
if (!event->isAccepted())
- QDeclarativePaintedItem::mousePressEvent(event);
+ QDeclarativePaintedItem::mouseReleaseEvent(event);
}
/*!
@@ -932,9 +971,13 @@ Handles the given mouse \a event.
void QDeclarativeTextEdit::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeTextEdit);
- d->control->processEvent(event, QPointF(0, 0));
- if (!event->isAccepted())
+ if (d->selectByMouse) {
+ d->control->processEvent(event, QPointF(0, 0));
+ if (!event->isAccepted())
+ QDeclarativePaintedItem::mouseDoubleClickEvent(event);
+ } else {
QDeclarativePaintedItem::mouseDoubleClickEvent(event);
+ }
}
/*!
@@ -944,9 +987,14 @@ Handles the given mouse \a event.
void QDeclarativeTextEdit::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeTextEdit);
- d->control->processEvent(event, QPointF(0, 0));
- if (!event->isAccepted())
- QDeclarativePaintedItem::mousePressEvent(event);
+ if (d->selectByMouse) {
+ d->control->processEvent(event, QPointF(0, 0));
+ if (!event->isAccepted())
+ QDeclarativePaintedItem::mouseMoveEvent(event);
+ event->setAccepted(true);
+ } else {
+ QDeclarativePaintedItem::mouseMoveEvent(event);
+ }
}
/*!
@@ -991,8 +1039,9 @@ void QDeclarativeTextEdit::updateImgCache(const QRectF &r)
/*!
\qmlproperty bool TextEdit::smooth
- Set this property if you want the text to be smoothly scaled or
- transformed. Smooth filtering gives better visual quality, but is slower. If
+ This property holds whether the text is smoothly scaled or transformed.
+
+ Smooth filtering gives better visual quality, but is slower. If
the item is displayed at its natural size, this property has no visual or
performance effect.
@@ -1102,7 +1151,7 @@ void QDeclarativeTextEdit::updateSize()
setBaselineOffset(fm.ascent() + yoff + d->textMargin);
//### need to comfirm cost of always setting these
- int newWidth = (int)d->document->idealWidth();
+ int newWidth = qCeil(d->document->idealWidth());
d->document->setTextWidth(newWidth); // ### QTextDoc> Alignment will not work unless textWidth is set. Does Text need this line as well?
int cursorWidth = 1;
if(d->cursor)
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
index 474de09..8848d47 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
@@ -86,6 +86,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeTextEdit : public QDeclarativePaintedItem
Q_PROPERTY(bool persistentSelection READ persistentSelection WRITE setPersistentSelection NOTIFY persistentSelectionChanged)
Q_PROPERTY(qreal textMargin READ textMargin WRITE setTextMargin NOTIFY textMarginChanged)
Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints)
+ Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged)
public:
QDeclarativeTextEdit(QDeclarativeItem *parent=0);
@@ -167,6 +168,9 @@ public:
qreal textMargin() const;
void setTextMargin(qreal margin);
+ bool selectByMouse() const;
+ void setSelectByMouse(bool);
+
virtual void componentComplete();
/* FROM EDIT */
@@ -200,6 +204,7 @@ Q_SIGNALS:
void focusOnPressChanged(bool focusIsPressed);
void persistentSelectionChanged(bool isPersistentSelection);
void textMarginChanged(qreal textMargin);
+ void selectByMouseChanged(bool selectByMouse);
public Q_SLOTS:
void selectAll();
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
index 8d4b611..885620d 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
@@ -70,9 +70,10 @@ public:
QDeclarativeTextEditPrivate()
: color("black"), hAlign(QDeclarativeTextEdit::AlignLeft), vAlign(QDeclarativeTextEdit::AlignTop),
imgDirty(true), dirty(false), richText(false), cursorVisible(false), focusOnPress(true),
- persistentSelection(true), textMargin(0.0), lastSelectionStart(0), lastSelectionEnd(0),
+ persistentSelection(true), clickCausedFocus(false), textMargin(0.0), lastSelectionStart(0), lastSelectionEnd(0),
cursorComponent(0), cursor(0), format(QDeclarativeTextEdit::AutoText), document(0),
- wrapMode(QDeclarativeTextEdit::NoWrap)
+ wrapMode(QDeclarativeTextEdit::NoWrap),
+ selectByMouse(false)
{
}
@@ -100,6 +101,7 @@ public:
bool cursorVisible : 1;
bool focusOnPress : 1;
bool persistentSelection : 1;
+ bool clickCausedFocus : 1;
qreal textMargin;
int lastSelectionStart;
int lastSelectionEnd;
@@ -109,6 +111,7 @@ public:
QTextDocument *document;
QTextControl *control;
QDeclarativeTextEdit::WrapMode wrapMode;
+ bool selectByMouse;
};
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index b618183..2e7715f 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -55,13 +55,16 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass TextInput QDeclarativeTextInput
\since 4.7
- The TextInput item allows you to add an editable line of text to a scene.
+ \brief The TextInput item allows you to add an editable line of text to a scene.
TextInput can only display a single line of text, and can only display
plain text. However it can provide addition input constraints on the text.
Input constraints include setting a QValidator, an input mask, or a
maximum input length.
+
+ On Mac OS X, the Up/Down key bindings for Home/End are explicitly disabled.
+ If you want such bindings (on any platform), you will need to construct them in QML.
*/
QDeclarativeTextInput::QDeclarativeTextInput(QDeclarativeItem* parent)
: QDeclarativePaintedItem(*(new QDeclarativeTextInputPrivate), parent)
@@ -108,7 +111,7 @@ void QDeclarativeTextInput::setText(const QString &s)
/*!
\qmlproperty bool TextInput::font.bold
- Sets the font's weight to bold.
+ Sets whether the font weight is bold.
*/
/*!
@@ -118,11 +121,11 @@ void QDeclarativeTextInput::setText(const QString &s)
The weight can be one of:
\list
- \o Light
- \o Normal - the default
- \o DemiBold
- \o Bold
- \o Black
+ \o Font.Light
+ \o Font.Normal - the default
+ \o Font.DemiBold
+ \o Font.Bold
+ \o Font.Black
\endlist
\qml
@@ -133,25 +136,25 @@ void QDeclarativeTextInput::setText(const QString &s)
/*!
\qmlproperty bool TextInput::font.italic
- Sets the style of the text to italic.
+ Sets whether the font has an italic style.
*/
/*!
\qmlproperty bool TextInput::font.underline
- Set the style of the text to underline.
+ Sets whether the text is underlined.
*/
/*!
\qmlproperty bool TextInput::font.outline
- Set the style of the text to outline.
+ Sets whether the font has an outline style.
*/
/*!
\qmlproperty bool TextInput::font.strikeout
- Set the style of the text to strikeout.
+ Sets whether the font has a strikeout style.
*/
/*!
@@ -195,11 +198,11 @@ void QDeclarativeTextInput::setText(const QString &s)
Sets the capitalization for the text.
\list
- \o MixedCase - This is the normal text rendering option where no capitalization change is applied.
- \o AllUppercase - This alters the text to be rendered in all uppercase type.
- \o AllLowercase - This alters the text to be rendered in all lowercase type.
- \o SmallCaps - This alters the text to be rendered in small-caps type.
- \o Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
+ \o Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.
+ \o Font.AllUppercase - This alters the text to be rendered in all uppercase type.
+ \o Font.AllLowercase - This alters the text to be rendered in all lowercase type.
+ \o Font.SmallCaps - This alters the text to be rendered in small-caps type.
+ \o Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
\endlist
\qml
@@ -308,8 +311,8 @@ void QDeclarativeTextInput::setSelectedTextColor(const QColor &color)
vertically. You can use anchors to align it however you want within
another item.
- The valid values for \c horizontalAlignment are \c AlignLeft, \c AlignRight and
- \c AlignHCenter.
+ The valid values for \c horizontalAlignment are \c TextInput.AlignLeft, \c TextInput.AlignRight and
+ \c TextInput.AlignHCenter.
*/
QDeclarativeTextInput::HAlignment QDeclarativeTextInput::hAlign() const
{
@@ -600,9 +603,9 @@ void QDeclarativeTextInput::setAutoScroll(bool b)
This property holds the notation of how a string can describe a number.
The values for this property are DoubleValidator.StandardNotation or DoubleValidator.ScientificNotation.
- If this property is set to ScientificNotation, the written number may have an exponent part(i.e. 1.5E-2).
+ If this property is set to DoubleValidator.ScientificNotation, the written number may have an exponent part(i.e. 1.5E-2).
- By default, this property is set to ScientificNotation.
+ By default, this property is set to DoubleValidator.ScientificNotation.
*/
/*!
@@ -706,14 +709,15 @@ bool QDeclarativeTextInput::hasAcceptableInput() const
}
/*!
- \qmlproperty TextInput.EchoMode TextInput::echoMode
+ \qmlproperty enumeration TextInput::echoMode
Specifies how the text should be displayed in the TextInput.
- The default is Normal, which displays the text as it is. Other values
- are Password, which displays asterixes instead of characters, NoEcho,
- which displays nothing, and PasswordEchoOnEdit, which displays all but the
- current character as asterixes.
-
+ \list
+ \o TextInput.Normal - Displays the text as it is. (Default)
+ \o TextInput.Password - Displays asterixes instead of characters.
+ \o TextInput.NoEcho - Displays nothing.
+ \o TextInput.PasswordEchoOnEdit - Displays all but the current character as asterixes.
+ \endlist
*/
QDeclarativeTextInput::EchoMode QDeclarativeTextInput::echoMode() const
{
@@ -827,8 +831,8 @@ void QDeclarativeTextInput::moveCursor()
d->cursorItem->setX(d->control->cursorToX() - d->hscroll);
}
-/*
- \qmlmethod int xToPosition(int x)
+/*!
+ \qmlmethod int TextInput::xToPosition(int x)
This function returns the character position at
x pixels from the left of the textInput. Position 0 is before the
@@ -859,10 +863,15 @@ void QDeclarativeTextInputPrivate::focusChanged(bool hasFocus)
void QDeclarativeTextInput::keyPressEvent(QKeyEvent* ev)
{
Q_D(QDeclarativeTextInput);
- if(((d->control->cursor() == 0 && ev->key() == Qt::Key_Left)
+ keyPressPreHandler(ev);
+ if (ev->isAccepted())
+ return;
+ if (((ev->key() == Qt::Key_Up || ev->key() == Qt::Key_Down) && ev->modifiers() == Qt::NoModifier) // Don't allow MacOSX up/down support, and we don't allow a completer.
+ || (((d->control->cursor() == 0 && ev->key() == Qt::Key_Left)
|| (d->control->cursor() == d->control->text().length()
&& ev->key() == Qt::Key_Right))
- && (d->lastSelectionStart == d->lastSelectionEnd)){
+ && (d->lastSelectionStart == d->lastSelectionEnd)))
+ {
//ignore when moving off the end
//unless there is a selection, because then moving will do something (deselect)
ev->ignore();
@@ -876,26 +885,34 @@ void QDeclarativeTextInput::keyPressEvent(QKeyEvent* ev)
void QDeclarativeTextInput::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeTextInput);
+ bool hadFocus = hasFocus();
if(d->focusOnPress){
QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope?
while(p) {
- if(p->flags() & QGraphicsItem::ItemIsFocusScope){
+ if (p->flags() & QGraphicsItem::ItemIsFocusScope)
p->setFocus();
- break;
- }
p = p->parentItem();
}
setFocus(true);
}
+ if (!hadFocus && hasFocus())
+ d->clickCausedFocus = true;
+
bool mark = event->modifiers() & Qt::ShiftModifier;
int cursor = d->xToPos(event->pos().x());
d->control->moveCursor(cursor, mark);
+ event->setAccepted(true);
}
void QDeclarativeTextInput::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeTextInput);
- d->control->moveCursor(d->xToPos(event->pos().x()), true);
+ if (d->selectByMouse) {
+ d->control->moveCursor(d->xToPos(event->pos().x()), true);
+ event->setAccepted(true);
+ } else {
+ QDeclarativePaintedItem::mouseMoveEvent(event);
+ }
}
/*!
@@ -907,8 +924,10 @@ void QDeclarativeTextInput::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Q_D(QDeclarativeTextInput);
QWidget *widget = event->widget();
if (widget && !d->control->isReadOnly() && boundingRect().contains(event->pos()))
- qt_widget_private(widget)->handleSoftwareInputPanel(event->button(), d->focusOnPress);
- d->control->processEvent(event);
+ qt_widget_private(widget)->handleSoftwareInputPanel(event->button(), d->clickCausedFocus);
+ d->clickCausedFocus = false;
+ if (!event->isAccepted())
+ QDeclarativePaintedItem::mouseReleaseEvent(event);
}
bool QDeclarativeTextInput::event(QEvent* ev)
@@ -924,13 +943,15 @@ bool QDeclarativeTextInput::event(QEvent* ev)
case QEvent::GraphicsSceneMouseRelease:
break;
default:
+ if (ev->type() == QEvent::GraphicsSceneMouseDoubleClick && !d->selectByMouse)
+ break;
handled = d->control->processEvent(ev);
if (ev->type() == QEvent::InputMethod)
updateSize();
}
if(!handled)
- return QDeclarativePaintedItem::event(ev);
- return true;
+ handled = QDeclarativePaintedItem::event(ev);
+ return handled;
}
void QDeclarativeTextInput::geometryChanged(const QRectF &newGeometry,
@@ -1012,6 +1033,8 @@ QVariant QDeclarativeTextInput::inputMethodQuery(Qt::InputMethodQuery property)
{
Q_D(const QDeclarativeTextInput);
switch(property) {
+ case Qt::ImMicroFocus:
+ return d->control->cursorRect();
case Qt::ImFont:
return font();
case Qt::ImCursorPosition:
@@ -1044,8 +1067,9 @@ void QDeclarativeTextInput::selectAll()
/*!
\qmlproperty bool TextInput::smooth
- Set this property if you want the text to be smoothly scaled or
- transformed. Smooth filtering gives better visual quality, but is slower. If
+ This property holds whether the text is smoothly scaled or transformed.
+
+ Smooth filtering gives better visual quality, but is slower. If
the item is displayed at its natural size, this property has no visual or
performance effect.
@@ -1054,15 +1078,15 @@ void QDeclarativeTextInput::selectAll()
filtering at the beginning of the animation and reenable it at the conclusion.
*/
-/*
+/*!
\qmlproperty string TextInput::passwordCharacter
This is the character displayed when echoMode is set to Password or
PasswordEchoOnEdit. By default it is an asterisk.
- Attempting to set this to more than one character will set it to
- the first character in the string. Attempting to set this to less
- than one character will fail.
+ If this property is set to a string with more than one character,
+ the first character is used. If the string is empty, the value
+ is ignored and the property is not set.
*/
QString QDeclarativeTextInput::passwordCharacter() const
{
@@ -1079,15 +1103,15 @@ void QDeclarativeTextInput::setPasswordCharacter(const QString &str)
d->control->setPasswordCharacter(str.constData()[0]);
}
-/*
+/*!
\qmlproperty string TextInput::displayText
- This is the actual text displayed in the TextInput. When
- echoMode is set to TextInput::Normal this will be exactly
- the same as the TextInput::text property. When echoMode
- is set to something else, this property will contain the text
- the user sees, while the text property will contain the
- entered text.
+ This is the text displayed in the TextInput.
+
+ If \l echoMode is set to TextInput::Normal, this holds the
+ same value as the TextInput::text property. Otherwise,
+ this property holds the text visible to the user, while
+ the \l text property holds the actual entered text.
*/
QString QDeclarativeTextInput::displayText() const
{
@@ -1095,29 +1119,59 @@ QString QDeclarativeTextInput::displayText() const
return d->control->displayText();
}
-/*
- \qmlmethod void moveCursorSelection(int pos)
+/*!
+ \qmlproperty string TextInput::selectByMouse
- This method allows you to move the cursor while modifying the selection accordingly.
- To simply move the cursor, set the cursorPosition property.
+ Defaults to false.
+
+ If true, the user can use the mouse to select text in some
+ platform-specific way. Note that for some platforms this may
+ not be an appropriate interaction (eg. may conflict with how
+ the text needs to behave inside a Flickable.
+*/
+bool QDeclarativeTextInput::selectByMouse() const
+{
+ Q_D(const QDeclarativeTextInput);
+ return d->selectByMouse;
+}
+
+void QDeclarativeTextInput::setSelectByMouse(bool on)
+{
+ Q_D(QDeclarativeTextInput);
+ if (d->selectByMouse != on) {
+ d->selectByMouse = on;
+ emit selectByMouseChanged(on);
+ }
+}
+
+
+/*!
+ \qmlmethod void TextInput::moveCursorSelection(int position)
+
+ Moves the cursor to \a position and updates the selection accordingly.
+ (To only move the cursor, set the \l cursorPosition property.)
When this method is called it additionally sets either the
selectionStart or the selectionEnd (whichever was at the previous cursor position)
to the specified position. This allows you to easily extend and contract the selected
text range.
- Example: The sequence of calls
+ For example, take this sequence of calls:
+
+ \code
cursorPosition = 5
moveCursorSelection(9)
moveCursorSelection(7)
- would move the cursor to position 5, extend the selection end from 5 to 9
+ \endcode
+
+ This moves the cursor to position 5, extend the selection end from 5 to 9
and then retract the selection end from 9 to 7, leaving the text from position 5 to 7
selected (the 6th and 7th characters).
*/
-void QDeclarativeTextInput::moveCursorSelection(int pos)
+void QDeclarativeTextInput::moveCursorSelection(int position)
{
Q_D(QDeclarativeTextInput);
- d->control->moveCursor(pos, true);
+ d->control->moveCursor(position, true);
}
void QDeclarativeTextInputPrivate::init()
@@ -1222,9 +1276,7 @@ void QDeclarativeTextInput::updateSize(bool needsRedraw)
int cursorWidth = d->control->cursorWidth();
if(d->cursorItem)
cursorWidth = d->cursorItem->width();
- //### Is QFontMetrics too slow?
- QFontMetricsF fm(d->font);
- setImplicitWidth(fm.width(d->control->displayText())+cursorWidth);
+ setImplicitWidth(d->control->naturalTextWidth() + cursorWidth);
setContentsSize(QSize(width(), height()));//Repaints if changed
if(w==width() && h==height() && needsRedraw){
clearCache();
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
index c0c1e50..b2fd057 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
@@ -89,6 +89,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeTextInput : public QDeclarativePaintedIte
Q_PROPERTY(QString passwordCharacter READ passwordCharacter WRITE setPasswordCharacter NOTIFY passwordCharacterChanged)
Q_PROPERTY(QString displayText READ displayText NOTIFY displayTextChanged)
Q_PROPERTY(bool autoScroll READ autoScroll WRITE setAutoScroll NOTIFY autoScrollChanged)
+ Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged)
public:
QDeclarativeTextInput(QDeclarativeItem* parent=0);
@@ -174,6 +175,9 @@ public:
bool autoScroll() const;
void setAutoScroll(bool);
+ bool selectByMouse() const;
+ void setSelectByMouse(bool);
+
bool hasAcceptableInput() const;
void drawContents(QPainter *p,const QRect &r);
@@ -203,6 +207,7 @@ Q_SIGNALS:
void displayTextChanged(const QString &text);
void focusOnPressChanged(bool focusOnPress);
void autoScrollChanged(bool autoScroll);
+ void selectByMouseChanged(bool selectByMouse);
protected:
virtual void geometryChanged(const QRectF &newGeometry,
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
index 26cf78c..1d8e0f7 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
@@ -72,7 +72,8 @@ public:
color((QRgb)0), style(QDeclarativeText::Normal),
styleColor((QRgb)0), hAlign(QDeclarativeTextInput::AlignLeft),
hscroll(0), oldScroll(0), focused(false), focusOnPress(true),
- cursorVisible(false), autoScroll(true)
+ cursorVisible(false), autoScroll(true), clickCausedFocus(false),
+ selectByMouse(false)
{
}
@@ -116,6 +117,8 @@ public:
bool focusOnPress;
bool cursorVisible;
bool autoScroll;
+ bool clickCausedFocus;
+ bool selectByMouse;
};
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 43cafe3..c6ee46f 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -44,6 +44,7 @@
#include "qdeclarativeitem.h"
#include <qdeclarativecontext.h>
+#include <qdeclarativecontext_p.h>
#include <qdeclarativeengine.h>
#include <qdeclarativeexpression.h>
#include <qdeclarativepackage_p.h>
@@ -55,6 +56,7 @@
#include <qdeclarativeguard_p.h>
#include <qdeclarativeglobal_p.h>
+#include <qgraphicsscene.h>
#include <qlistmodelinterface_p.h>
#include <qhash.h>
#include <qlist.h>
@@ -136,8 +138,8 @@ public:
}
\endcode
*/
-QDeclarativeVisualItemModel::QDeclarativeVisualItemModel()
- : QDeclarativeVisualModel(*(new QDeclarativeVisualItemModelPrivate))
+QDeclarativeVisualItemModel::QDeclarativeVisualItemModel(QObject *parent)
+ : QDeclarativeVisualModel(*(new QDeclarativeVisualItemModelPrivate), parent)
{
}
@@ -202,7 +204,7 @@ QVariant QDeclarativeVisualItemModel::evaluate(int index, const QString &express
QDeclarativeContext *ccontext = qmlContext(this);
QDeclarativeContext *ctxt = new QDeclarativeContext(ccontext);
ctxt->setContextObject(d->children.at(index));
- QDeclarativeExpression e(ctxt, expression, objectContext);
+ QDeclarativeExpression e(ctxt, objectContext, expression);
QVariant value = e.evaluate();
delete ctxt;
return value;
@@ -267,7 +269,8 @@ public:
}
if (m_roles.count() == 1)
m_roleNames.insert("modelData", m_roles.at(0));
- m_roleNames.insert("hasModelChildren", 0);
+ if (m_roles.count())
+ m_roleNames.insert("hasModelChildren", 0);
} else if (m_listAccessor) {
m_roleNames.insert("modelData", 0);
if (m_listAccessor->type() == QDeclarativeListAccessor::Instance) {
@@ -283,15 +286,19 @@ public:
}
}
+ QHash<int,int> roleToPropId;
void createMetaData() {
if (!m_metaDataCreated) {
ensureRoles();
- QHash<QByteArray, int>::const_iterator it = m_roleNames.begin();
- while (it != m_roleNames.end()) {
- m_delegateDataType->createProperty(it.key());
- ++it;
+ if (m_roleNames.count()) {
+ QHash<QByteArray, int>::const_iterator it = m_roleNames.begin();
+ while (it != m_roleNames.end()) {
+ int propId = m_delegateDataType->createProperty(it.key()) - m_delegateDataType->propertyOffset();
+ roleToPropId.insert(*it, propId);
+ ++it;
+ }
+ m_metaDataCreated = true;
}
- m_metaDataCreated = true;
}
}
@@ -381,7 +388,6 @@ public:
private:
friend class QDeclarativeVisualDataModelData;
- QHash<int,int> roleToProp;
};
class QDeclarativeVisualDataModelData : public QObject
@@ -398,6 +404,8 @@ public:
int propForRole(int) const;
void setValue(int, const QVariant &);
+ void ensureProperties();
+
Q_SIGNALS:
void indexChanged();
@@ -410,9 +418,11 @@ private:
int QDeclarativeVisualDataModelData::propForRole(int id) const
{
- QHash<int,int>::const_iterator it = m_meta->roleToProp.find(id);
- if (it != m_meta->roleToProp.end())
- return m_meta->roleToProp[id];
+ QDeclarativeVisualDataModelPrivate *model = QDeclarativeVisualDataModelPrivate::get(m_model);
+ QHash<int,int>::const_iterator it = model->roleToPropId.find(id);
+ if (it != model->roleToPropId.end())
+ return *it;
+
return -1;
}
@@ -436,8 +446,7 @@ int QDeclarativeVisualDataModelDataMetaObject::createProperty(const char *name,
if ((!model->m_listModelInterface || !model->m_abstractItemModel) && model->m_listAccessor) {
if (model->m_listAccessor->type() == QDeclarativeListAccessor::ListProperty) {
model->ensureRoles();
- QObject *object = model->m_listAccessor->at(data->m_index).value<QObject*>();
- if (object && (object->property(name).isValid() || qstrcmp(name,"modelData")==0))
+ if (qstrcmp(name,"modelData") == 0)
return QDeclarativeOpenMetaObject::createProperty(name, type);
}
}
@@ -469,12 +478,10 @@ QVariant QDeclarativeVisualDataModelDataMetaObject::initialValue(int propId)
model->ensureRoles();
QHash<QByteArray,int>::const_iterator it = model->m_roleNames.find(propName);
if (it != model->m_roleNames.end()) {
- roleToProp.insert(*it, propId);
QVariant value = model->m_listModelInterface->data(data->m_index, *it);
return value;
} else if (model->m_roles.count() == 1 && propName == "modelData") {
//for compatability with other lists, assign modelData if there is only a single role
- roleToProp.insert(model->m_roles.first(), propId);
QVariant value = model->m_listModelInterface->data(data->m_index, model->m_roles.first());
return value;
}
@@ -486,7 +493,6 @@ QVariant QDeclarativeVisualDataModelDataMetaObject::initialValue(int propId)
} else {
QHash<QByteArray,int>::const_iterator it = model->m_roleNames.find(propName);
if (it != model->m_roleNames.end()) {
- roleToProp.insert(*it, propId);
QModelIndex index = model->m_abstractItemModel->index(data->m_index, 0, model->m_root);
return model->m_abstractItemModel->data(index, *it);
}
@@ -501,18 +507,23 @@ QDeclarativeVisualDataModelData::QDeclarativeVisualDataModelData(int index,
: m_index(index), m_model(model),
m_meta(new QDeclarativeVisualDataModelDataMetaObject(this, QDeclarativeVisualDataModelPrivate::get(model)->m_delegateDataType))
{
- QDeclarativeVisualDataModelPrivate *modelPriv = QDeclarativeVisualDataModelPrivate::get(model);
- if (modelPriv->m_metaDataCacheable) {
- if (!modelPriv->m_metaDataCreated)
- modelPriv->createMetaData();
- m_meta->setCached(true);
- }
+ ensureProperties();
}
QDeclarativeVisualDataModelData::~QDeclarativeVisualDataModelData()
{
}
+void QDeclarativeVisualDataModelData::ensureProperties()
+{
+ QDeclarativeVisualDataModelPrivate *modelPriv = QDeclarativeVisualDataModelPrivate::get(m_model);
+ if (modelPriv->m_metaDataCacheable && !modelPriv->m_metaDataCreated) {
+ modelPriv->createMetaData();
+ if (modelPriv->m_metaDataCreated)
+ m_meta->setCached(true);
+ }
+}
+
int QDeclarativeVisualDataModelData::index() const
{
return m_index;
@@ -625,8 +636,8 @@ QDeclarativeVisualDataModel::QDeclarativeVisualDataModel()
{
}
-QDeclarativeVisualDataModel::QDeclarativeVisualDataModel(QDeclarativeContext *ctxt)
-: QDeclarativeVisualModel(*(new QDeclarativeVisualDataModelPrivate(ctxt)))
+QDeclarativeVisualDataModel::QDeclarativeVisualDataModel(QDeclarativeContext *ctxt, QObject *parent)
+: QDeclarativeVisualModel(*(new QDeclarativeVisualDataModelPrivate(ctxt)), parent)
{
}
@@ -759,14 +770,11 @@ void QDeclarativeVisualDataModel::setModel(const QVariant &model)
}
/*!
- \qmlproperty component VisualDataModel::delegate
+ \qmlproperty Component VisualDataModel::delegate
The delegate provides a template defining each item instantiated by a view.
The index is exposed as an accessible \c index property. Properties of the
model are also available depending upon the type of \l {qmlmodels}{Data Model}.
-
- Here is an example delegate:
- \snippet doc/src/snippets/declarative/listview/listview.qml 0
*/
QDeclarativeComponent *QDeclarativeVisualDataModel::delegate() const
{
@@ -963,13 +971,18 @@ QDeclarativeVisualDataModel::ReleaseFlags QDeclarativeVisualDataModel::release(Q
}
if (d->m_cache.releaseItem(obj)) {
+ // Remove any bindings to avoid warnings due to parent change.
+ QObjectPrivate *p = QObjectPrivate::get(obj);
+ Q_ASSERT(p->declarativeData);
+ QDeclarativeData *d = static_cast<QDeclarativeData*>(p->declarativeData);
+ if (d->ownContext && d->context)
+ d->context->clearExpressions();
+
if (inPackage) {
emit destroyingPackage(qobject_cast<QDeclarativePackage*>(obj));
} else {
- if (item->hasFocus())
- item->clearFocus();
- item->setOpacity(0.0);
- static_cast<QGraphicsItem*>(item)->setParentItem(0);
+ if (item->scene())
+ item->scene()->removeItem(item);
}
stat |= Destroyed;
obj->deleteLater();
@@ -1030,6 +1043,11 @@ QDeclarativeItem *QDeclarativeVisualDataModel::item(int index, const QByteArray
if (!ccontext) ccontext = qmlContext(this);
QDeclarativeContext *ctxt = new QDeclarativeContext(ccontext);
QDeclarativeVisualDataModelData *data = new QDeclarativeVisualDataModelData(index, this);
+ if ((!d->m_listModelInterface || !d->m_abstractItemModel) && d->m_listAccessor
+ && d->m_listAccessor->type() == QDeclarativeListAccessor::ListProperty) {
+ ctxt->setContextObject(d->m_listAccessor->at(index).value<QObject*>());
+ ctxt = new QDeclarativeContext(ctxt, ctxt);
+ }
ctxt->setContextProperty(QLatin1String("model"), data);
ctxt->setContextObject(data);
d->m_completePending = false;
@@ -1155,7 +1173,7 @@ QVariant QDeclarativeVisualDataModel::evaluate(int index, const QString &express
if (nobj) {
QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(nobj);
if (item) {
- QDeclarativeExpression e(qmlContext(item), expression, objectContext);
+ QDeclarativeExpression e(qmlContext(item), objectContext, expression);
value = e.evaluate();
}
} else {
@@ -1164,7 +1182,7 @@ QVariant QDeclarativeVisualDataModel::evaluate(int index, const QString &express
QDeclarativeContext *ctxt = new QDeclarativeContext(ccontext);
QDeclarativeVisualDataModelData *data = new QDeclarativeVisualDataModelData(index, this);
ctxt->setContextObject(data);
- QDeclarativeExpression e(ctxt, expression, objectContext);
+ QDeclarativeExpression e(ctxt, objectContext, expression);
value = e.evaluate();
delete data;
delete ctxt;
@@ -1201,6 +1219,13 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count,
QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root);
data->setValue(propId, d->m_abstractItemModel->data(index, role));
}
+ } else {
+ QString roleName;
+ if (d->m_listModelInterface)
+ roleName = d->m_listModelInterface->toString(role);
+ else if (d->m_abstractItemModel)
+ roleName = QString::fromUtf8(d->m_abstractItemModel->roleNames().value(role));
+ qmlInfo(this) << "Changing role not present in item: " << roleName;
}
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
index edfd387..0bdbbcf 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
@@ -72,7 +72,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeVisualModel : public QObject
Q_PROPERTY(int count READ count NOTIFY countChanged)
public:
- QDeclarativeVisualModel() {}
+ QDeclarativeVisualModel(QObject *parent=0) : QObject(parent) {}
virtual ~QDeclarativeVisualModel() {}
enum ReleaseFlag { Referenced = 0x01, Destroyed = 0x02 };
@@ -117,7 +117,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeVisualItemModel : public QDeclarativeVisu
Q_CLASSINFO("DefaultProperty", "children")
public:
- QDeclarativeVisualItemModel();
+ QDeclarativeVisualItemModel(QObject *parent=0);
virtual ~QDeclarativeVisualItemModel() {}
virtual int count() const;
@@ -156,7 +156,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeVisualDataModel : public QDeclarativeVisu
Q_CLASSINFO("DefaultProperty", "delegate")
public:
QDeclarativeVisualDataModel();
- QDeclarativeVisualDataModel(QDeclarativeContext *);
+ QDeclarativeVisualDataModel(QDeclarativeContext *, QObject *parent=0);
virtual ~QDeclarativeVisualDataModel();
QVariant model() const;
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp
index d44e7fb..8230941 100644
--- a/src/declarative/qml/qdeclarativebinding.cpp
+++ b/src/declarative/qml/qdeclarativebinding.cpp
@@ -88,7 +88,7 @@ QDeclarativeBinding::QDeclarativeBinding(void *data, QDeclarativeRefCount *rc, Q
QDeclarativeBinding::QDeclarativeBinding(const QString &str, QObject *obj, QDeclarativeContext *ctxt,
QObject *parent)
-: QDeclarativeExpression(QDeclarativeContextData::get(ctxt), str, obj, *new QDeclarativeBindingPrivate)
+: QDeclarativeExpression(QDeclarativeContextData::get(ctxt), obj, str, *new QDeclarativeBindingPrivate)
{
setParent(parent);
setNotifyOnValueChanged(true);
@@ -96,7 +96,7 @@ QDeclarativeBinding::QDeclarativeBinding(const QString &str, QObject *obj, QDecl
QDeclarativeBinding::QDeclarativeBinding(const QString &str, QObject *obj, QDeclarativeContextData *ctxt,
QObject *parent)
-: QDeclarativeExpression(ctxt, str, obj, *new QDeclarativeBindingPrivate)
+: QDeclarativeExpression(ctxt, obj, str, *new QDeclarativeBindingPrivate)
{
setParent(parent);
setNotifyOnValueChanged(true);
@@ -193,7 +193,18 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
data->error.setColumn(-1);
data->error.setDescription(QLatin1String("Unable to assign [undefined] to ") + QLatin1String(QMetaType::typeName(data->property.propertyType())));
- } else if (data->property.object() &&
+ } else if (!scriptValue.isRegExp() && scriptValue.isFunction()) {
+
+ QUrl url = QUrl(data->url);
+ int line = data->line;
+ if (url.isEmpty()) url = QUrl(QLatin1String("<Unknown File>"));
+
+ data->error.setUrl(url);
+ data->error.setLine(line);
+ data->error.setColumn(-1);
+ data->error.setDescription(QLatin1String("Unable to assign a function to a property."));
+
+ } else if (data->property.object() &&
!QDeclarativePropertyPrivate::write(data->property, value, flags)) {
QUrl url = QUrl(data->url);
@@ -275,13 +286,15 @@ QDeclarativeAbstractBinding::QDeclarativeAbstractBinding()
QDeclarativeAbstractBinding::~QDeclarativeAbstractBinding()
{
- removeFromObject();
- if (m_mePtr)
- *m_mePtr = 0;
+ Q_ASSERT(m_prevBinding == 0);
+ Q_ASSERT(m_mePtr == 0);
}
void QDeclarativeAbstractBinding::destroy()
{
+ removeFromObject();
+ clear();
+
delete this;
}
diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h
index 2d3acf5..598f09f 100644
--- a/src/declarative/qml/qdeclarativebinding_p.h
+++ b/src/declarative/qml/qdeclarativebinding_p.h
@@ -164,6 +164,6 @@ private:
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QDeclarativeBinding*);
+Q_DECLARE_METATYPE(QDeclarativeBinding*)
#endif // QDECLARATIVEBINDING_P_H
diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/declarative/qml/qdeclarativeboundsignal.cpp
index 89f1256..8769122 100644
--- a/src/declarative/qml/qdeclarativeboundsignal.cpp
+++ b/src/declarative/qml/qdeclarativeboundsignal.cpp
@@ -119,7 +119,7 @@ QDeclarativeBoundSignal::QDeclarativeBoundSignal(QDeclarativeContext *ctxt, cons
QDeclarative_setParent_noEvent(this, parent);
QMetaObject::connect(scope, m_signal.methodIndex(), this, evaluateIdx);
- m_expression = new QDeclarativeExpression(ctxt, val, scope);
+ m_expression = new QDeclarativeExpression(ctxt, scope, val);
}
QDeclarativeBoundSignal::~QDeclarativeBoundSignal()
diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp
index 6596aba..ad05e80 100644
--- a/src/declarative/qml/qdeclarativecompiledbindings.cpp
+++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp
@@ -64,6 +64,73 @@ DEFINE_BOOL_CONFIG_OPTION(bindingsDump, QML_BINDINGS_DUMP);
Q_GLOBAL_STATIC(QDeclarativeFastProperties, fastProperties);
+#ifdef __GNUC__
+# define QML_THREADED_INTERPRETER
+#endif
+
+#define FOR_EACH_QML_INSTR(F) \
+ F(Noop) /* Nop */ \
+ F(BindingId) /* id */ \
+ F(Subscribe) /* subscribe */ \
+ F(SubscribeId) /* subscribe */ \
+ F(FetchAndSubscribe) /* fetchAndSubscribe */ \
+ F(LoadId) /* load */ \
+ F(LoadScope) /* load */ \
+ F(LoadRoot) /* load */ \
+ F(LoadAttached) /* attached */ \
+ F(ConvertIntToReal) /* unaryop */ \
+ F(ConvertRealToInt) /* unaryop */ \
+ F(Real) /* real_value */ \
+ F(Int) /* int_value */ \
+ F(Bool) /* bool_value */ \
+ F(String) /* string_value */ \
+ F(AddReal) /* binaryop */ \
+ F(AddInt) /* binaryop */ \
+ F(AddString) /* binaryop */ \
+ F(MinusReal) /* binaryop */ \
+ F(MinusInt) /* binaryop */ \
+ F(CompareReal) /* binaryop */ \
+ F(CompareString) /* binaryop */ \
+ F(NotCompareReal) /* binaryop */ \
+ F(NotCompareString) /* binaryop */ \
+ F(GreaterThanReal) /* binaryop */ \
+ F(MaxReal) /* binaryop */ \
+ F(MinReal) /* binaryop */ \
+ F(NewString) /* construct */ \
+ F(NewUrl) /* construct */ \
+ F(CleanupUrl) /* cleanup */ \
+ F(CleanupString) /* cleanup */ \
+ F(Copy) /* copy */ \
+ F(Fetch) /* fetch */ \
+ F(Store) /* store */ \
+ F(Skip) /* skip */ \
+ F(Done) /* done */ \
+ /* Speculative property resolution */ \
+ F(InitString) /* initstring */ \
+ F(FindGeneric) /* find */ \
+ F(FindGenericTerminal) /* find */ \
+ F(FindProperty) /* find */ \
+ F(FindPropertyTerminal) /* find */ \
+ F(CleanupGeneric) /* cleanup */ \
+ F(ConvertGenericToReal) /* unaryop */ \
+ F(ConvertGenericToBool) /* unaryop */ \
+ F(ConvertGenericToString) /* unaryop */ \
+ F(ConvertGenericToUrl) /* unaryop */
+
+#define QML_INSTR_ENUM(I) I,
+#define QML_INSTR_ADDR(I) &&op_##I,
+
+#ifdef QML_THREADED_INTERPRETER
+# define QML_BEGIN_INSTR(I) op_##I:
+# define QML_END_INSTR(I) ++instr; goto *instr->common.code;
+# define QML_INSTR_HEADER void *code;
+#else
+# define QML_BEGIN_INSTR(I) case Instr::I:
+# define QML_END_INSTR(I) break;
+# define QML_INSTR_HEADER
+#endif
+
+
using namespace QDeclarativeJS;
namespace {
@@ -328,101 +395,45 @@ namespace {
// This structure is exactly 8-bytes in size
struct Instr {
enum {
- Noop,
- BindingId, // id
-
- Subscribe, // subscribe
- SubscribeId, // subscribe
-
- FetchAndSubscribe, // fetchAndSubscribe
-
- LoadId, // load
- LoadScope, // load
- LoadRoot, // load
- LoadAttached, // attached
-
- ConvertIntToReal, // unaryop
- ConvertRealToInt, // unaryop
-
- Real, // real_value
- Int, // int_value
- Bool, // bool_value
- String, // string_value
-
- AddReal, // binaryop
- AddInt, // binaryop
- AddString, // binaryop
-
- MinusReal, // binaryop
- MinusInt, // binaryop
-
- CompareReal, // binaryop
- CompareString, // binaryop
-
- NotCompareReal, // binaryop
- NotCompareString, // binaryop
-
- GreaterThanReal, // binaryop
- MaxReal, // binaryop
- MinReal, // binaryop
-
- NewString, // construct
- NewUrl, // construct
-
- CleanupUrl, // cleanup
- CleanupString, // cleanup
-
- Copy, // copy
- Fetch, // fetch
- Store, // store
-
- Skip, // skip
-
- Done,
-
- // Speculative property resolution
- InitString, // initstring
- FindGeneric, // find
- FindGenericTerminal, // find
- FindProperty, // find
- FindPropertyTerminal, // find
- CleanupGeneric, // cleanup
- ConvertGenericToReal, // unaryop
- ConvertGenericToBool, // unaryop
- ConvertGenericToString, // unaryop
- ConvertGenericToUrl, // unaryop
+ FOR_EACH_QML_INSTR(QML_INSTR_ENUM)
};
union {
struct {
+ QML_INSTR_HEADER
quint8 type;
quint8 packing[7];
} common;
struct {
+ QML_INSTR_HEADER
quint8 type;
quint8 packing;
quint16 column;
quint32 line;
} id;
struct {
+ QML_INSTR_HEADER
quint8 type;
quint8 packing[3];
quint16 subscriptions;
quint16 identifiers;
} init;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 reg;
quint16 offset;
quint32 index;
} subscribe;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 reg;
quint8 packing[2];
quint32 index;
} load;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 output;
qint8 reg;
@@ -430,6 +441,7 @@ struct Instr {
quint32 index;
} attached;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 output;
qint8 reg;
@@ -437,6 +449,7 @@ struct Instr {
quint32 index;
} store;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 output;
qint8 objectReg;
@@ -445,6 +458,7 @@ struct Instr {
quint16 function;
} fetchAndSubscribe;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 output;
qint8 objectReg;
@@ -452,41 +466,48 @@ struct Instr {
quint32 index;
} fetch;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 reg;
qint8 src;
quint8 packing[5];
} copy;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 reg;
quint8 packing[6];
} construct;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 reg;
quint8 packing[2];
float value;
} real_value;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 reg;
quint8 packing[2];
int value;
} int_value;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 reg;
bool value;
quint8 packing[5];
} bool_value;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 reg;
quint16 length;
quint32 offset;
} string_value;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 output;
qint8 src1;
@@ -494,18 +515,21 @@ struct Instr {
quint8 packing[4];
} binaryop;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 output;
qint8 src;
quint8 packing[5];
} unaryop;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 reg;
quint8 packing[2];
quint32 count;
} skip;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 reg;
qint8 src;
@@ -514,11 +538,13 @@ struct Instr {
quint16 subscribeIndex;
} find;
struct {
+ QML_INSTR_HEADER
quint8 type;
qint8 reg;
quint8 packing[6];
} cleanup;
struct {
+ QML_INSTR_HEADER
quint8 type;
quint8 packing[1];
quint16 offset;
@@ -535,7 +561,7 @@ struct Program {
quint16 subscriptions;
quint16 identifiers;
quint16 instructionCount;
- quint16 dummy;
+ quint16 compiled;
const char *data() const { return ((const char *)this) + sizeof(Program); }
const Instr *instructions() const { return (const Instr *)(data() + dataLength); }
@@ -572,7 +598,7 @@ struct QDeclarativeBindingCompilerPrivate
QDeclarativeParser::Object *component;
QDeclarativeParser::Property *destination;
QHash<QString, QDeclarativeParser::Object *> ids;
- QDeclarativeEnginePrivate::Imports imports;
+ QDeclarativeImports imports;
QDeclarativeEnginePrivate *engine;
QString contextName() const { return QLatin1String("$$$SCOPE_") + QString::number((intptr_t)context, 16); }
@@ -1097,35 +1123,57 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
instr += instrIndex;
const char *data = program->data();
+#ifdef QML_THREADED_INTERPRETER
+ static void *decode_instr[] = {
+ FOR_EACH_QML_INSTR(QML_INSTR_ADDR)
+ };
+
+ if (!program->compiled) {
+ program->compiled = true;
+ const Instr *inop = program->instructions();
+ for (int i = 0; i < program->instructionCount; ++i) {
+ Instr *op = (Instr *) inop++;
+ op->common.code = decode_instr[op->common.type];
+ }
+ }
+
+ goto *instr->common.code;
+#else
// return;
+
#ifdef COMPILEDBINDINGS_DEBUG
qWarning().nospace() << "Begin binding run";
#endif
while (instr) {
+ switch (instr->common.type) {
+
#ifdef COMPILEDBINDINGS_DEBUG
dumpInstruction(instr);
#endif
- switch (instr->common.type) {
- case Instr::Noop:
- case Instr::BindingId:
- break;
+#endif
- case Instr::SubscribeId:
+ QML_BEGIN_INSTR(Noop)
+ QML_END_INSTR(Noop)
+
+ QML_BEGIN_INSTR(BindingId)
+ QML_END_INSTR(BindingId)
+
+ QML_BEGIN_INSTR(SubscribeId)
subscribeId(context, instr->subscribe.index, instr->subscribe.offset);
- break;
+ QML_END_INSTR(SubscribeId)
- case Instr::Subscribe:
+ QML_BEGIN_INSTR(Subscribe)
{
QObject *o = 0;
const Register &object = registers[instr->subscribe.reg];
if (!object.isUndefined()) o = object.getQObject();
subscribe(o, instr->subscribe.index, instr->subscribe.offset);
}
- break;
+ QML_END_INSTR(Subscribe)
- case Instr::FetchAndSubscribe:
+ QML_BEGIN_INSTR(FetchAndSubscribe)
{
const Register &input = registers[instr->fetchAndSubscribe.objectReg];
Register &output = registers[instr->fetchAndSubscribe.output];
@@ -1149,21 +1197,21 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
fastProperties()->accessor(instr->fetchAndSubscribe.function)(object, output.typeDataPtr(), sub);
}
}
- break;
+ QML_END_INSTR(FetchAndSubscribe)
- case Instr::LoadId:
+ QML_BEGIN_INSTR(LoadId)
registers[instr->load.reg].setQObject(context->idValues[instr->load.index].data());
- break;
+ QML_END_INSTR(LoadId)
- case Instr::LoadScope:
+ QML_BEGIN_INSTR(LoadScope)
registers[instr->load.reg].setQObject(scope);
- break;
+ QML_END_INSTR(LoadScope)
- case Instr::LoadRoot:
+ QML_BEGIN_INSTR(LoadRoot)
registers[instr->load.reg].setQObject(context->contextObject);
- break;
+ QML_END_INSTR(LoadRoot)
- case Instr::LoadAttached:
+ QML_BEGIN_INSTR(LoadAttached)
{
const Register &input = registers[instr->attached.reg];
Register &output = registers[instr->attached.output];
@@ -1184,48 +1232,48 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
output.setQObject(attached);
}
}
- break;
+ QML_END_INSTR(LoadAttached)
- case Instr::ConvertIntToReal:
+ QML_BEGIN_INSTR(ConvertIntToReal)
{
const Register &input = registers[instr->unaryop.src];
Register &output = registers[instr->unaryop.output];
if (input.isUndefined()) output.setUndefined();
else output.setqreal(qreal(input.getint()));
}
- break;
+ QML_END_INSTR(ConvertIntToReal)
- case Instr::ConvertRealToInt:
+ QML_BEGIN_INSTR(ConvertRealToInt)
{
const Register &input = registers[instr->unaryop.src];
Register &output = registers[instr->unaryop.output];
if (input.isUndefined()) output.setUndefined();
- else output.setint(int(input.getqreal()));
+ else output.setint(qRound(input.getqreal()));
}
- break;
+ QML_END_INSTR(ConvertRealToInt)
- case Instr::Real:
+ QML_BEGIN_INSTR(Real)
registers[instr->real_value.reg].setqreal(instr->real_value.value);
- break;
+ QML_END_INSTR(Real)
- case Instr::Int:
+ QML_BEGIN_INSTR(Int)
registers[instr->int_value.reg].setint(instr->int_value.value);
- break;
+ QML_END_INSTR(Int)
- case Instr::Bool:
+ QML_BEGIN_INSTR(Bool)
registers[instr->bool_value.reg].setbool(instr->bool_value.value);
- break;
+ QML_END_INSTR(Bool)
- case Instr::String:
+ QML_BEGIN_INSTR(String)
{
Register &output = registers[instr->string_value.reg];
new (output.getstringptr())
QString((QChar *)(data + instr->string_value.offset), instr->string_value.length);
output.settype(QMetaType::QString);
}
- break;
+ QML_END_INSTR(String)
- case Instr::AddReal:
+ QML_BEGIN_INSTR(AddReal)
{
const Register &lhs = registers[instr->binaryop.src1];
const Register &rhs = registers[instr->binaryop.src2];
@@ -1233,9 +1281,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
if (lhs.isUndefined() || rhs.isUndefined()) output.setNaN();
else output.setqreal(lhs.getqreal() + rhs.getqreal());
}
- break;
+ QML_END_INSTR(AddReal)
- case Instr::AddInt:
+ QML_BEGIN_INSTR(AddInt)
{
const Register &lhs = registers[instr->binaryop.src1];
const Register &rhs = registers[instr->binaryop.src2];
@@ -1243,9 +1291,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
if (lhs.isUndefined() || rhs.isUndefined()) output.setNaN();
else output.setint(lhs.getint() + rhs.getint());
}
- break;
+ QML_END_INSTR(AddInt)
- case Instr::AddString:
+ QML_BEGIN_INSTR(AddString)
{
const Register &lhs = registers[instr->binaryop.src1];
const Register &rhs = registers[instr->binaryop.src2];
@@ -1265,9 +1313,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
output.settype(QMetaType::QString);
}
}
- break;
+ QML_END_INSTR(AddString)
- case Instr::MinusReal:
+ QML_BEGIN_INSTR(MinusReal)
{
const Register &lhs = registers[instr->binaryop.src1];
const Register &rhs = registers[instr->binaryop.src2];
@@ -1275,9 +1323,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
if (lhs.isUndefined() || rhs.isUndefined()) output.setNaN();
else output.setqreal(lhs.getqreal() - rhs.getqreal());
}
- break;
+ QML_END_INSTR(MinusReal)
- case Instr::MinusInt:
+ QML_BEGIN_INSTR(MinusInt)
{
const Register &lhs = registers[instr->binaryop.src1];
const Register &rhs = registers[instr->binaryop.src2];
@@ -1285,9 +1333,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
if (lhs.isUndefined() || rhs.isUndefined()) output.setNaN();
else output.setint(lhs.getint() - rhs.getint());
}
- break;
+ QML_END_INSTR(MinusInt)
- case Instr::CompareReal:
+ QML_BEGIN_INSTR(CompareReal)
{
const Register &lhs = registers[instr->binaryop.src1];
const Register &rhs = registers[instr->binaryop.src2];
@@ -1295,9 +1343,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
if (lhs.isUndefined() || rhs.isUndefined()) output.setbool(lhs.isUndefined() == rhs.isUndefined());
else output.setbool(lhs.getqreal() == rhs.getqreal());
}
- break;
+ QML_END_INSTR(CompareReal)
- case Instr::CompareString:
+ QML_BEGIN_INSTR(CompareString)
{
const Register &lhs = registers[instr->binaryop.src1];
const Register &rhs = registers[instr->binaryop.src2];
@@ -1305,9 +1353,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
if (lhs.isUndefined() || rhs.isUndefined()) output.setbool(lhs.isUndefined() == rhs.isUndefined());
else output.setbool(*lhs.getstringptr() == *rhs.getstringptr());
}
- break;
+ QML_END_INSTR(CompareString)
- case Instr::NotCompareReal:
+ QML_BEGIN_INSTR(NotCompareReal)
{
const Register &lhs = registers[instr->binaryop.src1];
const Register &rhs = registers[instr->binaryop.src2];
@@ -1315,9 +1363,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
if (lhs.isUndefined() || rhs.isUndefined()) output.setbool(lhs.isUndefined() != rhs.isUndefined());
else output.setbool(lhs.getqreal() != rhs.getqreal());
}
- break;
+ QML_END_INSTR(NotCompareReal)
- case Instr::NotCompareString:
+ QML_BEGIN_INSTR(NotCompareString)
{
const Register &lhs = registers[instr->binaryop.src1];
const Register &rhs = registers[instr->binaryop.src2];
@@ -1325,9 +1373,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
if (lhs.isUndefined() || rhs.isUndefined()) output.setbool(lhs.isUndefined() != rhs.isUndefined());
else output.setbool(*lhs.getstringptr() != *rhs.getstringptr());
}
- break;
+ QML_END_INSTR(NotCompareString)
- case Instr::GreaterThanReal:
+ QML_BEGIN_INSTR(GreaterThanReal)
{
const Register &lhs = registers[instr->binaryop.src1];
const Register &rhs = registers[instr->binaryop.src2];
@@ -1335,9 +1383,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
if (lhs.isUndefined() || rhs.isUndefined()) output.setbool(false);
else output.setbool(lhs.getqreal() > rhs.getqreal());
}
- break;
+ QML_END_INSTR(GreaterThanReal)
- case Instr::MaxReal:
+ QML_BEGIN_INSTR(MaxReal)
{
const Register &lhs = registers[instr->binaryop.src1];
const Register &rhs = registers[instr->binaryop.src2];
@@ -1345,9 +1393,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
if (lhs.isUndefined() || rhs.isUndefined()) output.setNaN();
else output.setqreal(qMax(lhs.getqreal(), rhs.getqreal()));
}
- break;
+ QML_END_INSTR(MaxReal)
- case Instr::MinReal:
+ QML_BEGIN_INSTR(MinReal)
{
const Register &lhs = registers[instr->binaryop.src1];
const Register &rhs = registers[instr->binaryop.src2];
@@ -1355,33 +1403,33 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
if (lhs.isUndefined() || rhs.isUndefined()) output.setNaN();
else output.setqreal(qMin(lhs.getqreal(), rhs.getqreal()));
}
- break;
+ QML_END_INSTR(MinReal)
- case Instr::NewString:
+ QML_BEGIN_INSTR(NewString)
{
Register &output = registers[instr->construct.reg];
new (output.getstringptr()) QString;
output.settype(QMetaType::QString);
}
- break;
+ QML_END_INSTR(NewString)
- case Instr::NewUrl:
+ QML_BEGIN_INSTR(NewUrl)
{
Register &output = registers[instr->construct.reg];
new (output.geturlptr()) QUrl;
output.settype(QMetaType::QUrl);
}
- break;
+ QML_END_INSTR(NewUrl)
- case Instr::CleanupString:
+ QML_BEGIN_INSTR(CleanupString)
registers[instr->cleanup.reg].getstringptr()->~QString();
- break;
+ QML_END_INSTR(CleanupString)
- case Instr::CleanupUrl:
+ QML_BEGIN_INSTR(CleanupUrl)
registers[instr->cleanup.reg].geturlptr()->~QUrl();
- break;
+ QML_END_INSTR(CleanupUrl)
- case Instr::Fetch:
+ QML_BEGIN_INSTR(Fetch)
{
const Register &input = registers[instr->fetch.objectReg];
Register &output = registers[instr->fetch.output];
@@ -1399,9 +1447,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
QMetaObject::metacall(object, QMetaObject::ReadProperty, instr->fetch.index, argv);
}
}
- break;
+ QML_END_INSTR(Fetch)
- case Instr::Store:
+ QML_BEGIN_INSTR(Store)
{
Register &data = registers[instr->store.reg];
if (data.isUndefined()) {
@@ -1415,21 +1463,22 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
QMetaObject::metacall(output, QMetaObject::WriteProperty,
instr->store.index, argv);
}
- break;
+ QML_END_INSTR(Store)
- case Instr::Copy:
+ QML_BEGIN_INSTR(Copy)
registers[instr->copy.reg] = registers[instr->copy.src];
- break;
+ QML_END_INSTR(Copy)
- case Instr::Skip:
+ QML_BEGIN_INSTR(Skip)
if (instr->skip.reg == -1 || !registers[instr->skip.reg].getbool())
instr += instr->skip.count;
- break;
+ QML_END_INSTR(Skip)
- case Instr::Done:
+ QML_BEGIN_INSTR(Done)
return;
+ QML_END_INSTR(Done)
- case Instr::InitString:
+ QML_BEGIN_INSTR(InitString)
if (!identifiers[instr->initstring.offset].identifier) {
quint32 len = *(quint32 *)(data + instr->initstring.dataIdx);
QChar *strdata = (QChar *)(data + instr->initstring.dataIdx + sizeof(quint32));
@@ -1438,10 +1487,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
identifiers[instr->initstring.offset] = engine->objectClass->createPersistentIdentifier(str);
}
- break;
+ QML_END_INSTR(InitString)
- case Instr::FindGenericTerminal:
- case Instr::FindGeneric:
+ QML_BEGIN_INSTR(FindGenericTerminal)
// We start the search in the parent context, as we know that the
// name is not present in the current context or it would have been
// found during the static compile
@@ -1449,10 +1497,19 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
context->parent,
identifiers[instr->find.name].identifier,
instr->common.type == Instr::FindGenericTerminal);
- break;
+ QML_END_INSTR(FindGenericTerminal)
- case Instr::FindPropertyTerminal:
- case Instr::FindProperty:
+ QML_BEGIN_INSTR(FindGeneric)
+ // We start the search in the parent context, as we know that the
+ // name is not present in the current context or it would have been
+ // found during the static compile
+ findgeneric(registers + instr->find.reg, instr->find.subscribeIndex,
+ context->parent,
+ identifiers[instr->find.name].identifier,
+ instr->common.type == Instr::FindGenericTerminal);
+ QML_END_INSTR(FindGeneric)
+
+ QML_BEGIN_INSTR(FindPropertyTerminal)
{
const Register &object = registers[instr->find.src];
if (object.isUndefined()) {
@@ -1465,9 +1522,24 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
instr->find.subscribeIndex, identifiers[instr->find.name].identifier,
instr->common.type == Instr::FindPropertyTerminal);
}
- break;
+ QML_END_INSTR(FindPropertyTerminal)
- case Instr::CleanupGeneric:
+ QML_BEGIN_INSTR(FindProperty)
+ {
+ const Register &object = registers[instr->find.src];
+ if (object.isUndefined()) {
+ throwException(instr->find.exceptionId, error, program, context);
+ return;
+ }
+
+ findproperty(object.getQObject(), registers + instr->find.reg,
+ QDeclarativeEnginePrivate::get(context->engine),
+ instr->find.subscribeIndex, identifiers[instr->find.name].identifier,
+ instr->common.type == Instr::FindPropertyTerminal);
+ }
+ QML_END_INSTR(FindProperty)
+
+ QML_BEGIN_INSTR(CleanupGeneric)
{
int type = registers[instr->cleanup.reg].gettype();
if (type == qMetaTypeId<QVariant>()) {
@@ -1478,9 +1550,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
registers[instr->cleanup.reg].geturlptr()->~QUrl();
}
}
- break;
+ QML_END_INSTR(CleanupGeneric)
- case Instr::ConvertGenericToReal:
+ QML_BEGIN_INSTR(ConvertGenericToReal)
{
Register &output = registers[instr->unaryop.output];
Register &input = registers[instr->unaryop.src];
@@ -1488,9 +1560,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
output.setqreal(toReal(&input, input.gettype(), &ok));
if (!ok) output.setUndefined();
}
- break;
+ QML_END_INSTR(ConvertGenericToReal)
- case Instr::ConvertGenericToBool:
+ QML_BEGIN_INSTR(ConvertGenericToBool)
{
Register &output = registers[instr->unaryop.output];
Register &input = registers[instr->unaryop.src];
@@ -1498,9 +1570,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
output.setbool(toBool(&input, input.gettype(), &ok));
if (!ok) output.setUndefined();
}
- break;
+ QML_END_INSTR(ConvertGenericToBool)
- case Instr::ConvertGenericToString:
+ QML_BEGIN_INSTR(ConvertGenericToString)
{
Register &output = registers[instr->unaryop.output];
Register &input = registers[instr->unaryop.src];
@@ -1509,9 +1581,9 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
if (ok) { new (output.getstringptr()) QString(str); output.settype(QMetaType::QString); }
else { output.setUndefined(); }
}
- break;
+ QML_END_INSTR(ConvertGenericToString)
- case Instr::ConvertGenericToUrl:
+ QML_BEGIN_INSTR(ConvertGenericToUrl)
{
Register &output = registers[instr->unaryop.output];
Register &input = registers[instr->unaryop.src];
@@ -1520,15 +1592,19 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex,
if (ok) { new (output.geturlptr()) QUrl(url); output.settype(QMetaType::QUrl); }
else { output.setUndefined(); }
}
- break;
+ QML_END_INSTR(ConvertGenericToUrl)
+#ifdef QML_THREADED_INTERPRETER
+ // nothing to do
+#else
default:
qFatal("EEK");
break;
- }
+ } // switch
- instr++;
- }
+ ++instr;
+ } // while
+#endif
}
void QDeclarativeBindingCompiler::dump(const QByteArray &programData)
@@ -1624,6 +1700,8 @@ bool QDeclarativeBindingCompilerPrivate::compile(QDeclarativeJS::AST::Node *node
return false;
int convertReg = acquireReg();
+ if (convertReg == -1)
+ return false;
if (destination->type == QMetaType::QReal) {
Instr convert;
@@ -1795,8 +1873,8 @@ bool QDeclarativeBindingCompilerPrivate::parseName(AST::Node *node, Result &type
if (nameParts.at(ii + 1).at(0).isUpper())
return false;
- QDeclarativeEnginePrivate::ImportedNamespace *ns = 0;
- if (!engine->resolveType(imports, name.toUtf8(), &attachType, 0, 0, 0, &ns))
+ QDeclarativeImportedNamespace *ns = 0;
+ if (!engine->importDatabase.resolveType(imports, name.toUtf8(), &attachType, 0, 0, 0, &ns))
return false;
if (ns || !attachType || !attachType->attachedPropertiesType())
return false;
@@ -2011,6 +2089,8 @@ bool QDeclarativeBindingCompilerPrivate::parseArith(QDeclarativeJS::AST::Node *n
AST::BinaryExpression *expression = static_cast<AST::BinaryExpression *>(node);
type.reg = acquireReg();
+ if (type.reg == -1)
+ return false;
Result lhs;
Result rhs;
@@ -2062,6 +2142,8 @@ bool QDeclarativeBindingCompilerPrivate::numberArith(Result &type, const Result
return false;
lhsTmp = acquireReg();
+ if (lhsTmp == -1)
+ return false;
Instr conv;
conv.common.type = Instr::ConvertGenericToReal;
@@ -2075,6 +2157,8 @@ bool QDeclarativeBindingCompilerPrivate::numberArith(Result &type, const Result
return false;
rhsTmp = acquireReg();
+ if (rhsTmp == -1)
+ return false;
Instr conv;
conv.common.type = Instr::ConvertGenericToReal;
@@ -2123,6 +2207,8 @@ bool QDeclarativeBindingCompilerPrivate::stringArith(Result &type, const Result
return false;
lhsTmp = acquireReg(Instr::CleanupString);
+ if (lhsTmp == -1)
+ return false;
Instr convert;
convert.common.type = Instr::ConvertGenericToString;
@@ -2136,6 +2222,8 @@ bool QDeclarativeBindingCompilerPrivate::stringArith(Result &type, const Result
return false;
rhsTmp = acquireReg(Instr::CleanupString);
+ if (rhsTmp == -1)
+ return false;
Instr convert;
convert.common.type = Instr::ConvertGenericToString;
@@ -2145,6 +2233,9 @@ bool QDeclarativeBindingCompilerPrivate::stringArith(Result &type, const Result
}
type.reg = acquireReg(Instr::CleanupString);
+ if (type.reg == -1)
+ return false;
+
type.type = QMetaType::QString;
Instr add;
@@ -2185,6 +2276,9 @@ bool QDeclarativeBindingCompilerPrivate::parseLogic(QDeclarativeJS::AST::Node *n
if (!parseExpression(expression->right, rhs)) return false;
type.reg = acquireReg();
+ if (type.reg == -1)
+ return false;
+
type.metaObject = 0;
type.type = QVariant::Bool;
@@ -2310,6 +2404,8 @@ bool QDeclarativeBindingCompilerPrivate::parseConstant(QDeclarativeJS::AST::Node
type.metaObject = 0;
type.type = -1;
type.reg = acquireReg();
+ if (type.reg == -1)
+ return false;
if (node->kind == AST::Node::Kind_TrueLiteral) {
type.type = QVariant::Bool;
@@ -2398,6 +2494,9 @@ bool QDeclarativeBindingCompilerPrivate::parseMethod(QDeclarativeJS::AST::Node *
releaseReg(r1.reg);
op.binaryop.output = acquireReg();
+ if (op.binaryop.output == -1)
+ return false;
+
op.binaryop.src1 = r0.reg;
op.binaryop.src2 = r1.reg;
bytecode << op;
@@ -2473,6 +2572,8 @@ bool QDeclarativeBindingCompilerPrivate::fetch(Result &rv, const QMetaObject *mo
if (rv.type == QMetaType::QString) {
int tmp = acquireReg();
+ if (tmp == -1)
+ return false;
Instr copy;
copy.common.type = Instr::Copy;
copy.copy.reg = tmp;
@@ -2549,6 +2650,8 @@ int QDeclarativeBindingCompilerPrivate::registerLiteralString(const QString &str
data += strdata;
int reg = acquireReg(Instr::CleanupString);
+ if (reg == -1)
+ return false;
Instr string;
string.common.type = Instr::String;
@@ -2754,6 +2857,7 @@ QByteArray QDeclarativeBindingCompiler::program() const
prog.subscriptions = d->committed.subscriptionIds.count();
prog.identifiers = d->committed.registeredStrings.count();
prog.instructionCount = bytecode.count();
+ prog.compiled = false;
int size = sizeof(Program) + bytecode.count() * sizeof(Instr);
size += prog.dataLength;
diff --git a/src/declarative/qml/qdeclarativecompiledbindings_p.h b/src/declarative/qml/qdeclarativecompiledbindings_p.h
index a17bc84..a9772cc 100644
--- a/src/declarative/qml/qdeclarativecompiledbindings_p.h
+++ b/src/declarative/qml/qdeclarativecompiledbindings_p.h
@@ -77,7 +77,7 @@ public:
QDeclarativeParser::Property *property;
QDeclarativeParser::Variant expression;
QHash<QString, QDeclarativeParser::Object *> ids;
- QDeclarativeEnginePrivate::Imports imports;
+ QDeclarativeImports imports;
};
// -1 on failure, otherwise the binding index to use
@@ -104,8 +104,8 @@ protected:
int qt_metacall(QMetaObject::Call, int, void **);
private:
- Q_DISABLE_COPY(QDeclarativeCompiledBindings);
- Q_DECLARE_PRIVATE(QDeclarativeCompiledBindings);
+ Q_DISABLE_COPY(QDeclarativeCompiledBindings)
+ Q_DECLARE_PRIVATE(QDeclarativeCompiledBindings)
};
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 1727687..b5bf972 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -180,7 +180,7 @@ bool QDeclarativeCompiler::isSignalPropertyName(const QByteArray &name)
bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop,
QDeclarativeParser::Value *v)
{
- QString string = v->value.asScript();
+ QString string = v->value.asString();
if (!prop.isWritable())
COMPILE_EXCEPTION(v, tr("Invalid property assignment: \"%1\" is a read-only property").arg(QString::fromUtf8(prop.name())));
@@ -207,31 +207,31 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop,
break;
case QVariant::UInt:
{
- bool ok;
- string.toUInt(&ok);
- if (!v->value.isNumber() || !ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: unsigned int expected"));
+ bool ok = v->value.isNumber();
+ if (ok) {
+ double n = v->value.asNumber();
+ if (double(uint(n)) != n)
+ ok = false;
+ }
+ if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: unsigned int expected"));
}
break;
case QVariant::Int:
{
- bool ok;
- string.toInt(&ok);
- if (!v->value.isNumber() || !ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: int expected"));
+ bool ok = v->value.isNumber();
+ if (ok) {
+ double n = v->value.asNumber();
+ if (double(int(n)) != n)
+ ok = false;
+ }
+ if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: int expected"));
}
break;
case QMetaType::Float:
- {
- bool ok;
- string.toFloat(&ok);
- if (!v->value.isNumber() || !ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: float expected"));
- }
+ if (!v->value.isNumber()) COMPILE_EXCEPTION(v, tr("Invalid property assignment: float expected"));
break;
case QVariant::Double:
- {
- bool ok;
- string.toDouble(&ok);
- if (!v->value.isNumber() || !ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: double expected"));
- }
+ if (!v->value.isNumber()) COMPILE_EXCEPTION(v, tr("Invalid property assignment: double expected"));
break;
case QVariant::Color:
{
@@ -319,7 +319,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop,
void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop,
QDeclarativeParser::Value *v)
{
- QString string = v->value.asScript();
+ QString string = v->value.asString();
QDeclarativeInstruction instr;
instr.line = v->location.start.line;
@@ -352,6 +352,10 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop,
instr.storeDouble.propertyIndex = prop.propertyIndex();
instr.storeDouble.value = n;
}
+ } else if(v->value.isBoolean()) {
+ instr.type = QDeclarativeInstruction::StoreVariantBool;
+ instr.storeBool.propertyIndex = prop.propertyIndex();
+ instr.storeBool.value = v->value.asBoolean();
} else {
instr.type = QDeclarativeInstruction::StoreVariant;
instr.storeString.propertyIndex = prop.propertyIndex();
@@ -378,28 +382,28 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop,
{
instr.type = QDeclarativeInstruction::StoreInteger;
instr.storeInteger.propertyIndex = prop.propertyIndex();
- instr.storeInteger.value = string.toUInt();
+ instr.storeInteger.value = uint(v->value.asNumber());
}
break;
case QVariant::Int:
{
instr.type = QDeclarativeInstruction::StoreInteger;
instr.storeInteger.propertyIndex = prop.propertyIndex();
- instr.storeInteger.value = string.toInt();
+ instr.storeInteger.value = int(v->value.asNumber());
}
break;
case QMetaType::Float:
{
instr.type = QDeclarativeInstruction::StoreFloat;
instr.storeFloat.propertyIndex = prop.propertyIndex();
- instr.storeFloat.value = string.toFloat();
+ instr.storeFloat.value = float(v->value.asNumber());
}
break;
case QVariant::Double:
{
instr.type = QDeclarativeInstruction::StoreDouble;
instr.storeDouble.propertyIndex = prop.propertyIndex();
- instr.storeDouble.value = string.toDouble();
+ instr.storeDouble.value = v->value.asNumber();
}
break;
case QVariant::Color:
@@ -607,6 +611,7 @@ bool QDeclarativeCompiler::compile(QDeclarativeEngine *engine,
Q_ASSERT(root);
this->engine = engine;
+ this->enginePrivate = QDeclarativeEnginePrivate::get(engine);
this->unit = unit;
this->unitRoot = root;
compileTree(root);
@@ -624,6 +629,7 @@ bool QDeclarativeCompiler::compile(QDeclarativeEngine *engine,
savedCompileStates.clear();
output = 0;
this->engine = 0;
+ this->enginePrivate = 0;
this->unit = 0;
this->unitRoot = 0;
@@ -688,14 +694,12 @@ void QDeclarativeCompiler::compileTree(Object *tree)
def.type = QDeclarativeInstruction::SetDefault;
output->bytecode << def;
- output->imports = unit->imports;
-
output->importCache = new QDeclarativeTypeNameCache(engine);
for (int ii = 0; ii < importedScriptIndexes.count(); ++ii)
output->importCache->add(importedScriptIndexes.at(ii), ii);
- output->imports.cache(output->importCache, engine);
+ unit->imports.cache(output->importCache, engine);
Q_ASSERT(tree->metatype);
@@ -706,7 +710,7 @@ void QDeclarativeCompiler::compileTree(Object *tree)
output->root = &output->rootData;
}
if (!tree->metadata.isEmpty())
- QDeclarativeEnginePrivate::get(engine)->registerCompositeType(output);
+ enginePrivate->registerCompositeType(output);
}
static bool ValuePtrLessThan(const Value *t1, const Value *t2)
@@ -938,19 +942,28 @@ void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj)
meta.storeMeta.propertyCache = output->propertyCaches.count();
// ### Surely the creation of this property cache could be more efficient
QDeclarativePropertyCache *propertyCache = 0;
- if (tr.component && QDeclarativeComponentPrivate::get(tr.component)->cc->rootPropertyCache) {
+ if (tr.component)
propertyCache = QDeclarativeComponentPrivate::get(tr.component)->cc->rootPropertyCache->copy();
- } else {
- propertyCache = QDeclarativePropertyCache::create(engine, obj->metaObject()->superClass());
- }
+ else
+ propertyCache = enginePrivate->cache(obj->metaObject()->superClass())->copy();
+
propertyCache->append(engine, obj->metaObject(), QDeclarativePropertyCache::Data::NoFlags,
QDeclarativePropertyCache::Data::IsVMEFunction);
+
if (obj == unitRoot) {
propertyCache->addref();
output->rootPropertyCache = propertyCache;
}
+
output->propertyCaches << propertyCache;
output->bytecode << meta;
+ } else if (obj == unitRoot) {
+ if (tr.component)
+ output->rootPropertyCache = QDeclarativeComponentPrivate::get(tr.component)->cc->rootPropertyCache;
+ else
+ output->rootPropertyCache = enginePrivate->cache(obj->metaObject());
+
+ output->rootPropertyCache->addref();
}
// Set the object id
@@ -1174,7 +1187,7 @@ bool QDeclarativeCompiler::buildComponent(QDeclarativeParser::Object *obj,
if (idProp) {
if (idProp->value || idProp->values.count() > 1 || idProp->values.at(0)->object)
COMPILE_EXCEPTION(idProp, tr("Invalid component id specification"));
- COMPILE_CHECK(checkValidId(idProp->values.first(), idProp->values.first()->primitive()));
+ COMPILE_CHECK(checkValidId(idProp->values.first(), idProp->values.first()->primitive()))
QString idVal = idProp->values.first()->primitive();
@@ -1303,6 +1316,9 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDecl
} else {
prop->values.at(0)->type = Value::SignalExpression;
+ if (!prop->values.at(0)->value.isScript())
+ COMPILE_EXCEPTION(prop, tr("Cannot assign a value to a signal (expecting a script to be run)"));
+
QString script = prop->values.at(0)->value.asScript().trimmed();
if (script.isEmpty())
COMPILE_EXCEPTION(prop, tr("Empty signal assignment"));
@@ -1359,9 +1375,9 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop,
}
QDeclarativeType *type = 0;
- QDeclarativeEnginePrivate::ImportedNamespace *typeNamespace = 0;
- QDeclarativeEnginePrivate::get(engine)->resolveType(unit->imports, prop->name,
- &type, 0, 0, 0, &typeNamespace);
+ QDeclarativeImportedNamespace *typeNamespace = 0;
+ enginePrivate->importDatabase.resolveType(unit->imports, prop->name,
+ &type, 0, 0, 0, &typeNamespace);
if (typeNamespace) {
// ### We might need to indicate that this property is a namespace
@@ -1436,7 +1452,7 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop,
COMPILE_CHECK(buildGroupedProperty(prop, obj, ctxt));
- } else if (QDeclarativeEnginePrivate::get(engine)->isList(prop->type)) {
+ } else if (enginePrivate->isList(prop->type)) {
COMPILE_CHECK(buildListProperty(prop, obj, ctxt));
@@ -1453,11 +1469,10 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop,
return true;
}
-bool
-QDeclarativeCompiler::buildPropertyInNamespace(QDeclarativeEnginePrivate::ImportedNamespace *ns,
- QDeclarativeParser::Property *nsProp,
- QDeclarativeParser::Object *obj,
- const BindingContext &ctxt)
+bool QDeclarativeCompiler::buildPropertyInNamespace(QDeclarativeImportedNamespace *ns,
+ QDeclarativeParser::Property *nsProp,
+ QDeclarativeParser::Object *obj,
+ const BindingContext &ctxt)
{
if (!nsProp->value)
COMPILE_EXCEPTION(nsProp, tr("Invalid use of namespace"));
@@ -1470,8 +1485,7 @@ QDeclarativeCompiler::buildPropertyInNamespace(QDeclarativeEnginePrivate::Import
// Setup attached property data
QDeclarativeType *type = 0;
- QDeclarativeEnginePrivate::get(engine)->resolveTypeInNamespace(ns, prop->name,
- &type, 0, 0, 0);
+ enginePrivate->importDatabase.resolveTypeInNamespace(ns, prop->name, &type, 0, 0, 0);
if (!type || !type->attachedPropertiesType())
COMPILE_EXCEPTION(prop, tr("Non-existent attached object"));
@@ -1492,7 +1506,7 @@ QDeclarativeCompiler::buildPropertyInNamespace(QDeclarativeEnginePrivate::Import
void QDeclarativeCompiler::genValueProperty(QDeclarativeParser::Property *prop,
QDeclarativeParser::Object *obj)
{
- if (QDeclarativeEnginePrivate::get(engine)->isList(prop->type)) {
+ if (enginePrivate->isList(prop->type)) {
genListProperty(prop, obj);
} else {
genPropertyAssignment(prop, obj);
@@ -1502,7 +1516,7 @@ void QDeclarativeCompiler::genValueProperty(QDeclarativeParser::Property *prop,
void QDeclarativeCompiler::genListProperty(QDeclarativeParser::Property *prop,
QDeclarativeParser::Object *obj)
{
- int listType = QDeclarativeEnginePrivate::get(engine)->listType(prop->type);
+ int listType = enginePrivate->listType(prop->type);
QDeclarativeInstruction fetch;
fetch.type = QDeclarativeInstruction::FetchQList;
@@ -1756,8 +1770,7 @@ bool QDeclarativeCompiler::buildGroupedProperty(QDeclarativeParser::Property *pr
} else {
// Load the nested property's meta type
- prop->value->metatype =
- QDeclarativeEnginePrivate::get(engine)->metaObjectForType(prop->type);
+ prop->value->metatype = enginePrivate->metaObjectForType(prop->type);
if (!prop->value->metatype)
COMPILE_EXCEPTION(prop, tr("Invalid grouped property access"));
@@ -1836,13 +1849,13 @@ bool QDeclarativeCompiler::buildListProperty(QDeclarativeParser::Property *prop,
QDeclarativeParser::Object *obj,
const BindingContext &ctxt)
{
- Q_ASSERT(QDeclarativeEnginePrivate::get(engine)->isList(prop->type));
+ Q_ASSERT(enginePrivate->isList(prop->type));
int t = prop->type;
obj->addValueProperty(prop);
- int listType = QDeclarativeEnginePrivate::get(engine)->listType(t);
+ int listType = enginePrivate->listType(t);
bool listTypeIsInterface = QDeclarativeMetaType::isInterface(listType);
bool assignedBinding = false;
@@ -1883,7 +1896,7 @@ bool QDeclarativeCompiler::buildScriptStringProperty(QDeclarativeParser::Propert
if (prop->values.count() > 1)
COMPILE_EXCEPTION(prop->values.at(1), tr( "Cannot assign multiple values to a script property"));
- if (prop->values.at(0)->object || !prop->values.at(0)->value.isScript())
+ if (prop->values.at(0)->object)
COMPILE_EXCEPTION(prop->values.at(0), tr( "Invalid property assignment: script expected"));
obj->addScriptStringProperty(prop, ctxt.stack);
@@ -1957,8 +1970,7 @@ bool QDeclarativeCompiler::buildPropertyObjectAssignment(QDeclarativeParser::Pro
// We want to raw metaObject here as the raw metaobject is the
// actual property type before we applied any extensions that might
// effect the properties on the type, but don't effect assignability
- const QMetaObject *propertyMetaObject =
- QDeclarativeEnginePrivate::get(engine)->rawMetaObjectForType(prop->type);
+ const QMetaObject *propertyMetaObject = enginePrivate->rawMetaObjectForType(prop->type);
// Will be true if the assgned type inherits propertyMetaObject
bool isAssignable = false;
@@ -2100,8 +2112,8 @@ bool QDeclarativeCompiler::testQualifiedEnumAssignment(const QMetaProperty &prop
QString typeName = parts.at(0);
QDeclarativeType *type = 0;
- QDeclarativeEnginePrivate::get(engine)->resolveType(unit->imports, typeName.toUtf8(),
- &type, 0, 0, 0, 0);
+ enginePrivate->importDatabase.resolveType(unit->imports, typeName.toUtf8(),
+ &type, 0, 0, 0, 0);
if (!type || obj->typeName != type->qmlTypeName())
return true;
@@ -2128,7 +2140,7 @@ int QDeclarativeCompiler::evaluateEnum(const QByteArray& script) const
int dot = script.indexOf('.');
if (dot > 0) {
QDeclarativeType *type = 0;
- QDeclarativeEnginePrivate::get(engine)->resolveType(unit->imports, script.left(dot), &type, 0, 0, 0, 0);
+ enginePrivate->importDatabase.resolveType(unit->imports, script.left(dot), &type, 0, 0, 0, 0);
if (!type)
return -1;
const QMetaObject *mo = type->metaObject();
@@ -2282,13 +2294,12 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeParser::Object *obj, Dyn
QByteArray customTypeName;
QDeclarativeType *qmltype = 0;
QUrl url;
- QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(engine);
- if (!priv->resolveType(unit->imports, p.customType, &qmltype,
- &url, 0, 0, 0))
+ if (!enginePrivate->importDatabase.resolveType(unit->imports, p.customType, &qmltype,
+ &url, 0, 0, 0))
COMPILE_EXCEPTION(&p, tr("Invalid property type"));
if (!qmltype) {
- QDeclarativeCompositeTypeData *tdata = priv->typeManager.get(url);
+ QDeclarativeCompositeTypeData *tdata = enginePrivate->typeManager.get(url);
Q_ASSERT(tdata);
Q_ASSERT(tdata->status == QDeclarativeCompositeTypeData::Complete);
@@ -2460,7 +2471,7 @@ bool QDeclarativeCompiler::checkValidId(QDeclarativeParser::Value *v, const QStr
}
- if (QDeclarativeEnginePrivate::get(engine)->globalClass->illegalNames().contains(val))
+ if (enginePrivate->globalClass->illegalNames().contains(val))
COMPILE_EXCEPTION(v, tr( "ID illegally masks global JavaScript property"));
return true;
@@ -2653,8 +2664,8 @@ int QDeclarativeCompiler::genValueTypeData(QDeclarativeParser::Property *valueTy
{
QByteArray data =
QDeclarativePropertyPrivate::saveValueType(prop->parent->metaObject(), prop->index,
- QDeclarativeEnginePrivate::get(engine)->valueTypes[prop->type]->metaObject(),
- valueTypeProp->index);
+ enginePrivate->valueTypes[prop->type]->metaObject(),
+ valueTypeProp->index);
// valueTypeProp->index, valueTypeProp->type);
return output->indexForByteArray(data);
@@ -2690,7 +2701,7 @@ bool QDeclarativeCompiler::completeComponentBuild()
expr.expression = binding.expression;
expr.imports = unit->imports;
- int index = bindingCompiler.compile(expr, QDeclarativeEnginePrivate::get(engine));
+ int index = bindingCompiler.compile(expr, enginePrivate);
if (index != -1) {
binding.dataType = BindingReference::Experimental;
binding.compiledIndex = index;
@@ -2798,7 +2809,7 @@ void QDeclarativeCompiler::dumpStats()
bool QDeclarativeCompiler::canCoerce(int to, QDeclarativeParser::Object *from)
{
const QMetaObject *toMo =
- QDeclarativeEnginePrivate::get(engine)->rawMetaObjectForType(to);
+ enginePrivate->rawMetaObjectForType(to);
const QMetaObject *fromMo = from->metaObject();
while (fromMo) {
diff --git a/src/declarative/qml/qdeclarativecompiler_p.h b/src/declarative/qml/qdeclarativecompiler_p.h
index fefab7a..908c703 100644
--- a/src/declarative/qml/qdeclarativecompiler_p.h
+++ b/src/declarative/qml/qdeclarativecompiler_p.h
@@ -84,7 +84,6 @@ public:
QString name;
QUrl url;
- QDeclarativeEnginePrivate::Imports imports;
QDeclarativeTypeNameCache *importCache;
struct TypeReference
@@ -192,7 +191,7 @@ private:
const BindingContext &);
bool buildProperty(QDeclarativeParser::Property *prop, QDeclarativeParser::Object *obj,
const BindingContext &);
- bool buildPropertyInNamespace(QDeclarativeEnginePrivate::ImportedNamespace *ns,
+ bool buildPropertyInNamespace(QDeclarativeImportedNamespace *ns,
QDeclarativeParser::Property *prop,
QDeclarativeParser::Object *obj,
const BindingContext &);
@@ -336,6 +335,7 @@ private:
QList<QDeclarativeError> exceptions;
QDeclarativeCompiledData *output;
QDeclarativeEngine *engine;
+ QDeclarativeEnginePrivate *enginePrivate;
QDeclarativeParser::Object *unitRoot;
QDeclarativeCompositeTypeData *unit;
};
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index d8bbb70..3f11425 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -59,11 +59,11 @@
#include <QFileInfo>
#include <QtCore/qdebug.h>
#include <QApplication>
+#include <QGraphicsObject>
QT_BEGIN_NAMESPACE
class QByteArray;
-int statusId = qRegisterMetaType<QDeclarativeComponent::Status>("QDeclarativeComponent::Status");
/*!
\class QDeclarativeComponent
@@ -242,11 +242,11 @@ QDeclarativeComponent::~QDeclarativeComponent()
\qmlproperty enumeration Component::status
This property holds the status of component loading. It can be one of:
\list
- \o Null - no data is available for the component
- \o Ready - the component has been loaded, and can be used to create instances.
- \o Loading - the component is currently being loaded
- \o Error - an error occurred while loading the component.
- Calling errorsString() will provide a human-readable description of any errors.
+ \o Component.Null - no data is available for the component
+ \o Component.Ready - the component has been loaded, and can be used to create instances.
+ \o Component.Loading - the component is currently being loaded
+ \o Component.Error - an error occurred while loading the component.
+ Calling errorString() will provide a human-readable description of any errors.
\endlist
*/
@@ -269,19 +269,7 @@ QDeclarativeComponent::Status QDeclarativeComponent::status() const
}
/*!
- \qmlproperty bool Component::isNull
-
- Is true if the component is in the Null state, false otherwise.
-
- Equivalent to status == Component.Null.
-*/
-
-/*!
- \property QDeclarativeComponent::isNull
-
- Is true if the component is in the Null state, false otherwise.
-
- Equivalent to status() == QDeclarativeComponent::Null.
+ Returns true if status() == QDeclarativeComponent::Null.
*/
bool QDeclarativeComponent::isNull() const
{
@@ -289,19 +277,7 @@ bool QDeclarativeComponent::isNull() const
}
/*!
- \qmlproperty bool Component::isReady
-
- Is true if the component is in the Ready state, false otherwise.
-
- Equivalent to status == Component.Ready.
-*/
-
-/*!
- \property QDeclarativeComponent::isReady
-
- Is true if the component is in the Ready state, false otherwise.
-
- Equivalent to status() == QDeclarativeComponent::Ready.
+ Returns true if status() == QDeclarativeComponent::Ready.
*/
bool QDeclarativeComponent::isReady() const
{
@@ -309,21 +285,7 @@ bool QDeclarativeComponent::isReady() const
}
/*!
- \qmlproperty bool Component::isError
-
- Is true if the component is in the Error state, false otherwise.
-
- Equivalent to status == Component.Error.
-
- Calling errorsString() will provide a human-readable description of any errors.
-*/
-
-/*!
- \property QDeclarativeComponent::isError
-
- Is true if the component is in the Error state, false otherwise.
-
- Equivalent to status() == QDeclarativeComponent::Error.
+ Returns true if status() == QDeclarativeComponent::Error.
*/
bool QDeclarativeComponent::isError() const
{
@@ -331,19 +293,7 @@ bool QDeclarativeComponent::isError() const
}
/*!
- \qmlproperty bool Component::isLoading
-
- Is true if the component is in the Loading state, false otherwise.
-
- Equivalent to status == Component::Loading.
-*/
-
-/*!
- \property QDeclarativeComponent::isLoading
-
- Is true if the component is in the Loading state, false otherwise.
-
- Equivalent to status() == QDeclarativeComponent::Loading.
+ Returns true if status() == QDeclarativeComponent::Loading.
*/
bool QDeclarativeComponent::isLoading() const
{
@@ -421,7 +371,7 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, const Q
{
Q_D(QDeclarativeComponent);
d->engine = engine;
- loadUrl(QUrl::fromLocalFile(fileName));
+ loadUrl(d->engine->baseUrl().resolved(QUrl::fromLocalFile(fileName)));
}
/*!
@@ -542,7 +492,7 @@ QList<QDeclarativeError> QDeclarativeComponent::errors() const
}
/*!
- \qmlmethod string Component::errorsString()
+ \qmlmethod string Component::errorString()
Returns a human-readable description of any errors.
@@ -554,9 +504,9 @@ QList<QDeclarativeError> QDeclarativeComponent::errors() const
/*!
\internal
- errorsString is only meant as a way to get the errors in script
+ errorString is only meant as a way to get the errors in script
*/
-QString QDeclarativeComponent::errorsString() const
+QString QDeclarativeComponent::errorString() const
{
Q_D(const QDeclarativeComponent);
QString ret;
@@ -595,17 +545,24 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q
}
/*!
- \qmlmethod object Component::createObject()
+ \qmlmethod object Component::createObject(parent)
Returns an object instance from this component, or null if object creation fails.
- The object will be created in the same context as the component was created in.
+ The object will be created in the same context as the one in which the component
+ was created.
+
+ Note that if the returned object is to be displayed, its \c parent must be set to
+ an existing item in a scene, or else the object will not be visible.
*/
/*!
\internal
A version of create which returns a scriptObject, for use in script
+
+ Sets graphics object parent because forgetting to do this is a frequent
+ and serious problem.
*/
-QScriptValue QDeclarativeComponent::createObject()
+QScriptValue QDeclarativeComponent::createObject(QObject* parent)
{
Q_D(QDeclarativeComponent);
QDeclarativeContext* ctxt = creationContext();
@@ -614,6 +571,20 @@ QScriptValue QDeclarativeComponent::createObject()
QObject* ret = create(ctxt);
if (!ret)
return QScriptValue(QScriptValue::NullValue);
+
+ QGraphicsObject* gobj = qobject_cast<QGraphicsObject*>(ret);
+ bool needParent = (gobj != 0);
+ if(parent){
+ ret->setParent(parent);
+ QGraphicsObject* gparent = qobject_cast<QGraphicsObject*>(parent);
+ if(gparent){
+ gobj->setParentItem(gparent);
+ needParent = false;
+ }
+ }
+ if(needParent)
+ qWarning("QDeclarativeComponent: Created graphical object was not placed in the graphics scene.");
+
QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(d->engine);
QDeclarativeData::get(ret, true)->setImplicitDestructible();
return priv->objectClass->newQObject(ret, QMetaType::QObjectStar);
@@ -754,6 +725,7 @@ QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *ctxt, QDe
state->bindValues = enginePriv->bindValues;
state->parserStatus = enginePriv->parserStatus;
+ state->finalizedParserStatus = enginePriv->finalizedParserStatus;
state->componentAttached = enginePriv->componentAttached;
if (state->componentAttached)
state->componentAttached->prev = &state->componentAttached;
@@ -761,6 +733,7 @@ QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *ctxt, QDe
enginePriv->componentAttached = 0;
enginePriv->bindValues.clear();
enginePriv->parserStatus.clear();
+ enginePriv->finalizedParserStatus.clear();
state->completePending = true;
enginePriv->inProgressCreations++;
}
@@ -785,6 +758,7 @@ void QDeclarativeComponentPrivate::beginDeferred(QDeclarativeEnginePrivate *engi
state->bindValues = enginePriv->bindValues;
state->parserStatus = enginePriv->parserStatus;
+ state->finalizedParserStatus = enginePriv->finalizedParserStatus;
state->componentAttached = enginePriv->componentAttached;
if (state->componentAttached)
state->componentAttached->prev = &state->componentAttached;
@@ -792,6 +766,7 @@ void QDeclarativeComponentPrivate::beginDeferred(QDeclarativeEnginePrivate *engi
enginePriv->componentAttached = 0;
enginePriv->bindValues.clear();
enginePriv->parserStatus.clear();
+ enginePriv->finalizedParserStatus.clear();
state->completePending = true;
enginePriv->inProgressCreations++;
}
@@ -826,6 +801,16 @@ void QDeclarativeComponentPrivate::complete(QDeclarativeEnginePrivate *enginePri
QDeclarativeEnginePrivate::clear(ps);
}
+ for (int ii = 0; ii < state->finalizedParserStatus.count(); ++ii) {
+ QPair<QDeclarativeGuard<QObject>, int> status = state->finalizedParserStatus.at(ii);
+ QObject *obj = status.first;
+ if (obj) {
+ void *args[] = { 0 };
+ QMetaObject::metacall(obj, QMetaObject::InvokeMetaMethod,
+ status.second, args);
+ }
+ }
+
while (state->componentAttached) {
QDeclarativeComponentAttached *a = state->componentAttached;
a->rem();
@@ -838,6 +823,7 @@ void QDeclarativeComponentPrivate::complete(QDeclarativeEnginePrivate *enginePri
state->bindValues.clear();
state->parserStatus.clear();
+ state->finalizedParserStatus.clear();
state->completePending = false;
enginePriv->inProgressCreations--;
diff --git a/src/declarative/qml/qdeclarativecomponent.h b/src/declarative/qml/qdeclarativecomponent.h
index f3cfe3c..1d1fca7 100644
--- a/src/declarative/qml/qdeclarativecomponent.h
+++ b/src/declarative/qml/qdeclarativecomponent.h
@@ -64,10 +64,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeComponent : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDeclarativeComponent)
- Q_PROPERTY(bool isNull READ isNull NOTIFY statusChanged)
- Q_PROPERTY(bool isReady READ isReady NOTIFY statusChanged)
- Q_PROPERTY(bool isError READ isError NOTIFY statusChanged)
- Q_PROPERTY(bool isLoading READ isLoading NOTIFY statusChanged)
+
Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
Q_PROPERTY(Status status READ status NOTIFY statusChanged)
Q_PROPERTY(QUrl url READ url CONSTANT)
@@ -89,7 +86,7 @@ public:
bool isLoading() const;
QList<QDeclarativeError> errors() const;
- Q_INVOKABLE QString errorsString() const;
+ Q_INVOKABLE QString errorString() const;
qreal progress() const;
@@ -112,7 +109,7 @@ Q_SIGNALS:
protected:
QDeclarativeComponent(QDeclarativeComponentPrivate &dd, QObject* parent);
- Q_INVOKABLE QScriptValue createObject();
+ Q_INVOKABLE QScriptValue createObject(QObject* parent);
private:
QDeclarativeComponent(QDeclarativeEngine *, QDeclarativeCompiledData *, int, int, QObject *parent);
diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h
index 24e5386..2a7d633 100644
--- a/src/declarative/qml/qdeclarativecomponent_p.h
+++ b/src/declarative/qml/qdeclarativecomponent_p.h
@@ -102,6 +102,7 @@ public:
ConstructionState() : componentAttached(0), completePending(false) {}
QList<QDeclarativeEnginePrivate::SimpleList<QDeclarativeAbstractBinding> > bindValues;
QList<QDeclarativeEnginePrivate::SimpleList<QDeclarativeParserStatus> > parserStatus;
+ QList<QPair<QDeclarativeGuard<QObject>, int> > finalizedParserStatus;
QDeclarativeComponentAttached *componentAttached;
QList<QDeclarativeError> errors;
bool completePending;
@@ -149,7 +150,7 @@ Q_SIGNALS:
void destruction();
private:
- friend class QDeclarativeContextData;;
+ friend class QDeclarativeContextData;
friend class QDeclarativeComponentPrivate;
};
diff --git a/src/declarative/qml/qdeclarativecompositetypedata_p.h b/src/declarative/qml/qdeclarativecompositetypedata_p.h
index 47cb3b3..a0e4cc2 100644
--- a/src/declarative/qml/qdeclarativecompositetypedata_p.h
+++ b/src/declarative/qml/qdeclarativecompositetypedata_p.h
@@ -83,7 +83,7 @@ public:
QList<QDeclarativeError> errors;
- QDeclarativeEnginePrivate::Imports imports;
+ QDeclarativeImports imports;
QList<QDeclarativeCompositeTypeData *> dependants;
diff --git a/src/declarative/qml/qdeclarativecompositetypemanager.cpp b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
index 0eb7e1b..e4405f7 100644
--- a/src/declarative/qml/qdeclarativecompositetypemanager.cpp
+++ b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
@@ -338,7 +338,7 @@ void QDeclarativeCompositeTypeManager::resourceReplyFinished()
// WARNING, there is a copy of this function in qdeclarativeengine.cpp
static QString toLocalFileOrQrc(const QUrl& url)
{
- if (url.scheme() == QLatin1String("qrc")) {
+ if (url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive) == 0) {
if (url.authority().isEmpty())
return QLatin1Char(':') + url.path();
return QString();
@@ -360,7 +360,10 @@ void QDeclarativeCompositeTypeManager::loadResource(QDeclarativeCompositeTypeRes
} else {
resource->status = QDeclarativeCompositeTypeResource::Error;
}
+ } else if (url.scheme().isEmpty()) {
+ // We can't open this, so just declare as an error
+ resource->status = QDeclarativeCompositeTypeResource::Error;
} else {
QNetworkReply *reply =
@@ -382,27 +385,29 @@ void QDeclarativeCompositeTypeManager::loadSource(QDeclarativeCompositeTypeData
if (file.open(QFile::ReadOnly)) {
QByteArray data = file.readAll();
setData(unit, data, url);
- } else {
- QString errorDescription;
- // ### - Fill in error
- errorDescription = QLatin1String("File error for URL ") + url.toString();
- unit->status = QDeclarativeCompositeTypeData::Error;
- // ### FIXME
- QDeclarativeError error;
- error.setDescription(errorDescription);
- unit->errorType = QDeclarativeCompositeTypeData::AccessError;
- unit->errors << error;
- doComplete(unit);
+ return; // success
}
-
- } else {
+ } else if (!url.scheme().isEmpty()) {
QNetworkReply *reply =
engine->networkAccessManager()->get(QNetworkRequest(url));
QObject::connect(reply, SIGNAL(finished()),
this, SLOT(replyFinished()));
QObject::connect(reply, SIGNAL(downloadProgress(qint64,qint64)),
this, SLOT(requestProgress(qint64,qint64)));
+ return; // waiting
}
+
+ // error happened
+ QString errorDescription;
+ // ### - Fill in error
+ errorDescription = QLatin1String("File error for URL ") + url.toString();
+ unit->status = QDeclarativeCompositeTypeData::Error;
+ // ### FIXME
+ QDeclarativeError error;
+ error.setDescription(errorDescription);
+ unit->errorType = QDeclarativeCompositeTypeData::AccessError;
+ unit->errors << error;
+ doComplete(unit);
}
void QDeclarativeCompositeTypeManager::requestProgress(qint64 received, qint64 total)
@@ -509,7 +514,9 @@ void QDeclarativeCompositeTypeManager::checkComplete(QDeclarativeCompositeTypeDa
unit->errors = u->errors;
doComplete(unit);
return;
- } else if (u->status == QDeclarativeCompositeTypeData::Waiting) {
+ } else if (u->status == QDeclarativeCompositeTypeData::Waiting
+ || u->status == QDeclarativeCompositeTypeData::WaitingResources)
+ {
waiting++;
}
}
@@ -525,16 +532,15 @@ void QDeclarativeCompositeTypeManager::checkComplete(QDeclarativeCompositeTypeDa
int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData *unit)
{
// not called until all resources are loaded (they include import URLs)
-
int waiting = 0;
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+ QDeclarativeImportDatabase &importDatabase = ep->importDatabase;
- /*
- For local urls, add an implicit import "." as first (most overridden) lookup. This will also trigger
- the loading of the qmldir and the import of any native types from available plugins.
- */
+ // For local urls, add an implicit import "." as first (most overridden) lookup.
+ // This will also trigger the loading of the qmldir and the import of any native
+ // types from available plugins.
{
-
QDeclarativeDirComponents qmldircomponentsnetwork;
if (QDeclarativeCompositeTypeResource *resource
= resources.value(unit->imports.baseUrl().resolved(QUrl(QLatin1String("./qmldir"))))) {
@@ -544,14 +550,9 @@ int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData
qmldircomponentsnetwork = parser.components();
}
- QDeclarativeEnginePrivate::get(engine)->
- addToImport(&unit->imports,
- qmldircomponentsnetwork,
- QLatin1String("."),
- QString(),
- -1, -1,
- QDeclarativeScriptParser::Import::File,
- 0); // error ignored (just means no fallback)
+ importDatabase.addToImport(&unit->imports, qmldircomponentsnetwork, QLatin1String("."),
+ QString(), -1, -1, QDeclarativeScriptParser::Import::File,
+ 0); // error ignored (just means no fallback)
}
@@ -588,9 +589,8 @@ int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData
}
QString errorString;
- if (!QDeclarativeEnginePrivate::get(engine)->
- addToImport(&unit->imports, qmldircomponentsnetwork, imp.uri, imp.qualifier, vmaj, vmin, imp.type, &errorString))
- {
+ if (!importDatabase.addToImport(&unit->imports, qmldircomponentsnetwork, imp.uri, imp.qualifier,
+ vmaj, vmin, imp.type, &errorString)) {
QDeclarativeError error;
error.setUrl(unit->imports.baseUrl());
error.setDescription(errorString);
@@ -616,11 +616,10 @@ int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData
QUrl url;
int majorVersion;
int minorVersion;
- QDeclarativeEnginePrivate::ImportedNamespace *typeNamespace = 0;
+ QDeclarativeImportedNamespace *typeNamespace = 0;
QString errorString;
- if (!QDeclarativeEnginePrivate::get(engine)->resolveType(unit->imports, typeName, &ref.type, &url, &majorVersion, &minorVersion, &typeNamespace, &errorString)
- || typeNamespace)
- {
+ if (!importDatabase.resolveType(unit->imports, typeName, &ref.type, &url, &majorVersion, &minorVersion,
+ &typeNamespace, &errorString) || typeNamespace) {
// Known to not be a type:
// - known to be a namespace (Namespace {})
// - type with unknown namespace (UnknownNamespace.SomeType {})
@@ -724,8 +723,10 @@ void QDeclarativeCompositeTypeManager::compile(QDeclarativeCompositeTypeData *un
}
}
- QUrl importUrl = unit->imports.baseUrl().resolved(QUrl(QLatin1String("qmldir")));
- if (toLocalFileOrQrc(importUrl).isEmpty())
+ QUrl importUrl;
+ if (!unit->imports.baseUrl().scheme().isEmpty())
+ importUrl = unit->imports.baseUrl().resolved(QUrl(QLatin1String("qmldir")));
+ if (!importUrl.scheme().isEmpty() && toLocalFileOrQrc(importUrl).isEmpty())
resourceList.prepend(importUrl);
for (int ii = 0; ii < resourceList.count(); ++ii) {
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index ae4223e..6a13f15 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -528,13 +528,8 @@ void QDeclarativeContextData::invalidate()
parent = 0;
}
-void QDeclarativeContextData::destroy()
+void QDeclarativeContextData::clearExpressions()
{
- if (linkedContext)
- linkedContext->destroy();
-
- if (engine) invalidate();
-
QDeclarativeAbstractExpression *expression = expressions;
while (expression) {
QDeclarativeAbstractExpression *nextExpression = expression->m_nextExpression;
@@ -546,6 +541,16 @@ void QDeclarativeContextData::destroy()
expression = nextExpression;
}
expressions = 0;
+}
+
+void QDeclarativeContextData::destroy()
+{
+ if (linkedContext)
+ linkedContext->destroy();
+
+ if (engine) invalidate();
+
+ clearExpressions();
while (contextObjects) {
QDeclarativeData *co = contextObjects;
@@ -654,7 +659,7 @@ void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object
if (iter == enginePriv->m_sharedScriptImports.end()) {
QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine);
- scriptContext->pushScope(enginePriv->contextClass->newContext(0, 0));
+ scriptContext->pushScope(enginePriv->contextClass->newUrlContext(url));
scriptContext->pushScope(enginePriv->globalClass->globalObject());
QScriptValue scope = scriptEngine->newObject();
@@ -680,7 +685,7 @@ void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object
QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(scriptEngine);
- scriptContext->pushScope(enginePriv->contextClass->newContext(this, 0));
+ scriptContext->pushScope(enginePriv->contextClass->newUrlContext(this, 0, url));
scriptContext->pushScope(enginePriv->globalClass->globalObject());
QScriptValue scope = scriptEngine->newObject();
diff --git a/src/declarative/qml/qdeclarativecontext.h b/src/declarative/qml/qdeclarativecontext.h
index 548869c..d87123a 100644
--- a/src/declarative/qml/qdeclarativecontext.h
+++ b/src/declarative/qml/qdeclarativecontext.h
@@ -107,7 +107,7 @@ private:
};
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QList<QObject*>);
+Q_DECLARE_METATYPE(QList<QObject*>)
QT_END_HEADER
diff --git a/src/declarative/qml/qdeclarativecontext_p.h b/src/declarative/qml/qdeclarativecontext_p.h
index c7fb099..6b6cd0a 100644
--- a/src/declarative/qml/qdeclarativecontext_p.h
+++ b/src/declarative/qml/qdeclarativecontext_p.h
@@ -113,6 +113,7 @@ class QDeclarativeContextData
public:
QDeclarativeContextData();
QDeclarativeContextData(QDeclarativeContext *);
+ void clearExpressions();
void destroy();
void invalidate();
diff --git a/src/declarative/qml/qdeclarativecontextscriptclass.cpp b/src/declarative/qml/qdeclarativecontextscriptclass.cpp
index 1336a1a..1ebedbb 100644
--- a/src/declarative/qml/qdeclarativecontextscriptclass.cpp
+++ b/src/declarative/qml/qdeclarativecontextscriptclass.cpp
@@ -51,11 +51,13 @@ QT_BEGIN_NAMESPACE
struct ContextData : public QScriptDeclarativeClass::Object {
ContextData() : overrideObject(0), isSharedContext(true) {}
- ContextData(QDeclarativeContextData *c, QObject *o) : context(c), scopeObject(o), overrideObject(0), isSharedContext(false) {}
+ ContextData(QDeclarativeContextData *c, QObject *o)
+ : context(c), scopeObject(o), overrideObject(0), isSharedContext(false), isUrlContext(false) {}
QDeclarativeGuardedContextData context;
QDeclarativeGuard<QObject> scopeObject;
QObject *overrideObject;
- bool isSharedContext;
+ bool isSharedContext:1;
+ bool isUrlContext:1;
QDeclarativeContextData *getContext(QDeclarativeEngine *engine) {
if (isSharedContext) {
@@ -74,6 +76,18 @@ struct ContextData : public QScriptDeclarativeClass::Object {
}
};
+struct UrlContextData : public ContextData {
+ UrlContextData(QDeclarativeContextData *c, QObject *o, const QString &u)
+ : ContextData(c, o), url(u) {
+ isUrlContext = true;
+ }
+ UrlContextData(const QString &u)
+ : ContextData(0, 0), url(u) {
+ isUrlContext = true;
+ }
+ QString url;
+};
+
/*
The QDeclarativeContextScriptClass handles property access for a QDeclarativeContext
via QtScript.
@@ -95,6 +109,21 @@ QScriptValue QDeclarativeContextScriptClass::newContext(QDeclarativeContextData
return newObject(scriptEngine, this, new ContextData(context, scopeObject));
}
+QScriptValue QDeclarativeContextScriptClass::newUrlContext(QDeclarativeContextData *context, QObject *scopeObject,
+ const QString &url)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ return newObject(scriptEngine, this, new UrlContextData(context, scopeObject, url));
+}
+
+QScriptValue QDeclarativeContextScriptClass::newUrlContext(const QString &url)
+{
+ QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+
+ return newObject(scriptEngine, this, new UrlContextData(url));
+}
+
QScriptValue QDeclarativeContextScriptClass::newSharedContext()
{
QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
@@ -111,6 +140,19 @@ QDeclarativeContextData *QDeclarativeContextScriptClass::contextFromValue(const
return data->getContext(engine);
}
+QUrl QDeclarativeContextScriptClass::urlFromValue(const QScriptValue &v)
+{
+ if (scriptClass(v) != this)
+ return QUrl();
+
+ ContextData *data = (ContextData *)object(v);
+ if (data->isUrlContext) {
+ return QUrl(static_cast<UrlContextData *>(data)->url);
+ } else {
+ return QUrl();
+ }
+}
+
QObject *QDeclarativeContextScriptClass::setOverrideObject(QScriptValue &v, QObject *override)
{
if (scriptClass(v) != this)
diff --git a/src/declarative/qml/qdeclarativecontextscriptclass_p.h b/src/declarative/qml/qdeclarativecontextscriptclass_p.h
index 1936d38..1215b00 100644
--- a/src/declarative/qml/qdeclarativecontextscriptclass_p.h
+++ b/src/declarative/qml/qdeclarativecontextscriptclass_p.h
@@ -68,9 +68,13 @@ public:
~QDeclarativeContextScriptClass();
QScriptValue newContext(QDeclarativeContextData *, QObject * = 0);
+ QScriptValue newUrlContext(QDeclarativeContextData *, QObject *, const QString &);
+ QScriptValue newUrlContext(const QString &);
QScriptValue newSharedContext();
QDeclarativeContextData *contextFromValue(const QScriptValue &);
+ QUrl urlFromValue(const QScriptValue &);
+
QObject *setOverrideObject(QScriptValue &, QObject *);
protected:
diff --git a/src/declarative/qml/qdeclarativedata_p.h b/src/declarative/qml/qdeclarativedata_p.h
index 4a56536..e916273 100644
--- a/src/declarative/qml/qdeclarativedata_p.h
+++ b/src/declarative/qml/qdeclarativedata_p.h
@@ -152,11 +152,11 @@ public:
template<class T>
void QDeclarativeGuard<T>::addGuard()
{
- if (QObjectPrivate::get(o)->wasDeleted) {
- if (prev) remGuard();
+ Q_ASSERT(!prev);
+
+ if (QObjectPrivate::get(o)->wasDeleted)
return;
- }
-
+
QDeclarativeData *data = QDeclarativeData::get(o, true);
next = data->guards;
if (next) reinterpret_cast<QDeclarativeGuard<T> *>(next)->prev = &next;
@@ -167,6 +167,8 @@ void QDeclarativeGuard<T>::addGuard()
template<class T>
void QDeclarativeGuard<T>::remGuard()
{
+ Q_ASSERT(prev);
+
if (next) reinterpret_cast<QDeclarativeGuard<T> *>(next)->prev = prev;
*prev = next;
next = 0;
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 0ee6dfe..0a75532 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -67,6 +67,7 @@
#include "qdeclarativeextensioninterface.h"
#include "private/qdeclarativelist_p.h"
#include "private/qdeclarativetypenamecache_p.h"
+#include "private/qdeclarativeinclude_p.h"
#include <QtCore/qmetaobject.h>
#include <QScriptClass>
@@ -82,6 +83,7 @@
#include <QStack>
#include <QMap>
#include <QPluginLoader>
+#include <QtGui/qfontdatabase.h>
#include <QtCore/qlibraryinfo.h>
#include <QtCore/qthreadstorage.h>
#include <QtCore/qthread.h>
@@ -111,9 +113,6 @@ Q_DECLARE_METATYPE(QDeclarativeProperty)
QT_BEGIN_NAMESPACE
-DEFINE_BOOL_CONFIG_OPTION(qmlImportTrace, QML_IMPORT_TRACE)
-DEFINE_BOOL_CONFIG_OPTION(qmlCheckTypes, QML_CHECK_TYPES)
-
/*!
\qmlclass QtObject QObject
\since 4.7
@@ -158,7 +157,7 @@ QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e)
objectClass(0), valueTypeClass(0), globalClass(0), cleanup(0), erroredBindings(0),
inProgressCreations(0), scriptEngine(this), workerScriptEngine(0), componentAttached(0),
inBeginCreate(false), networkAccessManager(0), networkAccessManagerFactory(0),
- typeManager(e), uniqueId(1)
+ typeManager(e), importDatabase(e), uniqueId(1)
{
if (!qt_QmlQtModule_registered) {
qt_QmlQtModule_registered = true;
@@ -168,27 +167,6 @@ QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e)
QDeclarativeValueTypeFactory::registerValueTypes();
}
globalClass = new QDeclarativeGlobalScriptClass(&scriptEngine);
-
- // env import paths
- QByteArray envImportPath = qgetenv("QML_IMPORT_PATH");
- if (!envImportPath.isEmpty()) {
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
- QLatin1Char pathSep(';');
-#else
- QLatin1Char pathSep(':');
-#endif
- foreach (const QString &path, QString::fromLatin1(envImportPath).split(pathSep, QString::SkipEmptyParts)) {
- QString canonicalPath = QDir(path).canonicalPath();
- if (!canonicalPath.isEmpty() && !fileImportPath.contains(canonicalPath))
- fileImportPath.append(canonicalPath);
- }
- }
- QString builtinPath = QLibraryInfo::location(QLibraryInfo::ImportsPath);
- if (!builtinPath.isEmpty())
- fileImportPath += builtinPath;
-
- filePluginPath += QLatin1String(".");
-
}
QUrl QDeclarativeScriptEngine::resolvedUrl(QScriptContext *context, const QUrl& url)
@@ -227,6 +205,11 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr
// XXX used to add Qt.Sound class.
//types
+ if (mainthread)
+ qtObject.setProperty(QLatin1String("include"), newFunction(QDeclarativeInclude::include, 2));
+ else
+ qtObject.setProperty(QLatin1String("include"), newFunction(QDeclarativeInclude::worker_include, 2));
+
qtObject.setProperty(QLatin1String("isQtObject"), newFunction(QDeclarativeEnginePrivate::isQtObject, 1));
qtObject.setProperty(QLatin1String("rgba"), newFunction(QDeclarativeEnginePrivate::rgba, 4));
qtObject.setProperty(QLatin1String("hsla"), newFunction(QDeclarativeEnginePrivate::hsla, 4));
@@ -249,6 +232,7 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr
//misc methods
qtObject.setProperty(QLatin1String("openUrlExternally"),newFunction(QDeclarativeEnginePrivate::desktopOpenUrl, 1));
+ qtObject.setProperty(QLatin1String("fontFamilies"),newFunction(QDeclarativeEnginePrivate::fontFamilies, 0));
qtObject.setProperty(QLatin1String("md5"),newFunction(QDeclarativeEnginePrivate::md5, 1));
qtObject.setProperty(QLatin1String("btoa"),newFunction(QDeclarativeEnginePrivate::btoa, 1));
qtObject.setProperty(QLatin1String("atob"),newFunction(QDeclarativeEnginePrivate::atob, 1));
@@ -345,17 +329,17 @@ void QDeclarativeEnginePrivate::clear(SimpleList<QDeclarativeParserStatus> &pss)
}
Q_GLOBAL_STATIC(QDeclarativeEngineDebugServer, qmlEngineDebugServer);
-typedef QMap<QString, QString> StringStringMap;
-Q_GLOBAL_STATIC(StringStringMap, qmlEnginePluginsWithRegisteredTypes); // stores the uri
-
void QDeclarativePrivate::qdeclarativeelement_destructor(QObject *o)
{
QObjectPrivate *p = QObjectPrivate::get(o);
- Q_ASSERT(p->declarativeData);
- QDeclarativeData *d = static_cast<QDeclarativeData*>(p->declarativeData);
- if (d->ownContext)
- d->context->destroy();
+ if (p->declarativeData) {
+ QDeclarativeData *d = static_cast<QDeclarativeData*>(p->declarativeData);
+ if (d->ownContext && d->context) {
+ d->context->destroy();
+ d->context = 0;
+ }
+ }
}
void QDeclarativeData::destroyed(QAbstractDeclarativeData *d, QObject *o)
@@ -374,6 +358,7 @@ void QDeclarativeEnginePrivate::init()
qRegisterMetaType<QVariant>("QVariant");
qRegisterMetaType<QDeclarativeScriptString>("QDeclarativeScriptString");
qRegisterMetaType<QScriptValue>("QScriptValue");
+ qRegisterMetaType<QDeclarativeComponent::Status>("QDeclarativeComponent::Status");
QDeclarativeData::init();
@@ -456,7 +441,11 @@ QDeclarativeEngine::~QDeclarativeEngine()
}
/*! \fn void QDeclarativeEngine::quit()
- This signal is emitted when the QDeclarativeEngine quits.
+ This signal is emitted when the QDeclarativeEngine quits.
+ */
+
+/*! \fn void QDeclarativeEngine::warnings(const QList<QDeclarativeError> &warnings)
+ This signal is emitted when \a warnings messages are generated by QML.
*/
/*!
@@ -573,9 +562,9 @@ QNetworkAccessManager *QDeclarativeEngine::networkAccessManager() const
This example creates a provider with id \e colors:
- \snippet examples/declarative/imageprovider/imageprovider.cpp 0
+ \snippet examples/declarative/cppextensions/imageprovider/imageprovider.cpp 0
- \snippet examples/declarative/imageprovider/imageprovider-example.qml 0
+ \snippet examples/declarative/cppextensions/imageprovider/imageprovider-example.qml 0
\sa removeImageProvider()
*/
@@ -892,14 +881,10 @@ void QDeclarativeData::destroyed(QObject *object)
if (ownContext && context)
context->destroy();
- QDeclarativeGuard<QObject> *guard = guards;
- while (guard) {
- QDeclarativeGuard<QObject> *g = guard;
- guard = guard->next;
- g->o = 0;
- g->prev = 0;
- g->next = 0;
- g->objectDestroyed(object);
+ while (guards) {
+ QDeclarativeGuard<QObject> *guard = guards;
+ *guard = (QObject *)0;
+ guard->objectDestroyed(object);
}
if (scriptValue)
@@ -986,7 +971,7 @@ QScriptValue QDeclarativeEnginePrivate::createComponent(QScriptContext *ctxt, QS
Q_ASSERT(context);
if(ctxt->argumentCount() != 1) {
- return ctxt->throwError("Qt.createComponent(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.createComponent(): Invalid arguments"));
}else{
QString arg = ctxt->argument(0).toString();
if (arg.isEmpty())
@@ -1006,7 +991,7 @@ QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QS
QDeclarativeEngine* activeEngine = activeEnginePriv->q_func();
if(ctxt->argumentCount() < 2 || ctxt->argumentCount() > 3)
- return ctxt->throwError("Qt.createQmlObject(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.createQmlObject(): Invalid arguments"));
QDeclarativeContextData* context = activeEnginePriv->getContext(ctxt);
Q_ASSERT(context);
@@ -1026,7 +1011,7 @@ QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QS
QObject *parentArg = activeEnginePriv->objectClass->toQObject(ctxt->argument(1));
if(!parentArg)
- return ctxt->throwError("Qt.createQmlObject(): Missing parent object");
+ return ctxt->throwError(QLatin1String("Qt.createQmlObject(): Missing parent object"));
QDeclarativeComponent component(activeEngine);
component.setData(qml.toUtf8(), url);
@@ -1039,21 +1024,24 @@ QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QS
foreach (const QDeclarativeError &error, errors){
errstr += QLatin1String(" ") + error.toString() + QLatin1String("\n");
QScriptValue qmlErrObject = ctxt->engine()->newObject();
- qmlErrObject.setProperty("lineNumber", QScriptValue(error.line()));
- qmlErrObject.setProperty("columnNumber", QScriptValue(error.column()));
- qmlErrObject.setProperty("fileName", QScriptValue(error.url().toString()));
- qmlErrObject.setProperty("message", QScriptValue(error.description()));
+ qmlErrObject.setProperty(QLatin1String("lineNumber"), QScriptValue(error.line()));
+ qmlErrObject.setProperty(QLatin1String("columnNumber"), QScriptValue(error.column()));
+ qmlErrObject.setProperty(QLatin1String("fileName"), QScriptValue(error.url().toString()));
+ qmlErrObject.setProperty(QLatin1String("message"), QScriptValue(error.description()));
arr.setProperty(i++, qmlErrObject);
}
QScriptValue err = ctxt->throwError(errstr);
- err.setProperty("qmlErrors",arr);
+ err.setProperty(QLatin1String("qmlErrors"),arr);
return err;
}
if (!component.isReady())
- return ctxt->throwError("Qt.createQmlObject(): Component is not ready");
+ return ctxt->throwError(QLatin1String("Qt.createQmlObject(): Component is not ready"));
- QObject *obj = component.create(context->asQDeclarativeContext());
+ QObject *obj = component.beginCreate(context->asQDeclarativeContext());
+ if(obj)
+ QDeclarativeData::get(obj, true)->setImplicitDestructible();
+ component.completeCreate();
if(component.isError()) {
QList<QDeclarativeError> errors = component.errors();
@@ -1063,14 +1051,14 @@ QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QS
foreach (const QDeclarativeError &error, errors){
errstr += QLatin1String(" ") + error.toString() + QLatin1String("\n");
QScriptValue qmlErrObject = ctxt->engine()->newObject();
- qmlErrObject.setProperty("lineNumber", QScriptValue(error.line()));
- qmlErrObject.setProperty("columnNumber", QScriptValue(error.column()));
- qmlErrObject.setProperty("fileName", QScriptValue(error.url().toString()));
- qmlErrObject.setProperty("message", QScriptValue(error.description()));
+ qmlErrObject.setProperty(QLatin1String("lineNumber"), QScriptValue(error.line()));
+ qmlErrObject.setProperty(QLatin1String("columnNumber"), QScriptValue(error.column()));
+ qmlErrObject.setProperty(QLatin1String("fileName"), QScriptValue(error.url().toString()));
+ qmlErrObject.setProperty(QLatin1String("message"), QScriptValue(error.description()));
arr.setProperty(i++, qmlErrObject);
}
QScriptValue err = ctxt->throwError(errstr);
- err.setProperty("qmlErrors",arr);
+ err.setProperty(QLatin1String("qmlErrors"),arr);
return err;
}
@@ -1097,18 +1085,18 @@ QScriptValue QDeclarativeEnginePrivate::isQtObject(QScriptContext *ctxt, QScript
QScriptValue QDeclarativeEnginePrivate::vector(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() != 3)
- return ctxt->throwError("Qt.vector(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.vector(): Invalid arguments"));
qsreal x = ctxt->argument(0).toNumber();
qsreal y = ctxt->argument(1).toNumber();
qsreal z = ctxt->argument(2).toNumber();
- return engine->newVariant(qVariantFromValue(QVector3D(x, y, z)));
+ return QDeclarativeEnginePrivate::get(engine)->scriptValueFromVariant(qVariantFromValue(QVector3D(x, y, z)));
}
QScriptValue QDeclarativeEnginePrivate::formatDate(QScriptContext*ctxt, QScriptEngine*engine)
{
int argCount = ctxt->argumentCount();
if(argCount == 0 || argCount > 2)
- return ctxt->throwError("Qt.formatDate(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.formatDate(): Invalid arguments"));
QDate date = ctxt->argument(0).toDateTime().date();
Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate;
@@ -1119,7 +1107,7 @@ QScriptValue QDeclarativeEnginePrivate::formatDate(QScriptContext*ctxt, QScriptE
} else if (ctxt->argument(1).isNumber()) {
enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32());
} else {
- return ctxt->throwError("Qt.formatDate(): Invalid date format");
+ return ctxt->throwError(QLatin1String("Qt.formatDate(): Invalid date format"));
}
}
return engine->newVariant(qVariantFromValue(date.toString(enumFormat)));
@@ -1129,7 +1117,7 @@ QScriptValue QDeclarativeEnginePrivate::formatTime(QScriptContext*ctxt, QScriptE
{
int argCount = ctxt->argumentCount();
if(argCount == 0 || argCount > 2)
- return ctxt->throwError("Qt.formatTime(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.formatTime(): Invalid arguments"));
QTime date = ctxt->argument(0).toDateTime().time();
Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate;
@@ -1140,7 +1128,7 @@ QScriptValue QDeclarativeEnginePrivate::formatTime(QScriptContext*ctxt, QScriptE
} else if (ctxt->argument(1).isNumber()) {
enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32());
} else {
- return ctxt->throwError("Qt.formatTime(): Invalid time format");
+ return ctxt->throwError(QLatin1String("Qt.formatTime(): Invalid time format"));
}
}
return engine->newVariant(qVariantFromValue(date.toString(enumFormat)));
@@ -1150,7 +1138,7 @@ QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScr
{
int argCount = ctxt->argumentCount();
if(argCount == 0 || argCount > 2)
- return ctxt->throwError("Qt.formatDateTime(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.formatDateTime(): Invalid arguments"));
QDateTime date = ctxt->argument(0).toDateTime();
Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate;
@@ -1161,7 +1149,7 @@ QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScr
} else if (ctxt->argument(1).isNumber()) {
enumFormat = Qt::DateFormat(ctxt->argument(1).toUInt32());
} else {
- return ctxt->throwError("Qt.formatDateTime(): Invalid datetime format");
+ return ctxt->throwError(QLatin1String("Qt.formatDateTime(): Invalid datetime format"));
}
}
return engine->newVariant(qVariantFromValue(date.toString(enumFormat)));
@@ -1171,7 +1159,7 @@ QScriptValue QDeclarativeEnginePrivate::rgba(QScriptContext *ctxt, QScriptEngine
{
int argCount = ctxt->argumentCount();
if(argCount < 3 || argCount > 4)
- return ctxt->throwError("Qt.rgba(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.rgba(): Invalid arguments"));
qsreal r = ctxt->argument(0).toNumber();
qsreal g = ctxt->argument(1).toNumber();
qsreal b = ctxt->argument(2).toNumber();
@@ -1193,7 +1181,7 @@ QScriptValue QDeclarativeEnginePrivate::hsla(QScriptContext *ctxt, QScriptEngine
{
int argCount = ctxt->argumentCount();
if(argCount < 3 || argCount > 4)
- return ctxt->throwError("Qt.hsla(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.hsla(): Invalid arguments"));
qsreal h = ctxt->argument(0).toNumber();
qsreal s = ctxt->argument(1).toNumber();
qsreal l = ctxt->argument(2).toNumber();
@@ -1214,7 +1202,7 @@ QScriptValue QDeclarativeEnginePrivate::hsla(QScriptContext *ctxt, QScriptEngine
QScriptValue QDeclarativeEnginePrivate::rect(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() != 4)
- return ctxt->throwError("Qt.rect(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.rect(): Invalid arguments"));
qsreal x = ctxt->argument(0).toNumber();
qsreal y = ctxt->argument(1).toNumber();
@@ -1224,31 +1212,31 @@ QScriptValue QDeclarativeEnginePrivate::rect(QScriptContext *ctxt, QScriptEngine
if (w < 0 || h < 0)
return engine->nullValue();
- return qScriptValueFromValue(engine, qVariantFromValue(QRectF(x, y, w, h)));
+ return QDeclarativeEnginePrivate::get(engine)->scriptValueFromVariant(qVariantFromValue(QRectF(x, y, w, h)));
}
QScriptValue QDeclarativeEnginePrivate::point(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() != 2)
- return ctxt->throwError("Qt.point(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.point(): Invalid arguments"));
qsreal x = ctxt->argument(0).toNumber();
qsreal y = ctxt->argument(1).toNumber();
- return qScriptValueFromValue(engine, qVariantFromValue(QPointF(x, y)));
+ return QDeclarativeEnginePrivate::get(engine)->scriptValueFromVariant(qVariantFromValue(QPointF(x, y)));
}
QScriptValue QDeclarativeEnginePrivate::size(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() != 2)
- return ctxt->throwError("Qt.size(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.size(): Invalid arguments"));
qsreal w = ctxt->argument(0).toNumber();
qsreal h = ctxt->argument(1).toNumber();
- return qScriptValueFromValue(engine, qVariantFromValue(QSizeF(w, h)));
+ return QDeclarativeEnginePrivate::get(engine)->scriptValueFromVariant(qVariantFromValue(QSizeF(w, h)));
}
QScriptValue QDeclarativeEnginePrivate::lighter(QScriptContext *ctxt, QScriptEngine *engine)
{
- if(ctxt->argumentCount() != 1)
- return ctxt->throwError("Qt.lighter(): Invalid arguments");
+ if(ctxt->argumentCount() != 1 && ctxt->argumentCount() != 2)
+ return ctxt->throwError(QLatin1String("Qt.lighter(): Invalid arguments"));
QVariant v = ctxt->argument(0).toVariant();
QColor color;
if (v.userType() == QVariant::Color)
@@ -1260,14 +1248,17 @@ QScriptValue QDeclarativeEnginePrivate::lighter(QScriptContext *ctxt, QScriptEng
return engine->nullValue();
} else
return engine->nullValue();
- color = color.lighter();
+ qsreal factor = 1.5;
+ if (ctxt->argumentCount() == 2)
+ factor = ctxt->argument(1).toNumber();
+ color = color.lighter(int(qRound(factor*100.)));
return qScriptValueFromValue(engine, qVariantFromValue(color));
}
QScriptValue QDeclarativeEnginePrivate::darker(QScriptContext *ctxt, QScriptEngine *engine)
{
- if(ctxt->argumentCount() != 1)
- return ctxt->throwError("Qt.darker(): Invalid arguments");
+ if(ctxt->argumentCount() != 1 && ctxt->argumentCount() != 2)
+ return ctxt->throwError(QLatin1String("Qt.darker(): Invalid arguments"));
QVariant v = ctxt->argument(0).toVariant();
QColor color;
if (v.userType() == QVariant::Color)
@@ -1279,7 +1270,10 @@ QScriptValue QDeclarativeEnginePrivate::darker(QScriptContext *ctxt, QScriptEngi
return engine->nullValue();
} else
return engine->nullValue();
- color = color.darker();
+ qsreal factor = 2.0;
+ if (ctxt->argumentCount() == 2)
+ factor = ctxt->argument(1).toNumber();
+ color = color.darker(int(qRound(factor*100.)));
return qScriptValueFromValue(engine, qVariantFromValue(color));
}
@@ -1294,10 +1288,20 @@ QScriptValue QDeclarativeEnginePrivate::desktopOpenUrl(QScriptContext *ctxt, QSc
return QScriptValue(e, ret);
}
+QScriptValue QDeclarativeEnginePrivate::fontFamilies(QScriptContext *ctxt, QScriptEngine *e)
+{
+ if(ctxt->argumentCount() != 0)
+ return ctxt->throwError(QLatin1String("Qt.fontFamilies(): Invalid arguments"));
+
+ QDeclarativeEnginePrivate *p = QDeclarativeEnginePrivate::get(e);
+ QFontDatabase database;
+ return p->scriptValueFromVariant(database.families());
+}
+
QScriptValue QDeclarativeEnginePrivate::md5(QScriptContext *ctxt, QScriptEngine *)
{
if (ctxt->argumentCount() != 1)
- return ctxt->throwError("Qt.md5(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.md5(): Invalid arguments"));
QByteArray data = ctxt->argument(0).toString().toUtf8();
QByteArray result = QCryptographicHash::hash(data, QCryptographicHash::Md5);
@@ -1308,7 +1312,7 @@ QScriptValue QDeclarativeEnginePrivate::md5(QScriptContext *ctxt, QScriptEngine
QScriptValue QDeclarativeEnginePrivate::btoa(QScriptContext *ctxt, QScriptEngine *)
{
if (ctxt->argumentCount() != 1)
- return ctxt->throwError("Qt.btoa(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.btoa(): Invalid arguments"));
QByteArray data = ctxt->argument(0).toString().toUtf8();
@@ -1318,7 +1322,7 @@ QScriptValue QDeclarativeEnginePrivate::btoa(QScriptContext *ctxt, QScriptEngine
QScriptValue QDeclarativeEnginePrivate::atob(QScriptContext *ctxt, QScriptEngine *)
{
if (ctxt->argumentCount() != 1)
- return ctxt->throwError("Qt.atob(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.atob(): Invalid arguments"));
QByteArray data = ctxt->argument(0).toString().toUtf8();
@@ -1419,7 +1423,7 @@ QScriptValue QDeclarativeEnginePrivate::quit(QScriptContext * /*ctxt*/, QScriptE
QScriptValue QDeclarativeEnginePrivate::tint(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() != 2)
- return ctxt->throwError("Qt.tint(): Invalid arguments");
+ return ctxt->throwError(QLatin1String("Qt.tint(): Invalid arguments"));
//get color
QVariant v = ctxt->argument(0).toVariant();
QColor color;
@@ -1522,516 +1526,6 @@ QVariant QDeclarativeEnginePrivate::scriptValueToVariant(const QScriptValue &val
return val.toVariant();
}
-// XXX this beyonds in QUrl::toLocalFile()
-// WARNING, there is a copy of this function in qdeclarativecompositetypemanager.cpp
-static QString toLocalFileOrQrc(const QUrl& url)
-{
- if (url.scheme() == QLatin1String("qrc")) {
- if (url.authority().isEmpty())
- return QLatin1Char(':') + url.path();
- return QString();
- }
- return url.toLocalFile();
-}
-
-/////////////////////////////////////////////////////////////
-struct QDeclarativeEnginePrivate::ImportedNamespace {
- QStringList uris;
- QStringList urls;
- QList<int> majversions;
- QList<int> minversions;
- QList<bool> isLibrary;
- QList<QDeclarativeDirComponents> qmlDirComponents;
-
-
- bool find_helper(int i, const QByteArray& type, int *vmajor, int *vminor,
- QDeclarativeType** type_return, QUrl* url_return,
- QUrl *base = 0, bool *typeRecursionDetected = 0)
- {
- int vmaj = majversions.at(i);
- int vmin = minversions.at(i);
-
- QByteArray qt = uris.at(i).toUtf8();
- qt += '/';
- qt += type;
-
- QDeclarativeType *t = QDeclarativeMetaType::qmlType(qt,vmaj,vmin);
- if (t) {
- if (vmajor) *vmajor = vmaj;
- if (vminor) *vminor = vmin;
- if (type_return)
- *type_return = t;
- return true;
- }
-
- QUrl url = QUrl(urls.at(i) + QLatin1Char('/') + QString::fromUtf8(type) + QLatin1String(".qml"));
- QDeclarativeDirComponents qmldircomponents = qmlDirComponents.at(i);
-
- bool typeWasDeclaredInQmldir = false;
- if (!qmldircomponents.isEmpty()) {
- const QString typeName = QString::fromUtf8(type);
- foreach (const QDeclarativeDirParser::Component &c, qmldircomponents) {
- if (c.typeName == typeName) {
- typeWasDeclaredInQmldir = true;
-
- // importing version -1 means import ALL versions
- if ((vmaj == -1) || (c.majorVersion < vmaj || (c.majorVersion == vmaj && vmin >= c.minorVersion))) {
- QUrl candidate = url.resolved(QUrl(c.fileName));
- if (c.internal && base) {
- if (base->resolved(QUrl(c.fileName)) != candidate)
- continue; // failed attempt to access an internal type
- }
- if (base && *base == candidate) {
- if (typeRecursionDetected)
- *typeRecursionDetected = true;
- continue; // no recursion
- }
- if (url_return)
- *url_return = candidate;
- return true;
- }
- }
- }
- }
-
- if (!typeWasDeclaredInQmldir && !isLibrary.at(i)) {
- // XXX search non-files too! (eg. zip files, see QT-524)
- QFileInfo f(toLocalFileOrQrc(url));
- if (f.exists()) {
- if (base && *base == url) { // no recursion
- if (typeRecursionDetected)
- *typeRecursionDetected = true;
- } else {
- if (url_return)
- *url_return = url;
- return true;
- }
- }
- }
- return false;
- }
-
- bool find(const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return,
- QUrl* url_return, QUrl *base = 0, QString *errorString = 0)
- {
- bool typeRecursionDetected = false;
- for (int i=0; i<urls.count(); ++i) {
- if (find_helper(i, type, vmajor, vminor, type_return, url_return, base, &typeRecursionDetected)) {
- if (qmlCheckTypes()) {
- // check for type clashes
- for (int j = i+1; j<urls.count(); ++j) {
- if (find_helper(j, type, vmajor, vminor, 0, 0, base)) {
- if (errorString) {
- QString u1 = urls.at(i);
- QString u2 = urls.at(j);
- if (base) {
- QString b = base->toString();
- int slash = b.lastIndexOf(QLatin1Char('/'));
- if (slash >= 0) {
- b = b.left(slash+1);
- QString l = b.left(slash);
- if (u1.startsWith(b))
- u1 = u1.mid(b.count());
- else if (u1 == l)
- u1 = QDeclarativeEngine::tr("local directory");
- if (u2.startsWith(b))
- u2 = u2.mid(b.count());
- else if (u2 == l)
- u2 = QDeclarativeEngine::tr("local directory");
- }
- }
-
- if (u1 != u2)
- *errorString
- = QDeclarativeEngine::tr("is ambiguous. Found in %1 and in %2")
- .arg(u1).arg(u2);
- else
- *errorString
- = QDeclarativeEngine::tr("is ambiguous. Found in %1 in version %2.%3 and %4.%5")
- .arg(u1)
- .arg(majversions.at(i)).arg(minversions.at(i))
- .arg(majversions.at(j)).arg(minversions.at(j));
- }
- return false;
- }
- }
- }
- return true;
- }
- }
- if (errorString) {
- if (typeRecursionDetected)
- *errorString = QDeclarativeEngine::tr("is instantiated recursively");
- else
- *errorString = QDeclarativeEngine::tr("is not a type");
- }
- return false;
- }
-};
-
-static bool greaterThan(const QString &s1, const QString &s2)
-{
- return s1 > s2;
-}
-
-class QDeclarativeImportsPrivate {
-public:
- QDeclarativeImportsPrivate() : ref(1)
- {
- }
-
- ~QDeclarativeImportsPrivate()
- {
- foreach (QDeclarativeEnginePrivate::ImportedNamespace* s, set.values())
- delete s;
- }
-
- QSet<QString> qmlDirFilesForWhichPluginsHaveBeenLoaded;
-
- bool importExtension(const QString &absoluteFilePath, const QString &uri, QDeclarativeEngine *engine, QDeclarativeDirComponents* components, QString *errorString) {
- QFile file(absoluteFilePath);
- QString filecontent;
- if (file.open(QFile::ReadOnly)) {
- filecontent = QString::fromUtf8(file.readAll());
- if (qmlImportTrace())
- qDebug() << "QDeclarativeEngine::add: loaded" << absoluteFilePath;
- } else {
- if (errorString)
- *errorString = QDeclarativeEngine::tr("module \"%1\" definition \"%2\" not readable").arg(uri).arg(absoluteFilePath);
- return false;
- }
- QDir dir = QFileInfo(file).dir();
-
- QDeclarativeDirParser qmldirParser;
- qmldirParser.setSource(filecontent);
- qmldirParser.parse();
-
- if (! qmlDirFilesForWhichPluginsHaveBeenLoaded.contains(absoluteFilePath)) {
- qmlDirFilesForWhichPluginsHaveBeenLoaded.insert(absoluteFilePath);
-
-
- foreach (const QDeclarativeDirParser::Plugin &plugin, qmldirParser.plugins()) {
-
- QString resolvedFilePath =
- QDeclarativeEnginePrivate::get(engine)
- ->resolvePlugin(dir, plugin.path,
- plugin.name);
-
- if (!resolvedFilePath.isEmpty()) {
- if (!engine->importPlugin(resolvedFilePath, uri, errorString)) {
- if (errorString)
- *errorString = QDeclarativeEngine::tr("plugin cannot be loaded for module \"%1\": %2").arg(uri).arg(*errorString);
- return false;
- }
- } else {
- if (errorString)
- *errorString = QDeclarativeEngine::tr("module \"%1\" plugin \"%2\" not found").arg(uri).arg(plugin.name);
- return false;
- }
- }
- }
-
- if (components)
- *components = qmldirParser.components();
-
- return true;
- }
-
- QString resolvedUri(const QString &dir_arg, QDeclarativeEngine *engine)
- {
- QString dir = dir_arg;
- if (dir.endsWith(QLatin1Char('/')) || dir.endsWith(QLatin1Char('\\')))
- dir.chop(1);
-
- QStringList paths = QDeclarativeEnginePrivate::get(engine)->fileImportPath;
- qSort(paths.begin(), paths.end(), greaterThan); // Ensure subdirs preceed their parents.
-
- QString stableRelativePath = dir;
- foreach( QString path, paths) {
- if (dir.startsWith(path)) {
- stableRelativePath = dir.mid(path.length()+1);
- break;
- }
- }
- stableRelativePath.replace(QLatin1Char('/'), QLatin1Char('.'));
- stableRelativePath.replace(QLatin1Char('\\'), QLatin1Char('.'));
- return stableRelativePath;
- }
-
-
-
-
- bool add(const QUrl& base, const QDeclarativeDirComponents &qmldircomponentsnetwork, const QString& uri_arg, const QString& prefix, int vmaj, int vmin, QDeclarativeScriptParser::Import::Type importType, QDeclarativeEngine *engine, QString *errorString)
- {
- QDeclarativeDirComponents qmldircomponents = qmldircomponentsnetwork;
- QString uri = uri_arg;
- QDeclarativeEnginePrivate::ImportedNamespace *s;
- if (prefix.isEmpty()) {
- s = &unqualifiedset;
- } else {
- s = set.value(prefix);
- if (!s)
- set.insert(prefix,(s=new QDeclarativeEnginePrivate::ImportedNamespace));
- }
-
-
-
- QString url = uri;
- if (importType == QDeclarativeScriptParser::Import::Library) {
- url.replace(QLatin1Char('.'), QLatin1Char('/'));
- bool found = false;
- QString dir;
-
-
- foreach (const QString &p,
- QDeclarativeEnginePrivate::get(engine)->fileImportPath) {
- dir = p+QLatin1Char('/')+url;
-
- QFileInfo fi(dir+QLatin1String("/qmldir"));
- const QString absoluteFilePath = fi.absoluteFilePath();
-
- if (fi.isFile()) {
- found = true;
-
- url = QUrl::fromLocalFile(fi.absolutePath()).toString();
- uri = resolvedUri(dir, engine);
- if (!importExtension(absoluteFilePath, uri, engine, &qmldircomponents, errorString))
- return false;
- break;
- }
- }
-
- if (!found) {
- found = QDeclarativeMetaType::isModule(uri.toUtf8(), vmaj, vmin);
- if (!found) {
- if (errorString) {
- bool anyversion = QDeclarativeMetaType::isModule(uri.toUtf8(), -1, -1);
- if (anyversion)
- *errorString = QDeclarativeEngine::tr("module \"%1\" version %2.%3 is not installed").arg(uri_arg).arg(vmaj).arg(vmin);
- else
- *errorString = QDeclarativeEngine::tr("module \"%1\" is not installed").arg(uri_arg);
- }
- return false;
- }
- }
- } else {
-
- if (importType == QDeclarativeScriptParser::Import::File && qmldircomponents.isEmpty()) {
- QUrl importUrl = base.resolved(QUrl(uri + QLatin1String("/qmldir")));
- QString localFileOrQrc = toLocalFileOrQrc(importUrl);
- if (!localFileOrQrc.isEmpty()) {
- QString dir = toLocalFileOrQrc(base.resolved(QUrl(uri)));
- if (dir.isEmpty() || !QDir().exists(dir)) {
- if (errorString)
- *errorString = QDeclarativeEngine::tr("\"%1\": no such directory").arg(uri_arg);
- return false; // local import dirs must exist
- }
- uri = resolvedUri(toLocalFileOrQrc(base.resolved(QUrl(uri))), engine);
- if (uri.endsWith(QLatin1Char('/')))
- uri.chop(1);
- if (QFile::exists(localFileOrQrc)) {
- if (!importExtension(localFileOrQrc,uri,engine,&qmldircomponents,errorString))
- return false;
- }
- } else {
- if (prefix.isEmpty()) {
- // directory must at least exist for valid import
- QString localFileOrQrc = toLocalFileOrQrc(base.resolved(QUrl(uri)));
- if (localFileOrQrc.isEmpty() || !QDir().exists(localFileOrQrc)) {
- if (errorString) {
- if (localFileOrQrc.isEmpty())
- *errorString = QDeclarativeEngine::tr("import \"%1\" has no qmldir and no namespace").arg(uri);
- else
- *errorString = QDeclarativeEngine::tr("\"%1\": no such directory").arg(uri);
- }
- return false;
- }
- }
- }
- }
-
- url = base.resolved(QUrl(url)).toString();
- if (url.endsWith(QLatin1Char('/')))
- url.chop(1);
- }
-
- if (vmaj > -1 && vmin > -1 && !qmldircomponents.isEmpty()) {
- QList<QDeclarativeDirParser::Component>::ConstIterator it = qmldircomponents.begin();
- for (; it != qmldircomponents.end(); ++it) {
- if (it->majorVersion > vmaj || (it->majorVersion == vmaj && it->minorVersion >= vmin))
- break;
- }
- if (it == qmldircomponents.end()) {
- *errorString = QDeclarativeEngine::tr("module \"%1\" version %2.%3 is not installed").arg(uri_arg).arg(vmaj).arg(vmin);
- return false;
- }
- }
-
- s->uris.prepend(uri);
- s->urls.prepend(url);
- s->majversions.prepend(vmaj);
- s->minversions.prepend(vmin);
- s->isLibrary.prepend(importType == QDeclarativeScriptParser::Import::Library);
- s->qmlDirComponents.prepend(qmldircomponents);
- return true;
- }
-
- bool find(const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return,
- QUrl* url_return, QString *errorString)
- {
- QDeclarativeEnginePrivate::ImportedNamespace *s = 0;
- int slash = type.indexOf('/');
- if (slash >= 0) {
- QString namespaceName = QString::fromUtf8(type.left(slash));
- s = set.value(namespaceName);
- if (!s) {
- if (errorString)
- *errorString = QDeclarativeEngine::tr("- %1 is not a namespace").arg(namespaceName);
- return false;
- }
- int nslash = type.indexOf('/',slash+1);
- if (nslash > 0) {
- if (errorString)
- *errorString = QDeclarativeEngine::tr("- nested namespaces not allowed");
- return false;
- }
- } else {
- s = &unqualifiedset;
- }
- QByteArray unqualifiedtype = slash < 0 ? type : type.mid(slash+1); // common-case opt (QString::mid works fine, but slower)
- if (s) {
- if (s->find(unqualifiedtype,vmajor,vminor,type_return,url_return, &base, errorString))
- return true;
- if (s->urls.count() == 1 && !s->isLibrary[0] && url_return && s != &unqualifiedset) {
- // qualified, and only 1 url
- *url_return = QUrl(s->urls[0]+QLatin1Char('/')).resolved(QUrl(QString::fromUtf8(unqualifiedtype) + QLatin1String(".qml")));
- return true;
- }
- }
-
- return false;
- }
-
- QDeclarativeEnginePrivate::ImportedNamespace *findNamespace(const QString& type)
- {
- return set.value(type);
- }
-
- QUrl base;
- int ref;
-
-private:
- friend struct QDeclarativeEnginePrivate::Imports;
- QDeclarativeEnginePrivate::ImportedNamespace unqualifiedset;
- QHash<QString,QDeclarativeEnginePrivate::ImportedNamespace* > set;
-};
-
-QDeclarativeEnginePrivate::Imports::Imports(const Imports &copy) :
- d(copy.d)
-{
- ++d->ref;
-}
-
-QDeclarativeEnginePrivate::Imports &QDeclarativeEnginePrivate::Imports::operator =(const Imports &copy)
-{
- ++copy.d->ref;
- if (--d->ref == 0)
- delete d;
- d = copy.d;
- return *this;
-}
-
-QDeclarativeEnginePrivate::Imports::Imports() :
- d(new QDeclarativeImportsPrivate)
-{
-}
-
-QDeclarativeEnginePrivate::Imports::~Imports()
-{
- if (--d->ref == 0)
- delete d;
-}
-
-static QDeclarativeTypeNameCache *cacheForNamespace(QDeclarativeEngine *engine, const QDeclarativeEnginePrivate::ImportedNamespace &set, QDeclarativeTypeNameCache *cache)
-{
- if (!cache)
- cache = new QDeclarativeTypeNameCache(engine);
-
- QList<QDeclarativeType *> types = QDeclarativeMetaType::qmlTypes();
-
- for (int ii = 0; ii < set.uris.count(); ++ii) {
- QByteArray base = set.uris.at(ii).toUtf8() + '/';
- int major = set.majversions.at(ii);
- int minor = set.minversions.at(ii);
-
- foreach (QDeclarativeType *type, types) {
- if (type->qmlTypeName().startsWith(base) &&
- type->qmlTypeName().lastIndexOf('/') == (base.length() - 1) &&
- type->availableInVersion(major,minor))
- {
- QString name = QString::fromUtf8(type->qmlTypeName().mid(base.length()));
-
- cache->add(name, type);
- }
- }
- }
-
- return cache;
-}
-
-void QDeclarativeEnginePrivate::Imports::cache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *engine) const
-{
- const QDeclarativeEnginePrivate::ImportedNamespace &set = d->unqualifiedset;
-
- for (QHash<QString,QDeclarativeEnginePrivate::ImportedNamespace* >::ConstIterator iter = d->set.begin();
- iter != d->set.end(); ++iter) {
-
- QDeclarativeTypeNameCache::Data *d = cache->data(iter.key());
- if (d) {
- if (!d->typeNamespace)
- cacheForNamespace(engine, *(*iter), d->typeNamespace);
- } else {
- QDeclarativeTypeNameCache *nc = cacheForNamespace(engine, *(*iter), 0);
- cache->add(iter.key(), nc);
- nc->release();
- }
- }
-
- cacheForNamespace(engine, set, cache);
-}
-
-/*
-QStringList QDeclarativeEnginePrivate::Imports::unqualifiedSet() const
-{
- QStringList rv;
-
- const QDeclarativeEnginePrivate::ImportedNamespace &set = d->unqualifiedset;
-
- for (int ii = 0; ii < set.urls.count(); ++ii) {
- if (set.isBuiltin.at(ii))
- rv << set.urls.at(ii);
- }
-
- return rv;
-}
-*/
-
-/*!
- Sets the base URL to be used for all relative file imports added.
-*/
-void QDeclarativeEnginePrivate::Imports::setBaseUrl(const QUrl& url)
-{
- d->base = url;
-}
-
-/*!
- Returns the base URL to be used for all relative file imports added.
-*/
-QUrl QDeclarativeEnginePrivate::Imports::baseUrl() const
-{
- return d->base;
-}
-
/*!
Adds \a path as a directory where the engine searches for
installed modules in a URL-based directory structure.
@@ -2042,19 +1536,10 @@ QUrl QDeclarativeEnginePrivate::Imports::baseUrl() const
*/
void QDeclarativeEngine::addImportPath(const QString& path)
{
- if (qmlImportTrace())
- qDebug() << "QDeclarativeEngine::addImportPath" << path;
Q_D(QDeclarativeEngine);
- QUrl url = QUrl(path);
- if (url.isRelative() || url.scheme() == QString::fromLocal8Bit("file")) {
- QDir dir = QDir(path);
- d->fileImportPath.prepend(dir.canonicalPath());
- } else {
- d->fileImportPath.prepend(path);
- }
+ d->importDatabase.addImportPath(path);
}
-
/*!
Returns the list of directories where the engine searches for
installed modules in a URL-based directory structure.
@@ -2065,30 +1550,32 @@ void QDeclarativeEngine::addImportPath(const QString& path)
provided by that module. A \c qmldir file is required for defining the
type version mapping and possibly declarative extensions plugins.
- By default, the list contains the paths specified in the \c QML_IMPORT_PATH environment
- variable, then the builtin \c ImportsPath from QLibraryInfo.
+ By default, the list contains the directory of the application executable,
+ paths specified in the \c QML_IMPORT_PATH environment variable,
+ and the builtin \c ImportsPath from QLibraryInfo.
\sa addImportPath() setImportPathList()
*/
QStringList QDeclarativeEngine::importPathList() const
{
Q_D(const QDeclarativeEngine);
- return d->fileImportPath;
+ return d->importDatabase.importPathList();
}
/*!
- Sets the list of directories where the engine searches for
+ Sets \a paths as the list of directories where the engine searches for
installed modules in a URL-based directory structure.
- By default, the list contains the paths specified in the \c QML_IMPORT_PATH environment
- variable, then the builtin \c ImportsPath from QLibraryInfo.
+ By default, the list contains the directory of the application executable,
+ paths specified in the \c QML_IMPORT_PATH environment variable,
+ and the builtin \c ImportsPath from QLibraryInfo.
\sa importPathList() addImportPath()
*/
void QDeclarativeEngine::setImportPathList(const QStringList &paths)
{
Q_D(QDeclarativeEngine);
- d->fileImportPath = paths;
+ d->importDatabase.setImportPathList(paths);
}
@@ -2105,16 +1592,8 @@ void QDeclarativeEngine::setImportPathList(const QStringList &paths)
*/
void QDeclarativeEngine::addPluginPath(const QString& path)
{
- if (qmlImportTrace())
- qDebug() << "QDeclarativeEngine::addPluginPath" << path;
Q_D(QDeclarativeEngine);
- QUrl url = QUrl(path);
- if (url.isRelative() || url.scheme() == QString::fromLocal8Bit("file")) {
- QDir dir = QDir(path);
- d->filePluginPath.prepend(dir.canonicalPath());
- } else {
- d->filePluginPath.prepend(path);
- }
+ d->importDatabase.addPluginPath(path);
}
@@ -2130,7 +1609,7 @@ void QDeclarativeEngine::addPluginPath(const QString& path)
QStringList QDeclarativeEngine::pluginPathList() const
{
Q_D(const QDeclarativeEngine);
- return d->filePluginPath;
+ return d->importDatabase.pluginPathList();
}
/*!
@@ -2146,7 +1625,7 @@ QStringList QDeclarativeEngine::pluginPathList() const
void QDeclarativeEngine::setPluginPathList(const QStringList &paths)
{
Q_D(QDeclarativeEngine);
- d->filePluginPath = paths;
+ d->importDatabase.setPluginPathList(paths);
}
@@ -2160,55 +1639,8 @@ void QDeclarativeEngine::setPluginPathList(const QStringList &paths)
*/
bool QDeclarativeEngine::importPlugin(const QString &filePath, const QString &uri, QString *errorString)
{
- if (qmlImportTrace())
- qDebug() << "QDeclarativeEngine::importPlugin" << uri << "from" << filePath;
- QFileInfo fileInfo(filePath);
- const QString absoluteFilePath = fileInfo.absoluteFilePath();
-
- QDeclarativeEnginePrivate *d = QDeclarativeEnginePrivate::get(this);
- bool engineInitialized = d->initializedPlugins.contains(absoluteFilePath);
- bool typesRegistered = qmlEnginePluginsWithRegisteredTypes()->contains(absoluteFilePath);
-
- if (typesRegistered) {
- Q_ASSERT_X(qmlEnginePluginsWithRegisteredTypes()->value(absoluteFilePath) == uri,
- "QDeclarativeEngine::importExtension",
- "Internal error: Plugin imported previously with different uri");
- }
-
- if (!engineInitialized || !typesRegistered) {
- QPluginLoader loader(absoluteFilePath);
-
- if (!loader.load()) {
- if (errorString)
- *errorString = loader.errorString();
- return false;
- }
-
- if (QDeclarativeExtensionInterface *iface = qobject_cast<QDeclarativeExtensionInterface *>(loader.instance())) {
-
- const QByteArray bytes = uri.toUtf8();
- const char *moduleId = bytes.constData();
- if (!typesRegistered) {
-
- // ### this code should probably be protected with a mutex.
- qmlEnginePluginsWithRegisteredTypes()->insert(absoluteFilePath, uri);
- iface->registerTypes(moduleId);
- }
- if (!engineInitialized) {
- // things on the engine (eg. adding new global objects) have to be done for every engine.
-
- // protect against double initialization
- d->initializedPlugins.insert(absoluteFilePath);
- iface->initializeEngine(this, moduleId);
- }
- } else {
- if (errorString)
- *errorString = loader.errorString();
- return false;
- }
- }
-
- return true;
+ Q_D(QDeclarativeEngine);
+ return d->importDatabase.importPlugin(filePath, uri, errorString);
}
/*!
@@ -2240,208 +1672,6 @@ QString QDeclarativeEngine::offlineStoragePath() const
return d->scriptEngine.offlineStoragePath;
}
-/*!
- \internal
-
- Returns the result of the merge of \a baseName with \a path, \a suffixes, and \a prefix.
- The \a prefix must contain the dot.
-
- \a qmldirPath is the location of the qmldir file.
- */
-QString QDeclarativeEnginePrivate::resolvePlugin(const QDir &qmldirPath, const QString &qmldirPluginPath, const QString &baseName,
- const QStringList &suffixes,
- const QString &prefix)
-{
- QStringList searchPaths = filePluginPath;
- bool qmldirPluginPathIsRelative = QDir::isRelativePath(qmldirPluginPath);
- if (!qmldirPluginPathIsRelative)
- searchPaths.prepend(qmldirPluginPath);
-
- foreach (const QString &pluginPath, searchPaths) {
-
- QString resolvedPath;
-
- if (pluginPath == QLatin1String(".")) {
- if (qmldirPluginPathIsRelative)
- resolvedPath = qmldirPath.absoluteFilePath(qmldirPluginPath);
- else
- resolvedPath = qmldirPath.absolutePath();
- } else {
- resolvedPath = pluginPath;
- }
-
- // hack for resources, should probably go away
- if (resolvedPath.startsWith(QLatin1Char(':')))
- resolvedPath = QCoreApplication::applicationDirPath();
-
- QDir dir(resolvedPath);
- foreach (const QString &suffix, suffixes) {
- QString pluginFileName = prefix;
-
- pluginFileName += baseName;
- pluginFileName += suffix;
-
- QFileInfo fileInfo(dir, pluginFileName);
-
- if (fileInfo.exists())
- return fileInfo.absoluteFilePath();
- }
- }
-
- if (qmlImportTrace())
- qDebug() << "QDeclarativeEngine::resolvePlugin: Could not resolve plugin" << baseName << "in" << qmldirPath.absolutePath();
- return QString();
-}
-
-/*!
- \internal
-
- Returns the result of the merge of \a baseName with \a dir and the platform suffix.
-
- \table
- \header \i Platform \i Valid suffixes
- \row \i Windows \i \c .dll
- \row \i Unix/Linux \i \c .so
- \row \i AIX \i \c .a
- \row \i HP-UX \i \c .sl, \c .so (HP-UXi)
- \row \i Mac OS X \i \c .dylib, \c .bundle, \c .so
- \row \i Symbian \i \c .dll
- \endtable
-
- Version number on unix are ignored.
-*/
-QString QDeclarativeEnginePrivate::resolvePlugin(const QDir &qmldirPath, const QString &qmldirPluginPath, const QString &baseName)
-{
-#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
- return resolvePlugin(qmldirPath, qmldirPluginPath, baseName,
- QStringList()
-# ifdef QT_DEBUG
- << QLatin1String("d.dll") // try a qmake-style debug build first
-# endif
- << QLatin1String(".dll"));
-#elif defined(Q_OS_SYMBIAN)
- return resolvePlugin(qmldirPath, qmldirPluginPath, baseName,
- QStringList()
- << QLatin1String(".dll")
- << QLatin1String(".qtplugin"));
-#else
-
-# if defined(Q_OS_DARWIN)
-
- return resolvePlugin(qmldirPath, qmldirPluginPath, baseName,
- QStringList()
-# ifdef QT_DEBUG
- << QLatin1String("_debug.dylib") // try a qmake-style debug build first
- << QLatin1String(".dylib")
-# else
- << QLatin1String(".dylib")
- << QLatin1String("_debug.dylib") // try a qmake-style debug build after
-# endif
- << QLatin1String(".so")
- << QLatin1String(".bundle"),
- QLatin1String("lib"));
-# else // Generic Unix
- QStringList validSuffixList;
-
-# if defined(Q_OS_HPUX)
-/*
- See "HP-UX Linker and Libraries User's Guide", section "Link-time Differences between PA-RISC and IPF":
- "In PA-RISC (PA-32 and PA-64) shared libraries are suffixed with .sl. In IPF (32-bit and 64-bit),
- the shared libraries are suffixed with .so. For compatibility, the IPF linker also supports the .sl suffix."
- */
- validSuffixList << QLatin1String(".sl");
-# if defined __ia64
- validSuffixList << QLatin1String(".so");
-# endif
-# elif defined(Q_OS_AIX)
- validSuffixList << QLatin1String(".a") << QLatin1String(".so");
-# elif defined(Q_OS_UNIX)
- validSuffixList << QLatin1String(".so");
-# endif
-
- // Examples of valid library names:
- // libfoo.so
-
- return resolvePlugin(qmldirPath, qmldirPluginPath, baseName, validSuffixList, QLatin1String("lib"));
-# endif
-
-#endif
-}
-
-/*!
- \internal
-
- Adds information to \a imports such that subsequent calls to resolveType()
- will resolve types qualified by \a prefix by considering types found at the given \a uri.
-
- The uri is either a directory (if importType is FileImport), or a URI resolved using paths
- added via addImportPath() (if importType is LibraryImport).
-
- The \a prefix may be empty, in which case the import location is considered for
- unqualified types.
-
- The base URL must already have been set with Import::setBaseUrl().
-*/
-bool QDeclarativeEnginePrivate::addToImport(Imports* imports, const QDeclarativeDirComponents &qmldircomponentsnetwork, const QString& uri, const QString& prefix, int vmaj, int vmin, QDeclarativeScriptParser::Import::Type importType, QString *errorString) const
-{
- QDeclarativeEngine *engine = QDeclarativeEnginePrivate::get(const_cast<QDeclarativeEnginePrivate *>(this));
- if (qmlImportTrace())
- qDebug().nospace() << "QDeclarativeEngine::addToImport " << imports << " " << uri << " " << vmaj << '.' << vmin << " " << (importType==QDeclarativeScriptParser::Import::Library? "Library" : "File") << " as " << prefix;
- bool ok = imports->d->add(imports->d->base,qmldircomponentsnetwork, uri,prefix,vmaj,vmin,importType, engine, errorString);
- return ok;
-}
-
-/*!
- \internal
-
- Using the given \a imports, the given (namespace qualified) \a type is resolved to either
- an ImportedNamespace stored at \a ns_return,
- a QDeclarativeType stored at \a type_return, or
- a component located at \a url_return.
-
- If any return pointer is 0, the corresponding search is not done.
-
- \sa addToImport()
-*/
-bool QDeclarativeEnginePrivate::resolveType(const Imports& imports, const QByteArray& type, QDeclarativeType** type_return, QUrl* url_return, int *vmaj, int *vmin, ImportedNamespace** ns_return, QString *errorString) const
-{
- ImportedNamespace* ns = imports.d->findNamespace(QString::fromUtf8(type));
- if (ns) {
- if (ns_return)
- *ns_return = ns;
- return true;
- }
- if (type_return || url_return) {
- if (imports.d->find(type,vmaj,vmin,type_return,url_return, errorString)) {
- if (qmlImportTrace()) {
- if (type_return && *type_return && url_return && !url_return->isEmpty())
- qDebug() << "QDeclarativeEngine::resolveType" << type << '=' << (*type_return)->typeName() << *url_return;
- if (type_return && *type_return)
- qDebug() << "QDeclarativeEngine::resolveType" << type << '=' << (*type_return)->typeName();
- if (url_return && !url_return->isEmpty())
- qDebug() << "QDeclarativeEngine::resolveType" << type << '=' << *url_return;
- }
- return true;
- }
- }
- return false;
-}
-
-/*!
- \internal
-
- Searching \e only in the namespace \a ns (previously returned in a call to
- resolveType(), \a type is found and returned to either
- a QDeclarativeType stored at \a type_return, or
- a component located at \a url_return.
-
- If either return pointer is 0, the corresponding search is not done.
-*/
-void QDeclarativeEnginePrivate::resolveTypeInNamespace(ImportedNamespace* ns, const QByteArray& type, QDeclarativeType** type_return, QUrl* url_return, int *vmaj, int *vmin ) const
-{
- ns->find(type,vmaj,vmin,type_return,url_return);
-}
-
static void voidptr_destructor(void *v)
{
void **ptr = (void **)v;
diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h
index 743275e..0b1c17d 100644
--- a/src/declarative/qml/qdeclarativeengine_p.h
+++ b/src/declarative/qml/qdeclarativeengine_p.h
@@ -57,6 +57,7 @@
#include "private/qdeclarativeclassfactory_p.h"
#include "private/qdeclarativecompositetypemanager_p.h"
+#include "private/qdeclarativeimport_p.h"
#include "private/qpodvector_p.h"
#include "qdeclarative.h"
#include "private/qdeclarativevaluetype_p.h"
@@ -90,6 +91,7 @@ class QDeclarativeEngine;
class QDeclarativeContextPrivate;
class QDeclarativeExpression;
class QDeclarativeContextScriptClass;
+class QDeclarativeImportDatabase;
class QDeclarativeObjectScriptClass;
class QDeclarativeTypeNameScriptClass;
class QDeclarativeValueTypeScriptClass;
@@ -164,7 +166,6 @@ public:
bool outputWarningsToStdErr;
- struct ImportedNamespace;
QDeclarativeContextScriptClass *contextClass;
QDeclarativeContextData *sharedContext;
QObject *sharedScope;
@@ -217,8 +218,13 @@ public:
QList<SimpleList<QDeclarativeAbstractBinding> > bindValues;
QList<SimpleList<QDeclarativeParserStatus> > parserStatus;
+ QList<QPair<QDeclarativeGuard<QObject>,int> > finalizedParserStatus;
QDeclarativeComponentAttached *componentAttached;
+ void registerFinalizedParserStatusObject(QObject *obj, int index) {
+ finalizedParserStatus.append(qMakePair(QDeclarativeGuard<QObject>(obj), index));
+ }
+
bool inBeginCreate;
QNetworkAccessManager *createNetworkAccessManager(QObject *parent) const;
@@ -232,8 +238,8 @@ public:
mutable QMutex mutex;
QDeclarativeCompositeTypeManager typeManager;
- QStringList fileImportPath;
- QStringList filePluginPath;
+ QDeclarativeImportDatabase importDatabase;
+
QString offlineStoragePath;
mutable quint32 uniqueId;
@@ -244,58 +250,8 @@ public:
QDeclarativeValueTypeFactory valueTypes;
QHash<const QMetaObject *, QDeclarativePropertyCache *> propertyCache;
- QDeclarativePropertyCache *cache(QObject *obj) {
- Q_Q(QDeclarativeEngine);
- if (!obj || QObjectPrivate::get(obj)->metaObject ||
- QObjectPrivate::get(obj)->wasDeleted) return 0;
- const QMetaObject *mo = obj->metaObject();
- QDeclarativePropertyCache *rv = propertyCache.value(mo);
- if (!rv) {
- rv = QDeclarativePropertyCache::create(q, mo);
- propertyCache.insert(mo, rv);
- }
- return rv;
- }
-
- // ### This whole class is embarrassing
- struct Imports {
- Imports();
- ~Imports();
- Imports(const Imports &copy);
- Imports &operator =(const Imports &copy);
-
- void setBaseUrl(const QUrl& url);
- QUrl baseUrl() const;
-
- void cache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *) const;
-
- private:
- friend class QDeclarativeEnginePrivate;
- QDeclarativeImportsPrivate *d;
- };
-
-
- QSet<QString> initializedPlugins;
-
- QString resolvePlugin(const QDir &qmldirPath, const QString &qmldirPluginPath, const QString &baseName,
- const QStringList &suffixes,
- const QString &prefix = QString());
- QString resolvePlugin(const QDir &qmldirPath, const QString &qmldirPluginPath, const QString &baseName);
-
-
- bool addToImport(Imports*, const QDeclarativeDirComponents &qmldircomponentsnetwork,
- const QString& uri, const QString& prefix, int vmaj, int vmin,
- QDeclarativeScriptParser::Import::Type importType,
- QString *errorString) const;
- bool resolveType(const Imports&, const QByteArray& type,
- QDeclarativeType** type_return, QUrl* url_return,
- int *version_major, int *version_minor,
- ImportedNamespace** ns_return,
- QString *errorString = 0) const;
- void resolveTypeInNamespace(ImportedNamespace*, const QByteArray& type,
- QDeclarativeType** type_return, QUrl* url_return,
- int *version_major, int *version_minor ) const;
-
+ inline QDeclarativePropertyCache *cache(QObject *obj);
+ inline QDeclarativePropertyCache *cache(const QMetaObject *);
void registerCompositeType(QDeclarativeCompiledData *);
@@ -339,6 +295,7 @@ public:
static QScriptValue tint(QScriptContext*, QScriptEngine*);
static QScriptValue desktopOpenUrl(QScriptContext*, QScriptEngine*);
+ static QScriptValue fontFamilies(QScriptContext*, QScriptEngine*);
static QScriptValue md5(QScriptContext*, QScriptEngine*);
static QScriptValue btoa(QScriptContext*, QScriptEngine*);
static QScriptValue atob(QScriptContext*, QScriptEngine*);
@@ -361,6 +318,48 @@ public:
static void defineModule();
};
+/*!
+Returns a QDeclarativePropertyCache for \a obj if one is available.
+
+If \a obj is null, being deleted or contains a dynamic meta object 0
+is returned.
+*/
+QDeclarativePropertyCache *QDeclarativeEnginePrivate::cache(QObject *obj)
+{
+ Q_Q(QDeclarativeEngine);
+ if (!obj || QObjectPrivate::get(obj)->metaObject || QObjectPrivate::get(obj)->wasDeleted)
+ return 0;
+
+ const QMetaObject *mo = obj->metaObject();
+ QDeclarativePropertyCache *rv = propertyCache.value(mo);
+ if (!rv) {
+ rv = new QDeclarativePropertyCache(q, mo);
+ propertyCache.insert(mo, rv);
+ }
+ return rv;
+}
+
+/*!
+Returns a QDeclarativePropertyCache for \a metaObject.
+
+As the cache is persisted for the life of the engine, \a metaObject must be
+a static "compile time" meta-object, or a meta-object that is otherwise known to
+exist for the lifetime of the QDeclarativeEngine.
+*/
+QDeclarativePropertyCache *QDeclarativeEnginePrivate::cache(const QMetaObject *metaObject)
+{
+ Q_Q(QDeclarativeEngine);
+ Q_ASSERT(metaObject);
+
+ QDeclarativePropertyCache *rv = propertyCache.value(metaObject);
+ if (!rv) {
+ rv = new QDeclarativePropertyCache(q, metaObject);
+ propertyCache.insert(metaObject, rv);
+ }
+
+ return rv;
+}
+
QT_END_NAMESPACE
#endif // QDECLARATIVEENGINE_P_H
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp
index 69e42f8..7ae0050 100644
--- a/src/declarative/qml/qdeclarativeenginedebug.cpp
+++ b/src/declarative/qml/qdeclarativeenginedebug.cpp
@@ -414,7 +414,7 @@ void QDeclarativeEngineDebugServer::messageReceived(const QByteArray &message)
QDeclarativeContext *context = qmlContext(object);
QVariant result;
if (object && context) {
- QDeclarativeExpression exprObj(context, expr, object);
+ QDeclarativeExpression exprObj(context, object, expr);
bool undefined = false;
QVariant value = exprObj.evaluate(&undefined);
if (undefined)
diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp
index f561a7e..b1aecfa 100644
--- a/src/declarative/qml/qdeclarativeexpression.cpp
+++ b/src/declarative/qml/qdeclarativeexpression.cpp
@@ -57,10 +57,12 @@ QT_BEGIN_NAMESPACE
bool QDeclarativeDelayedError::addError(QDeclarativeEnginePrivate *e)
{
- if (!e || prevError) return false;
+ if (!e) return false;
if (e->inProgressCreations == 0) return false; // Not in construction
+ if (prevError) return true; // Already in error chain
+
prevError = &e->erroredBindings;
nextError = e->erroredBindings;
e->erroredBindings = this;
@@ -239,15 +241,17 @@ QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, vo
}
/*!
- Create a QDeclarativeExpression object.
+ Create a QDeclarativeExpression object that is a child of \a parent.
The \a expression JavaScript will be executed in the \a ctxt QDeclarativeContext.
If specified, the \a scope object's properties will also be in scope during
the expression's execution.
*/
-QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContext *ctxt, const QString &expression,
- QObject *scope)
-: QObject(*new QDeclarativeExpressionPrivate, 0)
+QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContext *ctxt,
+ QObject *scope,
+ const QString &expression,
+ QObject *parent)
+: QObject(*new QDeclarativeExpressionPrivate, parent)
{
Q_D(QDeclarativeExpression);
d->init(QDeclarativeContextData::get(ctxt), expression, scope);
@@ -256,8 +260,8 @@ QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContext *ctxt, const
/*!
\internal
*/
-QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, const QString &expression,
- QObject *scope)
+QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, QObject *scope,
+ const QString &expression)
: QObject(*new QDeclarativeExpressionPrivate, 0)
{
Q_D(QDeclarativeExpression);
@@ -265,8 +269,8 @@ QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, co
}
/*! \internal */
-QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, const QString &expression,
- QObject *scope, QDeclarativeExpressionPrivate &dd)
+QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, QObject *scope,
+ const QString &expression, QDeclarativeExpressionPrivate &dd)
: QObject(dd, 0)
{
Q_D(QDeclarativeExpression);
diff --git a/src/declarative/qml/qdeclarativeexpression.h b/src/declarative/qml/qdeclarativeexpression.h
index 6c72e4d..a8c86da 100644
--- a/src/declarative/qml/qdeclarativeexpression.h
+++ b/src/declarative/qml/qdeclarativeexpression.h
@@ -64,7 +64,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeExpression : public QObject
Q_OBJECT
public:
QDeclarativeExpression();
- QDeclarativeExpression(QDeclarativeContext *, const QString &, QObject *);
+ QDeclarativeExpression(QDeclarativeContext *, QObject *, const QString &, QObject * = 0);
virtual ~QDeclarativeExpression();
QDeclarativeEngine *engine() const;
@@ -92,13 +92,13 @@ Q_SIGNALS:
void valueChanged();
protected:
- QDeclarativeExpression(QDeclarativeContextData *, const QString &, QObject *,
+ QDeclarativeExpression(QDeclarativeContextData *, QObject *, const QString &,
QDeclarativeExpressionPrivate &dd);
QDeclarativeExpression(QDeclarativeContextData *, void *, QDeclarativeRefCount *rc,
QObject *me, const QString &, int, QDeclarativeExpressionPrivate &dd);
private:
- QDeclarativeExpression(QDeclarativeContextData *, const QString &, QObject *);
+ QDeclarativeExpression(QDeclarativeContextData *, QObject *, const QString &);
Q_DISABLE_COPY(QDeclarativeExpression)
Q_DECLARE_PRIVATE(QDeclarativeExpression)
diff --git a/src/declarative/qml/qdeclarativeextensionplugin.cpp b/src/declarative/qml/qdeclarativeextensionplugin.cpp
index 2c15385..c2e8300 100644
--- a/src/declarative/qml/qdeclarativeextensionplugin.cpp
+++ b/src/declarative/qml/qdeclarativeextensionplugin.cpp
@@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
See \l {Tutorial: Writing QML extensions with C++} for details on creating
QML extensions, including how to build a plugin with with QDeclarativeExtensionPlugin.
- For a simple overview, see the \l{declarative/plugins}{plugins} example.
+ For a simple overview, see the \l{declarative/cppextensions/plugins}{plugins} example.
Also see \l {How to Create Qt Plugins} for general Qt plugin documentation.
diff --git a/src/declarative/qml/qdeclarativeglobalscriptclass.cpp b/src/declarative/qml/qdeclarativeglobalscriptclass.cpp
index fc802b4..6e107fb 100644
--- a/src/declarative/qml/qdeclarativeglobalscriptclass.cpp
+++ b/src/declarative/qml/qdeclarativeglobalscriptclass.cpp
@@ -53,19 +53,29 @@ QT_BEGIN_NAMESPACE
QDeclarativeGlobalScriptClass::QDeclarativeGlobalScriptClass(QScriptEngine *engine)
: QScriptClass(engine)
{
+ QString eval = QLatin1String("eval");
+
QScriptValue globalObject = engine->globalObject();
+
m_globalObject = engine->newObject();
+ QScriptValue newGlobalObject = engine->newObject();
QScriptValueIterator iter(globalObject);
+
while (iter.hasNext()) {
iter.next();
- m_globalObject.setProperty(iter.scriptName(), iter.value());
- m_illegalNames.insert(iter.name());
+
+ QString name = iter.name();
+
+ if (name != eval)
+ m_globalObject.setProperty(iter.scriptName(), iter.value());
+ newGlobalObject.setProperty(iter.scriptName(), iter.value());
+
+ m_illegalNames.insert(name);
}
- QScriptValue v = engine->newObject();
- v.setScriptClass(this);
- engine->setGlobalObject(v);
+ newGlobalObject.setScriptClass(this);
+ engine->setGlobalObject(newGlobalObject);
}
QScriptClass::QueryFlags
diff --git a/src/declarative/qml/qdeclarativeglobalscriptclass_p.h b/src/declarative/qml/qdeclarativeglobalscriptclass_p.h
index 1b34aee..7690edd 100644
--- a/src/declarative/qml/qdeclarativeglobalscriptclass_p.h
+++ b/src/declarative/qml/qdeclarativeglobalscriptclass_p.h
@@ -76,6 +76,7 @@ public:
void explicitSetProperty(const QString &, const QScriptValue &);
const QScriptValue &globalObject() const { return m_globalObject; }
+
const QSet<QString> &illegalNames() const { return m_illegalNames; }
private:
diff --git a/src/declarative/qml/qdeclarativeguard_p.h b/src/declarative/qml/qdeclarativeguard_p.h
index be60ce4..02fed0b 100644
--- a/src/declarative/qml/qdeclarativeguard_p.h
+++ b/src/declarative/qml/qdeclarativeguard_p.h
@@ -97,7 +97,7 @@ private:
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QDeclarativeGuard<QObject>);
+Q_DECLARE_METATYPE(QDeclarativeGuard<QObject>)
#include "private/qdeclarativedata_p.h"
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
new file mode 100644
index 0000000..0c87671
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeimport.cpp
@@ -0,0 +1,931 @@
+/****************************************************************************
+**
+** 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 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 "qdeclarativeimport_p.h"
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qfileinfo.h>
+#include <QtCore/qpluginloader.h>
+#include <QtCore/qlibraryinfo.h>
+#include <QtDeclarative/qdeclarativeextensioninterface.h>
+#include <private/qdeclarativeglobal_p.h>
+#include <private/qdeclarativetypenamecache_p.h>
+
+QT_BEGIN_NAMESPACE
+
+DEFINE_BOOL_CONFIG_OPTION(qmlImportTrace, QML_IMPORT_TRACE)
+DEFINE_BOOL_CONFIG_OPTION(qmlCheckTypes, QML_CHECK_TYPES)
+
+static QString toLocalFileOrQrc(const QUrl& url)
+{
+ if (url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive) == 0) {
+ if (url.authority().isEmpty())
+ return QLatin1Char(':') + url.path();
+ return QString();
+ }
+ return url.toLocalFile();
+}
+
+static bool greaterThan(const QString &s1, const QString &s2)
+{
+ return s1 > s2;
+}
+
+typedef QMap<QString, QString> StringStringMap;
+Q_GLOBAL_STATIC(StringStringMap, qmlEnginePluginsWithRegisteredTypes); // stores the uri
+
+class QDeclarativeImportedNamespace
+{
+public:
+ QStringList uris;
+ QStringList urls;
+ QList<int> majversions;
+ QList<int> minversions;
+ QList<bool> isLibrary;
+ QList<QDeclarativeDirComponents> qmlDirComponents;
+
+
+ bool find_helper(int i, const QByteArray& type, int *vmajor, int *vminor,
+ QDeclarativeType** type_return, QUrl* url_return,
+ QUrl *base = 0, bool *typeRecursionDetected = 0);
+ bool find(const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return,
+ QUrl* url_return, QUrl *base = 0, QString *errorString = 0);
+};
+
+class QDeclarativeImportsPrivate {
+public:
+ QDeclarativeImportsPrivate();
+ ~QDeclarativeImportsPrivate();
+
+ bool importExtension(const QString &absoluteFilePath, const QString &uri,
+ QDeclarativeImportDatabase *database, QDeclarativeDirComponents* components,
+ QString *errorString);
+
+ QString resolvedUri(const QString &dir_arg, QDeclarativeImportDatabase *database);
+ bool add(const QDeclarativeDirComponents &qmldircomponentsnetwork,
+ const QString& uri_arg, const QString& prefix,
+ int vmaj, int vmin, QDeclarativeScriptParser::Import::Type importType,
+ QDeclarativeImportDatabase *database, QString *errorString);
+ bool find(const QByteArray& type, int *vmajor, int *vminor,
+ QDeclarativeType** type_return, QUrl* url_return, QString *errorString);
+
+ QDeclarativeImportedNamespace *findNamespace(const QString& type);
+
+ QUrl base;
+ int ref;
+
+ QSet<QString> qmlDirFilesForWhichPluginsHaveBeenLoaded;
+ QDeclarativeImportedNamespace unqualifiedset;
+ QHash<QString,QDeclarativeImportedNamespace* > set;
+};
+
+QDeclarativeImports::QDeclarativeImports(const QDeclarativeImports &copy)
+: d(copy.d)
+{
+ ++d->ref;
+}
+
+QDeclarativeImports &
+QDeclarativeImports::operator =(const QDeclarativeImports &copy)
+{
+ ++copy.d->ref;
+ if (--d->ref == 0)
+ delete d;
+ d = copy.d;
+ return *this;
+}
+
+QDeclarativeImports::QDeclarativeImports()
+: d(new QDeclarativeImportsPrivate)
+{
+}
+
+QDeclarativeImports::~QDeclarativeImports()
+{
+ if (--d->ref == 0)
+ delete d;
+}
+
+/*!
+ Sets the base URL to be used for all relative file imports added.
+*/
+void QDeclarativeImports::setBaseUrl(const QUrl& url)
+{
+ d->base = url;
+}
+
+/*!
+ Returns the base URL to be used for all relative file imports added.
+*/
+QUrl QDeclarativeImports::baseUrl() const
+{
+ return d->base;
+}
+
+static QDeclarativeTypeNameCache *
+cacheForNamespace(QDeclarativeEngine *engine, const QDeclarativeImportedNamespace &set,
+ QDeclarativeTypeNameCache *cache)
+{
+ if (!cache)
+ cache = new QDeclarativeTypeNameCache(engine);
+
+ QList<QDeclarativeType *> types = QDeclarativeMetaType::qmlTypes();
+
+ for (int ii = 0; ii < set.uris.count(); ++ii) {
+ QByteArray base = set.uris.at(ii).toUtf8() + '/';
+ int major = set.majversions.at(ii);
+ int minor = set.minversions.at(ii);
+
+ foreach (QDeclarativeType *type, types) {
+ if (type->qmlTypeName().startsWith(base) &&
+ type->qmlTypeName().lastIndexOf('/') == (base.length() - 1) &&
+ type->availableInVersion(major,minor))
+ {
+ QString name = QString::fromUtf8(type->qmlTypeName().mid(base.length()));
+
+ cache->add(name, type);
+ }
+ }
+ }
+
+ return cache;
+}
+
+void QDeclarativeImports::cache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *engine) const
+{
+ const QDeclarativeImportedNamespace &set = d->unqualifiedset;
+
+ for (QHash<QString,QDeclarativeImportedNamespace* >::ConstIterator iter = d->set.begin();
+ iter != d->set.end(); ++iter) {
+
+ QDeclarativeTypeNameCache::Data *d = cache->data(iter.key());
+ if (d) {
+ if (!d->typeNamespace)
+ cacheForNamespace(engine, *(*iter), d->typeNamespace);
+ } else {
+ QDeclarativeTypeNameCache *nc = cacheForNamespace(engine, *(*iter), 0);
+ cache->add(iter.key(), nc);
+ nc->release();
+ }
+ }
+
+ cacheForNamespace(engine, set, cache);
+}
+bool QDeclarativeImportedNamespace::find_helper(int i, const QByteArray& type, int *vmajor, int *vminor,
+ QDeclarativeType** type_return, QUrl* url_return,
+ QUrl *base, bool *typeRecursionDetected)
+{
+ int vmaj = majversions.at(i);
+ int vmin = minversions.at(i);
+
+ QByteArray qt = uris.at(i).toUtf8();
+ qt += '/';
+ qt += type;
+
+ QDeclarativeType *t = QDeclarativeMetaType::qmlType(qt,vmaj,vmin);
+ if (t) {
+ if (vmajor) *vmajor = vmaj;
+ if (vminor) *vminor = vmin;
+ if (type_return)
+ *type_return = t;
+ return true;
+ }
+
+ QUrl url = QUrl(urls.at(i) + QLatin1Char('/') + QString::fromUtf8(type) + QLatin1String(".qml"));
+ QDeclarativeDirComponents qmldircomponents = qmlDirComponents.at(i);
+
+ bool typeWasDeclaredInQmldir = false;
+ if (!qmldircomponents.isEmpty()) {
+ const QString typeName = QString::fromUtf8(type);
+ foreach (const QDeclarativeDirParser::Component &c, qmldircomponents) {
+ if (c.typeName == typeName) {
+ typeWasDeclaredInQmldir = true;
+
+ // importing version -1 means import ALL versions
+ if ((vmaj == -1) || (c.majorVersion < vmaj || (c.majorVersion == vmaj && vmin >= c.minorVersion))) {
+ QUrl candidate = url.resolved(QUrl(c.fileName));
+ if (c.internal && base) {
+ if (base->resolved(QUrl(c.fileName)) != candidate)
+ continue; // failed attempt to access an internal type
+ }
+ if (base && *base == candidate) {
+ if (typeRecursionDetected)
+ *typeRecursionDetected = true;
+ continue; // no recursion
+ }
+ if (url_return)
+ *url_return = candidate;
+ return true;
+ }
+ }
+ }
+ }
+
+ if (!typeWasDeclaredInQmldir && !isLibrary.at(i)) {
+ // XXX search non-files too! (eg. zip files, see QT-524)
+ QFileInfo f(toLocalFileOrQrc(url));
+ if (f.exists()) {
+ if (base && *base == url) { // no recursion
+ if (typeRecursionDetected)
+ *typeRecursionDetected = true;
+ } else {
+ if (url_return)
+ *url_return = url;
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+QDeclarativeImportsPrivate::QDeclarativeImportsPrivate()
+: ref(1)
+{
+}
+
+QDeclarativeImportsPrivate::~QDeclarativeImportsPrivate()
+{
+ foreach (QDeclarativeImportedNamespace* s, set.values())
+ delete s;
+}
+
+bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath, const QString &uri,
+ QDeclarativeImportDatabase *database,
+ QDeclarativeDirComponents* components, QString *errorString)
+{
+ QFile file(absoluteFilePath);
+ QString filecontent;
+ if (file.open(QFile::ReadOnly)) {
+ filecontent = QString::fromUtf8(file.readAll());
+ if (qmlImportTrace())
+ qDebug() << "QDeclarativeImportDatabase::add: loaded" << absoluteFilePath;
+ } else {
+ if (errorString)
+ *errorString = QDeclarativeImportDatabase::tr("module \"%1\" definition \"%2\" not readable").arg(uri).arg(absoluteFilePath);
+ return false;
+ }
+ QDir dir = QFileInfo(file).dir();
+
+ QDeclarativeDirParser qmldirParser;
+ qmldirParser.setSource(filecontent);
+ qmldirParser.parse();
+
+ if (! qmlDirFilesForWhichPluginsHaveBeenLoaded.contains(absoluteFilePath)) {
+ qmlDirFilesForWhichPluginsHaveBeenLoaded.insert(absoluteFilePath);
+
+
+ foreach (const QDeclarativeDirParser::Plugin &plugin, qmldirParser.plugins()) {
+
+ QString resolvedFilePath = database->resolvePlugin(dir, plugin.path, plugin.name);
+
+ if (!resolvedFilePath.isEmpty()) {
+ if (!database->importPlugin(resolvedFilePath, uri, errorString)) {
+ if (errorString)
+ *errorString = QDeclarativeImportDatabase::tr("plugin cannot be loaded for module \"%1\": %2").arg(uri).arg(*errorString);
+ return false;
+ }
+ } else {
+ if (errorString)
+ *errorString = QDeclarativeImportDatabase::tr("module \"%1\" plugin \"%2\" not found").arg(uri).arg(plugin.name);
+ return false;
+ }
+ }
+ }
+
+ if (components)
+ *components = qmldirParser.components();
+
+ return true;
+}
+
+QString QDeclarativeImportsPrivate::resolvedUri(const QString &dir_arg, QDeclarativeImportDatabase *database)
+{
+ QString dir = dir_arg;
+ if (dir.endsWith(QLatin1Char('/')) || dir.endsWith(QLatin1Char('\\')))
+ dir.chop(1);
+
+ QStringList paths = database->fileImportPath;
+ qSort(paths.begin(), paths.end(), greaterThan); // Ensure subdirs preceed their parents.
+
+ QString stableRelativePath = dir;
+ foreach( QString path, paths) {
+ if (dir.startsWith(path)) {
+ stableRelativePath = dir.mid(path.length()+1);
+ break;
+ }
+ }
+ stableRelativePath.replace(QLatin1Char('/'), QLatin1Char('.'));
+ stableRelativePath.replace(QLatin1Char('\\'), QLatin1Char('.'));
+ return stableRelativePath;
+}
+
+bool QDeclarativeImportsPrivate::add(const QDeclarativeDirComponents &qmldircomponentsnetwork,
+ const QString& uri_arg, const QString& prefix, int vmaj, int vmin,
+ QDeclarativeScriptParser::Import::Type importType,
+ QDeclarativeImportDatabase *database, QString *errorString)
+{
+ QDeclarativeDirComponents qmldircomponents = qmldircomponentsnetwork;
+ QString uri = uri_arg;
+ QDeclarativeImportedNamespace *s;
+ if (prefix.isEmpty()) {
+ s = &unqualifiedset;
+ } else {
+ s = set.value(prefix);
+ if (!s)
+ set.insert(prefix,(s=new QDeclarativeImportedNamespace));
+ }
+
+ QString url = uri;
+ if (importType == QDeclarativeScriptParser::Import::Library) {
+ url.replace(QLatin1Char('.'), QLatin1Char('/'));
+ bool found = false;
+ QString dir;
+
+
+ foreach (const QString &p, database->fileImportPath) {
+ dir = p+QLatin1Char('/')+url;
+
+ QFileInfo fi(dir+QLatin1String("/qmldir"));
+ const QString absoluteFilePath = fi.absoluteFilePath();
+
+ if (fi.isFile()) {
+ found = true;
+
+ url = QUrl::fromLocalFile(fi.absolutePath()).toString();
+ uri = resolvedUri(dir, database);
+ if (!importExtension(absoluteFilePath, uri, database, &qmldircomponents, errorString))
+ return false;
+ break;
+ }
+ }
+
+ if (!found) {
+ found = QDeclarativeMetaType::isModule(uri.toUtf8(), vmaj, vmin);
+ if (!found) {
+ if (errorString) {
+ bool anyversion = QDeclarativeMetaType::isModule(uri.toUtf8(), -1, -1);
+ if (anyversion)
+ *errorString = QDeclarativeImportDatabase::tr("module \"%1\" version %2.%3 is not installed").arg(uri_arg).arg(vmaj).arg(vmin);
+ else
+ *errorString = QDeclarativeImportDatabase::tr("module \"%1\" is not installed").arg(uri_arg);
+ }
+ return false;
+ }
+ }
+ } else {
+
+ if (importType == QDeclarativeScriptParser::Import::File && qmldircomponents.isEmpty()) {
+ QUrl importUrl = base.resolved(QUrl(uri + QLatin1String("/qmldir")));
+ QString localFileOrQrc = toLocalFileOrQrc(importUrl);
+ if (!localFileOrQrc.isEmpty()) {
+ QString dir = toLocalFileOrQrc(base.resolved(QUrl(uri)));
+ if (dir.isEmpty() || !QDir().exists(dir)) {
+ if (errorString)
+ *errorString = QDeclarativeImportDatabase::tr("\"%1\": no such directory").arg(uri_arg);
+ return false; // local import dirs must exist
+ }
+ uri = resolvedUri(toLocalFileOrQrc(base.resolved(QUrl(uri))), database);
+ if (uri.endsWith(QLatin1Char('/')))
+ uri.chop(1);
+ if (QFile::exists(localFileOrQrc)) {
+ if (!importExtension(localFileOrQrc,uri,database,&qmldircomponents,errorString))
+ return false;
+ }
+ } else {
+ if (prefix.isEmpty()) {
+ // directory must at least exist for valid import
+ QString localFileOrQrc = toLocalFileOrQrc(base.resolved(QUrl(uri)));
+ if (localFileOrQrc.isEmpty() || !QDir().exists(localFileOrQrc)) {
+ if (errorString) {
+ if (localFileOrQrc.isEmpty())
+ *errorString = QDeclarativeImportDatabase::tr("import \"%1\" has no qmldir and no namespace").arg(uri);
+ else
+ *errorString = QDeclarativeImportDatabase::tr("\"%1\": no such directory").arg(uri);
+ }
+ return false;
+ }
+ }
+ }
+ }
+
+ url = base.resolved(QUrl(url)).toString();
+ if (url.endsWith(QLatin1Char('/')))
+ url.chop(1);
+ }
+
+ if (vmaj > -1 && vmin > -1 && !qmldircomponents.isEmpty()) {
+ QList<QDeclarativeDirParser::Component>::ConstIterator it = qmldircomponents.begin();
+ for (; it != qmldircomponents.end(); ++it) {
+ if (it->majorVersion > vmaj || (it->majorVersion == vmaj && it->minorVersion >= vmin))
+ break;
+ }
+ if (it == qmldircomponents.end()) {
+ *errorString = QDeclarativeImportDatabase::tr("module \"%1\" version %2.%3 is not installed").arg(uri_arg).arg(vmaj).arg(vmin);
+ return false;
+ }
+ }
+
+ s->uris.prepend(uri);
+ s->urls.prepend(url);
+ s->majversions.prepend(vmaj);
+ s->minversions.prepend(vmin);
+ s->isLibrary.prepend(importType == QDeclarativeScriptParser::Import::Library);
+ s->qmlDirComponents.prepend(qmldircomponents);
+ return true;
+}
+
+bool QDeclarativeImportsPrivate::find(const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return,
+ QUrl* url_return, QString *errorString)
+{
+ QDeclarativeImportedNamespace *s = 0;
+ int slash = type.indexOf('/');
+ if (slash >= 0) {
+ QString namespaceName = QString::fromUtf8(type.left(slash));
+ s = set.value(namespaceName);
+ if (!s) {
+ if (errorString)
+ *errorString = QDeclarativeImportDatabase::tr("- %1 is not a namespace").arg(namespaceName);
+ return false;
+ }
+ int nslash = type.indexOf('/',slash+1);
+ if (nslash > 0) {
+ if (errorString)
+ *errorString = QDeclarativeImportDatabase::tr("- nested namespaces not allowed");
+ return false;
+ }
+ } else {
+ s = &unqualifiedset;
+ }
+ QByteArray unqualifiedtype = slash < 0 ? type : type.mid(slash+1); // common-case opt (QString::mid works fine, but slower)
+ if (s) {
+ if (s->find(unqualifiedtype,vmajor,vminor,type_return,url_return, &base, errorString))
+ return true;
+ if (s->urls.count() == 1 && !s->isLibrary[0] && url_return && s != &unqualifiedset) {
+ // qualified, and only 1 url
+ *url_return = QUrl(s->urls[0]+QLatin1Char('/')).resolved(QUrl(QString::fromUtf8(unqualifiedtype) + QLatin1String(".qml")));
+ return true;
+ }
+ }
+
+ return false;
+}
+
+QDeclarativeImportedNamespace *QDeclarativeImportsPrivate::findNamespace(const QString& type)
+{
+ return set.value(type);
+}
+
+bool QDeclarativeImportedNamespace::find(const QByteArray& type, int *vmajor, int *vminor, QDeclarativeType** type_return,
+ QUrl* url_return, QUrl *base, QString *errorString)
+{
+ bool typeRecursionDetected = false;
+ for (int i=0; i<urls.count(); ++i) {
+ if (find_helper(i, type, vmajor, vminor, type_return, url_return, base, &typeRecursionDetected)) {
+ if (qmlCheckTypes()) {
+ // check for type clashes
+ for (int j = i+1; j<urls.count(); ++j) {
+ if (find_helper(j, type, vmajor, vminor, 0, 0, base)) {
+ if (errorString) {
+ QString u1 = urls.at(i);
+ QString u2 = urls.at(j);
+ if (base) {
+ QString b = base->toString();
+ int slash = b.lastIndexOf(QLatin1Char('/'));
+ if (slash >= 0) {
+ b = b.left(slash+1);
+ QString l = b.left(slash);
+ if (u1.startsWith(b))
+ u1 = u1.mid(b.count());
+ else if (u1 == l)
+ u1 = QDeclarativeImportDatabase::tr("local directory");
+ if (u2.startsWith(b))
+ u2 = u2.mid(b.count());
+ else if (u2 == l)
+ u2 = QDeclarativeImportDatabase::tr("local directory");
+ }
+ }
+
+ if (u1 != u2)
+ *errorString
+ = QDeclarativeImportDatabase::tr("is ambiguous. Found in %1 and in %2")
+ .arg(u1).arg(u2);
+ else
+ *errorString
+ = QDeclarativeImportDatabase::tr("is ambiguous. Found in %1 in version %2.%3 and %4.%5")
+ .arg(u1)
+ .arg(majversions.at(i)).arg(minversions.at(i))
+ .arg(majversions.at(j)).arg(minversions.at(j));
+ }
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+ }
+ if (errorString) {
+ if (typeRecursionDetected)
+ *errorString = QDeclarativeImportDatabase::tr("is instantiated recursively");
+ else
+ *errorString = QDeclarativeImportDatabase::tr("is not a type");
+ }
+ return false;
+}
+
+QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e)
+: engine(e)
+{
+ filePluginPath << QLatin1String(".");
+
+ // Search order is applicationDirPath(), $QML_IMPORT_PATH, QLibraryInfo::ImportsPath
+
+ addImportPath(QLibraryInfo::location(QLibraryInfo::ImportsPath));
+
+ // env import paths
+ QByteArray envImportPath = qgetenv("QML_IMPORT_PATH");
+ if (!envImportPath.isEmpty()) {
+#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+ QLatin1Char pathSep(';');
+#else
+ QLatin1Char pathSep(':');
+#endif
+ QStringList paths = QString::fromLatin1(envImportPath).split(pathSep, QString::SkipEmptyParts);
+ for (int ii = paths.count() - 1; ii >= 0; --ii)
+ addImportPath(paths.at(ii));
+ }
+
+ addImportPath(QCoreApplication::applicationDirPath());
+}
+
+QDeclarativeImportDatabase::~QDeclarativeImportDatabase()
+{
+}
+
+/*!
+ \internal
+
+ Adds information to \a imports such that subsequent calls to resolveType()
+ will resolve types qualified by \a prefix by considering types found at the given \a uri.
+
+ The uri is either a directory (if importType is FileImport), or a URI resolved using paths
+ added via addImportPath() (if importType is LibraryImport).
+
+ The \a prefix may be empty, in which case the import location is considered for
+ unqualified types.
+
+ The base URL must already have been set with Import::setBaseUrl().
+*/
+bool QDeclarativeImportDatabase::addToImport(QDeclarativeImports* imports,
+ const QDeclarativeDirComponents &qmldircomponentsnetwork,
+ const QString& uri, const QString& prefix, int vmaj, int vmin,
+ QDeclarativeScriptParser::Import::Type importType,
+ QString *errorString)
+{
+ if (qmlImportTrace())
+ qDebug().nospace() << "QDeclarativeImportDatabase::addToImport " << imports << " " << uri << " "
+ << vmaj << '.' << vmin << " "
+ << (importType==QDeclarativeScriptParser::Import::Library? "Library" : "File")
+ << " as " << prefix;
+
+ bool ok = imports->d->add(qmldircomponentsnetwork, uri, prefix, vmaj, vmin, importType, this, errorString);
+ return ok;
+}
+
+/*!
+ \internal
+
+ Using the given \a imports, the given (namespace qualified) \a type is resolved to either
+ a QDeclarativeImportedNamespace stored at \a ns_return,
+ a QDeclarativeType stored at \a type_return, or
+ a component located at \a url_return.
+
+ If any return pointer is 0, the corresponding search is not done.
+
+ \sa addToImport()
+*/
+bool QDeclarativeImportDatabase::resolveType(const QDeclarativeImports& imports, const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return, int *vmaj, int *vmin,
+ QDeclarativeImportedNamespace** ns_return, QString *errorString) const
+{
+ QDeclarativeImportedNamespace* ns = imports.d->findNamespace(QString::fromUtf8(type));
+ if (ns) {
+ if (ns_return)
+ *ns_return = ns;
+ return true;
+ }
+ if (type_return || url_return) {
+ if (imports.d->find(type,vmaj,vmin,type_return,url_return, errorString)) {
+ if (qmlImportTrace()) {
+ if (type_return && *type_return && url_return && !url_return->isEmpty())
+ qDebug() << "QDeclarativeImportDatabase::resolveType" << type << '=' << (*type_return)->typeName() << *url_return;
+ if (type_return && *type_return)
+ qDebug() << "QDeclarativeImportDatabase::resolveType" << type << '=' << (*type_return)->typeName();
+ if (url_return && !url_return->isEmpty())
+ qDebug() << "QDeclarativeImportDatabase::resolveType" << type << '=' << *url_return;
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
+/*!
+ \internal
+
+ Searching \e only in the namespace \a ns (previously returned in a call to
+ resolveType(), \a type is found and returned to either
+ a QDeclarativeType stored at \a type_return, or
+ a component located at \a url_return.
+
+ If either return pointer is 0, the corresponding search is not done.
+*/
+bool QDeclarativeImportDatabase::resolveTypeInNamespace(QDeclarativeImportedNamespace* ns, const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return,
+ int *vmaj, int *vmin) const
+{
+ return ns->find(type,vmaj,vmin,type_return,url_return);
+}
+
+/*!
+ \internal
+
+ Returns the result of the merge of \a baseName with \a path, \a suffixes, and \a prefix.
+ The \a prefix must contain the dot.
+
+ \a qmldirPath is the location of the qmldir file.
+ */
+QString QDeclarativeImportDatabase::resolvePlugin(const QDir &qmldirPath, const QString &qmldirPluginPath,
+ const QString &baseName, const QStringList &suffixes,
+ const QString &prefix)
+{
+ QStringList searchPaths = filePluginPath;
+ bool qmldirPluginPathIsRelative = QDir::isRelativePath(qmldirPluginPath);
+ if (!qmldirPluginPathIsRelative)
+ searchPaths.prepend(qmldirPluginPath);
+
+ foreach (const QString &pluginPath, searchPaths) {
+
+ QString resolvedPath;
+
+ if (pluginPath == QLatin1String(".")) {
+ if (qmldirPluginPathIsRelative)
+ resolvedPath = qmldirPath.absoluteFilePath(qmldirPluginPath);
+ else
+ resolvedPath = qmldirPath.absolutePath();
+ } else {
+ resolvedPath = pluginPath;
+ }
+
+ // hack for resources, should probably go away
+ if (resolvedPath.startsWith(QLatin1Char(':')))
+ resolvedPath = QCoreApplication::applicationDirPath();
+
+ QDir dir(resolvedPath);
+ foreach (const QString &suffix, suffixes) {
+ QString pluginFileName = prefix;
+
+ pluginFileName += baseName;
+ pluginFileName += suffix;
+
+ QFileInfo fileInfo(dir, pluginFileName);
+
+ if (fileInfo.exists())
+ return fileInfo.absoluteFilePath();
+ }
+ }
+
+ if (qmlImportTrace())
+ qDebug() << "QDeclarativeImportDatabase::resolvePlugin: Could not resolve plugin" << baseName
+ << "in" << qmldirPath.absolutePath();
+
+ return QString();
+}
+
+/*!
+ \internal
+
+ Returns the result of the merge of \a baseName with \a dir and the platform suffix.
+
+ \table
+ \header \i Platform \i Valid suffixes
+ \row \i Windows \i \c .dll
+ \row \i Unix/Linux \i \c .so
+ \row \i AIX \i \c .a
+ \row \i HP-UX \i \c .sl, \c .so (HP-UXi)
+ \row \i Mac OS X \i \c .dylib, \c .bundle, \c .so
+ \row \i Symbian \i \c .dll
+ \endtable
+
+ Version number on unix are ignored.
+*/
+QString QDeclarativeImportDatabase::resolvePlugin(const QDir &qmldirPath, const QString &qmldirPluginPath,
+ const QString &baseName)
+{
+#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
+ return resolvePlugin(qmldirPath, qmldirPluginPath, baseName,
+ QStringList()
+# ifdef QT_DEBUG
+ << QLatin1String("d.dll") // try a qmake-style debug build first
+# endif
+ << QLatin1String(".dll"));
+#elif defined(Q_OS_SYMBIAN)
+ return resolvePlugin(qmldirPath, qmldirPluginPath, baseName,
+ QStringList()
+ << QLatin1String(".dll")
+ << QLatin1String(".qtplugin"));
+#else
+
+# if defined(Q_OS_DARWIN)
+
+ return resolvePlugin(qmldirPath, qmldirPluginPath, baseName,
+ QStringList()
+# ifdef QT_DEBUG
+ << QLatin1String("_debug.dylib") // try a qmake-style debug build first
+ << QLatin1String(".dylib")
+# else
+ << QLatin1String(".dylib")
+ << QLatin1String("_debug.dylib") // try a qmake-style debug build after
+# endif
+ << QLatin1String(".so")
+ << QLatin1String(".bundle"),
+ QLatin1String("lib"));
+# else // Generic Unix
+ QStringList validSuffixList;
+
+# if defined(Q_OS_HPUX)
+/*
+ See "HP-UX Linker and Libraries User's Guide", section "Link-time Differences between PA-RISC and IPF":
+ "In PA-RISC (PA-32 and PA-64) shared libraries are suffixed with .sl. In IPF (32-bit and 64-bit),
+ the shared libraries are suffixed with .so. For compatibility, the IPF linker also supports the .sl suffix."
+ */
+ validSuffixList << QLatin1String(".sl");
+# if defined __ia64
+ validSuffixList << QLatin1String(".so");
+# endif
+# elif defined(Q_OS_AIX)
+ validSuffixList << QLatin1String(".a") << QLatin1String(".so");
+# elif defined(Q_OS_UNIX)
+ validSuffixList << QLatin1String(".so");
+# endif
+
+ // Examples of valid library names:
+ // libfoo.so
+
+ return resolvePlugin(qmldirPath, qmldirPluginPath, baseName, validSuffixList, QLatin1String("lib"));
+# endif
+
+#endif
+}
+
+QStringList QDeclarativeImportDatabase::pluginPathList() const
+{
+ return filePluginPath;
+}
+
+void QDeclarativeImportDatabase::setPluginPathList(const QStringList &paths)
+{
+ filePluginPath = paths;
+}
+
+void QDeclarativeImportDatabase::addPluginPath(const QString& path)
+{
+ if (qmlImportTrace())
+ qDebug() << "QDeclarativeImportDatabase::addPluginPath" << path;
+
+ QUrl url = QUrl(path);
+ if (url.isRelative() || url.scheme() == QString::fromLocal8Bit("file")) {
+ QDir dir = QDir(path);
+ filePluginPath.prepend(dir.canonicalPath());
+ } else {
+ filePluginPath.prepend(path);
+ }
+}
+
+void QDeclarativeImportDatabase::addImportPath(const QString& path)
+{
+ if (qmlImportTrace())
+ qDebug() << "QDeclarativeImportDatabase::addImportPath" << path;
+
+ if (path.isEmpty())
+ return;
+
+ QUrl url = QUrl(path);
+ QString cPath;
+
+ if (url.isRelative() || url.scheme() == QString::fromLocal8Bit("file")) {
+ QDir dir = QDir(path);
+ cPath = dir.canonicalPath();
+ } else {
+ cPath = path;
+ }
+
+ if (!cPath.isEmpty()
+ && !fileImportPath.contains(cPath))
+ fileImportPath.prepend(cPath);
+}
+
+QStringList QDeclarativeImportDatabase::importPathList() const
+{
+ return fileImportPath;
+}
+
+void QDeclarativeImportDatabase::setImportPathList(const QStringList &paths)
+{
+ fileImportPath = paths;
+}
+
+
+bool QDeclarativeImportDatabase::importPlugin(const QString &filePath, const QString &uri, QString *errorString)
+{
+ if (qmlImportTrace())
+ qDebug() << "QDeclarativeImportDatabase::importPlugin" << uri << "from" << filePath;
+
+ QFileInfo fileInfo(filePath);
+ const QString absoluteFilePath = fileInfo.absoluteFilePath();
+
+ bool engineInitialized = initializedPlugins.contains(absoluteFilePath);
+ bool typesRegistered = qmlEnginePluginsWithRegisteredTypes()->contains(absoluteFilePath);
+
+ if (typesRegistered) {
+ Q_ASSERT_X(qmlEnginePluginsWithRegisteredTypes()->value(absoluteFilePath) == uri,
+ "QDeclarativeImportDatabase::importExtension",
+ "Internal error: Plugin imported previously with different uri");
+ }
+
+ if (!engineInitialized || !typesRegistered) {
+ QPluginLoader loader(absoluteFilePath);
+
+ if (!loader.load()) {
+ if (errorString)
+ *errorString = loader.errorString();
+ return false;
+ }
+
+ if (QDeclarativeExtensionInterface *iface = qobject_cast<QDeclarativeExtensionInterface *>(loader.instance())) {
+
+ const QByteArray bytes = uri.toUtf8();
+ const char *moduleId = bytes.constData();
+ if (!typesRegistered) {
+
+ // ### this code should probably be protected with a mutex.
+ qmlEnginePluginsWithRegisteredTypes()->insert(absoluteFilePath, uri);
+ iface->registerTypes(moduleId);
+ }
+ if (!engineInitialized) {
+ // things on the engine (eg. adding new global objects) have to be done for every engine.
+
+ // protect against double initialization
+ initializedPlugins.insert(absoluteFilePath);
+ iface->initializeEngine(engine, moduleId);
+ }
+ } else {
+ if (errorString)
+ *errorString = loader.errorString();
+ return false;
+ }
+ }
+
+ return true;
+}
+
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeimport_p.h b/src/declarative/qml/qdeclarativeimport_p.h
new file mode 100644
index 0000000..88246d4
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeimport_p.h
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** 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 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 QDECLARATIVEIMPORT_P_H
+#define QDECLARATIVEIMPORT_P_H
+
+#include <QtCore/qurl.h>
+#include <QtCore/qcoreapplication.h>
+#include <QtCore/qset.h>
+#include <private/qdeclarativedirparser_p.h>
+#include <private/qdeclarativescriptparser_p.h>
+#include <private/qdeclarativemetatype_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.
+//
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeTypeNameCache;
+class QDeclarativeEngine;
+class QDir;
+
+class QDeclarativeImportedNamespace;
+class QDeclarativeImportsPrivate;
+class QDeclarativeImports
+{
+public:
+ QDeclarativeImports();
+ QDeclarativeImports(const QDeclarativeImports &);
+ ~QDeclarativeImports();
+ QDeclarativeImports &operator=(const QDeclarativeImports &);
+
+ void setBaseUrl(const QUrl &url);
+ QUrl baseUrl() const;
+
+ void cache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *) const;
+private:
+ friend class QDeclarativeImportDatabase;
+ QDeclarativeImportsPrivate *d;
+};
+
+class QDeclarativeImportDatabase
+{
+ Q_DECLARE_TR_FUNCTIONS(QDeclarativeImportDatabase)
+public:
+ QDeclarativeImportDatabase(QDeclarativeEngine *);
+ ~QDeclarativeImportDatabase();
+
+ bool importPlugin(const QString &filePath, const QString &uri, QString *errorString);
+
+ QStringList importPathList() const;
+ void setImportPathList(const QStringList &paths);
+ void addImportPath(const QString& dir);
+
+ QStringList pluginPathList() const;
+ void setPluginPathList(const QStringList &paths);
+ void addPluginPath(const QString& path);
+
+
+ bool addToImport(QDeclarativeImports*, const QDeclarativeDirComponents &qmldircomponentsnetwork,
+ const QString& uri, const QString& prefix, int vmaj, int vmin,
+ QDeclarativeScriptParser::Import::Type importType,
+ QString *errorString);
+ bool resolveType(const QDeclarativeImports&, const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return,
+ int *version_major, int *version_minor,
+ QDeclarativeImportedNamespace** ns_return,
+ QString *errorString = 0) const;
+ bool resolveTypeInNamespace(QDeclarativeImportedNamespace*, const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return,
+ int *version_major, int *version_minor ) const;
+
+
+private:
+ friend class QDeclarativeImportsPrivate;
+ QString resolvePlugin(const QDir &qmldirPath, const QString &qmldirPluginPath,
+ const QString &baseName, const QStringList &suffixes,
+ const QString &prefix = QString());
+ QString resolvePlugin(const QDir &qmldirPath, const QString &qmldirPluginPath,
+ const QString &baseName);
+
+
+ QStringList filePluginPath;
+ QStringList fileImportPath;
+
+ QSet<QString> initializedPlugins;
+ QDeclarativeEngine *engine;
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEIMPORT_P_H
+
diff --git a/src/declarative/qml/qdeclarativeinclude.cpp b/src/declarative/qml/qdeclarativeinclude.cpp
new file mode 100644
index 0000000..e37b68b
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeinclude.cpp
@@ -0,0 +1,319 @@
+/****************************************************************************
+**
+** 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 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 "qdeclarativeinclude_p.h"
+
+#include <QtScript/qscriptengine.h>
+#include <QtNetwork/qnetworkrequest.h>
+#include <QtNetwork/qnetworkreply.h>
+#include <QtCore/qfile.h>
+
+#include <private/qdeclarativeengine_p.h>
+#include <private/qdeclarativeglobalscriptclass_p.h>
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeInclude::QDeclarativeInclude(const QUrl &url,
+ QDeclarativeEngine *engine,
+ QScriptContext *ctxt)
+: QObject(engine), m_engine(engine), m_network(0), m_reply(0), m_url(url), m_redirectCount(0)
+{
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+ m_context = ep->contextClass->contextFromValue(QScriptDeclarativeClass::scopeChainValue(ctxt, -3));
+
+ m_scope[0] = QScriptDeclarativeClass::scopeChainValue(ctxt, -4);
+ m_scope[1] = QScriptDeclarativeClass::scopeChainValue(ctxt, -5);
+
+ m_scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
+ m_network = QDeclarativeScriptEngine::get(m_scriptEngine)->networkAccessManager();
+
+ m_result = resultValue(m_scriptEngine);
+
+ QNetworkRequest request;
+ request.setUrl(url);
+
+ m_reply = m_network->get(request);
+ QObject::connect(m_reply, SIGNAL(finished()), this, SLOT(finished()));
+}
+
+QDeclarativeInclude::~QDeclarativeInclude()
+{
+ delete m_reply;
+}
+
+QScriptValue QDeclarativeInclude::resultValue(QScriptEngine *engine, Status status)
+{
+ QScriptValue result = engine->newObject();
+ result.setProperty(QLatin1String("OK"), QScriptValue(engine, Ok));
+ result.setProperty(QLatin1String("LOADING"), QScriptValue(engine, Loading));
+ result.setProperty(QLatin1String("NETWORK_ERROR"), QScriptValue(engine, NetworkError));
+ result.setProperty(QLatin1String("EXCEPTION"), QScriptValue(engine, Exception));
+
+ result.setProperty(QLatin1String("status"), QScriptValue(engine, status));
+ return result;
+}
+
+QScriptValue QDeclarativeInclude::result() const
+{
+ return m_result;
+}
+
+void QDeclarativeInclude::setCallback(const QScriptValue &c)
+{
+ m_callback = c;
+}
+
+QScriptValue QDeclarativeInclude::callback() const
+{
+ return m_callback;
+}
+
+#define INCLUDE_MAXIMUM_REDIRECT_RECURSION 15
+void QDeclarativeInclude::finished()
+{
+ m_redirectCount++;
+
+ if (m_redirectCount < INCLUDE_MAXIMUM_REDIRECT_RECURSION) {
+ QVariant redirect = m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
+ if (redirect.isValid()) {
+ m_url = m_url.resolved(redirect.toUrl());
+ delete m_reply;
+
+ QNetworkRequest request;
+ request.setUrl(m_url);
+
+ m_reply = m_network->get(request);
+ QObject::connect(m_reply, SIGNAL(finished()), this, SLOT(finished()));
+ return;
+ }
+ }
+
+ if (m_reply->error() == QNetworkReply::NoError) {
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(m_engine);
+
+ QByteArray data = m_reply->readAll();
+
+ QString code = QString::fromUtf8(data);
+
+ QString urlString = m_url.toString();
+ QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(m_scriptEngine);
+ scriptContext->pushScope(ep->contextClass->newUrlContext(m_context, 0, urlString));
+ scriptContext->pushScope(m_scope[0]);
+
+ scriptContext->pushScope(m_scope[1]);
+ scriptContext->setActivationObject(m_scope[1]);
+ QDeclarativeScriptParser::extractPragmas(code);
+
+ m_scriptEngine->evaluate(code, urlString, 1);
+
+ m_scriptEngine->popContext();
+
+ if (m_scriptEngine->hasUncaughtException()) {
+ m_result.setProperty(QLatin1String("status"), QScriptValue(m_scriptEngine, Exception));
+ m_result.setProperty(QLatin1String("exception"), m_scriptEngine->uncaughtException());
+ m_scriptEngine->clearExceptions();
+ } else {
+ m_result.setProperty(QLatin1String("status"), QScriptValue(m_scriptEngine, Ok));
+ }
+ } else {
+ m_result.setProperty(QLatin1String("status"), QScriptValue(m_scriptEngine, NetworkError));
+ }
+
+ callback(m_scriptEngine, m_callback, m_result);
+
+ disconnect();
+ deleteLater();
+}
+
+void QDeclarativeInclude::callback(QScriptEngine *engine, QScriptValue &callback, QScriptValue &status)
+{
+ if (callback.isValid()) {
+ QScriptValue args = engine->newArray(1);
+ args.setProperty(0, status);
+ callback.call(QScriptValue(), args);
+ }
+}
+
+static QString toLocalFileOrQrc(const QUrl& url)
+{
+ if (url.scheme() == QLatin1String("qrc")) {
+ if (url.authority().isEmpty())
+ return QLatin1Char(':') + url.path();
+ return QString();
+ }
+ return url.toLocalFile();
+}
+
+QScriptValue QDeclarativeInclude::include(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ if (ctxt->argumentCount() == 0)
+ return engine->undefinedValue();
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+
+ QUrl contextUrl = ep->contextClass->urlFromValue(QScriptDeclarativeClass::scopeChainValue(ctxt, -3));
+ if (contextUrl.isEmpty())
+ return ctxt->throwError(QLatin1String("Qt.include(): Can only be called from JavaScript files"));
+
+ QString urlString = ctxt->argument(0).toString();
+ QUrl url(ctxt->argument(0).toString());
+ if (url.isRelative()) {
+ url = QUrl(contextUrl).resolved(url);
+ urlString = url.toString();
+ }
+
+ QString localFile = toLocalFileOrQrc(url);
+
+ QScriptValue func = ctxt->argument(1);
+ if (!func.isFunction())
+ func = QScriptValue();
+
+ QScriptValue result;
+ if (localFile.isEmpty()) {
+ QDeclarativeInclude *i =
+ new QDeclarativeInclude(url, QDeclarativeEnginePrivate::getEngine(engine), ctxt);
+
+ if (func.isValid())
+ i->setCallback(func);
+
+ result = i->result();
+ } else {
+
+ QFile f(localFile);
+ if (f.open(QIODevice::ReadOnly)) {
+ QByteArray data = f.readAll();
+ QString code = QString::fromUtf8(data);
+
+ QDeclarativeContextData *context =
+ ep->contextClass->contextFromValue(QScriptDeclarativeClass::scopeChainValue(ctxt, -3));
+
+ QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(engine);
+ scriptContext->pushScope(ep->contextClass->newUrlContext(context, 0, urlString));
+ scriptContext->pushScope(ep->globalClass->globalObject());
+ QScriptValue scope = QScriptDeclarativeClass::scopeChainValue(ctxt, -5);
+ scriptContext->pushScope(scope);
+ scriptContext->setActivationObject(scope);
+ QDeclarativeScriptParser::extractPragmas(code);
+
+ engine->evaluate(code, urlString, 1);
+
+ engine->popContext();
+
+ if (engine->hasUncaughtException()) {
+ result = resultValue(engine, Exception);
+ result.setProperty(QLatin1String("exception"), engine->uncaughtException());
+ engine->clearExceptions();
+ } else {
+ result = resultValue(engine, Ok);
+ }
+ callback(engine, func, result);
+ } else {
+ result = resultValue(engine, NetworkError);
+ callback(engine, func, result);
+ }
+ }
+
+ return result;
+}
+
+QScriptValue QDeclarativeInclude::worker_include(QScriptContext *ctxt, QScriptEngine *engine)
+{
+ if (ctxt->argumentCount() == 0)
+ return engine->undefinedValue();
+
+ QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
+
+ QString urlString = ctxt->argument(0).toString();
+ QUrl url(ctxt->argument(0).toString());
+ if (url.isRelative()) {
+ QString contextUrl = QScriptDeclarativeClass::scopeChainValue(ctxt, -3).data().toString();
+ Q_ASSERT(!contextUrl.isEmpty());
+
+ url = QUrl(contextUrl).resolved(url);
+ urlString = url.toString();
+ }
+
+ QString localFile = toLocalFileOrQrc(url);
+
+ QScriptValue func = ctxt->argument(1);
+ if (!func.isFunction())
+ func = QScriptValue();
+
+ QScriptValue result;
+ if (!localFile.isEmpty()) {
+
+ QFile f(localFile);
+ if (f.open(QIODevice::ReadOnly)) {
+ QByteArray data = f.readAll();
+ QString code = QString::fromUtf8(data);
+
+ QScriptContext *scriptContext = QScriptDeclarativeClass::pushCleanContext(engine);
+ QScriptValue urlContext = engine->newObject();
+ urlContext.setData(QScriptValue(engine, urlString));
+ scriptContext->pushScope(urlContext);
+
+ QScriptValue scope = QScriptDeclarativeClass::scopeChainValue(ctxt, -4);
+ scriptContext->pushScope(scope);
+ scriptContext->setActivationObject(scope);
+ QDeclarativeScriptParser::extractPragmas(code);
+
+ engine->evaluate(code, urlString, 1);
+
+ engine->popContext();
+
+ if (engine->hasUncaughtException()) {
+ result = resultValue(engine, Exception);
+ result.setProperty(QLatin1String("exception"), engine->uncaughtException());
+ engine->clearExceptions();
+ } else {
+ result = resultValue(engine, Ok);
+ }
+ callback(engine, func, result);
+ } else {
+ result = resultValue(engine, NetworkError);
+ callback(engine, func, result);
+ }
+ }
+
+ return result;
+}
+
+QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeinclude_p.h b/src/declarative/qml/qdeclarativeinclude_p.h
new file mode 100644
index 0000000..3124374
--- /dev/null
+++ b/src/declarative/qml/qdeclarativeinclude_p.h
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** 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 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 QDECLARATIVEINCLUDE_P_H
+#define QDECLARATIVEINCLUDE_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/qobject.h>
+#include <QtCore/qurl.h>
+#include <QtScript/qscriptvalue.h>
+
+#include <private/qdeclarativecontext_p.h>
+#include <private/qdeclarativeguard_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeEngine;
+class QScriptContext;
+class QScriptEngine;
+class QNetworkAccessManager;
+class QNetworkReply;
+class QDeclarativeInclude : public QObject
+{
+ Q_OBJECT
+public:
+ enum Status {
+ Ok = 0,
+ Loading = 1,
+ NetworkError = 2,
+ Exception = 3
+ };
+
+ QDeclarativeInclude(const QUrl &, QDeclarativeEngine *, QScriptContext *ctxt);
+ ~QDeclarativeInclude();
+
+ void setCallback(const QScriptValue &);
+ QScriptValue callback() const;
+
+ QScriptValue result() const;
+
+ static QScriptValue resultValue(QScriptEngine *, Status status = Loading);
+ static void callback(QScriptEngine *, QScriptValue &callback, QScriptValue &status);
+
+ static QScriptValue include(QScriptContext *ctxt, QScriptEngine *engine);
+ static QScriptValue worker_include(QScriptContext *ctxt, QScriptEngine *engine);
+
+public slots:
+ void finished();
+
+private:
+ QDeclarativeEngine *m_engine;
+ QScriptEngine *m_scriptEngine;
+ QNetworkAccessManager *m_network;
+ QDeclarativeGuard<QNetworkReply> m_reply;
+
+ QUrl m_url;
+ int m_redirectCount;
+ QScriptValue m_callback;
+ QScriptValue m_result;
+ QDeclarativeGuardedContextData m_context;
+ QScriptValue m_scope[2];
+};
+
+QT_END_NAMESPACE
+
+#endif // QDECLARATIVEINCLUDE_P_H
+
diff --git a/src/declarative/qml/qdeclarativeinfo.cpp b/src/declarative/qml/qdeclarativeinfo.cpp
index ffed14e..c980a2a 100644
--- a/src/declarative/qml/qdeclarativeinfo.cpp
+++ b/src/declarative/qml/qdeclarativeinfo.cpp
@@ -78,8 +78,9 @@ QT_BEGIN_NAMESPACE
\endcode
*/
-struct QDeclarativeInfoPrivate
+class QDeclarativeInfoPrivate
{
+public:
QDeclarativeInfoPrivate() : ref (1), object(0) {}
int ref;
diff --git a/src/declarative/qml/qdeclarativeinstruction.cpp b/src/declarative/qml/qdeclarativeinstruction.cpp
index 99f1cc8..b86d082 100644
--- a/src/declarative/qml/qdeclarativeinstruction.cpp
+++ b/src/declarative/qml/qdeclarativeinstruction.cpp
@@ -60,6 +60,7 @@ void QDeclarativeCompiledData::dump(QDeclarativeInstruction *instr, int idx)
break;
case QDeclarativeInstruction::CreateObject:
qWarning().nospace() << idx << "\t\t" << line << "\t" << "CREATE\t\t\t" << instr->create.type << "\t\t\t" << types.at(instr->create.type).className;
+ break;
case QDeclarativeInstruction::CreateSimpleObject:
qWarning().nospace() << idx << "\t\t" << line << "\t" << "CREATE_SIMPLE\t\t" << instr->createSimple.typeSize;
break;
@@ -136,6 +137,9 @@ void QDeclarativeCompiledData::dump(QDeclarativeInstruction *instr, int idx)
case QDeclarativeInstruction::StoreVariantDouble:
qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_VARIANT_DOUBLE\t\t" << instr->storeDouble.propertyIndex << "\t" << instr->storeDouble.value;
break;
+ case QDeclarativeInstruction::StoreVariantBool:
+ qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_VARIANT_BOOL\t\t" << instr->storeBool.propertyIndex << "\t" << instr->storeBool.value;
+ break;
case QDeclarativeInstruction::StoreObject:
qWarning().nospace() << idx << "\t\t" << line << "\t" << "STORE_OBJECT\t\t" << instr->storeObject.propertyIndex;
break;
diff --git a/src/declarative/qml/qdeclarativeinstruction_p.h b/src/declarative/qml/qdeclarativeinstruction_p.h
index c09b157..dc5f2f8 100644
--- a/src/declarative/qml/qdeclarativeinstruction_p.h
+++ b/src/declarative/qml/qdeclarativeinstruction_p.h
@@ -116,6 +116,7 @@ public:
StoreVariant, /* storeString */
StoreVariantInteger, /* storeInteger */
StoreVariantDouble, /* storeDouble */
+ StoreVariantBool, /* storeBool */
StoreObject, /* storeObject */
StoreVariantObject, /* storeObject */
StoreInterface, /* storeObject */
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
index bb5c8b7..8b64e0e 100644
--- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
+++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
@@ -104,7 +104,8 @@ QScriptValue QDeclarativeObjectScriptClass::newQObject(QObject *object, int type
QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
if (!object)
- return newObject(scriptEngine, this, new ObjectData(object, type));
+ return scriptEngine->nullValue();
+// return newObject(scriptEngine, this, new ObjectData(object, type));
if (QObjectPrivate::get(object)->wasDeleted)
return scriptEngine->undefinedValue();
@@ -265,7 +266,7 @@ QDeclarativeObjectScriptClass::property(QObject *obj, const Identifier &name)
void *args[] = { &rv, 0 };
QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args);
return Value(scriptEngine, rv);
- } else if (lastData->propType == QMetaType::Int) {
+ } else if (lastData->propType == QMetaType::Int || lastData->flags & QDeclarativePropertyCache::Data::IsEnumType) {
int rv = 0;
void *args[] = { &rv, 0 };
QMetaObject::metacall(obj, QMetaObject::ReadProperty, lastData->coreIndex, args);
@@ -368,6 +369,9 @@ void QDeclarativeObjectScriptClass::setProperty(QObject *obj,
QString error = QLatin1String("Cannot assign [undefined] to ") +
QLatin1String(QMetaType::typeName(lastData->propType));
context->throwError(error);
+ } else if (!value.isRegExp() && value.isFunction()) {
+ QString error = QLatin1String("Cannot assign a function to a property.");
+ context->throwError(error);
} else {
QVariant v;
if (lastData->flags & QDeclarativePropertyCache::Data::IsQList)
@@ -441,7 +445,7 @@ QScriptValue QDeclarativeObjectScriptClass::destroy(QScriptContext *context, QSc
QDeclarativeData *ddata = QDeclarativeData::get(data->object, false);
if (!ddata || ddata->indestructible)
- return engine->currentContext()->throwError(QLatin1String("Invalid attempt to destroy() an indestructible object"));
+ return engine->currentContext()->throwError(QLatin1String("Invalid attempt to destroy() an indestructible object"));
QObject *obj = data->object;
int delay = 0;
@@ -772,7 +776,8 @@ QScriptDeclarativeClass::Value MetaCallArgument::toValue(QDeclarativeEngine *e)
return QScriptDeclarativeClass::Value(engine, *((QString *)&data));
} else if (type == QMetaType::QObjectStar) {
QObject *object = *((QObject **)&data);
- QDeclarativeData::get(object, true)->setImplicitDestructible();
+ if (object)
+ QDeclarativeData::get(object, true)->setImplicitDestructible();
QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(e);
return QScriptDeclarativeClass::Value(engine, priv->objectClass->newQObject(object));
} else if (type == qMetaTypeId<QList<QObject *> >()) {
diff --git a/src/declarative/qml/qdeclarativeparser.cpp b/src/declarative/qml/qdeclarativeparser.cpp
index b38bd76..8d00ef8 100644
--- a/src/declarative/qml/qdeclarativeparser.cpp
+++ b/src/declarative/qml/qdeclarativeparser.cpp
@@ -57,6 +57,7 @@
#include <QPointF>
#include <QSizeF>
#include <QRectF>
+#include <QStringBuilder>
#include <QtDebug>
QT_BEGIN_NAMESPACE
@@ -310,6 +311,49 @@ double QDeclarativeParser::Variant::asNumber() const
return d;
}
+//reverse of Lexer::singleEscape()
+QString escapedString(const QString &string)
+{
+ QString tmp = QLatin1String("\"");
+ for (int i = 0; i < string.length(); ++i) {
+ const QChar &c = string.at(i);
+ switch(c.unicode()) {
+ case 0x08:
+ tmp += QLatin1String("\\b");
+ break;
+ case 0x09:
+ tmp += QLatin1String("\\t");
+ break;
+ case 0x0A:
+ tmp += QLatin1String("\\n");
+ break;
+ case 0x0B:
+ tmp += QLatin1String("\\v");
+ break;
+ case 0x0C:
+ tmp += QLatin1String("\\f");
+ break;
+ case 0x0D:
+ tmp += QLatin1String("\\r");
+ break;
+ case 0x22:
+ tmp += QLatin1String("\\\"");
+ break;
+ case 0x27:
+ tmp += QLatin1String("\\\'");
+ break;
+ case 0x5C:
+ tmp += QLatin1String("\\\\");
+ break;
+ default:
+ tmp += c;
+ break;
+ }
+ }
+ tmp += QLatin1Char('\"');
+ return tmp;
+}
+
QString QDeclarativeParser::Variant::asScript() const
{
switch(type()) {
@@ -324,6 +368,7 @@ QString QDeclarativeParser::Variant::asScript() const
else
return s;
case String:
+ return escapedString(s);
case Script:
return s;
}
diff --git a/src/declarative/qml/qdeclarativeparser_p.h b/src/declarative/qml/qdeclarativeparser_p.h
index 0870cfb..d192f3a 100644
--- a/src/declarative/qml/qdeclarativeparser_p.h
+++ b/src/declarative/qml/qdeclarativeparser_p.h
@@ -188,9 +188,6 @@ namespace QDeclarativeParser
QList<int> lineNumbers;
QList<Pragmas> pragmas;
};
-#if 0
- QList<ScriptBlock> scripts;
-#endif
// The bytes to cast instances by to get to the QDeclarativeParserStatus
// interface. -1 indicates the type doesn't support this interface.
@@ -310,8 +307,8 @@ namespace QDeclarativeParser
};
Type type;
- // ### Temporary
- QString primitive() const { return value.asScript(); }
+ // ### Temporary (for id only)
+ QString primitive() const { return value.isString() ? value.asString() : value.asScript(); }
// Primitive value
Variant value;
diff --git a/src/declarative/qml/qdeclarativeparserstatus.cpp b/src/declarative/qml/qdeclarativeparserstatus.cpp
index 978bfb4..4c4e429 100644
--- a/src/declarative/qml/qdeclarativeparserstatus.cpp
+++ b/src/declarative/qml/qdeclarativeparserstatus.cpp
@@ -91,19 +91,17 @@ QDeclarativeParserStatus::~QDeclarativeParserStatus()
}
/*!
+ \fn void QDeclarativeParserStatus::classBegin()
+
Invoked after class creation, but before any properties have been set.
*/
-void QDeclarativeParserStatus::classBegin()
-{
-}
/*!
+ \fn void QDeclarativeParserStatus::componentComplete()
+
Invoked after the root component that caused this instantiation has
completed construction. At this point all static values and binding values
have been assigned to the class.
*/
-void QDeclarativeParserStatus::componentComplete()
-{
-}
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeparserstatus.h b/src/declarative/qml/qdeclarativeparserstatus.h
index 34528c1..60d423e 100644
--- a/src/declarative/qml/qdeclarativeparserstatus.h
+++ b/src/declarative/qml/qdeclarativeparserstatus.h
@@ -56,8 +56,8 @@ public:
QDeclarativeParserStatus();
virtual ~QDeclarativeParserStatus();
- virtual void classBegin();
- virtual void componentComplete();
+ virtual void classBegin()=0;
+ virtual void componentComplete()=0;
private:
friend class QDeclarativeVME;
diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp
index 3881d0a..071dd07 100644
--- a/src/declarative/qml/qdeclarativeproperty.cpp
+++ b/src/declarative/qml/qdeclarativeproperty.cpp
@@ -1049,26 +1049,24 @@ bool QDeclarativePropertyPrivate::write(QObject *object, const QDeclarativePrope
} else {
Q_ASSERT(variantType != propertyType);
- QVariant v = value;
- if (v.convert((QVariant::Type)propertyType)) {
- void *a[] = { (void *)v.constData(), 0, &status, &flags};
- QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx, a);
- } else if ((uint)propertyType >= QVariant::UserType && variantType == QVariant::String) {
- QDeclarativeMetaType::StringConverter con = QDeclarativeMetaType::customStringConverter(propertyType);
- if (!con)
- return false;
-
- QVariant v = con(value.toString());
- if (v.userType() == propertyType) {
- void *a[] = { (void *)v.constData(), 0, &status, &flags};
- QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx, a);
+ bool ok = false;
+ QVariant v;
+ if (variantType == QVariant::String)
+ v = QDeclarativeStringConverters::variantFromString(value.toString(), propertyType, &ok);
+ if (!ok) {
+ v = value;
+ if (v.convert((QVariant::Type)propertyType)) {
+ ok = true;
+ } else if ((uint)propertyType >= QVariant::UserType && variantType == QVariant::String) {
+ QDeclarativeMetaType::StringConverter con = QDeclarativeMetaType::customStringConverter(propertyType);
+ if (con) {
+ v = con(value.toString());
+ if (v.userType() == propertyType)
+ ok = true;
+ }
}
- } else if (variantType == QVariant::String) {
- bool ok = false;
- QVariant v = QDeclarativeStringConverters::variantFromString(value.toString(), propertyType, &ok);
- if (!ok)
- return false;
-
+ }
+ if (ok) {
void *a[] = { (void *)v.constData(), 0, &status, &flags};
QMetaObject::metacall(object, QMetaObject::WriteProperty, coreIdx, a);
} else {
diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp
index 888945b..839d79f 100644
--- a/src/declarative/qml/qdeclarativepropertycache.cpp
+++ b/src/declarative/qml/qdeclarativepropertycache.cpp
@@ -45,7 +45,7 @@
#include "private/qdeclarativebinding_p.h"
#include <QtCore/qdebug.h>
-Q_DECLARE_METATYPE(QScriptValue);
+Q_DECLARE_METATYPE(QScriptValue)
QT_BEGIN_NAMESPACE
@@ -106,9 +106,25 @@ void QDeclarativePropertyCache::Data::load(const QMetaMethod &m)
}
+/*!
+Creates a new empty QDeclarativePropertyCache.
+*/
QDeclarativePropertyCache::QDeclarativePropertyCache(QDeclarativeEngine *e)
: QDeclarativeCleanup(e), engine(e)
{
+ Q_ASSERT(engine);
+}
+
+/*!
+Creates a new QDeclarativePropertyCache of \a metaObject.
+*/
+QDeclarativePropertyCache::QDeclarativePropertyCache(QDeclarativeEngine *e, const QMetaObject *metaObject)
+: QDeclarativeCleanup(e), engine(e)
+{
+ Q_ASSERT(engine);
+ Q_ASSERT(metaObject);
+
+ update(engine, metaObject);
}
QDeclarativePropertyCache::~QDeclarativePropertyCache()
@@ -135,7 +151,7 @@ void QDeclarativePropertyCache::clear()
}
QDeclarativePropertyCache::Data QDeclarativePropertyCache::create(const QMetaObject *metaObject,
- const QString &property)
+ const QString &property)
{
Q_ASSERT(metaObject);
@@ -245,17 +261,6 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb
}
}
-// ### Optimize - check engine for the parent meta object etc.
-QDeclarativePropertyCache *QDeclarativePropertyCache::create(QDeclarativeEngine *engine, const QMetaObject *metaObject)
-{
- Q_ASSERT(engine);
- Q_ASSERT(metaObject);
-
- QDeclarativePropertyCache *cache = new QDeclarativePropertyCache(engine);
- cache->update(engine, metaObject);
- return cache;
-}
-
void QDeclarativePropertyCache::update(QDeclarativeEngine *engine, const QMetaObject *metaObject)
{
Q_ASSERT(engine);
diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h
index 6b64a96..b01e5cc 100644
--- a/src/declarative/qml/qdeclarativepropertycache_p.h
+++ b/src/declarative/qml/qdeclarativepropertycache_p.h
@@ -69,6 +69,7 @@ class QDeclarativePropertyCache : public QDeclarativeRefCount, public QDeclarati
{
public:
QDeclarativePropertyCache(QDeclarativeEngine *);
+ QDeclarativePropertyCache(QDeclarativeEngine *, const QMetaObject *);
virtual ~QDeclarativePropertyCache();
struct Data {
diff --git a/src/declarative/qml/qdeclarativepropertyvaluesource.cpp b/src/declarative/qml/qdeclarativepropertyvaluesource.cpp
index a0ed78f..039998f 100644
--- a/src/declarative/qml/qdeclarativepropertyvaluesource.cpp
+++ b/src/declarative/qml/qdeclarativepropertyvaluesource.cpp
@@ -60,6 +60,9 @@ QDeclarativePropertyValueSource::QDeclarativePropertyValueSource()
{
}
+/*!
+ Destroys the value source.
+*/
QDeclarativePropertyValueSource::~QDeclarativePropertyValueSource()
{
}
diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp
index 8b96733..219d759 100644
--- a/src/declarative/qml/qdeclarativescriptparser.cpp
+++ b/src/declarative/qml/qdeclarativescriptparser.cpp
@@ -104,17 +104,13 @@ public:
void operator()(const QString &code, AST::Node *node);
protected:
+
Object *defineObjectBinding(AST::UiQualifiedId *propertyName, bool onAssignment,
- AST::UiQualifiedId *objectTypeName,
+ const QString &objectType,
+ AST::SourceLocation typeLocation,
LocationSpan location,
AST::UiObjectInitializer *initializer = 0);
- Object *defineObjectBinding_helper(AST::UiQualifiedId *propertyName, bool onAssignment,
- const QString &objectType,
- AST::SourceLocation typeLocation,
- LocationSpan location,
- AST::UiObjectInitializer *initializer = 0);
-
QDeclarativeParser::Variant getVariant(AST::ExpressionNode *expr);
LocationSpan location(AST::SourceLocation start, AST::SourceLocation end);
@@ -240,12 +236,12 @@ QString ProcessAST::asString(AST::UiQualifiedId *node) const
}
Object *
-ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName,
- bool onAssignment,
- const QString &objectType,
- AST::SourceLocation typeLocation,
- LocationSpan location,
- AST::UiObjectInitializer *initializer)
+ProcessAST::defineObjectBinding(AST::UiQualifiedId *propertyName,
+ bool onAssignment,
+ const QString &objectType,
+ AST::SourceLocation typeLocation,
+ LocationSpan location,
+ AST::UiObjectInitializer *initializer)
{
int lastTypeDot = objectType.lastIndexOf(QLatin1Char('.'));
bool isType = !objectType.isEmpty() &&
@@ -355,41 +351,6 @@ ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName,
}
}
-Object *ProcessAST::defineObjectBinding(AST::UiQualifiedId *qualifiedId, bool onAssignment,
- AST::UiQualifiedId *objectTypeName,
- LocationSpan location,
- AST::UiObjectInitializer *initializer)
-{
- const QString objectType = asString(objectTypeName);
- const AST::SourceLocation typeLocation = objectTypeName->identifierToken;
-
- if (objectType == QLatin1String("Script")) {
-
- AST::UiObjectMemberList *it = initializer->members;
- for (; it; it = it->next) {
- AST::UiScriptBinding *scriptBinding = AST::cast<AST::UiScriptBinding *>(it->member);
- if (! scriptBinding)
- continue;
-
- QString propertyName = asString(scriptBinding->qualifiedId);
- if (propertyName == QLatin1String("source")) {
- if (AST::ExpressionStatement *stmt = AST::cast<AST::ExpressionStatement *>(scriptBinding->statement)) {
- QDeclarativeParser::Variant string = getVariant(stmt->expression);
- if (string.isStringList()) {
- QStringList urls = string.asStringList();
- // We need to add this as a resource
- for (int ii = 0; ii < urls.count(); ++ii)
- _parser->_refUrls << QUrl(urls.at(ii));
- }
- }
- }
- }
-
- }
-
- return defineObjectBinding_helper(qualifiedId, onAssignment, objectType, typeLocation, location, initializer);
-}
-
LocationSpan ProcessAST::location(AST::UiQualifiedId *id)
{
return location(id->identifierToken, id->identifierToken);
@@ -664,10 +625,11 @@ bool ProcessAST::visit(AST::UiObjectDefinition *node)
LocationSpan l = location(node->firstSourceLocation(),
node->lastSourceLocation());
- defineObjectBinding(/*propertyName = */ 0, false,
- node->qualifiedTypeNameId,
- l,
- node->initializer);
+ const QString objectType = asString(node->qualifiedTypeNameId);
+ const AST::SourceLocation typeLocation = node->qualifiedTypeNameId->identifierToken;
+
+ defineObjectBinding(/*propertyName = */ 0, false, objectType,
+ typeLocation, l, node->initializer);
return false;
}
@@ -679,10 +641,11 @@ bool ProcessAST::visit(AST::UiObjectBinding *node)
LocationSpan l = location(node->qualifiedTypeNameId->identifierToken,
node->initializer->rbraceToken);
- defineObjectBinding(node->qualifiedId, node->hasOnToken,
- node->qualifiedTypeNameId,
- l,
- node->initializer);
+ const QString objectType = asString(node->qualifiedTypeNameId);
+ const AST::SourceLocation typeLocation = node->qualifiedTypeNameId->identifierToken;
+
+ defineObjectBinding(node->qualifiedId, node->hasOnToken, objectType,
+ typeLocation, l, node->initializer);
return false;
}
diff --git a/src/declarative/qml/qdeclarativescriptstring.h b/src/declarative/qml/qdeclarativescriptstring.h
index 43bef44..fc92a9b 100644
--- a/src/declarative/qml/qdeclarativescriptstring.h
+++ b/src/declarative/qml/qdeclarativescriptstring.h
@@ -79,7 +79,7 @@ private:
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QDeclarativeScriptString);
+Q_DECLARE_METATYPE(QDeclarativeScriptString)
QT_END_HEADER
diff --git a/src/declarative/qml/qdeclarativestringconverters_p.h b/src/declarative/qml/qdeclarativestringconverters_p.h
index 7afdfd3..97f72fc 100644
--- a/src/declarative/qml/qdeclarativestringconverters_p.h
+++ b/src/declarative/qml/qdeclarativestringconverters_p.h
@@ -80,7 +80,7 @@ namespace QDeclarativeStringConverters
QSizeF Q_DECLARATIVE_EXPORT sizeFFromString(const QString &, bool *ok = 0);
QRectF Q_DECLARATIVE_EXPORT rectFFromString(const QString &, bool *ok = 0);
QVector3D Q_DECLARATIVE_EXPORT vector3DFromString(const QString &, bool *ok = 0);
-};
+}
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp
index c6fe161..dbc25bb 100644
--- a/src/declarative/qml/qdeclarativevaluetype.cpp
+++ b/src/declarative/qml/qdeclarativevaluetype.cpp
@@ -116,8 +116,16 @@ QDeclarativeValueType *QDeclarativeValueTypeFactory::valueType(int t)
return new QDeclarativeRectValueType;
case QVariant::RectF:
return new QDeclarativeRectFValueType;
+ case QVariant::Vector2D:
+ return new QDeclarativeVector2DValueType;
case QVariant::Vector3D:
return new QDeclarativeVector3DValueType;
+ case QVariant::Vector4D:
+ return new QDeclarativeVector4DValueType;
+ case QVariant::Quaternion:
+ return new QDeclarativeQuaternionValueType;
+ case QVariant::Matrix4x4:
+ return new QDeclarativeMatrix4x4ValueType;
case QVariant::EasingCurve:
return new QDeclarativeEasingValueType;
case QVariant::Font:
@@ -460,6 +468,54 @@ void QDeclarativeRectValueType::setHeight(int h)
rect.setHeight(h);
}
+QDeclarativeVector2DValueType::QDeclarativeVector2DValueType(QObject *parent)
+: QDeclarativeValueType(parent)
+{
+}
+
+void QDeclarativeVector2DValueType::read(QObject *obj, int idx)
+{
+ void *a[] = { &vector, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
+}
+
+void QDeclarativeVector2DValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ int status = -1;
+ void *a[] = { &vector, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
+}
+
+QVariant QDeclarativeVector2DValueType::value()
+{
+ return QVariant(vector);
+}
+
+void QDeclarativeVector2DValueType::setValue(QVariant value)
+{
+ vector = qvariant_cast<QVector2D>(value);
+}
+
+qreal QDeclarativeVector2DValueType::x() const
+{
+ return vector.x();
+}
+
+qreal QDeclarativeVector2DValueType::y() const
+{
+ return vector.y();
+}
+
+void QDeclarativeVector2DValueType::setX(qreal x)
+{
+ vector.setX(x);
+}
+
+void QDeclarativeVector2DValueType::setY(qreal y)
+{
+ vector.setY(y);
+}
+
QDeclarativeVector3DValueType::QDeclarativeVector3DValueType(QObject *parent)
: QDeclarativeValueType(parent)
{
@@ -518,6 +574,170 @@ void QDeclarativeVector3DValueType::setZ(qreal z)
vector.setZ(z);
}
+QDeclarativeVector4DValueType::QDeclarativeVector4DValueType(QObject *parent)
+: QDeclarativeValueType(parent)
+{
+}
+
+void QDeclarativeVector4DValueType::read(QObject *obj, int idx)
+{
+ void *a[] = { &vector, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
+}
+
+void QDeclarativeVector4DValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ int status = -1;
+ void *a[] = { &vector, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
+}
+
+QVariant QDeclarativeVector4DValueType::value()
+{
+ return QVariant(vector);
+}
+
+void QDeclarativeVector4DValueType::setValue(QVariant value)
+{
+ vector = qvariant_cast<QVector4D>(value);
+}
+
+qreal QDeclarativeVector4DValueType::x() const
+{
+ return vector.x();
+}
+
+qreal QDeclarativeVector4DValueType::y() const
+{
+ return vector.y();
+}
+
+qreal QDeclarativeVector4DValueType::z() const
+{
+ return vector.z();
+}
+
+qreal QDeclarativeVector4DValueType::w() const
+{
+ return vector.w();
+}
+
+void QDeclarativeVector4DValueType::setX(qreal x)
+{
+ vector.setX(x);
+}
+
+void QDeclarativeVector4DValueType::setY(qreal y)
+{
+ vector.setY(y);
+}
+
+void QDeclarativeVector4DValueType::setZ(qreal z)
+{
+ vector.setZ(z);
+}
+
+void QDeclarativeVector4DValueType::setW(qreal w)
+{
+ vector.setW(w);
+}
+
+QDeclarativeQuaternionValueType::QDeclarativeQuaternionValueType(QObject *parent)
+: QDeclarativeValueType(parent)
+{
+}
+
+void QDeclarativeQuaternionValueType::read(QObject *obj, int idx)
+{
+ void *a[] = { &quaternion, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
+}
+
+void QDeclarativeQuaternionValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ int status = -1;
+ void *a[] = { &quaternion, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
+}
+
+QVariant QDeclarativeQuaternionValueType::value()
+{
+ return QVariant(quaternion);
+}
+
+void QDeclarativeQuaternionValueType::setValue(QVariant value)
+{
+ quaternion = qvariant_cast<QQuaternion>(value);
+}
+
+qreal QDeclarativeQuaternionValueType::scalar() const
+{
+ return quaternion.scalar();
+}
+
+qreal QDeclarativeQuaternionValueType::x() const
+{
+ return quaternion.x();
+}
+
+qreal QDeclarativeQuaternionValueType::y() const
+{
+ return quaternion.y();
+}
+
+qreal QDeclarativeQuaternionValueType::z() const
+{
+ return quaternion.z();
+}
+
+void QDeclarativeQuaternionValueType::setScalar(qreal scalar)
+{
+ quaternion.setScalar(scalar);
+}
+
+void QDeclarativeQuaternionValueType::setX(qreal x)
+{
+ quaternion.setX(x);
+}
+
+void QDeclarativeQuaternionValueType::setY(qreal y)
+{
+ quaternion.setY(y);
+}
+
+void QDeclarativeQuaternionValueType::setZ(qreal z)
+{
+ quaternion.setZ(z);
+}
+
+QDeclarativeMatrix4x4ValueType::QDeclarativeMatrix4x4ValueType(QObject *parent)
+: QDeclarativeValueType(parent)
+{
+}
+
+void QDeclarativeMatrix4x4ValueType::read(QObject *obj, int idx)
+{
+ void *a[] = { &matrix, 0 };
+ QMetaObject::metacall(obj, QMetaObject::ReadProperty, idx, a);
+}
+
+void QDeclarativeMatrix4x4ValueType::write(QObject *obj, int idx, QDeclarativePropertyPrivate::WriteFlags flags)
+{
+ int status = -1;
+ void *a[] = { &matrix, 0, &status, &flags };
+ QMetaObject::metacall(obj, QMetaObject::WriteProperty, idx, a);
+}
+
+QVariant QDeclarativeMatrix4x4ValueType::value()
+{
+ return QVariant(matrix);
+}
+
+void QDeclarativeMatrix4x4ValueType::setValue(QVariant value)
+{
+ matrix = qvariant_cast<QMatrix4x4>(value);
+}
+
QDeclarativeEasingValueType::QDeclarativeEasingValueType(QObject *parent)
: QDeclarativeValueType(parent)
{
diff --git a/src/declarative/qml/qdeclarativevaluetype_p.h b/src/declarative/qml/qdeclarativevaluetype_p.h
index d1833bb..476c73d 100644
--- a/src/declarative/qml/qdeclarativevaluetype_p.h
+++ b/src/declarative/qml/qdeclarativevaluetype_p.h
@@ -60,7 +60,11 @@
#include <QtCore/qrect.h>
#include <QtCore/qeasingcurve.h>
#include <QtCore/qvariant.h>
+#include <QtGui/qvector2d.h>
#include <QtGui/qvector3d.h>
+#include <QtGui/qvector4d.h>
+#include <QtGui/qmatrix4x4.h>
+#include <QtGui/qquaternion.h>
#include <QtGui/qfont.h>
QT_BEGIN_NAMESPACE
@@ -241,6 +245,28 @@ private:
QRect rect;
};
+class Q_AUTOTEST_EXPORT QDeclarativeVector2DValueType : public QDeclarativeValueType
+{
+ Q_PROPERTY(qreal x READ x WRITE setX)
+ Q_PROPERTY(qreal y READ y WRITE setY)
+ Q_OBJECT
+public:
+ QDeclarativeVector2DValueType(QObject *parent = 0);
+
+ virtual void read(QObject *, int);
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags);
+ virtual QVariant value();
+ virtual void setValue(QVariant value);
+
+ qreal x() const;
+ qreal y() const;
+ void setX(qreal);
+ void setY(qreal);
+
+private:
+ QVector2D vector;
+};
+
class Q_AUTOTEST_EXPORT QDeclarativeVector3DValueType : public QDeclarativeValueType
{
Q_PROPERTY(qreal x READ x WRITE setX)
@@ -266,6 +292,127 @@ private:
QVector3D vector;
};
+class Q_AUTOTEST_EXPORT QDeclarativeVector4DValueType : public QDeclarativeValueType
+{
+ Q_PROPERTY(qreal x READ x WRITE setX)
+ Q_PROPERTY(qreal y READ y WRITE setY)
+ Q_PROPERTY(qreal z READ z WRITE setZ)
+ Q_PROPERTY(qreal w READ w WRITE setW)
+ Q_OBJECT
+public:
+ QDeclarativeVector4DValueType(QObject *parent = 0);
+
+ virtual void read(QObject *, int);
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags);
+ virtual QVariant value();
+ virtual void setValue(QVariant value);
+
+ qreal x() const;
+ qreal y() const;
+ qreal z() const;
+ qreal w() const;
+ void setX(qreal);
+ void setY(qreal);
+ void setZ(qreal);
+ void setW(qreal);
+
+private:
+ QVector4D vector;
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativeQuaternionValueType : public QDeclarativeValueType
+{
+ Q_PROPERTY(qreal scalar READ scalar WRITE setScalar)
+ Q_PROPERTY(qreal x READ x WRITE setX)
+ Q_PROPERTY(qreal y READ y WRITE setY)
+ Q_PROPERTY(qreal z READ z WRITE setZ)
+ Q_OBJECT
+public:
+ QDeclarativeQuaternionValueType(QObject *parent = 0);
+
+ virtual void read(QObject *, int);
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags);
+ virtual QVariant value();
+ virtual void setValue(QVariant value);
+
+ qreal scalar() const;
+ qreal x() const;
+ qreal y() const;
+ qreal z() const;
+ void setScalar(qreal);
+ void setX(qreal);
+ void setY(qreal);
+ void setZ(qreal);
+
+private:
+ QQuaternion quaternion;
+};
+
+class Q_AUTOTEST_EXPORT QDeclarativeMatrix4x4ValueType : public QDeclarativeValueType
+{
+ Q_PROPERTY(qreal m11 READ m11 WRITE setM11)
+ Q_PROPERTY(qreal m12 READ m12 WRITE setM12)
+ Q_PROPERTY(qreal m13 READ m13 WRITE setM13)
+ Q_PROPERTY(qreal m14 READ m14 WRITE setM14)
+ Q_PROPERTY(qreal m21 READ m21 WRITE setM21)
+ Q_PROPERTY(qreal m22 READ m22 WRITE setM22)
+ Q_PROPERTY(qreal m23 READ m23 WRITE setM23)
+ Q_PROPERTY(qreal m24 READ m24 WRITE setM24)
+ Q_PROPERTY(qreal m31 READ m31 WRITE setM31)
+ Q_PROPERTY(qreal m32 READ m32 WRITE setM32)
+ Q_PROPERTY(qreal m33 READ m33 WRITE setM33)
+ Q_PROPERTY(qreal m34 READ m34 WRITE setM34)
+ Q_PROPERTY(qreal m41 READ m41 WRITE setM41)
+ Q_PROPERTY(qreal m42 READ m42 WRITE setM42)
+ Q_PROPERTY(qreal m43 READ m43 WRITE setM43)
+ Q_PROPERTY(qreal m44 READ m44 WRITE setM44)
+ Q_OBJECT
+public:
+ QDeclarativeMatrix4x4ValueType(QObject *parent = 0);
+
+ virtual void read(QObject *, int);
+ virtual void write(QObject *, int, QDeclarativePropertyPrivate::WriteFlags);
+ virtual QVariant value();
+ virtual void setValue(QVariant value);
+
+ qreal m11() const { return matrix(0, 0); }
+ qreal m12() const { return matrix(0, 1); }
+ qreal m13() const { return matrix(0, 2); }
+ qreal m14() const { return matrix(0, 3); }
+ qreal m21() const { return matrix(1, 0); }
+ qreal m22() const { return matrix(1, 1); }
+ qreal m23() const { return matrix(1, 2); }
+ qreal m24() const { return matrix(1, 3); }
+ qreal m31() const { return matrix(2, 0); }
+ qreal m32() const { return matrix(2, 1); }
+ qreal m33() const { return matrix(2, 2); }
+ qreal m34() const { return matrix(2, 3); }
+ qreal m41() const { return matrix(3, 0); }
+ qreal m42() const { return matrix(3, 1); }
+ qreal m43() const { return matrix(3, 2); }
+ qreal m44() const { return matrix(3, 3); }
+
+ void setM11(qreal value) { matrix(0, 0) = value; }
+ void setM12(qreal value) { matrix(0, 1) = value; }
+ void setM13(qreal value) { matrix(0, 2) = value; }
+ void setM14(qreal value) { matrix(0, 3) = value; }
+ void setM21(qreal value) { matrix(1, 0) = value; }
+ void setM22(qreal value) { matrix(1, 1) = value; }
+ void setM23(qreal value) { matrix(1, 2) = value; }
+ void setM24(qreal value) { matrix(1, 3) = value; }
+ void setM31(qreal value) { matrix(2, 0) = value; }
+ void setM32(qreal value) { matrix(2, 1) = value; }
+ void setM33(qreal value) { matrix(2, 2) = value; }
+ void setM34(qreal value) { matrix(2, 3) = value; }
+ void setM41(qreal value) { matrix(3, 0) = value; }
+ void setM42(qreal value) { matrix(3, 1) = value; }
+ void setM43(qreal value) { matrix(3, 2) = value; }
+ void setM44(qreal value) { matrix(3, 3) = value; }
+
+private:
+ QMatrix4x4 matrix;
+};
+
class Q_AUTOTEST_EXPORT QDeclarativeEasingValueType : public QDeclarativeValueType
{
Q_OBJECT
diff --git a/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp b/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp
index cb1f27d..f06d6ae 100644
--- a/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp
+++ b/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp
@@ -168,6 +168,8 @@ void QDeclarativeValueTypeScriptClass::setProperty(Object *obj, const Identifier
ref->type->read(ref->object, ref->property);
QMetaProperty p = ref->type->metaObject()->property(m_lastIndex);
+ if (p.isEnumType() && (QMetaType::Type)v.type() == QMetaType::QReal)
+ v = v.toInt();
p.write(ref->type, v);
ref->type->write(ref->object, ref->property, 0);
} else {
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
index 57bf726..3247f85 100644
--- a/src/declarative/qml/qdeclarativevme.cpp
+++ b/src/declarative/qml/qdeclarativevme.cpp
@@ -360,6 +360,16 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack,
}
break;
+ case QDeclarativeInstruction::StoreVariantBool:
+ {
+ QObject *target = stack.top();
+ QVariant v(instr.storeBool.value);
+ void *a[] = { &v, 0, &status, &flags };
+ QMetaObject::metacall(target, QMetaObject::WriteProperty,
+ instr.storeString.propertyIndex, a);
+ }
+ break;
+
case QDeclarativeInstruction::StoreString:
{
QObject *target = stack.top();
@@ -617,7 +627,7 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack,
QDeclarativeBoundSignal *bs = new QDeclarativeBoundSignal(target, signal, target);
QDeclarativeExpression *expr =
- new QDeclarativeExpression(ctxt, primitives.at(instr.storeSignal.value), context);
+ new QDeclarativeExpression(ctxt, context, primitives.at(instr.storeSignal.value));
expr->setSourceLocation(comp->name, instr.line);
bs->setExpression(expr);
}
@@ -898,6 +908,7 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack,
QDeclarativeEnginePrivate::clear(bindValues);
QDeclarativeEnginePrivate::clear(parserStatus);
+ ep->finalizedParserStatus.clear();
return 0;
}
diff --git a/src/declarative/qml/qdeclarativevmemetaobject.cpp b/src/declarative/qml/qdeclarativevmemetaobject.cpp
index 45f04a0..13e9c26 100644
--- a/src/declarative/qml/qdeclarativevmemetaobject.cpp
+++ b/src/declarative/qml/qdeclarativevmemetaobject.cpp
@@ -106,8 +106,7 @@ QDeclarativeVMEVariant::~QDeclarativeVMEVariant()
void QDeclarativeVMEVariant::cleanup()
{
if (type == QVariant::Invalid) {
- } else if (type == QMetaType::QObjectStar ||
- type == QMetaType::Int ||
+ } else if (type == QMetaType::Int ||
type == QMetaType::Bool ||
type == QMetaType::Double) {
type = QVariant::Invalid;
diff --git a/src/declarative/qml/qdeclarativewatcher.cpp b/src/declarative/qml/qdeclarativewatcher.cpp
index 842b3c4..da1419f 100644
--- a/src/declarative/qml/qdeclarativewatcher.cpp
+++ b/src/declarative/qml/qdeclarativewatcher.cpp
@@ -153,7 +153,7 @@ bool QDeclarativeWatcher::addWatch(int id, quint32 objectId, const QString &expr
QObject *object = QDeclarativeDebugService::objectForId(objectId);
QDeclarativeContext *context = qmlContext(object);
if (context) {
- QDeclarativeExpression *exprObj = new QDeclarativeExpression(context, expr, object);
+ QDeclarativeExpression *exprObj = new QDeclarativeExpression(context, object, expr);
exprObj->setNotifyOnValueChanged(true);
QDeclarativeWatchProxy *proxy = new QDeclarativeWatchProxy(id, exprObj, objectId, this);
exprObj->setParent(proxy);
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp
index 138d979..8182998 100644
--- a/src/declarative/qml/qdeclarativeworkerscript.cpp
+++ b/src/declarative/qml/qdeclarativeworkerscript.cpp
@@ -289,7 +289,11 @@ void QDeclarativeWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url)
QScriptValue activation = getWorker(id);
- QScriptContext *ctxt = workerEngine->pushContext();
+ QScriptContext *ctxt = QScriptDeclarativeClass::pushCleanContext(workerEngine);
+ QScriptValue urlContext = workerEngine->newObject();
+ urlContext.setData(QScriptValue(workerEngine, fileName));
+ ctxt->pushScope(urlContext);
+ ctxt->pushScope(activation);
ctxt->setActivationObject(activation);
workerEngine->baseUrl = url;
@@ -523,7 +527,7 @@ void QDeclarativeWorkerScriptEngine::run()
\snippet doc/src/snippets/declarative/workerscript.qml 0
The above worker script specifies a javascript file, "script.js", that handles
- the operations to be performed in the new thread:
+ the operations to be performed in the new thread. Here is \c script.js:
\qml
WorkerScript.onMessage = function(message) {
@@ -534,11 +538,11 @@ void QDeclarativeWorkerScriptEngine::run()
When the user clicks anywhere within the rectangle, \c sendMessage() is
called, triggering the \tt WorkerScript.onMessage() handler in
- \tt source.js. This in turn sends a reply message that is then received
+ \tt script.js. This in turn sends a reply message that is then received
by the \tt onMessage() handler of \tt myWorker.
*/
QDeclarativeWorkerScript::QDeclarativeWorkerScript(QObject *parent)
-: QObject(parent), m_engine(0), m_scriptId(-1)
+: QObject(parent), m_engine(0), m_scriptId(-1), m_componentComplete(true)
{
}
@@ -565,7 +569,7 @@ void QDeclarativeWorkerScript::setSource(const QUrl &source)
m_source = source;
- if (m_engine)
+ if (engine())
m_engine->executeUrl(m_scriptId, m_source);
emit sourceChanged();
@@ -580,7 +584,7 @@ void QDeclarativeWorkerScript::setSource(const QUrl &source)
*/
void QDeclarativeWorkerScript::sendMessage(const QScriptValue &message)
{
- if (!m_engine) {
+ if (!engine()) {
qWarning("QDeclarativeWorkerScript: Attempt to send message before WorkerScript establishment");
return;
}
@@ -588,13 +592,19 @@ void QDeclarativeWorkerScript::sendMessage(const QScriptValue &message)
m_engine->sendMessage(m_scriptId, QDeclarativeWorkerScriptEnginePrivate::scriptValueToVariant(message));
}
-void QDeclarativeWorkerScript::componentComplete()
+void QDeclarativeWorkerScript::classBegin()
{
- if (!m_engine) {
+ m_componentComplete = false;
+}
+
+QDeclarativeWorkerScriptEngine *QDeclarativeWorkerScript::engine()
+{
+ if (m_engine) return m_engine;
+ if (m_componentComplete) {
QDeclarativeEngine *engine = qmlEngine(this);
if (!engine) {
- qWarning("QDeclarativeWorkerScript: componentComplete() called without qmlEngine() set");
- return;
+ qWarning("QDeclarativeWorkerScript: engine() called without qmlEngine() set");
+ return 0;
}
m_engine = QDeclarativeEnginePrivate::get(engine)->getWorkerScriptEngine();
@@ -602,7 +612,16 @@ void QDeclarativeWorkerScript::componentComplete()
if (m_source.isValid())
m_engine->executeUrl(m_scriptId, m_source);
+
+ return m_engine;
}
+ return 0;
+}
+
+void QDeclarativeWorkerScript::componentComplete()
+{
+ m_componentComplete = true;
+ engine(); // Get it started now.
}
/*!
diff --git a/src/declarative/qml/qdeclarativeworkerscript_p.h b/src/declarative/qml/qdeclarativeworkerscript_p.h
index 6cce799..dc73811 100644
--- a/src/declarative/qml/qdeclarativeworkerscript_p.h
+++ b/src/declarative/qml/qdeclarativeworkerscript_p.h
@@ -108,18 +108,21 @@ signals:
void message(const QScriptValue &messageObject);
protected:
+ virtual void classBegin();
virtual void componentComplete();
virtual bool event(QEvent *);
private:
+ QDeclarativeWorkerScriptEngine *engine();
QDeclarativeWorkerScriptEngine *m_engine;
int m_scriptId;
QUrl m_source;
+ bool m_componentComplete;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QDeclarativeWorkerScript);
+QML_DECLARE_TYPE(QDeclarativeWorkerScript)
QT_END_HEADER
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
index b7e1832..acd1f51 100644
--- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp
+++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
@@ -46,6 +46,7 @@
#include "private/qdeclarativerefcount_p.h"
#include "private/qdeclarativeengine_p.h"
#include "private/qdeclarativeexpression_p.h"
+#include "qdeclarativeglobal_p.h"
#include <QtCore/qobject.h>
#include <QtScript/qscriptvalue.h>
@@ -94,6 +95,8 @@
QT_BEGIN_NAMESPACE
+DEFINE_BOOL_CONFIG_OPTION(xhrDump, QML_XHR_DUMP);
+
class DocumentImpl;
class NodeImpl
{
@@ -318,9 +321,9 @@ public:
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(Node);
-Q_DECLARE_METATYPE(NodeList);
-Q_DECLARE_METATYPE(NamedNodeMap);
+Q_DECLARE_METATYPE(Node)
+Q_DECLARE_METATYPE(NodeList)
+Q_DECLARE_METATYPE(NamedNodeMap)
QT_BEGIN_NAMESPACE
@@ -992,7 +995,7 @@ private:
int m_status;
QString m_statusText;
QNetworkRequest m_request;
- QNetworkReply *m_network;
+ QDeclarativeGuard<QNetworkReply> m_network;
void destroyNetwork();
QNetworkAccessManager *m_nam;
@@ -1131,6 +1134,14 @@ void QDeclarativeXMLHttpRequest::requestFromUrl(const QUrl &url)
}
}
+ if (xhrDump()) {
+ qWarning().nospace() << "XMLHttpRequest: " << qPrintable(m_method) << " " << qPrintable(url.toString());
+ if (!m_data.isEmpty()) {
+ qWarning().nospace() << " "
+ << qPrintable(QString::fromUtf8(m_data));
+ }
+ }
+
if (m_method == QLatin1String("GET"))
m_network = networkAccessManager()->get(request);
else if (m_method == QLatin1String("HEAD"))
@@ -1264,6 +1275,16 @@ void QDeclarativeXMLHttpRequest::finished()
if (cbv.isError()) printError(cbv);
}
m_responseEntityBody.append(m_network->readAll());
+
+ if (xhrDump()) {
+ qWarning().nospace() << "XMLHttpRequest: RESPONSE " << qPrintable(m_url.toString());
+ if (!m_responseEntityBody.isEmpty()) {
+ qWarning().nospace() << " "
+ << qPrintable(QString::fromUtf8(m_responseEntityBody));
+ }
+ }
+
+
m_data.clear();
destroyNetwork();
if (m_state < Loading) {
diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri
index 3848593..12f9794 100644
--- a/src/declarative/qml/qml.pri
+++ b/src/declarative/qml/qml.pri
@@ -9,6 +9,7 @@ SOURCES += \
$$PWD/qdeclarativeproperty.cpp \
$$PWD/qdeclarativecomponent.cpp \
$$PWD/qdeclarativecontext.cpp \
+ $$PWD/qdeclarativeinclude.cpp \
$$PWD/qdeclarativecustomparser.cpp \
$$PWD/qdeclarativepropertyvaluesource.cpp \
$$PWD/qdeclarativepropertyvalueinterceptor.cpp \
@@ -54,6 +55,7 @@ SOURCES += \
$$PWD/qdeclarativenetworkaccessmanagerfactory.cpp \
$$PWD/qdeclarativedirparser.cpp \
$$PWD/qdeclarativeextensionplugin.cpp \
+ $$PWD/qdeclarativeimport.cpp \
$$PWD/qdeclarativelist.cpp
HEADERS += \
@@ -91,6 +93,7 @@ HEADERS += \
$$PWD/qdeclarativeinfo.h \
$$PWD/qdeclarativeproperty_p.h \
$$PWD/qdeclarativecontext_p.h \
+ $$PWD/qdeclarativeinclude_p.h \
$$PWD/qdeclarativecompositetypedata_p.h \
$$PWD/qdeclarativecompositetypemanager_p.h \
$$PWD/qdeclarativelist.h \
@@ -128,6 +131,7 @@ HEADERS += \
$$PWD/qdeclarativenetworkaccessmanagerfactory.h \
$$PWD/qdeclarativedirparser_p.h \
$$PWD/qdeclarativeextensioninterface.h \
+ $$PWD/qdeclarativeimport_p.h \
$$PWD/qdeclarativeextensionplugin.h
QT += sql
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 4059522..1365cd7 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -55,6 +55,7 @@
#include <qdeclarativemetatype_p.h>
#include <qdeclarativevaluetype_p.h>
#include <qdeclarativeproperty_p.h>
+#include <qdeclarativeengine_p.h>
#include <qvariant.h>
#include <qcolor.h>
@@ -178,6 +179,10 @@ void QDeclarativeAbstractAnimation::setRunning(bool r)
d->running = r;
if (r == false)
d->avoidPropertyValueSourceStart = true;
+ else {
+ QDeclarativeEnginePrivate *engPriv = QDeclarativeEnginePrivate::get(qmlEngine(this));
+ engPriv->registerFinalizedParserStatusObject(this, this->metaObject()->indexOfSlot("componentFinalized()"));
+ }
return;
}
@@ -268,6 +273,11 @@ void QDeclarativeAbstractAnimation::componentComplete()
{
Q_D(QDeclarativeAbstractAnimation);
d->componentComplete = true;
+}
+
+void QDeclarativeAbstractAnimation::componentFinalized()
+{
+ Q_D(QDeclarativeAbstractAnimation);
if (d->running) {
d->running = false;
setRunning(true);
@@ -745,7 +755,7 @@ void QDeclarativeScriptAction::setScript(const QDeclarativeScriptString &script)
}
/*!
- \qmlproperty QString ScriptAction::scriptName
+ \qmlproperty string ScriptAction::scriptName
This property holds the the name of the StateChangeScript to run.
This property is only valid when ScriptAction is used as part of a transition.
@@ -776,12 +786,12 @@ void QDeclarativeScriptActionPrivate::execute()
const QString &str = scriptStr.script();
if (!str.isEmpty()) {
- QDeclarativeExpression expr(scriptStr.context(), str, scriptStr.scopeObject());
+ QDeclarativeExpression expr(scriptStr.context(), scriptStr.scopeObject(), str);
QDeclarativeData *ddata = QDeclarativeData::get(q);
if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
expr.setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
expr.evaluate();
- if (expr.hasError())
+ if (expr.hasError())
qmlInfo(q) << expr.error();
}
}
@@ -834,7 +844,7 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
The PropertyAction is immediate -
the target property is not animated to the selected value in any way.
-
+
\sa QtDeclarative
*/
/*!
@@ -864,7 +874,7 @@ void QDeclarativePropertyActionPrivate::init()
This property holds an explicit target object to animate.
The exact effect of the \c target property depends on how the animation
- is being used. Refer to the \l animation documentation for details.
+ is being used. Refer to the \l {QML Animation} documentation for details.
*/
QObject *QDeclarativePropertyAction::target() const
@@ -1320,27 +1330,27 @@ void QDeclarativeRotationAnimation::setTo(qreal t)
/*!
\qmlproperty enumeration RotationAnimation::direction
The direction in which to rotate.
- Possible values are Numerical, Clockwise, Counterclockwise,
- or Shortest.
+
+ Possible values are:
\table
\row
- \o Numerical
+ \o RotationAnimation.Numerical
\o Rotate by linearly interpolating between the two numbers.
A rotation from 10 to 350 will rotate 340 degrees clockwise.
\row
- \o Clockwise
+ \o RotationAnimation.Clockwise
\o Rotate clockwise between the two values
\row
- \o Counterclockwise
+ \o RotationAnimation.Counterclockwise
\o Rotate counterclockwise between the two values
\row
- \o Shortest
+ \o RotationAnimation.Shortest
\o Rotate in the direction that produces the shortest animation path.
A rotation from 10 to 350 will rotate 20 degrees counterclockwise.
\endtable
- The default direction is Numerical.
+ The default direction is RotationAnimation.Numerical.
*/
QDeclarativeRotationAnimation::RotationDirection QDeclarativeRotationAnimation::direction() const
{
@@ -1605,7 +1615,7 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int
Animate any objects that have changed their x or y properties in the target state using
an InOutQuad easing curve:
\qml
- Transition { PropertyAnimation { properties: "x,y"; easing.type: "InOutQuad" } }
+ Transition { PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad } }
\endqml
\o In a Behavior
@@ -1754,189 +1764,192 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t)
Linear.
\qml
- PropertyAnimation { properties: "y"; easing.type: "InOutElastic"; easing.amplitude: 2.0; easing.period: 1.5 }
+ PropertyAnimation { properties: "y"; easing.type: Easing.InOutElastic; easing.amplitude: 2.0; easing.period: 1.5 }
\endqml
Available types are:
\table
\row
- \o \c Linear
+ \o \c Easing.Linear
\o Easing curve for a linear (t) function: velocity is constant.
\o \inlineimage qeasingcurve-linear.png
\row
- \o \c InQuad
+ \o \c Easing.InQuad
\o Easing curve for a quadratic (t^2) function: accelerating from zero velocity.
\o \inlineimage qeasingcurve-inquad.png
\row
- \o \c OutQuad
+ \o \c Easing.OutQuad
\o Easing curve for a quadratic (t^2) function: decelerating to zero velocity.
\o \inlineimage qeasingcurve-outquad.png
\row
- \o \c InOutQuad
+ \o \c Easing.InOutQuad
\o Easing curve for a quadratic (t^2) function: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutquad.png
\row
- \o \c OutInQuad
+ \o \c Easing.OutInQuad
\o Easing curve for a quadratic (t^2) function: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outinquad.png
\row
- \o \c InCubic
+ \o \c Easing.InCubic
\o Easing curve for a cubic (t^3) function: accelerating from zero velocity.
\o \inlineimage qeasingcurve-incubic.png
\row
- \o \c OutCubic
+ \o \c Easing.OutCubic
\o Easing curve for a cubic (t^3) function: decelerating from zero velocity.
\o \inlineimage qeasingcurve-outcubic.png
\row
- \o \c InOutCubic
+ \o \c Easing.InOutCubic
\o Easing curve for a cubic (t^3) function: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutcubic.png
\row
- \o \c OutInCubic
+ \o \c Easing.OutInCubic
\o Easing curve for a cubic (t^3) function: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outincubic.png
\row
- \o \c InQuart
+ \o \c Easing.InQuart
\o Easing curve for a quartic (t^4) function: accelerating from zero velocity.
\o \inlineimage qeasingcurve-inquart.png
\row
- \o \c OutQuart
+ \o \c Easing.OutQuart
\o Easing curve for a cubic (t^4) function: decelerating from zero velocity.
\o \inlineimage qeasingcurve-outquart.png
\row
- \o \c InOutQuart
+ \o \c Easing.InOutQuart
\o Easing curve for a cubic (t^4) function: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutquart.png
\row
- \o \c OutInQuart
+ \o \c Easing.OutInQuart
\o Easing curve for a cubic (t^4) function: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outinquart.png
\row
- \o \c InQuint
+ \o \c Easing.InQuint
\o Easing curve for a quintic (t^5) function: accelerating from zero velocity.
\o \inlineimage qeasingcurve-inquint.png
\row
- \o \c OutQuint
+ \o \c Easing.OutQuint
\o Easing curve for a cubic (t^5) function: decelerating from zero velocity.
\o \inlineimage qeasingcurve-outquint.png
\row
- \o \c InOutQuint
+ \o \c Easing.InOutQuint
\o Easing curve for a cubic (t^5) function: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutquint.png
\row
- \o \c OutInQuint
+ \o \c Easing.OutInQuint
\o Easing curve for a cubic (t^5) function: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outinquint.png
\row
- \o \c InSine
+ \o \c Easing.InSine
\o Easing curve for a sinusoidal (sin(t)) function: accelerating from zero velocity.
\o \inlineimage qeasingcurve-insine.png
\row
- \o \c OutSine
+ \o \c Easing.OutSine
\o Easing curve for a sinusoidal (sin(t)) function: decelerating from zero velocity.
\o \inlineimage qeasingcurve-outsine.png
\row
- \o \c InOutSine
+ \o \c Easing.InOutSine
\o Easing curve for a sinusoidal (sin(t)) function: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutsine.png
\row
- \o \c OutInSine
+ \o \c Easing.OutInSine
\o Easing curve for a sinusoidal (sin(t)) function: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outinsine.png
\row
- \o \c InExpo
+ \o \c Easing.InExpo
\o Easing curve for an exponential (2^t) function: accelerating from zero velocity.
\o \inlineimage qeasingcurve-inexpo.png
\row
- \o \c OutExpo
+ \o \c Easing.OutExpo
\o Easing curve for an exponential (2^t) function: decelerating from zero velocity.
\o \inlineimage qeasingcurve-outexpo.png
\row
- \o \c InOutExpo
+ \o \c Easing.InOutExpo
\o Easing curve for an exponential (2^t) function: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutexpo.png
\row
- \o \c OutInExpo
+ \o \c Easing.OutInExpo
\o Easing curve for an exponential (2^t) function: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outinexpo.png
\row
- \o \c InCirc
+ \o \c Easing.InCirc
\o Easing curve for a circular (sqrt(1-t^2)) function: accelerating from zero velocity.
\o \inlineimage qeasingcurve-incirc.png
\row
- \o \c OutCirc
+ \o \c Easing.OutCirc
\o Easing curve for a circular (sqrt(1-t^2)) function: decelerating from zero velocity.
\o \inlineimage qeasingcurve-outcirc.png
\row
- \o \c InOutCirc
+ \o \c Easing.InOutCirc
\o Easing curve for a circular (sqrt(1-t^2)) function: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutcirc.png
\row
- \o \c OutInCirc
+ \o \c Easing.OutInCirc
\o Easing curve for a circular (sqrt(1-t^2)) function: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outincirc.png
\row
- \o \c InElastic
+ \o \c Easing.InElastic
\o Easing curve for an elastic (exponentially decaying sine wave) function: accelerating from zero velocity.
\br The peak amplitude can be set with the \e amplitude parameter, and the period of decay by the \e period parameter.
\o \inlineimage qeasingcurve-inelastic.png
\row
- \o \c OutElastic
+ \o \c Easing.OutElastic
\o Easing curve for an elastic (exponentially decaying sine wave) function: decelerating from zero velocity.
\br The peak amplitude can be set with the \e amplitude parameter, and the period of decay by the \e period parameter.
\o \inlineimage qeasingcurve-outelastic.png
\row
- \o \c InOutElastic
+ \o \c Easing.InOutElastic
\o Easing curve for an elastic (exponentially decaying sine wave) function: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutelastic.png
\row
- \o \c OutInElastic
+ \o \c Easing.OutInElastic
\o Easing curve for an elastic (exponentially decaying sine wave) function: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outinelastic.png
\row
- \o \c InBack
+ \o \c Easing.InBack
\o Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing in: accelerating from zero velocity.
\o \inlineimage qeasingcurve-inback.png
\row
- \o \c OutBack
+ \o \c Easing.OutBack
\o Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing out: decelerating to zero velocity.
\o \inlineimage qeasingcurve-outback.png
\row
- \o \c InOutBack
+ \o \c Easing.InOutBack
\o Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing in/out: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutback.png
\row
- \o \c OutInBack
+ \o \c Easing.OutInBack
\o Easing curve for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing out/in: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outinback.png
\row
- \o \c InBounce
+ \o \c Easing.InBounce
\o Easing curve for a bounce (exponentially decaying parabolic bounce) function: accelerating from zero velocity.
\o \inlineimage qeasingcurve-inbounce.png
\row
- \o \c OutBounce
+ \o \c Easing.OutBounce
\o Easing curve for a bounce (exponentially decaying parabolic bounce) function: decelerating from zero velocity.
\o \inlineimage qeasingcurve-outbounce.png
\row
- \o \c InOutBounce
+ \o \c Easing.InOutBounce
\o Easing curve for a bounce (exponentially decaying parabolic bounce) function easing in/out: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutbounce.png
\row
- \o \c OutInBounce
+ \o \c Easing.OutInBounce
\o Easing curve for a bounce (exponentially decaying parabolic bounce) function easing out/in: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outinbounce.png
\endtable
- easing.amplitude is not applicable for all curve types. It is only applicable for bounce and elastic curves (curves of type
- QEasingCurve::InBounce, QEasingCurve::OutBounce, QEasingCurve::InOutBounce, QEasingCurve::OutInBounce, QEasingCurve::InElastic,
- QEasingCurve::OutElastic, QEasingCurve::InOutElastic or QEasingCurve::OutInElastic).
+ easing.amplitude is only applicable for bounce and elastic curves (curves of type
+ Easing.InBounce, Easing.OutBounce, Easing.InOutBounce, Easing.OutInBounce, Easing.InElastic,
+ Easing.OutElastic, Easing.InOutElastic or Easing.OutInElastic).
+
+ easing.overshoot is only applicable if type is: Easing.InBack, Easing.OutBack,
+ Easing.InOutBack or Easing.OutInBack.
- easing.overshoot is not applicable for all curve types. It is only applicable if type is: QEasingCurve::InBack, QEasingCurve::OutBack,
- QEasingCurve::InOutBack or QEasingCurve::OutInBack.
+ easing.period is only applicable if type is: Easing.InElastic, Easing.OutElastic,
+ Easing.InOutElastic or Easing.OutInElastic.
- easing.period is not applicable for all curve types. It is only applicable if type is: QEasingCurve::InElastic, QEasingCurve::OutElastic,
- QEasingCurve::InOutElastic or QEasingCurve::OutInElastic.
+ See the \l {declarative/animation/easing}{easing} example for a demonstration of
+ the different easing settings.
*/
QEasingCurve QDeclarativePropertyAnimation::easing() const
{
@@ -2337,7 +2350,7 @@ QDeclarativeParentAnimation::~QDeclarativeParentAnimation()
}
/*!
- \qmlproperty item ParentAnimation::target
+ \qmlproperty Item ParentAnimation::target
The item to reparent.
When used in a transition, if no target is specified all
@@ -2360,7 +2373,7 @@ void QDeclarativeParentAnimation::setTarget(QDeclarativeItem *target)
}
/*!
- \qmlproperty item ParentAnimation::newParent
+ \qmlproperty Item ParentAnimation::newParent
The new parent to animate to.
If not set, then the parent defined in the end state of the transition.
@@ -2382,7 +2395,7 @@ void QDeclarativeParentAnimation::setNewParent(QDeclarativeItem *newParent)
}
/*!
- \qmlproperty item ParentAnimation::via
+ \qmlproperty Item ParentAnimation::via
The item to reparent via. This provides a way to do an unclipped animation
when both the old parent and new parent are clipped
@@ -2526,13 +2539,13 @@ void QDeclarativeParentAnimation::transition(QDeclarativeStateActions &actions,
viaData->pc << vpc;
viaData->actions << myAction;
QDeclarativeAction dummyAction;
- QDeclarativeAction &xAction = pc->xIsSet() ? actions[++i] : dummyAction;
- QDeclarativeAction &yAction = pc->yIsSet() ? actions[++i] : dummyAction;
- QDeclarativeAction &sAction = pc->scaleIsSet() ? actions[++i] : dummyAction;
- QDeclarativeAction &rAction = pc->rotationIsSet() ? actions[++i] : dummyAction;
+ QDeclarativeAction &xAction = pc->xIsSet() && i < actions.size()-1 ? actions[++i] : dummyAction;
+ QDeclarativeAction &yAction = pc->yIsSet() && i < actions.size()-1 ? actions[++i] : dummyAction;
+ QDeclarativeAction &sAction = pc->scaleIsSet() && i < actions.size()-1 ? actions[++i] : dummyAction;
+ QDeclarativeAction &rAction = pc->rotationIsSet() && i < actions.size()-1 ? actions[++i] : dummyAction;
bool forward = (direction == QDeclarativeAbstractAnimation::Forward);
QDeclarativeItem *target = pc->object();
- QDeclarativeItem *targetParent = forward ? pc->parent() : pc->originalParent();
+ QDeclarativeItem *targetParent = action.reverseEvent ? pc->originalParent() : pc->parent();
//### this mirrors the logic in QDeclarativeParentChange.
bool ok;
@@ -2573,9 +2586,9 @@ void QDeclarativeParentAnimation::transition(QDeclarativeStateActions &actions,
if (ok && target->transformOrigin() != QDeclarativeItem::TopLeft) {
qreal w = target->width();
qreal h = target->height();
- if (pc->widthIsSet())
+ if (pc->widthIsSet() && i < actions.size() - 1)
w = actions[++i].toValue.toReal();
- if (pc->heightIsSet())
+ if (pc->heightIsSet() && i < actions.size() - 1)
h = actions[++i].toValue.toReal();
const QPointF &transformOrigin
= d->computeTransformOrigin(target->transformOrigin(), w,h);
@@ -2730,7 +2743,7 @@ void QDeclarativeAnchorAnimation::setDuration(int duration)
Linear.
\qml
- AnchorAnimation { easing.type: "InOutQuad" }
+ AnchorAnimation { easing.type: Easing.InOutQuad }
\endqml
See the \l{PropertyAnimation::easing.type} documentation for information
diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h
index 40c893c..e7cd8a8 100644
--- a/src/declarative/util/qdeclarativeanimation_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p.h
@@ -133,6 +133,7 @@ public:
private Q_SLOTS:
void timelineComplete();
+ void componentFinalized();
private:
virtual void setTarget(const QDeclarativeProperty &);
diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp
index 1089d31..90e0ca3 100644
--- a/src/declarative/util/qdeclarativebehavior.cpp
+++ b/src/declarative/util/qdeclarativebehavior.cpp
@@ -48,6 +48,7 @@
#include <qdeclarativeinfo.h>
#include <qdeclarativeproperty_p.h>
#include <qdeclarativeguard_p.h>
+#include <qdeclarativeengine_p.h>
#include <private/qobject_p.h>
@@ -57,12 +58,14 @@ class QDeclarativeBehaviorPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QDeclarativeBehavior)
public:
- QDeclarativeBehaviorPrivate() : animation(0), enabled(true) {}
+ QDeclarativeBehaviorPrivate() : animation(0), enabled(true), finalized(false) {}
QDeclarativeProperty property;
QVariant currentValue;
+ QVariant targetValue;
QDeclarativeGuard<QDeclarativeAbstractAnimation> animation;
bool enabled;
+ bool finalized;
};
/*!
@@ -80,7 +83,7 @@ public:
y: 200 // initial value
Behavior on y {
NumberAnimation {
- easing.type: "OutBounce"
+ easing.type: Easing.OutBounce
easing.amplitude: 100
duration: 200
}
@@ -158,12 +161,17 @@ void QDeclarativeBehavior::write(const QVariant &value)
{
Q_D(QDeclarativeBehavior);
qmlExecuteDeferred(this);
- if (!d->animation || !d->enabled) {
+ if (!d->animation || !d->enabled || !d->finalized) {
QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+ d->targetValue = value;
return;
}
+ if (value == d->targetValue)
+ return;
+
d->currentValue = d->property.read();
+ d->targetValue = value;
if (d->animation->qtAnimation()->duration() != -1)
d->animation->qtAnimation()->stop();
@@ -189,6 +197,15 @@ void QDeclarativeBehavior::setTarget(const QDeclarativeProperty &property)
d->currentValue = property.read();
if (d->animation)
d->animation->setDefaultTarget(property);
+
+ QDeclarativeEnginePrivate *engPriv = QDeclarativeEnginePrivate::get(qmlEngine(this));
+ engPriv->registerFinalizedParserStatusObject(this, this->metaObject()->indexOfSlot("componentFinalized()"));
+}
+
+void QDeclarativeBehavior::componentFinalized()
+{
+ Q_D(QDeclarativeBehavior);
+ d->finalized = true;
}
QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativebehavior_p.h b/src/declarative/util/qdeclarativebehavior_p.h
index e8a809f..6c10eec 100644
--- a/src/declarative/util/qdeclarativebehavior_p.h
+++ b/src/declarative/util/qdeclarativebehavior_p.h
@@ -82,6 +82,9 @@ public:
Q_SIGNALS:
void enabledChanged();
+
+private Q_SLOTS:
+ void componentFinalized();
};
QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativebind.cpp b/src/declarative/util/qdeclarativebind.cpp
index 5516628..5fab631 100644
--- a/src/declarative/util/qdeclarativebind.cpp
+++ b/src/declarative/util/qdeclarativebind.cpp
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
class QDeclarativeBindPrivate : public QObjectPrivate
{
public:
- QDeclarativeBindPrivate() : when(true), componentComplete(false), obj(0) {}
+ QDeclarativeBindPrivate() : when(true), componentComplete(true), obj(0) {}
bool when : 1;
bool componentComplete : 1;
@@ -98,7 +98,6 @@ public:
/*!
\internal
\class QDeclarativeBind
- \ingroup group_utility
\brief The QDeclarativeBind class allows arbitrary property bindings to be created.
Simple bindings are usually earier to do in-place rather than creating a
@@ -198,6 +197,12 @@ void QDeclarativeBind::setValue(const QVariant &v)
eval();
}
+void QDeclarativeBind::classBegin()
+{
+ Q_D(QDeclarativeBind);
+ d->componentComplete = false;
+}
+
void QDeclarativeBind::componentComplete()
{
Q_D(QDeclarativeBind);
diff --git a/src/declarative/util/qdeclarativebind_p.h b/src/declarative/util/qdeclarativebind_p.h
index f756e80..f89c2eb 100644
--- a/src/declarative/util/qdeclarativebind_p.h
+++ b/src/declarative/util/qdeclarativebind_p.h
@@ -80,6 +80,7 @@ public:
void setValue(const QVariant &);
protected:
+ virtual void classBegin();
virtual void componentComplete();
private:
diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp
index 20d878b..808d196 100644
--- a/src/declarative/util/qdeclarativeconnections.cpp
+++ b/src/declarative/util/qdeclarativeconnections.cpp
@@ -57,11 +57,13 @@ QT_BEGIN_NAMESPACE
class QDeclarativeConnectionsPrivate : public QObjectPrivate
{
public:
- QDeclarativeConnectionsPrivate() : target(0), componentcomplete(false) {}
+ QDeclarativeConnectionsPrivate() : target(0), targetSet(false), ignoreUnknownSignals(false), componentcomplete(true) {}
QList<QDeclarativeBoundSignal*> boundsignals;
QObject *target;
+ bool targetSet;
+ bool ignoreUnknownSignals;
bool componentcomplete;
QByteArray data;
@@ -139,17 +141,21 @@ QDeclarativeConnections::~QDeclarativeConnections()
\qmlproperty Object Connections::target
This property holds the object that sends the signal.
- By default, the target is assumed to be the parent of the Connections.
+ If not set at all, the target defaults to be the parent of the Connections.
+
+ If set to null, no connection is made and any signal handlers are ignored
+ until the target is not null.
*/
QObject *QDeclarativeConnections::target() const
{
Q_D(const QDeclarativeConnections);
- return d->target ? d->target : parent();
+ return d->targetSet ? d->target : parent();
}
void QDeclarativeConnections::setTarget(QObject *obj)
{
Q_D(QDeclarativeConnections);
+ d->targetSet = true; // even if setting to 0, it is *set*
if (d->target == obj)
return;
foreach (QDeclarativeBoundSignal *s, d->boundsignals) {
@@ -166,6 +172,29 @@ void QDeclarativeConnections::setTarget(QObject *obj)
emit targetChanged();
}
+/*!
+ \qmlproperty bool Connections::ignoreUnknownSignals
+
+ Normally, you will get a runtime error if you try to connect
+ to signals on an object which the object does not have.
+
+ By setting this flag to true, such errors are ignored. This is
+ useful if you intend to connect to different types of object, handling
+ a different set of signals for each.
+*/
+bool QDeclarativeConnections::ignoreUnknownSignals() const
+{
+ Q_D(const QDeclarativeConnections);
+ return d->ignoreUnknownSignals;
+}
+
+void QDeclarativeConnections::setIgnoreUnknownSignals(bool ignore)
+{
+ Q_D(QDeclarativeConnections);
+ d->ignoreUnknownSignals = ignore;
+}
+
+
QByteArray
QDeclarativeConnectionsParser::compile(const QList<QDeclarativeCustomParserProperty> &props)
@@ -220,7 +249,7 @@ void QDeclarativeConnectionsParser::setCustomData(QObject *object,
void QDeclarativeConnections::connectSignals()
{
Q_D(QDeclarativeConnections);
- if (!d->componentcomplete)
+ if (!d->componentcomplete || (d->targetSet && !target()))
return;
QDataStream ds(d->data);
@@ -230,19 +259,24 @@ void QDeclarativeConnections::connectSignals()
QString script;
ds >> script;
QDeclarativeProperty prop(target(), propName);
- if (!prop.isValid()) {
- qmlInfo(this) << tr("Cannot assign to non-existent property \"%1\"").arg(propName);
- } else if (prop.type() & QDeclarativeProperty::SignalProperty) {
+ if (prop.isValid() && (prop.type() & QDeclarativeProperty::SignalProperty)) {
QDeclarativeBoundSignal *signal =
new QDeclarativeBoundSignal(target(), prop.method(), this);
- signal->setExpression(new QDeclarativeExpression(qmlContext(this), script, 0));
+ signal->setExpression(new QDeclarativeExpression(qmlContext(this), 0, script));
d->boundsignals += signal;
} else {
- qmlInfo(this) << tr("Cannot assign to non-existent property \"%1\"").arg(propName);
+ if (!d->ignoreUnknownSignals)
+ qmlInfo(this) << tr("Cannot assign to non-existent property \"%1\"").arg(propName);
}
}
}
+void QDeclarativeConnections::classBegin()
+{
+ Q_D(QDeclarativeConnections);
+ d->componentcomplete=false;
+}
+
void QDeclarativeConnections::componentComplete()
{
Q_D(QDeclarativeConnections);
diff --git a/src/declarative/util/qdeclarativeconnections_p.h b/src/declarative/util/qdeclarativeconnections_p.h
index 3eacf12..a914166 100644
--- a/src/declarative/util/qdeclarativeconnections_p.h
+++ b/src/declarative/util/qdeclarativeconnections_p.h
@@ -65,6 +65,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeConnections : public QObject, public QDec
Q_INTERFACES(QDeclarativeParserStatus)
Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
+ Q_PROPERTY(bool ignoreUnknownSignals READ ignoreUnknownSignals WRITE setIgnoreUnknownSignals)
public:
QDeclarativeConnections(QObject *parent=0);
@@ -73,11 +74,15 @@ public:
QObject *target() const;
void setTarget(QObject *);
+ bool ignoreUnknownSignals() const;
+ void setIgnoreUnknownSignals(bool ignore);
+
Q_SIGNALS:
void targetChanged();
private:
void connectSignals();
+ void classBegin();
void componentComplete();
};
diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp
index 4115193..adfcd62 100644
--- a/src/declarative/util/qdeclarativefontloader.cpp
+++ b/src/declarative/util/qdeclarativefontloader.cpp
@@ -78,7 +78,6 @@ public:
/*!
\qmlclass FontLoader QDeclarativeFontLoader
\since 4.7
- \ingroup group_utility
\brief This item allows using fonts by name or url.
Example:
@@ -186,10 +185,10 @@ void QDeclarativeFontLoader::setName(const QString &name)
This property holds the status of font loading. It can be one of:
\list
- \o Null - no font has been set
- \o Ready - the font has been loaded
- \o Loading - the font is currently being loaded
- \o Error - an error occurred while loading the font
+ \o FontLoader.Null - no font has been set
+ \o FontLoader.Ready - the font has been loaded
+ \o FontLoader.Loading - the font is currently being loaded
+ \o FontLoader.Error - an error occurred while loading the font
\endlist
Note that a change in the status property does not cause anything to happen
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index 3810256..9a5c9de 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -207,11 +207,11 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
Here is an example that uses WorkerScript to periodically append the
current time to a list model:
- \snippet examples/declarative/listmodel-threaded/timedisplay.qml 0
+ \snippet examples/declarative/threading/threadedlistmodel/timedisplay.qml 0
The included file, \tt dataloader.js, looks like this:
- \snippet examples/declarative/listmodel-threaded/dataloader.js 0
+ \snippet examples/declarative/threading/threadedlistmodel/dataloader.js 0
The application's \tt Timer object periodically sends a message to the
worker script by calling \tt WorkerScript::sendMessage(). When this message
@@ -537,11 +537,7 @@ void QDeclarativeListModel::append(const QScriptValue& valuemap)
*/
QScriptValue QDeclarativeListModel::get(int index) const
{
- if (index >= count() || index < 0) {
- qmlInfo(this) << tr("get: index %1 out of range").arg(index);
- return 0;
- }
-
+ // the internal flat/nested class checks for bad index
return m_flat ? m_flat->get(index) : m_nested->get(index);
}
@@ -591,7 +587,7 @@ void QDeclarativeListModel::set(int index, const QScriptValue& valuemap)
Changes the \a property of the item at \a index in the list model to \a value.
\code
- fruitModel.set(3, "cost", 5.95)
+ fruitModel.setProperty(3, "cost", 5.95)
\endcode
The \a index must be an element in the list.
@@ -930,13 +926,14 @@ bool FlatListModel::insert(int index, const QScriptValue &value)
QScriptValue FlatListModel::get(int index) const
{
- Q_ASSERT(index >= 0 && index < m_values.count());
-
QScriptEngine *scriptEngine = m_scriptEngine ? m_scriptEngine : QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(m_listModel));
- if (!scriptEngine)
+ if (!scriptEngine)
return 0;
+ if (index < 0 || index >= m_values.count())
+ return scriptEngine->undefinedValue();
+
QScriptValue rv = scriptEngine->newObject();
QHash<int, QVariant> row = m_values.at(index);
@@ -999,7 +996,8 @@ bool FlatListModel::addValue(const QScriptValue &value, QHash<int, QVariant> *ro
QScriptValueIterator it(value);
while (it.hasNext()) {
it.next();
- if (it.value().isObject()) {
+ QScriptValue value = it.value();
+ if (!value.isVariant() && !value.isRegExp() && !value.isDate() && value.isObject()) {
qmlInfo(m_listModel) << "Cannot add nested list values when modifying or after modification from a worker script";
return false;
}
@@ -1182,13 +1180,21 @@ bool NestedListModel::append(const QScriptValue& valuemap)
}
QScriptValue NestedListModel::get(int index) const
-{
- ModelNode *node = qvariant_cast<ModelNode *>(_root->values.at(index));
- if (!node)
- return 0;
+{
QDeclarativeEngine *eng = qmlEngine(m_listModel);
if (!eng)
return 0;
+
+ if (index < 0 || index >= count()) {
+ QScriptEngine *seng = QDeclarativeEnginePrivate::getScriptEngine(eng);
+ if (seng)
+ return seng->undefinedValue();
+ return 0;
+ }
+
+ ModelNode *node = qvariant_cast<ModelNode *>(_root->values.at(index));
+ if (!node)
+ return 0;
return QDeclarativeEnginePrivate::qmlScriptObject(node->object(this), eng);
}
diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h
index 53d30c2..1622144 100644
--- a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h
+++ b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h
@@ -146,7 +146,7 @@ private:
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QDeclarativeListModelWorkerAgent::VariantRef);
+Q_DECLARE_METATYPE(QDeclarativeListModelWorkerAgent::VariantRef)
QT_END_HEADER
diff --git a/src/declarative/util/qdeclarativeopenmetaobject.cpp b/src/declarative/util/qdeclarativeopenmetaobject.cpp
index 0e5aaa6..ba5d534 100644
--- a/src/declarative/util/qdeclarativeopenmetaobject.cpp
+++ b/src/declarative/util/qdeclarativeopenmetaobject.cpp
@@ -305,7 +305,7 @@ void QDeclarativeOpenMetaObject::setCached(bool c)
QDeclarativeData *qmldata = QDeclarativeData::get(d->object, true);
if (d->cacheProperties) {
if (!d->type->d->cache)
- d->type->d->cache = QDeclarativePropertyCache::create(d->type->d->engine, this);
+ d->type->d->cache = new QDeclarativePropertyCache(d->type->d->engine, this);
qmldata->propertyCache = d->type->d->cache;
d->type->d->cache->addref();
} else {
diff --git a/src/declarative/util/qdeclarativepackage.cpp b/src/declarative/util/qdeclarativepackage.cpp
index 20e9907..9617b86 100644
--- a/src/declarative/util/qdeclarativepackage.cpp
+++ b/src/declarative/util/qdeclarativepackage.cpp
@@ -62,13 +62,13 @@ QT_BEGIN_NAMESPACE
delegate it should appear in. This allows an item to move
between views.
- \snippet examples/declarative/package/Delegate.qml 0
+ \snippet examples/declarative/modelviews/package/Delegate.qml 0
These named items are used as the delegates by the two views who
reference the special VisualDataModel.parts property to select
a model which provides the chosen delegate.
- \snippet examples/declarative/package/view.qml 0
+ \snippet examples/declarative/modelviews/package/view.qml 0
\sa QtDeclarative
*/
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp
index dbca326..d9ce42c 100644
--- a/src/declarative/util/qdeclarativepixmapcache.cpp
+++ b/src/declarative/util/qdeclarativepixmapcache.cpp
@@ -55,6 +55,7 @@
#include <QFile>
#include <QThread>
#include <QMutex>
+#include <QBuffer>
#include <QWaitCondition>
#include <QtCore/qdebug.h>
#include <private/qobject_p.h>
@@ -342,7 +343,10 @@ void QDeclarativeImageRequestHandler::networkRequestDone()
errorString = reply->errorString();
} else {
QSize read_impsize;
- if (readImage(reply->url(), reply, &image, &errorString, &read_impsize, job->forcedWidth(), job->forcedHeight())) {
+ QByteArray all = reply->readAll();
+ QBuffer buff(&all);
+ buff.open(QIODevice::ReadOnly);
+ if (readImage(reply->url(), &buff, &image, &errorString, &read_impsize, job->forcedWidth(), job->forcedHeight())) {
qmlOriginalSizes()->insert(reply->url(), read_impsize);
error = QDeclarativeImageReaderEvent::NoError;
} else {
diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp
index 4b2d5a0..d99de7a 100644
--- a/src/declarative/util/qdeclarativepropertychanges.cpp
+++ b/src/declarative/util/qdeclarativepropertychanges.cpp
@@ -51,6 +51,7 @@
#include <qdeclarativecontext.h>
#include <qdeclarativeguard_p.h>
#include <qdeclarativeproperty_p.h>
+#include <qdeclarativecontext_p.h>
#include <QtCore/qdebug.h>
@@ -162,11 +163,15 @@ public:
virtual void execute(Reason) {
ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, expression);
+ if (ownedExpression == expression)
+ ownedExpression = 0;
}
virtual bool isReversable() { return true; }
virtual void reverse(Reason) {
ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, reverseExpression);
+ if (ownedExpression == reverseExpression)
+ ownedExpression = 0;
}
virtual void saveOriginals() {
@@ -174,11 +179,26 @@ public:
reverseExpression = rewindExpression;
}
+ /*virtual void copyOriginals(QDeclarativeActionEvent *other)
+ {
+ QDeclarativeReplaceSignalHandler *rsh = static_cast<QDeclarativeReplaceSignalHandler*>(other);
+ saveCurrentValues();
+ if (rsh == this)
+ return;
+ reverseExpression = rsh->reverseExpression;
+ if (rsh->ownedExpression == reverseExpression) {
+ ownedExpression = rsh->ownedExpression;
+ rsh->ownedExpression = 0;
+ }
+ }*/
+
virtual void rewind() {
ownedExpression = QDeclarativePropertyPrivate::setSignalExpression(property, rewindExpression);
+ if (ownedExpression == rewindExpression)
+ ownedExpression = 0;
}
virtual void saveCurrentValues() {
- rewindExpression = QDeclarativePropertyPrivate::signalExpression(property);
+ rewindExpression = QDeclarativePropertyPrivate::signalExpression(property);
}
virtual bool override(QDeclarativeActionEvent*other) {
@@ -301,13 +321,19 @@ void QDeclarativePropertyChangesPrivate::decode()
QDeclarativeProperty prop = property(name); //### better way to check for signal property?
if (prop.type() & QDeclarativeProperty::SignalProperty) {
- QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), data.toString(), object);
+ QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), object, data.toString());
+ QDeclarativeData *ddata = QDeclarativeData::get(q);
+ if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
+ expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
QDeclarativeReplaceSignalHandler *handler = new QDeclarativeReplaceSignalHandler;
handler->property = prop;
handler->expression = expression;
signalReplacements << handler;
} else if (isScript) {
- QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), data.toString(), object);
+ QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(q), object, data.toString());
+ QDeclarativeData *ddata = QDeclarativeData::get(q);
+ if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
+ expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
expressions << qMakePair(name, expression);
} else {
properties << qMakePair(name, data);
@@ -437,9 +463,11 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions()
if (d->isExplicit) {
a.toValue = d->expressions.at(ii).second->evaluate();
} else {
+ QDeclarativeExpression *e = d->expressions.at(ii).second;
QDeclarativeBinding *newBinding =
- new QDeclarativeBinding(d->expressions.at(ii).second->expression(), object(), qmlContext(this));
+ new QDeclarativeBinding(e->expression(), object(), qmlContext(this));
newBinding->setTarget(prop);
+ newBinding->setSourceLocation(e->sourceFile(), e->lineNumber());
a.toBinding = newBinding;
a.deletableToBinding = true;
}
diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp
index 19a00ee..bd48ef0 100644
--- a/src/declarative/util/qdeclarativesmoothedanimation.cpp
+++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp
@@ -388,10 +388,10 @@ void QDeclarativeSmoothedAnimation::transition(QDeclarativeStateActions &actions
Sets how the SmoothedAnimation behaves if an animation direction is reversed.
- If reversing mode is \c Eased, the animation will smoothly decelerate, and
- then reverse direction. If the reversing mode is \c Immediate, the
+ If reversing mode is \c SmoothedAnimation.Eased, the animation will smoothly decelerate, and
+ then reverse direction. If the reversing mode is \c SmoothedAnimation.Immediate, the
animation will immediately begin accelerating in the reverse direction,
- begining with a velocity of 0. If the reversing mode is \c Sync, the
+ begining with a velocity of 0. If the reversing mode is \c SmoothedAnimation.Sync, the
property is immediately set to the target value.
*/
QDeclarativeSmoothedAnimation::ReversingMode QDeclarativeSmoothedAnimation::reversingMode() const
diff --git a/src/declarative/util/qdeclarativesmoothedanimation_p.h b/src/declarative/util/qdeclarativesmoothedanimation_p.h
index 17aafa4..f45d19f 100644
--- a/src/declarative/util/qdeclarativesmoothedanimation_p.h
+++ b/src/declarative/util/qdeclarativesmoothedanimation_p.h
@@ -96,7 +96,7 @@ Q_SIGNALS:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QDeclarativeSmoothedAnimation);
+QML_DECLARE_TYPE(QDeclarativeSmoothedAnimation)
QT_END_HEADER
diff --git a/src/declarative/util/qdeclarativesmoothedfollow.cpp b/src/declarative/util/qdeclarativesmoothedfollow.cpp
index 3ed9257..f70df9d 100644
--- a/src/declarative/util/qdeclarativesmoothedfollow.cpp
+++ b/src/declarative/util/qdeclarativesmoothedfollow.cpp
@@ -143,10 +143,10 @@ QDeclarativeSmoothedFollowPrivate::QDeclarativeSmoothedFollowPrivate()
Sets how the SmoothedFollow behaves if an animation direction is reversed.
- If reversing mode is \c Eased, the animation will smoothly decelerate, and
- then reverse direction. If the reversing mode is \c Immediate, the
+ If reversing mode is \c SmoothedFollow.Eased, the animation will smoothly decelerate, and
+ then reverse direction. If the reversing mode is \c SmoothedFollow.Immediate, the
animation will immediately begin accelerating in the reverse direction,
- begining with a velocity of 0. If the reversing mode is \c Sync, the
+ begining with a velocity of 0. If the reversing mode is \c SmoothedFollow.Sync, the
property is immediately set to the target value.
*/
QDeclarativeSmoothedFollow::ReversingMode QDeclarativeSmoothedFollow::reversingMode() const
diff --git a/src/declarative/util/qdeclarativesmoothedfollow_p.h b/src/declarative/util/qdeclarativesmoothedfollow_p.h
index d860052..6319192 100644
--- a/src/declarative/util/qdeclarativesmoothedfollow_p.h
+++ b/src/declarative/util/qdeclarativesmoothedfollow_p.h
@@ -106,7 +106,7 @@ Q_SIGNALS:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QDeclarativeSmoothedFollow);
+QML_DECLARE_TYPE(QDeclarativeSmoothedFollow)
QT_END_HEADER
diff --git a/src/declarative/util/qdeclarativespringfollow.cpp b/src/declarative/util/qdeclarativespringfollow.cpp
index 70077f3..aae66ac 100644
--- a/src/declarative/util/qdeclarativespringfollow.cpp
+++ b/src/declarative/util/qdeclarativespringfollow.cpp
@@ -227,7 +227,7 @@ void QDeclarativeSpringFollowPrivate::stop()
loops: Animation.Infinite
NumberAnimation {
to: 200
- easing.type: "OutBounce"
+ easing.type: Easing.OutBounce
easing.amplitude: 100
duration: 2000
}
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index 861cbc8..b5f7900 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -149,7 +149,6 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje
\class QDeclarativeState
\brief The QDeclarativeState class allows you to define configurations of objects and properties.
- \ingroup group_states
QDeclarativeState allows you to specify a state as a set of batched changes from the default
configuration.
@@ -391,12 +390,13 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit
if (action.event->override(event)) {
found = true;
- if (action.event != d->revertList.at(jj).event) {
+ if (action.event != d->revertList.at(jj).event && action.event->needsCopy()) {
action.event->copyOriginals(d->revertList.at(jj).event);
QDeclarativeSimpleAction r(action);
additionalReverts << r;
d->revertList.removeAt(jj);
+ --jj;
} else if (action.event->isRewindable()) //###why needed?
action.event->saveCurrentValues();
diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h
index 0ba67b0..25715c6 100644
--- a/src/declarative/util/qdeclarativestate_p.h
+++ b/src/declarative/util/qdeclarativestate_p.h
@@ -96,6 +96,7 @@ public:
virtual bool isReversable();
virtual void reverse(Reason reason = ActualChange);
virtual void saveOriginals() {}
+ virtual bool needsCopy() { return false; }
virtual void copyOriginals(QDeclarativeActionEvent *) {}
virtual bool isRewindable() { return isReversable(); }
diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp
index 5b51495..9b042d7 100644
--- a/src/declarative/util/qdeclarativestategroup.cpp
+++ b/src/declarative/util/qdeclarativestategroup.cpp
@@ -47,6 +47,7 @@
#include <qdeclarativebinding_p.h>
#include <qdeclarativeglobal_p.h>
+#include <QtCore/qstringbuilder.h>
#include <QtCore/qdebug.h>
#include <private/qobject_p.h>
@@ -62,7 +63,7 @@ class QDeclarativeStateGroupPrivate : public QObjectPrivate
public:
QDeclarativeStateGroupPrivate()
: nullState(0), componentComplete(true),
- ignoreTrans(false), applyingState(false) {}
+ ignoreTrans(false), applyingState(false), unnamedCount(0) {}
QString currentState;
QDeclarativeState *nullState;
@@ -78,6 +79,7 @@ public:
bool componentComplete;
bool ignoreTrans;
bool applyingState;
+ int unnamedCount;
QDeclarativeTransition *findTransition(const QString &from, const QString &to);
void setCurrentStateInternal(const QString &state, bool = false);
@@ -259,6 +261,12 @@ void QDeclarativeStateGroup::componentComplete()
Q_D(QDeclarativeStateGroup);
d->componentComplete = true;
+ for (int ii = 0; ii < d->states.count(); ++ii) {
+ QDeclarativeState *state = d->states.at(ii);
+ if (state->name().isEmpty())
+ state->setName(QLatin1String("anonymousState") % QString::number(++d->unnamedCount));
+ }
+
if (d->updateAutoState()) {
return;
} else if (!d->currentState.isEmpty()) {
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
index 689f53c..80ae5f5 100644
--- a/src/declarative/util/qdeclarativestateoperations.cpp
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -69,18 +69,18 @@ public:
rewindParent(0), rewindStackBefore(0) {}
QDeclarativeItem *target;
- QDeclarativeItem *parent;
+ QDeclarativeGuard<QDeclarativeItem> parent;
QDeclarativeGuard<QDeclarativeItem> origParent;
QDeclarativeGuard<QDeclarativeItem> origStackBefore;
QDeclarativeItem *rewindParent;
QDeclarativeItem *rewindStackBefore;
- QDeclarativeNullableValue<qreal> x;
- QDeclarativeNullableValue<qreal> y;
- QDeclarativeNullableValue<qreal> width;
- QDeclarativeNullableValue<qreal> height;
- QDeclarativeNullableValue<qreal> scale;
- QDeclarativeNullableValue<qreal> rotation;
+ QDeclarativeNullableValue<QDeclarativeScriptString> xString;
+ QDeclarativeNullableValue<QDeclarativeScriptString> yString;
+ QDeclarativeNullableValue<QDeclarativeScriptString> widthString;
+ QDeclarativeNullableValue<QDeclarativeScriptString> heightString;
+ QDeclarativeNullableValue<QDeclarativeScriptString> scaleString;
+ QDeclarativeNullableValue<QDeclarativeScriptString> rotationString;
void doChange(QDeclarativeItem *targetParent, QDeclarativeItem *stackBefore = 0);
};
@@ -196,112 +196,112 @@ QDeclarativeParentChange::~QDeclarativeParentChange()
These properties hold the new position, size, scale, and rotation
for the item in this state.
*/
-qreal QDeclarativeParentChange::x() const
+QDeclarativeScriptString QDeclarativeParentChange::x() const
{
Q_D(const QDeclarativeParentChange);
- return d->x.isNull ? qreal(0.) : d->x.value;
+ return d->xString.value;
}
-void QDeclarativeParentChange::setX(qreal x)
+void QDeclarativeParentChange::setX(QDeclarativeScriptString x)
{
Q_D(QDeclarativeParentChange);
- d->x = x;
+ d->xString = x;
}
bool QDeclarativeParentChange::xIsSet() const
{
Q_D(const QDeclarativeParentChange);
- return d->x.isValid();
+ return d->xString.isValid();
}
-qreal QDeclarativeParentChange::y() const
+QDeclarativeScriptString QDeclarativeParentChange::y() const
{
Q_D(const QDeclarativeParentChange);
- return d->y.isNull ? qreal(0.) : d->y.value;
+ return d->yString.value;
}
-void QDeclarativeParentChange::setY(qreal y)
+void QDeclarativeParentChange::setY(QDeclarativeScriptString y)
{
Q_D(QDeclarativeParentChange);
- d->y = y;
+ d->yString = y;
}
bool QDeclarativeParentChange::yIsSet() const
{
Q_D(const QDeclarativeParentChange);
- return d->y.isValid();
+ return d->yString.isValid();
}
-qreal QDeclarativeParentChange::width() const
+QDeclarativeScriptString QDeclarativeParentChange::width() const
{
Q_D(const QDeclarativeParentChange);
- return d->width.isNull ? qreal(0.) : d->width.value;
+ return d->widthString.value;
}
-void QDeclarativeParentChange::setWidth(qreal width)
+void QDeclarativeParentChange::setWidth(QDeclarativeScriptString width)
{
Q_D(QDeclarativeParentChange);
- d->width = width;
+ d->widthString = width;
}
bool QDeclarativeParentChange::widthIsSet() const
{
Q_D(const QDeclarativeParentChange);
- return d->width.isValid();
+ return d->widthString.isValid();
}
-qreal QDeclarativeParentChange::height() const
+QDeclarativeScriptString QDeclarativeParentChange::height() const
{
Q_D(const QDeclarativeParentChange);
- return d->height.isNull ? qreal(0.) : d->height.value;
+ return d->heightString.value;
}
-void QDeclarativeParentChange::setHeight(qreal height)
+void QDeclarativeParentChange::setHeight(QDeclarativeScriptString height)
{
Q_D(QDeclarativeParentChange);
- d->height = height;
+ d->heightString = height;
}
bool QDeclarativeParentChange::heightIsSet() const
{
Q_D(const QDeclarativeParentChange);
- return d->height.isValid();
+ return d->heightString.isValid();
}
-qreal QDeclarativeParentChange::scale() const
+QDeclarativeScriptString QDeclarativeParentChange::scale() const
{
Q_D(const QDeclarativeParentChange);
- return d->scale.isNull ? qreal(1.) : d->scale.value;
+ return d->scaleString.value;
}
-void QDeclarativeParentChange::setScale(qreal scale)
+void QDeclarativeParentChange::setScale(QDeclarativeScriptString scale)
{
Q_D(QDeclarativeParentChange);
- d->scale = scale;
+ d->scaleString = scale;
}
bool QDeclarativeParentChange::scaleIsSet() const
{
Q_D(const QDeclarativeParentChange);
- return d->scale.isValid();
+ return d->scaleString.isValid();
}
-qreal QDeclarativeParentChange::rotation() const
+QDeclarativeScriptString QDeclarativeParentChange::rotation() const
{
Q_D(const QDeclarativeParentChange);
- return d->rotation.isNull ? qreal(0.) : d->rotation.value;
+ return d->rotationString.value;
}
-void QDeclarativeParentChange::setRotation(qreal rotation)
+void QDeclarativeParentChange::setRotation(QDeclarativeScriptString rotation)
{
Q_D(QDeclarativeParentChange);
- d->rotation = rotation;
+ d->rotationString = rotation;
}
bool QDeclarativeParentChange::rotationIsSet() const
{
Q_D(const QDeclarativeParentChange);
- return d->rotation.isValid();
+ return d->rotationString.isValid();
}
QDeclarativeItem *QDeclarativeParentChange::originalParent() const
@@ -356,34 +356,118 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions()
a.event = this;
actions << a;
- if (d->x.isValid()) {
- QDeclarativeAction xa(d->target, QLatin1String("x"), x());
- actions << xa;
+ if (d->xString.isValid()) {
+ bool ok = false;
+ QString script = d->xString.value.script();
+ qreal x = script.toFloat(&ok);
+ if (ok) {
+ QDeclarativeAction xa(d->target, QLatin1String("x"), x);
+ actions << xa;
+ } else {
+ QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this));
+ newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("x")));
+ QDeclarativeAction xa;
+ xa.property = newBinding->property();
+ xa.toBinding = newBinding;
+ xa.fromValue = xa.property.read();
+ xa.deletableToBinding = true;
+ actions << xa;
+ }
}
- if (d->y.isValid()) {
- QDeclarativeAction ya(d->target, QLatin1String("y"), y());
- actions << ya;
+ if (d->yString.isValid()) {
+ bool ok = false;
+ QString script = d->yString.value.script();
+ qreal y = script.toFloat(&ok);
+ if (ok) {
+ QDeclarativeAction ya(d->target, QLatin1String("y"), y);
+ actions << ya;
+ } else {
+ QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this));
+ newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("y")));
+ QDeclarativeAction ya;
+ ya.property = newBinding->property();
+ ya.toBinding = newBinding;
+ ya.fromValue = ya.property.read();
+ ya.deletableToBinding = true;
+ actions << ya;
+ }
}
- if (d->scale.isValid()) {
- QDeclarativeAction sa(d->target, QLatin1String("scale"), scale());
- actions << sa;
+ if (d->scaleString.isValid()) {
+ bool ok = false;
+ QString script = d->scaleString.value.script();
+ qreal scale = script.toFloat(&ok);
+ if (ok) {
+ QDeclarativeAction sa(d->target, QLatin1String("scale"), scale);
+ actions << sa;
+ } else {
+ QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this));
+ newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("scale")));
+ QDeclarativeAction sa;
+ sa.property = newBinding->property();
+ sa.toBinding = newBinding;
+ sa.fromValue = sa.property.read();
+ sa.deletableToBinding = true;
+ actions << sa;
+ }
}
- if (d->rotation.isValid()) {
- QDeclarativeAction ra(d->target, QLatin1String("rotation"), rotation());
- actions << ra;
+ if (d->rotationString.isValid()) {
+ bool ok = false;
+ QString script = d->rotationString.value.script();
+ qreal rotation = script.toFloat(&ok);
+ if (ok) {
+ QDeclarativeAction ra(d->target, QLatin1String("rotation"), rotation);
+ actions << ra;
+ } else {
+ QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this));
+ newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("rotation")));
+ QDeclarativeAction ra;
+ ra.property = newBinding->property();
+ ra.toBinding = newBinding;
+ ra.fromValue = ra.property.read();
+ ra.deletableToBinding = true;
+ actions << ra;
+ }
}
- if (d->width.isValid()) {
- QDeclarativeAction wa(d->target, QLatin1String("width"), width());
- actions << wa;
+ if (d->widthString.isValid()) {
+ bool ok = false;
+ QString script = d->widthString.value.script();
+ qreal width = script.toFloat(&ok);
+ if (ok) {
+ QDeclarativeAction wa(d->target, QLatin1String("width"), width);
+ actions << wa;
+ } else {
+ QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this));
+ newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("width")));
+ QDeclarativeAction wa;
+ wa.property = newBinding->property();
+ wa.toBinding = newBinding;
+ wa.fromValue = wa.property.read();
+ wa.deletableToBinding = true;
+ actions << wa;
+ }
}
- if (d->height.isValid()) {
- QDeclarativeAction ha(d->target, QLatin1String("height"), height());
- actions << ha;
+ if (d->heightString.isValid()) {
+ bool ok = false;
+ QString script = d->heightString.value.script();
+ qreal height = script.toFloat(&ok);
+ if (ok) {
+ QDeclarativeAction ha(d->target, QLatin1String("height"), height);
+ actions << ha;
+ } else {
+ QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this));
+ newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("height")));
+ QDeclarativeAction ha;
+ ha.property = newBinding->property();
+ ha.toBinding = newBinding;
+ ha.fromValue = ha.property.read();
+ ha.deletableToBinding = true;
+ actions << ha;
+ }
}
return actions;
@@ -408,7 +492,7 @@ void QDeclarativeParentChange::saveOriginals()
d->origStackBefore = d->rewindStackBefore;
}
-void QDeclarativeParentChange::copyOriginals(QDeclarativeActionEvent *other)
+/*void QDeclarativeParentChange::copyOriginals(QDeclarativeActionEvent *other)
{
Q_D(QDeclarativeParentChange);
QDeclarativeParentChange *pc = static_cast<QDeclarativeParentChange*>(other);
@@ -417,7 +501,7 @@ void QDeclarativeParentChange::copyOriginals(QDeclarativeActionEvent *other)
d->origStackBefore = pc->d_func()->rewindStackBefore;
saveCurrentValues();
-}
+}*/
void QDeclarativeParentChange::execute(Reason)
{
@@ -575,7 +659,7 @@ void QDeclarativeStateChangeScript::execute(Reason)
Q_D(QDeclarativeStateChangeScript);
const QString &script = d->script.script();
if (!script.isEmpty()) {
- QDeclarativeExpression expr(d->script.context(), script, d->script.scopeObject());
+ QDeclarativeExpression expr(d->script.context(), d->script.scopeObject(), script);
QDeclarativeData *ddata = QDeclarativeData::get(this);
if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
expr.setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
@@ -1056,40 +1140,41 @@ void QDeclarativeAnchorChanges::execute(Reason reason)
if (!d->target)
return;
+ QDeclarativeItemPrivate *targetPrivate = QDeclarativeItemPrivate::get(d->target);
//incorporate any needed "reverts"
if (d->applyOrigLeft) {
if (!d->origLeftBinding)
- d->target->anchors()->resetLeft();
+ targetPrivate->anchors()->resetLeft();
QDeclarativePropertyPrivate::setBinding(d->leftProp, d->origLeftBinding);
}
if (d->applyOrigRight) {
if (!d->origRightBinding)
- d->target->anchors()->resetRight();
+ targetPrivate->anchors()->resetRight();
QDeclarativePropertyPrivate::setBinding(d->rightProp, d->origRightBinding);
}
if (d->applyOrigHCenter) {
if (!d->origHCenterBinding)
- d->target->anchors()->resetHorizontalCenter();
+ targetPrivate->anchors()->resetHorizontalCenter();
QDeclarativePropertyPrivate::setBinding(d->hCenterProp, d->origHCenterBinding);
}
if (d->applyOrigTop) {
if (!d->origTopBinding)
- d->target->anchors()->resetTop();
+ targetPrivate->anchors()->resetTop();
QDeclarativePropertyPrivate::setBinding(d->topProp, d->origTopBinding);
}
if (d->applyOrigBottom) {
if (!d->origBottomBinding)
- d->target->anchors()->resetBottom();
+ targetPrivate->anchors()->resetBottom();
QDeclarativePropertyPrivate::setBinding(d->bottomProp, d->origBottomBinding);
}
if (d->applyOrigVCenter) {
if (!d->origVCenterBinding)
- d->target->anchors()->resetVerticalCenter();
+ targetPrivate->anchors()->resetVerticalCenter();
QDeclarativePropertyPrivate::setBinding(d->vCenterProp, d->origVCenterBinding);
}
if (d->applyOrigBaseline) {
if (!d->origBaselineBinding)
- d->target->anchors()->resetBaseline();
+ targetPrivate->anchors()->resetBaseline();
QDeclarativePropertyPrivate::setBinding(d->baselineProp, d->origBaselineBinding);
}
@@ -1105,31 +1190,31 @@ void QDeclarativeAnchorChanges::execute(Reason reason)
//reset any anchors that have been specified as "undefined"
if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::LeftAnchor) {
- d->target->anchors()->resetLeft();
+ targetPrivate->anchors()->resetLeft();
QDeclarativePropertyPrivate::setBinding(d->leftProp, 0);
}
if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::RightAnchor) {
- d->target->anchors()->resetRight();
+ targetPrivate->anchors()->resetRight();
QDeclarativePropertyPrivate::setBinding(d->rightProp, 0);
}
if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::HCenterAnchor) {
- d->target->anchors()->resetHorizontalCenter();
+ targetPrivate->anchors()->resetHorizontalCenter();
QDeclarativePropertyPrivate::setBinding(d->hCenterProp, 0);
}
if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::TopAnchor) {
- d->target->anchors()->resetTop();
+ targetPrivate->anchors()->resetTop();
QDeclarativePropertyPrivate::setBinding(d->topProp, 0);
}
if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::BottomAnchor) {
- d->target->anchors()->resetBottom();
+ targetPrivate->anchors()->resetBottom();
QDeclarativePropertyPrivate::setBinding(d->bottomProp, 0);
}
if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::VCenterAnchor) {
- d->target->anchors()->resetVerticalCenter();
+ targetPrivate->anchors()->resetVerticalCenter();
QDeclarativePropertyPrivate::setBinding(d->vCenterProp, 0);
}
if (d->anchorSet->d_func()->resetAnchors & QDeclarativeAnchors::BaselineAnchor) {
- d->target->anchors()->resetBaseline();
+ targetPrivate->anchors()->resetBaseline();
QDeclarativePropertyPrivate::setBinding(d->baselineProp, 0);
}
@@ -1161,51 +1246,52 @@ void QDeclarativeAnchorChanges::reverse(Reason reason)
if (!d->target)
return;
+ QDeclarativeItemPrivate *targetPrivate = QDeclarativeItemPrivate::get(d->target);
//reset any anchors set by the state
if (d->leftBinding) {
- d->target->anchors()->resetLeft();
+ targetPrivate->anchors()->resetLeft();
QDeclarativePropertyPrivate::setBinding(d->leftBinding->property(), 0);
if (reason == ActualChange) {
d->leftBinding->destroy(); d->leftBinding = 0;
}
}
if (d->rightBinding) {
- d->target->anchors()->resetRight();
+ targetPrivate->anchors()->resetRight();
QDeclarativePropertyPrivate::setBinding(d->rightBinding->property(), 0);
if (reason == ActualChange) {
d->rightBinding->destroy(); d->rightBinding = 0;
}
}
if (d->hCenterBinding) {
- d->target->anchors()->resetHorizontalCenter();
+ targetPrivate->anchors()->resetHorizontalCenter();
QDeclarativePropertyPrivate::setBinding(d->hCenterBinding->property(), 0);
if (reason == ActualChange) {
d->hCenterBinding->destroy(); d->hCenterBinding = 0;
}
}
if (d->topBinding) {
- d->target->anchors()->resetTop();
+ targetPrivate->anchors()->resetTop();
QDeclarativePropertyPrivate::setBinding(d->topBinding->property(), 0);
if (reason == ActualChange) {
d->topBinding->destroy(); d->topBinding = 0;
}
}
if (d->bottomBinding) {
- d->target->anchors()->resetBottom();
+ targetPrivate->anchors()->resetBottom();
QDeclarativePropertyPrivate::setBinding(d->bottomBinding->property(), 0);
if (reason == ActualChange) {
d->bottomBinding->destroy(); d->bottomBinding = 0;
}
}
if (d->vCenterBinding) {
- d->target->anchors()->resetVerticalCenter();
+ targetPrivate->anchors()->resetVerticalCenter();
QDeclarativePropertyPrivate::setBinding(d->vCenterBinding->property(), 0);
if (reason == ActualChange) {
d->vCenterBinding->destroy(); d->vCenterBinding = 0;
}
}
if (d->baselineBinding) {
- d->target->anchors()->resetBaseline();
+ targetPrivate->anchors()->resetBaseline();
QDeclarativePropertyPrivate::setBinding(d->baselineBinding->property(), 0);
if (reason == ActualChange) {
d->baselineBinding->destroy(); d->baselineBinding = 0;
@@ -1239,24 +1325,28 @@ QList<QDeclarativeAction> QDeclarativeAnchorChanges::additionalActions()
Q_D(QDeclarativeAnchorChanges);
QList<QDeclarativeAction> extra;
+ QDeclarativeAnchors::Anchors combined = d->anchorSet->d_func()->usedAnchors | d->anchorSet->d_func()->resetAnchors;
+ bool hChange = combined & QDeclarativeAnchors::Horizontal_Mask;
+ bool vChange = combined & QDeclarativeAnchors::Vertical_Mask;
+
if (d->target) {
QDeclarativeAction a;
- if (d->fromX != d->toX) {
+ if (hChange && d->fromX != d->toX) {
a.property = QDeclarativeProperty(d->target, QLatin1String("x"));
a.toValue = d->toX;
extra << a;
}
- if (d->fromY != d->toY) {
+ if (vChange && d->fromY != d->toY) {
a.property = QDeclarativeProperty(d->target, QLatin1String("y"));
a.toValue = d->toY;
extra << a;
}
- if (d->fromWidth != d->toWidth) {
+ if (hChange && d->fromWidth != d->toWidth) {
a.property = QDeclarativeProperty(d->target, QLatin1String("width"));
a.toValue = d->toWidth;
extra << a;
}
- if (d->fromHeight != d->toHeight) {
+ if (vChange && d->fromHeight != d->toHeight) {
a.property = QDeclarativeProperty(d->target, QLatin1String("height"));
a.toValue = d->toHeight;
extra << a;
@@ -1335,37 +1425,38 @@ void QDeclarativeAnchorChanges::clearBindings()
d->fromWidth = d->target->width();
d->fromHeight = d->target->height();
+ QDeclarativeItemPrivate *targetPrivate = QDeclarativeItemPrivate::get(d->target);
//reset any anchors with corresponding reverts
//reset any anchors that have been specified as "undefined"
//reset any anchors that we'll be setting in the state
QDeclarativeAnchors::Anchors combined = d->anchorSet->d_func()->resetAnchors |
d->anchorSet->d_func()->usedAnchors;
if (d->applyOrigLeft || (combined & QDeclarativeAnchors::LeftAnchor)) {
- d->target->anchors()->resetLeft();
+ targetPrivate->anchors()->resetLeft();
QDeclarativePropertyPrivate::setBinding(d->leftProp, 0);
}
if (d->applyOrigRight || (combined & QDeclarativeAnchors::RightAnchor)) {
- d->target->anchors()->resetRight();
+ targetPrivate->anchors()->resetRight();
QDeclarativePropertyPrivate::setBinding(d->rightProp, 0);
}
if (d->applyOrigHCenter || (combined & QDeclarativeAnchors::HCenterAnchor)) {
- d->target->anchors()->resetHorizontalCenter();
+ targetPrivate->anchors()->resetHorizontalCenter();
QDeclarativePropertyPrivate::setBinding(d->hCenterProp, 0);
}
if (d->applyOrigTop || (combined & QDeclarativeAnchors::TopAnchor)) {
- d->target->anchors()->resetTop();
+ targetPrivate->anchors()->resetTop();
QDeclarativePropertyPrivate::setBinding(d->topProp, 0);
}
if (d->applyOrigBottom || (combined & QDeclarativeAnchors::BottomAnchor)) {
- d->target->anchors()->resetBottom();
+ targetPrivate->anchors()->resetBottom();
QDeclarativePropertyPrivate::setBinding(d->bottomProp, 0);
}
if (d->applyOrigVCenter || (combined & QDeclarativeAnchors::VCenterAnchor)) {
- d->target->anchors()->resetVerticalCenter();
+ targetPrivate->anchors()->resetVerticalCenter();
QDeclarativePropertyPrivate::setBinding(d->vCenterProp, 0);
}
if (d->applyOrigBaseline || (combined & QDeclarativeAnchors::BaselineAnchor)) {
- d->target->anchors()->resetBaseline();
+ targetPrivate->anchors()->resetBaseline();
QDeclarativePropertyPrivate::setBinding(d->baselineProp, 0);
}
}
@@ -1387,21 +1478,22 @@ void QDeclarativeAnchorChanges::rewind()
if (!d->target)
return;
+ QDeclarativeItemPrivate *targetPrivate = QDeclarativeItemPrivate::get(d->target);
//restore previous anchors
if (d->rewindLeft.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setLeft(d->rewindLeft);
+ targetPrivate->anchors()->setLeft(d->rewindLeft);
if (d->rewindRight.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setRight(d->rewindRight);
+ targetPrivate->anchors()->setRight(d->rewindRight);
if (d->rewindHCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setHorizontalCenter(d->rewindHCenter);
+ targetPrivate->anchors()->setHorizontalCenter(d->rewindHCenter);
if (d->rewindTop.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setTop(d->rewindTop);
+ targetPrivate->anchors()->setTop(d->rewindTop);
if (d->rewindBottom.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setBottom(d->rewindBottom);
+ targetPrivate->anchors()->setBottom(d->rewindBottom);
if (d->rewindVCenter.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setVerticalCenter(d->rewindVCenter);
+ targetPrivate->anchors()->setVerticalCenter(d->rewindVCenter);
if (d->rewindBaseline.anchorLine != QDeclarativeAnchorLine::Invalid)
- d->target->anchors()->setBaseline(d->rewindBaseline);
+ targetPrivate->anchors()->setBaseline(d->rewindBaseline);
d->target->setX(d->rewindX);
d->target->setY(d->rewindY);
@@ -1415,13 +1507,14 @@ void QDeclarativeAnchorChanges::saveCurrentValues()
if (!d->target)
return;
- d->rewindLeft = d->target->anchors()->left();
- d->rewindRight = d->target->anchors()->right();
- d->rewindHCenter = d->target->anchors()->horizontalCenter();
- d->rewindTop = d->target->anchors()->top();
- d->rewindBottom = d->target->anchors()->bottom();
- d->rewindVCenter = d->target->anchors()->verticalCenter();
- d->rewindBaseline = d->target->anchors()->baseline();
+ QDeclarativeItemPrivate *targetPrivate = QDeclarativeItemPrivate::get(d->target);
+ d->rewindLeft = targetPrivate->anchors()->left();
+ d->rewindRight = targetPrivate->anchors()->right();
+ d->rewindHCenter = targetPrivate->anchors()->horizontalCenter();
+ d->rewindTop = targetPrivate->anchors()->top();
+ d->rewindBottom = targetPrivate->anchors()->bottom();
+ d->rewindVCenter = targetPrivate->anchors()->verticalCenter();
+ d->rewindBaseline = targetPrivate->anchors()->baseline();
d->rewindX = d->target->x();
d->rewindY = d->target->y();
diff --git a/src/declarative/util/qdeclarativestateoperations_p.h b/src/declarative/util/qdeclarativestateoperations_p.h
index e22c1e2..05ad052 100644
--- a/src/declarative/util/qdeclarativestateoperations_p.h
+++ b/src/declarative/util/qdeclarativestateoperations_p.h
@@ -62,12 +62,12 @@ class Q_DECLARATIVE_EXPORT QDeclarativeParentChange : public QDeclarativeStateOp
Q_PROPERTY(QDeclarativeItem *target READ object WRITE setObject)
Q_PROPERTY(QDeclarativeItem *parent READ parent WRITE setParent)
- Q_PROPERTY(qreal x READ x WRITE setX)
- Q_PROPERTY(qreal y READ y WRITE setY)
- Q_PROPERTY(qreal width READ width WRITE setWidth)
- Q_PROPERTY(qreal height READ height WRITE setHeight)
- Q_PROPERTY(qreal scale READ scale WRITE setScale)
- Q_PROPERTY(qreal rotation READ rotation WRITE setRotation)
+ Q_PROPERTY(QDeclarativeScriptString x READ x WRITE setX)
+ Q_PROPERTY(QDeclarativeScriptString y READ y WRITE setY)
+ Q_PROPERTY(QDeclarativeScriptString width READ width WRITE setWidth)
+ Q_PROPERTY(QDeclarativeScriptString height READ height WRITE setHeight)
+ Q_PROPERTY(QDeclarativeScriptString scale READ scale WRITE setScale)
+ Q_PROPERTY(QDeclarativeScriptString rotation READ rotation WRITE setRotation)
public:
QDeclarativeParentChange(QObject *parent=0);
~QDeclarativeParentChange();
@@ -80,34 +80,34 @@ public:
QDeclarativeItem *originalParent() const;
- qreal x() const;
- void setX(qreal x);
+ QDeclarativeScriptString x() const;
+ void setX(QDeclarativeScriptString x);
bool xIsSet() const;
- qreal y() const;
- void setY(qreal y);
+ QDeclarativeScriptString y() const;
+ void setY(QDeclarativeScriptString y);
bool yIsSet() const;
- qreal width() const;
- void setWidth(qreal width);
+ QDeclarativeScriptString width() const;
+ void setWidth(QDeclarativeScriptString width);
bool widthIsSet() const;
- qreal height() const;
- void setHeight(qreal height);
+ QDeclarativeScriptString height() const;
+ void setHeight(QDeclarativeScriptString height);
bool heightIsSet() const;
- qreal scale() const;
- void setScale(qreal scale);
+ QDeclarativeScriptString scale() const;
+ void setScale(QDeclarativeScriptString scale);
bool scaleIsSet() const;
- qreal rotation() const;
- void setRotation(qreal rotation);
+ QDeclarativeScriptString rotation() const;
+ void setRotation(QDeclarativeScriptString rotation);
bool rotationIsSet() const;
virtual ActionList actions();
virtual void saveOriginals();
- virtual void copyOriginals(QDeclarativeActionEvent*);
+ //virtual void copyOriginals(QDeclarativeActionEvent*);
virtual void execute(Reason reason = ActualChange);
virtual bool isReversable();
virtual void reverse(Reason reason = ActualChange);
@@ -277,6 +277,7 @@ public:
virtual bool override(QDeclarativeActionEvent*other);
virtual bool changesBindings();
virtual void saveOriginals();
+ virtual bool needsCopy() { return true; }
virtual void copyOriginals(QDeclarativeActionEvent*);
virtual void clearBindings();
virtual void rewind();
diff --git a/src/declarative/util/qdeclarativesystempalette.cpp b/src/declarative/util/qdeclarativesystempalette.cpp
index 9bb3f69..6c62446 100644
--- a/src/declarative/util/qdeclarativesystempalette.cpp
+++ b/src/declarative/util/qdeclarativesystempalette.cpp
@@ -59,7 +59,6 @@ public:
/*!
\qmlclass SystemPalette QDeclarativeSystemPalette
\since 4.7
- \ingroup group_utility
\brief The SystemPalette item gives access to the Qt palettes.
\sa QPalette
diff --git a/src/declarative/util/qdeclarativetimeline.cpp b/src/declarative/util/qdeclarativetimeline.cpp
index 656c62b..0258b3c 100644
--- a/src/declarative/util/qdeclarativetimeline.cpp
+++ b/src/declarative/util/qdeclarativetimeline.cpp
@@ -255,7 +255,6 @@ qreal QDeclarativeTimeLinePrivate::value(const Op &op, int time, qreal base, boo
/*!
\internal
\class QDeclarativeTimeLine
- \ingroup group_animation
\brief The QDeclarativeTimeLine class provides a timeline for controlling animations.
QDeclarativeTimeLine is similar to QTimeLine except:
@@ -387,7 +386,10 @@ void QDeclarativeTimeLine::set(QDeclarativeTimeLineValue &timeLineValue, qreal v
*/
int QDeclarativeTimeLine::accel(QDeclarativeTimeLineValue &timeLineValue, qreal velocity, qreal acceleration)
{
- if ((velocity > 0.0f) == (acceleration > 0.0f))
+ if (acceleration == 0.0f)
+ return -1;
+
+ if ((velocity > 0.0f) == (acceleration > 0.0f))
acceleration = acceleration * -1.0f;
int time = static_cast<int>(-1000 * velocity / acceleration);
@@ -410,13 +412,16 @@ int QDeclarativeTimeLine::accel(QDeclarativeTimeLineValue &timeLineValue, qreal
*/
int QDeclarativeTimeLine::accel(QDeclarativeTimeLineValue &timeLineValue, qreal velocity, qreal acceleration, qreal maxDistance)
{
- Q_ASSERT(acceleration >= 0.0f && maxDistance >= 0.0f);
+ if (maxDistance == 0.0f || acceleration == 0.0f)
+ return -1;
+
+ Q_ASSERT(acceleration > 0.0f && maxDistance > 0.0f);
qreal maxAccel = (velocity * velocity) / (2.0f * maxDistance);
if (maxAccel > acceleration)
acceleration = maxAccel;
- if ((velocity > 0.0f) == (acceleration > 0.0f))
+ if ((velocity > 0.0f) == (acceleration > 0.0f))
acceleration = acceleration * -1.0f;
int time = static_cast<int>(-1000 * velocity / acceleration);
@@ -438,6 +443,7 @@ int QDeclarativeTimeLine::accelDistance(QDeclarativeTimeLineValue &timeLineValue
{
if (distance == 0.0f || velocity == 0.0f)
return -1;
+
Q_ASSERT((distance >= 0.0f) == (velocity >= 0.0f));
int time = static_cast<int>(1000 * (2.0f * distance) / velocity);
@@ -868,7 +874,6 @@ void QDeclarativeTimeLine::remove(QDeclarativeTimeLineObject *v)
/*!
\internal
\class QDeclarativeTimeLineValue
- \ingroup group_animation
\brief The QDeclarativeTimeLineValue class provides a value that can be modified by QDeclarativeTimeLine.
*/
diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp
index f284156..ab8b116 100644
--- a/src/declarative/util/qdeclarativetransition.cpp
+++ b/src/declarative/util/qdeclarativetransition.cpp
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass Transition QDeclarativeTransition
- \since 4.7
+ \since 4.7
\brief The Transition element defines animated transitions that occur on state changes.
\sa {qmlstates}{States}, {state-transitions}{Transitions}, {QtDeclarative}
@@ -63,8 +63,6 @@ QT_BEGIN_NAMESPACE
\internal
\class QDeclarativeTransition
\brief The QDeclarativeTransition class allows you to define animated transitions that occur on state changes.
-
- \ingroup group_states
*/
//ParallelAnimationWrapper allows us to do a "callback" when the animation finishes, rather than connecting
diff --git a/src/declarative/util/qdeclarativetransitionmanager_p_p.h b/src/declarative/util/qdeclarativetransitionmanager_p_p.h
index 4131391..2e23898 100644
--- a/src/declarative/util/qdeclarativetransitionmanager_p_p.h
+++ b/src/declarative/util/qdeclarativetransitionmanager_p_p.h
@@ -70,7 +70,7 @@ public:
void cancel();
private:
- Q_DISABLE_COPY(QDeclarativeTransitionManager);
+ Q_DISABLE_COPY(QDeclarativeTransitionManager)
QDeclarativeTransitionManagerPrivate *d;
void complete();
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index 62d913c..e68ef94 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -128,19 +128,18 @@ void FrameBreakAnimation::updateCurrentTime(int msecs)
server->frameBreak();
}
-class QDeclarativeViewPrivate : public QDeclarativeItemChangeListener
+class QDeclarativeViewPrivate : public QGraphicsViewPrivate, public QDeclarativeItemChangeListener
{
+ Q_DECLARE_PUBLIC(QDeclarativeView)
public:
- QDeclarativeViewPrivate(QDeclarativeView *view)
- : q(view), root(0), declarativeItemRoot(0), graphicsWidgetRoot(0), component(0), resizeMode(QDeclarativeView::SizeViewToRootObject) {}
+ QDeclarativeViewPrivate()
+ : root(0), declarativeItemRoot(0), graphicsWidgetRoot(0), component(0), resizeMode(QDeclarativeView::SizeViewToRootObject) {}
~QDeclarativeViewPrivate() { delete root; }
void execute();
void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry);
void initResize();
void updateSize();
- inline QSize rootObjectSize();
-
- QDeclarativeView *q;
+ inline QSize rootObjectSize() const;
QDeclarativeGuard<QGraphicsObject> root;
QDeclarativeGuard<QDeclarativeItem> declarativeItemRoot;
@@ -162,6 +161,7 @@ public:
void QDeclarativeViewPrivate::execute()
{
+ Q_Q(QDeclarativeView);
if (root) {
delete root;
root = 0;
@@ -182,6 +182,7 @@ void QDeclarativeViewPrivate::execute()
void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem, const QRectF &newGeometry, const QRectF &oldGeometry)
{
+ Q_Q(QDeclarativeView);
if (resizeItem == root && resizeMode == QDeclarativeView::SizeViewToRootObject) {
// wait for both width and height to be changed
resizetimer.start(0,q);
@@ -250,8 +251,9 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem,
Constructs a QDeclarativeView with the given \a parent.
*/
QDeclarativeView::QDeclarativeView(QWidget *parent)
-: QGraphicsView(parent), d(new QDeclarativeViewPrivate(this))
+ : QGraphicsView(*(new QDeclarativeViewPrivate), parent)
{
+ Q_D(QDeclarativeView);
setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);
d->init();
}
@@ -262,8 +264,9 @@ QDeclarativeView::QDeclarativeView(QWidget *parent)
Constructs a QDeclarativeView with the given QML \a source and \a parent.
*/
QDeclarativeView::QDeclarativeView(const QUrl &source, QWidget *parent)
-: QGraphicsView(parent), d(new QDeclarativeViewPrivate(this))
+ : QGraphicsView(*(new QDeclarativeViewPrivate), parent)
{
+ Q_D(QDeclarativeView);
setSizePolicy(QSizePolicy::Preferred,QSizePolicy::Preferred);
d->init();
setSource(source);
@@ -271,6 +274,7 @@ QDeclarativeView::QDeclarativeView(const QUrl &source, QWidget *parent)
void QDeclarativeViewPrivate::init()
{
+ Q_Q(QDeclarativeView);
q->setScene(&scene);
q->setOptimizationFlags(QGraphicsView::DontSavePainterState);
@@ -288,12 +292,10 @@ void QDeclarativeViewPrivate::init()
}
/*!
- The destructor clears the view's \l {QGraphicsObject} {items} and
- deletes the internal representation.
+ Destroys the view.
*/
QDeclarativeView::~QDeclarativeView()
{
- delete d;
}
/*! \property QDeclarativeView::source
@@ -316,6 +318,7 @@ QDeclarativeView::~QDeclarativeView()
*/
void QDeclarativeView::setSource(const QUrl& url)
{
+ Q_D(QDeclarativeView);
d->source = url;
d->execute();
}
@@ -327,6 +330,7 @@ void QDeclarativeView::setSource(const QUrl& url)
*/
QUrl QDeclarativeView::source() const
{
+ Q_D(const QDeclarativeView);
return d->source;
}
@@ -336,6 +340,7 @@ QUrl QDeclarativeView::source() const
*/
QDeclarativeEngine* QDeclarativeView::engine()
{
+ Q_D(QDeclarativeView);
return &d->engine;
}
@@ -348,6 +353,7 @@ QDeclarativeEngine* QDeclarativeView::engine()
*/
QDeclarativeContext* QDeclarativeView::rootContext()
{
+ Q_D(QDeclarativeView);
return d->engine.rootContext();
}
@@ -376,6 +382,7 @@ QDeclarativeContext* QDeclarativeView::rootContext()
QDeclarativeView::Status QDeclarativeView::status() const
{
+ Q_D(const QDeclarativeView);
if (!d->component)
return QDeclarativeView::Null;
@@ -388,6 +395,7 @@ QDeclarativeView::Status QDeclarativeView::status() const
*/
QList<QDeclarativeError> QDeclarativeView::errors() const
{
+ Q_D(const QDeclarativeView);
if (d->component)
return d->component->errors();
return QList<QDeclarativeError>();
@@ -410,6 +418,7 @@ QList<QDeclarativeError> QDeclarativeView::errors() const
void QDeclarativeView::setResizeMode(ResizeMode mode)
{
+ Q_D(QDeclarativeView);
if (d->resizeMode == mode)
return;
@@ -433,6 +442,7 @@ void QDeclarativeView::setResizeMode(ResizeMode mode)
void QDeclarativeViewPrivate::initResize()
{
+ Q_Q(QDeclarativeView);
if (declarativeItemRoot) {
if (resizeMode == QDeclarativeView::SizeViewToRootObject) {
QDeclarativeItemPrivate *p =
@@ -449,6 +459,7 @@ void QDeclarativeViewPrivate::initResize()
void QDeclarativeViewPrivate::updateSize()
{
+ Q_Q(QDeclarativeView);
if (!root)
return;
if (declarativeItemRoot) {
@@ -479,15 +490,12 @@ void QDeclarativeViewPrivate::updateSize()
q->updateGeometry();
}
-QSize QDeclarativeViewPrivate::rootObjectSize()
+QSize QDeclarativeViewPrivate::rootObjectSize() const
{
QSize rootObjectSize(0,0);
int widthCandidate = -1;
int heightCandidate = -1;
- if (declarativeItemRoot) {
- widthCandidate = declarativeItemRoot->width();
- heightCandidate = declarativeItemRoot->height();
- } else if (root) {
+ if (root) {
QSizeF size = root->boundingRect().size();
widthCandidate = size.width();
heightCandidate = size.height();
@@ -503,6 +511,7 @@ QSize QDeclarativeViewPrivate::rootObjectSize()
QDeclarativeView::ResizeMode QDeclarativeView::resizeMode() const
{
+ Q_D(const QDeclarativeView);
return d->resizeMode;
}
@@ -511,7 +520,7 @@ QDeclarativeView::ResizeMode QDeclarativeView::resizeMode() const
*/
void QDeclarativeView::continueExecute()
{
-
+ Q_D(QDeclarativeView);
disconnect(d->component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), this, SLOT(continueExecute()));
if (d->component->isError()) {
@@ -544,6 +553,7 @@ void QDeclarativeView::continueExecute()
*/
void QDeclarativeView::setRootObject(QObject *obj)
{
+ Q_D(QDeclarativeView);
if (d->root == obj)
return;
if (QDeclarativeItem *declarativeItem = qobject_cast<QDeclarativeItem *>(obj)) {
@@ -593,6 +603,7 @@ void QDeclarativeView::setRootObject(QObject *obj)
*/
void QDeclarativeView::timerEvent(QTimerEvent* e)
{
+ Q_D(QDeclarativeView);
if (!e || e->timerId() == d->resizetimer.timerId()) {
d->updateSize();
d->resizetimer.stop();
@@ -602,6 +613,7 @@ void QDeclarativeView::timerEvent(QTimerEvent* e)
/*! \reimp */
bool QDeclarativeView::eventFilter(QObject *watched, QEvent *e)
{
+ Q_D(QDeclarativeView);
if (watched == d->root && d->resizeMode == SizeViewToRootObject) {
if (d->graphicsWidgetRoot) {
if (e->type() == QEvent::GraphicsSceneResize) {
@@ -614,16 +626,16 @@ bool QDeclarativeView::eventFilter(QObject *watched, QEvent *e)
/*!
\internal
- Preferred size follows the root object in
- resize mode SizeViewToRootObject and
- the view in resize mode SizeRootObjectToView.
+ Preferred size follows the root object geometry.
*/
QSize QDeclarativeView::sizeHint() const
{
- if (d->resizeMode == SizeRootObjectToView) {
+ Q_D(const QDeclarativeView);
+ QSize rootObjectSize = d->rootObjectSize();
+ if (rootObjectSize.isEmpty()) {
return size();
- } else { // d->resizeMode == SizeViewToRootObject
- return d->rootObjectSize();
+ } else {
+ return rootObjectSize;
}
}
@@ -632,6 +644,7 @@ QSize QDeclarativeView::sizeHint() const
*/
QGraphicsObject *QDeclarativeView::rootObject() const
{
+ Q_D(const QDeclarativeView);
return d->root;
}
@@ -642,6 +655,7 @@ QGraphicsObject *QDeclarativeView::rootObject() const
*/
void QDeclarativeView::resizeEvent(QResizeEvent *e)
{
+ Q_D(QDeclarativeView);
if (d->resizeMode == SizeRootObjectToView) {
d->updateSize();
}
@@ -661,6 +675,7 @@ void QDeclarativeView::resizeEvent(QResizeEvent *e)
*/
void QDeclarativeView::paintEvent(QPaintEvent *event)
{
+ Q_D(QDeclarativeView);
int time = 0;
if (frameRateDebug() || QDeclarativeViewDebugServer::isDebuggingEnabled())
time = d->frameTimer.restart();
diff --git a/src/declarative/util/qdeclarativeview.h b/src/declarative/util/qdeclarativeview.h
index 3513c04..e9cff32 100644
--- a/src/declarative/util/qdeclarativeview.h
+++ b/src/declarative/util/qdeclarativeview.h
@@ -106,9 +106,8 @@ protected:
virtual bool eventFilter(QObject *watched, QEvent *e);
private:
- friend class QDeclarativeViewPrivate;
- QDeclarativeViewPrivate *d;
Q_DISABLE_COPY(QDeclarativeView)
+ Q_DECLARE_PRIVATE(QDeclarativeView)
};
QT_END_NAMESPACE
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index bdebadf..4a374a5 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -472,40 +472,71 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
\since 4.7
\brief The XmlListModel element is used to specify a model using XPath expressions.
- XmlListModel is used to create a model from XML data that can be used as a data source
+ XmlListModel is used to create a model from XML data. XmlListModel can be used as a data source
for the view classes (such as ListView, PathView, GridView) and other classes that interact with model
- data (such as Repeater).
+ data (such as \l Repeater).
+
+ For example, if there is a XML document at http://www.mysite.com/feed.xml like this:
+
+ \code
+ <?xml version="1.0" encoding="utf-8"?>
+ <rss version="2.0">
+ ...
+ <channel>
+ <item>
+ <title>Item A</title>
+ <pubDate>Sat, 07 Sep 2010 10:00:01 GMT</pubDate>
+ </item>
+ <item>
+ <title>Item B</title>
+ <pubDate>Sat, 07 Sep 2010 15:35:01 GMT</pubDate>
+ </item>
+ </channel>
+ </rss>
+ \endcode
+
+ Then it could be used to create the following model:
- Here is an example of a model containing news from a Yahoo RSS feed:
\qml
XmlListModel {
- id: feedModel
- source: "http://rss.news.yahoo.com/rss/oceania"
+ source: "http://www.mysite.com/feed.xml"
query: "/rss/channel/item"
XmlRole { name: "title"; query: "title/string()" }
XmlRole { name: "pubDate"; query: "pubDate/string()" }
- XmlRole { name: "description"; query: "description/string()" }
}
\endqml
- You can also define certain roles as "keys" so that the model only adds data
- that contains new values for these keys when reload() is called.
+ The \l {XmlListModel::query}{query} value of "/rss/channel/item" specifies that the XmlListModel should generate
+ a model item for each \c <item> in the XML document. The XmlRole objects define the
+ model item attributes; here, each model item will have \c title and \c pubDate
+ attributes that match the \c title and \c pubDate values of its corresponding \c <item>.
- For example, if the roles above were defined like this:
+
+ \section2 Using key XML roles
+
+ You can define certain roles as "keys" so that when reload() is called,
+ the model will only add and refresh data that contains new values for
+ these keys.
+
+ For example, if above role for "pubDate" was defined like this instead:
\qml
- XmlRole { name: "title"; query: "title/string()"; isKey: true }
XmlRole { name: "pubDate"; query: "pubDate/string()"; isKey: true }
\endqml
- Then when reload() is called, the model will only add new items with a
- "title" and "pubDate" value combination that is not already present in
- the model.
+ Then when reload() is called, the model will only add and reload
+ items with a "pubDate" value that is not already
+ present in the model.
- This is useful to provide incremental updates and avoid repainting an
- entire model in a view.
+ This is useful when displaying the contents of XML documents that
+ are incrementally updated (such as RSS feeds) to avoid repainting the
+ entire contents of a model in a view.
- \sa {QtDeclarative}
+ If multiple key roles are specified, the model only adds and reload items
+ with a combined value of all key roles that is not already present in
+ the model.
+
+ \sa {declarative/xml/xmldata}{XML data example}
*/
QDeclarativeXmlListModel::QDeclarativeXmlListModel(QObject *parent)
@@ -626,8 +657,8 @@ void QDeclarativeXmlListModel::setXml(const QString &xml)
/*!
\qmlproperty string XmlListModel::query
- An absolute XPath query representing the base query for the model items. The query should start with
- '/' or '//'.
+ An absolute XPath query representing the base query for creating model items
+ from this model's XmlRole objects. The query should start with '/' or '//'.
*/
QString QDeclarativeXmlListModel::query() const
{
@@ -652,7 +683,20 @@ void QDeclarativeXmlListModel::setQuery(const QString &query)
/*!
\qmlproperty string XmlListModel::namespaceDeclarations
- A set of declarations for the namespaces used in the query.
+ The namespace declarations to be used in the XPath queries.
+
+ The namespaces should be declared as in XQuery. For example, if a requested document
+ at http://mysite.com/feed.xml uses the namespace "http://www.w3.org/2005/Atom",
+ this can be declared as the default namespace:
+
+ \qml
+ XmlListModel {
+ source: "http://mysite.com/feed.xml"
+ query: "/feed/entry"
+ namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';"
+ XmlRole { name: "title"; query: "title/string()" }
+ }
+ \endqml
*/
QString QDeclarativeXmlListModel::namespaceDeclarations() const
{
@@ -675,10 +719,10 @@ void QDeclarativeXmlListModel::setNamespaceDeclarations(const QString &declarati
Specifies the model loading status, which can be one of the following:
\list
- \o Null - No XML data has been set for this model.
- \o Ready - The XML data has been loaded into the model.
- \o Loading - The model is in the process of reading and loading XML data.
- \o Error - An error occurred while the model was loading.
+ \o XmlListModel.Null - No XML data has been set for this model.
+ \o XmlListModel.Ready - The XML data has been loaded into the model.
+ \o XmlListModel.Loading - The model is in the process of reading and loading XML data.
+ \o XmlListModel.Error - An error occurred while the model was loading.
\endlist
\sa progress
@@ -735,7 +779,7 @@ void QDeclarativeXmlListModel::componentComplete()
Otherwise, items are only added if the model does not already
contain items with matching key role values.
- \sa XmlRole::isKey
+ \sa {Using key XML roles}, XmlRole::isKey
*/
void QDeclarativeXmlListModel::reload()
{
@@ -752,8 +796,11 @@ void QDeclarativeXmlListModel::reload()
if (d->reply) {
d->reply->abort();
- d->reply->deleteLater();
- d->reply = 0;
+ if (d->reply) {
+ // abort will generally have already done this (and more)
+ d->reply->deleteLater();
+ d->reply = 0;
+ }
}
if (!d->xml.isEmpty()) {
diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm
index 8af0d2b..82cfa24 100644
--- a/src/gui/dialogs/qcolordialog_mac.mm
+++ b/src/gui/dialogs/qcolordialog_mac.mm
@@ -65,9 +65,9 @@ typedef float CGFloat; // Should only not be defined on 32-bit platforms
QT_USE_NAMESPACE
-@class QCocoaColorPanelDelegate;
+@class QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate);
-@interface QCocoaColorPanelDelegate : NSObject<NSWindowDelegate> {
+@interface QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) : NSObject<NSWindowDelegate> {
NSColorPanel *mColorPanel;
NSView *mStolenContentView;
NSButton *mOkButton;
@@ -99,7 +99,7 @@ QT_USE_NAMESPACE
- (void)setResultSet:(BOOL)result;
@end
-@implementation QCocoaColorPanelDelegate
+@implementation QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate)
- (id)initWithColorPanel:(NSColorPanel *)panel
stolenContentView:(NSView *)stolenContentView
okButton:(NSButton *)okButton
@@ -432,26 +432,26 @@ void QColorDialogPrivate::openCocoaColorPanel(const QColor &initial,
[colorPanel setDefaultButtonCell:[okButton cell]];
}
- delegate = [[QCocoaColorPanelDelegate alloc] initWithColorPanel:colorPanel
+ delegate = [[QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) alloc] initWithColorPanel:colorPanel
stolenContentView:stolenContentView
okButton:okButton
cancelButton:cancelButton
priv:this];
- [colorPanel setDelegate:static_cast<QCocoaColorPanelDelegate *>(delegate)];
+ [colorPanel setDelegate:static_cast<QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) *>(delegate)];
}
[delegate setResultSet:false];
setCocoaPanelColor(initial);
- [static_cast<QCocoaColorPanelDelegate *>(delegate) showColorPanel];
+ [static_cast<QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) *>(delegate) showColorPanel];
}
void QColorDialogPrivate::closeCocoaColorPanel()
{
- [static_cast<QCocoaColorPanelDelegate *>(delegate) onCancelClicked];
+ [static_cast<QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) *>(delegate) onCancelClicked];
}
void QColorDialogPrivate::releaseCocoaColorPanelDelegate()
{
- [static_cast<QCocoaColorPanelDelegate *>(delegate) release];
+ [static_cast<QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) *>(delegate) release];
}
void QColorDialogPrivate::mac_nativeDialogModalHelp()
@@ -471,13 +471,13 @@ void QColorDialogPrivate::mac_nativeDialogModalHelp()
void QColorDialogPrivate::_q_macRunNativeAppModalPanel()
{
- [static_cast<QCocoaColorPanelDelegate *>(delegate) exec];
+ [static_cast<QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) *>(delegate) exec];
}
void QColorDialogPrivate::setCocoaPanelColor(const QColor &color)
{
QMacCocoaAutoReleasePool pool;
- QCocoaColorPanelDelegate *theDelegate = static_cast<QCocoaColorPanelDelegate *>(delegate);
+ QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) *theDelegate = static_cast<QT_MANGLE_NAMESPACE(QCocoaColorPanelDelegate) *>(delegate);
NSColor *nsColor;
const QColor::Spec spec = color.spec();
if (spec == QColor::Cmyk) {
diff --git a/src/gui/dialogs/qfiledialog.h b/src/gui/dialogs/qfiledialog.h
index 97fac4e..16cb317 100644
--- a/src/gui/dialogs/qfiledialog.h
+++ b/src/gui/dialogs/qfiledialog.h
@@ -67,6 +67,7 @@ class Q_GUI_EXPORT QFileDialog : public QDialog
{
Q_OBJECT
Q_ENUMS(ViewMode FileMode AcceptMode Option)
+ Q_FLAGS(Options)
Q_PROPERTY(ViewMode viewMode READ viewMode WRITE setViewMode)
Q_PROPERTY(FileMode fileMode READ fileMode WRITE setFileMode)
Q_PROPERTY(AcceptMode acceptMode READ acceptMode WRITE setAcceptMode)
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index 28acf24..b07b1ea 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -82,9 +82,9 @@ QT_FORWARD_DECLARE_CLASS(QAction)
QT_FORWARD_DECLARE_CLASS(QFileInfo)
QT_USE_NAMESPACE
-@class QNSOpenSavePanelDelegate;
+@class QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate);
-@interface QNSOpenSavePanelDelegate : NSObject {
+@interface QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) : NSObject {
@public
NSOpenPanel *mOpenPanel;
NSSavePanel *mSavePanel;
@@ -123,7 +123,7 @@ QT_USE_NAMESPACE
@end
-@implementation QNSOpenSavePanelDelegate
+@implementation QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate)
- (id)initWithAcceptMode:(QT_PREPEND_NAMESPACE(QFileDialog::AcceptMode))acceptMode
title:(const QString &)title
@@ -554,7 +554,7 @@ void QFileDialogPrivate::setDirectory_sys(const QString &directory)
}
#else
QMacCocoaAutoReleasePool pool;
- QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
+ QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
[delegate->mSavePanel setDirectory:qt_mac_QStringToNSString(directory)];
#endif
}
@@ -565,7 +565,7 @@ QString QFileDialogPrivate::directory_sys() const
return mCurrentLocation;
#else
QMacCocoaAutoReleasePool pool;
- QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
+ QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
return qt_mac_NSStringToQString([delegate->mSavePanel directory]);
#endif
}
@@ -622,7 +622,7 @@ QStringList QFileDialogPrivate::selectedFiles_sys() const
}
#else
QMacCocoaAutoReleasePool pool;
- QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
+ QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
return [delegate selectedFiles];
#endif
}
@@ -633,7 +633,7 @@ void QFileDialogPrivate::setNameFilters_sys(const QStringList &filters)
Q_UNUSED(filters);
#else
QMacCocoaAutoReleasePool pool;
- QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
+ QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
bool hideDetails = q_func()->testOption(QFileDialog::HideNameFilterDetails);
[delegate setNameFilters:filters hideDetails:hideDetails];
#endif
@@ -645,7 +645,7 @@ void QFileDialogPrivate::setFilter_sys()
#else
Q_Q(QFileDialog);
QMacCocoaAutoReleasePool pool;
- QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
+ QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
*(delegate->mQDirFilter) = model->filter();
delegate->mFileMode = fileMode;
[delegate->mSavePanel setTitle:qt_mac_QStringToNSString(q->windowTitle())];
@@ -668,7 +668,7 @@ void QFileDialogPrivate::selectNameFilter_sys(const QString &filter)
NavCustomControl(mDialog, kNavCtlSelectCustomType, &navSpec);
#else
QMacCocoaAutoReleasePool pool;
- QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
+ QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
[delegate->mPopUpButton selectItemAtIndex:index];
[delegate filterChanged:nil];
#endif
@@ -681,7 +681,7 @@ QString QFileDialogPrivate::selectedNameFilter_sys() const
int index = filterInfo.currentSelection;
#else
QMacCocoaAutoReleasePool pool;
- QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
+ QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
int index = [delegate->mPopUpButton indexOfSelectedItem];
#endif
return index != -1 ? nameFilters.at(index) : QString();
@@ -696,7 +696,7 @@ void QFileDialogPrivate::deleteNativeDialog_sys()
mDialogStarted = false;
#else
QMacCocoaAutoReleasePool pool;
- [reinterpret_cast<QNSOpenSavePanelDelegate *>(mDelegate) release];
+ [reinterpret_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate) release];
mDelegate = 0;
#endif
nativeDialogInUse = false;
@@ -1034,7 +1034,7 @@ void QFileDialogPrivate::createNSOpenSavePanelDelegate()
bool selectDir = q->selectedFiles().isEmpty();
QString selection(selectDir ? q->directory().absolutePath() : q->selectedFiles().value(0));
- QNSOpenSavePanelDelegate *delegate = [[QNSOpenSavePanelDelegate alloc]
+ QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = [[QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) alloc]
initWithAcceptMode:acceptMode
title:q->windowTitle()
nameFilters:q->nameFilters()
@@ -1055,7 +1055,7 @@ bool QFileDialogPrivate::showCocoaFilePanel()
Q_Q(QFileDialog);
QMacCocoaAutoReleasePool pool;
createNSOpenSavePanelDelegate();
- QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
+ QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
if (qt_mac_is_macsheet(q))
[delegate showWindowModalSheet:q->parentWidget()];
else
@@ -1071,7 +1071,7 @@ bool QFileDialogPrivate::hideCocoaFilePanel()
return false;
} else {
QMacCocoaAutoReleasePool pool;
- QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
+ QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
[delegate closePanel];
// Even when we hide it, we are still using a
// native dialog, so return true:
@@ -1104,7 +1104,7 @@ void QFileDialogPrivate::_q_macRunNativeAppModalPanel()
#else
Q_Q(QFileDialog);
QMacCocoaAutoReleasePool pool;
- QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
+ QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
[delegate runApplicationModalPanel];
dialogResultCode_sys() == QDialog::Accepted ? q->accept() : q->reject();
#endif
@@ -1119,7 +1119,7 @@ QDialog::DialogCode QFileDialogPrivate::dialogResultCode_sys()
else
return QDialog::Accepted;
#else
- QNSOpenSavePanelDelegate *delegate = static_cast<QNSOpenSavePanelDelegate *>(mDelegate);
+ QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *delegate = static_cast<QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *>(mDelegate);
return [delegate dialogResultCode];
#endif
}
diff --git a/src/gui/dialogs/qfileinfogatherer.cpp b/src/gui/dialogs/qfileinfogatherer.cpp
index 3b279ae..af0506f 100644
--- a/src/gui/dialogs/qfileinfogatherer.cpp
+++ b/src/gui/dialogs/qfileinfogatherer.cpp
@@ -55,7 +55,18 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_FILESYSTEMMODEL
-bool QFileInfoGatherer::fetchedRoot = false;
+#ifdef QT_BUILD_INTERNAL
+static bool fetchedRoot = false;
+Q_AUTOTEST_EXPORT void qt_test_resetFetchedRoot()
+{
+ fetchedRoot = false;
+}
+
+Q_AUTOTEST_EXPORT bool qt_test_isFetchedRoot()
+{
+ return fetchedRoot;
+}
+#endif
/*!
Creates thread
@@ -278,7 +289,7 @@ void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &fil
// List drives
if (path.isEmpty()) {
-#if defined Q_AUTOTEST_EXPORT
+#ifdef QT_BUILD_INTERNAL
fetchedRoot = true;
#endif
QFileInfoList infoList;
diff --git a/src/gui/dialogs/qfileinfogatherer_p.h b/src/gui/dialogs/qfileinfogatherer_p.h
index 5abcd94..8681eb5 100644
--- a/src/gui/dialogs/qfileinfogatherer_p.h
+++ b/src/gui/dialogs/qfileinfogatherer_p.h
@@ -195,9 +195,6 @@ private:
uint userId;
uint groupId;
#endif
-public :
- //for testing purpose
- static bool fetchedRoot;
};
#endif // QT_NO_FILESYSTEMMODEL
diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm
index 919790b..bb8ef3f 100644
--- a/src/gui/dialogs/qfontdialog_mac.mm
+++ b/src/gui/dialogs/qfontdialog_mac.mm
@@ -82,7 +82,7 @@ const CGFloat DialogSideMargin = 9.0;
const int StyleMask = NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask;
-@class QCocoaFontPanelDelegate;
+@class QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate);
#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
@@ -93,7 +93,7 @@ const int StyleMask = NSTitledWindowMask | NSClosableWindowMask | NSResizableWin
#endif
-@interface QCocoaFontPanelDelegate : NSObject <NSWindowDelegate> {
+@interface QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) : NSObject <NSWindowDelegate> {
NSFontPanel *mFontPanel;
NSView *mStolenContentView;
NSButton *mOkButton;
@@ -156,7 +156,7 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
return newFont;
}
-@implementation QCocoaFontPanelDelegate
+@implementation QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate)
- (id)initWithFontPanel:(NSFontPanel *)panel
stolenContentView:(NSView *)stolenContentView
okButton:(NSButton *)okButton
@@ -478,7 +478,7 @@ QT_BEGIN_NAMESPACE
void QFontDialogPrivate::closeCocoaFontPanel()
{
QMacCocoaAutoReleasePool pool;
- QCocoaFontPanelDelegate *theDelegate = static_cast<QCocoaFontPanelDelegate *>(delegate);
+ QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) *theDelegate = static_cast<QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) *>(delegate);
NSWindow *ourPanel = [theDelegate actualPanel];
[ourPanel close];
[theDelegate cleanUpAfterMyself];
@@ -519,7 +519,7 @@ void QFontDialogPrivate::setFont(void *delegate, const QFont &font)
}
[mgr setSelectedFont:nsFont isMultiple:NO];
- [static_cast<QCocoaFontPanelDelegate *>(delegate) setQtFont:font];
+ [static_cast<QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) *>(delegate) setQtFont:font];
}
void QFontDialogPrivate::createNSFontPanelDelegate()
@@ -584,7 +584,7 @@ void QFontDialogPrivate::createNSFontPanelDelegate()
}
// create the delegate and set it
- QCocoaFontPanelDelegate *del = [[QCocoaFontPanelDelegate alloc] initWithFontPanel:sharedFontPanel
+ QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) *del = [[QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) alloc] initWithFontPanel:sharedFontPanel
stolenContentView:stolenContentView
okButton:okButton
cancelButton:cancelButton
@@ -637,7 +637,7 @@ void QFontDialogPrivate::mac_nativeDialogModalHelp()
void QFontDialogPrivate::_q_macRunNativeAppModalPanel()
{
createNSFontPanelDelegate();
- QCocoaFontPanelDelegate *del = static_cast<QCocoaFontPanelDelegate *>(delegate);
+ QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) *del = static_cast<QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) *>(delegate);
[del runApplicationModalPanel];
}
@@ -649,7 +649,7 @@ bool QFontDialogPrivate::showCocoaFontPanel()
Q_Q(QFontDialog);
QMacCocoaAutoReleasePool pool;
createNSFontPanelDelegate();
- QCocoaFontPanelDelegate *del = static_cast<QCocoaFontPanelDelegate *>(delegate);
+ QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) *del = static_cast<QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) *>(delegate);
if (qt_mac_is_macsheet(q))
[del showWindowModalSheet:q->parentWidget()];
else
diff --git a/src/gui/dialogs/qmessagebox.h b/src/gui/dialogs/qmessagebox.h
index bc6170d..f1ff6cc 100644
--- a/src/gui/dialogs/qmessagebox.h
+++ b/src/gui/dialogs/qmessagebox.h
@@ -354,7 +354,7 @@ if (!qApp){ \
QString s = QApplication::tr("Executable '%1' requires Qt "\
"%2, found Qt %3.").arg(qAppName()).arg(QString::fromLatin1(\
str)).arg(QString::fromLatin1(qVersion())); QMessageBox::critical(0, QApplication::tr(\
-"Incompatible Qt Library Error"), s, QMessageBox::Abort, 0); qFatal(s.toLatin1().data()); }}
+"Incompatible Qt Library Error"), s, QMessageBox::Abort, 0); qFatal("%s", s.toLatin1().data()); }}
#endif // QT_NO_MESSAGEBOX
diff --git a/src/gui/dialogs/qnspanelproxy_mac.mm b/src/gui/dialogs/qnspanelproxy_mac.mm
index f01c035..0e8d64d 100644
--- a/src/gui/dialogs/qnspanelproxy_mac.mm
+++ b/src/gui/dialogs/qnspanelproxy_mac.mm
@@ -53,9 +53,9 @@ QT_END_NAMESPACE
QT_USE_NAMESPACE
-@class QNSPanelProxy;
+@class QT_MANGLE_NAMESPACE(QNSPanelProxy);
-@interface QNSPanelProxy : NSWindow {
+@interface QT_MANGLE_NAMESPACE(QNSPanelProxy) : NSWindow {
}
- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle
backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation;
@@ -67,7 +67,7 @@ QT_USE_NAMESPACE
backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation screen:(NSScreen *)screen;
@end
-@implementation QNSPanelProxy
+@implementation QT_MANGLE_NAMESPACE(QNSPanelProxy)
- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle
backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation
{
@@ -109,15 +109,15 @@ QT_USE_NAMESPACE
}
@end
-@class QNSWindowProxy;
+@class QT_MANGLE_NAMESPACE(QNSWindowProxy);
-@interface QNSWindowProxy : NSWindow {
+@interface QT_MANGLE_NAMESPACE(QNSWindowProxy) : NSWindow {
}
- (void)setTitle:(NSString *)title;
- (void)qt_fakeSetTitle:(NSString *)title;
@end
-@implementation QNSWindowProxy
+@implementation QT_MANGLE_NAMESPACE(QNSWindowProxy)
- (void)setTitle:(NSString *)title
{
QCFString cftitle(currentWindow->windowTitle());
@@ -152,13 +152,13 @@ void macStartInterceptNSPanelCtor()
qt_cocoa_change_implementation(
[NSPanel class],
@selector(initWithContentRect:styleMask:backing:defer:),
- [QNSPanelProxy class],
+ [QT_MANGLE_NAMESPACE(QNSPanelProxy) class],
@selector(initWithContentRect:styleMask:backing:defer:),
@selector(qt_fakeInitWithContentRect:styleMask:backing:defer:));
qt_cocoa_change_implementation(
[NSPanel class],
@selector(initWithContentRect:styleMask:backing:defer:screen:),
- [QNSPanelProxy class],
+ [QT_MANGLE_NAMESPACE(QNSPanelProxy) class],
@selector(initWithContentRect:styleMask:backing:defer:screen:),
@selector(qt_fakeInitWithContentRect:styleMask:backing:defer:screen:));
}
@@ -188,7 +188,7 @@ void macStartInterceptWindowTitle(QWidget *window)
qt_cocoa_change_implementation(
[NSWindow class],
@selector(setTitle:),
- [QNSWindowProxy class],
+ [QT_MANGLE_NAMESPACE(QNSWindowProxy) class],
@selector(setTitle:),
@selector(qt_fakeSetTitle:));
}
diff --git a/src/gui/dialogs/qpagesetupdialog_mac.mm b/src/gui/dialogs/qpagesetupdialog_mac.mm
index cfcde0f..0302be4 100644
--- a/src/gui/dialogs/qpagesetupdialog_mac.mm
+++ b/src/gui/dialogs/qpagesetupdialog_mac.mm
@@ -50,9 +50,9 @@
QT_USE_NAMESPACE
-@class QCocoaPageLayoutDelegate;
+@class QT_MANGLE_NAMESPACE(QCocoaPageLayoutDelegate);
-@interface QCocoaPageLayoutDelegate : NSObject {
+@interface QT_MANGLE_NAMESPACE(QCocoaPageLayoutDelegate) : NSObject {
QMacPrintEnginePrivate *pe;
}
- (id)initWithMacPrintEngine:(QMacPrintEnginePrivate *)printEngine;
@@ -60,7 +60,7 @@ QT_USE_NAMESPACE
returnCode:(int)returnCode contextInfo:(void *)contextInfo;
@end
-@implementation QCocoaPageLayoutDelegate
+@implementation QT_MANGLE_NAMESPACE(QCocoaPageLayoutDelegate)
- (id)initWithMacPrintEngine:(QMacPrintEnginePrivate *)printEngine;
{
self = [super init];
@@ -213,7 +213,7 @@ void QPageSetupDialogPrivate::openCocoaPageLayout(Qt::WindowModality modality)
pageLayout = [NSPageLayout pageLayout];
// Keep a copy to this since we plan on using it for a bit.
[pageLayout retain];
- QCocoaPageLayoutDelegate *delegate = [[QCocoaPageLayoutDelegate alloc] initWithMacPrintEngine:ep];
+ QT_MANGLE_NAMESPACE(QCocoaPageLayoutDelegate) *delegate = [[QT_MANGLE_NAMESPACE(QCocoaPageLayoutDelegate) alloc] initWithMacPrintEngine:ep];
if (modality == Qt::ApplicationModal) {
int rval = [pageLayout runModalWithPrintInfo:ep->printInfo];
diff --git a/src/gui/dialogs/qprintdialog_mac.mm b/src/gui/dialogs/qprintdialog_mac.mm
index 6a8d6a4..84a72db 100644
--- a/src/gui/dialogs/qprintdialog_mac.mm
+++ b/src/gui/dialogs/qprintdialog_mac.mm
@@ -124,15 +124,15 @@ QT_USE_NAMESPACE
#ifdef QT_MAC_USE_COCOA
-@class QCocoaPrintPanelDelegate;
+@class QT_MANGLE_NAMESPACE(QCocoaPrintPanelDelegate);
-@interface QCocoaPrintPanelDelegate : NSObject {
+@interface QT_MANGLE_NAMESPACE(QCocoaPrintPanelDelegate) : NSObject {
}
- (void)printPanelDidEnd:(NSPrintPanel *)printPanel
returnCode:(int)returnCode contextInfo:(void *)contextInfo;
@end
-@implementation QCocoaPrintPanelDelegate
+@implementation QT_MANGLE_NAMESPACE(QCocoaPrintPanelDelegate)
- (void)printPanelDidEnd:(NSPrintPanel *)printPanel
returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
@@ -313,7 +313,7 @@ void QPrintDialogPrivate::openCocoaPrintPanel(Qt::WindowModality modality)
macStartInterceptWindowTitle(q);
printPanel = [NSPrintPanel printPanel];
- QCocoaPrintPanelDelegate *delegate = [[QCocoaPrintPanelDelegate alloc] init];
+ QT_MANGLE_NAMESPACE(QCocoaPrintPanelDelegate) *delegate = [[QT_MANGLE_NAMESPACE(QCocoaPrintPanelDelegate) alloc] init];
[printPanel setOptions:macOptions];
if (modality == Qt::ApplicationModal) {
diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp
index e3c62be..5d0bcac 100644
--- a/src/gui/dialogs/qprintdialog_unix.cpp
+++ b/src/gui/dialogs/qprintdialog_unix.cpp
@@ -973,7 +973,7 @@ void QUnixPrintWidgetPrivate::_q_btnPropertiesClicked()
#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
void QUnixPrintWidgetPrivate::setCupsProperties()
{
- if (cups && QCUPSSupport::isAvailable()) {
+ if (cups && QCUPSSupport::isAvailable() && cups->pageSizes()) {
QPrintEngine *engine = printer->printEngine();
const ppd_option_t* pageSizes = cups->pageSizes();
QByteArray cupsPageSize;
diff --git a/src/gui/dialogs/qwizard_win.cpp b/src/gui/dialogs/qwizard_win.cpp
index 1390b21..e406cba 100644
--- a/src/gui/dialogs/qwizard_win.cpp
+++ b/src/gui/dialogs/qwizard_win.cpp
@@ -237,7 +237,8 @@ void QVistaBackButton::paintEvent(QPaintEvent *)
*/
QVistaHelper::QVistaHelper(QWizard *wizard)
- : pressed(false)
+ : QObject(wizard)
+ , pressed(false)
, wizard(wizard)
, backButton_(0)
{
diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp
index ce4ce6a..5e4e49e 100644
--- a/src/gui/effects/qgraphicseffect.cpp
+++ b/src/gui/effects/qgraphicseffect.cpp
@@ -326,7 +326,7 @@ QPixmap QGraphicsEffectSource::pixmap(Qt::CoordinateSystem system, QPoint *offse
}
QPixmap pm;
- if (d->m_cachedSystem == system && d->m_cachedMode == mode)
+ if (item && d->m_cachedSystem == system && d->m_cachedMode == mode)
QPixmapCache::find(d->m_cacheKey, &pm);
if (pm.isNull()) {
diff --git a/src/gui/egl/qegl_qws.cpp b/src/gui/egl/qegl_qws.cpp
index 56383a5..50db397 100644
--- a/src/gui/egl/qegl_qws.cpp
+++ b/src/gui/egl/qegl_qws.cpp
@@ -94,7 +94,7 @@ void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev)
EGLNativeDisplayType QEgl::nativeDisplay()
{
- return EGL_DEFAULT_DISPLAY;
+ return EGLNativeDisplayType(EGL_DEFAULT_DISPLAY);
}
EGLNativeWindowType QEgl::nativeWindow(QWidget* widget)
diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp
index cb8dcda..969acc4 100644
--- a/src/gui/egl/qegl_x11.cpp
+++ b/src/gui/egl/qegl_x11.cpp
@@ -163,6 +163,11 @@ VisualID QEgl::getCompatibleVisualId(EGLConfig config)
int matchingCount = 0;
chosenVisualInfo = XGetVisualInfo(X11->display, VisualIDMask, &visualInfoTemplate, &matchingCount);
if (chosenVisualInfo) {
+ // Skip size checks if implementation supports non-matching visual
+ // and config (http://bugreports.qt.nokia.com/browse/QTBUG-9444).
+ if (QEgl::hasExtension("EGL_NV_post_convert_replication"))
+ return visualId;
+
int visualRedSize = countBits(chosenVisualInfo->red_mask);
int visualGreenSize = countBits(chosenVisualInfo->green_mask);
int visualBlueSize = countBits(chosenVisualInfo->blue_mask);
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 413f114..2030f1a 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -50,7 +50,7 @@
It provides a light-weight foundation for writing your own custom items.
This includes defining the item's geometry, collision detection, its
painting implementation and item interaction through its event handlers.
- QGraphicsItem is part of \l{The Graphics View Framework}
+ QGraphicsItem is part of the \l{Graphics View Framework}
\image graphicsview-items.png
@@ -264,7 +264,7 @@
functionality is completely untouched by Qt itself; it is provided for the
user's convenience.
- \sa QGraphicsScene, QGraphicsView, {The Graphics View Framework}
+ \sa QGraphicsScene, QGraphicsView, {Graphics View Framework}
*/
/*!
@@ -1090,6 +1090,10 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
if (newParent == parent)
return;
+ if (isWidget)
+ static_cast<QGraphicsWidgetPrivate *>(this)->fixFocusChainBeforeReparenting((newParent &&
+ newParent->isWidget()) ? static_cast<QGraphicsWidget *>(newParent) : 0,
+ scene);
if (scene) {
// Deliver the change to the index
if (scene->d_func()->indexMethod != QGraphicsScene::NoIndex)
@@ -1423,6 +1427,13 @@ QGraphicsItem::~QGraphicsItem()
d_ptr->inDestructor = 1;
d_ptr->removeExtraItemCache();
+ if (d_ptr->isObject && !d_ptr->gestureContext.isEmpty()) {
+ QGraphicsObject *o = static_cast<QGraphicsObject *>(this);
+ QGestureManager *manager = QGestureManager::instance();
+ foreach (Qt::GestureType type, d_ptr->gestureContext.keys())
+ manager->cleanupCachedGestures(o, type);
+ }
+
clearFocus();
// Update focus scope item ptr.
@@ -1796,9 +1807,6 @@ static void _q_qgraphicsItemSetFlag(QGraphicsItem *item, QGraphicsItem::Graphics
*/
void QGraphicsItem::setFlags(GraphicsItemFlags flags)
{
- if (isWindow())
- flags |= ItemIsPanel;
-
// Notify change and check for adjustment.
if (quint32(d_ptr->flags) == quint32(flags))
return;
@@ -1812,7 +1820,7 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags)
const quint32 geomChangeFlagsMask = (ItemClipsChildrenToShape | ItemClipsToShape | ItemIgnoresTransformations | ItemIsSelectable);
bool fullUpdate = (quint32(flags) & geomChangeFlagsMask) != (d_ptr->flags & geomChangeFlagsMask);
if (fullUpdate)
- d_ptr->paintedViewBoundingRectsNeedRepaint = 1;
+ d_ptr->updatePaintedViewBoundingRects(/*children=*/true);
// Keep the old flags to compare the diff.
GraphicsItemFlags oldFlags = GraphicsItemFlags(d_ptr->flags);
@@ -3648,6 +3656,8 @@ void QGraphicsItem::setPos(const QPointF &pos)
// Update and repositition.
if (!(d_ptr->flags & (ItemSendsGeometryChanges | ItemSendsScenePositionChanges))) {
d_ptr->setPosHelper(pos);
+ if (d_ptr->isWidget)
+ static_cast<QGraphicsWidget *>(this)->d_func()->setGeometryFromSetPos();
return;
}
@@ -5432,6 +5442,24 @@ void QGraphicsItemPrivate::removeExtraItemCache()
unsetExtra(ExtraCacheData);
}
+void QGraphicsItemPrivate::updatePaintedViewBoundingRects(bool updateChildren)
+{
+ if (!scene)
+ return;
+
+ for (int i = 0; i < scene->d_func()->views.size(); ++i) {
+ QGraphicsViewPrivate *viewPrivate = scene->d_func()->views.at(i)->d_func();
+ QRect rect = paintedViewBoundingRects.value(viewPrivate->viewport);
+ rect.translate(viewPrivate->dirtyScrollOffset);
+ viewPrivate->updateRect(rect);
+ }
+
+ if (updateChildren) {
+ for (int i = 0; i < children.size(); ++i)
+ children.at(i)->d_ptr->updatePaintedViewBoundingRects(true);
+ }
+}
+
// Traverses all the ancestors up to the top-level and updates the pointer to
// always point to the top-most item that has a dirty scene transform.
// It then backtracks to the top-most dirty item and start calculating the
@@ -5635,8 +5663,9 @@ void QGraphicsItem::scroll(qreal dx, qreal dy, const QRectF &rect)
// Adjust with 2 pixel margin. Notice the loss of precision
// when converting to QRect.
int adjust = 2;
+ QRectF scrollRect = !rect.isNull() ? rect : boundingRect();
QRectF br = boundingRect().adjusted(-adjust, -adjust, adjust, adjust);
- QRect irect = rect.toRect().translated(-br.x(), -br.y());
+ QRect irect = scrollRect.toRect().translated(-br.x(), -br.y());
pix.scroll(dx, dy, irect);
@@ -5644,11 +5673,11 @@ void QGraphicsItem::scroll(qreal dx, qreal dy, const QRectF &rect)
// Translate the existing expose.
foreach (QRectF exposedRect, c->exposed)
- c->exposed += exposedRect.translated(dx, dy) & rect;
+ c->exposed += exposedRect.translated(dx, dy) & scrollRect;
// Calculate exposure.
QRegion exposed;
- QRect r = rect.toRect();
+ QRect r = scrollRect.toRect();
exposed += r;
exposed -= r.translated(dx, dy);
foreach (QRect rect, exposed.rects())
@@ -7131,7 +7160,11 @@ void QGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
// calculate their diff by mapping viewport coordinates
// directly to parent coordinates.
// COMBINE
- QTransform viewToParentTransform = (item->d_func()->transformData->computedFullTransform().translate(item->d_ptr->pos.x(), item->d_ptr->pos.y()))
+ QTransform itemTransform;
+ if (item->d_ptr->transformData)
+ itemTransform = item->d_ptr->transformData->computedFullTransform();
+ itemTransform.translate(item->d_ptr->pos.x(), item->d_ptr->pos.y());
+ QTransform viewToParentTransform = itemTransform
* (item->sceneTransform() * view->viewportTransform()).inverted();
currentParentPos = viewToParentTransform.map(QPointF(view->mapFromGlobal(event->screenPos())));
buttonDownParentPos = viewToParentTransform.map(QPointF(view->mapFromGlobal(event->buttonDownScreenPos(Qt::LeftButton))));
@@ -7619,9 +7652,10 @@ QGraphicsObject::QGraphicsObject(QGraphicsItemPrivate &dd, QGraphicsItem *parent
*/
void QGraphicsObject::grabGesture(Qt::GestureType gesture, Qt::GestureFlags flags)
{
- QGraphicsItemPrivate * const d = QGraphicsItem::d_func();
- d->gestureContext.insert(gesture, flags);
- (void)QGestureManager::instance(); // create a gesture manager
+ bool contains = QGraphicsItem::d_ptr->gestureContext.contains(gesture);
+ QGraphicsItem::d_ptr->gestureContext.insert(gesture, flags);
+ if (!contains && QGraphicsItem::d_ptr->scene)
+ QGraphicsItem::d_ptr->scene->d_func()->grabGesture(this, gesture);
}
/*!
@@ -7631,13 +7665,16 @@ void QGraphicsObject::grabGesture(Qt::GestureType gesture, Qt::GestureFlags flag
*/
void QGraphicsObject::ungrabGesture(Qt::GestureType gesture)
{
- QGraphicsItemPrivate * const d = QGraphicsItem::d_func();
- if (d->gestureContext.remove(gesture)) {
- QGestureManager *manager = QGestureManager::instance();
- manager->cleanupCachedGestures(this, gesture);
- }
+ if (QGraphicsItem::d_ptr->gestureContext.remove(gesture) && QGraphicsItem::d_ptr->scene)
+ QGraphicsItem::d_ptr->scene->d_func()->ungrabGesture(this, gesture);
}
+/*!
+ Updates the item's micro focus. This is slot for convenience.
+
+ \since 4.7
+ \sa QInputContext
+*/
void QGraphicsObject::updateMicroFocus()
{
QGraphicsItem::updateMicroFocus();
@@ -7946,6 +7983,13 @@ void QGraphicsItemPrivate::resetHeight()
*/
/*!
+ \property QGraphicsObject::effect
+ \brief the effect attached to this item
+
+ \sa QGraphicsItem::setGraphicsEffect(), QGraphicsItem::graphicsEffect()
+*/
+
+/*!
\class QAbstractGraphicsShapeItem
\brief The QAbstractGraphicsShapeItem class provides a common base for
all path items.
@@ -7961,7 +8005,7 @@ void QGraphicsItemPrivate::resetHeight()
\sa QGraphicsRectItem, QGraphicsEllipseItem, QGraphicsPathItem,
QGraphicsPolygonItem, QGraphicsTextItem, QGraphicsLineItem,
- QGraphicsPixmapItem, {The Graphics View Framework}
+ QGraphicsPixmapItem, {Graphics View Framework}
*/
class QAbstractGraphicsShapeItemPrivate : public QGraphicsItemPrivate
@@ -8104,7 +8148,7 @@ QPainterPath QAbstractGraphicsShapeItem::opaqueArea() const
setBrush() functions.
\sa QGraphicsRectItem, QGraphicsEllipseItem, QGraphicsPolygonItem,
- QGraphicsTextItem, QGraphicsLineItem, QGraphicsPixmapItem, {The Graphics
+ QGraphicsTextItem, QGraphicsLineItem, QGraphicsPixmapItem, {Graphics
View Framework}
*/
@@ -8313,7 +8357,7 @@ QVariant QGraphicsPathItem::extension(const QVariant &variant) const
those instead.
\sa QGraphicsPathItem, QGraphicsEllipseItem, QGraphicsPolygonItem,
- QGraphicsTextItem, QGraphicsLineItem, QGraphicsPixmapItem, {The Graphics
+ QGraphicsTextItem, QGraphicsLineItem, QGraphicsPixmapItem, {Graphics
View Framework}
*/
@@ -8557,7 +8601,7 @@ QVariant QGraphicsRectItem::extension(const QVariant &variant) const
brush, which you can set by calling setPen() and setBrush().
\sa QGraphicsPathItem, QGraphicsRectItem, QGraphicsPolygonItem,
- QGraphicsTextItem, QGraphicsLineItem, QGraphicsPixmapItem, {The Graphics
+ QGraphicsTextItem, QGraphicsLineItem, QGraphicsPixmapItem, {Graphics
View Framework}
*/
@@ -8866,7 +8910,7 @@ QVariant QGraphicsEllipseItem::extension(const QVariant &variant) const
setPen() and setBrush() functions.
\sa QGraphicsPathItem, QGraphicsRectItem, QGraphicsEllipseItem,
- QGraphicsTextItem, QGraphicsLineItem, QGraphicsPixmapItem, {The Graphics
+ QGraphicsTextItem, QGraphicsLineItem, QGraphicsPixmapItem, {Graphics
View Framework}
*/
@@ -9098,8 +9142,8 @@ QVariant QGraphicsPolygonItem::extension(const QVariant &variant) const
function draws the line using the item's associated pen.
\sa QGraphicsPathItem, QGraphicsRectItem, QGraphicsEllipseItem,
- QGraphicsTextItem, QGraphicsPolygonItem, QGraphicsPixmapItem, {The
- Graphics View Framework}
+ QGraphicsTextItem, QGraphicsPolygonItem, QGraphicsPixmapItem,
+ {Graphics View Framework}
*/
class QGraphicsLineItemPrivate : public QGraphicsItemPrivate
@@ -9370,8 +9414,8 @@ QVariant QGraphicsLineItem::extension(const QVariant &variant) const
transformation mode for the item.
\sa QGraphicsPathItem, QGraphicsRectItem, QGraphicsEllipseItem,
- QGraphicsTextItem, QGraphicsPolygonItem, QGraphicsLineItem, {The
- Graphics View Framework}
+ QGraphicsTextItem, QGraphicsPolygonItem, QGraphicsLineItem,
+ {Graphics View Framework}
*/
/*!
@@ -9741,7 +9785,7 @@ QVariant QGraphicsPixmapItem::extension(const QVariant &variant) const
\sa QGraphicsSimpleTextItem, QGraphicsPathItem, QGraphicsRectItem,
QGraphicsEllipseItem, QGraphicsPixmapItem, QGraphicsPolygonItem,
- QGraphicsLineItem, {The Graphics View Framework}
+ QGraphicsLineItem, {Graphics View Framework}
*/
class QGraphicsTextItemPrivate
@@ -10657,9 +10701,9 @@ void QGraphicsSimpleTextItemPrivate::updateBoundingRect()
\img graphicsview-simpletextitem.png
- \sa QGraphicsTextItem, QGraphicsPathItem, QGraphicsRectItem, QGraphicsEllipseItem,
- QGraphicsPixmapItem, QGraphicsPolygonItem, QGraphicsLineItem, {The
- Graphics View Framework}
+ \sa QGraphicsTextItem, QGraphicsPathItem, QGraphicsRectItem,
+ QGraphicsEllipseItem, QGraphicsPixmapItem, QGraphicsPolygonItem,
+ QGraphicsLineItem, {Graphics View Framework}
*/
/*!
@@ -10920,7 +10964,7 @@ QVariant QGraphicsSimpleTextItem::extension(const QVariant &variant) const
item group. As with addToGroup(), the item's scene-relative
position and transformation remain intact.
- \sa QGraphicsItem, {The Graphics View Framework}
+ \sa QGraphicsItem, {Graphics View Framework}
*/
class QGraphicsItemGroupPrivate : public QGraphicsItemPrivate
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 569a329..e812f29 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -377,6 +377,7 @@ public:
QGraphicsItemCache *extraItemCache() const;
void removeExtraItemCache();
+ void updatePaintedViewBoundingRects(bool updateChildren);
void ensureSceneTransformRecursive(QGraphicsItem **topMostDirtyItem);
inline void ensureSceneTransform()
{
diff --git a/src/gui/graphicsview/qgraphicsitemanimation.cpp b/src/gui/graphicsview/qgraphicsitemanimation.cpp
index 839c4ee..9cb9a8d 100644
--- a/src/gui/graphicsview/qgraphicsitemanimation.cpp
+++ b/src/gui/graphicsview/qgraphicsitemanimation.cpp
@@ -77,7 +77,7 @@
so scheduling several transformations of the same kind (e.g.,
rotations) at the same step is not recommended.
- \sa QTimeLine, {The Graphics View Framework}
+ \sa QTimeLine, {Graphics View Framework}
*/
#include "qgraphicsitemanimation.h"
diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp
index 9f9a39d..5a7f1af 100644
--- a/src/gui/graphicsview/qgraphicslayoutitem.cpp
+++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp
@@ -322,7 +322,7 @@ void QGraphicsLayoutItemPrivate::setSizeComponent(
layout, or false otherwise.
Qt uses QGraphicsLayoutItem to provide layout functionality in the
- \l{The Graphics View Framework}, but in the future its use may spread
+ \l{Graphics View Framework}, but in the future its use may spread
throughout Qt itself.
\sa QGraphicsWidget, QGraphicsLayout, QGraphicsLinearLayout,
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 0d4e48a..4b09a7e 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -50,7 +50,7 @@
The class serves as a container for QGraphicsItems. It is used together
with QGraphicsView for visualizing graphical items, such as lines,
rectangles, text, or even custom items, on a 2D surface. QGraphicsScene is
- part of \l{The Graphics View Framework}.
+ part of the \l{Graphics View Framework}.
QGraphicsScene also provides functionality that lets you efficiently
determine both the location of items, and for determining what items are
@@ -290,13 +290,19 @@ QGraphicsScenePrivate::QGraphicsScenePrivate()
updateAll(false),
calledEmitUpdated(false),
processDirtyItemsEmitted(false),
- selectionChanging(0),
needSortTopLevelItems(true),
holesInTopLevelSiblingIndex(false),
topLevelSequentialOrdering(true),
scenePosDescendantsUpdatePending(false),
stickyFocus(false),
hasFocus(false),
+ lastMouseGrabberItemHasImplicitMouseGrab(false),
+ allItemsIgnoreHoverEvents(true),
+ allItemsUseDefaultCursor(true),
+ painterStateProtection(true),
+ sortCacheEnabled(false),
+ allItemsIgnoreTouchEvents(true),
+ selectionChanging(0),
rectAdjust(2),
focusItem(0),
lastFocusItem(0),
@@ -306,16 +312,10 @@ QGraphicsScenePrivate::QGraphicsScenePrivate()
activationRefCount(0),
childExplicitActivation(0),
lastMouseGrabberItem(0),
- lastMouseGrabberItemHasImplicitMouseGrab(false),
dragDropItem(0),
enterWidget(0),
lastDropAction(Qt::IgnoreAction),
- allItemsIgnoreHoverEvents(true),
- allItemsUseDefaultCursor(true),
- painterStateProtection(true),
- sortCacheEnabled(false),
- style(0),
- allItemsIgnoreTouchEvents(true)
+ style(0)
{
}
@@ -690,6 +690,10 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
if (item == lastMouseGrabberItem)
lastMouseGrabberItem = 0;
+ // Reset the current drop item
+ if (item == dragDropItem)
+ dragDropItem = 0;
+
// Reenable selectionChanged() for individual items
--selectionChanging;
if (!selectionChanging && selectedItems.size() != oldSelectedItemsSize)
@@ -706,6 +710,9 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item)
cachedTargetItems.removeOne(dummy);
cachedItemGestures.remove(dummy);
cachedAlreadyDeliveredGestures.remove(dummy);
+
+ foreach (Qt::GestureType gesture, item->d_ptr->gestureContext.keys())
+ ungrabGesture(item, gesture);
}
/*!
@@ -1316,10 +1323,10 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou
setFocus = true;
break;
}
- if (item->isEnabled() && ((item->flags() & QGraphicsItem::ItemIsFocusable) && item->d_ptr->mouseSetsFocus)) {
+ if (item->isEnabled() && ((item->flags() & QGraphicsItem::ItemIsFocusable))) {
if (!item->isWidget() || ((QGraphicsWidget *)item)->focusPolicy() & Qt::ClickFocus) {
setFocus = true;
- if (item != q->focusItem())
+ if (item != q->focusItem() && item->d_ptr->mouseSetsFocus)
q->setFocusItem(item, Qt::MouseFocusReason);
break;
}
@@ -2591,6 +2598,9 @@ void QGraphicsScene::addItem(QGraphicsItem *item)
d->enableTouchEventsOnViews();
}
+ foreach (Qt::GestureType gesture, item->d_ptr->gestureContext.keys())
+ d->grabGesture(item, gesture);
+
// Update selection lists
if (item->isSelected())
d->selectedItems << item;
@@ -5116,9 +5126,15 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
// Process children.
if (itemHasChildren && item->d_ptr->dirtyChildren) {
+ const bool itemClipsChildrenToShape = item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape;
+ if (itemClipsChildrenToShape) {
+ // Make sure child updates are clipped to the item's bounding rect.
+ for (int i = 0; i < views.size(); ++i)
+ views.at(i)->d_func()->setUpdateClip(item);
+ }
if (!dirtyAncestorContainsChildren) {
dirtyAncestorContainsChildren = item->d_ptr->fullUpdatePending
- && (item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape);
+ && itemClipsChildrenToShape;
}
const bool allChildrenDirty = item->d_ptr->allChildrenDirty;
const bool parentIgnoresVisible = item->d_ptr->ignoreVisible;
@@ -5141,6 +5157,12 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
}
processDirtyItemsRecursive(child, dirtyAncestorContainsChildren, opacity);
}
+
+ if (itemClipsChildrenToShape) {
+ // Reset updateClip.
+ for (int i = 0; i < views.size(); ++i)
+ views.at(i)->d_func()->setUpdateClip(0);
+ }
} else if (wasDirtyParentSceneTransform) {
item->d_ptr->invalidateChildrenSceneTransform();
}
@@ -5593,6 +5615,8 @@ bool QGraphicsScene::sendEvent(QGraphicsItem *item, QEvent *event)
void QGraphicsScenePrivate::addView(QGraphicsView *view)
{
views << view;
+ foreach (Qt::GestureType gesture, grabbedGestures.keys())
+ view->viewport()->grabGesture(gesture);
}
void QGraphicsScenePrivate::removeView(QGraphicsView *view)
@@ -6290,6 +6314,27 @@ void QGraphicsScenePrivate::cancelGesturesForChildren(QGesture *original)
}
}
+void QGraphicsScenePrivate::grabGesture(QGraphicsItem *, Qt::GestureType gesture)
+{
+ (void)QGestureManager::instance(); // create a gesture manager
+ if (!grabbedGestures[gesture]++) {
+ foreach (QGraphicsView *view, views)
+ view->viewport()->grabGesture(gesture);
+ }
+}
+
+void QGraphicsScenePrivate::ungrabGesture(QGraphicsItem *item, Qt::GestureType gesture)
+{
+ // we know this can only be an object
+ Q_ASSERT(item->d_ptr->isObject);
+ QGraphicsObject *obj = static_cast<QGraphicsObject *>(item);
+ QGestureManager::instance()->cleanupCachedGestures(obj, gesture);
+ if (!--grabbedGestures[gesture]) {
+ foreach (QGraphicsView *view, views)
+ view->viewport()->ungrabGesture(gesture);
+ }
+}
+
QT_END_NAMESPACE
#include "moc_qgraphicsscene.cpp"
diff --git a/src/gui/graphicsview/qgraphicsscene.h b/src/gui/graphicsview/qgraphicsscene.h
index e5b15ef..c34a303 100644
--- a/src/gui/graphicsview/qgraphicsscene.h
+++ b/src/gui/graphicsview/qgraphicsscene.h
@@ -302,6 +302,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_updateScenePosDescendants())
friend class QGraphicsItem;
friend class QGraphicsItemPrivate;
+ friend class QGraphicsObject;
friend class QGraphicsView;
friend class QGraphicsViewPrivate;
friend class QGraphicsWidget;
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index 0a85f0e..8ad2a0a 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -97,24 +97,36 @@ public:
int lastItemCount;
QRectF sceneRect;
- bool hasSceneRect;
- bool dirtyGrowingItemsBoundingRect;
+
+ quint32 hasSceneRect : 1;
+ quint32 dirtyGrowingItemsBoundingRect : 1;
+ quint32 updateAll : 1;
+ quint32 calledEmitUpdated : 1;
+ quint32 processDirtyItemsEmitted : 1;
+ quint32 needSortTopLevelItems : 1;
+ quint32 holesInTopLevelSiblingIndex : 1;
+ quint32 topLevelSequentialOrdering : 1;
+ quint32 scenePosDescendantsUpdatePending : 1;
+ quint32 stickyFocus : 1;
+ quint32 hasFocus : 1;
+ quint32 lastMouseGrabberItemHasImplicitMouseGrab : 1;
+ quint32 allItemsIgnoreHoverEvents : 1;
+ quint32 allItemsUseDefaultCursor : 1;
+ quint32 painterStateProtection : 1;
+ quint32 sortCacheEnabled : 1; // for compatibility
+ quint32 allItemsIgnoreTouchEvents : 1;
+ quint32 padding : 15;
+
QRectF growingItemsBoundingRect;
void _q_emitUpdated();
QList<QRectF> updatedRects;
- bool updateAll;
- bool calledEmitUpdated;
- bool processDirtyItemsEmitted;
QPainterPath selectionArea;
int selectionChanging;
QSet<QGraphicsItem *> selectedItems;
QVector<QGraphicsItem *> unpolishedItems;
QList<QGraphicsItem *> topLevelItems;
- bool needSortTopLevelItems;
- bool holesInTopLevelSiblingIndex;
- bool topLevelSequentialOrdering;
QMap<QGraphicsItem *, QPointF> movingItemsInitialPositions;
void registerTopLevelItem(QGraphicsItem *item);
@@ -125,7 +137,6 @@ public:
void _q_processDirtyItems();
QSet<QGraphicsItem *> scenePosItems;
- bool scenePosDescendantsUpdatePending;
void setScenePosItemEnabled(QGraphicsItem *item, bool enabled);
void registerScenePosItem(QGraphicsItem *item);
void unregisterScenePosItem(QGraphicsItem *item);
@@ -136,9 +147,6 @@ public:
QBrush backgroundBrush;
QBrush foregroundBrush;
- quint32 stickyFocus : 1;
- quint32 hasFocus : 1;
- quint32 padding : 30;
quint32 rectAdjust;
QGraphicsItem *focusItem;
QGraphicsItem *lastFocusItem;
@@ -155,7 +163,6 @@ public:
void removePopup(QGraphicsWidget *widget, bool itemIsDying = false);
QGraphicsItem *lastMouseGrabberItem;
- bool lastMouseGrabberItemHasImplicitMouseGrab;
QList<QGraphicsItem *> mouseGrabberItems;
void grabMouse(QGraphicsItem *item, bool implicit = false);
void ungrabMouse(QGraphicsItem *item, bool itemIsDying = false);
@@ -172,8 +179,6 @@ public:
QList<QGraphicsItem *> cachedItemsUnderMouse;
QList<QGraphicsItem *> hoverItems;
QPointF lastSceneMousePos;
- bool allItemsIgnoreHoverEvents;
- bool allItemsUseDefaultCursor;
void enableMouseTrackingOnViews();
QMap<Qt::MouseButton, QPointF> mouseGrabberButtonDownPos;
QMap<Qt::MouseButton, QPointF> mouseGrabberButtonDownScenePos;
@@ -187,8 +192,6 @@ public:
void addView(QGraphicsView *view);
void removeView(QGraphicsView *view);
- bool painterStateProtection;
-
QMultiMap<QGraphicsItem *, QGraphicsItem *> sceneEventFilters;
void installSceneEventFilter(QGraphicsItem *watched, QGraphicsItem *filter);
void removeSceneEventFilter(QGraphicsItem *watched, QGraphicsItem *filter);
@@ -210,8 +213,6 @@ public:
void mousePressEventHandler(QGraphicsSceneMouseEvent *mouseEvent);
QGraphicsWidget *windowForItem(const QGraphicsItem *item) const;
- bool sortCacheEnabled; // for compatibility
-
void drawItemHelper(QGraphicsItem *item, QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget,
bool painterStateProtection);
@@ -295,13 +296,13 @@ public:
int findClosestTouchPointId(const QPointF &scenePos);
void touchEventHandler(QTouchEvent *touchEvent);
bool sendTouchBeginEvent(QGraphicsItem *item, QTouchEvent *touchEvent);
- bool allItemsIgnoreTouchEvents;
void enableTouchEventsOnViews();
QList<QGraphicsObject *> cachedTargetItems;
QHash<QGraphicsObject *, QSet<QGesture *> > cachedItemGestures;
QHash<QGraphicsObject *, QSet<QGesture *> > cachedAlreadyDeliveredGestures;
QHash<QGesture *, QGraphicsObject *> gestureTargets;
+ QHash<Qt::GestureType, int> grabbedGestures;
void gestureEventHandler(QGestureEvent *event);
void gestureTargetsAtHotSpots(const QSet<QGesture *> &gestures,
Qt::GestureFlag flag,
@@ -310,6 +311,8 @@ public:
QSet<QGesture *> *normal = 0,
QSet<QGesture *> *conflicts = 0);
void cancelGesturesForChildren(QGesture *original);
+ void grabGesture(QGraphicsItem *, Qt::GestureType gesture);
+ void ungrabGesture(QGraphicsItem *, Qt::GestureType gesture);
void updateInputMethodSensitivityInViews();
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 0bba7e9..9dfcd2c 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -327,16 +327,21 @@ QGraphicsViewPrivate::QGraphicsViewPrivate()
dragMode(QGraphicsView::NoDrag),
sceneInteractionAllowed(true), hasSceneRect(false),
connectedToScene(false),
- mousePressButton(Qt::NoButton),
+ useLastMouseEvent(false),
identityMatrix(true),
dirtyScroll(true),
accelerateScrolling(true),
+ keepLastCenterPoint(true),
+ transforming(false),
+ handScrolling(false),
+ mustAllocateStyleOptions(false),
+ mustResizeBackgroundPixmap(true),
+ fullUpdatePending(true),
+ hasUpdateClip(false),
+ mousePressButton(Qt::NoButton),
leftIndent(0), topIndent(0),
lastMouseEvent(QEvent::None, QPoint(), Qt::NoButton, 0, 0),
- useLastMouseEvent(false),
- keepLastCenterPoint(true),
alignment(Qt::AlignCenter),
- transforming(false),
transformationAnchor(QGraphicsView::AnchorViewCenter), resizeAnchor(QGraphicsView::NoAnchor),
viewportUpdateMode(QGraphicsView::MinimalViewportUpdate),
optimizationFlags(0),
@@ -345,14 +350,11 @@ QGraphicsViewPrivate::QGraphicsViewPrivate()
rubberBanding(false),
rubberBandSelectionMode(Qt::IntersectsItemShape),
#endif
- handScrolling(false), handScrollMotions(0), cacheMode(0),
- mustAllocateStyleOptions(false),
- mustResizeBackgroundPixmap(true),
+ handScrollMotions(0), cacheMode(0),
#ifndef QT_NO_CURSOR
hasStoredOriginalCursor(false),
#endif
lastDragDropEvent(0),
- fullUpdatePending(true),
updateSceneSlotReimplementedChecked(false)
{
styleOptions.reserve(QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS);
@@ -879,6 +881,52 @@ static inline void QRect_unite(QRect *rect, const QRect &other)
}
}
+/*
+ Calling this function results in update rects being clipped to the item's
+ bounding rect. Note that updates prior to this function call is not clipped.
+ The clip is removed by passing 0.
+*/
+void QGraphicsViewPrivate::setUpdateClip(QGraphicsItem *item)
+{
+ Q_Q(QGraphicsView);
+ // We simply ignore the request if the update mode is either FullViewportUpdate
+ // or NoViewportUpdate; in that case there's no point in clipping anything.
+ if (!item || viewportUpdateMode == QGraphicsView::NoViewportUpdate
+ || viewportUpdateMode == QGraphicsView::FullViewportUpdate) {
+ hasUpdateClip = false;
+ return;
+ }
+
+ // Calculate the clip (item's bounding rect in view coordinates).
+ // Optimized version of:
+ // QRect clip = item->deviceTransform(q->viewportTransform())
+ // .mapRect(item->boundingRect()).toAlignedRect();
+ QRect clip;
+ if (item->d_ptr->itemIsUntransformable()) {
+ QTransform xform = item->deviceTransform(q->viewportTransform());
+ clip = xform.mapRect(item->boundingRect()).toAlignedRect();
+ } else if (item->d_ptr->sceneTransformTranslateOnly && identityMatrix) {
+ QRectF r(item->boundingRect());
+ r.translate(item->d_ptr->sceneTransform.dx() - horizontalScroll(),
+ item->d_ptr->sceneTransform.dy() - verticalScroll());
+ clip = r.toAlignedRect();
+ } else if (!q->isTransformed()) {
+ clip = item->d_ptr->sceneTransform.mapRect(item->boundingRect()).toAlignedRect();
+ } else {
+ QTransform xform = item->d_ptr->sceneTransform;
+ xform *= q->viewportTransform();
+ clip = xform.mapRect(item->boundingRect()).toAlignedRect();
+ }
+
+ if (hasUpdateClip) {
+ // Intersect with old clip.
+ updateClip &= clip;
+ } else {
+ updateClip = clip;
+ hasUpdateClip = true;
+ }
+}
+
bool QGraphicsViewPrivate::updateRegion(const QRectF &rect, const QTransform &xform)
{
if (rect.isEmpty())
@@ -909,6 +957,8 @@ bool QGraphicsViewPrivate::updateRegion(const QRectF &rect, const QTransform &xf
viewRect.adjust(-1, -1, 1, 1);
else
viewRect.adjust(-2, -2, 2, 2);
+ if (hasUpdateClip)
+ viewRect &= updateClip;
dirtyRegion += viewRect;
}
@@ -930,7 +980,10 @@ bool QGraphicsViewPrivate::updateRect(const QRect &r)
viewport->update();
break;
case QGraphicsView::BoundingRectViewportUpdate:
- QRect_unite(&dirtyBoundingRect, r);
+ if (hasUpdateClip)
+ QRect_unite(&dirtyBoundingRect, r & updateClip);
+ else
+ QRect_unite(&dirtyBoundingRect, r);
if (containsViewport(dirtyBoundingRect, viewport->width(), viewport->height())) {
fullUpdatePending = true;
viewport->update();
@@ -938,7 +991,10 @@ bool QGraphicsViewPrivate::updateRect(const QRect &r)
break;
case QGraphicsView::SmartViewportUpdate: // ### DEPRECATE
case QGraphicsView::MinimalViewportUpdate:
- dirtyRegion += r;
+ if (hasUpdateClip)
+ dirtyRegion += r & updateClip;
+ else
+ dirtyRegion += r;
break;
default:
break;
@@ -1819,8 +1875,6 @@ void QGraphicsView::centerOn(const QGraphicsItem *item)
void QGraphicsView::ensureVisible(const QRectF &rect, int xmargin, int ymargin)
{
Q_D(QGraphicsView);
- Q_UNUSED(xmargin);
- Q_UNUSED(ymargin);
qreal width = viewport()->width();
qreal height = viewport()->height();
QRectF viewRect = d->matrix.mapRect(rect);
@@ -2634,6 +2688,11 @@ void QGraphicsView::setupViewport(QWidget *widget)
if (d->scene && !d->scene->d_func()->allItemsIgnoreTouchEvents)
widget->setAttribute(Qt::WA_AcceptTouchEvents);
+ if (d->scene) {
+ foreach (Qt::GestureType gesture, d->scene->d_func()->grabbedGestures.keys())
+ widget->grabGesture(gesture);
+ }
+
widget->setAcceptDrops(acceptDrops());
}
diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h
index aeff28a..7bd9ecb 100644
--- a/src/gui/graphicsview/qgraphicsview_p.h
+++ b/src/gui/graphicsview/qgraphicsview_p.h
@@ -77,11 +77,25 @@ public:
QPainter::RenderHints renderHints;
QGraphicsView::DragMode dragMode;
- bool sceneInteractionAllowed;
+
+ quint32 sceneInteractionAllowed : 1;
+ quint32 hasSceneRect : 1;
+ quint32 connectedToScene : 1;
+ quint32 useLastMouseEvent : 1;
+ quint32 identityMatrix : 1;
+ quint32 dirtyScroll : 1;
+ quint32 accelerateScrolling : 1;
+ quint32 keepLastCenterPoint : 1;
+ quint32 transforming : 1;
+ quint32 handScrolling : 1;
+ quint32 mustAllocateStyleOptions : 1;
+ quint32 mustResizeBackgroundPixmap : 1;
+ quint32 fullUpdatePending : 1;
+ quint32 hasUpdateClip : 1;
+ quint32 padding : 18;
+
QRectF sceneRect;
- bool hasSceneRect;
void updateLastCenterPoint();
- bool connectedToScene;
qint64 horizontalScroll() const;
qint64 verticalScroll() const;
@@ -89,6 +103,7 @@ public:
QRectF mapRectToScene(const QRect &rect) const;
QRectF mapRectFromScene(const QRectF &rect) const;
+ QRect updateClip;
QPointF mousePressItemPoint;
QPointF mousePressScenePoint;
QPoint mousePressViewPoint;
@@ -98,26 +113,20 @@ public:
QPoint dirtyScrollOffset;
Qt::MouseButton mousePressButton;
QTransform matrix;
- bool identityMatrix;
qint64 scrollX, scrollY;
- bool dirtyScroll;
void updateScroll();
- bool accelerateScrolling;
qreal leftIndent;
qreal topIndent;
// Replaying mouse events
QMouseEvent lastMouseEvent;
- bool useLastMouseEvent;
void replayLastMouseEvent();
void storeMouseEvent(QMouseEvent *event);
void mouseMoveEventHandler(QMouseEvent *event);
QPointF lastCenterPoint;
- bool keepLastCenterPoint;
Qt::Alignment alignment;
- bool transforming;
QGraphicsView::ViewportAnchor transformationAnchor;
QGraphicsView::ViewportAnchor resizeAnchor;
@@ -131,20 +140,17 @@ public:
bool rubberBanding;
Qt::ItemSelectionMode rubberBandSelectionMode;
#endif
- bool handScrolling;
int handScrollMotions;
QGraphicsView::CacheMode cacheMode;
QVector<QStyleOptionGraphicsItem> styleOptions;
- bool mustAllocateStyleOptions;
QStyleOptionGraphicsItem *allocStyleOptionsArray(int numItems);
void freeStyleOptionsArray(QStyleOptionGraphicsItem *array);
QBrush backgroundBrush;
QBrush foregroundBrush;
QPixmap backgroundPixmap;
- bool mustResizeBackgroundPixmap;
QRegion backgroundPixmapExposed;
#ifndef QT_NO_CURSOR
@@ -161,7 +167,6 @@ public:
QRect mapToViewRect(const QGraphicsItem *item, const QRectF &rect) const;
QRegion mapToViewRegion(const QGraphicsItem *item, const QRectF &rect) const;
- bool fullUpdatePending;
QRegion dirtyRegion;
QRect dirtyBoundingRect;
void processPendingUpdates();
@@ -192,6 +197,8 @@ public:
#endif
}
+ void setUpdateClip(QGraphicsItem *);
+
inline bool updateRectF(const QRectF &rect)
{
if (rect.isEmpty())
diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp
index 06a44b7..c486c45 100644
--- a/src/gui/graphicsview/qgraphicswidget.cpp
+++ b/src/gui/graphicsview/qgraphicswidget.cpp
@@ -747,6 +747,17 @@ QSizeF QGraphicsWidget::sizeHint(Qt::SizeHint which, const QSizeF &constraint) c
}
/*!
+ \property QGraphicsWidget::layout
+ \brief The layout of the widget
+*/
+
+/*!
+ \fn void QGraphicsWidget::layoutChanged()
+ This signal gets emitted whenever the layout of the item changes
+ \internal
+*/
+
+/*!
Returns this widget's layout, or 0 if no layout is currently managing this
widget.
@@ -1085,18 +1096,9 @@ QVariant QGraphicsWidget::itemChange(GraphicsItemChange change, const QVariant &
}
break;
case ItemPositionHasChanged:
- if (!d->inSetGeometry) {
- d->inSetPos = 1;
- // Ensure setGeometry is called (avoid recursion when setPos is
- // called from within setGeometry).
- setGeometry(QRectF(pos(), size()));
- d->inSetPos = 0 ;
- }
+ d->setGeometryFromSetPos();
break;
case ItemParentChange: {
- QGraphicsItem *parent = qVariantValue<QGraphicsItem *>(value);
- d->fixFocusChainBeforeReparenting((parent && parent->isWidget()) ? static_cast<QGraphicsWidget *>(parent) : 0, scene());
-
// Deliver ParentAboutToChange.
QEvent event(QEvent::ParentAboutToChange);
QApplication::sendEvent(this, &event);
diff --git a/src/gui/graphicsview/qgraphicswidget_p.cpp b/src/gui/graphicsview/qgraphicswidget_p.cpp
index 6e397b6..076e8626 100644
--- a/src/gui/graphicsview/qgraphicswidget_p.cpp
+++ b/src/gui/graphicsview/qgraphicswidget_p.cpp
@@ -71,14 +71,17 @@ void QGraphicsWidgetPrivate::init(QGraphicsItem *parentItem, Qt::WindowFlags wFl
adjustWindowFlags(&wFlags);
windowFlags = wFlags;
- q->setParentItem(parentItem);
+ if (parentItem)
+ setParentItemHelper(parentItem, 0, 0);
+
q->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred, QSizePolicy::DefaultType));
q->setGraphicsItem(q);
resolveLayoutDirection();
q->unsetWindowFrameMargins();
- q->setFlag(QGraphicsItem::ItemUsesExtendedStyleOption);
- q->setFlag(QGraphicsItem::ItemSendsGeometryChanges);
+ flags |= QGraphicsItem::ItemUsesExtendedStyleOption | QGraphicsItem::ItemSendsGeometryChanges;
+ if (windowFlags & Qt::Window)
+ flags |= QGraphicsItem::ItemIsPanel;
}
qreal QGraphicsWidgetPrivate::titleBarHeight(const QStyleOptionTitleBar &options) const
@@ -876,6 +879,18 @@ void QGraphicsWidgetPrivate::resetHeight()
q->setGeometry(QRectF(q->x(), q->y(), width(), 0));
}
+void QGraphicsWidgetPrivate::setGeometryFromSetPos()
+{
+ if (inSetGeometry)
+ return;
+ Q_Q(QGraphicsWidget);
+ inSetPos = 1;
+ // Ensure setGeometry is called (avoid recursion when setPos is
+ // called from within setGeometry).
+ q->setGeometry(QRectF(pos, q->size()));
+ inSetPos = 0 ;
+}
+
QT_END_NAMESPACE
#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/gui/graphicsview/qgraphicswidget_p.h b/src/gui/graphicsview/qgraphicswidget_p.h
index 7116a23..e9e6fc2 100644
--- a/src/gui/graphicsview/qgraphicswidget_p.h
+++ b/src/gui/graphicsview/qgraphicswidget_p.h
@@ -139,6 +139,7 @@ public:
qreal height() const;
void setHeight(qreal);
void resetHeight();
+ void setGeometryFromSetPos();
// State
inline int attributeToBitIndex(Qt::WidgetAttribute att) const
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 891b1db..7696632 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -55,6 +55,7 @@
#include "qcache.h"
#include "qdebug.h"
#include "private/qguiplatformplugin_p.h"
+#include "private/qstylehelper_p.h"
#ifdef Q_WS_MAC
#include <private/qt_mac_p.h>
@@ -261,21 +262,17 @@ QPixmap QPixmapIconEngine::pixmap(const QSize &size, QIcon::Mode mode, QIcon::St
if (!actualSize.isNull() && (actualSize.width() > size.width() || actualSize.height() > size.height()))
actualSize.scale(size, Qt::KeepAspectRatio);
- QString key = QLatin1String("$qt_icon_")
- + QString::number(pm.cacheKey())
- + QString::number(pe->mode)
- + QString::number(QApplication::palette().cacheKey())
- + QLatin1Char('_')
- + QString::number(actualSize.width())
- + QLatin1Char('_')
- + QString::number(actualSize.height())
- + QLatin1Char('_');
-
+ QString key = QLatin1Literal("qt_")
+ % HexString<quint64>(pm.cacheKey())
+ % HexString<uint>(pe->mode)
+ % HexString<quint64>(QApplication::palette().cacheKey())
+ % HexString<uint>(actualSize.width())
+ % HexString<uint>(actualSize.height());
if (mode == QIcon::Active) {
- if (QPixmapCache::find(key + QString::number(mode), pm))
+ if (QPixmapCache::find(key % HexString<uint>(mode), pm))
return pm; // horray
- if (QPixmapCache::find(key + QString::number(QIcon::Normal), pm)) {
+ if (QPixmapCache::find(key % HexString<uint>(QIcon::Normal), pm)) {
QStyleOption opt(0);
opt.palette = QApplication::palette();
QPixmap active = QApplication::style()->generatedIconPixmap(QIcon::Active, pm, &opt);
@@ -284,7 +281,7 @@ QPixmap QPixmapIconEngine::pixmap(const QSize &size, QIcon::Mode mode, QIcon::St
}
}
- if (!QPixmapCache::find(key + QString::number(mode), pm)) {
+ if (!QPixmapCache::find(key % HexString<uint>(mode), pm)) {
if (pm.size() != actualSize)
pm = pm.scaled(actualSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
if (pe->mode != mode && mode != QIcon::Normal) {
@@ -294,7 +291,7 @@ QPixmap QPixmapIconEngine::pixmap(const QSize &size, QIcon::Mode mode, QIcon::St
if (!generated.isNull())
pm = generated;
}
- QPixmapCache::insert(key + QString::number(mode), pm);
+ QPixmapCache::insert(key % HexString<uint>(mode), pm);
}
return pm;
}
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 5fc605a..7a6a73f 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#define Q_TEST_QPIXMAPCACHE
#include "qpixmapcache.h"
#include "qobject.h"
#include "qdebug.h"
@@ -194,6 +195,9 @@ public:
static QPixmapCache::KeyData* getKeyData(QPixmapCache::Key *key);
+ QList< QPair<QString,QPixmap> > allPixmaps() const;
+ void flushDetachedPixmaps(bool nt);
+
private:
int *keyArray;
int theid;
@@ -235,10 +239,9 @@ QPMCache::~QPMCache()
When the last pixmap has been deleted from the cache, kill the
timer so Qt won't keep the CPU from going into sleep mode.
*/
-void QPMCache::timerEvent(QTimerEvent *)
+void QPMCache::flushDetachedPixmaps(bool nt)
{
int mc = maxCost();
- bool nt = totalCost() == ps;
setMaxCost(nt ? totalCost() * 3 / 4 : totalCost() -1);
setMaxCost(mc);
ps = totalCost();
@@ -252,6 +255,12 @@ void QPMCache::timerEvent(QTimerEvent *)
++it;
}
}
+}
+
+void QPMCache::timerEvent(QTimerEvent *)
+{
+ bool nt = totalCost() == ps;
+ flushDetachedPixmaps(nt);
if (!size()) {
killTimer(theid);
@@ -263,6 +272,7 @@ void QPMCache::timerEvent(QTimerEvent *)
}
}
+
QPixmap *QPMCache::object(const QString &key) const
{
QPixmapCache::Key cacheKey = cacheKeys.value(key);
@@ -422,6 +432,20 @@ QPixmapCache::KeyData* QPMCache::getKeyData(QPixmapCache::Key *key)
return key->d;
}
+QList< QPair<QString,QPixmap> > QPMCache::allPixmaps() const
+{
+ QList< QPair<QString,QPixmap> > r;
+ QHash<QString, QPixmapCache::Key>::const_iterator it = cacheKeys.begin();
+ while (it != cacheKeys.end()) {
+ QPixmap *ptr = QCache<QPixmapCache::Key, QPixmapCacheEntry>::object(it.value());
+ if (ptr)
+ r.append(QPair<QString,QPixmap>(it.key(),*ptr));
+ ++it;
+ }
+ return r;
+}
+
+
Q_GLOBAL_STATIC(QPMCache, pm_cache)
int Q_AUTOTEST_EXPORT q_QPixmapCache_keyHashSize()
@@ -633,4 +657,19 @@ void QPixmapCache::clear()
}
}
+void QPixmapCache::flushDetachedPixmaps()
+{
+ pm_cache()->flushDetachedPixmaps(true);
+}
+
+int QPixmapCache::totalUsed()
+{
+ return (pm_cache()->totalCost()+1023) / 1024;
+}
+
+QList< QPair<QString,QPixmap> > QPixmapCache::allPixmaps()
+{
+ return pm_cache()->allPixmaps();
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/image/qpixmapcache.h b/src/gui/image/qpixmapcache.h
index 50a9369..e9c8c15 100644
--- a/src/gui/image/qpixmapcache.h
+++ b/src/gui/image/qpixmapcache.h
@@ -44,6 +44,10 @@
#include <QtGui/qpixmap.h>
+#ifdef Q_TEST_QPIXMAPCACHE
+#include <QtCore/qpair.h>
+#endif
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -83,6 +87,12 @@ public:
static void remove(const QString &key);
static void remove(const Key &key);
static void clear();
+
+#ifdef Q_TEST_QPIXMAPCACHE
+ static void flushDetachedPixmaps();
+ static int totalUsed();
+ static QList< QPair<QString,QPixmap> > allPixmaps();
+#endif
};
QT_END_NAMESPACE
diff --git a/src/gui/image/qpixmapcache_p.h b/src/gui/image/qpixmapcache_p.h
index 86a1b78..825f272 100644
--- a/src/gui/image/qpixmapcache_p.h
+++ b/src/gui/image/qpixmapcache_p.h
@@ -95,6 +95,8 @@ public:
QPixmapCache::Key key;
};
+inline bool qIsDetached(QPixmapCacheEntry &t) { return t.isDetached(); }
+
QT_END_NAMESPACE
#endif // QPIXMAPCACHE_P_H
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 610ac3c..d081cfd 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -484,9 +484,10 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints)
void QCoeFepInputContext::applyFormat(QList<QInputMethodEvent::Attribute> *attributes)
{
TCharFormat cFormat;
- QColor styleTextColor = QApplication::palette("QLineEdit").text().color();
- TLogicalRgb tontColor(TRgb(styleTextColor.red(), styleTextColor.green(), styleTextColor.blue(), styleTextColor.alpha()));
- cFormat.iFontPresentation.iTextColor = tontColor;
+ const QColor styleTextColor = focusWidget() ? focusWidget()->palette().text().color() :
+ QApplication::palette("QLineEdit").text().color();
+ const TLogicalRgb fontColor(TRgb(styleTextColor.red(), styleTextColor.green(), styleTextColor.blue(), styleTextColor.alpha()));
+ cFormat.iFontPresentation.iTextColor = fontColor;
TInt numChars = 0;
TInt charPos = 0;
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 97fd6e1..4fb93fc 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -679,7 +679,11 @@ void QAbstractItemView::setModel(QAbstractItemModel *model)
connect(d->model, SIGNAL(modelReset()), this, SLOT(reset()));
connect(d->model, SIGNAL(layoutChanged()), this, SLOT(_q_layoutChanged()));
}
- setSelectionModel(new QItemSelectionModel(d->model, this));
+
+ QItemSelectionModel *selection_model = new QItemSelectionModel(d->model, this);
+ connect(d->model, SIGNAL(destroyed()), selection_model, SLOT(deleteLater()));
+ setSelectionModel(selection_model);
+
reset(); // kill editors, set new root and do layout
}
@@ -1785,7 +1789,10 @@ void QAbstractItemView::mouseReleaseEvent(QMouseEvent *event)
emit clicked(index);
if (edited)
return;
- if (style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, 0, this))
+ QStyleOptionViewItemV4 option = d->viewOptionsV4();
+ if (d->pressedAlreadySelected)
+ option.state |= QStyle::State_Selected;
+ if (style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, &option, this))
emit activated(index);
}
}
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp
index dce5c6a..b12cd45 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.cpp
+++ b/src/gui/itemviews/qsortfilterproxymodel.cpp
@@ -1099,7 +1099,7 @@ void QSortFilterProxyModelPrivate::_q_sourceDataChanged(const QModelIndex &sourc
if (!source_top_left.isValid() || !source_bottom_right.isValid())
return;
QModelIndex source_parent = source_top_left.parent();
- IndexMap::const_iterator it = create_mapping(source_parent);
+ IndexMap::const_iterator it = source_index_mapping.find(source_parent);
if (it == source_index_mapping.constEnd()) {
// Don't care, since we don't have mapping for this index
return;
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index ec635d4..7b62de1 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -788,6 +788,10 @@ void QApplicationPrivate::construct(
qt_gui_eval_init(application_type);
#endif
+#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SYSTEMLOCALE)
+ symbianInit();
+#endif
+
#ifndef QT_NO_LIBRARY
if(load_testability) {
QLibrary testLib(QLatin1String("qttestability"));
@@ -2364,6 +2368,19 @@ bool QApplication::event(QEvent *e)
if (!(w->windowType() == Qt::Desktop))
postEvent(w, new QEvent(QEvent::LanguageChange));
}
+#ifndef Q_OS_WIN
+ } else if (e->type() == QEvent::LocaleChange) {
+ // on Windows the event propagation is taken care by the
+ // WM_SETTINGCHANGE event handler.
+ QWidgetList list = topLevelWidgets();
+ for (int i = 0; i < list.size(); ++i) {
+ QWidget *w = list.at(i);
+ if (!(w->windowType() == Qt::Desktop)) {
+ if (!w->testAttribute(Qt::WA_SetLocale))
+ w->d_func()->setLocale_helper(QLocale(), true);
+ }
+ }
+#endif
} else if (e->type() == QEvent::Timer) {
QTimerEvent *te = static_cast<QTimerEvent*>(e);
Q_ASSERT(te != 0);
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index f4c7304..fa07b1a 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -364,6 +364,7 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop)
SetFocusing(true);
m_longTapDetector = QLongTapTimer::NewL(this);
+ m_doubleClickTimer.invalidate();
DrawableWindow()->SetPointerGrab(ETrue);
}
@@ -589,120 +590,158 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
case EEventKeyUp:
case EEventKey:
{
- // S60 has a confusing way of delivering key events. There are three types of
- // events: EKeyEvent, EKeyEventDown and EKeyEventUp. When a key is pressed, the
- // two first events are generated. When releasing the key, the last one is
- // generated.
- // Because S60 does not generate keysyms for EKeyEventDown and EKeyEventUp events,
- // we need to do some special tricks to map it to the Qt way. First, we completely
- // discard EKeyEventDown events, since they are redundant. Second, since
- // EKeyEventUp does not give us a keysym, we need to cache the keysyms from
- // the EKeyEvent events. This is what resolveS60ScanCode does.
-
-
- // ### hackish way to send Qt application to background when pressing right softkey
- /*
- if( keyEvent.iScanCode == EStdKeyDevice1 ) {
- S60->window_group->SetOrdinalPosition(-1);
- qApp->setActiveWindow(0);
- return EKeyWasNotConsumed;
- }
- */
-
- TUint s60Keysym = QApplicationPrivate::resolveS60ScanCode(keyEvent.iScanCode,
- keyEvent.iCode);
- int keyCode;
- if (s60Keysym == EKeyNull){ //some key events have 0 in iCode, for them iScanCode should be used
- keyCode = qt_keymapper_private()->mapS60ScanCodesToQt(keyEvent.iScanCode);
- } else if (s60Keysym >= 0x20 && s60Keysym < ENonCharacterKeyBase) {
- // Normal characters keys.
- keyCode = s60Keysym;
- } else {
- // Special S60 keys.
- keyCode = qt_keymapper_private()->mapS60KeyToQt(s60Keysym);
- }
-
#ifndef QT_NO_CURSOR
if (S60->mouseInteractionEnabled && S60->virtualMouseRequired) {
//translate keys to pointer
- if (keyCode >= Qt::Key_Left && keyCode <= Qt::Key_Down || keyCode == Qt::Key_Select) {
- /*Explanation about virtualMouseAccel:
- Tapping an arrow key allows precise pixel positioning
- Holding an arrow key down, acceleration is applied to allow cursor
- to be quickly moved to another part of the screen by key repeats.
- */
- if (S60->virtualMouseLastKey == keyCode) {
- S60->virtualMouseAccel *= 2;
- if (S60->virtualMouseAccel > S60->virtualMouseMaxAccel)
- S60->virtualMouseAccel = S60->virtualMouseMaxAccel;
- }
- else
- S60->virtualMouseAccel = 1;
- S60->virtualMouseLastKey = keyCode;
-
+ if ((keyEvent.iScanCode >= EStdKeyLeftArrow && keyEvent.iScanCode <= EStdKeyDownArrow) ||
+ (keyEvent.iScanCode >= EStdKeyDevice10 && keyEvent.iScanCode <= EStdKeyDevice13) ||
+ keyEvent.iScanCode == EStdKeyDevice3) {
QPoint pos = QCursor::pos();
TPointerEvent fakeEvent;
+ fakeEvent.iType = (TPointerEvent::TType)(-1);
+ fakeEvent.iModifiers = keyEvent.iModifiers;
TInt x = pos.x();
TInt y = pos.y();
if (type == EEventKeyUp) {
- if (keyCode == Qt::Key_Select)
- fakeEvent.iType = TPointerEvent::EButton1Up;
- S60->virtualMouseAccel = 1;
- S60->virtualMouseLastKey = 0;
- switch (keyCode) {
- case Qt::Key_Left:
+ S60->virtualMouseAccelTimeout.start();
+ switch (keyEvent.iScanCode) {
+ case EStdKeyLeftArrow:
S60->virtualMousePressedKeys &= ~QS60Data::Left;
break;
- case Qt::Key_Right:
+ case EStdKeyRightArrow:
S60->virtualMousePressedKeys &= ~QS60Data::Right;
break;
- case Qt::Key_Up:
+ case EStdKeyUpArrow:
S60->virtualMousePressedKeys &= ~QS60Data::Up;
break;
- case Qt::Key_Down:
+ case EStdKeyDownArrow:
S60->virtualMousePressedKeys &= ~QS60Data::Down;
break;
- case Qt::Key_Select:
+ // diagonal keys (named aliases don't exist in 3.1 SDK)
+ case EStdKeyDevice10:
+ S60->virtualMousePressedKeys &= ~QS60Data::LeftUp;
+ break;
+ case EStdKeyDevice11:
+ S60->virtualMousePressedKeys &= ~QS60Data::RightUp;
+ break;
+ case EStdKeyDevice12:
+ S60->virtualMousePressedKeys &= ~QS60Data::RightDown;
+ break;
+ case EStdKeyDevice13:
+ S60->virtualMousePressedKeys &= ~QS60Data::LeftDown;
+ break;
+ case EStdKeyDevice3: //select
+ if (S60->virtualMousePressedKeys & QS60Data::Select)
+ fakeEvent.iType = TPointerEvent::EButton1Up;
S60->virtualMousePressedKeys &= ~QS60Data::Select;
break;
}
}
else if (type == EEventKey) {
- switch (keyCode) {
- case Qt::Key_Left:
+ int dx = 0;
+ int dy = 0;
+ if (keyEvent.iScanCode != EStdKeyDevice3) {
+ m_doubleClickTimer.invalidate();
+ //reset mouse accelleration after a short time with no moves
+ const int maxTimeBetweenKeyEventsMs = 500;
+ if (S60->virtualMouseAccelTimeout.isValid() &&
+ S60->virtualMouseAccelTimeout.hasExpired(maxTimeBetweenKeyEventsMs)) {
+ S60->virtualMouseAccelDX = 0;
+ S60->virtualMouseAccelDY = 0;
+ }
+ S60->virtualMouseAccelTimeout.invalidate();
+ }
+ switch (keyEvent.iScanCode) {
+ case EStdKeyLeftArrow:
S60->virtualMousePressedKeys |= QS60Data::Left;
- x -= S60->virtualMouseAccel;
+ dx = -1;
fakeEvent.iType = TPointerEvent::EMove;
break;
- case Qt::Key_Right:
+ case EStdKeyRightArrow:
S60->virtualMousePressedKeys |= QS60Data::Right;
- x += S60->virtualMouseAccel;
+ dx = 1;
fakeEvent.iType = TPointerEvent::EMove;
break;
- case Qt::Key_Up:
+ case EStdKeyUpArrow:
S60->virtualMousePressedKeys |= QS60Data::Up;
- y -= S60->virtualMouseAccel;
+ dy = -1;
fakeEvent.iType = TPointerEvent::EMove;
break;
- case Qt::Key_Down:
+ case EStdKeyDownArrow:
S60->virtualMousePressedKeys |= QS60Data::Down;
- y += S60->virtualMouseAccel;
+ dy = 1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice10:
+ S60->virtualMousePressedKeys |= QS60Data::LeftUp;
+ dx = -1;
+ dy = -1;
fakeEvent.iType = TPointerEvent::EMove;
break;
- case Qt::Key_Select:
+ case EStdKeyDevice11:
+ S60->virtualMousePressedKeys |= QS60Data::RightUp;
+ dx = 1;
+ dy = -1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice12:
+ S60->virtualMousePressedKeys |= QS60Data::RightDown;
+ dx = 1;
+ dy = 1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice13:
+ S60->virtualMousePressedKeys |= QS60Data::LeftDown;
+ dx = -1;
+ dy = 1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice3:
// Platform bug. If you start pressing several keys simultaneously (for
// example for drag'n'drop), Symbian starts producing spurious up and
// down messages for some keys. Therefore, make sure we have a clean slate
// of pressed keys before starting a new button press.
- if (S60->virtualMousePressedKeys != 0) {
- S60->virtualMousePressedKeys |= QS60Data::Select;
+ if (S60->virtualMousePressedKeys & QS60Data::Select) {
return EKeyWasConsumed;
} else {
S60->virtualMousePressedKeys |= QS60Data::Select;
fakeEvent.iType = TPointerEvent::EButton1Down;
+ if (m_doubleClickTimer.isValid()
+ && !m_doubleClickTimer.hasExpired(QApplication::doubleClickInterval())) {
+ fakeEvent.iModifiers |= EModifierDoubleClick;
+ m_doubleClickTimer.invalidate();
+ } else {
+ m_doubleClickTimer.start();
+ }
}
break;
}
+ if (dx) {
+ int cdx = S60->virtualMouseAccelDX;
+ //reset accel on change of sign, else double accel
+ if (dx * cdx <= 0)
+ cdx = dx;
+ else
+ cdx *= 4;
+ //cap accelleration
+ if (dx * cdx > S60->virtualMouseMaxAccel)
+ cdx = dx * S60->virtualMouseMaxAccel;
+ //move mouse position
+ x += cdx;
+ S60->virtualMouseAccelDX = cdx;
+ }
+
+ if (dy) {
+ int cdy = S60->virtualMouseAccelDY;
+ if (dy * cdy <= 0)
+ cdy = dy;
+ else
+ cdy *= 4;
+ if (dy * cdy > S60->virtualMouseMaxAccel)
+ cdy = dy * S60->virtualMouseMaxAccel;
+ y += cdy;
+ S60->virtualMouseAccelDY = cdy;
+ }
}
//clip to screen size (window server allows a sprite hotspot to be outside the screen)
if (x < 0)
@@ -715,18 +754,46 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
y = S60->screenHeightInPixels - 1;
TPoint epos(x, y);
TPoint cpos = epos - PositionRelativeToScreen();
- fakeEvent.iModifiers = keyEvent.iModifiers;
fakeEvent.iPosition = cpos;
fakeEvent.iParentPosition = epos;
- HandlePointerEvent(fakeEvent);
+ if(fakeEvent.iType != -1)
+ HandlePointerEvent(fakeEvent);
return EKeyWasConsumed;
}
- else {
- S60->virtualMouseLastKey = keyCode;
- S60->virtualMouseAccel = 1;
- }
}
#endif
+ // S60 has a confusing way of delivering key events. There are three types of
+ // events: EKeyEvent, EKeyEventDown and EKeyEventUp. When a key is pressed, the
+ // two first events are generated. When releasing the key, the last one is
+ // generated.
+ // Because S60 does not generate keysyms for EKeyEventDown and EKeyEventUp events,
+ // we need to do some special tricks to map it to the Qt way. First, we completely
+ // discard EKeyEventDown events, since they are redundant. Second, since
+ // EKeyEventUp does not give us a keysym, we need to cache the keysyms from
+ // the EKeyEvent events. This is what resolveS60ScanCode does.
+
+
+ // ### hackish way to send Qt application to background when pressing right softkey
+ /*
+ if( keyEvent.iScanCode == EStdKeyDevice1 ) {
+ S60->window_group->SetOrdinalPosition(-1);
+ qApp->setActiveWindow(0);
+ return EKeyWasNotConsumed;
+ }
+ */
+
+ TUint s60Keysym = QApplicationPrivate::resolveS60ScanCode(keyEvent.iScanCode,
+ keyEvent.iCode);
+ int keyCode;
+ if (s60Keysym == EKeyNull){ //some key events have 0 in iCode, for them iScanCode should be used
+ keyCode = qt_keymapper_private()->mapS60ScanCodesToQt(keyEvent.iScanCode);
+ } else if (s60Keysym >= 0x20 && s60Keysym < ENonCharacterKeyBase) {
+ // Normal characters keys.
+ keyCode = s60Keysym;
+ } else {
+ // Special S60 keys.
+ keyCode = qt_keymapper_private()->mapS60KeyToQt(s60Keysym);
+ }
Qt::KeyboardModifiers mods = mapToQtModifiers(keyEvent.iModifiers);
QKeyEventEx qKeyEvent(type == EEventKeyUp ? QEvent::KeyRelease : QEvent::KeyPress, keyCode,
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index fb2837e..60fc5e1 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -1936,6 +1936,8 @@ extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wPa
QLocalePrivate::updateSystemPrivate();
if (!widget->testAttribute(Qt::WA_SetLocale))
widget->dptr()->setLocale_helper(QLocale(), true);
+ QEvent e(QEvent::LocaleChange);
+ QApplication::sendEvent(qApp, &e);
}
}
else if (msg.wParam == SPI_SETICONTITLELOGFONT) {
@@ -2475,7 +2477,7 @@ extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wPa
QApplication::postEvent(widget, new QEvent(QEvent::Close));
else
#ifndef QT_NO_MENUBAR
- QMenuBar::wceCommands(LOWORD(wParam), (HWND) lParam);
+ QMenuBar::wceCommands(LOWORD(wParam));
#endif
result = true;
}
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm
index 24498f8..2b9cf85 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac.mm
+++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm
@@ -202,6 +202,11 @@ static void cleanupCocoaWindowDelegate()
QWindowStateChangeEvent e(Qt::WindowStates(widgetData->window_state
& ~Qt::WindowMaximized));
qt_sendSpontaneousEvent(qwidget, &e);
+ } else {
+ widgetData->window_state = widgetData->window_state & ~Qt::WindowMaximized;
+ QWindowStateChangeEvent e(Qt::WindowStates(widgetData->window_state
+ | Qt::WindowMaximized));
+ qt_sendSpontaneousEvent(qwidget, &e);
}
NSRect rect = [[window contentView] frame];
const QSize newSize(rect.size.width, rect.size.height);
@@ -305,9 +310,19 @@ static void cleanupCocoaWindowDelegate()
Q_UNUSED(newFrame);
// saving the current window geometry before the window is maximized
QWidget *qwidget = m_windowHash->value(window);
- if (qwidget->isWindow() && !(qwidget->windowState() & Qt::WindowMaximized)) {
- QWidgetPrivate *widgetPrivate = qt_widget_private(qwidget);
- widgetPrivate->topData()->normalGeometry = qwidget->geometry();
+ QWidgetPrivate *widgetPrivate = qt_widget_private(qwidget);
+ if (qwidget->isWindow()) {
+ if(qwidget->windowState() & Qt::WindowMaximized) {
+ // Restoring
+ widgetPrivate->topData()->wasMaximized = false;
+ } else {
+ // Maximizing
+ widgetPrivate->topData()->normalGeometry = qwidget->geometry();
+ // If the window was maximized we need to update the coordinates since now it will start at 0,0.
+ // We do this in a special field that is only used when not restoring but manually resizing the window.
+ // Since the coordinates are fixed we just set a boolean flag.
+ widgetPrivate->topData()->wasMaximized = true;
+ }
}
return YES;
}
diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp
index ae1f60d..5b58984 100644
--- a/src/gui/kernel/qcursor.cpp
+++ b/src/gui/kernel/qcursor.cpp
@@ -229,7 +229,7 @@ QT_BEGIN_NAMESPACE
Writes the \a cursor to the \a stream.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QCursor &c)
@@ -256,7 +256,7 @@ QDataStream &operator<<(QDataStream &s, const QCursor &c)
Reads the \a cursor from the \a stream.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QCursor &c)
diff --git a/src/gui/kernel/qdnd_qws.cpp b/src/gui/kernel/qdnd_qws.cpp
index e47de00..7e5afc7 100644
--- a/src/gui/kernel/qdnd_qws.cpp
+++ b/src/gui/kernel/qdnd_qws.cpp
@@ -192,6 +192,10 @@ bool QDragManager::eventFilter(QObject *o, QEvent *e)
return false;
switch(e->type()) {
+ case QEvent::ShortcutOverride:
+ // prevent accelerators from firing while dragging
+ e->accept();
+ return true;
case QEvent::KeyPress:
case QEvent::KeyRelease:
diff --git a/src/gui/kernel/qdnd_x11.cpp b/src/gui/kernel/qdnd_x11.cpp
index 0a05d8e..2b12317 100644
--- a/src/gui/kernel/qdnd_x11.cpp
+++ b/src/gui/kernel/qdnd_x11.cpp
@@ -1299,6 +1299,12 @@ bool QDragManager::eventFilter(QObject * o, QEvent * e)
return true;
}
+ if (e->type() == QEvent::ShortcutOverride) {
+ // prevent accelerators from firing while dragging
+ e->accept();
+ return true;
+ }
+
if (e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease) {
QKeyEvent *ke = ((QKeyEvent*)e);
if (ke->key() == Qt::Key_Escape && e->type() == QEvent::KeyPress) {
diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp
index 956499b..49bdea7 100644
--- a/src/gui/kernel/qgesture.cpp
+++ b/src/gui/kernel/qgesture.cpp
@@ -612,7 +612,7 @@ void QPinchGesture::setRotationAngle(qreal value)
If the gesture has either a horizontal or vertical component, the
swipe angle describes the angle between the direction of motion and the
x-axis as defined using the standard widget
- \l{The Coordinate System}{coordinate system}.
+ \l{Coordinate System}{coordinate system}.
\sa horizontalDirection, verticalDirection
*/
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index aa6720e..43facef 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -132,20 +132,21 @@ void QGestureManager::unregisterGestureRecognizer(Qt::GestureType type)
QGestureRecognizer *recognizer = m_gestureToRecognizer.value(g);
if (list.contains(recognizer)) {
m_deletedRecognizers.insert(g, recognizer);
- m_gestureToRecognizer.remove(g);
}
}
- foreach (QGestureRecognizer *recognizer, list) {
- QList<QGesture *> obsoleteGestures;
- QMap<ObjectGesture, QList<QGesture *> >::Iterator iter = m_objectGestures.begin();
- while (iter != m_objectGestures.end()) {
- ObjectGesture objectGesture = iter.key();
- if (objectGesture.gesture == type)
- obsoleteGestures << iter.value();
- ++iter;
+ QMap<ObjectGesture, QList<QGesture *> >::const_iterator iter = m_objectGestures.begin();
+ while (iter != m_objectGestures.end()) {
+ ObjectGesture objectGesture = iter.key();
+ if (objectGesture.gesture == type) {
+ foreach (QGesture *g, iter.value()) {
+ if (QGestureRecognizer *recognizer = m_gestureToRecognizer.value(g)) {
+ m_gestureToRecognizer.remove(g);
+ m_obsoleteGestures[recognizer].insert(g);
+ }
+ }
}
- m_obsoleteGestures.insert(recognizer, obsoleteGestures);
+ ++iter;
}
}
@@ -155,7 +156,16 @@ void QGestureManager::cleanupCachedGestures(QObject *target, Qt::GestureType typ
while (iter != m_objectGestures.end()) {
ObjectGesture objectGesture = iter.key();
if (objectGesture.gesture == type && target == objectGesture.object.data()) {
- qDeleteAll(iter.value());
+ QSet<QGesture *> gestures = iter.value().toSet();
+ for (QHash<QGestureRecognizer *, QSet<QGesture *> >::iterator
+ it = m_obsoleteGestures.begin(), e = m_obsoleteGestures.end(); it != e; ++it) {
+ it.value() -= gestures;
+ }
+ foreach (QGesture *g, gestures) {
+ m_deletedRecognizers.remove(g);
+ m_gestureToRecognizer.remove(g);
+ }
+ qDeleteAll(gestures);
iter = m_objectGestures.erase(iter);
} else {
++iter;
@@ -177,6 +187,9 @@ QGesture *QGestureManager::getState(QObject *object, QGestureRecognizer *recogni
#ifndef QT_NO_GRAPHICSVIEW
} else {
Q_ASSERT(qobject_cast<QGraphicsObject *>(object));
+ QGraphicsObject *graphicsObject = static_cast<QGraphicsObject *>(object);
+ if (graphicsObject->QGraphicsItem::d_func()->inDestructor)
+ return 0;
#endif
}
@@ -275,24 +288,14 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap<QObject *,
// i.e. were canceled
QSet<QGesture *> canceledGestures = m_activeGestures & notGestures;
- // start timers for new gestures in maybe state
- foreach (QGesture *state, newMaybeGestures) {
- QBasicTimer &timer = m_maybeGestures[state];
- if (!timer.isActive())
- timer.start(3000, this);
- }
- // kill timers for gestures that were in maybe state
+ // new gestures in maybe state
+ m_maybeGestures += newMaybeGestures;
+
+ // gestures that were in maybe state
QSet<QGesture *> notMaybeGestures = (startedGestures | triggeredGestures
| finishedGestures | canceledGestures
| notGestures);
- foreach(QGesture *gesture, notMaybeGestures) {
- QHash<QGesture *, QBasicTimer>::iterator it =
- m_maybeGestures.find(gesture);
- if (it != m_maybeGestures.end()) {
- it.value().stop();
- m_maybeGestures.erase(it);
- }
- }
+ m_maybeGestures -= notMaybeGestures;
Q_ASSERT((startedGestures & finishedGestures).isEmpty());
Q_ASSERT((startedGestures & newMaybeGestures).isEmpty());
@@ -336,7 +339,7 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap<QObject *,
!finishedGestures.isEmpty() || !canceledGestures.isEmpty()) {
DEBUG() << "QGestureManager::filterEventThroughContexts:"
<< "\n\tactiveGestures:" << m_activeGestures
- << "\n\tmaybeGestures:" << m_maybeGestures.keys()
+ << "\n\tmaybeGestures:" << m_maybeGestures
<< "\n\tstarted:" << startedGestures
<< "\n\ttriggered:" << triggeredGestures
<< "\n\tfinished:" << finishedGestures
@@ -675,26 +678,6 @@ void QGestureManager::deliverEvents(const QSet<QGesture *> &gestures,
}
}
-void QGestureManager::timerEvent(QTimerEvent *event)
-{
- QHash<QGesture *, QBasicTimer>::iterator it = m_maybeGestures.begin(),
- e = m_maybeGestures.end();
- for (; it != e; ) {
- QBasicTimer &timer = it.value();
- Q_ASSERT(timer.isActive());
- if (timer.timerId() == event->timerId()) {
- timer.stop();
- QGesture *gesture = it.key();
- it = m_maybeGestures.erase(it);
- DEBUG() << "QGestureManager::timerEvent: gesture stopped due to timeout:"
- << gesture;
- recycle(gesture);
- } else {
- ++it;
- }
- }
-}
-
void QGestureManager::recycle(QGesture *gesture)
{
QGestureRecognizer *recognizer = m_gestureToRecognizer.value(gesture, 0);
diff --git a/src/gui/kernel/qgesturemanager_p.h b/src/gui/kernel/qgesturemanager_p.h
index a0ff83f..c452f49 100644
--- a/src/gui/kernel/qgesturemanager_p.h
+++ b/src/gui/kernel/qgesturemanager_p.h
@@ -85,7 +85,6 @@ public:
void recycle(QGesture *gesture);
protected:
- void timerEvent(QTimerEvent *event);
bool filterEventThroughContexts(const QMultiMap<QObject *, Qt::GestureType> &contexts,
QEvent *event);
@@ -93,7 +92,7 @@ private:
QMultiMap<Qt::GestureType, QGestureRecognizer *> m_recognizers;
QSet<QGesture *> m_activeGestures;
- QHash<QGesture *, QBasicTimer> m_maybeGestures;
+ QSet<QGesture *> m_maybeGestures;
enum State {
Gesture,
@@ -127,7 +126,7 @@ private:
int m_lastCustomGestureId;
- QHash<QGestureRecognizer *, QList<QGesture *> > m_obsoleteGestures;
+ QHash<QGestureRecognizer *, QSet<QGesture *> > m_obsoleteGestures;
QHash<QGesture *, QGestureRecognizer *> m_deletedRecognizers;
void cleanupGesturesForRemovedRecognizer(QGesture *gesture);
diff --git a/src/gui/kernel/qsound_mac.mm b/src/gui/kernel/qsound_mac.mm
index 71fd663..2aff44d 100644
--- a/src/gui/kernel/qsound_mac.mm
+++ b/src/gui/kernel/qsound_mac.mm
@@ -88,14 +88,14 @@ QT_END_NAMESPACE
QT_USE_NAMESPACE
-@interface QMacSoundDelegate : NSObject<NSSoundDelegate> {
+@interface QT_MANGLE_NAMESPACE(QMacSoundDelegate) : NSObject<NSSoundDelegate> {
QSound *qSound; // may be null.
QAuServerMac* server;
}
-(id)initWithQSound:(QSound*)sound:(QAuServerMac*)server;
@end
-@implementation QMacSoundDelegate
+@implementation QT_MANGLE_NAMESPACE(QMacSoundDelegate)
-(id)initWithQSound:(QSound*)s:(QAuServerMac*)serv {
self = [super init];
if(self) {
@@ -172,7 +172,7 @@ NSSound *QAuServerMac::createNSSound(const QString &fileName, QSound *qSound)
{
NSString *nsFileName = const_cast<NSString *>(reinterpret_cast<const NSString *>(QCFString::toCFStringRef(fileName)));
NSSound * const nsSound = [[NSSound alloc] initWithContentsOfFile: nsFileName byReference:YES];
- QMacSoundDelegate * const delegate = [[QMacSoundDelegate alloc] initWithQSound:qSound:this];
+ QT_MANGLE_NAMESPACE(QMacSoundDelegate) * const delegate = [[QT_MANGLE_NAMESPACE(QMacSoundDelegate) alloc] initWithQSound:qSound:this];
[nsSound setDelegate:delegate];
[nsFileName release];
return nsSound;
diff --git a/src/gui/kernel/qt_mac_p.h b/src/gui/kernel/qt_mac_p.h
index 3341ce1..ca9541a 100644
--- a/src/gui/kernel/qt_mac_p.h
+++ b/src/gui/kernel/qt_mac_p.h
@@ -57,7 +57,9 @@
#ifdef __OBJC__
#include <Cocoa/Cocoa.h>
+#ifdef QT_MAC_USE_COCOA
#include <objc/runtime.h>
+#endif // QT_MAC_USE_COCOA
#endif
#include <CoreServices/CoreServices.h>
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 58da302..f560458 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -62,6 +62,7 @@
#include "QtGui/qevent.h"
#include "qpointer.h"
#include "qapplication.h"
+#include "qelapsedtimer.h"
#include <w32std.h>
#include <coecntrl.h>
#include <eikenv.h>
@@ -102,16 +103,21 @@ public:
int defaultDpiX;
int defaultDpiY;
WId curWin;
- int virtualMouseLastKey;
enum PressedKeys {
Select = 0x1,
Right = 0x2,
Down = 0x4,
Left = 0x8,
- Up = 0x10
+ Up = 0x10,
+ LeftUp = 0x20,
+ RightUp = 0x40,
+ RightDown = 0x80,
+ LeftDown = 0x100
};
int virtualMousePressedKeys; // of the above type, but avoids casting problems
- int virtualMouseAccel;
+ int virtualMouseAccelDX;
+ int virtualMouseAccelDY;
+ QElapsedTimer virtualMouseAccelTimeout;
int virtualMouseMaxAccel;
#ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS
int brokenPointerCursors : 1;
@@ -222,6 +228,7 @@ private:
private:
QWidget *qwidget;
QLongTapTimer* m_longTapDetector;
+ QElapsedTimer m_doubleClickTimer;
bool m_ignoreFocusChanged : 1;
bool m_symbianPopupIsOpen : 1;
@@ -246,7 +253,7 @@ inline void QS60Data::updateScreenSize()
S60->screenWidthInTwips = params.iTwipsSize.iWidth;
S60->screenHeightInTwips = params.iTwipsSize.iHeight;
- S60->virtualMouseMaxAccel = qMax(S60->screenHeightInPixels, S60->screenWidthInPixels) / 20;
+ S60->virtualMouseMaxAccel = qMax(S60->screenHeightInPixels, S60->screenWidthInPixels) / 10;
TReal inches = S60->screenHeightInTwips / (TReal)KTwipsPerInch;
S60->defaultDpiY = S60->screenHeightInPixels / inches;
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 6f4a20f..6d48e0e 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -1388,6 +1388,9 @@ QWidget::~QWidget()
qWarning("QWidget: %s (%s) deleted while being painted", className(), name());
#endif
+ foreach (Qt::GestureType type, d->gestureContext.keys())
+ ungrabGesture(type);
+
// force acceptDrops false before winId is destroyed.
d->registerDropSite(false);
@@ -1480,7 +1483,8 @@ QWidget::~QWidget()
d->needsFlush = 0;
// set all QPointers for this object to zero
- QObjectPrivate::clearGuards(this);
+ if (d->hasGuards)
+ QObjectPrivate::clearGuards(this);
if (d->declarativeData) {
QAbstractDeclarativeData::destroyed(d->declarativeData, this);
@@ -1578,6 +1582,11 @@ void QWidgetPrivate::createTLExtra()
x->inTopLevelResize = false;
x->inRepaint = false;
x->embedded = 0;
+#ifdef Q_WS_MAC
+#ifdef QT_MAC_USE_COCOA
+ x->wasMaximized = false;
+#endif // QT_MAC_USE_COCOA
+#endif // Q_WS_MAC
createTLSysExtra();
#ifdef QWIDGET_EXTRA_DEBUG
static int count = 0;
@@ -2535,7 +2544,7 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool
Q_Q(QWidget);
QStyle *oldStyle = q->style();
#ifndef QT_NO_STYLE_STYLESHEET
- QStyle *origStyle = 0;
+ QWeakPointer<QStyle> origStyle;
#endif
#ifdef Q_WS_MAC
@@ -2549,7 +2558,7 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool
createExtra();
#ifndef QT_NO_STYLE_STYLESHEET
- origStyle = extra->style;
+ origStyle = extra->style.data();
#endif
extra->style = newStyle;
}
@@ -2578,23 +2587,23 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool
}
}
- QEvent e(QEvent::StyleChange);
- QApplication::sendEvent(q, &e);
-#ifdef QT3_SUPPORT
- q->styleChange(*oldStyle);
-#endif
-
#ifndef QT_NO_STYLE_STYLESHEET
if (!qobject_cast<QStyleSheetStyle*>(newStyle)) {
- if (const QStyleSheetStyle* cssStyle = qobject_cast<QStyleSheetStyle*>(origStyle)) {
+ if (const QStyleSheetStyle* cssStyle = qobject_cast<QStyleSheetStyle*>(origStyle.data())) {
cssStyle->clearWidgetFont(q);
}
}
#endif
+ QEvent e(QEvent::StyleChange);
+ QApplication::sendEvent(q, &e);
+#ifdef QT3_SUPPORT
+ q->styleChange(*oldStyle);
+#endif
+
#ifndef QT_NO_STYLE_STYLESHEET
// dereference the old stylesheet style
- if (QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle *>(origStyle))
+ if (QStyleSheetStyle *proxy = qobject_cast<QStyleSheetStyle *>(origStyle.data()))
proxy->deref();
#endif
}
@@ -5583,52 +5592,23 @@ QPixmap QWidgetEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QPoint *
pixmapOffset = painterTransform.map(pixmapOffset);
}
-
QRect effectRect;
- if (mode == QGraphicsEffect::PadToEffectiveBoundingRect) {
+ if (mode == QGraphicsEffect::PadToEffectiveBoundingRect)
effectRect = m_widget->graphicsEffect()->boundingRectFor(sourceRect).toAlignedRect();
-
- } else if (mode == QGraphicsEffect::PadToTransparentBorder) {
+ else if (mode == QGraphicsEffect::PadToTransparentBorder)
effectRect = sourceRect.adjusted(-1, -1, 1, 1).toAlignedRect();
-
- } else {
+ else
effectRect = sourceRect.toAlignedRect();
- }
-
if (offset)
*offset = effectRect.topLeft();
- if (deviceCoordinates) {
- // Clip to device rect.
- int left, top, right, bottom;
- effectRect.getCoords(&left, &top, &right, &bottom);
- if (left < 0) {
- if (offset)
- offset->rx() += -left;
- effectRect.setX(0);
- }
- if (top < 0) {
- if (offset)
- offset->ry() += -top;
- effectRect.setY(0);
- }
- // NB! We use +-1 for historical reasons (see QRect documentation).
- QPaintDevice *device = context->painter->device();
- const int deviceWidth = device->width();
- const int deviceHeight = device->height();
- if (right + 1 > deviceWidth)
- effectRect.setRight(deviceWidth - 1);
- if (bottom + 1 > deviceHeight)
- effectRect.setBottom(deviceHeight -1);
- }
-
pixmapOffset -= effectRect.topLeft();
QPixmap pixmap(effectRect.size());
pixmap.fill(Qt::transparent);
- m_widget->render(&pixmap, pixmapOffset);
+ m_widget->render(&pixmap, pixmapOffset, QRegion(), QWidget::DrawChildren);
return pixmap;
}
#endif //QT_NO_GRAPHICSEFFECT
@@ -6232,6 +6212,12 @@ void QWidget::setFocus(Qt::FocusReason reason)
QApplication::sendEvent(that->style(), &event);
}
if (!isHidden()) {
+#ifndef QT_NO_GRAPHICSVIEW
+ // Update proxy state
+ if (QWExtra *topData = window()->d_func()->extra)
+ if (topData->proxyWidget && topData->proxyWidget->hasFocus())
+ topData->proxyWidget->d_func()->updateProxyInputMethodAcceptanceFromWidget();
+#endif
// Send event to self
QFocusEvent event(QEvent::FocusIn, reason);
QPointer<QWidget> that = f;
@@ -6740,6 +6726,18 @@ void QWidget::setGeometry(const QRect &r)
*/
QByteArray QWidget::saveGeometry() const
{
+#ifdef QT_MAC_USE_COCOA
+ // We check if the window was maximized during this invocation. If so, we need to record the
+ // starting position as 0,0.
+ Q_D(const QWidget);
+ QRect newFramePosition = frameGeometry();
+ QRect newNormalPosition = normalGeometry();
+ if(d->topData()->wasMaximized && !(windowState() & Qt::WindowMaximized)) {
+ // Change the starting position
+ newFramePosition.moveTo(0, 0);
+ newNormalPosition.moveTo(0, 0);
+ }
+#endif // QT_MAC_USE_COCOA
QByteArray array;
QDataStream stream(&array, QIODevice::WriteOnly);
stream.setVersion(QDataStream::Qt_4_0);
@@ -6749,8 +6747,13 @@ QByteArray QWidget::saveGeometry() const
stream << magicNumber
<< majorVersion
<< minorVersion
+#ifdef QT_MAC_USE_COCOA
+ << newFramePosition
+ << newNormalPosition
+#else
<< frameGeometry()
<< normalGeometry()
+#endif // QT_MAC_USE_COCOA
<< qint32(QApplication::desktop()->screenNumber(this))
<< quint8(windowState() & Qt::WindowMaximized)
<< quint8(windowState() & Qt::WindowFullScreen);
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index e29b755..f12c956 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -3824,9 +3824,35 @@ void QWidgetPrivate::raise_sys()
#if QT_MAC_USE_COCOA
QMacCocoaAutoReleasePool pool;
if (isRealWindow()) {
- // Calling orderFront shows the window on Cocoa too.
+ // With the introduction of spaces it is not as simple as just raising the window.
+ // First we need to check if we are in the right space. If we are, then we just continue
+ // as usual. The problem comes when we are not in the active space. There are two main cases:
+ // 1. Our parent was moved to a new space. In this case we want the window to be raised
+ // in the same space as its parent.
+ // 2. We don't have a parent. For this case we will just raise the window and let Cocoa
+ // switch to the corresponding space.
+ // NOTICE: There are a lot of corner cases here. We are keeping this simple for now, if
+ // required we will introduce special handling for some of them.
if (!q->testAttribute(Qt::WA_DontShowOnScreen) && q->isVisible()) {
- [qt_mac_window_for(q) orderFront:qt_mac_window_for(q)];
+ OSWindowRef window = qt_mac_window_for(q);
+ // isOnActiveSpace is available only from 10.6 onwards, so we need to check if it is
+ // available before calling it.
+ if([window respondsToSelector:@selector(isOnActiveSpace)]) {
+ if(![window performSelector:@selector(isOnActiveSpace)]) {
+ QWidget *parentWidget = q->parentWidget();
+ if(parentWidget) {
+ OSWindowRef parentWindow = qt_mac_window_for(parentWidget);
+ if(parentWindow && [parentWindow isOnActiveSpace]) {
+ // The window was created in a different space. Therefore if we want
+ // to show it in the current space we need to recreate it in the new
+ // space.
+ recreateMacWindow();
+ window = qt_mac_window_for(q);
+ }
+ }
+ }
+ }
+ [window orderFront:window];
}
if (qt_mac_raise_process) { //we get to be the active process now
ProcessSerialNumber psn;
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 9926b2c..412705a 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -170,6 +170,14 @@ struct QTLWExtra {
WindowGroupRef group;
IconRef windowIcon; // the current window icon, if set with setWindowIcon_sys.
quint32 savedWindowAttributesFromMaximized; // Saved attributes from when the calling updateMaximizeButton_sys()
+#ifdef QT_MAC_USE_COCOA
+ // This value is just to make sure we maximize and restore to the right location, yet we allow apps to be maximized and
+ // manually resized.
+ // The name is misleading, since this is set when maximizing the window. It is a hint to saveGeometry(..) to record the
+ // starting position as 0,0 instead of the normal starting position.
+ bool wasMaximized;
+#endif // QT_MAC_USE_COCOA
+
#elif defined(Q_WS_QWS) // <--------------------------------------------------------- QWS
#ifndef QT_NO_QWS_MANAGER
QWSManager *qwsManager;
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index a0429d3..02e7cb8 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -387,7 +387,6 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de
| EPointerFilterMove | EPointerFilterDrag, 0);
drawableWindow->EnableVisibilityChangeEvents();
- s60UpdateIsOpaque();
}
q->setAttribute(Qt::WA_WState_Created);
@@ -400,6 +399,9 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de
// this generates a WinIdChanged event.
setWinId(control.take());
+ if (!desktop)
+ s60UpdateIsOpaque(); // must be called after setWinId()
+
} else if (q->testAttribute(Qt::WA_NativeWindow) || paintOnScreen()) { // create native child widget
QScopedPointer<QSymbianControl> control( q_check_ptr(new QSymbianControl(q)) );
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index 7d647b7..5482da3 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -123,9 +123,11 @@ static PtrWTClose ptrWTClose = 0;
static PtrWTInfo ptrWTInfo = 0;
static PtrWTQueueSizeGet ptrWTQueueSizeGet = 0;
static PtrWTQueueSizeSet ptrWTQueueSizeSet = 0;
+#ifndef QT_NO_TABLETEVENT
static void init_wintab_functions();
static void qt_tablet_init();
static void qt_tablet_cleanup();
+#endif // QT_NO_TABLETEVENT
extern HCTX qt_tablet_context;
extern bool qt_tablet_tilt_support;
@@ -136,6 +138,8 @@ QWidget* qt_get_tablet_widget()
}
extern bool qt_is_gui_used;
+
+#ifndef QT_NO_TABLETEVENT
static void init_wintab_functions()
{
#if defined(Q_OS_WINCE)
@@ -227,6 +231,7 @@ static void qt_tablet_cleanup()
delete qt_tablet_widget;
qt_tablet_widget = 0;
}
+#endif // QT_NO_TABLETEVENT
const QString qt_reg_winclass(QWidget *w); // defined in qapplication_win.cpp
@@ -512,8 +517,10 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
DestroyWindow(destroyw);
}
+#ifndef QT_NO_TABLETEVENT
if (q != qt_tablet_widget && QWidgetPrivate::mapper)
qt_tablet_init();
+#endif // QT_NO_TABLETEVENT
if (q->testAttribute(Qt::WA_DropSiteRegistered))
registerDropSite(true);
diff --git a/src/gui/kernel/qwidget_wince.cpp b/src/gui/kernel/qwidget_wince.cpp
index 509847b..fc1e52c 100644
--- a/src/gui/kernel/qwidget_wince.cpp
+++ b/src/gui/kernel/qwidget_wince.cpp
@@ -63,6 +63,7 @@ typedef BOOL (API *PtrWTGet)(HCTX, LPLOGCONTEXT);
typedef int (API *PtrWTQueueSizeGet)(HCTX);
typedef BOOL (API *PtrWTQueueSizeSet)(HCTX, int);
+#ifndef QT_NO_TABLETEVENT
static void qt_tablet_init_wce();
static void qt_tablet_cleanup_wce();
@@ -135,6 +136,7 @@ static void qt_tablet_cleanup_wce() {
delete qt_tablet_widget;
qt_tablet_widget = 0;
}
+#endif // QT_NO_TABLETEVENT
// The internal qWinRequestConfig, defined in qapplication_win.cpp, stores move,
@@ -358,8 +360,10 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
DestroyWindow(destroyw);
}
+#ifndef QT_NO_TABLETEVENT
if (q != qt_tablet_widget && QWidgetPrivate::mapper)
qt_tablet_init_wce();
+#endif // QT_NO_TABLETEVENT
if (q->testAttribute(Qt::WA_DropSiteRegistered))
registerDropSite(true);
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 37ac6bf..43f510c 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -3000,7 +3000,7 @@ Picture QX11Data::getSolidFill(int screen, const QColor &c)
return X11->solid_fills[i].picture;
}
// none found, replace one
- int i = rand() % 16;
+ int i = qrand() % 16;
if (X11->solid_fills[i].screen != screen && X11->solid_fills[i].picture) {
XRenderFreePicture (X11->display, X11->solid_fills[i].picture);
diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp
index 7ff2a37..2a9b31a 100644
--- a/src/gui/painting/qbezier.cpp
+++ b/src/gui/painting/qbezier.cpp
@@ -93,7 +93,7 @@ QBezier QBezier::fromPoints(const QPointF &p1, const QPointF &p2,
/*!
\internal
*/
-QPolygonF QBezier::toPolygon() const
+QPolygonF QBezier::toPolygon(qreal bezier_flattening_threshold) const
{
// flattening is done by splitting the bezier until we can replace the segment by a straight
// line. We split further until the control points are close enough to the line connecting the
@@ -108,7 +108,7 @@ QPolygonF QBezier::toPolygon() const
QPolygonF polygon;
polygon.append(QPointF(x1, y1));
- addToPolygon(&polygon);
+ addToPolygon(&polygon, bezier_flattening_threshold);
return polygon;
}
@@ -117,34 +117,6 @@ QBezier QBezier::mapBy(const QTransform &transform) const
return QBezier::fromPoints(transform.map(pt1()), transform.map(pt2()), transform.map(pt3()), transform.map(pt4()));
}
-//0.05 is really low, but required for scaled-up beziers...
-static const qreal flatness = 0.05;
-
-//based on "Fast, precise flattening of cubic Bezier path and offset curves"
-// by T. F. Hain, A. L. Ahmad, S. V. R. Racherla and D. D. Langan
-static inline void flattenBezierWithoutInflections(QBezier &bez,
- QPolygonF *&p)
-{
- QBezier left;
-
- while (1) {
- qreal dx = bez.x2 - bez.x1;
- qreal dy = bez.y2 - bez.y1;
-
- qreal normalized = qSqrt(dx * dx + dy * dy);
- if (qFuzzyIsNull(normalized))
- break;
-
- qreal d = qAbs(dx * (bez.y3 - bez.y2) - dy * (bez.x3 - bez.x2));
-
- qreal t = qSqrt(4. / 3. * normalized * flatness / d);
- if (t > 1 || qFuzzyIsNull(t - (qreal)1.))
- break;
- bez.parameterSplitLeft(t, &left);
- p->append(bez.pt1());
- }
-}
-
QBezier QBezier::getSubRange(qreal t0, qreal t1) const
{
QBezier result;
@@ -223,7 +195,7 @@ static inline bool findInflections(qreal a, qreal b, qreal c,
}
-void QBezier::addToPolygon(QPolygonF *polygon) const
+void QBezier::addToPolygon(QPolygonF *polygon, qreal bezier_flattening_threshold) const
{
QBezier beziers[32];
beziers[0] = *this;
@@ -243,7 +215,7 @@ void QBezier::addToPolygon(QPolygonF *polygon) const
qAbs(b->x1 - b->x3) + qAbs(b->y1 - b->y3);
l = 1.;
}
- if (d < flatness*l || b == beziers + 31) {
+ if (d < bezier_flattening_threshold*l || b == beziers + 31) {
// good enough, we pop it off and add the endpoint
polygon->append(QPointF(b->x4, b->y4));
--b;
@@ -255,55 +227,6 @@ void QBezier::addToPolygon(QPolygonF *polygon) const
}
}
-void QBezier::addToPolygonMixed(QPolygonF *polygon) const
-{
- qreal ax = -x1 + 3*x2 - 3*x3 + x4;
- qreal ay = -y1 + 3*y2 - 3*y3 + y4;
- qreal bx = 3*x1 - 6*x2 + 3*x3;
- qreal by = 3*y1 - 6*y2 + 3*y3;
- qreal cx = -3*x1 + 3*x2;
- qreal cy = -3*y1 + 2*y2;
- qreal a = 6 * (ay * bx - ax * by);
- qreal b = 6 * (ay * cx - ax * cy);
- qreal c = 2 * (by * cx - bx * cy);
-
- if ((qFuzzyIsNull(a) && qFuzzyIsNull(b)) ||
- (b * b - 4 * a *c) < 0) {
- QBezier bez(*this);
- flattenBezierWithoutInflections(bez, polygon);
- polygon->append(QPointF(x4, y4));
- } else {
- QBezier beziers[32];
- beziers[0] = *this;
- QBezier *b = beziers;
-
- while (b >= beziers) {
- // check if we can pop the top bezier curve from the stack
- qreal y4y1 = b->y4 - b->y1;
- qreal x4x1 = b->x4 - b->x1;
- qreal l = qAbs(x4x1) + qAbs(y4y1);
- qreal d;
- if (l > 1.) {
- d = qAbs( (x4x1)*(b->y1 - b->y2) - (y4y1)*(b->x1 - b->x2) )
- + qAbs( (x4x1)*(b->y1 - b->y3) - (y4y1)*(b->x1 - b->x3) );
- } else {
- d = qAbs(b->x1 - b->x2) + qAbs(b->y1 - b->y2) +
- qAbs(b->x1 - b->x3) + qAbs(b->y1 - b->y3);
- l = 1.;
- }
- if (d < .5*l || b == beziers + 31) {
- // good enough, we pop it off and add the endpoint
- polygon->append(QPointF(b->x4, b->y4));
- --b;
- } else {
- // split, second half of the polygon goes lower into the stack
- b->split(b+1, b);
- ++b;
- }
- }
- }
-}
-
QRectF QBezier::bounds() const
{
qreal xmin = x1;
@@ -824,147 +747,4 @@ QBezier QBezier::bezierOnInterval(qreal t0, qreal t1) const
return result;
}
-
-static inline void bindInflectionPoint(const QBezier &bez, const qreal t,
- qreal *tMinus , qreal *tPlus)
-{
- if (t <= 0) {
- *tMinus = *tPlus = -1;
- return;
- } else if (t >= 1) {
- *tMinus = *tPlus = 2;
- return;
- }
-
- QBezier left, right;
- splitBezierAt(bez, t, &left, &right);
-
- qreal ax = -right.x1 + 3*right.x2 - 3*right.x3 + right.x4;
- qreal ay = -right.y1 + 3*right.y2 - 3*right.y3 + right.y4;
- qreal ex = 3 * (right.x2 - right.x3);
- qreal ey = 3 * (right.y2 - right.y3);
-
- qreal s4 = qAbs(6 * (ey * ax - ex * ay) / qSqrt(ex * ex + ey * ey)) + 0.00001f;
- qreal tf = qPow(qreal(9 * flatness / s4), qreal(1./3.));
- *tMinus = t - (1 - t) * tf;
- *tPlus = t + (1 - t) * tf;
-}
-
-void QBezier::addToPolygonIterative(QPolygonF *p) const
-{
- qreal t1, t2, tcusp;
- qreal t1min, t1plus, t2min, t2plus;
-
- qreal ax = -x1 + 3*x2 - 3*x3 + x4;
- qreal ay = -y1 + 3*y2 - 3*y3 + y4;
- qreal bx = 3*x1 - 6*x2 + 3*x3;
- qreal by = 3*y1 - 6*y2 + 3*y3;
- qreal cx = -3*x1 + 3*x2;
- qreal cy = -3*y1 + 2*y2;
-
- if (findInflections(6 * (ay * bx - ax * by),
- 6 * (ay * cx - ax * cy),
- 2 * (by * cx - bx * cy),
- &t1, &t2, &tcusp)) {
- bindInflectionPoint(*this, t1, &t1min, &t1plus);
- bindInflectionPoint(*this, t2, &t2min, &t2plus);
-
- QBezier tmpBez = *this;
- QBezier left, right, bez1, bez2, bez3;
- if (t1min > 0) {
- if (t1min >= 1) {
- flattenBezierWithoutInflections(tmpBez, p);
- } else {
- splitBezierAt(tmpBez, t1min, &left, &right);
- flattenBezierWithoutInflections(left, p);
- p->append(tmpBez.pointAt(t1min));
-
- if (t2min < t1plus) {
- if (tcusp < 1) {
- p->append(tmpBez.pointAt(tcusp));
- }
- if (t2plus < 1) {
- splitBezierAt(tmpBez, t2plus, &left, &right);
- flattenBezierWithoutInflections(right, p);
- }
- } else if (t1plus < 1) {
- if (t2min < 1) {
- splitBezierAt(tmpBez, t2min, &bez3, &right);
- splitBezierAt(bez3, t1plus, &left, &bez2);
-
- flattenBezierWithoutInflections(bez2, p);
- p->append(tmpBez.pointAt(t2min));
-
- if (t2plus < 1) {
- splitBezierAt(tmpBez, t2plus, &left, &bez2);
- flattenBezierWithoutInflections(bez2, p);
- }
- } else {
- splitBezierAt(tmpBez, t1plus, &left, &bez2);
- flattenBezierWithoutInflections(bez2, p);
- }
- }
- }
- } else if (t1plus > 0) {
- p->append(QPointF(x1, y1));
- if (t2min < t1plus) {
- if (tcusp < 1) {
- p->append(tmpBez.pointAt(tcusp));
- }
- if (t2plus < 1) {
- splitBezierAt(tmpBez, t2plus, &left, &bez2);
- flattenBezierWithoutInflections(bez2, p);
- }
- } else if (t1plus < 1) {
- if (t2min < 1) {
- splitBezierAt(tmpBez, t2min, &bez3, &right);
- splitBezierAt(bez3, t1plus, &left, &bez2);
-
- flattenBezierWithoutInflections(bez2, p);
-
- p->append(tmpBez.pointAt(t2min));
- if (t2plus < 1) {
- splitBezierAt(tmpBez, t2plus, &left, &bez2);
- flattenBezierWithoutInflections(bez2, p);
- }
- } else {
- splitBezierAt(tmpBez, t1plus, &left, &bez2);
- flattenBezierWithoutInflections(bez2, p);
- }
- }
- } else if (t2min > 0) {
- if (t2min < 1) {
- splitBezierAt(tmpBez, t2min, &bez1, &right);
- flattenBezierWithoutInflections(bez1, p);
- p->append(tmpBez.pointAt(t2min));
-
- if (t2plus < 1) {
- splitBezierAt(tmpBez, t2plus, &left, &bez2);
- flattenBezierWithoutInflections(bez2, p);
- }
- } else {
- //### in here we should check whether the area of the
- // triangle formed between pt1/pt2/pt3 is smaller
- // or equal to 0 and then do iterative flattening
- // if not we should fallback and do the recursive
- // flattening.
- flattenBezierWithoutInflections(tmpBez, p);
- }
- } else if (t2plus > 0) {
- p->append(QPointF(x1, y1));
- if (t2plus < 1) {
- splitBezierAt(tmpBez, t2plus, &left, &bez2);
- flattenBezierWithoutInflections(bez2, p);
- }
- } else {
- flattenBezierWithoutInflections(tmpBez, p);
- }
- } else {
- QBezier bez = *this;
- flattenBezierWithoutInflections(bez, p);
- }
-
- p->append(QPointF(x4, y4));
-}
-
QT_END_NAMESPACE
diff --git a/src/gui/painting/qbezier_p.h b/src/gui/painting/qbezier_p.h
index 846635f..18ec116 100644
--- a/src/gui/painting/qbezier_p.h
+++ b/src/gui/painting/qbezier_p.h
@@ -79,10 +79,9 @@ public:
inline QPointF derivedAt(qreal t) const;
inline QPointF secondDerivedAt(qreal t) const;
- QPolygonF toPolygon() const;
- void addToPolygon(QPolygonF *p) const;
- void addToPolygonIterative(QPolygonF *p) const;
- void addToPolygonMixed(QPolygonF *p) const;
+ QPolygonF toPolygon(qreal bezier_flattening_threshold = 0.5) const;
+ void addToPolygon(QPolygonF *p, qreal bezier_flattening_threshold = 0.5) const;
+
QRectF bounds() const;
qreal length(qreal error = 0.01) const;
void addIfClose(qreal *length, qreal error) const;
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 08d5572..37d7fa3 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -133,7 +133,7 @@ QT_BEGIN_NAMESPACE
QColor is platform and device independent. The QColormap class
maps the color to the hardware.
- For more information about painting in general, see \l{The Paint
+ For more information about painting in general, see the \l{Paint
System} documentation.
\tableofcontents
@@ -2523,7 +2523,7 @@ QDebug operator<<(QDebug dbg, const QColor &c)
Writes the \a color to the \a stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &stream, const QColor &color)
{
@@ -2559,7 +2559,7 @@ QDataStream &operator<<(QDataStream &stream, const QColor &color)
Reads the \a color from the \a stream.
- \sa { Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &stream, QColor &color)
{
diff --git a/src/gui/painting/qdatabuffer_p.h b/src/gui/painting/qdatabuffer_p.h
index bc5f1ef..8f8544f 100644
--- a/src/gui/painting/qdatabuffer_p.h
+++ b/src/gui/painting/qdatabuffer_p.h
@@ -60,16 +60,20 @@ QT_BEGIN_NAMESPACE
template <typename Type> class QDataBuffer
{
public:
- QDataBuffer(int res = 64)
+ QDataBuffer(int res)
{
capacity = res;
- buffer = (Type*) qMalloc(capacity * sizeof(Type));
+ if (res)
+ buffer = (Type*) qMalloc(capacity * sizeof(Type));
+ else
+ buffer = 0;
siz = 0;
}
~QDataBuffer()
{
- qFree(buffer);
+ if (buffer)
+ qFree(buffer);
}
inline void reset() { siz = 0; }
@@ -104,6 +108,8 @@ public:
inline void reserve(int size) {
if (size > capacity) {
+ if (capacity == 0)
+ capacity = 1;
while (capacity < size)
capacity *= 2;
buffer = (Type*) qRealloc(buffer, capacity * sizeof(Type));
@@ -112,7 +118,12 @@ public:
inline void shrink(int size) {
capacity = size;
- buffer = (Type*) qRealloc(buffer, capacity * sizeof(Type));
+ if (size)
+ buffer = (Type*) qRealloc(buffer, capacity * sizeof(Type));
+ else {
+ qFree(buffer);
+ buffer = 0;
+ }
}
inline void swap(QDataBuffer<Type> &other) {
diff --git a/src/gui/painting/qdrawutil.cpp b/src/gui/painting/qdrawutil.cpp
index a62f06b..3ce95ef 100644
--- a/src/gui/painting/qdrawutil.cpp
+++ b/src/gui/painting/qdrawutil.cpp
@@ -1137,6 +1137,13 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
xTarget.resize(columns + 1);
yTarget.resize(rows + 1);
+ bool oldAA = painter->testRenderHint(QPainter::Antialiasing);
+ if (painter->paintEngine()->type() != QPaintEngine::OpenGL
+ && painter->paintEngine()->type() != QPaintEngine::OpenGL2
+ && oldAA && painter->combinedTransform().type() != QTransform::TxNone) {
+ painter->setRenderHint(QPainter::Antialiasing, false);
+ }
+
xTarget[0] = targetRect.left();
xTarget[1] = targetCenterLeft;
xTarget[columns - 1] = targetCenterRight;
@@ -1342,6 +1349,9 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
painter->drawPixmapFragments(opaqueData.data(), opaqueData.size(), pixmap, QPainter::OpaqueHint);
if (translucentData.size())
painter->drawPixmapFragments(translucentData.data(), translucentData.size(), pixmap);
+
+ if (oldAA)
+ painter->setRenderHint(QPainter::Antialiasing, true);
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp
index 00f32f7..7746316 100644
--- a/src/gui/painting/qmatrix.cpp
+++ b/src/gui/painting/qmatrix.cpp
@@ -103,7 +103,7 @@ QT_BEGIN_NAMESPACE
coordinate system. The standard coordinate system of a
QPaintDevice has its origin located at the top-left position. The
\e x values increase to the right; \e y values increase
- downward. For a complete description, see the \l {The Coordinate
+ downward. For a complete description, see the \l {Coordinate
System}{coordinate system} documentation.
QPainter has functions to translate, scale, shear and rotate the
@@ -176,7 +176,7 @@ QT_BEGIN_NAMESPACE
\snippet doc/src/snippets/matrix/matrix.cpp 2
\endtable
- \sa QPainter, QTransform, {The Coordinate System},
+ \sa QPainter, QTransform, {Coordinate System},
{demos/affine}{Affine Transformations Demo}, {Transformations Example}
*/
@@ -1135,7 +1135,7 @@ Q_GUI_EXPORT QPainterPath operator *(const QPainterPath &p, const QMatrix &m)
Writes the given \a matrix to the given \a stream and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QMatrix &m)
@@ -1161,7 +1161,7 @@ QDataStream &operator<<(QDataStream &s, const QMatrix &m)
Reads the given \a matrix from the given \a stream and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QMatrix &m)
diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp
index ad0c2eb..1b01960 100644
--- a/src/gui/painting/qoutlinemapper.cpp
+++ b/src/gui/painting/qoutlinemapper.cpp
@@ -154,7 +154,8 @@ QT_FT_Outline *QOutlineMapper::convertPath(const QVectorPath &path)
// ### We can kill this copying and just use the buffer straight...
m_elements.resize(count);
- memcpy(m_elements.data(), path.points(), count* sizeof(QPointF));
+ if (count)
+ memcpy(m_elements.data(), path.points(), count* sizeof(QPointF));
m_element_types.resize(0);
}
diff --git a/src/gui/painting/qoutlinemapper_p.h b/src/gui/painting/qoutlinemapper_p.h
index d0ce1a9..39b7593 100644
--- a/src/gui/painting/qoutlinemapper_p.h
+++ b/src/gui/painting/qoutlinemapper_p.h
@@ -87,8 +87,15 @@ const int QT_RASTER_COORD_LIMIT = 32767;
class QOutlineMapper
{
public:
- QOutlineMapper()
- : m_round_coords(false)
+ QOutlineMapper() :
+ m_element_types(0),
+ m_elements(0),
+ m_elements_dev(0),
+ m_points(0),
+ m_tags(0),
+ m_contours(0),
+ m_polygon_dev(0),
+ m_round_coords(false)
{
}
diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp
index 14ba94e..e5323d8 100644
--- a/src/gui/painting/qpaintengine_mac.cpp
+++ b/src/gui/painting/qpaintengine_mac.cpp
@@ -1390,7 +1390,11 @@ QCoreGraphicsPaintEngine::updateRenderHints(QPainter::RenderHints hints)
CGContextSetInterpolationQuality(d->hd, (hints & QPainter::SmoothPixmapTransform) ?
kCGInterpolationHigh : kCGInterpolationNone);
}
- CGContextSetShouldSmoothFonts(d->hd, hints & QPainter::TextAntialiasing);
+ bool textAntialiasing = (hints & QPainter::TextAntialiasing) == QPainter::TextAntialiasing;
+ if (!textAntialiasing || d->disabledSmoothFonts) {
+ d->disabledSmoothFonts = !textAntialiasing;
+ CGContextSetShouldSmoothFonts(d->hd, textAntialiasing);
+ }
}
/*
diff --git a/src/gui/painting/qpaintengine_mac_p.h b/src/gui/painting/qpaintengine_mac_p.h
index c9ab419..940b2bc 100644
--- a/src/gui/painting/qpaintengine_mac_p.h
+++ b/src/gui/painting/qpaintengine_mac_p.h
@@ -148,7 +148,7 @@ class QCoreGraphicsPaintEnginePrivate : public QPaintEnginePrivate
Q_DECLARE_PUBLIC(QCoreGraphicsPaintEngine)
public:
QCoreGraphicsPaintEnginePrivate()
- : hd(0), shading(0), stackCount(0), complexXForm(false)
+ : hd(0), shading(0), stackCount(0), complexXForm(false), disabledSmoothFonts(false)
{
}
@@ -168,6 +168,7 @@ public:
CGShadingRef shading;
int stackCount;
bool complexXForm;
+ bool disabledSmoothFonts;
enum { CosmeticNone, CosmeticTransformPath, CosmeticSetPenWidth } cosmeticPen;
// pixel and cosmetic pen size in user coordinates.
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 9148ac2..6f395f6 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -251,6 +251,11 @@ static void qt_debug_path(const QPainterPath &path)
}
#endif
+QRasterPaintEnginePrivate::QRasterPaintEnginePrivate() :
+ QPaintEngineExPrivate(),
+ cachedLines(0)
+{
+}
/*!
@@ -336,17 +341,6 @@ void QRasterPaintEngine::init()
d->hdc = 0;
#endif
- d->rasterPoolSize = 8192;
- d->rasterPoolBase =
-#if defined(Q_WS_WIN64)
- // We make use of setjmp and longjmp in qgrayraster.c which requires
- // 16-byte alignment, hence we hardcode this requirement here..
- (unsigned char *) _aligned_malloc(d->rasterPoolSize, sizeof(void*) * 2);
-#else
- (unsigned char *) malloc(d->rasterPoolSize);
-#endif
- Q_CHECK_PTR(d->rasterPoolBase);
-
// The antialiasing raster.
d->grayRaster.reset(new QT_FT_Raster);
Q_CHECK_PTR(d->grayRaster.data());
@@ -354,8 +348,6 @@ void QRasterPaintEngine::init()
QT_THROW(std::bad_alloc()); // an error creating the raster is caused by a bad malloc
- qt_ft_grays_raster.raster_reset(*d->grayRaster.data(), d->rasterPoolBase, d->rasterPoolSize);
-
d->rasterizer.reset(new QRasterizer);
d->rasterBuffer.reset(new QRasterBuffer());
d->outlineMapper.reset(new QOutlineMapper);
@@ -437,12 +429,6 @@ QRasterPaintEngine::~QRasterPaintEngine()
{
Q_D(QRasterPaintEngine);
-#if defined(Q_WS_WIN64)
- _aligned_free(d->rasterPoolBase);
-#else
- free(d->rasterPoolBase);
-#endif
-
qt_ft_grays_raster.raster_done(*d->grayRaster.data());
}
@@ -4090,6 +4076,22 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
return;
}
+ const int rasterPoolInitialSize = 8192;
+ int rasterPoolSize = rasterPoolInitialSize;
+ unsigned char *rasterPoolBase;
+#if defined(Q_WS_WIN64)
+ rasterPoolBase =
+ // We make use of setjmp and longjmp in qgrayraster.c which requires
+ // 16-byte alignment, hence we hardcode this requirement here..
+ (unsigned char *) _aligned_malloc(rasterPoolSize, sizeof(void*) * 2);
+#else
+ unsigned char rasterPoolOnStack[rasterPoolInitialSize];
+ rasterPoolBase = rasterPoolOnStack;
+#endif
+ Q_CHECK_PTR(rasterPoolBase);
+
+ qt_ft_grays_raster.raster_reset(*grayRaster.data(), rasterPoolBase, rasterPoolSize);
+
void *data = userData;
QT_FT_BBox clip_box = { deviceRect.x(),
@@ -4122,13 +4124,14 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
int new_size = rasterPoolSize * 2;
if (new_size > 1024 * 1024) {
qWarning("QPainter: Rasterization of primitive failed");
- return;
+ break;
}
#if defined(Q_WS_WIN64)
_aligned_free(rasterPoolBase);
#else
- free(rasterPoolBase);
+ if (rasterPoolBase != rasterPoolOnStack) // initially on the stack
+ free(rasterPoolBase);
#endif
rasterPoolSize = new_size;
@@ -4149,6 +4152,13 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
done = true;
}
}
+
+#if defined(Q_WS_WIN64)
+ _aligned_free(rasterPoolBase);
+#else
+ if (rasterPoolBase != rasterPoolOnStack) // initially on the stack
+ free(rasterPoolBase);
+#endif
}
void QRasterPaintEnginePrivate::recalculateFastImages()
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h
index 55eb82e..1016f8d 100644
--- a/src/gui/painting/qpaintengine_raster_p.h
+++ b/src/gui/painting/qpaintengine_raster_p.h
@@ -300,6 +300,7 @@ QRasterPaintEnginePrivate : public QPaintEngineExPrivate
{
Q_DECLARE_PUBLIC(QRasterPaintEngine)
public:
+ QRasterPaintEnginePrivate();
void rasterizeLine_dashed(QLineF line, qreal width,
int *dashIndex, qreal *dashOffset, bool *inDash);
@@ -354,8 +355,6 @@ public:
QScopedPointer<QDashStroker> dashStroker;
QScopedPointer<QT_FT_Raster> grayRaster;
- unsigned long rasterPoolSize;
- unsigned char *rasterPoolBase;
QDataBuffer<QLineF> cachedLines;
QSpanData image_filler;
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index da48fcb..aef8b80 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -315,7 +315,7 @@ static Picture getPatternFill(int screen, const QBrush &b)
return X11->pattern_fills[i].picture;
}
// none found, replace one
- int i = rand() % 16;
+ int i = qrand() % 16;
if (X11->pattern_fills[i].screen != screen && X11->pattern_fills[i].picture) {
XRenderFreePicture (X11->display, X11->pattern_fills[i].picture);
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index a78cafb..ff82d59 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -149,6 +149,7 @@ QDebug Q_GUI_EXPORT &operator<<(QDebug &s, const QVectorPath &path)
struct StrokeHandler {
+ StrokeHandler(int reserve) : pts(reserve), types(reserve) {}
QDataBuffer<qreal> pts;
QDataBuffer<QPainterPath::ElementType> types;
};
@@ -394,7 +395,7 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
return;
if (!d->strokeHandler) {
- d->strokeHandler = new StrokeHandler;
+ d->strokeHandler = new StrokeHandler(path.elementCount()+4);
d->stroker.setMoveToHook(qpaintengineex_moveTo);
d->stroker.setLineToHook(qpaintengineex_lineTo);
d->stroker.setCubicToHook(qpaintengineex_cubicTo);
@@ -460,6 +461,7 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
// change the current transform. Normal transformed,
// non-cosmetic pens will be transformed as part of fill
// later, so they are also covered here..
+ d->activeStroker->setCurveThresholdFromTransform(state()->matrix);
d->activeStroker->begin(d->strokeHandler);
if (types) {
while (points < lastPoint) {
@@ -517,6 +519,7 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
QPainterPath painterPath = state()->matrix.map(path.convertToPainterPath());
d->activeStroker->strokePath(painterPath, d->strokeHandler, QTransform());
} else {
+ d->activeStroker->setCurveThresholdFromTransform(state()->matrix);
d->activeStroker->begin(d->strokeHandler);
if (types) {
while (points < lastPoint) {
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index fbeb6e6..dd3584a 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -970,7 +970,7 @@ void QPainterPrivate::updateState(QPainterState *newState)
devices. If the painter is active, device() returns the paint
device on which the painter paints, and paintEngine() returns the
paint engine that the painter is currently operating on. For more
- information, see \l {The Paint System} documentation.
+ information, see the \l {Paint System}.
Sometimes it is desirable to make someone else paint on an unusual
QPaintDevice. QPainter supports a static function to do this,
@@ -1015,7 +1015,7 @@ void QPainterPrivate::updateState(QPainterState *newState)
\o viewport(), window(), worldTransform() make up the painter's coordinate
transformation system. For more information, see the \l
- {Coordinate Transformations} section and the \l {The Coordinate
+ {Coordinate Transformations} section and the \l {Coordinate
System} documentation.
\o hasClipping() tells whether the painter clips at all. (The paint
@@ -1222,7 +1222,7 @@ void QPainterPrivate::updateState(QPainterState *newState)
All the tranformation operations operate on the transformation
worldTransform(). A matrix transforms a point in the plane to another
point. For more information about the transformation matrix, see
- the \l {The Coordinate System} and QTransform documentation.
+ the \l {Coordinate System} and QTransform documentation.
The setWorldTransform() function can replace or add to the currently
set worldTransform(). The resetTransform() function resets any
@@ -1244,7 +1244,7 @@ void QPainterPrivate::updateState(QPainterState *newState)
logical coordinates, and the worldTransform() is identical with the
transformation matrix.
- See also \l {The Coordinate System} documentation.
+ See also \l {Coordinate System}
\section1 Clipping
@@ -2880,8 +2880,7 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op)
functions is safe.
For more information about the coordinate system, transformations
- and window-viewport conversion, see \l {The Coordinate System}
- documentation.
+ and window-viewport conversion, see \l {Coordinate System}.
\sa setWorldTransform(), QTransform
*/
@@ -2901,7 +2900,7 @@ void QPainter::setWorldMatrix(const QMatrix &matrix, bool combine)
preserve the properties of perspective transformations.
\sa {QPainter#Coordinate Transformations}{Coordinate Transformations},
- {The Coordinate System}
+ {Coordinate System}
*/
const QMatrix &QPainter::worldMatrix() const
@@ -3044,7 +3043,7 @@ void QPainter::setWorldMatrixEnabled(bool enable)
Returns true if world transformation is enabled; otherwise returns
false.
- \sa setWorldMatrixEnabled(), worldTransform(), {The Coordinate System}
+ \sa setWorldMatrixEnabled(), worldTransform(), {Coordinate System}
*/
bool QPainter::worldMatrixEnabled() const
@@ -3386,7 +3385,7 @@ void QPainter::drawPath(const QPainterPath &path)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 6
\endtable
- \sa drawLines(), drawPolyline(), {The Coordinate System}
+ \sa drawLines(), drawPolyline(), {Coordinate System}
*/
/*!
@@ -3433,7 +3432,7 @@ void QPainter::drawPath(const QPainterPath &path)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 7
\endtable
- \sa drawRects(), drawPolygon(), {The Coordinate System}
+ \sa drawRects(), drawPolygon(), {Coordinate System}
*/
/*!
@@ -3597,7 +3596,7 @@ void QPainter::drawRects(const QRect *rects, int rectCount)
Draws a single point at the given \a position using the current
pen's color.
- \sa {The Coordinate System}
+ \sa {Coordinate System}
*/
/*!
@@ -3619,7 +3618,7 @@ void QPainter::drawRects(const QRect *rects, int rectCount)
Draws the first \a pointCount points in the array \a points using
the current pen's color.
- \sa {The Coordinate System}
+ \sa {Coordinate System}
*/
void QPainter::drawPoints(const QPointF *points, int pointCount)
{
@@ -4225,7 +4224,7 @@ void QPainter::drawRoundRect(const QRectF &r, int xRnd, int yRnd)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 9
\endtable
- \sa drawPie(), {The Coordinate System}
+ \sa drawPie(), {Coordinate System}
*/
void QPainter::drawEllipse(const QRectF &r)
{
@@ -4355,7 +4354,7 @@ void QPainter::drawEllipse(const QRect &r)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 10
\endtable
- \sa drawPie(), drawChord(), {The Coordinate System}
+ \sa drawPie(), drawChord(), {Coordinate System}
*/
void QPainter::drawArc(const QRectF &r, int a, int alen)
@@ -4419,7 +4418,7 @@ void QPainter::drawArc(const QRectF &r, int a, int alen)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 11
\endtable
- \sa drawEllipse(), drawChord(), {The Coordinate System}
+ \sa drawEllipse(), drawChord(), {Coordinate System}
*/
void QPainter::drawPie(const QRectF &r, int a, int alen)
{
@@ -4488,7 +4487,7 @@ void QPainter::drawPie(const QRectF &r, int a, int alen)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 12
\endtable
- \sa drawArc(), drawPie(), {The Coordinate System}
+ \sa drawArc(), drawPie(), {Coordinate System}
*/
void QPainter::drawChord(const QRectF &r, int a, int alen)
{
@@ -4779,7 +4778,7 @@ void QPainter::drawLines(const QPoint *pointPairs, int lineCount)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 13
\endtable
- \sa drawLines(), drawPolygon(), {The Coordinate System}
+ \sa drawLines(), drawPolygon(), {Coordinate System}
*/
void QPainter::drawPolyline(const QPointF *points, int pointCount)
{
@@ -4918,7 +4917,7 @@ void QPainter::drawPolyline(const QPoint *points, int pointCount)
\l{Qt::FillRule} for a more detailed description of these fill
rules.
- \sa drawConvexPolygon(), drawPolyline(), {The Coordinate System}
+ \sa drawConvexPolygon(), drawPolyline(), {Coordinate System}
*/
void QPainter::drawPolygon(const QPointF *points, int pointCount, Qt::FillRule fillRule)
{
@@ -5069,7 +5068,7 @@ void QPainter::drawPolygon(const QPoint *points, int pointCount, Qt::FillRule fi
On some platforms (e.g. X11), the drawConvexPolygon() function can
be faster than the drawPolygon() function.
- \sa drawPolygon(), drawPolyline(), {The Coordinate System}
+ \sa drawPolygon(), drawPolyline(), {Coordinate System}
*/
/*!
@@ -5977,12 +5976,17 @@ void QPainter::drawText(const QPointF &p, const QString &str, int tf, int justif
gf.glyphs = engine.shapedGlyphs(&si);
gf.chars = engine.layoutData->string.unicode() + si.position;
gf.num_chars = engine.length(item);
- gf.width = si.width;
+ if (engine.forceJustification) {
+ for (int j=0; j<gf.glyphs.numGlyphs; ++j)
+ gf.width += gf.glyphs.effectiveAdvance(j);
+ } else {
+ gf.width = si.width;
+ }
gf.logClusters = engine.logClusters(&si);
drawTextItem(QPointF(x.toReal(), p.y()), gf);
- x += si.width;
+ x += gf.width;
}
}
@@ -7107,7 +7111,7 @@ bool QPainter::viewTransformEnabled() const
The default window rectangle is the same as the device's
rectangle.
- \sa window(), viewTransformEnabled(), {The Coordinate
+ \sa window(), viewTransformEnabled(), {Coordinate
System#Window-Viewport Conversion}{Window-Viewport Conversion}
*/
@@ -7171,7 +7175,7 @@ QRect QPainter::window() const
The default viewport rectangle is the same as the device's
rectangle.
- \sa viewport(), viewTransformEnabled() {The Coordinate
+ \sa viewport(), viewTransformEnabled() {Coordinate
System#Window-Viewport Conversion}{Window-Viewport Conversion}
*/
@@ -7255,7 +7259,7 @@ QRect QPainter::viewport() const
Enables view transformations if \a enable is true, or disables
view transformations if \a enable is false.
- \sa viewTransformEnabled(), {The Coordinate System#Window-Viewport
+ \sa viewTransformEnabled(), {Coordinate System#Window-Viewport
Conversion}{Window-Viewport Conversion}
*/
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index f5a698e..ffd0d5c 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -2307,7 +2307,7 @@ QPainterPath &QPainterPath::operator-=(const QPainterPath &other)
Writes the given painter \a path to the given \a stream, and
returns a reference to the \a stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QPainterPath &p)
{
@@ -2334,7 +2334,7 @@ QDataStream &operator<<(QDataStream &s, const QPainterPath &p)
Reads a painter path from the given \a stream into the specified \a path,
and returns a reference to the \a stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QPainterPath &p)
{
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index c910024..78553c9 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -278,7 +278,8 @@ private:
};
SegmentTree::SegmentTree(QPathSegments &segments)
- : m_segments(segments)
+ : m_segments(segments),
+ m_intersections(0)
{
m_bounds.x1 = qt_inf();
m_bounds.y1 = qt_inf();
@@ -806,7 +807,7 @@ void QWingedEdge::intersectAndAdd()
for (int i = 0; i < m_segments.points(); ++i)
addVertex(m_segments.pointAt(i));
- QDataBuffer<QPathSegments::Intersection> intersections;
+ QDataBuffer<QPathSegments::Intersection> intersections(m_segments.segments());
for (int i = 0; i < m_segments.segments(); ++i) {
intersections.reset();
@@ -857,11 +858,17 @@ void QWingedEdge::intersectAndAdd()
}
}
-QWingedEdge::QWingedEdge()
+QWingedEdge::QWingedEdge() :
+ m_edges(0),
+ m_vertices(0),
+ m_segments(0)
{
}
-QWingedEdge::QWingedEdge(const QPainterPath &subject, const QPainterPath &clip)
+QWingedEdge::QWingedEdge(const QPainterPath &subject, const QPainterPath &clip) :
+ m_edges(subject.length()),
+ m_vertices(subject.length()),
+ m_segments(subject.length())
{
m_segments.setPath(subject);
m_segments.addPath(clip);
@@ -1414,9 +1421,9 @@ bool QPathClipper::intersect()
else if (clipIsRect)
return subjectPath.intersects(r2);
- QPathSegments a;
+ QPathSegments a(subjectPath.length());
a.setPath(subjectPath);
- QPathSegments b;
+ QPathSegments b(clipPath.length());
b.setPath(clipPath);
QIntersectionFinder finder;
@@ -1459,9 +1466,9 @@ bool QPathClipper::contains()
if (clipIsRect)
return subjectPath.contains(r2);
- QPathSegments a;
+ QPathSegments a(subjectPath.length());
a.setPath(subjectPath);
- QPathSegments b;
+ QPathSegments b(clipPath.length());
b.setPath(clipPath);
QIntersectionFinder finder;
diff --git a/src/gui/painting/qpathclipper_p.h b/src/gui/painting/qpathclipper_p.h
index 7962400..fab618d 100644
--- a/src/gui/painting/qpathclipper_p.h
+++ b/src/gui/painting/qpathclipper_p.h
@@ -199,7 +199,7 @@ public:
};
- QPathSegments();
+ QPathSegments(int reserve);
void setPath(const QPainterPath &path);
void addPath(const QPainterPath &path);
@@ -345,7 +345,10 @@ inline QPathVertex::operator QPointF() const
return QPointF(x, y);
}
-inline QPathSegments::QPathSegments()
+inline QPathSegments::QPathSegments(int reserve) :
+ m_points(reserve),
+ m_segments(reserve),
+ m_intersections(reserve)
{
}
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 44049c0..6e02435 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -971,12 +971,17 @@ void QPdfBaseEngine::drawPoints (const QPointF *points, int pointCount)
if (!points)
return;
+ Q_D(QPdfBaseEngine);
QPainterPath p;
for (int i=0; i!=pointCount;++i) {
p.moveTo(points[i]);
p.lineTo(points[i] + QPointF(0, 0.001));
}
+
+ bool hadBrush = d->hasBrush;
+ d->hasBrush = false;
drawPath(p);
+ d->hasBrush = hadBrush;
}
void QPdfBaseEngine::drawLines (const QLineF *lines, int lineCount)
@@ -984,12 +989,16 @@ void QPdfBaseEngine::drawLines (const QLineF *lines, int lineCount)
if (!lines)
return;
+ Q_D(QPdfBaseEngine);
QPainterPath p;
for (int i=0; i!=lineCount;++i) {
p.moveTo(lines[i].p1());
p.lineTo(lines[i].p2());
}
+ bool hadBrush = d->hasBrush;
+ d->hasBrush = false;
drawPath(p);
+ d->hasBrush = hadBrush;
}
void QPdfBaseEngine::drawRects (const QRectF *rects, int rectCount)
diff --git a/src/gui/painting/qpolygon.cpp b/src/gui/painting/qpolygon.cpp
index b68314f..2fb52b5 100644
--- a/src/gui/painting/qpolygon.cpp
+++ b/src/gui/painting/qpolygon.cpp
@@ -719,7 +719,7 @@ QPolygon::operator QVariant() const
Writes the given \a polygon to the given \a stream, and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QPolygon &a)
{
@@ -735,7 +735,7 @@ QDataStream &operator<<(QDataStream &s, const QPolygon &a)
Reads a polygon from the given \a stream into the given \a
polygon, and returns a reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QPolygon &a)
{
@@ -755,7 +755,7 @@ QDataStream &operator>>(QDataStream &s, QPolygon &a)
Writes the given \a polygon to the given \a stream, and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QPolygonF &a)
@@ -776,7 +776,7 @@ QDataStream &operator<<(QDataStream &s, const QPolygonF &a)
Reads a polygon from the given \a stream into the given \a
polygon, and returns a reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QPolygonF &a)
diff --git a/src/gui/painting/qpolygonclipper_p.h b/src/gui/painting/qpolygonclipper_p.h
index 1b4cbb3..cdaac1c 100644
--- a/src/gui/painting/qpolygonclipper_p.h
+++ b/src/gui/painting/qpolygonclipper_p.h
@@ -62,7 +62,8 @@ QT_BEGIN_NAMESPACE
template <typename InType, typename OutType, typename CastType> class QPolygonClipper
{
public:
- QPolygonClipper()
+ QPolygonClipper() :
+ buffer1(0), buffer2(0)
{
x1 = y1 = x2 = y2 = 0;
}
diff --git a/src/gui/painting/qprintengine_pdf.cpp b/src/gui/painting/qprintengine_pdf.cpp
index b8bf15e..2955e39 100644
--- a/src/gui/painting/qprintengine_pdf.cpp
+++ b/src/gui/painting/qprintengine_pdf.cpp
@@ -931,29 +931,16 @@ void QPdfEnginePrivate::writeHeader()
void QPdfEnginePrivate::writeInfo()
{
info = addXrefEntry(-1);
-
- // The 'text string' type in PDF is encoded either as PDFDocEncoding, or
- // Unicode UTF-16 with a Unicode byte order mark as the first character
- // (0xfeff), with the high-order byte first.
- QByteArray array("<<\n/Title (\xfe\xff");
- const ushort *utf16Title = title.utf16();
- for (int i=0; i < title.size(); ++i) {
- array.append((*(utf16Title + i)) >> 8);
- array.append((*(utf16Title + i)) & 0xff);
- }
- array.append(")\n/Creator (\xfe\xff");
- const ushort *utf16Creator = creator.utf16();
- for (int i=0; i < creator.size(); ++i) {
- array.append((*(utf16Creator + i)) >> 8);
- array.append((*(utf16Creator + i)) & 0xff);
- }
- array.append(")\n/Producer (Qt " QT_VERSION_STR " (C) 2010 Nokia Corporation and/or its subsidiary(-ies))\n");
- write(array);
-
+ xprintf("<<\n/Title ");
+ printString(title);
+ xprintf("\n/Creator ");
+ printString(creator);
+ xprintf("\n/Producer ");
+ printString(QString::fromLatin1("Qt " QT_VERSION_STR " (C) 2010 Nokia Corporation and/or its subsidiary(-ies)"));
QDateTime now = QDateTime::currentDateTime().toUTC();
QTime t = now.time();
QDate d = now.date();
- xprintf("/CreationDate (D:%d%02d%02d%02d%02d%02d)\n",
+ xprintf("\n/CreationDate (D:%d%02d%02d%02d%02d%02d)\n",
d.year(),
d.month(),
d.day(),
@@ -1230,6 +1217,25 @@ int QPdfEnginePrivate::addXrefEntry(int object, bool printostr)
return object;
}
+void QPdfEnginePrivate::printString(const QString &string) {
+ // The 'text string' type in PDF is encoded either as PDFDocEncoding, or
+ // Unicode UTF-16 with a Unicode byte order mark as the first character
+ // (0xfeff), with the high-order byte first.
+ QByteArray array("(\xfe\xff");
+ const ushort *utf16 = string.utf16();
+
+ for (int i=0; i < string.size(); ++i) {
+ char part[2] = {char((*(utf16 + i)) >> 8), char((*(utf16 + i)) & 0xff)};
+ for(int j=0; j < 2; ++j) {
+ if (part[j] == '(' || part[j] == ')' || part[j] == '\\')
+ array.append('\\');
+ array.append(part[j]);
+ }
+ }
+ array.append(")");
+ write(array);
+}
+
QT_END_NAMESPACE
#endif // QT_NO_PRINTER
diff --git a/src/gui/painting/qprintengine_pdf_p.h b/src/gui/painting/qprintengine_pdf_p.h
index cb6c59d..e0ca56f 100644
--- a/src/gui/painting/qprintengine_pdf_p.h
+++ b/src/gui/painting/qprintengine_pdf_p.h
@@ -170,6 +170,7 @@ private:
void writePage();
int addXrefEntry(int object, bool printostr = true);
+ void printString(const QString &string);
void xprintf(const char* fmt, ...);
inline void write(const QByteArray &data) {
stream->writeRawData(data.constData(), data.size());
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp
index 51d01c9..f8f8afb 100644
--- a/src/gui/painting/qrasterizer.cpp
+++ b/src/gui/painting/qrasterizer.cpp
@@ -198,9 +198,11 @@ public:
};
QScanConverter::QScanConverter()
- : m_alloc(0)
+ : m_lines(0)
+ , m_alloc(0)
, m_size(0)
, m_intersections(0)
+ , m_active(0)
{
}
@@ -310,6 +312,10 @@ struct QBoolToType
template <typename T>
void qScanConvert(QScanConverter &d, T allVertical)
{
+ if (!d.m_lines.size()) {
+ d.m_active.reset();
+ return;
+ }
qSort(d.m_lines.data(), d.m_lines.data() + d.m_lines.size(), QT_PREPEND_NAMESPACE(topOrder));
int line = 0;
for (int y = d.m_lines.first().top; y <= d.m_bottom; ++y) {
diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp
index e43544c..eabbd8a 100644
--- a/src/gui/painting/qstroker.cpp
+++ b/src/gui/painting/qstroker.cpp
@@ -120,8 +120,8 @@ private:
class QSubpathFlatIterator
{
public:
- QSubpathFlatIterator(const QDataBuffer<QStrokerOps::Element> *path)
- : m_path(path), m_pos(0), m_curve_index(-1) { }
+ QSubpathFlatIterator(const QDataBuffer<QStrokerOps::Element> *path, qreal threshold)
+ : m_path(path), m_pos(0), m_curve_index(-1), m_curve_threshold(threshold) { }
inline bool hasNext() const { return m_curve_index >= 0 || m_pos < m_path->size(); }
@@ -152,7 +152,7 @@ public:
QPointF(qt_fixed_to_real(m_path->at(m_pos+1).x),
qt_fixed_to_real(m_path->at(m_pos+1).y)),
QPointF(qt_fixed_to_real(m_path->at(m_pos+2).x),
- qt_fixed_to_real(m_path->at(m_pos+2).y))).toPolygon();
+ qt_fixed_to_real(m_path->at(m_pos+2).y))).toPolygon(m_curve_threshold);
m_curve_index = 1;
e.type = QPainterPath::LineToElement;
e.x = m_curve.at(0).x();
@@ -169,6 +169,7 @@ private:
int m_pos;
QPolygonF m_curve;
int m_curve_index;
+ qreal m_curve_threshold;
};
template <class Iterator> bool qt_stroke_side(Iterator *it, QStroker *stroker,
@@ -187,7 +188,12 @@ static inline qreal adapted_angle_on_x(const QLineF &line)
}
QStrokerOps::QStrokerOps()
- : m_customData(0), m_moveTo(0), m_lineTo(0), m_cubicTo(0)
+ : m_elements(0)
+ , m_curveThreshold(qt_real_to_fixed(0.25))
+ , m_customData(0)
+ , m_moveTo(0)
+ , m_lineTo(0)
+ , m_cubicTo(0)
{
}
@@ -195,7 +201,6 @@ QStrokerOps::~QStrokerOps()
{
}
-
/*!
Prepares the stroker. Call this function once before starting a
stroke by calling moveTo, lineTo or cubicTo.
@@ -238,6 +243,7 @@ void QStrokerOps::strokePath(const QPainterPath &path, void *customData, const Q
if (path.isEmpty())
return;
+ setCurveThresholdFromTransform(matrix);
begin(customData);
int count = path.elementCount();
if (matrix.isIdentity()) {
@@ -308,6 +314,8 @@ void QStrokerOps::strokePolygon(const QPointF *points, int pointCount, bool impl
{
if (!pointCount)
return;
+
+ setCurveThresholdFromTransform(matrix);
begin(data);
if (matrix.isIdentity()) {
moveTo(qt_real_to_fixed(points[0].x()), qt_real_to_fixed(points[0].y()));
@@ -348,6 +356,7 @@ void QStrokerOps::strokeEllipse(const QRectF &rect, void *data, const QTransform
}
}
+ setCurveThresholdFromTransform(matrix);
begin(data);
moveTo(qt_real_to_fixed(start.x()), qt_real_to_fixed(start.y()));
for (int i=0; i<12; i+=3) {
@@ -366,12 +375,10 @@ QStroker::QStroker()
{
m_strokeWidth = qt_real_to_fixed(1);
m_miterLimit = qt_real_to_fixed(2);
- m_curveThreshold = qt_real_to_fixed(0.25);
}
QStroker::~QStroker()
{
-
}
Qt::PenCapStyle QStroker::capForJoinMode(LineJoinMode mode)
@@ -1135,7 +1142,7 @@ void QDashStroker::processCurrentSubpath()
QPainterPath dashPath;
- QSubpathFlatIterator it(&m_elements);
+ QSubpathFlatIterator it(&m_elements, m_curveThreshold);
qfixed2d prev = it.next();
bool clipping = !m_clip_rect.isEmpty();
diff --git a/src/gui/painting/qstroker_p.h b/src/gui/painting/qstroker_p.h
index 3e622a8..d646135 100644
--- a/src/gui/painting/qstroker_p.h
+++ b/src/gui/painting/qstroker_p.h
@@ -124,6 +124,9 @@ typedef void (*qStrokerCubicToHook)(qfixed c1x, qfixed c1y,
qfixed ex, qfixed ey,
void *data);
+// qtransform.cpp
+Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale);
+
class Q_GUI_EXPORT QStrokerOps
{
public:
@@ -161,6 +164,16 @@ public:
QRectF clipRect() const { return m_clip_rect; }
void setClipRect(const QRectF &clip) { m_clip_rect = clip; }
+ void setCurveThresholdFromTransform(const QTransform &transform)
+ {
+ qreal scale;
+ qt_scaleForTransform(transform, &scale);
+ setCurveThreshold(scale == 0 ? qreal(0.5) : (qreal(0.5) / scale));
+ }
+
+ void setCurveThreshold(qfixed threshold) { m_curveThreshold = threshold; }
+ qfixed curveThreshold() const { return m_curveThreshold; }
+
protected:
inline void emitMoveTo(qfixed x, qfixed y);
inline void emitLineTo(qfixed x, qfixed y);
@@ -170,6 +183,7 @@ protected:
QDataBuffer<Element> m_elements;
QRectF m_clip_rect;
+ qfixed m_curveThreshold;
void *m_customData;
qStrokerMoveToHook m_moveTo;
@@ -208,9 +222,6 @@ public:
void setMiterLimit(qfixed length) { m_miterLimit = length; }
qfixed miterLimit() const { return m_miterLimit; }
- void setCurveThreshold(qfixed threshold) { m_curveThreshold = threshold; }
- qfixed curveThreshold() const { return m_curveThreshold; }
-
void joinPoints(qfixed x, qfixed y, const QLineF &nextLine, LineJoinMode join);
inline void emitMoveTo(qfixed x, qfixed y);
inline void emitLineTo(qfixed x, qfixed y);
@@ -227,7 +238,6 @@ protected:
qfixed m_strokeWidth;
qfixed m_miterLimit;
- qfixed m_curveThreshold;
LineJoinMode m_capStyle;
LineJoinMode m_joinStyle;
diff --git a/src/gui/painting/qtextureglyphcache_p.h b/src/gui/painting/qtextureglyphcache_p.h
index 390fe51..a818978 100644
--- a/src/gui/painting/qtextureglyphcache_p.h
+++ b/src/gui/painting/qtextureglyphcache_p.h
@@ -125,7 +125,7 @@ protected:
};
-class QImageTextureGlyphCache : public QTextureGlyphCache
+class Q_GUI_EXPORT QImageTextureGlyphCache : public QTextureGlyphCache
{
public:
QImageTextureGlyphCache(QFontEngineGlyphCache::Type type, const QTransform &matrix)
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index 80b7520..aaa241f 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -1545,12 +1545,19 @@ static inline bool lineTo_clipped(QPainterPath &path, const QTransform &transfor
return true;
}
+Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale);
static inline bool cubicTo_clipped(QPainterPath &path, const QTransform &transform, const QPointF &a, const QPointF &b, const QPointF &c, const QPointF &d, bool needsMoveTo)
{
// Convert projective xformed curves to line
// segments so they can be transformed more accurately
- QPolygonF segment = QBezier::fromPoints(a, b, c, d).toPolygon();
+
+ qreal scale;
+ qt_scaleForTransform(transform, &scale);
+
+ qreal curveThreshold = scale == 0 ? qreal(0.25) : (qreal(0.25) / scale);
+
+ QPolygonF segment = QBezier::fromPoints(a, b, c, d).toPolygon(curveThreshold);
for (int i = 0; i < segment.size() - 1; ++i)
if (lineTo_clipped(path, transform, segment.at(i), segment.at(i+1), needsMoveTo))
diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp
index 0f39b23..d9f7df0 100644
--- a/src/gui/styles/qcleanlooksstyle.cpp
+++ b/src/gui/styles/qcleanlooksstyle.cpp
@@ -1397,7 +1397,6 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o
dark.lighter(135), 60);
QColor highlight = option->palette.highlight().color();
- QColor highlightText = option->palette.highlightedText().color();
switch(element) {
case CE_RadioButton: //fall through
@@ -2723,7 +2722,6 @@ void QCleanlooksStyle::drawComplexControl(ComplexControl control, const QStyleOp
{
// Fill title bar gradient
QColor titlebarColor = QColor(active ? highlight: palette.background().color());
- QColor titleBarGradientStop(active ? highlight.darker(150): palette.background().color().darker(120));
QLinearGradient gradient(option->rect.center().x(), option->rect.top(),
option->rect.center().x(), option->rect.bottom());
@@ -2986,7 +2984,6 @@ void QCleanlooksStyle::drawComplexControl(ComplexControl control, const QStyleOp
painter->fillRect(option->rect, option->palette.background());
- QRect rect = scrollBar->rect;
QRect scrollBarSubLine = proxy()->subControlRect(control, scrollBar, SC_ScrollBarSubLine, widget);
QRect scrollBarAddLine = proxy()->subControlRect(control, scrollBar, SC_ScrollBarAddLine, widget);
QRect scrollBarSlider = proxy()->subControlRect(control, scrollBar, SC_ScrollBarSlider, widget);
@@ -3714,6 +3711,9 @@ int QCleanlooksStyle::pixelMetric(PixelMetric metric, const QStyleOption *option
{
int ret = -1;
switch (metric) {
+ case PM_ToolTipLabelFrameWidth:
+ ret = 2;
+ break;
case PM_ButtonDefaultIndicator:
ret = 0;
break;
diff --git a/src/gui/styles/qgtkpainter.cpp b/src/gui/styles/qgtkpainter.cpp
index 1f68f2f..79c53e9 100644
--- a/src/gui/styles/qgtkpainter.cpp
+++ b/src/gui/styles/qgtkpainter.cpp
@@ -47,6 +47,7 @@
// This class is primarily a wrapper around the gtk painter functions
// and takes care of converting all such calls into cached Qt pixmaps.
+#include <private/qstylehelper_p.h>
#include <QtGui/QWidget>
#include <QtGui/QStyleOption>
#include <QtGui/QPixmapCache>
@@ -155,8 +156,12 @@ static QString uniqueName(const QString &key, GtkStateType state, GtkShadowType
const QSize &size, GtkWidget *widget = 0)
{
// Note the widget arg should ideally use the widget path, though would compromise performance
- QString tmp = QString(QLS("%0-%1-%2-%3x%4-%5")).arg(key).arg(uint(state)).arg(shadow)
- .arg(size.width()).arg(size.height()).arg(quintptr(widget));
+ QString tmp = key
+ % HexString<uint>(state)
+ % HexString<uint>(shadow)
+ % HexString<uint>(size.width())
+ % HexString<uint>(size.height())
+ % HexString<quint64>(quint64(widget));
return tmp;
}
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index 9c61023..6c8d561 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -1163,7 +1163,6 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
if (const QStyleOptionTabBarBase *tbb
= qstyleoption_cast<const QStyleOptionTabBarBase *>(option)) {
QRect tabRect = tbb->rect;
- QRegion region(tabRect);
painter->save();
painter->setPen(QPen(option->palette.dark().color().dark(110), 0));
switch (tbb->shape) {
@@ -1245,8 +1244,6 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
else
alphaCornerColor = mergedColors(option->palette.background().color(), darkOutline);
- QPalette palette = option->palette;
-
switch (control) {
case CC_TitleBar:
@@ -1333,11 +1330,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
bool isEnabled = (comboBox->state & State_Enabled);
bool focus = isEnabled && (comboBox->state & State_HasFocus);
- QColor buttonShadow = option->palette.dark().color();
GtkStateType state = gtkPainter.gtkState(option);
int appears_as_list = !proxy()->styleHint(QStyle::SH_ComboBox_Popup, comboBox, widget);
- QPixmap cache;
- QString pixmapName;
QStyleOptionComboBox comboBoxCopy = *comboBox;
comboBoxCopy.rect = option->rect;
@@ -1345,8 +1339,6 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
QRect rect = option->rect;
QRect arrowButtonRect = proxy()->subControlRect(CC_ComboBox, &comboBoxCopy,
SC_ComboBoxArrow, widget);
- QRect editRect = proxy()->subControlRect(CC_ComboBox, &comboBoxCopy,
- SC_ComboBoxEditField, widget);
GtkShadowType shadow = (option->state & State_Sunken || option->state & State_On ) ?
GTK_SHADOW_IN : GTK_SHADOW_OUT;
@@ -1414,9 +1406,6 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
else if (option->state & State_MouseOver && comboBox->activeSubControls & SC_ComboBoxArrow)
buttonState = GTK_STATE_PRELIGHT;
- QRect buttonrect = QRect(gtkToggleButton->allocation.x, gtkToggleButton->allocation.y,
- gtkToggleButton->allocation.width, gtkToggleButton->allocation.height);
-
Q_ASSERT(gtkToggleButton);
gtkCachedPainter.paintBox( gtkToggleButton, "button", arrowButtonRect, buttonState,
shadow, gtkToggleButton->style, buttonPath.toString() +
@@ -1436,8 +1425,6 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
if (focus)
GTK_WIDGET_UNSET_FLAGS(gtkToggleButton, GTK_HAS_FOCUS);
- QHashableLatin1Literal buttonPath = comboBox->editable ? QHashableLatin1Literal("GtkComboBoxEntry.GtkToggleButton")
- : QHashableLatin1Literal("GtkComboBox.GtkToggleButton");
// Draw the separator between label and arrows
QHashableLatin1Literal vSeparatorPath = comboBox->editable
@@ -1643,6 +1630,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
style = scrollbarWidget->style;
gboolean trough_under_steppers = true;
gboolean trough_side_details = false;
+ gboolean activate_slider = false;
gboolean stepper_size = 14;
gint trough_border = 1;
if (!d->gtk_check_version(2, 10, 0)) {
@@ -1650,6 +1638,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
"trough-border", &trough_border,
"trough-side-details", &trough_side_details,
"trough-under-steppers", &trough_under_steppers,
+ "activate-slider", &activate_slider,
"stepper-size", &stepper_size, NULL);
}
if (trough_under_steppers) {
@@ -1695,6 +1684,9 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
if (!(option->state & State_Enabled))
state = GTK_STATE_INSENSITIVE;
+ else if (activate_slider &&
+ option->state & State_Sunken && (scrollBar->activeSubControls & SC_ScrollBarSlider))
+ state = GTK_STATE_ACTIVE;
else if (option->state & State_MouseOver && (scrollBar->activeSubControls & SC_ScrollBarSlider))
state = GTK_STATE_PRELIGHT;
@@ -1932,14 +1924,11 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
QRect groove = proxy()->subControlRect(CC_Slider, option, SC_SliderGroove, widget);
QRect handle = proxy()->subControlRect(CC_Slider, option, SC_SliderHandle, widget);
- QRect ticks = proxy()->subControlRect(CC_Slider, option, SC_SliderTickmarks, widget);
bool horizontal = slider->orientation == Qt::Horizontal;
bool ticksAbove = slider->tickPosition & QSlider::TicksAbove;
bool ticksBelow = slider->tickPosition & QSlider::TicksBelow;
- QColor activeHighlight = option->palette.color(QPalette::Normal, QPalette::Highlight);
- QPixmap cache;
QBrush oldBrush = painter->brush();
QPen oldPen = painter->pen();
@@ -1948,6 +1937,8 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
QColor highlightAlpha(Qt::white);
highlightAlpha.setAlpha(80);
+ QGtkStylePrivate::gtk_widget_set_direction(hScaleWidget, slider->upsideDown ?
+ GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
GtkWidget *scaleWidget = horizontal ? hScaleWidget : vScaleWidget;
style = scaleWidget->style;
@@ -1981,11 +1972,21 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom
QRect lowerGroove = grooveRect;
if (horizontal) {
- upperGroove.setLeft(handle.center().x());
- lowerGroove.setRight(handle.center().x());
+ if (slider->upsideDown) {
+ lowerGroove.setLeft(handle.center().x());
+ upperGroove.setRight(handle.center().x());
+ } else {
+ upperGroove.setLeft(handle.center().x());
+ lowerGroove.setRight(handle.center().x());
+ }
} else {
- upperGroove.setBottom(handle.center().y());
- lowerGroove.setTop(handle.center().y());
+ if (!slider->upsideDown) {
+ lowerGroove.setBottom(handle.center().y());
+ upperGroove.setTop(handle.center().y());
+ } else {
+ upperGroove.setBottom(handle.center().y());
+ lowerGroove.setTop(handle.center().y());
+ }
}
gtkPainter.paintBox( scaleWidget, "trough-upper", upperGroove, state,
@@ -2543,7 +2544,6 @@ void QGtkStyle::drawControl(ControlElement element,
d->gtkWidget("GtkMenu.GtkMenuItem");
style = gtkPainter.getStyle(gtkMenuItem);
- QColor borderColor = option->palette.background().color().darker(160);
QColor shadow = option->palette.dark().color();
if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
@@ -2768,8 +2768,6 @@ void QGtkStyle::drawControl(ControlElement element,
// Arrow
if (menuItem->menuItemType == QStyleOptionMenuItem::SubMenu) {// draw sub menu arrow
- QPoint buttonShift(pixelMetric(PM_ButtonShiftHorizontal, option, widget),
- proxy()->pixelMetric(PM_ButtonShiftVertical, option, widget));
QFontMetrics fm(menuitem->font);
int arrow_size = fm.ascent() + fm.descent() - 2 * gtkMenuItem->style->ythickness;
@@ -3116,7 +3114,6 @@ QRect QGtkStyle::subControlRect(ComplexControl control, const QStyleOptionComple
case CC_ComboBox:
if (const QStyleOptionComboBox *box = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
// We employ the gtk widget to position arrows and separators for us
- QString comboBoxPath = box->editable ? QLS("GtkComboBoxEntry") : QLS("GtkComboBox");
GtkWidget *gtkCombo = box->editable ? d->gtkWidget("GtkComboBoxEntry")
: d->gtkWidget("GtkComboBox");
d->gtk_widget_set_direction(gtkCombo, (option->direction == Qt::RightToLeft) ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR);
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 2a6f9a0..d3ffed8 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -97,6 +97,7 @@
#include <qdebug.h>
#include <qlibrary.h>
#include <qdatetimeedit.h>
+#include <qmath.h>
#include <QtGui/qgraphicsproxywidget.h>
#include <QtGui/qgraphicsview.h>
#include <private/qt_cocoa_helpers_mac_p.h>
@@ -2142,6 +2143,9 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
// The combo box popup has no frame.
if (qstyleoption_cast<const QStyleOptionComboBox *>(opt) != 0)
ret = 0;
+ // Frame of mac style line edits is two pixels on top and one on the bottom
+ else if (qobject_cast<const QLineEdit *>(widget) != 0)
+ ret = 2;
else
ret = 1;
break;
@@ -5437,14 +5441,12 @@ QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *op
CGFloat height;
QCFString groupText = qt_mac_removeMnemonics(groupBox->text);
HIThemeGetTextDimensions(groupText, 0, &tti, &width, &height, 0);
- tw = int(width);
- h = int(height);
+ tw = qRound(width);
+ h = qCeil(height);
} else {
- QFontMetrics fm = groupBox->fontMetrics;
- if (!checkable && !fontIsSet)
- fm = QFontMetrics(qt_app_fonts_hash()->value("QSmallFont", QFont()));
- h = fm.height();
- tw = fm.size(Qt::TextShowMnemonic, groupBox->text).width();
+ QFontMetricsF fm = QFontMetricsF(groupBox->fontMetrics);
+ h = qCeil(fm.height());
+ tw = qCeil(fm.size(Qt::TextShowMnemonic, groupBox->text).width());
}
ret.setHeight(h);
@@ -5491,10 +5493,10 @@ QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *op
fm = QFontMetrics(qt_app_fonts_hash()->value("QSmallFont", QFont()));
yOffset = 5;
if (hasNoText)
- yOffset = -fm.height();
+ yOffset = -qCeil(QFontMetricsF(fm).height());
}
- ret = opt->rect.adjusted(0, fm.height() + yOffset, 0, 0);
+ ret = opt->rect.adjusted(0, qCeil(QFontMetricsF(fm).height()) + yOffset, 0, 0);
if (sc == SC_GroupBoxContents)
ret.adjust(3, 3, -3, -4); // guess
}
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 90b8be3..d28e1d9 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -92,10 +92,10 @@ static const qreal goldenRatio = 1.618;
const layoutHeader QS60StylePrivate::m_layoutHeaders[] = {
// *** generated layout data ***
-{240,320,1,18,"QVGA Landscape"},
-{320,240,1,18,"QVGA Portrait"},
-{360,640,1,18,"NHD Landscape"},
-{640,360,1,18,"NHD Portrait"},
+{240,320,1,19,"QVGA Landscape"},
+{320,240,1,19,"QVGA Portrait"},
+{360,640,1,19,"NHD Landscape"},
+{640,360,1,19,"NHD Portrait"},
{352,800,1,12,"E90 Landscape"}
// *** End of generated data ***
};
@@ -104,11 +104,11 @@ const int QS60StylePrivate::m_numberOfLayouts =
const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = {
// *** generated pixel metrics ***
-{5,0,-909,0,0,2,0,0,-1,7,12,19,13,13,6,200,-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,0,-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,0,-1,25,69,28,19,19,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,13,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,0,-1,25,68,28,19,19,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,12,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,0,-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}
+{5,0,-909,0,0,2,0,0,-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,0,-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,0,-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,13,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,0,-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,12,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,0,-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}
// *** End of generated data ***
};
@@ -653,6 +653,8 @@ void QS60StylePrivate::setFont(QWidget *widget) const
fontCategory = QS60StyleEnums::FC_Primary;
} else if (qobject_cast<QMenu *>(widget)){
fontCategory = QS60StyleEnums::FC_Primary;
+ } else if (qobject_cast<QCalendarWidget *>(widget)){
+ fontCategory = QS60StyleEnums::FC_Secondary;
}
if (fontCategory != QS60StyleEnums::FC_Undefined) {
const bool resolveFontSize = widget->testAttribute(Qt::WA_SetFont)
@@ -813,12 +815,6 @@ void QS60StylePrivate::setThemePaletteHash(QPalette *palette) const
widgetPalette.setColor(QPalette::HighlightedText,
s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0));
QApplication::setPalette(widgetPalette, "QLineEdit");
- widgetPalette = *palette;
-
- widgetPalette.setColor(QPalette::Text,
- s60Color(QS60StyleEnums::CL_QsnTextColors, 27, 0));
- widgetPalette.setColor(QPalette::HighlightedText,
- s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0));
QApplication::setPalette(widgetPalette, "QTextEdit");
widgetPalette = *palette;
@@ -880,7 +876,6 @@ QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlag
case QS60StyleEnums::SP_QgnGrafNsliderEndLeft:
case QS60StyleEnums::SP_QgnGrafNsliderEndRight:
case QS60StyleEnums::SP_QgnGrafNsliderMiddle:
- result.setWidth(result.height() >> 1);
break;
case QS60StyleEnums::SP_QgnGrafNsliderMarker:
@@ -1120,11 +1115,9 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom
tool.rect = button.unite(menuRect);
tool.state = bflags;
const QToolButton *toolButtonWidget = qobject_cast<const QToolButton *>(widget);
- QS60StylePrivate::SkinElements element;
- if (toolButtonWidget)
- element = (toolButtonWidget->isDown()) ? QS60StylePrivate::SE_ToolBarButtonPressed : QS60StylePrivate::SE_ToolBarButton;
- else
- element = (option->state & State_Sunken) ? QS60StylePrivate::SE_ToolBarButtonPressed : QS60StylePrivate::SE_ToolBarButton;
+ const QS60StylePrivate::SkinElements element =
+ ((toolButtonWidget && toolButtonWidget->isDown()) || (option->state & State_Sunken)) ?
+ QS60StylePrivate::SE_ToolBarButtonPressed : QS60StylePrivate::SE_ToolBarButton;
QS60StylePrivate::drawSkinElement(element, painter, tool.rect, flags);
drawPrimitive(PE_PanelButtonTool, &tool, painter, widget);
}
@@ -1534,30 +1527,47 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
QS60StylePrivate::SE_TabBarTabNorthInactive;
break;
}
- if (skinElement==QS60StylePrivate::SE_TabBarTabEastInactive||
- skinElement==QS60StylePrivate::SE_TabBarTabNorthInactive||
- skinElement==QS60StylePrivate::SE_TabBarTabSouthInactive||
- skinElement==QS60StylePrivate::SE_TabBarTabWestInactive||
- skinElement==QS60StylePrivate::SE_TabBarTabEastActive||
- skinElement==QS60StylePrivate::SE_TabBarTabNorthActive||
- skinElement==QS60StylePrivate::SE_TabBarTabSouthActive||
+ if (skinElement == QS60StylePrivate::SE_TabBarTabEastInactive ||
+ skinElement == QS60StylePrivate::SE_TabBarTabNorthInactive ||
+ skinElement == QS60StylePrivate::SE_TabBarTabSouthInactive ||
+ skinElement == QS60StylePrivate::SE_TabBarTabWestInactive ||
+ skinElement == QS60StylePrivate::SE_TabBarTabEastActive ||
+ skinElement == QS60StylePrivate::SE_TabBarTabNorthActive ||
+ skinElement == QS60StylePrivate::SE_TabBarTabSouthActive ||
skinElement==QS60StylePrivate::SE_TabBarTabWestActive) {
const int borderThickness =
QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth);
const int tabOverlap =
QS60StylePrivate::pixelMetric(PM_TabBarTabOverlap) - borderThickness;
-
- if (skinElement==QS60StylePrivate::SE_TabBarTabEastInactive||
- skinElement==QS60StylePrivate::SE_TabBarTabEastActive||
- skinElement==QS60StylePrivate::SE_TabBarTabWestInactive||
- skinElement==QS60StylePrivate::SE_TabBarTabWestActive){
- optionTabAdj.rect.adjust(0, 0, 0, tabOverlap);
- } else {
- if (directionMirrored)
- optionTabAdj.rect.adjust(-tabOverlap, 0, 0, 0);
+ const bool usesScrollButtons =
+ (widget) ? (qobject_cast<const QTabBar*>(widget))->usesScrollButtons() : false;
+ const int roomForScrollButton =
+ usesScrollButtons ? QS60StylePrivate::pixelMetric(PM_TabBarScrollButtonWidth) : 0;
+
+ // adjust for overlapping tabs and scrollbuttons, if necessary
+ if (skinElement == QS60StylePrivate::SE_TabBarTabEastInactive ||
+ skinElement == QS60StylePrivate::SE_TabBarTabEastActive ||
+ skinElement == QS60StylePrivate::SE_TabBarTabWestInactive ||
+ skinElement == QS60StylePrivate::SE_TabBarTabWestActive){
+ if (optionTabAdj.position == QStyleOptionTabV3::Beginning)
+ optionTabAdj.rect.adjust(0, roomForScrollButton, 0, tabOverlap);
+ else if (optionTabAdj.position == QStyleOptionTabV3::End)
+ optionTabAdj.rect.adjust(0, 0, 0, tabOverlap);
else
- optionTabAdj.rect.adjust(0, 0, tabOverlap, 0);
+ optionTabAdj.rect.adjust(0, 0, 0, tabOverlap);
+ } else {
+ if (directionMirrored) {
+ if (optionTabAdj.position == QStyleOptionTabV3::Beginning)
+ optionTabAdj.rect.adjust(-tabOverlap, 0, -roomForScrollButton, 0);
+ else
+ optionTabAdj.rect.adjust(-tabOverlap, 0, 0, 0);
+ } else {
+ if (optionTabAdj.position == QStyleOptionTabV3::Beginning)
+ optionTabAdj.rect.adjust(roomForScrollButton, 0, tabOverlap, 0);
+ else
+ optionTabAdj.rect.adjust(0, 0, tabOverlap, 0);
}
+ }
}
QS60StylePrivate::drawSkinElement(skinElement, painter, optionTabAdj.rect, flags);
}
@@ -1570,7 +1580,10 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
const int borderThickness = QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth);
const int tabOverlap =
QS60StylePrivate::pixelMetric(PM_TabBarTabOverlap) - borderThickness;
- const QRect windowRect = painter->window();
+ const bool usesScrollButtons =
+ (widget) ? (qobject_cast<const QTabBar*>(widget))->usesScrollButtons() : false;
+ const int roomForScrollButton =
+ usesScrollButtons ? QS60StylePrivate::pixelMetric(PM_TabBarScrollButtonWidth) : 0;
switch (tab->shape) {
case QTabBar::TriangularWest:
@@ -1605,6 +1618,17 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
|| optionTab.shape == QTabBar::TriangularEast
|| optionTab.shape == QTabBar::TriangularWest;
+ //make room for scrollbuttons
+ if (!verticalTabs) {
+ if ((tab->position == QStyleOptionTabV3::Beginning && !directionMirrored))
+ tr.adjust(roomForScrollButton, 0, 0, 0);
+ else if ((tab->position == QStyleOptionTabV3::Beginning && directionMirrored))
+ tr.adjust(0, 0, -roomForScrollButton, 0);
+ } else {
+ if (tab->position == QStyleOptionTabV3::Beginning)
+ tr.adjust(0, roomForScrollButton, 0, 0);
+ }
+
if (verticalTabs) {
painter->save();
int newX, newY, newRotation;
@@ -1636,9 +1660,10 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
alignment |= Qt::TextHideMnemonic;
if (!optionTab.icon.isNull()) {
QSize iconSize = optionTab.iconSize;
- int iconExtent = pixelMetric(PM_TabBarIconSize);
- if (iconSize.height() > iconExtent || iconSize.width() > iconExtent)
+ if (!iconSize.isValid()) {
+ const int iconExtent = pixelMetric(PM_TabBarIconSize);
iconSize = QSize(iconExtent, iconExtent);
+ }
QPixmap tabIcon = optionTab.icon.pixmap(iconSize,
(optionTab.state & State_Enabled) ? QIcon::Normal : QIcon::Disabled);
if (tab->text.isEmpty())
@@ -2020,16 +2045,17 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
case PE_FrameFocusRect: {
//Draw themed highlight to radiobuttons and checkboxes.
//For other widgets skip, unless palette has been modified. In that case, draw with commonstyle.
- if (option->palette.highlight().color() == QS60StylePrivate::themePalette()->highlight().color())
+ if (option->palette.highlight().color() == QS60StylePrivate::themePalette()->highlight().color()) {
if ((qstyleoption_cast<const QStyleOptionFocusRect *>(option) &&
(qobject_cast<const QRadioButton *>(widget) || qobject_cast<const QCheckBox *>(widget))))
QS60StylePrivate::drawSkinElement(
QS60StylePrivate::isWidgetPressed(widget) ?
QS60StylePrivate::SE_ListItemPressed :
QS60StylePrivate::SE_ListHighlight, painter, option->rect, flags);
- else
+ } else {
commonStyleDraws = true;
}
+ }
break;
#ifndef QT_NO_LINEEDIT
case PE_PanelLineEdit:
@@ -2329,41 +2355,43 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
#endif
QCommonStyle::drawPrimitive(element, option, painter, widget);
} else {
- const bool rightLine = option->state & State_Item;
- const bool downLine = option->state & State_Sibling;
- const bool upLine = option->state & (State_Open | State_Children | State_Item | State_Sibling);
-
- QS60StyleEnums::SkinParts skinPart;
- bool drawSkinPart = false;
- if (rightLine && downLine && upLine) {
- skinPart = QS60StyleEnums::SP_QgnIndiHlLineBranch;
- drawSkinPart = true;
- } else if (rightLine && upLine) {
- skinPart = QS60StyleEnums::SP_QgnIndiHlLineEnd;
- drawSkinPart = true;
- } else if (upLine && downLine) {
- skinPart = QS60StyleEnums::SP_QgnIndiHlLineStraight;
- drawSkinPart = true;
- }
-
- if (drawSkinPart)
- QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags);
+ if (const QStyleOptionViewItemV2 *vopt = qstyleoption_cast<const QStyleOptionViewItemV2 *>(option)) {
+ const bool rightLine = option->state & State_Item;
+ const bool downLine = option->state & State_Sibling;
+ const bool upLine = option->state & (State_Open | State_Children | State_Item | State_Sibling);
+ QS60StylePrivate::SkinElementFlags adjustedFlags = flags;
+
+ QS60StyleEnums::SkinParts skinPart;
+ bool drawSkinPart = false;
+ if (rightLine && downLine && upLine) {
+ skinPart = QS60StyleEnums::SP_QgnIndiHlLineBranch;
+ drawSkinPart = true;
+ } else if (rightLine && upLine) {
+ skinPart = QS60StyleEnums::SP_QgnIndiHlLineEnd;
+ drawSkinPart = true;
+ } else if (upLine && downLine) {
+ skinPart = QS60StyleEnums::SP_QgnIndiHlLineStraight;
+ drawSkinPart = true;
+ }
- if (option->state & State_Children) {
- QS60StyleEnums::SkinParts skinPart =
- (option->state & State_Open) ? QS60StyleEnums::SP_QgnIndiHlColSuper : QS60StyleEnums::SP_QgnIndiHlExpSuper;
- int minDimension = qMin(option->rect.width(), option->rect.height());
- QRect iconRect(option->rect.topLeft(), QSize(minDimension, minDimension));
- const int magicTweak = 3;
- int resizeValue = minDimension >> 1;
- if (!QS60StylePrivate::isTouchSupported()) {
- minDimension += resizeValue; // Adjust the icon bigger because of empty space in svg icon.
- iconRect.setSize(QSize(minDimension, minDimension));
- const int verticalMagic = (option->rect.width() <= option->rect.height()) ? magicTweak : 0;
- resizeValue = verticalMagic - resizeValue;
+ if (option->direction == Qt::RightToLeft)
+ adjustedFlags |= QS60StylePrivate::SF_Mirrored_X_Axis;
+
+ if (drawSkinPart)
+ QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, adjustedFlags);
+
+ if (option->state & State_Children) {
+ QS60StyleEnums::SkinParts skinPart =
+ (option->state & State_Open) ? QS60StyleEnums::SP_QgnIndiHlColSuper : QS60StyleEnums::SP_QgnIndiHlExpSuper;
+ const QRect selectionRect = subElementRect(SE_ItemViewItemCheckIndicator, vopt, widget);
+ const int minDimension = qMin(option->rect.width(), option->rect.height());
+ const int magicTweak = (option->direction == Qt::RightToLeft) ? -3 : 3; //@todo: magic
+ //The branch indicator icon in S60 is supposed to be superimposed on top of branch lines.
+ QRect iconRect(QPoint(option->rect.left() + magicTweak, selectionRect.top() + 1), QSize(minDimension, minDimension));
+ if (!QS60StylePrivate::isTouchSupported())
+ iconRect.translate(0, -4); //@todo: magic
+ QS60StylePrivate::drawSkinPart(skinPart, painter, iconRect, adjustedFlags);
}
- iconRect.translate(magicTweak, resizeValue);
- QS60StylePrivate::drawSkinPart(skinPart, painter, iconRect, flags);
}
}
break;
@@ -2446,6 +2474,12 @@ int QS60Style::pixelMetric(PixelMetric metric, const QStyleOption *option, const
//double the top layout margin for dialogs, it is very close to real value
//without having to define custom pixel metric
metricValue *= 2;
+
+ if (widget && (metric == PM_FocusFrameHMargin))
+ if (qobject_cast<const QTableView *>(widget))
+ //Halve the focus frame margin for table items
+ metricValue /= 2;
+
return metricValue;
}
@@ -2471,7 +2505,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
sz += QSize(pixelMetric(PM_IndicatorWidth) + pixelMetric(PM_CheckBoxLabelSpacing), 0);
const int iconHeight = (!buttonWidget->icon().isNull()) ? buttonWidget->iconSize().height() : 0;
const int textHeight = (buttonWidget->text().length() > 0) ?
- buttonWidget->fontMetrics().size(Qt::TextSingleLine, buttonWidget->text()).height() : 0;
+ buttonWidget->fontMetrics().size(Qt::TextSingleLine, buttonWidget->text()).height() : opt->fontMetrics.height();
const int decoratorHeight = (buttonWidget->isCheckable()) ? pixelMetric(PM_IndicatorHeight) : 0;
const int contentHeight =
@@ -2490,6 +2524,19 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
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;
+ if (const QTabBar *tabBar = qobject_cast<const QTabBar *>(widget))
+ scrollButtonSize = tabBar->usesScrollButtons() ? pixelMetric(PM_TabBarScrollButtonWidth) : 0;
+ if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) {
+ const bool verticalTabs = tab->shape == QTabBar::RoundedEast
+ || tab->shape == QTabBar::RoundedWest
+ || tab->shape == QTabBar::TriangularEast
+ || tab->shape == QTabBar::TriangularWest;
+ if (tab->position == QStyleOptionTab::Beginning)
+ sz += QSize(verticalTabs ? 0 : scrollButtonSize, !verticalTabs ? 0 : scrollButtonSize);
+ }
}
break;
case CT_MenuItem:
@@ -2528,7 +2575,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *widget,
QStyleHintReturn *hret) const
{
- int retValue = -1;
+ int retValue = 0;
switch (sh) {
case SH_RequestSoftwareInputPanel:
if (QS60StylePrivate::isSingleClickUi())
@@ -2563,9 +2610,13 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
case SH_Dial_BackgroundRole:
retValue = QPalette::Base;
break;
- case SH_ItemView_ActivateItemOnSingleClick:
- retValue = QS60StylePrivate::isSingleClickUi();
+ case SH_ItemView_ActivateItemOnSingleClick: {
+ if (QS60StylePrivate::isSingleClickUi())
+ retValue = true;
+ else if (opt && opt->state & QStyle::State_Selected)
+ retValue = true;
break;
+ }
case SH_ProgressDialog_TextLabelAlignment:
retValue = (QApplication::layoutDirection() == Qt::LeftToRight) ?
Qt::AlignLeft :
@@ -2957,7 +3008,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
}
break;
case SE_ItemViewItemCheckIndicator:
- if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(opt)) {
+ if (const QStyleOptionViewItemV2 *vopt = qstyleoption_cast<const QStyleOptionViewItemV2 *>(opt)) {
const QListWidget *listItem = qobject_cast<const QListWidget *>(widget);
const bool singleSelection = listItem &&
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index 9dd3810..d8c31f8 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -476,6 +476,8 @@ public:
SF_StateDisabled = 0x0020,
SF_ColorSkinned = 0x0040, // pixmap is colored with foreground pen color
SF_Animation = 0x0080,
+ SF_Mirrored_X_Axis = 0x0100,
+ SF_Mirrored_Y_Axis = 0x0200
};
enum CacheClearReason {
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index 55aa6b0..c1223af 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -50,17 +50,17 @@
#include "qapplication.h"
#include <w32std.h>
-#include <AknsConstants.h>
+#include <aknsconstants.h>
#include <aknconsts.h>
-#include <AknsItemID.h>
-#include <AknsUtils.h>
-#include <AknsDrawUtils.h>
-#include <AknsSkinInstance.h>
-#include <AknsBasicBackgroundControlContext.h>
+#include <aknsitemid.h>
+#include <aknsutils.h>
+#include <aknsdrawutils.h>
+#include <aknsskininstance.h>
+#include <aknsbasicbackgroundcontrolcontext.h>
#include <avkon.mbg>
#include <aknfontaccess.h>
#include <aknlayoutfont.h>
-#include <AknUtils.h>
+#include <aknutils.h>
#include <aknnavi.h>
#include <gulicon.h>
#include <aknbitmapanimation.h>
@@ -654,6 +654,14 @@ QPixmap QS60StyleModeSpecifics::fromFbsBitmap(CFbsBitmap *icon, CFbsBitmap *mask
pixmap = QPixmap::fromImage(iconImage);
}
+ if ((flags & QS60StylePrivate::SF_Mirrored_X_Axis) ||
+ (flags & QS60StylePrivate::SF_Mirrored_Y_Axis)) {
+ QImage iconImage = pixmap.toImage().mirrored(
+ flags & QS60StylePrivate::SF_Mirrored_X_Axis,
+ flags & QS60StylePrivate::SF_Mirrored_Y_Axis);
+ pixmap = QPixmap::fromImage(iconImage);
+ }
+
return pixmap;
}
@@ -969,7 +977,7 @@ void QS60StyleModeSpecifics::frameIdAndCenterId(QS60StylePrivate::SkinFrameEleme
switch(frameElement) {
case QS60StylePrivate::SF_ToolTip:
- if (QSysInfo::s60Version()!=QSysInfo::SV_S60_3_1) {
+ if (QSysInfo::s60Version() != QSysInfo::SV_S60_3_1) {
centerId.Set(EAknsMajorGeneric, 0x19c2);
frameId.Set(EAknsMajorSkin, 0x5300);
} else {
@@ -978,7 +986,8 @@ void QS60StyleModeSpecifics::frameIdAndCenterId(QS60StylePrivate::SkinFrameEleme
}
break;
case QS60StylePrivate::SF_ToolBar:
- if (QSysInfo::s60Version()==QSysInfo::SV_S60_3_1 || QSysInfo::s60Version()==QSysInfo::SV_S60_3_2) {
+ if (QSysInfo::s60Version() == QSysInfo::SV_S60_3_1 ||
+ QSysInfo::s60Version() == QSysInfo::SV_S60_3_2) {
centerId.Set(KAknsIIDQsnFrPopupCenterSubmenu);
frameId.Set(KAknsIIDQsnFrPopupSub);
}
diff --git a/src/gui/styles/qstylehelper.cpp b/src/gui/styles/qstylehelper.cpp
index 296c51c..d09d7fa 100644
--- a/src/gui/styles/qstylehelper.cpp
+++ b/src/gui/styles/qstylehelper.cpp
@@ -58,67 +58,23 @@
QT_BEGIN_NAMESPACE
-// internal helper. Converts an integer value to an unique string token
-template <typename T>
-struct HexString
-{
- inline HexString(const T t)
- : val(t)
- {}
-
- inline void write(QChar *&dest) const
- {
- const ushort hexChars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
- const char *c = reinterpret_cast<const char *>(&val);
- for (uint i = 0; i < sizeof(T); ++i) {
- *dest++ = hexChars[*c & 0xf];
- *dest++ = hexChars[(*c & 0xf0) >> 4];
- ++c;
- }
- }
-
- const T val;
-};
-
-// specialization to enable fast concatenating of our string tokens to a string
-template <typename T>
-struct QConcatenable<HexString<T> >
-{
- typedef HexString<T> type;
- enum { ExactSize = true };
- static int size(const HexString<T> &str) { return sizeof(str.val) * 2; }
- static inline void appendTo(const HexString<T> &str, QChar *&out) { str.write(out); }
-};
-
namespace QStyleHelper {
QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size)
{
const QStyleOptionComplex *complexOption = qstyleoption_cast<const QStyleOptionComplex *>(option);
-
- QString tmp = key
- % QLatin1Char('-')
- % HexString<uint>(option->state)
- % QLatin1Char('-')
- % HexString<uint>(option->direction)
- % QLatin1Char('-')
- % HexString<uint>(complexOption ? uint(complexOption->activeSubControls) : 0u)
- % QLatin1Char('-')
- % HexString<quint64>(option->palette.cacheKey())
- % QLatin1Char('-')
- % HexString<uint>(size.width())
- % QLatin1Char('x')
- % HexString<uint>(size.height());
+ QString tmp = key % HexString<uint>(option->state)
+ % HexString<uint>(option->direction)
+ % HexString<uint>(complexOption ? uint(complexOption->activeSubControls) : 0u)
+ % HexString<quint64>(option->palette.cacheKey())
+ % HexString<uint>(size.width())
+ % HexString<uint>(size.height());
#ifndef QT_NO_SPINBOX
if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
- tmp = tmp
- % QLatin1Char('-')
- % HexString<uint>(spinBox->buttonSymbols)
- % QLatin1Char('-')
- % HexString<uint>(spinBox->stepEnabled)
- % QLatin1Char('-')
- % QLatin1Char(spinBox->frame ? '1' : '0');
+ tmp = tmp % HexString<uint>(spinBox->buttonSymbols)
+ % HexString<uint>(spinBox->stepEnabled)
+ % QLatin1Char(spinBox->frame ? '1' : '0'); ;
}
#endif // QT_NO_SPINBOX
return tmp;
diff --git a/src/gui/styles/qstylehelper_p.h b/src/gui/styles/qstylehelper_p.h
index 31cc4ed..71fce55 100644
--- a/src/gui/styles/qstylehelper_p.h
+++ b/src/gui/styles/qstylehelper_p.h
@@ -41,7 +41,9 @@
#include <QtCore/qglobal.h>
#include <QtCore/qpoint.h>
+#include <QtCore/qstring.h>
#include <QtGui/qpolygon.h>
+#include <QtCore/qstringbuilder.h>
#ifndef QSTYLEHELPER_P_H
#define QSTYLEHELPER_P_H
@@ -79,6 +81,37 @@ namespace QStyleHelper
int bottom = 0);
}
+// internal helper. Converts an integer value to an unique string token
+template <typename T>
+ struct HexString
+{
+ inline HexString(const T t)
+ : val(t)
+ {}
+
+ inline void write(QChar *&dest) const
+ {
+ const ushort hexChars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
+ const char *c = reinterpret_cast<const char *>(&val);
+ for (uint i = 0; i < sizeof(T); ++i) {
+ *dest++ = hexChars[*c & 0xf];
+ *dest++ = hexChars[(*c & 0xf0) >> 4];
+ ++c;
+ }
+ }
+ const T val;
+};
+
+// specialization to enable fast concatenating of our string tokens to a string
+template <typename T>
+ struct QConcatenable<HexString<T> >
+{
+ typedef HexString<T> type;
+ enum { ExactSize = true };
+ static int size(const HexString<T> &str) { return sizeof(str.val) * 2; }
+ static inline void appendTo(const HexString<T> &str, QChar *&out) { str.write(out); }
+};
+
QT_END_NAMESPACE
#endif // QSTYLEHELPER_P_H
diff --git a/src/gui/styles/qwindowsmobilestyle.cpp b/src/gui/styles/qwindowsmobilestyle.cpp
index 5f939d0..67eb1ef 100644
--- a/src/gui/styles/qwindowsmobilestyle.cpp
+++ b/src/gui/styles/qwindowsmobilestyle.cpp
@@ -5356,6 +5356,50 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp
painter->setPen(option->palette.text().color());
painter->drawLines(a);
break; }
+ case PE_IndicatorBranch: {
+ // Copied from the Windows style.
+ static const int decoration_size = d->doubleControls ? 18 : 9;
+ static const int ofsA = d->doubleControls ? 4 : 2;
+ static const int ofsB = d->doubleControls ? 8 : 4;
+ static const int ofsC = d->doubleControls ? 12 : 6;
+ static const int ofsD = d->doubleControls ? 1 : 0;
+ int mid_h = option->rect.x() + option->rect.width() / 2;
+ int mid_v = option->rect.y() + option->rect.height() / 2;
+ int bef_h = mid_h;
+ int bef_v = mid_v;
+ int aft_h = mid_h;
+ int aft_v = mid_v;
+ if (option->state & State_Children) {
+ int delta = decoration_size / 2;
+ bef_h -= delta;
+ bef_v -= delta;
+ aft_h += delta;
+ aft_v += delta;
+ QPen oldPen = painter->pen();
+ QPen crossPen = oldPen;
+ crossPen.setWidth(2);
+ painter->setPen(crossPen);
+ painter->drawLine(bef_h + ofsA + ofsD, bef_v + ofsB + ofsD, bef_h + ofsC + ofsD, bef_v + ofsB + ofsD);
+ if (!(option->state & State_Open))
+ painter->drawLine(bef_h + ofsB + ofsD, bef_v + ofsA + ofsD, bef_h + ofsB + ofsD, bef_v + ofsC + ofsD);
+ painter->setPen(option->palette.dark().color());
+ painter->drawRect(bef_h, bef_v, decoration_size - 1, decoration_size - 1);
+ if (d->doubleControls)
+ painter->drawRect(bef_h + 1, bef_v + 1, decoration_size - 3, decoration_size - 3);
+ painter->setPen(oldPen);
+ }
+ QBrush brush(option->palette.dark().color(), Qt::Dense4Pattern);
+ if (option->state & State_Item) {
+ if (option->direction == Qt::RightToLeft)
+ painter->fillRect(option->rect.left(), mid_v, bef_h - option->rect.left(), 1, brush);
+ else
+ painter->fillRect(aft_h, mid_v, option->rect.right() - aft_h + 1, 1, brush);
+ }
+ if (option->state & State_Sibling)
+ painter->fillRect(mid_h, aft_v, 1, option->rect.bottom() - aft_v + 1, brush);
+ if (option->state & (State_Open | State_Children | State_Item | State_Sibling))
+ painter->fillRect(mid_h, option->rect.y(), 1, bef_v - option->rect.y(), brush);
+ break; }
case PE_Frame:
qDrawPlainRect(painter, option->rect, option->palette.shadow().color(),
d->doubleControls ? 2 : 1, &option->palette.background());
diff --git a/src/gui/styles/styles.pri b/src/gui/styles/styles.pri
index 5084442..f920032 100644
--- a/src/gui/styles/styles.pri
+++ b/src/gui/styles/styles.pri
@@ -170,7 +170,12 @@ contains( styles, s60 ):contains(QT_CONFIG, s60) {
SOURCES += styles/qs60style.cpp
symbian {
SOURCES += styles/qs60style_s60.cpp
- LIBS += -lAknIcon -lAKNSKINS -lAKNSKINSRV -lFontUtils -legul -lbmpanim
+ LIBS += -legul -lbmpanim
+ contains(CONFIG, is_using_gnupoc) {
+ LIBS += -laknicon -laknskins -laknskinsrv -lfontutils
+ } else {
+ LIBS += -lAknIcon -lAKNSKINS -lAKNSKINSRV -lFontUtils
+ }
} else {
SOURCES += styles/qs60style_simulated.cpp
RESOURCES += styles/qstyle_s60_simulated.qrc
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 21a31a3..c229242 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -805,6 +805,9 @@ QFont::QFont(const QString &family, int pointSize, int weight, bool italic)
resolve_mask |= QFont::WeightResolved | QFont::StyleResolved;
}
+ if (italic)
+ resolve_mask |= QFont::StyleResolved;
+
d->request.family = family;
d->request.pointSize = qreal(pointSize);
d->request.pixelSize = -1;
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 95774f9..489b70b 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -113,6 +113,7 @@ QSymbianFontDatabaseExtrasImplementation::QSymbianFontDatabaseExtrasImplementati
QStringList filters;
filters.append(QLatin1String("*.ttf"));
filters.append(QLatin1String("*.ccc"));
+ filters.append(QLatin1String("*.ltt"));
const QFileInfoList fontFiles = alternativeFilePaths(QLatin1String("resource\\Fonts"), filters);
const TInt heapMinLength = 0x1000;
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index a6510cb..3be6d28 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -162,9 +162,14 @@ QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const ATSFontFamilyRef &, con
QCFString name;
ATSFontGetName(atsFontRef, kATSOptionFlagsDefault, &name);
+ transform = CGAffineTransformIdentity;
+ if (fontDef.stretch != 100) {
+ transform = CGAffineTransformMakeScale(float(fontDef.stretch) / float(100), 1);
+ }
+
QCFType<CTFontDescriptorRef> descriptor = CTFontDescriptorCreateWithNameAndSize(name, fontDef.pixelSize);
- QCFType<CTFontRef> baseFont = CTFontCreateWithFontDescriptor(descriptor, fontDef.pixelSize, 0);
- ctfont = CTFontCreateCopyWithSymbolicTraits(baseFont, fontDef.pixelSize, 0, symbolicTraits, symbolicTraits);
+ QCFType<CTFontRef> baseFont = CTFontCreateWithFontDescriptor(descriptor, fontDef.pixelSize, &transform);
+ ctfont = CTFontCreateCopyWithSymbolicTraits(baseFont, fontDef.pixelSize, &transform, symbolicTraits, symbolicTraits);
// CTFontCreateCopyWithSymbolicTraits returns NULL if we ask for a trait that does
// not exist for the given font. (for example italic)
@@ -378,7 +383,10 @@ QCoreTextFontEngine::QCoreTextFontEngine(CTFontRef font, const QFontDef &def,
if (fontDef.style != QFont::StyleNormal && !(traits & kCTFontItalicTrait)) {
synthesisFlags |= SynthesizedItalic;
}
-
+ transform = CGAffineTransformIdentity;
+ if (fontDef.stretch != 100) {
+ transform = CGAffineTransformMakeScale(float(fontDef.stretch) / float(100), 1);
+ }
QByteArray os2Table = getSfntTable(MAKE_TAG('O', 'S', '/', '2'));
if (os2Table.size() >= 10)
fsType = qFromBigEndian<quint16>(reinterpret_cast<const uchar *>(os2Table.constData() + 8));
@@ -503,7 +511,7 @@ void QCoreTextFontEngine::draw(CGContextRef ctx, qreal x, qreal y, const QTextIt
if (synthesisFlags & QFontEngine::SynthesizedItalic)
cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, -tanf(14 * acosf(0) / 90), 1, 0, 0));
-// ### cgMatrix = CGAffineTransformConcat(cgMatrix, transform);
+ cgMatrix = CGAffineTransformConcat(cgMatrix, transform);
CGContextSetTextMatrix(ctx, cgMatrix);
@@ -626,7 +634,7 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, int margin, bool aa)
if (synthesisFlags & QFontEngine::SynthesizedItalic)
cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, tanf(14 * acosf(0) / 90), 1, 0, 0));
-// ### cgMatrix = CGAffineTransformConcat(cgMatrix, transform);
+ cgMatrix = CGAffineTransformConcat(cgMatrix, transform);
CGContextSetTextMatrix(ctx, cgMatrix);
CGContextSetRGBFillColor(ctx, 1, 1, 1, 1);
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index e645caf..922acfb 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -462,6 +462,7 @@ private:
CGFontRef cgFont;
QCoreTextFontEngineMulti *parentEngine;
int synthesisFlags;
+ CGAffineTransform transform;
friend class QCoreTextFontEngineMulti;
};
@@ -493,7 +494,7 @@ private:
uint fontIndexForFont(CTFontRef id) const;
CTFontRef ctfont;
mutable QCFType<CFMutableDictionaryRef> attributeDict;
-
+ CGAffineTransform transform;
friend class QFontDialogPrivate;
};
# endif //MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index a2ee659..3d34687 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -747,7 +747,11 @@ void QTextControl::undo()
{
Q_D(QTextControl);
d->repaintSelection();
+ const int oldCursorPos = d->cursor.position();
d->doc->undo(&d->cursor);
+ if (d->cursor.position() != oldCursorPos)
+ emit cursorPositionChanged();
+ emit microFocusChanged();
ensureCursorVisible();
}
@@ -755,7 +759,11 @@ void QTextControl::redo()
{
Q_D(QTextControl);
d->repaintSelection();
+ const int oldCursorPos = d->cursor.position();
d->doc->redo(&d->cursor);
+ if (d->cursor.position() != oldCursorPos)
+ emit cursorPositionChanged();
+ emit microFocusChanged();
ensureCursorVisible();
}
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index afba678..c7a9756 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -1947,7 +1947,7 @@ QVariant QTextDocument::loadResource(int type, const QUrl &name)
#endif
// handle data: URLs
- if (r.isNull() && name.scheme() == QLatin1String("data"))
+ if (r.isNull() && name.scheme().compare(QLatin1String("data"), Qt::CaseInsensitive) == 0)
r = qDecodeDataUrl(name).second;
// if resource was not loaded try to load it here
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index 5054b66..d92148f 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -389,7 +389,7 @@ struct Q_AUTOTEST_EXPORT QScriptLine
mutable uint gridfitted : 1;
uint hasTrailingSpaces : 1;
uint leadingIncluded : 1;
- QFixed height() const { return ascent + descent + 1
+ QFixed height() const { return (ascent + descent).ceil() + 1
+ (leadingIncluded? qMax(QFixed(),leading) : QFixed()); }
QFixed base() const { return ascent
+ (leadingIncluded ? qMax(QFixed(),leading) : QFixed()); }
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp
index 8e7ec80..1abc2d9 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -532,17 +532,22 @@ void QCompletionEngine::saveInCache(QString part, const QModelIndex& parent, con
QMatchData old = cache[parent].take(part);
cost = cost + m.indices.cost() - old.indices.cost();
if (cost * sizeof(int) > 1024 * 1024) {
- QMap<QModelIndex, CacheItem>::iterator it1 ;
- for (it1 = cache.begin(); it1 != cache.end(); ++it1) {
+ QMap<QModelIndex, CacheItem>::iterator it1 = cache.begin();
+ while (it1 != cache.end()) {
CacheItem& ci = it1.value();
int sz = ci.count()/2;
QMap<QString, QMatchData>::iterator it2 = ci.begin();
- for (int i = 0; it2 != ci.end() && i < sz; i++, ++it2) {
+ int i = 0;
+ while (it2 != ci.end() && i < sz) {
cost -= it2.value().indices.cost();
- ci.erase(it2);
+ it2 = ci.erase(it2);
+ i++;
+ }
+ if (ci.count() == 0) {
+ it1 = cache.erase(it1);
+ } else {
+ ++it1;
}
- if (ci.count() == 0)
- cache.erase(it1);
}
}
@@ -873,7 +878,7 @@ void QCompleterPrivate::showPopup(const QRect& rect)
const QRect screen = QApplication::desktop()->availableGeometry(widget);
Qt::LayoutDirection dir = widget->layoutDirection();
QPoint pos;
- int rw, rh, w;
+ int rh, w;
int h = (popup->sizeHintForRow(0) * qMin(maxVisibleItems, popup->model()->rowCount()) + 3) + 3;
QScrollBar *hsb = popup->horizontalScrollBar();
if (hsb && hsb->isVisible())
@@ -881,21 +886,30 @@ void QCompleterPrivate::showPopup(const QRect& rect)
if (rect.isValid()) {
rh = rect.height();
- w = rw = rect.width();
+ w = rect.width();
pos = widget->mapToGlobal(dir == Qt::RightToLeft ? rect.bottomRight() : rect.bottomLeft());
} else {
rh = widget->height();
- rw = widget->width();
pos = widget->mapToGlobal(QPoint(0, widget->height() - 2));
w = widget->width();
}
- if ((pos.x() + rw) > (screen.x() + screen.width()))
+ if (w > screen.width())
+ w = screen.width();
+ if ((pos.x() + w) > (screen.x() + screen.width()))
pos.setX(screen.x() + screen.width() - w);
if (pos.x() < screen.x())
pos.setX(screen.x());
- if (((pos.y() + rh) > (screen.y() + screen.height())) && ((pos.y() - h - rh) >= 0))
- pos.setY(pos.y() - qMax(h, popup->minimumHeight()) - rh + 2);
+
+ int top = pos.y() - rh - screen.top() + 2;
+ int bottom = screen.bottom() - pos.y();
+ h = qMax(h, popup->minimumHeight());
+ if (h > bottom) {
+ h = qMin(qMax(top, bottom), h);
+
+ if (top > bottom)
+ pos.setY(pos.y() - h - rh + 2);
+ }
popup->setGeometry(pos.x(), pos.y(), w, h);
@@ -1799,7 +1813,7 @@ QStringList QCompleter::splitPath(const QString& path) const
This signal is sent when an item in the popup() is highlighted by
the user. It is also sent if complete() is called with the completionMode()
- set to QCOmpleter::InlineCompletion. The item's \a text is given.
+ set to QCompleter::InlineCompletion. The item's \a text is given.
*/
QT_END_NAMESPACE
diff --git a/src/gui/util/qsystemtrayicon_mac.mm b/src/gui/util/qsystemtrayicon_mac.mm
index d943c8c..8aaaa0f 100644
--- a/src/gui/util/qsystemtrayicon_mac.mm
+++ b/src/gui/util/qsystemtrayicon_mac.mm
@@ -75,8 +75,6 @@
#define QT_MAC_SYSTEMTRAY_USE_GROWL
-@class QNSMenu;
-
#include <private/qt_cocoa_helpers_mac_p.h>
#include <private/qsystemtrayicon_p.h>
#include <qtemporaryfile.h>
@@ -98,13 +96,14 @@ QT_END_NAMESPACE
QT_USE_NAMESPACE
-@class QNSImageView;
+@class QT_MANGLE_NAMESPACE(QNSMenu);
+@class QT_MANGLE_NAMESPACE(QNSImageView);
-@interface QNSStatusItem : NSObject {
+@interface QT_MANGLE_NAMESPACE(QNSStatusItem) : NSObject {
NSStatusItem *item;
QSystemTrayIcon *icon;
QSystemTrayIconPrivate *iconPrivate;
- QNSImageView *imageCell;
+ QT_MANGLE_NAMESPACE(QNSImageView) *imageCell;
}
-(id)initWithIcon:(QSystemTrayIcon*)icon iconPrivate:(QSystemTrayIconPrivate *)iprivate;
-(void)dealloc;
@@ -115,11 +114,11 @@ QT_USE_NAMESPACE
- (void)doubleClickSelector:(id)sender;
@end
-@interface QNSImageView : NSImageView {
+@interface QT_MANGLE_NAMESPACE(QNSImageView) : NSImageView {
BOOL down;
- QNSStatusItem *parent;
+ QT_MANGLE_NAMESPACE(QNSStatusItem) *parent;
}
--(id)initWithParent:(QNSStatusItem*)myParent;
+-(id)initWithParent:(QT_MANGLE_NAMESPACE(QNSStatusItem)*)myParent;
-(QSystemTrayIcon*)icon;
-(void)menuTrackingDone:(NSNotification*)notification;
-(void)mousePressed:(NSEvent *)mouseEvent button:(Qt::MouseButton)mouseButton;
@@ -134,7 +133,7 @@ QT_USE_NAMESPACE
#endif
-@interface QNSMenu : NSMenu <NSMenuDelegate> {
+@interface QT_MANGLE_NAMESPACE(QNSMenu) : NSMenu <NSMenuDelegate> {
QMenu *qmenu;
}
-(QMenu*)menu;
@@ -148,14 +147,14 @@ class QSystemTrayIconSys
public:
QSystemTrayIconSys(QSystemTrayIcon *icon, QSystemTrayIconPrivate *d) {
QMacCocoaAutoReleasePool pool;
- item = [[QNSStatusItem alloc] initWithIcon:icon iconPrivate:d];
+ item = [[QT_MANGLE_NAMESPACE(QNSStatusItem) alloc] initWithIcon:icon iconPrivate:d];
}
~QSystemTrayIconSys() {
QMacCocoaAutoReleasePool pool;
[[[item item] view] setHidden: YES];
[item release];
}
- QNSStatusItem *item;
+ QT_MANGLE_NAMESPACE(QNSStatusItem) *item;
};
void QSystemTrayIconPrivate::install_sys()
@@ -299,8 +298,8 @@ QT_END_NAMESPACE
@implementation NSStatusItem (Qt)
@end
-@implementation QNSImageView
--(id)initWithParent:(QNSStatusItem*)myParent {
+@implementation QT_MANGLE_NAMESPACE(QNSImageView)
+-(id)initWithParent:(QT_MANGLE_NAMESPACE(QNSStatusItem)*)myParent {
self = [super init];
parent = myParent;
down = NO;
@@ -400,7 +399,7 @@ QT_END_NAMESPACE
}
@end
-@implementation QNSStatusItem
+@implementation QT_MANGLE_NAMESPACE(QNSStatusItem)
-(id)initWithIcon:(QSystemTrayIcon*)i iconPrivate:(QSystemTrayIconPrivate *)iPrivate
{
@@ -409,7 +408,7 @@ QT_END_NAMESPACE
icon = i;
iconPrivate = iPrivate;
item = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain];
- imageCell = [[QNSImageView alloc] initWithParent:self];
+ imageCell = [[QT_MANGLE_NAMESPACE(QNSImageView) alloc] initWithParent:self];
[item setView: imageCell];
}
return self;
@@ -453,7 +452,7 @@ QT_END_NAMESPACE
[[[self item] view] removeAllToolTips];
iconPrivate->updateToolTip_sys();
#endif
- NSMenu *m = [[QNSMenu alloc] initWithQMenu:icon->contextMenu()];
+ NSMenu *m = [[QT_MANGLE_NAMESPACE(QNSMenu) alloc] initWithQMenu:icon->contextMenu()];
[m setAutoenablesItems: NO];
[[NSNotificationCenter defaultCenter] addObserver:imageCell
selector:@selector(menuTrackingDone:)
@@ -481,7 +480,7 @@ private:
QSystemTrayIconQMenu();
};
-@implementation QNSMenu
+@implementation QT_MANGLE_NAMESPACE(QNSMenu)
-(id)initWithQMenu:(QMenu*)qm {
self = [super init];
if(self) {
@@ -494,7 +493,7 @@ private:
return qmenu;
}
-(void)menuNeedsUpdate:(NSMenu*)nsmenu {
- QNSMenu *menu = static_cast<QNSMenu *>(nsmenu);
+ QT_MANGLE_NAMESPACE(QNSMenu) *menu = static_cast<QT_MANGLE_NAMESPACE(QNSMenu) *>(nsmenu);
emit static_cast<QSystemTrayIconQMenu*>(menu->qmenu)->doAboutToShow();
for(int i = [menu numberOfItems]-1; i >= 0; --i)
[menu removeItemAtIndex:i];
@@ -539,7 +538,7 @@ private:
[nsimage release];
}
if(action->menu()) {
- QNSMenu *sub = [[QNSMenu alloc] initWithQMenu:action->menu()];
+ QT_MANGLE_NAMESPACE(QNSMenu) *sub = [[QT_MANGLE_NAMESPACE(QNSMenu) alloc] initWithQMenu:action->menu()];
[item setSubmenu:sub];
} else {
[item setAction:@selector(selectedAction:)];
diff --git a/src/gui/util/qsystemtrayicon_win.cpp b/src/gui/util/qsystemtrayicon_win.cpp
index 8e482e0..c89fbae 100644
--- a/src/gui/util/qsystemtrayicon_win.cpp
+++ b/src/gui/util/qsystemtrayicon_win.cpp
@@ -60,17 +60,9 @@
#include <QDesktopWidget>
#include <QSettings>
-#if defined(Q_WS_WINCE) && !defined(STANDARDSHELL_UI_MODEL)
-# include <streams.h>
-#endif
-
QT_BEGIN_NAMESPACE
-#if defined(Q_WS_WINCE)
-static const UINT q_uNOTIFYICONID = 13; // IDs from 0 to 12 are reserved on WinCE.
-#else
static const UINT q_uNOTIFYICONID = 0;
-#endif
static uint MYWM_TASKBARCREATED = 0;
#define MYWM_NOTIFYICON (WM_APP+101)
@@ -124,23 +116,15 @@ bool QSystemTrayIconSys::allowsMessages()
bool QSystemTrayIconSys::supportsMessages()
{
-#ifndef Q_OS_WINCE
return allowsMessages();
-#endif
- return false;
}
QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *object)
: hIcon(0), q(object), ignoreNextMouseRelease(false)
{
-#ifndef Q_OS_WINCE
notifyIconSize = FIELD_OFFSET(NOTIFYICONDATA, guidItem); // NOTIFYICONDATAW_V2_SIZE;
maxTipLength = 128;
-#else
- notifyIconSize = FIELD_OFFSET(NOTIFYICONDATA, szTip[64]); // NOTIFYICONDATAW_V1_SIZE;
- maxTipLength = 64;
-#endif
// For restoring the tray icon after explorer crashes
if (!MYWM_TASKBARCREATED) {
@@ -316,24 +300,13 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result )
case WM_RBUTTONUP:
if (q->contextMenu()) {
q->contextMenu()->popup(gpos);
-#if defined(Q_WS_WINCE)
- // We must ensure that the popup menu doesn't show up behind the task bar.
- QRect desktopRect = qApp->desktop()->availableGeometry();
- int maxY = desktopRect.y() + desktopRect.height() - q->contextMenu()->height();
- if (gpos.y() > maxY) {
- gpos.ry() = maxY;
- q->contextMenu()->move(gpos);
- }
-#endif
}
emit q->activated(QSystemTrayIcon::Context);
break;
-#if !defined(Q_WS_WINCE)
case NIN_BALLOONUSERCLICK:
emit q->messageClicked();
break;
-#endif
case WM_MBUTTONUP:
emit q->activated(QSystemTrayIcon::MiddleClick);
@@ -400,23 +373,11 @@ QRect QSystemTrayIconSys::findIconGeometry(const int iconId)
//find the toolbar used in the notification area
if (trayHandle) {
-#if defined(Q_OS_WINCE)
- trayHandle = FindWindow(L"TrayNotifyWnd", NULL);
-#else
trayHandle = FindWindowEx(trayHandle, NULL, L"TrayNotifyWnd", NULL);
-#endif
if (trayHandle) {
-#if defined(Q_OS_WINCE)
- HWND hwnd = FindWindow(L"SysPager", NULL);
-#else
HWND hwnd = FindWindowEx(trayHandle, NULL, L"SysPager", NULL);
-#endif
if (hwnd) {
-#if defined(Q_OS_WINCE)
- hwnd = FindWindow(L"ToolbarWindow32", NULL);
-#else
hwnd = FindWindowEx(hwnd, NULL, L"ToolbarWindow32", NULL);
-#endif
if (hwnd)
trayHandle = hwnd;
}
@@ -435,11 +396,7 @@ QRect QSystemTrayIconSys::findIconGeometry(const int iconId)
return ret;
int buttonCount = SendMessage(trayHandle, TB_BUTTONCOUNT, 0, 0);
-#if defined(Q_OS_WINCE)
- LPVOID data = VirtualAlloc(NULL, sizeof(TBBUTTON), MEM_COMMIT, PAGE_READWRITE);
-#else
LPVOID data = VirtualAllocEx(trayProcess, NULL, sizeof(TBBUTTON), MEM_COMMIT, PAGE_READWRITE);
-#endif
if ( buttonCount < 1 || !data ) {
CloseHandle(trayProcess);
@@ -477,11 +434,7 @@ QRect QSystemTrayIconSys::findIconGeometry(const int iconId)
}
}
}
-#if defined(Q_OS_WINCE)
- VirtualFree(data, 0, MEM_RELEASE);
-#else
VirtualFreeEx(trayProcess, data, 0, MEM_RELEASE);
-#endif
CloseHandle(trayProcess);
return ret;
}
@@ -555,16 +508,10 @@ void QSystemTrayIconPrivate::updateMenu_sys()
void QSystemTrayIconPrivate::updateToolTip_sys()
{
-#ifdef Q_WS_WINCE
- // Calling sys->trayMessage(NIM_MODIFY) on an existing icon is broken on Windows CE.
- // So we need to call updateIcon_sys() which creates a new icon handle.
- updateIcon_sys();
-#else
if (!sys)
return;
sys->trayMessage(NIM_MODIFY);
-#endif
}
bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys()
diff --git a/src/gui/util/qsystemtrayicon_wince.cpp b/src/gui/util/qsystemtrayicon_wince.cpp
new file mode 100644
index 0000000..0a0d340
--- /dev/null
+++ b/src/gui/util/qsystemtrayicon_wince.cpp
@@ -0,0 +1,296 @@
+/****************************************************************************
+**
+** 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 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 "qsystemtrayicon_p.h"
+#ifndef QT_NO_SYSTEMTRAYICON
+#define _WIN32_IE 0x0600 //required for NOTIFYICONDATA_V2_SIZE
+
+#include <qt_windows.h>
+#include <shlwapi.h>
+#include <QApplication>
+
+QT_BEGIN_NAMESPACE
+
+static const UINT q_uNOTIFYICONID = 13; // IDs from 0 to 12 are reserved on WinCE.
+#define MYWM_NOTIFYICON (WM_APP+101)
+
+struct Q_NOTIFYICONIDENTIFIER {
+ DWORD cbSize;
+ HWND hWnd;
+ UINT uID;
+ GUID guidItem;
+};
+
+class QSystemTrayIconSys : QWidget
+{
+public:
+ QSystemTrayIconSys(QSystemTrayIcon *object);
+ ~QSystemTrayIconSys();
+ bool winEvent( MSG *m, long *result );
+ bool trayMessage(DWORD msg);
+ void setIconContents(NOTIFYICONDATA &data);
+ void createIcon();
+ QRect findTrayGeometry();
+ HICON hIcon;
+ QPoint globalPos;
+ QSystemTrayIcon *q;
+private:
+ uint notifyIconSize;
+ int maxTipLength;
+ bool ignoreNextMouseRelease;
+};
+
+QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *object)
+ : hIcon(0), q(object), ignoreNextMouseRelease(false)
+
+{
+ notifyIconSize = FIELD_OFFSET(NOTIFYICONDATA, szTip[64]); // NOTIFYICONDATAW_V1_SIZE;
+ maxTipLength = 64;
+}
+
+QSystemTrayIconSys::~QSystemTrayIconSys()
+{
+ if (hIcon)
+ DestroyIcon(hIcon);
+}
+
+QRect QSystemTrayIconSys::findTrayGeometry()
+{
+ // Use lower right corner as fallback
+ QPoint brCorner = qApp->desktop()->screenGeometry().bottomRight();
+ QRect ret(brCorner.x() - 10, brCorner.y() - 10, 10, 10);
+ return ret;
+}
+
+void QSystemTrayIconSys::setIconContents(NOTIFYICONDATA &tnd)
+{
+ tnd.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
+ tnd.uCallbackMessage = MYWM_NOTIFYICON;
+ tnd.hIcon = hIcon;
+ QString tip = q->toolTip();
+
+ if (!tip.isNull()) {
+ tip = tip.left(maxTipLength - 1) + QChar();
+ memcpy(tnd.szTip, tip.utf16(), qMin(tip.length() + 1, maxTipLength) * sizeof(wchar_t));
+ }
+}
+
+bool QSystemTrayIconSys::trayMessage(DWORD msg)
+{
+ NOTIFYICONDATA tnd;
+ memset(&tnd, 0, notifyIconSize);
+ tnd.uID = q_uNOTIFYICONID;
+ tnd.cbSize = notifyIconSize;
+ tnd.hWnd = winId();
+
+ Q_ASSERT(testAttribute(Qt::WA_WState_Created));
+
+ if (msg != NIM_DELETE) {
+ setIconContents(tnd);
+ }
+
+ return Shell_NotifyIcon(msg, &tnd);
+}
+
+void QSystemTrayIconSys::createIcon()
+{
+ hIcon = 0;
+ QIcon icon = q->icon();
+ if (icon.isNull())
+ return;
+
+ //const QSize preferredSize(GetSystemMetrics(SM_CXSMICON) * 2, GetSystemMetrics(SM_CYSMICON) * 2);
+ const QSize preferredSize(GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON));
+ QPixmap pm = icon.pixmap(preferredSize);
+ if (pm.isNull())
+ return;
+
+ hIcon = pm.toWinHICON();
+}
+
+bool QSystemTrayIconSys::winEvent( MSG *m, long *result )
+{
+ switch(m->message) {
+ case WM_CREATE:
+ SetWindowLong(winId(), GWL_USERDATA, (LONG)((CREATESTRUCTW*)m->lParam)->lpCreateParams);
+ break;
+
+ case MYWM_NOTIFYICON:
+ {
+ RECT r;
+ GetWindowRect(winId(), &r);
+ QEvent *e = 0;
+ Qt::KeyboardModifiers keys = QApplication::keyboardModifiers();
+ QPoint gpos = QCursor::pos();
+
+ switch (m->lParam) {
+ case WM_LBUTTONUP:
+ if (ignoreNextMouseRelease)
+ ignoreNextMouseRelease = false;
+ else
+ emit q->activated(QSystemTrayIcon::Trigger);
+ break;
+
+ case WM_LBUTTONDBLCLK:
+ ignoreNextMouseRelease = true; // Since DBLCLICK Generates a second mouse
+ // release we must ignore it
+ emit q->activated(QSystemTrayIcon::DoubleClick);
+ break;
+
+ case WM_RBUTTONUP:
+ if (q->contextMenu()) {
+ q->contextMenu()->popup(gpos);
+
+ // We must ensure that the popup menu doesn't show up behind the task bar.
+ QRect desktopRect = qApp->desktop()->availableGeometry();
+ int maxY = desktopRect.y() + desktopRect.height() - q->contextMenu()->height();
+ if (gpos.y() > maxY) {
+ gpos.ry() = maxY;
+ q->contextMenu()->move(gpos);
+ }
+ }
+ emit q->activated(QSystemTrayIcon::Context);
+ break;
+
+ case WM_MBUTTONUP:
+ emit q->activated(QSystemTrayIcon::MiddleClick);
+ break;
+ default:
+ break;
+ }
+ if (e) {
+ bool res = QApplication::sendEvent(q, e);
+ delete e;
+ return res;
+ }
+ break;
+ }
+ default:
+ return QWidget::winEvent(m, result);
+ }
+ return 0;
+}
+
+void QSystemTrayIconPrivate::install_sys()
+{
+ Q_Q(QSystemTrayIcon);
+ if (!sys) {
+ sys = new QSystemTrayIconSys(q);
+ sys->createIcon();
+ sys->trayMessage(NIM_ADD);
+ }
+}
+
+void QSystemTrayIconPrivate::showMessage_sys(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, int timeOut)
+{
+ if (!sys)
+ return;
+
+ uint uSecs = 0;
+ if ( timeOut < 0)
+ uSecs = 10000; //10 sec default
+ else uSecs = (int)timeOut;
+
+ //message is limited to 255 chars + NULL
+ QString messageString;
+ if (message.isEmpty() && !title.isEmpty())
+ messageString = QLatin1Char(' '); //ensures that the message shows when only title is set
+ else
+ messageString = message.left(255) + QChar();
+
+ //title is limited to 63 chars + NULL
+ QString titleString = title.left(63) + QChar();
+
+ //show QBalloonTip
+ QRect trayRect = sys->findTrayGeometry();
+ QBalloonTip::showBalloon(type, title, message, sys->q, QPoint(trayRect.left(),
+ trayRect.center().y()), uSecs, false);
+}
+
+QRect QSystemTrayIconPrivate::geometry_sys() const
+{
+ return QRect();
+}
+
+void QSystemTrayIconPrivate::remove_sys()
+{
+ if (!sys)
+ return;
+
+ sys->trayMessage(NIM_DELETE);
+ delete sys;
+ sys = 0;
+}
+
+void QSystemTrayIconPrivate::updateIcon_sys()
+{
+ if (!sys)
+ return;
+
+ HICON hIconToDestroy = sys->hIcon;
+
+ sys->createIcon();
+ sys->trayMessage(NIM_MODIFY);
+
+ if (hIconToDestroy)
+ DestroyIcon(hIconToDestroy);
+}
+
+void QSystemTrayIconPrivate::updateMenu_sys()
+{
+
+}
+
+void QSystemTrayIconPrivate::updateToolTip_sys()
+{
+ // Calling sys->trayMessage(NIM_MODIFY) on an existing icon is broken on Windows CE.
+ // So we need to call updateIcon_sys() which creates a new icon handle.
+ updateIcon_sys();
+}
+
+bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys()
+{
+ return true;
+}
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/gui/util/util.pri b/src/gui/util/util.pri
index bd2af85..be8db93 100644
--- a/src/gui/util/util.pri
+++ b/src/gui/util/util.pri
@@ -20,7 +20,10 @@ SOURCES += \
util/qundoview.cpp
-win32 {
+wince* {
+ SOURCES += \
+ util/qsystemtrayicon_wince.cpp
+} else:win32 {
SOURCES += \
util/qsystemtrayicon_win.cpp
}
diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp
index 6a01d68..f38bae7 100644
--- a/src/gui/widgets/qabstractslider.cpp
+++ b/src/gui/widgets/qabstractslider.cpp
@@ -219,8 +219,12 @@ QAbstractSliderPrivate::QAbstractSliderPrivate()
#ifdef QT_KEYPAD_NAVIGATION
, isAutoRepeating(false)
, repeatMultiplier(1)
-#endif
{
+ firstRepeat.invalidate();
+#else
+{
+#endif
+
}
QAbstractSliderPrivate::~QAbstractSliderPrivate()
@@ -787,7 +791,7 @@ void QAbstractSlider::keyPressEvent(QKeyEvent *ev)
}
}
- else if (!d->firstRepeat.isValid()) {
+ else if (d->firstRepeat.isValid()) {
d->firstRepeat.invalidate();
d->repeatMultiplier = 1;
}
diff --git a/src/gui/widgets/qcocoatoolbardelegate_mac.mm b/src/gui/widgets/qcocoatoolbardelegate_mac.mm
index b2a0e0c..e68ee7c 100644
--- a/src/gui/widgets/qcocoatoolbardelegate_mac.mm
+++ b/src/gui/widgets/qcocoatoolbardelegate_mac.mm
@@ -58,7 +58,7 @@ QT_FORWARD_DECLARE_CLASS(QMainWindowLayout);
QT_FORWARD_DECLARE_CLASS(QToolBar);
QT_FORWARD_DECLARE_CLASS(QCFString);
-@implementation QCocoaToolBarDelegate
+@implementation QT_MANGLE_NAMESPACE(QCocoaToolBarDelegate)
- (id)initWithMainWindowLayout:(QMainWindowLayout *)layout
{
diff --git a/src/gui/widgets/qcocoatoolbardelegate_mac_p.h b/src/gui/widgets/qcocoatoolbardelegate_mac_p.h
index 8e3d06f..b4af54f 100644
--- a/src/gui/widgets/qcocoatoolbardelegate_mac_p.h
+++ b/src/gui/widgets/qcocoatoolbardelegate_mac_p.h
@@ -61,7 +61,7 @@ QT_END_NAMESPACE
@class NSToolbarItem;
-@interface QCocoaToolBarDelegate : NSObject {
+@interface QT_MANGLE_NAMESPACE(QCocoaToolBarDelegate) : NSObject {
QT_PREPEND_NAMESPACE(QMainWindowLayout) *mainWindowLayout;
NSToolbarItem *toolbarItem;
}
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index ca58e6d..1504066 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -56,6 +56,7 @@
#include <qscrollbar.h>
#include <qtreeview.h>
#include <qheaderview.h>
+#include <qmath.h>
#ifndef QT_NO_IM
#include "qinputcontext.h"
#endif
@@ -151,7 +152,10 @@ QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewIt
menuOption.icon = qvariant_cast<QPixmap>(variant);
break;
}
-
+ if (qVariantCanConvert<QBrush>(index.data(Qt::BackgroundRole))) {
+ menuOption.palette.setBrush(QPalette::All, QPalette::Background,
+ qvariant_cast<QBrush>(index.data(Qt::BackgroundRole)));
+ }
menuOption.text = index.model()->data(index, Qt::DisplayRole).toString()
.replace(QLatin1Char('&'), QLatin1String("&&"));
menuOption.tabWidth = 0;
@@ -328,7 +332,7 @@ QSize QComboBoxPrivate::recomputeSizeHint(QSize &sh) const
// height
- sh.setHeight(qMax(fm.height(), 14) + 2);
+ sh.setHeight(qMax(qCeil(QFontMetricsF(fm).height()), 14) + 2);
if (hasIcon) {
sh.setHeight(qMax(sh.height(), iconSize.height() + 2));
}
diff --git a/src/gui/widgets/qcombobox_p.h b/src/gui/widgets/qcombobox_p.h
index 92d85cc..29a628c 100644
--- a/src/gui/widgets/qcombobox_p.h
+++ b/src/gui/widgets/qcombobox_p.h
@@ -200,7 +200,9 @@ protected:
menuOpt.menuItemType = QStyleOptionMenuItem::Scroller;
if (sliderAction == QAbstractSlider::SliderSingleStepAdd)
menuOpt.state |= QStyle::State_DownArrow;
+#ifndef Q_WS_S60
p.eraseRect(rect());
+#endif
style()->drawControl(QStyle::CE_MenuScroller, &menuOpt, &p);
}
diff --git a/src/gui/widgets/qcommandlinkbutton.cpp b/src/gui/widgets/qcommandlinkbutton.cpp
index 6919bc0..e8fe299 100644
--- a/src/gui/widgets/qcommandlinkbutton.cpp
+++ b/src/gui/widgets/qcommandlinkbutton.cpp
@@ -46,6 +46,7 @@
#include "qtextlayout.h"
#include "qcolor.h"
#include "qfont.h"
+#include <qmath.h>
#include "private/qpushbutton_p.h"
@@ -242,7 +243,7 @@ int QCommandLinkButtonPrivate::descriptionHeight(int widgetWidth) const
}
layout.endLayout();
}
- return qRound(descriptionheight);
+ return qCeil(descriptionheight);
}
/*!
diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp
index 806654c..171000b 100644
--- a/src/gui/widgets/qdockarealayout.cpp
+++ b/src/gui/widgets/qdockarealayout.cpp
@@ -225,7 +225,7 @@ static const int zero = 0;
QDockAreaLayoutInfo::QDockAreaLayoutInfo()
: sep(&zero), dockPos(QInternal::LeftDock), o(Qt::Horizontal), mainWindow(0)
#ifndef QT_NO_TABBAR
- , tabbed(false), tabBar(0), tabBarShape(QTabBar::RoundedSouth), tabBarVisible(false)
+ , tabbed(false), tabBar(0), tabBarShape(QTabBar::RoundedSouth)
#endif
{
}
@@ -235,7 +235,7 @@ QDockAreaLayoutInfo::QDockAreaLayoutInfo(const int *_sep, QInternal::DockPositio
QMainWindow *window)
: sep(_sep), dockPos(_dockPos), o(_o), mainWindow(window)
#ifndef QT_NO_TABBAR
- , tabbed(false), tabBar(0), tabBarShape(static_cast<QTabBar::Shape>(tbshape)), tabBarVisible(false)
+ , tabbed(false), tabBar(0), tabBarShape(static_cast<QTabBar::Shape>(tbshape))
#endif
{
#ifdef QT_NO_TABBAR
@@ -296,8 +296,8 @@ QSize QDockAreaLayoutInfo::minimumSize() const
rperp(o, result) = b;
#ifndef QT_NO_TABBAR
- if (tabbed) {
- QSize tbm = tabBarMinimumSize();
+ QSize tbm = tabBarMinimumSize();
+ if (!tbm.isNull()) {
switch (tabBarShape) {
case QTabBar::RoundedNorth:
case QTabBar::RoundedSouth:
@@ -369,8 +369,8 @@ QSize QDockAreaLayoutInfo::maximumSize() const
rperp(o, result) = b;
#ifndef QT_NO_TABBAR
- if (tabbed) {
- QSize tbh = tabBarSizeHint();
+ QSize tbh = tabBarSizeHint();
+ if (!tbh.isNull()) {
switch (tabBarShape) {
case QTabBar::RoundedNorth:
case QTabBar::RoundedSouth:
@@ -1500,7 +1500,7 @@ void QDockAreaLayoutInfo::apply(bool animate)
QRect tab_rect;
QSize tbh = tabBarSizeHint();
- if (tabBarVisible) {
+ if (!tbh.isNull()) {
switch (tabBarShape) {
case QTabBar::RoundedNorth:
case QTabBar::TriangularNorth:
@@ -2079,10 +2079,11 @@ void QDockAreaLayoutInfo::updateSeparatorWidgets() const
#endif //QT_NO_TABBAR
#ifndef QT_NO_TABBAR
-void QDockAreaLayoutInfo::updateTabBar() const
+//returns whether the tabbar is visible or not
+bool QDockAreaLayoutInfo::updateTabBar() const
{
if (!tabbed)
- return;
+ return false;
QDockAreaLayoutInfo *that = const_cast<QDockAreaLayoutInfo*>(this);
@@ -2150,12 +2151,8 @@ void QDockAreaLayoutInfo::updateTabBar() const
tabBar->blockSignals(blocked);
- that->tabBarVisible = ( (gap ? 1 : 0) + tabBar->count()) > 1;
-
- if (changed || !tabBarMin.isValid() | !tabBarHint.isValid()) {
- that->tabBarMin = tabBar->minimumSizeHint();
- that->tabBarHint = tabBar->sizeHint();
- }
+ //returns if the tabbar is visible or not
+ return ( (gap ? 1 : 0) + tabBar->count()) > 1;
}
void QDockAreaLayoutInfo::setTabBarShape(int shape)
@@ -2163,11 +2160,8 @@ void QDockAreaLayoutInfo::setTabBarShape(int shape)
if (shape == tabBarShape)
return;
tabBarShape = shape;
- if (tabBar != 0) {
+ if (tabBar != 0)
tabBar->setShape(static_cast<QTabBar::Shape>(shape));
- tabBarMin = QSize();
- tabBarHint = QSize();
- }
for (int i = 0; i < item_list.count(); ++i) {
QDockAreaLayoutItem &item = item_list[i];
@@ -2178,22 +2172,18 @@ void QDockAreaLayoutInfo::setTabBarShape(int shape)
QSize QDockAreaLayoutInfo::tabBarMinimumSize() const
{
- if (!tabbed)
+ if (!updateTabBar())
return QSize(0, 0);
- updateTabBar();
-
- return tabBarMin;
+ return tabBar->minimumSizeHint();
}
QSize QDockAreaLayoutInfo::tabBarSizeHint() const
{
- if (!tabbed)
+ if (!updateTabBar())
return QSize(0, 0);
- updateTabBar();
-
- return tabBarHint;
+ return tabBar->sizeHint();
}
QSet<QTabBar*> QDockAreaLayoutInfo::usedTabBars() const
@@ -2240,7 +2230,7 @@ QRect QDockAreaLayoutInfo::tabContentRect() const
QRect result = rect;
QSize tbh = tabBarSizeHint();
- if (tabBarVisible) {
+ if (!tbh.isNull()) {
switch (tabBarShape) {
case QTabBar::RoundedNorth:
case QTabBar::TriangularNorth:
diff --git a/src/gui/widgets/qdockarealayout_p.h b/src/gui/widgets/qdockarealayout_p.h
index 0088f00..9cb77ba 100644
--- a/src/gui/widgets/qdockarealayout_p.h
+++ b/src/gui/widgets/qdockarealayout_p.h
@@ -208,11 +208,9 @@ public:
QRect tabContentRect() const;
bool tabbed;
QTabBar *tabBar;
- QSize tabBarMin, tabBarHint;
int tabBarShape;
- bool tabBarVisible;
- void updateTabBar() const;
+ bool updateTabBar() const;
void setTabBarShape(int shape);
QSize tabBarMinimumSize() const;
QSize tabBarSizeHint() const;
diff --git a/src/gui/widgets/qdockwidget.cpp b/src/gui/widgets/qdockwidget.cpp
index 54189de..11f0a94 100644
--- a/src/gui/widgets/qdockwidget.cpp
+++ b/src/gui/widgets/qdockwidget.cpp
@@ -1269,12 +1269,11 @@ void QDockWidget::setFloating(bool floating)
QRect r = d->undockedGeometry;
d->setWindowState(floating, false, floating ? r : QRect());
+
if (floating && r.isNull()) {
- QDockWidgetLayout *layout = qobject_cast<QDockWidgetLayout*>(this->layout());
- QRect titleArea = layout->titleArea();
- int h = layout->verticalTitleBar ? titleArea.width() : titleArea.height();
- QPoint p = mapToGlobal(QPoint(h, h));
- move(p);
+ if (x() < 0 || y() < 0) //may happen if we have been hidden
+ move(QPoint());
+ setAttribute(Qt::WA_Moved, false); //we want it at the default position
}
}
diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm
index 9527057..b8cef93 100644
--- a/src/gui/widgets/qmainwindowlayout_mac.mm
+++ b/src/gui/widgets/qmainwindowlayout_mac.mm
@@ -410,7 +410,7 @@ void QMainWindowLayout::insertIntoMacToolbar(QToolBar *before, QToolBar *toolbar
macToolbar = [[NSToolbar alloc] initWithIdentifier:(NSString *)kQMainWindowMacToolbarID];
[macToolbar setDisplayMode:NSToolbarDisplayModeIconOnly];
[macToolbar setSizeMode:NSToolbarSizeModeRegular];
- [macToolbar setDelegate:[[QCocoaToolBarDelegate alloc] initWithMainWindowLayout:this]];
+ [macToolbar setDelegate:[[QT_MANGLE_NAMESPACE(QCocoaToolBarDelegate) alloc] initWithMainWindowLayout:this]];
[window setToolbar:macToolbar];
[macToolbar release];
}
diff --git a/src/gui/widgets/qmenu.h b/src/gui/widgets/qmenu.h
index a040afa..7708e05 100644
--- a/src/gui/widgets/qmenu.h
+++ b/src/gui/widgets/qmenu.h
@@ -142,7 +142,7 @@ public:
#endif
#ifdef Q_WS_WINCE
- HMENU wceMenu(bool create = false);
+ HMENU wceMenu();
#endif
bool separatorsCollapsible() const;
diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h
index 39cbbd8..33283fd 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -358,7 +358,7 @@ public:
return 0;
}
} *wce_menu;
- HMENU wceMenu(bool create = false);
+ HMENU wceMenu();
QAction* wceCommands(uint command);
#endif
#if defined(Q_WS_S60)
diff --git a/src/gui/widgets/qmenu_wince.cpp b/src/gui/widgets/qmenu_wince.cpp
index 1577f0a..e088db6 100644
--- a/src/gui/widgets/qmenu_wince.cpp
+++ b/src/gui/widgets/qmenu_wince.cpp
@@ -126,6 +126,7 @@ static void qt_wce_enable_soft_key(HWND handle, uint command)
if (ptrEnableSoftKey)
ptrEnableSoftKey(handle, command, false, true);
}
+
static void qt_wce_disable_soft_key(HWND handle, uint command)
{
resolveAygLibs();
@@ -133,7 +134,8 @@ static void qt_wce_disable_soft_key(HWND handle, uint command)
ptrEnableSoftKey(handle, command, false, false);
}
-static void qt_wce_delete_action_list(QList<QWceMenuAction*> *list) {
+static void qt_wce_delete_action_list(QList<QWceMenuAction*> *list)
+{
for(QList<QWceMenuAction*>::Iterator it = list->begin(); it != list->end(); ++it) {
QWceMenuAction *action = (*it);
delete action;
@@ -143,7 +145,8 @@ static void qt_wce_delete_action_list(QList<QWceMenuAction*> *list) {
}
//search for first QuitRole in QMenuBar
-static QAction* qt_wce_get_quit_action(QList<QAction *> actionItems) {
+static QAction* qt_wce_get_quit_action(QList<QAction *> actionItems)
+{
QAction *returnAction = 0;
for (int i = 0; i < actionItems.size(); ++i) {
QAction *action = actionItems.at(i);
@@ -158,7 +161,8 @@ static QAction* qt_wce_get_quit_action(QList<QAction *> actionItems) {
return 0; //nothing found;
}
-static QAction* qt_wce_get_quit_action(QList<QWceMenuAction*> actionItems) {
+static QAction* qt_wce_get_quit_action(QList<QWceMenuAction*> actionItems)
+{
for (int i = 0; i < actionItems.size(); ++i) {
if (actionItems.at(i)->action->menuRole() == QAction::QuitRole)
return actionItems.at(i)->action;
@@ -171,7 +175,8 @@ static QAction* qt_wce_get_quit_action(QList<QWceMenuAction*> actionItems) {
return 0;
}
-static HMODULE qt_wce_get_module_handle() {
+static HMODULE qt_wce_get_module_handle()
+{
HMODULE module = 0; //handle to resources
if (!(module = GetModuleHandle(L"QtGui4"))) //release dynamic
if (!(module = GetModuleHandle(L"QtGuid4"))) //debug dynamic
@@ -180,7 +185,8 @@ static HMODULE qt_wce_get_module_handle() {
return module;
}
-static void qt_wce_change_command(HWND menuHandle, int item, int command) {
+static void qt_wce_change_command(HWND menuHandle, int item, int command)
+{
TBBUTTONINFOA tbbi;
memset(&tbbi,0,sizeof(tbbi));
tbbi.cbSize = sizeof(tbbi);
@@ -189,7 +195,8 @@ TBBUTTONINFOA tbbi;
SendMessage(menuHandle, TB_SETBUTTONINFO, item, (LPARAM)&tbbi);
}
-static void qt_wce_rename_menu_item(HWND menuHandle, int item, const QString &newText) {
+static void qt_wce_rename_menu_item(HWND menuHandle, int item, const QString &newText)
+{
TBBUTTONINFOA tbbi;
memset(&tbbi,0,sizeof(tbbi));
tbbi.cbSize = sizeof(tbbi);
@@ -200,7 +207,8 @@ static void qt_wce_rename_menu_item(HWND menuHandle, int item, const QString &ne
SendMessage(menuHandle, TB_SETBUTTONINFO, item, (LPARAM)&tbbi);
}
-static HWND qt_wce_create_menubar(HWND parentHandle, HINSTANCE resourceHandle, int toolbarID, int flags = 0) {
+static HWND qt_wce_create_menubar(HWND parentHandle, HINSTANCE resourceHandle, int toolbarID, int flags = 0)
+{
resolveAygLibs();
if (ptrCreateMenuBar) {
@@ -225,8 +233,8 @@ static HWND qt_wce_create_menubar(HWND parentHandle, HINSTANCE resourceHandle, i
return 0;
}
-static void qt_wce_insert_action(HMENU menu, QWceMenuAction *action, bool created) {
-
+static void qt_wce_insert_action(HMENU menu, QWceMenuAction *action)
+{
Q_ASSERT_X(menu, "AppendMenu", "menu is 0");
if (action->action->isVisible()) {
int flags;
@@ -240,7 +248,7 @@ static void qt_wce_insert_action(HMENU menu, QWceMenuAction *action, bool create
else if (action->action->menu()) {
text.remove(QChar::fromLatin1('&'));
AppendMenu (menu, MF_STRING | flags | MF_POPUP,
- (UINT) action->action->menu()->wceMenu(created), reinterpret_cast<const wchar_t *> (text.utf16()));
+ (UINT) action->action->menu()->wceMenu(), reinterpret_cast<const wchar_t *> (text.utf16()));
}
else {
AppendMenu (menu, MF_STRING | flags, action->command, reinterpret_cast<const wchar_t *> (text.utf16()));
@@ -265,12 +273,14 @@ static void qt_wce_clear_menu(HMENU hMenu)
This function refreshes the native Windows CE menu.
*/
-void QMenuBar::wceRefresh() {
+void QMenuBar::wceRefresh()
+{
for (int i = 0; i < nativeMenuBars.size(); ++i)
nativeMenuBars.at(i)->d_func()->wceRefresh();
}
-void QMenuBarPrivate::wceRefresh() {
+void QMenuBarPrivate::wceRefresh()
+{
DrawMenuBar(wce_menubar->menubarHandle);
}
@@ -280,7 +290,8 @@ void QMenuBarPrivate::wceRefresh() {
This function sends native Windows CE commands to Qt menus.
*/
-QAction* QMenu::wceCommands(uint command) {
+QAction* QMenu::wceCommands(uint command)
+{
Q_D(QMenu);
return d->wceCommands(command);
}
@@ -292,22 +303,27 @@ QAction* QMenu::wceCommands(uint command) {
and all their child menus.
*/
-void QMenuBar::wceCommands(uint command, HWND) {
- for (int i = 0; i < nativeMenuBars.size(); ++i)
- nativeMenuBars.at(i)->d_func()->wceCommands(command);
+void QMenuBar::wceCommands(uint command)
+{
+ const HWND hwndActiveWindow = GetActiveWindow();
+ for (int i = 0; i < nativeMenuBars.size(); ++i) {
+ QMenuBarPrivate* nativeMenuBar = nativeMenuBars.at(i)->d_func();
+ if (hwndActiveWindow == nativeMenuBar->wce_menubar->parentWindowHandle)
+ nativeMenuBar->wceCommands(command);
+ }
}
-bool QMenuBarPrivate::wceEmitSignals(QList<QWceMenuAction*> actions, uint command) {
+bool QMenuBarPrivate::wceEmitSignals(QList<QWceMenuAction*> actions, uint command)
+{
QAction *foundAction = 0;
for (int i = 0; i < actions.size(); ++i) {
- if (foundAction)
- break;
QWceMenuAction *action = actions.at(i);
if (action->action->menu()) {
foundAction = action->action->menu()->wceCommands(command);
+ if (foundAction)
+ break;
}
else if (action->command == command) {
- emit q_func()->triggered(action->action);
action->action->activate(QAction::Trigger);
return true;
}
@@ -319,13 +335,14 @@ bool QMenuBarPrivate::wceEmitSignals(QList<QWceMenuAction*> actions, uint comman
return false;
}
-void QMenuBarPrivate::wceCommands(uint command) {
+void QMenuBarPrivate::wceCommands(uint command)
+{
if (wceClassicMenu) {
for (int i = 0; i < wce_menubar->actionItemsClassic.size(); ++i)
wceEmitSignals(wce_menubar->actionItemsClassic.at(i), command);
} else {
if (wceEmitSignals(wce_menubar->actionItems, command)) {
- return ;
+ return;
}
else if (wce_menubar->leftButtonIsMenu) {//check if command is on the left quick button
wceEmitSignals(wce_menubar->actionItemsLeftButton, command);
@@ -337,7 +354,8 @@ void QMenuBarPrivate::wceCommands(uint command) {
}
}
-QAction *QMenuPrivate::wceCommands(uint command) {
+QAction *QMenuPrivate::wceCommands(uint command)
+{
QAction *foundAction = 0;
for (int i = 0; i < wce_menu->actionItems.size(); ++i) {
if (foundAction)
@@ -347,7 +365,7 @@ QAction *QMenuPrivate::wceCommands(uint command) {
foundAction = action->action->menu()->d_func()->wceCommands(command);
}
else if (action->command == command) {
- action->action->activate(QAction::Trigger);
+ activateAction(action->action, QAction::Trigger);
return action->action;
}
}
@@ -356,8 +374,8 @@ QAction *QMenuPrivate::wceCommands(uint command) {
return foundAction;
}
-void QMenuBarPrivate::wceCreateMenuBar(QWidget *parent) {
-
+void QMenuBarPrivate::wceCreateMenuBar(QWidget *parent)
+{
Q_Q(QMenuBar);
wce_menubar = new QWceMenuBarPrivate(this);
@@ -371,21 +389,25 @@ void QMenuBarPrivate::wceCreateMenuBar(QWidget *parent) {
wceClassicMenu = (!qt_wince_is_smartphone() && !qt_wince_is_pocket_pc());
}
-void QMenuBarPrivate::wceDestroyMenuBar() {
+void QMenuBarPrivate::wceDestroyMenuBar()
+{
Q_Q(QMenuBar);
int index = nativeMenuBars.indexOf(q);
nativeMenuBars.removeAt(index);
- if (wce_menubar)
- delete wce_menubar;
- wce_menubar = 0;
+ if (wce_menubar) {
+ delete wce_menubar;
+ wce_menubar = 0;
+ }
}
-QMenuBarPrivate::QWceMenuBarPrivate::QWceMenuBarPrivate(QMenuBarPrivate *menubar) :
- menubarHandle(0), menuHandle(0),leftButtonMenuHandle(0) ,
- leftButtonAction(0), leftButtonIsMenu(false), d(menubar) {
+QMenuBarPrivate::QWceMenuBarPrivate::QWceMenuBarPrivate(QMenuBarPrivate *menubar)
+: menubarHandle(0), menuHandle(0), leftButtonMenuHandle(0),
+ leftButtonAction(0), leftButtonIsMenu(false), d(menubar)
+{
}
-QMenuBarPrivate::QWceMenuBarPrivate::~QWceMenuBarPrivate() {
+QMenuBarPrivate::QWceMenuBarPrivate::~QWceMenuBarPrivate()
+{
if (menubarHandle)
DestroyWindow(menubarHandle);
qt_wce_delete_action_list(&actionItems);
@@ -403,24 +425,28 @@ QMenuBarPrivate::QWceMenuBarPrivate::~QWceMenuBarPrivate() {
QMenuBar::wceRefresh();
}
-QMenuPrivate::QWceMenuPrivate::QWceMenuPrivate() {
- menuHandle = 0;
+QMenuPrivate::QWceMenuPrivate::QWceMenuPrivate()
+: menuHandle(0)
+{
}
-QMenuPrivate::QWceMenuPrivate::~QWceMenuPrivate() {
+QMenuPrivate::QWceMenuPrivate::~QWceMenuPrivate()
+{
qt_wce_delete_action_list(&actionItems);
if (menuHandle)
DestroyMenu(menuHandle);
}
-void QMenuPrivate::QWceMenuPrivate::addAction(QAction *a, QWceMenuAction *before) {
+void QMenuPrivate::QWceMenuPrivate::addAction(QAction *a, QWceMenuAction *before)
+{
QWceMenuAction *action = new QWceMenuAction;
action->action = a;
action->command = qt_wce_menu_static_cmd_id++;
addAction(action, before);
}
-void QMenuPrivate::QWceMenuPrivate::addAction(QWceMenuAction *action, QWceMenuAction *before) {
+void QMenuPrivate::QWceMenuPrivate::addAction(QWceMenuAction *action, QWceMenuAction *before)
+{
if (!action)
return;
int before_index = actionItems.indexOf(before);
@@ -439,12 +465,16 @@ void QMenuPrivate::QWceMenuPrivate::addAction(QWceMenuAction *action, QWceMenuAc
Windows CE menu bar bindings.
*/
-HMENU QMenu::wceMenu(bool create) { return d_func()->wceMenu(create); }
+HMENU QMenu::wceMenu()
+{
+ return d_func()->wceMenu();
+}
-HMENU QMenuPrivate::wceMenu(bool create) {
+HMENU QMenuPrivate::wceMenu()
+{
if (!wce_menu)
wce_menu = new QWceMenuPrivate;
- if (!wce_menu->menuHandle || create)
+ if (!wce_menu->menuHandle)
wce_menu->rebuild();
return wce_menu->menuHandle;
}
@@ -459,30 +489,33 @@ void QMenuPrivate::QWceMenuPrivate::rebuild()
for (int i = 0; i < actionItems.size(); ++i) {
QWceMenuAction *action = actionItems.at(i);
action->menuHandle = menuHandle;
- qt_wce_insert_action(menuHandle, action, true);
+ qt_wce_insert_action(menuHandle, action);
}
QMenuBar::wceRefresh();
}
-void QMenuPrivate::QWceMenuPrivate::syncAction(QWceMenuAction *) {
+void QMenuPrivate::QWceMenuPrivate::syncAction(QWceMenuAction *)
+{
rebuild();
}
-void QMenuPrivate::QWceMenuPrivate::removeAction(QWceMenuAction *action) {
- actionItems.removeAll(action);
- delete action;
- action = 0;
- rebuild();
+void QMenuPrivate::QWceMenuPrivate::removeAction(QWceMenuAction *action)
+{
+ actionItems.removeAll(action);
+ delete action;
+ rebuild();
}
-void QMenuBarPrivate::QWceMenuBarPrivate::addAction(QAction *a, QWceMenuAction *before) {
+void QMenuBarPrivate::QWceMenuBarPrivate::addAction(QAction *a, QWceMenuAction *before)
+{
QWceMenuAction *action = new QWceMenuAction;
action->action = a;
action->command = qt_wce_menu_static_cmd_id++;
addAction(action, before);
}
-void QMenuBarPrivate::QWceMenuBarPrivate::addAction(QWceMenuAction *action, QWceMenuAction *before) {
+void QMenuBarPrivate::QWceMenuBarPrivate::addAction(QWceMenuAction *action, QWceMenuAction *before)
+{
if (!action)
return;
int before_index = actionItems.indexOf(before);
@@ -494,25 +527,27 @@ void QMenuBarPrivate::QWceMenuBarPrivate::addAction(QWceMenuAction *action, QWce
rebuild();
}
-void QMenuBarPrivate::QWceMenuBarPrivate::syncAction(QWceMenuAction*) {
+void QMenuBarPrivate::QWceMenuBarPrivate::syncAction(QWceMenuAction*)
+{
QMenuBar::wceRefresh();
rebuild();
}
-void QMenuBarPrivate::QWceMenuBarPrivate::removeAction(QWceMenuAction *action) {
+void QMenuBarPrivate::QWceMenuBarPrivate::removeAction(QWceMenuAction *action)
+{
actionItems.removeAll(action);
delete action;
- action = 0;
rebuild();
}
-void QMenuBarPrivate::_q_updateDefaultAction() {
+void QMenuBarPrivate::_q_updateDefaultAction()
+{
if (wce_menubar)
wce_menubar->rebuild();
}
-void QMenuBarPrivate::QWceMenuBarPrivate::rebuild() {
-
+void QMenuBarPrivate::QWceMenuBarPrivate::rebuild()
+{
d->q_func()->resize(0,0);
parentWindowHandle = d->q_func()->parentWidget() ? d->q_func()->parentWidget()->winId() : d->q_func()->winId();
if (d->wceClassicMenu) {
@@ -559,7 +594,7 @@ void QMenuBarPrivate::QWceMenuBarPrivate::rebuild() {
action->command = qt_wce_menu_static_cmd_id++;
action->menuHandle = subMenuHandle;
actionItemsClassic.last().append(action);
- qt_wce_insert_action(subMenuHandle, action, true);
+ qt_wce_insert_action(subMenuHandle, action);
}
}
for (int i = actions.size();i<maxEntries;++i) {
@@ -602,7 +637,7 @@ void QMenuBarPrivate::QWceMenuBarPrivate::rebuild() {
for (int i = 0; i < actionItems.size(); ++i) {
QWceMenuAction *action = actionItems.at(i);
action->menuHandle = menuHandle;
- qt_wce_insert_action(menuHandle, action, true);
+ qt_wce_insert_action(menuHandle, action);
}
if (!leftButtonIsMenu) {
if (leftButtonAction) {
@@ -622,7 +657,7 @@ void QMenuBarPrivate::QWceMenuBarPrivate::rebuild() {
action->command = qt_wce_menu_static_cmd_id++;
action->menuHandle = leftButtonMenuHandle;
actionItemsLeftButton.append(action);
- qt_wce_insert_action(leftButtonMenuHandle, action, true);
+ qt_wce_insert_action(leftButtonMenuHandle, action);
}
}
}
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index ef37fd1..aa4ffce 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -1956,7 +1956,7 @@ bool QMenuBar::isNativeMenuBar() const
to the right soft key.
Currently there is only support for the default action on Windows
- Mobile. All other platforms ignore the default action.
+ Mobile. On all other platforms this method is not available.
\sa defaultAction()
*/
diff --git a/src/gui/widgets/qmenubar.h b/src/gui/widgets/qmenubar.h
index 85c0988..c63a4f5 100644
--- a/src/gui/widgets/qmenubar.h
+++ b/src/gui/widgets/qmenubar.h
@@ -115,7 +115,7 @@ public:
void setDefaultAction(QAction *);
QAction *defaultAction() const;
- static void wceCommands(uint command, HWND controlHandle);
+ static void wceCommands(uint command);
static void wceRefresh();
#endif
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index 54d443a..318b75f 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -67,6 +67,10 @@
#include <private/qt_cocoa_helpers_mac_p.h>
#endif
+#ifndef QT_NO_STYLE_S60
+#include "qs60style.h"
+#endif
+
QT_BEGIN_NAMESPACE
@@ -490,6 +494,9 @@ void QTabBarPrivate::layoutTabs()
if (useScrollButtons && tabList.count() && last > available) {
int extra = extraWidth();
+#ifndef QT_NO_STYLE_S60
+ QS60Style *s60Style = qobject_cast<QS60Style*>(QApplication::style());
+#endif
if (!vertTabs) {
Qt::LayoutDirection ld = q->layoutDirection();
QRect arrows = QStyle::visualRect(ld, q->rect(),
@@ -497,25 +504,57 @@ void QTabBarPrivate::layoutTabs()
int buttonOverlap = q->style()->pixelMetric(QStyle::PM_TabBar_ScrollButtonOverlap, 0, q);
if (ld == Qt::LeftToRight) {
+// In S60style, tab scroll buttons are layoutted separately, on the sides of the tabbar.
+#ifndef QT_NO_STYLE_S60
+ if (s60Style) {
+ rightB->setGeometry(arrows.left() + extra / 2, arrows.top(), extra / 2, arrows.height());
+ leftB->setGeometry(0, arrows.top(), extra / 2, arrows.height());
+ } else {
+#endif
leftB->setGeometry(arrows.left(), arrows.top(), extra/2, arrows.height());
rightB->setGeometry(arrows.right() - extra/2 + buttonOverlap, arrows.top(),
extra/2, arrows.height());
+#ifndef QT_NO_STYLE_S60
+ }
+#endif
leftB->setArrowType(Qt::LeftArrow);
rightB->setArrowType(Qt::RightArrow);
} else {
+#ifndef QT_NO_STYLE_S60
+ if (s60Style) {
+ rightB->setGeometry(arrows.left() + extra / 2, arrows.top(), extra / 2, arrows.height());
+ leftB->setGeometry(0, arrows.top(), extra / 2, arrows.height());
+ } else {
+#endif
rightB->setGeometry(arrows.left(), arrows.top(), extra/2, arrows.height());
leftB->setGeometry(arrows.right() - extra/2 + buttonOverlap, arrows.top(),
extra/2, arrows.height());
+#ifndef QT_NO_STYLE_S60
+ }
+#endif
rightB->setArrowType(Qt::LeftArrow);
leftB->setArrowType(Qt::RightArrow);
}
} else {
+#ifndef QT_NO_STYLE_S60
+ if (s60Style) {
+ QRect arrows = QRect(0, 0, size.width(), available );
+ leftB->setGeometry(arrows.left(), arrows.top(), arrows.width(), extra / 2);
+ leftB->setArrowType(Qt::UpArrow);
+ rightB->setGeometry(arrows.left(), arrows.bottom() - extra / 2 + 1,
+ arrows.width(), extra / 2);
+ rightB->setArrowType(Qt::DownArrow);
+ } else {
+#endif
QRect arrows = QRect(0, available - extra, size.width(), extra );
leftB->setGeometry(arrows.left(), arrows.top(), arrows.width(), extra/2);
leftB->setArrowType(Qt::UpArrow);
rightB->setGeometry(arrows.left(), arrows.bottom() - extra/2 + 1,
arrows.width(), extra/2);
rightB->setArrowType(Qt::DownArrow);
+#ifndef QT_NO_STYLE_S60
+ }
+#endif
}
leftB->setEnabled(scrollOffset > 0);
rightB->setEnabled(last - scrollOffset >= available - extra);
diff --git a/src/imports/folderlistmodel/folderlistmodel.pro b/src/imports/folderlistmodel/folderlistmodel.pro
new file mode 100644
index 0000000..781dfc2
--- /dev/null
+++ b/src/imports/folderlistmodel/folderlistmodel.pro
@@ -0,0 +1,26 @@
+TARGET = qmlfolderlistmodelplugin
+TARGETPATH = Qt/labs/folderlistmodel
+include(../qimportbase.pri)
+
+QT += declarative script
+
+SOURCES += qdeclarativefolderlistmodel.cpp plugin.cpp
+HEADERS += qdeclarativefolderlistmodel.h
+
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/$$TARGETPATH
+target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
+
+qmldir.files += $$PWD/qmldir
+qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
+
+symbian:{
+ load(data_caging_paths)
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+
+ importFiles.sources = qmlfolderlistmodelplugin.dll qmldir
+ importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
+
+ DEPLOYMENT = importFiles
+}
+
+INSTALLS += target qmldir
diff --git a/src/imports/folderlistmodel/plugin.cpp b/src/imports/folderlistmodel/plugin.cpp
new file mode 100644
index 0000000..d4569f7
--- /dev/null
+++ b/src/imports/folderlistmodel/plugin.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 plugins 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 <QtDeclarative/qdeclarativeextensionplugin.h>
+#include <QtDeclarative/qdeclarative.h>
+
+#include "qdeclarativefolderlistmodel.h"
+
+QT_BEGIN_NAMESPACE
+
+//![class decl]
+class QmlFolderListModelPlugin : public QDeclarativeExtensionPlugin
+{
+ Q_OBJECT
+public:
+ virtual void registerTypes(const char *uri)
+ {
+ Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.folderlistmodel"));
+ qmlRegisterType<QDeclarativeFolderListModel>(uri,1,0,"FolderListModel");
+ }
+};
+//![class decl]
+
+QT_END_NAMESPACE
+
+#include "plugin.moc"
+
+//![plugin export decl]
+Q_EXPORT_PLUGIN2(qmlfolderlistmodelplugin, QT_PREPEND_NAMESPACE(QmlFolderListModelPlugin));
+//![plugin export decl]
+
diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
new file mode 100644
index 0000000..6a7383a
--- /dev/null
+++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
@@ -0,0 +1,401 @@
+/****************************************************************************
+**
+** 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: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$
+**
+****************************************************************************/
+
+//![code]
+#include "qdeclarativefolderlistmodel.h"
+#include <QDirModel>
+#include <QDebug>
+#include <qdeclarativecontext.h>
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeFolderListModelPrivate
+{
+public:
+ QDeclarativeFolderListModelPrivate()
+ : sortField(QDeclarativeFolderListModel::Name), sortReversed(false), count(0) {
+ nameFilters << QLatin1String("*");
+ }
+
+ void updateSorting() {
+ QDir::SortFlags flags = 0;
+ switch(sortField) {
+ case QDeclarativeFolderListModel::Unsorted:
+ flags |= QDir::Unsorted;
+ break;
+ case QDeclarativeFolderListModel::Name:
+ flags |= QDir::Name;
+ break;
+ case QDeclarativeFolderListModel::Time:
+ flags |= QDir::Time;
+ break;
+ case QDeclarativeFolderListModel::Size:
+ flags |= QDir::Size;
+ break;
+ case QDeclarativeFolderListModel::Type:
+ flags |= QDir::Type;
+ break;
+ }
+
+ if (sortReversed)
+ flags |= QDir::Reversed;
+
+ model.setSorting(flags);
+ }
+
+ QDirModel model;
+ QUrl folder;
+ QStringList nameFilters;
+ QModelIndex folderIndex;
+ QDeclarativeFolderListModel::SortField sortField;
+ bool sortReversed;
+ int count;
+};
+
+/*!
+ \qmlclass FolderListModel
+ \brief The FolderListModel provides a model of the contents of a folder in a filesystem.
+
+ FolderListModel provides access to the local filesystem. The \e folder property
+ specifies the folder to list.
+
+ Qt uses "/" as a universal directory separator in the same way that "/" is
+ used as a path separator in URLs. If you always use "/" as a directory
+ separator, Qt will translate your paths to conform to the underlying
+ operating system.
+
+ This type is made available by importing the \c Qt.labs.folderlistmodel module.
+ \e {Elements in the Qt.labs module are not guaranteed to remain compatible
+ in future versions.}
+
+ \bold{import Qt.labs.folderlistmodel 1.0}
+
+ The roles available are:
+ \list
+ \o fileName
+ \o filePath
+ \endlist
+
+ Additionally a file entry can be differentiated from a folder entry
+ via the \l isFolder() method.
+*/
+
+QDeclarativeFolderListModel::QDeclarativeFolderListModel(QObject *parent)
+ : QAbstractListModel(parent)
+{
+ QHash<int, QByteArray> roles;
+ roles[FileNameRole] = "fileName";
+ roles[FilePathRole] = "filePath";
+ setRoleNames(roles);
+
+ d = new QDeclarativeFolderListModelPrivate;
+ d->model.setFilter(QDir::AllDirs | QDir::Files | QDir::Drives | QDir::NoDotAndDotDot);
+ connect(&d->model, SIGNAL(rowsInserted(const QModelIndex&,int,int))
+ , this, SLOT(inserted(const QModelIndex&,int,int)));
+ connect(&d->model, SIGNAL(rowsRemoved(const QModelIndex&,int,int))
+ , this, SLOT(removed(const QModelIndex&,int,int)));
+ connect(&d->model, SIGNAL(dataChanged(const QModelIndex&,const QModelIndex&))
+ , this, SLOT(dataChanged(const QModelIndex&,const QModelIndex&)));
+ connect(&d->model, SIGNAL(modelReset()), this, SLOT(refresh()));
+ connect(&d->model, SIGNAL(layoutChanged()), this, SLOT(refresh()));
+}
+
+QDeclarativeFolderListModel::~QDeclarativeFolderListModel()
+{
+ delete d;
+}
+
+QVariant QDeclarativeFolderListModel::data(const QModelIndex &index, int role) const
+{
+ QVariant rv;
+ QModelIndex modelIndex = d->model.index(index.row(), 0, d->folderIndex);
+ if (modelIndex.isValid()) {
+ if (role == FileNameRole)
+ rv = d->model.data(modelIndex, QDirModel::FileNameRole).toString();
+ else if (role == FilePathRole)
+ rv = QUrl::fromLocalFile(d->model.data(modelIndex, QDirModel::FilePathRole).toString());
+ }
+ return rv;
+}
+
+int QDeclarativeFolderListModel::rowCount(const QModelIndex &parent) const
+{
+ Q_UNUSED(parent);
+ return d->count;
+}
+
+/*!
+ \qmlproperty string FolderListModel::folder
+
+ The \a folder property holds the folder the model is currently providing.
+
+ It is a URL, but must be a file: or qrc: URL (or relative to such a URL).
+*/
+QUrl QDeclarativeFolderListModel::folder() const
+{
+ return d->folder;
+}
+
+void QDeclarativeFolderListModel::setFolder(const QUrl &folder)
+{
+ if (folder == d->folder)
+ return;
+ QModelIndex index = d->model.index(folder.toLocalFile());
+ if (index.isValid() && d->model.isDir(index)) {
+ d->folder = folder;
+ QMetaObject::invokeMethod(this, "refresh", Qt::QueuedConnection);
+ emit folderChanged();
+ }
+}
+
+QUrl QDeclarativeFolderListModel::parentFolder() const
+{
+ QUrl r;
+ QString localFile = d->folder.toLocalFile();
+ if (!localFile.isEmpty()) {
+ QDir dir(localFile);
+#if defined(Q_OS_SYMBIAN)
+ if (dir.isRoot())
+ dir.setPath("");
+ else
+#endif
+ dir.cdUp();
+ r = d->folder;
+ r.setPath(dir.path());
+ } else {
+ int pos = d->folder.path().lastIndexOf(QLatin1Char('/'));
+ if (pos == -1)
+ return QUrl();
+ r = d->folder;
+ r.setPath(d->folder.path().left(pos));
+ }
+ return r;
+}
+
+/*!
+ \qmlproperty list<string> FolderListModel::nameFilters
+
+ The \a nameFilters property contains a list of filename filters.
+ The filters may include the ? and * wildcards.
+
+ The example below filters on PNG and JPEG files:
+
+ \code
+ FolderListModel {
+ nameFilters: [ "*.png", "*.jpg" ]
+ }
+ \endcode
+*/
+QStringList QDeclarativeFolderListModel::nameFilters() const
+{
+ return d->nameFilters;
+}
+
+void QDeclarativeFolderListModel::setNameFilters(const QStringList &filters)
+{
+ d->nameFilters = filters;
+ d->model.setNameFilters(d->nameFilters);
+}
+
+void QDeclarativeFolderListModel::classBegin()
+{
+}
+
+void QDeclarativeFolderListModel::componentComplete()
+{
+ if (!d->folder.isValid() || !QDir().exists(d->folder.toLocalFile()))
+ setFolder(QUrl(QLatin1String("file://")+QDir::currentPath()));
+
+ if (!d->folderIndex.isValid())
+ QMetaObject::invokeMethod(this, "refresh", Qt::QueuedConnection);
+}
+
+QDeclarativeFolderListModel::SortField QDeclarativeFolderListModel::sortField() const
+{
+ return d->sortField;
+}
+
+void QDeclarativeFolderListModel::setSortField(SortField field)
+{
+ if (field != d->sortField) {
+ d->sortField = field;
+ d->updateSorting();
+ }
+}
+
+bool QDeclarativeFolderListModel::sortReversed() const
+{
+ return d->sortReversed;
+}
+
+void QDeclarativeFolderListModel::setSortReversed(bool rev)
+{
+ if (rev != d->sortReversed) {
+ d->sortReversed = rev;
+ d->updateSorting();
+ }
+}
+
+/*!
+ \qmlmethod bool FolderListModel::isFolder(int index)
+
+ Returns true if the entry \a index is a folder; otherwise
+ returns false.
+*/
+bool QDeclarativeFolderListModel::isFolder(int index) const
+{
+ if (index != -1) {
+ QModelIndex idx = d->model.index(index, 0, d->folderIndex);
+ if (idx.isValid())
+ return d->model.isDir(idx);
+ }
+ return false;
+}
+
+void QDeclarativeFolderListModel::refresh()
+{
+ d->folderIndex = QModelIndex();
+ if (d->count) {
+ emit beginRemoveRows(QModelIndex(), 0, d->count);
+ d->count = 0;
+ emit endRemoveRows();
+ }
+ d->folderIndex = d->model.index(d->folder.toLocalFile());
+ int newcount = d->model.rowCount(d->folderIndex);
+ if (newcount) {
+ emit beginInsertRows(QModelIndex(), 0, newcount-1);
+ d->count = newcount;
+ emit endInsertRows();
+ }
+}
+
+void QDeclarativeFolderListModel::inserted(const QModelIndex &index, int start, int end)
+{
+ if (index == d->folderIndex) {
+ emit beginInsertRows(QModelIndex(), start, end);
+ d->count = d->model.rowCount(d->folderIndex);
+ emit endInsertRows();
+ }
+}
+
+void QDeclarativeFolderListModel::removed(const QModelIndex &index, int start, int end)
+{
+ if (index == d->folderIndex) {
+ emit beginRemoveRows(QModelIndex(), start, end);
+ d->count = d->model.rowCount(d->folderIndex);
+ emit endRemoveRows();
+ }
+}
+
+void QDeclarativeFolderListModel::dataChanged(const QModelIndex &start, const QModelIndex &end)
+{
+ if (start.parent() == d->folderIndex)
+ emit dataChanged(index(start.row(),0), index(end.row(),0));
+}
+
+/*!
+ \qmlproperty bool FolderListModel::showDirs
+
+ If true (the default), directories are included in the model.
+
+ Note that the nameFilters are ignored for directories.
+*/
+bool QDeclarativeFolderListModel::showDirs() const
+{
+ return d->model.filter() & QDir::AllDirs;
+}
+
+void QDeclarativeFolderListModel::setShowDirs(bool on)
+{
+ if (!(d->model.filter() & QDir::AllDirs) == !on)
+ return;
+ if (on)
+ d->model.setFilter(d->model.filter() | QDir::AllDirs | QDir::Drives);
+ else
+ d->model.setFilter(d->model.filter() & ~(QDir::AllDirs | QDir::Drives));
+}
+
+/*!
+ \qmlproperty bool FolderListModel::showDotAndDotDot
+
+ If true, the "." and ".." directories are included in the model.
+
+ The default is false.
+*/
+bool QDeclarativeFolderListModel::showDotAndDotDot() const
+{
+ return !(d->model.filter() & QDir::NoDotAndDotDot);
+}
+
+void QDeclarativeFolderListModel::setShowDotAndDotDot(bool on)
+{
+ if (!(d->model.filter() & QDir::NoDotAndDotDot) == on)
+ return;
+ if (on)
+ d->model.setFilter(d->model.filter() & ~QDir::NoDotAndDotDot);
+ else
+ d->model.setFilter(d->model.filter() | QDir::NoDotAndDotDot);
+}
+
+/*!
+ \qmlproperty bool FolderListModel::showOnlyReadable
+
+ If true, only readable files and directories are shown.
+
+ The default is false.
+*/
+bool QDeclarativeFolderListModel::showOnlyReadable() const
+{
+ return d->model.filter() & QDir::Readable;
+}
+
+void QDeclarativeFolderListModel::setShowOnlyReadable(bool on)
+{
+ if (!(d->model.filter() & QDir::Readable) == !on)
+ return;
+ if (on)
+ d->model.setFilter(d->model.filter() | QDir::Readable);
+ else
+ d->model.setFilter(d->model.filter() & ~QDir::Readable);
+}
+
+//![code]
+QT_END_NAMESPACE
diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h
new file mode 100644
index 0000000..ea7d701
--- /dev/null
+++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h
@@ -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 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_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEFOLDERLISTMODEL_H
+#define QDECLARATIVEFOLDERLISTMODEL_H
+
+#include <qdeclarative.h>
+#include <QStringList>
+#include <QUrl>
+#include <QAbstractListModel>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QDeclarativeContext;
+class QModelIndex;
+
+class QDeclarativeFolderListModelPrivate;
+
+//![class begin]
+class QDeclarativeFolderListModel : public QAbstractListModel, public QDeclarativeParserStatus
+{
+ Q_OBJECT
+ Q_INTERFACES(QDeclarativeParserStatus)
+//![class begin]
+
+//![class props]
+ Q_PROPERTY(QUrl folder READ folder WRITE setFolder NOTIFY folderChanged)
+ Q_PROPERTY(QUrl parentFolder READ parentFolder NOTIFY folderChanged)
+ Q_PROPERTY(QStringList nameFilters READ nameFilters WRITE setNameFilters)
+ Q_PROPERTY(SortField sortField READ sortField WRITE setSortField)
+ Q_PROPERTY(bool sortReversed READ sortReversed WRITE setSortReversed)
+ Q_PROPERTY(bool showDirs READ showDirs WRITE setShowDirs)
+ Q_PROPERTY(bool showDotAndDotDot READ showDotAndDotDot WRITE setShowDotAndDotDot)
+ Q_PROPERTY(bool showOnlyReadable READ showOnlyReadable WRITE setShowOnlyReadable)
+ Q_PROPERTY(int count READ count)
+//![class props]
+
+//![abslistmodel]
+public:
+ QDeclarativeFolderListModel(QObject *parent = 0);
+ ~QDeclarativeFolderListModel();
+
+ enum Roles { FileNameRole = Qt::UserRole+1, FilePathRole = Qt::UserRole+2 };
+
+ int rowCount(const QModelIndex &parent) const;
+ QVariant data(const QModelIndex &index, int role) const;
+//![abslistmodel]
+
+//![count]
+ int count() const { return rowCount(QModelIndex()); }
+//![count]
+
+//![prop funcs]
+ QUrl folder() const;
+ void setFolder(const QUrl &folder);
+
+ QUrl parentFolder() const;
+
+ QStringList nameFilters() const;
+ void setNameFilters(const QStringList &filters);
+
+ enum SortField { Unsorted, Name, Time, Size, Type };
+ SortField sortField() const;
+ void setSortField(SortField field);
+ Q_ENUMS(SortField)
+
+ bool sortReversed() const;
+ void setSortReversed(bool rev);
+
+ bool showDirs() const;
+ void setShowDirs(bool);
+ bool showDotAndDotDot() const;
+ void setShowDotAndDotDot(bool);
+ bool showOnlyReadable() const;
+ void setShowOnlyReadable(bool);
+//![prop funcs]
+
+//![isfolder]
+ Q_INVOKABLE bool isFolder(int index) const;
+//![isfolder]
+
+//![parserstatus]
+ virtual void classBegin();
+ virtual void componentComplete();
+//![parserstatus]
+
+//![notifier]
+Q_SIGNALS:
+ void folderChanged();
+//![notifier]
+
+//![class end]
+private Q_SLOTS:
+ void refresh();
+ void inserted(const QModelIndex &index, int start, int end);
+ void removed(const QModelIndex &index, int start, int end);
+ void dataChanged(const QModelIndex &start, const QModelIndex &end);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeFolderListModel)
+ QDeclarativeFolderListModelPrivate *d;
+};
+//![class end]
+
+QT_END_NAMESPACE
+
+//![qml decl]
+QML_DECLARE_TYPE(QDeclarativeFolderListModel)
+//![qml decl]
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEFOLDERLISTMODEL_H
diff --git a/src/imports/folderlistmodel/qmldir b/src/imports/folderlistmodel/qmldir
new file mode 100644
index 0000000..6e115bb
--- /dev/null
+++ b/src/imports/folderlistmodel/qmldir
@@ -0,0 +1 @@
+plugin qmlfolderlistmodelplugin
diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp
index 615c674..1b0aeeb 100644
--- a/src/imports/gestures/qdeclarativegesturearea.cpp
+++ b/src/imports/gestures/qdeclarativegesturearea.cpp
@@ -226,7 +226,7 @@ void QDeclarativeGestureArea::connectSignals()
ds >> gesturetype;
QString script;
ds >> script;
- QDeclarativeExpression *exp = new QDeclarativeExpression(qmlContext(this), script, 0);
+ QDeclarativeExpression *exp = new QDeclarativeExpression(qmlContext(this), 0, script);
d->bindings.insert(Qt::GestureType(gesturetype),exp);
grabGesture(Qt::GestureType(gesturetype));
}
@@ -259,7 +259,7 @@ bool QDeclarativeGestureAreaPrivate::gestureEvent(QGestureEvent *event)
bool accept = true;
for (Bindings::Iterator it = bindings.begin(); it != bindings.end(); ++it) {
if ((gesture = event->gesture(it.key()))) {
- it.value()->value();
+ it.value()->evaluate();
event->setAccepted(true); // XXX only if value returns true?
}
}
diff --git a/src/imports/imports.pro b/src/imports/imports.pro
index ecde0cc..7f9331a 100644
--- a/src/imports/imports.pro
+++ b/src/imports/imports.pro
@@ -1,7 +1,6 @@
TEMPLATE = subdirs
-SUBDIRS += widgets particles
+SUBDIRS += folderlistmodel particles gestures
contains(QT_CONFIG, webkit): SUBDIRS += webkit
-contains(QT_CONFIG, mediaservices): SUBDIRS += multimedia
diff --git a/src/imports/multimedia/multimedia.cpp b/src/imports/multimedia/multimedia.cpp
deleted file mode 100644
index e2a2821..0000000
--- a/src/imports/multimedia/multimedia.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 <QtDeclarative/qdeclarativeextensionplugin.h>
-#include <QtDeclarative/qdeclarative.h>
-#include <QtMediaServices/private/qsoundeffect_p.h>
-
-#include "qdeclarativevideo_p.h"
-#include "qdeclarativeaudio_p.h"
-
-
-QML_DECLARE_TYPE(QSoundEffect)
-
-QT_BEGIN_NAMESPACE
-
-class QMultimediaDeclarativeModule : public QDeclarativeExtensionPlugin
-{
- Q_OBJECT
-public:
- virtual void registerTypes(const char *uri)
- {
- Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.multimedia"));
-
- qmlRegisterType<QSoundEffect>(uri, 4, 7, "SoundEffect");
- qmlRegisterType<QDeclarativeAudio>(uri, 4, 7, "Audio");
- qmlRegisterType<QDeclarativeVideo>(uri, 4, 7, "Video");
- }
-};
-
-QT_END_NAMESPACE
-
-#include "multimedia.moc"
-
-Q_EXPORT_PLUGIN2(qmultimediadeclarativemodule, QT_PREPEND_NAMESPACE(QMultimediaDeclarativeModule));
-
diff --git a/src/imports/multimedia/multimedia.pro b/src/imports/multimedia/multimedia.pro
deleted file mode 100644
index 212f7b9..0000000
--- a/src/imports/multimedia/multimedia.pro
+++ /dev/null
@@ -1,36 +0,0 @@
-TARGET = multimedia
-TARGETPATH = Qt/multimedia
-include(../qimportbase.pri)
-
-QT += mediaservices declarative
-
-HEADERS += \
- qdeclarativeaudio_p.h \
- qdeclarativemediabase_p.h \
- qdeclarativevideo_p.h \
- qmetadatacontrolmetaobject_p.h \
-
-SOURCES += \
- multimedia.cpp \
- qdeclarativeaudio.cpp \
- qdeclarativemediabase.cpp \
- qdeclarativevideo.cpp \
- qmetadatacontrolmetaobject.cpp
-
-QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/$$TARGETPATH
-target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-qmldir.files += $$PWD/qmldir
-qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-symbian:{
- load(data_caging_paths)
- include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
-
- importFiles.sources = multimedia.dll qmldir
- importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
-
- DEPLOYMENT = importFiles
-}
-
-INSTALLS += target qmldir
diff --git a/src/imports/multimedia/qdeclarativeaudio.cpp b/src/imports/multimedia/qdeclarativeaudio.cpp
deleted file mode 100644
index a163b10..0000000
--- a/src/imports/multimedia/qdeclarativeaudio.cpp
+++ /dev/null
@@ -1,357 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qdeclarativeaudio_p.h"
-
-#include <QtMediaServices/qmediaplayercontrol.h>
-
-QT_BEGIN_NAMESPACE
-
-
-/*!
- \qmlclass Audio QDeclarativeAudio
- \since 4.7
- \brief The Audio element allows you to add audio playback to a scene.
-
- This element is part of the \bold{Qt.multimedia 4.7} module.
-
- \qml
- import Qt 4.7
- import Qt.multimedia 4.7
-
- Text {
- text: "Click Me!";
- font.pointSize: 24;
- width: 150; height: 50;
-
- Audio {
- id: playMusic
- source: "music.wav"
- }
- MouseArea {
- id: playArea
- anchors.fill: parent
- onPressed: { playMusic.play() }
- }
- }
- \endqml
-
- \sa Video
-*/
-
-/*!
- \internal
- \class QDeclarativeAudio
- \brief The QDeclarativeAudio class provides an audio item that you can add to a QDeclarativeView.
-*/
-
-void QDeclarativeAudio::_q_error(int errorCode, const QString &errorString)
-{
- m_error = QMediaPlayer::Error(errorCode);
- m_errorString = errorString;
-
- emit error(Error(errorCode), errorString);
- emit errorChanged();
-}
-
-
-QDeclarativeAudio::QDeclarativeAudio(QObject *parent)
- : QObject(parent)
-{
-}
-
-QDeclarativeAudio::~QDeclarativeAudio()
-{
- shutdown();
-}
-
-/*!
- \qmlmethod Audio::play()
-
- Starts playback of the media.
-
- Sets the \l playing property to true, and the \l paused property to false.
-*/
-
-void QDeclarativeAudio::play()
-{
- if (m_playerControl == 0)
- return;
-
- setPaused(false);
- setPlaying(true);
-}
-
-/*!
- \qmlmethod Audio::pause()
-
- Pauses playback of the media.
-
- Sets the \l playing and \l paused properties to true.
-*/
-
-void QDeclarativeAudio::pause()
-{
- if (m_playerControl == 0)
- return;
-
- setPaused(true);
- setPlaying(true);
-}
-
-/*!
- \qmlmethod Audio::stop()
-
- Stops playback of the media.
-
- Sets the \l playing and \l paused properties to false.
-*/
-
-void QDeclarativeAudio::stop()
-{
- if (m_playerControl == 0)
- return;
-
- setPlaying(false);
- setPaused(false);
-}
-
-/*!
- \qmlproperty url Audio::source
-
- This property holds the source URL of the media.
-*/
-
-/*!
- \qmlproperty url Audio::autoLoad
-
- This property indicates if loading of media should begin immediately.
-
- Defaults to true, if false media will not be loaded until playback is started.
-*/
-
-/*!
- \qmlproperty bool Audio::playing
-
- This property holds whether the media is playing.
-
- Defaults to false, and can be set to true to start playback.
-*/
-
-/*!
- \qmlproperty bool Audio::paused
-
- This property holds whether the media is paused.
-
- Defaults to false, and can be set to true to pause playback.
-*/
-
-/*!
- \qmlsignal Audio::onStarted()
-
- This handler is called when playback is started.
-*/
-
-/*!
- \qmlsignal Audio::onResumed()
-
- This handler is called when playback is resumed from the paused state.
-*/
-
-/*!
- \qmlsignal Audio::onPaused()
-
- This handler is called when playback is paused.
-*/
-
-/*!
- \qmlsignal Audio::onStopped()
-
- This handler is called when playback is stopped.
-*/
-
-/*!
- \qmlproperty enumeration Audio::status
-
- This property holds the status of media loading. It can be one of:
-
- \list
- \o NoMedia - no media has been set.
- \o Loading - the media is currently being loaded.
- \o Loaded - the media has been loaded.
- \o Buffering - the media is buffering data.
- \o Stalled - playback has been interrupted while the media is buffering data.
- \o Buffered - the media has buffered data.
- \o EndOfMedia - the media has played to the end.
- \o InvalidMedia - the media cannot be played.
- \o UnknownStatus - the status of the media is unknown.
- \endlist
-*/
-
-QDeclarativeAudio::Status QDeclarativeAudio::status() const
-{
- return Status(m_status);
-}
-
-/*!
- \qmlsignal Audio::onLoaded()
-
- This handler is called when the media source has been loaded.
-*/
-
-/*!
- \qmlsignal Audio::onBuffering()
-
- This handler is called when the media starts buffering.
-*/
-
-/*!
- \qmlsignal Audio::onStalled()
-
- This handler is called when playback has stalled while the media buffers.
-*/
-
-/*!
- \qmlsignal Audio::onBuffered()
-
- This handler is called when the media has finished buffering.
-*/
-
-/*!
- \qmlsignal Audio::onEndOfMedia()
-
- This handler is called when playback stops because end of the media has been reached.
-*/
-/*!
- \qmlproperty int Audio::duration
-
- This property holds the duration of the media in milliseconds.
-
- If the media doesn't have a fixed duration (a live stream for example) this will be 0.
-*/
-
-/*!
- \qmlproperty int Audio::position
-
- This property holds the current playback position in milliseconds.
-
- If the \l seekable property is true, this property can be set to seek to a new position.
-*/
-
-/*!
- \qmlproperty real Audio::volume
-
- This property holds the volume of the audio output, from 0.0 (silent) to 1.0 (maximum volume).
-*/
-
-/*!
- \qmlproperty bool Audio::muted
-
- This property holds whether the audio output is muted.
-*/
-
-/*!
- \qmlproperty real Audio::bufferProgress
-
- This property holds how much of the data buffer is currently filled, from 0.0 (empty) to 1.0
- (full).
-*/
-
-/*!
- \qmlproperty bool Audio::seekable
-
- This property holds whether position of the audio can be changed.
-
- If true; setting a \l position value will cause playback to seek to the new position.
-*/
-
-/*!
- \qmlproperty real Audio::playbackRate
-
- This property holds the rate at which audio is played at as a multiple of the normal rate.
-*/
-
-/*!
- \qmlproperty enumeration Audio::error
-
- This property holds the error state of the audio. It can be one of:
-
- \list
- \o NoError - there is no current error.
- \o ResourceError - the audio cannot be played due to a problem allocating resources.
- \o FormatError - the audio format is not supported.
- \o NetworkError - the audio cannot be played due to network issues.
- \o AccessDenied - the audio cannot be played due to insufficient permissions.
- \o ServiceMissing - the audio cannot be played because the media service could not be
- instantiated.
- \endlist
-*/
-
-QDeclarativeAudio::Error QDeclarativeAudio::error() const
-{
- return Error(m_error);
-}
-
-void QDeclarativeAudio::componentComplete()
-{
- setObject(this);
-}
-
-
-/*!
- \qmlproperty string Audio::errorString
-
- This property holds a string describing the current error condition in more detail.
-*/
-
-/*!
- \qmlsignal Audio::onError(error, errorString)
-
- This handler is called when an \l {QMediaPlayer::Error}{error} has
- occurred. The errorString parameter may contain more detailed
- information about the error.
-*/
-
-QT_END_NAMESPACE
-
-#include "moc_qdeclarativeaudio_p.cpp"
-
-
diff --git a/src/imports/multimedia/qdeclarativeaudio_p.h b/src/imports/multimedia/qdeclarativeaudio_p.h
deleted file mode 100644
index 24276ea..0000000
--- a/src/imports/multimedia/qdeclarativeaudio_p.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QDECLARATIVEAUDIO_P_H
-#define QDECLARATIVEAUDIO_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 "qdeclarativemediabase_p.h"
-
-#include <QtCore/qbasictimer.h>
-#include <QtDeclarative/qdeclarativeitem.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QTimerEvent;
-
-class QDeclarativeAudio : public QObject, public QDeclarativeMediaBase, public QDeclarativeParserStatus
-{
- Q_OBJECT
- Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
- Q_PROPERTY(bool autoLoad READ isAutoLoad WRITE setAutoLoad NOTIFY autoLoadChanged)
- Q_PROPERTY(bool playing READ isPlaying WRITE setPlaying NOTIFY playingChanged)
- Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
- Q_PROPERTY(Status status READ status NOTIFY statusChanged)
- Q_PROPERTY(int duration READ duration NOTIFY durationChanged)
- Q_PROPERTY(int position READ position WRITE setPosition NOTIFY positionChanged)
- Q_PROPERTY(qreal volume READ volume WRITE setVolume NOTIFY volumeChanged)
- Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
- Q_PROPERTY(int bufferProgress READ bufferProgress NOTIFY bufferProgressChanged)
- Q_PROPERTY(bool seekable READ isSeekable NOTIFY seekableChanged)
- Q_PROPERTY(qreal playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged)
- Q_PROPERTY(Error error READ error NOTIFY errorChanged)
- Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged)
- Q_ENUMS(Status)
- Q_ENUMS(Error)
- Q_INTERFACES(QDeclarativeParserStatus)
-public:
- enum Status
- {
- UnknownStatus = QMediaPlayer::UnknownMediaStatus,
- NoMedia = QMediaPlayer::NoMedia,
- Loading = QMediaPlayer::LoadingMedia,
- Loaded = QMediaPlayer::LoadedMedia,
- Stalled = QMediaPlayer::StalledMedia,
- Buffering = QMediaPlayer::BufferingMedia,
- Buffered = QMediaPlayer::BufferedMedia,
- EndOfMedia = QMediaPlayer::EndOfMedia,
- InvalidMedia = QMediaPlayer::InvalidMedia
- };
-
- enum Error
- {
- NoError = QMediaPlayer::NoError,
- ResourceError = QMediaPlayer::ResourceError,
- FormatError = QMediaPlayer::FormatError,
- NetworkError = QMediaPlayer::NetworkError,
- AccessDenied = QMediaPlayer::AccessDeniedError,
- ServiceMissing = QMediaPlayer::ServiceMissingError
- };
-
- QDeclarativeAudio(QObject *parent = 0);
- ~QDeclarativeAudio();
-
- Status status() const;
- Error error() const;
-
- void componentComplete();
-
-public Q_SLOTS:
- void play();
- void pause();
- void stop();
-
-Q_SIGNALS:
- void sourceChanged();
- void autoLoadChanged();
- void playingChanged();
- void pausedChanged();
-
- void started();
- void resumed();
- void paused();
- void stopped();
-
- void statusChanged();
-
- void loaded();
- void buffering();
- void stalled();
- void buffered();
- void endOfMedia();
-
- void durationChanged();
- void positionChanged();
-
- void volumeChanged();
- void mutedChanged();
-
- void bufferProgressChanged();
-
- void seekableChanged();
- void playbackRateChanged();
-
- void errorChanged();
- void error(QDeclarativeAudio::Error error, const QString &errorString);
-
-private Q_SLOTS:
- void _q_error(int, const QString &);
-
-private:
- Q_DISABLE_COPY(QDeclarativeAudio)
- Q_PRIVATE_SLOT(mediaBase(), void _q_stateChanged(QMediaPlayer::State))
- Q_PRIVATE_SLOT(mediaBase(), void _q_mediaStatusChanged(QMediaPlayer::MediaStatus))
- Q_PRIVATE_SLOT(mediaBase(), void _q_metaDataChanged())
-
- inline QDeclarativeMediaBase *mediaBase() { return this; }
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeAudio))
-
-QT_END_HEADER
-
-#endif
diff --git a/src/imports/multimedia/qdeclarativemediabase.cpp b/src/imports/multimedia/qdeclarativemediabase.cpp
deleted file mode 100644
index ee0737b..0000000
--- a/src/imports/multimedia/qdeclarativemediabase.cpp
+++ /dev/null
@@ -1,528 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qdeclarativemediabase_p.h"
-
-#include <QtCore/qcoreevent.h>
-#include <QtCore/qurl.h>
-
-#include <QtMediaServices/qmediaplayercontrol.h>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qmediaserviceprovider.h>
-#include <QtMediaServices/qmetadatacontrol.h>
-#include "qmetadatacontrolmetaobject_p.h"
-
-
-
-QT_BEGIN_NAMESPACE
-
-
-class QDeclarativeMediaBaseObject : public QMediaObject
-{
-public:
- QDeclarativeMediaBaseObject(QMediaService *service)
- : QMediaObject(0, service)
- {
- }
-};
-
-class QDeclarativeMediaBasePlayerControl : public QMediaPlayerControl
-{
-public:
- QDeclarativeMediaBasePlayerControl(QObject *parent)
- : QMediaPlayerControl(parent)
- {
- }
-
- QMediaPlayer::State state() const { return QMediaPlayer::StoppedState; }
- QMediaPlayer::MediaStatus mediaStatus() const { return QMediaPlayer::NoMedia; }
-
- qint64 duration() const { return 0; }
- qint64 position() const { return 0; }
- void setPosition(qint64) {}
- int volume() const { return 0; }
- void setVolume(int) {}
- bool isMuted() const { return false; }
- void setMuted(bool) {}
- int bufferStatus() const { return 0; }
- bool isAudioAvailable() const { return false; }
- bool isVideoAvailable() const { return false; }
- bool isSeekable() const { return false; }
- QMediaTimeRange availablePlaybackRanges() const { return QMediaTimeRange(); }
- qreal playbackRate() const { return 1; }
- void setPlaybackRate(qreal) {}
- QMediaContent media() const { return QMediaContent(); }
- const QIODevice *mediaStream() const { return 0; }
- void setMedia(const QMediaContent &, QIODevice *) {}
-
- void play() {}
- void pause() {}
- void stop() {}
-};
-
-class QDeclarativeMediaBaseAnimation : public QObject
-{
-public:
- QDeclarativeMediaBaseAnimation(QDeclarativeMediaBase *media)
- : m_media(media)
- {
- }
-
- void start() { if (!m_timer.isActive()) m_timer.start(500, this); }
- void stop() { m_timer.stop(); }
-
-protected:
- void timerEvent(QTimerEvent *event)
- {
- if (event->timerId() == m_timer.timerId()) {
- event->accept();
-
- if (m_media->m_state == QMediaPlayer::PlayingState)
- emit m_media->positionChanged();
- if (m_media->m_status == QMediaPlayer::BufferingMedia || QMediaPlayer::StalledMedia)
- emit m_media->bufferProgressChanged();
- } else {
- QObject::timerEvent(event);
- }
- }
-
-private:
- QDeclarativeMediaBase *m_media;
- QBasicTimer m_timer;
-};
-
-void QDeclarativeMediaBase::_q_stateChanged(QMediaPlayer::State state)
-{
- if (m_state == state)
- return;
-
- switch (state) {
- case QMediaPlayer::StoppedState: {
- emit stopped();
-
- if (m_playing) {
- m_playing = false;
- emit playingChanged();
- }
- }
- break;
- case QMediaPlayer::PausedState: {
- emit paused();
-
- if (!m_paused) {
- m_paused = true;
- emit pausedChanged();
- }
-
- if (m_state == QMediaPlayer::StoppedState)
- emit started();
- }
- break;
- case QMediaPlayer::PlayingState: {
- if (m_state == QMediaPlayer::PausedState)
- emit resumed();
- else
- emit started();
-
- if (m_paused) {
- m_paused = false;
- emit pausedChanged();
- }
- }
- break;
- }
-
- // Check
- if (state == QMediaPlayer::PlayingState
- || m_status == QMediaPlayer::BufferingMedia
- || m_status == QMediaPlayer::StalledMedia) {
- m_animation->start();
- }
- else {
- m_animation->stop();
- }
-
- m_state = state;
-}
-
-void QDeclarativeMediaBase::_q_mediaStatusChanged(QMediaPlayer::MediaStatus status)
-{
- if (status != m_status) {
- m_status = status;
-
- switch (status) {
- case QMediaPlayer::LoadedMedia:
- emit loaded();
- break;
- case QMediaPlayer::BufferingMedia:
- emit buffering();
- break;
- case QMediaPlayer::BufferedMedia:
- emit buffered();
- break;
- case QMediaPlayer::StalledMedia:
- emit stalled();
- break;
- case QMediaPlayer::EndOfMedia:
- emit endOfMedia();
- break;
- default:
- break;
- }
-
- emit statusChanged();
-
- if (m_state == QMediaPlayer::PlayingState
- || m_status == QMediaPlayer::BufferingMedia
- || m_status == QMediaPlayer::StalledMedia) {
- m_animation->start();
- } else {
- m_animation->stop();
- }
- }
-}
-
-void QDeclarativeMediaBase::_q_metaDataChanged()
-{
- m_metaObject->metaDataChanged();
-}
-
-QDeclarativeMediaBase::QDeclarativeMediaBase()
- : m_paused(false)
- , m_playing(false)
- , m_autoLoad(true)
- , m_loaded(false)
- , m_muted(false)
- , m_position(0)
- , m_vol(1.0)
- , m_playbackRate(1.0)
- , m_mediaService(0)
- , m_playerControl(0)
- , m_mediaObject(0)
- , m_mediaProvider(0)
- , m_metaDataControl(0)
- , m_metaObject(0)
- , m_animation(0)
- , m_state(QMediaPlayer::StoppedState)
- , m_status(QMediaPlayer::NoMedia)
- , m_error(QMediaPlayer::ServiceMissingError)
-{
-}
-
-QDeclarativeMediaBase::~QDeclarativeMediaBase()
-{
-}
-
-void QDeclarativeMediaBase::shutdown()
-{
- delete m_metaObject;
- delete m_mediaObject;
-
- if (m_mediaProvider)
- m_mediaProvider->releaseService(m_mediaService);
-
- delete m_animation;
-
-}
-
-void QDeclarativeMediaBase::setObject(QObject *object)
-{
- if ((m_mediaProvider = QMediaServiceProvider::defaultServiceProvider())) {
- if ((m_mediaService = m_mediaProvider->requestService(Q_MEDIASERVICE_MEDIAPLAYER))) {
- m_playerControl = qobject_cast<QMediaPlayerControl *>(
- m_mediaService->control(QMediaPlayerControl_iid));
- m_metaDataControl = qobject_cast<QMetaDataControl *>(
- m_mediaService->control(QMetaDataControl_iid));
- m_mediaObject = new QDeclarativeMediaBaseObject(m_mediaService);
- }
- }
-
- if (m_playerControl) {
- QObject::connect(m_playerControl, SIGNAL(stateChanged(QMediaPlayer::State)),
- object, SLOT(_q_stateChanged(QMediaPlayer::State)));
- QObject::connect(m_playerControl, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)),
- object, SLOT(_q_mediaStatusChanged(QMediaPlayer::MediaStatus)));
- QObject::connect(m_playerControl, SIGNAL(mediaChanged(QMediaContent)),
- object, SIGNAL(sourceChanged()));
- QObject::connect(m_playerControl, SIGNAL(durationChanged(qint64)),
- object, SIGNAL(durationChanged()));
- QObject::connect(m_playerControl, SIGNAL(positionChanged(qint64)),
- object, SIGNAL(positionChanged()));
- QObject::connect(m_playerControl, SIGNAL(volumeChanged(int)),
- object, SIGNAL(volumeChanged()));
- QObject::connect(m_playerControl, SIGNAL(mutedChanged(bool)),
- object, SIGNAL(mutedChanged()));
- QObject::connect(m_playerControl, SIGNAL(bufferStatusChanged(int)),
- object, SIGNAL(bufferProgressChanged()));
- QObject::connect(m_playerControl, SIGNAL(seekableChanged(bool)),
- object, SIGNAL(seekableChanged()));
- QObject::connect(m_playerControl, SIGNAL(playbackRateChanged(qreal)),
- object, SIGNAL(playbackRateChanged()));
- QObject::connect(m_playerControl, SIGNAL(error(int,QString)),
- object, SLOT(_q_error(int,QString)));
-
- m_animation = new QDeclarativeMediaBaseAnimation(this);
- m_error = QMediaPlayer::NoError;
- } else {
- m_playerControl = new QDeclarativeMediaBasePlayerControl(object);
- }
-
- if (m_metaDataControl) {
- m_metaObject = new QMetaDataControlMetaObject(m_metaDataControl, object);
-
- QObject::connect(m_metaDataControl, SIGNAL(metaDataChanged()),
- object, SLOT(_q_metaDataChanged()));
- }
-
- // Init
- m_playerControl->setVolume(m_vol * 100);
- m_playerControl->setMuted(m_muted);
- m_playerControl->setPlaybackRate(m_playbackRate);
-
- if (!m_source.isEmpty() && (m_autoLoad || m_playing)) // Override autoLoad if playing set
- m_playerControl->setMedia(m_source, 0);
-
- if (m_paused)
- m_playerControl->pause();
- else if (m_playing)
- m_playerControl->play();
-
- if ((m_playing || m_paused) && m_position > 0)
- m_playerControl->setPosition(m_position);
-}
-
-
-// Properties
-
-QUrl QDeclarativeMediaBase::source() const
-{
- return m_source;
-}
-
-void QDeclarativeMediaBase::setSource(const QUrl &url)
-{
- if (url == m_source)
- return;
-
- m_source = url;
- m_loaded = false;
- if (m_playerControl != 0 && m_autoLoad) {
- if (m_error != QMediaPlayer::ServiceMissingError && m_error != QMediaPlayer::NoError) {
- m_error = QMediaPlayer::NoError;
- m_errorString = QString();
-
- emit errorChanged();
- }
-
- m_playerControl->setMedia(m_source, 0);
- m_loaded = true;
- }
- else
- emit sourceChanged();
-}
-
-bool QDeclarativeMediaBase::isAutoLoad() const
-{
- return m_autoLoad;
-}
-
-void QDeclarativeMediaBase::setAutoLoad(bool autoLoad)
-{
- if (m_autoLoad == autoLoad)
- return;
-
- m_autoLoad = autoLoad;
- emit autoLoadChanged();
-}
-
-bool QDeclarativeMediaBase::isPlaying() const
-{
- return m_playing;
-}
-
-void QDeclarativeMediaBase::setPlaying(bool playing)
-{
- if (playing == m_playing)
- return;
-
- m_playing = playing;
- if (m_playerControl != 0) {
- if (m_playing) {
- if (!m_autoLoad && !m_loaded) {
- m_playerControl->setMedia(m_source, 0);
- m_playerControl->setPosition(m_position);
- m_loaded = true;
- }
-
- if (!m_paused)
- m_playerControl->play();
- else
- m_playerControl->pause();
- }
- else if (m_state != QMediaPlayer::StoppedState)
- m_playerControl->stop();
- }
-
- emit playingChanged();
-}
-
-bool QDeclarativeMediaBase::isPaused() const
-{
- return m_paused;
-}
-
-void QDeclarativeMediaBase::setPaused(bool paused)
-{
- if (m_paused == paused)
- return;
-
- m_paused = paused;
- if (m_playerControl != 0) {
- if (!m_autoLoad && !m_loaded) {
- m_playerControl->setMedia(m_source, 0);
- m_playerControl->setPosition(m_position);
- m_loaded = true;
- }
-
- if (m_paused && m_state == QMediaPlayer::PlayingState) {
- m_playerControl->pause();
- }
- else if (!m_paused && m_playing) {
- m_playerControl->play();
- }
- }
-
- emit pausedChanged();
-}
-
-int QDeclarativeMediaBase::duration() const
-{
- return m_playerControl == 0 ? 0 : m_playerControl->duration();
-}
-
-int QDeclarativeMediaBase::position() const
-{
- return m_playerControl == 0 ? m_position : m_playerControl->position();
-}
-
-void QDeclarativeMediaBase::setPosition(int position)
-{
- if (m_position == position)
- return;
-
- m_position = position;
- if (m_playerControl != 0)
- m_playerControl->setPosition(m_position);
- else
- emit positionChanged();
-}
-
-qreal QDeclarativeMediaBase::volume() const
-{
- return m_playerControl == 0 ? m_vol : qreal(m_playerControl->volume()) / 100;
-}
-
-void QDeclarativeMediaBase::setVolume(qreal volume)
-{
- if (m_vol == volume)
- return;
-
- m_vol = volume;
-
- if (m_playerControl != 0)
- m_playerControl->setVolume(qRound(volume * 100));
- else
- emit volumeChanged();
-}
-
-bool QDeclarativeMediaBase::isMuted() const
-{
- return m_playerControl == 0 ? m_muted : m_playerControl->isMuted();
-}
-
-void QDeclarativeMediaBase::setMuted(bool muted)
-{
- if (m_muted == muted)
- return;
-
- m_muted = muted;
-
- if (m_playerControl != 0)
- m_playerControl->setMuted(muted);
- else
- emit mutedChanged();
-}
-
-qreal QDeclarativeMediaBase::bufferProgress() const
-{
- return m_playerControl == 0 ? 0 : qreal(m_playerControl->bufferStatus()) / 100;
-}
-
-bool QDeclarativeMediaBase::isSeekable() const
-{
- return m_playerControl == 0 ? false : m_playerControl->isSeekable();
-}
-
-qreal QDeclarativeMediaBase::playbackRate() const
-{
- return m_playbackRate;
-}
-
-void QDeclarativeMediaBase::setPlaybackRate(qreal rate)
-{
- if (m_playbackRate == rate)
- return;
-
- m_playbackRate = rate;
-
- if (m_playerControl != 0)
- m_playerControl->setPlaybackRate(m_playbackRate);
- else
- emit playbackRateChanged();
-}
-
-QString QDeclarativeMediaBase::errorString() const
-{
- return m_errorString;
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/imports/multimedia/qdeclarativemediabase_p.h b/src/imports/multimedia/qdeclarativemediabase_p.h
deleted file mode 100644
index 34875f9..0000000
--- a/src/imports/multimedia/qdeclarativemediabase_p.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QDECLARATIVEMEDIABASE_P_H
-#define QDECLARATIVEMEDIABASE_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 <QtCore/qbasictimer.h>
-#include <QtMediaServices/qmediaplayer.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QMediaPlayerControl;
-class QMediaService;
-class QMediaServiceProvider;
-class QMetaDataControl;
-class QMetaDataControlMetaObject;
-class QDeclarativeMediaBaseAnimation;
-
-class QDeclarativeMediaBase
-{
-public:
- QDeclarativeMediaBase();
- virtual ~QDeclarativeMediaBase();
-
- QUrl source() const;
- void setSource(const QUrl &url);
-
- bool isAutoLoad() const;
- void setAutoLoad(bool autoLoad);
-
- bool isPlaying() const;
- void setPlaying(bool playing);
-
- bool isPaused() const;
- void setPaused(bool paused);
-
- int duration() const;
-
- int position() const;
- void setPosition(int position);
-
- qreal volume() const;
- void setVolume(qreal volume);
-
- bool isMuted() const;
- void setMuted(bool muted);
-
- qreal bufferProgress() const;
-
- bool isSeekable() const;
-
- qreal playbackRate() const;
- void setPlaybackRate(qreal rate);
-
- QString errorString() const;
-
- void _q_stateChanged(QMediaPlayer::State state);
- void _q_mediaStatusChanged(QMediaPlayer::MediaStatus status);
-
- void _q_metaDataChanged();
-
- void componentComplete();
-
-protected:
- void shutdown();
-
- void setObject(QObject *object);
-
- virtual void sourceChanged() = 0;
- virtual void autoLoadChanged() = 0;
- virtual void playingChanged() = 0;
- virtual void pausedChanged() = 0;
-
- virtual void started() = 0;
- virtual void resumed() = 0;
- virtual void paused() = 0;
- virtual void stopped() = 0;
-
- virtual void statusChanged() = 0;
-
- virtual void loaded() = 0;
- virtual void buffering() = 0;
- virtual void stalled() = 0;
- virtual void buffered() = 0;
- virtual void endOfMedia() = 0;
-
- virtual void durationChanged() = 0;
- virtual void positionChanged() = 0;
-
- virtual void volumeChanged() = 0;
- virtual void mutedChanged() = 0;
-
- virtual void bufferProgressChanged() = 0;
-
- virtual void seekableChanged() = 0;
- virtual void playbackRateChanged() = 0;
-
- virtual void errorChanged() = 0;
-
- bool m_paused;
- bool m_playing;
- bool m_autoLoad;
- bool m_loaded;
- bool m_muted;
- int m_position;
- qreal m_vol;
- qreal m_playbackRate;
- QMediaService *m_mediaService;
- QMediaPlayerControl *m_playerControl;
-
- QMediaObject *m_mediaObject;
- QMediaServiceProvider *m_mediaProvider;
- QMetaDataControl *m_metaDataControl;
- QMetaDataControlMetaObject *m_metaObject;
- QDeclarativeMediaBaseAnimation *m_animation;
-
- QMediaPlayer::State m_state;
- QMediaPlayer::MediaStatus m_status;
- QMediaPlayer::Error m_error;
- QString m_errorString;
- QUrl m_source;
-
- friend class QDeclarativeMediaBaseAnimation;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/imports/multimedia/qdeclarativevideo.cpp b/src/imports/multimedia/qdeclarativevideo.cpp
deleted file mode 100644
index 1b51e2c..0000000
--- a/src/imports/multimedia/qdeclarativevideo.cpp
+++ /dev/null
@@ -1,976 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qdeclarativevideo_p.h"
-
-#include <QtMediaServices/qmediaplayercontrol.h>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/private/qpaintervideosurface_p.h>
-#include <QtMediaServices/qvideooutputcontrol.h>
-#include <QtMediaServices/qvideorenderercontrol.h>
-
-
-QT_BEGIN_NAMESPACE
-
-
-void QDeclarativeVideo::_q_nativeSizeChanged(const QSizeF &size)
-{
- setImplicitWidth(size.width());
- setImplicitHeight(size.height());
-}
-
-void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString)
-{
- m_error = QMediaPlayer::Error(errorCode);
- m_errorString = errorString;
-
- emit error(Error(errorCode), errorString);
- emit errorChanged();
-}
-
-
-/*!
- \qmlclass Video QDeclarativeVideo
- \since 4.7
- \brief The Video element allows you to add videos to a scene.
- \inherits Item
-
- This element is part of the \bold{Qt.multimedia 4.7} module.
-
- \qml
- import Qt 4.7
- import Qt.multimedia 4.7
-
- Video {
- id: video
- width : 800
- height : 600
- source: "video.avi"
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- video.play()
- }
- }
-
- focus: true
- Keys.onSpacePressed: video.paused = !video.paused
- Keys.onLeftPressed: video.position -= 5000
- Keys.onRightPressed: video.position += 5000
- }
- \endqml
-
- The Video item supports untransformed, stretched, and uniformly scaled video presentation.
- For a description of stretched uniformly scaled presentation, see the \l fillMode property
- description.
-
- The Video item is only visible when the \l hasVideo property is true and the video is playing.
-
- \sa Audio
-*/
-
-/*!
- \internal
- \class QDeclarativeVideo
- \brief The QDeclarativeVideo class provides a video item that you can add to a QDeclarativeView.
-*/
-
-QDeclarativeVideo::QDeclarativeVideo(QDeclarativeItem *parent)
- : QDeclarativeItem(parent)
- , m_graphicsItem(0)
-
-{
- m_graphicsItem = new QGraphicsVideoItem(this);
- connect(m_graphicsItem, SIGNAL(nativeSizeChanged(QSizeF)),
- this, SLOT(_q_nativeSizeChanged(QSizeF)));
-}
-
-QDeclarativeVideo::~QDeclarativeVideo()
-{
- shutdown();
-
- delete m_graphicsItem;
-}
-
-/*!
- \qmlproperty url Video::source
-
- This property holds the source URL of the media.
-*/
-
-/*!
- \qmlproperty url Video::autoLoad
-
- This property indicates if loading of media should begin immediately.
-
- Defaults to true, if false media will not be loaded until playback is started.
-*/
-
-/*!
- \qmlproperty bool Video::playing
-
- This property holds whether the media is playing.
-
- Defaults to false, and can be set to true to start playback.
-*/
-
-/*!
- \qmlproperty bool Video::paused
-
- This property holds whether the media is paused.
-
- Defaults to false, and can be set to true to pause playback.
-*/
-
-/*!
- \qmlsignal Video::onStarted()
-
- This handler is called when playback is started.
-*/
-
-/*!
- \qmlsignal Video::onResumed()
-
- This handler is called when playback is resumed from the paused state.
-*/
-
-/*!
- \qmlsignal Video::onPaused()
-
- This handler is called when playback is paused.
-*/
-
-/*!
- \qmlsignal Video::onStopped()
-
- This handler is called when playback is stopped.
-*/
-
-/*!
- \qmlproperty enumeration Video::status
-
- This property holds the status of media loading. It can be one of:
-
- \list
- \o NoMedia - no media has been set.
- \o Loading - the media is currently being loaded.
- \o Loaded - the media has been loaded.
- \o Buffering - the media is buffering data.
- \o Stalled - playback has been interrupted while the media is buffering data.
- \o Buffered - the media has buffered data.
- \o EndOfMedia - the media has played to the end.
- \o InvalidMedia - the media cannot be played.
- \o UnknownStatus - the status of the media is cannot be determined.
- \endlist
-*/
-
-QDeclarativeVideo::Status QDeclarativeVideo::status() const
-{
- return Status(m_status);
-}
-
-/*!
- \qmlsignal Video::onLoaded()
-
- This handler is called when the media source has been loaded.
-*/
-
-/*!
- \qmlsignal Video::onBuffering()
-
- This handler is called when the media starts buffering.
-*/
-
-/*!
- \qmlsignal Video::onStalled()
-
- This handler is called when playback has stalled while the media buffers.
-*/
-
-/*!
- \qmlsignal Video::onBuffered()
-
- This handler is called when the media has finished buffering.
-*/
-
-/*!
- \qmlsignal Video::onEndOfMedia()
-
- This handler is called when playback stops because end of the media has been reached.
-*/
-
-/*!
- \qmlproperty int Video::duration
-
- This property holds the duration of the media in milliseconds.
-
- If the media doesn't have a fixed duration (a live stream for example) this will be 0.
-*/
-
-/*!
- \qmlproperty int Video::position
-
- This property holds the current playback position in milliseconds.
-*/
-
-/*!
- \qmlproperty real Video::volume
-
- This property holds the volume of the audio output, from 0.0 (silent) to 1.0 (maximum volume).
-*/
-
-/*!
- \qmlproperty bool Video::muted
-
- This property holds whether the audio output is muted.
-*/
-
-/*!
- \qmlproperty bool Video::hasAudio
-
- This property holds whether the media contains audio.
-*/
-
-bool QDeclarativeVideo::hasAudio() const
-{
- return m_playerControl == 0 ? false : m_playerControl->isAudioAvailable();
-}
-
-/*!
- \qmlproperty bool Video::hasVideo
-
- This property holds whether the media contains video.
-*/
-
-bool QDeclarativeVideo::hasVideo() const
-{
- return m_playerControl == 0 ? false : m_playerControl->isVideoAvailable();
-}
-
-/*!
- \qmlproperty real Video::bufferProgress
-
- This property holds how much of the data buffer is currently filled, from 0.0 (empty) to 1.0
- (full).
-*/
-
-/*!
- \qmlproperty bool Video::seekable
-
- This property holds whether position of the video can be changed.
-*/
-
-/*!
- \qmlproperty real Video::playbackRate
-
- This property holds the rate at which video is played at as a multiple of the normal rate.
-*/
-
-/*!
- \qmlproperty enumeration Video::error
-
- This property holds the error state of the video. It can be one of:
-
- \list
- \o NoError - there is no current error.
- \o ResourceError - the video cannot be played due to a problem allocating resources.
- \o FormatError - the video format is not supported.
- \o NetworkError - the video cannot be played due to network issues.
- \o AccessDenied - the video cannot be played due to insufficient permissions.
- \o ServiceMissing - the video cannot be played because the media service could not be
- instantiated.
- \endlist
-*/
-
-
-QDeclarativeVideo::Error QDeclarativeVideo::error() const
-{
- return Error(m_error);
-}
-
-/*!
- \qmlproperty string Video::errorString
-
- This property holds a string describing the current error condition in more detail.
-*/
-
-/*!
- \qmlsignal Video::onError(error, errorString)
-
- This handler is called when an \l {QMediaPlayer::Error}{error} has
- occurred. The errorString parameter may contain more detailed
- information about the error.
-*/
-
-/*!
- \qmlproperty enumeration Video::fillMode
-
- Set this property to define how the video is scaled to fit the target area.
-
- \list
- \o Stretch - the video is scaled to fit.
- \o PreserveAspectFit - the video is scaled uniformly to fit without cropping
- \o PreserveAspectCrop - the video is scaled uniformly to fill, cropping if necessary
- \endlist
-
- The default fill mode is PreserveAspectFit.
-*/
-
-QDeclarativeVideo::FillMode QDeclarativeVideo::fillMode() const
-{
- return FillMode(m_graphicsItem->aspectRatioMode());
-}
-
-void QDeclarativeVideo::setFillMode(FillMode mode)
-{
- m_graphicsItem->setAspectRatioMode(Qt::AspectRatioMode(mode));
-}
-
-/*!
- \qmlmethod Video::play()
-
- Starts playback of the media.
-
- Sets the \l playing property to true, and the \l paused property to false.
-*/
-
-void QDeclarativeVideo::play()
-{
- if (m_playerControl == 0)
- return;
-
- setPaused(false);
- setPlaying(true);
-}
-
-/*!
- \qmlmethod Video::pause()
-
- Pauses playback of the media.
-
- Sets the \l playing and \l paused properties to true.
-*/
-
-void QDeclarativeVideo::pause()
-{
- if (m_playerControl == 0)
- return;
-
- setPaused(true);
- setPlaying(true);
-}
-
-/*!
- \qmlmethod Video::stop()
-
- Stops playback of the media.
-
- Sets the \l playing and \l paused properties to false.
-*/
-
-void QDeclarativeVideo::stop()
-{
- if (m_playerControl == 0)
- return;
-
- setPlaying(false);
- setPaused(false);
-}
-
-void QDeclarativeVideo::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
-{
-}
-
-void QDeclarativeVideo::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
-{
- m_graphicsItem->setSize(newGeometry.size());
-
- QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
-}
-
-void QDeclarativeVideo::componentComplete()
-{
- setObject(this);
-
- if (m_mediaService) {
- connect(m_playerControl, SIGNAL(audioAvailableChanged(bool)),
- this, SIGNAL(hasAudioChanged()));
- connect(m_playerControl, SIGNAL(videoAvailableChanged(bool)),
- this, SIGNAL(hasVideoChanged()));
-
- m_graphicsItem->setMediaObject(m_mediaObject);
- }
-}
-
-QT_END_NAMESPACE
-
-// ***************************************
-// Documentation for meta-data properties.
-// ***************************************
-
-/*!
- \qmlproperty variant Video::title
-
- This property holds the tile of the media.
-
- \sa {QtMediaServices::Title}
-*/
-
-/*!
- \qmlproperty variant Video::subTitle
-
- This property holds the sub-title of the media.
-
- \sa {QtMediaServices::SubTitle}
-*/
-
-/*!
- \qmlproperty variant Video::author
-
- This property holds the author of the media.
-
- \sa {QtMediaServices::Author}
-*/
-
-/*!
- \qmlproperty variant Video::comment
-
- This property holds a user comment about the media.
-
- \sa {QtMediaServices::Comment}
-*/
-
-/*!
- \qmlproperty variant Video::description
-
- This property holds a description of the media.
-
- \sa {QtMediaServices::Description}
-*/
-
-/*!
- \qmlproperty variant Video::category
-
- This property holds the category of the media
-
- \sa {QtMediaServices::Category}
-*/
-
-/*!
- \qmlproperty variant Video::genre
-
- This property holds the genre of the media.
-
- \sa {QtMediaServices::Genre}
-*/
-
-/*!
- \qmlproperty variant Video::year
-
- This property holds the year of release of the media.
-
- \sa {QtMediaServices::Year}
-*/
-
-/*!
- \qmlproperty variant Video::date
-
- This property holds the date of the media.
-
- \sa {QtMediaServices::Date}
-*/
-
-/*!
- \qmlproperty variant Video::userRating
-
- This property holds a user rating of the media in the range of 0 to 100.
-
- \sa {QtMediaServices::UserRating}
-*/
-
-/*!
- \qmlproperty variant Video::keywords
-
- This property holds a list of keywords describing the media.
-
- \sa {QtMediaServices::Keywords}
-*/
-
-/*!
- \qmlproperty variant Video::language
-
- This property holds the language of the media, as an ISO 639-2 code.
-
- \sa {QtMediaServices::Language}
-*/
-
-/*!
- \qmlproperty variant Video::publisher
-
- This property holds the publisher of the media.
-
- \sa {QtMediaServices::Publisher}
-*/
-
-/*!
- \qmlproperty variant Video::copyright
-
- This property holds the media's copyright notice.
-
- \sa {QtMediaServices::Copyright}
-*/
-
-/*!
- \qmlproperty variant Video::parentalRating
-
- This property holds the parental rating of the media.
-
- \sa {QtMediaServices::ParentalRating}
-*/
-
-/*!
- \qmlproperty variant Video::ratingOrganisation
-
- This property holds the name of the rating organisation responsible for the
- parental rating of the media.
-
- \sa {QtMediaServices::RatingOrganisation}
-*/
-
-/*!
- \qmlproperty variant Video::size
-
- This property property holds the size of the media in bytes.
-
- \sa {QtMediaServices::Size}
-*/
-
-/*!
- \qmlproperty variant Video::mediaType
-
- This property holds the type of the media.
-
- \sa {QtMediaServices::MediaType}
-*/
-
-/*!
- \qmlproperty variant Video::audioBitRate
-
- This property holds the bit rate of the media's audio stream ni bits per
- second.
-
- \sa {QtMediaServices::AudioBitRate}
-*/
-
-/*!
- \qmlproperty variant Video::audioCodec
-
- This property holds the encoding of the media audio stream.
-
- \sa {QtMediaServices::AudioCodec}
-*/
-
-/*!
- \qmlproperty variant Video::averageLevel
-
- This property holds the average volume level of the media.
-
- \sa {QtMediaServices::AverageLevel}
-*/
-
-/*!
- \qmlproperty variant Video::channelCount
-
- This property holds the number of channels in the media's audio stream.
-
- \sa {QtMediaServices::ChannelCount}
-*/
-
-/*!
- \qmlproperty variant Video::peakValue
-
- This property holds the peak volume of media's audio stream.
-
- \sa {QtMediaServices::PeakValue}
-*/
-
-/*!
- \qmlproperty variant Video::sampleRate
-
- This property holds the sample rate of the media's audio stream in hertz.
-
- \sa {QtMediaServices::SampleRate}
-*/
-
-/*!
- \qmlproperty variant Video::albumTitle
-
- This property holds the title of the album the media belongs to.
-
- \sa {QtMediaServices::AlbumTitle}
-*/
-
-/*!
- \qmlproperty variant Video::albumArtist
-
- This property holds the name of the principal artist of the album the media
- belongs to.
-
- \sa {QtMediaServices::AlbumArtist}
-*/
-
-/*!
- \qmlproperty variant Video::contributingArtist
-
- This property holds the names of artists contributing to the media.
-
- \sa {QtMediaServices::ContributingArtist}
-*/
-
-/*!
- \qmlproperty variant Video::composer
-
- This property holds the composer of the media.
-
- \sa {QtMediaServices::Composer}
-*/
-
-/*!
- \qmlproperty variant Video::conductor
-
- This property holds the conductor of the media.
-
- \sa {QtMediaServices::Conductor}
-*/
-
-/*!
- \qmlproperty variant Video::lyrics
-
- This property holds the lyrics to the media.
-
- \sa {QtMediaServices::Lyrics}
-*/
-
-/*!
- \qmlproperty variant Video::mood
-
- This property holds the mood of the media.
-
- \sa {QtMediaServices::Mood}
-*/
-
-/*!
- \qmlproperty variant Video::trackNumber
-
- This property holds the track number of the media.
-
- \sa {QtMediaServices::TrackNumber}
-*/
-
-/*!
- \qmlproperty variant Video::trackCount
-
- This property holds the number of track on the album containing the media.
-
- \sa {QtMediaServices::TrackNumber}
-*/
-
-/*!
- \qmlproperty variant Video::coverArtUrlSmall
-
- This property holds the URL of a small cover art image.
-
- \sa {QtMediaServices::CoverArtUrlSmall}
-*/
-
-/*!
- \qmlproperty variant Video::coverArtUrlLarge
-
- This property holds the URL of a large cover art image.
-
- \sa {QtMediaServices::CoverArtUrlLarge}
-*/
-
-/*!
- \qmlproperty variant Video::resolution
-
- This property holds the dimension of an image or video.
-
- \sa {QtMediaServices::Resolution}
-*/
-
-/*!
- \qmlproperty variant Video::pixelAspectRatio
-
- This property holds the pixel aspect ratio of an image or video.
-
- \sa {QtMediaServices::PixelAspectRatio}
-*/
-
-/*!
- \qmlproperty variant Video::videoFrameRate
-
- This property holds the frame rate of the media's video stream.
-
- \sa {QtMediaServices::VideoFrameRate}
-*/
-
-/*!
- \qmlproperty variant Video::videoBitRate
-
- This property holds the bit rate of the media's video stream in bits per
- second.
-
- \sa {QtMediaServices::VideoBitRate}
-*/
-
-/*!
- \qmlproperty variant Video::videoCodec
-
- This property holds the encoding of the media's video stream.
-
- \sa {QtMediaServices::VideoCodec}
-*/
-
-/*!
- \qmlproperty variant Video::posterUrl
-
- This property holds the URL of a poster image.
-
- \sa {QtMediaServices::PosterUrl}
-*/
-
-/*!
- \qmlproperty variant Video::chapterNumber
-
- This property holds the chapter number of the media.
-
- \sa {QtMediaServices::ChapterNumber}
-*/
-
-/*!
- \qmlproperty variant Video::director
-
- This property holds the director of the media.
-
- \sa {QtMediaServices::Director}
-*/
-
-/*!
- \qmlproperty variant Video::leadPerformer
-
- This property holds the lead performer in the media.
-
- \sa {QtMediaServices::LeadPerformer}
-*/
-
-/*!
- \qmlproperty variant Video::writer
-
- This property holds the writer of the media.
-
- \sa {QtMediaServices::Writer}
-*/
-
-// The remaining properties are related to photos, and are technically
-// available but will certainly never have values.
-#ifndef Q_QDOC
-
-/*!
- \qmlproperty variant Video::cameraManufacturer
-
- \sa {QtMediaServices::CameraManufacturer}
-*/
-
-/*!
- \qmlproperty variant Video::cameraModel
-
- \sa {QtMediaServices::CameraModel}
-*/
-
-/*!
- \qmlproperty variant Video::event
-
- \sa {QtMediaServices::Event}
-*/
-
-/*!
- \qmlproperty variant Video::subject
-
- \sa {QtMediaServices::Subject}
-*/
-
-/*!
- \qmlproperty variant Video::orientation
-
- \sa {QtMediaServices::Orientation}
-*/
-
-/*!
- \qmlproperty variant Video::exposureTime
-
- \sa {QtMediaServices::ExposureTime}
-*/
-
-/*!
- \qmlproperty variant Video::fNumber
-
- \sa {QtMediaServices::FNumber}
-*/
-
-/*!
- \qmlproperty variant Video::exposureProgram
-
- \sa {QtMediaServices::ExposureProgram}
-*/
-
-/*!
- \qmlproperty variant Video::isoSpeedRatings
-
- \sa {QtMediaServices::ISOSpeedRatings}
-*/
-
-/*!
- \qmlproperty variant Video::exposureBiasValue
-
- \sa {QtMediaServices::ExposureBiasValue}
-*/
-
-/*!
- \qmlproperty variant Video::dateTimeDigitized
-
- \sa {QtMediaServices::DateTimeDigitized}
-*/
-
-/*!
- \qmlproperty variant Video::subjectDistance
-
- \sa {QtMediaServices::SubjectDistance}
-*/
-
-/*!
- \qmlproperty variant Video::meteringMode
-
- \sa {QtMediaServices::MeteringMode}
-*/
-
-/*!
- \qmlproperty variant Video::lightSource
-
- \sa {QtMediaServices::LightSource}
-*/
-
-/*!
- \qmlproperty variant Video::flash
-
- \sa {QtMediaServices::Flash}
-*/
-
-/*!
- \qmlproperty variant Video::focalLength
-
- \sa {QtMediaServices::FocalLength}
-*/
-
-/*!
- \qmlproperty variant Video::exposureMode
-
- \sa {QtMediaServices::ExposureMode}
-*/
-
-/*!
- \qmlproperty variant Video::whiteBalance
-
- \sa {QtMediaServices::WhiteBalance}
-*/
-
-/*!
- \qmlproperty variant Video::DigitalZoomRatio
-
- \sa {QtMediaServices::DigitalZoomRatio}
-*/
-
-/*!
- \qmlproperty variant Video::focalLengthIn35mmFilm
-
- \sa {QtMediaServices::FocalLengthIn35mmFile}
-*/
-
-/*!
- \qmlproperty variant Video::sceneCaptureType
-
- \sa {QtMediaServices::SceneCaptureType}
-*/
-
-/*!
- \qmlproperty variant Video::gainControl
-
- \sa {QtMediaServices::GainControl}
-*/
-
-/*!
- \qmlproperty variant Video::contrast
-
- \sa {QtMediaServices::contrast}
-*/
-
-/*!
- \qmlproperty variant Video::saturation
-
- \sa {QtMediaServices::Saturation}
-*/
-
-/*!
- \qmlproperty variant Video::sharpness
-
- \sa {QtMediaServices::Sharpness}
-*/
-
-/*!
- \qmlproperty variant Video::deviceSettingDescription
-
- \sa {QtMediaServices::DeviceSettingDescription}
-*/
-
-#endif
-
-#include "moc_qdeclarativevideo_p.cpp"
diff --git a/src/imports/multimedia/qdeclarativevideo_p.h b/src/imports/multimedia/qdeclarativevideo_p.h
deleted file mode 100644
index c048b7d..0000000
--- a/src/imports/multimedia/qdeclarativevideo_p.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QDECLARATIVEVIDEO_H
-#define QDECLARATIVEVIDEO_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 "qdeclarativemediabase_p.h"
-
-#include <QtMediaServices/qgraphicsvideoitem.h>
-
-#include <QtCore/qbasictimer.h>
-#include <QtDeclarative/qdeclarativeitem.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QTimerEvent;
-class QVideoSurfaceFormat;
-
-
-class QDeclarativeVideo : public QDeclarativeItem, public QDeclarativeMediaBase
-{
- Q_OBJECT
- Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
- Q_PROPERTY(bool autoLoad READ isAutoLoad WRITE setAutoLoad NOTIFY autoLoadChanged)
- Q_PROPERTY(bool playing READ isPlaying WRITE setPlaying NOTIFY playingChanged)
- Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
- Q_PROPERTY(Status status READ status NOTIFY statusChanged)
- Q_PROPERTY(int duration READ duration NOTIFY durationChanged)
- Q_PROPERTY(int position READ position WRITE setPosition NOTIFY positionChanged)
- Q_PROPERTY(qreal volume READ volume WRITE setVolume NOTIFY volumeChanged)
- Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
- Q_PROPERTY(bool hasAudio READ hasAudio NOTIFY hasAudioChanged)
- Q_PROPERTY(bool hasVideo READ hasVideo NOTIFY hasVideoChanged)
- Q_PROPERTY(int bufferProgress READ bufferProgress NOTIFY bufferProgressChanged)
- Q_PROPERTY(bool seekable READ isSeekable NOTIFY seekableChanged)
- Q_PROPERTY(qreal playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged)
- Q_PROPERTY(Error error READ error NOTIFY errorChanged)
- Q_PROPERTY(QString errorString READ errorString NOTIFY errorChanged)
- Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode)
- Q_ENUMS(FillMode)
- Q_ENUMS(Status)
- Q_ENUMS(Error)
-public:
- enum FillMode
- {
- Stretch = Qt::IgnoreAspectRatio,
- PreserveAspectFit = Qt::KeepAspectRatio,
- PreserveAspectCrop = Qt::KeepAspectRatioByExpanding
- };
-
- enum Status
- {
- UnknownStatus = QMediaPlayer::UnknownMediaStatus,
- NoMedia = QMediaPlayer::NoMedia,
- Loading = QMediaPlayer::LoadingMedia,
- Loaded = QMediaPlayer::LoadedMedia,
- Stalled = QMediaPlayer::StalledMedia,
- Buffering = QMediaPlayer::BufferingMedia,
- Buffered = QMediaPlayer::BufferedMedia,
- EndOfMedia = QMediaPlayer::EndOfMedia,
- InvalidMedia = QMediaPlayer::InvalidMedia
- };
-
- enum Error
- {
- NoError = QMediaPlayer::NoError,
- ResourceError = QMediaPlayer::ResourceError,
- FormatError = QMediaPlayer::FormatError,
- NetworkError = QMediaPlayer::NetworkError,
- AccessDenied = QMediaPlayer::AccessDeniedError,
- ServiceMissing = QMediaPlayer::ServiceMissingError
- };
-
- QDeclarativeVideo(QDeclarativeItem *parent = 0);
- ~QDeclarativeVideo();
-
- bool hasAudio() const;
- bool hasVideo() const;
-
- FillMode fillMode() const;
- void setFillMode(FillMode mode);
-
- Status status() const;
- Error error() const;
-
- void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
-
- void componentComplete();
-
-public Q_SLOTS:
- void play();
- void pause();
- void stop();
-
-Q_SIGNALS:
- void sourceChanged();
- void autoLoadChanged();
- void playingChanged();
- void pausedChanged();
-
- void started();
- void resumed();
- void paused();
- void stopped();
-
- void statusChanged();
-
- void loaded();
- void buffering();
- void stalled();
- void buffered();
- void endOfMedia();
-
- void durationChanged();
- void positionChanged();
-
- void volumeChanged();
- void mutedChanged();
- void hasAudioChanged();
- void hasVideoChanged();
-
- void bufferProgressChanged();
-
- void seekableChanged();
- void playbackRateChanged();
-
- void errorChanged();
- void error(QDeclarativeVideo::Error error, const QString &errorString);
-
-protected:
- void geometryChanged(const QRectF &geometry, const QRectF &);
-
-private Q_SLOTS:
- void _q_nativeSizeChanged(const QSizeF &size);
- void _q_error(int, const QString &);
-
-private:
- Q_DISABLE_COPY(QDeclarativeVideo)
-
- QGraphicsVideoItem *m_graphicsItem;
-
- Q_PRIVATE_SLOT(mediaBase(), void _q_stateChanged(QMediaPlayer::State))
- Q_PRIVATE_SLOT(mediaBase(), void _q_mediaStatusChanged(QMediaPlayer::MediaStatus))
- Q_PRIVATE_SLOT(mediaBase(), void _q_metaDataChanged())
-
- inline QDeclarativeMediaBase *mediaBase() { return this; }
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeVideo))
-
-QT_END_HEADER
-
-#endif
diff --git a/src/imports/multimedia/qmetadatacontrolmetaobject.cpp b/src/imports/multimedia/qmetadatacontrolmetaobject.cpp
deleted file mode 100644
index 5235a87..0000000
--- a/src/imports/multimedia/qmetadatacontrolmetaobject.cpp
+++ /dev/null
@@ -1,362 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qmetadatacontrolmetaobject_p.h"
-#include <QtMediaServices/qmetadatacontrol.h>
-
-
-QT_BEGIN_NAMESPACE
-
-// copied from qmetaobject.cpp
-// do not touch without touching the moc as well
-enum PropertyFlags {
- Invalid = 0x00000000,
- Readable = 0x00000001,
- Writable = 0x00000002,
- Resettable = 0x00000004,
- EnumOrFlag = 0x00000008,
- StdCppSet = 0x00000100,
-// Override = 0x00000200,
- Designable = 0x00001000,
- ResolveDesignable = 0x00002000,
- Scriptable = 0x00004000,
- ResolveScriptable = 0x00008000,
- Stored = 0x00010000,
- ResolveStored = 0x00020000,
- Editable = 0x00040000,
- ResolveEditable = 0x00080000,
- User = 0x00100000,
- ResolveUser = 0x00200000,
- Notify = 0x00400000,
- Dynamic = 0x00800000
-};
-
-enum MethodFlags {
- AccessPrivate = 0x00,
- AccessProtected = 0x01,
- AccessPublic = 0x02,
- AccessMask = 0x03, //mask
-
- MethodMethod = 0x00,
- MethodSignal = 0x04,
- MethodSlot = 0x08,
- MethodConstructor = 0x0c,
- MethodTypeMask = 0x0c,
-
- MethodCompatibility = 0x10,
- MethodCloned = 0x20,
- MethodScriptable = 0x40
-};
-
-struct QMetaObjectPrivate
-{
- int revision;
- int className;
- int classInfoCount, classInfoData;
- int methodCount, methodData;
- int propertyCount, propertyData;
- int enumeratorCount, enumeratorData;
- int constructorCount, constructorData;
- int flags;
-};
-
-static inline const QMetaObjectPrivate *priv(const uint* m_data)
-{ return reinterpret_cast<const QMetaObjectPrivate*>(m_data); }
-// end of copied lines from qmetaobject.cpp
-
-namespace
-{
- struct MetaDataKey
- {
- QtMediaServices::MetaData key;
- const char *name;
- };
-
- const MetaDataKey qt_metaDataKeys[] =
- {
- { QtMediaServices::Title, "title" },
- { QtMediaServices::SubTitle, "subTitle" },
- { QtMediaServices::Author, "author" },
- { QtMediaServices::Comment, "comment" },
- { QtMediaServices::Description, "description" },
- { QtMediaServices::Category, "category" },
- { QtMediaServices::Genre, "genre" },
- { QtMediaServices::Year, "year" },
- { QtMediaServices::Date, "date" },
- { QtMediaServices::UserRating, "userRating" },
- { QtMediaServices::Keywords, "keywords" },
- { QtMediaServices::Language, "language" },
- { QtMediaServices::Publisher, "publisher" },
- { QtMediaServices::Copyright, "copyright" },
- { QtMediaServices::ParentalRating, "parentalRating" },
- { QtMediaServices::RatingOrganisation, "ratingOrganisation" },
-
- // Media
- { QtMediaServices::Size, "size" },
- { QtMediaServices::MediaType, "mediaType" },
-// { QtMediaServices::Duration, "duration" },
-
- // Audio
- { QtMediaServices::AudioBitRate, "audioBitRate" },
- { QtMediaServices::AudioCodec, "audioCodec" },
- { QtMediaServices::AverageLevel, "averageLevel" },
- { QtMediaServices::ChannelCount, "channelCount" },
- { QtMediaServices::PeakValue, "peakValue" },
- { QtMediaServices::SampleRate, "sampleRate" },
-
- // Music
- { QtMediaServices::AlbumTitle, "albumTitle" },
- { QtMediaServices::AlbumArtist, "albumArtist" },
- { QtMediaServices::ContributingArtist, "contributingArtist" },
- { QtMediaServices::Composer, "composer" },
- { QtMediaServices::Conductor, "conductor" },
- { QtMediaServices::Lyrics, "lyrics" },
- { QtMediaServices::Mood, "mood" },
- { QtMediaServices::TrackNumber, "trackNumber" },
- { QtMediaServices::TrackCount, "trackCount" },
-
- { QtMediaServices::CoverArtUrlSmall, "coverArtUrlSmall" },
- { QtMediaServices::CoverArtUrlLarge, "coverArtUrlLarge" },
-
- // Image/Video
- { QtMediaServices::Resolution, "resolution" },
- { QtMediaServices::PixelAspectRatio, "pixelAspectRatio" },
-
- // Video
- { QtMediaServices::VideoFrameRate, "videoFrameRate" },
- { QtMediaServices::VideoBitRate, "videoBitRate" },
- { QtMediaServices::VideoCodec, "videoCodec" },
-
- { QtMediaServices::PosterUrl, "posterUrl" },
-
- // Movie
- { QtMediaServices::ChapterNumber, "chapterNumber" },
- { QtMediaServices::Director, "director" },
- { QtMediaServices::LeadPerformer, "leadPerformer" },
- { QtMediaServices::Writer, "writer" },
-
- // Photos
- { QtMediaServices::CameraManufacturer, "cameraManufacturer" },
- { QtMediaServices::CameraModel, "cameraModel" },
- { QtMediaServices::Event, "event" },
- { QtMediaServices::Subject, "subject" },
- { QtMediaServices::Orientation, "orientation" },
- { QtMediaServices::ExposureTime, "exposureTime" },
- { QtMediaServices::FNumber, "fNumber" },
- { QtMediaServices::ExposureProgram, "exposureProgram" },
- { QtMediaServices::ISOSpeedRatings, "isoSpeedRatings" },
- { QtMediaServices::ExposureBiasValue, "exposureBiasValue" },
- { QtMediaServices::DateTimeOriginal, "dateTimeOriginal" },
- { QtMediaServices::DateTimeDigitized, "dateTimeDigitized" },
- { QtMediaServices::SubjectDistance, "subjectDistance" },
- { QtMediaServices::MeteringMode, "meteringMode" },
- { QtMediaServices::LightSource, "lightSource" },
- { QtMediaServices::Flash, "flash" },
- { QtMediaServices::FocalLength, "focalLength" },
- { QtMediaServices::ExposureMode, "exposureMode" },
- { QtMediaServices::WhiteBalance, "whiteBalance" },
- { QtMediaServices::DigitalZoomRatio, "digitalZoomRatio" },
- { QtMediaServices::FocalLengthIn35mmFilm, "focalLengthIn35mmFilm" },
- { QtMediaServices::SceneCaptureType, "sceneCaptureType" },
- { QtMediaServices::GainControl, "gainControl" },
- { QtMediaServices::Contrast, "contrast" },
- { QtMediaServices::Saturation, "saturation" },
- { QtMediaServices::Sharpness, "sharpness" },
- { QtMediaServices::DeviceSettingDescription, "deviceSettingDescription" }
- };
-
- class QMetaDataControlObject : public QObject
- {
- public:
- inline QObjectData *data() { return d_ptr.data(); }
- };
-}
-
-QMetaDataControlMetaObject::QMetaDataControlMetaObject(QMetaDataControl *control, QObject *object)
- : m_control(control)
- , m_object(object)
- , m_string(0)
- , m_data(0)
- , m_propertyOffset(0)
- , m_signalOffset(0)
-{
- const QMetaObject *superClass = m_object->metaObject();
-
- const int propertyCount = sizeof(qt_metaDataKeys) / sizeof(MetaDataKey);
- const int dataSize = sizeof(uint)
- * (13 // QMetaObjectPrivate members.
- + 5 // 5 members per signal.
- + 4 * propertyCount // 3 members per property + 1 notify signal per property.
- + 1); // Terminating value.
-
- m_data = reinterpret_cast<uint *>(qMalloc(dataSize));
-
- QMetaObjectPrivate *pMeta = reinterpret_cast<QMetaObjectPrivate *>(m_data);
-
- pMeta->revision = 3;
- pMeta->className = 0;
- pMeta->classInfoCount = 0;
- pMeta->classInfoData = 0;
- pMeta->methodCount = 1;
- pMeta->methodData = 13;
- pMeta->propertyCount = propertyCount;
- pMeta->propertyData = 18;
- pMeta->enumeratorCount = 0;
- pMeta->enumeratorData = 0;
- pMeta->constructorCount = 0;
- pMeta->constructorData = 0;
- pMeta->flags = 0x01; // Dynamic meta object flag.
-
- const int classNameSize = qstrlen(superClass->className()) + 1;
-
- int stringIndex = classNameSize + 1;
-
- // __metaDataChanged() signal.
- static const char *changeSignal = "__metaDataChanged()";
- const int changeSignalSize = qstrlen(changeSignal) + 1;
-
- m_data[13] = stringIndex; // Signature.
- m_data[14] = classNameSize; // Parameters.
- m_data[15] = classNameSize; // Type.
- m_data[16] = classNameSize; // Tag.
- m_data[17] = MethodSignal | AccessProtected; // Flags.
-
- stringIndex += changeSignalSize;
-
- const char *qvariantName = "QVariant";
- const int qvariantSize = qstrlen(qvariantName) + 1;
- const int qvariantIndex = stringIndex;
-
- stringIndex += qvariantSize;
-
- // Properties.
- for (int i = 0; i < propertyCount; ++i) {
- m_data[18 + 3 * i] = stringIndex; // Name.
- m_data[19 + 3 * i] = qvariantIndex; // Type.
- m_data[20 + 3 * i]
- = Readable | Writable | Notify | Dynamic | (0xffffffff << 24); // Flags.
- m_data[18 + propertyCount * 3 + i] = 0; // Notify signal.
-
- stringIndex += qstrlen(qt_metaDataKeys[i].name) + 1;
- }
-
- // Terminating value.
- m_data[18 + propertyCount * 4] = 0;
-
- // Build string.
- m_string = reinterpret_cast<char *>(qMalloc(stringIndex + 1));
-
- // Class name.
- qMemCopy(m_string, superClass->className(), classNameSize);
-
- stringIndex = classNameSize;
-
- // Null m_string.
- m_string[stringIndex] = '\0';
- stringIndex += 1;
-
- // __metaDataChanged() signal.
- qMemCopy(m_string + stringIndex, changeSignal, changeSignalSize);
- stringIndex += changeSignalSize;
-
- qMemCopy(m_string + stringIndex, qvariantName, qvariantSize);
- stringIndex += qvariantSize;
-
- // Properties.
- for (int i = 0; i < propertyCount; ++i) {
- const int propertyNameSize = qstrlen(qt_metaDataKeys[i].name) + 1;
-
- qMemCopy(m_string + stringIndex, qt_metaDataKeys[i].name, propertyNameSize);
- stringIndex += propertyNameSize;
- }
-
- // Terminating character.
- m_string[stringIndex] = '\0';
-
- d.superdata = superClass;
- d.stringdata = m_string;
- d.data = m_data;
- d.extradata = 0;
-
- static_cast<QMetaDataControlObject *>(m_object)->data()->metaObject = this;
-
- m_propertyOffset = propertyOffset();
- m_signalOffset = methodOffset();
-}
-
-QMetaDataControlMetaObject::~QMetaDataControlMetaObject()
-{
- static_cast<QMetaDataControlObject *>(m_object)->data()->metaObject = 0;
-
- qFree(m_data);
- qFree(m_string);
-}
-
-int QMetaDataControlMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
-{
- if (c == QMetaObject::ReadProperty && id >= m_propertyOffset) {
- int propId = id - m_propertyOffset;
-
- *reinterpret_cast<QVariant *>(a[0]) = m_control->metaData(qt_metaDataKeys[propId].key);
-
- return -1;
- } else if (c == QMetaObject::WriteProperty && id >= m_propertyOffset) {
- int propId = id - m_propertyOffset;
-
- m_control->setMetaData(qt_metaDataKeys[propId].key, *reinterpret_cast<QVariant *>(a[0]));
-
- return -1;
- } else {
- return m_object->qt_metacall(c, id, a);
- }
-}
-
-int QMetaDataControlMetaObject::createProperty(const char *, const char *)
-{
- return -1;
-}
-
-void QMetaDataControlMetaObject::metaDataChanged()
-{
- activate(m_object, m_signalOffset, 0);
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/multimedia/qmetadatacontrolmetaobject_p.h b/src/imports/multimedia/qmetadatacontrolmetaobject_p.h
deleted file mode 100644
index bbbc6fe..0000000
--- a/src/imports/multimedia/qmetadatacontrolmetaobject_p.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QMETADATACONTROLMETAOBJECT_P_H
-#define QMETADATACONTROLMETAOJBECT_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 <QtCore/qmetaobject.h>
-#include <QtMediaServices/qtmedianamespace.h>
-
-#include <QtCore/private/qobject_p.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QMetaDataControl;
-
-class QMetaDataControlMetaObject : public QAbstractDynamicMetaObject
-{
-public:
- QMetaDataControlMetaObject(QMetaDataControl *control, QObject *object);
- ~QMetaDataControlMetaObject();
-
- int metaCall(QMetaObject::Call call, int _id, void **arguments);
- int createProperty(const char *, const char *);
-
- void metaDataChanged();
-
-private:
- QMetaDataControl *m_control;
- QObject *m_object;
- char *m_string;
- uint *m_data;
-
- int m_propertyOffset;
- int m_signalOffset;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/imports/multimedia/qmldir b/src/imports/multimedia/qmldir
deleted file mode 100644
index 0e6f656..0000000
--- a/src/imports/multimedia/qmldir
+++ /dev/null
@@ -1 +0,0 @@
-plugin multimedia
diff --git a/src/imports/webkit/qdeclarativewebview.cpp b/src/imports/webkit/qdeclarativewebview.cpp
index 5db812c..36a25f6 100644
--- a/src/imports/webkit/qdeclarativewebview.cpp
+++ b/src/imports/webkit/qdeclarativewebview.cpp
@@ -42,11 +42,9 @@
#include "qdeclarativewebview_p.h"
#include "qdeclarativewebview_p_p.h"
-#include <private/qdeclarativepainteditem_p_p.h>
-
#include <qdeclarative.h>
#include <qdeclarativeengine.h>
-#include <private/qdeclarativestate_p.h>
+#include <qdeclarativecontext.h>
#include <QDebug>
#include <QPen>
@@ -61,29 +59,29 @@
#include <QtWebKit/QWebFrame>
#include <QtWebKit/QWebElement>
#include <QtWebKit/QWebSettings>
-#include <private/qlistmodelinterface_p.h>
QT_BEGIN_NAMESPACE
static const int MAX_DOUBLECLICK_TIME=500; // XXX need better gesture system
-class QDeclarativeWebViewPrivate : public QDeclarativePaintedItemPrivate
+class QDeclarativeWebViewPrivate
{
- Q_DECLARE_PUBLIC(QDeclarativeWebView)
-
public:
- QDeclarativeWebViewPrivate()
- : QDeclarativePaintedItemPrivate(), page(0), preferredwidth(0), preferredheight(0),
+ QDeclarativeWebViewPrivate(QDeclarativeWebView* qq)
+ : q(qq), page(0), preferredwidth(0), preferredheight(0),
progress(1.0), status(QDeclarativeWebView::Null), pending(PendingNone),
newWindowComponent(0), newWindowParent(0),
pressTime(400),
rendering(true)
{
+ QObject::connect(q, SIGNAL(focusChanged(bool)), q, SLOT(propagateFocusToWebPage(bool)));
}
- void focusChanged(bool);
+
+ QDeclarativeWebView *q;
QUrl url; // page url might be different if it has not loaded yet
QWebPage *page;
+ QGraphicsWebView* view;
int preferredwidth, preferredheight;
qreal progress;
@@ -101,7 +99,6 @@ public:
QPoint pressPoint;
int pressTime; // milliseconds before it's a "hold"
-
static void windowObjects_append(QDeclarativeListProperty<QObject> *prop, QObject *o) {
static_cast<QDeclarativeWebViewPrivate *>(prop->data)->windowObjects.append(o);
static_cast<QDeclarativeWebViewPrivate *>(prop->data)->updateWindowObjects();
@@ -129,6 +126,9 @@ public:
dynamically adjust to a size appropriate for the content.
This width may be large for typical online web pages.
+ If the width or height is explictly set, the rendered website
+ will be clipped, not scaled, to fit into the set dimensions.
+
If the preferredWidth is set, the width will be this amount or larger,
usually laying out the web content to fit the preferredWidth.
@@ -137,8 +137,8 @@ public:
WebView {
url: "http://www.nokia.com"
- width: 490
- height: 400
+ preferredWidth: 490
+ preferredHeight: 400
scale: 0.5
smooth: false
smoothCache: true
@@ -169,34 +169,39 @@ public:
*/
QDeclarativeWebView::QDeclarativeWebView(QDeclarativeItem *parent)
- : QDeclarativePaintedItem(*(new QDeclarativeWebViewPrivate), parent)
+ : QDeclarativeItem(parent)
{
init();
}
QDeclarativeWebView::~QDeclarativeWebView()
{
- Q_D(QDeclarativeWebView);
delete d->page;
+ delete d;
}
void QDeclarativeWebView::init()
{
- Q_D(QDeclarativeWebView);
+ d = new QDeclarativeWebViewPrivate(this);
QWebSettings::enablePersistentStorage();
setAcceptHoverEvents(true);
setAcceptedMouseButtons(Qt::LeftButton);
- setFlag(QGraphicsItem::ItemHasNoContents, false);
+ setFlag(QGraphicsItem::ItemHasNoContents, true);
+ setClip(true);
d->page = 0;
+ d->view = new QGraphicsWebView(this);
+ d->view->setResizesToContents(true);
+ d->view->setFlag(QGraphicsItem::ItemStacksBehindParent, true);
+ connect(d->view, SIGNAL(geometryChanged()), this, SLOT(updateDeclarativeWebViewSize()));
+ connect(d->view, SIGNAL(scaleChanged()), this, SIGNAL(contentsScaleChanged()));
}
void QDeclarativeWebView::componentComplete()
{
- QDeclarativePaintedItem::componentComplete();
- Q_D(QDeclarativeWebView);
+ QDeclarativeItem::componentComplete();
switch (d->pending) {
case QDeclarativeWebViewPrivate::PendingUrl:
setUrl(d->pending_url);
@@ -216,7 +221,6 @@ void QDeclarativeWebView::componentComplete()
QDeclarativeWebView::Status QDeclarativeWebView::status() const
{
- Q_D(const QDeclarativeWebView);
return d->status;
}
@@ -230,13 +234,11 @@ QDeclarativeWebView::Status QDeclarativeWebView::status() const
*/
qreal QDeclarativeWebView::progress() const
{
- Q_D(const QDeclarativeWebView);
return d->progress;
}
void QDeclarativeWebView::doLoadStarted()
{
- Q_D(QDeclarativeWebView);
if (!d->url.isEmpty()) {
d->status = Loading;
@@ -247,7 +249,6 @@ void QDeclarativeWebView::doLoadStarted()
void QDeclarativeWebView::doLoadProgress(int p)
{
- Q_D(QDeclarativeWebView);
if (d->progress == p/100.0)
return;
d->progress = p/100.0;
@@ -256,12 +257,7 @@ void QDeclarativeWebView::doLoadProgress(int p)
void QDeclarativeWebView::pageUrlChanged()
{
- Q_D(QDeclarativeWebView);
-
- page()->setViewportSize(QSize(
- d->preferredwidth>0 ? d->preferredwidth : width(),
- d->preferredheight>0 ? d->preferredheight : height()));
- expandToWebPage();
+ updateContentsSize();
if ((d->url.isEmpty() && page()->mainFrame()->url() != QUrl(QLatin1String("about:blank")))
|| (d->url != page()->mainFrame()->url() && !page()->mainFrame()->url().isEmpty()))
@@ -275,7 +271,6 @@ void QDeclarativeWebView::pageUrlChanged()
void QDeclarativeWebView::doLoadFinished(bool ok)
{
- Q_D(QDeclarativeWebView);
if (title().isEmpty())
pageUrlChanged(); // XXX bug 232556 - pages with no title never get urlChanged()
@@ -302,21 +297,17 @@ void QDeclarativeWebView::doLoadFinished(bool ok)
*/
QUrl QDeclarativeWebView::url() const
{
- Q_D(const QDeclarativeWebView);
return d->url;
}
void QDeclarativeWebView::setUrl(const QUrl &url)
{
- Q_D(QDeclarativeWebView);
if (url == d->url)
return;
if (isComponentComplete()) {
d->url = url;
- page()->setViewportSize(QSize(
- d->preferredwidth>0 ? d->preferredwidth : width(),
- d->preferredheight>0 ? d->preferredheight : height()));
+ updateContentsSize();
QUrl seturl = url;
if (seturl.isEmpty())
seturl = QUrl(QLatin1String("about:blank"));
@@ -338,16 +329,14 @@ void QDeclarativeWebView::setUrl(const QUrl &url)
*/
int QDeclarativeWebView::preferredWidth() const
{
- Q_D(const QDeclarativeWebView);
return d->preferredwidth;
}
void QDeclarativeWebView::setPreferredWidth(int iw)
{
- Q_D(QDeclarativeWebView);
if (d->preferredwidth == iw) return;
d->preferredwidth = iw;
- //expandToWebPage();
+ updateContentsSize();
emit preferredWidthChanged();
}
@@ -358,14 +347,14 @@ void QDeclarativeWebView::setPreferredWidth(int iw)
*/
int QDeclarativeWebView::preferredHeight() const
{
- Q_D(const QDeclarativeWebView);
return d->preferredheight;
}
+
void QDeclarativeWebView::setPreferredHeight(int ih)
{
- Q_D(QDeclarativeWebView);
if (d->preferredheight == ih) return;
d->preferredheight = ih;
+ updateContentsSize();
emit preferredHeightChanged();
}
@@ -383,82 +372,86 @@ QVariant QDeclarativeWebView::evaluateJavaScript(const QString &scriptSource)
return this->page()->mainFrame()->evaluateJavaScript(scriptSource);
}
-void QDeclarativeWebViewPrivate::focusChanged(bool hasFocus)
+void QDeclarativeWebView::propagateFocusToWebPage(bool hasFocus)
{
- Q_Q(QDeclarativeWebView);
QFocusEvent e(hasFocus ? QEvent::FocusIn : QEvent::FocusOut);
- q->page()->event(&e);
- QDeclarativeItemPrivate::focusChanged(hasFocus);
+ page()->event(&e);
}
-void QDeclarativeWebView::initialLayout()
+void QDeclarativeWebView::updateDeclarativeWebViewSize()
{
- // nothing useful to do at this point
+ QSizeF size = d->view->geometry().size() * contentsScale();
+ setImplicitWidth(size.width());
+ setImplicitHeight(size.height());
}
-void QDeclarativeWebView::noteContentsSizeChanged(const QSize&)
+void QDeclarativeWebView::initialLayout()
{
- expandToWebPage();
+ // nothing useful to do at this point
}
-void QDeclarativeWebView::expandToWebPage()
+void QDeclarativeWebView::updateContentsSize()
{
- Q_D(QDeclarativeWebView);
- QSize cs = page()->mainFrame()->contentsSize();
- if (cs.width() < d->preferredwidth)
- cs.setWidth(d->preferredwidth);
- if (cs.height() < d->preferredheight)
- cs.setHeight(d->preferredheight);
- if (widthValid())
- cs.setWidth(width());
- if (heightValid())
- cs.setHeight(height());
- if (cs != page()->viewportSize()) {
- page()->setViewportSize(cs);
- }
- if (cs != contentsSize())
- setContentsSize(cs);
+ if (d->page)
+ d->page->setPreferredContentsSize(QSize(
+ d->preferredwidth>0 ? d->preferredwidth : width(),
+ d->preferredheight>0 ? d->preferredheight : height()));
}
void QDeclarativeWebView::geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry)
{
- if (newGeometry.size() != oldGeometry.size())
- expandToWebPage();
- QDeclarativePaintedItem::geometryChanged(newGeometry, oldGeometry);
-}
-
-void QDeclarativeWebView::paintPage(const QRect& r)
-{
- dirtyCache(r);
- update();
+ if (newGeometry.size() != oldGeometry.size() && d->page) {
+ QSize cs = d->page->preferredContentsSize();
+ if (widthValid())
+ cs.setWidth(width());
+ if (heightValid())
+ cs.setHeight(height());
+ if (cs != d->page->preferredContentsSize())
+ d->page->setPreferredContentsSize(cs);
+ }
+ QDeclarativeItem::geometryChanged(newGeometry, oldGeometry);
}
/*!
\qmlproperty list<object> WebView::javaScriptWindowObjects
- This property is a list of object that are available from within
- the webview's JavaScript context.
+ A list of QML objects to expose to the web page.
+
+ Each object will be added as a property of the web frame's window object. The
+ property name is controlled by the value of \c WebView.windowObjectName
+ attached property.
+
+ Exposing QML objects to a web page allows JavaScript executing in the web
+ page itself to communicate with QML, by reading and writing properties and
+ by calling methods of the exposed QML objects.
- The \a object will be inserted as a child of the frame's window
- object, under the name given by the attached property \c WebView.windowObjectName.
+ This example shows how to call into a QML method using a window object.
\qml
WebView {
- javaScriptWindowObjects: Object {
- WebView.windowObjectName: "coordinates"
+ javaScriptWindowObjects: QtObject {
+ WebView.windowObjectName: "qml"
+
+ function qmlCall() {
+ console.log("This call is in QML!");
+ }
}
+
+ html: "<script>console.log(\"This is in WebKit!\"); window.qml.qmlCall();</script>"
}
\endqml
- Properties of the object will be exposed as JavaScript properties and slots as
- JavaScript methods.
+ The output of the example will be:
+ \code
+ This is in WebKit!
+ This call is in QML!
+ \endcode
- If Javascript is not enabled for this page, then this property does nothing.
+ If Javascript is not enabled for the page, then this property does nothing.
*/
QDeclarativeListProperty<QObject> QDeclarativeWebView::javaScriptWindowObjects()
{
- Q_D(QDeclarativeWebView);
return QDeclarativeListProperty<QObject>(this, d, &QDeclarativeWebViewPrivate::windowObjects_append);
}
@@ -469,8 +462,7 @@ QDeclarativeWebViewAttached *QDeclarativeWebView::qmlAttachedProperties(QObject
void QDeclarativeWebViewPrivate::updateWindowObjects()
{
- Q_Q(QDeclarativeWebView);
- if (!q->isComponentComplete() || !page)
+ if (!q->isComponentCompletePublic() || !page)
return;
for (int ii = 0; ii < windowObjects.count(); ++ii) {
@@ -484,29 +476,17 @@ void QDeclarativeWebViewPrivate::updateWindowObjects()
bool QDeclarativeWebView::renderingEnabled() const
{
- Q_D(const QDeclarativeWebView);
return d->rendering;
}
void QDeclarativeWebView::setRenderingEnabled(bool enabled)
{
- Q_D(QDeclarativeWebView);
if (d->rendering == enabled)
return;
d->rendering = enabled;
emit renderingEnabledChanged();
- setCacheFrozen(!enabled);
- if (enabled)
- clearCache();
-}
-
-
-void QDeclarativeWebView::drawContents(QPainter *p, const QRect &r)
-{
- Q_D(QDeclarativeWebView);
- if (d->rendering)
- page()->mainFrame()->render(p,r);
+ d->view->setTiledBackingStoreFrozen(!enabled);
}
QMouseEvent *QDeclarativeWebView::sceneMouseEventToMouseEvent(QGraphicsSceneMouseEvent *e)
@@ -541,7 +521,6 @@ QMouseEvent *QDeclarativeWebView::sceneHoverMoveEventToMouseEvent(QGraphicsScene
return me;
}
-
/*!
\qmlsignal WebView::onDoubleClick(clickx,clicky)
@@ -573,7 +552,6 @@ void QDeclarativeWebView::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
*/
bool QDeclarativeWebView::heuristicZoom(int clickX, int clickY, qreal maxzoom)
{
- Q_D(QDeclarativeWebView);
if (contentsScale() >= maxzoom/zoomFactor())
return false;
qreal ozf = contentsScale();
@@ -602,13 +580,11 @@ bool QDeclarativeWebView::heuristicZoom(int clickX, int clickY, qreal maxzoom)
*/
int QDeclarativeWebView::pressGrabTime() const
{
- Q_D(const QDeclarativeWebView);
return d->pressTime;
}
void QDeclarativeWebView::setPressGrabTime(int ms)
{
- Q_D(QDeclarativeWebView);
if (d->pressTime == ms)
return;
d->pressTime = ms;
@@ -617,8 +593,6 @@ void QDeclarativeWebView::setPressGrabTime(int ms)
void QDeclarativeWebView::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QDeclarativeWebView);
-
setFocus (true);
QMouseEvent *me = sceneMouseEventToMouseEvent(event);
@@ -646,14 +620,12 @@ void QDeclarativeWebView::mousePressEvent(QGraphicsSceneMouseEvent *event)
);
delete me;
if (!event->isAccepted()) {
- QDeclarativePaintedItem::mousePressEvent(event);
+ QDeclarativeItem::mousePressEvent(event);
}
}
void QDeclarativeWebView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QDeclarativeWebView);
-
QMouseEvent *me = sceneMouseEventToMouseEvent(event);
page()->event(me);
d->pressTimer.stop();
@@ -670,7 +642,7 @@ void QDeclarativeWebView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
);
delete me;
if (!event->isAccepted()) {
- QDeclarativePaintedItem::mouseReleaseEvent(event);
+ QDeclarativeItem::mouseReleaseEvent(event);
}
setKeepMouseGrab(false);
ungrabMouse();
@@ -678,7 +650,6 @@ void QDeclarativeWebView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void QDeclarativeWebView::timerEvent(QTimerEvent *event)
{
- Q_D(QDeclarativeWebView);
if (event->timerId() == d->pressTimer.timerId()) {
d->pressTimer.stop();
grabMouse();
@@ -688,8 +659,6 @@ void QDeclarativeWebView::timerEvent(QTimerEvent *event)
void QDeclarativeWebView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QDeclarativeWebView);
-
QMouseEvent *me = sceneMouseEventToMouseEvent(event);
if (d->pressTimer.isActive()) {
if ((me->pos() - d->pressPoint).manhattanLength() > QApplication::startDragDistance()) {
@@ -713,9 +682,9 @@ void QDeclarativeWebView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
delete me;
if (!event->isAccepted())
- QDeclarativePaintedItem::mouseMoveEvent(event);
-
+ QDeclarativeItem::mouseMoveEvent(event);
}
+
void QDeclarativeWebView::hoverMoveEvent (QGraphicsSceneHoverEvent * event)
{
QMouseEvent *me = sceneHoverMoveEventToMouseEvent(event);
@@ -729,21 +698,7 @@ void QDeclarativeWebView::hoverMoveEvent (QGraphicsSceneHoverEvent * event)
);
delete me;
if (!event->isAccepted())
- QDeclarativePaintedItem::hoverMoveEvent(event);
-}
-
-void QDeclarativeWebView::keyPressEvent(QKeyEvent* event)
-{
- page()->event(event);
- if (!event->isAccepted())
- QDeclarativePaintedItem::keyPressEvent(event);
-}
-
-void QDeclarativeWebView::keyReleaseEvent(QKeyEvent* event)
-{
- page()->event(event);
- if (!event->isAccepted())
- QDeclarativePaintedItem::keyReleaseEvent(event);
+ QDeclarativeItem::hoverMoveEvent(event);
}
bool QDeclarativeWebView::sceneEvent(QEvent *event)
@@ -758,7 +713,7 @@ bool QDeclarativeWebView::sceneEvent(QEvent *event)
}
}
}
- return QDeclarativePaintedItem::sceneEvent(event);
+ return QDeclarativeItem::sceneEvent(event);
}
@@ -827,15 +782,11 @@ QPixmap QDeclarativeWebView::icon() const
*/
void QDeclarativeWebView::setZoomFactor(qreal factor)
{
- Q_D(QDeclarativeWebView);
if (factor == page()->mainFrame()->zoomFactor())
return;
page()->mainFrame()->setZoomFactor(factor);
- page()->setViewportSize(QSize(
- d->preferredwidth>0 ? d->preferredwidth*factor : width()*factor,
- d->preferredheight>0 ? d->preferredheight*factor : height()*factor));
- expandToWebPage();
+ updateContentsSize();
emit zoomFactorChanged();
}
@@ -853,37 +804,27 @@ qreal QDeclarativeWebView::zoomFactor() const
*/
void QDeclarativeWebView::setStatusText(const QString& s)
{
- Q_D(QDeclarativeWebView);
d->statusText = s;
emit statusTextChanged();
}
void QDeclarativeWebView::windowObjectCleared()
{
- Q_D(QDeclarativeWebView);
d->updateWindowObjects();
}
QString QDeclarativeWebView::statusText() const
{
- Q_D(const QDeclarativeWebView);
return d->statusText;
}
QWebPage *QDeclarativeWebView::page() const
{
- Q_D(const QDeclarativeWebView);
if (!d->page) {
QDeclarativeWebView *self = const_cast<QDeclarativeWebView*>(this);
QWebPage *wp = new QDeclarativeWebPage(self);
- // QML items don't default to having a background,
- // even though most we pages will set one anyway.
- QPalette pal = QApplication::palette();
- pal.setBrush(QPalette::Base, QColor::fromRgbF(0, 0, 0, 0));
- wp->setPalette(pal);
-
wp->setNetworkAccessManager(qmlEngine(this)->networkAccessManager());
self->setPage(wp);
@@ -939,14 +880,12 @@ QWebPage *QDeclarativeWebView::page() const
*/
QDeclarativeWebSettings *QDeclarativeWebView::settingsObject() const
{
- Q_D(const QDeclarativeWebView);
d->settings.s = page()->settings();
return &d->settings;
}
void QDeclarativeWebView::setPage(QWebPage *page)
{
- Q_D(QDeclarativeWebView);
if (d->page == page)
return;
if (d->page) {
@@ -957,18 +896,15 @@ void QDeclarativeWebView::setPage(QWebPage *page)
}
}
d->page = page;
- d->page->setViewportSize(QSize(
- d->preferredwidth>0 ? d->preferredwidth : width(),
- d->preferredheight>0 ? d->preferredheight : height()));
+ updateContentsSize();
d->page->mainFrame()->setScrollBarPolicy(Qt::Horizontal,Qt::ScrollBarAlwaysOff);
d->page->mainFrame()->setScrollBarPolicy(Qt::Vertical,Qt::ScrollBarAlwaysOff);
- connect(d->page,SIGNAL(repaintRequested(QRect)),this,SLOT(paintPage(QRect)));
connect(d->page->mainFrame(),SIGNAL(urlChanged(QUrl)),this,SLOT(pageUrlChanged()));
connect(d->page->mainFrame(), SIGNAL(titleChanged(QString)), this, SIGNAL(titleChanged(QString)));
connect(d->page->mainFrame(), SIGNAL(titleChanged(QString)), this, SIGNAL(iconChanged()));
connect(d->page->mainFrame(), SIGNAL(iconChanged()), this, SIGNAL(iconChanged()));
- connect(d->page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), this, SLOT(noteContentsSizeChanged(QSize)));
connect(d->page->mainFrame(), SIGNAL(initialLayoutCompleted()), this, SLOT(initialLayout()));
+ connect(d->page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), this, SIGNAL(contentsSizeChanged(QSize)));
connect(d->page,SIGNAL(loadStarted()),this,SLOT(doLoadStarted()));
connect(d->page,SIGNAL(loadProgress(int)),this,SLOT(doLoadProgress(int)));
@@ -976,6 +912,10 @@ void QDeclarativeWebView::setPage(QWebPage *page)
connect(d->page,SIGNAL(statusBarMessage(QString)),this,SLOT(setStatusText(QString)));
connect(d->page->mainFrame(),SIGNAL(javaScriptWindowObjectCleared()),this,SLOT(windowObjectCleared()));
+
+ d->page->settings()->setAttribute(QWebSettings::TiledBackingStoreEnabled, true);
+
+ d->view->setPage(page);
}
/*!
@@ -1030,10 +970,7 @@ QString QDeclarativeWebView::html() const
*/
void QDeclarativeWebView::setHtml(const QString &html, const QUrl &baseUrl)
{
- Q_D(QDeclarativeWebView);
- page()->setViewportSize(QSize(
- d->preferredwidth>0 ? d->preferredwidth : width(),
- d->preferredheight>0 ? d->preferredheight : height()));
+ updateContentsSize();
if (isComponentComplete())
page()->mainFrame()->setHtml(html, baseUrl);
else {
@@ -1046,10 +983,7 @@ void QDeclarativeWebView::setHtml(const QString &html, const QUrl &baseUrl)
void QDeclarativeWebView::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
{
- Q_D(QDeclarativeWebView);
- page()->setViewportSize(QSize(
- d->preferredwidth>0 ? d->preferredwidth : width(),
- d->preferredheight>0 ? d->preferredheight : height()));
+ updateContentsSize();
if (isComponentComplete())
page()->mainFrame()->setContent(data,mimeType,qmlContext(this)->resolvedUrl(baseUrl));
@@ -1073,7 +1007,6 @@ QWebSettings *QDeclarativeWebView::settings() const
QDeclarativeWebView *QDeclarativeWebView::createWindow(QWebPage::WebWindowType type)
{
- Q_D(QDeclarativeWebView);
switch (type) {
case QWebPage::WebBrowserWindow: {
if (!d->newWindowComponent && d->newWindowParent)
@@ -1127,13 +1060,11 @@ QDeclarativeWebView *QDeclarativeWebView::createWindow(QWebPage::WebWindowType t
*/
QDeclarativeComponent *QDeclarativeWebView::newWindowComponent() const
{
- Q_D(const QDeclarativeWebView);
return d->newWindowComponent;
}
void QDeclarativeWebView::setNewWindowComponent(QDeclarativeComponent *newWindow)
{
- Q_D(QDeclarativeWebView);
if (newWindow == d->newWindowComponent)
return;
d->newWindowComponent = newWindow;
@@ -1150,13 +1081,11 @@ void QDeclarativeWebView::setNewWindowComponent(QDeclarativeComponent *newWindow
*/
QDeclarativeItem *QDeclarativeWebView::newWindowParent() const
{
- Q_D(const QDeclarativeWebView);
return d->newWindowParent;
}
void QDeclarativeWebView::setNewWindowParent(QDeclarativeItem *parent)
{
- Q_D(QDeclarativeWebView);
if (parent == d->newWindowParent)
return;
if (d->newWindowParent && parent) {
@@ -1169,6 +1098,25 @@ void QDeclarativeWebView::setNewWindowParent(QDeclarativeItem *parent)
emit newWindowParentChanged();
}
+QSize QDeclarativeWebView::contentsSize() const
+{
+ return d->page->mainFrame()->contentsSize() * contentsScale();
+}
+
+qreal QDeclarativeWebView::contentsScale() const
+{
+ return d->view->scale();
+}
+
+void QDeclarativeWebView::setContentsScale(qreal scale)
+{
+ if (scale == d->view->scale())
+ return;
+ d->view->setScale(scale);
+ updateDeclarativeWebViewSize();
+ emit contentsScaleChanged();
+}
+
/*!
Returns the area of the largest element at position (\a x,\a y) that is no larger
than \a maxwidth by \a maxheight pixels.
@@ -1265,3 +1213,4 @@ QWebPage *QDeclarativeWebPage::createWindow(WebWindowType type)
}
QT_END_NAMESPACE
+
diff --git a/src/imports/webkit/qdeclarativewebview_p.h b/src/imports/webkit/qdeclarativewebview_p.h
index 81581d8..87bd938 100644
--- a/src/imports/webkit/qdeclarativewebview_p.h
+++ b/src/imports/webkit/qdeclarativewebview_p.h
@@ -42,12 +42,13 @@
#ifndef QDECLARATIVEWEBVIEW_H
#define QDECLARATIVEWEBVIEW_H
-#include <private/qdeclarativepainteditem_p.h>
+#include <qdeclarativeitem.h>
#include <QtGui/QAction>
#include <QtCore/QUrl>
#include <QtNetwork/qnetworkaccessmanager.h>
#include <QtWebKit/QWebPage>
+#include <QtWebKit/QGraphicsWebView>
QT_BEGIN_HEADER
@@ -61,6 +62,7 @@ class QDeclarativeWebSettings;
class QDeclarativeWebViewPrivate;
class QNetworkRequest;
class QDeclarativeWebView;
+class QDeclarativeWebViewPrivate;
class QDeclarativeWebPage : public QWebPage
{
@@ -85,7 +87,7 @@ class QDeclarativeWebViewAttached;
//### TODO: browser plugins
-class QDeclarativeWebView : public QDeclarativePaintedItem
+class QDeclarativeWebView : public QDeclarativeItem
{
Q_OBJECT
@@ -120,6 +122,9 @@ class QDeclarativeWebView : public QDeclarativePaintedItem
Q_PROPERTY(bool renderingEnabled READ renderingEnabled WRITE setRenderingEnabled NOTIFY renderingEnabledChanged)
+ Q_PROPERTY(QSize contentsSize READ contentsSize NOTIFY contentsSizeChanged)
+ Q_PROPERTY(qreal contentsScale READ contentsScale WRITE setContentsScale NOTIFY contentsScaleChanged)
+
public:
QDeclarativeWebView(QDeclarativeItem *parent=0);
~QDeclarativeWebView();
@@ -182,6 +187,13 @@ public:
QDeclarativeItem *newWindowParent() const;
void setNewWindowParent(QDeclarativeItem *newWindow);
+ bool isComponentCompletePublic() const { return isComponentComplete(); }
+
+ QSize contentsSize() const;
+
+ void setContentsScale(qreal scale);
+ qreal contentsScale() const;
+
Q_SIGNALS:
void preferredWidthChanged();
void preferredHeightChanged();
@@ -197,6 +209,8 @@ Q_SIGNALS:
void newWindowComponentChanged();
void newWindowParentChanged();
void renderingEnabledChanged();
+ void contentsSizeChanged(const QSize&);
+ void contentsScaleChanged();
void loadStarted();
void loadFinished();
@@ -212,38 +226,36 @@ public Q_SLOTS:
QVariant evaluateJavaScript(const QString&);
private Q_SLOTS:
- void expandToWebPage();
- void paintPage(const QRect&);
void doLoadStarted();
void doLoadProgress(int p);
void doLoadFinished(bool ok);
void setStatusText(const QString&);
void windowObjectCleared();
void pageUrlChanged();
- void noteContentsSizeChanged(const QSize&);
void initialLayout();
-protected:
- void drawContents(QPainter *, const QRect &);
+ void propagateFocusToWebPage(bool);
+ void updateDeclarativeWebViewSize();
+
+protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
void timerEvent(QTimerEvent *event);
void hoverMoveEvent (QGraphicsSceneHoverEvent * event);
- void keyPressEvent(QKeyEvent* event);
- void keyReleaseEvent(QKeyEvent* event);
virtual void geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry);
virtual bool sceneEvent(QEvent *event);
QDeclarativeWebView *createWindow(QWebPage::WebWindowType type);
private:
+ void updateContentsSize();
void init();
virtual void componentComplete();
Q_DISABLE_COPY(QDeclarativeWebView)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeWebView)
+ QDeclarativeWebViewPrivate* d;
QMouseEvent *sceneMouseEventToMouseEvent(QGraphicsSceneMouseEvent *);
QMouseEvent *sceneHoverMoveEventToMouseEvent(QGraphicsSceneHoverEvent *);
friend class QDeclarativeWebPage;
diff --git a/src/imports/widgets/qmldir b/src/imports/widgets/qmldir
deleted file mode 100644
index 6f19878..0000000
--- a/src/imports/widgets/qmldir
+++ /dev/null
@@ -1 +0,0 @@
-plugin widgets
diff --git a/src/imports/widgets/widgets.cpp b/src/imports/widgets/widgets.cpp
deleted file mode 100644
index 20de1fe..0000000
--- a/src/imports/widgets/widgets.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 <QtDeclarative/qdeclarativeextensionplugin.h>
-#include <QtDeclarative/qdeclarative.h>
-#include <QGraphicsWidget>
-
-#include "graphicslayouts_p.h"
-#include <private/qdeclarativegraphicswidget_p.h>
-QT_BEGIN_NAMESPACE
-
-class QWidgetsQmlModule : public QDeclarativeExtensionPlugin
-{
- Q_OBJECT
-public:
- virtual void registerTypes(const char *uri)
- {
- Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.widgets"));
-
- qmlRegisterInterface<QGraphicsLayoutItem>("QGraphicsLayoutItem");
- qmlRegisterInterface<QGraphicsLayout>("QGraphicsLayout");
- qmlRegisterType<QGraphicsLinearLayoutStretchItemObject>(uri,4,7,"QGraphicsLinearLayoutStretchItem");
- qmlRegisterType<QGraphicsLinearLayoutObject>(uri,4,7,"QGraphicsLinearLayout");
- qmlRegisterType<QGraphicsGridLayoutObject>(uri,4,7,"QGraphicsGridLayout");
- }
-};
-
-QT_END_NAMESPACE
-
-#include "widgets.moc"
-
-Q_EXPORT_PLUGIN2(qtwidgetsqmlmodule, QT_PREPEND_NAMESPACE(QWidgetsQmlModule));
-
diff --git a/src/imports/widgets/widgets.pro b/src/imports/widgets/widgets.pro
deleted file mode 100644
index 234ff1e..0000000
--- a/src/imports/widgets/widgets.pro
+++ /dev/null
@@ -1,30 +0,0 @@
-TARGET = widgets
-TARGETPATH = Qt/widgets
-include(../qimportbase.pri)
-
-QT += declarative
-
-SOURCES += \
- graphicslayouts.cpp \
- widgets.cpp
-
-HEADERS += \
- graphicslayouts_p.h
-
-QTDIR_build:DESTDIR = $$QT_BUILD_TREE/imports/$$TARGETPATH
-target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-qmldir.files += $$PWD/qmldir
-qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH
-
-symbian:{
- load(data_caging_paths)
- include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
-
- importFiles.sources = widgets.dll qmldir
- importFiles.path = $$QT_IMPORTS_BASE_DIR/$$TARGETPATH
-
- DEPLOYMENT = importFiles
-}
-
-INSTALLS += target qmldir
diff --git a/src/multimedia/multimedia/audio/audio.pri b/src/multimedia/audio/audio.pri
index ae28a26..ae28a26 100644
--- a/src/multimedia/multimedia/audio/audio.pri
+++ b/src/multimedia/audio/audio.pri
diff --git a/src/multimedia/multimedia/audio/qaudio.cpp b/src/multimedia/audio/qaudio.cpp
index e0f24ce..e0f24ce 100644
--- a/src/multimedia/multimedia/audio/qaudio.cpp
+++ b/src/multimedia/audio/qaudio.cpp
diff --git a/src/multimedia/multimedia/audio/qaudio.h b/src/multimedia/audio/qaudio.h
index 9ca1dff..9ca1dff 100644
--- a/src/multimedia/multimedia/audio/qaudio.h
+++ b/src/multimedia/audio/qaudio.h
diff --git a/src/multimedia/multimedia/audio/qaudio_mac.cpp b/src/multimedia/audio/qaudio_mac.cpp
index 14fee8b..14fee8b 100644
--- a/src/multimedia/multimedia/audio/qaudio_mac.cpp
+++ b/src/multimedia/audio/qaudio_mac.cpp
diff --git a/src/multimedia/multimedia/audio/qaudio_mac_p.h b/src/multimedia/audio/qaudio_mac_p.h
index 4e7d688..4e7d688 100644
--- a/src/multimedia/multimedia/audio/qaudio_mac_p.h
+++ b/src/multimedia/audio/qaudio_mac_p.h
diff --git a/src/multimedia/audio/qaudio_symbian_p.cpp b/src/multimedia/audio/qaudio_symbian_p.cpp
new file mode 100644
index 0000000..4522c5c
--- /dev/null
+++ b/src/multimedia/audio/qaudio_symbian_p.cpp
@@ -0,0 +1,624 @@
+/****************************************************************************
+**
+** 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 QtMultimedia 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 "qaudio_symbian_p.h"
+#include <mmffourcc.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace SymbianAudio {
+namespace Utils {
+
+//-----------------------------------------------------------------------------
+// Static data
+//-----------------------------------------------------------------------------
+
+// Sample rate / frequency
+
+typedef TMMFSampleRate SampleRateNative;
+typedef int SampleRateQt;
+
+const int SampleRateCount = 12;
+
+const SampleRateNative SampleRateListNative[SampleRateCount] = {
+ EMMFSampleRate8000Hz
+ , EMMFSampleRate11025Hz
+ , EMMFSampleRate12000Hz
+ , EMMFSampleRate16000Hz
+ , EMMFSampleRate22050Hz
+ , EMMFSampleRate24000Hz
+ , EMMFSampleRate32000Hz
+ , EMMFSampleRate44100Hz
+ , EMMFSampleRate48000Hz
+ , EMMFSampleRate64000Hz
+ , EMMFSampleRate88200Hz
+ , EMMFSampleRate96000Hz
+};
+
+const SampleRateQt SampleRateListQt[SampleRateCount] = {
+ 8000
+ , 11025
+ , 12000
+ , 16000
+ , 22050
+ , 24000
+ , 32000
+ , 44100
+ , 48000
+ , 64000
+ , 88200
+ , 96000
+};
+
+// Channels
+
+typedef TMMFMonoStereo ChannelsNative;
+typedef int ChannelsQt;
+
+const int ChannelsCount = 2;
+
+const ChannelsNative ChannelsListNative[ChannelsCount] = {
+ EMMFMono
+ , EMMFStereo
+};
+
+const ChannelsQt ChannelsListQt[ChannelsCount] = {
+ 1
+ , 2
+};
+
+// Encoding
+
+const int EncodingCount = 6;
+
+const TUint32 EncodingFourCC[EncodingCount] = {
+ KMMFFourCCCodePCM8 // 0
+ , KMMFFourCCCodePCMU8 // 1
+ , KMMFFourCCCodePCM16 // 2
+ , KMMFFourCCCodePCMU16 // 3
+ , KMMFFourCCCodePCM16B // 4
+ , KMMFFourCCCodePCMU16B // 5
+};
+
+// The characterised DevSound API specification states that the iEncoding
+// field in TMMFCapabilities is ignored, and that the FourCC should be used
+// to specify the PCM encoding.
+// See "SGL.GT0287.102 Multimedia DevSound Baseline Compatibility.doc" in the
+// mm_info/mm_docs repository.
+const TMMFSoundEncoding EncodingNative[EncodingCount] = {
+ EMMFSoundEncoding16BitPCM // 0
+ , EMMFSoundEncoding16BitPCM // 1
+ , EMMFSoundEncoding16BitPCM // 2
+ , EMMFSoundEncoding16BitPCM // 3
+ , EMMFSoundEncoding16BitPCM // 4
+ , EMMFSoundEncoding16BitPCM // 5
+};
+
+
+const int EncodingSampleSize[EncodingCount] = {
+ 8 // 0
+ , 8 // 1
+ , 16 // 2
+ , 16 // 3
+ , 16 // 4
+ , 16 // 5
+};
+
+const QAudioFormat::Endian EncodingByteOrder[EncodingCount] = {
+ QAudioFormat::LittleEndian // 0
+ , QAudioFormat::LittleEndian // 1
+ , QAudioFormat::LittleEndian // 2
+ , QAudioFormat::LittleEndian // 3
+ , QAudioFormat::BigEndian // 4
+ , QAudioFormat::BigEndian // 5
+};
+
+const QAudioFormat::SampleType EncodingSampleType[EncodingCount] = {
+ QAudioFormat::SignedInt // 0
+ , QAudioFormat::UnSignedInt // 1
+ , QAudioFormat::SignedInt // 2
+ , QAudioFormat::UnSignedInt // 3
+ , QAudioFormat::SignedInt // 4
+ , QAudioFormat::UnSignedInt // 5
+};
+
+
+//-----------------------------------------------------------------------------
+// Private functions
+//-----------------------------------------------------------------------------
+
+// Helper functions for implementing parameter conversions
+
+template<typename Input>
+bool findValue(const Input *inputArray, int length, Input input, int &index) {
+ bool result = false;
+ for (int i=0; !result && i<length; ++i)
+ if (inputArray[i] == input) {
+ index = i;
+ result = true;
+ }
+ return result;
+}
+
+template<typename Input, typename Output>
+bool convertValue(const Input *inputArray, const Output *outputArray,
+ int length, Input input, Output &output) {
+ int index;
+ const bool result = findValue<Input>(inputArray, length, input, index);
+ if (result)
+ output = outputArray[index];
+ return result;
+}
+
+/**
+ * Macro which is used to generate the implementation of the conversion
+ * functions. The implementation is just a wrapper around the templated
+ * convertValue function, e.g.
+ *
+ * CONVERSION_FUNCTION_IMPL(SampleRate, Qt, Native)
+ *
+ * expands to
+ *
+ * bool SampleRateQtToNative(int input, TMMFSampleRate &output) {
+ * return convertValue<SampleRateQt, SampleRateNative>
+ * (SampleRateListQt, SampleRateListNative, SampleRateCount,
+ * input, output);
+ * }
+ */
+#define CONVERSION_FUNCTION_IMPL(FieldLc, Field, Input, Output) \
+bool FieldLc##Input##To##Output(Field##Input input, Field##Output &output) { \
+ return convertValue<Field##Input, Field##Output>(Field##List##Input, \
+ Field##List##Output, Field##Count, input, output); \
+}
+
+//-----------------------------------------------------------------------------
+// Local helper functions
+//-----------------------------------------------------------------------------
+
+CONVERSION_FUNCTION_IMPL(sampleRate, SampleRate, Qt, Native)
+CONVERSION_FUNCTION_IMPL(sampleRate, SampleRate, Native, Qt)
+CONVERSION_FUNCTION_IMPL(channels, Channels, Qt, Native)
+CONVERSION_FUNCTION_IMPL(channels, Channels, Native, Qt)
+
+bool sampleInfoQtToNative(int inputSampleSize,
+ QAudioFormat::Endian inputByteOrder,
+ QAudioFormat::SampleType inputSampleType,
+ TUint32 &outputFourCC,
+ TMMFSoundEncoding &outputEncoding) {
+
+ bool found = false;
+
+ for (int i=0; i<EncodingCount && !found; ++i) {
+ if ( EncodingSampleSize[i] == inputSampleSize
+ && EncodingByteOrder[i] == inputByteOrder
+ && EncodingSampleType[i] == inputSampleType) {
+ outputFourCC = EncodingFourCC[i];
+ outputEncoding = EncodingNative[i]; // EMMFSoundEncoding16BitPCM
+ found = true;
+ }
+ }
+
+ return found;
+}
+
+void capabilitiesNativeToQt(const TMMFCapabilities &caps,
+ const TFourCC &fourcc,
+ QList<int> &frequencies,
+ QList<int> &channels,
+ QList<int> &sampleSizes,
+ QList<QAudioFormat::Endian> &byteOrders,
+ QList<QAudioFormat::SampleType> &sampleTypes) {
+
+ frequencies.clear();
+ sampleSizes.clear();
+ byteOrders.clear();
+ sampleTypes.clear();
+ channels.clear();
+
+ for (int i=0; i<SampleRateCount; ++i)
+ if (caps.iRate & SampleRateListNative[i])
+ frequencies += SampleRateListQt[i];
+
+ for (int i=0; i<ChannelsCount; ++i)
+ if (caps.iChannels & ChannelsListNative[i])
+ channels += ChannelsListQt[i];
+
+ for (int i=0; i<EncodingCount; ++i) {
+ if (fourcc == EncodingFourCC[i]) {
+ sampleSizes += EncodingSampleSize[i];
+ byteOrders += EncodingByteOrder[i];
+ sampleTypes += EncodingSampleType[i];
+ }
+ }
+}
+
+bool formatQtToNative(const QAudioFormat &inputFormat,
+ TUint32 &outputFourCC,
+ TMMFCapabilities &outputFormat) {
+
+ bool result = false;
+
+ // Need to use temporary variables because TMMFCapabilities fields are all
+ // TInt, rather than MMF enumerated types.
+ TMMFSampleRate outputSampleRate;
+ TMMFMonoStereo outputChannels;
+ TMMFSoundEncoding outputEncoding;
+
+ if (inputFormat.codec() == QLatin1String("audio/pcm")) {
+ result =
+ sampleRateQtToNative(inputFormat.frequency(), outputSampleRate)
+ && channelsQtToNative(inputFormat.channels(), outputChannels)
+ && sampleInfoQtToNative(inputFormat.sampleSize(),
+ inputFormat.byteOrder(),
+ inputFormat.sampleType(),
+ outputFourCC,
+ outputEncoding);
+ }
+
+ if (result) {
+ outputFormat.iRate = outputSampleRate;
+ outputFormat.iChannels = outputChannels;
+ outputFormat.iEncoding = outputEncoding;
+ }
+
+ return result;
+}
+
+QAudio::State stateNativeToQt(State nativeState)
+{
+ switch (nativeState) {
+ case ClosedState:
+ return QAudio::StoppedState;
+ case InitializingState:
+ return QAudio::StoppedState;
+ case ActiveState:
+ return QAudio::ActiveState;
+ case IdleState:
+ return QAudio::IdleState;
+ case SuspendedState:
+ return QAudio::SuspendedState;
+ default:
+ Q_ASSERT_X(false, Q_FUNC_INFO, "Invalid state");
+ return QAudio::StoppedState; // suppress compiler warning
+ }
+}
+
+qint64 bytesToSamples(const QAudioFormat &format, qint64 length)
+{
+ return length / ((format.sampleSize() / 8) * format.channels());
+}
+
+qint64 samplesToBytes(const QAudioFormat &format, qint64 samples)
+{
+ return samples * (format.sampleSize() / 8) * format.channels();
+}
+
+} // namespace Utils
+
+
+//-----------------------------------------------------------------------------
+// DevSoundWrapper
+//-----------------------------------------------------------------------------
+
+DevSoundWrapper::DevSoundWrapper(QAudio::Mode mode, QObject *parent)
+ : QObject(parent)
+ , m_mode(mode)
+ , m_state(StateIdle)
+ , m_devsound(0)
+ , m_fourcc(0)
+{
+ QT_TRAP_THROWING(m_devsound = CMMFDevSound::NewL());
+
+ switch (mode) {
+ case QAudio::AudioOutput:
+ m_nativeMode = EMMFStatePlaying;
+ break;
+
+ case QAudio::AudioInput:
+ m_nativeMode = EMMFStateRecording;
+ break;
+
+ default:
+ Q_ASSERT_X(false, Q_FUNC_INFO, "Invalid mode");
+ }
+
+ getSupportedCodecs();
+}
+
+DevSoundWrapper::~DevSoundWrapper()
+{
+ delete m_devsound;
+}
+
+const QList<QString>& DevSoundWrapper::supportedCodecs() const
+{
+ return m_supportedCodecs;
+}
+
+void DevSoundWrapper::initialize(const QString& codec)
+{
+ Q_ASSERT(StateInitializing != m_state);
+ m_state = StateInitializing;
+ if (QLatin1String("audio/pcm") == codec) {
+ m_fourcc = KMMFFourCCCodePCM16;
+ TRAPD(err, m_devsound->InitializeL(*this, m_fourcc, m_nativeMode));
+ if (KErrNone != err) {
+ m_state = StateIdle;
+ emit initializeComplete(err);
+ }
+ } else {
+ emit initializeComplete(KErrNotSupported);
+ }
+}
+
+const QList<int>& DevSoundWrapper::supportedFrequencies() const
+{
+ Q_ASSERT(StateInitialized == m_state);
+ return m_supportedFrequencies;
+}
+
+const QList<int>& DevSoundWrapper::supportedChannels() const
+{
+ Q_ASSERT(StateInitialized == m_state);
+ return m_supportedChannels;
+}
+
+const QList<int>& DevSoundWrapper::supportedSampleSizes() const
+{
+ Q_ASSERT(StateInitialized == m_state);
+ return m_supportedSampleSizes;
+}
+
+const QList<QAudioFormat::Endian>& DevSoundWrapper::supportedByteOrders() const
+{
+ Q_ASSERT(StateInitialized == m_state);
+ return m_supportedByteOrders;
+}
+
+const QList<QAudioFormat::SampleType>& DevSoundWrapper::supportedSampleTypes() const
+{
+ Q_ASSERT(StateInitialized == m_state);
+ return m_supportedSampleTypes;
+}
+
+bool DevSoundWrapper::isFormatSupported(const QAudioFormat &format) const
+{
+ Q_ASSERT(StateInitialized == m_state);
+ return m_supportedCodecs.contains(format.codec())
+ && m_supportedFrequencies.contains(format.frequency())
+ && m_supportedChannels.contains(format.channels())
+ && m_supportedSampleSizes.contains(format.sampleSize())
+ && m_supportedSampleTypes.contains(format.sampleType())
+ && m_supportedByteOrders.contains(format.byteOrder());
+}
+
+int DevSoundWrapper::samplesProcessed() const
+{
+ Q_ASSERT(StateInitialized == m_state);
+ int result = 0;
+ switch (m_mode) {
+ case QAudio::AudioInput:
+ result = m_devsound->SamplesRecorded();
+ break;
+ case QAudio::AudioOutput:
+ result = m_devsound->SamplesPlayed();
+ break;
+ }
+ return result;
+}
+
+bool DevSoundWrapper::setFormat(const QAudioFormat &format)
+{
+ Q_ASSERT(StateInitialized == m_state);
+ bool result = false;
+ TUint32 fourcc;
+ TMMFCapabilities nativeFormat;
+ if (Utils::formatQtToNative(format, fourcc, nativeFormat)) {
+ TMMFCapabilities currentNativeFormat = m_devsound->Config();
+ nativeFormat.iBufferSize = currentNativeFormat.iBufferSize;
+ TRAPD(err, m_devsound->SetConfigL(nativeFormat));
+ result = (KErrNone == err);
+ }
+ return result;
+}
+
+bool DevSoundWrapper::start()
+{
+ Q_ASSERT(StateInitialized == m_state);
+ int err = KErrArgument;
+ switch (m_mode) {
+ case QAudio::AudioInput:
+ TRAP(err, m_devsound->RecordInitL());
+ break;
+ case QAudio::AudioOutput:
+ TRAP(err, m_devsound->PlayInitL());
+ break;
+ }
+ return (KErrNone == err);
+}
+
+void DevSoundWrapper::pause()
+{
+ Q_ASSERT(StateInitialized == m_state);
+ m_devsound->Pause();
+}
+
+void DevSoundWrapper::stop()
+{
+ m_devsound->Stop();
+}
+
+void DevSoundWrapper::bufferProcessed()
+{
+ Q_ASSERT(StateInitialized == m_state);
+ switch (m_mode) {
+ case QAudio::AudioInput:
+ m_devsound->RecordData();
+ break;
+ case QAudio::AudioOutput:
+ m_devsound->PlayData();
+ break;
+ }
+}
+
+void DevSoundWrapper::getSupportedCodecs()
+{
+/*
+ * TODO: once we support formats other than PCM, this function should
+ * convert the array of FourCC codes into MIME types for each codec.
+ *
+ RArray<TFourCC> fourcc;
+ QT_TRAP_THROWING(CleanupClosePushL(&fourcc));
+
+ TMMFPrioritySettings settings;
+ switch (mode) {
+ case QAudio::AudioOutput:
+ settings.iState = EMMFStatePlaying;
+ m_devsound->GetSupportedInputDataTypesL(fourcc, settings);
+ break;
+
+ case QAudio::AudioInput:
+ settings.iState = EMMFStateRecording;
+ m_devsound->GetSupportedInputDataTypesL(fourcc, settings);
+ break;
+
+ default:
+ Q_ASSERT_X(false, Q_FUNC_INFO, "Invalid mode");
+ }
+
+ CleanupStack::PopAndDestroy(); // fourcc
+*/
+
+ m_supportedCodecs.append(QLatin1String("audio/pcm"));
+}
+
+void DevSoundWrapper::populateCapabilities()
+{
+ m_supportedFrequencies.clear();
+ m_supportedChannels.clear();
+ m_supportedSampleSizes.clear();
+ m_supportedByteOrders.clear();
+ m_supportedSampleTypes.clear();
+
+ const TMMFCapabilities caps = m_devsound->Capabilities();
+
+ for (int i=0; i<Utils::SampleRateCount; ++i)
+ if (caps.iRate & Utils::SampleRateListNative[i])
+ m_supportedFrequencies += Utils::SampleRateListQt[i];
+
+ for (int i=0; i<Utils::ChannelsCount; ++i)
+ if (caps.iChannels & Utils::ChannelsListNative[i])
+ m_supportedChannels += Utils::ChannelsListQt[i];
+
+ for (int i=0; i<Utils::EncodingCount; ++i) {
+ if (m_fourcc == Utils::EncodingFourCC[i]) {
+ m_supportedSampleSizes += Utils::EncodingSampleSize[i];
+ m_supportedByteOrders += Utils::EncodingByteOrder[i];
+ m_supportedSampleTypes += Utils::EncodingSampleType[i];
+ }
+ }
+}
+
+void DevSoundWrapper::InitializeComplete(TInt aError)
+{
+ Q_ASSERT(StateInitializing == m_state);
+ if (KErrNone == aError) {
+ m_state = StateInitialized;
+ populateCapabilities();
+ } else {
+ m_state = StateIdle;
+ }
+ emit initializeComplete(aError);
+}
+
+void DevSoundWrapper::ToneFinished(TInt aError)
+{
+ Q_UNUSED(aError)
+ // This class doesn't use DevSound's tone playback functions, so should
+ // never receive this callback.
+ Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback");
+}
+
+void DevSoundWrapper::BufferToBeFilled(CMMFBuffer *aBuffer)
+{
+ Q_ASSERT(QAudio::AudioOutput == m_mode);
+ emit bufferToBeProcessed(aBuffer);
+}
+
+void DevSoundWrapper::PlayError(TInt aError)
+{
+ Q_ASSERT(QAudio::AudioOutput == m_mode);
+ emit processingError(aError);
+}
+
+void DevSoundWrapper::BufferToBeEmptied(CMMFBuffer *aBuffer)
+{
+ Q_ASSERT(QAudio::AudioInput == m_mode);
+ emit bufferToBeProcessed(aBuffer);
+}
+
+void DevSoundWrapper::RecordError(TInt aError)
+{
+ Q_ASSERT(QAudio::AudioInput == m_mode);
+ emit processingError(aError);
+}
+
+void DevSoundWrapper::ConvertError(TInt aError)
+{
+ Q_UNUSED(aError)
+ // This class doesn't use DevSound's format conversion functions, so
+ // should never receive this callback.
+ Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback");
+}
+
+void DevSoundWrapper::DeviceMessage(TUid aMessageType, const TDesC8 &aMsg)
+{
+ Q_UNUSED(aMessageType)
+ Q_UNUSED(aMsg)
+ // Ignore this callback.
+}
+
+
+} // namespace SymbianAudio
+
+QT_END_NAMESPACE
+
+
diff --git a/src/multimedia/audio/qaudio_symbian_p.h b/src/multimedia/audio/qaudio_symbian_p.h
new file mode 100644
index 0000000..58ef192
--- /dev/null
+++ b/src/multimedia/audio/qaudio_symbian_p.h
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** 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 QtMultimedia 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.
+//
+
+#ifndef QAUDIO_SYMBIAN_P_H
+#define QAUDIO_SYMBIAN_P_H
+
+#include <QtCore/QList>
+#include <QtCore/QString>
+#include <QtMultimedia/qaudioformat.h>
+#include <QtMultimedia/qaudio.h>
+#include <sounddevice.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace SymbianAudio {
+
+/**
+ * Default values used by audio input and output classes, when underlying
+ * DevSound instance has not yet been created.
+ */
+
+const int DefaultBufferSize = 4096; // bytes
+const int DefaultNotifyInterval = 1000; // ms
+
+/**
+ * Enumeration used to track state of internal DevSound instances.
+ * Values are translated to the corresponding QAudio::State values by
+ * SymbianAudio::Utils::stateNativeToQt.
+ */
+enum State {
+ ClosedState
+ , InitializingState
+ , ActiveState
+ , IdleState
+ , SuspendedState
+};
+
+/**
+ * Wrapper around DevSound instance
+ */
+class DevSoundWrapper
+ : public QObject
+ , public MDevSoundObserver
+{
+ Q_OBJECT
+
+public:
+ DevSoundWrapper(QAudio::Mode mode, QObject *parent = 0);
+ ~DevSoundWrapper();
+
+public:
+ // List of supported codecs; can be called once object is constructed
+ const QList<QString>& supportedCodecs() const;
+
+ // Asynchronous initialization function; emits devsoundInitializeComplete
+ void initialize(const QString& codec);
+
+ // Capabilities, for selected codec. Can be called once initialize has returned
+ // successfully.
+ const QList<int>& supportedFrequencies() const;
+ const QList<int>& supportedChannels() const;
+ const QList<int>& supportedSampleSizes() const;
+ const QList<QAudioFormat::Endian>& supportedByteOrders() const;
+ const QList<QAudioFormat::SampleType>& supportedSampleTypes() const;
+
+ bool isFormatSupported(const QAudioFormat &format) const;
+
+ int samplesProcessed() const;
+ bool setFormat(const QAudioFormat &format);
+ bool start();
+ void pause();
+ void stop();
+ void bufferProcessed();
+
+public:
+ // MDevSoundObserver
+ void InitializeComplete(TInt aError);
+ void ToneFinished(TInt aError);
+ void BufferToBeFilled(CMMFBuffer *aBuffer);
+ void PlayError(TInt aError);
+ void BufferToBeEmptied(CMMFBuffer *aBuffer);
+ void RecordError(TInt aError);
+ void ConvertError(TInt aError);
+ void DeviceMessage(TUid aMessageType, const TDesC8 &aMsg);
+
+signals:
+ void initializeComplete(int error);
+ void bufferToBeProcessed(CMMFBuffer *buffer);
+ void processingError(int error);
+
+private:
+ void getSupportedCodecs();
+ void populateCapabilities();
+
+private:
+ const QAudio::Mode m_mode;
+ TMMFState m_nativeMode;
+
+ enum State {
+ StateIdle,
+ StateInitializing,
+ StateInitialized
+ } m_state;
+
+ CMMFDevSound* m_devsound;
+ TFourCC m_fourcc;
+
+ QList<QString> m_supportedCodecs;
+ QList<int> m_supportedFrequencies;
+ QList<int> m_supportedChannels;
+ QList<int> m_supportedSampleSizes;
+ QList<QAudioFormat::Endian> m_supportedByteOrders;
+ QList<QAudioFormat::SampleType> m_supportedSampleTypes;
+
+};
+
+
+namespace Utils {
+
+/**
+ * Convert internal states to QAudio states.
+ */
+QAudio::State stateNativeToQt(State nativeState);
+
+/**
+ * Convert data length to number of samples.
+ */
+qint64 bytesToSamples(const QAudioFormat &format, qint64 length);
+
+/**
+ * Convert number of samples to data length.
+ */
+qint64 samplesToBytes(const QAudioFormat &format, qint64 samples);
+
+} // namespace Utils
+} // namespace SymbianAudio
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/multimedia/multimedia/audio/qaudiodevicefactory.cpp b/src/multimedia/audio/qaudiodevicefactory.cpp
index 96545b4..96545b4 100644
--- a/src/multimedia/multimedia/audio/qaudiodevicefactory.cpp
+++ b/src/multimedia/audio/qaudiodevicefactory.cpp
diff --git a/src/multimedia/multimedia/audio/qaudiodevicefactory_p.h b/src/multimedia/audio/qaudiodevicefactory_p.h
index 8ee8b05..8ee8b05 100644
--- a/src/multimedia/multimedia/audio/qaudiodevicefactory_p.h
+++ b/src/multimedia/audio/qaudiodevicefactory_p.h
diff --git a/src/multimedia/multimedia/audio/qaudiodeviceinfo.cpp b/src/multimedia/audio/qaudiodeviceinfo.cpp
index ff04b4e..ff04b4e 100644
--- a/src/multimedia/multimedia/audio/qaudiodeviceinfo.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo.cpp
diff --git a/src/multimedia/multimedia/audio/qaudiodeviceinfo.h b/src/multimedia/audio/qaudiodeviceinfo.h
index 1cc0731..1cc0731 100644
--- a/src/multimedia/multimedia/audio/qaudiodeviceinfo.h
+++ b/src/multimedia/audio/qaudiodeviceinfo.h
diff --git a/src/multimedia/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
index 36270a7..36270a7 100644
--- a/src/multimedia/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
diff --git a/src/multimedia/multimedia/audio/qaudiodeviceinfo_alsa_p.h b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
index 6f9a459..6f9a459 100644
--- a/src/multimedia/multimedia/audio/qaudiodeviceinfo_alsa_p.h
+++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
diff --git a/src/multimedia/multimedia/audio/qaudiodeviceinfo_mac_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
index ecd03e5..ecd03e5 100644
--- a/src/multimedia/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp
diff --git a/src/multimedia/multimedia/audio/qaudiodeviceinfo_mac_p.h b/src/multimedia/audio/qaudiodeviceinfo_mac_p.h
index e234384..e234384 100644
--- a/src/multimedia/multimedia/audio/qaudiodeviceinfo_mac_p.h
+++ b/src/multimedia/audio/qaudiodeviceinfo_mac_p.h
diff --git a/src/multimedia/audio/qaudiodeviceinfo_symbian_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_symbian_p.cpp
new file mode 100644
index 0000000..4be116f
--- /dev/null
+++ b/src/multimedia/audio/qaudiodeviceinfo_symbian_p.cpp
@@ -0,0 +1,240 @@
+/****************************************************************************
+**
+** 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 QtMultimedia 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/QCoreApplication>
+#include "qaudiodeviceinfo_symbian_p.h"
+#include "qaudio_symbian_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QAudioDeviceInfoInternal::QAudioDeviceInfoInternal(QByteArray device,
+ QAudio::Mode mode)
+ : m_deviceName(QLatin1String(device))
+ , m_mode(mode)
+ , m_updated(false)
+{
+
+}
+
+QAudioDeviceInfoInternal::~QAudioDeviceInfoInternal()
+{
+
+}
+
+QAudioFormat QAudioDeviceInfoInternal::preferredFormat() const
+{
+ QAudioFormat format;
+ switch (m_mode) {
+ case QAudio::AudioOutput:
+ format.setFrequency(44100);
+ format.setChannels(2);
+ format.setSampleSize(16);
+ format.setByteOrder(QAudioFormat::LittleEndian);
+ format.setSampleType(QAudioFormat::SignedInt);
+ format.setCodec(QLatin1String("audio/pcm"));
+ break;
+
+ case QAudio::AudioInput:
+ format.setFrequency(8000);
+ format.setChannels(1);
+ format.setSampleSize(16);
+ format.setByteOrder(QAudioFormat::LittleEndian);
+ format.setSampleType(QAudioFormat::SignedInt);
+ format.setCodec(QLatin1String("audio/pcm"));
+ break;
+
+ default:
+ Q_ASSERT_X(false, Q_FUNC_INFO, "Invalid mode");
+ }
+
+ if (!isFormatSupported(format)) {
+ format = QAudioFormat();
+ format.setCodec(QLatin1String("audio/pcm"));
+ if (m_capabilities.contains(format.codec())) {
+ const Capabilities &codecCaps = m_capabilities[format.codec()];
+ if (codecCaps.m_frequencies.size())
+ format.setFrequency(codecCaps.m_frequencies[0]);
+ if (codecCaps.m_channels.size())
+ format.setChannels(codecCaps.m_channels[0]);
+ if (codecCaps.m_sampleSizes.size())
+ format.setSampleSize(codecCaps.m_sampleSizes[0]);
+ if (codecCaps.m_byteOrders.size())
+ format.setByteOrder(codecCaps.m_byteOrders[0]);
+ if (codecCaps.m_sampleTypes.size())
+ format.setSampleType(codecCaps.m_sampleTypes[0]);
+ }
+ }
+
+ return format;
+}
+
+bool QAudioDeviceInfoInternal::isFormatSupported(
+ const QAudioFormat &format) const
+{
+ getSupportedFormats();
+ bool supported = false;
+ if (m_capabilities.contains(format.codec())) {
+ const Capabilities &codecCaps = m_capabilities[format.codec()];
+ supported = codecCaps.m_frequencies.contains(format.frequency())
+ && codecCaps.m_channels.contains(format.channels())
+ && codecCaps.m_sampleSizes.contains(format.sampleSize())
+ && codecCaps.m_byteOrders.contains(format.byteOrder())
+ && codecCaps.m_sampleTypes.contains(format.sampleType());
+ }
+ return supported;
+}
+
+QAudioFormat QAudioDeviceInfoInternal::nearestFormat(const QAudioFormat &format) const
+{
+ if (isFormatSupported(format))
+ return format;
+ else
+ return preferredFormat();
+}
+
+QString QAudioDeviceInfoInternal::deviceName() const
+{
+ return m_deviceName;
+}
+
+QStringList QAudioDeviceInfoInternal::codecList()
+{
+ getSupportedFormats();
+ return m_capabilities.keys();
+}
+
+QList<int> QAudioDeviceInfoInternal::frequencyList()
+{
+ getSupportedFormats();
+ return m_unionCapabilities.m_frequencies;
+}
+
+QList<int> QAudioDeviceInfoInternal::channelsList()
+{
+ getSupportedFormats();
+ return m_unionCapabilities.m_channels;
+}
+
+QList<int> QAudioDeviceInfoInternal::sampleSizeList()
+{
+ getSupportedFormats();
+ return m_unionCapabilities.m_sampleSizes;
+}
+
+QList<QAudioFormat::Endian> QAudioDeviceInfoInternal::byteOrderList()
+{
+ getSupportedFormats();
+ return m_unionCapabilities.m_byteOrders;
+}
+
+QList<QAudioFormat::SampleType> QAudioDeviceInfoInternal::sampleTypeList()
+{
+ getSupportedFormats();
+ return m_unionCapabilities.m_sampleTypes;
+}
+
+QByteArray QAudioDeviceInfoInternal::defaultInputDevice()
+{
+ return QByteArray("default");
+}
+
+QByteArray QAudioDeviceInfoInternal::defaultOutputDevice()
+{
+ return QByteArray("default");
+}
+
+QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode)
+{
+ QList<QByteArray> result;
+ result += QByteArray("default");
+ return result;
+}
+
+void QAudioDeviceInfoInternal::devsoundInitializeComplete(int err)
+{
+ m_intializationResult = err;
+ m_initializing = false;
+}
+
+// Helper function
+template<typename T>
+void appendUnique(QList<T> &left, const QList<T> &right)
+{
+ foreach (const T &value, right)
+ if (!left.contains(value))
+ left += value;
+}
+
+void QAudioDeviceInfoInternal::getSupportedFormats() const
+{
+ if (!m_updated) {
+ QScopedPointer<SymbianAudio::DevSoundWrapper> devsound(new SymbianAudio::DevSoundWrapper(m_mode));
+ connect(devsound.data(), SIGNAL(initializeComplete(int)),
+ this, SLOT(devsoundInitializeComplete(int)));
+
+ foreach (const QString& codec, devsound->supportedCodecs()) {
+ m_initializing = true;
+ devsound->initialize(codec);
+ while (m_initializing)
+ QCoreApplication::instance()->processEvents(QEventLoop::WaitForMoreEvents);
+ if (KErrNone == m_intializationResult) {
+ m_capabilities[codec].m_frequencies = devsound->supportedFrequencies();
+ appendUnique(m_unionCapabilities.m_frequencies, devsound->supportedFrequencies());
+
+ m_capabilities[codec].m_channels = devsound->supportedChannels();
+ appendUnique(m_unionCapabilities.m_channels, devsound->supportedChannels());
+
+ m_capabilities[codec].m_sampleSizes = devsound->supportedSampleSizes();
+ appendUnique(m_unionCapabilities.m_sampleSizes, devsound->supportedSampleSizes());
+
+ m_capabilities[codec].m_byteOrders = devsound->supportedByteOrders();
+ appendUnique(m_unionCapabilities.m_byteOrders, devsound->supportedByteOrders());
+
+ m_capabilities[codec].m_sampleTypes = devsound->supportedSampleTypes();
+ appendUnique(m_unionCapabilities.m_sampleTypes, devsound->supportedSampleTypes());
+ }
+ }
+
+ m_updated = true;
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/multimedia/audio/qaudiodeviceinfo_symbian_p.h b/src/multimedia/audio/qaudiodeviceinfo_symbian_p.h
new file mode 100644
index 0000000..79b23cc
--- /dev/null
+++ b/src/multimedia/audio/qaudiodeviceinfo_symbian_p.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** 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 QtMultimedia 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.
+//
+
+#ifndef QAUDIODEVICEINFO_SYMBIAN_P_H
+#define QAUDIODEVICEINFO_SYMBIAN_P_H
+
+#include <QtCore/QMap>
+#include <QtMultimedia/qaudioengine.h>
+#include <sounddevice.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace SymbianAudio {
+class DevSoundWrapper;
+}
+
+class QAudioDeviceInfoInternal
+ : public QAbstractAudioDeviceInfo
+{
+ Q_OBJECT
+
+public:
+ QAudioDeviceInfoInternal(QByteArray device, QAudio::Mode mode);
+ ~QAudioDeviceInfoInternal();
+
+ // QAbstractAudioDeviceInfo
+ QAudioFormat preferredFormat() const;
+ bool isFormatSupported(const QAudioFormat &format) const;
+ QAudioFormat nearestFormat(const QAudioFormat &format) const;
+ QString deviceName() const;
+ QStringList codecList();
+ QList<int> frequencyList();
+ QList<int> channelsList();
+ QList<int> sampleSizeList();
+ QList<QAudioFormat::Endian> byteOrderList();
+ QList<QAudioFormat::SampleType> sampleTypeList();
+ static QByteArray defaultInputDevice();
+ static QByteArray defaultOutputDevice();
+ static QList<QByteArray> availableDevices(QAudio::Mode);
+
+private slots:
+ void devsoundInitializeComplete(int err);
+
+private:
+ void getSupportedFormats() const;
+
+private:
+ mutable bool m_initializing;
+ int m_intializationResult;
+
+ QString m_deviceName;
+ QAudio::Mode m_mode;
+
+ struct Capabilities
+ {
+ QList<int> m_frequencies;
+ QList<int> m_channels;
+ QList<int> m_sampleSizes;
+ QList<QAudioFormat::Endian> m_byteOrders;
+ QList<QAudioFormat::SampleType> m_sampleTypes;
+ };
+
+ // Mutable to allow lazy initialization when called from const-qualified
+ // public functions (isFormatSupported, nearestFormat)
+ mutable bool m_updated;
+ mutable QMap<QString, Capabilities> m_capabilities;
+ mutable Capabilities m_unionCapabilities;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/multimedia/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
index aee0807..aee0807 100644
--- a/src/multimedia/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
diff --git a/src/multimedia/multimedia/audio/qaudiodeviceinfo_win32_p.h b/src/multimedia/audio/qaudiodeviceinfo_win32_p.h
index cb6dd91..cb6dd91 100644
--- a/src/multimedia/multimedia/audio/qaudiodeviceinfo_win32_p.h
+++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.h
diff --git a/src/multimedia/multimedia/audio/qaudioengine.cpp b/src/multimedia/audio/qaudioengine.cpp
index 7f1f5d3..7f1f5d3 100644
--- a/src/multimedia/multimedia/audio/qaudioengine.cpp
+++ b/src/multimedia/audio/qaudioengine.cpp
diff --git a/src/multimedia/multimedia/audio/qaudioengine.h b/src/multimedia/audio/qaudioengine.h
index df9d09d..df9d09d 100644
--- a/src/multimedia/multimedia/audio/qaudioengine.h
+++ b/src/multimedia/audio/qaudioengine.h
diff --git a/src/multimedia/multimedia/audio/qaudioengineplugin.cpp b/src/multimedia/audio/qaudioengineplugin.cpp
index 82324b5..82324b5 100644
--- a/src/multimedia/multimedia/audio/qaudioengineplugin.cpp
+++ b/src/multimedia/audio/qaudioengineplugin.cpp
diff --git a/src/multimedia/multimedia/audio/qaudioengineplugin.h b/src/multimedia/audio/qaudioengineplugin.h
index 2322d2a..2322d2a 100644
--- a/src/multimedia/multimedia/audio/qaudioengineplugin.h
+++ b/src/multimedia/audio/qaudioengineplugin.h
diff --git a/src/multimedia/multimedia/audio/qaudioformat.cpp b/src/multimedia/audio/qaudioformat.cpp
index 86d72f6..86d72f6 100644
--- a/src/multimedia/multimedia/audio/qaudioformat.cpp
+++ b/src/multimedia/audio/qaudioformat.cpp
diff --git a/src/multimedia/multimedia/audio/qaudioformat.h b/src/multimedia/audio/qaudioformat.h
index 6c835b7..6c835b7 100644
--- a/src/multimedia/multimedia/audio/qaudioformat.h
+++ b/src/multimedia/audio/qaudioformat.h
diff --git a/src/multimedia/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp
index 3676f64..3676f64 100644
--- a/src/multimedia/multimedia/audio/qaudioinput.cpp
+++ b/src/multimedia/audio/qaudioinput.cpp
diff --git a/src/multimedia/multimedia/audio/qaudioinput.h b/src/multimedia/audio/qaudioinput.h
index 5be9b5a..5be9b5a 100644
--- a/src/multimedia/multimedia/audio/qaudioinput.h
+++ b/src/multimedia/audio/qaudioinput.h
diff --git a/src/multimedia/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp
index c9a8b71..c9a8b71 100644
--- a/src/multimedia/multimedia/audio/qaudioinput_alsa_p.cpp
+++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp
diff --git a/src/multimedia/multimedia/audio/qaudioinput_alsa_p.h b/src/multimedia/audio/qaudioinput_alsa_p.h
index c907019..c907019 100644
--- a/src/multimedia/multimedia/audio/qaudioinput_alsa_p.h
+++ b/src/multimedia/audio/qaudioinput_alsa_p.h
diff --git a/src/multimedia/multimedia/audio/qaudioinput_mac_p.cpp b/src/multimedia/audio/qaudioinput_mac_p.cpp
index cb65f6e..cb65f6e 100644
--- a/src/multimedia/multimedia/audio/qaudioinput_mac_p.cpp
+++ b/src/multimedia/audio/qaudioinput_mac_p.cpp
diff --git a/src/multimedia/multimedia/audio/qaudioinput_mac_p.h b/src/multimedia/audio/qaudioinput_mac_p.h
index 7aa4168..7aa4168 100644
--- a/src/multimedia/multimedia/audio/qaudioinput_mac_p.h
+++ b/src/multimedia/audio/qaudioinput_mac_p.h
diff --git a/src/multimedia/audio/qaudioinput_symbian_p.cpp b/src/multimedia/audio/qaudioinput_symbian_p.cpp
new file mode 100644
index 0000000..9d240ca
--- /dev/null
+++ b/src/multimedia/audio/qaudioinput_symbian_p.cpp
@@ -0,0 +1,551 @@
+/****************************************************************************
+**
+** 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 QtMultimedia 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 "qaudioinput_symbian_p.h"
+
+QT_BEGIN_NAMESPACE
+
+//-----------------------------------------------------------------------------
+// Constants
+//-----------------------------------------------------------------------------
+
+const int PushInterval = 50; // ms
+
+
+//-----------------------------------------------------------------------------
+// Private class
+//-----------------------------------------------------------------------------
+
+SymbianAudioInputPrivate::SymbianAudioInputPrivate(
+ QAudioInputPrivate *audioDevice)
+ : m_audioDevice(audioDevice)
+{
+
+}
+
+SymbianAudioInputPrivate::~SymbianAudioInputPrivate()
+{
+
+}
+
+qint64 SymbianAudioInputPrivate::readData(char *data, qint64 len)
+{
+ qint64 totalRead = 0;
+
+ if (m_audioDevice->state() == QAudio::ActiveState ||
+ m_audioDevice->state() == QAudio::IdleState) {
+
+ while (totalRead < len) {
+ const qint64 read = m_audioDevice->read(data + totalRead,
+ len - totalRead);
+ if (read > 0)
+ totalRead += read;
+ else
+ break;
+ }
+ }
+
+ return totalRead;
+}
+
+qint64 SymbianAudioInputPrivate::writeData(const char *data, qint64 len)
+{
+ Q_UNUSED(data)
+ Q_UNUSED(len)
+ return 0;
+}
+
+void SymbianAudioInputPrivate::dataReady()
+{
+ emit readyRead();
+}
+
+
+//-----------------------------------------------------------------------------
+// Public functions
+//-----------------------------------------------------------------------------
+
+QAudioInputPrivate::QAudioInputPrivate(const QByteArray &device,
+ const QAudioFormat &format)
+ : m_device(device)
+ , m_format(format)
+ , m_clientBufferSize(SymbianAudio::DefaultBufferSize)
+ , m_notifyInterval(SymbianAudio::DefaultNotifyInterval)
+ , m_notifyTimer(new QTimer(this))
+ , m_error(QAudio::NoError)
+ , m_internalState(SymbianAudio::ClosedState)
+ , m_externalState(QAudio::StoppedState)
+ , m_pullMode(false)
+ , m_sink(0)
+ , m_pullTimer(new QTimer(this))
+ , m_devSound(0)
+ , m_devSoundBuffer(0)
+ , m_devSoundBufferSize(0)
+ , m_totalBytesReady(0)
+ , m_devSoundBufferPos(0)
+ , m_totalSamplesRecorded(0)
+{
+ qRegisterMetaType<CMMFBuffer *>("CMMFBuffer *");
+
+ connect(m_notifyTimer.data(), SIGNAL(timeout()), this, SIGNAL(notify()));
+
+ m_pullTimer->setInterval(PushInterval);
+ connect(m_pullTimer.data(), SIGNAL(timeout()), this, SLOT(pullData()));
+}
+
+QAudioInputPrivate::~QAudioInputPrivate()
+{
+ close();
+}
+
+QIODevice* QAudioInputPrivate::start(QIODevice *device)
+{
+ stop();
+
+ open();
+ if (SymbianAudio::ClosedState != m_internalState) {
+ if (device) {
+ m_pullMode = true;
+ m_sink = device;
+ } else {
+ m_sink = new SymbianAudioInputPrivate(this);
+ m_sink->open(QIODevice::ReadOnly | QIODevice::Unbuffered);
+ }
+
+ m_elapsed.restart();
+ }
+
+ return m_sink;
+}
+
+void QAudioInputPrivate::stop()
+{
+ close();
+}
+
+void QAudioInputPrivate::reset()
+{
+ m_totalSamplesRecorded += getSamplesRecorded();
+ m_devSound->stop();
+ startRecording();
+}
+
+void QAudioInputPrivate::suspend()
+{
+ if (SymbianAudio::ActiveState == m_internalState
+ || SymbianAudio::IdleState == m_internalState) {
+ m_notifyTimer->stop();
+ m_pullTimer->stop();
+ m_devSound->pause();
+ const qint64 samplesRecorded = getSamplesRecorded();
+ m_totalSamplesRecorded += samplesRecorded;
+
+ if (m_devSoundBuffer) {
+ m_devSoundBufferQ.append(m_devSoundBuffer);
+ m_devSoundBuffer = 0;
+ }
+
+ setState(SymbianAudio::SuspendedState);
+ }
+}
+
+void QAudioInputPrivate::resume()
+{
+ if (SymbianAudio::SuspendedState == m_internalState) {
+ if (!m_pullMode && !bytesReady())
+ m_devSound->start();
+ startDataTransfer();
+ }
+}
+
+int QAudioInputPrivate::bytesReady() const
+{
+ Q_ASSERT(m_devSoundBufferPos <= m_totalBytesReady);
+ return m_totalBytesReady - m_devSoundBufferPos;
+}
+
+int QAudioInputPrivate::periodSize() const
+{
+ return bufferSize();
+}
+
+void QAudioInputPrivate::setBufferSize(int value)
+{
+ // Note that DevSound does not allow its client to specify the buffer size.
+ // This functionality is available via custom interfaces, but since these
+ // cannot be guaranteed to work across all DevSound implementations, we
+ // do not use them here.
+ // In order to comply with the expected bevahiour of QAudioInput, we store
+ // the value and return it from bufferSize(), but the underlying DevSound
+ // buffer size remains unchanged.
+ if (value > 0)
+ m_clientBufferSize = value;
+}
+
+int QAudioInputPrivate::bufferSize() const
+{
+ return m_devSoundBufferSize ? m_devSoundBufferSize : m_clientBufferSize;
+}
+
+void QAudioInputPrivate::setNotifyInterval(int ms)
+{
+ if (ms >= 0) {
+ const int oldNotifyInterval = m_notifyInterval;
+ m_notifyInterval = ms;
+ if (m_notifyInterval && (SymbianAudio::ActiveState == m_internalState ||
+ SymbianAudio::IdleState == m_internalState))
+ m_notifyTimer->start(m_notifyInterval);
+ else
+ m_notifyTimer->stop();
+ }
+}
+
+int QAudioInputPrivate::notifyInterval() const
+{
+ return m_notifyInterval;
+}
+
+qint64 QAudioInputPrivate::processedUSecs() const
+{
+ int samplesPlayed = 0;
+ if (m_devSound && SymbianAudio::SuspendedState != m_internalState)
+ samplesPlayed = getSamplesRecorded();
+
+ // Protect against division by zero
+ Q_ASSERT_X(m_format.frequency() > 0, Q_FUNC_INFO, "Invalid frequency");
+
+ const qint64 result = qint64(1000000) *
+ (samplesPlayed + m_totalSamplesRecorded)
+ / m_format.frequency();
+
+ return result;
+}
+
+qint64 QAudioInputPrivate::elapsedUSecs() const
+{
+ const qint64 result = (QAudio::StoppedState == state()) ?
+ 0 : m_elapsed.elapsed() * 1000;
+ return result;
+}
+
+QAudio::Error QAudioInputPrivate::error() const
+{
+ return m_error;
+}
+
+QAudio::State QAudioInputPrivate::state() const
+{
+ return m_externalState;
+}
+
+QAudioFormat QAudioInputPrivate::format() const
+{
+ return m_format;
+}
+
+
+//-----------------------------------------------------------------------------
+// Private functions
+//-----------------------------------------------------------------------------
+
+void QAudioInputPrivate::open()
+{
+ Q_ASSERT_X(SymbianAudio::ClosedState == m_internalState,
+ Q_FUNC_INFO, "DevSound already opened");
+
+ Q_ASSERT(!m_devSound);
+ m_devSound = new SymbianAudio::DevSoundWrapper(QAudio::AudioInput, this);
+
+ connect(m_devSound, SIGNAL(initializeComplete(int)),
+ this, SLOT(devsoundInitializeComplete(int)));
+ connect(m_devSound, SIGNAL(bufferToBeProcessed(CMMFBuffer *)),
+ this, SLOT(devsoundBufferToBeEmptied(CMMFBuffer *)));
+ connect(m_devSound, SIGNAL(processingError(int)),
+ this, SLOT(devsoundRecordError(int)));
+
+ setState(SymbianAudio::InitializingState);
+ m_devSound->initialize(m_format.codec());
+}
+
+void QAudioInputPrivate::startRecording()
+{
+ const int samplesRecorded = m_devSound->samplesProcessed();
+ Q_ASSERT(samplesRecorded == 0);
+
+ bool ok = m_devSound->setFormat(m_format);
+ if (ok)
+ ok = m_devSound->start();
+
+ if (ok) {
+ startDataTransfer();
+ } else {
+ setError(QAudio::OpenError);
+ close();
+ }
+}
+
+void QAudioInputPrivate::startDataTransfer()
+{
+ if (m_notifyInterval)
+ m_notifyTimer->start(m_notifyInterval);
+
+ if (m_pullMode)
+ m_pullTimer->start();
+
+ if (bytesReady()) {
+ setState(SymbianAudio::ActiveState);
+ if (!m_pullMode)
+ pushData();
+ } else {
+ if (SymbianAudio::SuspendedState == m_internalState)
+ setState(SymbianAudio::ActiveState);
+ else
+ setState(SymbianAudio::IdleState);
+ }
+}
+
+CMMFDataBuffer* QAudioInputPrivate::currentBuffer() const
+{
+ CMMFDataBuffer *result = m_devSoundBuffer;
+ if (!result && !m_devSoundBufferQ.empty())
+ result = m_devSoundBufferQ.front();
+ return result;
+}
+
+void QAudioInputPrivate::pushData()
+{
+ Q_ASSERT_X(bytesReady(), Q_FUNC_INFO, "No data available");
+ Q_ASSERT_X(!m_pullMode, Q_FUNC_INFO, "pushData called when in pull mode");
+ qobject_cast<SymbianAudioInputPrivate *>(m_sink)->dataReady();
+}
+
+qint64 QAudioInputPrivate::read(char *data, qint64 len)
+{
+ // SymbianAudioInputPrivate is ready to read data
+
+ Q_ASSERT_X(!m_pullMode, Q_FUNC_INFO,
+ "read called when in pull mode");
+
+ qint64 bytesRead = 0;
+
+ CMMFDataBuffer *buffer = 0;
+ while ((buffer = currentBuffer()) && (bytesRead < len)) {
+ if (SymbianAudio::IdleState == m_internalState)
+ setState(SymbianAudio::ActiveState);
+
+ TDesC8 &inputBuffer = buffer->Data();
+
+ const qint64 inputBytes = bytesReady();
+ const qint64 outputBytes = len - bytesRead;
+ const qint64 copyBytes = outputBytes < inputBytes ?
+ outputBytes : inputBytes;
+
+ memcpy(data, inputBuffer.Ptr() + m_devSoundBufferPos, copyBytes);
+
+ m_devSoundBufferPos += copyBytes;
+ data += copyBytes;
+ bytesRead += copyBytes;
+
+ if (!bytesReady())
+ bufferEmptied();
+ }
+
+ return bytesRead;
+}
+
+void QAudioInputPrivate::pullData()
+{
+ Q_ASSERT_X(m_pullMode, Q_FUNC_INFO,
+ "pullData called when in push mode");
+
+ CMMFDataBuffer *buffer = 0;
+ while (buffer = currentBuffer()) {
+ if (SymbianAudio::IdleState == m_internalState)
+ setState(SymbianAudio::ActiveState);
+
+ TDesC8 &inputBuffer = buffer->Data();
+
+ const qint64 inputBytes = bytesReady();
+ const qint64 bytesPushed = m_sink->write(
+ (char*)inputBuffer.Ptr() + m_devSoundBufferPos, inputBytes);
+
+ m_devSoundBufferPos += bytesPushed;
+
+ if (!bytesReady())
+ bufferEmptied();
+
+ if (!bytesPushed)
+ break;
+ }
+}
+
+void QAudioInputPrivate::devsoundInitializeComplete(int err)
+{
+ Q_ASSERT_X(SymbianAudio::InitializingState == m_internalState,
+ Q_FUNC_INFO, "Invalid state");
+
+ if (!err && m_devSound->isFormatSupported(m_format))
+ startRecording();
+ else
+ setError(QAudio::OpenError);
+}
+
+void QAudioInputPrivate::devsoundBufferToBeEmptied(CMMFBuffer *baseBuffer)
+{
+ // Following receipt of this signal, DevSound should not provide another
+ // buffer until we have returned the current one.
+ Q_ASSERT_X(!m_devSoundBuffer, Q_FUNC_INFO, "Buffer already held");
+
+ CMMFDataBuffer *const buffer = static_cast<CMMFDataBuffer*>(baseBuffer);
+
+ if (!m_devSoundBufferSize)
+ m_devSoundBufferSize = buffer->Data().MaxLength();
+
+ m_totalBytesReady += buffer->Data().Length();
+
+ if (SymbianAudio::SuspendedState == m_internalState) {
+ m_devSoundBufferQ.append(buffer);
+ } else {
+ // Will be returned to DevSoundWrapper by bufferProcessed().
+ m_devSoundBuffer = buffer;
+ m_devSoundBufferPos = 0;
+
+ if (bytesReady() && !m_pullMode)
+ pushData();
+ }
+}
+
+void QAudioInputPrivate::devsoundRecordError(int err)
+{
+ Q_UNUSED(err)
+ setError(QAudio::IOError);
+}
+
+void QAudioInputPrivate::bufferEmptied()
+{
+ m_devSoundBufferPos = 0;
+
+ if (m_devSoundBuffer) {
+ m_totalBytesReady -= m_devSoundBuffer->Data().Length();
+ m_devSoundBuffer = 0;
+ m_devSound->bufferProcessed();
+ } else {
+ Q_ASSERT(!m_devSoundBufferQ.empty());
+ m_totalBytesReady -= m_devSoundBufferQ.front()->Data().Length();
+ m_devSoundBufferQ.erase(m_devSoundBufferQ.begin());
+
+ // If the queue has been emptied, resume transfer from the hardware
+ if (m_devSoundBufferQ.empty())
+ if (!m_devSound->start())
+ setError(QAudio::IOError);
+ }
+
+ Q_ASSERT(m_totalBytesReady >= 0);
+}
+
+void QAudioInputPrivate::close()
+{
+ m_notifyTimer->stop();
+ m_pullTimer->stop();
+
+ m_error = QAudio::NoError;
+
+ if (m_devSound)
+ m_devSound->stop();
+ delete m_devSound;
+ m_devSound = 0;
+
+ m_devSoundBuffer = 0;
+ m_devSoundBufferSize = 0;
+ m_totalBytesReady = 0;
+
+ if (!m_pullMode) // m_sink is owned
+ delete m_sink;
+ m_pullMode = false;
+ m_sink = 0;
+
+ m_devSoundBufferQ.clear();
+ m_devSoundBufferPos = 0;
+ m_totalSamplesRecorded = 0;
+
+ setState(SymbianAudio::ClosedState);
+}
+
+qint64 QAudioInputPrivate::getSamplesRecorded() const
+{
+ qint64 result = 0;
+ if (m_devSound)
+ result = qint64(m_devSound->samplesProcessed());
+ return result;
+}
+
+void QAudioInputPrivate::setError(QAudio::Error error)
+{
+ m_error = error;
+
+ // Although no state transition actually occurs here, a stateChanged event
+ // must be emitted to inform the client that the call to start() was
+ // unsuccessful.
+ if (QAudio::OpenError == error) {
+ emit stateChanged(QAudio::StoppedState);
+ } else {
+ if (QAudio::UnderrunError == error)
+ setState(SymbianAudio::IdleState);
+ else
+ // Close the DevSound instance. This causes a transition to
+ // StoppedState. This must be done asynchronously in case the
+ // current function was called from a DevSound event handler, in which
+ // case deleting the DevSound instance may cause an exception.
+ QMetaObject::invokeMethod(this, "close", Qt::QueuedConnection);
+ }
+}
+
+void QAudioInputPrivate::setState(SymbianAudio::State newInternalState)
+{
+ const QAudio::State oldExternalState = m_externalState;
+ m_internalState = newInternalState;
+ m_externalState = SymbianAudio::Utils::stateNativeToQt(m_internalState);
+
+ if (m_externalState != oldExternalState)
+ emit stateChanged(m_externalState);
+}
+
+QT_END_NAMESPACE
diff --git a/src/multimedia/audio/qaudioinput_symbian_p.h b/src/multimedia/audio/qaudioinput_symbian_p.h
new file mode 100644
index 0000000..7417655
--- /dev/null
+++ b/src/multimedia/audio/qaudioinput_symbian_p.h
@@ -0,0 +1,174 @@
+/****************************************************************************
+**
+** 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 QtMultimedia 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.
+//
+
+#ifndef QAUDIOINPUT_SYMBIAN_P_H
+#define QAUDIOINPUT_SYMBIAN_P_H
+
+#include <QtMultimedia/qaudioengine.h>
+#include <QTime>
+#include <QTimer>
+#include "qaudio_symbian_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QAudioInputPrivate;
+
+class SymbianAudioInputPrivate : public QIODevice
+{
+ friend class QAudioInputPrivate;
+ Q_OBJECT
+public:
+ SymbianAudioInputPrivate(QAudioInputPrivate *audio);
+ ~SymbianAudioInputPrivate();
+
+ qint64 readData(char *data, qint64 len);
+ qint64 writeData(const char *data, qint64 len);
+
+ void dataReady();
+
+private:
+ QAudioInputPrivate *const m_audioDevice;
+};
+
+class QAudioInputPrivate
+ : public QAbstractAudioInput
+{
+ friend class SymbianAudioInputPrivate;
+ Q_OBJECT
+public:
+ QAudioInputPrivate(const QByteArray &device,
+ const QAudioFormat &audioFormat);
+ ~QAudioInputPrivate();
+
+ // QAbstractAudioInput
+ QIODevice* start(QIODevice *device = 0);
+ void stop();
+ void reset();
+ void suspend();
+ void resume();
+ int bytesReady() const;
+ int periodSize() const;
+ void setBufferSize(int value);
+ int bufferSize() const;
+ void setNotifyInterval(int milliSeconds);
+ int notifyInterval() const;
+ qint64 processedUSecs() const;
+ qint64 elapsedUSecs() const;
+ QAudio::Error error() const;
+ QAudio::State state() const;
+ QAudioFormat format() const;
+
+private slots:
+ void pullData();
+ void devsoundInitializeComplete(int err);
+ void devsoundBufferToBeEmptied(CMMFBuffer *);
+ void devsoundRecordError(int err);
+
+private:
+ void open();
+ void startRecording();
+ void startDataTransfer();
+ CMMFDataBuffer* currentBuffer() const;
+ void pushData();
+ qint64 read(char *data, qint64 len);
+ void bufferEmptied();
+ Q_INVOKABLE void close();
+
+ qint64 getSamplesRecorded() const;
+
+ void setError(QAudio::Error error);
+ void setState(SymbianAudio::State state);
+
+private:
+ const QByteArray m_device;
+ const QAudioFormat m_format;
+
+ int m_clientBufferSize;
+ int m_notifyInterval;
+ QScopedPointer<QTimer> m_notifyTimer;
+ QTime m_elapsed;
+ QAudio::Error m_error;
+
+ SymbianAudio::State m_internalState;
+ QAudio::State m_externalState;
+
+ bool m_pullMode;
+ QIODevice *m_sink;
+
+ QScopedPointer<QTimer> m_pullTimer;
+
+ SymbianAudio::DevSoundWrapper* m_devSound;
+
+ // Latest buffer provided by DevSound, to be empied of data.
+ CMMFDataBuffer *m_devSoundBuffer;
+
+ int m_devSoundBufferSize;
+
+ // Total amount of data in buffers provided by DevSound
+ int m_totalBytesReady;
+
+ // Queue of buffers returned after call to CMMFDevSound::Pause().
+ QList<CMMFDataBuffer *> m_devSoundBufferQ;
+
+ // Current read position within m_devSoundBuffer
+ qint64 m_devSoundBufferPos;
+
+ // Samples recorded up to the last call to suspend(). It is necessary
+ // to cache this because suspend() is implemented using
+ // CMMFDevSound::Stop(), which resets DevSound's SamplesRecorded() counter.
+ quint32 m_totalSamplesRecorded;
+
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/multimedia/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp
index 14a1cf3..14a1cf3 100644
--- a/src/multimedia/multimedia/audio/qaudioinput_win32_p.cpp
+++ b/src/multimedia/audio/qaudioinput_win32_p.cpp
diff --git a/src/multimedia/multimedia/audio/qaudioinput_win32_p.h b/src/multimedia/audio/qaudioinput_win32_p.h
index 8a9b02b..8a9b02b 100644
--- a/src/multimedia/multimedia/audio/qaudioinput_win32_p.h
+++ b/src/multimedia/audio/qaudioinput_win32_p.h
diff --git a/src/multimedia/audio/qaudiooutput.cpp b/src/multimedia/audio/qaudiooutput.cpp
new file mode 100644
index 0000000..371773c
--- /dev/null
+++ b/src/multimedia/audio/qaudiooutput.cpp
@@ -0,0 +1,421 @@
+/****************************************************************************
+**
+** 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 QtMultimedia 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 <QtMultimedia/qaudio.h>
+#include <QtMultimedia/qaudiodeviceinfo.h>
+#include <QtMultimedia/qaudioengine.h>
+#include <QtMultimedia/qaudiooutput.h>
+
+#include "qaudiodevicefactory_p.h"
+
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \class QAudioOutput
+ \brief The QAudioOutput class provides an interface for sending audio data to an audio output device.
+
+ \inmodule QtMultimedia
+ \ingroup multimedia
+ \since 4.6
+
+ You can construct an audio output with the system's
+ \l{QAudioDeviceInfo::defaultOutputDevice()}{default audio output
+ device}. It is also possible to create QAudioOutput with a
+ specific QAudioDeviceInfo. When you create the audio output, you
+ should also send in the QAudioFormat to be used for the playback
+ (see the QAudioFormat class description for details).
+
+ To play a file:
+
+ Starting to play an audio stream is simply a matter of calling
+ start() with a QIODevice. QAudioOutput will then fetch the data it
+ needs from the io device. So playing back an audio file is as
+ simple as:
+
+ \code
+ QFile inputFile; // class member.
+ QAudioOutput* audio; // class member.
+ \endcode
+
+ \code
+ inputFile.setFileName("/tmp/test.raw");
+ inputFile.open(QIODevice::ReadOnly);
+
+ QAudioFormat format;
+ // Set up the format, eg.
+ format.setFrequency(8000);
+ format.setChannels(1);
+ format.setSampleSize(8);
+ format.setCodec("audio/pcm");
+ format.setByteOrder(QAudioFormat::LittleEndian);
+ format.setSampleType(QAudioFormat::UnSignedInt);
+
+ QAudioDeviceInfo info(QAudioDeviceInfo::defaultOutputDevice());
+ if (!info.isFormatSupported(format)) {
+ qWarning()<<"raw audio format not supported by backend, cannot play audio.";
+ return;
+ }
+
+ audio = new QAudioOutput(format, this);
+ connect(audio,SIGNAL(stateChanged(QAudio::State)),SLOT(finishedPlaying(QAudio::State)));
+ audio->start(&inputFile);
+
+ \endcode
+
+ The file will start playing assuming that the audio system and
+ output device support it. If you run out of luck, check what's
+ up with the error() function.
+
+ After the file has finished playing, we need to stop the device:
+
+ \code
+ void finishedPlaying(QAudio::State state)
+ {
+ if(state == QAudio::IdleState) {
+ audio->stop();
+ inputFile.close();
+ delete audio;
+ }
+ }
+ \endcode
+
+ At any given time, the QAudioOutput will be in one of four states:
+ active, suspended, stopped, or idle. These states are described
+ by the QAudio::State enum.
+ State changes are reported through the stateChanged() signal. You
+ can use this signal to, for instance, update the GUI of the
+ application; the mundane example here being changing the state of
+ a \c { play/pause } button. You request a state change directly
+ with suspend(), stop(), reset(), resume(), and start().
+
+ While the stream is playing, you can set a notify interval in
+ milliseconds with setNotifyInterval(). This interval specifies the
+ time between two emissions of the notify() signal. This is
+ relative to the position in the stream, i.e., if the QAudioOutput
+ is in the SuspendedState or the IdleState, the notify() signal is
+ not emitted. A typical use-case would be to update a
+ \l{QSlider}{slider} that allows seeking in the stream.
+ If you want the time since playback started regardless of which
+ states the audio output has been in, elapsedUSecs() is the function for you.
+
+ If an error occurs, you can fetch the \l{QAudio::Error}{error
+ type} with the error() function. Please see the QAudio::Error enum
+ for a description of the possible errors that are reported. When
+ an error is encountered, the state changes to QAudio::StoppedState.
+ You can check for errors by connecting to the stateChanged()
+ signal:
+
+ \snippet doc/src/snippets/audio/main.cpp 3
+
+ \sa QAudioInput, QAudioDeviceInfo
+*/
+
+/*!
+ Construct a new audio output and attach it to \a parent.
+ The default audio output device is used with the output
+ \a format parameters.
+*/
+
+QAudioOutput::QAudioOutput(const QAudioFormat &format, QObject *parent):
+ QObject(parent)
+{
+ d = QAudioDeviceFactory::createDefaultOutputDevice(format);
+ connect(d, SIGNAL(notify()), SIGNAL(notify()));
+ connect(d, SIGNAL(stateChanged(QAudio::State)), SIGNAL(stateChanged(QAudio::State)));
+}
+
+/*!
+ Construct a new audio output and attach it to \a parent.
+ The device referenced by \a audioDevice is used with the output
+ \a format parameters.
+*/
+
+QAudioOutput::QAudioOutput(const QAudioDeviceInfo &audioDevice, const QAudioFormat &format, QObject *parent):
+ QObject(parent)
+{
+ d = QAudioDeviceFactory::createOutputDevice(audioDevice, format);
+ connect(d, SIGNAL(notify()), SIGNAL(notify()));
+ connect(d, SIGNAL(stateChanged(QAudio::State)), SIGNAL(stateChanged(QAudio::State)));
+}
+
+/*!
+ Destroys this audio output.
+*/
+
+QAudioOutput::~QAudioOutput()
+{
+ delete d;
+}
+
+/*!
+ Returns the QAudioFormat being used.
+
+*/
+
+QAudioFormat QAudioOutput::format() const
+{
+ return d->format();
+}
+
+/*!
+ Uses the \a device as the QIODevice to transfer data.
+ Passing a QIODevice allows the data to be transfered without any extra code.
+ All that is required is to open the QIODevice.
+
+ If able to successfully output audio data to the systems audio device the
+ state() is set to QAudio::ActiveState, error() is set to QAudio::NoError
+ and the stateChanged() signal is emitted.
+
+ If a problem occurs during this process the error() is set to QAudio::OpenError,
+ state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
+
+ In either case, the stateChanged() signal may be emitted either synchronously
+ during execution of the start() function or asynchronously after start() has
+ returned to the caller.
+
+ \sa QIODevice
+*/
+
+void QAudioOutput::start(QIODevice* device)
+{
+ d->start(device);
+}
+
+/*!
+ Returns a pointer to the QIODevice being used to handle the data
+ transfer. This QIODevice can be used to write() audio data directly.
+
+ If able to access the systems audio device the state() is set to
+ QAudio::IdleState, error() is set to QAudio::NoError
+ and the stateChanged() signal is emitted.
+
+ If a problem occurs during this process the error() is set to QAudio::OpenError,
+ state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
+
+ In either case, the stateChanged() signal may be emitted either synchronously
+ during execution of the start() function or asynchronously after start() has
+ returned to the caller.
+
+ \sa QIODevice
+*/
+
+QIODevice* QAudioOutput::start()
+{
+ return d->start(0);
+}
+
+/*!
+ Stops the audio output, detaching from the system resource.
+
+ Sets error() to QAudio::NoError, state() to QAudio::StoppedState and
+ emit stateChanged() signal.
+*/
+
+void QAudioOutput::stop()
+{
+ d->stop();
+}
+
+/*!
+ Drops all audio data in the buffers, resets buffers to zero.
+*/
+
+void QAudioOutput::reset()
+{
+ d->reset();
+}
+
+/*!
+ Stops processing audio data, preserving buffered audio data.
+
+ Sets error() to QAudio::NoError, state() to QAudio::SuspendedState and
+ emit stateChanged() signal.
+*/
+
+void QAudioOutput::suspend()
+{
+ d->suspend();
+}
+
+/*!
+ Resumes processing audio data after a suspend().
+
+ Sets error() to QAudio::NoError.
+ Sets state() to QAudio::ActiveState if you previously called start(QIODevice*).
+ Sets state() to QAudio::IdleState if you previously called start().
+ emits stateChanged() signal.
+
+ Note: signal will always be emitted during execution of the resume() function.
+*/
+
+void QAudioOutput::resume()
+{
+ d->resume();
+}
+
+/*!
+ Returns the free space available in bytes in the audio buffer.
+
+ NOTE: returned value is only valid while in QAudio::ActiveState or QAudio::IdleState
+ state, otherwise returns zero.
+*/
+
+int QAudioOutput::bytesFree() const
+{
+ return d->bytesFree();
+}
+
+/*!
+ Returns the period size in bytes.
+
+ Note: This is the recommended write size in bytes.
+*/
+
+int QAudioOutput::periodSize() const
+{
+ return d->periodSize();
+}
+
+/*!
+ Sets the audio buffer size to \a value in bytes.
+
+ Note: This function can be called anytime before start(), calls to this
+ are ignored after start(). It should not be assumed that the buffer size
+ set is the actual buffer size used, calling bufferSize() anytime after start()
+ will return the actual buffer size being used.
+*/
+
+void QAudioOutput::setBufferSize(int value)
+{
+ d->setBufferSize(value);
+}
+
+/*!
+ Returns the audio buffer size in bytes.
+
+ If called before start(), returns platform default value.
+ If called before start() but setBufferSize() was called prior, returns value set by setBufferSize().
+ If called after start(), returns the actual buffer size being used. This may not be what was set previously
+ by setBufferSize().
+
+*/
+
+int QAudioOutput::bufferSize() const
+{
+ return d->bufferSize();
+}
+
+/*!
+ Sets the interval for notify() signal to be emitted.
+ This is based on the \a ms of audio data processed
+ not on actual real-time.
+ The minimum resolution of the timer is platform specific and values
+ should be checked with notifyInterval() to confirm actual value
+ being used.
+*/
+
+void QAudioOutput::setNotifyInterval(int ms)
+{
+ d->setNotifyInterval(ms);
+}
+
+/*!
+ Returns the notify interval in milliseconds.
+*/
+
+int QAudioOutput::notifyInterval() const
+{
+ return d->notifyInterval();
+}
+
+/*!
+ Returns the amount of audio data processed since start()
+ was called in microseconds.
+*/
+
+qint64 QAudioOutput::processedUSecs() const
+{
+ return d->processedUSecs();
+}
+
+/*!
+ Returns the microseconds since start() was called, including time in Idle and
+ Suspend states.
+*/
+
+qint64 QAudioOutput::elapsedUSecs() const
+{
+ return d->elapsedUSecs();
+}
+
+/*!
+ Returns the error state.
+*/
+
+QAudio::Error QAudioOutput::error() const
+{
+ return d->error();
+}
+
+/*!
+ Returns the state of audio processing.
+*/
+
+QAudio::State QAudioOutput::state() const
+{
+ return d->state();
+}
+
+/*!
+ \fn QAudioOutput::stateChanged(QAudio::State state)
+ This signal is emitted when the device \a state has changed.
+ This is the current state of the audio output.
+*/
+
+/*!
+ \fn QAudioOutput::notify()
+ This signal is emitted when x ms of audio data has been processed
+ the interval set by setNotifyInterval(x).
+*/
+
+QT_END_NAMESPACE
diff --git a/src/multimedia/multimedia/audio/qaudiooutput.h b/src/multimedia/audio/qaudiooutput.h
index 0f45b1b..0f45b1b 100644
--- a/src/multimedia/multimedia/audio/qaudiooutput.h
+++ b/src/multimedia/audio/qaudiooutput.h
diff --git a/src/multimedia/multimedia/audio/qaudiooutput_alsa_p.cpp b/src/multimedia/audio/qaudiooutput_alsa_p.cpp
index 49b32c0..49b32c0 100644
--- a/src/multimedia/multimedia/audio/qaudiooutput_alsa_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_alsa_p.cpp
diff --git a/src/multimedia/multimedia/audio/qaudiooutput_alsa_p.h b/src/multimedia/audio/qaudiooutput_alsa_p.h
index e6ac231..e6ac231 100644
--- a/src/multimedia/multimedia/audio/qaudiooutput_alsa_p.h
+++ b/src/multimedia/audio/qaudiooutput_alsa_p.h
diff --git a/src/multimedia/multimedia/audio/qaudiooutput_mac_p.cpp b/src/multimedia/audio/qaudiooutput_mac_p.cpp
index 9689101..9689101 100644
--- a/src/multimedia/multimedia/audio/qaudiooutput_mac_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_mac_p.cpp
diff --git a/src/multimedia/multimedia/audio/qaudiooutput_mac_p.h b/src/multimedia/audio/qaudiooutput_mac_p.h
index 752905c..752905c 100644
--- a/src/multimedia/multimedia/audio/qaudiooutput_mac_p.h
+++ b/src/multimedia/audio/qaudiooutput_mac_p.h
diff --git a/src/multimedia/audio/qaudiooutput_symbian_p.cpp b/src/multimedia/audio/qaudiooutput_symbian_p.cpp
new file mode 100644
index 0000000..5098469
--- /dev/null
+++ b/src/multimedia/audio/qaudiooutput_symbian_p.cpp
@@ -0,0 +1,646 @@
+/****************************************************************************
+**
+** 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 QtMultimedia 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 "qaudiooutput_symbian_p.h"
+
+QT_BEGIN_NAMESPACE
+
+//-----------------------------------------------------------------------------
+// Constants
+//-----------------------------------------------------------------------------
+
+const int UnderflowTimerInterval = 50; // ms
+
+
+//-----------------------------------------------------------------------------
+// Private class
+//-----------------------------------------------------------------------------
+
+SymbianAudioOutputPrivate::SymbianAudioOutputPrivate(
+ QAudioOutputPrivate *audioDevice)
+ : m_audioDevice(audioDevice)
+{
+
+}
+
+SymbianAudioOutputPrivate::~SymbianAudioOutputPrivate()
+{
+
+}
+
+qint64 SymbianAudioOutputPrivate::readData(char *data, qint64 len)
+{
+ Q_UNUSED(data)
+ Q_UNUSED(len)
+ return 0;
+}
+
+qint64 SymbianAudioOutputPrivate::writeData(const char *data, qint64 len)
+{
+ qint64 totalWritten = 0;
+
+ if (m_audioDevice->state() == QAudio::ActiveState ||
+ m_audioDevice->state() == QAudio::IdleState) {
+
+ while (totalWritten < len) {
+ const qint64 written = m_audioDevice->pushData(data + totalWritten,
+ len - totalWritten);
+ if (written > 0)
+ totalWritten += written;
+ else
+ break;
+ }
+ }
+
+ return totalWritten;
+}
+
+
+//-----------------------------------------------------------------------------
+// Public functions
+//-----------------------------------------------------------------------------
+
+QAudioOutputPrivate::QAudioOutputPrivate(const QByteArray &device,
+ const QAudioFormat &format)
+ : m_device(device)
+ , m_format(format)
+ , m_clientBufferSize(SymbianAudio::DefaultBufferSize)
+ , m_notifyInterval(SymbianAudio::DefaultNotifyInterval)
+ , m_notifyTimer(new QTimer(this))
+ , m_error(QAudio::NoError)
+ , m_internalState(SymbianAudio::ClosedState)
+ , m_externalState(QAudio::StoppedState)
+ , m_pullMode(false)
+ , m_source(0)
+ , m_devSound(0)
+ , m_devSoundBuffer(0)
+ , m_devSoundBufferSize(0)
+ , m_bytesWritten(0)
+ , m_pushDataReady(false)
+ , m_bytesPadding(0)
+ , m_underflow(false)
+ , m_lastBuffer(false)
+ , m_underflowTimer(new QTimer(this))
+ , m_samplesPlayed(0)
+ , m_totalSamplesPlayed(0)
+{
+ qRegisterMetaType<CMMFBuffer *>("CMMFBuffer *");
+
+ connect(m_notifyTimer.data(), SIGNAL(timeout()), this, SIGNAL(notify()));
+
+ m_underflowTimer->setInterval(UnderflowTimerInterval);
+ connect(m_underflowTimer.data(), SIGNAL(timeout()), this,
+ SLOT(underflowTimerExpired()));
+}
+
+QAudioOutputPrivate::~QAudioOutputPrivate()
+{
+ close();
+}
+
+QIODevice* QAudioOutputPrivate::start(QIODevice *device)
+{
+ stop();
+
+ if (device) {
+ m_pullMode = true;
+ m_source = device;
+ }
+
+ open();
+
+ if (SymbianAudio::ClosedState != m_internalState) {
+ if (device) {
+ connect(m_source, SIGNAL(readyRead()), this, SLOT(dataReady()));
+ } else {
+ m_source = new SymbianAudioOutputPrivate(this);
+ m_source->open(QIODevice::WriteOnly | QIODevice::Unbuffered);
+ }
+
+ m_elapsed.restart();
+ }
+
+ return m_source;
+}
+
+void QAudioOutputPrivate::stop()
+{
+ close();
+}
+
+void QAudioOutputPrivate::reset()
+{
+ m_totalSamplesPlayed += getSamplesPlayed();
+ m_devSound->stop();
+ m_bytesPadding = 0;
+ startPlayback();
+}
+
+void QAudioOutputPrivate::suspend()
+{
+ if (SymbianAudio::ActiveState == m_internalState
+ || SymbianAudio::IdleState == m_internalState) {
+ m_notifyTimer->stop();
+ m_underflowTimer->stop();
+
+ const qint64 samplesWritten = SymbianAudio::Utils::bytesToSamples(
+ m_format, m_bytesWritten);
+
+ const qint64 samplesPlayed = getSamplesPlayed();
+
+ m_bytesWritten = 0;
+
+ // CMMFDevSound::Pause() is not guaranteed to work correctly in all
+ // implementations, for play-mode DevSound sessions. We therefore
+ // have to implement suspend() by calling CMMFDevSound::Stop().
+ // Because this causes buffered data to be dropped, we replace the
+ // lost data with silence following a call to resume(), in order to
+ // ensure that processedUSecs() returns the correct value.
+ m_devSound->stop();
+ m_totalSamplesPlayed += samplesPlayed;
+
+ // Calculate the amount of data dropped
+ const qint64 paddingSamples = samplesWritten - samplesPlayed;
+ Q_ASSERT(paddingSamples >= 0);
+ m_bytesPadding = SymbianAudio::Utils::samplesToBytes(m_format,
+ paddingSamples);
+
+ setState(SymbianAudio::SuspendedState);
+ }
+}
+
+void QAudioOutputPrivate::resume()
+{
+ if (SymbianAudio::SuspendedState == m_internalState) {
+ if (!m_pullMode && m_devSoundBuffer && m_devSoundBuffer->Data().Length())
+ bufferFilled();
+ startPlayback();
+ }
+}
+
+int QAudioOutputPrivate::bytesFree() const
+{
+ int result = 0;
+ if (m_devSoundBuffer) {
+ const TDes8 &outputBuffer = m_devSoundBuffer->Data();
+ result = outputBuffer.MaxLength() - outputBuffer.Length();
+ }
+ return result;
+}
+
+int QAudioOutputPrivate::periodSize() const
+{
+ return bufferSize();
+}
+
+void QAudioOutputPrivate::setBufferSize(int value)
+{
+ // Note that DevSound does not allow its client to specify the buffer size.
+ // This functionality is available via custom interfaces, but since these
+ // cannot be guaranteed to work across all DevSound implementations, we
+ // do not use them here.
+ // In order to comply with the expected bevahiour of QAudioOutput, we store
+ // the value and return it from bufferSize(), but the underlying DevSound
+ // buffer size remains unchanged.
+ if (value > 0)
+ m_clientBufferSize = value;
+}
+
+int QAudioOutputPrivate::bufferSize() const
+{
+ return m_devSoundBufferSize ? m_devSoundBufferSize : m_clientBufferSize;
+}
+
+void QAudioOutputPrivate::setNotifyInterval(int ms)
+{
+ if (ms >= 0) {
+ const int oldNotifyInterval = m_notifyInterval;
+ m_notifyInterval = ms;
+ if (m_notifyInterval && (SymbianAudio::ActiveState == m_internalState ||
+ SymbianAudio::IdleState == m_internalState))
+ m_notifyTimer->start(m_notifyInterval);
+ else
+ m_notifyTimer->stop();
+ }
+}
+
+int QAudioOutputPrivate::notifyInterval() const
+{
+ return m_notifyInterval;
+}
+
+qint64 QAudioOutputPrivate::processedUSecs() const
+{
+ int samplesPlayed = 0;
+ if (m_devSound && SymbianAudio::SuspendedState != m_internalState)
+ samplesPlayed = getSamplesPlayed();
+
+ // Protect against division by zero
+ Q_ASSERT_X(m_format.frequency() > 0, Q_FUNC_INFO, "Invalid frequency");
+
+ const qint64 result = qint64(1000000) *
+ (samplesPlayed + m_totalSamplesPlayed)
+ / m_format.frequency();
+
+ return result;
+}
+
+qint64 QAudioOutputPrivate::elapsedUSecs() const
+{
+ const qint64 result = (QAudio::StoppedState == state()) ?
+ 0 : m_elapsed.elapsed() * 1000;
+ return result;
+}
+
+QAudio::Error QAudioOutputPrivate::error() const
+{
+ return m_error;
+}
+
+QAudio::State QAudioOutputPrivate::state() const
+{
+ return m_externalState;
+}
+
+QAudioFormat QAudioOutputPrivate::format() const
+{
+ return m_format;
+}
+
+
+//-----------------------------------------------------------------------------
+// Private functions
+//-----------------------------------------------------------------------------
+
+void QAudioOutputPrivate::dataReady()
+{
+ // Client-provided QIODevice has data ready to read.
+
+ Q_ASSERT_X(m_source->bytesAvailable(), Q_FUNC_INFO,
+ "readyRead signal received, but no data available");
+
+ if (!m_bytesPadding)
+ pullData();
+}
+
+void QAudioOutputPrivate::underflowTimerExpired()
+{
+ const TInt samplesPlayed = getSamplesPlayed();
+ if (m_samplesPlayed && (samplesPlayed == m_samplesPlayed)) {
+ setError(QAudio::UnderrunError);
+ } else {
+ m_samplesPlayed = samplesPlayed;
+ m_underflowTimer->start();
+ }
+}
+
+void QAudioOutputPrivate::devsoundInitializeComplete(int err)
+{
+ Q_ASSERT_X(SymbianAudio::InitializingState == m_internalState,
+ Q_FUNC_INFO, "Invalid state");
+
+ if (!err && m_devSound->isFormatSupported(m_format))
+ startPlayback();
+ else
+ setError(QAudio::OpenError);
+}
+
+void QAudioOutputPrivate::devsoundBufferToBeFilled(CMMFBuffer *bufferBase)
+{
+ // Following receipt of this signal, DevSound should not provide another
+ // buffer until we have returned the current one.
+ Q_ASSERT_X(!m_devSoundBuffer, Q_FUNC_INFO, "Buffer already held");
+
+ // Will be returned to DevSoundWrapper by bufferProcessed().
+ m_devSoundBuffer = static_cast<CMMFDataBuffer*>(bufferBase);
+
+ if (!m_devSoundBufferSize)
+ m_devSoundBufferSize = m_devSoundBuffer->Data().MaxLength();
+
+ writePaddingData();
+
+ if (m_pullMode && isDataReady() && !m_bytesPadding)
+ pullData();
+}
+
+void QAudioOutputPrivate::devsoundPlayError(int err)
+{
+ switch (err) {
+ case KErrUnderflow:
+ m_underflow = true;
+ if (m_pullMode && !m_lastBuffer)
+ setError(QAudio::UnderrunError);
+ else
+ setState(SymbianAudio::IdleState);
+ break;
+ default:
+ setError(QAudio::IOError);
+ break;
+ }
+}
+
+void QAudioOutputPrivate::open()
+{
+ Q_ASSERT_X(SymbianAudio::ClosedState == m_internalState,
+ Q_FUNC_INFO, "DevSound already opened");
+
+ Q_ASSERT(!m_devSound);
+ m_devSound = new SymbianAudio::DevSoundWrapper(QAudio::AudioOutput, this);
+
+ connect(m_devSound, SIGNAL(initializeComplete(int)),
+ this, SLOT(devsoundInitializeComplete(int)));
+ connect(m_devSound, SIGNAL(bufferToBeProcessed(CMMFBuffer *)),
+ this, SLOT(devsoundBufferToBeFilled(CMMFBuffer *)));
+ connect(m_devSound, SIGNAL(processingError(int)),
+ this, SLOT(devsoundPlayError(int)));
+
+ setState(SymbianAudio::InitializingState);
+ m_devSound->initialize(m_format.codec());
+}
+
+void QAudioOutputPrivate::startPlayback()
+{
+ bool ok = m_devSound->setFormat(m_format);
+ if (ok)
+ ok = m_devSound->start();
+
+ if (ok) {
+ if (isDataReady())
+ setState(SymbianAudio::ActiveState);
+ else
+ setState(SymbianAudio::IdleState);
+
+ if (m_notifyInterval)
+ m_notifyTimer->start(m_notifyInterval);
+ m_underflow = false;
+
+ Q_ASSERT(m_devSound->samplesProcessed() == 0);
+
+ writePaddingData();
+
+ if (m_pullMode && m_source->bytesAvailable() && !m_bytesPadding)
+ dataReady();
+ } else {
+ setError(QAudio::OpenError);
+ close();
+ }
+}
+
+void QAudioOutputPrivate::writePaddingData()
+{
+ // See comments in suspend()
+
+ while (m_devSoundBuffer && m_bytesPadding) {
+ if (SymbianAudio::IdleState == m_internalState)
+ setState(SymbianAudio::ActiveState);
+
+ TDes8 &outputBuffer = m_devSoundBuffer->Data();
+ const qint64 outputBytes = bytesFree();
+ const qint64 paddingBytes = outputBytes < m_bytesPadding ?
+ outputBytes : m_bytesPadding;
+ unsigned char *ptr = const_cast<unsigned char*>(outputBuffer.Ptr());
+ Mem::FillZ(ptr, paddingBytes);
+ outputBuffer.SetLength(outputBuffer.Length() + paddingBytes);
+ m_bytesPadding -= paddingBytes;
+ Q_ASSERT(m_bytesPadding >= 0);
+
+ if (m_pullMode && m_source->atEnd())
+ lastBufferFilled();
+ if ((paddingBytes == outputBytes) || !m_bytesPadding)
+ bufferFilled();
+ }
+}
+
+qint64 QAudioOutputPrivate::pushData(const char *data, qint64 len)
+{
+ // Data has been written to SymbianAudioOutputPrivate
+
+ Q_ASSERT_X(!m_pullMode, Q_FUNC_INFO,
+ "pushData called when in pull mode");
+
+ const unsigned char *const inputPtr =
+ reinterpret_cast<const unsigned char*>(data);
+ qint64 bytesWritten = 0;
+
+ if (SymbianAudio::IdleState == m_internalState)
+ setState(SymbianAudio::ActiveState);
+
+ while (m_devSoundBuffer && (bytesWritten < len)) {
+ // writePaddingData() is called from BufferToBeFilled(), so we should
+ // never have any padding data left at this point.
+ Q_ASSERT_X(0 == m_bytesPadding, Q_FUNC_INFO,
+ "Padding bytes remaining in pushData");
+
+ TDes8 &outputBuffer = m_devSoundBuffer->Data();
+
+ const qint64 outputBytes = bytesFree();
+ const qint64 inputBytes = len - bytesWritten;
+ const qint64 copyBytes = outputBytes < inputBytes ?
+ outputBytes : inputBytes;
+
+ outputBuffer.Append(inputPtr + bytesWritten, copyBytes);
+ bytesWritten += copyBytes;
+
+ bufferFilled();
+ }
+
+ m_pushDataReady = (bytesWritten < len);
+
+ // If DevSound is still initializing (m_internalState == InitializingState),
+ // we cannot transition m_internalState to ActiveState, but we must emit
+ // an (external) state change from IdleState to ActiveState. The following
+ // call triggers this signal.
+ setState(m_internalState);
+
+ return bytesWritten;
+}
+
+void QAudioOutputPrivate::pullData()
+{
+ Q_ASSERT_X(m_pullMode, Q_FUNC_INFO,
+ "pullData called when in push mode");
+
+ // writePaddingData() is called by BufferToBeFilled() before pullData(),
+ // so we should never have any padding data left at this point.
+ Q_ASSERT_X(0 == m_bytesPadding, Q_FUNC_INFO,
+ "Padding bytes remaining in pullData");
+
+ qint64 inputBytes = m_source->bytesAvailable();
+ while (m_devSoundBuffer && inputBytes) {
+ if (SymbianAudio::IdleState == m_internalState)
+ setState(SymbianAudio::ActiveState);
+
+ TDes8 &outputBuffer = m_devSoundBuffer->Data();
+
+ const qint64 outputBytes = bytesFree();
+ const qint64 copyBytes = outputBytes < inputBytes ?
+ outputBytes : inputBytes;
+
+ char *outputPtr = (char*)(outputBuffer.Ptr() + outputBuffer.Length());
+ const qint64 bytesCopied = m_source->read(outputPtr, copyBytes);
+ Q_ASSERT(bytesCopied == copyBytes);
+ outputBuffer.SetLength(outputBuffer.Length() + bytesCopied);
+ inputBytes -= bytesCopied;
+
+ if (m_source->atEnd())
+ lastBufferFilled();
+ else if (copyBytes == outputBytes)
+ bufferFilled();
+ }
+}
+
+void QAudioOutputPrivate::bufferFilled()
+{
+ Q_ASSERT_X(m_devSoundBuffer, Q_FUNC_INFO, "No buffer to return");
+
+ const TDes8 &outputBuffer = m_devSoundBuffer->Data();
+ m_bytesWritten += outputBuffer.Length();
+
+ m_devSoundBuffer = 0;
+
+ m_samplesPlayed = getSamplesPlayed();
+ m_underflowTimer->start();
+
+ if (QAudio::UnderrunError == m_error)
+ m_error = QAudio::NoError;
+
+ m_devSound->bufferProcessed();
+}
+
+void QAudioOutputPrivate::lastBufferFilled()
+{
+ Q_ASSERT_X(m_devSoundBuffer, Q_FUNC_INFO, "No buffer to fill");
+ Q_ASSERT_X(!m_lastBuffer, Q_FUNC_INFO, "Last buffer already sent");
+ m_lastBuffer = true;
+ m_devSoundBuffer->SetLastBuffer(ETrue);
+ bufferFilled();
+}
+
+void QAudioOutputPrivate::close()
+{
+ m_notifyTimer->stop();
+ m_underflowTimer->stop();
+
+ m_error = QAudio::NoError;
+
+ if (m_devSound)
+ m_devSound->stop();
+ delete m_devSound;
+ m_devSound = 0;
+
+ m_devSoundBuffer = 0;
+ m_devSoundBufferSize = 0;
+
+ if (!m_pullMode) // m_source is owned
+ delete m_source;
+ m_pullMode = false;
+ m_source = 0;
+
+ m_bytesWritten = 0;
+ m_pushDataReady = false;
+ m_bytesPadding = 0;
+ m_underflow = false;
+ m_lastBuffer = false;
+ m_samplesPlayed = 0;
+ m_totalSamplesPlayed = 0;
+
+ setState(SymbianAudio::ClosedState);
+}
+
+qint64 QAudioOutputPrivate::getSamplesPlayed() const
+{
+ qint64 result = 0;
+ if (m_devSound) {
+ const qint64 samplesWritten = SymbianAudio::Utils::bytesToSamples(
+ m_format, m_bytesWritten);
+
+ if (m_underflow) {
+ result = samplesWritten;
+ } else {
+ // This is necessary because some DevSound implementations report
+ // that they have played more data than has actually been provided to them
+ // by the client.
+ const qint64 devSoundSamplesPlayed(m_devSound->samplesProcessed());
+ result = qMin(devSoundSamplesPlayed, samplesWritten);
+ }
+ }
+ return result;
+}
+
+void QAudioOutputPrivate::setError(QAudio::Error error)
+{
+ m_error = error;
+
+ // Although no state transition actually occurs here, a stateChanged event
+ // must be emitted to inform the client that the call to start() was
+ // unsuccessful.
+ if (QAudio::OpenError == error) {
+ emit stateChanged(QAudio::StoppedState);
+ } else {
+ if (QAudio::UnderrunError == error)
+ setState(SymbianAudio::IdleState);
+ else
+ // Close the DevSound instance. This causes a transition to
+ // StoppedState. This must be done asynchronously in case the
+ // current function was called from a DevSound event handler, in which
+ // case deleting the DevSound instance may cause an exception.
+ QMetaObject::invokeMethod(this, "close", Qt::QueuedConnection);
+ }
+}
+
+void QAudioOutputPrivate::setState(SymbianAudio::State newInternalState)
+{
+ const QAudio::State oldExternalState = m_externalState;
+ m_internalState = newInternalState;
+ m_externalState = SymbianAudio::Utils::stateNativeToQt(m_internalState);
+
+ if (m_externalState != oldExternalState)
+ emit stateChanged(m_externalState);
+}
+
+bool QAudioOutputPrivate::isDataReady() const
+{
+ return (m_source && m_source->bytesAvailable())
+ || m_bytesPadding
+ || m_pushDataReady;
+}
+
+QT_END_NAMESPACE
diff --git a/src/multimedia/audio/qaudiooutput_symbian_p.h b/src/multimedia/audio/qaudiooutput_symbian_p.h
new file mode 100644
index 0000000..c0acb07
--- /dev/null
+++ b/src/multimedia/audio/qaudiooutput_symbian_p.h
@@ -0,0 +1,198 @@
+/****************************************************************************
+**
+** 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 QtMultimedia 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.
+//
+
+#ifndef QAUDIOOUTPUT_SYMBIAN_P_H
+#define QAUDIOOUTPUT_SYMBIAN_P_H
+
+#include <QtMultimedia/qaudioengine.h>
+#include <QTime>
+#include <QTimer>
+#include <sounddevice.h>
+#include "qaudio_symbian_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QAudioOutputPrivate;
+
+class SymbianAudioOutputPrivate : public QIODevice
+{
+ friend class QAudioOutputPrivate;
+ Q_OBJECT
+public:
+ SymbianAudioOutputPrivate(QAudioOutputPrivate *audio);
+ ~SymbianAudioOutputPrivate();
+
+ qint64 readData(char *data, qint64 len);
+ qint64 writeData(const char *data, qint64 len);
+
+private:
+ QAudioOutputPrivate *const m_audioDevice;
+};
+
+class QAudioOutputPrivate
+ : public QAbstractAudioOutput
+{
+ friend class SymbianAudioOutputPrivate;
+ Q_OBJECT
+public:
+ QAudioOutputPrivate(const QByteArray &device,
+ const QAudioFormat &audioFormat);
+ ~QAudioOutputPrivate();
+
+ // QAbstractAudioOutput
+ QIODevice* start(QIODevice *device = 0);
+ void stop();
+ void reset();
+ void suspend();
+ void resume();
+ int bytesFree() const;
+ int periodSize() const;
+ void setBufferSize(int value);
+ int bufferSize() const;
+ void setNotifyInterval(int milliSeconds);
+ int notifyInterval() const;
+ qint64 processedUSecs() const;
+ qint64 elapsedUSecs() const;
+ QAudio::Error error() const;
+ QAudio::State state() const;
+ QAudioFormat format() const;
+
+private slots:
+ void dataReady();
+ void underflowTimerExpired();
+ void devsoundInitializeComplete(int err);
+ void devsoundBufferToBeFilled(CMMFBuffer *);
+ void devsoundPlayError(int err);
+
+private:
+ void open();
+ void startPlayback();
+ void writePaddingData();
+ qint64 pushData(const char *data, qint64 len);
+ void pullData();
+ void bufferFilled();
+ void lastBufferFilled();
+ Q_INVOKABLE void close();
+
+ qint64 getSamplesPlayed() const;
+
+ void setError(QAudio::Error error);
+ void setState(SymbianAudio::State state);
+
+ bool isDataReady() const;
+
+private:
+ const QByteArray m_device;
+ const QAudioFormat m_format;
+
+ int m_clientBufferSize;
+ int m_notifyInterval;
+ QScopedPointer<QTimer> m_notifyTimer;
+ QTime m_elapsed;
+ QAudio::Error m_error;
+
+ SymbianAudio::State m_internalState;
+ QAudio::State m_externalState;
+
+ bool m_pullMode;
+ QIODevice *m_source;
+
+ SymbianAudio::DevSoundWrapper* m_devSound;
+
+ // Buffer provided by DevSound, to be filled with data.
+ CMMFDataBuffer *m_devSoundBuffer;
+
+ int m_devSoundBufferSize;
+
+ // Number of bytes transferred from QIODevice to QAudioOutput. It is
+ // necessary to count this because data is dropped when suspend() is
+ // called. The difference between the position reported by DevSound and
+ // this value allows us to calculate m_bytesPadding;
+ quint32 m_bytesWritten;
+
+ // True if client has provided data while the audio subsystem was not
+ // ready to consume it.
+ bool m_pushDataReady;
+
+ // Number of zero bytes which will be written when client calls resume().
+ quint32 m_bytesPadding;
+
+ // True if PlayError(KErrUnderflow) has been called.
+ bool m_underflow;
+
+ // True if a buffer marked with the "last buffer" flag has been provided
+ // to DevSound.
+ bool m_lastBuffer;
+
+ // Some DevSound implementations ignore all underflow errors raised by the
+ // audio driver, unless the last buffer flag has been set by the client.
+ // In push-mode playback, this flag will never be set, so the underflow
+ // error will never be reported. In order to work around this, a timer
+ // is used, which gets reset every time the client provides more data. If
+ // the timer expires, an underflow error is raised by this object.
+ QScopedPointer<QTimer> m_underflowTimer;
+
+ // Result of previous call to CMMFDevSound::SamplesPlayed(). This value is
+ // used to determine whether, when m_underflowTimer expires, an
+ // underflow error has actually occurred.
+ quint32 m_samplesPlayed;
+
+ // Samples played up to the last call to suspend(). It is necessary
+ // to cache this because suspend() is implemented using
+ // CMMFDevSound::Stop(), which resets DevSound's SamplesPlayed() counter.
+ quint32 m_totalSamplesPlayed;
+
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/multimedia/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp
index a8aeb41..a8aeb41 100644
--- a/src/multimedia/multimedia/audio/qaudiooutput_win32_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp
diff --git a/src/multimedia/multimedia/audio/qaudiooutput_win32_p.h b/src/multimedia/audio/qaudiooutput_win32_p.h
index 2d19225..2d19225 100644
--- a/src/multimedia/multimedia/audio/qaudiooutput_win32_p.h
+++ b/src/multimedia/audio/qaudiooutput_win32_p.h
diff --git a/src/multimedia/mediaservices/base/base.pri b/src/multimedia/mediaservices/base/base.pri
deleted file mode 100644
index 49eca49..0000000
--- a/src/multimedia/mediaservices/base/base.pri
+++ /dev/null
@@ -1,69 +0,0 @@
-
-QT += network
-contains(QT_CONFIG, opengl):QT += opengl
-
-HEADERS += \
- $$PWD/qmediaresource.h \
- $$PWD/qmediacontent.h \
- $$PWD/qmediaobject.h \
- $$PWD/qmediaobject_p.h \
- $$PWD/qmediapluginloader_p.h \
- $$PWD/qmediaservice.h \
- $$PWD/qmediaservice_p.h \
- $$PWD/qmediaserviceprovider.h \
- $$PWD/qmediaserviceproviderplugin.h \
- $$PWD/qmediacontrol.h \
- $$PWD/qmediacontrol_p.h \
- $$PWD/qmetadatacontrol.h \
- $$PWD/qvideooutputcontrol.h \
- $$PWD/qvideowindowcontrol.h \
- $$PWD/qvideorenderercontrol.h \
- $$PWD/qvideodevicecontrol.h \
- $$PWD/qvideowidgetcontrol.h \
- $$PWD/qvideowidget.h \
- $$PWD/qvideowidget_p.h \
- $$PWD/qgraphicsvideoitem.h \
- $$PWD/qmediaplaylistcontrol.h \
- $$PWD/qmediaplaylist.h \
- $$PWD/qmediaplaylist_p.h \
- $$PWD/qmediaplaylistprovider.h \
- $$PWD/qmediaplaylistprovider_p.h \
- $$PWD/qmediaplaylistioplugin.h \
- $$PWD/qlocalmediaplaylistprovider.h \
- $$PWD/qmediaplaylistnavigator.h \
- $$PWD/qpaintervideosurface_p.h \
- $$PWD/qmediatimerange.h \
- $$PWD/qtmedianamespace.h
-
-SOURCES += \
- $$PWD/qmediaresource.cpp \
- $$PWD/qmediacontent.cpp \
- $$PWD/qmediaobject.cpp \
- $$PWD/qmediapluginloader.cpp \
- $$PWD/qmediaservice.cpp \
- $$PWD/qmediaserviceprovider.cpp \
- $$PWD/qmediacontrol.cpp \
- $$PWD/qmetadatacontrol.cpp \
- $$PWD/qvideooutputcontrol.cpp \
- $$PWD/qvideowindowcontrol.cpp \
- $$PWD/qvideorenderercontrol.cpp \
- $$PWD/qvideodevicecontrol.cpp \
- $$PWD/qvideowidgetcontrol.cpp \
- $$PWD/qvideowidget.cpp \
- $$PWD/qgraphicsvideoitem.cpp \
- $$PWD/qmediaplaylistcontrol.cpp \
- $$PWD/qmediaplaylist.cpp \
- $$PWD/qmediaplaylistprovider.cpp \
- $$PWD/qmediaplaylistioplugin.cpp \
- $$PWD/qlocalmediaplaylistprovider.cpp \
- $$PWD/qmediaplaylistnavigator.cpp \
- $$PWD/qpaintervideosurface.cpp \
- $$PWD/qmediatimerange.cpp
-
-mac {
- HEADERS += $$PWD/qpaintervideosurface_mac_p.h
- OBJECTIVE_SOURCES += $$PWD/qpaintervideosurface_mac.mm
-
- LIBS += -framework AppKit -framework QuartzCore -framework QTKit
-
-}
diff --git a/src/multimedia/mediaservices/base/qgraphicsvideoitem.cpp b/src/multimedia/mediaservices/base/qgraphicsvideoitem.cpp
deleted file mode 100644
index d80dec5..0000000
--- a/src/multimedia/mediaservices/base/qgraphicsvideoitem.cpp
+++ /dev/null
@@ -1,442 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaservies 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 <QtMediaServices/qgraphicsvideoitem.h>
-
-#include <QtMediaServices/qmediaobject.h>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/private/qpaintervideosurface_p.h>
-#include <QtMediaServices/qvideooutputcontrol.h>
-#include <QtMediaServices/qvideorenderercontrol.h>
-#include <QtMultimedia/qvideosurfaceformat.h>
-
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
-#include <QtOpenGL/qgl.h>
-#endif
-
-#ifndef QT_NO_GRAPHICSVIEW
-
-QT_BEGIN_NAMESPACE
-
-
-class QGraphicsVideoItemPrivate
-{
-public:
- QGraphicsVideoItemPrivate()
- : q_ptr(0)
- , surface(0)
- , mediaObject(0)
- , service(0)
- , outputControl(0)
- , rendererControl(0)
- , aspectRatioMode(Qt::KeepAspectRatio)
- , updatePaintDevice(true)
- , rect(0.0, 0.0, 320, 240)
- {
- }
-
- QGraphicsVideoItem *q_ptr;
-
- QPainterVideoSurface *surface;
- QMediaObject *mediaObject;
- QMediaService *service;
- QVideoOutputControl *outputControl;
- QVideoRendererControl *rendererControl;
- Qt::AspectRatioMode aspectRatioMode;
- bool updatePaintDevice;
- QRectF rect;
- QRectF boundingRect;
- QRectF sourceRect;
- QSizeF nativeSize;
-
- void clearService();
- void updateRects();
-
- void _q_present();
- void _q_formatChanged(const QVideoSurfaceFormat &format);
- void _q_serviceDestroyed();
- void _q_mediaObjectDestroyed();
-};
-
-void QGraphicsVideoItemPrivate::clearService()
-{
- if (outputControl) {
- outputControl->setOutput(QVideoOutputControl::NoOutput);
- outputControl = 0;
- }
- if (rendererControl) {
- surface->stop();
- rendererControl->setSurface(0);
- rendererControl = 0;
- }
- if (service) {
- QObject::disconnect(service, SIGNAL(destroyed()), q_ptr, SLOT(_q_serviceDestroyed()));
- service = 0;
- }
-}
-
-void QGraphicsVideoItemPrivate::updateRects()
-{
- q_ptr->prepareGeometryChange();
-
- if (nativeSize.isEmpty()) {
- boundingRect = QRectF();
- } else if (aspectRatioMode == Qt::IgnoreAspectRatio) {
- boundingRect = rect;
- sourceRect = QRectF(0, 0, 1, 1);
- } else if (aspectRatioMode == Qt::KeepAspectRatio) {
- QSizeF size = nativeSize;
- size.scale(rect.size(), Qt::KeepAspectRatio);
-
- boundingRect = QRectF(0, 0, size.width(), size.height());
- boundingRect.moveCenter(rect.center());
-
- sourceRect = QRectF(0, 0, 1, 1);
- } else if (aspectRatioMode == Qt::KeepAspectRatioByExpanding) {
- boundingRect = rect;
-
- QSizeF size = rect.size();
- size.scale(nativeSize, Qt::KeepAspectRatio);
-
- sourceRect = QRectF(
- 0, 0, size.width() / nativeSize.width(), size.height() / nativeSize.height());
- sourceRect.moveCenter(QPointF(0.5, 0.5));
- }
-}
-
-void QGraphicsVideoItemPrivate::_q_present()
-{
- if (q_ptr->isObscured()) {
- q_ptr->update(boundingRect);
- surface->setReady(true);
- } else {
- q_ptr->update(boundingRect);
- }
-}
-
-void QGraphicsVideoItemPrivate::_q_formatChanged(const QVideoSurfaceFormat &format)
-{
- nativeSize = format.sizeHint();
-
- updateRects();
-
- emit q_ptr->nativeSizeChanged(nativeSize);
-}
-
-void QGraphicsVideoItemPrivate::_q_serviceDestroyed()
-{
- rendererControl = 0;
- outputControl = 0;
- service = 0;
-
- surface->stop();
-}
-
-void QGraphicsVideoItemPrivate::_q_mediaObjectDestroyed()
-{
- mediaObject = 0;
-
- clearService();
-}
-
-/*!
- \class QGraphicsVideoItem
- \brief The QGraphicsVideoItem class provides a graphics item which display video produced by a QMediaObject.
-
- \since 4.7
-
- \ingroup multimedia
-
- Attaching a QGraphicsVideoItem to a QMediaObject allows it to display
- the video or image output of that media object. A QGraphicsVideoItem
- is attached to a media object by passing a pointer to the QMediaObject
- to the setMediaObject() function.
-
- \code
- player = new QMediaPlayer(this);
-
- QGraphicsVideoItem *item = new QGraphicsVideoItem;
- item->setMediaObject(player);
- graphicsView->scence()->addItem(item);
- graphicsView->show();
-
- player->setMedia(video);
- player->play();
- \endcode
-
- \bold {Note}: Only a single display output can be attached to a media
- object at one time.
-
- \sa QMediaObject, QMediaPlayer, QVideoWidget
-*/
-
-/*!
- Constructs a graphics item that displays video.
-
- The \a parent is passed to QGraphicsItem.
-*/
-QGraphicsVideoItem::QGraphicsVideoItem(QGraphicsItem *parent)
- : QGraphicsObject(parent)
- , d_ptr(new QGraphicsVideoItemPrivate)
-{
- d_ptr->q_ptr = this;
- d_ptr->surface = new QPainterVideoSurface;
-
- connect(d_ptr->surface, SIGNAL(frameChanged()), this, SLOT(_q_present()));
- connect(d_ptr->surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
- this, SLOT(_q_formatChanged(QVideoSurfaceFormat)));
-}
-
-/*!
- Destroys a video graphics item.
-*/
-QGraphicsVideoItem::~QGraphicsVideoItem()
-{
- if (d_ptr->outputControl)
- d_ptr->outputControl->setOutput(QVideoOutputControl::NoOutput);
-
- if (d_ptr->rendererControl)
- d_ptr->rendererControl->setSurface(0);
-
- delete d_ptr->surface;
- delete d_ptr;
-}
-
-/*!
- \property QGraphicsVideoItem::mediaObject
- \brief the media object which provides the video displayed by a graphics
- item.
-*/
-
-QMediaObject *QGraphicsVideoItem::mediaObject() const
-{
- return d_func()->mediaObject;
-}
-
-void QGraphicsVideoItem::setMediaObject(QMediaObject *object)
-{
- Q_D(QGraphicsVideoItem);
-
- if (object == d->mediaObject)
- return;
-
- d->clearService();
-
- if (d->mediaObject) {
- disconnect(d->mediaObject, SIGNAL(destroyed()), this, SLOT(_q_mediaObjectDestroyed()));
- d->mediaObject->unbind(this);
- }
-
- d->mediaObject = object;
-
- if (d->mediaObject) {
- d->mediaObject->bind(this);
-
- connect(d->mediaObject, SIGNAL(destroyed()), this, SLOT(_q_mediaObjectDestroyed()));
-
- d->service = d->mediaObject->service();
-
- if (d->service) {
- connect(d->service, SIGNAL(destroyed()), this, SLOT(_q_serviceDestroyed()));
-
- d->outputControl = qobject_cast<QVideoOutputControl *>(
- d->service->control(QVideoOutputControl_iid));
- d->rendererControl = qobject_cast<QVideoRendererControl *>(
- d->service->control(QVideoRendererControl_iid));
-
- if (d->outputControl != 0 && d->rendererControl != 0) {
- d->rendererControl->setSurface(d->surface);
-
- if (isVisible())
- d->outputControl->setOutput(QVideoOutputControl::RendererOutput);
- }
- }
- }
-}
-
-/*!
- \property QGraphicsVideoItem::aspectRatioMode
- \brief how a video is scaled to fit the graphics item's size.
-*/
-
-Qt::AspectRatioMode QGraphicsVideoItem::aspectRatioMode() const
-{
- return d_func()->aspectRatioMode;
-}
-
-void QGraphicsVideoItem::setAspectRatioMode(Qt::AspectRatioMode mode)
-{
- Q_D(QGraphicsVideoItem);
-
- d->aspectRatioMode = mode;
- d->updateRects();
-}
-
-/*!
- \property QGraphicsVideoItem::offset
- \brief the video item's offset.
-
- QGraphicsVideoItem will draw video using the offset for its top left
- corner.
-*/
-
-QPointF QGraphicsVideoItem::offset() const
-{
- return d_func()->rect.topLeft();
-}
-
-void QGraphicsVideoItem::setOffset(const QPointF &offset)
-{
- Q_D(QGraphicsVideoItem);
-
- d->rect.moveTo(offset);
- d->updateRects();
-}
-
-/*!
- \property QGraphicsVideoItem::size
- \brief the video item's size.
-
- QGraphicsVideoItem will draw video scaled to fit size according to its
- fillMode.
-*/
-
-QSizeF QGraphicsVideoItem::size() const
-{
- return d_func()->rect.size();
-}
-
-void QGraphicsVideoItem::setSize(const QSizeF &size)
-{
- Q_D(QGraphicsVideoItem);
-
- d->rect.setSize(size.isValid() ? size : QSizeF(0, 0));
- d->updateRects();
-}
-
-/*!
- \property QGraphicsVideoItem::nativeSize
- \brief the native size of the video.
-*/
-
-QSizeF QGraphicsVideoItem::nativeSize() const
-{
- return d_func()->nativeSize;
-}
-
-/*!
- \fn QGraphicsVideoItem::nativeSizeChanged(const QSizeF &size)
-
- Signals that the native \a size of the video has changed.
-*/
-
-/*!
- \reimp
-*/
-QRectF QGraphicsVideoItem::boundingRect() const
-{
- return d_func()->boundingRect;
-}
-
-/*!
- \reimp
-*/
-void QGraphicsVideoItem::paint(
- QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
-{
- Q_D(QGraphicsVideoItem);
-
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
- if (d->surface && d->surface->isActive()) {
- d->surface->paint(painter, d->boundingRect, d->sourceRect);
- d->surface->setReady(true);
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
- } else if (d->updatePaintDevice && (painter->paintEngine()->type() == QPaintEngine::OpenGL
- || painter->paintEngine()->type() == QPaintEngine::OpenGL2)) {
- d->updatePaintDevice = false;
-
- d->surface->setGLContext(const_cast<QGLContext *>(QGLContext::currentContext()));
- if (d->surface->supportedShaderTypes() & QPainterVideoSurface::GlslShader) {
- d->surface->setShaderType(QPainterVideoSurface::GlslShader);
- } else {
- d->surface->setShaderType(QPainterVideoSurface::FragmentProgramShader);
- }
-#endif
- }
-}
-
-/*!
- \reimp
-
- \internal
-*/
-QVariant QGraphicsVideoItem::itemChange(GraphicsItemChange change, const QVariant &value)
-{
- return QGraphicsObject::itemChange(change, value);
-}
-
-/*!
- \reimp
-
- \internal
-*/
-bool QGraphicsVideoItem::event(QEvent *event)
-{
- return QGraphicsObject::event(event);
-}
-
-/*!
- \reimp
-
- \internal
-*/
-bool QGraphicsVideoItem::sceneEvent(QEvent *event)
-{
- return QGraphicsObject::sceneEvent(event);
-}
-
-QT_END_NAMESPACE
-
-#endif // QT_NO_GRAPHICSVIEW
-
-#include "moc_qgraphicsvideoitem.cpp"
diff --git a/src/multimedia/mediaservices/base/qgraphicsvideoitem.h b/src/multimedia/mediaservices/base/qgraphicsvideoitem.h
deleted file mode 100644
index 679b353..0000000
--- a/src/multimedia/mediaservices/base/qgraphicsvideoitem.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QGRAPHICSVIDEOITEM_H
-#define QGRAPHICSVIDEOITEM_H
-
-#include <QtGui/qgraphicsitem.h>
-
-#include <QtMediaServices/qvideowidget.h>
-
-#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-class QVideoSurfaceFormat;
-
-class QGraphicsVideoItemPrivate;
-class Q_MEDIASERVICES_EXPORT QGraphicsVideoItem : public QGraphicsObject
-{
- Q_OBJECT
- Q_PROPERTY(QMediaObject* mediaObject READ mediaObject WRITE setMediaObject)
- Q_PROPERTY(Qt::AspectRatioMode aspectRatioMode READ aspectRatioMode WRITE setAspectRatioMode)
- Q_PROPERTY(QPointF offset READ offset WRITE setOffset)
- Q_PROPERTY(QSizeF size READ size WRITE setSize)
- Q_PROPERTY(QSizeF nativeSize READ nativeSize NOTIFY nativeSizeChanged)
-public:
- QGraphicsVideoItem(QGraphicsItem *parent = 0);
- ~QGraphicsVideoItem();
-
- QMediaObject *mediaObject() const;
- void setMediaObject(QMediaObject *object);
-
- Qt::AspectRatioMode aspectRatioMode() const;
- void setAspectRatioMode(Qt::AspectRatioMode mode);
-
- QPointF offset() const;
- void setOffset(const QPointF &offset);
-
- QSizeF size() const;
- void setSize(const QSizeF &size);
-
- QSizeF nativeSize() const;
-
- QRectF boundingRect() const;
-
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
-
-Q_SIGNALS:
- void nativeSizeChanged(const QSizeF &size);
-
-protected:
- bool event(QEvent *event);
- bool sceneEvent(QEvent *event);
-
- QVariant itemChange(GraphicsItemChange change, const QVariant &value);
-
- QGraphicsVideoItemPrivate *d_ptr;
-
-private:
- Q_DECLARE_PRIVATE(QGraphicsVideoItem)
- Q_PRIVATE_SLOT(d_func(), void _q_present())
- Q_PRIVATE_SLOT(d_func(), void _q_formatChanged(const QVideoSurfaceFormat &))
- Q_PRIVATE_SLOT(d_func(), void _q_serviceDestroyed())
- Q_PRIVATE_SLOT(d_func(), void _q_mediaObjectDestroyed())
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QT_NO_GRAPHICSVIEW
-
-#endif
diff --git a/src/multimedia/mediaservices/base/qlocalmediaplaylistprovider.cpp b/src/multimedia/mediaservices/base/qlocalmediaplaylistprovider.cpp
deleted file mode 100644
index 51e3bfb..0000000
--- a/src/multimedia/mediaservices/base/qlocalmediaplaylistprovider.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 <QtMediaServices/qlocalmediaplaylistprovider.h>
-#include "qmediaplaylistprovider_p.h"
-#include <QtMediaServices/qmediacontent.h>
-
-
-QT_BEGIN_NAMESPACE
-
-class QLocalMediaPlaylistProviderPrivate: public QMediaPlaylistProviderPrivate
-{
-public:
- QList<QMediaContent> resources;
-};
-
-QLocalMediaPlaylistProvider::QLocalMediaPlaylistProvider(QObject *parent)
- :QMediaPlaylistProvider(*new QLocalMediaPlaylistProviderPrivate, parent)
-{
-}
-
-QLocalMediaPlaylistProvider::~QLocalMediaPlaylistProvider()
-{
-}
-
-bool QLocalMediaPlaylistProvider::isReadOnly() const
-{
- return false;
-}
-
-int QLocalMediaPlaylistProvider::mediaCount() const
-{
- return d_func()->resources.size();
-}
-
-QMediaContent QLocalMediaPlaylistProvider::media(int pos) const
-{
- return d_func()->resources.value(pos);
-}
-
-bool QLocalMediaPlaylistProvider::addMedia(const QMediaContent &content)
-{
- Q_D(QLocalMediaPlaylistProvider);
-
- int pos = d->resources.count();
-
- emit mediaAboutToBeInserted(pos, pos);
- d->resources.append(content);
- emit mediaInserted(pos, pos);
-
- return true;
-}
-
-bool QLocalMediaPlaylistProvider::addMedia(const QList<QMediaContent> &items)
-{
- Q_D(QLocalMediaPlaylistProvider);
-
- if (items.isEmpty())
- return true;
-
- int pos = d->resources.count();
- int end = pos+items.count()-1;
-
- emit mediaAboutToBeInserted(pos, end);
- d->resources.append(items);
- emit mediaInserted(pos, end);
-
- return true;
-}
-
-
-bool QLocalMediaPlaylistProvider::insertMedia(int pos, const QMediaContent &content)
-{
- Q_D(QLocalMediaPlaylistProvider);
-
- emit mediaAboutToBeInserted(pos, pos);
- d->resources.insert(pos, content);
- emit mediaInserted(pos,pos);
-
- return true;
-}
-
-bool QLocalMediaPlaylistProvider::insertMedia(int pos, const QList<QMediaContent> &items)
-{
- Q_D(QLocalMediaPlaylistProvider);
-
- if (items.isEmpty())
- return true;
-
- const int last = pos+items.count()-1;
-
- emit mediaAboutToBeInserted(pos, last);
- for (int i=0; i<items.count(); i++)
- d->resources.insert(pos+i, items.at(i));
- emit mediaInserted(pos, last);
-
- return true;
-}
-
-bool QLocalMediaPlaylistProvider::removeMedia(int fromPos, int toPos)
-{
- Q_D(QLocalMediaPlaylistProvider);
-
- Q_ASSERT(fromPos >= 0);
- Q_ASSERT(fromPos <= toPos);
- Q_ASSERT(toPos < mediaCount());
-
- emit mediaAboutToBeRemoved(fromPos, toPos);
- d->resources.erase(d->resources.begin()+fromPos, d->resources.begin()+toPos+1);
- emit mediaRemoved(fromPos, toPos);
-
- return true;
-}
-
-bool QLocalMediaPlaylistProvider::removeMedia(int pos)
-{
- Q_D(QLocalMediaPlaylistProvider);
-
- emit mediaAboutToBeRemoved(pos, pos);
- d->resources.removeAt(pos);
- emit mediaRemoved(pos, pos);
-
- return true;
-}
-
-bool QLocalMediaPlaylistProvider::clear()
-{
- Q_D(QLocalMediaPlaylistProvider);
- if (!d->resources.isEmpty()) {
- int lastPos = mediaCount()-1;
- emit mediaAboutToBeRemoved(0, lastPos);
- d->resources.clear();
- emit mediaRemoved(0, lastPos);
- }
-
- return true;
-}
-
-void QLocalMediaPlaylistProvider::shuffle()
-{
- Q_D(QLocalMediaPlaylistProvider);
- if (!d->resources.isEmpty()) {
- QList<QMediaContent> resources;
-
- while (!d->resources.isEmpty()) {
- resources.append(d->resources.takeAt(qrand() % d->resources.size()));
- }
-
- d->resources = resources;
- emit mediaChanged(0, mediaCount()-1);
- }
-
-}
-
-#include "moc_qlocalmediaplaylistprovider.cpp"
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qlocalmediaplaylistprovider.h b/src/multimedia/mediaservices/base/qlocalmediaplaylistprovider.h
deleted file mode 100644
index 4dd53df..0000000
--- a/src/multimedia/mediaservices/base/qlocalmediaplaylistprovider.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QLOCALMEDIAPAYLISTPROVIDER_H
-#define QLOCALMEDIAPAYLISTPROVIDER_H
-
-#include <QtMediaServices/qmediaplaylistprovider.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-
-class QLocalMediaPlaylistProviderPrivate;
-class Q_MEDIASERVICES_EXPORT QLocalMediaPlaylistProvider : public QMediaPlaylistProvider
-{
- Q_OBJECT
-
-public:
- QLocalMediaPlaylistProvider(QObject *parent=0);
- virtual ~QLocalMediaPlaylistProvider();
-
- virtual int mediaCount() const;
- virtual QMediaContent media(int pos) const;
-
- virtual bool isReadOnly() const;
-
- virtual bool addMedia(const QMediaContent &content);
- virtual bool addMedia(const QList<QMediaContent> &items);
- virtual bool insertMedia(int pos, const QMediaContent &content);
- virtual bool insertMedia(int pos, const QList<QMediaContent> &items);
- virtual bool removeMedia(int pos);
- virtual bool removeMedia(int start, int end);
- virtual bool clear();
-
-public Q_SLOTS:
- virtual void shuffle();
-
-private:
- Q_DECLARE_PRIVATE(QLocalMediaPlaylistProvider)
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QLOCALMEDIAPAYLISTSOURCE_H
diff --git a/src/multimedia/mediaservices/base/qmediacontent.cpp b/src/multimedia/mediaservices/base/qmediacontent.cpp
deleted file mode 100644
index 50d8e46..0000000
--- a/src/multimedia/mediaservices/base/qmediacontent.cpp
+++ /dev/null
@@ -1,242 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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/qurl.h>
-#include <QtCore/qvariant.h>
-
-#include <QtMediaServices/qmediacontent.h>
-
-
-QT_BEGIN_NAMESPACE
-
-
-class QMediaContentPrivate : public QSharedData
-{
-public:
- QMediaContentPrivate() {}
- QMediaContentPrivate(const QMediaResourceList &r):
- resources(r) {}
-
- QMediaContentPrivate(const QMediaContentPrivate &other):
- QSharedData(other),
- resources(other.resources)
- {}
-
- bool operator==(const QMediaContentPrivate &other) const
- {
- return resources == other.resources;
- }
-
- QMediaResourceList resources;
-
-private:
- QMediaContentPrivate& operator=(const QMediaContentPrivate &other);
-};
-
-
-/*!
- \class QMediaContent
- \preliminary
- \brief The QMediaContent class provides access to the resources relating to a media content.
- \since 4.7
-
- \ingroup multimedia
-
- QMediaContent is used within the multimedia framework as the logical handle
- to media content. A QMediaContent object is composed of one or more
- \l {QMediaResource}s where each resource provides the URL and format
- information of a different encoding of the content.
-
- A non-null QMediaContent will always have a primary or canonical reference to
- the content available through the canonicalUrl() or canonicalResource()
- methods, any additional resources are optional.
-*/
-
-
-/*!
- Constructs a null QMediaContent.
-*/
-
-QMediaContent::QMediaContent()
-{
-}
-
-/*!
- Constructs a media content with \a url providing a reference to the content.
-*/
-
-QMediaContent::QMediaContent(const QUrl &url):
- d(new QMediaContentPrivate)
-{
- d->resources << QMediaResource(url);
-}
-
-/*!
- Constructs a media content with \a request providing a reference to the content.
-
- This constructor can be used to reference media content via network protocols such as HTTP.
- This may include additional information required to obtain the resource, such as Cookies or HTTP headers.
-*/
-
-QMediaContent::QMediaContent(const QNetworkRequest &request):
- d(new QMediaContentPrivate)
-{
- d->resources << QMediaResource(request);
-}
-
-/*!
- Constructs a media content with \a resource providing a reference to the content.
-*/
-
-QMediaContent::QMediaContent(const QMediaResource &resource):
- d(new QMediaContentPrivate)
-{
- d->resources << resource;
-}
-
-/*!
- Constructs a media content with \a resources providing a reference to the content.
-*/
-
-QMediaContent::QMediaContent(const QMediaResourceList &resources):
- d(new QMediaContentPrivate(resources))
-{
-}
-
-/*!
- Constructs a copy of the media content \a other.
-*/
-
-QMediaContent::QMediaContent(const QMediaContent &other):
- d(other.d)
-{
-}
-
-/*!
- Destroys the media content object.
-*/
-
-QMediaContent::~QMediaContent()
-{
-}
-
-/*!
- Assigns the value of \a other to this media content.
-*/
-
-QMediaContent& QMediaContent::operator=(const QMediaContent &other)
-{
- d = other.d;
- return *this;
-}
-
-/*!
- Returns true if \a other is equivalent to this media content; false otherwise.
-*/
-
-bool QMediaContent::operator==(const QMediaContent &other) const
-{
- return (d.constData() == 0 && other.d.constData() == 0) ||
- (d.constData() != 0 && other.d.constData() != 0 &&
- *d.constData() == *other.d.constData());
-}
-
-/*!
- Returns true if \a other is not equivalent to this media content; false otherwise.
-*/
-
-bool QMediaContent::operator!=(const QMediaContent &other) const
-{
- return !(*this == other);
-}
-
-/*!
- Returns true if this media content is null (uninitialized); false otherwise.
-*/
-
-bool QMediaContent::isNull() const
-{
- return d.constData() == 0;
-}
-
-/*!
- Returns a QUrl that represents that canonical resource for this media content.
-*/
-
-QUrl QMediaContent::canonicalUrl() const
-{
- return canonicalResource().url();
-}
-
-/*!
- Returns a QNetworkRequest that represents that canonical resource for this media content.
-*/
-
-QNetworkRequest QMediaContent::canonicalRequest() const
-{
- return canonicalResource().request();
-}
-
-/*!
- Returns a QMediaResource that represents that canonical resource for this media content.
-*/
-
-QMediaResource QMediaContent::canonicalResource() const
-{
- return d.constData() != 0
- ? d->resources.value(0)
- : QMediaResource();
-}
-
-/*!
- Returns a list of alternative resources for this media content. The first item in this list
- is always the canonical resource.
-*/
-
-QMediaResourceList QMediaContent::resources() const
-{
- return d.constData() != 0
- ? d->resources
- : QMediaResourceList();
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qmediacontent.h b/src/multimedia/mediaservices/base/qmediacontent.h
deleted file mode 100644
index c00e443..0000000
--- a/src/multimedia/mediaservices/base/qmediacontent.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIACONTENT_H
-#define QMEDIACONTENT_H
-
-#include <QtCore/qmetatype.h>
-#include <QtCore/qshareddata.h>
-
-#include <QtMediaServices/qmediaresource.h>
-#include <QtNetwork/qnetworkrequest.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-class QMediaContentPrivate;
-class Q_MEDIASERVICES_EXPORT QMediaContent
-{
-public:
- QMediaContent();
- QMediaContent(const QUrl &contentUrl);
- QMediaContent(const QNetworkRequest &contentRequest);
- QMediaContent(const QMediaResource &contentResource);
- QMediaContent(const QMediaResourceList &resources);
- QMediaContent(const QMediaContent &other);
- ~QMediaContent();
-
- QMediaContent& operator=(const QMediaContent &other);
-
- bool operator==(const QMediaContent &other) const;
- bool operator!=(const QMediaContent &other) const;
-
- bool isNull() const;
-
- QUrl canonicalUrl() const;
- QNetworkRequest canonicalRequest() const;
- QMediaResource canonicalResource() const;
-
- QMediaResourceList resources() const;
-
-private:
- QSharedDataPointer<QMediaContentPrivate> d;
-};
-
-QT_END_NAMESPACE
-
-Q_DECLARE_METATYPE(QMediaContent)
-
-QT_END_HEADER
-
-#endif // QMEDIACONTENT_H
diff --git a/src/multimedia/mediaservices/base/qmediacontrol.cpp b/src/multimedia/mediaservices/base/qmediacontrol.cpp
deleted file mode 100644
index 09996c8..0000000
--- a/src/multimedia/mediaservices/base/qmediacontrol.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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/qmetaobject.h>
-#include <QtCore/qtimer.h>
-
-#include <QtMediaServices//qmediacontrol.h>
-#include <QtMediaServices/private/qmediacontrol_p.h>
-
-
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QMediaControl
- \ingroup multimedia-serv
- \since 4.7
-
- \preliminary
- \brief The QMediaControl class provides a base interface for media service controls.
-
- Media controls provide an interface to individual features provided by a media service. Most
- services implement a principal control which exposes the core functionality of the service and
- a number optional controls which expose any additional functionality.
-
- A pointer to a control implemented by a media service can be obtained using the
- \l {QMediaService::control()}{control()} member of QMediaService. If the service doesn't
- implement a control it will instead return a null pointer.
-
- \code
- QMediaPlayerControl *control = qobject_cast<QMediaPlayerControl *>(
- service->control("com.nokia.Qt.QMediaPlayerControl/1.0"));
- \endcode
-
- Alternatively if the IId of the control has been declared using Q_MEDIA_DECLARE_CONTROL
- the template version of QMediaService::control() can be used to request the service without
- explicitly passing the IId.
-
- \code
- QMediaPlayerControl *control = service->control<QMediaPlayerControl *>();
- \endcode
-
- Most application code will not interface directly with a media service's controls, instead the
- QMediaObject which owns the service acts as an intermeditary between one or more controls and
- the application.
-
- \sa QMediaService, QMediaObject
-*/
-
-/*!
- \macro Q_MEDIA_DECLARE_CONTROL(Class, IId)
- \relates QMediaControl
-
- The Q_MEDIA_DECLARE_CONTROL macro declares an \a IId for a \a Class that inherits from
- QMediaControl.
-
- Declaring an IId for a QMediaControl allows an instance of that control to be requested from
- QMediaService::control() without explicitly passing the IId.
-
- \code
- QMediaPlayerControl *control = service->control<QMediaPlayerControl *>();
- \endcode
-
- \sa QMediaService::control()
-*/
-
-/*!
- Destroys a media control.
-*/
-
-QMediaControl::~QMediaControl()
-{
- delete d_ptr;
-}
-
-/*!
- Constructs a media control with the given \a parent.
-*/
-
-QMediaControl::QMediaControl(QObject *parent)
- : QObject(parent)
- , d_ptr(new QMediaControlPrivate)
-{
- d_ptr->q_ptr = this;
-}
-
-/*!
- \internal
-*/
-
-QMediaControl::QMediaControl(QMediaControlPrivate &dd, QObject *parent)
- : QObject(parent)
- , d_ptr(&dd)
-
-{
- d_ptr->q_ptr = this;
-}
-
-#include "moc_qmediacontrol.cpp"
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qmediacontrol.h b/src/multimedia/mediaservices/base/qmediacontrol.h
deleted file mode 100644
index 941c004..0000000
--- a/src/multimedia/mediaservices/base/qmediacontrol.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QABSTRACTMEDIACONTROL_H
-#define QABSTRACTMEDIACONTROL_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qstring.h>
-#include <QtCore/qvariant.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-class QMediaControlPrivate;
-class Q_MEDIASERVICES_EXPORT QMediaControl : public QObject
-{
- Q_OBJECT
-
-public:
- ~QMediaControl();
-
-protected:
- QMediaControl(QObject *parent = 0);
- QMediaControl(QMediaControlPrivate &dd, QObject *parent = 0);
-
- QMediaControlPrivate *d_ptr;
-
-private:
- Q_DECLARE_PRIVATE(QMediaControl)
-};
-
-template <typename T> const char *qmediacontrol_iid() { return 0; }
-
-#define Q_MEDIA_DECLARE_CONTROL(Class, IId) \
- template <> inline const char *qmediacontrol_iid<Class *>() { return IId; }
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QABSTRACTMEDIACONTROL_H
diff --git a/src/multimedia/mediaservices/base/qmediacontrol_p.h b/src/multimedia/mediaservices/base/qmediacontrol_p.h
deleted file mode 100644
index 3f9755b..0000000
--- a/src/multimedia/mediaservices/base/qmediacontrol_p.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QABSTRACTMEDIACONTROL_P_H
-#define QABSTRACTMEDIACONTROL_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.
-//
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QMediaControl;
-
-class QMediaControlPrivate
-{
-public:
- virtual ~QMediaControlPrivate() {}
-
- QMediaControl *q_ptr;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/multimedia/mediaservices/base/qmediaobject.cpp b/src/multimedia/mediaservices/base/qmediaobject.cpp
deleted file mode 100644
index 68fb29e..0000000
--- a/src/multimedia/mediaservices/base/qmediaobject.cpp
+++ /dev/null
@@ -1,419 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaservics 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/qmetaobject.h>
-
-#include "qmediaobject_p.h"
-
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qmetadatacontrol.h>
-
-
-QT_BEGIN_NAMESPACE
-
-void QMediaObjectPrivate::_q_notify()
-{
- Q_Q(QMediaObject);
-
- const QMetaObject* m = q->metaObject();
-
- foreach (int pi, notifyProperties) {
- QMetaProperty p = m->property(pi);
- p.notifySignal().invoke(
- q, QGenericArgument(QMetaType::typeName(p.userType()), p.read(q).data()));
- }
-}
-
-
-/*!
- \class QMediaObject
- \preliminary
- \brief The QMediaObject class provides a common base for multimedia objects.
- \since 4.7
-
- \ingroup multimedia
-
- QMediaObject derived classes provide access to the functionality of a
- QMediaService. Each media object hosts a QMediaService and uses the
- QMediaControl interfaces implemented by the service to implement its
- API. Most media objects when constructed will request a new
- QMediaService instance from a QMediaServiceProvider, but some like
- QMediaRecorder will share a service with another object.
-
- QMediaObject itself provides an API for accessing a media service's \l {metaData()}{meta-data} and a means of connecting other media objects,
- and peripheral classes like QVideoWidget and QMediaPlaylist.
-
- \sa QMediaService, QMediaControl
-*/
-
-/*!
- Destroys a media object.
-*/
-
-QMediaObject::~QMediaObject()
-{
- delete d_ptr;
-}
-
-/*!
- Returns the service availability error state.
-*/
-
-QtMediaServices::AvailabilityError QMediaObject::availabilityError() const
-{
- return QtMediaServices::ServiceMissingError;
-}
-
-/*!
- Returns true if the service is available for use.
-*/
-
-bool QMediaObject::isAvailable() const
-{
- return false;
-}
-
-/*!
- Returns the media service that provides the functionality of a multimedia object.
-*/
-
-QMediaService* QMediaObject::service() const
-{
- return d_func()->service;
-}
-
-int QMediaObject::notifyInterval() const
-{
- return d_func()->notifyTimer->interval();
-}
-
-void QMediaObject::setNotifyInterval(int milliSeconds)
-{
- Q_D(QMediaObject);
-
- if (d->notifyTimer->interval() != milliSeconds) {
- d->notifyTimer->setInterval(milliSeconds);
-
- emit notifyIntervalChanged(milliSeconds);
- }
-}
-
-/*!
- \internal
-*/
-void QMediaObject::bind(QObject*)
-{
-}
-
-/*!
- \internal
-*/
-void QMediaObject::unbind(QObject*)
-{
-}
-
-
-/*!
- Constructs a media object which uses the functionality provided by a media \a service.
-
- The \a parent is passed to QObject.
-
- This class is meant as a base class for Multimedia objects so this
- constructor is protected.
-*/
-
-QMediaObject::QMediaObject(QObject *parent, QMediaService *service):
- QObject(parent),
- d_ptr(new QMediaObjectPrivate)
-
-{
- Q_D(QMediaObject);
-
- d->q_ptr = this;
-
- d->notifyTimer = new QTimer(this);
- d->notifyTimer->setInterval(1000);
- connect(d->notifyTimer, SIGNAL(timeout()), SLOT(_q_notify()));
-
- d->service = service;
-
- setupMetaData();
-}
-
-/*!
- \internal
-*/
-
-QMediaObject::QMediaObject(QMediaObjectPrivate &dd, QObject *parent,
- QMediaService *service):
- QObject(parent),
- d_ptr(&dd)
-{
- Q_D(QMediaObject);
- d->q_ptr = this;
-
- d->notifyTimer = new QTimer(this);
- d->notifyTimer->setInterval(1000);
- connect(d->notifyTimer, SIGNAL(timeout()), SLOT(_q_notify()));
-
- d->service = service;
-
- setupMetaData();
-}
-
-/*!
- Watch the property \a name. The property's notify signal will be emitted
- once every notifyInterval milliseconds.
-
- \sa notifyInterval
-*/
-
-void QMediaObject::addPropertyWatch(QByteArray const &name)
-{
- Q_D(QMediaObject);
-
- const QMetaObject* m = metaObject();
-
- int index = m->indexOfProperty(name.constData());
-
- if (index != -1 && m->property(index).hasNotifySignal()) {
- d->notifyProperties.insert(index);
-
- if (!d->notifyTimer->isActive())
- d->notifyTimer->start();
- }
-}
-
-/*!
- Remove property \a name from the list of properties whose changes are
- regularly signaled.
-
- \sa notifyInterval
-*/
-
-void QMediaObject::removePropertyWatch(QByteArray const &name)
-{
- Q_D(QMediaObject);
-
- int index = metaObject()->indexOfProperty(name.constData());
-
- if (index != -1) {
- d->notifyProperties.remove(index);
-
- if (d->notifyProperties.isEmpty())
- d->notifyTimer->stop();
- }
-}
-
-/*!
- \property QMediaObject::notifyInterval
-
- The interval at which notifiable properties will update.
-
- The interval is expressed in milliseconds, the default value is 1000.
-
- \sa addPropertyWatch(), removePropertyWatch()
-*/
-
-/*!
- \fn void QMediaObject::notifyIntervalChanged(int milliseconds)
-
- Signal a change in the notify interval period to \a milliseconds.
-*/
-
-/*!
- \property QMediaObject::metaDataAvailable
- \brief whether access to a media object's meta-data is available.
-
- If this is true there is meta-data available, otherwise there is no meta-data available.
-*/
-
-bool QMediaObject::isMetaDataAvailable() const
-{
- Q_D(const QMediaObject);
-
- return d->metaDataControl
- ? d->metaDataControl->isMetaDataAvailable()
- : false;
-}
-
-/*!
- \fn QMediaObject::metaDataAvailableChanged(bool available)
-
- Signals that the \a available state of a media object's meta-data has changed.
-*/
-
-/*!
- \property QMediaObject::metaDataWritable
- \brief whether a media object's meta-data is writable.
-
- If this is true the meta-data is writable, otherwise the meta-data is read-only.
-*/
-
-bool QMediaObject::isMetaDataWritable() const
-{
- Q_D(const QMediaObject);
-
- return d->metaDataControl
- ? d->metaDataControl->isWritable()
- : false;
-}
-
-/*!
- \fn QMediaObject::metaDataWritableChanged(bool writable)
-
- Signals that the \a writable state of a media object's meta-data has changed.
-*/
-
-/*!
- Returns the value associated with a meta-data \a key.
-*/
-QVariant QMediaObject::metaData(QtMediaServices::MetaData key) const
-{
- Q_D(const QMediaObject);
-
- return d->metaDataControl
- ? d->metaDataControl->metaData(key)
- : QVariant();
-}
-
-/*!
- Sets a \a value for a meta-data \a key.
-*/
-void QMediaObject::setMetaData(QtMediaServices::MetaData key, const QVariant &value)
-{
- Q_D(QMediaObject);
-
- if (d->metaDataControl)
- d->metaDataControl->setMetaData(key, value);
-}
-
-/*!
- Returns a list of keys there is meta-data available for.
-*/
-QList<QtMediaServices::MetaData> QMediaObject::availableMetaData() const
-{
- Q_D(const QMediaObject);
-
- return d->metaDataControl
- ? d->metaDataControl->availableMetaData()
- : QList<QtMediaServices::MetaData>();
-}
-
-/*!
- \fn QMediaObject::metaDataChanged()
-
- Signals that a media object's meta-data has changed.
-*/
-
-/*!
- Returns the value associated with a meta-data \a key.
-
- The naming and type of extended meta-data is not standardized, so the values and meaning
- of keys may vary between backends.
-*/
-QVariant QMediaObject::extendedMetaData(const QString &key) const
-{
- Q_D(const QMediaObject);
-
- return d->metaDataControl
- ? d->metaDataControl->extendedMetaData(key)
- : QVariant();
-}
-
-/*!
- Sets a \a value for a meta-data \a key.
-
- The naming and type of extended meta-data is not standardized, so the values and meaning
- of keys may vary between backends.
-*/
-void QMediaObject::setExtendedMetaData(const QString &key, const QVariant &value)
-{
- Q_D(QMediaObject);
-
- if (d->metaDataControl)
- d->metaDataControl->setExtendedMetaData(key, value);
-}
-
-/*!
- Returns a list of keys there is extended meta-data available for.
-*/
-QStringList QMediaObject::availableExtendedMetaData() const
-{
- Q_D(const QMediaObject);
-
- return d->metaDataControl
- ? d->metaDataControl->availableExtendedMetaData()
- : QStringList();
-}
-
-
-void QMediaObject::setupMetaData()
-{
- Q_D(QMediaObject);
-
- if (d->service != 0) {
- d->metaDataControl =
- qobject_cast<QMetaDataControl*>(d->service->control(QMetaDataControl_iid));
-
- if (d->metaDataControl) {
- connect(d->metaDataControl, SIGNAL(metaDataChanged()), SIGNAL(metaDataChanged()));
- connect(d->metaDataControl,
- SIGNAL(metaDataAvailableChanged(bool)),
- SIGNAL(metaDataAvailableChanged(bool)));
- connect(d->metaDataControl,
- SIGNAL(writableChanged(bool)),
- SIGNAL(metaDataWritableChanged(bool)));
- }
- }
-}
-
-/*!
- \fn QMediaObject::availabilityChanged(bool available)
-
- Signal emitted when the availability state has changed to \a available
-*/
-
-
-#include "moc_qmediaobject.cpp"
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qmediaobject.h b/src/multimedia/mediaservices/base/qmediaobject.h
deleted file mode 100644
index 067bb56..0000000
--- a/src/multimedia/mediaservices/base/qmediaobject.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QABSTRACTMEDIAOBJECT_H
-#define QABSTRACTMEDIAOBJECT_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qstringlist.h>
-
-#include <QtMediaServices/qtmedianamespace.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-class QMediaService;
-
-class QMediaObjectPrivate;
-class Q_MEDIASERVICES_EXPORT QMediaObject : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(int notifyInterval READ notifyInterval WRITE setNotifyInterval NOTIFY notifyIntervalChanged)
- Q_PROPERTY(bool metaDataAvailable READ isMetaDataAvailable NOTIFY metaDataAvailableChanged)
- Q_PROPERTY(bool metaDataWritable READ isMetaDataWritable NOTIFY metaDataWritableChanged)
-
-public:
- ~QMediaObject();
-
- virtual bool isAvailable() const;
- virtual QtMediaServices::AvailabilityError availabilityError() const;
-
- virtual QMediaService* service() const;
-
- int notifyInterval() const;
- void setNotifyInterval(int milliSeconds);
-
- virtual void bind(QObject*);
- virtual void unbind(QObject*);
-
- bool isMetaDataAvailable() const;
- bool isMetaDataWritable() const;
-
- QVariant metaData(QtMediaServices::MetaData key) const;
- void setMetaData(QtMediaServices::MetaData key, const QVariant &value);
- QList<QtMediaServices::MetaData> availableMetaData() const;
-
- QVariant extendedMetaData(const QString &key) const;
- void setExtendedMetaData(const QString &key, const QVariant &value);
- QStringList availableExtendedMetaData() const;
-
-Q_SIGNALS:
- void notifyIntervalChanged(int milliSeconds);
-
- void metaDataAvailableChanged(bool available);
- void metaDataWritableChanged(bool writable);
- void metaDataChanged();
-
- void availabilityChanged(bool available);
-
-protected:
- QMediaObject(QObject *parent, QMediaService *service);
- QMediaObject(QMediaObjectPrivate &dd, QObject *parent, QMediaService *service);
-
- void addPropertyWatch(QByteArray const &name);
- void removePropertyWatch(QByteArray const &name);
-
- QMediaObjectPrivate *d_ptr;
-
-private:
- void setupMetaData();
-
- Q_DECLARE_PRIVATE(QMediaObject)
- Q_PRIVATE_SLOT(d_func(), void _q_notify())
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-
-#endif // QABSTRACTMEDIAOBJECT_H
diff --git a/src/multimedia/mediaservices/base/qmediaobject_p.h b/src/multimedia/mediaservices/base/qmediaobject_p.h
deleted file mode 100644
index c31ad46..0000000
--- a/src/multimedia/mediaservices/base/qmediaobject_p.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QABSTRACTMEDIAOBJECT_P_H
-#define QABSTRACTMEDIAOBJECT_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/qbytearray.h>
-#include <QtCore/qset.h>
-#include <QtCore/qtimer.h>
-
-#include <QtMediaServices/qmediaobject.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QMetaDataControl;
-
-#define Q_DECLARE_NON_CONST_PUBLIC(Class) \
- inline Class* q_func() { return static_cast<Class *>(q_ptr); } \
- friend class Class;
-
-
-class QMediaObjectPrivate
-{
- Q_DECLARE_PUBLIC(QMediaObject)
-
-public:
- QMediaObjectPrivate():metaDataControl(0), notifyTimer(0) {}
- virtual ~QMediaObjectPrivate() {}
-
- void _q_notify();
-
- QMediaService *service;
- QMetaDataControl *metaDataControl;
- QTimer* notifyTimer;
- QSet<int> notifyProperties;
-
- QMediaObject *q_ptr;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/multimedia/mediaservices/base/qmediaplaylist.cpp b/src/multimedia/mediaservices/base/qmediaplaylist.cpp
deleted file mode 100644
index 93278fe..0000000
--- a/src/multimedia/mediaservices/base/qmediaplaylist.cpp
+++ /dev/null
@@ -1,724 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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/qlist.h>
-#include <QtCore/qfile.h>
-#include <QtCore/qurl.h>
-#include <QtCore/qcoreevent.h>
-#include <QtCore/qcoreapplication.h>
-
-#include <QtMediaServices/qmediaplaylist.h>
-#include "qmediaplaylist_p.h"
-#include <QtMediaServices/qmediaplaylistprovider.h>
-#include <QtMediaServices/qlocalmediaplaylistprovider.h>
-#include <QtMediaServices/qmediaplaylistioplugin.h>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qmediaplaylistcontrol.h>
-#include <QtMediaServices/qmediaplayercontrol.h>
-
-#include "qmediapluginloader_p.h"
-
-
-QT_BEGIN_NAMESPACE
-
-Q_GLOBAL_STATIC_WITH_ARGS(QMediaPluginLoader, playlistIOLoader,
- (QMediaPlaylistIOInterface_iid, QLatin1String("/playlistformats"), Qt::CaseInsensitive))
-
-
-/*!
- \class QMediaPlaylist
- \ingroup multimedia
- \since 4.7
-
- \preliminary
- \brief The QMediaPlaylist class provides a list of media content to play.
-
- QMediaPlaylist is intended to be used with other media objects,
- like QMediaPlayer or QMediaImageViewer.
- QMediaPlaylist allows to access the service intrinsic playlist functionality
- if available, otherwise it provides the the local memory playlist implementation.
-
-\code
- player = new QMediaPlayer;
-
- playlist = new QMediaPlaylist;
- playlist->setMediaObject(player);
- playlist->append(QUrl("http://example.com/movie1.mp4"));
- playlist->append(QUrl("http://example.com/movie2.mp4"));
- playlist->append(QUrl("http://example.com/movie3.mp4"));
-
- playlist->setCurrentIndex(1);
-
- player->play();
-\endcode
-
- Depending on playlist source implementation,
- most of playlist modifcation operations can be asynchronous.
-
- \sa QMediaContent
-*/
-
-
-/*!
- \enum QMediaPlaylist::PlaybackMode
-
- The QMediaPlaylist::PlaybackMode describes the order items in playlist are played.
-
- \value CurrentItemOnce The current item is played only once.
-
- \value CurrentItemInLoop The current item is played in the loop.
-
- \value Linear Playback starts from the first to the last items and stops.
- next item is a null item when the last one is currently playing.
-
- \value Loop Playback continues from the first item after the last one finished playing.
-
- \value Random Play items in random order.
-*/
-
-
-
-/*!
- Create a new playlist object for with the given \a parent.
-*/
-
-QMediaPlaylist::QMediaPlaylist(QObject *parent)
- : QObject(parent)
- , d_ptr(new QMediaPlaylistPrivate)
-{
- Q_D(QMediaPlaylist);
-
- d->q_ptr = this;
- d->localPlaylistControl = new QLocalMediaPlaylistControl(this);
-
- setMediaObject(0);
-}
-
-/*!
- Destroys the playlist.
- */
-
-QMediaPlaylist::~QMediaPlaylist()
-{
- Q_D(QMediaPlaylist);
-
- if (d->mediaObject)
- d->mediaObject->unbind(this);
-
- delete d_ptr;
-}
-
-/*!
- Returns the QMediaObject that is being used to play the contents of this playlist.
-*/
-
-QMediaObject *QMediaPlaylist::mediaObject() const
-{
- return d_func()->mediaObject;
-}
-
-/*!
- If \a mediaObject is null or doesn't have an intrinsic playlist,
- internal local memory playlist source will be created.
-*/
-void QMediaPlaylist::setMediaObject(QMediaObject *mediaObject)
-{
- Q_D(QMediaPlaylist);
-
- if (mediaObject && mediaObject == d->mediaObject)
- return;
-
- QMediaService *service = mediaObject
- ? mediaObject->service() : 0;
-
- QMediaPlaylistControl *newControl = 0;
-
- if (service)
- newControl = qobject_cast<QMediaPlaylistControl*>(service->control(QMediaPlaylistControl_iid));
-
- if (!newControl)
- newControl = d->localPlaylistControl;
-
- if (d->control != newControl) {
- int oldSize = 0;
- if (d->control) {
- QMediaPlaylistProvider *playlist = d->control->playlistProvider();
- oldSize = playlist->mediaCount();
- disconnect(playlist, SIGNAL(loadFailed(QMediaPlaylist::Error,QString)),
- this, SLOT(_q_loadFailed(QMediaPlaylist::Error,QString)));
-
- disconnect(playlist, SIGNAL(mediaChanged(int,int)), this, SIGNAL(mediaChanged(int,int)));
- disconnect(playlist, SIGNAL(mediaAboutToBeInserted(int,int)), this, SIGNAL(mediaAboutToBeInserted(int,int)));
- disconnect(playlist, SIGNAL(mediaInserted(int,int)), this, SIGNAL(mediaInserted(int,int)));
- disconnect(playlist, SIGNAL(mediaAboutToBeRemoved(int,int)), this, SIGNAL(mediaAboutToBeRemoved(int,int)));
- disconnect(playlist, SIGNAL(mediaRemoved(int,int)), this, SIGNAL(mediaRemoved(int,int)));
-
- disconnect(playlist, SIGNAL(loaded()), this, SIGNAL(loaded()));
-
- disconnect(d->control, SIGNAL(playbackModeChanged(QMediaPlaylist::PlaybackMode)),
- this, SIGNAL(playbackModeChanged(QMediaPlaylist::PlaybackMode)));
- disconnect(d->control, SIGNAL(currentIndexChanged(int)),
- this, SIGNAL(currentIndexChanged(int)));
- disconnect(d->control, SIGNAL(currentMediaChanged(QMediaContent)),
- this, SIGNAL(currentMediaChanged(QMediaContent)));
- }
-
- d->control = newControl;
- QMediaPlaylistProvider *playlist = d->control->playlistProvider();
- connect(playlist, SIGNAL(loadFailed(QMediaPlaylist::Error,QString)),
- this, SLOT(_q_loadFailed(QMediaPlaylist::Error,QString)));
-
- connect(playlist, SIGNAL(mediaChanged(int,int)), this, SIGNAL(mediaChanged(int,int)));
- connect(playlist, SIGNAL(mediaAboutToBeInserted(int,int)), this, SIGNAL(mediaAboutToBeInserted(int,int)));
- connect(playlist, SIGNAL(mediaInserted(int,int)), this, SIGNAL(mediaInserted(int,int)));
- connect(playlist, SIGNAL(mediaAboutToBeRemoved(int,int)), this, SIGNAL(mediaAboutToBeRemoved(int,int)));
- connect(playlist, SIGNAL(mediaRemoved(int,int)), this, SIGNAL(mediaRemoved(int,int)));
-
- connect(playlist, SIGNAL(loaded()), this, SIGNAL(loaded()));
-
- connect(d->control, SIGNAL(playbackModeChanged(QMediaPlaylist::PlaybackMode)),
- this, SIGNAL(playbackModeChanged(QMediaPlaylist::PlaybackMode)));
- connect(d->control, SIGNAL(currentIndexChanged(int)),
- this, SIGNAL(currentIndexChanged(int)));
- connect(d->control, SIGNAL(currentMediaChanged(QMediaContent)),
- this, SIGNAL(currentMediaChanged(QMediaContent)));
-
- if (oldSize)
- emit mediaRemoved(0, oldSize-1);
-
- if (playlist->mediaCount()) {
- emit mediaAboutToBeInserted(0,playlist->mediaCount()-1);
- emit mediaInserted(0,playlist->mediaCount()-1);
- }
- }
-
- if (d->mediaObject)
- d->mediaObject->unbind(this);
-
- d->mediaObject = mediaObject;
- if (d->mediaObject)
- d->mediaObject->bind(this);
-}
-
-/*!
- \property QMediaPlaylist::playbackMode
-
- This property defines the order, items in playlist are played.
-
- \sa QMediaPlaylist::PlaybackMode
-*/
-
-QMediaPlaylist::PlaybackMode QMediaPlaylist::playbackMode() const
-{
- return d_func()->control->playbackMode();
-}
-
-void QMediaPlaylist::setPlaybackMode(QMediaPlaylist::PlaybackMode mode)
-{
- Q_D(QMediaPlaylist);
- d->control->setPlaybackMode(mode);
-}
-
-/*!
- Returns position of the current media source in the playlist.
-*/
-int QMediaPlaylist::currentIndex() const
-{
- return d_func()->control->currentIndex();
-}
-
-/*!
- Returns the current media content.
-*/
-
-QMediaContent QMediaPlaylist::currentMedia() const
-{
- return d_func()->playlist()->media(currentIndex());
-}
-
-/*!
- Returns the index of item, which were current after calling next()
- \a steps times.
-
- Returned value depends on the size of playlist, current position
- and playback mode.
-
- \sa QMediaPlaylist::playbackMode
-*/
-int QMediaPlaylist::nextIndex(int steps) const
-{
- return d_func()->control->nextIndex(steps);
-}
-
-/*!
- Returns the index of item, which were current after calling previous()
- \a steps times.
-
- \sa QMediaPlaylist::playbackMode
-*/
-
-int QMediaPlaylist::previousIndex(int steps) const
-{
- return d_func()->control->previousIndex(steps);
-}
-
-
-/*!
- Returns the number of items in the playlist.
-
- \sa isEmpty()
- */
-int QMediaPlaylist::mediaCount() const
-{
- return d_func()->playlist()->mediaCount();
-}
-
-/*!
- Returns true if the playlist contains no items; otherwise returns false.
- \sa mediaCount()
- */
-bool QMediaPlaylist::isEmpty() const
-{
- return mediaCount() == 0;
-}
-
-/*!
- Returns true if the playlist can be modified; otherwise returns false.
- \sa mediaCount()
- */
-bool QMediaPlaylist::isReadOnly() const
-{
- return d_func()->playlist()->isReadOnly();
-}
-
-/*!
- Returns the media content at \a index in the playlist.
-*/
-
-QMediaContent QMediaPlaylist::media(int index) const
-{
- return d_func()->playlist()->media(index);
-}
-
-/*!
- Append the media \a content to the playlist.
-
- Returns true if the operation is successfull, other wise return false.
- */
-bool QMediaPlaylist::addMedia(const QMediaContent &content)
-{
- return d_func()->control->playlistProvider()->addMedia(content);
-}
-
-/*!
- Append multiple media content \a items to the playlist.
-
- Returns true if the operation is successfull, other wise return false.
- */
-bool QMediaPlaylist::addMedia(const QList<QMediaContent> &items)
-{
- return d_func()->control->playlistProvider()->addMedia(items);
-}
-
-/*!
- Insert the media \a content to the playlist at position \a pos.
-
- Returns true if the operation is successful, otherwise false.
-*/
-
-bool QMediaPlaylist::insertMedia(int pos, const QMediaContent &content)
-{
- return d_func()->playlist()->insertMedia(pos, content);
-}
-
-/*!
- Insert multiple media content \a items to the playlist at position \a pos.
-
- Returns true if the operation is successful, otherwise false.
-*/
-
-bool QMediaPlaylist::insertMedia(int pos, const QList<QMediaContent> &items)
-{
- return d_func()->playlist()->insertMedia(pos, items);
-}
-
-/*!
- Remove the item from the playlist at position \a pos.
-
- Returns true if the operation is successfull, other wise return false.
- */
-bool QMediaPlaylist::removeMedia(int pos)
-{
- Q_D(QMediaPlaylist);
- return d->playlist()->removeMedia(pos);
-}
-
-/*!
- Remove the items from the playlist from position \a start to \a end inclusive.
-
- Returns true if the operation is successfull, other wise return false.
- */
-bool QMediaPlaylist::removeMedia(int start, int end)
-{
- Q_D(QMediaPlaylist);
- return d->playlist()->removeMedia(start, end);
-}
-
-/*!
- Remove all the items from the playlist.
-
- Returns true if the operation is successfull, other wise return false.
- */
-bool QMediaPlaylist::clear()
-{
- Q_D(QMediaPlaylist);
- return d->playlist()->clear();
-}
-
-bool QMediaPlaylistPrivate::readItems(QMediaPlaylistReader *reader)
-{
- while (!reader->atEnd())
- playlist()->addMedia(reader->readItem());
-
- return true;
-}
-
-bool QMediaPlaylistPrivate::writeItems(QMediaPlaylistWriter *writer)
-{
- for (int i=0; i<playlist()->mediaCount(); i++) {
- if (!writer->writeItem(playlist()->media(i)))
- return false;
- }
- writer->close();
- return true;
-}
-
-/*!
- Load playlist from \a location. If \a format is specified, it is used,
- otherwise format is guessed from location name and data.
-
- New items are appended to playlist.
-
- QMediaPlaylist::loaded() signal is emited if playlist was loaded succesfully,
- otherwise the playlist emits loadFailed().
-*/
-void QMediaPlaylist::load(const QUrl &location, const char *format)
-{
- Q_D(QMediaPlaylist);
-
- d->error = NoError;
- d->errorString.clear();
-
- if (d->playlist()->load(location,format))
- return;
-
- if (isReadOnly()) {
- d->error = AccessDeniedError;
- d->errorString = tr("Could not add items to read only playlist.");
- emit loadFailed();
- return;
- }
-
- foreach (QString const& key, playlistIOLoader()->keys()) {
- QMediaPlaylistIOInterface* plugin = qobject_cast<QMediaPlaylistIOInterface*>(playlistIOLoader()->instance(key));
- if (plugin && plugin->canRead(location,format)) {
- QMediaPlaylistReader *reader = plugin->createReader(location,QByteArray(format));
- if (reader && d->readItems(reader)) {
- delete reader;
- emit loaded();
- return;
- }
- delete reader;
- }
- }
-
- d->error = FormatNotSupportedError;
- d->errorString = tr("Playlist format is not supported");
- emit loadFailed();
-
- return;
-}
-
-/*!
- Load playlist from QIODevice \a device. If \a format is specified, it is used,
- otherwise format is guessed from device data.
-
- New items are appended to playlist.
-
- QMediaPlaylist::loaded() signal is emited if playlist was loaded succesfully,
- otherwise the playlist emits loadFailed().
-*/
-void QMediaPlaylist::load(QIODevice * device, const char *format)
-{
- Q_D(QMediaPlaylist);
-
- d->error = NoError;
- d->errorString.clear();
-
- if (d->playlist()->load(device,format))
- return;
-
- if (isReadOnly()) {
- d->error = AccessDeniedError;
- d->errorString = tr("Could not add items to read only playlist.");
- emit loadFailed();
- return;
- }
-
- foreach (QString const& key, playlistIOLoader()->keys()) {
- QMediaPlaylistIOInterface* plugin = qobject_cast<QMediaPlaylistIOInterface*>(playlistIOLoader()->instance(key));
- if (plugin && plugin->canRead(device,format)) {
- QMediaPlaylistReader *reader = plugin->createReader(device,QByteArray(format));
- if (reader && d->readItems(reader)) {
- delete reader;
- emit loaded();
- return;
- }
- delete reader;
- }
- }
-
- d->error = FormatNotSupportedError;
- d->errorString = tr("Playlist format is not supported");
- emit loadFailed();
-
- return;
-}
-
-/*!
- Save playlist to \a location. If \a format is specified, it is used,
- otherwise format is guessed from location name.
-
- Returns true if playlist was saved succesfully, otherwise returns false.
- */
-bool QMediaPlaylist::save(const QUrl &location, const char *format)
-{
- Q_D(QMediaPlaylist);
-
- d->error = NoError;
- d->errorString.clear();
-
- if (d->playlist()->save(location,format))
- return true;
-
- QFile file(location.toLocalFile());
-
- if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
- d->error = AccessDeniedError;
- d->errorString = tr("The file could not be accessed.");
- return false;
- }
-
- return save(&file, format);
-}
-
-/*!
- Save playlist to QIODevice \a device using format \a format.
-
- Returns true if playlist was saved succesfully, otherwise returns false.
-*/
-bool QMediaPlaylist::save(QIODevice * device, const char *format)
-{
- Q_D(QMediaPlaylist);
-
- d->error = NoError;
- d->errorString.clear();
-
- if (d->playlist()->save(device,format))
- return true;
-
- foreach (QString const& key, playlistIOLoader()->keys()) {
- QMediaPlaylistIOInterface* plugin = qobject_cast<QMediaPlaylistIOInterface*>(playlistIOLoader()->instance(key));
- if (plugin && plugin->canWrite(device,format)) {
- QMediaPlaylistWriter *writer = plugin->createWriter(device,QByteArray(format));
- if (writer && d->writeItems(writer)) {
- delete writer;
- return true;
- }
- delete writer;
- }
- }
-
- d->error = FormatNotSupportedError;
- d->errorString = tr("Playlist format is not supported.");
-
- return false;
-}
-
-/*!
- Returns the last error condition.
-*/
-QMediaPlaylist::Error QMediaPlaylist::error() const
-{
- return d_func()->error;
-}
-
-/*!
- Returns the string describing the last error condition.
-*/
-QString QMediaPlaylist::errorString() const
-{
- return d_func()->errorString;
-}
-
-/*!
- Shuffle items in the playlist.
-*/
-void QMediaPlaylist::shuffle()
-{
- d_func()->playlist()->shuffle();
-}
-
-
-/*!
- Advance to the next media content in playlist.
-*/
-void QMediaPlaylist::next()
-{
- d_func()->control->next();
-}
-
-/*!
- Return to the previous media content in playlist.
-*/
-void QMediaPlaylist::previous()
-{
- d_func()->control->previous();
-}
-
-/*!
- Activate media content from playlist at position \a playlistPosition.
-*/
-
-void QMediaPlaylist::setCurrentIndex(int playlistPosition)
-{
- d_func()->control->setCurrentIndex(playlistPosition);
-}
-
-/*!
- \fn void QMediaPlaylist::mediaInserted(int start, int end)
-
- This signal is emitted after media has been inserted into the playlist.
- The new items are those between \a start and \a end inclusive.
- */
-
-/*!
- \fn void QMediaPlaylist::mediaRemoved(int start, int end)
-
- This signal is emitted after media has been removed from the playlist.
- The removed items are those between \a start and \a end inclusive.
- */
-
-/*!
- \fn void QMediaPlaylist::mediaChanged(int start, int end)
-
- This signal is emitted after media has been changed in the playlist
- between \a start and \a end positions inclusive.
- */
-
-/*!
- \fn void QMediaPlaylist::currentIndexChanged(int position)
-
- Signal emitted when playlist position changed to \a position.
-*/
-
-/*!
- \fn void QMediaPlaylist::playbackModeChanged(QMediaPlaylist::PlaybackMode mode)
-
- Signal emitted when playback mode changed to \a mode.
-*/
-
-/*!
- \fn void QMediaPlaylist::mediaAboutToBeInserted(int start, int end)
-
- Signal emitted when item to be inserted at \a start and ending at \a end.
-*/
-
-/*!
- \fn void QMediaPlaylist::mediaAboutToBeRemoved(int start, int end)
-
- Signal emitted when item to de deleted ar \a start and ending at \a end.
-*/
-
-/*!
- \fn void QMediaPlaylist::currentMediaChanged(const QMediaContent &content)
-
- Signal emitted when current media changes to \a content.
-*/
-
-/*!
- \property QMediaPlaylist::currentIndex
- \brief Current position.
-*/
-
-/*!
- \property QMediaPlaylist::currentMedia
- \brief Current media content.
-*/
-
-/*!
- \fn QMediaPlaylist::loaded()
-
- Signal emitted when playlist finished loading.
-*/
-
-/*!
- \fn QMediaPlaylist::loadFailed()
-
- Signal emitted if failed to load playlist.
-*/
-
-/*!
- \enum QMediaPlaylist::Error
-
- This enum describes the QMediaPlaylist error codes.
-
- \value NoError No errors.
- \value FormatError Format error.
- \value FormatNotSupportedError Format not supported.
- \value NetworkError Network error.
- \value AccessDeniedError Access denied error.
-*/
-
-QT_END_NAMESPACE
-
-#include "moc_qmediaplaylist.cpp"
-#include "moc_qmediaplaylist_p.cpp"
diff --git a/src/multimedia/mediaservices/base/qmediaplaylist.h b/src/multimedia/mediaservices/base/qmediaplaylist.h
deleted file mode 100644
index 6cae7c5..0000000
--- a/src/multimedia/mediaservices/base/qmediaplaylist.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIAPLAYLIST_H
-#define QMEDIAPLAYLIST_H
-
-#include <QtCore/qobject.h>
-
-#include <QtMediaServices/qmediacontent.h>
-#include <QtMediaServices/qmediaobject.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-class QMediaPlaylistProvider;
-
-class QMediaPlaylistPrivate;
-class Q_MEDIASERVICES_EXPORT QMediaPlaylist : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QMediaPlaylist::PlaybackMode playbackMode READ playbackMode WRITE setPlaybackMode NOTIFY playbackModeChanged)
- Q_PROPERTY(QMediaContent currentMedia READ currentMedia NOTIFY currentMediaChanged)
- Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)
- Q_ENUMS(PlaybackMode Error)
-
-public:
- enum PlaybackMode { CurrentItemOnce, CurrentItemInLoop, Linear, Loop, Random };
- enum Error { NoError, FormatError, FormatNotSupportedError, NetworkError, AccessDeniedError };
-
- QMediaPlaylist(QObject *parent = 0);
- virtual ~QMediaPlaylist();
-
- QMediaObject *mediaObject() const;
- void setMediaObject(QMediaObject *object);
-
- PlaybackMode playbackMode() const;
- void setPlaybackMode(PlaybackMode mode);
-
- int currentIndex() const;
- QMediaContent currentMedia() const;
-
- int nextIndex(int steps = 1) const;
- int previousIndex(int steps = 1) const;
-
- QMediaContent media(int index) const;
-
- int mediaCount() const;
- bool isEmpty() const;
- bool isReadOnly() const;
-
- bool addMedia(const QMediaContent &content);
- bool addMedia(const QList<QMediaContent> &items);
- bool insertMedia(int index, const QMediaContent &content);
- bool insertMedia(int index, const QList<QMediaContent> &items);
- bool removeMedia(int pos);
- bool removeMedia(int start, int end);
- bool clear();
-
- void load(const QUrl &location, const char *format = 0);
- void load(QIODevice * device, const char *format = 0);
-
- bool save(const QUrl &location, const char *format = 0);
- bool save(QIODevice * device, const char *format);
-
- Error error() const;
- QString errorString() const;
-
-public Q_SLOTS:
- void shuffle();
-
- void next();
- void previous();
-
- void setCurrentIndex(int index);
-
-Q_SIGNALS:
- void currentIndexChanged(int index);
- void playbackModeChanged(QMediaPlaylist::PlaybackMode mode);
- void currentMediaChanged(const QMediaContent&);
-
- void mediaAboutToBeInserted(int start, int end);
- void mediaInserted(int start, int end);
- void mediaAboutToBeRemoved(int start, int end);
- void mediaRemoved(int start, int end);
- void mediaChanged(int start, int end);
-
- void loaded();
- void loadFailed();
-
-protected:
- QMediaPlaylistPrivate *d_ptr;
-
-private:
- Q_DECLARE_PRIVATE(QMediaPlaylist)
- Q_PRIVATE_SLOT(d_func(), void _q_loadFailed(QMediaPlaylist::Error, const QString &))
-};
-
-QT_END_NAMESPACE
-
-Q_DECLARE_METATYPE(QMediaPlaylist::PlaybackMode)
-Q_DECLARE_METATYPE(QMediaPlaylist::Error)
-
-QT_END_HEADER
-
-#endif // QMEDIAPLAYLIST_H
diff --git a/src/multimedia/mediaservices/base/qmediaplaylist_p.h b/src/multimedia/mediaservices/base/qmediaplaylist_p.h
deleted file mode 100644
index a5f290e..0000000
--- a/src/multimedia/mediaservices/base/qmediaplaylist_p.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIAPLAYLIST_P_H
-#define QMEDIAPLAYLIST_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 <QtMediaServices/qmediaplaylist.h>
-#include <QtMediaServices/qmediaplaylistcontrol.h>
-#include <QtMediaServices/qmediaplayer.h>
-#include <QtMediaServices/qmediaplayercontrol.h>
-#include <QtMediaServices/qlocalmediaplaylistprovider.h>
-#include "qmediaobject_p.h"
-
-#include <QtCore/qdebug.h>
-
-#ifdef Q_MOC_RUN
-# pragma Q_MOC_EXPAND_MACROS
-#endif
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QMediaPlaylistControl;
-class QMediaPlaylistProvider;
-class QMediaPlaylistReader;
-class QMediaPlaylistWriter;
-class QMediaPlayerControl;
-
-class QMediaPlaylistPrivate
-{
- Q_DECLARE_PUBLIC(QMediaPlaylist)
-public:
- QMediaPlaylistPrivate()
- :mediaObject(0),
- control(0),
- localPlaylistControl(0),
- error(QMediaPlaylist::NoError)
- {
- }
-
- virtual ~QMediaPlaylistPrivate() {}
-
- void _q_loadFailed(QMediaPlaylist::Error error, const QString &errorString)
- {
- this->error = error;
- this->errorString = errorString;
-
- emit q_ptr->loadFailed();
- }
-
- void _q_mediaObjectDeleted()
- {
- Q_Q(QMediaPlaylist);
- mediaObject = 0;
- if (control != localPlaylistControl)
- control = 0;
- q->setMediaObject(0);
- }
-
- QMediaObject *mediaObject;
-
- QMediaPlaylistControl *control;
- QMediaPlaylistProvider *playlist() const { return control->playlistProvider(); }
-
- QMediaPlaylistControl *localPlaylistControl;
-
- bool readItems(QMediaPlaylistReader *reader);
- bool writeItems(QMediaPlaylistWriter *writer);
-
- QMediaPlaylist::Error error;
- QString errorString;
-
- QMediaPlaylist *q_ptr;
-};
-
-
-class QLocalMediaPlaylistControl : public QMediaPlaylistControl
-{
- Q_OBJECT
-public:
- QLocalMediaPlaylistControl(QObject *parent)
- :QMediaPlaylistControl(parent)
- {
- QMediaPlaylistProvider *playlist = new QLocalMediaPlaylistProvider(this);
- m_navigator = new QMediaPlaylistNavigator(playlist,this);
- m_navigator->setPlaybackMode(QMediaPlaylist::Linear);
-
- connect(m_navigator, SIGNAL(currentIndexChanged(int)), SIGNAL(currentIndexChanged(int)));
- connect(m_navigator, SIGNAL(activated(QMediaContent)), SIGNAL(currentMediaChanged(QMediaContent)));
- }
-
- virtual ~QLocalMediaPlaylistControl() {};
-
- QMediaPlaylistProvider* playlistProvider() const { return m_navigator->playlist(); }
- bool setPlaylistProvider(QMediaPlaylistProvider *mediaPlaylist)
- {
- m_navigator->setPlaylist(mediaPlaylist);
- emit playlistProviderChanged();
- return true;
- }
-
- int currentIndex() const { return m_navigator->currentIndex(); }
- void setCurrentIndex(int position) { m_navigator->jump(position); }
- int nextIndex(int steps) const { return m_navigator->nextIndex(steps); }
- int previousIndex(int steps) const { return m_navigator->previousIndex(steps); }
-
- void next() { m_navigator->next(); }
- void previous() { m_navigator->previous(); }
-
- QMediaPlaylist::PlaybackMode playbackMode() const { return m_navigator->playbackMode(); }
- void setPlaybackMode(QMediaPlaylist::PlaybackMode mode) { m_navigator->setPlaybackMode(mode); }
-
-private:
- QMediaPlaylistNavigator *m_navigator;
-};
-
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QMEDIAPLAYLIST_P_H
diff --git a/src/multimedia/mediaservices/base/qmediaplaylistcontrol.cpp b/src/multimedia/mediaservices/base/qmediaplaylistcontrol.cpp
deleted file mode 100644
index 016c55d..0000000
--- a/src/multimedia/mediaservices/base/qmediaplaylistcontrol.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 <QtMediaServices/qmediaplaylistcontrol.h>
-#include "qmediacontrol_p.h"
-
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QMediaPlaylistControl
- \ingroup multimedia-serv
- \since 4.7
-
- \preliminary
- \brief The QMediaPlaylistControl class provides access to the playlist functionality of a
- QMediaService.
-
- If a QMediaService contains an internal playlist it will implement QMediaPlaylistControl. This
- control provides access to the contents of the \l {playlistProvider()}{playlist}, as well as the
- \l {currentIndex()}{position} of the current media, and a means of navigating to the
- \l {next()}{next} and \l {previous()}{previous} media.
-
- The functionality provided by the control is exposed to application code through the
- QMediaPlaylist class.
-
- The interface name of QMediaPlaylistControl is \c com.nokia.Qt.QMediaPlaylistControl/1.0 as
- defined in QMediaPlaylistControl_iid.
-
- \sa QMediaService::control(), QMediaPlayer
-*/
-
-/*!
- \macro QMediaPlaylistControl_iid
-
- \c com.nokia.Qt.QMediaPlaylistControl/1.0
-
- Defines the interface name of the QMediaPlaylistControl class.
-
- \relates QMediaPlaylistControl
-*/
-
-/*!
- Create a new playlist control object with the given \a parent.
-*/
-QMediaPlaylistControl::QMediaPlaylistControl(QObject *parent):
- QMediaControl(*new QMediaControlPrivate, parent)
-{
-}
-
-/*!
- Destroys the playlist control.
-*/
-QMediaPlaylistControl::~QMediaPlaylistControl()
-{
-}
-
-
-/*!
- \fn QMediaPlaylistControl::playlistProvider() const
-
- Returns the playlist used by this media player.
-*/
-
-/*!
- \fn QMediaPlaylistControl::setPlaylistProvider(QMediaPlaylistProvider *playlist)
-
- Set the playlist of this media player to \a playlist.
-
- In many cases it is possible just to use the playlist
- constructed by player, but sometimes replacing the whole
- playlist allows to avoid copyting of all the items bettween playlists.
-
- Returns true if player can use this passed playlist; otherwise returns false.
-
-*/
-
-/*!
- \fn QMediaPlaylistControl::currentIndex() const
-
- Returns position of the current media source in the playlist.
-*/
-
-/*!
- \fn QMediaPlaylistControl::setCurrentIndex(int position)
-
- Jump to the item at the given \a position.
-*/
-
-/*!
- \fn QMediaPlaylistControl::nextIndex(int step) const
-
- Returns the index of item, which were current after calling next()
- \a step times.
-
- Returned value depends on the size of playlist, current position
- and playback mode.
-
- \sa QMediaPlaylist::playbackMode
-*/
-
-/*!
- \fn QMediaPlaylistControl::previousIndex(int step) const
-
- Returns the index of item, which were current after calling previous()
- \a step times.
-
- \sa QMediaPlaylist::playbackMode
-*/
-
-/*!
- \fn QMediaPlaylistControl::next()
-
- Moves to the next item in playlist.
-*/
-
-/*!
- \fn QMediaPlaylistControl::previous()
-
- Returns to the previous item in playlist.
-*/
-
-/*!
- \fn QMediaPlaylistControl::playbackMode() const
-
- Returns the playlist navigation mode.
-
- \sa QMediaPlaylist::PlaybackMode
-*/
-
-/*!
- \fn QMediaPlaylistControl::setPlaybackMode(QMediaPlaylist::PlaybackMode mode)
-
- Sets the playback \a mode.
-
- \sa QMediaPlaylist::PlaybackMode
-*/
-
-/*!
- \fn QMediaPlaylistControl::playlistProviderChanged()
-
- Signal emited when the playlist provider has changed.
-*/
-
-/*!
- \fn QMediaPlaylistControl::currentIndexChanged(int position)
-
- Signal emited when the playlist \a position is changed.
-*/
-
-/*!
- \fn QMediaPlaylistControl::playbackModeChanged(QMediaPlaylist::PlaybackMode mode)
-
- Signal emited when the playback \a mode is changed.
-*/
-
-/*!
- \fn QMediaPlaylistControl::currentMediaChanged(const QMediaContent& content)
-
- Signal emitted when current media changes to \a content.
-*/
-
-#include "moc_qmediaplaylistcontrol.cpp"
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qmediaplaylistcontrol.h b/src/multimedia/mediaservices/base/qmediaplaylistcontrol.h
deleted file mode 100644
index 2dc4575..0000000
--- a/src/multimedia/mediaservices/base/qmediaplaylistcontrol.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIAPLAYLISTCONTROL_H
-#define QMEDIAPLAYLISTCONTROL_H
-
-#include <QtMediaServices/qmediacontrol.h>
-#include <QtMediaServices/qmediaplaylistnavigator.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-
-class QMediaPlaylistProvider;
-
-class Q_MEDIASERVICES_EXPORT QMediaPlaylistControl : public QMediaControl
-{
- Q_OBJECT
-
-public:
- virtual ~QMediaPlaylistControl();
-
- virtual QMediaPlaylistProvider* playlistProvider() const = 0;
- virtual bool setPlaylistProvider(QMediaPlaylistProvider *playlist) = 0;
-
- virtual int currentIndex() const = 0;
- virtual void setCurrentIndex(int position) = 0;
- virtual int nextIndex(int steps) const = 0;
- virtual int previousIndex(int steps) const = 0;
-
- virtual void next() = 0;
- virtual void previous() = 0;
-
- virtual QMediaPlaylist::PlaybackMode playbackMode() const = 0;
- virtual void setPlaybackMode(QMediaPlaylist::PlaybackMode mode) = 0;
-
-Q_SIGNALS:
- void playlistProviderChanged();
- void currentIndexChanged(int position);
- void currentMediaChanged(const QMediaContent&);
- void playbackModeChanged(QMediaPlaylist::PlaybackMode mode);
-
-protected:
- QMediaPlaylistControl(QObject* parent = 0);
-};
-
-#define QMediaPlaylistControl_iid "com.nokia.Qt.QMediaPlaylistControl/1.0"
-Q_MEDIA_DECLARE_CONTROL(QMediaPlaylistControl, QMediaPlaylistControl_iid)
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QMEDIAPLAYLISTCONTROL_H
diff --git a/src/multimedia/mediaservices/base/qmediaplaylistioplugin.cpp b/src/multimedia/mediaservices/base/qmediaplaylistioplugin.cpp
deleted file mode 100644
index 60e80e5..0000000
--- a/src/multimedia/mediaservices/base/qmediaplaylistioplugin.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 <QtMediaServices/qmediaplaylistioplugin.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QMediaPlaylistReader
- \preliminary
- \since 4.7
- \brief The QMediaPlaylistReader class provides an interface for reading a playlist file.
-
- \sa QMediaPlaylistIOPlugin
-*/
-
-/*!
- Destroys a media playlist reader.
-*/
-QMediaPlaylistReader::~QMediaPlaylistReader()
-{
-}
-
-/*!
- \fn QMediaPlaylistReader::atEnd() const
-
- Identifies if a playlist reader has reached the end of its input.
-
- Returns true if the reader has reached the end; and false otherwise.
-*/
-
-/*!
- \fn QMediaPlaylistReader::readItem()
-
- Reads an item of media from a playlist file.
-
- Returns the read media, or a null QMediaContent if no more media is available.
-*/
-
-/*!
- \fn QMediaPlaylistReader::close()
-
- Closes a playlist reader's input device.
-*/
-
-/*!
- \class QMediaPlaylistWriter
- \preliminary
- \since 4.7
- \brief The QMediaPlaylistWriter class provides an interface for writing a playlist file.
-
- \sa QMediaPlaylistIOPlugin
-*/
-
-/*!
- Destroys a media playlist writer.
-*/
-QMediaPlaylistWriter::~QMediaPlaylistWriter()
-{
-}
-
-/*!
- \fn QMediaPlaylistWriter::writeItem(const QMediaContent &media)
-
- Writes an item of \a media to a playlist file.
-
- Returns true if the media was written succesfully; and false otherwise.
-*/
-
-/*!
- \fn QMediaPlaylistWriter::close()
-
- Finalizes the writing of a playlist and closes the output device.
-*/
-
-/*!
- \class QMediaPlaylistIOPlugin
- \since 4.7
- \brief The QMediaPlaylistIOPlugin class provides an interface for media playlist I/O plug-ins.
-*/
-
-/*!
- Constructs a media playlist I/O plug-in with the given \a parent.
-*/
-QMediaPlaylistIOPlugin::QMediaPlaylistIOPlugin(QObject *parent)
- :QObject(parent)
-{
-}
-
-/*!
- Destroys a media playlist I/O plug-in.
-*/
-QMediaPlaylistIOPlugin::~QMediaPlaylistIOPlugin()
-{
-}
-
-/*!
- \fn QMediaPlaylistIOPlugin::canRead(QIODevice *device, const QByteArray &format) const
-
- Identifies if plug-in can read \a format data from an I/O \a device.
-
- Returns true if the data can be read; and false otherwise.
-*/
-
-/*!
- \fn QMediaPlaylistIOPlugin::canRead(const QUrl& location, const QByteArray &format) const
-
- Identifies if a plug-in can read \a format data from a URL \a location.
-
- Returns true if the data can be read; and false otherwise.
-*/
-
-/*!
- \fn QMediaPlaylistIOPlugin::canWrite(QIODevice *device, const QByteArray &format) const
-
- Identifies if a plug-in can write \a format data to an I/O \a device.
-
- Returns true if the data can be written; and false otherwise.
-*/
-
-/*!
- \fn QMediaPlaylistIOPlugin::keys() const
-
- Returns a list of format keys supported by a plug-in.
-*/
-
-/*!
- \fn QMediaPlaylistIOPlugin::createReader(QIODevice *device, const QByteArray &format)
-
- Returns a new QMediaPlaylistReader which reads \a format data from an I/O \a device.
-
- If the device is invalid or the format is unsupported this will return a null pointer.
-*/
-
-/*!
- \fn QMediaPlaylistIOPlugin::createReader(const QUrl& location, const QByteArray &format)
-
- Returns a new QMediaPlaylistReader which reads \a format data from a URL \a location.
-
- If the location or the format is unsupported this will return a null pointer.
-*/
-
-/*!
- \fn QMediaPlaylistIOPlugin::createWriter(QIODevice *device, const QByteArray &format)
-
- Returns a new QMediaPlaylistWriter which writes \a format data to an I/O \a device.
-
- If the device is invalid or the format is unsupported this will return a null pointer.
-*/
-
-QT_END_NAMESPACE
-
-#include "moc_qmediaplaylistioplugin.cpp"
-
diff --git a/src/multimedia/mediaservices/base/qmediaplaylistioplugin.h b/src/multimedia/mediaservices/base/qmediaplaylistioplugin.h
deleted file mode 100644
index ed8e832..0000000
--- a/src/multimedia/mediaservices/base/qmediaplaylistioplugin.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIAPLAYLISTIOPLUGIN_H
-#define QMEDIAPLAYLISTIOPLUGIN_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qplugin.h>
-#include <QtCore/qfactoryinterface.h>
-
-#include <QtMediaServices/qmediacontent.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-
-class QString;
-class QUrl;
-class QByteArray;
-class QIODevice;
-class QStringList;
-
-class Q_MEDIASERVICES_EXPORT QMediaPlaylistReader
-{
-public:
- virtual ~QMediaPlaylistReader();
-
- virtual bool atEnd() const = 0;
- virtual QMediaContent readItem() = 0;
- virtual void close() = 0;
-};
-
-class Q_MEDIASERVICES_EXPORT QMediaPlaylistWriter
-{
-public:
- virtual ~QMediaPlaylistWriter();
-
- virtual bool writeItem(const QMediaContent &content) = 0;
- virtual void close() = 0;
-};
-
-struct Q_MEDIASERVICES_EXPORT QMediaPlaylistIOInterface : public QFactoryInterface
-{
- virtual bool canRead(QIODevice *device, const QByteArray &format = QByteArray() ) const = 0;
- virtual bool canRead(const QUrl& location, const QByteArray &format = QByteArray()) const = 0;
-
- virtual bool canWrite(QIODevice *device, const QByteArray &format) const = 0;
-
- virtual QMediaPlaylistReader *createReader(QIODevice *device, const QByteArray &format = QByteArray()) = 0;
- virtual QMediaPlaylistReader *createReader(const QUrl& location, const QByteArray &format = QByteArray()) = 0;
-
- virtual QMediaPlaylistWriter *createWriter(QIODevice *device, const QByteArray &format) = 0;
-};
-
-#define QMediaPlaylistIOInterface_iid "com.nokia.Qt.QMediaPlaylistIOInterface"
-Q_DECLARE_INTERFACE(QMediaPlaylistIOInterface, QMediaPlaylistIOInterface_iid);
-
-class Q_MEDIASERVICES_EXPORT QMediaPlaylistIOPlugin : public QObject, public QMediaPlaylistIOInterface
-{
- Q_OBJECT
- Q_INTERFACES(QMediaPlaylistIOInterface:QFactoryInterface)
-
-public:
- explicit QMediaPlaylistIOPlugin(QObject *parent = 0);
- virtual ~QMediaPlaylistIOPlugin();
-
- virtual bool canRead(QIODevice *device, const QByteArray &format = QByteArray() ) const = 0;
- virtual bool canRead(const QUrl& location, const QByteArray &format = QByteArray()) const = 0;
-
- virtual bool canWrite(QIODevice *device, const QByteArray &format) const = 0;
-
- virtual QStringList keys() const = 0;
-
- virtual QMediaPlaylistReader *createReader(QIODevice *device, const QByteArray &format = QByteArray()) = 0;
- virtual QMediaPlaylistReader *createReader(const QUrl& location, const QByteArray &format = QByteArray()) = 0;
-
- virtual QMediaPlaylistWriter *createWriter(QIODevice *device, const QByteArray &format) = 0;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QMEDIAPLAYLISTIOPLUGIN_H
diff --git a/src/multimedia/mediaservices/base/qmediaplaylistnavigator.cpp b/src/multimedia/mediaservices/base/qmediaplaylistnavigator.cpp
deleted file mode 100644
index e3eec5e..0000000
--- a/src/multimedia/mediaservices/base/qmediaplaylistnavigator.cpp
+++ /dev/null
@@ -1,545 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 <QtMediaServices/qmediaplaylistnavigator.h>
-#include <QtMediaServices/qmediaplaylistprovider.h>
-#include <QtMediaServices/qmediaplaylist.h>
-#include "qmediaobject_p.h"
-
-#include <QtCore/qdebug.h>
-
-QT_BEGIN_NAMESPACE
-
-class QMediaPlaylistNullProvider : public QMediaPlaylistProvider
-{
-public:
- QMediaPlaylistNullProvider() :QMediaPlaylistProvider() {}
- virtual ~QMediaPlaylistNullProvider() {}
- virtual int mediaCount() const {return 0;}
- virtual QMediaContent media(int) const { return QMediaContent(); }
-};
-
-Q_GLOBAL_STATIC(QMediaPlaylistNullProvider, _q_nullMediaPlaylist)
-
-class QMediaPlaylistNavigatorPrivate
-{
- Q_DECLARE_NON_CONST_PUBLIC(QMediaPlaylistNavigator)
-public:
- QMediaPlaylistNavigatorPrivate()
- :playlist(0),
- currentPos(-1),
- lastValidPos(-1),
- playbackMode(QMediaPlaylist::Linear),
- randomPositionsOffset(-1)
- {
- }
-
- QMediaPlaylistProvider *playlist;
- int currentPos;
- int lastValidPos; //to be used with CurrentItemOnce playback mode
- QMediaPlaylist::PlaybackMode playbackMode;
- QMediaContent currentItem;
-
- mutable QList<int> randomModePositions;
- mutable int randomPositionsOffset;
-
- int nextItemPos(int steps = 1) const;
- int previousItemPos(int steps = 1) const;
-
- void _q_mediaInserted(int start, int end);
- void _q_mediaRemoved(int start, int end);
- void _q_mediaChanged(int start, int end);
-
- QMediaPlaylistNavigator *q_ptr;
-};
-
-
-int QMediaPlaylistNavigatorPrivate::nextItemPos(int steps) const
-{
- if (playlist->mediaCount() == 0)
- return -1;
-
- if (steps == 0)
- return currentPos;
-
- switch (playbackMode) {
- case QMediaPlaylist::CurrentItemOnce:
- return /*currentPos == -1 ? lastValidPos :*/ -1;
- case QMediaPlaylist::CurrentItemInLoop:
- return currentPos;
- case QMediaPlaylist::Linear:
- {
- int nextPos = currentPos+steps;
- return nextPos < playlist->mediaCount() ? nextPos : -1;
- }
- case QMediaPlaylist::Loop:
- return (currentPos+steps) % playlist->mediaCount();
- case QMediaPlaylist::Random:
- {
- //TODO: limit the history size
-
- if (randomPositionsOffset == -1) {
- randomModePositions.clear();
- randomModePositions.append(currentPos);
- randomPositionsOffset = 0;
- }
-
- while (randomModePositions.size() < randomPositionsOffset+steps+1)
- randomModePositions.append(-1);
- int res = randomModePositions[randomPositionsOffset+steps];
- if (res<0 || res >= playlist->mediaCount()) {
- res = qrand() % playlist->mediaCount();
- randomModePositions[randomPositionsOffset+steps] = res;
- }
-
- return res;
- }
- }
-
- return -1;
-}
-
-int QMediaPlaylistNavigatorPrivate::previousItemPos(int steps) const
-{
- if (playlist->mediaCount() == 0)
- return -1;
-
- if (steps == 0)
- return currentPos;
-
- switch (playbackMode) {
- case QMediaPlaylist::CurrentItemOnce:
- return /*currentPos == -1 ? lastValidPos :*/ -1;
- case QMediaPlaylist::CurrentItemInLoop:
- return currentPos;
- case QMediaPlaylist::Linear:
- {
- int prevPos = currentPos == -1 ? playlist->mediaCount() - steps : currentPos - steps;
- return prevPos>=0 ? prevPos : -1;
- }
- case QMediaPlaylist::Loop:
- {
- int prevPos = currentPos - steps;
- while (prevPos<0)
- prevPos += playlist->mediaCount();
- return prevPos;
- }
- case QMediaPlaylist::Random:
- {
- //TODO: limit the history size
-
- if (randomPositionsOffset == -1) {
- randomModePositions.clear();
- randomModePositions.append(currentPos);
- randomPositionsOffset = 0;
- }
-
- while (randomPositionsOffset-steps < 0) {
- randomModePositions.prepend(-1);
- randomPositionsOffset++;
- }
-
- int res = randomModePositions[randomPositionsOffset-steps];
- if (res<0 || res >= playlist->mediaCount()) {
- res = qrand() % playlist->mediaCount();
- randomModePositions[randomPositionsOffset-steps] = res;
- }
-
- return res;
- }
- }
-
- return -1;
-}
-
-/*!
- \class QMediaPlaylistNavigator
- \preliminary
- \since 4.7
- \brief The QMediaPlaylistNavigator class provides navigation for a media playlist.
-
- \sa QMediaPlaylist, QMediaPlaylistProvider
-*/
-
-
-/*!
- Constructs a media playlist navigator for a \a playlist.
-
- The \a parent is passed to QObject.
- */
-QMediaPlaylistNavigator::QMediaPlaylistNavigator(QMediaPlaylistProvider *playlist, QObject *parent)
- : QObject(parent)
- , d_ptr(new QMediaPlaylistNavigatorPrivate)
-{
- d_ptr->q_ptr = this;
-
- setPlaylist(playlist ? playlist : _q_nullMediaPlaylist());
-}
-
-/*!
- Destroys a media playlist navigator.
- */
-
-QMediaPlaylistNavigator::~QMediaPlaylistNavigator()
-{
- delete d_ptr;
-}
-
-
-/*! \property QMediaPlaylistNavigator::playbackMode
- Contains the playback mode.
- */
-QMediaPlaylist::PlaybackMode QMediaPlaylistNavigator::playbackMode() const
-{
- return d_func()->playbackMode;
-}
-
-/*!
- Sets the playback \a mode.
- */
-void QMediaPlaylistNavigator::setPlaybackMode(QMediaPlaylist::PlaybackMode mode)
-{
- Q_D(QMediaPlaylistNavigator);
- if (d->playbackMode == mode)
- return;
-
- if (mode == QMediaPlaylist::Random) {
- d->randomPositionsOffset = 0;
- d->randomModePositions.append(d->currentPos);
- } else if (d->playbackMode == QMediaPlaylist::Random) {
- d->randomPositionsOffset = -1;
- d->randomModePositions.clear();
- }
-
- d->playbackMode = mode;
-
- emit playbackModeChanged(mode);
- emit surroundingItemsChanged();
-}
-
-/*!
- Returns the playlist being navigated.
-*/
-
-QMediaPlaylistProvider *QMediaPlaylistNavigator::playlist() const
-{
- return d_func()->playlist;
-}
-
-/*!
- Sets the \a playlist to navigate.
-*/
-void QMediaPlaylistNavigator::setPlaylist(QMediaPlaylistProvider *playlist)
-{
- Q_D(QMediaPlaylistNavigator);
-
- if (d->playlist == playlist)
- return;
-
- if (d->playlist) {
- d->playlist->disconnect(this);
- }
-
- if (playlist) {
- d->playlist = playlist;
- } else {
- //assign to shared readonly null playlist
- d->playlist = _q_nullMediaPlaylist();
- }
-
- connect(d->playlist, SIGNAL(mediaInserted(int,int)), SLOT(_q_mediaInserted(int,int)));
- connect(d->playlist, SIGNAL(mediaRemoved(int,int)), SLOT(_q_mediaRemoved(int,int)));
- connect(d->playlist, SIGNAL(mediaChanged(int,int)), SLOT(_q_mediaChanged(int,int)));
-
- d->randomPositionsOffset = -1;
- d->randomModePositions.clear();
-
- if (d->currentPos != -1) {
- d->currentPos = -1;
- emit currentIndexChanged(-1);
- }
-
- if (!d->currentItem.isNull()) {
- d->currentItem = QMediaContent();
- emit activated(d->currentItem); //stop playback
- }
-}
-
-/*! \property QMediaPlaylistNavigator::currentItem
-
- Contains the media at the current position in the playlist.
-
- \sa currentIndex()
-*/
-
-QMediaContent QMediaPlaylistNavigator::currentItem() const
-{
- return itemAt(d_func()->currentPos);
-}
-
-/*! \fn QMediaContent QMediaPlaylistNavigator::nextItem(int steps) const
-
- Returns the media that is \a steps positions ahead of the current
- position in the playlist.
-
- \sa nextIndex()
-*/
-QMediaContent QMediaPlaylistNavigator::nextItem(int steps) const
-{
- return itemAt(nextIndex(steps));
-}
-
-/*!
- Returns the media that is \a steps positions behind the current
- position in the playlist.
-
- \sa previousIndex()
- */
-QMediaContent QMediaPlaylistNavigator::previousItem(int steps) const
-{
- return itemAt(previousIndex(steps));
-}
-
-/*!
- Returns the media at a \a position in the playlist.
- */
-QMediaContent QMediaPlaylistNavigator::itemAt(int position) const
-{
- return d_func()->playlist->media(position);
-}
-
-/*! \property QMediaPlaylistNavigator::currentIndex
-
- Contains the position of the current media.
-
- If no media is current, the property contains -1.
-
- \sa nextIndex(), previousIndex()
-*/
-
-int QMediaPlaylistNavigator::currentIndex() const
-{
- return d_func()->currentPos;
-}
-
-/*!
- Returns a position \a steps ahead of the current position
- accounting for the playbackMode().
-
- If the position is beyond the end of the playlist, this value
- returned is -1.
-
- \sa currentIndex(), previousIndex(), playbackMode()
-*/
-
-int QMediaPlaylistNavigator::nextIndex(int steps) const
-{
- return d_func()->nextItemPos(steps);
-}
-
-/*!
-
- Returns a position \a steps behind the current position accounting
- for the playbackMode().
-
- If the position is prior to the beginning of the playlist this will
- return -1.
-
- \sa currentIndex(), nextIndex(), playbackMode()
-*/
-int QMediaPlaylistNavigator::previousIndex(int steps) const
-{
- return d_func()->previousItemPos(steps);
-}
-
-/*!
- Advances to the next item in the playlist.
-
- \sa previous(), jump(), playbackMode()
- */
-void QMediaPlaylistNavigator::next()
-{
- Q_D(QMediaPlaylistNavigator);
-
- int nextPos = d->nextItemPos();
-
- if ( playbackMode() == QMediaPlaylist::Random )
- d->randomPositionsOffset++;
-
- jump(nextPos);
-}
-
-/*!
- Returns to the previous item in the playlist,
-
- \sa next(), jump(), playbackMode()
- */
-void QMediaPlaylistNavigator::previous()
-{
- Q_D(QMediaPlaylistNavigator);
-
- int prevPos = d->previousItemPos();
- if ( playbackMode() == QMediaPlaylist::Random )
- d->randomPositionsOffset--;
-
- jump(prevPos);
-}
-
-/*!
- Jumps to a new \a position in the playlist.
- */
-void QMediaPlaylistNavigator::jump(int position)
-{
- Q_D(QMediaPlaylistNavigator);
-
- if (position<-1 || position>=d->playlist->mediaCount()) {
- qWarning() << "QMediaPlaylistNavigator: Jump outside playlist range";
- position = -1;
- }
-
- if (position != -1)
- d->lastValidPos = position;
-
- if (playbackMode() == QMediaPlaylist::Random) {
- if (d->randomModePositions[d->randomPositionsOffset] != position) {
- d->randomModePositions.clear();
- d->randomModePositions.append(position);
- d->randomPositionsOffset = 0;
- }
- }
-
- if (position != -1)
- d->currentItem = d->playlist->media(position);
- else
- d->currentItem = QMediaContent();
-
- if (position != d->currentPos) {
- d->currentPos = position;
- emit currentIndexChanged(d->currentPos);
- emit surroundingItemsChanged();
- }
-
- emit activated(d->currentItem);
-}
-
-/*!
- \internal
-*/
-void QMediaPlaylistNavigatorPrivate::_q_mediaInserted(int start, int end)
-{
- Q_Q(QMediaPlaylistNavigator);
-
- if (currentPos >= start) {
- currentPos = end-start+1;
- q->jump(currentPos);
- }
-
- //TODO: check if they really changed
- emit q->surroundingItemsChanged();
-}
-
-/*!
- \internal
-*/
-void QMediaPlaylistNavigatorPrivate::_q_mediaRemoved(int start, int end)
-{
- Q_Q(QMediaPlaylistNavigator);
-
- if (currentPos > end) {
- currentPos = currentPos - end-start+1;
- q->jump(currentPos);
- } else if (currentPos >= start) {
- //current item was removed
- currentPos = qMin(start, playlist->mediaCount()-1);
- q->jump(currentPos);
- }
-
- //TODO: check if they really changed
- emit q->surroundingItemsChanged();
-}
-
-/*!
- \internal
-*/
-void QMediaPlaylistNavigatorPrivate::_q_mediaChanged(int start, int end)
-{
- Q_Q(QMediaPlaylistNavigator);
-
- if (currentPos >= start && currentPos<=end) {
- QMediaContent src = playlist->media(currentPos);
- if (src != currentItem) {
- currentItem = src;
- emit q->activated(src);
- }
- }
-
- //TODO: check if they really changed
- emit q->surroundingItemsChanged();
-}
-
-/*!
- \fn QMediaPlaylistNavigator::activated(const QMediaContent &media)
-
- Signals that the current \a media has changed.
-*/
-
-/*!
- \fn QMediaPlaylistNavigator::currentIndexChanged(int position)
-
- Signals the \a position of the current media has changed.
-*/
-
-/*!
- \fn QMediaPlaylistNavigator::playbackModeChanged(QMediaPlaylist::PlaybackMode mode)
-
- Signals that the playback \a mode has changed.
-*/
-
-/*!
- \fn QMediaPlaylistNavigator::surroundingItemsChanged()
-
- Signals that media immediately surrounding the current position has changed.
-*/
-
-#include "moc_qmediaplaylistnavigator.cpp"
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qmediaplaylistnavigator.h b/src/multimedia/mediaservices/base/qmediaplaylistnavigator.h
deleted file mode 100644
index 42c76f9..0000000
--- a/src/multimedia/mediaservices/base/qmediaplaylistnavigator.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIAPLAYLISTNAVIGATOR_H
-#define QMEDIAPLAYLISTNAVIGATOR_H
-
-#include <QtCore/qobject.h>
-
-#include <QtMediaServices/qmediaplaylistprovider.h>
-#include <QtMediaServices/qmediaplaylist.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-
-class QMediaPlaylistNavigatorPrivate;
-class Q_MEDIASERVICES_EXPORT QMediaPlaylistNavigator : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QMediaPlaylist::PlaybackMode playbackMode READ playbackMode WRITE setPlaybackMode NOTIFY playbackModeChanged)
- Q_PROPERTY(int currentIndex READ currentIndex WRITE jump NOTIFY currentIndexChanged)
- Q_PROPERTY(QMediaContent currentItem READ currentItem NOTIFY currentItemChanged)
-
-public:
- QMediaPlaylistNavigator(QMediaPlaylistProvider *playlist, QObject *parent = 0);
- virtual ~QMediaPlaylistNavigator();
-
- QMediaPlaylistProvider *playlist() const;
- void setPlaylist(QMediaPlaylistProvider *playlist);
-
- QMediaPlaylist::PlaybackMode playbackMode() const;
-
- QMediaContent currentItem() const;
- QMediaContent nextItem(int steps = 1) const;
- QMediaContent previousItem(int steps = 1) const;
-
- QMediaContent itemAt(int position) const;
-
- int currentIndex() const;
- int nextIndex(int steps = 1) const;
- int previousIndex(int steps = 1) const;
-
-public Q_SLOTS:
- void next();
- void previous();
-
- void jump(int);
-
- void setPlaybackMode(QMediaPlaylist::PlaybackMode mode);
-
-Q_SIGNALS:
- void activated(const QMediaContent &content);
- void currentIndexChanged(int);
- void playbackModeChanged(QMediaPlaylist::PlaybackMode mode);
-
- void surroundingItemsChanged();
-
-protected:
- QMediaPlaylistNavigatorPrivate *d_ptr;
-
-private:
- Q_DISABLE_COPY(QMediaPlaylistNavigator)
- Q_DECLARE_PRIVATE(QMediaPlaylistNavigator)
-
- Q_PRIVATE_SLOT(d_func(), void _q_mediaInserted(int start, int end))
- Q_PRIVATE_SLOT(d_func(), void _q_mediaRemoved(int start, int end))
- Q_PRIVATE_SLOT(d_func(), void _q_mediaChanged(int start, int end))
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QMEDIAPLAYLISTNAVIGATOR_H
diff --git a/src/multimedia/mediaservices/base/qmediaplaylistprovider.cpp b/src/multimedia/mediaservices/base/qmediaplaylistprovider.cpp
deleted file mode 100644
index 3cd766b..0000000
--- a/src/multimedia/mediaservices/base/qmediaplaylistprovider.cpp
+++ /dev/null
@@ -1,308 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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/qurl.h>
-
-#include <QtMediaServices/qmediaplaylistprovider.h>
-#include "qmediaplaylistprovider_p.h"
-
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QMediaPlaylistProvider
- \preliminary
- \since 4.7
- \brief The QMediaPlaylistProvider class provides an abstract list of media.
-
- \sa QMediaPlaylist
-*/
-
-/*!
- Constructs a playlist provider with the given \a parent.
-*/
-QMediaPlaylistProvider::QMediaPlaylistProvider(QObject *parent)
- :QObject(parent), d_ptr(new QMediaPlaylistProviderPrivate)
-{
-}
-
-/*!
- \internal
-*/
-QMediaPlaylistProvider::QMediaPlaylistProvider(QMediaPlaylistProviderPrivate &dd, QObject *parent)
- :QObject(parent), d_ptr(&dd)
-{
-}
-
-/*!
- Destroys a playlist provider.
-*/
-QMediaPlaylistProvider::~QMediaPlaylistProvider()
-{
- delete d_ptr;
-}
-
-/*!
- \fn QMediaPlaylistProvider::mediaCount() const;
-
- Returns the size of playlist.
-*/
-
-/*!
- \fn QMediaPlaylistProvider::media(int index) const;
-
- Returns the media at \a index in the playlist.
-
- If the index is invalid this will return a null media content.
-*/
-
-
-/*!
- Loads a playlist from from a URL \a location. If no playlist \a format is specified the loader
- will inspect the URL or probe the headers to guess the format.
-
- New items are appended to playlist.
-
- Returns true if the provider supports the format and loading from the locations URL protocol,
- otherwise this will return false.
-*/
-bool QMediaPlaylistProvider::load(const QUrl &location, const char *format)
-{
- Q_UNUSED(location);
- Q_UNUSED(format);
- return false;
-}
-
-/*!
- Loads a playlist from from an I/O \a device. If no playlist \a format is specified the loader
- will probe the headers to guess the format.
-
- New items are appended to playlist.
-
- Returns true if the provider supports the format and loading from an I/O device, otherwise this
- will return false.
-*/
-bool QMediaPlaylistProvider::load(QIODevice * device, const char *format)
-{
- Q_UNUSED(device);
- Q_UNUSED(format);
- return false;
-}
-
-/*!
- Saves the contents of a playlist to a URL \a location. If no playlist \a format is specified
- the writer will inspect the URL to guess the format.
-
- Returns true if the playlist was saved succesfully; and false otherwise.
- */
-bool QMediaPlaylistProvider::save(const QUrl &location, const char *format)
-{
- Q_UNUSED(location);
- Q_UNUSED(format);
- return false;
-}
-
-/*!
- Saves the contents of a playlist to an I/O \a device in the specified \a format.
-
- Returns true if the playlist was saved succesfully; and false otherwise.
-*/
-bool QMediaPlaylistProvider::save(QIODevice * device, const char *format)
-{
- Q_UNUSED(device);
- Q_UNUSED(format);
- return false;
-}
-
-/*!
- Returns true if a playlist is read-only; otherwise returns false.
-*/
-bool QMediaPlaylistProvider::isReadOnly() const
-{
- return true;
-}
-
-/*!
- Append \a media to a playlist.
-
- Returns true if the media was appended; and false otherwise.
-*/
-bool QMediaPlaylistProvider::addMedia(const QMediaContent &media)
-{
- Q_UNUSED(media);
- return false;
-}
-
-/*!
- Append multiple media \a items to a playlist.
-
- Returns true if the media items were appended; and false otherwise.
-*/
-bool QMediaPlaylistProvider::addMedia(const QList<QMediaContent> &items)
-{
- foreach(const QMediaContent &item, items) {
- if (!addMedia(item))
- return false;
- }
-
- return true;
-}
-
-/*!
- Inserts \a media into a playlist at \a position.
-
- Returns true if the media was inserted; and false otherwise.
-*/
-bool QMediaPlaylistProvider::insertMedia(int position, const QMediaContent &media)
-{
- Q_UNUSED(position);
- Q_UNUSED(media);
- return false;
-}
-
-/*!
- Inserts multiple media \a items into a playlist at \a position.
-
- Returns true if the media \a items were inserted; and false otherwise.
-*/
-bool QMediaPlaylistProvider::insertMedia(int position, const QList<QMediaContent> &items)
-{
- for (int i=0; i<items.count(); i++) {
- if (!insertMedia(position+i,items.at(i)))
- return false;
- }
-
- return true;
-}
-
-
-/*!
- Removes the media at \a position from a playlist.
-
- Returns true if the media was removed; and false otherwise.
-*/
-bool QMediaPlaylistProvider::removeMedia(int position)
-{
- Q_UNUSED(position);
- return false;
-}
-
-/*!
- Removes the media between the given \a start and \a end positions from a playlist.
-
- Returns true if the media was removed; and false otherwise.
- */
-bool QMediaPlaylistProvider::removeMedia(int start, int end)
-{
- for (int pos=start; pos<=end; pos++) {
- if (!removeMedia(pos))
- return false;
- }
-
- return true;
-}
-
-/*!
- Removes all media from a playlist.
-
- Returns true if the media was removed; and false otherwise.
-*/
-bool QMediaPlaylistProvider::clear()
-{
- return removeMedia(0, mediaCount()-1);
-}
-
-/*!
- Shuffles the contents of a playlist.
-*/
-void QMediaPlaylistProvider::shuffle()
-{
-}
-
-/*!
- \fn void QMediaPlaylistProvider::mediaAboutToBeInserted(int start, int end);
-
- Signals that new media is about to be inserted into a playlist between the \a start and \a end
- positions.
-*/
-
-/*!
- \fn void QMediaPlaylistProvider::mediaInserted(int start, int end);
-
- Signals that new media has been inserted into a playlist between the \a start and \a end
- positions.
-*/
-
-/*!
- \fn void QMediaPlaylistProvider::mediaAboutToBeRemoved(int start, int end);
-
- Signals that media is about to be removed from a playlist between the \a start and \a end
- positions.
-*/
-
-/*!
- \fn void QMediaPlaylistProvider::mediaRemoved(int start, int end);
-
- Signals that media has been removed from a playlist between the \a start and \a end positions.
-*/
-
-/*!
- \fn void QMediaPlaylistProvider::mediaChanged(int start, int end);
-
- Signals that media in playlist between the \a start and \a end positions inclusive has changed.
-*/
-
-/*!
- \fn void QMediaPlaylistProvider::loaded()
-
- Signals that a load() finished successfully.
-*/
-
-/*!
- \fn void QMediaPlaylistProvider::loadFailed(QMediaPlaylist::Error error, const QString& errorMessage)
-
- Signals that a load failed() due to an \a error. The \a errorMessage provides more information.
-*/
-
-#include "moc_qmediaplaylistprovider.cpp"
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qmediaplaylistprovider.h b/src/multimedia/mediaservices/base/qmediaplaylistprovider.h
deleted file mode 100644
index c68ed89..0000000
--- a/src/multimedia/mediaservices/base/qmediaplaylistprovider.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIAPLAYLISTPROVIDER_H
-#define QMEDIAPLAYLISTPROVIDER_H
-
-#include <QtCore/qobject.h>
-
-#include <QtMediaServices/qmediacontent.h>
-#include <QtMediaServices/qmediaplaylist.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-class QString;
-
-
-class QMediaPlaylistProviderPrivate;
-class Q_MEDIASERVICES_EXPORT QMediaPlaylistProvider : public QObject
-{
- Q_OBJECT
-
-public:
- QMediaPlaylistProvider(QObject *parent=0);
- virtual ~QMediaPlaylistProvider();
-
- virtual bool load(const QUrl &location, const char *format = 0);
- virtual bool load(QIODevice * device, const char *format = 0);
- virtual bool save(const QUrl &location, const char *format = 0);
- virtual bool save(QIODevice * device, const char *format);
-
- virtual int mediaCount() const = 0;
- virtual QMediaContent media(int index) const = 0;
-
- virtual bool isReadOnly() const;
-
- virtual bool addMedia(const QMediaContent &content);
- virtual bool addMedia(const QList<QMediaContent> &contentList);
- virtual bool insertMedia(int index, const QMediaContent &content);
- virtual bool insertMedia(int index, const QList<QMediaContent> &content);
- virtual bool removeMedia(int pos);
- virtual bool removeMedia(int start, int end);
- virtual bool clear();
-
-public Q_SLOTS:
- virtual void shuffle();
-
-Q_SIGNALS:
- void mediaAboutToBeInserted(int start, int end);
- void mediaInserted(int start, int end);
-
- void mediaAboutToBeRemoved(int start, int end);
- void mediaRemoved(int start, int end);
-
- void mediaChanged(int start, int end);
-
- void loaded();
- void loadFailed(QMediaPlaylist::Error, const QString& errorMessage);
-
-protected:
- QMediaPlaylistProviderPrivate *d_ptr;
- QMediaPlaylistProvider(QMediaPlaylistProviderPrivate &dd, QObject *parent);
-
-private:
- Q_DECLARE_PRIVATE(QMediaPlaylistProvider)
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QMEDIAPLAYLISTPROVIDER_H
diff --git a/src/multimedia/mediaservices/base/qmediaplaylistprovider_p.h b/src/multimedia/mediaservices/base/qmediaplaylistprovider_p.h
deleted file mode 100644
index 00d1cca..0000000
--- a/src/multimedia/mediaservices/base/qmediaplaylistprovider_p.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIAPLAYLISTPROVIDER_P_H
-#define QMEDIAPLAYLISTPROVIDER_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 <QtMediaServices/qmediaplaylist.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QMediaPlaylistProviderPrivate
-{
-public:
- QMediaPlaylistProviderPrivate()
- {}
- virtual ~QMediaPlaylistProviderPrivate()
- {}
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QMEDIAPLAYLISTSOURCE_P_H
diff --git a/src/multimedia/mediaservices/base/qmediapluginloader.cpp b/src/multimedia/mediaservices/base/qmediapluginloader.cpp
deleted file mode 100644
index 8b0ddf4..0000000
--- a/src/multimedia/mediaservices/base/qmediapluginloader.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 "qmediapluginloader_p.h"
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qpluginloader.h>
-#include <QtCore/qdir.h>
-#include <QtCore/qdebug.h>
-
-#include <QtMediaServices/qmediaserviceproviderplugin.h>
-
-
-QT_BEGIN_NAMESPACE
-
-
-typedef QMap<QString,QObjectList> ObjectListMap;
-Q_GLOBAL_STATIC(ObjectListMap, staticMediaPlugins);
-
-QMediaPluginLoader::QMediaPluginLoader(const char *iid, const QString &location, Qt::CaseSensitivity):
- m_iid(iid)
-{
- m_location = location + QLatin1String("/");
- load();
-}
-
-QStringList QMediaPluginLoader::keys() const
-{
- return m_instances.keys();
-}
-
-QObject* QMediaPluginLoader::instance(QString const &key)
-{
- return m_instances.value(key);
-}
-
-QList<QObject*> QMediaPluginLoader::instances(QString const &key)
-{
- return m_instances.values(key);
-}
-
-//to be used for testing purposes only
-void QMediaPluginLoader::setStaticPlugins(const QString &location, const QObjectList& objects)
-{
- staticMediaPlugins()->insert(location + QLatin1String("/"), objects);
-}
-
-void QMediaPluginLoader::load()
-{
- if (!m_instances.isEmpty())
- return;
-
- if (staticMediaPlugins() && staticMediaPlugins()->contains(m_location)) {
- foreach(QObject *o, staticMediaPlugins()->value(m_location)) {
- if (o != 0 && o->qt_metacast(m_iid) != 0) {
- QFactoryInterface* p = qobject_cast<QFactoryInterface*>(o);
- if (p != 0) {
- foreach (QString const &key, p->keys())
- m_instances.insertMulti(key, o);
- }
- }
- }
- } else {
-#ifndef QT_NO_LIBRARY
- QStringList paths = QCoreApplication::libraryPaths();
-
- foreach (QString const &path, paths) {
- QString pluginPathName(path + m_location);
- QDir pluginDir(pluginPathName);
-
- if (!pluginDir.exists())
- continue;
-
- foreach (const QString &pluginLib, pluginDir.entryList(QDir::Files)) {
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
- if (pluginLib.endsWith(QLatin1String(".debug")))
- continue;
-#endif
- QPluginLoader loader(pluginPathName + pluginLib);
-
- QObject *o = loader.instance();
- if (o != 0 && o->qt_metacast(m_iid) != 0) {
- QFactoryInterface* p = qobject_cast<QFactoryInterface*>(o);
- if (p != 0) {
- foreach (QString const &key, p->keys())
- m_instances.insertMulti(key, o);
- }
-
- continue;
- } else {
- qWarning() << "QMediaPluginLoader: Failed to load plugin: " << pluginLib << loader.errorString();
- }
- delete o;
- loader.unload();
- }
- }
-#endif
- }
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qmediapluginloader_p.h b/src/multimedia/mediaservices/base/qmediapluginloader_p.h
deleted file mode 100644
index d911180..0000000
--- a/src/multimedia/mediaservices/base/qmediapluginloader_p.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIAPLUGINLOADER_H
-#define QMEDIAPLUGINLOADER_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/qobject.h>
-#include <QtCore/qstring.h>
-#include <QtCore/qmap.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QMediaServiceProviderPlugin;
-
-class Q_AUTOTEST_EXPORT QMediaPluginLoader
-{
-public:
- QMediaPluginLoader(const char *iid,
- const QString &suffix = QString(),
- Qt::CaseSensitivity = Qt::CaseSensitive);
-
- QStringList keys() const;
- QObject* instance(QString const &key);
- QList<QObject*> instances(QString const &key);
-
- static void setStaticPlugins(const QString &location, const QObjectList& objects);
-
-private:
- void load();
-
- QByteArray m_iid;
- QString m_location;
- QMap<QString, QObject*> m_instances;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QMEDIAPLUGINLOADER_H
diff --git a/src/multimedia/mediaservices/base/qmediaresource.cpp b/src/multimedia/mediaservices/base/qmediaresource.cpp
deleted file mode 100644
index 33bd396..0000000
--- a/src/multimedia/mediaservices/base/qmediaresource.cpp
+++ /dev/null
@@ -1,399 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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/qsize.h>
-#include <QtCore/qurl.h>
-#include <QtCore/qvariant.h>
-
-#include <QtMediaServices/qmediaresource.h>
-
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QMediaResource
- \preliminary
- \since 4.7
- \brief The QMediaResource class provides a description of a media resource.
- \ingroup multimedia
-
- A media resource is composed of a \l {url()}{URL} containing the
- location of the resource and a set of properties that describe the
- format of the resource. The properties provide a means to assess a
- resource without first attempting to load it, and in situations where
- media be represented by multiple alternative representations provide a
- means to select the appropriate resource.
-
- Media made available by a remote services can often be available in
- multiple encodings or quality levels, this allows a client to select
- an appropriate resource based on considerations such as codecs supported,
- network bandwidth, and display constraints. QMediaResource includes
- information such as the \l {mimeType()}{MIME type}, \l {audioCodec()}{audio}
- and \l {videoCodec()}{video} codecs, \l {audioBitRate()}{audio} and
- \l {videoBitRate()}{video} bit rates, and \l {resolution()}{resolution}
- so these constraints and others can be evaluated.
-
- The only mandatory property of a QMediaResource is the url().
-
- \sa QMediaContent
-*/
-
-/*!
- \typedef QMediaResourceList
-
- Synonym for \c QList<QMediaResource>
-*/
-
-/*!
- Constructs a null media resource.
-*/
-QMediaResource::QMediaResource()
-{
-}
-
-/*!
- Constructs a media resource with the given \a mimeType from a \a url.
-*/
-QMediaResource::QMediaResource(const QUrl &url, const QString &mimeType)
-{
- values.insert(Url, url);
- values.insert(MimeType, mimeType);
-}
-
-/*!
- Constructs a media resource with the given \a mimeType from a network \a request.
-*/
-QMediaResource::QMediaResource(const QNetworkRequest &request, const QString &mimeType)
-{
- values.insert(Request, QVariant::fromValue(request));
- values.insert(Url, request.url());
- values.insert(MimeType, mimeType);
-}
-
-/*!
- Constructs a copy of a media resource \a other.
-*/
-QMediaResource::QMediaResource(const QMediaResource &other)
- : values(other.values)
-{
-}
-
-/*!
- Assigns the value of \a other to a media resource.
-*/
-QMediaResource &QMediaResource::operator =(const QMediaResource &other)
-{
- values = other.values;
-
- return *this;
-}
-
-/*!
- Destroys a media resource.
-*/
-QMediaResource::~QMediaResource()
-{
-}
-
-
-/*!
- Compares a media resource to \a other.
-
- Returns true if the resources are identical, and false otherwise.
-*/
-bool QMediaResource::operator ==(const QMediaResource &other) const
-{
- return values == other.values;
-}
-
-/*!
- Compares a media resource to \a other.
-
- Returns true if they are different, and false otherwise.
-*/
-bool QMediaResource::operator !=(const QMediaResource &other) const
-{
- return values != other.values;
-}
-
-/*!
- Identifies if a media resource is null.
-
- Returns true if the resource is null, and false otherwise.
-*/
-bool QMediaResource::isNull() const
-{
- return values.isEmpty();
-}
-
-/*!
- Returns the URL of a media resource.
-*/
-QUrl QMediaResource::url() const
-{
- return qvariant_cast<QUrl>(values.value(Url));
-}
-
-/*!
- Returns the network request associated with this media resource.
-*/
-QNetworkRequest QMediaResource::request() const
-{
- if(values.contains(Request))
- return qvariant_cast<QNetworkRequest>(values.value(Request));
-
- return QNetworkRequest(url());
-}
-
-/*!
- Returns the MIME type of a media resource.
-
- This may be null if the MIME type is unknown.
-*/
-QString QMediaResource::mimeType() const
-{
- return qvariant_cast<QString>(values.value(MimeType));
-}
-
-/*!
- Returns the language of a media resource as an ISO 639-2 code.
-
- This may be null if the language is unknown.
-*/
-QString QMediaResource::language() const
-{
- return qvariant_cast<QString>(values.value(Language));
-}
-
-/*!
- Sets the \a language of a media resource.
-*/
-void QMediaResource::setLanguage(const QString &language)
-{
- if (!language.isNull())
- values.insert(Language, language);
- else
- values.remove(Language);
-}
-
-/*!
- Returns the audio codec of a media resource.
-
- This may be null if the media resource does not contain an audio stream, or the codec is
- unknown.
-*/
-QString QMediaResource::audioCodec() const
-{
- return qvariant_cast<QString>(values.value(AudioCodec));
-}
-
-/*!
- Sets the audio \a codec of a media resource.
-*/
-void QMediaResource::setAudioCodec(const QString &codec)
-{
- if (!codec.isNull())
- values.insert(AudioCodec, codec);
- else
- values.remove(AudioCodec);
-}
-
-/*!
- Returns the video codec of a media resource.
-
- This may be null if the media resource does not contain a video stream, or the codec is
- unknonwn.
-*/
-QString QMediaResource::videoCodec() const
-{
- return qvariant_cast<QString>(values.value(VideoCodec));
-}
-
-/*!
- Sets the video \a codec of media resource.
-*/
-void QMediaResource::setVideoCodec(const QString &codec)
-{
- if (!codec.isNull())
- values.insert(VideoCodec, codec);
- else
- values.remove(VideoCodec);
-}
-
-/*!
- Returns the size in bytes of a media resource.
-
- This may be zero if the size is unknown.
-*/
-qint64 QMediaResource::dataSize() const
-{
- return qvariant_cast<qint64>(values.value(DataSize));
-}
-
-/*!
- Sets the \a size in bytes of a media resource.
-*/
-void QMediaResource::setDataSize(const qint64 size)
-{
- if (size != 0)
- values.insert(DataSize, size);
- else
- values.remove(DataSize);
-}
-
-/*!
- Returns the bit rate in bits per second of a media resource's audio stream.
-
- This may be zero if the bit rate is unknown, or the resource contains no audio stream.
-*/
-int QMediaResource::audioBitRate() const
-{
- return values.value(AudioBitRate).toInt();
-}
-
-/*!
- Sets the bit \a rate in bits per second of a media resource's video stream.
-*/
-void QMediaResource::setAudioBitRate(int rate)
-{
- if (rate != 0)
- values.insert(AudioBitRate, rate);
- else
- values.remove(AudioBitRate);
-}
-
-/*!
- Returns the audio sample rate of a media resource.
-
- This may be zero if the sample size is unknown, or the resource contains no audio stream.
-*/
-int QMediaResource::sampleRate() const
-{
- return qvariant_cast<int>(values.value(SampleRate));
-}
-
-/*!
- Sets the audio \a sampleRate of a media resource.
-*/
-void QMediaResource::setSampleRate(int sampleRate)
-{
- if (sampleRate != 0)
- values.insert(SampleRate, sampleRate);
- else
- values.remove(SampleRate);
-}
-
-/*!
- Returns the number of audio channels in a media resource.
-
- This may be zero if the sample size is unknown, or the resource contains no audio stream.
-*/
-int QMediaResource::channelCount() const
-{
- return qvariant_cast<int>(values.value(ChannelCount));
-}
-
-/*!
- Sets the number of audio \a channels in a media resource.
-*/
-void QMediaResource::setChannelCount(int channels)
-{
- if (channels != 0)
- values.insert(ChannelCount, channels);
- else
- values.remove(ChannelCount);
-}
-
-/*!
- Returns the bit rate in bits per second of a media resource's video stream.
-
- This may be zero if the bit rate is unknown, or the resource contains no video stream.
-*/
-int QMediaResource::videoBitRate() const
-{
- return values.value(VideoBitRate).toInt();
-}
-
-/*!
- Sets the bit \a rate in bits per second of a media resource's video stream.
-*/
-void QMediaResource::setVideoBitRate(int rate)
-{
- if (rate != 0)
- values.insert(VideoBitRate, rate);
- else
- values.remove(VideoBitRate);
-}
-
-/*!
- Returns the resolution in pixels of a media resource.
-
- This may be null is the resolution is unknown, or the resource contains no pixel data (i.e. the
- resource is an audio stream.
-*/
-QSize QMediaResource::resolution() const
-{
- return qvariant_cast<QSize>(values.value(Resolution));
-}
-
-/*!
- Sets the \a resolution in pixels of a media resource.
-*/
-void QMediaResource::setResolution(const QSize &resolution)
-{
- if (resolution.width() != -1 || resolution.height() != -1)
- values.insert(Resolution, resolution);
- else
- values.remove(Resolution);
-}
-
-/*!
- Sets the \a width and \a height in pixels of a media resource.
-*/
-void QMediaResource::setResolution(int width, int height)
-{
- if (width != -1 || height != -1)
- values.insert(Resolution, QSize(width, height));
- else
- values.remove(Resolution);
-}
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qmediaresource.h b/src/multimedia/mediaservices/base/qmediaresource.h
deleted file mode 100644
index 0ecf008..0000000
--- a/src/multimedia/mediaservices/base/qmediaresource.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIARESOURCE_H
-#define QMEDIARESOURCE_H
-
-#include <QtCore/qmap.h>
-#include <QtCore/qmetatype.h>
-#include <QtNetwork/qnetworkrequest.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-
-class Q_MEDIASERVICES_EXPORT QMediaResource
-{
-public:
- QMediaResource();
- QMediaResource(const QUrl &url, const QString &mimeType = QString());
- QMediaResource(const QNetworkRequest &request, const QString &mimeType = QString());
- QMediaResource(const QMediaResource &other);
- QMediaResource &operator =(const QMediaResource &other);
- ~QMediaResource();
-
- bool isNull() const;
-
- bool operator ==(const QMediaResource &other) const;
- bool operator !=(const QMediaResource &other) const;
-
- QUrl url() const;
- QNetworkRequest request() const;
- QString mimeType() const;
-
- QString language() const;
- void setLanguage(const QString &language);
-
- QString audioCodec() const;
- void setAudioCodec(const QString &codec);
-
- QString videoCodec() const;
- void setVideoCodec(const QString &codec);
-
- qint64 dataSize() const;
- void setDataSize(const qint64 size);
-
- int audioBitRate() const;
- void setAudioBitRate(int rate);
-
- int sampleRate() const;
- void setSampleRate(int frequency);
-
- int channelCount() const;
- void setChannelCount(int channels);
-
- int videoBitRate() const;
- void setVideoBitRate(int rate);
-
- QSize resolution() const;
- void setResolution(const QSize &resolution);
- void setResolution(int width, int height);
-
-
-private:
- enum Property
- {
- Url,
- Request,
- MimeType,
- Language,
- AudioCodec,
- VideoCodec,
- DataSize,
- AudioBitRate,
- VideoBitRate,
- SampleRate,
- ChannelCount,
- Resolution
- };
- QMap<int, QVariant> values;
-};
-
-typedef QList<QMediaResource> QMediaResourceList;
-
-QT_END_NAMESPACE
-
-Q_DECLARE_METATYPE(QMediaResource)
-Q_DECLARE_METATYPE(QMediaResourceList)
-
-QT_END_HEADER
-
-
-#endif
diff --git a/src/multimedia/mediaservices/base/qmediaservice.cpp b/src/multimedia/mediaservices/base/qmediaservice.cpp
deleted file mode 100644
index b343887..0000000
--- a/src/multimedia/mediaservices/base/qmediaservice.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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/qtimer.h>
-
-#include <QtMediaServices/qmediaservice.h>
-#include "qmediaservice_p.h"
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-/*!
- \class QMediaService
- \brief The QMediaService class provides a common base class for media
- service implementations.
- \ingroup multimedia-serv
- \preliminary
- \since 4.7
-
- Media services provide implementations of the functionality promised
- by media objects, and allow multiple providers to implement a QMediaObject.
-
- To provide the functionality of a QMediaObject media services implement
- QMediaControl interfaces. Services typically implement one core media
- control which provides the core feature of a media object, and some
- number of additional controls which provide either optional features of
- the media object, or features of a secondary media object or peripheral
- object.
-
- A pointer to media service's QMediaControl implementation can be
- obtained by passing the control's interface name to the control() function.
-
- \code
- QMediaPlayerControl *control = qobject_cast<QMediaPlayerControl *>(
- service->control("com.nokia.Qt.QMediaPlayerControl/1.0"));
- \endcode
-
- Media objects can use services loaded dynamically from plug-ins or
- implemented statically within an applications. Plug-in based services
- should also implement the QMediaServiceProviderPlugin interface. Static
- services should implement the QMediaServiceProvider interface.
-
- \sa QMediaObject, QMediaControl, QMediaServiceProvider, QMediaServiceProviderPlugin
-*/
-
-/*!
- Construct a media service with the given \a parent. This class is meant as a
- base class for Multimedia services so this constructor is protected.
-*/
-
-QMediaService::QMediaService(QObject *parent)
- : QObject(parent)
- , d_ptr(new QMediaServicePrivate)
-{
- d_ptr->q_ptr = this;
-}
-
-/*!
- \internal
-*/
-QMediaService::QMediaService(QMediaServicePrivate &dd, QObject *parent)
- : QObject(parent)
- , d_ptr(&dd)
-{
- d_ptr->q_ptr = this;
-}
-
-/*!
- Destroys a media service.
-*/
-
-QMediaService::~QMediaService()
-{
- delete d_ptr;
-}
-
-/*!
- \fn QMediaService::control(const char *interface) const
-
- Returns a pointer to the media control implementing \a interface.
-
- If the service does not implement the control a null pointer is returned instead.
-*/
-
-/*!
- \fn QMediaService::control() const
-
- Returns a pointer to the media control of type T implemented by a media service.
-
- If the service does not implment the control a null pointer is returned instead.
-*/
-
-#include "moc_qmediaservice.cpp"
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
diff --git a/src/multimedia/mediaservices/base/qmediaservice.h b/src/multimedia/mediaservices/base/qmediaservice.h
deleted file mode 100644
index 5df3fd7..0000000
--- a/src/multimedia/mediaservices/base/qmediaservice.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QABSTRACTMEDIASERVICE_H
-#define QABSTRACTMEDIASERVICE_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qstringlist.h>
-
-#include <QtMediaServices/qmediacontrol.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-class QMediaServicePrivate;
-class Q_MEDIASERVICES_EXPORT QMediaService : public QObject
-{
- Q_OBJECT
-
-public:
- ~QMediaService();
-
- virtual QMediaControl* control(const char *name) const = 0;
-
-#ifndef QT_NO_MEMBER_TEMPLATES
- template <typename T> inline T control() const {
- if (QObject *object = control(qmediacontrol_iid<T>())) {
- return qobject_cast<T>(object);
- }
- return 0;
- }
-#endif
-
-protected:
- QMediaService(QObject* parent);
- QMediaService(QMediaServicePrivate &dd, QObject *parent);
-
- QMediaServicePrivate *d_ptr;
-
-private:
- Q_DECLARE_PRIVATE(QMediaService)
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QABSTRACTMEDIASERVICE_H
-
diff --git a/src/multimedia/mediaservices/base/qmediaservice_p.h b/src/multimedia/mediaservices/base/qmediaservice_p.h
deleted file mode 100644
index bebae11..0000000
--- a/src/multimedia/mediaservices/base/qmediaservice_p.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QABSTRACTMEDIASERVICE_P_H
-#define QABSTRACTMEDIASERVICE_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.
-//
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QAudioDeviceControl;
-
-class QMediaServicePrivate
-{
-public:
- QMediaServicePrivate(): q_ptr(0) {}
- virtual ~QMediaServicePrivate() {}
-
- QMediaService *q_ptr;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/multimedia/mediaservices/base/qmediaserviceprovider.cpp b/src/multimedia/mediaservices/base/qmediaserviceprovider.cpp
deleted file mode 100644
index f27628b..0000000
--- a/src/multimedia/mediaservices/base/qmediaserviceprovider.cpp
+++ /dev/null
@@ -1,738 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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/qdebug.h>
-#include <QtCore/qmap.h>
-
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qmediaserviceprovider.h>
-#include <QtMediaServices/qmediaserviceproviderplugin.h>
-#include "qmediapluginloader_p.h"
-#include <QtMediaServices/qmediaplayer.h>
-
-QT_BEGIN_NAMESPACE
-
-class QMediaServiceProviderHintPrivate : public QSharedData
-{
-public:
- QMediaServiceProviderHintPrivate(QMediaServiceProviderHint::Type type)
- :type(type), features(0)
- {
- }
-
- QMediaServiceProviderHintPrivate(const QMediaServiceProviderHintPrivate &other)
- :QSharedData(other),
- type(other.type),
- device(other.device),
- mimeType(other.mimeType),
- codecs(other.codecs),
- features(other.features)
- {
- }
-
- ~QMediaServiceProviderHintPrivate()
- {
- }
-
- QMediaServiceProviderHint::Type type;
- QByteArray device;
- QString mimeType;
- QStringList codecs;
- QMediaServiceProviderHint::Features features;
-};
-
-/*!
- \class QMediaServiceProviderHint
- \preliminary
- \since 4.7
- \brief The QMediaServiceProviderHint class describes what is required of a QMediaService.
-
- \ingroup multimedia-serv
-
- The QMediaServiceProvider class uses hints to select an appropriate media service.
-*/
-
-/*!
- \enum QMediaServiceProviderHint::Feature
-
- Enumerates features a media service may provide.
-
- \value LowLatencyPlayback
- The service is expected to play simple audio formats,
- but playback should start without significant delay.
- Such playback service can be used for beeps, ringtones, etc.
-
- \value RecordingSupport
- The service provides audio or video recording functions.
-
- \value StreamPlayback
- The service is capable of playing QIODevice based streams.
-*/
-
-/*!
- \enum QMediaServiceProviderHint::Type
-
- Enumerates the possible types of media service provider hint.
-
- \value Null En empty hint, use the default service.
- \value ContentType Select media service most suitable for certain content type.
- \value Device Select media service which supports certain device.
- \value SupportedFeatures Select media service supporting the set of optional features.
-*/
-
-
-/*!
- Constructs an empty media service provider hint.
-*/
-QMediaServiceProviderHint::QMediaServiceProviderHint()
- :d(new QMediaServiceProviderHintPrivate(Null))
-{
-}
-
-/*!
- Constructs a ContentType media service provider hint.
-
- This type of hint describes a service that is able to play content of a specific MIME \a type
- encoded with one or more of the listed \a codecs.
-*/
-QMediaServiceProviderHint::QMediaServiceProviderHint(const QString &type, const QStringList& codecs)
- :d(new QMediaServiceProviderHintPrivate(ContentType))
-{
- d->mimeType = type;
- d->codecs = codecs;
-}
-
-/*!
- Constructs a Device media service provider hint.
-
- This type of hint describes a media service that utilizes a specific \a device.
-*/
-QMediaServiceProviderHint::QMediaServiceProviderHint(const QByteArray &device)
- :d(new QMediaServiceProviderHintPrivate(Device))
-{
- d->device = device;
-}
-
-/*!
- Constructs a SupportedFeatures media service provider hint.
-
- This type of hint describes a service which supports a specific set of \a features.
-*/
-QMediaServiceProviderHint::QMediaServiceProviderHint(QMediaServiceProviderHint::Features features)
- :d(new QMediaServiceProviderHintPrivate(SupportedFeatures))
-{
- d->features = features;
-}
-
-/*!
- Constructs a copy of the media service provider hint \a other.
-*/
-QMediaServiceProviderHint::QMediaServiceProviderHint(const QMediaServiceProviderHint &other)
- :d(other.d)
-{
-}
-
-/*!
- Destroys a media service provider hint.
-*/
-QMediaServiceProviderHint::~QMediaServiceProviderHint()
-{
-}
-
-/*!
- Assigns the value \a other to a media service provider hint.
-*/
-QMediaServiceProviderHint& QMediaServiceProviderHint::operator=(const QMediaServiceProviderHint &other)
-{
- d = other.d;
- return *this;
-}
-
-/*!
- Identifies if \a other is of equal value to a media service provider hint.
-
- Returns true if the hints are equal, and false if they are not.
-*/
-bool QMediaServiceProviderHint::operator == (const QMediaServiceProviderHint &other) const
-{
- return (d == other.d) ||
- (d->type == other.d->type &&
- d->device == other.d->device &&
- d->mimeType == other.d->mimeType &&
- d->codecs == other.d->codecs &&
- d->features == other.d->features);
-}
-
-/*!
- Identifies if \a other is not of equal value to a media service provider hint.
-
- Returns true if the hints are not equal, and false if they are.
-*/
-bool QMediaServiceProviderHint::operator != (const QMediaServiceProviderHint &other) const
-{
- return !(*this == other);
-}
-
-/*!
- Returns true if a media service provider is null.
-*/
-bool QMediaServiceProviderHint::isNull() const
-{
- return d->type == Null;
-}
-
-/*!
- Returns the type of a media service provider hint.
-*/
-QMediaServiceProviderHint::Type QMediaServiceProviderHint::type() const
-{
- return d->type;
-}
-
-/*!
- Returns the mime type of the media a service is expected to be able play.
-*/
-QString QMediaServiceProviderHint::mimeType() const
-{
- return d->mimeType;
-}
-
-/*!
- Returns a list of codes a media service is expected to be able to decode.
-*/
-QStringList QMediaServiceProviderHint::codecs() const
-{
- return d->codecs;
-}
-
-/*!
- Returns the name of a device a media service is expected to utilize.
-*/
-QByteArray QMediaServiceProviderHint::device() const
-{
- return d->device;
-}
-
-/*!
- Returns a set of features a media service is expected to provide.
-*/
-QMediaServiceProviderHint::Features QMediaServiceProviderHint::features() const
-{
- return d->features;
-}
-
-
-Q_GLOBAL_STATIC_WITH_ARGS(QMediaPluginLoader, loader,
- (QMediaServiceProviderFactoryInterface_iid, QLatin1String("/mediaservices"), Qt::CaseInsensitive))
-
-
-class QPluginServiceProvider : public QMediaServiceProvider
-{
- QMap<QMediaService*, QMediaServiceProviderPlugin*> pluginMap;
-
-public:
- QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &hint)
- {
- QString key(QString::fromLatin1(type.constData(),type.length()));
-
- QList<QMediaServiceProviderPlugin *>plugins;
- foreach (QObject *obj, loader()->instances(key)) {
- QMediaServiceProviderPlugin *plugin =
- qobject_cast<QMediaServiceProviderPlugin*>(obj);
- if (plugin)
- plugins << plugin;
- }
-
- if (!plugins.isEmpty()) {
- QMediaServiceProviderPlugin *plugin = 0;
-
- switch (hint.type()) {
- case QMediaServiceProviderHint::Null:
- plugin = plugins[0];
- //special case for media player, if low latency was not asked,
- //prefer services not offering it, since they are likely to support
- //more formats
- if (type == QByteArray(Q_MEDIASERVICE_MEDIAPLAYER)) {
- foreach (QMediaServiceProviderPlugin *currentPlugin, plugins) {
- QMediaServiceFeaturesInterface *iface =
- qobject_cast<QMediaServiceFeaturesInterface*>(currentPlugin);
-
- if (!iface || !(iface->supportedFeatures(type) &
- QMediaServiceProviderHint::LowLatencyPlayback)) {
- plugin = currentPlugin;
- break;
- }
-
- }
- }
- break;
- case QMediaServiceProviderHint::SupportedFeatures:
- plugin = plugins[0];
- foreach (QMediaServiceProviderPlugin *currentPlugin, plugins) {
- QMediaServiceFeaturesInterface *iface =
- qobject_cast<QMediaServiceFeaturesInterface*>(currentPlugin);
-
- if (iface) {
- if ((iface->supportedFeatures(type) & hint.features()) == hint.features()) {
- plugin = currentPlugin;
- break;
- }
- }
- }
- break;
- case QMediaServiceProviderHint::Device: {
- foreach (QMediaServiceProviderPlugin *currentPlugin, plugins) {
- QMediaServiceSupportedDevicesInterface *iface =
- qobject_cast<QMediaServiceSupportedDevicesInterface*>(currentPlugin);
-
- if (!iface) {
- // the plugin may support the device,
- // but this choice still can be overridden
- plugin = currentPlugin;
- } else {
- if (iface->devices(type).contains(hint.device())) {
- plugin = currentPlugin;
- break;
- }
- }
- }
- }
- break;
- case QMediaServiceProviderHint::ContentType: {
- QtMediaServices::SupportEstimate estimate = QtMediaServices::NotSupported;
- foreach (QMediaServiceProviderPlugin *currentPlugin, plugins) {
- QtMediaServices::SupportEstimate currentEstimate = QtMediaServices::MaybeSupported;
- QMediaServiceSupportedFormatsInterface *iface =
- qobject_cast<QMediaServiceSupportedFormatsInterface*>(currentPlugin);
-
- if (iface)
- currentEstimate = iface->hasSupport(hint.mimeType(), hint.codecs());
-
- if (currentEstimate > estimate) {
- estimate = currentEstimate;
- plugin = currentPlugin;
-
- if (currentEstimate == QtMediaServices::PreferredService)
- break;
- }
- }
- }
- break;
- }
-
- if (plugin != 0) {
- QMediaService *service = plugin->create(key);
- if (service != 0)
- pluginMap.insert(service, plugin);
-
- return service;
- }
- }
-
- qWarning() << "defaultServiceProvider::requestService(): no service found for -" << key;
- return 0;
- }
-
- void releaseService(QMediaService *service)
- {
- if (service != 0) {
- QMediaServiceProviderPlugin *plugin = pluginMap.take(service);
-
- if (plugin != 0)
- plugin->release(service);
- }
- }
-
- QtMediaServices::SupportEstimate hasSupport(const QByteArray &serviceType,
- const QString &mimeType,
- const QStringList& codecs,
- int flags) const
- {
- QList<QObject*> instances = loader()->instances(
- QString::fromLatin1(serviceType.constData(),serviceType.length()));
-
- if (instances.isEmpty())
- return QtMediaServices::NotSupported;
-
- bool allServicesProvideInterface = true;
- QtMediaServices::SupportEstimate supportEstimate = QtMediaServices::NotSupported;
-
- foreach(QObject *obj, instances) {
- QMediaServiceSupportedFormatsInterface *iface =
- qobject_cast<QMediaServiceSupportedFormatsInterface*>(obj);
-
-
- if (flags) {
- QMediaServiceFeaturesInterface *iface =
- qobject_cast<QMediaServiceFeaturesInterface*>(obj);
-
- if (iface) {
- QMediaServiceProviderHint::Features features = iface->supportedFeatures(serviceType);
-
- //if low latency playback was asked, skip services known
- //not to provide low latency playback
- if ((flags & QMediaPlayer::LowLatency) &&
- !(features & QMediaServiceProviderHint::LowLatencyPlayback))
- continue;
-
- //the same for QIODevice based streams support
- if ((flags & QMediaPlayer::StreamPlayback) &&
- !(features & QMediaServiceProviderHint::StreamPlayback))
- continue;
- }
- }
-
- if (iface)
- supportEstimate = qMax(supportEstimate, iface->hasSupport(mimeType, codecs));
- else
- allServicesProvideInterface = false;
- }
-
- //don't return PreferredService
- supportEstimate = qMin(supportEstimate, QtMediaServices::ProbablySupported);
-
- //Return NotSupported only if no services are available of serviceType
- //or all the services returned NotSupported, otherwise return at least MaybeSupported
- if (!allServicesProvideInterface)
- supportEstimate = qMax(QtMediaServices::MaybeSupported, supportEstimate);
-
- return supportEstimate;
- }
-
- QStringList supportedMimeTypes(const QByteArray &serviceType, int flags) const
- {
- QList<QObject*> instances = loader()->instances(
- QString::fromLatin1(serviceType.constData(),serviceType.length()));
-
- QStringList supportedTypes;
-
- foreach(QObject *obj, instances) {
- QMediaServiceSupportedFormatsInterface *iface =
- qobject_cast<QMediaServiceSupportedFormatsInterface*>(obj);
-
-
- if (flags & QMediaPlayer::LowLatency) {
- QMediaServiceFeaturesInterface *iface =
- qobject_cast<QMediaServiceFeaturesInterface*>(obj);
-
- if (iface) {
- QMediaServiceProviderHint::Features features = iface->supportedFeatures(serviceType);
-
- // If low latency playback was asked for, skip MIME types from services known
- // not to provide low latency playback
- if ((flags & QMediaPlayer::LowLatency) &&
- !(features & QMediaServiceProviderHint::LowLatencyPlayback))
- continue;
-
- //the same for QIODevice based streams support
- if ((flags & QMediaPlayer::StreamPlayback) &&
- !(features & QMediaServiceProviderHint::StreamPlayback))
- continue;
- }
- }
-
- if (iface) {
- supportedTypes << iface->supportedMimeTypes();
- }
- }
-
- // Multiple services may support the same MIME type
- supportedTypes.removeDuplicates();
-
- return supportedTypes;
- }
-
- QList<QByteArray> devices(const QByteArray &serviceType) const
- {
- QList<QByteArray> res;
-
- foreach(QObject *obj, loader()->instances(
- QString::fromLatin1(serviceType.constData(),serviceType.length()))) {
- QMediaServiceSupportedDevicesInterface *iface =
- qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj);
-
- if (iface) {
- res.append(iface->devices(serviceType));
- }
- }
-
- return res;
- }
-
- QString deviceDescription(const QByteArray &serviceType, const QByteArray &device)
- {
- foreach(QObject *obj, loader()->instances(
- QString::fromLatin1(serviceType.constData(),serviceType.length()))) {
- QMediaServiceSupportedDevicesInterface *iface =
- qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj);
-
- if (iface) {
- if (iface->devices(serviceType).contains(device))
- return iface->deviceDescription(serviceType, device);
- }
- }
-
- return QString();
- }
-};
-
-Q_GLOBAL_STATIC(QPluginServiceProvider, pluginProvider);
-
-/*!
- \class QMediaServiceProvider
- \preliminary
- \since 4.7
- \brief The QMediaServiceProvider class provides an abstract allocator for media services.
-*/
-
-/*!
- \fn QMediaServiceProvider::requestService(const QByteArray &type, const QMediaServiceProviderHint &hint)
-
- Requests an instance of a \a type service which best matches the given \a hint.
-
- Returns a pointer to the requested service, or a null pointer if there is no suitable service.
-
- The returned service must be released with releaseService when it is finished with.
-*/
-
-/*!
- \fn QMediaServiceProvider::releaseService(QMediaService *service)
-
- Releases a media \a service requested with requestService().
-*/
-
-/*!
- \fn QtMediaServices::SupportEstimate QMediaServiceProvider::hasSupport(const QByteArray &serviceType, const QString &mimeType, const QStringList& codecs, int flags) const
-
- Returns how confident a media service provider is that is can provide a \a serviceType
- service that is able to play media of a specific \a mimeType that is encoded using the listed
- \a codecs while adhearing to constraints identified in \a flags.
-*/
-QtMediaServices::SupportEstimate QMediaServiceProvider::hasSupport(const QByteArray &serviceType,
- const QString &mimeType,
- const QStringList& codecs,
- int flags) const
-{
- Q_UNUSED(serviceType);
- Q_UNUSED(mimeType);
- Q_UNUSED(codecs);
- Q_UNUSED(flags);
-
- return QtMediaServices::MaybeSupported;
-}
-
-/*!
- \fn QStringList QMediaServiceProvider::supportedMimeTypes(const QByteArray &serviceType, int flags) const
-
- Returns a list of MIME types supported by the service provider for the specified \a serviceType.
-
- The resultant list is restricted to MIME types which can be supported given the constraints in \a flags.
-*/
-QStringList QMediaServiceProvider::supportedMimeTypes(const QByteArray &serviceType, int flags) const
-{
- Q_UNUSED(serviceType);
- Q_UNUSED(flags);
-
- return QStringList();
-}
-
-/*!
- Returns the list of devices related to \a service type.
-*/
-QList<QByteArray> QMediaServiceProvider::devices(const QByteArray &service) const
-{
- Q_UNUSED(service);
- return QList<QByteArray>();
-}
-
-/*!
- Returns the description of \a device related to \a serviceType,
- suitable to be displayed to user.
-*/
-QString QMediaServiceProvider::deviceDescription(const QByteArray &serviceType, const QByteArray &device)
-{
- Q_UNUSED(serviceType);
- Q_UNUSED(device);
- return QString();
-}
-
-
-#ifdef QT_BUILD_INTERNAL
-
-static QMediaServiceProvider *qt_defaultMediaServiceProvider = 0;
-
-/*!
- Sets a media service \a provider as the default.
-
- \internal
-*/
-void QMediaServiceProvider::setDefaultServiceProvider(QMediaServiceProvider *provider)
-{
- qt_defaultMediaServiceProvider = provider;
-}
-
-#endif
-
-/*!
- Returns a default provider of media services.
-*/
-QMediaServiceProvider *QMediaServiceProvider::defaultServiceProvider()
-{
-#ifdef QT_BUILD_INTERNAL
- return qt_defaultMediaServiceProvider != 0
- ? qt_defaultMediaServiceProvider
- : static_cast<QMediaServiceProvider *>(pluginProvider());
-#else
- return pluginProvider();
-#endif
-}
-
-/*!
- \class QMediaServiceProviderPlugin
- \preliminary
- \since 4.7
- \brief The QMediaServiceProviderPlugin class interface provides an interface for QMediaService
- plug-ins.
-
- A media service provider plug-in may implement one or more of
- QMediaServiceSupportedFormatsInterface, QMediaServiceSupportedDevicesInterface,
- and QMediaServiceFeaturesInterface to identify the features it supports.
-*/
-
-/*!
- \fn QMediaServiceProviderPlugin::keys() const
-
- Returns a list of keys for media services a plug-in can create.
-*/
-
-/*!
- \fn QMediaServiceProviderPlugin::create(const QString &key)
-
- Constructs a new instance of the QMediaService identified by \a key.
-
- The QMediaService returned must be destroyed with release().
-*/
-
-/*!
- \fn QMediaServiceProviderPlugin::release(QMediaService *service)
-
- Destroys a media \a service constructed with create().
-*/
-
-
-/*!
- \class QMediaServiceSupportedFormatsInterface
- \brief The QMediaServiceSupportedFormatsInterface class interface
- identifies if a media service plug-in supports a media format.
- \since 4.7
-
- A QMediaServiceProviderPlugin may implement this interface.
-*/
-
-/*!
- \fn QMediaServiceSupportedFormatsInterface::~QMediaServiceSupportedFormatsInterface()
-
- Destroys a media service supported formats interface.
-*/
-
-/*!
- \fn QMediaServiceSupportedFormatsInterface::hasSupport(const QString &mimeType, const QStringList& codecs) const
-
- Returns the level of support a media service plug-in has for a \a mimeType and set of \a codecs.
-*/
-
-/*!
- \fn QMediaServiceSupportedFormatsInterface::supportedMimeTypes() const
-
- Returns a list of MIME types supported by the media service plug-in.
-*/
-
-/*!
- \class QMediaServiceSupportedDevicesInterface
- \brief The QMediaServiceSupportedDevicesInterface class interface
- identifies the devices supported by a media service plug-in.
- \since 4.7
-
- A QMediaServiceProviderPlugin may implement this interface.
-*/
-
-/*!
- \fn QMediaServiceSupportedDevicesInterface::~QMediaServiceSupportedDevicesInterface()
-
- Destroys a media service supported devices interface.
-*/
-
-/*!
- \fn QMediaServiceSupportedDevicesInterface::devices(const QByteArray &service) const
-
- Returns a list of devices supported by a plug-in \a service.
-*/
-
-/*!
- \fn QMediaServiceSupportedDevicesInterface::deviceDescription(const QByteArray &service, const QByteArray &device)
-
- Returns a description of a \a device supported by a plug-in \a service.
-*/
-
-/*!
- \class QMediaServiceFeaturesInterface
- \brief The QMediaServiceFeaturesInterface class interface identifies
- features supported by a media service plug-in.
- \since 4.7
-
- A QMediaServiceProviderPlugin may implement this interface.
-*/
-
-/*!
- \fn QMediaServiceFeaturesInterface::~QMediaServiceFeaturesInterface()
-
- Destroys a media service features interface.
-*/
-/*!
- \fn QMediaServiceFeaturesInterface::supportedFeatures(const QByteArray &service) const
-
- Returns a set of features supported by a plug-in \a service.
-*/
-
-QT_END_NAMESPACE
-
-#include "moc_qmediaserviceprovider.cpp"
-#include "moc_qmediaserviceproviderplugin.cpp"
diff --git a/src/multimedia/mediaservices/base/qmediaserviceprovider.h b/src/multimedia/mediaservices/base/qmediaserviceprovider.h
deleted file mode 100644
index eeea5d2..0000000
--- a/src/multimedia/mediaservices/base/qmediaserviceprovider.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIASERVICEPROVIDER_H
-#define QMEDIASERVICEPROVIDER_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qshareddata.h>
-
-#include <QtMediaServices/qtmedianamespace.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-
-class QMediaService;
-
-class QMediaServiceProviderHintPrivate;
-class Q_MEDIASERVICES_EXPORT QMediaServiceProviderHint
-{
-public:
- enum Type { Null, ContentType, Device, SupportedFeatures };
-
- enum Feature {
- LowLatencyPlayback = 0x01,
- RecordingSupport = 0x02,
- StreamPlayback = 0x04
- };
- Q_DECLARE_FLAGS(Features, Feature)
-
- QMediaServiceProviderHint();
- QMediaServiceProviderHint(const QString &mimeType, const QStringList& codecs);
- QMediaServiceProviderHint(const QByteArray &device);
- QMediaServiceProviderHint(Features features);
- QMediaServiceProviderHint(const QMediaServiceProviderHint &other);
- ~QMediaServiceProviderHint();
-
- QMediaServiceProviderHint& operator=(const QMediaServiceProviderHint &other);
-
- bool operator == (const QMediaServiceProviderHint &other) const;
- bool operator != (const QMediaServiceProviderHint &other) const;
-
- bool isNull() const;
-
- Type type() const;
-
- QString mimeType() const;
- QStringList codecs() const;
-
- QByteArray device() const;
-
- Features features() const;
-
- //to be extended, if necessary
-
-private:
- QSharedDataPointer<QMediaServiceProviderHintPrivate> d;
-};
-
-class Q_MEDIASERVICES_EXPORT QMediaServiceProvider : public QObject
-{
- Q_OBJECT
-
-public:
- virtual QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &hint = QMediaServiceProviderHint()) = 0;
- virtual void releaseService(QMediaService *service) = 0;
-
- virtual QtMediaServices::SupportEstimate hasSupport(const QByteArray &serviceType,
- const QString &mimeType,
- const QStringList& codecs,
- int flags = 0) const;
- virtual QStringList supportedMimeTypes(const QByteArray &serviceType, int flags = 0) const;
-
- virtual QList<QByteArray> devices(const QByteArray &serviceType) const;
- virtual QString deviceDescription(const QByteArray &serviceType, const QByteArray &device);
-
- static QMediaServiceProvider* defaultServiceProvider();
-
-#ifdef QT_BUILD_INTERNAL
- static void setDefaultServiceProvider(QMediaServiceProvider *provider);
-#endif
-};
-
-/*!
- Service with support for media playback
- Required Controls: QMediaPlayerControl
- Optional Controls: QMediaPlaylistControl, QAudioDeviceControl
- Video Output Controls (used by QWideoWidget and QGraphicsVideoItem):
- Required: QVideoOutputControl
- Optional: QVideoWindowControl, QVideoRendererControl, QVideoWidgetControl
-*/
-#define Q_MEDIASERVICE_MEDIAPLAYER "com.nokia.qt.mediaplayer"
-
-/*!
- Service with support for recording from audio sources
- Required Controls: QAudioDeviceControl
- Recording Controls (QMediaRecorder):
- Required: QMediaRecorderControl
- Recommended: QAudioEncoderControl
- Optional: QMediaContainerControl
-*/
-#define Q_MEDIASERVICE_AUDIOSOURCE "com.nokia.qt.audiosource"
-
-/*!
- Service with support for camera use.
- Required Controls: QCameraControl
- Optional Controls: QCameraExposureControl, QCameraFocusControl, QImageProcessingControl
- Still Capture Controls: QImageCaptureControl
- Recording Controls (QMediaRecorder):
- Required: QMediaRecorderControl
- Recommended: QAudioEncoderControl, QVideoEncoderControl, QMediaContainerControl
- Viewfinder Video Output Controls (used by QWideoWidget and QGraphicsVideoItem):
- Required: QVideoOutputControl
- Optional: QVideoWindowControl, QVideoRendererControl, QVideoWidgetControl
-*/
-#define Q_MEDIASERVICE_CAMERA "com.nokia.qt.camera"
-
-/*!
- Service with support for radio tuning.
- Required Controls: QRadioTunerControl
- Recording Controls (Optional, used by QMediaRecorder):
- Required: QMediaRecorderControl
- Recommended: QAudioEncoderControl
- Optional: QMediaContainerControl
-*/
-#define Q_MEDIASERVICE_RADIO "com.nokia.qt.radio"
-
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QMEDIASERVICEPROVIDER_H
diff --git a/src/multimedia/mediaservices/base/qmediaserviceproviderplugin.h b/src/multimedia/mediaservices/base/qmediaserviceproviderplugin.h
deleted file mode 100644
index ca25f91..0000000
--- a/src/multimedia/mediaservices/base/qmediaserviceproviderplugin.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIASERVICEPROVIDERPLUGIN_H
-#define QMEDIASERVICEPROVIDERPLUGIN_H
-
-#include <QtCore/qstringlist.h>
-#include <QtCore/qplugin.h>
-#include <QtCore/qfactoryinterface.h>
-
-#include <QtMediaServices/qmediaserviceprovider.h>
-
-#ifdef Q_MOC_RUN
-# pragma Q_MOC_EXPAND_MACROS
-#endif
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-class QMediaService;
-
-
-struct Q_MEDIASERVICES_EXPORT QMediaServiceProviderFactoryInterface : public QFactoryInterface
-{
- virtual QStringList keys() const = 0;
- virtual QMediaService* create(QString const& key) = 0;
- virtual void release(QMediaService *service) = 0;
-};
-
-#define QMediaServiceProviderFactoryInterface_iid \
- "com.nokia.Qt.QMediaServiceProviderFactoryInterface/1.0"
-Q_DECLARE_INTERFACE(QMediaServiceProviderFactoryInterface, QMediaServiceProviderFactoryInterface_iid)
-
-
-struct Q_MEDIASERVICES_EXPORT QMediaServiceSupportedFormatsInterface
-{
- virtual ~QMediaServiceSupportedFormatsInterface() {}
- virtual QtMediaServices::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const = 0;
- virtual QStringList supportedMimeTypes() const = 0;
-};
-
-#define QMediaServiceSupportedFormatsInterface_iid \
- "com.nokia.Qt.QMediaServiceSupportedFormatsInterface/1.0"
-Q_DECLARE_INTERFACE(QMediaServiceSupportedFormatsInterface, QMediaServiceSupportedFormatsInterface_iid)
-
-
-struct Q_MEDIASERVICES_EXPORT QMediaServiceSupportedDevicesInterface
-{
- virtual ~QMediaServiceSupportedDevicesInterface() {}
- virtual QList<QByteArray> devices(const QByteArray &service) const = 0;
- virtual QString deviceDescription(const QByteArray &service, const QByteArray &device) = 0;
-};
-
-#define QMediaServiceSupportedDevicesInterface_iid \
- "com.nokia.Qt.QMediaServiceSupportedDevicesInterface/1.0"
-Q_DECLARE_INTERFACE(QMediaServiceSupportedDevicesInterface, QMediaServiceSupportedDevicesInterface_iid)
-
-
-struct Q_MEDIASERVICES_EXPORT QMediaServiceFeaturesInterface
-{
- virtual ~QMediaServiceFeaturesInterface() {}
- virtual QMediaServiceProviderHint::Features supportedFeatures(const QByteArray &service) const = 0;
-};
-
-#define QMediaServiceFeaturesInterface_iid \
- "com.nokia.Qt.QMediaServiceFeaturesInterface/1.0"
-Q_DECLARE_INTERFACE(QMediaServiceFeaturesInterface, QMediaServiceFeaturesInterface_iid)
-
-class Q_MEDIASERVICES_EXPORT QMediaServiceProviderPlugin : public QObject, public QMediaServiceProviderFactoryInterface
-{
- Q_OBJECT
- Q_INTERFACES(QMediaServiceProviderFactoryInterface:QFactoryInterface)
-
-public:
- virtual QStringList keys() const = 0;
- virtual QMediaService* create(const QString& key) = 0;
- virtual void release(QMediaService *service) = 0;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QMEDIASERVICEPROVIDERPLUGIN_H
diff --git a/src/multimedia/mediaservices/base/qmediatimerange.cpp b/src/multimedia/mediaservices/base/qmediatimerange.cpp
deleted file mode 100644
index 2dba20c..0000000
--- a/src/multimedia/mediaservices/base/qmediatimerange.cpp
+++ /dev/null
@@ -1,708 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMediaServices 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 <QtMediaServices/qmediatimerange.h>
-
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QMediaTimeInterval
- \brief The QMediaTimeInterval class represents a time interval with integer precision.
- \ingroup multimedia
- \since 4.7
-
- An interval is specified by an inclusive start() and end() time.
- These must be set in the constructor, as this is an immutable class.
- The specific units of time represented by the class have not been defined -
- it is suitable for any times which can be represented by a signed 64 bit integer.
-
- The isNormal() method determines if a time interval is normal
- (a normal time interval has start() <= end()). An abnormal interval can be converted
- in to a normal interval by calling the normalized() method.
-
- The contains() method determines if a specified time lies within
- the time interval.
-
- The translated() method returns a time interval which has been translated
- forwards or backwards through time by a specified offset.
-
- \sa QMediaTimeRange
-*/
-
-/*!
- \fn QMediaTimeInterval::QMediaTimeInterval()
-
- Constructs an empty interval.
-*/
-QMediaTimeInterval::QMediaTimeInterval()
- : s(0)
- , e(0)
-{
-
-}
-
-/*!
- \fn QMediaTimeInterval::QMediaTimeInterval(qint64 start, qint64 end)
-
- Constructs an interval with the specified \a start and \a end times.
-*/
-QMediaTimeInterval::QMediaTimeInterval(qint64 start, qint64 end)
- : s(start)
- , e(end)
-{
-
-}
-
-/*!
- \fn QMediaTimeInterval::QMediaTimeInterval(const QMediaTimeInterval &other)
-
- Constructs an interval by taking a copy of \a other.
-*/
-QMediaTimeInterval::QMediaTimeInterval(const QMediaTimeInterval &other)
- : s(other.s)
- , e(other.e)
-{
-
-}
-
-/*!
- \fn QMediaTimeInterval::start() const
-
- Returns the start time of the interval.
-
- \sa end()
-*/
-qint64 QMediaTimeInterval::start() const
-{
- return s;
-}
-
-/*!
- \fn QMediaTimeInterval::end() const
-
- Returns the end time of the interval.
-
- \sa start()
-*/
-qint64 QMediaTimeInterval::end() const
-{
- return e;
-}
-
-/*!
- \fn QMediaTimeInterval::contains(qint64 time) const
-
- Returns true if the time interval contains the specified \a time.
- That is, start() <= time <= end().
-*/
-bool QMediaTimeInterval::contains(qint64 time) const
-{
- return isNormal() ? (s <= time && time <= e)
- : (e <= time && time <= s);
-}
-
-/*!
- \fn QMediaTimeInterval::isNormal() const
-
- Returns true if this time interval is normal.
- A normal time interval has start() <= end().
-
- \sa normalized()
-*/
-bool QMediaTimeInterval::isNormal() const
-{
- return s <= e;
-}
-
-/*!
- \fn QMediaTimeInterval::normalized() const
-
- Returns a normalized version of this interval.
-
- If the start() time of the interval is greater than the end() time,
- then the returned interval has the start and end times swapped.
-*/
-QMediaTimeInterval QMediaTimeInterval::normalized() const
-{
- if(s > e)
- return QMediaTimeInterval(e, s);
-
- return *this;
-}
-
-/*!
- \fn QMediaTimeInterval::translated(qint64 offset) const
-
- Returns a copy of this time interval, translated by a value of \a offset.
- An interval can be moved forward through time with a positive offset, or backward
- through time with a negative offset.
-*/
-QMediaTimeInterval QMediaTimeInterval::translated(qint64 offset) const
-{
- return QMediaTimeInterval(s + offset, e + offset);
-}
-
-/*!
- \fn operator==(const QMediaTimeInterval &a, const QMediaTimeInterval &b)
- \relates QMediaTimeRange
-
- Returns true if \a a is exactly equal to \a b.
-*/
-bool operator==(const QMediaTimeInterval &a, const QMediaTimeInterval &b)
-{
- return a.start() == b.start() && a.end() == b.end();
-}
-
-/*!
- \fn operator!=(const QMediaTimeInterval &a, const QMediaTimeInterval &b)
- \relates QMediaTimeRange
-
- Returns true if \a a is not exactly equal to \a b.
-*/
-bool operator!=(const QMediaTimeInterval &a, const QMediaTimeInterval &b)
-{
- return a.start() != b.start() || a.end() != b.end();
-}
-
-class QMediaTimeRangePrivate : public QSharedData
-{
-public:
-
- QMediaTimeRangePrivate();
- QMediaTimeRangePrivate(const QMediaTimeRangePrivate &other);
- QMediaTimeRangePrivate(const QMediaTimeInterval &interval);
-
- QList<QMediaTimeInterval> intervals;
-
- void addInterval(const QMediaTimeInterval &interval);
- void removeInterval(const QMediaTimeInterval &interval);
-};
-
-QMediaTimeRangePrivate::QMediaTimeRangePrivate()
- : QSharedData()
-{
-
-}
-
-QMediaTimeRangePrivate::QMediaTimeRangePrivate(const QMediaTimeRangePrivate &other)
- : QSharedData()
- , intervals(other.intervals)
-{
-
-}
-
-QMediaTimeRangePrivate::QMediaTimeRangePrivate(const QMediaTimeInterval &interval)
- : QSharedData()
-{
- if(interval.isNormal())
- intervals << interval;
-}
-
-void QMediaTimeRangePrivate::addInterval(const QMediaTimeInterval &interval)
-{
- // Handle normalized intervals only
- if(!interval.isNormal())
- return;
-
- // Find a place to insert the interval
- int i;
- for (i = 0; i < intervals.count(); i++) {
- // Insert before this element
- if(interval.s < intervals[i].s) {
- intervals.insert(i, interval);
- break;
- }
- }
-
- // Interval needs to be added to the end of the list
- if (i == intervals.count())
- intervals.append(interval);
-
- // Do we need to correct the element before us?
- if(i > 0 && intervals[i - 1].e >= interval.s - 1)
- i--;
-
- // Merge trailing ranges
- while (i < intervals.count() - 1
- && intervals[i].e >= intervals[i + 1].s - 1) {
- intervals[i].e = qMax(intervals[i].e, intervals[i + 1].e);
- intervals.removeAt(i + 1);
- }
-}
-
-void QMediaTimeRangePrivate::removeInterval(const QMediaTimeInterval &interval)
-{
- // Handle normalized intervals only
- if(!interval.isNormal())
- return;
-
- for (int i = 0; i < intervals.count(); i++) {
- QMediaTimeInterval r = intervals[i];
-
- if (r.e < interval.s) {
- // Before the removal interval
- continue;
- } else if (interval.e < r.s) {
- // After the removal interval - stop here
- break;
- } else if (r.s < interval.s && interval.e < r.e) {
- // Split case - a single range has a chunk removed
- intervals[i].e = interval.s -1;
- addInterval(QMediaTimeInterval(interval.e + 1, r.e));
- break;
- } else if (r.s < interval.s) {
- // Trimming Tail Case
- intervals[i].e = interval.s - 1;
- } else if (interval.e < r.e) {
- // Trimming Head Case - we can stop after this
- intervals[i].s = interval.e + 1;
- break;
- } else {
- // Complete coverage case
- intervals.removeAt(i);
- --i;
- }
- }
-}
-
-/*!
- \class QMediaTimeRange
- \brief The QMediaTimeRange class represents a set of zero or more disjoint
- time intervals.
- \ingroup multimedia
- \since 4.7
-
- \reentrant
-
- The earliestTime(), latestTime(), intervals() and isEmpty()
- methods are used to get information about the current time range.
-
- The addInterval(), removeInterval() and clear() methods are used to modify
- the current time range.
-
- When adding or removing intervals from the time range, existing intervals
- within the range may be expanded, trimmed, deleted, merged or split to ensure
- that all intervals within the time range remain distinct and disjoint. As a
- consequence, all intervals added or removed from a time range must be
- \l{QMediaTimeInterval::isNormal()}{normal}.
-
- \sa QMediaTimeInterval
-*/
-
-/*!
- \fn QMediaTimeRange::QMediaTimeRange()
-
- Constructs an empty time range.
-*/
-QMediaTimeRange::QMediaTimeRange()
- : d(new QMediaTimeRangePrivate)
-{
-
-}
-
-/*!
- \fn QMediaTimeRange::QMediaTimeRange(qint64 start, qint64 end)
-
- Constructs a time range that contains an initial interval from
- \a start to \a end inclusive.
-
- If the interval is not \l{QMediaTimeInterval::isNormal()}{normal},
- the resulting time range will be empty.
-
- \sa addInterval()
-*/
-QMediaTimeRange::QMediaTimeRange(qint64 start, qint64 end)
- : d(new QMediaTimeRangePrivate(QMediaTimeInterval(start, end)))
-{
-
-}
-
-/*!
- \fn QMediaTimeRange::QMediaTimeRange(const QMediaTimeInterval &interval)
-
- Constructs a time range that contains an intitial interval, \a interval.
-
- If \a interval is not \l{QMediaTimeInterval::isNormal()}{normal},
- the resulting time range will be empty.
-
- \sa addInterval()
-*/
-QMediaTimeRange::QMediaTimeRange(const QMediaTimeInterval &interval)
- : d(new QMediaTimeRangePrivate(interval))
-{
-
-}
-
-/*!
- \fn QMediaTimeRange::QMediaTimeRange(const QMediaTimeRange &range)
-
- Constructs a time range by copying another time \a range.
-*/
-QMediaTimeRange::QMediaTimeRange(const QMediaTimeRange &range)
- : d(range.d)
-{
-
-}
-
-/*!
- \fn QMediaTimeRange::~QMediaTimeRange()
-
- Destructor.
-*/
-QMediaTimeRange::~QMediaTimeRange()
-{
-
-}
-
-/*!
- \fn QMediaTimeRange::operator=(const QMediaTimeRange &other)
-
- Takes a copy of the \a other time range and returns itself.
-*/
-QMediaTimeRange &QMediaTimeRange::operator=(const QMediaTimeRange &other)
-{
- d = other.d;
- return *this;
-}
-
-/*!
- \fn QMediaTimeRange::operator=(const QMediaTimeInterval &interval)
-
- Sets the time range to a single continuous interval, \a interval.
-*/
-QMediaTimeRange &QMediaTimeRange::operator=(const QMediaTimeInterval &interval)
-{
- d = new QMediaTimeRangePrivate(interval);
- return *this;
-}
-
-/*!
- \fn QMediaTimeRange::earliestTime() const
-
- Returns the earliest time within the time range.
-
- For empty time ranges, this value is equal to zero.
-
- \sa latestTime()
-*/
-qint64 QMediaTimeRange::earliestTime() const
-{
- if (!d->intervals.isEmpty())
- return d->intervals[0].s;
-
- return 0;
-}
-
-/*!
- \fn QMediaTimeRange::latestTime() const
-
- Returns the latest time within the time range.
-
- For empty time ranges, this value is equal to zero.
-
- \sa earliestTime()
-*/
-qint64 QMediaTimeRange::latestTime() const
-{
- if (!d->intervals.isEmpty())
- return d->intervals[d->intervals.count() - 1].e;
-
- return 0;
-}
-
-/*!
- \fn QMediaTimeRange::addInterval(qint64 start, qint64 end)
- \overload
-
- Adds the interval specified by \a start and \a end
- to the time range.
-
- \sa addInterval()
-*/
-void QMediaTimeRange::addInterval(qint64 start, qint64 end)
-{
- d->addInterval(QMediaTimeInterval(start, end));
-}
-
-/*!
- \fn QMediaTimeRange::addInterval(const QMediaTimeInterval &interval)
-
- Adds the specified \a interval to the time range.
-
- Adding intervals which are not \l{QMediaTimeInterval::isNormal()}{normal}
- is invalid, and will be ignored.
-
- If the specified interval is adjacent to, or overlaps existing
- intervals within the time range, these intervals will be merged.
-
- This operation takes \l{linear time}
-
- \sa removeInterval()
-*/
-void QMediaTimeRange::addInterval(const QMediaTimeInterval &interval)
-{
- d->addInterval(interval);
-}
-
-/*!
- \fn QMediaTimeRange::addTimeRange(const QMediaTimeRange &range)
-
- Adds each of the intervals in \a range to this time range.
-
- Equivalent to calling addInterval() for each interval in \a range.
-*/
-void QMediaTimeRange::addTimeRange(const QMediaTimeRange &range)
-{
- foreach(const QMediaTimeInterval &i, range.intervals()) {
- d->addInterval(i);
- }
-}
-
-/*!
- \fn QMediaTimeRange::removeInterval(qint64 start, qint64 end)
- \overload
-
- Removes the interval specified by \a start and \a end
- from the time range.
-
- \sa removeInterval()
-*/
-void QMediaTimeRange::removeInterval(qint64 start, qint64 end)
-{
- d->removeInterval(QMediaTimeInterval(start, end));
-}
-
-/*!
- \fn QMediaTimeRange::removeInterval(const QMediaTimeInterval &interval)
-
- Removes the specified \a interval from the time range.
-
- Removing intervals which are not \l{QMediaTimeInterval::isNormal()}{normal}
- is invalid, and will be ignored.
-
- Intervals within the time range will be trimmed, split or deleted
- such that no intervals within the time range include any part of the
- target interval.
-
- This operation takes \l{linear time}
-
- \sa addInterval()
-*/
-void QMediaTimeRange::removeInterval(const QMediaTimeInterval &interval)
-{
- d->removeInterval(interval);
-}
-
-/*!
- \fn QMediaTimeRange::removeTimeRange(const QMediaTimeRange &range)
-
- Removes each of the intervals in \a range from this time range.
-
- Equivalent to calling removeInterval() for each interval in \a range.
-*/
-void QMediaTimeRange::removeTimeRange(const QMediaTimeRange &range)
-{
- foreach(const QMediaTimeInterval &i, range.intervals()) {
- d->removeInterval(i);
- }
-}
-
-/*!
- \fn QMediaTimeRange::operator+=(const QMediaTimeRange &other)
-
- Adds each interval in \a other to the time range and returns the result.
-*/
-QMediaTimeRange& QMediaTimeRange::operator+=(const QMediaTimeRange &other)
-{
- addTimeRange(other);
- return *this;
-}
-
-/*!
- \fn QMediaTimeRange::operator+=(const QMediaTimeInterval &interval)
-
- Adds the specified \a interval to the time range and returns the result.
-*/
-QMediaTimeRange& QMediaTimeRange::operator+=(const QMediaTimeInterval &interval)
-{
- addInterval(interval);
- return *this;
-}
-
-/*!
- \fn QMediaTimeRange::operator-=(const QMediaTimeRange &other)
-
- Removes each interval in \a other from the time range and returns the result.
-*/
-QMediaTimeRange& QMediaTimeRange::operator-=(const QMediaTimeRange &other)
-{
- removeTimeRange(other);
- return *this;
-}
-
-/*!
- \fn QMediaTimeRange::operator-=(const QMediaTimeInterval &interval)
-
- Removes the specified \a interval from the time range and returns the result.
-*/
-QMediaTimeRange& QMediaTimeRange::operator-=(const QMediaTimeInterval &interval)
-{
- removeInterval(interval);
- return *this;
-}
-
-/*!
- \fn QMediaTimeRange::clear()
-
- Removes all intervals from the time range.
-
- \sa removeInterval()
-*/
-void QMediaTimeRange::clear()
-{
- d->intervals.clear();
-}
-
-/*!
- \fn QMediaTimeRange::intervals() const
-
- Returns the list of intervals covered by this time range.
-*/
-QList<QMediaTimeInterval> QMediaTimeRange::intervals() const
-{
- return d->intervals;
-}
-
-/*!
- \fn QMediaTimeRange::isEmpty() const
-
- Returns true if there are no intervals within the time range.
-
- \sa intervals()
-*/
-bool QMediaTimeRange::isEmpty() const
-{
- return d->intervals.isEmpty();
-}
-
-/*!
- \fn QMediaTimeRange::isContinuous() const
-
- Returns true if the time range consists of a continuous interval.
- That is, there is one or fewer disjoint intervals within the time range.
-*/
-bool QMediaTimeRange::isContinuous() const
-{
- return (d->intervals.count() <= 1);
-}
-
-/*!
- \fn QMediaTimeRange::contains(qint64 time) const
-
- Returns true if the specified \a time lies within the time range.
-*/
-bool QMediaTimeRange::contains(qint64 time) const
-{
- for (int i = 0; i < d->intervals.count(); i++) {
- if (d->intervals[i].contains(time))
- return true;
-
- if (time < d->intervals[i].s)
- break;
- }
-
- return false;
-}
-
-/*!
- \fn operator==(const QMediaTimeRange &a, const QMediaTimeRange &b)
- \relates QMediaTimeRange
-
- Returns true if all intervals in \a a are present in \a b.
-*/
-bool operator==(const QMediaTimeRange &a, const QMediaTimeRange &b)
-{
- if (a.intervals().count() != b.intervals().count())
- return false;
-
- for (int i = 0; i < a.intervals().count(); i++)
- {
- if(a.intervals()[i] != b.intervals()[i])
- return false;
- }
-
- return true;
-}
-
-/*!
- \fn operator!=(const QMediaTimeRange &a, const QMediaTimeRange &b)
- \relates QMediaTimeRange
-
- Returns true if one or more intervals in \a a are not present in \a b.
-*/
-bool operator!=(const QMediaTimeRange &a, const QMediaTimeRange &b)
-{
- return !(a == b);
-}
-
-/*!
- \fn operator+(const QMediaTimeRange &r1, const QMediaTimeRange &r2)
-
- Returns a time range containing the union between \a r1 and \a r2.
- */
-QMediaTimeRange operator+(const QMediaTimeRange &r1, const QMediaTimeRange &r2)
-{
- return (QMediaTimeRange(r1) += r2);
-}
-
-/*!
- \fn operator-(const QMediaTimeRange &r1, const QMediaTimeRange &r2)
-
- Returns a time range containing \a r2 subtracted from \a r1.
- */
-QMediaTimeRange operator-(const QMediaTimeRange &r1, const QMediaTimeRange &r2)
-{
- return (QMediaTimeRange(r1) -= r2);
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qmediatimerange.h b/src/multimedia/mediaservices/base/qmediatimerange.h
deleted file mode 100644
index 5983db2..0000000
--- a/src/multimedia/mediaservices/base/qmediatimerange.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMediaServices 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 QMEDIATIMERANGE_H
-#define QMEDIATIMERANGE_H
-
-#include <QtCore/qshareddata.h>
-#include <QtMediaServices/qtmedianamespace.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-class QMediaTimeRangePrivate;
-
-class Q_MEDIASERVICES_EXPORT QMediaTimeInterval
-{
-public:
- QMediaTimeInterval();
- QMediaTimeInterval(qint64 start, qint64 end);
- QMediaTimeInterval(const QMediaTimeInterval&);
-
- qint64 start() const;
- qint64 end() const;
-
- bool contains(qint64 time) const;
-
- bool isNormal() const;
- QMediaTimeInterval normalized() const;
- QMediaTimeInterval translated(qint64 offset) const;
-
-private:
- friend class QMediaTimeRangePrivate;
- friend class QMediaTimeRange;
-
- qint64 s;
- qint64 e;
-};
-
-Q_MEDIASERVICES_EXPORT bool operator==(const QMediaTimeInterval&, const QMediaTimeInterval&);
-Q_MEDIASERVICES_EXPORT bool operator!=(const QMediaTimeInterval&, const QMediaTimeInterval&);
-
-class Q_MEDIASERVICES_EXPORT QMediaTimeRange
-{
-public:
-
- QMediaTimeRange();
- QMediaTimeRange(qint64 start, qint64 end);
- QMediaTimeRange(const QMediaTimeInterval&);
- QMediaTimeRange(const QMediaTimeRange &range);
- ~QMediaTimeRange();
-
- QMediaTimeRange &operator=(const QMediaTimeRange&);
- QMediaTimeRange &operator=(const QMediaTimeInterval&);
-
- qint64 earliestTime() const;
- qint64 latestTime() const;
-
- QList<QMediaTimeInterval> intervals() const;
- bool isEmpty() const;
- bool isContinuous() const;
-
- bool contains(qint64 time) const;
-
- void addInterval(qint64 start, qint64 end);
- void addInterval(const QMediaTimeInterval &interval);
- void addTimeRange(const QMediaTimeRange&);
-
- void removeInterval(qint64 start, qint64 end);
- void removeInterval(const QMediaTimeInterval &interval);
- void removeTimeRange(const QMediaTimeRange&);
-
- QMediaTimeRange& operator+=(const QMediaTimeRange&);
- QMediaTimeRange& operator+=(const QMediaTimeInterval&);
- QMediaTimeRange& operator-=(const QMediaTimeRange&);
- QMediaTimeRange& operator-=(const QMediaTimeInterval&);
-
- void clear();
-
-private:
- QSharedDataPointer<QMediaTimeRangePrivate> d;
-};
-
-Q_MEDIASERVICES_EXPORT bool operator==(const QMediaTimeRange&, const QMediaTimeRange&);
-Q_MEDIASERVICES_EXPORT bool operator!=(const QMediaTimeRange&, const QMediaTimeRange&);
-Q_MEDIASERVICES_EXPORT QMediaTimeRange operator+(const QMediaTimeRange&, const QMediaTimeRange&);
-Q_MEDIASERVICES_EXPORT QMediaTimeRange operator-(const QMediaTimeRange&, const QMediaTimeRange&);
-
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QMEDIATIMERANGE_H
diff --git a/src/multimedia/mediaservices/base/qmetadatacontrol.cpp b/src/multimedia/mediaservices/base/qmetadatacontrol.cpp
deleted file mode 100644
index 8bfec7e..0000000
--- a/src/multimedia/mediaservices/base/qmetadatacontrol.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 <QtMediaServices/qmetadatacontrol.h>
-#include "qmediacontrol_p.h"
-
-
-QT_BEGIN_NAMESPACE
-
-
-/*!
- \class QMetaDataControl
- \ingroup multimedia-serv
- \since 4.7
- \preliminary
- \brief The QMetaDataControl class provides access to the meta-data of a
- QMediaService's media.
-
- If a QMediaService can provide read or write access to the meta-data of
- its current media it will implement QMetaDataControl. This control
- provides functions for both retrieving and setting meta-data values.
- Meta-data may be addressed by the well defined keys in the
- QtMediaServices::MetaData enumeration using the metaData() functions, or by
- string keys using the extendedMetaData() functions.
-
- The functionality provided by this control is exposed to application
- code by the meta-data members of QMediaObject, and so meta-data access
- is potentially available in any of the media object classes. Any media
- service may implement QMetaDataControl.
-
- The interface name of QMetaDataControl is \c com.nokia.Qt.QMetaDataControl/1.0 as
- defined in QMetaDataControl_iid.
-
- \sa QMediaService::control(), QMediaObject
-*/
-
-/*!
- \macro QMetaDataControl_iid
-
- \c com.nokia.Qt.QMetaDataControl/1.0
-
- Defines the interface name of the QMetaDataControl class.
-
- \relates QMetaDataControl
-*/
-
-/*!
- Construct a QMetaDataControl with \a parent. This class is meant as a base class
- for service specific meta data providers so this constructor is protected.
-*/
-
-QMetaDataControl::QMetaDataControl(QObject *parent):
- QMediaControl(*new QMediaControlPrivate, parent)
-{
-}
-
-/*!
- Destroy the meta-data object.
-*/
-
-QMetaDataControl::~QMetaDataControl()
-{
-}
-
-/*!
- \fn bool QMetaDataControl::isMetaDataAvailable() const
-
- Identifies if meta-data is available from a media service.
-
- Returns true if the meta-data is available and false otherwise.
-*/
-
-/*!
- \fn bool QMetaDataControl::isWritable() const
-
- Identifies if a media service's meta-data can be edited.
-
- Returns true if the meta-data is writable and false otherwise.
-*/
-
-/*!
- \fn QVariant QMetaDataControl::metaData(QtMediaServices::MetaData key) const
-
- Returns the meta-data for the given \a key.
-*/
-
-/*!
- \fn void QMetaDataControl::setMetaData(QtMediaServices::MetaData key, const QVariant &value)
-
- Sets the \a value of the meta-data element with the given \a key.
-*/
-
-/*!
- \fn QMetaDataControl::availableMetaData() const
-
- Returns a list of keys there is meta-data available for.
-*/
-
-/*!
- \fn QMetaDataControl::extendedMetaData(const QString &key) const
-
- Returns the metaData for an abitrary string \a key.
-
- The valid selection of keys for extended meta-data is determined by the provider and the meaning
- and type may differ between providers.
-*/
-
-/*!
- \fn QMetaDataControl::setExtendedMetaData(const QString &key, const QVariant &value)
-
- Change the value of the meta-data element with an abitrary string \a key to \a value.
-
- The valid selection of keys for extended meta-data is determined by the provider and the meaning
- and type may differ between providers.
-*/
-
-/*!
- \fn QMetaDataControl::availableExtendedMetaData() const
-
- Returns a list of keys there is extended meta-data available for.
-*/
-
-
-/*!
- \fn void QMetaDataControl::metaDataChanged()
-
- Signal the changes of meta-data.
-*/
-
-/*!
- \fn void QMetaDataControl::metaDataAvailableChanged(bool available)
-
- Signal the availability of meta-data has changed, \a available will
- be true if the multimedia object has meta-data.
-*/
-
-/*!
- \fn void QMetaDataControl::writableChanged(bool writable)
-
- Signal a change in the writable status of meta-data, \a writable will be
- true if meta-data elements can be added or adjusted.
-*/
-
-#include "moc_qmetadatacontrol.cpp"
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qmetadatacontrol.h b/src/multimedia/mediaservices/base/qmetadatacontrol.h
deleted file mode 100644
index 48206fa..0000000
--- a/src/multimedia/mediaservices/base/qmetadatacontrol.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMETADATACONTROL_H
-#define QMETADATACONTROL_H
-
-#include <QtMediaServices/qmediacontrol.h>
-#include <QtMediaServices/qmediaobject.h>
-#include <QtMediaServices/qmediaresource.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-class Q_MEDIASERVICES_EXPORT QMetaDataControl : public QMediaControl
-{
- Q_OBJECT
-
-public:
- ~QMetaDataControl();
-
- virtual bool isWritable() const = 0;
- virtual bool isMetaDataAvailable() const = 0;
-
- virtual QVariant metaData(QtMediaServices::MetaData key) const = 0;
- virtual void setMetaData(QtMediaServices::MetaData key, const QVariant &value) = 0;
- virtual QList<QtMediaServices::MetaData> availableMetaData() const = 0;
-
- virtual QVariant extendedMetaData(const QString &key) const = 0;
- virtual void setExtendedMetaData(const QString &key, const QVariant &value) = 0;
- virtual QStringList availableExtendedMetaData() const = 0;
-
-Q_SIGNALS:
- void metaDataChanged();
-
- void writableChanged(bool writable);
- void metaDataAvailableChanged(bool available);
-
-protected:
- QMetaDataControl(QObject *parent = 0);
-};
-
-#define QMetaDataControl_iid "com.nokia.Qt.QMetaDataControl/1.0"
-Q_MEDIA_DECLARE_CONTROL(QMetaDataControl, QMetaDataControl_iid)
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-
-#endif // QMETADATAPROVIDER_H
diff --git a/src/multimedia/mediaservices/base/qpaintervideosurface.cpp b/src/multimedia/mediaservices/base/qpaintervideosurface.cpp
deleted file mode 100644
index 302e772..0000000
--- a/src/multimedia/mediaservices/base/qpaintervideosurface.cpp
+++ /dev/null
@@ -1,1565 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 "qpaintervideosurface_p.h"
-#include "qpaintervideosurface_mac_p.h"
-
-#include <qmath.h>
-
-#include <qpainter.h>
-#include <qvariant.h>
-#include <QtMultimedia/qvideosurfaceformat.h>
-
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
-#include <qglshaderprogram.h>
-#endif
-
-#include <QtDebug>
-
-
-QT_BEGIN_NAMESPACE
-
-QVideoSurfacePainter::~QVideoSurfacePainter()
-{
-}
-
-class QVideoSurfaceRasterPainter : public QVideoSurfacePainter
-{
-public:
- QVideoSurfaceRasterPainter();
-
- QList<QVideoFrame::PixelFormat> supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType) const;
-
- bool isFormatSupported(
- const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const;
-
- QAbstractVideoSurface::Error start(const QVideoSurfaceFormat &format);
- void stop();
-
- QAbstractVideoSurface::Error setCurrentFrame(const QVideoFrame &frame);
-
- QAbstractVideoSurface::Error paint(
- const QRectF &target, QPainter *painter, const QRectF &source);
-
- void updateColors(int brightness, int contrast, int hue, int saturation);
-
-private:
- QList<QVideoFrame::PixelFormat> m_imagePixelFormats;
- QVideoFrame m_frame;
- QSize m_imageSize;
- QImage::Format m_imageFormat;
- QVideoSurfaceFormat::Direction m_scanLineDirection;
-};
-
-QVideoSurfaceRasterPainter::QVideoSurfaceRasterPainter()
- : m_imageFormat(QImage::Format_Invalid)
- , m_scanLineDirection(QVideoSurfaceFormat::TopToBottom)
-{
- m_imagePixelFormats
- << QVideoFrame::Format_RGB32
-#ifndef QT_OPENGL_ES // The raster formats should be a subset of the GL formats.
- << QVideoFrame::Format_RGB24
-#endif
- << QVideoFrame::Format_ARGB32
- << QVideoFrame::Format_RGB565;
-}
-
-QList<QVideoFrame::PixelFormat> QVideoSurfaceRasterPainter::supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType) const
-{
- return handleType == QAbstractVideoBuffer::NoHandle
- ? m_imagePixelFormats
- : QList<QVideoFrame::PixelFormat>();
-}
-
-bool QVideoSurfaceRasterPainter::isFormatSupported(
- const QVideoSurfaceFormat &format, QVideoSurfaceFormat *) const
-{
- return format.handleType() == QAbstractVideoBuffer::NoHandle
- && m_imagePixelFormats.contains(format.pixelFormat())
- && !format.frameSize().isEmpty();
-}
-
-QAbstractVideoSurface::Error QVideoSurfaceRasterPainter::start(const QVideoSurfaceFormat &format)
-{
- m_frame = QVideoFrame();
- m_imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat());
- m_imageSize = format.frameSize();
- m_scanLineDirection = format.scanLineDirection();
-
- return format.handleType() == QAbstractVideoBuffer::NoHandle
- && m_imageFormat != QImage::Format_Invalid
- && !m_imageSize.isEmpty()
- ? QAbstractVideoSurface::NoError
- : QAbstractVideoSurface::UnsupportedFormatError;
-}
-
-void QVideoSurfaceRasterPainter::stop()
-{
- m_frame = QVideoFrame();
-}
-
-QAbstractVideoSurface::Error QVideoSurfaceRasterPainter::setCurrentFrame(const QVideoFrame &frame)
-{
- m_frame = frame;
-
- return QAbstractVideoSurface::NoError;
-}
-
-QAbstractVideoSurface::Error QVideoSurfaceRasterPainter::paint(
- const QRectF &target, QPainter *painter, const QRectF &source)
-{
- if (m_frame.map(QAbstractVideoBuffer::ReadOnly)) {
- QImage image(
- m_frame.bits(),
- m_imageSize.width(),
- m_imageSize.height(),
- m_frame.bytesPerLine(),
- m_imageFormat);
-
- if (m_scanLineDirection == QVideoSurfaceFormat::BottomToTop) {
- const QTransform oldTransform = painter->transform();
-
- painter->scale(1, -1);
- painter->translate(0, -target.bottom());
- painter->drawImage(
- QRectF(target.x(), 0, target.width(), target.height()), image, source);
- painter->setTransform(oldTransform);
- } else {
- painter->drawImage(target, image, source);
- }
-
- m_frame.unmap();
- } else if (m_frame.isValid()) {
- return QAbstractVideoSurface::IncorrectFormatError;
- } else {
- painter->fillRect(target, Qt::black);
- }
- return QAbstractVideoSurface::NoError;
-}
-
-void QVideoSurfaceRasterPainter::updateColors(int, int, int, int)
-{
-}
-
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
-
-#ifndef Q_WS_MAC
-# ifndef APIENTRYP
-# ifdef APIENTRY
-# define APIENTRYP APIENTRY *
-# else
-# define APIENTRY
-# define APIENTRYP *
-# endif
-# endif
-#else
-# define APIENTRY
-# define APIENTRYP *
-#endif
-
-#ifndef GL_TEXTURE0
-# define GL_TEXTURE0 0x84C0
-# define GL_TEXTURE1 0x84C1
-# define GL_TEXTURE2 0x84C2
-#endif
-#ifndef GL_PROGRAM_ERROR_STRING_ARB
-# define GL_PROGRAM_ERROR_STRING_ARB 0x8874
-#endif
-
-#ifndef GL_UNSIGNED_SHORT_5_6_5
-# define GL_UNSIGNED_SHORT_5_6_5 33635
-#endif
-
-class QVideoSurfaceGLPainter : public QVideoSurfacePainter
-{
-public:
- QVideoSurfaceGLPainter(QGLContext *context);
- ~QVideoSurfaceGLPainter();
- QList<QVideoFrame::PixelFormat> supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType) const;
-
- bool isFormatSupported(
- const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const;
-
- QAbstractVideoSurface::Error setCurrentFrame(const QVideoFrame &frame);
-
- void updateColors(int brightness, int contrast, int hue, int saturation);
-
-protected:
- void initRgbTextureInfo(GLenum internalFormat, GLuint format, GLenum type, const QSize &size);
- void initYuv420PTextureInfo(const QSize &size);
- void initYv12TextureInfo(const QSize &size);
-
-#ifndef QT_OPENGL_ES
- typedef void (APIENTRY *_glActiveTexture) (GLenum);
- _glActiveTexture glActiveTexture;
-#endif
-
- QList<QVideoFrame::PixelFormat> m_imagePixelFormats;
- QList<QVideoFrame::PixelFormat> m_glPixelFormats;
- QMatrix4x4 m_colorMatrix;
- QVideoFrame m_frame;
-
- QGLContext *m_context;
- QAbstractVideoBuffer::HandleType m_handleType;
- QVideoSurfaceFormat::Direction m_scanLineDirection;
- GLenum m_textureFormat;
- GLuint m_textureInternalFormat;
- GLenum m_textureType;
- int m_textureCount;
- GLuint m_textureIds[3];
- int m_textureWidths[3];
- int m_textureHeights[3];
- int m_textureOffsets[3];
- bool m_yuv;
-};
-
-QVideoSurfaceGLPainter::QVideoSurfaceGLPainter(QGLContext *context)
- : m_context(context)
- , m_handleType(QAbstractVideoBuffer::NoHandle)
- , m_scanLineDirection(QVideoSurfaceFormat::TopToBottom)
- , m_textureFormat(0)
- , m_textureInternalFormat(0)
- , m_textureType(0)
- , m_textureCount(0)
- , m_yuv(false)
-{
-#ifndef QT_OPENGL_ES
- glActiveTexture = (_glActiveTexture)m_context->getProcAddress(QLatin1String("glActiveTexture"));
-#endif
-}
-
-QVideoSurfaceGLPainter::~QVideoSurfaceGLPainter()
-{
-}
-
-QList<QVideoFrame::PixelFormat> QVideoSurfaceGLPainter::supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType) const
-{
- switch (handleType) {
- case QAbstractVideoBuffer::NoHandle:
- return m_imagePixelFormats;
- case QAbstractVideoBuffer::GLTextureHandle:
- return m_glPixelFormats;
- default:
- return QList<QVideoFrame::PixelFormat>();
- }
-}
-
-bool QVideoSurfaceGLPainter::isFormatSupported(
- const QVideoSurfaceFormat &format, QVideoSurfaceFormat *) const
-{
- if (format.frameSize().isEmpty()) {
- return false;
- } else {
- switch (format.handleType()) {
- case QAbstractVideoBuffer::NoHandle:
- return m_imagePixelFormats.contains(format.pixelFormat());
- case QAbstractVideoBuffer::GLTextureHandle:
- return m_glPixelFormats.contains(format.pixelFormat());
- default:
- return false;
- }
- }
-}
-
-QAbstractVideoSurface::Error QVideoSurfaceGLPainter::setCurrentFrame(const QVideoFrame &frame)
-{
- m_frame = frame;
-
- if (m_handleType == QAbstractVideoBuffer::GLTextureHandle) {
- m_textureIds[0] = frame.handle().toInt();
- } else if (m_frame.map(QAbstractVideoBuffer::ReadOnly)) {
- m_context->makeCurrent();
-
- for (int i = 0; i < m_textureCount; ++i) {
- glBindTexture(GL_TEXTURE_2D, m_textureIds[i]);
- glTexImage2D(
- GL_TEXTURE_2D,
- 0,
- m_textureInternalFormat,
- m_textureWidths[i],
- m_textureHeights[i],
- 0,
- m_textureFormat,
- m_textureType,
- m_frame.bits() + m_textureOffsets[i]);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- }
- m_frame.unmap();
- } else if (m_frame.isValid()) {
- return QAbstractVideoSurface::IncorrectFormatError;
- }
-
- return QAbstractVideoSurface::NoError;
-}
-
-void QVideoSurfaceGLPainter::updateColors(int brightness, int contrast, int hue, int saturation)
-{
- const qreal b = brightness / 200.0;
- const qreal c = contrast / 100.0 + 1.0;
- const qreal h = hue / 100.0;
- const qreal s = saturation / 100.0 + 1.0;
-
- const qreal cosH = qCos(M_PI * h);
- const qreal sinH = qSin(M_PI * h);
-
- const qreal h11 = 0.787 * cosH - 0.213 * sinH + 0.213;
- const qreal h21 = -0.213 * cosH + 0.143 * sinH + 0.213;
- const qreal h31 = -0.213 * cosH - 0.787 * sinH + 0.213;
-
- const qreal h12 = -0.715 * cosH - 0.715 * sinH + 0.715;
- const qreal h22 = 0.285 * cosH + 0.140 * sinH + 0.715;
- const qreal h32 = -0.715 * cosH + 0.715 * sinH + 0.715;
-
- const qreal h13 = -0.072 * cosH + 0.928 * sinH + 0.072;
- const qreal h23 = -0.072 * cosH - 0.283 * sinH + 0.072;
- const qreal h33 = 0.928 * cosH + 0.072 * sinH + 0.072;
-
- const qreal sr = (1.0 - s) * 0.3086;
- const qreal sg = (1.0 - s) * 0.6094;
- const qreal sb = (1.0 - s) * 0.0820;
-
- const qreal sr_s = sr + s;
- const qreal sg_s = sg + s;
- const qreal sb_s = sr + s;
-
- const float m4 = (s + sr + sg + sb) * (0.5 - 0.5 * c + b);
-
- m_colorMatrix(0, 0) = c * (sr_s * h11 + sg * h21 + sb * h31);
- m_colorMatrix(0, 1) = c * (sr_s * h12 + sg * h22 + sb * h32);
- m_colorMatrix(0, 2) = c * (sr_s * h13 + sg * h23 + sb * h33);
- m_colorMatrix(0, 3) = m4;
-
- m_colorMatrix(1, 0) = c * (sr * h11 + sg_s * h21 + sb * h31);
- m_colorMatrix(1, 1) = c * (sr * h12 + sg_s * h22 + sb * h32);
- m_colorMatrix(1, 2) = c * (sr * h13 + sg_s * h23 + sb * h33);
- m_colorMatrix(1, 3) = m4;
-
- m_colorMatrix(2, 0) = c * (sr * h11 + sg * h21 + sb_s * h31);
- m_colorMatrix(2, 1) = c * (sr * h12 + sg * h22 + sb_s * h32);
- m_colorMatrix(2, 2) = c * (sr * h13 + sg * h23 + sb_s * h33);
- m_colorMatrix(2, 3) = m4;
-
- m_colorMatrix(3, 0) = 0.0;
- m_colorMatrix(3, 1) = 0.0;
- m_colorMatrix(3, 2) = 0.0;
- m_colorMatrix(3, 3) = 1.0;
-
- if (m_yuv) {
- m_colorMatrix = m_colorMatrix * QMatrix4x4(
- 1.0, 0.000, 1.140, -0.5700,
- 1.0, -0.394, -0.581, 0.4875,
- 1.0, 2.028, 0.000, -1.0140,
- 0.0, 0.000, 0.000, 1.0000);
- }
-}
-
-void QVideoSurfaceGLPainter::initRgbTextureInfo(
- GLenum internalFormat, GLuint format, GLenum type, const QSize &size)
-{
- m_yuv = false;
- m_textureInternalFormat = internalFormat;
- m_textureFormat = format;
- m_textureType = type;
- m_textureCount = 1;
- m_textureWidths[0] = size.width();
- m_textureHeights[0] = size.height();
- m_textureOffsets[0] = 0;
-}
-
-void QVideoSurfaceGLPainter::initYuv420PTextureInfo(const QSize &size)
-{
- int w = (size.width() + 3) & ~3;
- int w2 = (size.width()/2 + 3) & ~3;
-
- m_yuv = true;
- m_textureInternalFormat = GL_LUMINANCE;
- m_textureFormat = GL_LUMINANCE;
- m_textureType = GL_UNSIGNED_BYTE;
- m_textureCount = 3;
- m_textureWidths[0] = size.width();
- m_textureHeights[0] = size.height();
- m_textureOffsets[0] = 0;
- m_textureWidths[1] = size.width() / 2;
- m_textureHeights[1] = size.height() / 2;
- m_textureOffsets[1] = w * size.height();
- m_textureWidths[2] = size.width() / 2;
- m_textureHeights[2] = size.height() / 2;
- m_textureOffsets[2] = w * size.height() + w2 * (size.height() / 2);
-}
-
-void QVideoSurfaceGLPainter::initYv12TextureInfo(const QSize &size)
-{
- int w = (size.width() + 3) & ~3;
- int w2 = (size.width()/2 + 3) & ~3;
-
- m_yuv = true;
- m_textureInternalFormat = GL_LUMINANCE;
- m_textureFormat = GL_LUMINANCE;
- m_textureType = GL_UNSIGNED_BYTE;
- m_textureCount = 3;
- m_textureWidths[0] = size.width();
- m_textureHeights[0] = size.height();
- m_textureOffsets[0] = 0;
- m_textureWidths[1] = size.width() / 2;
- m_textureHeights[1] = size.height() / 2;
- m_textureOffsets[1] = w * size.height() + w2 * (size.height() / 2);
- m_textureWidths[2] = size.width() / 2;
- m_textureHeights[2] = size.height() / 2;
- m_textureOffsets[2] = w * size.height();
-}
-
-#ifndef QT_OPENGL_ES
-
-# ifndef GL_FRAGMENT_PROGRAM_ARB
-# define GL_FRAGMENT_PROGRAM_ARB 0x8804
-# define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
-# endif
-
-// Paints an RGB32 frame
-static const char *qt_arbfp_xrgbShaderProgram =
- "!!ARBfp1.0\n"
- "PARAM matrix[4] = { program.local[0..2],"
- "{ 0.0, 0.0, 0.0, 1.0 } };\n"
- "TEMP xrgb;\n"
- "TEX xrgb.xyz, fragment.texcoord[0], texture[0], 2D;\n"
- "MOV xrgb.w, matrix[3].w;\n"
- "DP4 result.color.x, xrgb.zyxw, matrix[0];\n"
- "DP4 result.color.y, xrgb.zyxw, matrix[1];\n"
- "DP4 result.color.z, xrgb.zyxw, matrix[2];\n"
- "END";
-
-// Paints an ARGB frame.
-static const char *qt_arbfp_argbShaderProgram =
- "!!ARBfp1.0\n"
- "PARAM matrix[4] = { program.local[0..2],"
- "{ 0.0, 0.0, 0.0, 1.0 } };\n"
- "TEMP argb;\n"
- "TEX argb, fragment.texcoord[0], texture[0], 2D;\n"
- "MOV argb.w, matrix[3].w;\n"
- "DP4 result.color.x, argb.zyxw, matrix[0];\n"
- "DP4 result.color.y, argb.zyxw, matrix[1];\n"
- "DP4 result.color.z, argb.zyxw, matrix[2];\n"
- "TEX result.color.w, fragment.texcoord[0], texture, 2D;\n"
- "END";
-
-// Paints an RGB(A) frame.
-static const char *qt_arbfp_rgbShaderProgram =
- "!!ARBfp1.0\n"
- "PARAM matrix[4] = { program.local[0..2],"
- "{ 0.0, 0.0, 0.0, 1.0 } };\n"
- "TEMP rgb;\n"
- "TEX rgb, fragment.texcoord[0], texture[0], 2D;\n"
- "MOV rgb.w, matrix[3].w;\n"
- "DP4 result.color.x, rgb, matrix[0];\n"
- "DP4 result.color.y, rgb, matrix[1];\n"
- "DP4 result.color.z, rgb, matrix[2];\n"
- "TEX result.color.w, fragment.texcoord[0], texture, 2D;\n"
- "END";
-
-// Paints a YUV420P or YV12 frame.
-static const char *qt_arbfp_yuvPlanarShaderProgram =
- "!!ARBfp1.0\n"
- "PARAM matrix[4] = { program.local[0..2],"
- "{ 0.0, 0.0, 0.0, 1.0 } };\n"
- "TEMP yuv;\n"
- "TEX yuv.x, fragment.texcoord[0], texture[0], 2D;\n"
- "TEX yuv.y, fragment.texcoord[0], texture[1], 2D;\n"
- "TEX yuv.z, fragment.texcoord[0], texture[2], 2D;\n"
- "MOV yuv.w, matrix[3].w;\n"
- "DP4 result.color.x, yuv, matrix[0];\n"
- "DP4 result.color.y, yuv, matrix[1];\n"
- "DP4 result.color.z, yuv, matrix[2];\n"
- "END";
-
-// Paints a YUV444 frame.
-static const char *qt_arbfp_xyuvShaderProgram =
- "!!ARBfp1.0\n"
- "PARAM matrix[4] = { program.local[0..2],"
- "{ 0.0, 0.0, 0.0, 1.0 } };\n"
- "TEMP ayuv;\n"
- "TEX ayuv, fragment.texcoord[0], texture[0], 2D;\n"
- "MOV ayuv.x, matrix[3].w;\n"
- "DP4 result.color.x, ayuv.yzwx, matrix[0];\n"
- "DP4 result.color.y, ayuv.yzwx, matrix[1];\n"
- "DP4 result.color.z, ayuv.yzwx, matrix[2];\n"
- "END";
-
-// Paints a AYUV444 frame.
-static const char *qt_arbfp_ayuvShaderProgram =
- "!!ARBfp1.0\n"
- "PARAM matrix[4] = { program.local[0..2],"
- "{ 0.0, 0.0, 0.0, 1.0 } };\n"
- "TEMP ayuv;\n"
- "TEX ayuv, fragment.texcoord[0], texture[0], 2D;\n"
- "MOV ayuv.x, matrix[3].w;\n"
- "DP4 result.color.x, ayuv.yzwx, matrix[0];\n"
- "DP4 result.color.y, ayuv.yzwx, matrix[1];\n"
- "DP4 result.color.z, ayuv.yzwx, matrix[2];\n"
- "TEX result.color.w, fragment.texcoord[0], texture, 2D;\n"
- "END";
-
-class QVideoSurfaceArbFpPainter : public QVideoSurfaceGLPainter
-{
-public:
- QVideoSurfaceArbFpPainter(QGLContext *context);
-
- QAbstractVideoSurface::Error start(const QVideoSurfaceFormat &format);
- void stop();
-
- QAbstractVideoSurface::Error paint(
- const QRectF &target, QPainter *painter, const QRectF &source);
-
-private:
- typedef void (APIENTRY *_glProgramStringARB) (GLenum, GLenum, GLsizei, const GLvoid *);
- typedef void (APIENTRY *_glBindProgramARB) (GLenum, GLuint);
- typedef void (APIENTRY *_glDeleteProgramsARB) (GLsizei, const GLuint *);
- typedef void (APIENTRY *_glGenProgramsARB) (GLsizei, GLuint *);
- typedef void (APIENTRY *_glProgramLocalParameter4fARB) (
- GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
- typedef void (APIENTRY *_glActiveTexture) (GLenum);
-
- _glProgramStringARB glProgramStringARB;
- _glBindProgramARB glBindProgramARB;
- _glDeleteProgramsARB glDeleteProgramsARB;
- _glGenProgramsARB glGenProgramsARB;
- _glProgramLocalParameter4fARB glProgramLocalParameter4fARB;
-
- GLuint m_programId;
- QSize m_frameSize;
-};
-
-QVideoSurfaceArbFpPainter::QVideoSurfaceArbFpPainter(QGLContext *context)
- : QVideoSurfaceGLPainter(context)
- , m_programId(0)
-{
- glProgramStringARB = (_glProgramStringARB) m_context->getProcAddress(
- QLatin1String("glProgramStringARB"));
- glBindProgramARB = (_glBindProgramARB) m_context->getProcAddress(
- QLatin1String("glBindProgramARB"));
- glDeleteProgramsARB = (_glDeleteProgramsARB) m_context->getProcAddress(
- QLatin1String("glDeleteProgramsARB"));
- glGenProgramsARB = (_glGenProgramsARB) m_context->getProcAddress(
- QLatin1String("glGenProgramsARB"));
- glProgramLocalParameter4fARB = (_glProgramLocalParameter4fARB) m_context->getProcAddress(
- QLatin1String("glProgramLocalParameter4fARB"));
-
- m_imagePixelFormats
- << QVideoFrame::Format_RGB32
- << QVideoFrame::Format_BGR32
- << QVideoFrame::Format_ARGB32
- << QVideoFrame::Format_RGB24
- << QVideoFrame::Format_BGR24
- << QVideoFrame::Format_RGB565
- << QVideoFrame::Format_AYUV444
- << QVideoFrame::Format_YUV444
- << QVideoFrame::Format_YV12
- << QVideoFrame::Format_YUV420P;
- m_glPixelFormats
- << QVideoFrame::Format_RGB32
- << QVideoFrame::Format_ARGB32;
-}
-
-QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::start(const QVideoSurfaceFormat &format)
-{
- Q_ASSERT(m_textureCount == 0);
-
- QAbstractVideoSurface::Error error = QAbstractVideoSurface::NoError;
-
- m_context->makeCurrent();
-
- const char *program = 0;
-
- if (format.handleType() == QAbstractVideoBuffer::NoHandle) {
- switch (format.pixelFormat()) {
- case QVideoFrame::Format_RGB32:
- initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
- program = qt_arbfp_xrgbShaderProgram;
- break;
- case QVideoFrame::Format_BGR32:
- initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
- program = qt_arbfp_rgbShaderProgram;
- break;
- case QVideoFrame::Format_ARGB32:
- initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
- program = qt_arbfp_argbShaderProgram;
- break;
- case QVideoFrame::Format_RGB24:
- initRgbTextureInfo(GL_RGB8, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
- program = qt_arbfp_rgbShaderProgram;
- break;
- case QVideoFrame::Format_BGR24:
- initRgbTextureInfo(GL_RGB8, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
- program = qt_arbfp_xrgbShaderProgram;
- break;
- case QVideoFrame::Format_RGB565:
- initRgbTextureInfo(GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, format.frameSize());
- program = qt_arbfp_rgbShaderProgram;
- break;
- case QVideoFrame::Format_YUV444:
- initRgbTextureInfo(GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, format.frameSize());
- program = qt_arbfp_xyuvShaderProgram;
- m_yuv = true;
- break;
- case QVideoFrame::Format_AYUV444:
- initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
- program = qt_arbfp_ayuvShaderProgram;
- m_yuv = true;
- break;
- case QVideoFrame::Format_YV12:
- initYv12TextureInfo(format.frameSize());
- program = qt_arbfp_yuvPlanarShaderProgram;
- break;
- case QVideoFrame::Format_YUV420P:
- initYuv420PTextureInfo(format.frameSize());
- program = qt_arbfp_yuvPlanarShaderProgram;
- break;
- default:
- break;
- }
- } else if (format.handleType() == QAbstractVideoBuffer::GLTextureHandle) {
- switch (format.pixelFormat()) {
- case QVideoFrame::Format_RGB32:
- case QVideoFrame::Format_ARGB32:
- m_yuv = false;
- m_textureCount = 1;
- program = qt_arbfp_rgbShaderProgram;
- break;
- default:
- break;
- }
- }
-
- if (!program) {
- error = QAbstractVideoSurface::UnsupportedFormatError;
- } else {
- glGenProgramsARB(1, &m_programId);
-
- GLenum glError = glGetError();
- if (glError != GL_NO_ERROR) {
- qWarning("QPainterVideoSurface: ARBfb Shader allocation error %x", int(glError));
- m_textureCount = 0;
- m_programId = 0;
-
- error = QAbstractVideoSurface::ResourceError;
- } else {
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, m_programId);
- glProgramStringARB(
- GL_FRAGMENT_PROGRAM_ARB,
- GL_PROGRAM_FORMAT_ASCII_ARB,
- qstrlen(program),
- reinterpret_cast<const GLvoid *>(program));
-
- if ((glError = glGetError()) != GL_NO_ERROR) {
- const GLubyte* errorString = glGetString(GL_PROGRAM_ERROR_STRING_ARB);
-
- qWarning("QPainterVideoSurface: ARBfp Shader compile error %x, %s",
- int(glError),
- reinterpret_cast<const char *>(errorString));
- glDeleteProgramsARB(1, &m_programId);
-
- m_textureCount = 0;
- m_programId = 0;
-
- error = QAbstractVideoSurface::ResourceError;
- } else {
- m_handleType = format.handleType();
- m_scanLineDirection = format.scanLineDirection();
- m_frameSize = format.frameSize();
-
- if (m_handleType == QAbstractVideoBuffer::NoHandle)
- glGenTextures(m_textureCount, m_textureIds);
- }
- }
- }
-
- return error;
-}
-
-void QVideoSurfaceArbFpPainter::stop()
-{
- m_context->makeCurrent();
-
- if (m_handleType != QAbstractVideoBuffer::GLTextureHandle)
- glDeleteTextures(m_textureCount, m_textureIds);
- glDeleteProgramsARB(1, &m_programId);
-
- m_textureCount = 0;
- m_programId = 0;
- m_handleType = QAbstractVideoBuffer::NoHandle;
-}
-
-QAbstractVideoSurface::Error QVideoSurfaceArbFpPainter::paint(
- const QRectF &target, QPainter *painter, const QRectF &source)
-{
- if (m_frame.isValid()) {
- bool stencilTestEnabled = glIsEnabled(GL_STENCIL_TEST);
- bool scissorTestEnabled = glIsEnabled(GL_SCISSOR_TEST);
-
- painter->beginNativePainting();
-
- if (stencilTestEnabled)
- glEnable(GL_STENCIL_TEST);
- if (scissorTestEnabled)
- glEnable(GL_SCISSOR_TEST);
-
- const float txLeft = source.left() / m_frameSize.width();
- const float txRight = source.right() / m_frameSize.width();
- const float txTop = m_scanLineDirection == QVideoSurfaceFormat::TopToBottom
- ? source.top() / m_frameSize.height()
- : source.bottom() / m_frameSize.height();
- const float txBottom = m_scanLineDirection == QVideoSurfaceFormat::TopToBottom
- ? source.bottom() / m_frameSize.height()
- : source.top() / m_frameSize.height();
-
-
- const float tx_array[] =
- {
- txLeft , txBottom,
- txRight, txBottom,
- txLeft , txTop,
- txRight, txTop
- };
- const float v_array[] =
- {
- float(target.left()) , float(target.bottom() + 1),
- float(target.right() + 1), float(target.bottom() + 1),
- float(target.left()) , float(target.top()),
- float(target.right() + 1), float(target.top())
- };
-
- glEnable(GL_FRAGMENT_PROGRAM_ARB);
- glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, m_programId);
-
- glProgramLocalParameter4fARB(
- GL_FRAGMENT_PROGRAM_ARB,
- 0,
- m_colorMatrix(0, 0),
- m_colorMatrix(0, 1),
- m_colorMatrix(0, 2),
- m_colorMatrix(0, 3));
- glProgramLocalParameter4fARB(
- GL_FRAGMENT_PROGRAM_ARB,
- 1,
- m_colorMatrix(1, 0),
- m_colorMatrix(1, 1),
- m_colorMatrix(1, 2),
- m_colorMatrix(1, 3));
- glProgramLocalParameter4fARB(
- GL_FRAGMENT_PROGRAM_ARB,
- 2,
- m_colorMatrix(2, 0),
- m_colorMatrix(2, 1),
- m_colorMatrix(2, 2),
- m_colorMatrix(2, 3));
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, m_textureIds[0]);
-
- if (m_textureCount == 3) {
- glActiveTexture(GL_TEXTURE1);
- glBindTexture(GL_TEXTURE_2D, m_textureIds[1]);
- glActiveTexture(GL_TEXTURE2);
- glBindTexture(GL_TEXTURE_2D, m_textureIds[2]);
- glActiveTexture(GL_TEXTURE0);
- }
-
- glVertexPointer(2, GL_FLOAT, 0, v_array);
- glTexCoordPointer(2, GL_FLOAT, 0, tx_array);
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
-
- glDisableClientState(GL_TEXTURE_COORD_ARRAY);
- glDisableClientState(GL_VERTEX_ARRAY);
- glDisable(GL_FRAGMENT_PROGRAM_ARB);
-
- painter->endNativePainting();
- }
- return QAbstractVideoSurface::NoError;
-}
-
-#endif
-
-static const char *qt_glsl_vertexShaderProgram =
- "attribute highp vec4 vertexCoordArray;\n"
- "attribute highp vec2 textureCoordArray;\n"
- "uniform highp mat4 positionMatrix;\n"
- "varying highp vec2 textureCoord;\n"
- "void main(void)\n"
- "{\n"
- " gl_Position = positionMatrix * vertexCoordArray;\n"
- " textureCoord = textureCoordArray;\n"
- "}\n";
-
-// Paints an RGB32 frame
-static const char *qt_glsl_xrgbShaderProgram =
- "uniform sampler2D texRgb;\n"
- "uniform mediump mat4 colorMatrix;\n"
- "varying highp vec2 textureCoord;\n"
- "void main(void)\n"
- "{\n"
- " highp vec4 color = vec4(texture2D(texRgb, textureCoord.st).bgr, 1.0);\n"
- " gl_FragColor = colorMatrix * color;\n"
- "}\n";
-
-// Paints an ARGB frame.
-static const char *qt_glsl_argbShaderProgram =
- "uniform sampler2D texRgb;\n"
- "uniform mediump mat4 colorMatrix;\n"
- "varying highp vec2 textureCoord;\n"
- "void main(void)\n"
- "{\n"
- " highp vec4 color = vec4(texture2D(texRgb, textureCoord.st).bgr, 1.0);\n"
- " color = colorMatrix * color;\n"
- " gl_FragColor = vec4(color.rgb, texture2D(texRgb, textureCoord.st).a);\n"
- "}\n";
-
-// Paints an RGB(A) frame.
-static const char *qt_glsl_rgbShaderProgram =
- "uniform sampler2D texRgb;\n"
- "uniform mediump mat4 colorMatrix;\n"
- "varying highp vec2 textureCoord;\n"
- "void main(void)\n"
- "{\n"
- " highp vec4 color = vec4(texture2D(texRgb, textureCoord.st).rgb, 1.0);\n"
- " color = colorMatrix * color;\n"
- " gl_FragColor = vec4(color.rgb, texture2D(texRgb, textureCoord.st).a);\n"
- "}\n";
-
-// Paints a YUV420P or YV12 frame.
-static const char *qt_glsl_yuvPlanarShaderProgram =
- "uniform sampler2D texY;\n"
- "uniform sampler2D texU;\n"
- "uniform sampler2D texV;\n"
- "uniform mediump mat4 colorMatrix;\n"
- "varying highp vec2 textureCoord;\n"
- "void main(void)\n"
- "{\n"
- " highp vec4 color = vec4(\n"
- " texture2D(texY, textureCoord.st).r,\n"
- " texture2D(texU, textureCoord.st).r,\n"
- " texture2D(texV, textureCoord.st).r,\n"
- " 1.0);\n"
- " gl_FragColor = colorMatrix * color;\n"
- "}\n";
-
-// Paints a YUV444 frame.
-static const char *qt_glsl_xyuvShaderProgram =
- "uniform sampler2D texRgb;\n"
- "uniform mediump mat4 colorMatrix;\n"
- "varying highp vec2 textureCoord;\n"
- "void main(void)\n"
- "{\n"
- " highp vec4 color = vec4(texture2D(texRgb, textureCoord.st).gba, 1.0);\n"
- " gl_FragColor = colorMatrix * color;\n"
- "}\n";
-
-// Paints a AYUV444 frame.
-static const char *qt_glsl_ayuvShaderProgram =
- "uniform sampler2D texRgb;\n"
- "uniform mediump mat4 colorMatrix;\n"
- "varying highp vec2 textureCoord;\n"
- "void main(void)\n"
- "{\n"
- " highp vec4 color = vec4(texture2D(texRgb, textureCoord.st).gba, 1.0);\n"
- " color = colorMatrix * color;\n"
- " gl_FragColor = vec4(color.rgb, texture2D(texRgb, textureCoord.st).r);\n"
- "}\n";
-
-class QVideoSurfaceGlslPainter : public QVideoSurfaceGLPainter
-{
-public:
- QVideoSurfaceGlslPainter(QGLContext *context);
-
- QAbstractVideoSurface::Error start(const QVideoSurfaceFormat &format);
- void stop();
-
- QAbstractVideoSurface::Error paint(
- const QRectF &target, QPainter *painter, const QRectF &source);
-
-private:
- QGLShaderProgram m_program;
- QSize m_frameSize;
-};
-
-QVideoSurfaceGlslPainter::QVideoSurfaceGlslPainter(QGLContext *context)
- : QVideoSurfaceGLPainter(context)
- , m_program(context)
-{
- m_imagePixelFormats
- << QVideoFrame::Format_RGB32
- << QVideoFrame::Format_BGR32
- << QVideoFrame::Format_ARGB32
-#ifndef QT_OPENGL_ES
- << QVideoFrame::Format_RGB24
- << QVideoFrame::Format_BGR24
-#endif
- << QVideoFrame::Format_RGB565
- << QVideoFrame::Format_YUV444
- << QVideoFrame::Format_AYUV444
- << QVideoFrame::Format_YV12
- << QVideoFrame::Format_YUV420P;
- m_glPixelFormats
- << QVideoFrame::Format_RGB32
- << QVideoFrame::Format_ARGB32;
-}
-
-QAbstractVideoSurface::Error QVideoSurfaceGlslPainter::start(const QVideoSurfaceFormat &format)
-{
- Q_ASSERT(m_textureCount == 0);
-
- QAbstractVideoSurface::Error error = QAbstractVideoSurface::NoError;
-
- m_context->makeCurrent();
-
- const char *fragmentProgram = 0;
-
- if (format.handleType() == QAbstractVideoBuffer::NoHandle) {
- switch (format.pixelFormat()) {
- case QVideoFrame::Format_RGB32:
- initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
- fragmentProgram = qt_glsl_xrgbShaderProgram;
- break;
- case QVideoFrame::Format_BGR32:
- initRgbTextureInfo(GL_RGB, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
- fragmentProgram = qt_glsl_rgbShaderProgram;
- break;
- case QVideoFrame::Format_ARGB32:
- initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
- fragmentProgram = qt_glsl_argbShaderProgram;
- break;
-#ifndef QT_OPENGL_ES
- case QVideoFrame::Format_RGB24:
- initRgbTextureInfo(GL_RGB8, GL_RGB, GL_UNSIGNED_BYTE, format.frameSize());
- fragmentProgram = qt_glsl_rgbShaderProgram;
- break;
- case QVideoFrame::Format_BGR24:
- initRgbTextureInfo(GL_RGB8, GL_RGB, GL_UNSIGNED_BYTE, format.frameSize());
- fragmentProgram = qt_glsl_argbShaderProgram;
- break;
-#endif
- case QVideoFrame::Format_RGB565:
- initRgbTextureInfo(GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, format.frameSize());
- fragmentProgram = qt_glsl_rgbShaderProgram;
- break;
- case QVideoFrame::Format_YUV444:
- initRgbTextureInfo(GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, format.frameSize());
- fragmentProgram = qt_glsl_xyuvShaderProgram;
- m_yuv = true;
- break;
- case QVideoFrame::Format_AYUV444:
- initRgbTextureInfo(GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, format.frameSize());
- fragmentProgram = qt_glsl_ayuvShaderProgram;
- m_yuv = true;
- break;
- case QVideoFrame::Format_YV12:
- initYv12TextureInfo(format.frameSize());
- fragmentProgram = qt_glsl_yuvPlanarShaderProgram;
- break;
- case QVideoFrame::Format_YUV420P:
- initYuv420PTextureInfo(format.frameSize());
- fragmentProgram = qt_glsl_yuvPlanarShaderProgram;
- break;
- default:
- break;
- }
- } else if (format.handleType() == QAbstractVideoBuffer::GLTextureHandle) {
- switch (format.pixelFormat()) {
- case QVideoFrame::Format_RGB32:
- case QVideoFrame::Format_ARGB32:
- m_yuv = false;
- m_textureCount = 1;
- fragmentProgram = qt_glsl_rgbShaderProgram;
- break;
- default:
- break;
- }
- }
-
- if (!fragmentProgram) {
- error = QAbstractVideoSurface::UnsupportedFormatError;
- } else if (!m_program.addShaderFromSourceCode(QGLShader::Vertex, qt_glsl_vertexShaderProgram)) {
- qWarning("QPainterVideoSurface: Vertex shader compile error %s",
- qPrintable(m_program.log()));
- error = QAbstractVideoSurface::ResourceError;
- } else if (!m_program.addShaderFromSourceCode(QGLShader::Fragment, fragmentProgram)) {
- qWarning("QPainterVideoSurface: Shader compile error %s", qPrintable(m_program.log()));
- error = QAbstractVideoSurface::ResourceError;
- m_program.removeAllShaders();
- } else if(!m_program.link()) {
- qWarning("QPainterVideoSurface: Shader link error %s", qPrintable(m_program.log()));
- m_program.removeAllShaders();
- error = QAbstractVideoSurface::ResourceError;
- } else {
- m_handleType = format.handleType();
- m_scanLineDirection = format.scanLineDirection();
- m_frameSize = format.frameSize();
-
- if (m_handleType == QAbstractVideoBuffer::NoHandle)
- glGenTextures(m_textureCount, m_textureIds);
- }
-
- return error;
-}
-
-void QVideoSurfaceGlslPainter::stop()
-{
- m_context->makeCurrent();
-
- if (m_handleType != QAbstractVideoBuffer::GLTextureHandle)
- glDeleteTextures(m_textureCount, m_textureIds);
- m_program.removeAllShaders();
-
- m_textureCount = 0;
- m_handleType = QAbstractVideoBuffer::NoHandle;
-}
-
-QAbstractVideoSurface::Error QVideoSurfaceGlslPainter::paint(
- const QRectF &target, QPainter *painter, const QRectF &source)
-{
- if (m_frame.isValid()) {
- bool stencilTestEnabled = glIsEnabled(GL_STENCIL_TEST);
- bool scissorTestEnabled = glIsEnabled(GL_SCISSOR_TEST);
-
- painter->beginNativePainting();
-
- if (stencilTestEnabled)
- glEnable(GL_STENCIL_TEST);
- if (scissorTestEnabled)
- glEnable(GL_SCISSOR_TEST);
-
- const int width = QGLContext::currentContext()->device()->width();
- const int height = QGLContext::currentContext()->device()->height();
-
- const QTransform transform = painter->deviceTransform();
-
- const GLfloat wfactor = 2.0 / width;
- const GLfloat hfactor = -2.0 / height;
-
- const GLfloat positionMatrix[4][4] =
- {
- {
- /*(0,0)*/ GLfloat(wfactor * transform.m11() - transform.m13()),
- /*(0,1)*/ GLfloat(hfactor * transform.m12() + transform.m13()),
- /*(0,2)*/ 0.0,
- /*(0,3)*/ GLfloat(transform.m13())
- }, {
- /*(1,0)*/ GLfloat(wfactor * transform.m21() - transform.m23()),
- /*(1,1)*/ GLfloat(hfactor * transform.m22() + transform.m23()),
- /*(1,2)*/ 0.0,
- /*(1,3)*/ GLfloat(transform.m23())
- }, {
- /*(2,0)*/ 0.0,
- /*(2,1)*/ 0.0,
- /*(2,2)*/ -1.0,
- /*(2,3)*/ 0.0
- }, {
- /*(3,0)*/ GLfloat(wfactor * transform.dx() - transform.m33()),
- /*(3,1)*/ GLfloat(hfactor * transform.dy() + transform.m33()),
- /*(3,2)*/ 0.0,
- /*(3,3)*/ GLfloat(transform.m33())
- }
- };
-
- const GLfloat vertexCoordArray[] =
- {
- GLfloat(target.left()) , GLfloat(target.bottom() + 1),
- GLfloat(target.right() + 1), GLfloat(target.bottom() + 1),
- GLfloat(target.left()) , GLfloat(target.top()),
- GLfloat(target.right() + 1), GLfloat(target.top())
- };
-
- const GLfloat txLeft = source.left() / m_frameSize.width();
- const GLfloat txRight = source.right() / m_frameSize.width();
- const GLfloat txTop = m_scanLineDirection == QVideoSurfaceFormat::TopToBottom
- ? source.top() / m_frameSize.height()
- : source.bottom() / m_frameSize.height();
- const GLfloat txBottom = m_scanLineDirection == QVideoSurfaceFormat::TopToBottom
- ? source.bottom() / m_frameSize.height()
- : source.top() / m_frameSize.height();
-
- const GLfloat textureCoordArray[] =
- {
- txLeft , txBottom,
- txRight, txBottom,
- txLeft , txTop,
- txRight, txTop
- };
-
- m_program.bind();
-
- m_program.enableAttributeArray("vertexCoordArray");
- m_program.enableAttributeArray("textureCoordArray");
- m_program.setAttributeArray("vertexCoordArray", vertexCoordArray, 2);
- m_program.setAttributeArray("textureCoordArray", textureCoordArray, 2);
- m_program.setUniformValue("positionMatrix", positionMatrix);
-
- if (m_textureCount == 3) {
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, m_textureIds[0]);
- glActiveTexture(GL_TEXTURE1);
- glBindTexture(GL_TEXTURE_2D, m_textureIds[1]);
- glActiveTexture(GL_TEXTURE2);
- glBindTexture(GL_TEXTURE_2D, m_textureIds[2]);
- glActiveTexture(GL_TEXTURE0);
-
- m_program.setUniformValue("texY", GLint(0));
- m_program.setUniformValue("texU", GLint(1));
- m_program.setUniformValue("texV", GLint(2));
- } else {
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, m_textureIds[0]);
-
- m_program.setUniformValue("texRgb", GLint(0));
- }
- m_program.setUniformValue("colorMatrix", m_colorMatrix);
-
- glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
-
- m_program.release();
-
- painter->endNativePainting();
- }
- return QAbstractVideoSurface::NoError;
-}
-
-#endif
-
-/*!
- \class QPainterVideoSurface
- \internal
-*/
-
-/*!
-*/
-QPainterVideoSurface::QPainterVideoSurface(QObject *parent)
- : QAbstractVideoSurface(parent)
- , m_painter(0)
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
- , m_glContext(0)
- , m_shaderTypes(NoShaders)
- , m_shaderType(NoShaders)
-#endif
- , m_brightness(0)
- , m_contrast(0)
- , m_hue(0)
- , m_saturation(0)
- , m_pixelFormat(QVideoFrame::Format_Invalid)
- , m_colorsDirty(true)
- , m_ready(false)
-{
-}
-
-/*!
-*/
-QPainterVideoSurface::~QPainterVideoSurface()
-{
- if (isActive())
- m_painter->stop();
-
- delete m_painter;
-}
-
-/*!
-*/
-QList<QVideoFrame::PixelFormat> QPainterVideoSurface::supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType) const
-{
- if (!m_painter)
- const_cast<QPainterVideoSurface *>(this)->createPainter();
-
- return m_painter->supportedPixelFormats(handleType);
-}
-
-/*!
-*/
-bool QPainterVideoSurface::isFormatSupported(
- const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const
-{
- if (!m_painter)
- const_cast<QPainterVideoSurface *>(this)->createPainter();
-
- return m_painter->isFormatSupported(format, similar);
-}
-
-/*!
-*/
-bool QPainterVideoSurface::start(const QVideoSurfaceFormat &format)
-{
- if (isActive())
- m_painter->stop();
-
- if (!m_painter)
- createPainter();
-
- if (format.frameSize().isEmpty()) {
- setError(UnsupportedFormatError);
- } else {
- QAbstractVideoSurface::Error error = m_painter->start(format);
-
- if (error != QAbstractVideoSurface::NoError) {
- setError(error);
- } else {
- m_pixelFormat = format.pixelFormat();
- m_frameSize = format.frameSize();
- m_sourceRect = format.viewport();
- m_colorsDirty = true;
- m_ready = true;
-
- return QAbstractVideoSurface::start(format);
- }
- }
-
- QAbstractVideoSurface::stop();
-
- return false;
-}
-
-/*!
-*/
-void QPainterVideoSurface::stop()
-{
- if (isActive()) {
- m_painter->stop();
- m_ready = false;
-
- QAbstractVideoSurface::stop();
- }
-}
-
-/*!
-*/
-bool QPainterVideoSurface::present(const QVideoFrame &frame)
-{
- if (!m_ready) {
- if (!isActive())
- setError(StoppedError);
- } else if (frame.isValid()
- && (frame.pixelFormat() != m_pixelFormat || frame.size() != m_frameSize)) {
- setError(IncorrectFormatError);
-
- stop();
- } else {
- QAbstractVideoSurface::Error error = m_painter->setCurrentFrame(frame);
-
- if (error != QAbstractVideoSurface::NoError) {
- setError(error);
-
- stop();
- } else {
- m_ready = false;
-
- emit frameChanged();
-
- return true;
- }
- }
- return false;
-}
-
-/*!
-*/
-int QPainterVideoSurface::brightness() const
-{
- return m_brightness;
-}
-
-/*!
-*/
-void QPainterVideoSurface::setBrightness(int brightness)
-{
- m_brightness = brightness;
-
- m_colorsDirty = true;
-}
-
-/*!
-*/
-int QPainterVideoSurface::contrast() const
-{
- return m_contrast;
-}
-
-/*!
-*/
-void QPainterVideoSurface::setContrast(int contrast)
-{
- m_contrast = contrast;
-
- m_colorsDirty = true;
-}
-
-/*!
-*/
-int QPainterVideoSurface::hue() const
-{
- return m_hue;
-}
-
-/*!
-*/
-void QPainterVideoSurface::setHue(int hue)
-{
- m_hue = hue;
-
- m_colorsDirty = true;
-}
-
-/*!
-*/
-int QPainterVideoSurface::saturation() const
-{
- return m_saturation;
-}
-
-/*!
-*/
-void QPainterVideoSurface::setSaturation(int saturation)
-{
- m_saturation = saturation;
-
- m_colorsDirty = true;
-}
-
-/*!
-*/
-bool QPainterVideoSurface::isReady() const
-{
- return m_ready;
-}
-
-/*!
-*/
-void QPainterVideoSurface::setReady(bool ready)
-{
- m_ready = ready;
-}
-
-/*!
-*/
-void QPainterVideoSurface::paint(QPainter *painter, const QRectF &target, const QRectF &source)
-{
- if (!isActive()) {
- painter->fillRect(target, QBrush(Qt::black));
- } else {
- if (m_colorsDirty) {
- m_painter->updateColors(m_brightness, m_contrast, m_hue, m_saturation);
- m_colorsDirty = false;
- }
-
- const QRectF sourceRect(
- m_sourceRect.x() + m_sourceRect.width() * source.x(),
- m_sourceRect.y() + m_sourceRect.height() * source.y(),
- m_sourceRect.width() * source.width(),
- m_sourceRect.height() * source.height());
-
- QAbstractVideoSurface::Error error = m_painter->paint(target, painter, sourceRect);
-
- if (error != QAbstractVideoSurface::NoError) {
- setError(error);
-
- stop();
- }
- }
-}
-
-/*!
- \fn QPainterVideoSurface::frameChanged()
-*/
-
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
-
-/*!
-*/
-const QGLContext *QPainterVideoSurface::glContext() const
-{
- return m_glContext;
-}
-
-/*!
-*/
-void QPainterVideoSurface::setGLContext(QGLContext *context)
-{
- if (m_glContext == context)
- return;
-
- m_glContext = context;
-
- m_shaderTypes = NoShaders;
-
- if (m_glContext) {
- m_glContext->makeCurrent();
-
- const QByteArray extensions(reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS)));
-#ifndef QT_OPENGL_ES
-
- if (extensions.contains("ARB_fragment_program"))
- m_shaderTypes |= FragmentProgramShader;
-#endif
-
- if (QGLShaderProgram::hasOpenGLShaderPrograms(m_glContext)
- && extensions.contains("ARB_shader_objects"))
- m_shaderTypes |= GlslShader;
- }
-
- ShaderType type = (m_shaderType & m_shaderTypes)
- ? m_shaderType
- : NoShaders;
-
- if (type != m_shaderType || type != NoShaders) {
- m_shaderType = type;
-
- if (isActive()) {
- m_painter->stop();
- delete m_painter;
- m_painter = 0;
- m_ready = false;
-
- setError(ResourceError);
- QAbstractVideoSurface::stop();
- }
- emit supportedFormatsChanged();
- }
-}
-
-/*!
- \enum QPainterVideoSurface::ShaderType
-
- \value NoShaders
- \value FragmentProgramShader
- \value HlslShader
-*/
-
-/*!
- \typedef QPainterVideoSurface::ShaderTypes
-*/
-
-/*!
-*/
-QPainterVideoSurface::ShaderTypes QPainterVideoSurface::supportedShaderTypes() const
-{
- return m_shaderTypes;
-}
-
-/*!
-*/
-QPainterVideoSurface::ShaderType QPainterVideoSurface::shaderType() const
-{
- return m_shaderType;
-}
-
-/*!
-*/
-void QPainterVideoSurface::setShaderType(ShaderType type)
-{
- if (!(type & m_shaderTypes))
- type = NoShaders;
-
- if (type != m_shaderType) {
- m_shaderType = type;
-
- if (isActive()) {
- m_painter->stop();
- delete m_painter;
- m_painter = 0;
- m_ready = false;
-
- setError(ResourceError);
- QAbstractVideoSurface::stop();
- } else {
- delete m_painter;
- m_painter = 0;
- }
- emit supportedFormatsChanged();
- }
-}
-
-#endif
-
-void QPainterVideoSurface::createPainter()
-{
- Q_ASSERT(!m_painter);
-
-#ifdef Q_WS_MAC
- if (m_glContext)
- m_glContext->makeCurrent();
-
- m_painter = new QVideoSurfaceCoreGraphicsPainter(m_glContext != 0);
- return;
-#endif
-
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
- switch (m_shaderType) {
-#ifndef QT_OPENGL_ES
- case FragmentProgramShader:
- Q_ASSERT(m_glContext);
- m_glContext->makeCurrent();
- m_painter = new QVideoSurfaceArbFpPainter(m_glContext);
- break;
-#endif
- case GlslShader:
- Q_ASSERT(m_glContext);
- m_glContext->makeCurrent();
- m_painter = new QVideoSurfaceGlslPainter(m_glContext);
- break;
- default:
- m_painter = new QVideoSurfaceRasterPainter;
- break;
- }
-#else
- m_painter = new QVideoSurfaceRasterPainter;
-#endif
-}
-
-QT_END_NAMESPACE
-
-#include "moc_qpaintervideosurface_p.cpp"
-
-
diff --git a/src/multimedia/mediaservices/base/qpaintervideosurface_mac.mm b/src/multimedia/mediaservices/base/qpaintervideosurface_mac.mm
deleted file mode 100644
index 1154f86..0000000
--- a/src/multimedia/mediaservices/base/qpaintervideosurface_mac.mm
+++ /dev/null
@@ -1,283 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMultimedia 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 "qpaintervideosurface_mac_p.h"
-
-#include <QtCore/qdatetime.h>
-
-#include <qmath.h>
-
-#include <qpainter.h>
-#include <qvariant.h>
-#include <QtMultimedia/qvideosurfaceformat.h>
-
-#include <QtDebug>
-
-#include <QuartzCore/CIContext.h>
-#include <CGLCurrent.h>
-#include <gl.h>
-
-QT_BEGIN_NAMESPACE
-
-extern CGContextRef qt_mac_cg_context(const QPaintDevice *pdev); //qpaintdevice_mac.cpp
-
-QVideoSurfaceCoreGraphicsPainter::QVideoSurfaceCoreGraphicsPainter(bool glSupported)
- : ciContext(0)
- , m_imageFormat(QImage::Format_Invalid)
- , m_scanLineDirection(QVideoSurfaceFormat::TopToBottom)
-{
- //qDebug() << "QVideoSurfaceCoreGraphicsPainter, GL supported:" << glSupported;
- ciContext = 0;
- m_imagePixelFormats
- << QVideoFrame::Format_RGB32;
-
- m_supportedHandles
- << QAbstractVideoBuffer::NoHandle
- << QAbstractVideoBuffer::CoreImageHandle;
-
- if (glSupported)
- m_supportedHandles << QAbstractVideoBuffer::GLTextureHandle;
-}
-
-QVideoSurfaceCoreGraphicsPainter::~QVideoSurfaceCoreGraphicsPainter()
-{
- [(CIContext*)ciContext release];
-}
-
-QList<QVideoFrame::PixelFormat> QVideoSurfaceCoreGraphicsPainter::supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType) const
-{
- return m_supportedHandles.contains(handleType)
- ? m_imagePixelFormats
- : QList<QVideoFrame::PixelFormat>();
-}
-
-bool QVideoSurfaceCoreGraphicsPainter::isFormatSupported(
- const QVideoSurfaceFormat &format, QVideoSurfaceFormat *) const
-{
- return m_supportedHandles.contains(format.handleType())
- && m_imagePixelFormats.contains(format.pixelFormat())
- && !format.frameSize().isEmpty();
-}
-
-QAbstractVideoSurface::Error QVideoSurfaceCoreGraphicsPainter::start(const QVideoSurfaceFormat &format)
-{
- m_frame = QVideoFrame();
- m_imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat());
- m_imageSize = format.frameSize();
- m_scanLineDirection = format.scanLineDirection();
-
- return m_supportedHandles.contains(format.handleType())
- && m_imageFormat != QImage::Format_Invalid
- && !m_imageSize.isEmpty()
- ? QAbstractVideoSurface::NoError
- : QAbstractVideoSurface::UnsupportedFormatError;
-}
-
-void QVideoSurfaceCoreGraphicsPainter::stop()
-{
- m_frame = QVideoFrame();
-}
-
-QAbstractVideoSurface::Error QVideoSurfaceCoreGraphicsPainter::setCurrentFrame(const QVideoFrame &frame)
-{
- m_frame = frame;
-
- return QAbstractVideoSurface::NoError;
-}
-
-QAbstractVideoSurface::Error QVideoSurfaceCoreGraphicsPainter::paint(
- const QRectF &target, QPainter *painter, const QRectF &source)
-{
- if (m_frame.handleType() == QAbstractVideoBuffer::CoreImageHandle) {
- if (painter->paintEngine()->type() == QPaintEngine::CoreGraphics ) {
-
- CIImage *img = (CIImage*)(m_frame.handle().value<void*>());
-
- if (img) {
- CGContextRef cgContext = qt_mac_cg_context(painter->device());
-
- if (cgContext) {
- painter->beginNativePainting();
-
- CGRect sRect = CGRectMake(source.x(), source.y(), source.width(), source.height());
- CGRect dRect = CGRectMake(target.x(), target.y(), target.width(), target.height());
-
- NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc] initWithCIImage:img];
-
- if (m_scanLineDirection == QVideoSurfaceFormat::TopToBottom) {
- CGContextSaveGState( cgContext );
- CGContextTranslateCTM(cgContext, 0, dRect.origin.y + CGRectGetMaxY(dRect));
- CGContextScaleCTM(cgContext, 1, -1);
-
-#if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4)
- if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_4) {
- CGContextDrawImage(cgContext, dRect, [bitmap CGImage]);
- }
-#endif
-
- CGContextRestoreGState(cgContext);
- } else {
-#if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4)
- if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_4) {
- CGContextDrawImage(cgContext, dRect, [bitmap CGImage]);
- }
-#endif
- }
-
- [bitmap release];
-
- painter->endNativePainting();
-
- return QAbstractVideoSurface::NoError;
- }
- }
- } else if (painter->paintEngine()->type() == QPaintEngine::OpenGL2 ||
- painter->paintEngine()->type() == QPaintEngine::OpenGL) {
- CIImage *img = (CIImage*)(m_frame.handle().value<void*>());
-
- if (img) {
- CGLContextObj cglContext = CGLGetCurrentContext();
-
- if (cglContext) {
-
- if (!ciContext) {
- CGLContextObj cglContext = CGLGetCurrentContext();
- NSOpenGLPixelFormat *nsglPixelFormat = [NSOpenGLView defaultPixelFormat];
- CGLPixelFormatObj cglPixelFormat = static_cast<CGLPixelFormatObj>([nsglPixelFormat CGLPixelFormatObj]);
-
- ciContext = [CIContext contextWithCGLContext:cglContext
- pixelFormat:cglPixelFormat
- options:nil];
-
- [(CIContext*)ciContext retain];
- }
-
- CGRect sRect = CGRectMake(source.x(), source.y(), source.width(), source.height());
- CGRect dRect = m_scanLineDirection == QVideoSurfaceFormat::TopToBottom ?
- CGRectMake(target.x(), target.y()+target.height(), target.width(), -target.height()) :
- CGRectMake(target.x(), target.y(), target.width(), target.height());
-
-
- painter->beginNativePainting();
-
- [(CIContext*)ciContext drawImage:img inRect:dRect fromRect:sRect];
-
- painter->endNativePainting();
-
- return QAbstractVideoSurface::NoError;
- }
- }
- }
- }
-
- if (m_frame.handleType() == QAbstractVideoBuffer::GLTextureHandle &&
- (painter->paintEngine()->type() == QPaintEngine::OpenGL2 ||
- painter->paintEngine()->type() == QPaintEngine::OpenGL)) {
-
- painter->beginNativePainting();
- GLuint texture = m_frame.handle().toUInt();
-
- glDisable(GL_CULL_FACE);
- glEnable(GL_TEXTURE_2D);
-
- glBindTexture(GL_TEXTURE_2D, texture);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- const float txLeft = source.left() / m_frame.width();
- const float txRight = source.right() / m_frame.width();
- const float txTop = m_scanLineDirection == QVideoSurfaceFormat::TopToBottom
- ? source.top() / m_frame.height()
- : source.bottom() / m_frame.height();
- const float txBottom = m_scanLineDirection == QVideoSurfaceFormat::TopToBottom
- ? source.bottom() / m_frame.height()
- : source.top() / m_frame.height();
-
- glBegin(GL_QUADS);
- QRectF rect = target;
- glTexCoord2f(txLeft, txBottom);
- glVertex2f(rect.topLeft().x(), rect.topLeft().y());
- glTexCoord2f(txRight, txBottom);
- glVertex2f(rect.topRight().x() + 1, rect.topRight().y());
- glTexCoord2f(txRight, txTop);
- glVertex2f(rect.bottomRight().x() + 1, rect.bottomRight().y() + 1);
- glTexCoord2f(txLeft, txTop);
- glVertex2f(rect.bottomLeft().x(), rect.bottomLeft().y() + 1);
- glEnd();
- painter->endNativePainting();
-
- return QAbstractVideoSurface::NoError;
- }
-
- //fallback case, software rendering
- if (m_frame.map(QAbstractVideoBuffer::ReadOnly)) {
- QImage image(
- m_frame.bits(),
- m_imageSize.width(),
- m_imageSize.height(),
- m_frame.bytesPerLine(),
- m_imageFormat);
-
- if (m_scanLineDirection == QVideoSurfaceFormat::BottomToTop) {
- const QTransform oldTransform = painter->transform();
-
- painter->scale(1, -1);
- painter->translate(0, -target.bottom());
- painter->drawImage(
- QRectF(target.x(), 0, target.width(), target.height()), image, source);
- painter->setTransform(oldTransform);
- } else {
- painter->drawImage(target, image, source);
- }
-
- m_frame.unmap();
- } else {
- painter->fillRect(target, Qt::black);
- }
- return QAbstractVideoSurface::NoError;
-}
-
-void QVideoSurfaceCoreGraphicsPainter::updateColors(int, int, int, int)
-{
-}
-
-QT_END_NAMESPACE
diff --git a/src/multimedia/mediaservices/base/qpaintervideosurface_mac_p.h b/src/multimedia/mediaservices/base/qpaintervideosurface_mac_p.h
deleted file mode 100644
index 4f8a7a6..0000000
--- a/src/multimedia/mediaservices/base/qpaintervideosurface_mac_p.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QPAINTERVIDEOSURFACE_MAC_P_H
-#define QPAINTERVIDEOSURFACE_MAC_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 "qpaintervideosurface_p.h"
-#include <QtMultimedia/qvideosurfaceformat.h>
-#include <QtMultimedia/qvideoframe.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QVideoSurfaceCoreGraphicsPainter : public QVideoSurfacePainter
-{
-public:
- QVideoSurfaceCoreGraphicsPainter(bool glSupported);
- ~QVideoSurfaceCoreGraphicsPainter();
-
- QList<QVideoFrame::PixelFormat> supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType) const;
-
- bool isFormatSupported(
- const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const;
-
- QAbstractVideoSurface::Error start(const QVideoSurfaceFormat &format);
- void stop();
-
- QAbstractVideoSurface::Error setCurrentFrame(const QVideoFrame &frame);
-
- QAbstractVideoSurface::Error paint(
- const QRectF &target, QPainter *painter, const QRectF &source);
-
- void updateColors(int brightness, int contrast, int hue, int saturation);
-
-private:
- void* ciContext;
- QList<QVideoFrame::PixelFormat> m_imagePixelFormats;
- QVideoFrame m_frame;
- QSize m_imageSize;
- QImage::Format m_imageFormat;
- QVector<QAbstractVideoBuffer::HandleType> m_supportedHandles;
- QVideoSurfaceFormat::Direction m_scanLineDirection;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/multimedia/mediaservices/base/qpaintervideosurface_p.h b/src/multimedia/mediaservices/base/qpaintervideosurface_p.h
deleted file mode 100644
index 07b7e01..0000000
--- a/src/multimedia/mediaservices/base/qpaintervideosurface_p.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QPAINTERVIDEOSURFACE_P_H
-#define QPAINTERVIDEOSURFACE_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/qsize.h>
-#include <QtGui/qimage.h>
-#include <QtGui/qmatrix4x4.h>
-#include <QtGui/qpaintengine.h>
-#include <QtMultimedia/qabstractvideosurface.h>
-#include <QtMultimedia/qvideoframe.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGLContext;
-
-class QVideoSurfacePainter
-{
-public:
- virtual ~QVideoSurfacePainter();
-
- virtual QList<QVideoFrame::PixelFormat> supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType) const = 0;
-
- virtual bool isFormatSupported(
- const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const = 0;
-
- virtual QAbstractVideoSurface::Error start(const QVideoSurfaceFormat &format) = 0;
- virtual void stop() = 0;
-
- virtual QAbstractVideoSurface::Error setCurrentFrame(const QVideoFrame &frame) = 0;
-
- virtual QAbstractVideoSurface::Error paint(
- const QRectF &target, QPainter *painter, const QRectF &source) = 0;
-
- virtual void updateColors(int brightness, int contrast, int hue, int saturation) = 0;
-};
-
-class Q_MEDIASERVICES_EXPORT QPainterVideoSurface : public QAbstractVideoSurface
-{
- Q_OBJECT
-public:
- explicit QPainterVideoSurface(QObject *parent = 0);
- ~QPainterVideoSurface();
-
- QList<QVideoFrame::PixelFormat> supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const;
-
- bool isFormatSupported(
- const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar = 0) const;
-
- bool start(const QVideoSurfaceFormat &format);
- void stop();
-
- bool present(const QVideoFrame &frame);
-
- int brightness() const;
- void setBrightness(int brightness);
-
- int contrast() const;
- void setContrast(int contrast);
-
- int hue() const;
- void setHue(int hue);
-
- int saturation() const;
- void setSaturation(int saturation);
-
- bool isReady() const;
- void setReady(bool ready);
-
- void paint(QPainter *painter, const QRectF &target, const QRectF &source = QRectF(0, 0, 1, 1));
-
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
- const QGLContext *glContext() const;
- void setGLContext(QGLContext *context);
-
- enum ShaderType
- {
- NoShaders = 0x00,
- FragmentProgramShader = 0x01,
- GlslShader = 0x02
- };
-
- Q_DECLARE_FLAGS(ShaderTypes, ShaderType)
-
- ShaderTypes supportedShaderTypes() const;
-
- ShaderType shaderType() const;
- void setShaderType(ShaderType type);
-#endif
-
-Q_SIGNALS:
- void frameChanged();
-
-private:
- void createPainter();
-
- QVideoSurfacePainter *m_painter;
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
- QGLContext *m_glContext;
- ShaderTypes m_shaderTypes;
- ShaderType m_shaderType;
-#endif
- int m_brightness;
- int m_contrast;
- int m_hue;
- int m_saturation;
-
- QVideoFrame::PixelFormat m_pixelFormat;
- QSize m_frameSize;
- QRect m_sourceRect;
- bool m_colorsDirty;
- bool m_ready;
-};
-
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
-Q_DECLARE_OPERATORS_FOR_FLAGS(QPainterVideoSurface::ShaderTypes)
-#endif
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/multimedia/mediaservices/base/qtmedianamespace.h b/src/multimedia/mediaservices/base/qtmedianamespace.h
deleted file mode 100644
index 917c646..0000000
--- a/src/multimedia/mediaservices/base/qtmedianamespace.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QTMEDIANAMESPACE_H
-#define QTMEDIANAMESPACE_H
-
-#include <QtCore/qpair.h>
-#include <QtCore/qmetatype.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-namespace QtMediaServices
-{
- enum MetaData
- {
- // Common
- Title,
- SubTitle,
- Author,
- Comment,
- Description,
- Category,
- Genre,
- Year,
- Date,
- UserRating,
- Keywords,
- Language,
- Publisher,
- Copyright,
- ParentalRating,
- RatingOrganisation,
-
- // Media
- Size,
- MediaType,
- Duration,
-
- // Audio
- AudioBitRate,
- AudioCodec,
- AverageLevel,
- ChannelCount,
- PeakValue,
- SampleRate,
-
- // Music
- AlbumTitle,
- AlbumArtist,
- ContributingArtist,
- Composer,
- Conductor,
- Lyrics,
- Mood,
- TrackNumber,
- TrackCount,
-
- CoverArtUrlSmall,
- CoverArtUrlLarge,
-
- // Image/Video
- Resolution,
- PixelAspectRatio,
-
- // Video
- VideoFrameRate,
- VideoBitRate,
- VideoCodec,
-
- PosterUrl,
-
- // Movie
- ChapterNumber,
- Director,
- LeadPerformer,
- Writer,
-
- // Photos
- CameraManufacturer,
- CameraModel,
- Event,
- Subject,
- Orientation,
- ExposureTime,
- FNumber,
- ExposureProgram,
- ISOSpeedRatings,
- ExposureBiasValue,
- DateTimeOriginal,
- DateTimeDigitized,
- SubjectDistance,
- MeteringMode,
- LightSource,
- Flash,
- FocalLength,
- ExposureMode,
- WhiteBalance,
- DigitalZoomRatio,
- FocalLengthIn35mmFilm,
- SceneCaptureType,
- GainControl,
- Contrast,
- Saturation,
- Sharpness,
- DeviceSettingDescription,
-
- PosterImage,
- CoverArtImage,
- ThumbnailImage
-
- };
-
- enum SupportEstimate
- {
- NotSupported,
- MaybeSupported,
- ProbablySupported,
- PreferredService
- };
-
- enum EncodingQuality
- {
- VeryLowQuality,
- LowQuality,
- NormalQuality,
- HighQuality,
- VeryHighQuality
- };
-
- enum EncodingMode
- {
- ConstantQualityEncoding,
- ConstantBitRateEncoding,
- AverageBitRateEncoding,
- TwoPassEncoding
- };
-
- enum AvailabilityError
- {
- NoError,
- ServiceMissingError,
- BusyError,
- ResourceError
- };
-
-}
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/multimedia/mediaservices/base/qtmedianamespace.qdoc b/src/multimedia/mediaservices/base/qtmedianamespace.qdoc
deleted file mode 100644
index 54b856f..0000000
--- a/src/multimedia/mediaservices/base/qtmedianamespace.qdoc
+++ /dev/null
@@ -1,214 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMultimedia 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$
-**
-****************************************************************************/
-
-/*!
- \namespace QtMediaServices
- \ingroup multimedia-serv
-
- \brief The QtMediaServices namespace contains miscellaneous identifiers used
- throughout the Qt Media Services library.
-*/
-
-/*!
- \enum QtMediaServices::MetaData
-
- This enum provides identifiers for meta-data attributes.
-
- Common attributes
- \value Title The title of the media. QString.
- \value SubTitle The sub-title of the media. QString.
- \value Author The authors of the media. QStringList.
- \value Comment A user comment about the media. QString.
- \value Description A description of the media. QString
- \value Category The category of the media. QStringList.
- \value Genre The genre of the media. QStringList.
- \value Year The year of release of the media. int.
- \value Date The date of the media. QDate.
- \value UserRating A user rating of the media. int [0..100].
- \value Keywords A list of keywords describing the media. QStringList.
- \value Language The language of media, as an ISO 639-2 code.
-
- \value Publisher The publisher of the media. QString.
- \value Copyright The media's copyright notice. QString.
- \value ParentalRating The parental rating of the media. QString.
- \value RatingOrganisation The organisation responsible for the parental rating of the media.
- QString.
-
- Media attributes
- \value Size The size in bytes of the media. qint64
- \value MediaType The type of the media (audio, video, etc). QString.
- \value Duration The duration in millseconds of the media. qint64.
-
- Audio attributes
- \value AudioBitRate The bit rate of the media's audio stream in bits per second. int.
- \value AudioCodec The codec of the media's audio stream. QString.
- \value AverageLevel The average volume level of the media. int.
- \value ChannelCount The number of channels in the media's audio stream. int.
- \value PeakValue The peak volume of the media's audio stream. int
- \value SampleRate The sample rate of the media's audio stream in hertz. int
-
- Music attributes
- \value AlbumTitle The title of the album the media belongs to. QString.
- \value AlbumArtist The principal artist of the album the media belongs to. QString.
- \value ContributingArtist The artists contributing to the media. QStringList.
- \value Composer The composer of the media. QStringList.
- \value Conductor The conductor of the media. QString.
- \value Lyrics The lyrics to the media. QString.
- \value Mood The mood of the media. QString.
- \value TrackNumber The track number of the media. int.
- \value TrackCount The number of tracks on the album containing the media. int.
-
- \value CoverArtUrlSmall The URL of a small cover art image. QUrl.
- \value CoverArtUrlLarge The URL of a large cover art image. QUrl.
- \value CoverArtImage An embedded cover art image. QImage.
-
- Image and video attributes
- \value Resolution The dimensions of an image or video. QSize.
- \value PixelAspectRatio The pixel aspect ratio of an image or video. QSize.
-
- Video attributes
- \value VideoFrameRate The frame rate of the media's video stream. qreal.
- \value VideoBitRate The bit rate of the media's video stream in bits per second. int.
- \value VideoCodec The codec of the media's video stream. QString.
-
- \value PosterUrl The URL of a poster image. QUrl.
- \value PosterImage An embedded poster image. QImage.
-
- Movie attributes
- \value ChapterNumber The chapter number of the media. int.
- \value Director The director of the media. QString.
- \value LeadPerformer The lead performer in the media. QStringList.
- \value Writer The writer of the media. QStringList.
-
- Photo attributes.
- \value CameraManufacturer The manufacturer of the camera used to capture the media. QString.
- \value CameraModel The model of the camera used to capture the media. QString.
- \value Event The event during which the media was captured. QString.
- \value Subject The subject of the media. QString.
- \value Orientation Orientation of image.
- \value ExposureTime Exposure time, given in seconds.
- \value FNumber The F Number.
- \value ExposureProgram
- The class of the program used by the camera to set exposure when the picture is taken.
- \value ISOSpeedRatings
- Indicates the ISO Speed and ISO Latitude of the camera or input device as specified in ISO 12232.
- \value ExposureBiasValue
- The exposure bias.
- The unit is the APEX (Additive System of Photographic Exposure) setting.
- \value DateTimeOriginal The date and time when the original image data was generated.
- \value DateTimeDigitized The date and time when the image was stored as digital data.
- \value SubjectDistance The distance to the subject, given in meters.
- \value MeteringMode The metering mode.
- \value LightSource
- The kind of light source.
- \value Flash
- Status of flash when the image was shot.
- \value FocalLength
- The actual focal length of the lens, in mm.
- \value ExposureMode
- Indicates the exposure mode set when the image was shot.
- \value WhiteBalance
- Indicates the white balance mode set when the image was shot.
- \value DigitalZoomRatio
- Indicates the digital zoom ratio when the image was shot.
- \value FocalLengthIn35mmFilm
- Indicates the equivalent focal length assuming a 35mm film camera, in mm.
- \value SceneCaptureType
- Indicates the type of scene that was shot.
- It can also be used to record the mode in which the image was shot.
- \value GainControl
- Indicates the degree of overall image gain adjustment.
- \value Contrast
- Indicates the direction of contrast processing applied by the camera when the image was shot.
- \value Saturation
- Indicates the direction of saturation processing applied by the camera when the image was shot.
- \value Sharpness
- Indicates the direction of sharpness processing applied by the camera when the image was shot.
- \value DeviceSettingDescription
- Exif tag, indicates information on the picture-taking conditions of a particular camera model. QString
-
- \value ThumbnailImage An embedded thumbnail image. QImage.
-*/
-
-/*!
- \enum QtMediaServices::SupportEstimate
-
- Enumerates the levels of support a media service provider may have for a feature.
-
- \value NotSupported The feature is not supported.
- \value MaybeSupported The feature may be supported.
- \value ProbablySupported The feature is probably supported.
- \value PreferredService The service is the preferred provider of a service.
-*/
-
-/*!
- \enum QtMediaServices::EncodingQuality
-
- Enumerates quality encoding levels.
-
- \value VeryLowQuality
- \value LowQuality
- \value NormalQuality
- \value HighQuality
- \value VeryHighQuality
-*/
-
-/*!
- \enum QtMediaServices::EncodingMode
-
- Enumerates encoding modes.
-
- \value ConstantQualityEncoding
- \value ConstantBitRateEncoding
- \value AverageBitRateEncoding
- \value TwoPassEncoding
-*/
-
-/*!
- \enum QtMediaServices::AvailabilityError
-
- Enumerates Service status errors.
-
- \value NoError
- \value ServiceMissingError
- \value ResourceError
- \value BusyError
-*/
diff --git a/src/multimedia/mediaservices/base/qvideodevicecontrol.cpp b/src/multimedia/mediaservices/base/qvideodevicecontrol.cpp
deleted file mode 100644
index 30c56cf..0000000
--- a/src/multimedia/mediaservices/base/qvideodevicecontrol.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 <QtMediaServices/qvideodevicecontrol.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QVideoDeviceControl
- \preliminary
- \since 4.7
- \brief The QVideoDeviceControl class provides an video device selector media control.
- \ingroup multimedia-serv
-
- The QVideoDeviceControl class provides descriptions of the video devices
- available on a system and allows one to be selected as the endpoint of
- a media service.
-
- The interface name of QVideoDeviceControl is \c com.nokia.Qt.VideoDeviceControl as
- defined in QVideoDeviceControl_iid.
-*/
-
-/*!
- \macro QVideoDeviceControl_iid
-
- \c com.nokia.Qt.VideoDeviceControl
-
- Defines the interface name of the QVideoDeviceControl class.
-
- \relates QVideoDeviceControl
-*/
-
-/*!
- Constructs a video device control with the given \a parent.
-*/
-QVideoDeviceControl::QVideoDeviceControl(QObject *parent)
- :QMediaControl(parent)
-{
-}
-
-/*!
- Destroys a video device control.
-*/
-QVideoDeviceControl::~QVideoDeviceControl()
-{
-}
-
-/*!
- \fn QVideoDeviceControl::deviceCount() const
-
- Returns the number of available video devices;
-*/
-
-/*!
- \fn QVideoDeviceControl::deviceName(int index) const
-
- Returns the name of the video device at \a index.
-*/
-
-/*!
- \fn QVideoDeviceControl::deviceDescription(int index) const
-
- Returns a description of the video device at \a index.
-*/
-
-/*!
- \fn QVideoDeviceControl::deviceIcon(int index) const
-
- Returns an icon for the video device at \a index.
-*/
-
-/*!
- \fn QVideoDeviceControl::defaultDevice() const
-
- Returns the index of the default video device.
-*/
-
-/*!
- \fn QVideoDeviceControl::selectedDevice() const
-
- Returns the index of the selected video device.
-*/
-
-/*!
- \fn QVideoDeviceControl::setSelectedDevice(int index)
-
- Sets the selected video device \a index.
-*/
-
-/*!
- \fn QVideoDeviceControl::devicesChanged()
-
- Signals that the list of available video devices has changed.
-*/
-
-/*!
- \fn QVideoDeviceControl::selectedDeviceChanged(int index)
-
- Signals that the selected video device \a index has changed.
-*/
-
-/*!
- \fn QVideoDeviceControl::selectedDeviceChanged(const QString &name)
-
- Signals that the selected video device \a name has changed.
-*/
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#include "moc_qvideodevicecontrol.cpp"
-
-
diff --git a/src/multimedia/mediaservices/base/qvideodevicecontrol.h b/src/multimedia/mediaservices/base/qvideodevicecontrol.h
deleted file mode 100644
index 0b9235b..0000000
--- a/src/multimedia/mediaservices/base/qvideodevicecontrol.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QVIDEODEVICECONTROL_H
-#define QVIDEODEVICECONTROL_H
-
-#include <QtMediaServices/qmediacontrol.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-class Q_MEDIASERVICES_EXPORT QVideoDeviceControl : public QMediaControl
-{
- Q_OBJECT
-
-public:
- virtual ~QVideoDeviceControl();
-
- virtual int deviceCount() const = 0;
-
- virtual QString deviceName(int index) const = 0;
- virtual QString deviceDescription(int index) const = 0;
- virtual QIcon deviceIcon(int index) const = 0;
-
- virtual int defaultDevice() const = 0;
- virtual int selectedDevice() const = 0;
-
-public Q_SLOTS:
- virtual void setSelectedDevice(int index) = 0;
-
-Q_SIGNALS:
- void selectedDeviceChanged(int index);
- void selectedDeviceChanged(const QString &deviceName);
- void devicesChanged();
-
-protected:
- QVideoDeviceControl(QObject *parent = 0);
-};
-
-#define QVideoDeviceControl_iid "com.nokia.Qt.QVideoDeviceControl/1.0"
-Q_MEDIA_DECLARE_CONTROL(QVideoDeviceControl, QVideoDeviceControl_iid)
-
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QVIDEODEVICECONTROL_H
diff --git a/src/multimedia/mediaservices/base/qvideooutputcontrol.cpp b/src/multimedia/mediaservices/base/qvideooutputcontrol.cpp
deleted file mode 100644
index 532c892..0000000
--- a/src/multimedia/mediaservices/base/qvideooutputcontrol.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 <QtMediaServices/qvideooutputcontrol.h>
-
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QVideoOutputControl
- \preliminary
- \since 4.7
- \brief The QVideoOutputControl class provides a means of selecting the
- active video output control.
-
- \ingroup multimedia-serv
-
- There are multiple controls which a QMediaService may use to output
- video ony one of which may be active at one time, QVideoOutputControl
- is the means by which this active control is selected.
-
- The possible output controls are QVideoRendererControl,
- QVideoWindowControl, and QVideoWidgetControl.
-
- The interface name of QVideoOutputControl is \c com.nokia.Qt.QVideoOutputControl/1.0 as
- defined in QVideoOutputControl_iid.
-
- \sa QMediaService::control(), QVideoWidget, QVideoRendererControl,
- QVideoWindowControl, QVideoWidgetControl
-*/
-
-/*!
- \macro QVideoOutputControl_iid
-
- \c com.nokia.Qt.QVideoOutputControl/1.0
-
- Defines the interface name of the QVideoOutputControl class.
-
- \relates QVideoOutputControl
-*/
-
-/*!
- \enum QVideoOutputControl::Output
-
- Identifies the possible render targets of a video output.
-
- \value NoOutput Video is not rendered.
- \value WindowOutput Video is rendered to the target of a QVideoWindowControl.
- \value RendererOutput Video is rendered to the target of a QVideoRendererControl.
- \value WidgetOutput Video is rendered to a QWidget provided by QVideoWidgetControl.
- \value UserOutput Start value for user defined video targets.
- \value MaxUserOutput End value for user defined video targets.
-*/
-
-/*!
- Constructs a new video output control with the given \a parent.
-*/
-QVideoOutputControl::QVideoOutputControl(QObject *parent)
- : QMediaControl(parent)
-{
-}
-
-/*!
- Destroys a video output control.
-*/
-QVideoOutputControl::~QVideoOutputControl()
-{
-}
-
-/*!
- \fn QList<QVideoOutputControl::Output> QVideoOutputControl::availableOutputs() const
-
- Returns a list of available video output targets.
-*/
-
-/*!
- \fn QVideoOutputControl::output() const
-
- Returns the current video output target.
-*/
-
-/*!
- \fn QVideoOutputControl::setOutput(Output output)
-
- Sets the current video \a output target.
-*/
-
-/*!
- \fn QVideoOutputControl::availableOutputsChanged(const QList<QVideoOutputControl::Output> &outputs)
-
- Signals that available set of video \a outputs has changed.
-*/
-
-#include "moc_qvideooutputcontrol.cpp"
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qvideooutputcontrol.h b/src/multimedia/mediaservices/base/qvideooutputcontrol.h
deleted file mode 100644
index f87bb3c..0000000
--- a/src/multimedia/mediaservices/base/qvideooutputcontrol.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QVIDEOOUTPUTCONTROL_H
-#define QVIDEOOUTPUTCONTROL_H
-
-#include <QtMediaServices/qmediacontrol.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-
-class Q_MEDIASERVICES_EXPORT QVideoOutputControl : public QMediaControl
-{
- Q_OBJECT
-
-public:
- enum Output
- {
- NoOutput,
- WindowOutput,
- RendererOutput,
- WidgetOutput,
- UserOutput = 100,
- MaxUserOutput = 1000
- };
-
- ~QVideoOutputControl();
-
- virtual QList<Output> availableOutputs() const = 0;
-
- virtual Output output() const = 0;
- virtual void setOutput(Output output) = 0;
-
-Q_SIGNALS:
- void availableOutputsChanged(const QList<QVideoOutputControl::Output> &outputs);
-
-protected:
- QVideoOutputControl(QObject *parent = 0);
-};
-
-#define QVideoOutputControl_iid "com.nokia.Qt.QVideoOutputControl/1.0"
-Q_MEDIA_DECLARE_CONTROL(QVideoOutputControl, QVideoOutputControl_iid)
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/multimedia/mediaservices/base/qvideorenderercontrol.cpp b/src/multimedia/mediaservices/base/qvideorenderercontrol.cpp
deleted file mode 100644
index 6cc3138..0000000
--- a/src/multimedia/mediaservices/base/qvideorenderercontrol.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 <QtMediaServices/qvideorenderercontrol.h>
-
-#include "qmediacontrol_p.h"
-
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QVideoRendererControl
- \preliminary
- \since 4.7
- \brief The QVideoRendererControl class provides a control for rendering
- to a video surface.
-
- \ingroup multimedia-serv
-
- Using the surface() property of QVideoRendererControl a QAbstractVideoSurface
- may be set as the video render target of a QMediaService.
-
- \code
- QVideoRendererControl *rendererControl = mediaService->control<QVideoRendererControl *>();
- rendererControl->setSurface(myVideoSurface);
- \endcode
-
- QVideoRendererControl is one of number of possible video output controls,
- in order to receive video it must be made the active video output
- control by setting the output property of QVideoOutputControl to
- \l {QVideoOutputControl::RendererOutput}{RendererOutput}. Consequently any
- QMediaService that implements QVideoRendererControl must also implement
- QVideoOutputControl.
-
- \code
- QVideoOutputControl *outputControl = mediaService->control<QVideoOutputControl *>();
- outputControl->setOutput(QVideoOutputControl::RendererOutput);
- \endcode
-
- The interface name of QVideoRendererControl is \c com.nokia.Qt.QVideoRendererControl/1.0 as
- defined in QVideoRendererControl_iid.
-
- \sa QMediaService::control(), QVideoOutputControl, QVideoWidget
-*/
-
-/*!
- \macro QVideoRendererControl_iid
-
- \c com.nokia.Qt.QVideoRendererControl/1.0
-
- Defines the interface name of the QVideoRendererControl class.
-
- \relates QVideoRendererControl
-*/
-
-/*!
- Constructs a new video renderer media end point with the given \a parent.
-*/
-QVideoRendererControl::QVideoRendererControl(QObject *parent)
- : QMediaControl(parent)
-{
-}
-
-/*!
- Destroys a video renderer media end point.
-*/
-QVideoRendererControl::~QVideoRendererControl()
-{
-}
-
-/*!
- \fn QVideoRendererControl::surface() const
-
- Returns the surface a video producer renders to.
-*/
-
-/*!
- \fn QVideoRendererControl::setSurface(QAbstractVideoSurface *surface)
-
- Sets the \a surface a video producer renders to.
-*/
-
-#include "moc_qvideorenderercontrol.cpp"
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qvideorenderercontrol.h b/src/multimedia/mediaservices/base/qvideorenderercontrol.h
deleted file mode 100644
index 28e3d85..0000000
--- a/src/multimedia/mediaservices/base/qvideorenderercontrol.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QVIDEORENDERERCONTROL_H
-#define QVIDEORENDERERCONTROL_H
-
-#include <QtMediaServices/qmediacontrol.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-
-class QAbstractVideoSurface;
-
-class Q_MEDIASERVICES_EXPORT QVideoRendererControl : public QMediaControl
-{
- Q_OBJECT
-
-public:
- ~QVideoRendererControl();
-
- virtual QAbstractVideoSurface *surface() const = 0;
- virtual void setSurface(QAbstractVideoSurface *surface) = 0;
-
-protected:
- QVideoRendererControl(QObject *parent = 0);
-};
-
-#define QVideoRendererControl_iid "com.nokia.Qt.QVideoRendererControl/1.0"
-Q_MEDIA_DECLARE_CONTROL(QVideoRendererControl, QVideoRendererControl_iid)
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QVIDEORENDERERCONTROL_H
diff --git a/src/multimedia/mediaservices/base/qvideowidget.cpp b/src/multimedia/mediaservices/base/qvideowidget.cpp
deleted file mode 100644
index d39b1f4..0000000
--- a/src/multimedia/mediaservices/base/qvideowidget.cpp
+++ /dev/null
@@ -1,944 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 "qvideowidget_p.h"
-
-#include <QtMediaServices/qmediaobject.h>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qvideooutputcontrol.h>
-#include <QtMediaServices/qvideowindowcontrol.h>
-#include <QtMediaServices/qvideowidgetcontrol.h>
-
-#include "qpaintervideosurface_p.h"
-#include <QtMediaServices/qvideorenderercontrol.h>
-#include <QtMultimedia/qvideosurfaceformat.h>
-#include <qpainter.h>
-
-#include <qapplication.h>
-#include <qevent.h>
-#include <qdialog.h>
-#include <qboxlayout.h>
-#include <qnamespace.h>
-
-
-QT_BEGIN_NAMESPACE
-
-QVideoWidgetControlBackend::QVideoWidgetControlBackend(
- QVideoWidgetControl *control, QWidget *widget)
- : m_widgetControl(control)
-{
- connect(control, SIGNAL(brightnessChanged(int)), widget, SLOT(_q_brightnessChanged(int)));
- connect(control, SIGNAL(contrastChanged(int)), widget, SLOT(_q_contrastChanged(int)));
- connect(control, SIGNAL(hueChanged(int)), widget, SLOT(_q_hueChanged(int)));
- connect(control, SIGNAL(saturationChanged(int)), widget, SLOT(_q_saturationChanged(int)));
- connect(control, SIGNAL(fullScreenChanged(bool)), widget, SLOT(_q_fullScreenChanged(bool)));
-
- QBoxLayout *layout = new QVBoxLayout;
- layout->setMargin(0);
- layout->setSpacing(0);
- layout->addWidget(control->videoWidget());
-
- widget->setLayout(layout);
-}
-
-void QVideoWidgetControlBackend::setBrightness(int brightness)
-{
- m_widgetControl->setBrightness(brightness);
-}
-
-void QVideoWidgetControlBackend::setContrast(int contrast)
-{
- m_widgetControl->setContrast(contrast);
-}
-
-void QVideoWidgetControlBackend::setHue(int hue)
-{
- m_widgetControl->setHue(hue);
-}
-
-void QVideoWidgetControlBackend::setSaturation(int saturation)
-{
- m_widgetControl->setSaturation(saturation);
-}
-
-void QVideoWidgetControlBackend::setFullScreen(bool fullScreen)
-{
- m_widgetControl->setFullScreen(fullScreen);
-}
-
-
-Qt::AspectRatioMode QVideoWidgetControlBackend::aspectRatioMode() const
-{
- return m_widgetControl->aspectRatioMode();
-}
-
-void QVideoWidgetControlBackend::setAspectRatioMode(Qt::AspectRatioMode mode)
-{
- m_widgetControl->setAspectRatioMode(mode);
-}
-
-QRendererVideoWidgetBackend::QRendererVideoWidgetBackend(
- QVideoRendererControl *control, QWidget *widget)
- : m_rendererControl(control)
- , m_widget(widget)
- , m_surface(new QPainterVideoSurface)
- , m_aspectRatioMode(Qt::KeepAspectRatio)
- , m_updatePaintDevice(true)
-{
- connect(this, SIGNAL(brightnessChanged(int)), m_widget, SLOT(_q_brightnessChanged(int)));
- connect(this, SIGNAL(contrastChanged(int)), m_widget, SLOT(_q_contrastChanged(int)));
- connect(this, SIGNAL(hueChanged(int)), m_widget, SLOT(_q_hueChanged(int)));
- connect(this, SIGNAL(saturationChanged(int)), m_widget, SLOT(_q_saturationChanged(int)));
- connect(m_surface, SIGNAL(frameChanged()), this, SLOT(frameChanged()));
- connect(m_surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
- this, SLOT(formatChanged(QVideoSurfaceFormat)));
-
- m_rendererControl->setSurface(m_surface);
-}
-
-QRendererVideoWidgetBackend::~QRendererVideoWidgetBackend()
-{
- delete m_surface;
-}
-
-void QRendererVideoWidgetBackend::clearSurface()
-{
- m_rendererControl->setSurface(0);
-}
-
-void QRendererVideoWidgetBackend::setBrightness(int brightness)
-{
- m_surface->setBrightness(brightness);
-
- emit brightnessChanged(brightness);
-}
-
-void QRendererVideoWidgetBackend::setContrast(int contrast)
-{
- m_surface->setContrast(contrast);
-
- emit contrastChanged(contrast);
-}
-
-void QRendererVideoWidgetBackend::setHue(int hue)
-{
- m_surface->setHue(hue);
-
- emit hueChanged(hue);
-}
-
-void QRendererVideoWidgetBackend::setSaturation(int saturation)
-{
- m_surface->setSaturation(saturation);
-
- emit saturationChanged(saturation);
-}
-
-Qt::AspectRatioMode QRendererVideoWidgetBackend::aspectRatioMode() const
-{
- return m_aspectRatioMode;
-}
-
-void QRendererVideoWidgetBackend::setAspectRatioMode(Qt::AspectRatioMode mode)
-{
- m_aspectRatioMode = mode;
-
- m_widget->updateGeometry();
-}
-
-void QRendererVideoWidgetBackend::setFullScreen(bool)
-{
-}
-
-QSize QRendererVideoWidgetBackend::sizeHint() const
-{
- return m_surface->surfaceFormat().sizeHint();
-}
-
-void QRendererVideoWidgetBackend::showEvent()
-{
-}
-
-void QRendererVideoWidgetBackend::hideEvent(QHideEvent *)
-{
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
- m_updatePaintDevice = true;
- m_surface->setGLContext(0);
-#endif
-}
-
-void QRendererVideoWidgetBackend::resizeEvent(QResizeEvent *)
-{
- updateRects();
-}
-
-void QRendererVideoWidgetBackend::moveEvent(QMoveEvent *)
-{
-}
-
-void QRendererVideoWidgetBackend::paintEvent(QPaintEvent *event)
-{
- QPainter painter(m_widget);
-
- if (m_widget->testAttribute(Qt::WA_OpaquePaintEvent)) {
- QRegion borderRegion = event->region();
- borderRegion = borderRegion.subtracted(m_boundingRect);
-
- QBrush brush = m_widget->palette().window();
-
- QVector<QRect> rects = borderRegion.rects();
- for (QVector<QRect>::iterator it = rects.begin(), end = rects.end(); it != end; ++it) {
- painter.fillRect(*it, brush);
- }
- }
-
- if (m_surface->isActive() && m_boundingRect.intersects(event->rect())) {
- m_surface->paint(&painter, m_boundingRect, m_sourceRect);
-
- m_surface->setReady(true);
- } else {
- #if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
- if (m_updatePaintDevice && (painter.paintEngine()->type() == QPaintEngine::OpenGL
- || painter.paintEngine()->type() == QPaintEngine::OpenGL2)) {
- m_updatePaintDevice = false;
-
- m_surface->setGLContext(const_cast<QGLContext *>(QGLContext::currentContext()));
- if (m_surface->supportedShaderTypes() & QPainterVideoSurface::GlslShader) {
- m_surface->setShaderType(QPainterVideoSurface::GlslShader);
- } else {
- m_surface->setShaderType(QPainterVideoSurface::FragmentProgramShader);
- }
- }
-#endif
- }
-
-}
-
-void QRendererVideoWidgetBackend::formatChanged(const QVideoSurfaceFormat &format)
-{
- m_nativeSize = format.sizeHint();
-
- updateRects();
-
- m_widget->updateGeometry();
- m_widget->update();
-}
-
-void QRendererVideoWidgetBackend::frameChanged()
-{
- m_widget->update(m_boundingRect);
-}
-
-void QRendererVideoWidgetBackend::updateRects()
-{
- QRect rect = m_widget->rect();
-
- if (m_nativeSize.isEmpty()) {
- m_boundingRect = QRect();
- } else if (m_aspectRatioMode == Qt::IgnoreAspectRatio) {
- m_boundingRect = rect;
- m_sourceRect = QRectF(0, 0, 1, 1);
- } else if (m_aspectRatioMode == Qt::KeepAspectRatio) {
- QSize size = m_nativeSize;
- size.scale(rect.size(), Qt::KeepAspectRatio);
-
- m_boundingRect = QRect(0, 0, size.width(), size.height());
- m_boundingRect.moveCenter(rect.center());
-
- m_sourceRect = QRectF(0, 0, 1, 1);
- } else if (m_aspectRatioMode == Qt::KeepAspectRatioByExpanding) {
- m_boundingRect = rect;
-
- QSizeF size = rect.size();
- size.scale(m_nativeSize, Qt::KeepAspectRatio);
-
- m_sourceRect = QRectF(
- 0, 0, size.width() / m_nativeSize.width(), size.height() / m_nativeSize.height());
- m_sourceRect.moveCenter(QPointF(0.5, 0.5));
- }
-}
-
-QWindowVideoWidgetBackend::QWindowVideoWidgetBackend(QVideoWindowControl *control, QWidget *widget)
- : m_windowControl(control)
- , m_widget(widget)
- , m_aspectRatioMode(Qt::KeepAspectRatio)
-{
- connect(control, SIGNAL(brightnessChanged(int)), m_widget, SLOT(_q_brightnessChanged(int)));
- connect(control, SIGNAL(contrastChanged(int)), m_widget, SLOT(_q_contrastChanged(int)));
- connect(control, SIGNAL(hueChanged(int)), m_widget, SLOT(_q_hueChanged(int)));
- connect(control, SIGNAL(saturationChanged(int)), m_widget, SLOT(_q_saturationChanged(int)));
- connect(control, SIGNAL(fullScreenChanged(bool)), m_widget, SLOT(_q_fullScreenChanged(bool)));
- connect(control, SIGNAL(nativeSizeChanged()), m_widget, SLOT(_q_dimensionsChanged()));
-}
-
-QWindowVideoWidgetBackend::~QWindowVideoWidgetBackend()
-{
-}
-
-void QWindowVideoWidgetBackend::setBrightness(int brightness)
-{
- m_windowControl->setBrightness(brightness);
-}
-
-void QWindowVideoWidgetBackend::setContrast(int contrast)
-{
- m_windowControl->setContrast(contrast);
-}
-
-void QWindowVideoWidgetBackend::setHue(int hue)
-{
- m_windowControl->setHue(hue);
-}
-
-void QWindowVideoWidgetBackend::setSaturation(int saturation)
-{
- m_windowControl->setSaturation(saturation);
-}
-
-void QWindowVideoWidgetBackend::setFullScreen(bool fullScreen)
-{
- m_windowControl->setFullScreen(fullScreen);
-}
-
-Qt::AspectRatioMode QWindowVideoWidgetBackend::aspectRatioMode() const
-{
- return m_windowControl->aspectRatioMode();
-}
-
-void QWindowVideoWidgetBackend::setAspectRatioMode(Qt::AspectRatioMode mode)
-{
- m_windowControl->setAspectRatioMode(mode);
-}
-
-QSize QWindowVideoWidgetBackend::sizeHint() const
-{
- return m_windowControl->nativeSize();
-}
-
-void QWindowVideoWidgetBackend::showEvent()
-{
- m_windowControl->setWinId(m_widget->winId());
-
- m_windowControl->setDisplayRect(m_widget->rect());
-}
-
-void QWindowVideoWidgetBackend::hideEvent(QHideEvent *)
-{
-}
-
-void QWindowVideoWidgetBackend::moveEvent(QMoveEvent *)
-{
- m_windowControl->setDisplayRect(m_widget->rect());
-}
-
-void QWindowVideoWidgetBackend::resizeEvent(QResizeEvent *)
-{
- m_windowControl->setDisplayRect(m_widget->rect());
-}
-
-void QWindowVideoWidgetBackend::paintEvent(QPaintEvent *event)
-{
- if (m_widget->testAttribute(Qt::WA_OpaquePaintEvent)) {
- QPainter painter(m_widget);
-
- painter.fillRect(event->rect(), m_widget->palette().window());
- }
-
- m_windowControl->repaint();
-
- event->accept();
-}
-
-void QVideoWidgetPrivate::setCurrentControl(QVideoWidgetControlInterface *control)
-{
- if (currentControl != control) {
- currentControl = control;
-
- currentControl->setBrightness(brightness);
- currentControl->setContrast(contrast);
- currentControl->setHue(hue);
- currentControl->setSaturation(saturation);
- currentControl->setAspectRatioMode(aspectRatioMode);
- }
-}
-
-void QVideoWidgetPrivate::show()
-{
- if (outputControl) {
- if (widgetBackend != 0) {
- setCurrentControl(widgetBackend);
- outputControl->setOutput(QVideoOutputControl::WidgetOutput);
- } else if (windowBackend != 0 && (q_func()->window() == 0
- || !q_func()->window()->testAttribute(Qt::WA_DontShowOnScreen))) {
- windowBackend->showEvent();
- currentBackend = windowBackend;
- setCurrentControl(windowBackend);
- outputControl->setOutput(QVideoOutputControl::WindowOutput);
- } else if (rendererBackend != 0) {
- rendererBackend->showEvent();
- currentBackend = rendererBackend;
- setCurrentControl(rendererBackend);
- outputControl->setOutput(QVideoOutputControl::RendererOutput);
- } else {
- outputControl->setOutput(QVideoOutputControl::NoOutput);
- }
- }
-}
-
-void QVideoWidgetPrivate::clearService()
-{
- if (service) {
- QObject::disconnect(service, SIGNAL(destroyed()), q_func(), SLOT(_q_serviceDestroyed()));
-
- if (outputControl)
- outputControl->setOutput(QVideoOutputControl::NoOutput);
-
- if (widgetBackend) {
- QLayout *layout = q_func()->layout();
-
- for (QLayoutItem *item = layout->takeAt(0); item; item = layout->takeAt(0)) {
- item->widget()->setParent(0);
- delete item;
- }
- delete layout;
-
- delete widgetBackend;
- widgetBackend = 0;
- }
-
- delete windowBackend;
- windowBackend = 0;
-
- if (rendererBackend) {
- rendererBackend->clearSurface();
-
- delete rendererBackend;
- rendererBackend = 0;
- }
-
- currentBackend = 0;
- currentControl = 0;
- outputControl = 0;
- service = 0;
- }
-}
-
-void QVideoWidgetPrivate::_q_serviceDestroyed()
-{
- if (widgetBackend) {
- delete q_func()->layout();
-
- delete widgetBackend;
- widgetBackend = 0;
- }
-
- delete windowBackend;
- windowBackend = 0;
-
- delete rendererBackend;
- rendererBackend = 0;
-
- currentControl = 0;
- currentBackend = 0;
- outputControl = 0;
- service = 0;
-}
-
-void QVideoWidgetPrivate::_q_mediaObjectDestroyed()
-{
- mediaObject = 0;
- clearService();
-}
-
-void QVideoWidgetPrivate::_q_brightnessChanged(int b)
-{
- if (b != brightness)
- emit q_func()->brightnessChanged(brightness = b);
-}
-
-void QVideoWidgetPrivate::_q_contrastChanged(int c)
-{
- if (c != contrast)
- emit q_func()->contrastChanged(contrast = c);
-}
-
-void QVideoWidgetPrivate::_q_hueChanged(int h)
-{
- if (h != hue)
- emit q_func()->hueChanged(hue = h);
-}
-
-void QVideoWidgetPrivate::_q_saturationChanged(int s)
-{
- if (s != saturation)
- emit q_func()->saturationChanged(saturation = s);
-}
-
-
-void QVideoWidgetPrivate::_q_fullScreenChanged(bool fullScreen)
-{
- if (!fullScreen && q_func()->isFullScreen())
- q_func()->showNormal();
-}
-
-void QVideoWidgetPrivate::_q_dimensionsChanged()
-{
- q_func()->updateGeometry();
- q_func()->update();
-}
-
-/*!
- \class QVideoWidget
- \preliminary
- \since 4.7
- \brief The QVideoWidget class provides a widget which presents video
- produced by a media object.
- \ingroup multimedia
-
- Attaching a QVideoWidget to a QMediaObject allows it to display the
- video or image output of that media object. A QVideoWidget is attached
- to media object by passing a pointer to the QMediaObject in its
- constructor, and detached by destroying the QVideoWidget.
-
- \code
- player = new QMediaPlayer;
-
- widget = new QVideoWidget(player);
- widget->show();
-
- player->setMedia(QUrl("http://example.com/movie.mp4"));
- player->play();
- \endcode
-
- \bold {Note}: Only a single display output can be attached to a media
- object at one time.
-
- \sa QMediaObject, QMediaPlayer, QGraphicsVideoItem
-*/
-
-/*!
- Constructs a new video widget.
-
- The \a parent is passed to QWidget.
-*/
-QVideoWidget::QVideoWidget(QWidget *parent)
- : QWidget(parent, 0)
- , d_ptr(new QVideoWidgetPrivate)
-{
- d_ptr->q_ptr = this;
-}
-
-/*!
- Destroys a video widget.
-*/
-QVideoWidget::~QVideoWidget()
-{
- setMediaObject(0);
- delete d_ptr;
-}
-
-/*!
- \property QVideoWidget::mediaObject
- \brief the media object which provides the video displayed by a widget.
-*/
-
-QMediaObject *QVideoWidget::mediaObject() const
-{
- return d_func()->mediaObject;
-}
-
-void QVideoWidget::setMediaObject(QMediaObject *object)
-{
- Q_D(QVideoWidget);
-
- if (object == d->mediaObject)
- return;
-
- if (d->mediaObject) {
- disconnect(d->mediaObject, SIGNAL(destroyed()), this, SLOT(_q_mediaObjectDestroyed()));
- d->mediaObject->unbind(this);
- }
-
- d->clearService();
-
- d->mediaObject = object;
-
- if (d->mediaObject) {
- d->service = d->mediaObject->service();
-
- connect(d->mediaObject, SIGNAL(destroyed()), this, SLOT(_q_mediaObjectDestroyed()));
- d->mediaObject->bind(this);
- }
-
- if (d->service) {
- connect(d->service, SIGNAL(destroyed()), SLOT(_q_serviceDestroyed()));
-
- d->outputControl = qobject_cast<QVideoOutputControl *>(
- d->service->control(QVideoOutputControl_iid));
-
- QVideoWidgetControl *widgetControl = qobject_cast<QVideoWidgetControl *>(
- d->service->control(QVideoWidgetControl_iid));
-
- if (widgetControl != 0) {
- d->widgetBackend = new QVideoWidgetControlBackend(widgetControl, this);
- } else {
- QVideoWindowControl *windowControl = qobject_cast<QVideoWindowControl *>(
- d->service->control(QVideoWindowControl_iid));
-
- if (windowControl != 0)
- d->windowBackend = new QWindowVideoWidgetBackend(windowControl, this);
-
- QVideoRendererControl *rendererControl = qobject_cast<QVideoRendererControl *>(
- d->service->control(QVideoRendererControl_iid));
-
- if (rendererControl != 0)
- d->rendererBackend = new QRendererVideoWidgetBackend(rendererControl, this);
- }
-
- if (isVisible())
- d->show();
- }
-}
-
-/*!
- \property QVideoWidget::aspectRatioMode
- \brief how video is scaled with respect to its aspect ratio.
-*/
-
-Qt::AspectRatioMode QVideoWidget::aspectRatioMode() const
-{
- return d_func()->aspectRatioMode;
-}
-
-void QVideoWidget::setAspectRatioMode(Qt::AspectRatioMode mode)
-{
- Q_D(QVideoWidget);
-
- if (d->currentControl) {
- d->currentControl->setAspectRatioMode(mode);
- d->aspectRatioMode = d->currentControl->aspectRatioMode();
- } else {
- d->aspectRatioMode = mode;
- }
-}
-
-/*!
- \property QVideoWidget::fullScreen
- \brief whether video display is confined to a window or is fullScreen.
-*/
-
-void QVideoWidget::setFullScreen(bool fullScreen)
-{
- Q_D(QVideoWidget);
-
- if (fullScreen) {
- Qt::WindowFlags flags = windowFlags();
-
- d->nonFullScreenFlags = flags & (Qt::Window | Qt::SubWindow);
- flags |= Qt::Window;
- flags &= ~Qt::SubWindow;
- setWindowFlags(flags);
-
- showFullScreen();
- } else {
- showNormal();
- }
-}
-
-/*!
- \fn QVideoWidget::fullScreenChanged(bool fullScreen)
-
- Signals that the \a fullScreen mode of a video widget has changed.
-
- \sa fullScreen
-*/
-
-/*!
- \property QVideoWidget::brightness
- \brief an adjustment to the brightness of displayed video.
-
- Valid brightness values range between -100 and 100, the default is 0.
-*/
-
-int QVideoWidget::brightness() const
-{
- return d_func()->brightness;
-}
-
-void QVideoWidget::setBrightness(int brightness)
-{
- Q_D(QVideoWidget);
-
- int boundedBrightness = qBound(-100, brightness, 100);
-
- if (d->currentControl)
- d->currentControl->setBrightness(boundedBrightness);
- else if (d->brightness != boundedBrightness)
- emit brightnessChanged(d->brightness = boundedBrightness);
-}
-
-/*!
- \fn QVideoWidget::brightnessChanged(int brightness)
-
- Signals that a video widgets's \a brightness adjustment has changed.
-
- \sa brightness
-*/
-
-/*!
- \property QVideoWidget::contrast
- \brief an adjustment to the contrast of displayed video.
-
- Valid contrast values range between -100 and 100, the default is 0.
-
-*/
-
-int QVideoWidget::contrast() const
-{
- return d_func()->contrast;
-}
-
-void QVideoWidget::setContrast(int contrast)
-{
- Q_D(QVideoWidget);
-
- int boundedContrast = qBound(-100, contrast, 100);
-
- if (d->currentControl)
- d->currentControl->setContrast(boundedContrast);
- else if (d->contrast != boundedContrast)
- emit contrastChanged(d->contrast = boundedContrast);
-}
-
-/*!
- \fn QVideoWidget::contrastChanged(int contrast)
-
- Signals that a video widgets's \a contrast adjustment has changed.
-
- \sa contrast
-*/
-
-/*!
- \property QVideoWidget::hue
- \brief an adjustment to the hue of displayed video.
-
- Valid hue values range between -100 and 100, the default is 0.
-*/
-
-int QVideoWidget::hue() const
-{
- return d_func()->hue;
-}
-
-void QVideoWidget::setHue(int hue)
-{
- Q_D(QVideoWidget);
-
- int boundedHue = qBound(-100, hue, 100);
-
- if (d->currentControl)
- d->currentControl->setHue(boundedHue);
- else if (d->hue != boundedHue)
- emit hueChanged(d->hue = boundedHue);
-}
-
-/*!
- \fn QVideoWidget::hueChanged(int hue)
-
- Signals that a video widgets's \a hue has changed.
-
- \sa hue
-*/
-
-/*!
- \property QVideoWidget::saturation
- \brief an adjustment to the saturation of displayed video.
-
- Valid saturation values range between -100 and 100, the default is 0.
-*/
-
-int QVideoWidget::saturation() const
-{
- return d_func()->saturation;
-}
-
-void QVideoWidget::setSaturation(int saturation)
-{
- Q_D(QVideoWidget);
-
- int boundedSaturation = qBound(-100, saturation, 100);
-
- if (d->currentControl)
- d->currentControl->setSaturation(boundedSaturation);
- else if (d->saturation != boundedSaturation)
- emit saturationChanged(d->saturation = boundedSaturation);
-
-}
-
-/*!
- \fn QVideoWidget::saturationChanged(int saturation)
-
- Signals that a video widgets's \a saturation has changed.
-
- \sa saturation
-*/
-
-/*!
- Returns the size hint for the current back end,
- if there is one, or else the size hint from QWidget.
- */
-QSize QVideoWidget::sizeHint() const
-{
- Q_D(const QVideoWidget);
-
- if (d->currentBackend)
- return d->currentBackend->sizeHint();
- else
- return QWidget::sizeHint();
-
-
-}
-
-/*!
- \reimp
- \internal
- */
-bool QVideoWidget::event(QEvent *event)
-{
- Q_D(QVideoWidget);
-
- if (event->type() == QEvent::WindowStateChange) {
- Qt::WindowFlags flags = windowFlags();
-
- if (windowState() & Qt::WindowFullScreen) {
- if (d->currentControl)
- d->currentControl->setFullScreen(true);
-
- if (!d->wasFullScreen)
- emit fullScreenChanged(d->wasFullScreen = true);
- } else {
- if (d->currentControl)
- d->currentControl->setFullScreen(false);
-
- if (d->wasFullScreen) {
- flags &= ~(Qt::Window | Qt::SubWindow); //clear the flags...
- flags |= d->nonFullScreenFlags; //then we reset the flags (window and subwindow)
- setWindowFlags(flags);
-
- emit fullScreenChanged(d->wasFullScreen = false);
- }
- }
- }
- return QWidget::event(event);
-}
-
-/*!
- Handles the show \a event.
- */
-void QVideoWidget::showEvent(QShowEvent *event)
-{
- Q_D(QVideoWidget);
-
- QWidget::showEvent(event);
-
- d->show();
-
-}
-
-/*!
-
- Handles the hide \a event.
-*/
-void QVideoWidget::hideEvent(QHideEvent *event)
-{
- Q_D(QVideoWidget);
-
- if (d->currentBackend)
- d->currentBackend->hideEvent(event);
-
- QWidget::hideEvent(event);
-}
-
-/*!
- Handles the resize \a event.
- */
-void QVideoWidget::resizeEvent(QResizeEvent *event)
-{
- Q_D(QVideoWidget);
-
- QWidget::resizeEvent(event);
-
- if (d->currentBackend)
- d->currentBackend->resizeEvent(event);
-}
-
-/*!
- Handles the move \a event.
- */
-void QVideoWidget::moveEvent(QMoveEvent *event)
-{
- Q_D(QVideoWidget);
-
- if (d->currentBackend)
- d->currentBackend->moveEvent(event);
-}
-
-/*!
- Handles the paint \a event.
- */
-void QVideoWidget::paintEvent(QPaintEvent *event)
-{
- Q_D(QVideoWidget);
-
- if (d->currentBackend) {
- d->currentBackend->paintEvent(event);
- } else if (testAttribute(Qt::WA_OpaquePaintEvent)) {
- QPainter painter(this);
-
- painter.fillRect(event->rect(), palette().window());
- }
-}
-
-#include "moc_qvideowidget.cpp"
-#include "moc_qvideowidget_p.cpp"
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qvideowidget.h b/src/multimedia/mediaservices/base/qvideowidget.h
deleted file mode 100644
index a21739a..0000000
--- a/src/multimedia/mediaservices/base/qvideowidget.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QVIDEOWIDGET_H
-#define QVIDEOWIDGET_H
-
-#include <QtGui/qwidget.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-
-class QMediaObject;
-
-class QVideoWidgetPrivate;
-class Q_MEDIASERVICES_EXPORT QVideoWidget : public QWidget
-{
- Q_OBJECT
- Q_PROPERTY(QMediaObject* mediaObject READ mediaObject WRITE setMediaObject)
- Q_PROPERTY(bool fullScreen READ isFullScreen WRITE setFullScreen NOTIFY fullScreenChanged)
- Q_PROPERTY(Qt::AspectRatioMode aspectRatioMode READ aspectRatioMode WRITE setAspectRatioMode NOTIFY aspectRatioModeChanged)
- Q_PROPERTY(int brightness READ brightness WRITE setBrightness NOTIFY brightnessChanged)
- Q_PROPERTY(int contrast READ contrast WRITE setContrast NOTIFY contrastChanged)
- Q_PROPERTY(int hue READ hue WRITE setHue NOTIFY hueChanged)
- Q_PROPERTY(int saturation READ saturation WRITE setSaturation NOTIFY saturationChanged)
-
-public:
- QVideoWidget(QWidget *parent = 0);
- ~QVideoWidget();
-
- QMediaObject *mediaObject() const;
- void setMediaObject(QMediaObject *object);
-
-#ifdef Q_QDOC
- bool isFullScreen() const;
-#endif
-
- Qt::AspectRatioMode aspectRatioMode() const;
-
- int brightness() const;
- int contrast() const;
- int hue() const;
- int saturation() const;
-
- QSize sizeHint() const;
-
-public Q_SLOTS:
- void setFullScreen(bool fullScreen);
- void setAspectRatioMode(Qt::AspectRatioMode mode);
- void setBrightness(int brightness);
- void setContrast(int contrast);
- void setHue(int hue);
- void setSaturation(int saturation);
-
-Q_SIGNALS:
- void fullScreenChanged(bool fullScreen);
- void brightnessChanged(int brightness);
- void contrastChanged(int contrast);
- void hueChanged(int hue);
- void saturationChanged(int saturation);
-
-protected:
- bool event(QEvent *event);
- void showEvent(QShowEvent *event);
- void hideEvent(QHideEvent *event);
- void resizeEvent(QResizeEvent *event);
- void moveEvent(QMoveEvent *event);
- void paintEvent(QPaintEvent *event);
-
-protected:
- QVideoWidgetPrivate *d_ptr;
-
-private:
- Q_DECLARE_PRIVATE(QVideoWidget)
- Q_PRIVATE_SLOT(d_func(), void _q_serviceDestroyed())
- Q_PRIVATE_SLOT(d_func(), void _q_mediaObjectDestroyed())
- Q_PRIVATE_SLOT(d_func(), void _q_brightnessChanged(int))
- Q_PRIVATE_SLOT(d_func(), void _q_contrastChanged(int))
- Q_PRIVATE_SLOT(d_func(), void _q_hueChanged(int))
- Q_PRIVATE_SLOT(d_func(), void _q_saturationChanged(int))
- Q_PRIVATE_SLOT(d_func(), void _q_fullScreenChanged(bool))
- Q_PRIVATE_SLOT(d_func(), void _q_dimensionsChanged())
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/multimedia/mediaservices/base/qvideowidget_p.h b/src/multimedia/mediaservices/base/qvideowidget_p.h
deleted file mode 100644
index bb44dfa..0000000
--- a/src/multimedia/mediaservices/base/qvideowidget_p.h
+++ /dev/null
@@ -1,271 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QVIDEOWIDGET_P_H
-#define QVIDEOWIDGET_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 <QtMediaServices/qvideowidget.h>
-
-#ifndef QT_NO_OPENGL
-#include <QGLWidget>
-#endif
-
-#include "qpaintervideosurface_p.h"
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
-class QVideoWidgetControlInterface
-{
-public:
- virtual ~QVideoWidgetControlInterface() {}
-
- virtual void setBrightness(int brightness) = 0;
- virtual void setContrast(int contrast) = 0;
- virtual void setHue(int hue) = 0;
- virtual void setSaturation(int saturation) = 0;
-
- virtual void setFullScreen(bool fullScreen) = 0;
-
- virtual Qt::AspectRatioMode aspectRatioMode() const = 0;
- virtual void setAspectRatioMode(Qt::AspectRatioMode mode) = 0;
-};
-
-class QVideoWidgetBackend : public QObject, public QVideoWidgetControlInterface
-{
- Q_OBJECT
-
-public:
- virtual QSize sizeHint() const = 0;
-
- virtual void showEvent() = 0;
- virtual void hideEvent(QHideEvent *event) = 0;
- virtual void resizeEvent(QResizeEvent *event) = 0;
- virtual void moveEvent(QMoveEvent *event) = 0;
- virtual void paintEvent(QPaintEvent *event) = 0;
-};
-
-class QVideoWidgetControl;
-
-class QVideoWidgetControlBackend : public QObject, public QVideoWidgetControlInterface
-{
- Q_OBJECT
-public:
- QVideoWidgetControlBackend(QVideoWidgetControl *control, QWidget *widget);
-
- void setBrightness(int brightness);
- void setContrast(int contrast);
- void setHue(int hue);
- void setSaturation(int saturation);
-
- void setFullScreen(bool fullScreen);
-
- Qt::AspectRatioMode aspectRatioMode() const;
- void setAspectRatioMode(Qt::AspectRatioMode mode);
-
-private:
- QVideoWidgetControl *m_widgetControl;
-};
-
-
-class QVideoRendererControl;
-
-class QRendererVideoWidgetBackend : public QVideoWidgetBackend
-{
- Q_OBJECT
-public:
- QRendererVideoWidgetBackend(QVideoRendererControl *control, QWidget *widget);
- ~QRendererVideoWidgetBackend();
-
- void clearSurface();
-
- void setBrightness(int brightness);
- void setContrast(int contrast);
- void setHue(int hue);
- void setSaturation(int saturation);
-
- void setFullScreen(bool fullScreen);
-
- Qt::AspectRatioMode aspectRatioMode() const;
- void setAspectRatioMode(Qt::AspectRatioMode mode);
-
- QSize sizeHint() const;
-
- void showEvent();
- void hideEvent(QHideEvent *event);
- void resizeEvent(QResizeEvent *event);
- void moveEvent(QMoveEvent *event);
- void paintEvent(QPaintEvent *event);
-
-Q_SIGNALS:
- void fullScreenChanged(bool fullScreen);
- void brightnessChanged(int brightness);
- void contrastChanged(int contrast);
- void hueChanged(int hue);
- void saturationChanged(int saturation);
-
-private Q_SLOTS:
- void formatChanged(const QVideoSurfaceFormat &format);
- void frameChanged();
-
-private:
- void updateRects();
-
- QVideoRendererControl *m_rendererControl;
- QWidget *m_widget;
- QPainterVideoSurface *m_surface;
- Qt::AspectRatioMode m_aspectRatioMode;
- QRect m_boundingRect;
- QRectF m_sourceRect;
- QSize m_nativeSize;
- bool m_updatePaintDevice;
-};
-
-class QVideoWindowControl;
-
-class QWindowVideoWidgetBackend : public QVideoWidgetBackend
-{
- Q_OBJECT
-public:
- QWindowVideoWidgetBackend(QVideoWindowControl *control, QWidget *widget);
- ~QWindowVideoWidgetBackend();
-
- void setBrightness(int brightness);
- void setContrast(int contrast);
- void setHue(int hue);
- void setSaturation(int saturation);
-
- void setFullScreen(bool fullScreen);
-
- Qt::AspectRatioMode aspectRatioMode() const;
- void setAspectRatioMode(Qt::AspectRatioMode mode);
-
- QSize sizeHint() const;
-
- void showEvent();
- void hideEvent(QHideEvent *event);
- void resizeEvent(QResizeEvent *event);
- void moveEvent(QMoveEvent *event);
- void paintEvent(QPaintEvent *event);
-
-private:
- QVideoWindowControl *m_windowControl;
- QWidget *m_widget;
- Qt::AspectRatioMode m_aspectRatioMode;
- QSize m_pixelAspectRatio;
-};
-
-class QMediaService;
-class QVideoOutputControl;
-
-class QVideoWidgetPrivate
-{
- Q_DECLARE_PUBLIC(QVideoWidget)
-public:
- QVideoWidgetPrivate()
- : q_ptr(0)
- , mediaObject(0)
- , service(0)
- , outputControl(0)
- , widgetBackend(0)
- , windowBackend(0)
- , rendererBackend(0)
- , currentControl(0)
- , currentBackend(0)
- , brightness(0)
- , contrast(0)
- , hue(0)
- , saturation(0)
- , aspectRatioMode(Qt::KeepAspectRatio)
- , nonFullScreenFlags(0)
- , wasFullScreen(false)
- {
- }
-
- QVideoWidget *q_ptr;
- QMediaObject *mediaObject;
- QMediaService *service;
- QVideoOutputControl *outputControl;
- QVideoWidgetControlBackend *widgetBackend;
- QWindowVideoWidgetBackend *windowBackend;
- QRendererVideoWidgetBackend *rendererBackend;
- QVideoWidgetControlInterface *currentControl;
- QVideoWidgetBackend *currentBackend;
- int brightness;
- int contrast;
- int hue;
- int saturation;
- Qt::AspectRatioMode aspectRatioMode;
- Qt::WindowFlags nonFullScreenFlags;
- bool wasFullScreen;
-
- void setCurrentControl(QVideoWidgetControlInterface *control);
- void show();
- void clearService();
-
- void _q_serviceDestroyed();
- void _q_mediaObjectDestroyed();
- void _q_brightnessChanged(int brightness);
- void _q_contrastChanged(int contrast);
- void _q_hueChanged(int hue);
- void _q_saturationChanged(int saturation);
- void _q_fullScreenChanged(bool fullScreen);
- void _q_dimensionsChanged();
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/multimedia/mediaservices/base/qvideowidgetcontrol.cpp b/src/multimedia/mediaservices/base/qvideowidgetcontrol.cpp
deleted file mode 100644
index 538f158..0000000
--- a/src/multimedia/mediaservices/base/qvideowidgetcontrol.cpp
+++ /dev/null
@@ -1,235 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 <QtMediaServices/qvideowidgetcontrol.h>
-#include "qmediacontrol_p.h"
-
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QVideoWidgetControl
- \preliminary
- \since 4.7
- \brief The QVideoWidgetControl class provides a media control which
- implements a video widget.
-
- \ingroup multimedia-serv
-
- The videoWidget() property of QVideoWidgetControl provides a pointer to
- a video widget implemented by the control's media service. This widget
- is owned by the media service and so care should be taken not to delete it.
-
- \code
- QVideoWidgetControl *widgetControl = mediaService->control<QVideoWidgetControl *>();
-
- layout->addWidget(widgetControl->widget());
- \endcode
-
- QVideoWidgetControl is one of number of possible video output controls,
- in order to receive video it must be made the active video output
- control by setting the output property of QVideoOutputControl to \l {QVideoOutputControl::WidgetOutput}{WidgetOutput}. Consequently any
- QMediaService that implements QVideoWidgetControl must also implement
- QVideoOutputControl.
-
- The interface name of QVideoWidgetControl is \c com.nokia.Qt.QVideoWidgetControl/1.0 as
- defined in QVideoWidgetControl_iid.
-
- \sa QMediaService::control(), QVideoOutputControl, QVideoWidget
-*/
-
-/*!
- \macro QVideoWidgetControl_iid
-
- \c com.nokia.Qt.QVideoWidgetControl/1.0
-
- Defines the interface name of the QVideoWidgetControl class.
-
- \relates QVideoWidgetControl
-*/
-
-/*!
- Constructs a new video widget control with the given \a parent.
-*/
-QVideoWidgetControl::QVideoWidgetControl(QObject *parent)
- :QMediaControl(parent)
-{
-}
-
-/*!
- Destroys a video widget control.
-*/
-QVideoWidgetControl::~QVideoWidgetControl()
-{
-}
-
-/*!
- \fn QVideoWidgetControl::isFullScreen() const
-
- Returns true if the video is shown using the complete screen.
-*/
-
-/*!
- \fn QVideoWidgetControl::setFullScreen(bool fullScreen)
-
- Sets whether a video widget is in \a fullScreen mode.
-*/
-
-/*!
- \fn QVideoWidgetControl::fullScreenChanged(bool fullScreen)
-
- Signals that the \a fullScreen state of a video widget has changed.
-*/
-
-/*!
- \fn QVideoWidgetControl::aspectRatioMode() const
-
- Returns how video is scaled to fit the widget with respect to its aspect ratio.
-*/
-
-/*!
- \fn QVideoWidgetControl::setAspectRatioMode(Qt::AspectRatioMode mode)
-
- Sets the aspect ratio \a mode which determines how video is scaled to the fit the widget with
- respect to its aspect ratio.
-*/
-
-/*!
- \fn QVideoWidgetControl::brightness() const
-
- Returns the brightness adjustment applied to a video.
-
- Valid brightness values range between -100 and 100, the default is 0.
-*/
-
-/*!
- \fn QVideoWidgetControl::setBrightness(int brightness)
-
- Sets a \a brightness adjustment for a video.
-
- Valid brightness values range between -100 and 100, the default is 0.
-*/
-
-/*!
- \fn QVideoWidgetControl::brightnessChanged(int brightness)
-
- Signals that a video widget's \a brightness adjustment has changed.
-*/
-
-/*!
- \fn QVideoWidgetControl::contrast() const
-
- Returns the contrast adjustment applied to a video.
-
- Valid contrast values range between -100 and 100, the default is 0.
-*/
-
-/*!
- \fn QVideoWidgetControl::setContrast(int contrast)
-
- Sets the contrast adjustment for a video widget to \a contrast.
-
- Valid contrast values range between -100 and 100, the default is 0.
-*/
-
-
-/*!
- \fn QVideoWidgetControl::contrastChanged(int contrast)
-
- Signals that a video widget's \a contrast adjustment has changed.
-*/
-
-/*!
- \fn QVideoWidgetControl::hue() const
-
- Returns the hue adjustment applied to a video widget.
-
- Value hue values range between -100 and 100, the default is 0.
-*/
-
-/*!
- \fn QVideoWidgetControl::setHue(int hue)
-
- Sets a \a hue adjustment for a video widget.
-
- Valid hue values range between -100 and 100, the default is 0.
-*/
-
-
-/*!
- \fn QVideoWidgetControl::hueChanged(int hue)
-
- Signals that a video widget's \a hue adjustment has changed.
-*/
-
-/*!
- \fn QVideoWidgetControl::saturation() const
-
- Returns the saturation adjustment applied to a video widget.
-
- Value saturation values range between -100 and 100, the default is 0.
-*/
-
-
-/*!
- \fn QVideoWidgetControl::setSaturation(int saturation)
-
- Sets a \a saturation adjustment for a video widget.
-
- Valid saturation values range between -100 and 100, the default is 0.
-*/
-
-/*!
- \fn QVideoWidgetControl::saturationChanged(int saturation)
-
- Signals that a video widget's \a saturation adjustment has changed.
-*/
-
-/*!
- \fn QVideoWidgetControl::videoWidget()
-
- Returns the QWidget.
-*/
-
-#include "moc_qvideowidgetcontrol.cpp"
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qvideowidgetcontrol.h b/src/multimedia/mediaservices/base/qvideowidgetcontrol.h
deleted file mode 100644
index 1013beb..0000000
--- a/src/multimedia/mediaservices/base/qvideowidgetcontrol.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QVIDEOWIDGETCONTROL_H
-#define QVIDEOWIDGETCONTROL_H
-
-#include <QtGui/qwidget.h>
-
-#include <QtMediaServices/qvideowidget.h>
-#include <QtMediaServices/qmediacontrol.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-
-class QVideoWidgetControlPrivate;
-
-class Q_MEDIASERVICES_EXPORT QVideoWidgetControl : public QMediaControl
-{
- Q_OBJECT
-
-public:
- virtual ~QVideoWidgetControl();
-
- virtual QWidget *videoWidget() = 0;
-
- virtual Qt::AspectRatioMode aspectRatioMode() const = 0;
- virtual void setAspectRatioMode(Qt::AspectRatioMode mode) = 0;
-
- virtual bool isFullScreen() const = 0;
- virtual void setFullScreen(bool fullScreen) = 0;
-
- virtual int brightness() const = 0;
- virtual void setBrightness(int brightness) = 0;
-
- virtual int contrast() const = 0;
- virtual void setContrast(int contrast) = 0;
-
- virtual int hue() const = 0;
- virtual void setHue(int hue) = 0;
-
- virtual int saturation() const = 0;
- virtual void setSaturation(int saturation) = 0;
-
-Q_SIGNALS:
- void fullScreenChanged(bool fullScreen);
- void brightnessChanged(int brightness);
- void contrastChanged(int contrast);
- void hueChanged(int hue);
- void saturationChanged(int saturation);
-
-protected:
- QVideoWidgetControl(QObject *parent = 0);
-};
-
-#define QVideoWidgetControl_iid "com.nokia.Qt.QVideoWidgetControl/1.0"
-Q_MEDIA_DECLARE_CONTROL(QVideoWidgetControl, QVideoWidgetControl_iid)
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/multimedia/mediaservices/base/qvideowindowcontrol.cpp b/src/multimedia/mediaservices/base/qvideowindowcontrol.cpp
deleted file mode 100644
index 967a2d6..0000000
--- a/src/multimedia/mediaservices/base/qvideowindowcontrol.cpp
+++ /dev/null
@@ -1,275 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 <QtMediaServices/qvideowindowcontrol.h>
-
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QVideoWindowControl
- \preliminary
- \since 4.7
- \ingroup multimedia-serv
- \brief The QVideoWindowControl class provides a media control for rendering video to a window.
-
-
- The winId() property QVideoWindowControl allows a platform specific
- window ID to be set as the video render target of a QMediaService. The
- displayRect() property is used to set the region of the window the
- video should be rendered to, and the aspectRatioMode() property
- indicates how the video should be scaled to fit the displayRect().
-
- \code
- QVideoWindowControl *windowControl = mediaService->control<QVideoWindowControl *>();
- windowControl->setWinId(widget->winId());
- windowControl->setDisplayRect(widget->rect());
- windowControl->setAspectRatioMode(Qt::KeepAspectRatio);
- \endcode
-
- QVideoWindowControl is one of number of possible video output controls,
- in order to receive video it must be made the active video output
- control by setting the output property of QVideoOutputControl to \l {QVideoOutputControl::WindowOutput}{WindowOutput}.
- Consequently any QMediaService that implements QVideoWindowControl must
- also implement QVideoOutputControl.
-
- \code
- QVideoOutputControl *outputControl = mediaService->control<QVideoOutputControl *>();
- outputControl->setOutput(QVideoOutputControl::WindowOutput);
- \endcode
-
- The interface name of QVideoWindowControl is \c com.nokia.Qt.QVideoWindowControl/1.0 as
- defined in QVideoWindowControl_iid.
-
- \sa QMediaService::control(), QVideoOutputControl, QVideoWidget
-*/
-
-/*!
- \macro QVideoWindowControl_iid
-
- \c com.nokia.Qt.QVideoWindowControl/1.0
-
- Defines the interface name of the QVideoWindowControl class.
-
- \relates QVideoWindowControl
-*/
-
-/*!
- Constructs a new video window control with the given \a parent.
-*/
-QVideoWindowControl::QVideoWindowControl(QObject *parent)
- : QMediaControl(parent)
-{
-}
-
-/*!
- Destroys a video window control.
-*/
-QVideoWindowControl::~QVideoWindowControl()
-{
-}
-
-/*!
- \fn QVideoWindowControl::winId() const
-
- Returns the ID of the window a video overlay end point renders to.
-*/
-
-/*!
- \fn QVideoWindowControl::setWinId(WId id)
-
- Sets the \a id of the window a video overlay end point renders to.
-*/
-
-/*!
- \fn QVideoWindowControl::displayRect() const
- Returns the sub-rect of a window where video is displayed.
-*/
-
-/*!
- \fn QVideoWindowControl::setDisplayRect(const QRect &rect)
- Sets the sub-\a rect of a window where video is displayed.
-*/
-
-/*!
- \fn QVideoWindowControl::isFullScreen() const
-
- Identifies if a video overlay is a fullScreen overlay.
-
- Returns true if the video overlay is fullScreen, and false otherwise.
-*/
-
-/*!
- \fn QVideoWindowControl::setFullScreen(bool fullScreen)
-
- Sets whether a video overlay is a \a fullScreen overlay.
-*/
-
-/*!
- \fn QVideoWindowControl::fullScreenChanged(bool fullScreen)
-
- Signals that the \a fullScreen state of a video overlay has changed.
-*/
-
-/*!
- \fn QVideoWindowControl::repaint()
-
- Repaints the last frame.
-*/
-
-/*!
- \fn QVideoWindowControl::nativeSize() const
-
- Returns a suggested size for the video display based on the resolution and aspect ratio of the
- video.
-*/
-
-/*!
- \fn QVideoWindowControl::nativeSizeChanged()
-
- Signals that the native dimensions of the video have changed.
-*/
-
-
-/*!
- \fn QVideoWindowControl::aspectRatioMode() const
-
- Returns how video is scaled to fit the display region with respect to its aspect ratio.
-*/
-
-/*!
- \fn QVideoWindowControl::setAspectRatioMode(Qt::AspectRatioMode mode)
-
- Sets the aspect ratio \a mode which determines how video is scaled to the fit the display region
- with respect to its aspect ratio.
-*/
-
-/*!
- \fn QVideoWindowControl::brightness() const
-
- Returns the brightness adjustment applied to a video overlay.
-
- Valid brightness values range between -100 and 100, the default is 0.
-*/
-
-/*!
- \fn QVideoWindowControl::setBrightness(int brightness)
-
- Sets a \a brightness adjustment for a video overlay.
-
- Valid brightness values range between -100 and 100, the default is 0.
-*/
-
-/*!
- \fn QVideoWindowControl::brightnessChanged(int brightness)
-
- Signals that a video overlay's \a brightness adjustment has changed.
-*/
-
-/*!
- \fn QVideoWindowControl::contrast() const
-
- Returns the contrast adjustment applied to a video overlay.
-
- Valid contrast values range between -100 and 100, the default is 0.
-*/
-
-/*!
- \fn QVideoWindowControl::setContrast(int contrast)
-
- Sets the \a contrast adjustment for a video overlay.
-
- Valid contrast values range between -100 and 100, the default is 0.
-*/
-
-/*!
- \fn QVideoWindowControl::contrastChanged(int contrast)
-
- Signals that a video overlay's \a contrast adjustment has changed.
-*/
-
-/*!
- \fn QVideoWindowControl::hue() const
-
- Returns the hue adjustment applied to a video overlay.
-
- Value hue values range between -100 and 100, the default is 0.
-*/
-
-/*!
- \fn QVideoWindowControl::setHue(int hue)
-
- Sets a \a hue adjustment for a video overlay.
-
- Valid hue values range between -100 and 100, the default is 0.
-*/
-
-/*!
- \fn QVideoWindowControl::hueChanged(int hue)
-
- Signals that a video overlay's \a hue adjustment has changed.
-*/
-
-/*!
- \fn QVideoWindowControl::saturation() const
-
- Returns the saturation adjustment applied to a video overlay.
-
- Value saturation values range between -100 and 100, the default is 0.
-*/
-
-/*!
- \fn QVideoWindowControl::setSaturation(int saturation)
- Sets a \a saturation adjustment for a video overlay.
-
- Valid saturation values range between -100 and 100, the default is 0.
-*/
-
-/*!
- \fn QVideoWindowControl::saturationChanged(int saturation)
-
- Signals that a video overlay's \a saturation adjustment has changed.
-*/
-
-#include "moc_qvideowindowcontrol.cpp"
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/base/qvideowindowcontrol.h b/src/multimedia/mediaservices/base/qvideowindowcontrol.h
deleted file mode 100644
index 47ba520..0000000
--- a/src/multimedia/mediaservices/base/qvideowindowcontrol.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QVIDEOWINDOWCONTROL_H
-#define QVIDEOWINDOWCONTROL_H
-
-#include <QtGui/qwidget.h>
-
-#include <QtMediaServices/qmediacontrol.h>
-#include <QtMediaServices/qvideowidget.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-
-class Q_MEDIASERVICES_EXPORT QVideoWindowControl : public QMediaControl
-{
- Q_OBJECT
-
-public:
- ~QVideoWindowControl();
-
- virtual WId winId() const = 0;
- virtual void setWinId(WId id) = 0;
-
- virtual QRect displayRect() const = 0;
- virtual void setDisplayRect(const QRect &rect) = 0;
-
- virtual bool isFullScreen() const = 0;
- virtual void setFullScreen(bool fullScreen) = 0;
-
- virtual void repaint() = 0;
-
- virtual QSize nativeSize() const = 0;
-
- virtual Qt::AspectRatioMode aspectRatioMode() const = 0;
- virtual void setAspectRatioMode(Qt::AspectRatioMode mode) = 0;
-
- virtual int brightness() const = 0;
- virtual void setBrightness(int brightness) = 0;
-
- virtual int contrast() const = 0;
- virtual void setContrast(int contrast) = 0;
-
- virtual int hue() const = 0;
- virtual void setHue(int hue) = 0;
-
- virtual int saturation() const = 0;
- virtual void setSaturation(int saturation) = 0;
-
-Q_SIGNALS:
- void fullScreenChanged(bool fullScreen);
- void brightnessChanged(int brightness);
- void contrastChanged(int contrast);
- void hueChanged(int hue);
- void saturationChanged(int saturation);
- void nativeSizeChanged();
-
-protected:
- QVideoWindowControl(QObject *parent = 0);
-};
-
-#define QVideoWindowControl_iid "com.nokia.Qt.QVideoWindowControl/1.0"
-Q_MEDIA_DECLARE_CONTROL(QVideoWindowControl, QVideoWindowControl_iid)
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/multimedia/mediaservices/effects/effects.pri b/src/multimedia/mediaservices/effects/effects.pri
deleted file mode 100644
index 6307255..0000000
--- a/src/multimedia/mediaservices/effects/effects.pri
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-unix:!mac {
- contains(QT_CONFIG, pulseaudio) {
- DEFINES += QT_MULTIMEDIA_PULSEAUDIO
- HEADERS += $$PWD/qsoundeffect_pulse_p.h
- SOURCES += $$PWD/qsoundeffect_pulse_p.cpp
- QMAKE_CXXFLAGS += $$QT_CFLAGS_PULSEAUDIO
- LIBS += $$QT_LIBS_PULSEAUDIO
- } else {
- DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER
- HEADERS += $$PWD/qsoundeffect_qmedia_p.h
- SOURCES += $$PWD/qsoundeffect_qmedia_p.cpp
- }
-} else {
- HEADERS += $$PWD/qsoundeffect_qsound_p.h
- SOURCES += $$PWD/qsoundeffect_qsound_p.cpp
-}
-
-HEADERS += \
- $$PWD/qsoundeffect_p.h \
- $$PWD/wavedecoder_p.h
-
-SOURCES += \
- $$PWD/qsoundeffect.cpp \
- $$PWD/wavedecoder_p.cpp
diff --git a/src/multimedia/mediaservices/effects/qsoundeffect.cpp b/src/multimedia/mediaservices/effects/qsoundeffect.cpp
deleted file mode 100644
index 3537566..0000000
--- a/src/multimedia/mediaservices/effects/qsoundeffect.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMultimedia 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 "qsoundeffect_p.h"
-
-#if defined(QT_MULTIMEDIA_PULSEAUDIO)
-#include "qsoundeffect_pulse_p.h"
-#elif(QT_MULTIMEDIA_QMEDIAPLAYER)
-#include "qsoundeffect_qmedia_p.h"
-#else
-#include "qsoundeffect_qsound_p.h"
-#endif
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmlclass SoundEffect QSoundEffect
- \since 4.7
- \brief The SoundEffect element provides a way to play sound effects in QML.
-
- This element is part of the \bold{Qt.multimedia 4.7} module.
-
- The following example plays a wav file on mouse click.
-
- \qml
- import Qt 4.7
- import Qt.multimedia 4.7
-
- Text {
- text: "Click Me!";
- font.pointSize: 24;
- width: 150; height: 50;
-
- SoundEffect {
- id: playSound
- source: "soundeffect.wav"
- }
- MouseArea {
- id: playArea
- anchors.fill: parent
- onPressed: { playSound.play() }
- }
- }
- \endqml
-*/
-
-/*!
- \qmlproperty url SoundEffect::source
-
- This property provides a way to control the sound to play.
-*/
-
-/*!
- \qmlproperty int SoundEffect::loops
-
- This property provides a way to control the number of times to repeat the sound on each play().
-*/
-
-/*!
- \qmlproperty int SoundEffect::volume
-
- This property provides a way to control the volume for playback.
-*/
-
-/*!
- \qmlproperty bool SoundEffect::muted
-
- This property provides a way to control muting.
-*/
-
-/*!
- \qmlsignal SoundEffect::sourceChanged()
-
- This handler is called when the source has changed.
-*/
-
-/*!
- \qmlsignal SoundEffect::loopsChanged()
-
- This handler is called when the number of loops has changes.
-*/
-
-/*!
- \qmlsignal SoundEffect::volumeChanged()
-
- This handler is called when the volume has changed.
-*/
-
-/*!
- \qmlsignal SoundEffect::mutedChanged()
-
- This handler is called when the mute state has changed.
-*/
-
-
-QSoundEffect::QSoundEffect(QObject *parent) :
- QObject(parent)
-{
- d = new QSoundEffectPrivate(this);
- connect(d, SIGNAL(volumeChanged()), SIGNAL(volumeChanged()));
- connect(d, SIGNAL(mutedChanged()), SIGNAL(mutedChanged()));
-}
-
-QSoundEffect::~QSoundEffect()
-{
- d->deleteLater();
-}
-
-QUrl QSoundEffect::source() const
-{
- return d->source();
-}
-
-void QSoundEffect::setSource(const QUrl &url)
-{
- if (d->source() == url)
- return;
-
- d->setSource(url);
-
- emit sourceChanged();
-}
-
-int QSoundEffect::loops() const
-{
- return d->loopCount();
-}
-
-void QSoundEffect::setLoops(int loopCount)
-{
- if (d->loopCount() == loopCount)
- return;
-
- d->setLoopCount(loopCount);
- emit loopsChanged();
-}
-
-int QSoundEffect::volume() const
-{
- return d->volume();
-}
-
-void QSoundEffect::setVolume(int volume)
-{
- if (d->volume() == volume)
- return;
-
- d->setVolume(volume);
- emit volumeChanged();
-}
-
-bool QSoundEffect::isMuted() const
-{
- return d->isMuted();
-}
-
-void QSoundEffect::setMuted(bool muted)
-{
- if (d->isMuted() == muted)
- return;
-
- d->setMuted(muted);
- emit mutedChanged();
-}
-
-void QSoundEffect::play()
-{
- d->play();
-}
-
-QT_END_NAMESPACE
diff --git a/src/multimedia/mediaservices/effects/qsoundeffect_p.h b/src/multimedia/mediaservices/effects/qsoundeffect_p.h
deleted file mode 100644
index 64ddb77..0000000
--- a/src/multimedia/mediaservices/effects/qsoundeffect_p.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMediaServices 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 QSOUNDEFFECT_H
-#define QSOUNDEFFECT_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/qobject.h>
-#include <QtCore/qurl.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QSoundEffectPrivate;
-class Q_MEDIASERVICES_EXPORT QSoundEffect : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
- Q_PROPERTY(int loops READ loops WRITE setLoops NOTIFY loopsChanged)
- Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged)
- Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
-
-public:
- explicit QSoundEffect(QObject *parent = 0);
- ~QSoundEffect();
-
- QUrl source() const;
- void setSource(const QUrl &url);
-
- int loops() const;
- void setLoops(int loopCount);
-
- int volume() const;
- void setVolume(int volume);
-
- bool isMuted() const;
- void setMuted(bool muted);
-
-Q_SIGNALS:
- void sourceChanged();
- void loopsChanged();
- void volumeChanged();
- void mutedChanged();
-
-public Q_SLOTS:
- void play();
-
-private:
- Q_DISABLE_COPY(QSoundEffect)
- QSoundEffectPrivate* d;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-
-#endif // QSOUNDEFFECT_H
diff --git a/src/multimedia/mediaservices/effects/qsoundeffect_pulse_p.cpp b/src/multimedia/mediaservices/effects/qsoundeffect_pulse_p.cpp
deleted file mode 100644
index c856157..0000000
--- a/src/multimedia/mediaservices/effects/qsoundeffect_pulse_p.cpp
+++ /dev/null
@@ -1,499 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMediaServices 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.
-//
-
-#include <QtCore/qcoreapplication.h>
-#include <QtMultimedia/qaudioformat.h>
-#include <QtNetwork>
-#include <QTime>
-
-#include "wavedecoder_p.h"
-
-#include "qsoundeffect_pulse_p.h"
-
-#if defined(Q_WS_MAEMO_5)
-#include <pulse/ext-stream-restore.h>
-#endif
-
-#include <unistd.h>
-
-// Less than ideal
-#define PA_SCACHE_ENTRY_SIZE_MAX (1024*1024*16)
-
-QT_BEGIN_NAMESPACE
-
-namespace
-{
-inline pa_sample_spec audioFormatToSampleSpec(const QAudioFormat &format)
-{
- pa_sample_spec spec;
-
- spec.rate = format.frequency();
- spec.channels = format.channels();
-
- if (format.sampleSize() == 8)
- spec.format = PA_SAMPLE_U8;
- else if (format.sampleSize() == 16) {
- switch (format.byteOrder()) {
- case QAudioFormat::BigEndian: spec.format = PA_SAMPLE_S16BE; break;
- case QAudioFormat::LittleEndian: spec.format = PA_SAMPLE_S16LE; break;
- }
- }
- else if (format.sampleSize() == 32) {
- switch (format.byteOrder()) {
- case QAudioFormat::BigEndian: spec.format = PA_SAMPLE_S32BE; break;
- case QAudioFormat::LittleEndian: spec.format = PA_SAMPLE_S32LE; break;
- }
- }
-
- return spec;
-}
-
-class PulseDaemon
-{
-public:
- PulseDaemon():m_prepared(false)
- {
- prepare();
- }
-
- ~PulseDaemon()
- {
- if (m_prepared)
- release();
- }
-
- inline void lock()
- {
- pa_threaded_mainloop_lock(m_mainLoop);
- }
-
- inline void unlock()
- {
- pa_threaded_mainloop_unlock(m_mainLoop);
- }
-
- inline pa_context *context() const
- {
- return m_context;
- }
-
- int volume()
- {
- return m_vol;
- }
-
-private:
- void prepare()
- {
- m_vol = 100;
-
- m_mainLoop = pa_threaded_mainloop_new();
- if (m_mainLoop == 0) {
- qWarning("PulseAudioService: unable to create pulseaudio mainloop");
- return;
- }
-
- if (pa_threaded_mainloop_start(m_mainLoop) != 0) {
- qWarning("PulseAudioService: unable to start pulseaudio mainloop");
- pa_threaded_mainloop_free(m_mainLoop);
- return;
- }
-
- m_mainLoopApi = pa_threaded_mainloop_get_api(m_mainLoop);
-
- lock();
- m_context = pa_context_new(m_mainLoopApi, QString(QLatin1String("QtPulseAudio:%1")).arg(::getpid()).toAscii().constData());
-
-#if defined(Q_WS_MAEMO_5)
- pa_context_set_state_callback(m_context, context_state_callback, this);
-#endif
- if (m_context == 0) {
- qWarning("PulseAudioService: Unable to create new pulseaudio context");
- pa_threaded_mainloop_free(m_mainLoop);
- return;
- }
-
- if (pa_context_connect(m_context, NULL, (pa_context_flags_t)0, NULL) < 0) {
- qWarning("PulseAudioService: pa_context_connect() failed");
- pa_context_unref(m_context);
- pa_threaded_mainloop_free(m_mainLoop);
- return;
- }
- unlock();
-
- m_prepared = true;
- }
-
- void release()
- {
- if (!m_prepared) return;
- pa_threaded_mainloop_stop(m_mainLoop);
- pa_threaded_mainloop_free(m_mainLoop);
- m_prepared = false;
- }
-
-#if defined(Q_WS_MAEMO_5)
- static void context_state_callback(pa_context *c, void *userdata)
- {
- PulseDaemon *self = reinterpret_cast<PulseDaemon*>(userdata);
- switch (pa_context_get_state(c)) {
- case PA_CONTEXT_CONNECTING:
- case PA_CONTEXT_AUTHORIZING:
- case PA_CONTEXT_SETTING_NAME:
- break;
- case PA_CONTEXT_READY:
- pa_ext_stream_restore_set_subscribe_cb(c, &stream_restore_monitor_callback, self);
- pa_ext_stream_restore_subscribe(c, 1, NULL, self);
- break;
- default:
- break;
- }
- }
- static void stream_restore_monitor_callback(pa_context *c, void *userdata)
- {
- PulseDaemon *self = reinterpret_cast<PulseDaemon*>(userdata);
- pa_ext_stream_restore2_read(c, &stream_restore_info_callback, self);
- }
- static void stream_restore_info_callback(pa_context *c, const pa_ext_stream_restore2_info *info,
- int eol, void *userdata)
- {
- Q_UNUSED(c)
-
- PulseDaemon *self = reinterpret_cast<PulseDaemon*>(userdata);
-
- if (!eol) {
- if (QString(info->name).startsWith(QLatin1String("sink-input-by-media-role:x-maemo"))) {
- const unsigned str_length = 256;
- char str[str_length];
- pa_cvolume_snprint(str, str_length, &info->volume);
- self->m_vol = QString(str).replace(" ","").replace("%","").mid(2).toInt();
- }
- }
- }
-#endif
-
- int m_vol;
- bool m_prepared;
- pa_context *m_context;
- pa_threaded_mainloop *m_mainLoop;
- pa_mainloop_api *m_mainLoopApi;
-};
-}
-
-Q_GLOBAL_STATIC(PulseDaemon, daemon)
-
-
-QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent):
- QObject(parent),
- m_retry(false),
- m_muted(false),
- m_playQueued(false),
- m_sampleLoaded(false),
- m_volume(100),
- m_duration(0),
- m_dataUploaded(0),
- m_loopCount(1),
- m_runningCount(0),
- m_reply(0),
- m_stream(0),
- m_networkAccessManager(0)
-{
-}
-
-QSoundEffectPrivate::~QSoundEffectPrivate()
-{
- m_reply->deleteLater();
- unloadSample();
-}
-
-QUrl QSoundEffectPrivate::source() const
-{
- return m_source;
-}
-
-void QSoundEffectPrivate::setSource(const QUrl &url)
-{
- if (url.isEmpty()) {
- m_source = QUrl();
- unloadSample();
- return;
- }
-
- m_source = url;
-
- if (m_networkAccessManager == 0)
- m_networkAccessManager = new QNetworkAccessManager(this);
-
- m_stream = m_networkAccessManager->get(QNetworkRequest(m_source));
-
- unloadSample();
- loadSample();
-}
-
-int QSoundEffectPrivate::loopCount() const
-{
- return m_loopCount;
-}
-
-void QSoundEffectPrivate::setLoopCount(int loopCount)
-{
- m_loopCount = loopCount;
-}
-
-int QSoundEffectPrivate::volume() const
-{
- return m_volume;
-}
-
-void QSoundEffectPrivate::setVolume(int volume)
-{
- m_volume = volume;
-}
-
-bool QSoundEffectPrivate::isMuted() const
-{
- return m_muted;
-}
-
-void QSoundEffectPrivate::setMuted(bool muted)
-{
- m_muted = muted;
-}
-
-void QSoundEffectPrivate::play()
-{
- if (m_retry) {
- m_retry = false;
- setSource(m_source);
- return;
- }
-
- if (!m_sampleLoaded) {
- m_playQueued = true;
- return;
- }
-
- m_runningCount += m_loopCount;
-
- playSample();
-}
-
-void QSoundEffectPrivate::decoderReady()
-{
- if (m_waveDecoder->size() >= PA_SCACHE_ENTRY_SIZE_MAX) {
- m_waveDecoder->deleteLater();
- qWarning("QSoundEffect(pulseaudio): Attempting to load to large a sample");
- return;
- }
-
- if (m_name.isNull())
- m_name = QString(QLatin1String("QtPulseSample-%1-%2")).arg(::getpid()).arg(quintptr(this)).toUtf8();
-
- pa_sample_spec spec = audioFormatToSampleSpec(m_waveDecoder->audioFormat());
-
- daemon()->lock();
- pa_stream *stream = pa_stream_new(daemon()->context(), m_name.constData(), &spec, 0);
- pa_stream_set_state_callback(stream, stream_state_callback, this);
- pa_stream_set_write_callback(stream, stream_write_callback, this);
- pa_stream_connect_upload(stream, (size_t)m_waveDecoder->size());
- m_pulseStream = stream;
- daemon()->unlock();
-}
-
-void QSoundEffectPrivate::decoderError()
-{
- qWarning("QSoundEffect(pulseaudio): Error decoding source");
-}
-
-void QSoundEffectPrivate::checkPlayTime()
-{
- int elapsed = m_playbackTime.elapsed();
-
- if (elapsed < m_duration)
- startTimer(m_duration - elapsed);
-}
-
-void QSoundEffectPrivate::loadSample()
-{
- m_sampleLoaded = false;
- m_dataUploaded = 0;
- m_waveDecoder = new WaveDecoder(m_stream);
- connect(m_waveDecoder, SIGNAL(formatKnown()), SLOT(decoderReady()));
- connect(m_waveDecoder, SIGNAL(invalidFormat()), SLOT(decoderError()));
-}
-
-void QSoundEffectPrivate::unloadSample()
-{
- if (!m_sampleLoaded)
- return;
-
- daemon()->lock();
- pa_context_remove_sample(daemon()->context(), m_name.constData(), NULL, NULL);
- daemon()->unlock();
-
- m_duration = 0;
- m_dataUploaded = 0;
- m_sampleLoaded = false;
-}
-
-void QSoundEffectPrivate::uploadSample()
-{
- daemon()->lock();
-
- size_t bufferSize = qMin(pa_stream_writable_size(m_pulseStream),
- size_t(m_waveDecoder->bytesAvailable()));
- char buffer[bufferSize];
-
- size_t len = 0;
- while (len < (m_waveDecoder->size())) {
- qint64 read = m_waveDecoder->read(buffer, qMin((int)bufferSize,
- (int)(m_waveDecoder->size()-len)));
- if (read > 0) {
- if (pa_stream_write(m_pulseStream, buffer, size_t(read), 0, 0, PA_SEEK_RELATIVE) == 0)
- len += size_t(read);
- else
- break;
- }
- }
-
- m_dataUploaded += len;
- pa_stream_set_write_callback(m_pulseStream, NULL, NULL);
-
- if (m_waveDecoder->size() == m_dataUploaded) {
- int err = pa_stream_finish_upload(m_pulseStream);
- if(err != 0) {
- qWarning("pa_stream_finish_upload() err=%d",err);
- pa_stream_disconnect(m_pulseStream);
- m_retry = true;
- m_playQueued = false;
- QMetaObject::invokeMethod(this, "play");
- daemon()->unlock();
- return;
- }
- m_duration = m_waveDecoder->duration();
- m_waveDecoder->deleteLater();
- m_stream->deleteLater();
- m_sampleLoaded = true;
- if (m_playQueued) {
- m_playQueued = false;
- QMetaObject::invokeMethod(this, "play");
- }
- }
- daemon()->unlock();
-}
-
-void QSoundEffectPrivate::playSample()
-{
- pa_volume_t volume = PA_VOLUME_NORM;
-
- daemon()->lock();
-#ifdef Q_WS_MAEMO_5
- volume = PA_VOLUME_NORM / 100 * ((daemon()->volume() + m_volume) / 2);
-#endif
- pa_operation_unref(
- pa_context_play_sample(daemon()->context(),
- m_name.constData(),
- 0,
- volume,
- play_callback,
- this)
- );
- daemon()->unlock();
-
- m_playbackTime.start();
-}
-
-void QSoundEffectPrivate::timerEvent(QTimerEvent *event)
-{
- if (m_runningCount > 0)
- playSample();
-
- killTimer(event->timerId());
-}
-
-void QSoundEffectPrivate::stream_write_callback(pa_stream *s, size_t length, void *userdata)
-{
- Q_UNUSED(length);
-
- QSoundEffectPrivate *self = reinterpret_cast<QSoundEffectPrivate*>(userdata);
-
- QMetaObject::invokeMethod(self, "uploadSample", Qt::QueuedConnection);
-}
-
-void QSoundEffectPrivate::stream_state_callback(pa_stream *s, void *userdata)
-{
- switch (pa_stream_get_state(s)) {
- case PA_STREAM_CREATING:
- case PA_STREAM_READY:
- case PA_STREAM_TERMINATED:
- break;
-
- case PA_STREAM_FAILED:
- default:
- qWarning("QSoundEffect(pulseaudio): Error in pulse audio stream");
- break;
- }
-}
-
-void QSoundEffectPrivate::play_callback(pa_context *c, int success, void *userdata)
-{
- Q_UNUSED(c);
-
- QSoundEffectPrivate *self = reinterpret_cast<QSoundEffectPrivate*>(userdata);
-
- if (success == 1) {
- self->m_runningCount--;
- QMetaObject::invokeMethod(self, "checkPlayTime", Qt::QueuedConnection);
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/multimedia/mediaservices/effects/qsoundeffect_pulse_p.h b/src/multimedia/mediaservices/effects/qsoundeffect_pulse_p.h
deleted file mode 100644
index 1327bf5..0000000
--- a/src/multimedia/mediaservices/effects/qsoundeffect_pulse_p.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMediaServices 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 QSOUNDEFFECT_PULSE_H
-#define QSOUNDEFFECT_PULSE_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 "qsoundeffect_p.h"
-
-#include <QtCore/qobject.h>
-#include <QtCore/qdatetime.h>
-#include <QtMediaServices/qmediaplayer.h>
-#include <pulse/pulseaudio.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QNetworkReply;
-class QNetworkAccessManager;
-class WaveDecoder;
-
-class QSoundEffectPrivate : public QObject
-{
- Q_OBJECT
-public:
- explicit QSoundEffectPrivate(QObject* parent);
- ~QSoundEffectPrivate();
-
- QUrl source() const;
- void setSource(const QUrl &url);
- int loopCount() const;
- void setLoopCount(int loopCount);
- int volume() const;
- void setVolume(int volume);
- bool isMuted() const;
- void setMuted(bool muted);
-
-public Q_SLOTS:
- void play();
-
-Q_SIGNALS:
- void volumeChanged();
- void mutedChanged();
-
-private Q_SLOTS:
- void decoderReady();
- void decoderError();
- void checkPlayTime();
- void uploadSample();
-
-private:
- void loadSample();
- void unloadSample();
- void playSample();
-
- void timerEvent(QTimerEvent *event);
-
- static void stream_write_callback(pa_stream *s, size_t length, void *userdata);
- static void stream_state_callback(pa_stream *s, void *userdata);
- static void play_callback(pa_context *c, int success, void *userdata);
-
- pa_stream *m_pulseStream;
-
- bool m_retry;
- bool m_muted;
- bool m_playQueued;
- bool m_sampleLoaded;
- int m_volume;
- int m_duration;
- int m_dataUploaded;
- int m_loopCount;
- int m_runningCount;
- QUrl m_source;
- QTime m_playbackTime;
- QByteArray m_name;
- QNetworkReply *m_reply;
- WaveDecoder *m_waveDecoder;
- QIODevice *m_stream;
- QNetworkAccessManager *m_networkAccessManager;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QSOUNDEFFECT_PULSE_H
diff --git a/src/multimedia/mediaservices/effects/qsoundeffect_qmedia_p.cpp b/src/multimedia/mediaservices/effects/qsoundeffect_qmedia_p.cpp
deleted file mode 100644
index 5e40bed..0000000
--- a/src/multimedia/mediaservices/effects/qsoundeffect_qmedia_p.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMediaServices 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.
-//
-
-#include "qsoundeffect_qmedia_p.h"
-
-#include <QtCore/qcoreapplication.h>
-
-#include <QtMediaServices/qmediacontent.h>
-#include <QtMediaServices/qmediaplayer.h>
-
-
-QT_BEGIN_NAMESPACE
-
-QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent):
- QObject(parent),
- m_loopCount(1),
- m_runningCount(0),
- m_player(0)
-{
- m_player = new QMediaPlayer(this, QMediaPlayer::LowLatency);
- connect(m_player, SIGNAL(stateChanged(QMediaPlayer::State)), SLOT(stateChanged(QMediaPlayer::State)));
-}
-
-QSoundEffectPrivate::~QSoundEffectPrivate()
-{
-}
-
-QUrl QSoundEffectPrivate::source() const
-{
- return m_player->media().canonicalUrl();
-}
-
-void QSoundEffectPrivate::setSource(const QUrl &url)
-{
- m_player->setMedia(url);
-}
-
-int QSoundEffectPrivate::loopCount() const
-{
- return m_loopCount;
-}
-
-void QSoundEffectPrivate::setLoopCount(int loopCount)
-{
- m_loopCount = loopCount;
-}
-
-int QSoundEffectPrivate::volume() const
-{
- return m_player->volume();
-}
-
-void QSoundEffectPrivate::setVolume(int volume)
-{
- m_player->setVolume(volume);
-}
-
-bool QSoundEffectPrivate::isMuted() const
-{
- return m_player->isMuted();
-}
-
-void QSoundEffectPrivate::setMuted(bool muted)
-{
- m_player->setMuted(muted);
-}
-
-void QSoundEffectPrivate::play()
-{
- m_runningCount += m_loopCount;
- m_player->play();
-}
-
-void QSoundEffectPrivate::stateChanged(QMediaPlayer::State state)
-{
- if (state == QMediaPlayer::StoppedState) {
- if (--m_runningCount > 0)
- m_player->play();
- }
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/mediaservices/effects/qsoundeffect_qmedia_p.h b/src/multimedia/mediaservices/effects/qsoundeffect_qmedia_p.h
deleted file mode 100644
index 82ea000..0000000
--- a/src/multimedia/mediaservices/effects/qsoundeffect_qmedia_p.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMediaServices 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 QSOUNDEFFECT_QMEDIA_H
-#define QSOUNDEFFECT_QMEDIA_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/qobject.h>
-#include <QtCore/qurl.h>
-#include <QtMediaServices/qmediaplayer.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
-class QSoundEffectPrivate : public QObject
-{
- Q_OBJECT
-public:
- explicit QSoundEffectPrivate(QObject* parent);
- ~QSoundEffectPrivate();
-
- QUrl source() const;
- void setSource(const QUrl &url);
- int loopCount() const;
- void setLoopCount(int loopCount);
- int volume() const;
- void setVolume(int volume);
- bool isMuted() const;
- void setMuted(bool muted);
-
-public Q_SLOTS:
- void play();
-
-Q_SIGNALS:
- void volumeChanged();
- void mutedChanged();
-
-private Q_SLOTS:
- void stateChanged(QMediaPlayer::State);
-
-private:
- int m_loopCount;
- int m_runningCount;
- QMediaPlayer *m_player;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QSOUNDEFFECT_QMEDIA_H
diff --git a/src/multimedia/mediaservices/effects/qsoundeffect_qsound_p.cpp b/src/multimedia/mediaservices/effects/qsoundeffect_qsound_p.cpp
deleted file mode 100644
index 9247aba..0000000
--- a/src/multimedia/mediaservices/effects/qsoundeffect_qsound_p.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMediaServices 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.
-//
-
-#include "qsoundeffect_qsound_p.h"
-
-#include <QtCore/qcoreapplication.h>
-#include <QtGui/qsound.h>
-
-
-QT_BEGIN_NAMESPACE
-
-QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent):
- QObject(parent),
- m_muted(false),
- m_loopCount(1),
- m_volume(100),
- m_sound(0)
-{
-}
-
-QSoundEffectPrivate::~QSoundEffectPrivate()
-{
-}
-
-QUrl QSoundEffectPrivate::source() const
-{
- return m_source;
-}
-
-void QSoundEffectPrivate::setSource(const QUrl &url)
-{
- if (url.isEmpty() || url.scheme() != QLatin1String("file")) {
- m_source = QUrl();
- return;
- }
-
- if (m_sound != 0)
- delete m_sound;
-
- m_source = url;
- m_sound = new QSound(m_source.toLocalFile(), this);
- m_sound->setLoops(m_loopCount);
-}
-
-int QSoundEffectPrivate::loopCount() const
-{
- return m_loopCount;
-}
-
-void QSoundEffectPrivate::setLoopCount(int lc)
-{
- m_loopCount = lc;
- if (m_sound)
- m_sound->setLoops(lc);
-}
-
-int QSoundEffectPrivate::volume() const
-{
- return m_volume;
-}
-
-void QSoundEffectPrivate::setVolume(int v)
-{
- m_volume = v;
-}
-
-bool QSoundEffectPrivate::isMuted() const
-{
- return m_muted;
-}
-
-void QSoundEffectPrivate::setMuted(bool muted)
-{
- m_muted = muted;
-}
-
-void QSoundEffectPrivate::play()
-{
- m_sound->play();
-}
-
-QT_END_NAMESPACE
diff --git a/src/multimedia/mediaservices/effects/qsoundeffect_qsound_p.h b/src/multimedia/mediaservices/effects/qsoundeffect_qsound_p.h
deleted file mode 100644
index dad7b6f..0000000
--- a/src/multimedia/mediaservices/effects/qsoundeffect_qsound_p.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMediaServices 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 QSOUNDEFFECT_QSOUND_H
-#define QSOUNDEFFECT_QSOUND_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/qobject.h>
-#include <QtCore/qurl.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QSound;
-
-class QSoundEffectPrivate : public QObject
-{
- Q_OBJECT
-public:
- explicit QSoundEffectPrivate(QObject* parent);
- ~QSoundEffectPrivate();
-
- QUrl source() const;
- void setSource(const QUrl &url);
- int loopCount() const;
- void setLoopCount(int loopCount);
- int volume() const;
- void setVolume(int volume);
- bool isMuted() const;
- void setMuted(bool muted);
-
-public Q_SLOTS:
- void play();
-
-Q_SIGNALS:
- void volumeChanged();
- void mutedChanged();
-
-private:
- bool m_muted;
- int m_loopCount;
- int m_volume;
- QSound *m_sound;
- QUrl m_source;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QSOUNDEFFECT_QSOUND_H
diff --git a/src/multimedia/mediaservices/effects/wavedecoder_p.cpp b/src/multimedia/mediaservices/effects/wavedecoder_p.cpp
deleted file mode 100644
index 1c26c8f..0000000
--- a/src/multimedia/mediaservices/effects/wavedecoder_p.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMediaServices 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 "wavedecoder_p.h"
-
-#include <QtCore/qtimer.h>
-#include <QtCore/qendian.h>
-
-QT_BEGIN_NAMESPACE
-
-WaveDecoder::WaveDecoder(QIODevice *s, QObject *parent):
- QIODevice(parent),
- haveFormat(false),
- dataSize(0),
- remaining(0),
- source(s)
-{
- open(QIODevice::ReadOnly | QIODevice::Unbuffered);
-
- if (source->bytesAvailable() >= qint64(sizeof(CombinedHeader) + sizeof(DATAHeader) + sizeof(quint16)))
- QTimer::singleShot(0, this, SLOT(handleData()));
- else
- connect(source, SIGNAL(readyRead()), SLOT(handleData()));
-}
-
-WaveDecoder::~WaveDecoder()
-{
-}
-
-QAudioFormat WaveDecoder::audioFormat() const
-{
- return format;
-}
-
-int WaveDecoder::duration() const
-{
- return size() * 1000 / (format.sampleSize() / 8) / format.channels() / format.frequency();
-}
-
-qint64 WaveDecoder::size() const
-{
- return haveFormat ? dataSize : 0;
-}
-
-bool WaveDecoder::isSequential() const
-{
- return source->isSequential();
-}
-
-qint64 WaveDecoder::bytesAvailable() const
-{
- return haveFormat ? source->bytesAvailable() : 0;
-}
-
-qint64 WaveDecoder::readData(char *data, qint64 maxlen)
-{
- return haveFormat ? source->read(data, maxlen) : 0;
-}
-
-qint64 WaveDecoder::writeData(const char *data, qint64 len)
-{
- Q_UNUSED(data);
- Q_UNUSED(len);
-
- return -1;
-}
-
-void WaveDecoder::handleData()
-{
- if (source->bytesAvailable() < qint64(sizeof(CombinedHeader) + sizeof(DATAHeader) + sizeof(quint16)))
- return;
-
- source->disconnect(SIGNAL(readyRead()), this, SLOT(handleData()));
- source->read((char*)&header, sizeof(CombinedHeader));
-
- if (qstrncmp(header.riff.descriptor.id, "RIFF", 4) != 0 ||
- qstrncmp(header.riff.type, "WAVE", 4) != 0 ||
- qstrncmp(header.wave.descriptor.id, "fmt ", 4) != 0 ||
- (header.wave.audioFormat != 0 && header.wave.audioFormat != 1)) {
-
- emit invalidFormat();
- }
- else {
- DATAHeader dataHeader;
-
- if (qFromLittleEndian<quint32>(header.wave.descriptor.size) > sizeof(WAVEHeader)) {
- // Extended data available
- quint16 extraFormatBytes;
- source->peek((char*)&extraFormatBytes, sizeof(quint16));
- extraFormatBytes = qFromLittleEndian<quint16>(extraFormatBytes);
- source->read(sizeof(quint16) + extraFormatBytes); // dump it all
- }
-
- source->read((char*)&dataHeader, sizeof(DATAHeader));
-
- int bps = qFromLittleEndian<quint16>(header.wave.bitsPerSample);
-
- format.setCodec(QLatin1String("audio/pcm"));
- format.setSampleType(bps == 8 ? QAudioFormat::UnSignedInt : QAudioFormat::SignedInt);
- format.setByteOrder(QAudioFormat::LittleEndian);
- format.setFrequency(qFromLittleEndian<quint32>(header.wave.sampleRate));
- format.setSampleSize(bps);
- format.setChannels(qFromLittleEndian<quint16>(header.wave.numChannels));
-
- dataSize = qFromLittleEndian<quint32>(dataHeader.descriptor.size);
-
- haveFormat = true;
- connect(source, SIGNAL(readyRead()), SIGNAL(readyRead()));
- emit formatKnown();
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/multimedia/mediaservices/effects/wavedecoder_p.h b/src/multimedia/mediaservices/effects/wavedecoder_p.h
deleted file mode 100644
index dcc5453..0000000
--- a/src/multimedia/mediaservices/effects/wavedecoder_p.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMediaServices 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 WAVEDECODER_H
-#define WAVEDECODER_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 <QtCore/qiodevice.h>
-#include <QtMultimedia/qaudioformat.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
-class WaveDecoder : public QIODevice
-{
- Q_OBJECT
-
-public:
- explicit WaveDecoder(QIODevice *source, QObject *parent = 0);
- ~WaveDecoder();
-
- QAudioFormat audioFormat() const;
- int duration() const;
-
- qint64 size() const;
- bool isSequential() const;
- qint64 bytesAvailable() const;
-
-Q_SIGNALS:
- void formatKnown();
- void invalidFormat();
-
-private Q_SLOTS:
- void handleData();
-
-private:
- qint64 readData(char *data, qint64 maxlen);
- qint64 writeData(const char *data, qint64 len);
-
- struct chunk
- {
- char id[4];
- quint32 size;
- };
- struct RIFFHeader
- {
- chunk descriptor;
- char type[4];
- };
- struct WAVEHeader
- {
- chunk descriptor;
- quint16 audioFormat;
- quint16 numChannels;
- quint32 sampleRate;
- quint32 byteRate;
- quint16 blockAlign;
- quint16 bitsPerSample;
- };
- struct DATAHeader
- {
- chunk descriptor;
- };
- struct CombinedHeader
- {
- RIFFHeader riff;
- WAVEHeader wave;
- };
-
- bool haveFormat;
- qint64 dataSize;
- qint64 remaining;
- QAudioFormat format;
- QIODevice *source;
- CombinedHeader header;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // WAVEDECODER_H
diff --git a/src/multimedia/mediaservices/mediaservices.pro b/src/multimedia/mediaservices/mediaservices.pro
deleted file mode 100644
index d5b0e4c..0000000
--- a/src/multimedia/mediaservices/mediaservices.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-TARGET = QtMediaServices
-QPRO_PWD = $$PWD
-QT = core gui multimedia
-
-DEFINES += QT_BUILD_MEDIASERVICES_LIB QT_NO_USING_NAMESPACE
-
-unix:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui QtMultimedia
-
-include(../../qbase.pri)
-
-include(base/base.pri)
-include(playback/playback.pri)
-include(effects/effects.pri)
-
-symbian: {
- TARGET.UID3 = 0x2001E631
- contains(CONFIG, def_files) {
- DEF_FILE=../../s60installs
- }
-}
-
diff --git a/src/multimedia/mediaservices/playback/playback.pri b/src/multimedia/mediaservices/playback/playback.pri
deleted file mode 100644
index 09a81c9..0000000
--- a/src/multimedia/mediaservices/playback/playback.pri
+++ /dev/null
@@ -1,11 +0,0 @@
-
-HEADERS += \
- $$PWD/qmediaplayer.h \
- $$PWD/qmediaplayercontrol.h
-
-SOURCES += \
- $$PWD/qmediaplayer.cpp \
- $$PWD/qmediaplayercontrol.cpp
-
-
-
diff --git a/src/multimedia/mediaservices/playback/qmediaplayer.cpp b/src/multimedia/mediaservices/playback/qmediaplayer.cpp
deleted file mode 100644
index ca1f250..0000000
--- a/src/multimedia/mediaservices/playback/qmediaplayer.cpp
+++ /dev/null
@@ -1,996 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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/qcoreevent.h>
-#include <QtCore/qmetaobject.h>
-#include <QtCore/qtimer.h>
-#include <QtCore/qpointer.h>
-#include <QtCore/qdebug.h>
-
-#include <QtMediaServices/qmediaplayer.h>
-
-#include <QtMediaServices/private/qmediaobject_p.h>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qmediaplayercontrol.h>
-#include <QtMediaServices/qmediaserviceprovider.h>
-#include <QtMediaServices/qmediaplaylist.h>
-#include <QtMediaServices/qmediaplaylistcontrol.h>
-#include <QtMediaServices/qvideowidget.h>
-#include <QtMediaServices/qgraphicsvideoitem.h>
-
-//#define DEBUG_PLAYER_STATE
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-/*!
- \class QMediaPlayer
- \brief The QMediaPlayer class allows the playing of a media source.
- \ingroup multimedia
- \since 4.7
- \preliminary
-
- The QMediaPlayer class is a high level media playback class. It can be used
- to playback such content as songs, movies and internet radio. The content
- to playback is specified as a QMediaContent, which can be thought of as a
- main or canonical URL with addition information attached. When provided
- with a QMediaContent playback may be able to commence.
-
- \code
- player = new QMediaPlayer;
- connect(player, SIGNAL(positionChanged(qint64)), this, SLOT(positionChanged(qint64)));
- player->setMedia(QUrl::fromLocalFile("/Users/me/Music/coolsong.mp3"));
- player->setVolume(50);
- player->play();
- \endcode
-
- QVideoWidget can be used with QMediaPlayer for video rendering and QMediaPlaylist
- for accessing playlist functionality.
-
- \code
- player = new QMediaPlayer;
-
- playlist = new QMediaPlaylist;
- playlist->setMediaObject(player);
- playlist->append(QUrl("http://example.com/movie1.mp4"));
- playlist->append(QUrl("http://example.com/movie2.mp4"));
-
- widget = new QVideoWidget;
- widget->setMediaObject(player);
- widget->show();
-
- player->play();
- \endcode
-
- \sa QMediaObject, QMediaService, QVideoWidget, QMediaPlaylist
-*/
-
-namespace
-{
-class MediaPlayerRegisterMetaTypes
-{
-public:
- MediaPlayerRegisterMetaTypes()
- {
- qRegisterMetaType<QMediaPlayer::State>();
- qRegisterMetaType<QMediaPlayer::MediaStatus>();
- qRegisterMetaType<QMediaPlayer::Error>();
- }
-} _registerPlayerMetaTypes;
-}
-
-class QMediaPlayerPrivate : public QMediaObjectPrivate
-{
- Q_DECLARE_NON_CONST_PUBLIC(QMediaPlayer)
-
-public:
- QMediaPlayerPrivate()
- : provider(0)
- , control(0)
- , playlistControl(0)
- , state(QMediaPlayer::StoppedState)
- , error(QMediaPlayer::NoError)
- , filterStates(false)
- , playlist(0)
- {}
-
- QMediaServiceProvider *provider;
- QMediaPlayerControl* control;
- QMediaPlaylistControl* playlistControl;
- QMediaPlayer::State state;
- QMediaPlayer::Error error;
- QString errorString;
- bool filterStates;
-
- QMediaPlaylist *playlist;
- QPointer<QVideoWidget> videoWidget;
-#ifndef QT_NO_GRAPHICSVIEW
- QPointer<QGraphicsVideoItem> videoItem;
-#endif
-
- void _q_stateChanged(QMediaPlayer::State state);
- void _q_mediaStatusChanged(QMediaPlayer::MediaStatus status);
- void _q_error(int error, const QString &errorString);
- void _q_updateMedia(const QMediaContent&);
- void _q_playlistDestroyed();
-};
-
-#define ENUM_NAME(c,e,v) (c::staticMetaObject.enumerator(c::staticMetaObject.indexOfEnumerator(e)).valueToKey((v)))
-
-void QMediaPlayerPrivate::_q_stateChanged(QMediaPlayer::State ps)
-{
- Q_Q(QMediaPlayer);
-
-#ifdef DEBUG_PLAYER_STATE
- qDebug() << "State changed:" << ENUM_NAME(QMediaPlayer, "State", ps) << (filterStates ? "(filtered)" : "");
-#endif
-
- if (filterStates)
- return;
-
- if (playlist
- && !playlistControl //service should do this itself
- && ps != state && ps == QMediaPlayer::StoppedState
- && control->mediaStatus() == QMediaPlayer::EndOfMedia) {
- playlist->next();
- ps = control->state();
- }
-
- if (ps != state) {
- state = ps;
-
- if (ps == QMediaPlayer::PlayingState)
- q->addPropertyWatch("position");
- else
- q->removePropertyWatch("position");
-
- emit q->stateChanged(ps);
- }
-}
-
-void QMediaPlayerPrivate::_q_mediaStatusChanged(QMediaPlayer::MediaStatus status)
-{
- Q_Q(QMediaPlayer);
-
-#ifdef DEBUG_PLAYER_STATE
- qDebug() << "MediaStatus changed:" << ENUM_NAME(QMediaPlayer, "MediaStatus", status);
-#endif
-
- switch (status) {
- case QMediaPlayer::StalledMedia:
- case QMediaPlayer::BufferingMedia:
- q->addPropertyWatch("bufferStatus");
- emit q->mediaStatusChanged(status);
- break;
- default:
- q->removePropertyWatch("bufferStatus");
- emit q->mediaStatusChanged(status);
- break;
- }
-
-}
-
-void QMediaPlayerPrivate::_q_error(int error, const QString &errorString)
-{
- Q_Q(QMediaPlayer);
-
- this->error = QMediaPlayer::Error(error);
- this->errorString = errorString;
-
- emit q->error(this->error);
-}
-
-void QMediaPlayerPrivate::_q_updateMedia(const QMediaContent &media)
-{
- const QMediaPlayer::State currentState = state;
-
- filterStates = true;
- control->setMedia(media, 0);
-
- if (!media.isNull()) {
- switch (currentState) {
- case QMediaPlayer::PlayingState:
- control->play();
- break;
- case QMediaPlayer::PausedState:
- control->pause();
- break;
- default:
- break;
- }
- }
- filterStates = false;
-
- state = control->state();
-
- if (state != currentState) {
-#ifdef DEBUG_PLAYER_STATE
- qDebug() << "State changed:" << ENUM_NAME(QMediaPlayer, "State", state);
-#endif
- emit q_func()->stateChanged(state);
- }
-}
-
-void QMediaPlayerPrivate::_q_playlistDestroyed()
-{
- playlist = 0;
-
- control->setMedia(QMediaContent(), 0);
-}
-
-static QMediaService *playerService(QMediaPlayer::Flags flags, QMediaServiceProvider *provider)
-{
- if (flags) {
- QMediaServiceProviderHint::Features features = 0;
- if (flags & QMediaPlayer::LowLatency)
- features |= QMediaServiceProviderHint::LowLatencyPlayback;
-
- if (flags & QMediaPlayer::StreamPlayback)
- features |= QMediaServiceProviderHint::StreamPlayback;
-
- return provider->requestService(Q_MEDIASERVICE_MEDIAPLAYER,
- QMediaServiceProviderHint(features));
- } else
- return provider->requestService(Q_MEDIASERVICE_MEDIAPLAYER);
-}
-
-
-/*!
- Construct a QMediaPlayer that uses the playback service from \a provider,
- parented to \a parent and with \a flags.
-
- If a playback service is not specified the system default will be used.
-*/
-
-QMediaPlayer::QMediaPlayer(QObject *parent, QMediaPlayer::Flags flags, QMediaServiceProvider *provider):
- QMediaObject(*new QMediaPlayerPrivate,
- parent,
- playerService(flags,provider))
-{
- Q_D(QMediaPlayer);
-
- d->provider = provider;
-
- if (d->service == 0) {
- d->error = ServiceMissingError;
- } else {
- d->control = qobject_cast<QMediaPlayerControl*>(d->service->control(QMediaPlayerControl_iid));
- d->playlistControl = qobject_cast<QMediaPlaylistControl*>(d->service->control(QMediaPlaylistControl_iid));
- if (d->control != 0) {
- connect(d->control, SIGNAL(mediaChanged(QMediaContent)), SIGNAL(mediaChanged(QMediaContent)));
- connect(d->control, SIGNAL(stateChanged(QMediaPlayer::State)), SLOT(_q_stateChanged(QMediaPlayer::State)));
- connect(d->control, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)),
- SLOT(_q_mediaStatusChanged(QMediaPlayer::MediaStatus)));
- connect(d->control, SIGNAL(error(int,QString)), SLOT(_q_error(int,QString)));
-
- connect(d->control, SIGNAL(durationChanged(qint64)), SIGNAL(durationChanged(qint64)));
- connect(d->control, SIGNAL(positionChanged(qint64)), SIGNAL(positionChanged(qint64)));
- connect(d->control, SIGNAL(audioAvailableChanged(bool)), SIGNAL(audioAvailableChanged(bool)));
- connect(d->control, SIGNAL(videoAvailableChanged(bool)), SIGNAL(videoAvailableChanged(bool)));
- connect(d->control, SIGNAL(volumeChanged(int)), SIGNAL(volumeChanged(int)));
- connect(d->control, SIGNAL(mutedChanged(bool)), SIGNAL(mutedChanged(bool)));
- connect(d->control, SIGNAL(seekableChanged(bool)), SIGNAL(seekableChanged(bool)));
- connect(d->control, SIGNAL(playbackRateChanged(qreal)), SIGNAL(playbackRateChanged(qreal)));
-
- if (d->control->state() == PlayingState)
- addPropertyWatch("position");
-
- if (d->control->mediaStatus() == StalledMedia || d->control->mediaStatus() == BufferingMedia)
- addPropertyWatch("bufferStatus");
- }
- }
-}
-
-
-/*!
- Destroys the player object.
-*/
-
-QMediaPlayer::~QMediaPlayer()
-{
- Q_D(QMediaPlayer);
-
- d->provider->releaseService(d->service);
-}
-
-QMediaContent QMediaPlayer::media() const
-{
- Q_D(const QMediaPlayer);
-
- if (d->control != 0)
- return d->control->media();
-
- return QMediaContent();
-}
-
-/*!
- Returns the stream source of media data.
-
- This is only valid if a stream was passed to setMedia().
-
- \sa setMedia()
-*/
-
-const QIODevice *QMediaPlayer::mediaStream() const
-{
- Q_D(const QMediaPlayer);
-
- if (d->control != 0)
- return d->control->mediaStream();
-
- return 0;
-}
-
-QMediaPlayer::State QMediaPlayer::state() const
-{
- return d_func()->state;
-}
-
-QMediaPlayer::MediaStatus QMediaPlayer::mediaStatus() const
-{
- Q_D(const QMediaPlayer);
-
- if (d->control != 0)
- return d->control->mediaStatus();
-
- return QMediaPlayer::UnknownMediaStatus;
-}
-
-qint64 QMediaPlayer::duration() const
-{
- Q_D(const QMediaPlayer);
-
- if (d->control != 0)
- return d->control->duration();
-
- return -1;
-}
-
-qint64 QMediaPlayer::position() const
-{
- Q_D(const QMediaPlayer);
-
- if (d->control != 0)
- return d->control->position();
-
- return 0;
-}
-
-int QMediaPlayer::volume() const
-{
- Q_D(const QMediaPlayer);
-
- if (d->control != 0)
- return d->control->volume();
-
- return 0;
-}
-
-bool QMediaPlayer::isMuted() const
-{
- Q_D(const QMediaPlayer);
-
- if (d->control != 0)
- return d->control->isMuted();
-
- return false;
-}
-
-int QMediaPlayer::bufferStatus() const
-{
- Q_D(const QMediaPlayer);
-
- if (d->control != 0)
- return d->control->bufferStatus();
-
- return 0;
-}
-
-bool QMediaPlayer::isAudioAvailable() const
-{
- Q_D(const QMediaPlayer);
-
- if (d->control != 0)
- return d->control->isAudioAvailable();
-
- return false;
-}
-
-bool QMediaPlayer::isVideoAvailable() const
-{
- Q_D(const QMediaPlayer);
-
- if (d->control != 0)
- return d->control->isVideoAvailable();
-
- return false;
-}
-
-bool QMediaPlayer::isSeekable() const
-{
- Q_D(const QMediaPlayer);
-
- if (d->control != 0)
- return d->control->isSeekable();
-
- return false;
-}
-
-qreal QMediaPlayer::playbackRate() const
-{
- Q_D(const QMediaPlayer);
-
- if (d->control != 0)
- return d->control->playbackRate();
-
- return 0.0;
-}
-
-/*!
- Returns the current error state.
-*/
-
-QMediaPlayer::Error QMediaPlayer::error() const
-{
- return d_func()->error;
-}
-
-QString QMediaPlayer::errorString() const
-{
- return d_func()->errorString;
-}
-
-//public Q_SLOTS:
-/*!
- Start or resume playing the current source.
-*/
-
-void QMediaPlayer::play()
-{
- Q_D(QMediaPlayer);
-
- if (d->control == 0) {
- QMetaObject::invokeMethod(this, "_q_error", Qt::QueuedConnection,
- Q_ARG(int, QMediaPlayer::ServiceMissingError),
- Q_ARG(QString, tr("The QMediaPlayer object does not have a valid service")));
- return;
- }
-
- //if playlist control is available, the service should advance itself
- if (d->playlist && !d->playlistControl && d->playlist->currentIndex() == -1 && !d->playlist->isEmpty())
- d->playlist->setCurrentIndex(0);
-
- // Reset error conditions
- d->error = NoError;
- d->errorString = QString();
-
- d->control->play();
-}
-
-/*!
- Pause playing the current source.
-*/
-
-void QMediaPlayer::pause()
-{
- Q_D(QMediaPlayer);
-
- if (d->control != 0)
- d->control->pause();
-}
-
-/*!
- Stop playing, and reset the play position to the beginning.
-*/
-
-void QMediaPlayer::stop()
-{
- Q_D(QMediaPlayer);
-
- if (d->control != 0)
- d->control->stop();
-}
-
-void QMediaPlayer::setPosition(qint64 position)
-{
- Q_D(QMediaPlayer);
-
- if (d->control == 0 || !isSeekable())
- return;
-
- d->control->setPosition(qBound(qint64(0), duration(), position));
-}
-
-void QMediaPlayer::setVolume(int v)
-{
- Q_D(QMediaPlayer);
-
- if (d->control == 0)
- return;
-
- int clamped = qBound(0, v, 100);
- if (clamped == volume())
- return;
-
- d->control->setVolume(clamped);
-}
-
-void QMediaPlayer::setMuted(bool muted)
-{
- Q_D(QMediaPlayer);
-
- if (d->control == 0 || muted == isMuted())
- return;
-
- d->control->setMuted(muted);
-}
-
-void QMediaPlayer::setPlaybackRate(qreal rate)
-{
- Q_D(QMediaPlayer);
-
- if (d->control != 0)
- d->control->setPlaybackRate(rate);
-}
-
-/*!
- Sets the current \a media source.
-
- If a \a stream is supplied; media data will be read from it instead of resolving the media
- source. In this case the media source may still be used to resolve additional information
- about the media such as mime type.
-
- Setting the media to a null QMediaContent will cause the player to discard all
- information relating to the current media source and to cease all I/O operations related
- to that media.
-*/
-
-void QMediaPlayer::setMedia(const QMediaContent &media, QIODevice *stream)
-{
- Q_D(QMediaPlayer);
-
- if (d->control != 0)
- d_func()->control->setMedia(media, stream);
-}
-
-/*!
- \internal
-*/
-
-void QMediaPlayer::bind(QObject *obj)
-{
- Q_D(QMediaPlayer);
-
- if (d->control != 0) {
- QMediaPlaylist *playlist = qobject_cast<QMediaPlaylist*>(obj);
-
- if (playlist) {
- if (d->playlist)
- d->playlist->setMediaObject(0);
-
- d->playlist = playlist;
- connect(d->playlist, SIGNAL(currentMediaChanged(QMediaContent)),
- this, SLOT(_q_updateMedia(QMediaContent)));
- connect(d->playlist, SIGNAL(destroyed()), this, SLOT(_q_playlistDestroyed()));
-
- setMedia(playlist->currentMedia());
-
- return;
- }
-
- QVideoWidget *videoWidget = qobject_cast<QVideoWidget*>(obj);
-#ifndef QT_NO_GRAPHICSVIEW
- QGraphicsVideoItem *videoItem = qobject_cast<QGraphicsVideoItem*>(obj);
-#endif
-
- if (videoWidget
-#ifndef QT_NO_GRAPHICSVIEW
- || videoItem
-#endif
- ) {
- //detach the current video output
- if (d->videoWidget) {
- d->videoWidget->setMediaObject(0);
- d->videoWidget = 0;
- }
-
-#ifndef QT_NO_GRAPHICSVIEW
- if (d->videoItem) {
- d->videoItem->setMediaObject(0);
- d->videoItem = 0;
- }
-#endif
- }
-
- if (videoWidget)
- d->videoWidget = videoWidget;
-
-#ifndef QT_NO_GRAPHICSVIEW
- if (videoItem)
- d->videoItem = videoItem;
-#endif
- }
-}
-
-/*!
- \internal
-*/
-
-void QMediaPlayer::unbind(QObject *obj)
-{
- Q_D(QMediaPlayer);
-
- if (obj == d->videoWidget) {
- d->videoWidget = 0;
-#ifndef QT_NO_GRAPHICSVIEW
- } else if (obj == d->videoItem) {
- d->videoItem = 0;
-#endif
- } else if (obj == d->playlist) {
- disconnect(d->playlist, SIGNAL(currentMediaChanged(QMediaContent)),
- this, SLOT(_q_updateMedia(QMediaContent)));
- disconnect(d->playlist, SIGNAL(destroyed()), this, SLOT(_q_playlistDestroyed()));
- d->playlist = 0;
- setMedia(QMediaContent());
- }
-}
-
-/*!
- Returns the level of support a media player has for a \a mimeType and a set of \a codecs.
-
- The \a flags argument allows additional requirements such as performance indicators to be
- specified.
-*/
-QtMediaServices::SupportEstimate QMediaPlayer::hasSupport(const QString &mimeType,
- const QStringList& codecs,
- Flags flags)
-{
- return QMediaServiceProvider::defaultServiceProvider()->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER),
- mimeType,
- codecs,
- flags);
-}
-
-/*!
- Returns a list of MIME types supported by the media player.
-
- The \a flags argument causes the resultant list to be restricted to MIME types which can be supported
- given additional requirements, such as performance indicators.
-*/
-QStringList QMediaPlayer::supportedMimeTypes(Flags flags)
-{
- return QMediaServiceProvider::defaultServiceProvider()->supportedMimeTypes(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER),
- flags);
-}
-
-
-// Enums
-/*!
- \enum QMediaPlayer::State
-
- Defines the current state of a media player.
-
- \value PlayingState The media player is currently playing content.
- \value PausedState The media player has paused playback, playback of the current track will
- resume from the position the player was paused at.
- \value StoppedState The media player is not playing content, playback will begin from the start
- of the current track.
-*/
-
-/*!
- \enum QMediaPlayer::MediaStatus
-
- Defines the status of a media player's current media.
-
- \value UnknownMediaStatus The status of the media cannot be determined.
- \value NoMedia The is no current media. The player is in the StoppedState.
- \value LoadingMedia The current media is being loaded. The player may be in any state.
- \value LoadedMedia The current media has been loaded. The player is in the StoppedState.
- \value StalledMedia Playback of the current media has stalled due to insufficient buffering or
- some other temporary interruption. The player is in the PlayingState or PausedState.
- \value BufferingMedia The player is buffering data but has enough data buffered for playback to
- continue for the immediate future. The player is in the PlayingState or PausedState.
- \value BufferedMedia The player has fully buffered the current media. The player is in the
- PlayingState or PausedState.
- \value EndOfMedia Playback has reached the end of the current media. The player is in the
- StoppedState.
- \value InvalidMedia The current media cannot be played. The player is in the StoppedState.
-*/
-
-/*!
- \enum QMediaPlayer::Error
-
- Defines a media player error condition.
-
- \value NoError No error has occurred.
- \value ResourceError A media resource couldn't be resolved.
- \value FormatError The format of a media resource isn't (fully) supported. Playback may still
- be possible, but without an audio or video component.
- \value NetworkError A network error occurred.
- \value AccessDeniedError There are not the appropriate permissions to play a media resource.
- \value ServiceMissingError A valid playback service was not found, playback cannot proceed.
-*/
-
-// Signals
-/*!
- \fn QMediaPlayer::error(QMediaPlayer::Error error)
-
- Signals that an \a error condition has occurred.
-
- \sa errorString()
-*/
-
-/*!
- \fn void QMediaPlayer::stateChanged(State state)
-
- Signal the \a state of the Player object has changed.
-*/
-
-/*!
- \fn QMediaPlayer::mediaStatusChanged(QMediaPlayer::MediaStatus status)
-
- Signals that the \a status of the current media has changed.
-
- \sa mediaStatus()
-*/
-
-/*!
- \fn void QMediaPlayer::mediaChanged(const QMediaContent &media);
-
- Signals that the current playing content will be obtained from \a media.
-
- \sa media()
-*/
-
-/*!
- \fn void QMediaPlayer::playbackRateChanged(qreal rate);
-
- Signals the playbackRate has changed to \a rate.
-*/
-
-/*!
- \fn void QMediaPlayer::seekableChanged(bool seekable);
-
- Signals the \a seekable status of the player object has changed.
-*/
-
-// Properties
-/*!
- \property QMediaPlayer::state
- \brief the media player's playback state.
-
- By default this property is QMediaPlayer::Stopped
-
- \sa mediaStatus(), play(), pause(), stop()
-*/
-
-/*!
- \property QMediaPlayer::error
- \brief a string describing the last error condition.
-
- \sa error()
-*/
-
-/*!
- \property QMediaPlayer::media
- \brief the active media source being used by the player object.
-
- The player object will use the QMediaContent for selection of the content to
- be played.
-
- By default this property has a null QMediaContent.
-
- Setting this property to a null QMediaContent will cause the player to discard all
- information relating to the current media source and to cease all I/O operations related
- to that media.
-
- \sa QMediaContent
-*/
-
-/*!
- \property QMediaPlayer::mediaStatus
- \brief the status of the current media stream.
-
- The stream status describes how the playback of the current stream is
- progressing.
-
- By default this property is QMediaPlayer::NoMedia
-
- \sa state
-*/
-
-/*!
- \property QMediaPlayer::duration
- \brief the duration of the current media.
-
- The value is the total playback time in milliseconds of the current media.
- The value may change across the life time of the QMediaPlayer object and
- may not be available when initial playback begins, connect to the
- durationChanged() signal to receive status notifications.
-*/
-
-/*!
- \property QMediaPlayer::position
- \brief the playback position of the current media.
-
- The value is the current playback position, expressed in milliseconds since
- the beginning of the media. Periodically changes in the position will be
- indicated with the signal positionChanged(), the interval between updates
- can be set with QMediaObject's method setNotifyInterval().
-*/
-
-/*!
- \property QMediaPlayer::volume
- \brief the current playback volume.
-
- The playback volume is a linear in effect and the value can range from 0 -
- 100, values outside this range will be clamped.
-*/
-
-/*!
- \property QMediaPlayer::muted
- \brief the muted state of the current media.
-
- The value will be true if the playback volume is muted; otherwise false.
-*/
-
-/*!
- \property QMediaPlayer::bufferStatus
- \brief the percentage of the temporary buffer filled before playback begins.
-
- When the player object is buffering; this property holds the percentage of
- the temporary buffer that is filled. The buffer will need to reach 100%
- filled before playback can resume, at which time the MediaStatus will be
- BufferedMedia.
-
- \sa mediaStatus()
-*/
-
-/*!
- \property QMediaPlayer::audioAvailable
- \brief the audio availabilty status for the current media.
-
- As the life time of QMediaPlayer can be longer than the playback of one
- QMediaContent, this property may change over time, the
- audioAvailableChanged signal can be used to monitor it's status.
-*/
-
-/*!
- \property QMediaPlayer::videoAvailable
- \brief the video availability status for the current media.
-
- If available, the QVideoWidget class can be used to view the video. As the
- life time of QMediaPlayer can be longer than the playback of one
- QMediaContent, this property may change over time, the
- videoAvailableChanged signal can be used to monitor it's status.
-
- \sa QVideoWidget, QMediaContent
-*/
-
-/*!
- \property QMediaPlayer::seekable
- \brief the seek-able status of the current media
-
- If seeking is supported this property will be true; false otherwise. The
- status of this property may change across the life time of the QMediaPlayer
- object, use the seekableChanged signal to monitor changes.
-*/
-
-/*!
- \property QMediaPlayer::playbackRate
- \brief the playback rate of the current media.
-
- This value is a multiplier applied to the media's standard play rate. By
- default this value is 1.0, indicating that the media is playing at the
- standard pace. Values higher than 1.0 will increase the rate of play.
- Values less than zero can be set and indicate the media will rewind at the
- multiplier of the standard pace.
-
- Not all playback services support change of the playback rate. It is
- framework defined as to the status and quality of audio and video
- while fast forwarding or rewinding.
-*/
-
-/*!
- \fn void QMediaPlayer::durationChanged(qint64 duration)
-
- Signal the duration of the content has changed to \a duration, expressed in milliseconds.
-*/
-
-/*!
- \fn void QMediaPlayer::positionChanged(qint64 position)
-
- Signal the position of the content has changed to \a position, expressed in
- milliseconds.
-*/
-
-/*!
- \fn void QMediaPlayer::volumeChanged(int volume)
-
- Signal the playback volume has changed to \a volume.
-*/
-
-/*!
- \fn void QMediaPlayer::mutedChanged(bool muted)
-
- Signal the mute state has changed to \a muted.
-*/
-
-/*!
- \fn void QMediaPlayer::audioAvailableChanged(bool available)
-
- Signals the availability of audio content has changed to \a available.
-*/
-
-/*!
- \fn void QMediaPlayer::videoAvailableChanged(bool videoAvailable)
-
- Signal the availability of visual content has changed to \a videoAvailable.
-*/
-
-/*!
- \fn void QMediaPlayer::bufferStatusChanged(int percentFilled)
-
- Signal the amount of the local buffer filled as a percentage by \a percentFilled.
-*/
-
-/*!
- \enum QMediaPlayer::Flag
-
- \value LowLatency
- The player is expected to be used with simple audio formats,
- but playback should start without significant delay.
- Such playback service can be used for beeps, ringtones, etc.
-
- \value StreamPlayback
- The player is expected to play QIODevice based streams.
- If passed to QMediaPlayer constructor, the service supporting
- streams playback will be choosen.
-*/
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#include "moc_qmediaplayer.cpp"
diff --git a/src/multimedia/mediaservices/playback/qmediaplayer.h b/src/multimedia/mediaservices/playback/qmediaplayer.h
deleted file mode 100644
index d75c58a..0000000
--- a/src/multimedia/mediaservices/playback/qmediaplayer.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIAPLAYER_H
-#define QMEDIAPLAYER_H
-
-#include <QtMediaServices/qmediaserviceprovider.h>
-#include <QtMediaServices/qmediaobject.h>
-#include <QtMediaServices/qmediacontent.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-
-class QMediaPlaylist;
-
-class QMediaPlayerPrivate;
-class Q_MEDIASERVICES_EXPORT QMediaPlayer : public QMediaObject
-{
- Q_OBJECT
- Q_PROPERTY(QMediaContent media READ media WRITE setMedia NOTIFY mediaChanged)
- Q_PROPERTY(qint64 duration READ duration NOTIFY durationChanged)
- Q_PROPERTY(qint64 position READ position WRITE setPosition NOTIFY positionChanged)
- Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged)
- Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
- Q_PROPERTY(int bufferStatus READ bufferStatus NOTIFY bufferStatusChanged)
- Q_PROPERTY(bool audioAvailable READ isAudioAvailable NOTIFY audioAvailableChanged)
- Q_PROPERTY(bool videoAvailable READ isVideoAvailable NOTIFY videoAvailableChanged)
- Q_PROPERTY(bool seekable READ isSeekable NOTIFY seekableChanged)
- Q_PROPERTY(qreal playbackRate READ playbackRate WRITE setPlaybackRate NOTIFY playbackRateChanged)
- Q_PROPERTY(State state READ state NOTIFY stateChanged)
- Q_PROPERTY(MediaStatus mediaStatus READ mediaStatus NOTIFY mediaStatusChanged)
- Q_PROPERTY(QString error READ errorString)
- Q_ENUMS(State)
- Q_ENUMS(MediaStatus)
-
-public:
- enum State
- {
- StoppedState,
- PlayingState,
- PausedState
- };
-
- enum MediaStatus
- {
- UnknownMediaStatus,
- NoMedia,
- LoadingMedia,
- LoadedMedia,
- StalledMedia,
- BufferingMedia,
- BufferedMedia,
- EndOfMedia,
- InvalidMedia
- };
-
- enum Flag
- {
- LowLatency = 0x01,
- StreamPlayback = 0x02
- };
- Q_DECLARE_FLAGS(Flags, Flag)
-
- enum Error
- {
- NoError,
- ResourceError,
- FormatError,
- NetworkError,
- AccessDeniedError,
- ServiceMissingError
- };
-
- QMediaPlayer(QObject *parent = 0, Flags flags = 0, QMediaServiceProvider *provider = QMediaServiceProvider::defaultServiceProvider());
- ~QMediaPlayer();
-
- static QtMediaServices::SupportEstimate hasSupport(const QString &mimeType,
- const QStringList& codecs = QStringList(),
- Flags flags = 0);
- static QStringList supportedMimeTypes(Flags flags = 0);
-
- QMediaContent media() const;
- const QIODevice *mediaStream() const;
-
- State state() const;
- MediaStatus mediaStatus() const;
-
- qint64 duration() const;
- qint64 position() const;
-
- int volume() const;
- bool isMuted() const;
- bool isAudioAvailable() const;
- bool isVideoAvailable() const;
-
- int bufferStatus() const;
-
- bool isSeekable() const;
- qreal playbackRate() const;
-
- Error error() const;
- QString errorString() const;
-
-public Q_SLOTS:
- void play();
- void pause();
- void stop();
-
- void setPosition(qint64 position);
- void setVolume(int volume);
- void setMuted(bool muted);
-
- void setPlaybackRate(qreal rate);
-
- void setMedia(const QMediaContent &media, QIODevice *stream = 0);
-
-Q_SIGNALS:
- void mediaChanged(const QMediaContent &media);
-
- void stateChanged(QMediaPlayer::State newState);
- void mediaStatusChanged(QMediaPlayer::MediaStatus status);
-
- void durationChanged(qint64 duration);
- void positionChanged(qint64 position);
-
- void volumeChanged(int volume);
- void mutedChanged(bool muted);
- void audioAvailableChanged(bool audioAvailable);
- void videoAvailableChanged(bool videoAvailable);
-
- void bufferStatusChanged(int percentFilled);
-
- void seekableChanged(bool seekable);
- void playbackRateChanged(qreal rate);
-
- void error(QMediaPlayer::Error error);
-
-public:
- virtual void bind(QObject*);
- virtual void unbind(QObject*);
-
-private:
- Q_DISABLE_COPY(QMediaPlayer)
- Q_DECLARE_PRIVATE(QMediaPlayer)
- Q_PRIVATE_SLOT(d_func(), void _q_stateChanged(QMediaPlayer::State))
- Q_PRIVATE_SLOT(d_func(), void _q_mediaStatusChanged(QMediaPlayer::MediaStatus))
- Q_PRIVATE_SLOT(d_func(), void _q_error(int, const QString &))
- Q_PRIVATE_SLOT(d_func(), void _q_updateMedia(const QMediaContent&))
- Q_PRIVATE_SLOT(d_func(), void _q_playlistDestroyed())
-};
-
-QT_END_NAMESPACE
-
-Q_DECLARE_METATYPE(QMediaPlayer::State)
-Q_DECLARE_METATYPE(QMediaPlayer::MediaStatus)
-Q_DECLARE_METATYPE(QMediaPlayer::Error)
-
-QT_END_HEADER
-
-#endif // QMEDIAPLAYER_H
diff --git a/src/multimedia/mediaservices/playback/qmediaplayercontrol.cpp b/src/multimedia/mediaservices/playback/qmediaplayercontrol.cpp
deleted file mode 100644
index ca58ce4..0000000
--- a/src/multimedia/mediaservices/playback/qmediaplayercontrol.cpp
+++ /dev/null
@@ -1,378 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 <QtMediaServices/qmediaplayercontrol.h>
-#include <QtMediaServices/private/qmediacontrol_p.h>
-#include <QtMediaServices/qmediaplayer.h>
-
-
-QT_BEGIN_NAMESPACE
-
-
-/*!
- \class QMediaPlayerControl
- \ingroup multimedia-serv
- \since 4.7
- \preliminary
- \brief The QMediaPlayerControl class provides access to the media playing
- functionality of a QMediaService.
-
- If a QMediaService can play media is will implement QMediaPlayerControl.
- This control provides a means to set the \l {setMedia()}{media} to play,
- \l {play()}{start}, \l {pause()} {pause} and \l {stop()}{stop} playback,
- \l {setPosition()}{seek}, and control the \l {setVolume()}{volume}.
- It also provides feedback on the \l {duration()}{duration} of the media,
- the current \l {position()}{position}, and \l {bufferStatus()}{buffering}
- progress.
-
- The functionality provided by this control is exposed to application
- code through the QMediaPlayer class.
-
- The interface name of QMediaPlayerControl is \c com.nokia.Qt.QMediaPlayerControl/1.0 as
- defined in QMediaPlayerControl_iid.
-
- \sa QMediaService::control(), QMediaPlayer
-*/
-
-/*!
- \macro QMediaPlayerControl_iid
-
- \c com.nokia.Qt.QMediaPlayerControl/1.0
-
- Defines the interface name of the QMediaPlayerControl class.
-
- \relates QMediaPlayerControl
-*/
-
-/*!
- Destroys a media player control.
-*/
-QMediaPlayerControl::~QMediaPlayerControl()
-{
-}
-
-/*!
- Constructs a new media player control with the given \a parent.
-*/
-QMediaPlayerControl::QMediaPlayerControl(QObject *parent):
- QMediaControl(*new QMediaControlPrivate, parent)
-{
-}
-
-/*!
- \fn QMediaPlayerControl::state() const
-
- Returns the state of a player control.
-*/
-
-/*!
- \fn QMediaPlayerControl::stateChanged(QMediaPlayer::State state)
-
- Signals that the \a state of a player control has changed.
-
- \sa state()
-*/
-
-/*!
- \fn QMediaPlayerControl::mediaStatus() const
-
- Returns the status of the current media.
-*/
-
-/*!
- \fn QMediaPlayerControl::mediaStatusChanged(QMediaPlayer::MediaStatus status)
-
- Signals that the \a status of the current media has changed.
-
- \sa mediaStatus()
-*/
-
-
-/*!
- \fn QMediaPlayerControl::duration() const
-
- Returns the duration of the current media in milliseconds.
-*/
-
-/*!
- \fn QMediaPlayerControl::durationChanged(qint64 duration)
-
- Signals that the \a duration of the current media has changed.
-
- \sa duration()
-*/
-
-/*!
- \fn QMediaPlayerControl::position() const
-
- Returns the current playback position in milliseconds.
-*/
-
-/*!
- \fn QMediaPlayerControl::setPosition(qint64 position)
-
- Sets the playback \a position of the current media. This will initiate a seek and it may take
- some time for playback to reach the position set.
-*/
-
-/*!
- \fn QMediaPlayerControl::positionChanged(qint64 position)
-
- Signals the playback \a position has changed.
-
- This is only emitted in when there has been a discontinous change in the playback postion, such
- as a seek or the position being reset.
-
- \sa position()
-*/
-
-/*!
- \fn QMediaPlayerControl::volume() const
-
- Returns the audio volume of a player control.
-*/
-
-/*!
- \fn QMediaPlayerControl::setVolume(int volume)
-
- Sets the audio \a volume of a player control.
-*/
-
-/*!
- \fn QMediaPlayerControl::volumeChanged(int volume)
-
- Signals the audio \a volume of a player control has changed.
-
- \sa volume()
-*/
-
-/*!
- \fn QMediaPlayerControl::isMuted() const
-
- Returns the mute state of a player control.
-*/
-
-/*!
- \fn QMediaPlayerControl::setMuted(bool mute)
-
- Sets the \a mute state of a player control.
-*/
-
-/*!
- \fn QMediaPlayerControl::mutedChanged(bool mute)
-
- Signals a change in the \a mute status of a player control.
-
- \sa isMuted()
-*/
-
-/*!
- \fn QMediaPlayerControl::bufferStatus() const
-
- Returns the buffering progress of the current media. Progress is measured in the percentage
- of the buffer filled.
-*/
-
-/*!
- \fn QMediaPlayerControl::bufferStatusChanged(int progress)
-
- Signals that buffering \a progress has changed.
-
- \sa bufferStatus()
-*/
-
-/*!
- \fn QMediaPlayerControl::isAudioAvailable() const
-
- Identifies if there is audio output available for the current media.
-
- Returns true if audio output is available and false otherwise.
-*/
-
-/*!
- \fn QMediaPlayerControl::audioAvailableChanged(bool audio)
-
- Signals that there has been a change in the availability of \a audio output.
-
- \sa isAudioAvailable()
-*/
-
-/*!
- \fn QMediaPlayerControl::isVideoAvailable() const
-
- Identifies if there is video output available for the current media.
-
- Returns true if video output is available and false otherwise.
-*/
-
-/*!
- \fn QMediaPlayerControl::videoAvailableChanged(bool video)
-
- Signals that there has been a change in the availability of \a video output.
-
- \sa isVideoAvailable()
-*/
-
-/*!
- \fn QMediaPlayerControl::isSeekable() const
-
- Identifies if the current media is seekable.
-
- Returns true if it possible to seek within the current media, and false otherwise.
-*/
-
-/*!
- \fn QMediaPlayerControl::seekableChanged(bool seekable)
-
- Signals that the \a seekable state of a player control has changed.
-
- \sa isSeekable()
-*/
-
-/*!
- \fn QMediaPlayerControl::availablePlaybackRanges() const
-
- Returns a range of times in milliseconds that can be played back.
-
- Usually for local files this is a continuous interval equal to [0..duration()]
- or an empty time range if seeking is not supported, but for network sources
- it refers to the buffered parts of the media.
-*/
-
-/*!
- \fn QMediaPlayerControl::availablePlaybackRangesChanged(const QMediaTimeRange &ranges)
-
- Signals that the available media playback \a ranges have changed.
-
- \sa QMediaPlayerControl::availablePlaybackRanges()
-*/
-
-/*!
- \fn qreal QMediaPlayerControl::playbackRate() const
-
- Returns the rate of playback.
-*/
-
-/*!
- \fn QMediaPlayerControl::setPlaybackRate(qreal rate)
-
- Sets the \a rate of playback.
-*/
-
-/*!
- \fn QMediaPlayerControl::media() const
-
- Returns the current media source.
-*/
-
-/*!
- \fn QMediaPlayerControl::mediaStream() const
-
- Returns the current media stream. This is only a valid if a stream was passed to setMedia().
-
- \sa setMedia()
-*/
-
-/*!
- \fn QMediaPlayerControl::setMedia(const QMediaContent &media, QIODevice *stream)
-
- Sets the current \a media source. If a \a stream is supplied; data will be read from that
- instead of attempting to resolve the media source. The media source may still be used to
- supply media information such as mime type.
-
- Setting the media to a null QMediaContent will cause the control to discard all
- information relating to the current media source and to cease all I/O operations related
- to that media.
-*/
-
-/*!
- \fn QMediaPlayerControl::mediaChanged(const QMediaContent& content)
-
- Signals that the current media \a content has changed.
-*/
-
-/*!
- \fn QMediaPlayerControl::play()
-
- Starts playback of the current media.
-
- If successful the player control will immediately enter the \l {QMediaPlayer::PlayingState}
- {playing} state.
-
- \sa state()
-*/
-
-/*!
- \fn QMediaPlayerControl::pause()
-
- Pauses playback of the current media.
-
- If sucessful the player control will immediately enter the \l {QMediaPlayer::PausedState}
- {paused} state.
-
- \sa state(), play(), stop()
-*/
-
-/*!
- \fn QMediaPlayerControl::stop()
-
- Stops playback of the current media.
-
- If succesful the player control will immediately enter the \l {QMediaPlayer::StoppedState}
- {stopped} state.
-*/
-
-/*!
- \fn QMediaPlayerControl::error(int error, const QString &errorString)
-
- Signals that an \a error has occurred. The \a errorString provides a more detailed explanation.
-*/
-
-/*!
- \fn QMediaPlayerControl::playbackRateChanged(qreal rate)
-
- Signal emitted when playback rate changes to \a rate.
-*/
-
-QT_END_NAMESPACE
-
-#include "moc_qmediaplayercontrol.cpp"
-
diff --git a/src/multimedia/mediaservices/playback/qmediaplayercontrol.h b/src/multimedia/mediaservices/playback/qmediaplayercontrol.h
deleted file mode 100644
index 7a3c24e..0000000
--- a/src/multimedia/mediaservices/playback/qmediaplayercontrol.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtMediaServices 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 QMEDIAPLAYERCONTROL_H
-#define QMEDIAPLAYERCONTROL_H
-
-#include <QtCore/qpair.h>
-
-#include <QtMediaServices/qmediacontrol.h>
-#include <QtMediaServices/qmediaplayer.h>
-#include <QtMediaServices/qmediatimerange.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Multimedia)
-
-
-class QMediaPlaylist;
-
-class Q_MEDIASERVICES_EXPORT QMediaPlayerControl : public QMediaControl
-{
- Q_OBJECT
-
-public:
- ~QMediaPlayerControl();
-
- virtual QMediaPlayer::State state() const = 0;
-
- virtual QMediaPlayer::MediaStatus mediaStatus() const = 0;
-
- virtual qint64 duration() const = 0;
-
- virtual qint64 position() const = 0;
- virtual void setPosition(qint64 position) = 0;
-
- virtual int volume() const = 0;
- virtual void setVolume(int volume) = 0;
-
- virtual bool isMuted() const = 0;
- virtual void setMuted(bool muted) = 0;
-
- virtual int bufferStatus() const = 0;
-
- virtual bool isAudioAvailable() const = 0;
- virtual bool isVideoAvailable() const = 0;
-
- virtual bool isSeekable() const = 0;
-
- virtual QMediaTimeRange availablePlaybackRanges() const = 0;
-
- virtual qreal playbackRate() const = 0;
- virtual void setPlaybackRate(qreal rate) = 0;
-
- virtual QMediaContent media() const = 0;
- virtual const QIODevice *mediaStream() const = 0;
- virtual void setMedia(const QMediaContent &media, QIODevice *stream) = 0;
-
- virtual void play() = 0;
- virtual void pause() = 0;
- virtual void stop() = 0;
-
-Q_SIGNALS:
- void mediaChanged(const QMediaContent& content);
- void durationChanged(qint64 duration);
- void positionChanged(qint64 position);
- void stateChanged(QMediaPlayer::State newState);
- void mediaStatusChanged(QMediaPlayer::MediaStatus status);
- void volumeChanged(int volume);
- void mutedChanged(bool muted);
- void audioAvailableChanged(bool audioAvailable);
- void videoAvailableChanged(bool videoAvailable);
- void bufferStatusChanged(int percentFilled);
- void seekableChanged(bool);
- void availablePlaybackRangesChanged(const QMediaTimeRange&);
- void playbackRateChanged(qreal rate);
- void error(int error, const QString &errorString);
-
-protected:
- QMediaPlayerControl(QObject* parent = 0);
-};
-
-#define QMediaPlayerControl_iid "com.nokia.Qt.QMediaPlayerControl/1.0"
-Q_MEDIA_DECLARE_CONTROL(QMediaPlayerControl, QMediaPlayerControl_iid)
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QMEDIAPLAYERCONTROL_H
-
diff --git a/src/multimedia/multimedia.pro b/src/multimedia/multimedia.pro
index 8cdcb38..93da612 100644
--- a/src/multimedia/multimedia.pro
+++ b/src/multimedia/multimedia.pro
@@ -1,8 +1,19 @@
-TEMPLATE = subdirs
+TARGET = QtMultimedia
+QPRO_PWD = $$PWD
+QT = core gui
-contains(QT_CONFIG, multimedia) {
- SUBDIRS += multimedia
+DEFINES += QT_BUILD_MULTIMEDIA_LIB QT_NO_USING_NAMESPACE
- contains(QT_CONFIG, mediaservices):SUBDIRS += mediaservices
-}
+unix:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
+
+include(../qbase.pri)
+include(audio/audio.pri)
+include(video/video.pri)
+
+symbian: {
+ TARGET.UID3 = 0x2001E627
+ contains(CONFIG, def_files) {
+ DEF_FILE=../../s60installs
+ }
+}
diff --git a/src/multimedia/multimedia/audio/qaudio_symbian_p.cpp b/src/multimedia/multimedia/audio/qaudio_symbian_p.cpp
deleted file mode 100644
index afe98f5..0000000
--- a/src/multimedia/multimedia/audio/qaudio_symbian_p.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMultimedia 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 "qaudio_symbian_p.h"
-#include <mmffourcc.h>
-
-QT_BEGIN_NAMESPACE
-
-namespace SymbianAudio {
-
-DevSoundCapabilities::DevSoundCapabilities(CMMFDevSound &devsound,
- QAudio::Mode mode)
-{
- QT_TRAP_THROWING(constructL(devsound, mode));
-}
-
-DevSoundCapabilities::~DevSoundCapabilities()
-{
- m_fourCC.Close();
-}
-
-void DevSoundCapabilities::constructL(CMMFDevSound &devsound,
- QAudio::Mode mode)
-{
- m_caps = devsound.Capabilities();
-
- TMMFPrioritySettings settings;
-
- switch (mode) {
- case QAudio::AudioOutput:
- settings.iState = EMMFStatePlaying;
- devsound.GetSupportedInputDataTypesL(m_fourCC, settings);
- break;
-
- case QAudio::AudioInput:
- settings.iState = EMMFStateRecording;
- devsound.GetSupportedInputDataTypesL(m_fourCC, settings);
- break;
-
- default:
- Q_ASSERT_X(false, Q_FUNC_INFO, "Invalid mode");
- }
-}
-
-namespace Utils {
-
-//-----------------------------------------------------------------------------
-// Static data
-//-----------------------------------------------------------------------------
-
-// Sample rate / frequency
-
-typedef TMMFSampleRate SampleRateNative;
-typedef int SampleRateQt;
-
-const int SampleRateCount = 12;
-
-const SampleRateNative SampleRateListNative[SampleRateCount] = {
- EMMFSampleRate8000Hz
- , EMMFSampleRate11025Hz
- , EMMFSampleRate12000Hz
- , EMMFSampleRate16000Hz
- , EMMFSampleRate22050Hz
- , EMMFSampleRate24000Hz
- , EMMFSampleRate32000Hz
- , EMMFSampleRate44100Hz
- , EMMFSampleRate48000Hz
- , EMMFSampleRate64000Hz
- , EMMFSampleRate88200Hz
- , EMMFSampleRate96000Hz
-};
-
-const SampleRateQt SampleRateListQt[SampleRateCount] = {
- 8000
- , 11025
- , 12000
- , 16000
- , 22050
- , 24000
- , 32000
- , 44100
- , 48000
- , 64000
- , 88200
- , 96000
-};
-
-// Channels
-
-typedef TMMFMonoStereo ChannelsNative;
-typedef int ChannelsQt;
-
-const int ChannelsCount = 2;
-
-const ChannelsNative ChannelsListNative[ChannelsCount] = {
- EMMFMono
- , EMMFStereo
-};
-
-const ChannelsQt ChannelsListQt[ChannelsCount] = {
- 1
- , 2
-};
-
-// Encoding
-
-const int EncodingCount = 6;
-
-const TUint32 EncodingFourCC[EncodingCount] = {
- KMMFFourCCCodePCM8 // 0
- , KMMFFourCCCodePCMU8 // 1
- , KMMFFourCCCodePCM16 // 2
- , KMMFFourCCCodePCMU16 // 3
- , KMMFFourCCCodePCM16B // 4
- , KMMFFourCCCodePCMU16B // 5
-};
-
-// The characterised DevSound API specification states that the iEncoding
-// field in TMMFCapabilities is ignored, and that the FourCC should be used
-// to specify the PCM encoding.
-// See "SGL.GT0287.102 Multimedia DevSound Baseline Compatibility.doc" in the
-// mm_info/mm_docs repository.
-const TMMFSoundEncoding EncodingNative[EncodingCount] = {
- EMMFSoundEncoding16BitPCM // 0
- , EMMFSoundEncoding16BitPCM // 1
- , EMMFSoundEncoding16BitPCM // 2
- , EMMFSoundEncoding16BitPCM // 3
- , EMMFSoundEncoding16BitPCM // 4
- , EMMFSoundEncoding16BitPCM // 5
-};
-
-
-const int EncodingSampleSize[EncodingCount] = {
- 8 // 0
- , 8 // 1
- , 16 // 2
- , 16 // 3
- , 16 // 4
- , 16 // 5
-};
-
-const QAudioFormat::Endian EncodingByteOrder[EncodingCount] = {
- QAudioFormat::LittleEndian // 0
- , QAudioFormat::LittleEndian // 1
- , QAudioFormat::LittleEndian // 2
- , QAudioFormat::LittleEndian // 3
- , QAudioFormat::BigEndian // 4
- , QAudioFormat::BigEndian // 5
-};
-
-const QAudioFormat::SampleType EncodingSampleType[EncodingCount] = {
- QAudioFormat::SignedInt // 0
- , QAudioFormat::UnSignedInt // 1
- , QAudioFormat::SignedInt // 2
- , QAudioFormat::UnSignedInt // 3
- , QAudioFormat::SignedInt // 4
- , QAudioFormat::UnSignedInt // 5
-};
-
-
-//-----------------------------------------------------------------------------
-// Private functions
-//-----------------------------------------------------------------------------
-
-// Helper functions for implementing parameter conversions
-
-template<typename Input>
-bool findValue(const Input *inputArray, int length, Input input, int &index) {
- bool result = false;
- for (int i=0; !result && i<length; ++i)
- if (inputArray[i] == input) {
- index = i;
- result = true;
- }
- return result;
-}
-
-template<typename Input, typename Output>
-bool convertValue(const Input *inputArray, const Output *outputArray,
- int length, Input input, Output &output) {
- int index;
- const bool result = findValue<Input>(inputArray, length, input, index);
- if (result)
- output = outputArray[index];
- return result;
-}
-
-/**
- * Macro which is used to generate the implementation of the conversion
- * functions. The implementation is just a wrapper around the templated
- * convertValue function, e.g.
- *
- * CONVERSION_FUNCTION_IMPL(SampleRate, Qt, Native)
- *
- * expands to
- *
- * bool SampleRateQtToNative(int input, TMMFSampleRate &output) {
- * return convertValue<SampleRateQt, SampleRateNative>
- * (SampleRateListQt, SampleRateListNative, SampleRateCount,
- * input, output);
- * }
- */
-#define CONVERSION_FUNCTION_IMPL(FieldLc, Field, Input, Output) \
-bool FieldLc##Input##To##Output(Field##Input input, Field##Output &output) { \
- return convertValue<Field##Input, Field##Output>(Field##List##Input, \
- Field##List##Output, Field##Count, input, output); \
-}
-
-//-----------------------------------------------------------------------------
-// Local helper functions
-//-----------------------------------------------------------------------------
-
-CONVERSION_FUNCTION_IMPL(sampleRate, SampleRate, Qt, Native)
-CONVERSION_FUNCTION_IMPL(sampleRate, SampleRate, Native, Qt)
-CONVERSION_FUNCTION_IMPL(channels, Channels, Qt, Native)
-CONVERSION_FUNCTION_IMPL(channels, Channels, Native, Qt)
-
-bool sampleInfoQtToNative(int inputSampleSize,
- QAudioFormat::Endian inputByteOrder,
- QAudioFormat::SampleType inputSampleType,
- TUint32 &outputFourCC,
- TMMFSoundEncoding &outputEncoding) {
-
- bool found = false;
-
- for (int i=0; i<EncodingCount && !found; ++i) {
- if ( EncodingSampleSize[i] == inputSampleSize
- && EncodingByteOrder[i] == inputByteOrder
- && EncodingSampleType[i] == inputSampleType) {
- outputFourCC = EncodingFourCC[i];
- outputEncoding = EncodingNative[i]; // EMMFSoundEncoding16BitPCM
- found = true;
- }
- }
-
- return found;
-}
-
-//-----------------------------------------------------------------------------
-// Public functions
-//-----------------------------------------------------------------------------
-
-void capabilitiesNativeToQt(const DevSoundCapabilities &caps,
- QList<int> &frequencies,
- QList<int> &channels,
- QList<int> &sampleSizes,
- QList<QAudioFormat::Endian> &byteOrders,
- QList<QAudioFormat::SampleType> &sampleTypes) {
-
- frequencies.clear();
- sampleSizes.clear();
- byteOrders.clear();
- sampleTypes.clear();
- channels.clear();
-
- for (int i=0; i<SampleRateCount; ++i)
- if (caps.caps().iRate & SampleRateListNative[i])
- frequencies += SampleRateListQt[i];
-
- for (int i=0; i<ChannelsCount; ++i)
- if (caps.caps().iChannels & ChannelsListNative[i])
- channels += ChannelsListQt[i];
-
- for (int i=0; i<EncodingCount; ++i) {
- if (caps.fourCC().Find(EncodingFourCC[i]) != KErrNotFound) {
- sampleSizes += EncodingSampleSize[i];
- byteOrders += EncodingByteOrder[i];
- sampleTypes += EncodingSampleType[i];
- }
- }
-
-}
-
-bool isFormatSupported(const QAudioFormat &formatQt,
- const DevSoundCapabilities &caps) {
- TMMFCapabilities formatNative;
- TUint32 fourCC;
-
- bool result = false;
- if (formatQt.codec() == QString::fromAscii("audio/pcm") &&
- formatQtToNative(formatQt, fourCC, formatNative)) {
- result =
- (formatNative.iRate & caps.caps().iRate)
- && (formatNative.iChannels & caps.caps().iChannels)
- && (caps.fourCC().Find(fourCC) != KErrNotFound);
- }
- return result;
-}
-
-bool formatQtToNative(const QAudioFormat &inputFormat,
- TUint32 &outputFourCC,
- TMMFCapabilities &outputFormat) {
-
- bool result = false;
-
- // Need to use temporary variables because TMMFCapabilities fields are all
- // TInt, rather than MMF enumerated types.
- TMMFSampleRate outputSampleRate;
- TMMFMonoStereo outputChannels;
- TMMFSoundEncoding outputEncoding;
-
- if (inputFormat.codec() == QString::fromAscii("audio/pcm")) {
- result =
- sampleRateQtToNative(inputFormat.frequency(), outputSampleRate)
- && channelsQtToNative(inputFormat.channels(), outputChannels)
- && sampleInfoQtToNative(inputFormat.sampleSize(),
- inputFormat.byteOrder(),
- inputFormat.sampleType(),
- outputFourCC,
- outputEncoding);
- }
-
- if (result) {
- outputFormat.iRate = outputSampleRate;
- outputFormat.iChannels = outputChannels;
- outputFormat.iEncoding = outputEncoding;
- }
-
- return result;
-}
-
-QAudio::State stateNativeToQt(State nativeState,
- QAudio::State initializingState)
-{
- switch (nativeState) {
- case ClosedState:
- return QAudio::StoppedState;
- case InitializingState:
- return initializingState;
- case ActiveState:
- return QAudio::ActiveState;
- case IdleState:
- return QAudio::IdleState;
- case SuspendedState:
- return QAudio::SuspendedState;
- default:
- Q_ASSERT_X(false, Q_FUNC_INFO, "Invalid state");
- return QAudio::StoppedState; // suppress compiler warning
- }
-}
-
-qint64 bytesToSamples(const QAudioFormat &format, qint64 length)
-{
- return length / ((format.sampleSize() / 8) * format.channels());
-}
-
-qint64 samplesToBytes(const QAudioFormat &format, qint64 samples)
-{
- return samples * (format.sampleSize() / 8) * format.channels();
-}
-
-} // namespace Utils
-} // namespace SymbianAudio
-
-QT_END_NAMESPACE
-
-
diff --git a/src/multimedia/multimedia/audio/qaudio_symbian_p.h b/src/multimedia/multimedia/audio/qaudio_symbian_p.h
deleted file mode 100644
index d5238b4..0000000
--- a/src/multimedia/multimedia/audio/qaudio_symbian_p.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMultimedia 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.
-//
-
-#ifndef QAUDIO_SYMBIAN_P_H
-#define QAUDIO_SYMBIAN_P_H
-
-#include <QtCore/qnamespace.h>
-#include <QtMultimedia/qaudioformat.h>
-#include <QtMultimedia/qaudio.h>
-#include <sounddevice.h>
-
-QT_BEGIN_NAMESPACE
-
-namespace SymbianAudio {
-
-/**
- * Default values used by audio input and output classes, when underlying
- * DevSound instance has not yet been created.
- */
-
-const int DefaultBufferSize = 4096; // bytes
-const int DefaultNotifyInterval = 1000; // ms
-
-/**
- * Enumeration used to track state of internal DevSound instances.
- * Values are translated to the corresponding QAudio::State values by
- * SymbianAudio::Utils::stateNativeToQt.
- */
-enum State {
- ClosedState
- , InitializingState
- , ActiveState
- , IdleState
- , SuspendedState
-};
-
-/*
- * Helper class for querying DevSound codec / format support
- */
-class DevSoundCapabilities {
-public:
- DevSoundCapabilities(CMMFDevSound &devsound, QAudio::Mode mode);
- ~DevSoundCapabilities();
-
- const RArray<TFourCC>& fourCC() const { return m_fourCC; }
- const TMMFCapabilities& caps() const { return m_caps; }
-
-private:
- void constructL(CMMFDevSound &devsound, QAudio::Mode mode);
-
-private:
- RArray<TFourCC> m_fourCC;
- TMMFCapabilities m_caps;
-};
-
-namespace Utils {
-
-/**
- * Convert native audio capabilities to QAudio lists.
- */
-void capabilitiesNativeToQt(const DevSoundCapabilities &caps,
- QList<int> &frequencies,
- QList<int> &channels,
- QList<int> &sampleSizes,
- QList<QAudioFormat::Endian> &byteOrders,
- QList<QAudioFormat::SampleType> &sampleTypes);
-
-/**
- * Check whether format is supported.
- */
-bool isFormatSupported(const QAudioFormat &format,
- const DevSoundCapabilities &caps);
-
-/**
- * Convert QAudioFormat to native format types.
- *
- * Note that, despite the name, DevSound uses TMMFCapabilities to specify
- * single formats as well as capabilities.
- *
- * Note that this function does not modify outputFormat.iBufferSize.
- */
-bool formatQtToNative(const QAudioFormat &inputFormat,
- TUint32 &outputFourCC,
- TMMFCapabilities &outputFormat);
-
-/**
- * Convert internal states to QAudio states.
- */
-QAudio::State stateNativeToQt(State nativeState,
- QAudio::State initializingState);
-
-/**
- * Convert data length to number of samples.
- */
-qint64 bytesToSamples(const QAudioFormat &format, qint64 length);
-
-/**
- * Convert number of samples to data length.
- */
-qint64 samplesToBytes(const QAudioFormat &format, qint64 samples);
-
-} // namespace Utils
-} // namespace SymbianAudio
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/multimedia/multimedia/audio/qaudiodeviceinfo_symbian_p.cpp b/src/multimedia/multimedia/audio/qaudiodeviceinfo_symbian_p.cpp
deleted file mode 100644
index 36284d3..0000000
--- a/src/multimedia/multimedia/audio/qaudiodeviceinfo_symbian_p.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMultimedia 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 "qaudiodeviceinfo_symbian_p.h"
-#include "qaudio_symbian_p.h"
-
-QT_BEGIN_NAMESPACE
-
-QAudioDeviceInfoInternal::QAudioDeviceInfoInternal(QByteArray device,
- QAudio::Mode mode)
- : m_deviceName(QLatin1String(device))
- , m_mode(mode)
- , m_updated(false)
-{
- QT_TRAP_THROWING(m_devsound.reset(CMMFDevSound::NewL()));
-}
-
-QAudioDeviceInfoInternal::~QAudioDeviceInfoInternal()
-{
-
-}
-
-QAudioFormat QAudioDeviceInfoInternal::preferredFormat() const
-{
- QAudioFormat format;
- switch (m_mode) {
- case QAudio::AudioOutput:
- format.setFrequency(44100);
- format.setChannels(2);
- format.setSampleSize(16);
- format.setByteOrder(QAudioFormat::LittleEndian);
- format.setSampleType(QAudioFormat::SignedInt);
- format.setCodec(QLatin1String("audio/pcm"));
- break;
-
- case QAudio::AudioInput:
- format.setFrequency(8000);
- format.setChannels(1);
- format.setSampleSize(16);
- format.setByteOrder(QAudioFormat::LittleEndian);
- format.setSampleType(QAudioFormat::SignedInt);
- format.setCodec(QLatin1String("audio/pcm"));
- break;
-
- default:
- Q_ASSERT_X(false, Q_FUNC_INFO, "Invalid mode");
- }
-
- if (!isFormatSupported(format)) {
- if (m_frequencies.size())
- format.setFrequency(m_frequencies[0]);
- if (m_channels.size())
- format.setChannels(m_channels[0]);
- if (m_sampleSizes.size())
- format.setSampleSize(m_sampleSizes[0]);
- if (m_byteOrders.size())
- format.setByteOrder(m_byteOrders[0]);
- if (m_sampleTypes.size())
- format.setSampleType(m_sampleTypes[0]);
- }
-
- return format;
-}
-
-bool QAudioDeviceInfoInternal::isFormatSupported(
- const QAudioFormat &format) const
-{
- getSupportedFormats();
- const bool supported =
- m_codecs.contains(format.codec())
- && m_frequencies.contains(format.frequency())
- && m_channels.contains(format.channels())
- && m_sampleSizes.contains(format.sampleSize())
- && m_byteOrders.contains(format.byteOrder())
- && m_sampleTypes.contains(format.sampleType());
-
- return supported;
-}
-
-QAudioFormat QAudioDeviceInfoInternal::nearestFormat(const QAudioFormat &format) const
-{
- if (isFormatSupported(format))
- return format;
- else
- return preferredFormat();
-}
-
-QString QAudioDeviceInfoInternal::deviceName() const
-{
- return m_deviceName;
-}
-
-QStringList QAudioDeviceInfoInternal::codecList()
-{
- getSupportedFormats();
- return m_codecs;
-}
-
-QList<int> QAudioDeviceInfoInternal::frequencyList()
-{
- getSupportedFormats();
- return m_frequencies;
-}
-
-QList<int> QAudioDeviceInfoInternal::channelsList()
-{
- getSupportedFormats();
- return m_channels;
-}
-
-QList<int> QAudioDeviceInfoInternal::sampleSizeList()
-{
- getSupportedFormats();
- return m_sampleSizes;
-}
-
-QList<QAudioFormat::Endian> QAudioDeviceInfoInternal::byteOrderList()
-{
- getSupportedFormats();
- return m_byteOrders;
-}
-
-QList<QAudioFormat::SampleType> QAudioDeviceInfoInternal::sampleTypeList()
-{
- getSupportedFormats();
- return m_sampleTypes;
-}
-
-QByteArray QAudioDeviceInfoInternal::defaultInputDevice()
-{
- return QByteArray("default");
-}
-
-QByteArray QAudioDeviceInfoInternal::defaultOutputDevice()
-{
- return QByteArray("default");
-}
-
-QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode)
-{
- QList<QByteArray> result;
- result += QByteArray("default");
- return result;
-}
-
-void QAudioDeviceInfoInternal::getSupportedFormats() const
-{
- if (!m_updated) {
- QScopedPointer<SymbianAudio::DevSoundCapabilities> caps(
- new SymbianAudio::DevSoundCapabilities(*m_devsound, m_mode));
-
- SymbianAudio::Utils::capabilitiesNativeToQt(*caps,
- m_frequencies, m_channels, m_sampleSizes,
- m_byteOrders, m_sampleTypes);
-
- m_codecs.append(QLatin1String("audio/pcm"));
-
- m_updated = true;
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/multimedia/multimedia/audio/qaudiodeviceinfo_symbian_p.h b/src/multimedia/multimedia/audio/qaudiodeviceinfo_symbian_p.h
deleted file mode 100644
index 89e539f..0000000
--- a/src/multimedia/multimedia/audio/qaudiodeviceinfo_symbian_p.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMultimedia 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.
-//
-
-#ifndef QAUDIODEVICEINFO_SYMBIAN_P_H
-#define QAUDIODEVICEINFO_SYMBIAN_P_H
-
-#include <QtMultimedia/qaudioengine.h>
-#include <sounddevice.h>
-
-QT_BEGIN_NAMESPACE
-
-class QAudioDeviceInfoInternal
- : public QAbstractAudioDeviceInfo
-{
- Q_OBJECT
-
-public:
- QAudioDeviceInfoInternal(QByteArray device, QAudio::Mode mode);
- ~QAudioDeviceInfoInternal();
-
- // QAbstractAudioDeviceInfo
- QAudioFormat preferredFormat() const;
- bool isFormatSupported(const QAudioFormat &format) const;
- QAudioFormat nearestFormat(const QAudioFormat &format) const;
- QString deviceName() const;
- QStringList codecList();
- QList<int> frequencyList();
- QList<int> channelsList();
- QList<int> sampleSizeList();
- QList<QAudioFormat::Endian> byteOrderList();
- QList<QAudioFormat::SampleType> sampleTypeList();
- static QByteArray defaultInputDevice();
- static QByteArray defaultOutputDevice();
- static QList<QByteArray> availableDevices(QAudio::Mode);
-
-private:
- void getSupportedFormats() const;
-
-private:
- QScopedPointer<CMMFDevSound> m_devsound;
-
- QString m_deviceName;
- QAudio::Mode m_mode;
-
- // Mutable to allow lazy initialization when called from const-qualified
- // public functions (isFormatSupported, nearestFormat)
- mutable bool m_updated;
- mutable QStringList m_codecs;
- mutable QList<int> m_frequencies;
- mutable QList<int> m_channels;
- mutable QList<int> m_sampleSizes;
- mutable QList<QAudioFormat::Endian> m_byteOrders;
- mutable QList<QAudioFormat::SampleType> m_sampleTypes;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/multimedia/multimedia/audio/qaudioinput_symbian_p.cpp b/src/multimedia/multimedia/audio/qaudioinput_symbian_p.cpp
deleted file mode 100644
index 52daa88..0000000
--- a/src/multimedia/multimedia/audio/qaudioinput_symbian_p.cpp
+++ /dev/null
@@ -1,594 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMultimedia 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 "qaudioinput_symbian_p.h"
-
-QT_BEGIN_NAMESPACE
-
-//-----------------------------------------------------------------------------
-// Constants
-//-----------------------------------------------------------------------------
-
-const int PushInterval = 50; // ms
-
-
-//-----------------------------------------------------------------------------
-// Private class
-//-----------------------------------------------------------------------------
-
-SymbianAudioInputPrivate::SymbianAudioInputPrivate(
- QAudioInputPrivate *audioDevice)
- : m_audioDevice(audioDevice)
-{
-
-}
-
-SymbianAudioInputPrivate::~SymbianAudioInputPrivate()
-{
-
-}
-
-qint64 SymbianAudioInputPrivate::readData(char *data, qint64 len)
-{
- qint64 totalRead = 0;
-
- if (m_audioDevice->state() == QAudio::ActiveState ||
- m_audioDevice->state() == QAudio::IdleState) {
-
- while (totalRead < len) {
- const qint64 read = m_audioDevice->read(data + totalRead,
- len - totalRead);
- if (read > 0)
- totalRead += read;
- else
- break;
- }
- }
-
- return totalRead;
-}
-
-qint64 SymbianAudioInputPrivate::writeData(const char *data, qint64 len)
-{
- Q_UNUSED(data)
- Q_UNUSED(len)
- return 0;
-}
-
-void SymbianAudioInputPrivate::dataReady()
-{
- emit readyRead();
-}
-
-
-//-----------------------------------------------------------------------------
-// Public functions
-//-----------------------------------------------------------------------------
-
-QAudioInputPrivate::QAudioInputPrivate(const QByteArray &device,
- const QAudioFormat &format)
- : m_device(device)
- , m_format(format)
- , m_clientBufferSize(SymbianAudio::DefaultBufferSize)
- , m_notifyInterval(SymbianAudio::DefaultNotifyInterval)
- , m_notifyTimer(new QTimer(this))
- , m_error(QAudio::NoError)
- , m_internalState(SymbianAudio::ClosedState)
- , m_externalState(QAudio::StoppedState)
- , m_pullMode(false)
- , m_sink(0)
- , m_pullTimer(new QTimer(this))
- , m_devSoundBuffer(0)
- , m_devSoundBufferSize(0)
- , m_totalBytesReady(0)
- , m_devSoundBufferPos(0)
- , m_totalSamplesRecorded(0)
-{
- connect(m_notifyTimer.data(), SIGNAL(timeout()), this, SIGNAL(notify()));
-
- SymbianAudio::Utils::formatQtToNative(m_format, m_nativeFourCC,
- m_nativeFormat);
-
- m_pullTimer->setInterval(PushInterval);
- connect(m_pullTimer.data(), SIGNAL(timeout()), this, SLOT(pullData()));
-}
-
-QAudioInputPrivate::~QAudioInputPrivate()
-{
- close();
-}
-
-QIODevice* QAudioInputPrivate::start(QIODevice *device)
-{
- stop();
-
- open();
- if (SymbianAudio::ClosedState != m_internalState) {
- if (device) {
- m_pullMode = true;
- m_sink = device;
- } else {
- m_sink = new SymbianAudioInputPrivate(this);
- m_sink->open(QIODevice::ReadOnly | QIODevice::Unbuffered);
- }
-
- m_elapsed.restart();
- }
-
- return m_sink;
-}
-
-void QAudioInputPrivate::stop()
-{
- close();
-}
-
-void QAudioInputPrivate::reset()
-{
- m_totalSamplesRecorded += getSamplesRecorded();
- m_devSound->Stop();
- startRecording();
-}
-
-void QAudioInputPrivate::suspend()
-{
- if (SymbianAudio::ActiveState == m_internalState
- || SymbianAudio::IdleState == m_internalState) {
- m_notifyTimer->stop();
- m_pullTimer->stop();
- m_devSound->Pause();
- const qint64 samplesRecorded = getSamplesRecorded();
- m_totalSamplesRecorded += samplesRecorded;
-
- if (m_devSoundBuffer) {
- m_devSoundBufferQ.append(m_devSoundBuffer);
- m_devSoundBuffer = 0;
- }
-
- setState(SymbianAudio::SuspendedState);
- }
-}
-
-void QAudioInputPrivate::resume()
-{
- if (SymbianAudio::SuspendedState == m_internalState)
- startDataTransfer();
-}
-
-int QAudioInputPrivate::bytesReady() const
-{
- Q_ASSERT(m_devSoundBufferPos <= m_totalBytesReady);
- return m_totalBytesReady - m_devSoundBufferPos;
-}
-
-int QAudioInputPrivate::periodSize() const
-{
- return bufferSize();
-}
-
-void QAudioInputPrivate::setBufferSize(int value)
-{
- // Note that DevSound does not allow its client to specify the buffer size.
- // This functionality is available via custom interfaces, but since these
- // cannot be guaranteed to work across all DevSound implementations, we
- // do not use them here.
- // In order to comply with the expected bevahiour of QAudioInput, we store
- // the value and return it from bufferSize(), but the underlying DevSound
- // buffer size remains unchanged.
- if (value > 0)
- m_clientBufferSize = value;
-}
-
-int QAudioInputPrivate::bufferSize() const
-{
- return m_devSoundBufferSize ? m_devSoundBufferSize : m_clientBufferSize;
-}
-
-void QAudioInputPrivate::setNotifyInterval(int ms)
-{
- if (ms > 0) {
- const int oldNotifyInterval = m_notifyInterval;
- m_notifyInterval = ms;
- if (m_notifyTimer->isActive() && ms != oldNotifyInterval)
- m_notifyTimer->start(m_notifyInterval);
- }
-}
-
-int QAudioInputPrivate::notifyInterval() const
-{
- return m_notifyInterval;
-}
-
-qint64 QAudioInputPrivate::processedUSecs() const
-{
- int samplesPlayed = 0;
- if (m_devSound && SymbianAudio::SuspendedState != m_internalState)
- samplesPlayed = getSamplesRecorded();
-
- // Protect against division by zero
- Q_ASSERT_X(m_format.frequency() > 0, Q_FUNC_INFO, "Invalid frequency");
-
- const qint64 result = qint64(1000000) *
- (samplesPlayed + m_totalSamplesRecorded)
- / m_format.frequency();
-
- return result;
-}
-
-qint64 QAudioInputPrivate::elapsedUSecs() const
-{
- const qint64 result = (QAudio::StoppedState == state()) ?
- 0 : m_elapsed.elapsed() * 1000;
- return result;
-}
-
-QAudio::Error QAudioInputPrivate::error() const
-{
- return m_error;
-}
-
-QAudio::State QAudioInputPrivate::state() const
-{
- return m_externalState;
-}
-
-QAudioFormat QAudioInputPrivate::format() const
-{
- return m_format;
-}
-
-//-----------------------------------------------------------------------------
-// MDevSoundObserver implementation
-//-----------------------------------------------------------------------------
-
-void QAudioInputPrivate::InitializeComplete(TInt aError)
-{
- Q_ASSERT_X(SymbianAudio::InitializingState == m_internalState,
- Q_FUNC_INFO, "Invalid state");
-
- if (KErrNone == aError)
- startRecording();
-}
-
-void QAudioInputPrivate::ToneFinished(TInt aError)
-{
- Q_UNUSED(aError)
- // This class doesn't use DevSound's tone playback functions, so should
- // never receive this callback.
- Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback");
-}
-
-void QAudioInputPrivate::BufferToBeFilled(CMMFBuffer *aBuffer)
-{
- Q_UNUSED(aBuffer)
- // This class doesn't use DevSound in play mode, so should never receive
- // this callback.
- Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback");
-}
-
-void QAudioInputPrivate::PlayError(TInt aError)
-{
- Q_UNUSED(aError)
- // This class doesn't use DevSound in play mode, so should never receive
- // this callback.
- Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback");
-}
-
-void QAudioInputPrivate::BufferToBeEmptied(CMMFBuffer *aBuffer)
-{
- // Following receipt of this callback, DevSound should not provide another
- // buffer until we have returned the current one.
- Q_ASSERT_X(!m_devSoundBuffer, Q_FUNC_INFO, "Buffer already held");
-
- CMMFDataBuffer *const buffer = static_cast<CMMFDataBuffer*>(aBuffer);
-
- if (!m_devSoundBufferSize)
- m_devSoundBufferSize = buffer->Data().MaxLength();
-
- m_totalBytesReady += buffer->Data().Length();
-
- if (SymbianAudio::SuspendedState == m_internalState) {
- m_devSoundBufferQ.append(buffer);
- } else {
- // Will be returned to DevSound by bufferEmptied().
- m_devSoundBuffer = buffer;
- m_devSoundBufferPos = 0;
-
- if (bytesReady() && !m_pullMode)
- pushData();
- }
-}
-
-void QAudioInputPrivate::RecordError(TInt aError)
-{
- Q_UNUSED(aError)
- setError(QAudio::IOError);
-}
-
-void QAudioInputPrivate::ConvertError(TInt aError)
-{
- Q_UNUSED(aError)
- // This class doesn't use DevSound's format conversion functions, so
- // should never receive this callback.
- Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback");
-}
-
-void QAudioInputPrivate::DeviceMessage(TUid aMessageType, const TDesC8 &aMsg)
-{
- Q_UNUSED(aMessageType)
- Q_UNUSED(aMsg)
- // Ignore this callback.
-}
-
-//-----------------------------------------------------------------------------
-// Private functions
-//-----------------------------------------------------------------------------
-
-void QAudioInputPrivate::open()
-{
- Q_ASSERT_X(SymbianAudio::ClosedState == m_internalState,
- Q_FUNC_INFO, "DevSound already opened");
-
- QT_TRAP_THROWING( m_devSound.reset(CMMFDevSound::NewL()) )
-
- QScopedPointer<SymbianAudio::DevSoundCapabilities> caps(
- new SymbianAudio::DevSoundCapabilities(*m_devSound, QAudio::AudioInput));
-
- int err = SymbianAudio::Utils::isFormatSupported(m_format, *caps) ?
- KErrNone : KErrNotSupported;
-
- if (KErrNone == err) {
- setState(SymbianAudio::InitializingState);
- TRAP(err, m_devSound->InitializeL(*this, m_nativeFourCC,
- EMMFStateRecording));
- }
-
- if (KErrNone != err) {
- setError(QAudio::OpenError);
- m_devSound.reset();
- }
-}
-
-void QAudioInputPrivate::startRecording()
-{
- const int samplesRecorded = m_devSound->SamplesRecorded();
- Q_ASSERT(samplesRecorded == 0);
-
- TRAPD(err, startDevSoundL());
- if (KErrNone == err) {
- startDataTransfer();
- } else {
- setError(QAudio::OpenError);
- close();
- }
-}
-
-void QAudioInputPrivate::startDevSoundL()
-{
- TMMFCapabilities nativeFormat = m_devSound->Config();
- m_nativeFormat.iBufferSize = nativeFormat.iBufferSize;
- m_devSound->SetConfigL(m_nativeFormat);
- m_devSound->RecordInitL();
-}
-
-void QAudioInputPrivate::startDataTransfer()
-{
- m_notifyTimer->start(m_notifyInterval);
-
- if (m_pullMode)
- m_pullTimer->start();
-
- if (bytesReady()) {
- setState(SymbianAudio::ActiveState);
- if (!m_pullMode)
- pushData();
- } else {
- if (SymbianAudio::SuspendedState == m_internalState)
- setState(SymbianAudio::ActiveState);
- else
- setState(SymbianAudio::IdleState);
- }
-}
-
-CMMFDataBuffer* QAudioInputPrivate::currentBuffer() const
-{
- CMMFDataBuffer *result = m_devSoundBuffer;
- if (!result && !m_devSoundBufferQ.empty())
- result = m_devSoundBufferQ.front();
- return result;
-}
-
-void QAudioInputPrivate::pushData()
-{
- Q_ASSERT_X(bytesReady(), Q_FUNC_INFO, "No data available");
- Q_ASSERT_X(!m_pullMode, Q_FUNC_INFO, "pushData called when in pull mode");
- qobject_cast<SymbianAudioInputPrivate *>(m_sink)->dataReady();
-}
-
-qint64 QAudioInputPrivate::read(char *data, qint64 len)
-{
- // SymbianAudioInputPrivate is ready to read data
-
- Q_ASSERT_X(!m_pullMode, Q_FUNC_INFO,
- "read called when in pull mode");
-
- qint64 bytesRead = 0;
-
- CMMFDataBuffer *buffer = 0;
- while ((buffer = currentBuffer()) && (bytesRead < len)) {
- if (SymbianAudio::IdleState == m_internalState)
- setState(SymbianAudio::ActiveState);
-
- TDesC8 &inputBuffer = buffer->Data();
-
- const qint64 inputBytes = bytesReady();
- const qint64 outputBytes = len - bytesRead;
- const qint64 copyBytes = outputBytes < inputBytes ?
- outputBytes : inputBytes;
-
- memcpy(data, inputBuffer.Ptr() + m_devSoundBufferPos, copyBytes);
-
- m_devSoundBufferPos += copyBytes;
- data += copyBytes;
- bytesRead += copyBytes;
-
- if (!bytesReady())
- bufferEmptied();
- }
-
- return bytesRead;
-}
-
-void QAudioInputPrivate::pullData()
-{
- Q_ASSERT_X(m_pullMode, Q_FUNC_INFO,
- "pullData called when in push mode");
-
- CMMFDataBuffer *buffer = 0;
- while (buffer = currentBuffer()) {
- if (SymbianAudio::IdleState == m_internalState)
- setState(SymbianAudio::ActiveState);
-
- TDesC8 &inputBuffer = buffer->Data();
-
- const qint64 inputBytes = bytesReady();
- const qint64 bytesPushed = m_sink->write(
- (char*)inputBuffer.Ptr() + m_devSoundBufferPos, inputBytes);
-
- m_devSoundBufferPos += bytesPushed;
-
- if (!bytesReady())
- bufferEmptied();
-
- if (!bytesPushed)
- break;
- }
-}
-
-void QAudioInputPrivate::bufferEmptied()
-{
- m_devSoundBufferPos = 0;
-
- if (m_devSoundBuffer) {
- m_totalBytesReady -= m_devSoundBuffer->Data().Length();
- m_devSoundBuffer = 0;
- m_devSound->RecordData();
- } else {
- Q_ASSERT(!m_devSoundBufferQ.empty());
- m_totalBytesReady -= m_devSoundBufferQ.front()->Data().Length();
- m_devSoundBufferQ.erase(m_devSoundBufferQ.begin());
-
- // If the queue has been emptied, resume transfer from the hardware
- if (m_devSoundBufferQ.empty())
- m_devSound->RecordInitL();
- }
-
- Q_ASSERT(m_totalBytesReady >= 0);
-}
-
-void QAudioInputPrivate::close()
-{
- m_notifyTimer->stop();
- m_pullTimer->stop();
-
- m_error = QAudio::NoError;
-
- if (m_devSound)
- m_devSound->Stop();
- m_devSound.reset();
- m_devSoundBuffer = 0;
- m_devSoundBufferSize = 0;
- m_totalBytesReady = 0;
-
- if (!m_pullMode) // m_sink is owned
- delete m_sink;
- m_pullMode = false;
- m_sink = 0;
-
- m_devSoundBufferQ.clear();
- m_devSoundBufferPos = 0;
- m_totalSamplesRecorded = 0;
-
- setState(SymbianAudio::ClosedState);
-}
-
-qint64 QAudioInputPrivate::getSamplesRecorded() const
-{
- qint64 result = 0;
- if (m_devSound)
- result = qint64(m_devSound->SamplesRecorded());
- return result;
-}
-
-void QAudioInputPrivate::setError(QAudio::Error error)
-{
- m_error = error;
-
- // Although no state transition actually occurs here, a stateChanged event
- // must be emitted to inform the client that the call to start() was
- // unsuccessful.
- if (QAudio::OpenError == error)
- emit stateChanged(QAudio::StoppedState);
-
- // Close the DevSound instance. This causes a transition to StoppedState.
- // This must be done asynchronously in case the current function was called
- // from a DevSound event handler, in which case deleting the DevSound
- // instance may cause an exception.
- QMetaObject::invokeMethod(this, "close", Qt::QueuedConnection);
-}
-
-void QAudioInputPrivate::setState(SymbianAudio::State newInternalState)
-{
- const QAudio::State oldExternalState = m_externalState;
- m_internalState = newInternalState;
- m_externalState = SymbianAudio::Utils::stateNativeToQt(
- m_internalState, initializingState());
-
- if (m_externalState != oldExternalState)
- emit stateChanged(m_externalState);
-}
-
-QAudio::State QAudioInputPrivate::initializingState() const
-{
- return QAudio::IdleState;
-}
-
-QT_END_NAMESPACE
diff --git a/src/multimedia/multimedia/audio/qaudioinput_symbian_p.h b/src/multimedia/multimedia/audio/qaudioinput_symbian_p.h
deleted file mode 100644
index ca3ccf7..0000000
--- a/src/multimedia/multimedia/audio/qaudioinput_symbian_p.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMultimedia 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.
-//
-
-#ifndef QAUDIOINPUT_SYMBIAN_P_H
-#define QAUDIOINPUT_SYMBIAN_P_H
-
-#include <QtMultimedia/qaudioengine.h>
-#include <QTime>
-#include <QTimer>
-#include <sounddevice.h>
-#include "qaudio_symbian_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QAudioInputPrivate;
-
-class SymbianAudioInputPrivate : public QIODevice
-{
- friend class QAudioInputPrivate;
- Q_OBJECT
-public:
- SymbianAudioInputPrivate(QAudioInputPrivate *audio);
- ~SymbianAudioInputPrivate();
-
- qint64 readData(char *data, qint64 len);
- qint64 writeData(const char *data, qint64 len);
-
- void dataReady();
-
-private:
- QAudioInputPrivate *const m_audioDevice;
-};
-
-class QAudioInputPrivate
- : public QAbstractAudioInput
- , public MDevSoundObserver
-{
- friend class SymbianAudioInputPrivate;
- Q_OBJECT
-public:
- QAudioInputPrivate(const QByteArray &device,
- const QAudioFormat &audioFormat);
- ~QAudioInputPrivate();
-
- // QAbstractAudioInput
- QIODevice* start(QIODevice *device = 0);
- void stop();
- void reset();
- void suspend();
- void resume();
- int bytesReady() const;
- int periodSize() const;
- void setBufferSize(int value);
- int bufferSize() const;
- void setNotifyInterval(int milliSeconds);
- int notifyInterval() const;
- qint64 processedUSecs() const;
- qint64 elapsedUSecs() const;
- QAudio::Error error() const;
- QAudio::State state() const;
- QAudioFormat format() const;
-
- // MDevSoundObserver
- void InitializeComplete(TInt aError);
- void ToneFinished(TInt aError);
- void BufferToBeFilled(CMMFBuffer *aBuffer);
- void PlayError(TInt aError);
- void BufferToBeEmptied(CMMFBuffer *aBuffer);
- void RecordError(TInt aError);
- void ConvertError(TInt aError);
- void DeviceMessage(TUid aMessageType, const TDesC8 &aMsg);
-
-private slots:
- void pullData();
-
-private:
- void open();
- void startRecording();
- void startDevSoundL();
- void startDataTransfer();
- CMMFDataBuffer* currentBuffer() const;
- void pushData();
- qint64 read(char *data, qint64 len);
- void bufferEmptied();
- Q_INVOKABLE void close();
-
- qint64 getSamplesRecorded() const;
-
- void setError(QAudio::Error error);
- void setState(SymbianAudio::State state);
-
- QAudio::State initializingState() const;
-
-private:
- const QByteArray m_device;
- const QAudioFormat m_format;
-
- int m_clientBufferSize;
- int m_notifyInterval;
- QScopedPointer<QTimer> m_notifyTimer;
- QTime m_elapsed;
- QAudio::Error m_error;
-
- SymbianAudio::State m_internalState;
- QAudio::State m_externalState;
-
- bool m_pullMode;
- QIODevice *m_sink;
-
- QScopedPointer<QTimer> m_pullTimer;
-
- QScopedPointer<CMMFDevSound> m_devSound;
- TUint32 m_nativeFourCC;
- TMMFCapabilities m_nativeFormat;
-
- // Latest buffer provided by DevSound, to be empied of data.
- CMMFDataBuffer *m_devSoundBuffer;
-
- int m_devSoundBufferSize;
-
- // Total amount of data in buffers provided by DevSound
- int m_totalBytesReady;
-
- // Queue of buffers returned after call to CMMFDevSound::Pause().
- QList<CMMFDataBuffer *> m_devSoundBufferQ;
-
- // Current read position within m_devSoundBuffer
- qint64 m_devSoundBufferPos;
-
- // Samples recorded up to the last call to suspend(). It is necessary
- // to cache this because suspend() is implemented using
- // CMMFDevSound::Stop(), which resets DevSound's SamplesRecorded() counter.
- quint32 m_totalSamplesRecorded;
-
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/multimedia/multimedia/audio/qaudiooutput.cpp b/src/multimedia/multimedia/audio/qaudiooutput.cpp
deleted file mode 100644
index b0b5244..0000000
--- a/src/multimedia/multimedia/audio/qaudiooutput.cpp
+++ /dev/null
@@ -1,411 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMultimedia 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 <QtMultimedia/qaudio.h>
-#include <QtMultimedia/qaudiodeviceinfo.h>
-#include <QtMultimedia/qaudioengine.h>
-#include <QtMultimedia/qaudiooutput.h>
-
-#include "qaudiodevicefactory_p.h"
-
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QAudioOutput
- \brief The QAudioOutput class provides an interface for sending audio data to an audio output device.
-
- \inmodule QtMultimedia
- \ingroup multimedia
- \since 4.6
-
- You can construct an audio output with the system's
- \l{QAudioDeviceInfo::defaultOutputDevice()}{default audio output
- device}. It is also possible to create QAudioOutput with a
- specific QAudioDeviceInfo. When you create the audio output, you
- should also send in the QAudioFormat to be used for the playback
- (see the QAudioFormat class description for details).
-
- To play a file:
-
- Starting to play an audio stream is simply a matter of calling
- start() with a QIODevice. QAudioOutput will then fetch the data it
- needs from the io device. So playing back an audio file is as
- simple as:
-
- \code
- QFile inputFile; // class member.
- QAudioOutput* audio; // class member.
- \endcode
-
- \code
- inputFile.setFileName("/tmp/test.raw");
- inputFile.open(QIODevice::ReadOnly);
-
- QAudioFormat format;
- // Set up the format, eg.
- format.setFrequency(8000);
- format.setChannels(1);
- format.setSampleSize(8);
- format.setCodec("audio/pcm");
- format.setByteOrder(QAudioFormat::LittleEndian);
- format.setSampleType(QAudioFormat::UnSignedInt);
-
- QAudioDeviceInfo info(QAudioDeviceInfo::defaultOutputDevice());
- if (!info.isFormatSupported(format)) {
- qWarning()<<"raw audio format not supported by backend, cannot play audio.";
- return;
- }
-
- audio = new QAudioOutput(format, this);
- connect(audio,SIGNAL(stateChanged(QAudio::State)),SLOT(finishedPlaying(QAudio::State)));
- audio->start(&inputFile);
-
- \endcode
-
- The file will start playing assuming that the audio system and
- output device support it. If you run out of luck, check what's
- up with the error() function.
-
- After the file has finished playing, we need to stop the device:
-
- \code
- void finishedPlaying(QAudio::State state)
- {
- if(state == QAudio::IdleState) {
- audio->stop();
- inputFile.close();
- delete audio;
- }
- }
- \endcode
-
- At any given time, the QAudioOutput will be in one of four states:
- active, suspended, stopped, or idle. These states are described
- by the QAudio::State enum.
- State changes are reported through the stateChanged() signal. You
- can use this signal to, for instance, update the GUI of the
- application; the mundane example here being changing the state of
- a \c { play/pause } button. You request a state change directly
- with suspend(), stop(), reset(), resume(), and start().
-
- While the stream is playing, you can set a notify interval in
- milliseconds with setNotifyInterval(). This interval specifies the
- time between two emissions of the notify() signal. This is
- relative to the position in the stream, i.e., if the QAudioOutput
- is in the SuspendedState or the IdleState, the notify() signal is
- not emitted. A typical use-case would be to update a
- \l{QSlider}{slider} that allows seeking in the stream.
- If you want the time since playback started regardless of which
- states the audio output has been in, elapsedUSecs() is the function for you.
-
- If an error occurs, you can fetch the \l{QAudio::Error}{error
- type} with the error() function. Please see the QAudio::Error enum
- for a description of the possible errors that are reported. When
- an error is encountered, the state changes to QAudio::StoppedState.
- You can check for errors by connecting to the stateChanged()
- signal:
-
- \snippet doc/src/snippets/audio/main.cpp 3
-
- \sa QAudioInput, QAudioDeviceInfo
-*/
-
-/*!
- Construct a new audio output and attach it to \a parent.
- The default audio output device is used with the output
- \a format parameters.
-*/
-
-QAudioOutput::QAudioOutput(const QAudioFormat &format, QObject *parent):
- QObject(parent)
-{
- d = QAudioDeviceFactory::createDefaultOutputDevice(format);
- connect(d, SIGNAL(notify()), SIGNAL(notify()));
- connect(d, SIGNAL(stateChanged(QAudio::State)), SIGNAL(stateChanged(QAudio::State)));
-}
-
-/*!
- Construct a new audio output and attach it to \a parent.
- The device referenced by \a audioDevice is used with the output
- \a format parameters.
-*/
-
-QAudioOutput::QAudioOutput(const QAudioDeviceInfo &audioDevice, const QAudioFormat &format, QObject *parent):
- QObject(parent)
-{
- d = QAudioDeviceFactory::createOutputDevice(audioDevice, format);
- connect(d, SIGNAL(notify()), SIGNAL(notify()));
- connect(d, SIGNAL(stateChanged(QAudio::State)), SIGNAL(stateChanged(QAudio::State)));
-}
-
-/*!
- Destroys this audio output.
-*/
-
-QAudioOutput::~QAudioOutput()
-{
- delete d;
-}
-
-/*!
- Returns the QAudioFormat being used.
-
-*/
-
-QAudioFormat QAudioOutput::format() const
-{
- return d->format();
-}
-
-/*!
- Uses the \a device as the QIODevice to transfer data.
- Passing a QIODevice allows the data to be transfered without any extra code.
- All that is required is to open the QIODevice.
-
- If able to successfully output audio data to the systems audio device the
- state() is set to QAudio::ActiveState, error() is set to QAudio::NoError
- and the stateChanged() signal is emitted.
-
- If a problem occurs during this process the error() is set to QAudio::OpenError,
- state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
-
- \sa QIODevice
-*/
-
-void QAudioOutput::start(QIODevice* device)
-{
- d->start(device);
-}
-
-/*!
- Returns a pointer to the QIODevice being used to handle the data
- transfer. This QIODevice can be used to write() audio data directly.
-
- If able to access the systems audio device the state() is set to
- QAudio::IdleState, error() is set to QAudio::NoError
- and the stateChanged() signal is emitted.
-
- If a problem occurs during this process the error() is set to QAudio::OpenError,
- state() is set to QAudio::StoppedState and stateChanged() signal is emitted.
-
- \sa QIODevice
-*/
-
-QIODevice* QAudioOutput::start()
-{
- return d->start(0);
-}
-
-/*!
- Stops the audio output, detaching from the system resource.
-
- Sets error() to QAudio::NoError, state() to QAudio::StoppedState and
- emit stateChanged() signal.
-*/
-
-void QAudioOutput::stop()
-{
- d->stop();
-}
-
-/*!
- Drops all audio data in the buffers, resets buffers to zero.
-*/
-
-void QAudioOutput::reset()
-{
- d->reset();
-}
-
-/*!
- Stops processing audio data, preserving buffered audio data.
-
- Sets error() to QAudio::NoError, state() to QAudio::SuspendedState and
- emit stateChanged() signal.
-*/
-
-void QAudioOutput::suspend()
-{
- d->suspend();
-}
-
-/*!
- Resumes processing audio data after a suspend().
-
- Sets error() to QAudio::NoError.
- Sets state() to QAudio::ActiveState if you previously called start(QIODevice*).
- Sets state() to QAudio::IdleState if you previously called start().
- emits stateChanged() signal.
-*/
-
-void QAudioOutput::resume()
-{
- d->resume();
-}
-
-/*!
- Returns the free space available in bytes in the audio buffer.
-
- NOTE: returned value is only valid while in QAudio::ActiveState or QAudio::IdleState
- state, otherwise returns zero.
-*/
-
-int QAudioOutput::bytesFree() const
-{
- return d->bytesFree();
-}
-
-/*!
- Returns the period size in bytes.
-
- Note: This is the recommended write size in bytes.
-*/
-
-int QAudioOutput::periodSize() const
-{
- return d->periodSize();
-}
-
-/*!
- Sets the audio buffer size to \a value in bytes.
-
- Note: This function can be called anytime before start(), calls to this
- are ignored after start(). It should not be assumed that the buffer size
- set is the actual buffer size used, calling bufferSize() anytime after start()
- will return the actual buffer size being used.
-*/
-
-void QAudioOutput::setBufferSize(int value)
-{
- d->setBufferSize(value);
-}
-
-/*!
- Returns the audio buffer size in bytes.
-
- If called before start(), returns platform default value.
- If called before start() but setBufferSize() was called prior, returns value set by setBufferSize().
- If called after start(), returns the actual buffer size being used. This may not be what was set previously
- by setBufferSize().
-
-*/
-
-int QAudioOutput::bufferSize() const
-{
- return d->bufferSize();
-}
-
-/*!
- Sets the interval for notify() signal to be emitted.
- This is based on the \a ms of audio data processed
- not on actual real-time.
- The minimum resolution of the timer is platform specific and values
- should be checked with notifyInterval() to confirm actual value
- being used.
-*/
-
-void QAudioOutput::setNotifyInterval(int ms)
-{
- d->setNotifyInterval(ms);
-}
-
-/*!
- Returns the notify interval in milliseconds.
-*/
-
-int QAudioOutput::notifyInterval() const
-{
- return d->notifyInterval();
-}
-
-/*!
- Returns the amount of audio data processed since start()
- was called in microseconds.
-*/
-
-qint64 QAudioOutput::processedUSecs() const
-{
- return d->processedUSecs();
-}
-
-/*!
- Returns the microseconds since start() was called, including time in Idle and
- Suspend states.
-*/
-
-qint64 QAudioOutput::elapsedUSecs() const
-{
- return d->elapsedUSecs();
-}
-
-/*!
- Returns the error state.
-*/
-
-QAudio::Error QAudioOutput::error() const
-{
- return d->error();
-}
-
-/*!
- Returns the state of audio processing.
-*/
-
-QAudio::State QAudioOutput::state() const
-{
- return d->state();
-}
-
-/*!
- \fn QAudioOutput::stateChanged(QAudio::State state)
- This signal is emitted when the device \a state has changed.
- This is the current state of the audio output.
-*/
-
-/*!
- \fn QAudioOutput::notify()
- This signal is emitted when x ms of audio data has been processed
- the interval set by setNotifyInterval(x).
-*/
-
-QT_END_NAMESPACE
diff --git a/src/multimedia/multimedia/audio/qaudiooutput_symbian_p.cpp b/src/multimedia/multimedia/audio/qaudiooutput_symbian_p.cpp
deleted file mode 100644
index 3f8e933..0000000
--- a/src/multimedia/multimedia/audio/qaudiooutput_symbian_p.cpp
+++ /dev/null
@@ -1,697 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMultimedia 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 "qaudiooutput_symbian_p.h"
-
-QT_BEGIN_NAMESPACE
-
-//-----------------------------------------------------------------------------
-// Constants
-//-----------------------------------------------------------------------------
-
-const int UnderflowTimerInterval = 50; // ms
-
-
-//-----------------------------------------------------------------------------
-// Private class
-//-----------------------------------------------------------------------------
-
-SymbianAudioOutputPrivate::SymbianAudioOutputPrivate(
- QAudioOutputPrivate *audioDevice)
- : m_audioDevice(audioDevice)
-{
-
-}
-
-SymbianAudioOutputPrivate::~SymbianAudioOutputPrivate()
-{
-
-}
-
-qint64 SymbianAudioOutputPrivate::readData(char *data, qint64 len)
-{
- Q_UNUSED(data)
- Q_UNUSED(len)
- return 0;
-}
-
-qint64 SymbianAudioOutputPrivate::writeData(const char *data, qint64 len)
-{
- qint64 totalWritten = 0;
-
- if (m_audioDevice->state() == QAudio::ActiveState ||
- m_audioDevice->state() == QAudio::IdleState) {
-
- while (totalWritten < len) {
- const qint64 written = m_audioDevice->pushData(data + totalWritten,
- len - totalWritten);
- if (written > 0)
- totalWritten += written;
- else
- break;
- }
- }
-
- return totalWritten;
-}
-
-
-//-----------------------------------------------------------------------------
-// Public functions
-//-----------------------------------------------------------------------------
-
-QAudioOutputPrivate::QAudioOutputPrivate(const QByteArray &device,
- const QAudioFormat &format)
- : m_device(device)
- , m_format(format)
- , m_clientBufferSize(SymbianAudio::DefaultBufferSize)
- , m_notifyInterval(SymbianAudio::DefaultNotifyInterval)
- , m_notifyTimer(new QTimer(this))
- , m_error(QAudio::NoError)
- , m_internalState(SymbianAudio::ClosedState)
- , m_externalState(QAudio::StoppedState)
- , m_pullMode(false)
- , m_source(0)
- , m_devSoundBuffer(0)
- , m_devSoundBufferSize(0)
- , m_bytesWritten(0)
- , m_pushDataReady(false)
- , m_bytesPadding(0)
- , m_underflow(false)
- , m_lastBuffer(false)
- , m_underflowTimer(new QTimer(this))
- , m_samplesPlayed(0)
- , m_totalSamplesPlayed(0)
-{
- connect(m_notifyTimer.data(), SIGNAL(timeout()), this, SIGNAL(notify()));
-
- SymbianAudio::Utils::formatQtToNative(m_format, m_nativeFourCC,
- m_nativeFormat);
-
- m_underflowTimer->setInterval(UnderflowTimerInterval);
- connect(m_underflowTimer.data(), SIGNAL(timeout()), this,
- SLOT(underflowTimerExpired()));
-}
-
-QAudioOutputPrivate::~QAudioOutputPrivate()
-{
- close();
-}
-
-QIODevice* QAudioOutputPrivate::start(QIODevice *device)
-{
- stop();
-
- // We have to set these before the call to open() because of the
- // logic in initializingState()
- if (device) {
- m_pullMode = true;
- m_source = device;
- }
-
- open();
-
- if (SymbianAudio::ClosedState != m_internalState) {
- if (device) {
- connect(m_source, SIGNAL(readyRead()), this, SLOT(dataReady()));
- } else {
- m_source = new SymbianAudioOutputPrivate(this);
- m_source->open(QIODevice::WriteOnly | QIODevice::Unbuffered);
- }
-
- m_elapsed.restart();
- }
-
- return m_source;
-}
-
-void QAudioOutputPrivate::stop()
-{
- close();
-}
-
-void QAudioOutputPrivate::reset()
-{
- m_totalSamplesPlayed += getSamplesPlayed();
- m_devSound->Stop();
- m_bytesPadding = 0;
- startPlayback();
-}
-
-void QAudioOutputPrivate::suspend()
-{
- if (SymbianAudio::ActiveState == m_internalState
- || SymbianAudio::IdleState == m_internalState) {
- m_notifyTimer->stop();
- m_underflowTimer->stop();
-
- const qint64 samplesWritten = SymbianAudio::Utils::bytesToSamples(
- m_format, m_bytesWritten);
-
- const qint64 samplesPlayed = getSamplesPlayed();
-
- m_bytesWritten = 0;
-
- // CMMFDevSound::Pause() is not guaranteed to work correctly in all
- // implementations, for play-mode DevSound sessions. We therefore
- // have to implement suspend() by calling CMMFDevSound::Stop().
- // Because this causes buffered data to be dropped, we replace the
- // lost data with silence following a call to resume(), in order to
- // ensure that processedUSecs() returns the correct value.
- m_devSound->Stop();
- m_totalSamplesPlayed += samplesPlayed;
-
- // Calculate the amount of data dropped
- const qint64 paddingSamples = samplesWritten - samplesPlayed;
- m_bytesPadding = SymbianAudio::Utils::samplesToBytes(m_format,
- paddingSamples);
-
- setState(SymbianAudio::SuspendedState);
- }
-}
-
-void QAudioOutputPrivate::resume()
-{
- if (SymbianAudio::SuspendedState == m_internalState)
- startPlayback();
-}
-
-int QAudioOutputPrivate::bytesFree() const
-{
- int result = 0;
- if (m_devSoundBuffer) {
- const TDes8 &outputBuffer = m_devSoundBuffer->Data();
- result = outputBuffer.MaxLength() - outputBuffer.Length();
- }
- return result;
-}
-
-int QAudioOutputPrivate::periodSize() const
-{
- return bufferSize();
-}
-
-void QAudioOutputPrivate::setBufferSize(int value)
-{
- // Note that DevSound does not allow its client to specify the buffer size.
- // This functionality is available via custom interfaces, but since these
- // cannot be guaranteed to work across all DevSound implementations, we
- // do not use them here.
- // In order to comply with the expected bevahiour of QAudioOutput, we store
- // the value and return it from bufferSize(), but the underlying DevSound
- // buffer size remains unchanged.
- if (value > 0)
- m_clientBufferSize = value;
-}
-
-int QAudioOutputPrivate::bufferSize() const
-{
- return m_devSoundBufferSize ? m_devSoundBufferSize : m_clientBufferSize;
-}
-
-void QAudioOutputPrivate::setNotifyInterval(int ms)
-{
- if (ms > 0) {
- const int oldNotifyInterval = m_notifyInterval;
- m_notifyInterval = ms;
- if (m_notifyTimer->isActive() && ms != oldNotifyInterval)
- m_notifyTimer->start(m_notifyInterval);
- }
-}
-
-int QAudioOutputPrivate::notifyInterval() const
-{
- return m_notifyInterval;
-}
-
-qint64 QAudioOutputPrivate::processedUSecs() const
-{
- int samplesPlayed = 0;
- if (m_devSound && SymbianAudio::SuspendedState != m_internalState)
- samplesPlayed = getSamplesPlayed();
-
- // Protect against division by zero
- Q_ASSERT_X(m_format.frequency() > 0, Q_FUNC_INFO, "Invalid frequency");
-
- const qint64 result = qint64(1000000) *
- (samplesPlayed + m_totalSamplesPlayed)
- / m_format.frequency();
-
- return result;
-}
-
-qint64 QAudioOutputPrivate::elapsedUSecs() const
-{
- const qint64 result = (QAudio::StoppedState == state()) ?
- 0 : m_elapsed.elapsed() * 1000;
- return result;
-}
-
-QAudio::Error QAudioOutputPrivate::error() const
-{
- return m_error;
-}
-
-QAudio::State QAudioOutputPrivate::state() const
-{
- return m_externalState;
-}
-
-QAudioFormat QAudioOutputPrivate::format() const
-{
- return m_format;
-}
-
-//-----------------------------------------------------------------------------
-// MDevSoundObserver implementation
-//-----------------------------------------------------------------------------
-
-void QAudioOutputPrivate::InitializeComplete(TInt aError)
-{
- Q_ASSERT_X(SymbianAudio::InitializingState == m_internalState,
- Q_FUNC_INFO, "Invalid state");
-
- if (KErrNone == aError)
- startPlayback();
-}
-
-void QAudioOutputPrivate::ToneFinished(TInt aError)
-{
- Q_UNUSED(aError)
- // This class doesn't use DevSound's tone playback functions, so should
- // never receive this callback.
- Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback");
-}
-
-void QAudioOutputPrivate::BufferToBeFilled(CMMFBuffer *aBuffer)
-{
- // Following receipt of this callback, DevSound should not provide another
- // buffer until we have returned the current one.
- Q_ASSERT_X(!m_devSoundBuffer, Q_FUNC_INFO, "Buffer already held");
-
- // Will be returned to DevSound by bufferFilled().
- m_devSoundBuffer = static_cast<CMMFDataBuffer*>(aBuffer);
-
- if (!m_devSoundBufferSize)
- m_devSoundBufferSize = m_devSoundBuffer->Data().MaxLength();
-
- writePaddingData();
-
- if (m_pullMode && isDataReady() && !m_bytesPadding)
- pullData();
-}
-
-void QAudioOutputPrivate::PlayError(TInt aError)
-{
- switch (aError) {
- case KErrUnderflow:
- m_underflow = true;
- if (m_pullMode && !m_lastBuffer)
- setError(QAudio::UnderrunError);
- else
- setState(SymbianAudio::IdleState);
- break;
- default:
- setError(QAudio::IOError);
- break;
- }
-}
-
-void QAudioOutputPrivate::BufferToBeEmptied(CMMFBuffer *aBuffer)
-{
- Q_UNUSED(aBuffer)
- // This class doesn't use DevSound in record mode, so should never receive
- // this callback.
- Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback");
-}
-
-void QAudioOutputPrivate::RecordError(TInt aError)
-{
- Q_UNUSED(aError)
- // This class doesn't use DevSound in record mode, so should never receive
- // this callback.
- Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback");
-}
-
-void QAudioOutputPrivate::ConvertError(TInt aError)
-{
- Q_UNUSED(aError)
- // This class doesn't use DevSound's format conversion functions, so
- // should never receive this callback.
- Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback");
-}
-
-void QAudioOutputPrivate::DeviceMessage(TUid aMessageType, const TDesC8 &aMsg)
-{
- Q_UNUSED(aMessageType)
- Q_UNUSED(aMsg)
- // Ignore this callback.
-}
-
-//-----------------------------------------------------------------------------
-// Private functions
-//-----------------------------------------------------------------------------
-
-void QAudioOutputPrivate::dataReady()
-{
- // Client-provided QIODevice has data ready to read.
-
- Q_ASSERT_X(m_source->bytesAvailable(), Q_FUNC_INFO,
- "readyRead signal received, but no data available");
-
- if (!m_bytesPadding)
- pullData();
-}
-
-void QAudioOutputPrivate::underflowTimerExpired()
-{
- const TInt samplesPlayed = getSamplesPlayed();
- if (m_samplesPlayed && (samplesPlayed == m_samplesPlayed)) {
- setError(QAudio::UnderrunError);
- } else {
- m_samplesPlayed = samplesPlayed;
- m_underflowTimer->start();
- }
-}
-
-void QAudioOutputPrivate::open()
-{
- Q_ASSERT_X(SymbianAudio::ClosedState == m_internalState,
- Q_FUNC_INFO, "DevSound already opened");
-
- QT_TRAP_THROWING( m_devSound.reset(CMMFDevSound::NewL()) )
-
- QScopedPointer<SymbianAudio::DevSoundCapabilities> caps(
- new SymbianAudio::DevSoundCapabilities(*m_devSound,
- QAudio::AudioOutput));
-
- int err = SymbianAudio::Utils::isFormatSupported(m_format, *caps) ?
- KErrNone : KErrNotSupported;
-
- if (KErrNone == err) {
- setState(SymbianAudio::InitializingState);
- TRAP(err, m_devSound->InitializeL(*this, m_nativeFourCC,
- EMMFStatePlaying));
- }
-
- if (KErrNone != err) {
- setError(QAudio::OpenError);
- m_devSound.reset();
- }
-}
-
-void QAudioOutputPrivate::startPlayback()
-{
- TRAPD(err, startDevSoundL());
- if (KErrNone == err) {
- if (isDataReady())
- setState(SymbianAudio::ActiveState);
- else
- setState(SymbianAudio::IdleState);
-
- m_notifyTimer->start(m_notifyInterval);
- m_underflow = false;
-
- Q_ASSERT(m_devSound->SamplesPlayed() == 0);
-
- writePaddingData();
-
- if (m_pullMode && m_source->bytesAvailable() && !m_bytesPadding)
- dataReady();
- } else {
- setError(QAudio::OpenError);
- close();
- }
-}
-
-void QAudioOutputPrivate::startDevSoundL()
-{
- TMMFCapabilities nativeFormat = m_devSound->Config();
- m_nativeFormat.iBufferSize = nativeFormat.iBufferSize;
- m_devSound->SetConfigL(m_nativeFormat);
- m_devSound->PlayInitL();
-}
-
-void QAudioOutputPrivate::writePaddingData()
-{
- // See comments in suspend()
-
- while (m_devSoundBuffer && m_bytesPadding) {
- if (SymbianAudio::IdleState == m_internalState)
- setState(SymbianAudio::ActiveState);
-
- TDes8 &outputBuffer = m_devSoundBuffer->Data();
- const qint64 outputBytes = bytesFree();
- const qint64 paddingBytes = outputBytes < m_bytesPadding ?
- outputBytes : m_bytesPadding;
- unsigned char *ptr = const_cast<unsigned char*>(outputBuffer.Ptr());
- Mem::FillZ(ptr, paddingBytes);
- outputBuffer.SetLength(outputBuffer.Length() + paddingBytes);
- m_bytesPadding -= paddingBytes;
-
- if (m_pullMode && m_source->atEnd())
- lastBufferFilled();
- if (paddingBytes == outputBytes)
- bufferFilled();
- }
-}
-
-qint64 QAudioOutputPrivate::pushData(const char *data, qint64 len)
-{
- // Data has been written to SymbianAudioOutputPrivate
-
- Q_ASSERT_X(!m_pullMode, Q_FUNC_INFO,
- "pushData called when in pull mode");
-
- const unsigned char *const inputPtr =
- reinterpret_cast<const unsigned char*>(data);
- qint64 bytesWritten = 0;
-
- if (SymbianAudio::IdleState == m_internalState)
- setState(SymbianAudio::ActiveState);
-
- while (m_devSoundBuffer && (bytesWritten < len)) {
- // writePaddingData() is called from BufferToBeFilled(), so we should
- // never have any padding data left at this point.
- Q_ASSERT_X(0 == m_bytesPadding, Q_FUNC_INFO,
- "Padding bytes remaining in pushData");
-
- TDes8 &outputBuffer = m_devSoundBuffer->Data();
-
- const qint64 outputBytes = bytesFree();
- const qint64 inputBytes = len - bytesWritten;
- const qint64 copyBytes = outputBytes < inputBytes ?
- outputBytes : inputBytes;
-
- outputBuffer.Append(inputPtr + bytesWritten, copyBytes);
- bytesWritten += copyBytes;
-
- bufferFilled();
- }
-
- m_pushDataReady = (bytesWritten < len);
-
- // If DevSound is still initializing (m_internalState == InitializingState),
- // we cannot transition m_internalState to ActiveState, but we must emit
- // an (external) state change from IdleState to ActiveState. The following
- // call triggers this signal.
- setState(m_internalState);
-
- return bytesWritten;
-}
-
-void QAudioOutputPrivate::pullData()
-{
- Q_ASSERT_X(m_pullMode, Q_FUNC_INFO,
- "pullData called when in push mode");
-
- if (m_bytesPadding)
- m_bytesPadding = 1;
-
- // writePaddingData() is called by BufferToBeFilled() before pullData(),
- // so we should never have any padding data left at this point.
- Q_ASSERT_X(0 == m_bytesPadding, Q_FUNC_INFO,
- "Padding bytes remaining in pullData");
-
- qint64 inputBytes = m_source->bytesAvailable();
- while (m_devSoundBuffer && inputBytes) {
- if (SymbianAudio::IdleState == m_internalState)
- setState(SymbianAudio::ActiveState);
-
- TDes8 &outputBuffer = m_devSoundBuffer->Data();
-
- const qint64 outputBytes = bytesFree();
- const qint64 copyBytes = outputBytes < inputBytes ?
- outputBytes : inputBytes;
-
- char *outputPtr = (char*)(outputBuffer.Ptr() + outputBuffer.Length());
- const qint64 bytesCopied = m_source->read(outputPtr, copyBytes);
- Q_ASSERT(bytesCopied == copyBytes);
- outputBuffer.SetLength(outputBuffer.Length() + bytesCopied);
- inputBytes -= bytesCopied;
-
- if (m_source->atEnd())
- lastBufferFilled();
- else if (copyBytes == outputBytes)
- bufferFilled();
- }
-}
-
-void QAudioOutputPrivate::bufferFilled()
-{
- Q_ASSERT_X(m_devSoundBuffer, Q_FUNC_INFO, "No buffer to return");
-
- const TDes8 &outputBuffer = m_devSoundBuffer->Data();
- m_bytesWritten += outputBuffer.Length();
-
- m_devSoundBuffer = 0;
-
- m_samplesPlayed = getSamplesPlayed();
- m_underflowTimer->start();
-
- if (QAudio::UnderrunError == m_error)
- m_error = QAudio::NoError;
-
- m_devSound->PlayData();
-}
-
-void QAudioOutputPrivate::lastBufferFilled()
-{
- Q_ASSERT_X(m_devSoundBuffer, Q_FUNC_INFO, "No buffer to fill");
- Q_ASSERT_X(!m_lastBuffer, Q_FUNC_INFO, "Last buffer already sent");
- m_lastBuffer = true;
- m_devSoundBuffer->SetLastBuffer(ETrue);
- bufferFilled();
-}
-
-void QAudioOutputPrivate::close()
-{
- m_notifyTimer->stop();
- m_underflowTimer->stop();
-
- m_error = QAudio::NoError;
-
- if (m_devSound)
- m_devSound->Stop();
- m_devSound.reset();
- m_devSoundBuffer = 0;
- m_devSoundBufferSize = 0;
-
- if (!m_pullMode) // m_source is owned
- delete m_source;
- m_pullMode = false;
- m_source = 0;
-
- m_bytesWritten = 0;
- m_pushDataReady = false;
- m_bytesPadding = 0;
- m_underflow = false;
- m_lastBuffer = false;
- m_samplesPlayed = 0;
- m_totalSamplesPlayed = 0;
-
- setState(SymbianAudio::ClosedState);
-}
-
-qint64 QAudioOutputPrivate::getSamplesPlayed() const
-{
- qint64 result = 0;
- if (m_devSound) {
- const qint64 samplesWritten = SymbianAudio::Utils::bytesToSamples(
- m_format, m_bytesWritten);
-
- if (m_underflow) {
- result = samplesWritten;
- } else {
- // This is necessary because some DevSound implementations report
- // that they have played more data than has actually been provided to them
- // by the client.
- const qint64 devSoundSamplesPlayed(m_devSound->SamplesPlayed());
- result = qMin(devSoundSamplesPlayed, samplesWritten);
- }
- }
- return result;
-}
-
-void QAudioOutputPrivate::setError(QAudio::Error error)
-{
- m_error = error;
-
- // Although no state transition actually occurs here, a stateChanged event
- // must be emitted to inform the client that the call to start() was
- // unsuccessful.
- if (QAudio::OpenError == error)
- emit stateChanged(QAudio::StoppedState);
-
- if (QAudio::UnderrunError == error)
- setState(SymbianAudio::IdleState);
- else
- // Close the DevSound instance. This causes a transition to
- // StoppedState. This must be done asynchronously in case the
- // current function was called from a DevSound event handler, in which
- // case deleting the DevSound instance may cause an exception.
- QMetaObject::invokeMethod(this, "close", Qt::QueuedConnection);
-}
-
-void QAudioOutputPrivate::setState(SymbianAudio::State newInternalState)
-{
- const QAudio::State oldExternalState = m_externalState;
- m_internalState = newInternalState;
- m_externalState = SymbianAudio::Utils::stateNativeToQt(
- m_internalState, initializingState());
-
- if (m_externalState != oldExternalState)
- emit stateChanged(m_externalState);
-}
-
-bool QAudioOutputPrivate::isDataReady() const
-{
- return (m_source && m_source->bytesAvailable())
- || m_bytesPadding
- || m_pushDataReady;
-}
-
-QAudio::State QAudioOutputPrivate::initializingState() const
-{
- return isDataReady() ? QAudio::ActiveState : QAudio::IdleState;
-}
-
-QT_END_NAMESPACE
diff --git a/src/multimedia/multimedia/audio/qaudiooutput_symbian_p.h b/src/multimedia/multimedia/audio/qaudiooutput_symbian_p.h
deleted file mode 100644
index 00ccb24..0000000
--- a/src/multimedia/multimedia/audio/qaudiooutput_symbian_p.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/****************************************************************************
-**
-** 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 QtMultimedia 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.
-//
-
-#ifndef QAUDIOOUTPUT_SYMBIAN_P_H
-#define QAUDIOOUTPUT_SYMBIAN_P_H
-
-#include <QtMultimedia/qaudioengine.h>
-#include <QTime>
-#include <QTimer>
-#include <sounddevice.h>
-#include "qaudio_symbian_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QAudioOutputPrivate;
-
-class SymbianAudioOutputPrivate : public QIODevice
-{
- friend class QAudioOutputPrivate;
- Q_OBJECT
-public:
- SymbianAudioOutputPrivate(QAudioOutputPrivate *audio);
- ~SymbianAudioOutputPrivate();
-
- qint64 readData(char *data, qint64 len);
- qint64 writeData(const char *data, qint64 len);
-
-private:
- QAudioOutputPrivate *const m_audioDevice;
-};
-
-class QAudioOutputPrivate
- : public QAbstractAudioOutput
- , public MDevSoundObserver
-{
- friend class SymbianAudioOutputPrivate;
- Q_OBJECT
-public:
- QAudioOutputPrivate(const QByteArray &device,
- const QAudioFormat &audioFormat);
- ~QAudioOutputPrivate();
-
- // QAbstractAudioOutput
- QIODevice* start(QIODevice *device = 0);
- void stop();
- void reset();
- void suspend();
- void resume();
- int bytesFree() const;
- int periodSize() const;
- void setBufferSize(int value);
- int bufferSize() const;
- void setNotifyInterval(int milliSeconds);
- int notifyInterval() const;
- qint64 processedUSecs() const;
- qint64 elapsedUSecs() const;
- QAudio::Error error() const;
- QAudio::State state() const;
- QAudioFormat format() const;
-
- // MDevSoundObserver
- void InitializeComplete(TInt aError);
- void ToneFinished(TInt aError);
- void BufferToBeFilled(CMMFBuffer *aBuffer);
- void PlayError(TInt aError);
- void BufferToBeEmptied(CMMFBuffer *aBuffer);
- void RecordError(TInt aError);
- void ConvertError(TInt aError);
- void DeviceMessage(TUid aMessageType, const TDesC8 &aMsg);
-
-private slots:
- void dataReady();
- void underflowTimerExpired();
-
-private:
- void open();
- void startPlayback();
- void startDevSoundL();
- void writePaddingData();
- qint64 pushData(const char *data, qint64 len);
- void pullData();
- void bufferFilled();
- void lastBufferFilled();
- Q_INVOKABLE void close();
-
- qint64 getSamplesPlayed() const;
-
- void setError(QAudio::Error error);
- void setState(SymbianAudio::State state);
-
- bool isDataReady() const;
- QAudio::State initializingState() const;
-
-private:
- const QByteArray m_device;
- const QAudioFormat m_format;
-
- int m_clientBufferSize;
- int m_notifyInterval;
- QScopedPointer<QTimer> m_notifyTimer;
- QTime m_elapsed;
- QAudio::Error m_error;
-
- SymbianAudio::State m_internalState;
- QAudio::State m_externalState;
-
- bool m_pullMode;
- QIODevice *m_source;
-
- QScopedPointer<CMMFDevSound> m_devSound;
- TUint32 m_nativeFourCC;
- TMMFCapabilities m_nativeFormat;
-
- // Buffer provided by DevSound, to be filled with data.
- CMMFDataBuffer *m_devSoundBuffer;
-
- int m_devSoundBufferSize;
-
- // Number of bytes transferred from QIODevice to QAudioOutput. It is
- // necessary to count this because data is dropped when suspend() is
- // called. The difference between the position reported by DevSound and
- // this value allows us to calculate m_bytesPadding;
- quint32 m_bytesWritten;
-
- // True if client has provided data while the audio subsystem was not
- // ready to consume it.
- bool m_pushDataReady;
-
- // Number of zero bytes which will be written when client calls resume().
- quint32 m_bytesPadding;
-
- // True if PlayError(KErrUnderflow) has been called.
- bool m_underflow;
-
- // True if a buffer marked with the "last buffer" flag has been provided
- // to DevSound.
- bool m_lastBuffer;
-
- // Some DevSound implementations ignore all underflow errors raised by the
- // audio driver, unless the last buffer flag has been set by the client.
- // In push-mode playback, this flag will never be set, so the underflow
- // error will never be reported. In order to work around this, a timer
- // is used, which gets reset every time the client provides more data. If
- // the timer expires, an underflow error is raised by this object.
- QScopedPointer<QTimer> m_underflowTimer;
-
- // Result of previous call to CMMFDevSound::SamplesPlayed(). This value is
- // used to determine whether, when m_underflowTimer expires, an
- // underflow error has actually occurred.
- quint32 m_samplesPlayed;
-
- // Samples played up to the last call to suspend(). It is necessary
- // to cache this because suspend() is implemented using
- // CMMFDevSound::Stop(), which resets DevSound's SamplesPlayed() counter.
- quint32 m_totalSamplesPlayed;
-
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/multimedia/multimedia/multimedia.pro b/src/multimedia/multimedia/multimedia.pro
deleted file mode 100644
index ee700b6..0000000
--- a/src/multimedia/multimedia/multimedia.pro
+++ /dev/null
@@ -1,19 +0,0 @@
-TARGET = QtMultimedia
-QPRO_PWD = $$PWD
-QT = core gui
-
-DEFINES += QT_BUILD_MULTIMEDIA_LIB QT_NO_USING_NAMESPACE
-
-unix:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui
-
-include(../../qbase.pri)
-
-include(audio/audio.pri)
-include(video/video.pri)
-
-symbian: {
- TARGET.UID3 = 0x2001E627
- contains(CONFIG, def_files) {
- DEF_FILE=../../s60installs
- }
-}
diff --git a/src/multimedia/multimedia/video/qabstractvideobuffer.cpp b/src/multimedia/video/qabstractvideobuffer.cpp
index e9d30d0..e9d30d0 100644
--- a/src/multimedia/multimedia/video/qabstractvideobuffer.cpp
+++ b/src/multimedia/video/qabstractvideobuffer.cpp
diff --git a/src/multimedia/multimedia/video/qabstractvideobuffer.h b/src/multimedia/video/qabstractvideobuffer.h
index a8389db..a8389db 100644
--- a/src/multimedia/multimedia/video/qabstractvideobuffer.h
+++ b/src/multimedia/video/qabstractvideobuffer.h
diff --git a/src/multimedia/multimedia/video/qabstractvideobuffer_p.h b/src/multimedia/video/qabstractvideobuffer_p.h
index c72f303..c72f303 100644
--- a/src/multimedia/multimedia/video/qabstractvideobuffer_p.h
+++ b/src/multimedia/video/qabstractvideobuffer_p.h
diff --git a/src/multimedia/multimedia/video/qabstractvideosurface.cpp b/src/multimedia/video/qabstractvideosurface.cpp
index 3dabb6b..3dabb6b 100644
--- a/src/multimedia/multimedia/video/qabstractvideosurface.cpp
+++ b/src/multimedia/video/qabstractvideosurface.cpp
diff --git a/src/multimedia/multimedia/video/qabstractvideosurface.h b/src/multimedia/video/qabstractvideosurface.h
index f2cae17..f2cae17 100644
--- a/src/multimedia/multimedia/video/qabstractvideosurface.h
+++ b/src/multimedia/video/qabstractvideosurface.h
diff --git a/src/multimedia/multimedia/video/qabstractvideosurface_p.h b/src/multimedia/video/qabstractvideosurface_p.h
index 42df112..42df112 100644
--- a/src/multimedia/multimedia/video/qabstractvideosurface_p.h
+++ b/src/multimedia/video/qabstractvideosurface_p.h
diff --git a/src/multimedia/multimedia/video/qimagevideobuffer.cpp b/src/multimedia/video/qimagevideobuffer.cpp
index e3e1585..e3e1585 100644
--- a/src/multimedia/multimedia/video/qimagevideobuffer.cpp
+++ b/src/multimedia/video/qimagevideobuffer.cpp
diff --git a/src/multimedia/multimedia/video/qimagevideobuffer_p.h b/src/multimedia/video/qimagevideobuffer_p.h
index 82075d7..82075d7 100644
--- a/src/multimedia/multimedia/video/qimagevideobuffer_p.h
+++ b/src/multimedia/video/qimagevideobuffer_p.h
diff --git a/src/multimedia/multimedia/video/qmemoryvideobuffer.cpp b/src/multimedia/video/qmemoryvideobuffer.cpp
index 2e892b7..2e892b7 100644
--- a/src/multimedia/multimedia/video/qmemoryvideobuffer.cpp
+++ b/src/multimedia/video/qmemoryvideobuffer.cpp
diff --git a/src/multimedia/multimedia/video/qmemoryvideobuffer_p.h b/src/multimedia/video/qmemoryvideobuffer_p.h
index c66cf93..c66cf93 100644
--- a/src/multimedia/multimedia/video/qmemoryvideobuffer_p.h
+++ b/src/multimedia/video/qmemoryvideobuffer_p.h
diff --git a/src/multimedia/multimedia/video/qvideoframe.cpp b/src/multimedia/video/qvideoframe.cpp
index 2d66d9e..2d66d9e 100644
--- a/src/multimedia/multimedia/video/qvideoframe.cpp
+++ b/src/multimedia/video/qvideoframe.cpp
diff --git a/src/multimedia/multimedia/video/qvideoframe.h b/src/multimedia/video/qvideoframe.h
index 668a738..668a738 100644
--- a/src/multimedia/multimedia/video/qvideoframe.h
+++ b/src/multimedia/video/qvideoframe.h
diff --git a/src/multimedia/multimedia/video/qvideosurfaceformat.cpp b/src/multimedia/video/qvideosurfaceformat.cpp
index 1fc13a6..1fc13a6 100644
--- a/src/multimedia/multimedia/video/qvideosurfaceformat.cpp
+++ b/src/multimedia/video/qvideosurfaceformat.cpp
diff --git a/src/multimedia/multimedia/video/qvideosurfaceformat.h b/src/multimedia/video/qvideosurfaceformat.h
index 9c73f5f..9c73f5f 100644
--- a/src/multimedia/multimedia/video/qvideosurfaceformat.h
+++ b/src/multimedia/video/qvideosurfaceformat.h
diff --git a/src/multimedia/multimedia/video/video.pri b/src/multimedia/video/video.pri
index 0547a4c..0547a4c 100644
--- a/src/multimedia/multimedia/video/video.pri
+++ b/src/multimedia/video/video.pri
diff --git a/src/network/access/qabstractnetworkcache.cpp b/src/network/access/qabstractnetworkcache.cpp
index f091714..0f0ef9c 100644
--- a/src/network/access/qabstractnetworkcache.cpp
+++ b/src/network/access/qabstractnetworkcache.cpp
@@ -312,7 +312,7 @@ void QNetworkCacheMetaData::setAttributes(const AttributesMap &attributes)
Writes \a metaData to the \a out stream.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &out, const QNetworkCacheMetaData &metaData)
{
@@ -350,7 +350,7 @@ void QNetworkCacheMetaDataPrivate::save(QDataStream &out, const QNetworkCacheMet
Reads a QNetworkCacheMetaData from the stream \a in into \a metaData.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &in, QNetworkCacheMetaData &metaData)
{
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 559124f..1afabec 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -343,9 +343,16 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
copyCredentials(i, auth, isProxy);
QMetaObject::invokeMethod(q, "_q_restartAuthPendingRequests", Qt::QueuedConnection);
}
+ } else if (priv->phase == QAuthenticatorPrivate::Start) {
+ // If the url's authenticator has a 'user' set we will end up here (phase is only set to 'Done' by
+ // parseHttpResponse above if 'user' is empty). So if credentials were supplied with the request,
+ // such as in the case of an XMLHttpRequest, this is our only opportunity to cache them.
+ emit q->cacheCredentials(reply->request(), auth, q);
}
- // changing values in QAuthenticator will reset the 'phase'
- if (priv->phase == QAuthenticatorPrivate::Done) {
+ // - Changing values in QAuthenticator will reset the 'phase'.
+ // - If withCredentials has been set to false (e.g. by QtWebKit for a cross-origin XMLHttpRequest) then
+ // we need to bail out if authentication is required.
+ if (priv->phase == QAuthenticatorPrivate::Done || !reply->request().withCredentials()) {
// authentication is cancelled, send the current contents to the user.
emit channels[i].reply->headerChanged();
emit channels[i].reply->readyRead();
@@ -716,6 +723,7 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply)
// This function must be called from the event loop. The only
// exception is documented in QHttpNetworkConnectionPrivate::queueRequest
+// although it is called _q_startNextRequest, it will actually start multiple requests when possible
void QHttpNetworkConnectionPrivate::_q_startNextRequest()
{
//resend the necessary ones.
@@ -733,26 +741,23 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest()
// dequeue new ones
- QAbstractSocket *socket = 0;
+ // return fast if there is nothing to do
+ if (highPriorityQueue.isEmpty() && lowPriorityQueue.isEmpty())
+ return;
+ // try to get a free AND connected socket
for (int i = 0; i < channelCount; ++i) {
- QAbstractSocket *chSocket = channels[i].socket;
- // try to get a free AND connected socket
if (!channels[i].isSocketBusy() && channels[i].socket->state() == QAbstractSocket::ConnectedState) {
- socket = chSocket;
- dequeueAndSendRequest(socket);
- break;
+ dequeueAndSendRequest(channels[i].socket);
}
}
- if (!socket) {
- for (int i = 0; i < channelCount; ++i) {
- QAbstractSocket *chSocket = channels[i].socket;
- // try to get a free unconnected socket
- if (!channels[i].isSocketBusy()) {
- socket = chSocket;
- dequeueAndSendRequest(socket);
- break;
- }
+ // return fast if there is nothing to do
+ if (highPriorityQueue.isEmpty() && lowPriorityQueue.isEmpty())
+ return;
+ // try to get a free unconnected socket
+ for (int i = 0; i < channelCount; ++i) {
+ if (!channels[i].isSocketBusy()) {
+ dequeueAndSendRequest(channels[i].socket);
}
}
diff --git a/src/network/access/qhttpnetworkconnection_p.h b/src/network/access/qhttpnetworkconnection_p.h
index b5bd300..51666d6 100644
--- a/src/network/access/qhttpnetworkconnection_p.h
+++ b/src/network/access/qhttpnetworkconnection_p.h
@@ -133,6 +133,8 @@ Q_SIGNALS:
#endif
void authenticationRequired(const QHttpNetworkRequest &request, QAuthenticator *authenticator,
const QHttpNetworkConnection *connection = 0);
+ void cacheCredentials(const QHttpNetworkRequest &request, QAuthenticator *authenticator,
+ const QHttpNetworkConnection *connection = 0);
void error(QNetworkReply::NetworkError errorCode, const QString &detail = QString());
private:
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 3b7bc9e..d3576dd 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -173,7 +173,7 @@ bool QHttpNetworkConnectionChannel::sendRequest()
pendingEncrypt = false;
// if the url contains authentication parameters, use the new ones
// both channels will use the new authentication parameters
- if (!request.url().userInfo().isEmpty()) {
+ if (!request.url().userInfo().isEmpty() && request.withCredentials()) {
QUrl url = request.url();
QAuthenticator &auth = authenticator;
if (url.userName() != auth.user()
@@ -187,7 +187,10 @@ bool QHttpNetworkConnectionChannel::sendRequest()
url.setUserInfo(QString());
request.setUrl(url);
}
- connection->d_func()->createAuthorization(socket, request);
+ // Will only be false if QtWebKit is performing a cross-origin XMLHttpRequest
+ // and withCredentials has not been set to true.
+ if (request.withCredentials())
+ connection->d_func()->createAuthorization(socket, request);
#ifndef QT_NO_NETWORKPROXY
QByteArray header = QHttpNetworkRequestPrivate::header(request,
(connection->d_func()->networkProxy.type() != QNetworkProxy::NoProxy));
@@ -291,7 +294,8 @@ bool QHttpNetworkConnectionChannel::sendRequest()
// ensure we try to receive a reply in all cases, even if _q_readyRead_ hat not been called
// this is needed if the sends an reply before we have finished sending the request. In that
// case receiveReply had been called before but ignored the server reply
- QMetaObject::invokeMethod(this, "_q_receiveReply", Qt::QueuedConnection);
+ if (socket->bytesAvailable())
+ QMetaObject::invokeMethod(this, "_q_receiveReply", Qt::QueuedConnection);
break;
}
case QHttpNetworkConnectionChannel::ReadingState:
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index 338236e..108ba8a 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -179,6 +179,9 @@ qint64 QHttpNetworkReply::bytesAvailableNextBlock() const
QByteArray QHttpNetworkReply::readAny()
{
Q_D(QHttpNetworkReply);
+ if (d->responseData.bufferCount() == 0)
+ return QByteArray();
+
// we'll take the last buffer, so schedule another read from http
if (d->downstreamLimited && d->responseData.bufferCount() == 1)
d->connection->d_func()->readMoreLater(this);
diff --git a/src/network/access/qhttpnetworkrequest.cpp b/src/network/access/qhttpnetworkrequest.cpp
index 9eb2399..639025e 100644
--- a/src/network/access/qhttpnetworkrequest.cpp
+++ b/src/network/access/qhttpnetworkrequest.cpp
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
QHttpNetworkRequestPrivate::QHttpNetworkRequestPrivate(QHttpNetworkRequest::Operation op,
QHttpNetworkRequest::Priority pri, const QUrl &newUrl)
: QHttpNetworkHeaderPrivate(newUrl), operation(op), priority(pri), uploadByteDevice(0),
- autoDecompress(false), pipeliningAllowed(false)
+ autoDecompress(false), pipeliningAllowed(false), withCredentials(true)
{
}
@@ -62,6 +62,7 @@ QHttpNetworkRequestPrivate::QHttpNetworkRequestPrivate(const QHttpNetworkRequest
autoDecompress = other.autoDecompress;
pipeliningAllowed = other.pipeliningAllowed;
customVerb = other.customVerb;
+ withCredentials = other.withCredentials;
}
QHttpNetworkRequestPrivate::~QHttpNetworkRequestPrivate()
@@ -274,6 +275,16 @@ void QHttpNetworkRequest::setPipeliningAllowed(bool b)
d->pipeliningAllowed = b;
}
+bool QHttpNetworkRequest::withCredentials() const
+{
+ return d->withCredentials;
+}
+
+void QHttpNetworkRequest::setWithCredentials(bool b)
+{
+ d->withCredentials = b;
+}
+
void QHttpNetworkRequest::setUploadByteDevice(QNonContiguousByteDevice *bd)
{
d->uploadByteDevice = bd;
diff --git a/src/network/access/qhttpnetworkrequest_p.h b/src/network/access/qhttpnetworkrequest_p.h
index 1b35a84..15cab73 100644
--- a/src/network/access/qhttpnetworkrequest_p.h
+++ b/src/network/access/qhttpnetworkrequest_p.h
@@ -113,6 +113,9 @@ public:
bool isPipeliningAllowed() const;
void setPipeliningAllowed(bool b);
+ bool withCredentials() const;
+ void setWithCredentials(bool b);
+
void setUploadByteDevice(QNonContiguousByteDevice *bd);
QNonContiguousByteDevice* uploadByteDevice() const;
@@ -142,6 +145,7 @@ public:
mutable QNonContiguousByteDevice* uploadByteDevice;
bool autoDecompress;
bool pipeliningAllowed;
+ bool withCredentials;
};
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp
index f188bd5..60f7dc6 100644
--- a/src/network/access/qnetworkaccessbackend.cpp
+++ b/src/network/access/qnetworkaccessbackend.cpp
@@ -74,7 +74,7 @@ Q_GLOBAL_STATIC(QNetworkAccessBackendFactoryData, factoryData)
QNetworkAccessBackendFactory::QNetworkAccessBackendFactory()
{
QMutexLocker locker(&factoryData()->mutex);
- factoryData()->prepend(this);
+ factoryData()->append(this);
}
QNetworkAccessBackendFactory::~QNetworkAccessBackendFactory()
@@ -327,6 +327,11 @@ void QNetworkAccessBackend::authenticationRequired(QAuthenticator *authenticator
manager->authenticationRequired(this, authenticator);
}
+void QNetworkAccessBackend::cacheCredentials(QAuthenticator *authenticator)
+{
+ manager->addCredentials(this->reply->url, authenticator);
+}
+
void QNetworkAccessBackend::metaDataChanged()
{
reply->metaDataChanged();
diff --git a/src/network/access/qnetworkaccessbackend_p.h b/src/network/access/qnetworkaccessbackend_p.h
index 4ce37a6..4fe6de6 100644
--- a/src/network/access/qnetworkaccessbackend_p.h
+++ b/src/network/access/qnetworkaccessbackend_p.h
@@ -188,6 +188,7 @@ protected slots:
void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth);
#endif
void authenticationRequired(QAuthenticator *auth);
+ void cacheCredentials(QAuthenticator *auth);
void metaDataChanged();
void redirectionRequested(const QUrl &destination);
void sslErrors(const QList<QSslError> &errors);
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 3154ed6..a6c5c02 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -346,6 +346,8 @@ void QNetworkAccessHttpBackend::setupConnection()
#endif
connect(http, SIGNAL(authenticationRequired(QHttpNetworkRequest,QAuthenticator*)),
SLOT(httpAuthenticationRequired(QHttpNetworkRequest,QAuthenticator*)));
+ connect(http, SIGNAL(cacheCredentials(QHttpNetworkRequest,QAuthenticator*)),
+ SLOT(httpCacheCredentials(QHttpNetworkRequest,QAuthenticator*)));
connect(http, SIGNAL(error(QNetworkReply::NetworkError,QString)),
SLOT(httpError(QNetworkReply::NetworkError,QString)));
#ifndef QT_NO_OPENSSL
@@ -578,6 +580,11 @@ void QNetworkAccessHttpBackend::postRequest()
if (request().attribute(QNetworkRequest::HttpPipeliningAllowedAttribute).toBool() == true)
httpRequest.setPipeliningAllowed(true);
+ if (static_cast<QNetworkRequest::LoadControl>
+ (request().attribute(QNetworkRequest::AuthenticationReuseAttribute,
+ QNetworkRequest::Automatic).toInt()) == QNetworkRequest::Manual)
+ httpRequest.setWithCredentials(false);
+
httpReply = http->sendRequest(httpRequest);
httpReply->setParent(this);
#ifndef QT_NO_OPENSSL
@@ -861,6 +868,12 @@ void QNetworkAccessHttpBackend::httpAuthenticationRequired(const QHttpNetworkReq
authenticationRequired(auth);
}
+void QNetworkAccessHttpBackend::httpCacheCredentials(const QHttpNetworkRequest &,
+ QAuthenticator *auth)
+{
+ cacheCredentials(auth);
+}
+
void QNetworkAccessHttpBackend::httpError(QNetworkReply::NetworkError errorCode,
const QString &errorString)
{
diff --git a/src/network/access/qnetworkaccesshttpbackend_p.h b/src/network/access/qnetworkaccesshttpbackend_p.h
index e5cc0ab..c4c88ae 100644
--- a/src/network/access/qnetworkaccesshttpbackend_p.h
+++ b/src/network/access/qnetworkaccesshttpbackend_p.h
@@ -94,8 +94,6 @@ public:
#endif
QNetworkCacheMetaData fetchCacheMetaData(const QNetworkCacheMetaData &metaData) const;
- qint64 deviceReadData(char *buffer, qint64 maxlen);
-
// we return true since HTTP needs to send PUT/POST data again after having authenticated
bool needsResetableUploadData() { return true; }
@@ -107,6 +105,7 @@ private slots:
void replyFinished();
void replyHeaderChanged();
void httpAuthenticationRequired(const QHttpNetworkRequest &request, QAuthenticator *auth);
+ void httpCacheCredentials(const QHttpNetworkRequest &request, QAuthenticator *auth);
void httpError(QNetworkReply::NetworkError error, const QString &errorString);
bool sendCacheContents(const QNetworkCacheMetaData &metaData);
void finished(); // override
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index feb9d99..1c7661d 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -948,10 +948,15 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
// but the data that is outgoing is random-access
request.setHeader(QNetworkRequest::ContentLengthHeader, outgoingData->size());
}
- if (d->cookieJar) {
- QList<QNetworkCookie> cookies = d->cookieJar->cookiesForUrl(request.url());
- if (!cookies.isEmpty())
- request.setHeader(QNetworkRequest::CookieHeader, qVariantFromValue(cookies));
+
+ if (static_cast<QNetworkRequest::LoadControl>
+ (request.attribute(QNetworkRequest::CookieLoadControlAttribute,
+ QNetworkRequest::Automatic).toInt()) == QNetworkRequest::Automatic) {
+ if (d->cookieJar) {
+ QList<QNetworkCookie> cookies = d->cookieJar->cookiesForUrl(request.url());
+ if (!cookies.isEmpty())
+ request.setHeader(QNetworkRequest::CookieHeader, qVariantFromValue(cookies));
+ }
}
// first step: create the reply
@@ -967,11 +972,15 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
priv->manager = this;
// second step: fetch cached credentials
- QNetworkAuthenticationCredential *cred = d->fetchCachedCredentials(url);
- if (cred) {
- url.setUserName(cred->user);
- url.setPassword(cred->password);
- priv->urlForLastAuthentication = url;
+ if (static_cast<QNetworkRequest::LoadControl>
+ (request.attribute(QNetworkRequest::AuthenticationReuseAttribute,
+ QNetworkRequest::Automatic).toInt()) == QNetworkRequest::Automatic) {
+ QNetworkAuthenticationCredential *cred = d->fetchCachedCredentials(url);
+ if (cred) {
+ url.setUserName(cred->user);
+ url.setPassword(cred->password);
+ priv->urlForLastAuthentication = url;
+ }
}
// third step: find a backend
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 128d18f..31ee2a4 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -673,8 +673,12 @@ void QNetworkReplyImplPrivate::error(QNetworkReplyImpl::NetworkError code, const
void QNetworkReplyImplPrivate::metaDataChanged()
{
Q_Q(QNetworkReplyImpl);
- // do we have cookies?
- if (cookedHeaders.contains(QNetworkRequest::SetCookieHeader) && !manager.isNull()) {
+ // 1. do we have cookies?
+ // 2. are we allowed to set them?
+ if (cookedHeaders.contains(QNetworkRequest::SetCookieHeader) && !manager.isNull()
+ && (static_cast<QNetworkRequest::LoadControl>
+ (request.attribute(QNetworkRequest::CookieSaveControlAttribute,
+ QNetworkRequest::Automatic).toInt()) == QNetworkRequest::Automatic)) {
QList<QNetworkCookie> cookies =
qvariant_cast<QList<QNetworkCookie> >(cookedHeaders.value(QNetworkRequest::SetCookieHeader));
QNetworkCookieJar *jar = manager->cookieJar();
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 61c116d..911eadc 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -190,6 +190,46 @@ QT_BEGIN_NAMESPACE
of other verbs than GET, POST, PUT and DELETE). This verb is set
when calling QNetworkAccessManager::sendCustomRequest().
+ \value CookieLoadControlAttribute
+ Requests only, type: QVariant::Int (default: QNetworkRequest::Automatic)
+ Indicates whether to send 'Cookie' headers in the request.
+
+ This attribute is set to false by QtWebKit when creating a cross-origin
+ XMLHttpRequest where withCredentials has not been set explicitly to true by the
+ Javascript that created the request.
+
+ See http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag for more information.
+
+ \since 4.7
+
+ \value CookieSaveControlAttribute
+ Requests only, type: QVariant::Int (default: QNetworkRequest::Automatic)
+ Indicates whether to save 'Cookie' headers received from the server in reply
+ to the request.
+
+ This attribute is set to false by QtWebKit when creating a cross-origin
+ XMLHttpRequest where withCredentials has not been set explicitly to true by the
+ Javascript that created the request.
+
+ See http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag for more information.
+
+ \since 4.7
+
+ \value AuthenticationReuseControlAttribute
+ Requests only, type: QVariant::Int (default: QNetworkRequest::Automatic)
+ Indicates whether to use cached authorization credentials in the request,
+ if available. If this is set to QNetworkRequest::Manual and the authentication
+ mechanism is 'Basic' or 'Digest', Qt will not send an an 'Authorization' HTTP
+ header with any cached credentials it may have for the request's URL.
+
+ This attribute is set to QNetworkRequest::Manual by QtWebKit when creating a cross-origin
+ XMLHttpRequest where withCredentials has not been set explicitly to true by the
+ Javascript that created the request.
+
+ See http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag for more information.
+
+ \since 4.7
+
\value User
Special type. Additional information can be passed in
QVariants with types ranging from User to UserMax. The default
@@ -222,6 +262,18 @@ QT_BEGIN_NAMESPACE
if the item was not cached (i.e., off-line mode)
*/
+/*!
+ \enum QNetworkRequest::LoadControl
+ \since 4.7
+
+ Indicates if an aspect of the request's loading mechanism has been
+ manually overridden, e.g. by QtWebKit.
+
+ \value Automatic default value: indicates default behaviour.
+
+ \value Manual indicates behaviour has been manually overridden.
+*/
+
class QNetworkRequestPrivate: public QSharedData, public QNetworkHeadersPrivate
{
public:
diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h
index a0ef1a6..d2945c4 100644
--- a/src/network/access/qnetworkrequest.h
+++ b/src/network/access/qnetworkrequest.h
@@ -79,6 +79,9 @@ public:
HttpPipeliningAllowedAttribute,
HttpPipeliningWasUsedAttribute,
CustomVerbAttribute,
+ CookieLoadControlAttribute,
+ AuthenticationReuseAttribute,
+ CookieSaveControlAttribute,
User = 1000,
UserMax = 32767
@@ -89,6 +92,10 @@ public:
PreferCache,
AlwaysCache
};
+ enum LoadControl {
+ Automatic = 0,
+ Manual
+ };
enum Priority {
HighPriority = 1,
diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp
index 2852d30..5ae3acc 100644
--- a/src/network/kernel/qhostaddress.cpp
+++ b/src/network/kernel/qhostaddress.cpp
@@ -1097,7 +1097,7 @@ uint qHash(const QHostAddress &key)
Writes host address \a address to the stream \a out and returns a reference
to the stream.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &out, const QHostAddress &address)
{
@@ -1127,7 +1127,7 @@ QDataStream &operator<<(QDataStream &out, const QHostAddress &address)
Reads a host address into \a address from the stream \a in and returns a
reference to the stream.
- \sa {Format of the QDataStream operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &in, QHostAddress &address)
{
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index a2c2c63..985caf4 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -44,14 +44,10 @@
#include "QtCore/qscopedpointer.h"
#include <qabstracteventdispatcher.h>
-#include <private/qunicodetables_p.h>
#include <qcoreapplication.h>
#include <qmetaobject.h>
-#include <qregexp.h>
-#include <private/qnativesocketengine_p.h>
#include <qstringlist.h>
#include <qthread.h>
-#include <qtimer.h>
#include <qurl.h>
#ifdef Q_OS_UNIX
@@ -451,6 +447,18 @@ void QHostInfoRunnable::run()
hostInfo.setLookupId(id);
resultEmitter.emitResultsReady(hostInfo);
+ // now also iterate through the postponed ones
+ QMutableListIterator<QHostInfoRunnable*> iterator(manager->postponedLookups);
+ while (iterator.hasNext()) {
+ QHostInfoRunnable* postponed = iterator.next();
+ if (toBeLookedUp == postponed->toBeLookedUp) {
+ // we can now emit
+ iterator.remove();
+ hostInfo.setLookupId(postponed->id);
+ postponed->resultEmitter.emitResultsReady(hostInfo);
+ }
+ }
+
manager->lookupFinished(this);
// thread goes back to QThreadPool
@@ -576,6 +584,23 @@ void QHostInfoLookupManager::abortLookup(int id)
return;
QMutexLocker locker(&this->mutex);
+
+ // is postponed? delete and return
+ for (int i = 0; i < postponedLookups.length(); i++) {
+ if (postponedLookups.at(i)->id == id) {
+ delete postponedLookups.takeAt(i);
+ return;
+ }
+ }
+
+ // is scheduled? delete and return
+ for (int i = 0; i < scheduledLookups.length(); i++) {
+ if (scheduledLookups.at(i)->id == id) {
+ delete scheduledLookups.takeAt(i);
+ return;
+ }
+ }
+
if (!abortedLookups.contains(id))
abortedLookups.append(id);
}
diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h
index acd2bf0..134335f 100644
--- a/src/network/kernel/qhostinfo_p.h
+++ b/src/network/kernel/qhostinfo_p.h
@@ -82,7 +82,7 @@ public Q_SLOTS:
}
Q_SIGNALS:
- void resultsReady(const QHostInfo info);
+ void resultsReady(const QHostInfo &info);
};
// needs to be QObject because fromName calls tr()
@@ -170,6 +170,8 @@ public:
bool wasAborted(int id);
QHostInfoCache cache;
+
+ friend class QHostInfoRunnable;
protected:
QList<QHostInfoRunnable*> currentLookups; // in progress
QList<QHostInfoRunnable*> postponedLookups; // postponed because in progress for same host
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index 0887f89..0c8caa0 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -44,6 +44,7 @@
#include "qplatformdefs.h"
#include "qhostinfo_p.h"
+#include "private/qnativesocketengine_p.h"
#include "qiodevice.h"
#include <qbytearray.h>
#include <qlibrary.h>
diff --git a/src/network/kernel/qhostinfo_win.cpp b/src/network/kernel/qhostinfo_win.cpp
index 89aaa34..65257e8 100644
--- a/src/network/kernel/qhostinfo_win.cpp
+++ b/src/network/kernel/qhostinfo_win.cpp
@@ -50,7 +50,6 @@
#include "private/qnativesocketengine_p.h"
#include <ws2tcpip.h>
#include <qlibrary.h>
-#include <qtimer.h>
#include <qmutex.h>
#include <qurl.h>
#include <private/qmutexpool_p.h>
diff --git a/src/network/socket/qlocalserver_win.cpp b/src/network/socket/qlocalserver_win.cpp
index 5d2be72..07baf1e 100644
--- a/src/network/socket/qlocalserver_win.cpp
+++ b/src/network/socket/qlocalserver_win.cpp
@@ -167,8 +167,8 @@ void QLocalServerPrivate::_q_onNewConnection()
q->incomingConnection((quintptr)handle);
} else {
if (GetLastError() != ERROR_IO_INCOMPLETE) {
+ q->close();
setError(QLatin1String("QLocalServerPrivate::_q_onNewConnection"));
- closeServer();
return;
}
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index d155357..70bb0da 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -425,6 +425,9 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &addr, quint16
case EBADF:
case EFAULT:
case ENOTSOCK:
+#ifdef Q_OS_SYMBIAN
+ case EPIPE:
+#endif
socketState = QAbstractSocket::UnconnectedState;
default:
break;
diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp
index 932126d..55f926d 100644
--- a/src/network/socket/qtcpserver.cpp
+++ b/src/network/socket/qtcpserver.cpp
@@ -562,7 +562,7 @@ QTcpSocket *QTcpServer::nextPendingConnection()
to the other thread and create the QTcpSocket object there and
use its setSocketDescriptor() method.
- \sa newConnection(), nextPendingConnection()
+ \sa newConnection(), nextPendingConnection(), addPendingConnection()
*/
void QTcpServer::incomingConnection(int socketDescriptor)
{
@@ -572,6 +572,22 @@ void QTcpServer::incomingConnection(int socketDescriptor)
QTcpSocket *socket = new QTcpSocket(this);
socket->setSocketDescriptor(socketDescriptor);
+ addPendingConnection(socket);
+}
+
+/*!
+ This function is called by QTcpServer::incomingConnection()
+ to add a socket to the list of pending incoming connections.
+
+ \note Don't forget to call this member from reimplemented
+ incomingConnection() if you do not want to break the
+ Pending Connections mechanism.
+
+ \sa incomingConnection()
+ \since 4.7
+*/
+void QTcpServer::addPendingConnection(QTcpSocket* socket)
+{
d_func()->pendingConnections.append(socket);
}
diff --git a/src/network/socket/qtcpserver.h b/src/network/socket/qtcpserver.h
index 7aebffe..b206678 100644
--- a/src/network/socket/qtcpserver.h
+++ b/src/network/socket/qtcpserver.h
@@ -93,6 +93,7 @@ public:
protected:
virtual void incomingConnection(int handle);
+ void addPendingConnection(QTcpSocket* socket);
Q_SIGNALS:
void newConnection();
diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h
index adc69ee..46029b9 100644
--- a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h
+++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h
@@ -100,8 +100,10 @@ class QGL2PEXVertexArray
{
public:
QGL2PEXVertexArray() :
+ vertexArray(0), vertexArrayStops(0),
maxX(-2e10), maxY(-2e10), minX(2e10), minY(2e10),
- boundingRectDirty(true) {}
+ boundingRectDirty(true)
+ { }
inline void addRect(const QRectF &rect)
{
diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
index ac25597..40b3641 100644
--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
+++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp
@@ -266,10 +266,12 @@ QGLEngineShaderProg *QGLEngineSharedShaders::findProgramInCache(const QGLEngineS
do {
QByteArray source;
- source.append(qShaderSnippets[prog.mainFragShader]);
- source.append(qShaderSnippets[prog.srcPixelFragShader]);
+ // Insert the custom stage before the srcPixel shader to work around an ATI driver bug
+ // where you cannot forward declare a function that takes a sampler as argument.
if (prog.srcPixelFragShader == CustomImageSrcFragmentShader)
source.append(prog.customStageSource);
+ source.append(qShaderSnippets[prog.mainFragShader]);
+ source.append(qShaderSnippets[prog.srcPixelFragShader]);
if (prog.compositionFragShader)
source.append(qShaderSnippets[prog.compositionFragShader]);
if (prog.maskFragShader)
@@ -777,8 +779,8 @@ bool QGLEngineShaderManager::useCorrectShaderProg()
// doesn't use are disabled)
QGLContextPrivate* ctx_d = ctx->d_func();
ctx_d->setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, true);
- ctx_d->setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, currentShaderProg->useTextureCoords);
- ctx_d->setVertexAttribArrayEnabled(QT_OPACITY_ATTR, currentShaderProg->useOpacityAttribute);
+ ctx_d->setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, currentShaderProg && currentShaderProg->useTextureCoords);
+ ctx_d->setVertexAttribArrayEnabled(QT_OPACITY_ATTR, currentShaderProg && currentShaderProg->useOpacityAttribute);
shaderProgNeedsChanging = false;
return true;
diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
index 8dba951..a7ece0f 100644
--- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h
+++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h
@@ -351,7 +351,6 @@ static const char* const qglslImageSrcFragmentShader = "\n\
static const char* const qglslCustomSrcFragmentShader = "\n\
varying highp vec2 textureCoords; \n\
uniform lowp sampler2D imageTexture; \n\
- lowp vec4 customShader(lowp sampler2D texture, highp vec2 coords); \n\
lowp vec4 srcPixel() \n\
{ \n\
return customShader(imageTexture, textureCoords); \n\
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index 6ba0c42..0a046dc 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -177,6 +177,7 @@ public:
ctx(0),
useSystemClip(true),
elementIndicesVBOId(0),
+ opacityArray(0),
snapToPixelGrid(false),
addOffset(false),
nativePaintingActive(false),
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 994c1c9..410cf21 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -42,6 +42,10 @@
#include "qtextureglyphcache_gl_p.h"
#include "qpaintengineex_opengl2_p.h"
+#if defined QT_OPENGL_ES_2 && !defined(QT_NO_EGL)
+#include "private/qeglcontext_p.h"
+#endif
+
QT_BEGIN_NAMESPACE
#ifdef Q_WS_WIN
@@ -49,12 +53,19 @@ extern Q_GUI_EXPORT bool qt_cleartype_enabled;
#endif
QGLTextureGlyphCache::QGLTextureGlyphCache(QGLContext *context, QFontEngineGlyphCache::Type type, const QTransform &matrix)
- : QTextureGlyphCache(type, matrix)
+ : QImageTextureGlyphCache(type, matrix)
, ctx(context)
, m_width(0)
, m_height(0)
{
- glGenFramebuffers(1, &m_fbo);
+ // broken FBO readback is a bug in the SGX 1.3 and 1.4 drivers for the N900 where
+ // copying between FBO's is broken if the texture is either GL_ALPHA or POT. The
+ // workaround is to use a system-memory copy of the glyph cache for this device.
+ // Switching to NPOT and GL_RGBA would both cost a lot more graphics memory and
+ // be slower, so that is not desireable.
+ if (!ctx->d_ptr->workaround_brokenFBOReadBack)
+ glGenFramebuffers(1, &m_fbo);
+
connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext*)),
SLOT(contextDestroyed(const QGLContext*)));
}
@@ -63,7 +74,9 @@ QGLTextureGlyphCache::~QGLTextureGlyphCache()
{
if (ctx) {
QGLShareContextScope scope(ctx);
- glDeleteFramebuffers(1, &m_fbo);
+
+ if (!ctx->d_ptr->workaround_brokenFBOReadBack)
+ glDeleteFramebuffers(1, &m_fbo);
if (m_width || m_height)
glDeleteTextures(1, &m_texture);
@@ -72,6 +85,18 @@ QGLTextureGlyphCache::~QGLTextureGlyphCache()
void QGLTextureGlyphCache::createTextureData(int width, int height)
{
+ // create in QImageTextureGlyphCache baseclass is meant to be called
+ // only to create the initial image and does not preserve the content,
+ // so we don't call when this function is called from resize.
+ if (ctx->d_ptr->workaround_brokenFBOReadBack && image().isNull())
+ QImageTextureGlyphCache::createTextureData(width, height);
+
+ // Make the lower glyph texture size 16 x 16.
+ if (width < 16)
+ width = 16;
+ if (height < 16)
+ height = 16;
+
glGenTextures(1, &m_texture);
glBindTexture(GL_TEXTURE_2D, m_texture);
@@ -93,14 +118,28 @@ void QGLTextureGlyphCache::createTextureData(int width, int height)
void QGLTextureGlyphCache::resizeTextureData(int width, int height)
{
- // ### the QTextureGlyphCache API needs to be reworked to allow
- // ### resizeTextureData to fail
-
int oldWidth = m_width;
int oldHeight = m_height;
+ // Make the lower glyph texture size 16 x 16.
+ if (width < 16)
+ width = 16;
+ if (height < 16)
+ height = 16;
+
GLuint oldTexture = m_texture;
createTextureData(width, height);
+
+ if (ctx->d_ptr->workaround_brokenFBOReadBack) {
+ QImageTextureGlyphCache::resizeTextureData(width, height);
+ Q_ASSERT(image().depth() == 8);
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, oldWidth, oldHeight, GL_ALPHA, GL_UNSIGNED_BYTE, image().constBits());
+ glDeleteTextures(1, &oldTexture);
+ return;
+ }
+
+ // ### the QTextureGlyphCache API needs to be reworked to allow
+ // ### resizeTextureData to fail
glBindFramebuffer(GL_FRAMEBUFFER_EXT, m_fbo);
@@ -159,20 +198,7 @@ void QGLTextureGlyphCache::resizeTextureData(int width, int height)
glBindTexture(GL_TEXTURE_2D, m_texture);
-#ifdef QT_OPENGL_ES_2
- QDataBuffer<uchar> buffer(4*oldWidth*oldHeight);
- buffer.resize(4*oldWidth*oldHeight);
- glReadPixels(0, 0, oldWidth, oldHeight, GL_RGBA, GL_UNSIGNED_BYTE, buffer.data());
-
- // do an in-place conversion from GL_RGBA to GL_ALPHA
- for (int i=0; i<oldWidth*oldHeight; ++i)
- buffer.data()[i] = buffer.at(4*i + 3);
-
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, oldWidth, oldHeight,
- GL_ALPHA, GL_UNSIGNED_BYTE, buffer.data());
-#else
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, oldWidth, oldHeight);
-#endif
glFramebufferRenderbuffer(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
GL_RENDERBUFFER_EXT, 0);
@@ -187,6 +213,21 @@ void QGLTextureGlyphCache::resizeTextureData(int width, int height)
void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph)
{
+ if (ctx->d_ptr->workaround_brokenFBOReadBack) {
+ QImageTextureGlyphCache::fillTexture(c, glyph);
+
+ glBindTexture(GL_TEXTURE_2D, m_texture);
+ const QImage &texture = image();
+ const uchar *bits = texture.constBits();
+ bits += c.y * texture.bytesPerLine() + c.x;
+ for (int i=0; i<c.h; ++i) {
+ glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y + i, c.w, 1, GL_ALPHA, GL_UNSIGNED_BYTE, bits);
+ bits += texture.bytesPerLine();
+ }
+
+ return;
+ }
+
QImage mask = textureMapForGlyph(glyph);
const int maskWidth = mask.width();
const int maskHeight = mask.height();
@@ -235,17 +276,6 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph)
}
}
-int QGLTextureGlyphCache::glyphMargin() const
-{
-#if defined(Q_WS_MAC)
- return 2;
-#elif defined (Q_WS_X11)
- return 0;
-#else
- return m_type == QFontEngineGlyphCache::Raster_RGBMask ? 2 : 0;
-#endif
-}
-
int QGLTextureGlyphCache::glyphPadding() const
{
return 1;
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
index 75c2bb1..6bcd655 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
class QGL2PaintEngineExPrivate;
-class Q_OPENGL_EXPORT QGLTextureGlyphCache : public QObject, public QTextureGlyphCache
+class Q_OPENGL_EXPORT QGLTextureGlyphCache : public QObject, public QImageTextureGlyphCache
{
Q_OBJECT
public:
@@ -72,7 +72,6 @@ public:
virtual void createTextureData(int width, int height);
virtual void resizeTextureData(int width, int height);
virtual void fillTexture(const Coord &c, glyph_t glyph);
- virtual int glyphMargin() const;
virtual int glyphPadding() const;
inline GLuint texture() const { return m_texture; }
diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
index f677ce1..9bc099d 100644
--- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
+++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp
@@ -481,7 +481,8 @@ static void qdashprocessor_cubicTo(qreal, qreal, qreal, qreal, qreal, qreal, voi
}
QDashedStrokeProcessor::QDashedStrokeProcessor()
- : m_dash_stroker(0), m_inv_scale(1)
+ : m_points(0), m_types(0),
+ m_dash_stroker(0), m_inv_scale(1)
{
m_dash_stroker.setMoveToHook(qdashprocessor_moveTo);
m_dash_stroker.setLineToHook(qdashprocessor_lineTo);
@@ -499,6 +500,8 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c
m_points.reset();
m_types.reset();
+ m_points.reserve(path.elementCount());
+ m_types.reserve(path.elementCount());
qreal width = qpen_widthf(pen);
if (width == 0)
diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h
index 956d7cc..ab27ed6 100644
--- a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h
+++ b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h
@@ -54,6 +54,7 @@ QT_BEGIN_NAMESPACE
class QTriangulatingStroker
{
public:
+ QTriangulatingStroker() : m_vertices(0) {}
void process(const QVectorPath &path, const QPen &pen, const QRectF &clip);
inline int vertexCount() const { return m_vertices.size(); }
diff --git a/src/opengl/gl2paintengineex/qtriangulator.cpp b/src/opengl/gl2paintengineex/qtriangulator.cpp
index ce917ff..df7cbc2 100644
--- a/src/opengl/gl2paintengineex/qtriangulator.cpp
+++ b/src/opengl/gl2paintengineex/qtriangulator.cpp
@@ -510,6 +510,7 @@ template <class T>
class QMaxHeap
{
public:
+ QMaxHeap() : m_data(0) {}
inline int size() const {return m_data.size();}
inline bool empty() const {return m_data.isEmpty();}
inline bool isEmpty() const {return m_data.isEmpty();}
@@ -1299,7 +1300,8 @@ public:
class ComplexToSimple
{
public:
- inline ComplexToSimple(QTriangulator *parent) : m_parent(parent) { }
+ inline ComplexToSimple(QTriangulator *parent) : m_parent(parent),
+ m_edges(0), m_events(0), m_splits(0) { }
void decompose();
private:
struct Edge
@@ -1412,7 +1414,7 @@ public:
class SimpleToMonotone
{
public:
- inline SimpleToMonotone(QTriangulator *parent) : m_parent(parent) { }
+ inline SimpleToMonotone(QTriangulator *parent) : m_parent(parent), m_edges(0), m_upperVertex(0) { }
void decompose();
private:
enum VertexType {MergeVertex, EndVertex, RegularVertex, StartVertex, SplitVertex};
@@ -1486,7 +1488,7 @@ public:
int m_length;
};
- inline QTriangulator() { }
+ inline QTriangulator() : m_vertices(0) { }
// Call this only once.
void initialize(const qreal *polygon, int count, uint hint, const QTransform &matrix);
@@ -2709,7 +2711,7 @@ void QTriangulator::SimpleToMonotone::monotoneDecomposition()
return;
Q_ASSERT(!m_edgeList.root);
- QDataBuffer<QPair<int, int> > diagonals;
+ QDataBuffer<QPair<int, int> > diagonals(m_upperVertex.size());
int i = 0;
for (int index = 1; index < m_edges.size(); ++index) {
@@ -2853,7 +2855,7 @@ bool QTriangulator::SimpleToMonotone::CompareVertices::operator () (int i, int j
void QTriangulator::MonotoneToTriangles::decompose()
{
QVector<quint32> result;
- QDataBuffer<int> stack;
+ QDataBuffer<int> stack(m_parent->m_indices.size());
m_first = 0;
// Require at least three more indices.
while (m_first + 3 <= m_parent->m_indices.size()) {
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index cfacf26..922a96c 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1612,6 +1612,9 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format)
current_fbo = 0;
default_fbo = 0;
active_engine = 0;
+ workaround_needsFullClearOnEveryFrame = false;
+ workaround_brokenFBOReadBack = false;
+ workaroundsCached = false;
for (int i = 0; i < QT_GL_VERTEX_ARRAY_TRACKED_COUNT; ++i)
vertexAttributeArraysEnabledState[i] = false;
}
@@ -1723,7 +1726,6 @@ QGLTextureCache::QGLTextureCache()
QGLTextureCache::~QGLTextureCache()
{
- Q_ASSERT(size() == 0);
QImagePixmapCleanupHooks::instance()->removePixmapDataModificationHook(cleanupTexturesForPixampData);
QImagePixmapCleanupHooks::instance()->removePixmapDataDestructionHook(cleanupBeforePixmapDestruction);
QImagePixmapCleanupHooks::instance()->removeImageHook(cleanupTexturesForCacheKey);
@@ -2773,23 +2775,27 @@ static void qDrawTextureRect(const QRectF &target, GLint textureWidth, GLint tex
/*!
\since 4.4
- Draws the given texture, \a textureId, to the given target rectangle,
- \a target, in OpenGL model space. The \a textureTarget should be a 2D
- texture target.
+ This function supports the following use cases:
+
+ \list
+ \i On OpenGL and OpenGL ES 1.x it draws the given texture, \a textureId,
+ to the given target rectangle, \a target, in OpenGL model space. The
+ \a textureTarget should be a 2D texture target.
+ \i On OpenGL and OpenGL ES 2.x, if a painter is active, not inside a
+ beginNativePainting / endNativePainting block, and uses the
+ engine with type QPaintEngine::OpenGL2, the function will draw the given
+ texture, \a textureId, to the given target rectangle, \a target,
+ respecting the current painter state. This will let you draw a texture
+ with the clip, transform, render hints, and composition mode set by the
+ painter. Note that the texture target needs to be GL_TEXTURE_2D for this
+ use case, and that this is the only supported use case under OpenGL ES 2.x.
+ \endlist
- \note This function is not supported under OpenGL/ES 2.0.
*/
void QGLContext::drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget)
{
-#ifndef QT_OPENGL_ES_2
-#ifdef QT_OPENGL_ES
- if (textureTarget != GL_TEXTURE_2D) {
- qWarning("QGLContext::drawTexture(): texture target must be GL_TEXTURE_2D on OpenGL ES");
- return;
- }
-#else
-
- if (d_ptr->active_engine &&
+#if !defined(QT_OPENGL_ES) || defined(QT_OPENGL_ES_2)
+ if (d_ptr->active_engine &&
d_ptr->active_engine->type() == QPaintEngine::OpenGL2) {
QGL2PaintEngineEx *eng = static_cast<QGL2PaintEngineEx*>(d_ptr->active_engine);
if (!eng->isNativePaintingActive()) {
@@ -2799,7 +2805,15 @@ void QGLContext::drawTexture(const QRectF &target, GLuint textureId, GLenum text
return;
}
}
+#endif
+#ifndef QT_OPENGL_ES_2
+#ifdef QT_OPENGL_ES
+ if (textureTarget != GL_TEXTURE_2D) {
+ qWarning("QGLContext::drawTexture(): texture target must be GL_TEXTURE_2D on OpenGL ES");
+ return;
+ }
+#else
const bool wasEnabled = glIsEnabled(GL_TEXTURE_2D);
GLint oldTexture;
glGetIntegerv(GL_TEXTURE_BINDING_2D, &oldTexture);
@@ -2821,7 +2835,7 @@ void QGLContext::drawTexture(const QRectF &target, GLuint textureId, GLenum text
Q_UNUSED(target);
Q_UNUSED(textureId);
Q_UNUSED(textureTarget);
- qWarning("drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget) not supported with OpenGL ES/2.0");
+ qWarning("drawTexture() with OpenGL ES 2.0 requires an active OpenGL2 paint engine");
#endif
}
@@ -2836,14 +2850,26 @@ void QGLContext::drawTexture(const QRectF &target, QMacCompatGLuint textureId, Q
/*!
\since 4.4
- Draws the given texture at the given \a point in OpenGL model
- space. The \a textureTarget should be a 2D texture target.
+ This function supports the following use cases:
+
+ \list
+ \i By default it draws the given texture, \a textureId,
+ at the given \a point in OpenGL model space. The
+ \a textureTarget should be a 2D texture target.
+ \i If a painter is active, not inside a
+ beginNativePainting / endNativePainting block, and uses the
+ engine with type QPaintEngine::OpenGL2, the function will draw the given
+ texture, \a textureId, at the given \a point,
+ respecting the current painter state. This will let you draw a texture
+ with the clip, transform, render hints, and composition mode set by the
+ painter. Note that the texture target needs to be GL_TEXTURE_2D for this
+ use case.
+ \endlist
- \note This function is not supported under OpenGL/ES.
+ \note This function is not supported under any version of OpenGL ES.
*/
void QGLContext::drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget)
{
- // this would be ok on OpenGL ES 2.0, but currently we don't have a define for that
#ifdef QT_OPENGL_ES
Q_UNUSED(point);
Q_UNUSED(textureId);
@@ -2864,7 +2890,7 @@ void QGLContext::drawTexture(const QPointF &point, GLuint textureId, GLenum text
glGetTexLevelParameteriv(textureTarget, 0, GL_TEXTURE_WIDTH, &textureWidth);
glGetTexLevelParameteriv(textureTarget, 0, GL_TEXTURE_HEIGHT, &textureHeight);
- if (d_ptr->active_engine &&
+ if (d_ptr->active_engine &&
d_ptr->active_engine->type() == QPaintEngine::OpenGL2) {
QGL2PaintEngineEx *eng = static_cast<QGL2PaintEngineEx*>(d_ptr->active_engine);
if (!eng->isNativePaintingActive()) {
@@ -4911,11 +4937,8 @@ void QGLWidget::deleteTexture(QMacCompatGLuint id)
/*!
\since 4.4
- Draws the given texture, \a textureId to the given target rectangle,
- \a target, in OpenGL model space. The \a textureTarget should be a 2D
- texture target.
-
- Equivalent to the corresponding QGLContext::drawTexture().
+ Calls the corresponding QGLContext::drawTexture() on
+ this widget's context.
*/
void QGLWidget::drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget)
{
@@ -4935,10 +4958,8 @@ void QGLWidget::drawTexture(const QRectF &target, QMacCompatGLuint textureId, QM
/*!
\since 4.4
- Draws the given texture, \a textureId, at the given \a point in OpenGL
- model space. The \a textureTarget should be a 2D texture target.
-
- Equivalent to the corresponding QGLContext::drawTexture().
+ Calls the corresponding QGLContext::drawTexture() on
+ this widget's context.
*/
void QGLWidget::drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget)
{
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index 92a064f..f297009 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -431,6 +431,7 @@ private:
friend class QGLFramebufferObjectPrivate;
friend class QGLFBOGLPaintDevice;
friend class QGLPaintDevice;
+ friend class QGLWidgetGLPaintDevice;
friend class QX11GLPixmapData;
friend class QX11GLSharedContexts;
private:
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 0fbbbf9..44e8ae9 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -185,8 +185,26 @@ void QGLContext::makeCurrent()
return;
}
- if (d->eglContext->makeCurrent(d->eglSurfaceForDevice()))
+ if (d->eglContext->makeCurrent(d->eglSurfaceForDevice())) {
QGLContextPrivate::setCurrentContext(this);
+ if (!d->workaroundsCached) {
+ d->workaroundsCached = true;
+ const char *renderer = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
+ if (strstr(renderer, "SGX") || strstr(renderer, "MBX")) {
+ // 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.
+ d->workaround_needsFullClearOnEveryFrame = true;
+
+ // Older PowerVR SGX drivers (like the one in the N900) have a
+ // bug which prevents glCopyTexSubImage2D() to work with a POT
+ // or GL_ALPHA texture bound to an FBO. The only way to
+ // identify that driver is to check the EGL version number for it.
+ if (strstr(eglQueryString(d->eglContext->display(), EGL_VERSION), "1.3"))
+ d->workaround_brokenFBOReadBack = true;
+ }
+ }
+ }
}
void QGLContext::doneCurrent()
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index f19e394..d92f963 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -345,7 +345,7 @@ public:
HDC hbitmap_hdc;
#endif
#ifndef QT_NO_EGL
- bool ownsEglContext;
+ uint ownsEglContext : 1;
QEglContext *eglContext;
EGLSurface eglSurface;
void destroyEglSurfaceForDevice();
@@ -382,6 +382,12 @@ public:
uint internal_context : 1;
uint version_flags_cached : 1;
uint extension_flags_cached : 1;
+
+ // workarounds for driver/hw bugs on different platforms
+ uint workaround_needsFullClearOnEveryFrame : 1;
+ uint workaround_brokenFBOReadBack : 1;
+ uint workaroundsCached : 1;
+
QPaintDevice *paintDevice;
QColor transpColor;
QGLContext *q_ptr;
diff --git a/src/opengl/qglpaintdevice.cpp b/src/opengl/qglpaintdevice.cpp
index e874e85..e1dcbfd 100644
--- a/src/opengl/qglpaintdevice.cpp
+++ b/src/opengl/qglpaintdevice.cpp
@@ -175,7 +175,10 @@ void QGLWidgetGLPaintDevice::beginPaint()
float alpha = c.alphaF();
glClearColor(c.redF() * alpha, c.greenF() * alpha, c.blueF() * alpha, alpha);
}
- glClear(GL_COLOR_BUFFER_BIT);
+ if (context()->d_func()->workaround_needsFullClearOnEveryFrame)
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+ else
+ glClear(GL_COLOR_BUFFER_BIT);
}
}
diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp
index d5a11d9..bfa5ef1 100644
--- a/src/opengl/qglpixmapfilter.cpp
+++ b/src/opengl/qglpixmapfilter.cpp
@@ -591,10 +591,11 @@ bool QGLPixmapDropShadowFilter::processGL(QPainter *painter, const QPointF &pos,
qt_blurImage(image, r * qreal(0.5), false, 1);
- GLuint texture = generateBlurTexture(image.size(), GL_ALPHA);
-
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, image.width(), image.height(), GL_ALPHA,
- GL_UNSIGNED_BYTE, image.bits());
+ GLuint texture;
+ glGenTextures(1, &texture);
+ glBindTexture(GL_TEXTURE_2D, texture);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, image.width(), image.height(),
+ 0, GL_ALPHA, GL_UNSIGNED_BYTE, image.bits());
info = new QGLBlurTextureInfo(image, texture, r);
}
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 306fd8b..28d37bc 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -668,6 +668,7 @@ public:
, last_created_state(0)
, shader_ctx(0)
, grad_palette(0)
+ , tess_points(0)
, drawable_texture(0)
, ref_cleaner(this)
{}
@@ -1450,6 +1451,11 @@ bool QOpenGLPaintEngine::end()
d->device->endPaint();
qt_mask_texture_cache()->maintainCache();
+#if defined(Q_WS_X11)
+ // clear out the references we hold for textures bound with the
+ // texture_from_pixmap extension
+ ctx->d_func()->boundPixmaps.clear();
+#endif
return true;
}
@@ -1950,6 +1956,8 @@ void QOpenGLPaintEnginePrivate::pathToVertexArrays(const QPainterPath &path)
void QOpenGLPaintEnginePrivate::drawVertexArrays()
{
+ if (tess_points_stops.count() == 0)
+ return;
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(2, GL_DOUBLE, 0, tess_points.data());
int previous_stop = 0;
@@ -3947,7 +3955,7 @@ void QOpenGLPaintEnginePrivate::strokeLines(const QPainterPath &path)
enableClipping();
}
-extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
+Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
void QOpenGLPaintEnginePrivate::strokePath(const QPainterPath &path, bool use_cache)
{
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index f602c73..76a605a 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -119,6 +119,35 @@ private:
class QVGPaintEnginePrivate : public QPaintEngineExPrivate
{
public:
+ // Extra blending modes from VG_KHR_advanced_blending extension.
+ // Use the QT_VG prefix to avoid conflicts with any definitions
+ // that may come in via <VG/vgext.h>.
+ enum AdvancedBlending {
+ QT_VG_BLEND_OVERLAY_KHR = 0x2010,
+ QT_VG_BLEND_HARDLIGHT_KHR = 0x2011,
+ QT_VG_BLEND_SOFTLIGHT_SVG_KHR = 0x2012,
+ QT_VG_BLEND_SOFTLIGHT_KHR = 0x2013,
+ QT_VG_BLEND_COLORDODGE_KHR = 0x2014,
+ QT_VG_BLEND_COLORBURN_KHR = 0x2015,
+ QT_VG_BLEND_DIFFERENCE_KHR = 0x2016,
+ QT_VG_BLEND_SUBTRACT_KHR = 0x2017,
+ QT_VG_BLEND_INVERT_KHR = 0x2018,
+ QT_VG_BLEND_EXCLUSION_KHR = 0x2019,
+ QT_VG_BLEND_LINEARDODGE_KHR = 0x201a,
+ QT_VG_BLEND_LINEARBURN_KHR = 0x201b,
+ QT_VG_BLEND_VIVIDLIGHT_KHR = 0x201c,
+ QT_VG_BLEND_LINEARLIGHT_KHR = 0x201d,
+ QT_VG_BLEND_PINLIGHT_KHR = 0x201e,
+ QT_VG_BLEND_HARDMIX_KHR = 0x201f,
+ QT_VG_BLEND_CLEAR_KHR = 0x2020,
+ QT_VG_BLEND_DST_KHR = 0x2021,
+ QT_VG_BLEND_SRC_OUT_KHR = 0x2022,
+ QT_VG_BLEND_DST_OUT_KHR = 0x2023,
+ QT_VG_BLEND_SRC_ATOP_KHR = 0x2024,
+ QT_VG_BLEND_DST_ATOP_KHR = 0x2025,
+ QT_VG_BLEND_XOR_KHR = 0x2026
+ };
+
QVGPaintEnginePrivate();
~QVGPaintEnginePrivate();
@@ -216,6 +245,8 @@ public:
QVGFontEngineCleaner *fontEngineCleaner;
#endif
+ bool hasAdvancedBlending;
+
QScopedPointer<QPixmapFilter> convolutionFilter;
QScopedPointer<QPixmapFilter> colorizeFilter;
QScopedPointer<QPixmapFilter> dropShadowFilter;
@@ -369,6 +400,8 @@ void QVGPaintEnginePrivate::init()
fontEngineCleaner = 0;
#endif
+ hasAdvancedBlending = false;
+
clearModes();
}
@@ -445,6 +478,10 @@ void QVGPaintEnginePrivate::initObjects()
VG_PATH_CAPABILITY_ALL);
vgAppendPathData(linePath, 2, segments, coords);
#endif
+
+ const char *extensions = reinterpret_cast<const char *>(vgGetString(VG_EXTENSIONS));
+ if (extensions)
+ hasAdvancedBlending = strstr(extensions, "VG_KHR_advanced_blending") != 0;
}
void QVGPaintEnginePrivate::destroy()
@@ -2288,7 +2325,7 @@ void QVGPaintEngine::compositionModeChanged()
Q_D(QVGPaintEngine);
d->dirty |= QPaintEngine::DirtyCompositionMode;
- VGBlendMode vgMode = VG_BLEND_SRC_OVER;
+ VGint vgMode = VG_BLEND_SRC_OVER;
switch (state()->composition_mode) {
case QPainter::CompositionMode_SourceOver:
@@ -2322,11 +2359,53 @@ void QVGPaintEngine::compositionModeChanged()
vgMode = VG_BLEND_LIGHTEN;
break;
default:
- qWarning() << "QVGPaintEngine::compositionModeChanged unsupported mode" << state()->composition_mode;
- break; // Fall back to VG_BLEND_SRC_OVER.
+ if (d->hasAdvancedBlending) {
+ switch (state()->composition_mode) {
+ case QPainter::CompositionMode_Overlay:
+ vgMode = QVGPaintEnginePrivate::QT_VG_BLEND_OVERLAY_KHR;
+ break;
+ case QPainter::CompositionMode_ColorDodge:
+ vgMode = QVGPaintEnginePrivate::QT_VG_BLEND_COLORDODGE_KHR;
+ break;
+ case QPainter::CompositionMode_ColorBurn:
+ vgMode = QVGPaintEnginePrivate::QT_VG_BLEND_COLORBURN_KHR;
+ break;
+ case QPainter::CompositionMode_HardLight:
+ vgMode = QVGPaintEnginePrivate::QT_VG_BLEND_HARDLIGHT_KHR;
+ break;
+ case QPainter::CompositionMode_SoftLight:
+ vgMode = QVGPaintEnginePrivate::QT_VG_BLEND_SOFTLIGHT_KHR;
+ break;
+ case QPainter::CompositionMode_Difference:
+ vgMode = QVGPaintEnginePrivate::QT_VG_BLEND_DIFFERENCE_KHR;
+ break;
+ case QPainter::CompositionMode_Exclusion:
+ vgMode = QVGPaintEnginePrivate::QT_VG_BLEND_EXCLUSION_KHR;
+ break;
+ case QPainter::CompositionMode_SourceOut:
+ vgMode = QVGPaintEnginePrivate::QT_VG_BLEND_SRC_OUT_KHR;
+ break;
+ case QPainter::CompositionMode_DestinationOut:
+ vgMode = QVGPaintEnginePrivate::QT_VG_BLEND_DST_OUT_KHR;
+ break;
+ case QPainter::CompositionMode_SourceAtop:
+ vgMode = QVGPaintEnginePrivate::QT_VG_BLEND_SRC_ATOP_KHR;
+ break;
+ case QPainter::CompositionMode_DestinationAtop:
+ vgMode = QVGPaintEnginePrivate::QT_VG_BLEND_DST_ATOP_KHR;
+ break;
+ case QPainter::CompositionMode_Xor:
+ vgMode = QVGPaintEnginePrivate::QT_VG_BLEND_XOR_KHR;
+ break;
+ default: break; // Fall back to VG_BLEND_SRC_OVER.
+ }
+ }
+ if (vgMode == VG_BLEND_SRC_OVER)
+ qWarning() << "QVGPaintEngine::compositionModeChanged unsupported mode" << state()->composition_mode;
+ break;
}
- d->setBlendMode(vgMode);
+ d->setBlendMode(VGBlendMode(vgMode));
}
void QVGPaintEngine::renderHintsChanged()
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index 1b9c8cc..3cd18fb 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -53,15 +53,17 @@
QT_BEGIN_NAMESPACE
QNetworkSessionPrivateImpl::QNetworkSessionPrivateImpl(SymbianEngine *engine)
- : CActive(CActive::EPriorityStandard), engine(engine), ipConnectionNotifier(0),
- iError(QNetworkSession::UnknownSessionError),
- iALREnabled(0), iConnectInBackground(false)
+ : CActive(CActive::EPriorityUserInput), engine(engine),
+ ipConnectionNotifier(0), iHandleStateNotificationsFromManager(false),
+ iFirstSync(true), iStoppedByUser(false), iClosedByUser(false), iDeprecatedConnectionId(0),
+ iError(QNetworkSession::UnknownSessionError), iALREnabled(0), iConnectInBackground(false)
{
CActiveScheduler::Add(this);
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
iMobility = NULL;
#endif
+
TRAP_IGNORE(iConnectionMonitor.ConnectL());
}
@@ -90,18 +92,72 @@ QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl()
// Close global 'Open C' RConnection
setdefaultif(0);
-
- iConnectionMonitor.CancelNotifications();
+
iConnectionMonitor.Close();
}
+void QNetworkSessionPrivateImpl::configurationStateChanged(TUint32 accessPointId, TUint32 connMonId, QNetworkSession::State newState)
+{
+ if (iHandleStateNotificationsFromManager) {
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "configurationStateChanged from manager for IAP : " << QString::number(accessPointId)
+ << "configurationStateChanged connMon ID : " << QString::number(connMonId)
+ << " : to a state: " << newState
+ << " whereas my current state is: " << state;
+#endif
+ if (connMonId == iDeprecatedConnectionId) {
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "however status update from manager ignored because it related to already closed connection.";
+#endif
+ return;
+ }
+ this->newState(newState, accessPointId);
+ }
+}
+
+void QNetworkSessionPrivateImpl::configurationRemoved(QNetworkConfigurationPrivatePointer config)
+{
+ if (!publicConfig.isValid())
+ return;
+
+ SymbianNetworkConfigurationPrivate *symbianConfig = toSymbianConfig(config);
+
+ symbianConfig->mutex.lock();
+ TUint32 configNumericId = symbianConfig->numericId;
+ symbianConfig->mutex.unlock();
+
+ symbianConfig = toSymbianConfig(privateConfiguration(publicConfig));
+
+ symbianConfig->mutex.lock();
+ TUint32 publicNumericId = symbianConfig->numericId;
+ symbianConfig->mutex.unlock();
+
+ if (configNumericId == publicNumericId) {
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "configurationRemoved IAP: " << QString::number(publicNumericId) << " : going to State: Invalid";
+#endif
+ this->newState(QNetworkSession::Invalid, publicNumericId);
+ }
+}
+
void QNetworkSessionPrivateImpl::syncStateWithInterface()
{
if (!publicConfig.isValid())
return;
- // Start monitoring changes in IAP states
- TRAP_IGNORE(iConnectionMonitor.NotifyEventL(*this));
+ if (iFirstSync && publicConfig.isValid()) {
+ QObject::connect(engine, SIGNAL(configurationStateChanged(TUint32, TUint32, QNetworkSession::State)),
+ this, SLOT(configurationStateChanged(TUint32, TUint32, QNetworkSession::State)));
+ // Listen to configuration removals, so that in case the configuration
+ // this session is based on is removed, session knows to enter Invalid -state.
+ QObject::connect(engine, SIGNAL(configurationRemoved(QNetworkConfigurationPrivatePointer)),
+ this, SLOT(configurationRemoved(QNetworkConfigurationPrivatePointer)));
+ }
+ // Start listening IAP state changes from QNetworkConfigurationManagerPrivate
+ iHandleStateNotificationsFromManager = true;
// Check open connections to see if there is already
// an open connection to selected IAP or SNAP
@@ -137,11 +193,8 @@ void QNetworkSessionPrivateImpl::syncStateWithInterface()
}
if (state != QNetworkSession::Connected) {
- // There were no open connections to used IAP or SNAP
- if (iError == QNetworkSession::InvalidConfigurationError) {
- newState(QNetworkSession::Invalid);
- } else if ((publicConfig.state() & QNetworkConfiguration::Discovered) ==
- QNetworkConfiguration::Discovered) {
+ if ((publicConfig.state() & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
newState(QNetworkSession::Disconnected);
} else {
newState(QNetworkSession::NotAvailable);
@@ -245,13 +298,18 @@ QNetworkSession::SessionError QNetworkSessionPrivateImpl::error() const
void QNetworkSessionPrivateImpl::open()
{
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "open() called, session state is: " << state << " and isOpen is: "
+ << isOpen;
+#endif
if (isOpen || (state == QNetworkSession::Connecting)) {
return;
}
-
- // Cancel notifications from RConnectionMonitor
+
+ // Stop handling IAP state change signals from QNetworkConfigurationManagerPrivate
// => RConnection::ProgressNotification will be used for IAP/SNAP monitoring
- iConnectionMonitor.CancelNotifications();
+ iHandleStateNotificationsFromManager = false;
// Configuration may have been invalidated after session creation by platform
// (e.g. configuration has been deleted).
@@ -259,19 +317,25 @@ void QNetworkSessionPrivateImpl::open()
newState(QNetworkSession::Invalid);
iError = QNetworkSession::InvalidConfigurationError;
emit QNetworkSessionPrivate::error(iError);
- syncStateWithInterface();
return;
}
- // If opening a (un)defined configuration, session emits error and enters
- // NotAvailable -state.
- if (publicConfig.state() == QNetworkConfiguration::Undefined ||
- publicConfig.state() == QNetworkConfiguration::Defined) {
+ // If opening a undefined configuration, session emits error and enters
+ // NotAvailable -state. Note that we will try ones in 'defined' state to avoid excessive
+ // need for WLAN scans (via updateConfigurations()), because user may have walked
+ // into a WLAN range, but periodic background scan has not occurred yet -->
+ // we don't want to force application to make frequent updateConfigurations() calls
+ // to be able to try if e.g. home WLAN is available.
+ if (publicConfig.state() == QNetworkConfiguration::Undefined) {
newState(QNetworkSession::NotAvailable);
iError = QNetworkSession::InvalidConfigurationError;
emit QNetworkSessionPrivate::error(iError);
return;
}
-
+ // Clear possible previous states
+ iStoppedByUser = false;
+ iClosedByUser = false;
+ iDeprecatedConnectionId = 0;
+
TInt error = iSocketServ.Connect();
if (error != KErrNone) {
// Could not open RSocketServ
@@ -446,16 +510,18 @@ TUint QNetworkSessionPrivateImpl::iapClientCount(TUint aIAPId) const
void QNetworkSessionPrivateImpl::close(bool allowSignals)
{
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "close() called, session state is: " << state << " and isOpen is : "
+ << isOpen;
+#endif
if (!isOpen) {
return;
}
-
- SymbianNetworkConfigurationPrivate *symbianConfig =
- toSymbianConfig(privateConfiguration(activeConfig));
-
- symbianConfig->mutex.lock();
- TUint activeIap = symbianConfig->numericId;
- symbianConfig->mutex.unlock();
+ // Mark this session as closed-by-user so that we are able to report
+ // distinguish between stop() and close() state transitions
+ // when reporting.
+ iClosedByUser = true;
isOpen = false;
activeConfig = QNetworkConfiguration();
@@ -469,8 +535,10 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals)
}
#endif
- if (ipConnectionNotifier) {
+ if (ipConnectionNotifier && !iHandleStateNotificationsFromManager) {
ipConnectionNotifier->StopNotifications();
+ // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
+ iHandleStateNotificationsFromManager = true;
}
iConnection.Close();
@@ -479,29 +547,31 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals)
// Close global 'Open C' RConnection
setdefaultif(0);
-#ifdef Q_CC_NOKIAX86
- if ((allowSignals && iapClientCount(activeIap) <= 0) ||
-#else
- if ((allowSignals && iapClientCount(activeIap) <= 1) ||
-#endif
- (publicConfig.type() == QNetworkConfiguration::UserChoice)) {
+ if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
newState(QNetworkSession::Closing);
+ newState(QNetworkSession::Disconnected);
}
- syncStateWithInterface();
if (allowSignals) {
- if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
- newState(QNetworkSession::Disconnected);
- }
emit closed();
}
}
void QNetworkSessionPrivateImpl::stop()
{
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "stop() called, session state is: " << state << " and isOpen is : "
+ << isOpen;
+#endif
if (!isOpen &&
publicConfig.isValid() &&
publicConfig.type() == QNetworkConfiguration::InternetAccessPoint) {
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "since session is not open, using RConnectionMonitor to stop() the interface";
+#endif
+ iStoppedByUser = true;
// If the publicConfig is type of IAP, enumerate through connections at
// connection monitor. If publicConfig is active in that list, stop it.
// Otherwise there is nothing to stop. Note: because this QNetworkSession is not open,
@@ -515,7 +585,7 @@ void QNetworkSessionPrivateImpl::stop()
}
TUint numSubConnections; // Not used but needed by GetConnectionInfo i/f
TUint connectionId;
- for (TInt i = 1; i <= count; ++i) {
+ for (TUint i = 1; i <= count; ++i) {
// Get (connection monitor's assigned) connection ID
TInt ret = iConnectionMonitor.GetConnectionInfo(i, connectionId, numSubConnections);
if (ret == KErrNone) {
@@ -532,11 +602,25 @@ void QNetworkSessionPrivateImpl::stop()
ETrue);
}
}
+ // Enter disconnected state right away since the session is not even open.
+ // Symbian^3 connection monitor does not emit KLinkLayerClosed when
+ // connection is stopped via connection monitor.
+ newState(QNetworkSession::Disconnected);
}
} else if (isOpen) {
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "since session is open, using RConnection to stop() the interface";
+#endif
// Since we are open, use RConnection to stop the interface
isOpen = false;
+ iStoppedByUser = true;
newState(QNetworkSession::Closing);
+ if (ipConnectionNotifier) {
+ ipConnectionNotifier->StopNotifications();
+ // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
+ iHandleStateNotificationsFromManager = true;
+ }
iConnection.Stop(RConnection::EStopAuthoritative);
isOpen = true;
close(false);
@@ -654,6 +738,10 @@ void QNetworkSessionPrivateImpl::NewCarrierActive(TAccessPointInfo /*aNewAPInfo*
void QNetworkSessionPrivateImpl::Error(TInt /*aError*/)
{
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "roaming Error() occured";
+#endif
if (isOpen) {
isOpen = false;
activeConfig = QNetworkConfiguration();
@@ -671,6 +759,11 @@ void QNetworkSessionPrivateImpl::Error(TInt /*aError*/)
// changes immediately to Disconnected.
newState(QNetworkSession::Disconnected);
emit closed();
+ } else if (iStoppedByUser) {
+ // If the user of this session has called the stop() and
+ // configuration is based on internet SNAP, this needs to be
+ // done here because platform might roam.
+ newState(QNetworkSession::Disconnected);
}
}
#endif
@@ -947,7 +1040,7 @@ void QNetworkSessionPrivateImpl::RunL()
#endif
if (publicConfig.type() == QNetworkConfiguration::UserChoice) {
serviceConfig = QNetworkConfigurationManager()
- .configurationFromIdentifier(symbianConfig->serviceNetworkPtr->id);
+ .configurationFromIdentifier(symbianConfig->id);
}
symbianConfig->mutex.unlock();
@@ -975,7 +1068,12 @@ void QNetworkSessionPrivateImpl::RunL()
isOpen = false;
activeConfig = QNetworkConfiguration();
serviceConfig = QNetworkConfiguration();
- iError = QNetworkSession::UnknownSessionError;
+ if (publicConfig.state() == QNetworkConfiguration::Undefined ||
+ publicConfig.state() == QNetworkConfiguration::Defined) {
+ iError = QNetworkSession::InvalidConfigurationError;
+ } else {
+ iError = QNetworkSession::UnknownSessionError;
+ }
emit QNetworkSessionPrivate::error(iError);
Cancel();
if (ipConnectionNotifier) {
@@ -991,8 +1089,16 @@ void QNetworkSessionPrivateImpl::DoCancel()
iConnection.Close();
}
+// Enters newState if feasible according to current state.
+// AccessPointId may be given as parameter. If it is zero, state-change is assumed to
+// concern this session's configuration. If non-zero, the configuration is looked up
+// and checked if it matches the configuration this session is based on.
bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint accessPointId)
{
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "NEW STATE, IAP ID : " << QString::number(accessPointId) << " , newState : " << QString::number(newState);
+#endif
// Make sure that activeConfig is always updated when SNAP is signaled to be
// connected.
if (isOpen && publicConfig.type() == QNetworkConfiguration::ServiceNetwork &&
@@ -1027,9 +1133,29 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
if (state == QNetworkSession::Roaming && newState == QNetworkSession::Connecting) {
return false;
}
+
+ // Make sure that Connected state is not reported when Connection is
+ // already Closing.
+ // Note: Stopping connection results sometimes KLinkLayerOpen
+ // to be reported first (just before KLinkLayerClosed).
+ if (state == QNetworkSession::Closing && newState == QNetworkSession::Connected) {
+ return false;
+ }
+
+ // Make sure that some lagging 'closing' state-changes do not overwrite
+ // if we are already disconnected or closed.
+ if (state == QNetworkSession::Disconnected && newState == QNetworkSession::Closing) {
+ return false;
+ }
bool emitSessionClosed = false;
- if (isOpen && state == QNetworkSession::Connected && newState == QNetworkSession::Disconnected) {
+
+ // If we abruptly go down and user hasn't closed the session, we've been aborted.
+ // Note that session may be in 'closing' state and not in 'connected' state, because
+ // depending on platform the platform may report KConfigDaemonStartingDeregistration
+ // event before KLinkLayerClosed
+ if ((isOpen && state == QNetworkSession::Connected && newState == QNetworkSession::Disconnected) ||
+ (isOpen && !iClosedByUser && newState == QNetworkSession::Disconnected)) {
// Active & Connected state should change directly to Disconnected state
// only when something forces connection to close (eg. when another
// application or session stops connection or when network drops
@@ -1043,14 +1169,17 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
if (ipConnectionNotifier) {
ipConnectionNotifier->StopNotifications();
}
- // Start monitoring changes in IAP states
- TRAP_IGNORE(iConnectionMonitor.NotifyEventL(*this));
+ // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate
+ iHandleStateNotificationsFromManager = true;
emitSessionClosed = true; // Emit SessionClosed after state change has been reported
}
bool retVal = false;
if (accessPointId == 0) {
state = newState;
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed A to: " << state;
+#endif
emit stateChanged(state);
retVal = true;
} else {
@@ -1063,6 +1192,9 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
configLocker.unlock();
state = newState;
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed B to: " << state;
+#endif
emit stateChanged(state);
retVal = true;
}
@@ -1075,6 +1207,9 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
configLocker.unlock();
state = newState;
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed C to: " << state;
+#endif
emit stateChanged(state);
retVal = true;
}
@@ -1087,21 +1222,14 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
QMutexLocker configLocker(&symbianConfig->mutex);
if (symbianConfig->numericId == accessPointId) {
- if (newState == QNetworkSession::Connected) {
- // Make sure that when AccessPoint is reported to be Connected
- // also state of the related configuration changes to Active.
- symbianConfig->state = QNetworkConfiguration::Active;
- configLocker.unlock();
-
+ if (newState != QNetworkSession::Disconnected) {
state = newState;
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed D to: " << state;
+#endif
emit stateChanged(state);
retVal = true;
} else {
- if (newState == QNetworkSession::Disconnected) {
- // Make sure that when AccessPoint is reported to be disconnected
- // also state of the related configuration changes from Active to Defined.
- symbianConfig->state = QNetworkConfiguration::Defined;
- }
QNetworkConfiguration config = bestConfigFromSNAP(publicConfig);
if ((config.state() == QNetworkConfiguration::Defined) ||
(config.state() == QNetworkConfiguration::Discovered)) {
@@ -1109,8 +1237,21 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
configLocker.unlock();
state = newState;
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed E to: " << state;
+#endif
emit stateChanged(state);
retVal = true;
+ } else if (config.state() == QNetworkConfiguration::Active) {
+ // Connection to used IAP was closed, but there is another
+ // IAP that's active in used SNAP
+ // => Change state back to Connected
+ state = QNetworkSession::Connected;
+ emit stateChanged(state);
+ retVal = true;
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed F to: " << state;
+#endif
}
}
}
@@ -1121,6 +1262,19 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
if (emitSessionClosed) {
emit closed();
}
+ if (state == QNetworkSession::Disconnected) {
+ // The connection has gone down, and processing of status updates must be
+ // stopped. Depending on platform, there may come 'connecting/connected' states
+ // considerably later (almost a second). Connection id is an increasing
+ // number, so this does not affect next _real_ 'conneting/connected' states.
+
+ SymbianNetworkConfigurationPrivate *symbianConfig =
+ toSymbianConfig(privateConfiguration(publicConfig));
+
+ symbianConfig->mutex.lock();
+ iDeprecatedConnectionId = symbianConfig->connectionId;
+ symbianConfig->mutex.unlock();
+ }
return retVal;
}
@@ -1129,6 +1283,9 @@ void QNetworkSessionPrivateImpl::handleSymbianConnectionStatusChange(TInt aConne
TInt aError,
TUint accessPointId)
{
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - " << QString::number(accessPointId) << " , status : " << QString::number(aConnectionStatus);
+#endif
switch (aConnectionStatus)
{
// Connection unitialised
@@ -1167,6 +1324,7 @@ void QNetworkSessionPrivateImpl::handleSymbianConnectionStatusChange(TInt aConne
case KCsdGotLoginInfo:
break;
+ case KConfigDaemonStartingRegistration:
// Creating connection (e.g. GPRS activation)
case KCsdStartingConnect:
case KCsdFinishedConnect:
@@ -1193,6 +1351,7 @@ void QNetworkSessionPrivateImpl::handleSymbianConnectionStatusChange(TInt aConne
case KDataTransferTemporarilyBlocked:
break;
+ case KConfigDaemonStartingDeregistration:
// Hangup or GRPS deactivation
case KConnectionStartingClose:
newState(QNetworkSession::Closing,accessPointId);
@@ -1200,137 +1359,27 @@ void QNetworkSessionPrivateImpl::handleSymbianConnectionStatusChange(TInt aConne
// Connection closed
case KConnectionClosed:
- break;
-
case KLinkLayerClosed:
newState(QNetworkSession::Disconnected,accessPointId);
+ // Report manager about this to make sure this event
+ // is received by all interseted parties (mediated by
+ // manager because it does always receive all events from
+ // connection monitor).
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "reporting disconnection to manager.";
+#endif
+ if (publicConfig.isValid()) {
+ engine->configurationStateChangeReport(toSymbianConfig(privateConfiguration(publicConfig))->numericId, QNetworkSession::Disconnected);
+ }
break;
-
// Unhandled state
default:
break;
}
}
-void QNetworkSessionPrivateImpl::EventL(const CConnMonEventBase& aEvent)
-{
- switch (aEvent.EventType())
- {
- case EConnMonConnectionStatusChange:
- {
- CConnMonConnectionStatusChange* realEvent;
- realEvent = (CConnMonConnectionStatusChange*) &aEvent;
-
- TUint connectionId = realEvent->ConnectionId();
- TInt connectionStatus = realEvent->ConnectionStatus();
-
- // Try to Find IAP Id using connection Id
- TUint apId = 0;
- if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
- QList<QNetworkConfiguration> subConfigurations = publicConfig.children();
- for (int i = 0; i < subConfigurations.count(); i++ ) {
- SymbianNetworkConfigurationPrivate *symbianConfig =
- toSymbianConfig(privateConfiguration(subConfigurations[i]));
-
- QMutexLocker configLocker(&symbianConfig->mutex);
-
- if (symbianConfig->connectionId == connectionId) {
- apId = symbianConfig->numericId;
- break;
- }
- }
- } else if (publicConfig.type() == QNetworkConfiguration::InternetAccessPoint) {
- SymbianNetworkConfigurationPrivate *symbianConfig =
- toSymbianConfig(privateConfiguration(publicConfig));
-
- symbianConfig->mutex.lock();
- if (symbianConfig->connectionId == connectionId)
- apId = symbianConfig->numericId;
- symbianConfig->mutex.unlock();
- }
-
- if (apId > 0) {
- handleSymbianConnectionStatusChange(connectionStatus, KErrNone, apId);
- }
- }
- break;
-
- case EConnMonCreateConnection:
- {
- CConnMonCreateConnection* realEvent;
- realEvent = (CConnMonCreateConnection*) &aEvent;
- TUint apId;
- TUint connectionId = realEvent->ConnectionId();
- TRequestStatus status;
- iConnectionMonitor.GetUintAttribute(connectionId, 0, KIAPId, apId, status);
- User::WaitForRequest(status);
- if (status.Int() == KErrNone) {
- // Store connection id to related AccessPoint Configuration
- if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
- QList<QNetworkConfiguration> subConfigurations = publicConfig.children();
- for (int i = 0; i < subConfigurations.count(); i++ ) {
- SymbianNetworkConfigurationPrivate *symbianConfig =
- toSymbianConfig(privateConfiguration(subConfigurations[i]));
-
- QMutexLocker configLocker(&symbianConfig->mutex);
-
- if (symbianConfig->numericId == apId) {
- symbianConfig->connectionId = connectionId;
- break;
- }
- }
- } else if (publicConfig.type() == QNetworkConfiguration::InternetAccessPoint) {
- SymbianNetworkConfigurationPrivate *symbianConfig =
- toSymbianConfig(privateConfiguration(publicConfig));
-
- symbianConfig->mutex.lock();
- if (symbianConfig->numericId == apId)
- symbianConfig->connectionId = connectionId;
- symbianConfig->mutex.unlock();
- }
- }
- }
- break;
-
- case EConnMonDeleteConnection:
- {
- CConnMonDeleteConnection* realEvent;
- realEvent = (CConnMonDeleteConnection*) &aEvent;
- TUint connectionId = realEvent->ConnectionId();
- // Remove connection id from related AccessPoint Configuration
- if (publicConfig.type() == QNetworkConfiguration::ServiceNetwork) {
- QList<QNetworkConfiguration> subConfigurations = publicConfig.children();
- for (int i = 0; i < subConfigurations.count(); i++ ) {
- SymbianNetworkConfigurationPrivate *symbianConfig =
- toSymbianConfig(privateConfiguration(subConfigurations[i]));
-
- QMutexLocker configLocker(&symbianConfig->mutex);
-
- if (symbianConfig->connectionId == connectionId) {
- symbianConfig->connectionId = 0;
- break;
- }
- }
- } else if (publicConfig.type() == QNetworkConfiguration::InternetAccessPoint) {
- SymbianNetworkConfigurationPrivate *symbianConfig =
- toSymbianConfig(privateConfiguration(publicConfig));
-
- symbianConfig->mutex.lock();
- if (symbianConfig->connectionId == connectionId)
- symbianConfig->connectionId = 0;
- symbianConfig->mutex.unlock();
- }
- }
- break;
-
- default:
- // For unrecognized events
- break;
- }
-}
-
-ConnectionProgressNotifier::ConnectionProgressNotifier(QNetworkSessionPrivateImpl &owner, RConnection &connection)
- : CActive(CActive::EPriorityStandard), iOwner(owner), iConnection(connection)
+ConnectionProgressNotifier::ConnectionProgressNotifier(QNetworkSessionPrivateImpl& owner, RConnection& connection)
+ : CActive(CActive::EPriorityUserInput), iOwner(owner), iConnection(connection)
{
CActiveScheduler::Add(this);
}
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
index 7116519..9767293 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.h
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -75,9 +75,8 @@ class SymbianEngine;
class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate, public CActive,
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
- public MMobilityProtocolResp,
+ public MMobilityProtocolResp
#endif
- public MConnectionMonitorObserver
{
Q_OBJECT
public:
@@ -130,8 +129,9 @@ protected: // From CActive
void RunL();
void DoCancel();
-private: // MConnectionMonitorObserver
- void EventL(const CConnMonEventBase& aEvent);
+private Q_SLOTS:
+ void configurationStateChanged(TUint32 accessPointId, TUint32 connMonId, QNetworkSession::State newState);
+ void configurationRemoved(QNetworkConfigurationPrivatePointer config);
private:
TUint iapClientCount(TUint aIAPId) const;
@@ -157,6 +157,13 @@ private: // data
mutable RConnection iConnection;
mutable RConnectionMonitor iConnectionMonitor;
ConnectionProgressNotifier* ipConnectionNotifier;
+
+ bool iHandleStateNotificationsFromManager;
+ bool iFirstSync;
+ bool iStoppedByUser;
+ bool iClosedByUser;
+ TUint32 iDeprecatedConnectionId;
+
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
CActiveCommsMobilityApiExt* iMobility;
#endif
diff --git a/src/plugins/bearer/symbian/symbian.pro b/src/plugins/bearer/symbian/symbian.pro
index f915570..4f1e51c 100644
--- a/src/plugins/bearer/symbian/symbian.pro
+++ b/src/plugins/bearer/symbian/symbian.pro
@@ -11,6 +11,7 @@ SOURCES += symbianengine.cpp \
main.cpp
symbian {
+ TARGET.UID3=0x20021319
exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \
exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) {
message("Building with SNAP support")
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp
index 8e9675e..cea8b67 100644
--- a/src/plugins/bearer/symbian/symbianengine.cpp
+++ b/src/plugins/bearer/symbian/symbianengine.cpp
@@ -45,14 +45,14 @@
#include <commdb.h>
#include <cdbcols.h>
#include <d32dbms.h>
+#include <nifvar.h>
#include <QEventLoop>
#include <QTimer>
#include <QTime> // For randgen seeding
#include <QtCore> // For randgen seeding
-// #define QT_BEARERMGMT_CONFIGMGR_DEBUG
-#ifdef QT_BEARERMGMT_CONFIGMGR_DEBUG
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
#include <QDebug>
#endif
@@ -73,7 +73,9 @@
QT_BEGIN_NAMESPACE
-static const int KValueThatWillBeAddedToSNAPId = 1000;
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ static const int KValueThatWillBeAddedToSNAPId = 1000;
+#endif
static const int KUserChoiceIAPId = 0;
SymbianNetworkConfigurationPrivate::SymbianNetworkConfigurationPrivate()
@@ -657,26 +659,34 @@ void SymbianEngine::updateActiveAccessPoints()
iConnectionMonitor.GetConnectionCount(connectionCount, status);
User::WaitForRequest(status);
- // Go through all connections and set state of related IAPs to Active
+ // Go through all connections and set state of related IAPs to Active.
+ // Status needs to be checked carefully, because ConnMon lists also e.g.
+ // WLAN connections that are being currently tried --> we don't want to
+ // state these as active.
TUint connectionId;
TUint subConnectionCount;
TUint apId;
+ TInt connectionStatus;
if (status.Int() == KErrNone) {
for (TUint i = 1; i <= connectionCount; i++) {
iConnectionMonitor.GetConnectionInfo(i, connectionId, subConnectionCount);
iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
User::WaitForRequest(status);
QString ident = QString::number(qHash(apId));
-
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
if (ptr) {
- online = true;
- inactiveConfigs.removeOne(ident);
+ iConnectionMonitor.GetIntAttribute(connectionId, subConnectionCount, KConnectionStatus, connectionStatus, status);
+ User::WaitForRequest(status);
+ if (connectionStatus == KLinkLayerOpen) {
+ online = true;
+ inactiveConfigs.removeOne(ident);
- toSymbianConfig(ptr)->connectionId = connectionId;
+ QMutexLocker configLocker(&ptr->mutex);
+ toSymbianConfig(ptr)->connectionId = connectionId;
- // Configuration is Active
- changeConfigurationStateTo(ptr, QNetworkConfiguration::Active);
+ // Configuration is Active
+ changeConfigurationStateTo(ptr, QNetworkConfiguration::Active);
+ }
}
}
}
@@ -733,12 +743,12 @@ void SymbianEngine::accessPointScanningReady(TBool scanSuccessful, TConnMonIapIn
}
}
- // Make sure that state of rest of the IAPs won't be Discovered or Active
+ // Make sure that state of rest of the IAPs won't be Active
foreach (const QString &iface, unavailableConfigs) {
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iface);
if (ptr) {
// Configuration is Defined
- changeConfigurationStateAtMaxTo(ptr, QNetworkConfiguration::Defined);
+ changeConfigurationStateAtMaxTo(ptr, QNetworkConfiguration::Discovered);
}
}
}
@@ -894,21 +904,22 @@ void SymbianEngine::RunL()
QMutexLocker locker(&mutex);
if (iIgnoringUpdates) {
-#ifdef QT_BEARERMGMT_CONFIGMGR_DEBUG
- qDebug("CommsDB event handling postponed (postpone-timer running because IAPs/SNAPs were updated very recently).");
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug("QNCM CommsDB event handling postponed (postpone-timer running because IAPs/SNAPs were updated very recently).");
#endif
return;
}
if (iStatus != KErrCancel) {
RDbNotifier::TEvent event = STATIC_CAST(RDbNotifier::TEvent, iStatus.Int());
+
switch (event) {
case RDbNotifier::EUnlock: /** All read locks have been removed. */
case RDbNotifier::ECommit: /** A transaction has been committed. */
case RDbNotifier::ERollback: /** A transaction has been rolled back */
case RDbNotifier::ERecover: /** The database has been recovered */
-#ifdef QT_BEARERMGMT_CONFIGMGR_DEBUG
- qDebug("CommsDB event (of type RDbNotifier::TEvent) received: %d", iStatus.Int());
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug("QNCM CommsDB event (of type RDbNotifier::TEvent) received: %d", iStatus.Int());
#endif
iIgnoringUpdates = true;
// Other events than ECommit get lower priority. In practice with those events,
@@ -957,73 +968,95 @@ void SymbianEngine::DoCancel()
ipCommsDB->CancelRequestNotification();
}
-
void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
{
QMutexLocker locker(&mutex);
switch (aEvent.EventType()) {
- case EConnMonCreateConnection:
+ case EConnMonConnectionStatusChange:
{
- CConnMonCreateConnection* realEvent;
- realEvent = (CConnMonCreateConnection*) &aEvent;
- TUint subConnectionCount = 0;
- TUint apId;
- TUint connectionId = realEvent->ConnectionId();
- TRequestStatus status;
- iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
- User::WaitForRequest(status);
- QString ident = QString::number(qHash(apId));
-
- QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
- if (ptr) {
- toSymbianConfig(ptr)->connectionId = connectionId;
- // Configuration is Active
- if (changeConfigurationStateTo(ptr, QNetworkConfiguration::Active))
- updateStatesToSnaps();
-
- if (!iOnline) {
- iOnline = true;
-
- locker.unlock();
- emit this->onlineStateChanged(iOnline);
- locker.relock();
+ CConnMonConnectionStatusChange* realEvent;
+ realEvent = (CConnMonConnectionStatusChange*) &aEvent;
+ TInt connectionStatus = realEvent->ConnectionStatus();
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNCM Connection status : " << QString::number(connectionStatus) << " , connection monitor Id : " << realEvent->ConnectionId();
+#endif
+ if (connectionStatus == KConfigDaemonStartingRegistration) {
+ TUint connectionId = realEvent->ConnectionId();
+ TUint subConnectionCount = 0;
+ TUint apId;
+ TRequestStatus status;
+ iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
+ User::WaitForRequest(status);
+ QString ident = QString::number(qHash(apId));
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
+ if (ptr) {
+ QMutexLocker configLocker(&ptr->mutex);
+ toSymbianConfig(ptr)->connectionId = connectionId;
+ emit this->configurationStateChanged(toSymbianConfig(ptr)->numericId, connectionId, QNetworkSession::Connecting);
}
- }
- }
- break;
-
- case EConnMonDeleteConnection:
- {
- CConnMonDeleteConnection* realEvent;
- realEvent = (CConnMonDeleteConnection*) &aEvent;
- TUint connectionId = realEvent->ConnectionId();
-
- QNetworkConfigurationPrivatePointer ptr = dataByConnectionId(connectionId);
- if (ptr) {
- toSymbianConfig(ptr)->connectionId = 0;
- // Configuration is either Defined or Discovered
- if (changeConfigurationStateAtMaxTo(ptr, QNetworkConfiguration::Discovered))
- updateStatesToSnaps();
- }
-
- bool online = false;
- foreach (const QString &iface, accessPointConfigurations.keys()) {
- QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iface);
- if (ptr->state == QNetworkConfiguration::Active) {
- online = true;
- break;
+ } else if (connectionStatus == KLinkLayerOpen) {
+ // Connection has been successfully opened
+ TUint connectionId = realEvent->ConnectionId();
+ TUint subConnectionCount = 0;
+ TUint apId;
+ TRequestStatus status;
+ iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
+ User::WaitForRequest(status);
+ QString ident = QString::number(qHash(apId));
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
+ if (ptr) {
+ QMutexLocker configLocker(&ptr->mutex);
+ toSymbianConfig(ptr)->connectionId = connectionId;
+ // Configuration is Active
+ if (changeConfigurationStateTo(ptr, QNetworkConfiguration::Active)) {
+ updateStatesToSnaps();
+ }
+ emit this->configurationStateChanged(toSymbianConfig(ptr)->numericId, connectionId, QNetworkSession::Connected);
+ if (!iOnline) {
+ iOnline = true;
+ emit this->onlineStateChanged(iOnline);
+ }
}
- }
- if (iOnline != online) {
- iOnline = online;
+ } else if (connectionStatus == KConfigDaemonStartingDeregistration) {
+ TUint connectionId = realEvent->ConnectionId();
+ QNetworkConfigurationPrivatePointer ptr = dataByConnectionId(connectionId);
+ if (ptr) {
+ QMutexLocker configLocker(&ptr->mutex);
+ emit this->configurationStateChanged(toSymbianConfig(ptr)->numericId, connectionId, QNetworkSession::Closing);
+ }
+ } else if (connectionStatus == KLinkLayerClosed ||
+ connectionStatus == KConnectionClosed) {
+ // Connection has been closed. Which of the above events is reported, depends on the Symbian
+ // platform.
+ TUint connectionId = realEvent->ConnectionId();
+ QNetworkConfigurationPrivatePointer ptr = dataByConnectionId(connectionId);
+ if (ptr) {
+ // Configuration is either Defined or Discovered
+ if (changeConfigurationStateAtMaxTo(ptr, QNetworkConfiguration::Discovered)) {
+ updateStatesToSnaps();
+ }
- locker.unlock();
- emit this->onlineStateChanged(iOnline);
- locker.relock();
+ QMutexLocker configLocker(&ptr->mutex);
+ emit this->configurationStateChanged(toSymbianConfig(ptr)->numericId, connectionId, QNetworkSession::Disconnected);
+ }
+
+ bool online = false;
+ foreach (const QString &iface, accessPointConfigurations.keys()) {
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iface);
+ QMutexLocker configLocker(&ptr->mutex);
+ if (ptr->state == QNetworkConfiguration::Active) {
+ online = true;
+ break;
+ }
+ }
+ if (iOnline != online) {
+ iOnline = online;
+ emit this->onlineStateChanged(iOnline);
+ }
}
}
- break;
+ break;
case EConnMonIapAvailabilityChange:
{
@@ -1051,21 +1084,78 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
}
break;
+ case EConnMonCreateConnection:
+ {
+ // This event is caught to keep connection monitor IDs up-to-date.
+ CConnMonCreateConnection* realEvent;
+ realEvent = (CConnMonCreateConnection*) &aEvent;
+ TUint subConnectionCount = 0;
+ TUint apId;
+ TUint connectionId = realEvent->ConnectionId();
+ TRequestStatus status;
+ iConnectionMonitor.GetUintAttribute(connectionId, subConnectionCount, KIAPId, apId, status);
+ User::WaitForRequest(status);
+ QString ident = QString::number(qHash(apId));
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
+ if (ptr) {
+ QMutexLocker configLocker(&ptr->mutex);
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNCM updating connection monitor ID : from, to, whose: " << toSymbianConfig(ptr)->connectionId << connectionId << ptr->name;
+#endif
+ toSymbianConfig(ptr)->connectionId = connectionId;
+ }
+ }
+ break;
default:
// For unrecognized events
break;
}
}
-// Waits for 1..4 seconds.
+// Sessions may use this function to report configuration state changes,
+// because on some Symbian platforms (especially Symbian^3) all state changes are not
+// reported by the RConnectionMonitor, in particular in relation to stop() call,
+// whereas they _are_ reported on RConnection progress notifier used by sessions --> centralize
+// this data here so that other sessions may benefit from it too (not all sessions necessarily have
+// RConnection progress notifiers available but they relay on having e.g. disconnected information from
+// manager). Currently only 'Disconnected' state is of interest because it has proven to be troublesome.
+void SymbianEngine::configurationStateChangeReport(TUint32 accessPointId, QNetworkSession::State newState)
+{
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNCM A session reported state change for IAP ID: " << accessPointId << " whose new state is: " << newState;
+#endif
+ switch (newState) {
+ case QNetworkSession::Disconnected:
+ {
+ QString ident = QString::number(qHash(accessPointId));
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
+ if (ptr) {
+ // Configuration is either Defined or Discovered
+ if (changeConfigurationStateAtMaxTo(ptr, QNetworkConfiguration::Discovered)) {
+ updateStatesToSnaps();
+ }
+
+ QMutexLocker configLocker(&ptr->mutex);
+ emit this->configurationStateChanged(toSymbianConfig(ptr)->numericId,
+ toSymbianConfig(ptr)->connectionId,
+ QNetworkSession::Disconnected);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+// Waits for 2..6 seconds.
void SymbianEngine::waitRandomTime()
{
- iTimeToWait = (qAbs(qrand()) % 5) * 1000;
- if (iTimeToWait < 1000) {
- iTimeToWait = 1000;
+ iTimeToWait = (qAbs(qrand()) % 7) * 1000;
+ if (iTimeToWait < 2000) {
+ iTimeToWait = 2000;
}
-#ifdef QT_BEARERMGMT_CONFIGMGR_DEBUG
- qDebug("QNetworkConfigurationManager waiting random time: %d ms", iTimeToWait);
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug("QNCM waiting random time: %d ms", iTimeToWait);
#endif
QTimer::singleShot(iTimeToWait, iIgnoreEventLoop, SLOT(quit()));
iIgnoreEventLoop->exec();
@@ -1076,11 +1166,11 @@ QNetworkConfigurationPrivatePointer SymbianEngine::dataByConnectionId(TUint aCon
QMutexLocker locker(&mutex);
QNetworkConfiguration item;
-
QHash<QString, QNetworkConfigurationPrivatePointer>::const_iterator i =
accessPointConfigurations.constBegin();
while (i != accessPointConfigurations.constEnd()) {
QNetworkConfigurationPrivatePointer ptr = i.value();
+ QMutexLocker configLocker(&ptr->mutex);
if (toSymbianConfig(ptr)->connectionId == aConnectionId)
return ptr;
diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h
index afb37de..7d565db 100644
--- a/src/plugins/bearer/symbian/symbianengine.h
+++ b/src/plugins/bearer/symbian/symbianengine.h
@@ -52,6 +52,9 @@
#include <cmmanager.h>
#endif
+// Uncomment and compile QtBearer to gain detailed state tracing
+// #define QT_BEARERMGMT_SYMBIAN_DEBUG
+
class CCommsDatabase;
class QEventLoop;
@@ -90,7 +93,18 @@ public:
Bearer bearer;
+ // So called IAP id from the platform. Remains constant as long as the
+ // platform is aware of the configuration ie. it is stored in the databases
+ // --> does not depend on whether connections are currently open or not.
+ // In practice is the same for the lifetime of the QNetworkConfiguration.
TUint32 numericId;
+ // So called connection id, or connection monitor ID. A dynamic ID assigned
+ // by RConnectionMonitor whenever a new connection is opened. ConnectionID and
+ // numericId/IAP id have 1-to-1 mapping during the lifetime of the connection at
+ // connection monitor. Notably however it changes whenever a new connection to
+ // a given IAP is created. In a sense it is constant during the time the
+ // configuration remains between states Discovered..Active..Discovered, do not
+ // however relay on this.
TUint connectionId;
};
@@ -124,6 +138,9 @@ public:
Q_SIGNALS:
void onlineStateChanged(bool isOnline);
+ void configurationStateChanged(TUint32 accessPointId, TUint32 connMonId,
+ QNetworkSession::State newState);
+
public Q_SLOTS:
void updateConfigurations();
@@ -157,12 +174,17 @@ private:
void startMonitoringIAPData(TUint32 aIapId);
QNetworkConfigurationPrivatePointer dataByConnectionId(TUint aConnectionId);
-protected: // From CActive
+protected:
+ // From CActive
void RunL();
void DoCancel();
-private: // MConnectionMonitorObserver
+private:
+ // MConnectionMonitorObserver
void EventL(const CConnMonEventBase& aEvent);
+ // For QNetworkSessionPrivate to indicate about state changes
+ void configurationStateChangeReport(TUint32 accessPointId,
+ QNetworkSession::State newState);
private: // Data
bool iFirstUpdate;
@@ -181,6 +203,7 @@ private: // Data
friend class QNetworkSessionPrivate;
friend class AccessPointsAvailabilityScanner;
+ friend class QNetworkSessionPrivateImpl;
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
RCmManager iCmManager;
diff --git a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp
index 964fa53..9de2a34 100644
--- a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp
+++ b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp
@@ -259,7 +259,7 @@ int PvrEglScreen::transformation() const
if (parent->classId() != QScreen::TransformedClass)
return 0;
return 90 * static_cast<const QTransformedScreen *>(parent)
- ->transformation();
+ ->transformOrientation();
}
#else
diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp
index 25d3dfa..8abc2d1 100644
--- a/src/plugins/imageformats/gif/qgifhandler.cpp
+++ b/src/plugins/imageformats/gif/qgifhandler.cpp
@@ -1119,8 +1119,11 @@ bool QGifHandler::write(const QImage &image)
bool QGifHandler::supportsOption(ImageOption option) const
{
- return option == Size
- || option == Animation;
+ if (!device() || device()->isSequential())
+ return option == Animation;
+ else
+ return option == Size
+ || option == Animation;
}
QVariant QGifHandler::option(ImageOption option) const
diff --git a/src/plugins/imageformats/svg/qsvgiohandler.cpp b/src/plugins/imageformats/svg/qsvgiohandler.cpp
index 8155569..7b8463d 100644
--- a/src/plugins/imageformats/svg/qsvgiohandler.cpp
+++ b/src/plugins/imageformats/svg/qsvgiohandler.cpp
@@ -82,15 +82,19 @@ bool QSvgIOHandlerPrivate::load(QIODevice *device)
if (q->format().isEmpty())
q->canRead();
+ // # The SVG renderer doesn't handle trailing, unrelated data, so we must
+ // assume that all available data in the device is to be read.
bool res = false;
QBuffer *buf = qobject_cast<QBuffer *>(device);
if (buf) {
- res = r.load(buf->data());
+ const QByteArray &ba = buf->data();
+ res = r.load(QByteArray::fromRawData(ba.constData() + buf->pos(), ba.size() - buf->pos()));
+ buf->seek(ba.size());
} else if (q->format() == "svgz") {
- res = r.load(device->readAll()); // ### can't stream svgz
+ res = r.load(device->readAll());
} else {
xmlReader.setDevice(device);
- res = r.load(&xmlReader); //### doesn't leave pos() correctly
+ res = r.load(&xmlReader);
}
if (res) {
diff --git a/src/plugins/mediaservices/directshow/directshow.pro b/src/plugins/mediaservices/directshow/directshow.pro
deleted file mode 100644
index 065e391..0000000
--- a/src/plugins/mediaservices/directshow/directshow.pro
+++ /dev/null
@@ -1,14 +0,0 @@
-TARGET = qdsengine
-include(../../qpluginbase.pri)
-
-QT += multimedia mediaservices
-
-HEADERS += dsserviceplugin.h
-SOURCES += dsserviceplugin.cpp
-
-include(mediaplayer/mediaplayer.pri)
-
-QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/mediaservices
-target.path = $$[QT_INSTALL_PLUGINS]/mediaservices
-INSTALLS += target
-
diff --git a/src/plugins/mediaservices/directshow/dsserviceplugin.cpp b/src/plugins/mediaservices/directshow/dsserviceplugin.cpp
deleted file mode 100644
index c482fd5..0000000
--- a/src/plugins/mediaservices/directshow/dsserviceplugin.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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/qstring.h>
-#include <QtCore/qdebug.h>
-#include <QtCore/QFile>
-
-#include "dsserviceplugin.h"
-
-#ifdef QMEDIA_DIRECTSHOW_CAMERA
-#include "dscameraservice.h"
-#endif
-
-#ifdef QMEDIA_DIRECTSHOW_PLAYER
-#include "directshowplayerservice.h"
-#endif
-
-#include <qmediaserviceprovider.h>
-
-
-#ifdef QMEDIA_DIRECTSHOW_CAMERA
-#ifndef _STRSAFE_H_INCLUDED_
-#include <tchar.h>
-#endif
-#include <dshow.h>
-#include <objbase.h>
-#include <initguid.h>
-#pragma comment(lib, "strmiids.lib")
-#pragma comment(lib, "ole32.lib")
-#include <windows.h>
-#endif
-
-
-QT_BEGIN_NAMESPACE
-
-QStringList DSServicePlugin::keys() const
-{
- return QStringList()
-#ifdef QMEDIA_DIRECTSHOW_CAMERA
- << QLatin1String(Q_MEDIASERVICE_CAMERA)
-#endif
-#ifdef QMEDIA_DIRECTSHOW_PLAYER
- << QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER)
-#endif
- ;
-}
-
-QMediaService* DSServicePlugin::create(QString const& key)
-{
-#ifdef QMEDIA_DIRECTSHOW_CAMERA
- if (key == QLatin1String(Q_MEDIASERVICE_CAMERA))
- return new DSCameraService;
-#endif
-#ifdef QMEDIA_DIRECTSHOW_PLAYER
- if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER))
- return new DirectShowPlayerService;
-#endif
-
- qWarning() << "DirectShow service plugin: unsupported service -" << key;
- return 0;
-}
-
-void DSServicePlugin::release(QMediaService *service)
-{
- delete service;
-}
-
-QList<QByteArray> DSServicePlugin::devices(const QByteArray &service) const
-{
-#ifdef QMEDIA_DIRECTSHOW_CAMERA
- if (service == Q_MEDIASERVICE_CAMERA) {
- if (m_cameraDevices.isEmpty())
- updateDevices();
-
- return m_cameraDevices;
- }
-#endif
-
- return QList<QByteArray>();
-}
-
-QString DSServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &device)
-{
-#ifdef QMEDIA_DIRECTSHOW_CAMERA
- if (service == Q_MEDIASERVICE_CAMERA) {
- if (m_cameraDevices.isEmpty())
- updateDevices();
-
- for (int i=0; i<m_cameraDevices.count(); i++)
- if (m_cameraDevices[i] == device)
- return m_cameraDescriptions[i];
- }
-#endif
- return QString();
-}
-
-#ifdef QMEDIA_DIRECTSHOW_CAMERA
-void DSServicePlugin::updateDevices() const
-{
- m_cameraDevices.clear();
- m_cameraDescriptions.clear();
-
- CoInitialize(NULL);
- ICreateDevEnum* pDevEnum = NULL;
- IEnumMoniker* pEnum = NULL;
- // Create the System device enumerator
- HRESULT hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL,
- CLSCTX_INPROC_SERVER, IID_ICreateDevEnum,
- reinterpret_cast<void**>(&pDevEnum));
- if(SUCCEEDED(hr)) {
- // Create the enumerator for the video capture category
- hr = pDevEnum->CreateClassEnumerator(
- CLSID_VideoInputDeviceCategory, &pEnum, 0);
- pEnum->Reset();
- // go through and find all video capture devices
- IMoniker* pMoniker = NULL;
- while(pEnum->Next(1, &pMoniker, NULL) == S_OK) {
- IPropertyBag *pPropBag;
- hr = pMoniker->BindToStorage(0,0,IID_IPropertyBag,
- (void**)(&pPropBag));
- if(FAILED(hr)) {
- pMoniker->Release();
- continue; // skip this one
- }
- // Find the description
- WCHAR str[120];
- VARIANT varName;
- varName.vt = VT_BSTR;
- hr = pPropBag->Read(L"FriendlyName", &varName, 0);
- if(SUCCEEDED(hr)) {
- StringCchCopyW(str,sizeof(str)/sizeof(str[0]),varName.bstrVal);
- QString temp(QString::fromUtf16((unsigned short*)str));
- m_cameraDevices.append(QString("ds:%1").arg(temp).toLocal8Bit().constData());
- hr = pPropBag->Read(L"Description", &varName, 0);
- StringCchCopyW(str,sizeof(str)/sizeof(str[0]),varName.bstrVal);
- QString temp2(QString::fromUtf16((unsigned short*)str));
- m_cameraDescriptions.append(temp2);
- }
- pPropBag->Release();
- pMoniker->Release();
- }
- }
- CoUninitialize();
-}
-#endif
-
-QT_END_NAMESPACE
-
-Q_EXPORT_PLUGIN2(dsengine, DSServicePlugin);
-
diff --git a/src/plugins/mediaservices/directshow/dsserviceplugin.h b/src/plugins/mediaservices/directshow/dsserviceplugin.h
deleted file mode 100644
index 3c6f1b8..0000000
--- a/src/plugins/mediaservices/directshow/dsserviceplugin.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DSSERVICEPLUGIN_H
-#define DSSERVICEPLUGIN_H
-
-#include <qmediaserviceproviderplugin.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
-class DSServicePlugin : public QMediaServiceProviderPlugin, public QMediaServiceSupportedDevicesInterface
-{
- Q_OBJECT
- Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
-public:
- QStringList keys() const;
- QMediaService* create(QString const& key);
- void release(QMediaService *service);
-
- QList<QByteArray> devices(const QByteArray &service) const;
- QString deviceDescription(const QByteArray &service, const QByteArray &device);
-
-private:
-#ifdef QMEDIA_DIRECTSHOW_CAMERA
- void updateDevices() const;
-
- mutable QList<QByteArray> m_cameraDevices;
- mutable QStringList m_cameraDescriptions;
-#endif
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // DSSERVICEPLUGIN_H
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.cpp
deleted file mode 100644
index 5f72ca6..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "directshowaudioendpointcontrol.h"
-
-#include "directshowglobal.h"
-#include "directshowplayerservice.h"
-
-
-QT_BEGIN_NAMESPACE
-
-DirectShowAudioEndpointControl::DirectShowAudioEndpointControl(
- DirectShowPlayerService *service, QObject *parent)
- : QMediaControl(parent)
- , m_service(service)
- , m_bindContext(0)
- , m_deviceEnumerator(0)
-{
- if (CreateBindCtx(0, &m_bindContext) == S_OK) {
- m_deviceEnumerator = com_new<ICreateDevEnum>(CLSID_SystemDeviceEnum, IID_ICreateDevEnum);
-
- updateEndpoints();
-
- setActiveEndpoint(m_defaultEndpoint);
- }
-}
-
-DirectShowAudioEndpointControl::~DirectShowAudioEndpointControl()
-{
- foreach (IMoniker *moniker, m_devices)
- moniker->Release();
-
- if (m_bindContext)
- m_bindContext->Release();
-
- if (m_deviceEnumerator)
- m_deviceEnumerator->Release();
-}
-
-QList<QString> DirectShowAudioEndpointControl::availableEndpoints() const
-{
- return m_devices.keys();
-}
-
-QString DirectShowAudioEndpointControl::endpointDescription(const QString &name) const
-{
-#ifdef __IPropertyBag_INTERFACE_DEFINED__
- QString description;
-
- if (IMoniker *moniker = m_devices.value(name, 0)) {
- IPropertyBag *propertyBag = 0;
- if (SUCCEEDED(moniker->BindToStorage(
- 0, 0, IID_IPropertyBag, reinterpret_cast<void **>(&propertyBag)))) {
- VARIANT name;
- VariantInit(&name);
- if (SUCCEEDED(propertyBag->Read(L"FriendlyName", &name, 0)))
- description = QString::fromWCharArray(name.bstrVal);
- VariantClear(&name);
- propertyBag->Release();
- }
- }
-
- return description;
-#else
- return name.section(QLatin1Char('\\'), -1);
-#endif
-}
-
-QString DirectShowAudioEndpointControl::defaultEndpoint() const
-{
- return m_defaultEndpoint;
-}
-
-QString DirectShowAudioEndpointControl::activeEndpoint() const
-{
- return m_activeEndpoint;
-}
-
-void DirectShowAudioEndpointControl::setActiveEndpoint(const QString &name)
-{
- if (m_activeEndpoint == name)
- return;
-
- if (IMoniker *moniker = m_devices.value(name, 0)) {
- IBaseFilter *filter = 0;
-
- if (moniker->BindToObject(
- m_bindContext,
- 0,
- IID_IBaseFilter,
- reinterpret_cast<void **>(&filter)) == S_OK) {
- m_service->setAudioOutput(filter);
-
- filter->Release();
- }
- }
-}
-
-void DirectShowAudioEndpointControl::updateEndpoints()
-{
- IMalloc *oleMalloc = 0;
- if (m_deviceEnumerator && CoGetMalloc(1, &oleMalloc) == S_OK) {
- IEnumMoniker *monikers = 0;
-
- if (m_deviceEnumerator->CreateClassEnumerator(
- CLSID_AudioRendererCategory, &monikers, 0) == S_OK) {
- for (IMoniker *moniker = 0; monikers->Next(1, &moniker, 0) == S_OK; moniker->Release()) {
- OLECHAR *string = 0;
- if (moniker->GetDisplayName(m_bindContext, 0, &string) == S_OK) {
- QString deviceId = QString::fromWCharArray(string);
- oleMalloc->Free(string);
-
- moniker->AddRef();
- m_devices.insert(deviceId, moniker);
-
- if (m_defaultEndpoint.isEmpty()
- || deviceId.endsWith(QLatin1String("Default DirectSound Device"))) {
- m_defaultEndpoint = deviceId;
- }
- }
- }
- monikers->Release();
- }
- oleMalloc->Release();
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.h
deleted file mode 100644
index 8d23751..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowaudioendpointcontrol.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWAUDIOENDPOINTCONTROL_H
-#define DIRECTSHOWAUDIOENDPOINTCONTROL_H
-
-#include <QtMediaServices/qmediacontrol.h>
-
-#include <dshow.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowPlayerService;
-
-class DirectShowAudioEndpointControl : public QMediaControl
-{
- Q_OBJECT
-public:
- DirectShowAudioEndpointControl(DirectShowPlayerService *service, QObject *parent = 0);
- ~DirectShowAudioEndpointControl();
-
- QList<QString> availableEndpoints() const;
-
- QString endpointDescription(const QString &name) const;
-
- QString defaultEndpoint() const;
- QString activeEndpoint() const;
-
- void setActiveEndpoint(const QString& name);
-
-private:
- void updateEndpoints();
-
- DirectShowPlayerService *m_service;
- IBindCtx *m_bindContext;
- ICreateDevEnum *m_deviceEnumerator;
-
- QMap<QString, IMoniker *> m_devices;
- QString m_defaultEndpoint;
- QString m_activeEndpoint;
-};
-
-#define QAudioEndpointSelector_iid "com.nokia.Qt.QAudioEndpointSelector/1.0"
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
-
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp
deleted file mode 100644
index 07541c2..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 <directshoweventloop.h>
-
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qcoreevent.h>
-
-
-QT_BEGIN_NAMESPACE
-
-
-class DirectShowPostedEvent
-{
-public:
- DirectShowPostedEvent(QObject *receiver, QEvent *event)
- : receiver(receiver)
- , event(event)
- , next(0)
- {
- }
-
- ~DirectShowPostedEvent()
- {
- delete event;
- }
-
- QObject *receiver;
- QEvent *event;
- DirectShowPostedEvent *next;
-};
-
-DirectShowEventLoop::DirectShowEventLoop(QObject *parent)
- : QWinEventNotifier(parent)
- , m_postsHead(0)
- , m_postsTail(0)
- , m_eventHandle(::CreateEvent(0, 0, 0, 0))
- , m_waitHandle(::CreateEvent(0, 0, 0, 0))
-{
- setHandle(m_eventHandle);
- setEnabled(true);
-}
-
-DirectShowEventLoop::~DirectShowEventLoop()
-{
- setEnabled(false);
-
- ::CloseHandle(m_eventHandle);
- ::CloseHandle(m_waitHandle);
-
- for (DirectShowPostedEvent *post = m_postsHead; post; post = m_postsHead) {
- m_postsHead = m_postsHead->next;
-
- delete post;
- }
-}
-
-void DirectShowEventLoop::wait(QMutex *mutex)
-{
- ::ResetEvent(m_waitHandle);
-
- mutex->unlock();
-
- HANDLE handles[] = { m_eventHandle, m_waitHandle };
- while (::WaitForMultipleObjects(2, handles, false, INFINITE) == WAIT_OBJECT_0)
- processEvents();
-
- mutex->lock();
-}
-
-void DirectShowEventLoop::wake()
-{
- ::SetEvent(m_waitHandle);
-}
-
-void DirectShowEventLoop::postEvent(QObject *receiver, QEvent *event)
-{
- QMutexLocker locker(&m_mutex);
-
- DirectShowPostedEvent *post = new DirectShowPostedEvent(receiver, event);
-
- if (m_postsTail)
- m_postsTail->next = post;
- else
- m_postsHead = post;
-
- m_postsTail = post;
-
- ::SetEvent(m_eventHandle);
-}
-
-bool DirectShowEventLoop::event(QEvent *event)
-{
- if (event->type() == QEvent::WinEventAct) {
- processEvents();
-
- return true;
- } else {
- return QWinEventNotifier::event(event);
- }
-}
-
-void DirectShowEventLoop::processEvents()
-{
- QMutexLocker locker(&m_mutex);
-
- while(m_postsHead) {
- ::ResetEvent(m_eventHandle);
-
- DirectShowPostedEvent *post = m_postsHead;
- m_postsHead = m_postsHead->next;
-
- if (!m_postsHead)
- m_postsTail = 0;
-
- locker.unlock();
- QCoreApplication::sendEvent(post->receiver, post->event);
- delete post;
- locker.relock();
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.h b/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.h
deleted file mode 100644
index f46e65a..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshoweventloop.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWEVENTLOOP_H
-#define DIRECTSHOWEVENTLOOP_H
-
-#include <QtCore/qmutex.h>
-#include <QtCore/private/qwineventnotifier_p.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowPostedEvent;
-
-class DirectShowEventLoop : public QWinEventNotifier
-{
- Q_OBJECT
-public:
- DirectShowEventLoop(QObject *parent = 0);
- ~DirectShowEventLoop();
-
- void wait(QMutex *mutex);
- void wake();
-
- void postEvent(QObject *object, QEvent *event);
-
- bool event(QEvent *event);
-
-private:
- void processEvents();
-
- DirectShowPostedEvent *m_postsHead;
- DirectShowPostedEvent *m_postsTail;
- HANDLE m_eventHandle;
- HANDLE m_waitHandle;
- QMutex m_mutex;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowglobal.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowglobal.h
deleted file mode 100644
index e43e2a7..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowglobal.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWGLOBAL_H
-#define DIRECTSHOWGLOBAL_H
-
-#include <QtCore/qglobal.h>
-
-#include <dshow.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-template <typename T> T *com_cast(IUnknown *unknown, const IID &iid)
-{
- T *iface = 0;
- return unknown && unknown->QueryInterface(iid, reinterpret_cast<void **>(&iface)) == S_OK
- ? iface
- : 0;
-}
-
-template <typename T> T *com_new(const IID &clsid, const IID &iid)
-{
- T *object = 0;
- return CoCreateInstance(
- clsid,
- NULL,
- CLSCTX_INPROC_SERVER,
- iid,
- reinterpret_cast<void **>(&object)) == S_OK
- ? object
- : 0;
-}
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#ifndef __IFilterGraph2_INTERFACE_DEFINED__
-#define __IFilterGraph2_INTERFACE_DEFINED__
-#define INTERFACE IFilterGraph2
-DECLARE_INTERFACE_(IFilterGraph2 ,IGraphBuilder)
-{
- STDMETHOD(AddSourceFilterForMoniker)(THIS_ IMoniker *, IBindCtx *, LPCWSTR,IBaseFilter **) PURE;
- STDMETHOD(ReconnectEx)(THIS_ IPin *, const AM_MEDIA_TYPE *) PURE;
- STDMETHOD(RenderEx)(IPin *, DWORD, DWORD *) PURE;
-};
-#undef INTERFACE
-#endif
-
-#ifndef __IAMFilterMiscFlags_INTERFACE_DEFINED__
-#define __IAMFilterMiscFlags_INTERFACE_DEFINED__
-#define INTERFACE IAMFilterMiscFlags
-DECLARE_INTERFACE_(IAMFilterMiscFlags ,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD_(ULONG,GetMiscFlags)(THIS) PURE;
-};
-#undef INTERFACE
-#endif
-
-#ifndef __IFileSourceFilter_INTERFACE_DEFINED__
-#define __IFileSourceFilter_INTERFACE_DEFINED__
-#define INTERFACE IFileSourceFilter
-DECLARE_INTERFACE_(IFileSourceFilter ,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(Load)(THIS_ LPCOLESTR, const AM_MEDIA_TYPE *) PURE;
- STDMETHOD(GetCurFile)(THIS_ LPOLESTR *ppszFileName, AM_MEDIA_TYPE *) PURE;
-};
-#undef INTERFACE
-#endif
-
-#ifndef __IAMOpenProgress_INTERFACE_DEFINED__
-#define __IAMOpenProgress_INTERFACE_DEFINED__
-#define INTERFACE IAMOpenProgress
-DECLARE_INTERFACE_(IAMOpenProgress ,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(QueryProgress)(THIS_ LONGLONG *, LONGLONG *) PURE;
- STDMETHOD(AbortOperation)(THIS) PURE;
-};
-#undef INTERFACE
-#endif
-
-#ifndef __IFilterChain_INTERFACE_DEFINED__
-#define __IFilterChain_INTERFACE_DEFINED__
-#define INTERFACE IFilterChain
-DECLARE_INTERFACE_(IFilterChain ,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(StartChain)(IBaseFilter *, IBaseFilter *) PURE;
- STDMETHOD(PauseChain)(IBaseFilter *, IBaseFilter *) PURE;
- STDMETHOD(StopChain)(IBaseFilter *, IBaseFilter *) PURE;
- STDMETHOD(RemoveChain)(IBaseFilter *, IBaseFilter *) PURE;
-};
-#undef INTERFACE
-#endif
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.cpp
deleted file mode 100644
index 7369099..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.cpp
+++ /dev/null
@@ -1,501 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "directshowioreader.h"
-
-#include "directshoweventloop.h"
-#include "directshowglobal.h"
-#include "directshowiosource.h"
-
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qcoreevent.h>
-#include <QtCore/qiodevice.h>
-#include <QtCore/qthread.h>
-
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowSampleRequest
-{
-public:
- DirectShowSampleRequest(
- IMediaSample *sample, DWORD_PTR userData, LONGLONG position, LONG length, BYTE *buffer)
- : next(0)
- , sample(sample)
- , userData(userData)
- , position(position)
- , length(length)
- , buffer(buffer)
- , result(S_FALSE)
- {
- }
-
- DirectShowSampleRequest *remove() { DirectShowSampleRequest *n = next; delete this; return n; }
-
- DirectShowSampleRequest *next;
- IMediaSample *sample;
- DWORD_PTR userData;
- LONGLONG position;
- LONG length;
- BYTE *buffer;
- HRESULT result;
-};
-
-DirectShowIOReader::DirectShowIOReader(
- QIODevice *device, DirectShowIOSource *source, DirectShowEventLoop *loop)
- : m_source(source)
- , m_device(device)
- , m_loop(loop)
- , m_pendingHead(0)
- , m_pendingTail(0)
- , m_readyHead(0)
- , m_readyTail(0)
- , m_synchronousPosition(0)
- , m_synchronousLength(0)
- , m_synchronousBytesRead(0)
- , m_synchronousBuffer(0)
- , m_synchronousResult(S_OK)
- , m_totalLength(0)
- , m_availableLength(0)
- , m_flushing(false)
-{
- moveToThread(device->thread());
-
- connect(device, SIGNAL(readyRead()), this, SLOT(readyRead()));
-}
-
-DirectShowIOReader::~DirectShowIOReader()
-{
- flushRequests();
-}
-
-HRESULT DirectShowIOReader::QueryInterface(REFIID riid, void **ppvObject)
-{
- return m_source->QueryInterface(riid, ppvObject);
-}
-
-ULONG DirectShowIOReader::AddRef()
-{
- return m_source->AddRef();
-}
-
-ULONG DirectShowIOReader::Release()
-{
- return m_source->Release();
-}
-
-// IAsyncReader
-HRESULT DirectShowIOReader::RequestAllocator(
- IMemAllocator *pPreferred, ALLOCATOR_PROPERTIES *pProps, IMemAllocator **ppActual)
-{
- if (!ppActual || !pProps) {
- return E_POINTER;
- } else {
- ALLOCATOR_PROPERTIES actualProperties;
-
- if (pProps->cbAlign == 0)
- pProps->cbAlign = 1;
-
- if (pPreferred && pPreferred->SetProperties(pProps, &actualProperties) == S_OK) {
- pPreferred->AddRef();
-
- *ppActual = pPreferred;
-
- m_source->setAllocator(*ppActual);
-
- return S_OK;
- } else {
- *ppActual = com_new<IMemAllocator>(CLSID_MemoryAllocator, IID_IMemAllocator);
-
- if (*ppActual) {
- if ((*ppActual)->SetProperties(pProps, &actualProperties) != S_OK) {
- (*ppActual)->Release();
- } else {
- m_source->setAllocator(*ppActual);
-
- return S_OK;
- }
- }
- }
- ppActual = 0;
-
- return E_FAIL;
- }
-}
-
-HRESULT DirectShowIOReader::Request(IMediaSample *pSample, DWORD_PTR dwUser)
-{
- QMutexLocker locker(&m_mutex);
-
- if (!pSample) {
- return E_POINTER;
- } else if (m_flushing) {
- return VFW_E_WRONG_STATE;
- } else {
- REFERENCE_TIME startTime = 0;
- REFERENCE_TIME endTime = 0;
- BYTE *buffer;
-
- if (pSample->GetTime(&startTime, &endTime) != S_OK
- || pSample->GetPointer(&buffer) != S_OK) {
- return VFW_E_SAMPLE_TIME_NOT_SET;
- } else {
- LONGLONG position = startTime / 10000000;
- LONG length = (endTime - startTime) / 10000000;
-
- DirectShowSampleRequest *request = new DirectShowSampleRequest(
- pSample, dwUser, position, length, buffer);
-
- if (m_pendingTail) {
- m_pendingTail->next = request;
- } else {
- m_pendingHead = request;
-
- m_loop->postEvent(this, new QEvent(QEvent::User));
- }
- m_pendingTail = request;
-
- return S_OK;
- }
- }
-}
-
-HRESULT DirectShowIOReader::WaitForNext(
- DWORD dwTimeout, IMediaSample **ppSample, DWORD_PTR *pdwUser)
-{
- if (!ppSample || !pdwUser)
- return E_POINTER;
-
- QMutexLocker locker(&m_mutex);
-
- do {
- if (m_readyHead) {
- DirectShowSampleRequest *request = m_readyHead;
-
- *ppSample = request->sample;
- *pdwUser = request->userData;
-
- HRESULT hr = request->result;
-
- m_readyHead = request->next;
-
- if (!m_readyHead)
- m_readyTail = 0;
-
- delete request;
-
- return hr;
- } else if (m_flushing) {
- *ppSample = 0;
- *pdwUser = 0;
-
- return VFW_E_WRONG_STATE;
- }
- } while (m_wait.wait(&m_mutex, dwTimeout));
-
- *ppSample = 0;
- *pdwUser = 0;
-
- return VFW_E_TIMEOUT;
-}
-
-HRESULT DirectShowIOReader::SyncReadAligned(IMediaSample *pSample)
-{
- if (!pSample) {
- return E_POINTER;
- } else {
- REFERENCE_TIME startTime = 0;
- REFERENCE_TIME endTime = 0;
- BYTE *buffer;
-
- if (pSample->GetTime(&startTime, &endTime) != S_OK
- || pSample->GetPointer(&buffer) != S_OK) {
- return VFW_E_SAMPLE_TIME_NOT_SET;
- } else {
- LONGLONG position = startTime / 10000000;
- LONG length = (endTime - startTime) / 10000000;
-
- QMutexLocker locker(&m_mutex);
-
- if (thread() == QThread::currentThread()) {
- qint64 bytesRead = 0;
-
- HRESULT hr = blockingRead(position, length, buffer, &bytesRead);
-
- if (SUCCEEDED(hr))
- pSample->SetActualDataLength(bytesRead);
-
- return hr;
- } else {
- m_synchronousPosition = position;
- m_synchronousLength = length;
- m_synchronousBuffer = buffer;
-
- m_loop->postEvent(this, new QEvent(QEvent::User));
-
- m_wait.wait(&m_mutex);
-
- m_synchronousBuffer = 0;
-
- if (SUCCEEDED(m_synchronousResult))
- pSample->SetActualDataLength(m_synchronousBytesRead);
-
- return m_synchronousResult;
- }
- }
- }
-}
-
-HRESULT DirectShowIOReader::SyncRead(LONGLONG llPosition, LONG lLength, BYTE *pBuffer)
-{
- if (!pBuffer) {
- return E_POINTER;
- } else {
- if (thread() == QThread::currentThread()) {
- qint64 bytesRead;
-
- return blockingRead(llPosition, lLength, pBuffer, &bytesRead);
- } else {
- QMutexLocker locker(&m_mutex);
-
- m_synchronousPosition = llPosition;
- m_synchronousLength = lLength;
- m_synchronousBuffer = pBuffer;
-
- m_loop->postEvent(this, new QEvent(QEvent::User));
-
- m_wait.wait(&m_mutex);
-
- m_synchronousBuffer = 0;
-
- return m_synchronousResult;
- }
- }
-}
-
-HRESULT DirectShowIOReader::Length(LONGLONG *pTotal, LONGLONG *pAvailable)
-{
- if (!pTotal || !pAvailable) {
- return E_POINTER;
- } else {
- QMutexLocker locker(&m_mutex);
-
- *pTotal = m_totalLength;
- *pAvailable = m_availableLength;
-
- return S_OK;
- }
-}
-
-
-HRESULT DirectShowIOReader::BeginFlush()
-{
- QMutexLocker locker(&m_mutex);
-
- if (m_flushing)
- return S_FALSE;
-
- m_flushing = true;
-
- flushRequests();
-
- m_wait.wakeAll();
-
- return S_OK;
-}
-
-HRESULT DirectShowIOReader::EndFlush()
-{
- QMutexLocker locker(&m_mutex);
-
- if (!m_flushing)
- return S_FALSE;
-
- m_flushing = false;
-
- return S_OK;
-}
-
-void DirectShowIOReader::customEvent(QEvent *event)
-{
- if (event->type() == QEvent::User) {
- readyRead();
- } else {
- QObject::customEvent(event);
- }
-}
-
-void DirectShowIOReader::readyRead()
-{
- QMutexLocker locker(&m_mutex);
-
- m_availableLength = m_device->bytesAvailable() + m_device->pos();
- m_totalLength = m_device->size();
-
- if (m_synchronousBuffer) {
- if (nonBlockingRead(
- m_synchronousPosition,
- m_synchronousLength,
- m_synchronousBuffer,
- &m_synchronousBytesRead,
- &m_synchronousResult)) {
- m_wait.wakeAll();
- }
- } else {
- qint64 bytesRead = 0;
-
- while (m_pendingHead && nonBlockingRead(
- m_pendingHead->position,
- m_pendingHead->length,
- m_pendingHead->buffer,
- &bytesRead,
- &m_pendingHead->result)) {
- m_pendingHead->sample->SetActualDataLength(bytesRead);
-
- if (m_readyTail)
- m_readyTail->next = m_pendingHead;
- m_readyTail = m_pendingHead;
-
- m_pendingHead = m_pendingHead->next;
-
- m_readyTail->next = 0;
-
- if (!m_pendingHead)
- m_pendingTail = 0;
-
- if (!m_readyHead)
- m_readyHead = m_readyTail;
-
- m_wait.wakeAll();
- }
- }
-}
-
-HRESULT DirectShowIOReader::blockingRead(
- LONGLONG position, LONG length, BYTE *buffer, qint64 *bytesRead)
-{
- *bytesRead = 0;
-
- if (qint64(position) > m_device->size())
- return S_FALSE;
-
- const qint64 maxSize = qMin<qint64>(m_device->size(), position + length);
-
- while (m_device->bytesAvailable() + m_device->pos() < maxSize) {
- if (!m_device->waitForReadyRead(-1))
- return S_FALSE;
- }
-
- if (m_device->pos() != position && !m_device->seek(position))
- return S_FALSE;
-
- const qint64 maxBytes = qMin<qint64>(length, m_device->bytesAvailable());
-
- *bytesRead = m_device->read(reinterpret_cast<char *>(buffer), maxBytes);
-
- if (*bytesRead != length) {
- qMemSet(buffer + *bytesRead, 0, length - *bytesRead);
-
- return S_FALSE;
- } else {
- return S_OK;
- }
-}
-
-bool DirectShowIOReader::nonBlockingRead(
- LONGLONG position, LONG length, BYTE *buffer, qint64 *bytesRead, HRESULT *result)
-{
- const qint64 maxSize = qMin<qint64>(m_device->size(), position + length);
-
- if (position > m_device->size()) {
- *bytesRead = 0;
- *result = S_FALSE;
-
- return true;
- } else if (m_device->bytesAvailable() + m_device->pos() >= maxSize) {
- if (m_device->pos() != position && !m_device->seek(position)) {
- *bytesRead = 0;
- *result = S_FALSE;
-
- return true;
- } else {
- const qint64 maxBytes = qMin<qint64>(length, m_device->bytesAvailable());
-
- *bytesRead = m_device->read(reinterpret_cast<char *>(buffer), maxBytes);
-
- if (*bytesRead != length) {
- qMemSet(buffer + *bytesRead, 0, length - *bytesRead);
-
- *result = S_FALSE;
- } else {
- *result = S_OK;
- }
-
- return true;
- }
- } else {
- return false;
- }
-}
-
-void DirectShowIOReader::flushRequests()
-{
- while (m_pendingHead) {
- m_pendingHead->result = VFW_E_WRONG_STATE;
-
- if (m_readyTail)
- m_readyTail->next = m_pendingHead;
-
- m_readyTail = m_pendingHead;
-
- m_pendingHead = m_pendingHead->next;
-
- m_readyTail->next = 0;
-
- if (!m_pendingHead)
- m_pendingTail = 0;
-
- if (!m_readyHead)
- m_readyHead = m_readyTail;
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.h
deleted file mode 100644
index 8cbc2f1..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowioreader.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWIOREADER_H
-#define DIRECTSHOWIOREADER_H
-
-#include <QtCore/qmutex.h>
-#include <QtCore/qobject.h>
-#include <QtCore/qwaitcondition.h>
-
-#include <dshow.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QIODevice;
-
-class DirectShowEventLoop;
-class DirectShowIOSource;
-class DirectShowSampleRequest;
-
-class DirectShowIOReader : public QObject, public IAsyncReader
-{
- Q_OBJECT
-public:
- DirectShowIOReader(QIODevice *device, DirectShowIOSource *source, DirectShowEventLoop *loop);
- ~DirectShowIOReader();
-
- // IUnknown
- HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
- ULONG STDMETHODCALLTYPE AddRef();
- ULONG STDMETHODCALLTYPE Release();
-
- // IAsyncReader
- HRESULT STDMETHODCALLTYPE RequestAllocator(
- IMemAllocator *pPreferred, ALLOCATOR_PROPERTIES *pProps, IMemAllocator **ppActual);
-
- HRESULT STDMETHODCALLTYPE Request(IMediaSample *pSample, DWORD_PTR dwUser);
-
- HRESULT STDMETHODCALLTYPE WaitForNext(
- DWORD dwTimeout, IMediaSample **ppSample, DWORD_PTR *pdwUser);
-
- HRESULT STDMETHODCALLTYPE SyncReadAligned(IMediaSample *pSample);
-
- HRESULT STDMETHODCALLTYPE SyncRead(LONGLONG llPosition, LONG lLength, BYTE *pBuffer);
-
- HRESULT STDMETHODCALLTYPE Length(LONGLONG *pTotal, LONGLONG *pAvailable);
-
- HRESULT STDMETHODCALLTYPE BeginFlush();
- HRESULT STDMETHODCALLTYPE EndFlush();
-
-protected:
- void customEvent(QEvent *event);
-
-private Q_SLOTS:
- void readyRead();
-
-private:
- HRESULT blockingRead(LONGLONG position, LONG length, BYTE *buffer, qint64 *bytesRead);
- bool nonBlockingRead(
- LONGLONG position, LONG length, BYTE *buffer, qint64 *bytesRead, HRESULT *result);
- void flushRequests();
-
- DirectShowIOSource *m_source;
- QIODevice *m_device;
- DirectShowEventLoop *m_loop;
- DirectShowSampleRequest *m_pendingHead;
- DirectShowSampleRequest *m_pendingTail;
- DirectShowSampleRequest *m_readyHead;
- DirectShowSampleRequest *m_readyTail;
- LONGLONG m_synchronousPosition;
- LONG m_synchronousLength;
- qint64 m_synchronousBytesRead;
- BYTE *m_synchronousBuffer;
- HRESULT m_synchronousResult;
- LONGLONG m_totalLength;
- LONGLONG m_availableLength;
- bool m_flushing;
- QMutex m_mutex;
- QWaitCondition m_wait;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp
deleted file mode 100644
index 7b66d56..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.cpp
+++ /dev/null
@@ -1,639 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "directshowiosource.h"
-
-#include "directshowglobal.h"
-#include "directshowmediatype.h"
-#include "directshowpinenum.h"
-
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qurl.h>
-
-QT_BEGIN_NAMESPACE
-
-static const GUID directshow_subtypes[] =
-{
- MEDIASUBTYPE_Avi,
- MEDIASUBTYPE_WAVE,
- MEDIASUBTYPE_NULL
-};
-
-DirectShowIOSource::DirectShowIOSource(DirectShowEventLoop *loop)
- : m_ref(1)
- , m_state(State_Stopped)
- , m_reader(0)
- , m_loop(loop)
- , m_graph(0)
- , m_clock(0)
- , m_allocator(0)
- , m_peerPin(0)
- , m_pinId(QLatin1String("Data"))
-{
- QVector<AM_MEDIA_TYPE> mediaTypes;
-
- AM_MEDIA_TYPE type =
- {
- MEDIATYPE_Stream, // majortype
- MEDIASUBTYPE_NULL, // subtype
- TRUE, // bFixedSizeSamples
- FALSE, // bTemporalCompression
- 1, // lSampleSize
- GUID_NULL, // formattype
- 0, // pUnk
- 0, // cbFormat
- 0, // pbFormat
- };
-
- static const int count = sizeof(directshow_subtypes) / sizeof(GUID);
-
- for (int i = 0; i < count; ++i) {
- type.subtype = directshow_subtypes[i];
- mediaTypes.append(type);
- }
-
- setMediaTypes(mediaTypes);
-}
-
-DirectShowIOSource::~DirectShowIOSource()
-{
- Q_ASSERT(m_ref == 0);
-
- delete m_reader;
-}
-
-void DirectShowIOSource::setDevice(QIODevice *device)
-{
- Q_ASSERT(!m_reader);
-
- m_reader = new DirectShowIOReader(device, this, m_loop);
-}
-
-void DirectShowIOSource::setAllocator(IMemAllocator *allocator)
-{
- if (m_allocator)
- m_allocator->Release();
-
- m_allocator = allocator;
-
- if (m_allocator)
- m_allocator->AddRef();
-}
-
-// IUnknown
-HRESULT DirectShowIOSource::QueryInterface(REFIID riid, void **ppvObject)
-{
- // 2dd74950-a890-11d1-abe8-00a0c905f375
- static const GUID iid_IAmFilterMiscFlags = {
- 0x2dd74950, 0xa890, 0x11d1, {0xab, 0xe8, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75}};
-
- if (!ppvObject) {
- return E_POINTER;
- } else if (riid == IID_IUnknown
- || riid == IID_IPersist
- || riid == IID_IMediaFilter
- || riid == IID_IBaseFilter) {
- *ppvObject = static_cast<IBaseFilter *>(this);
- } else if (riid == iid_IAmFilterMiscFlags) {
- *ppvObject = static_cast<IAMFilterMiscFlags *>(this);
- } else if (riid == IID_IPin) {
- *ppvObject = static_cast<IPin *>(this);
- } else if (riid == IID_IAsyncReader) {
- *ppvObject = static_cast<IAsyncReader *>(m_reader);
- } else {
- *ppvObject = 0;
-
- return E_NOINTERFACE;
- }
-
- AddRef();
-
- return S_OK;
-}
-
-ULONG DirectShowIOSource::AddRef()
-{
- return InterlockedIncrement(&m_ref);
-}
-
-ULONG DirectShowIOSource::Release()
-{
- ULONG ref = InterlockedDecrement(&m_ref);
-
- if (ref == 0) {
- delete this;
- }
-
- return ref;
-}
-
-// IPersist
-HRESULT DirectShowIOSource::GetClassID(CLSID *pClassID)
-{
- *pClassID = CLSID_NULL;
-
- return S_OK;
-}
-
-// IMediaFilter
-HRESULT DirectShowIOSource::Run(REFERENCE_TIME tStart)
-{
- QMutexLocker locker(&m_mutex);
-
- m_state = State_Running;
-
- return S_OK;
-}
-
-HRESULT DirectShowIOSource::Pause()
-{
- QMutexLocker locker(&m_mutex);
-
- m_state = State_Paused;
-
- return S_OK;
-}
-
-HRESULT DirectShowIOSource::Stop()
-{
- QMutexLocker locker(&m_mutex);
-
- m_state = State_Stopped;
-
- return S_OK;
-}
-
-HRESULT DirectShowIOSource::GetState(DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
-{
- Q_UNUSED(dwMilliSecsTimeout);
-
- if (!pState) {
- return E_POINTER;
- } else {
- QMutexLocker locker(&m_mutex);
-
- *pState = m_state;
-
- return S_OK;
- }
-}
-
-HRESULT DirectShowIOSource::SetSyncSource(IReferenceClock *pClock)
-{
- QMutexLocker locker(&m_mutex);
-
- if (m_clock)
- m_clock->Release();
-
- m_clock = pClock;
-
- if (m_clock)
- m_clock->AddRef();
-
- return S_OK;
-}
-
-HRESULT DirectShowIOSource::GetSyncSource(IReferenceClock **ppClock)
-{
- if (!ppClock) {
- return E_POINTER;
- } else {
- if (!m_clock) {
- *ppClock = 0;
-
- return S_FALSE;
- } else {
- m_clock->AddRef();
-
- *ppClock = m_clock;
-
- return S_OK;
- }
- }
-}
-
-// IBaseFilter
-HRESULT DirectShowIOSource::EnumPins(IEnumPins **ppEnum)
-{
- if (!ppEnum) {
- return E_POINTER;
- } else {
- *ppEnum = new DirectShowPinEnum(QList<IPin *>() << this);
-
- return S_OK;
- }
-}
-
-HRESULT DirectShowIOSource::FindPin(LPCWSTR Id, IPin **ppPin)
-{
- if (!ppPin || !Id) {
- return E_POINTER;
- } else {
- QMutexLocker locker(&m_mutex);
- if (QString::fromWCharArray(Id) == m_pinId) {
- AddRef();
-
- *ppPin = this;
-
- return S_OK;
- } else {
- *ppPin = 0;
-
- return VFW_E_NOT_FOUND;
- }
- }
-}
-
-HRESULT DirectShowIOSource::JoinFilterGraph(IFilterGraph *pGraph, LPCWSTR pName)
-{
- QMutexLocker locker(&m_mutex);
-
- m_graph = pGraph;
- m_filterName = QString::fromWCharArray(pName);
-
- return S_OK;
-}
-
-HRESULT DirectShowIOSource::QueryFilterInfo(FILTER_INFO *pInfo)
-{
- if (!pInfo) {
- return E_POINTER;
- } else {
- QString name = m_filterName;
-
- if (name.length() >= MAX_FILTER_NAME)
- name.truncate(MAX_FILTER_NAME - 1);
-
- int length = name.toWCharArray(pInfo->achName);
- pInfo->achName[length] = '\0';
-
- if (m_graph)
- m_graph->AddRef();
-
- pInfo->pGraph = m_graph;
-
- return S_OK;
- }
-}
-
-HRESULT DirectShowIOSource::QueryVendorInfo(LPWSTR *pVendorInfo)
-{
- Q_UNUSED(pVendorInfo);
-
- return E_NOTIMPL;
-}
-
-// IAMFilterMiscFlags
-ULONG DirectShowIOSource::GetMiscFlags()
-{
- return AM_FILTER_MISC_FLAGS_IS_SOURCE;
-}
-
-// IPin
-HRESULT DirectShowIOSource::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
-{
- QMutexLocker locker(&m_mutex);
- if (!pReceivePin) {
- return E_POINTER;
- } else if (m_state != State_Stopped) {
- return VFW_E_NOT_STOPPED;
- } else if (m_peerPin) {
- return VFW_E_ALREADY_CONNECTED;
- } else {
- HRESULT hr = VFW_E_TYPE_NOT_ACCEPTED;
-
- m_peerPin = pReceivePin;
- m_peerPin->AddRef();
-
- if (!pmt) {
- IEnumMediaTypes *mediaTypes = 0;
- if (pReceivePin->EnumMediaTypes(&mediaTypes) == S_OK) {
- for (AM_MEDIA_TYPE *type = 0;
- mediaTypes->Next(1, &type, 0) == S_OK;
- DirectShowMediaType::deleteType(type)) {
- switch (tryConnect(pReceivePin, type)) {
- case S_OK:
- DirectShowMediaType::freeData(type);
- mediaTypes->Release();
- return S_OK;
- case VFW_E_NO_TRANSPORT:
- hr = VFW_E_NO_TRANSPORT;
- break;
- default:
- break;
- }
- }
- mediaTypes->Release();
- }
- AM_MEDIA_TYPE type =
- {
- MEDIATYPE_Stream, // majortype
- MEDIASUBTYPE_NULL, // subtype
- TRUE, // bFixedSizeSamples
- FALSE, // bTemporalCompression
- 1, // lSampleSize
- GUID_NULL, // formattype
- 0, // pUnk
- 0, // cbFormat
- 0, // pbFormat
- };
-
- static const int count = sizeof(directshow_subtypes) / sizeof(GUID);
-
- for (int i = 0; i < count; ++i) {
- type.subtype = directshow_subtypes[i];
-
- switch (tryConnect(pReceivePin, &type)) {
- case S_OK:
- return S_OK;
- case VFW_E_NO_TRANSPORT:
- hr = VFW_E_NO_TRANSPORT;
- break;
- default:
- break;
- }
- }
- } else if (pmt->majortype == MEDIATYPE_Stream && (hr = tryConnect(pReceivePin, pmt))) {
- return S_OK;
- }
-
- m_peerPin->Release();
- m_peerPin = 0;
-
- m_mediaType.clear();
-
- return hr;
- }
-}
-
-HRESULT DirectShowIOSource::tryConnect(IPin *pin, const AM_MEDIA_TYPE *type)
-{
- m_mediaType = *type;
-
- HRESULT hr = pin->ReceiveConnection(this, type);
-
- if (!SUCCEEDED(hr)) {
- if (m_allocator) {
- m_allocator->Release();
- m_allocator = 0;
- }
- } else if (!m_allocator) {
- hr = VFW_E_NO_TRANSPORT;
-
- if (IMemInputPin *memPin = com_cast<IMemInputPin>(pin, IID_IMemInputPin)) {
- if ((m_allocator = com_new<IMemAllocator>(CLSID_MemoryAllocator, IID_IMemAllocator))) {
- ALLOCATOR_PROPERTIES properties;
- if (memPin->GetAllocatorRequirements(&properties) == S_OK
- || m_allocator->GetProperties(&properties) == S_OK) {
- if (properties.cbAlign == 0)
- properties.cbAlign = 1;
-
- ALLOCATOR_PROPERTIES actualProperties;
- if (SUCCEEDED(hr = m_allocator->SetProperties(&properties, &actualProperties)))
- hr = memPin->NotifyAllocator(m_allocator, TRUE);
- }
- if (!SUCCEEDED(hr)) {
- m_allocator->Release();
- m_allocator = 0;
- }
- }
- memPin->Release();
- }
- if (!SUCCEEDED(hr))
- pin->Disconnect();
- }
- return hr;
-}
-
-HRESULT DirectShowIOSource::ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt)
-{
- Q_UNUSED(pConnector);
- Q_UNUSED(pmt);
- // Output pin.
- return E_NOTIMPL;
-}
-
-HRESULT DirectShowIOSource::Disconnect()
-{
- if (!m_peerPin) {
- return S_FALSE;
- } else if (m_state != State_Stopped) {
- return VFW_E_NOT_STOPPED;
- } else {
- HRESULT hr = m_peerPin->Disconnect();
-
- if (!SUCCEEDED(hr))
- return hr;
-
- if (m_allocator) {
- m_allocator->Release();
- m_allocator = 0;
- }
-
- m_peerPin->Release();
- m_peerPin = 0;
-
- m_mediaType.clear();
-
- return S_OK;
- }
-}
-
-HRESULT DirectShowIOSource::ConnectedTo(IPin **ppPin)
-{
- if (!ppPin) {
- return E_POINTER;
- } else {
- QMutexLocker locker(&m_mutex);
-
- if (!m_peerPin) {
- *ppPin = 0;
-
- return VFW_E_NOT_CONNECTED;
- } else {
- m_peerPin->AddRef();
-
- *ppPin = m_peerPin;
-
- return S_OK;
- }
- }
-}
-
-HRESULT DirectShowIOSource::ConnectionMediaType(AM_MEDIA_TYPE *pmt)
-{
- if (!pmt) {
- return E_POINTER;
- } else {
- QMutexLocker locker(&m_mutex);
-
- if (!m_peerPin) {
- pmt = 0;
-
- return VFW_E_NOT_CONNECTED;
- } else {
- DirectShowMediaType::copy(pmt, m_mediaType);
-
- return S_OK;
- }
- }
-}
-
-HRESULT DirectShowIOSource::QueryPinInfo(PIN_INFO *pInfo)
-{
- if (!pInfo) {
- return E_POINTER;
- } else {
- AddRef();
-
- pInfo->pFilter = this;
- pInfo->dir = PINDIR_OUTPUT;
-
- const int bytes = qMin(MAX_FILTER_NAME, (m_pinId.length() + 1) * 2);
-
- qMemCopy(pInfo->achName, m_pinId.utf16(), bytes);
-
- return S_OK;
- }
-}
-
-HRESULT DirectShowIOSource::QueryId(LPWSTR *Id)
-{
- if (!Id) {
- return E_POINTER;
- } else {
- const int bytes = (m_pinId.length() + 1) * 2;
-
- *Id = static_cast<LPWSTR>(::CoTaskMemAlloc(bytes));
-
- qMemCopy(*Id, m_pinId.utf16(), bytes);
-
- return S_OK;
- }
-}
-
-HRESULT DirectShowIOSource::QueryAccept(const AM_MEDIA_TYPE *pmt)
-{
- if (!pmt) {
- return E_POINTER;
- } else if (pmt->majortype == MEDIATYPE_Stream) {
- return S_OK;
- } else {
- return S_FALSE;
- }
-}
-
-HRESULT DirectShowIOSource::EnumMediaTypes(IEnumMediaTypes **ppEnum)
-{
- if (!ppEnum) {
- return E_POINTER;
- } else {
- *ppEnum = createMediaTypeEnum();
-
- return S_OK;
- }
-}
-
-HRESULT DirectShowIOSource::QueryInternalConnections(IPin **apPin, ULONG *nPin)
-{
- Q_UNUSED(apPin);
- Q_UNUSED(nPin);
-
- return E_NOTIMPL;
-}
-
-HRESULT DirectShowIOSource::EndOfStream()
-{
- return S_OK;
-}
-
-HRESULT DirectShowIOSource::BeginFlush()
-{
- return m_reader->BeginFlush();
-}
-
-HRESULT DirectShowIOSource::EndFlush()
-{
- return m_reader->EndFlush();
-}
-
-HRESULT DirectShowIOSource::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
-{
- Q_UNUSED(tStart);
- Q_UNUSED(tStop);
- Q_UNUSED(dRate);
-
- return S_OK;
-}
-
-HRESULT DirectShowIOSource::QueryDirection(PIN_DIRECTION *pPinDir)
-{
- if (!pPinDir) {
- return E_POINTER;
- } else {
- *pPinDir = PINDIR_OUTPUT;
-
- return S_OK;
- }
-}
-
-QT_END_NAMESPACE
-
-DirectShowRcSource::DirectShowRcSource(DirectShowEventLoop *loop)
- : DirectShowIOSource(loop)
-{
-}
-
-bool DirectShowRcSource::open(const QUrl &url)
-{
- m_file.moveToThread(QCoreApplication::instance()->thread());
-
- m_file.setFileName(QLatin1Char(':') + url.path());
-
- if (m_file.open(QIODevice::ReadOnly)) {
-
- setDevice(&m_file);
-
- return true;
- } else {
- return false;
- }
-}
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.h
deleted file mode 100644
index 1d917df..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowiosource.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWIOSOURCE_H
-#define DIRECTSHOWIOSOURCE_H
-
-#include "directshowglobal.h"
-#include "directshowioreader.h"
-#include "directshowmediatype.h"
-#include "directshowmediatypelist.h"
-
-#include <QtCore/qfile.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowIOSource
- : public DirectShowMediaTypeList
- , public IBaseFilter
- , public IAMFilterMiscFlags
- , public IPin
-{
-public:
- DirectShowIOSource(DirectShowEventLoop *loop);
- ~DirectShowIOSource();
-
- void setDevice(QIODevice *device);
- void setAllocator(IMemAllocator *allocator);
-
- // IUnknown
- HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
- ULONG STDMETHODCALLTYPE AddRef();
- ULONG STDMETHODCALLTYPE Release();
-
- // IPersist
- HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
-
- // IMediaFilter
- HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart);
- HRESULT STDMETHODCALLTYPE Pause();
- HRESULT STDMETHODCALLTYPE Stop();
-
- HRESULT STDMETHODCALLTYPE GetState(DWORD dwMilliSecsTimeout, FILTER_STATE *pState);
-
- HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock);
- HRESULT STDMETHODCALLTYPE GetSyncSource(IReferenceClock **ppClock);
-
- // IBaseFilter
- HRESULT STDMETHODCALLTYPE EnumPins(IEnumPins **ppEnum);
- HRESULT STDMETHODCALLTYPE FindPin(LPCWSTR Id, IPin **ppPin);
-
- HRESULT STDMETHODCALLTYPE JoinFilterGraph(IFilterGraph *pGraph, LPCWSTR pName);
-
- HRESULT STDMETHODCALLTYPE QueryFilterInfo(FILTER_INFO *pInfo);
- HRESULT STDMETHODCALLTYPE QueryVendorInfo(LPWSTR *pVendorInfo);
-
- // IAMFilterMiscFlags
- ULONG STDMETHODCALLTYPE GetMiscFlags();
-
- // IPin
- HRESULT STDMETHODCALLTYPE Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt);
- HRESULT STDMETHODCALLTYPE ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt);
- HRESULT STDMETHODCALLTYPE Disconnect();
- HRESULT STDMETHODCALLTYPE ConnectedTo(IPin **ppPin);
-
- HRESULT STDMETHODCALLTYPE ConnectionMediaType(AM_MEDIA_TYPE *pmt);
-
- HRESULT STDMETHODCALLTYPE QueryPinInfo(PIN_INFO *pInfo);
- HRESULT STDMETHODCALLTYPE QueryId(LPWSTR *Id);
-
- HRESULT STDMETHODCALLTYPE QueryAccept(const AM_MEDIA_TYPE *pmt);
-
- HRESULT STDMETHODCALLTYPE EnumMediaTypes(IEnumMediaTypes **ppEnum);
-
- HRESULT STDMETHODCALLTYPE QueryInternalConnections(IPin **apPin, ULONG *nPin);
-
- HRESULT STDMETHODCALLTYPE EndOfStream();
-
- HRESULT STDMETHODCALLTYPE BeginFlush();
- HRESULT STDMETHODCALLTYPE EndFlush();
-
- HRESULT STDMETHODCALLTYPE NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
-
- HRESULT STDMETHODCALLTYPE QueryDirection(PIN_DIRECTION *pPinDir);
-
-private:
- HRESULT tryConnect(IPin *pin, const AM_MEDIA_TYPE *type);
-
- volatile LONG m_ref;
- FILTER_STATE m_state;
- DirectShowIOReader *m_reader;
- DirectShowEventLoop *m_loop;
- IFilterGraph *m_graph;
- IReferenceClock *m_clock;
- IMemAllocator *m_allocator;
- IPin *m_peerPin;
- DirectShowMediaType m_mediaType;
- QString m_filterName;
- const QString m_pinId;
- QMutex m_mutex;
-};
-
-class DirectShowRcSource : public DirectShowIOSource
-{
-public:
- DirectShowRcSource(DirectShowEventLoop *loop);
-
- bool open(const QUrl &url);
-
-private:
- QFile m_file;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.cpp
deleted file mode 100644
index f8f519d..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "directshowmediatype.h"
-
-
-QT_BEGIN_NAMESPACE
-
-namespace
-{
- struct TypeLookup
- {
- QVideoFrame::PixelFormat pixelFormat;
- GUID mediaType;
- };
-
- static const TypeLookup qt_typeLookup[] =
- {
- { QVideoFrame::Format_RGB32, /*MEDIASUBTYPE_RGB32*/ {0xe436eb7e, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}} },
- { QVideoFrame::Format_BGR24, /*MEDIASUBTYPE_RGB24*/ {0xe436eb7d, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}} },
- { QVideoFrame::Format_RGB565, /*MEDIASUBTYPE_RGB565*/ {0xe436eb7b, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}} },
- { QVideoFrame::Format_RGB555, /*MEDIASUBTYPE_RGB555*/ {0xe436eb7c, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}} },
- { QVideoFrame::Format_AYUV444, /*MEDIASUBTYPE_AYUV*/ {0x56555941, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
- { QVideoFrame::Format_YUYV, /*MEDIASUBTYPE_YUY2*/ {0x32595559, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
- { QVideoFrame::Format_UYVY, /*MEDIASUBTYPE_UYVY*/ {0x59565955, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
- { QVideoFrame::Format_IMC1, /*MEDIASUBTYPE_IMC1*/ {0x31434D49, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
- { QVideoFrame::Format_IMC2, /*MEDIASUBTYPE_IMC2*/ {0x32434D49, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
- { QVideoFrame::Format_IMC3, /*MEDIASUBTYPE_IMC3*/ {0x33434D49, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
- { QVideoFrame::Format_IMC4, /*MEDIASUBTYPE_IMC4*/ {0x34434D49, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
- { QVideoFrame::Format_YV12, /*MEDIASUBTYPE_YV12*/ {0x32315659, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
- { QVideoFrame::Format_NV12, /*MEDIASUBTYPE_NV12*/ {0x3231564E, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} },
- { QVideoFrame::Format_YUV420P, /*MEDIASUBTYPE_IYUV*/ {0x56555949, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}} }
- };
-}
-
-void DirectShowMediaType::copy(AM_MEDIA_TYPE *target, const AM_MEDIA_TYPE &source)
-{
- *target = source;
-
- if (source.cbFormat > 0) {
- target->pbFormat = reinterpret_cast<PBYTE>(CoTaskMemAlloc(source.cbFormat));
- memcpy(target->pbFormat, source.pbFormat, source.cbFormat);
- }
- if (target->pUnk)
- target->pUnk->AddRef();
-}
-
-void DirectShowMediaType::deleteType(AM_MEDIA_TYPE *type)
-{
- freeData(type);
-
- CoTaskMemFree(type);
-}
-
-void DirectShowMediaType::freeData(AM_MEDIA_TYPE *type)
-{
- if (type->cbFormat > 0)
- CoTaskMemFree(type->pbFormat);
-
- if (type->pUnk)
- type->pUnk->Release();
-}
-
-
-GUID DirectShowMediaType::convertPixelFormat(QVideoFrame::PixelFormat format)
-{
- // MEDIASUBTYPE_None;
- static const GUID none = {
- 0xe436eb8e, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70} };
-
- const int count = sizeof(qt_typeLookup) / sizeof(TypeLookup);
-
- for (int i = 0; i < count; ++i)
- if (qt_typeLookup[i].pixelFormat == format)
- return qt_typeLookup[i].mediaType;
- return none;
-}
-
-QVideoSurfaceFormat DirectShowMediaType::formatFromType(const AM_MEDIA_TYPE &type)
-{
- const int count = sizeof(qt_typeLookup) / sizeof(TypeLookup);
-
- for (int i = 0; i < count; ++i) {
- if (IsEqualGUID(qt_typeLookup[i].mediaType, type.subtype) && type.cbFormat > 0) {
- if (IsEqualGUID(type.formattype, FORMAT_VideoInfo)) {
- VIDEOINFOHEADER *header = reinterpret_cast<VIDEOINFOHEADER *>(type.pbFormat);
-
- QVideoSurfaceFormat format(
- QSize(header->bmiHeader.biWidth, qAbs(header->bmiHeader.biHeight)),
- qt_typeLookup[i].pixelFormat);
-
- if (header->AvgTimePerFrame > 0)
- format.setFrameRate(10000 /header->AvgTimePerFrame);
-
- switch (qt_typeLookup[i].pixelFormat) {
- case QVideoFrame::Format_RGB32:
- case QVideoFrame::Format_BGR24:
- case QVideoFrame::Format_RGB565:
- case QVideoFrame::Format_RGB555:
- if (header->bmiHeader.biHeight >= 0)
- format.setScanLineDirection(QVideoSurfaceFormat::BottomToTop);
- break;
- default:
- break;
- }
-
- return format;
- } else if (IsEqualGUID(type.formattype, FORMAT_VideoInfo2)) {
- VIDEOINFOHEADER2 *header = reinterpret_cast<VIDEOINFOHEADER2 *>(type.pbFormat);
-
- QVideoSurfaceFormat format(
- QSize(header->bmiHeader.biWidth, qAbs(header->bmiHeader.biHeight)),
- qt_typeLookup[i].pixelFormat);
-
- if (header->AvgTimePerFrame > 0)
- format.setFrameRate(10000 / header->AvgTimePerFrame);
-
- switch (qt_typeLookup[i].pixelFormat) {
- case QVideoFrame::Format_RGB32:
- case QVideoFrame::Format_BGR24:
- case QVideoFrame::Format_RGB565:
- case QVideoFrame::Format_RGB555:
- if (header->bmiHeader.biHeight >= 0)
- format.setScanLineDirection(QVideoSurfaceFormat::BottomToTop);
- break;
- default:
- break;
- }
-
- return format;
- }
- }
- }
- return QVideoSurfaceFormat();
-}
-
-int DirectShowMediaType::bytesPerLine(const QVideoSurfaceFormat &format)
-{
- switch (format.pixelFormat()) {
- // 32 bpp packed formats.
- case QVideoFrame::Format_RGB32:
- case QVideoFrame::Format_AYUV444:
- return format.frameWidth() * 4;
- // 24 bpp packed formats.
- case QVideoFrame::Format_RGB24:
- return format.frameWidth() * 3 + 3 - format.frameWidth() % 4;
- // 16 bpp packed formats.
- case QVideoFrame::Format_RGB565:
- case QVideoFrame::Format_RGB555:
- case QVideoFrame::Format_YUYV:
- case QVideoFrame::Format_UYVY:
- return format.frameWidth() * 2 + 3 - format.frameWidth() % 4;
- // Planar formats.
- case QVideoFrame::Format_IMC1:
- case QVideoFrame::Format_IMC2:
- case QVideoFrame::Format_IMC3:
- case QVideoFrame::Format_IMC4:
- case QVideoFrame::Format_YV12:
- case QVideoFrame::Format_NV12:
- case QVideoFrame::Format_YUV420P:
- return format.frameWidth() + 3 - format.frameWidth() % 4;
- default:
- return 0;
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.h
deleted file mode 100644
index 3cc7307..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatype.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWMEDIATYPE_H
-#define DIRECTSHOWMEDIATYPE_H
-
-#include <QtMultimedia/qvideosurfaceformat.h>
-
-#include <dshow.h>
-#include <dvdmedia.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
-class DirectShowMediaType : public AM_MEDIA_TYPE
-{
-public:
- DirectShowMediaType() { memset(this, 0, sizeof(DirectShowMediaType)); }
- DirectShowMediaType(const AM_MEDIA_TYPE &type) { copy(this, type); }
- DirectShowMediaType(const DirectShowMediaType &other) { copy(this, other); }
- DirectShowMediaType &operator =(const AM_MEDIA_TYPE &type) {
- freeData(this); copy(this, type); return *this; }
- DirectShowMediaType &operator =(const DirectShowMediaType &other) {
- freeData(this); copy(this, other); return *this; }
- ~DirectShowMediaType() { freeData(this); }
-
- void clear() { freeData(this); memset(this, 0, sizeof(DirectShowMediaType)); }
-
- static void copy(AM_MEDIA_TYPE *target, const AM_MEDIA_TYPE &source);
- static void freeData(AM_MEDIA_TYPE *type);
- static void deleteType(AM_MEDIA_TYPE *type);
-
- static GUID convertPixelFormat(QVideoFrame::PixelFormat format);
- static QVideoSurfaceFormat formatFromType(const AM_MEDIA_TYPE &type);
-
- static int bytesPerLine(const QVideoSurfaceFormat &format);
-};
-
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.cpp
deleted file mode 100644
index f67794a..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.cpp
+++ /dev/null
@@ -1,229 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "directshowmediatypelist.h"
-
-#include "directshowmediatype.h"
-#include "videosurfacefilter.h"
-
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowMediaTypeEnum : public IEnumMediaTypes
-{
-public:
- DirectShowMediaTypeEnum(DirectShowMediaTypeList *list, int token, int index = 0);
- ~DirectShowMediaTypeEnum();
-
- // IUnknown
- HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
- ULONG STDMETHODCALLTYPE AddRef();
- ULONG STDMETHODCALLTYPE Release();
-
- // IEnumMediaTypes
- HRESULT STDMETHODCALLTYPE Next(
- ULONG cMediaTypes, AM_MEDIA_TYPE **ppMediaTypes, ULONG *pcFetched);
- HRESULT STDMETHODCALLTYPE Skip(ULONG cMediaTypes);
- HRESULT STDMETHODCALLTYPE Reset();
-
- HRESULT STDMETHODCALLTYPE Clone(IEnumMediaTypes **ppEnum);
-
-private:
- LONG m_ref;
- DirectShowMediaTypeList *m_list;
- int m_mediaTypeToken;
- int m_index;
-};
-
-
-DirectShowMediaTypeEnum::DirectShowMediaTypeEnum(
- DirectShowMediaTypeList *list, int token, int index)
- : m_ref(1)
- , m_list(list)
- , m_mediaTypeToken(token)
- , m_index(index)
-{
- m_list->AddRef();
-}
-
-DirectShowMediaTypeEnum::~DirectShowMediaTypeEnum()
-{
- m_list->Release();
-}
-
-HRESULT DirectShowMediaTypeEnum::QueryInterface(REFIID riid, void **ppvObject)
-{
- if (!ppvObject) {
- return E_POINTER;
- } else if (riid == IID_IUnknown
- || riid == IID_IEnumMediaTypes) {
- *ppvObject = static_cast<IEnumMediaTypes *>(this);
- } else {
- *ppvObject = 0;
-
- return E_NOINTERFACE;
- }
-
- AddRef();
-
- return S_OK;
-}
-
-ULONG DirectShowMediaTypeEnum::AddRef()
-{
- return InterlockedIncrement(&m_ref);
-}
-
-ULONG DirectShowMediaTypeEnum::Release()
-{
- ULONG ref = InterlockedDecrement(&m_ref);
-
- if (ref == 0) {
- delete this;
- }
-
- return ref;
-}
-
-HRESULT DirectShowMediaTypeEnum::Next(
- ULONG cMediaTypes, AM_MEDIA_TYPE **ppMediaTypes, ULONG *pcFetched)
-{
- return m_list->nextMediaType(m_mediaTypeToken, &m_index, cMediaTypes, ppMediaTypes, pcFetched);
-}
-
-HRESULT DirectShowMediaTypeEnum::Skip(ULONG cMediaTypes)
-{
- return m_list->skipMediaType(m_mediaTypeToken, &m_index, cMediaTypes);
-}
-
-HRESULT DirectShowMediaTypeEnum::Reset()
-{
- m_mediaTypeToken = m_list->currentMediaTypeToken();
- m_index = 0;
-
- return S_OK;
-}
-
-HRESULT DirectShowMediaTypeEnum::Clone(IEnumMediaTypes **ppEnum)
-{
- return m_list->cloneMediaType(m_mediaTypeToken, m_index, ppEnum);
-}
-
-
-DirectShowMediaTypeList::DirectShowMediaTypeList()
- : m_mediaTypeToken(0)
-{
-}
-
-IEnumMediaTypes *DirectShowMediaTypeList::createMediaTypeEnum()
-{
- return new DirectShowMediaTypeEnum(this, m_mediaTypeToken, 0);
-}
-
-
-void DirectShowMediaTypeList::setMediaTypes(const QVector<AM_MEDIA_TYPE> &types)
-{
- ++m_mediaTypeToken;
-
- m_mediaTypes = types;
-}
-
-
-int DirectShowMediaTypeList::currentMediaTypeToken()
-{
- return m_mediaTypeToken;
-}
-
-HRESULT DirectShowMediaTypeList::nextMediaType(
- int token, int *index, ULONG count, AM_MEDIA_TYPE **types, ULONG *fetchedCount)
-{
- if (!types || (count != 1 && !fetchedCount)) {
- return E_POINTER;
- } else if (m_mediaTypeToken != token) {
- return VFW_E_ENUM_OUT_OF_SYNC;
- } else {
- int boundedCount = qBound<int>(0, count, m_mediaTypes.count() - *index);
-
- for (int i = 0; i < boundedCount; ++i, ++(*index)) {
- types[i] = reinterpret_cast<AM_MEDIA_TYPE *>(CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)));
-
- if (types[i]) {
- DirectShowMediaType::copy(types[i], m_mediaTypes.at(*index));
- } else {
- for (--i; i >= 0; --i)
- CoTaskMemFree(types[i]);
-
- if (fetchedCount)
- *fetchedCount = 0;
-
- return E_OUTOFMEMORY;
- }
- }
- if (fetchedCount)
- *fetchedCount = boundedCount;
-
- return boundedCount == count ? S_OK : S_FALSE;
- }
-}
-
-HRESULT DirectShowMediaTypeList::skipMediaType(int token, int *index, ULONG count)
-{
- if (m_mediaTypeToken != token) {
- return VFW_E_ENUM_OUT_OF_SYNC;
- } else {
- *index = qMin<int>(*index + count, m_mediaTypes.size());
-
- return *index < m_mediaTypes.size() ? S_OK : S_FALSE;
- }
-}
-
-HRESULT DirectShowMediaTypeList::cloneMediaType(int token, int index, IEnumMediaTypes **enumeration)
-{
- if (m_mediaTypeToken != token) {
- return VFW_E_ENUM_OUT_OF_SYNC;
- } else {
- *enumeration = new DirectShowMediaTypeEnum(this, token, index);
-
- return S_OK;
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.h
deleted file mode 100644
index b49f24c..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowmediatypelist.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWMEDIATYPELIST_H
-#define DIRECTSHOWMEDIATYPELIST_H
-
-#include <QtCore/qvector.h>
-
-#include <dshow.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowMediaTypeList : public IUnknown
-{
-public:
- DirectShowMediaTypeList();
-
- IEnumMediaTypes *createMediaTypeEnum();
-
- void setMediaTypes(const QVector<AM_MEDIA_TYPE> &types);
-
- virtual int currentMediaTypeToken();
- virtual HRESULT nextMediaType(
- int token, int *index, ULONG count, AM_MEDIA_TYPE **types, ULONG *fetchedCount);
- virtual HRESULT skipMediaType(int token, int *index, ULONG count);
- virtual HRESULT cloneMediaType(int token, int index, IEnumMediaTypes **enumeration);
-
-private:
- int m_mediaTypeToken;
- QVector<AM_MEDIA_TYPE> m_mediaTypes;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.cpp
deleted file mode 100644
index 7f67a82..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.cpp
+++ /dev/null
@@ -1,370 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 <dshow.h>
-#include <initguid.h>
-#include <qnetwork.h>
-
-#include "directshowmetadatacontrol.h"
-
-#include "directshowplayerservice.h"
-
-#include <QtCore/qcoreapplication.h>
-
-
-QT_BEGIN_NAMESPACE
-
-#ifndef QT_NO_WMSDK
-namespace
-{
- struct QWMMetaDataKeyLookup
- {
- QtMediaServices::MetaData key;
- const wchar_t *token;
- };
-}
-
-static const QWMMetaDataKeyLookup qt_wmMetaDataKeys[] =
-{
- { QtMediaServices::Title, L"Title" },
- { QtMediaServices::SubTitle, L"WM/SubTitle" },
- { QtMediaServices::Author, L"Author" },
- { QtMediaServices::Comment, L"Comment" },
- { QtMediaServices::Description, L"Description" },
- { QtMediaServices::Category, L"WM/Category" },
- { QtMediaServices::Genre, L"WM/Genre" },
- //{ QtMediaServices::Date, 0 },
- { QtMediaServices::Year, L"WM/Year" },
- { QtMediaServices::UserRating, L"UserRating" },
- //{ QtMediaServices::MetaDatawords, 0 },
- { QtMediaServices::Language, L"Language" },
- { QtMediaServices::Publisher, L"WM/Publisher" },
- { QtMediaServices::Copyright, L"Copyright" },
- { QtMediaServices::ParentalRating, L"ParentalRating" },
- { QtMediaServices::RatingOrganisation, L"RatingOrganisation" },
-
- // Media
- { QtMediaServices::Size, L"FileSize" },
- { QtMediaServices::MediaType, L"MediaType" },
- { QtMediaServices::Duration, L"Duration" },
-
- // Audio
- { QtMediaServices::AudioBitRate, L"AudioBitRate" },
- { QtMediaServices::AudioCodec, L"AudioCodec" },
- { QtMediaServices::ChannelCount, L"ChannelCount" },
- { QtMediaServices::SampleRate, L"Frequency" },
-
- // Music
- { QtMediaServices::AlbumTitle, L"WM/AlbumTitle" },
- { QtMediaServices::AlbumArtist, L"WM/AlbumArtist" },
- { QtMediaServices::ContributingArtist, L"Author" },
- { QtMediaServices::Composer, L"WM/Composer" },
- { QtMediaServices::Conductor, L"WM/Conductor" },
- { QtMediaServices::Lyrics, L"WM/Lyrics" },
- { QtMediaServices::Mood, L"WM/Mood" },
- { QtMediaServices::TrackNumber, L"WM/TrackNumber" },
- //{ QtMediaServices::TrackCount, 0 },
- //{ QtMediaServices::CoverArtUriSmall, 0 },
- //{ QtMediaServices::CoverArtUriLarge, 0 },
-
- // Image/Video
- //{ QtMediaServices::Resolution, 0 },
- //{ QtMediaServices::PixelAspectRatio, 0 },
-
- // Video
- //{ QtMediaServices::FrameRate, 0 },
- { QtMediaServices::VideoBitRate, L"VideoBitRate" },
- { QtMediaServices::VideoCodec, L"VideoCodec" },
-
- //{ QtMediaServices::PosterUri, 0 },
-
- // Movie
- { QtMediaServices::ChapterNumber, L"ChapterNumber" },
- { QtMediaServices::Director, L"WM/Director" },
- { QtMediaServices::LeadPerformer, L"LeadPerformer" },
- { QtMediaServices::Writer, L"WM/Writer" },
-
- // Photos
- { QtMediaServices::CameraManufacturer, L"CameraManufacturer" },
- { QtMediaServices::CameraModel, L"CameraModel" },
- { QtMediaServices::Event, L"Event" },
- { QtMediaServices::Subject, L"Subject" }
-};
-
-static QVariant getValue(IWMHeaderInfo *header, const wchar_t *key)
-{
- WORD streamNumber = 0;
- WMT_ATTR_DATATYPE type = WMT_TYPE_DWORD;
- WORD size = 0;
-
- if (header->GetAttributeByName(&streamNumber, key, &type, 0, &size) == S_OK) {
- switch (type) {
- case WMT_TYPE_DWORD:
- if (size == sizeof(DWORD)) {
- DWORD word;
- if (header->GetAttributeByName(
- &streamNumber,
- key,
- &type,
- reinterpret_cast<BYTE *>(&word),
- &size) == S_OK) {
- return int(word);
- }
- }
- break;
- case WMT_TYPE_STRING:
- {
- QString string;
- string.resize(size / 2 - 1);
-
- if (header->GetAttributeByName(
- &streamNumber,
- key,
- &type,
- reinterpret_cast<BYTE *>(const_cast<ushort *>(string.utf16())),
- &size) == S_OK) {
- return string;
- }
- }
- break;
- case WMT_TYPE_BINARY:
- {
- QByteArray bytes;
- bytes.resize(size);
- if (header->GetAttributeByName(
- &streamNumber,
- key,
- &type,
- reinterpret_cast<BYTE *>(bytes.data()),
- &size) == S_OK) {
- return bytes;
- }
- }
- break;
- case WMT_TYPE_BOOL:
- if (size == sizeof(DWORD)) {
- DWORD word;
- if (header->GetAttributeByName(
- &streamNumber,
- key,
- &type,
- reinterpret_cast<BYTE *>(&word),
- &size) == S_OK) {
- return bool(word);
- }
- }
- break;
- case WMT_TYPE_QWORD:
- if (size == sizeof(QWORD)) {
- QWORD word;
- if (header->GetAttributeByName(
- &streamNumber,
- key,
- &type,
- reinterpret_cast<BYTE *>(&word),
- &size) == S_OK) {
- return qint64(word);
- }
- }
- break;
- case WMT_TYPE_WORD:
- if (size == sizeof(WORD)){
- WORD word;
- if (header->GetAttributeByName(
- &streamNumber,
- key,
- &type,
- reinterpret_cast<BYTE *>(&word),
- &size) == S_OK) {
- return short(word);
- }
- }
- break;
- case WMT_TYPE_GUID:
- if (size == 16) {
- }
- break;
- default:
- break;
- }
- }
- return QVariant();
-}
-#endif
-
-DirectShowMetaDataControl::DirectShowMetaDataControl(QObject *parent)
- : QMetaDataControl(parent)
- , m_content(0)
-#ifndef QT_NO_WMSDK
- , m_headerInfo(0)
-#endif
-{
-}
-
-DirectShowMetaDataControl::~DirectShowMetaDataControl()
-{
-}
-
-bool DirectShowMetaDataControl::isWritable() const
-{
- return false;
-}
-
-bool DirectShowMetaDataControl::isMetaDataAvailable() const
-{
-#ifndef QT_NO_WMSDK
- return m_content || m_headerInfo;
-#else
- return m_content;
-#endif
-}
-
-QVariant DirectShowMetaDataControl::metaData(QtMediaServices::MetaData key) const
-{
- QVariant value;
-
-#ifndef QT_NO_WMSDK
- if (m_headerInfo) {
- static const int count = sizeof(qt_wmMetaDataKeys) / sizeof(QWMMetaDataKeyLookup);
- for (int i = 0; i < count; ++i) {
- if (qt_wmMetaDataKeys[i].key == key) {
- value = getValue(m_headerInfo, qt_wmMetaDataKeys[i].token);
- break;
- }
- }
- } else if (m_content) {
-#else
- if (m_content) {
-#endif
- BSTR string = 0;
-
- switch (key) {
- case QtMediaServices::Author:
- m_content->get_AuthorName(&string);
- break;
- case QtMediaServices::Title:
- m_content->get_Title(&string);
- break;
- case QtMediaServices::ParentalRating:
- m_content->get_Rating(&string);
- break;
- case QtMediaServices::Description:
- m_content->get_Description(&string);
- break;
- case QtMediaServices::Copyright:
- m_content->get_Copyright(&string);
- break;
- default:
- break;
- }
-
- if (string) {
- value = QString::fromUtf16(reinterpret_cast<ushort *>(string), ::SysStringLen(string));
-
- ::SysFreeString(string);
- }
- }
- return value;
-}
-
-void DirectShowMetaDataControl::setMetaData(QtMediaServices::MetaData, const QVariant &)
-{
-}
-
-QList<QtMediaServices::MetaData> DirectShowMetaDataControl::availableMetaData() const
-{
- return QList<QtMediaServices::MetaData>();
-}
-
-QVariant DirectShowMetaDataControl::extendedMetaData(const QString &) const
-{
- return QVariant();
-}
-
-void DirectShowMetaDataControl::setExtendedMetaData(const QString &, const QVariant &)
-{
-}
-
-QStringList DirectShowMetaDataControl::availableExtendedMetaData() const
-{
- return QStringList();
-}
-
-void DirectShowMetaDataControl::updateGraph(IFilterGraph2 *graph, IBaseFilter *source)
-{
- if (m_content)
- m_content->Release();
-
- if (!graph || graph->QueryInterface(
- IID_IAMMediaContent, reinterpret_cast<void **>(&m_content)) != S_OK) {
- m_content = 0;
- }
-
-#ifdef QT_NO_WMSDK
- Q_UNUSED(source);
-#else
- if (m_headerInfo)
- m_headerInfo->Release();
-
- m_headerInfo = com_cast<IWMHeaderInfo>(source, IID_IWMHeaderInfo);
-#endif
- // DirectShowMediaPlayerService holds a lock at this point so defer emitting signals to a later
- // time.
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(MetaDataChanged)));
-}
-
-void DirectShowMetaDataControl::customEvent(QEvent *event)
-{
- if (event->type() == QEvent::Type(MetaDataChanged)) {
- event->accept();
-
- emit metaDataChanged();
-#ifndef QT_NO_WMSDK
- emit metaDataAvailableChanged(m_content || m_headerInfo);
-#else
- emit metaDataAvailableChanged(m_content);
-#endif
- } else {
- QMetaDataControl::customEvent(event);
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.h
deleted file mode 100644
index e368f00..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowmetadatacontrol.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWMETADATACONTROL_H
-#define DIRECTSHOWMETADATACONTROL_H
-
-#include "directshowglobal.h"
-
-#include <QtMediaServices/qmetadatacontrol.h>
-
-#include <qnetwork.h>
-
-#ifndef QT_NO_WMSDK
-#include <wmsdk.h>
-#endif
-
-#include <QtCore/qcoreevent.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowPlayerService;
-
-
-class DirectShowMetaDataControl : public QMetaDataControl
-{
- Q_OBJECT
-public:
- DirectShowMetaDataControl(QObject *parent = 0);
- ~DirectShowMetaDataControl();
-
- bool isWritable() const;
- bool isMetaDataAvailable() const;
-
- QVariant metaData(QtMediaServices::MetaData key) const;
- void setMetaData(QtMediaServices::MetaData key, const QVariant &value);
- QList<QtMediaServices::MetaData> availableMetaData() const;
-
- QVariant extendedMetaData(const QString &key) const;
- void setExtendedMetaData(const QString &key, const QVariant &value);
- QStringList availableExtendedMetaData() const;
-
- void updateGraph(IFilterGraph2 *graph, IBaseFilter *source);
-
-protected:
- void customEvent(QEvent *event);
-
-private:
- enum Event
- {
- MetaDataChanged = QEvent::User
- };
-
- IAMMediaContent *m_content;
-#ifndef QT_NO_WMSDK
- IWMHeaderInfo *m_headerInfo;
-#endif
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.cpp
deleted file mode 100644
index 02b1a3b..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "directshowpinenum.h"
-
-#include <QtMediaServices>
-
-
-QT_BEGIN_NAMESPACE
-
-DirectShowPinEnum::DirectShowPinEnum(const QList<IPin *> &pins)
- : m_ref(1)
- , m_pins(pins)
- , m_index(0)
-{
- foreach (IPin *pin, m_pins)
- pin->AddRef();
-}
-
-DirectShowPinEnum::~DirectShowPinEnum()
-{
- foreach (IPin *pin, m_pins)
- pin->Release();
-}
-
-HRESULT DirectShowPinEnum::QueryInterface(REFIID riid, void **ppvObject)
-{
- if (riid == IID_IUnknown
- || riid == IID_IEnumPins) {
- AddRef();
-
- *ppvObject = static_cast<IEnumPins *>(this);
-
- return S_OK;
- } else {
- *ppvObject = 0;
-
- return E_NOINTERFACE;
- }
-}
-
-ULONG DirectShowPinEnum::AddRef()
-{
- return InterlockedIncrement(&m_ref);
-}
-
-ULONG DirectShowPinEnum::Release()
-{
- ULONG ref = InterlockedDecrement(&m_ref);
-
- if (ref == 0) {
- delete this;
- }
-
- return ref;
-}
-
-HRESULT DirectShowPinEnum::Next(ULONG cPins, IPin **ppPins, ULONG *pcFetched)
-{
- if (ppPins && (pcFetched || cPins == 1)) {
- ULONG count = qBound<ULONG>(0, cPins, m_pins.count() - m_index);
-
- for (ULONG i = 0; i < count; ++i, ++m_index) {
- ppPins[i] = m_pins.at(m_index);
- ppPins[i]->AddRef();
- }
-
- if (pcFetched)
- *pcFetched = count;
-
- return count == cPins ? S_OK : S_FALSE;
- } else {
- return E_POINTER;
- }
-}
-
-HRESULT DirectShowPinEnum::Skip(ULONG cPins)
-{
- m_index = qMin(int(m_index + cPins), m_pins.count());
-
- return m_index < m_pins.count() ? S_OK : S_FALSE;
-}
-
-HRESULT DirectShowPinEnum::Reset()
-{
- m_index = 0;
-
- return S_OK;
-}
-
-HRESULT DirectShowPinEnum::Clone(IEnumPins **ppEnum)
-{
- if (ppEnum) {
- *ppEnum = new DirectShowPinEnum(m_pins);
-
- return S_OK;
- } else {
- return E_POINTER;
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.h
deleted file mode 100644
index 40d99ea..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowpinenum.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWPINENUM_H
-#define DIRECTSHOWPINENUM_H
-
-#include <QtCore/qlist.h>
-
-#include <dshow.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowPinEnum : public IEnumPins
-{
-public:
- DirectShowPinEnum(const QList<IPin *> &pins);
- ~DirectShowPinEnum();
-
- // IUnknown
- HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
- ULONG STDMETHODCALLTYPE AddRef();
- ULONG STDMETHODCALLTYPE Release();
-
- // IEnumPins
- HRESULT STDMETHODCALLTYPE Next(ULONG cPins, IPin **ppPins, ULONG *pcFetched);
- HRESULT STDMETHODCALLTYPE Skip(ULONG cPins);
- HRESULT STDMETHODCALLTYPE Reset();
- HRESULT STDMETHODCALLTYPE Clone(IEnumPins **ppEnum);
-
-private:
- LONG m_ref;
- QList<IPin *> m_pins;
- int m_index;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.cpp
deleted file mode 100644
index 67d07e1..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "directshowplayercontrol.h"
-
-#include "directshowplayerservice.h"
-
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qmath.h>
-
-
-QT_BEGIN_NAMESPACE
-
-static int volumeToDecibels(int volume)
-{
- if (volume == 0) {
- return -10000;
- } else if (volume == 100) {
- return 0;
-#ifdef QT_USE_MATH_H_FLOATS
- } else if (sizeof(qreal) == sizeof(float)) {
- return qRound(::log10f(float(volume) / 100) * 5000);
-#endif
- } else {
- return qRound(::log10(qreal(volume) / 100) * 5000);
- }
-}
-
-static int decibelsToVolume(int dB)
-{
- if (dB == -10000) {
- return 0;
- } else if (dB == 0) {
- return 100;
- } else {
- return qRound(100 * qPow(10, qreal(dB) / 5000));
- }
-}
-
-DirectShowPlayerControl::DirectShowPlayerControl(DirectShowPlayerService *service, QObject *parent)
- : QMediaPlayerControl(parent)
- , m_service(service)
- , m_audio(0)
- , m_updateProperties(0)
- , m_state(QMediaPlayer::StoppedState)
- , m_status(QMediaPlayer::UnknownMediaStatus)
- , m_error(QMediaPlayer::NoError)
- , m_streamTypes(0)
- , m_muteVolume(-1)
- , m_position(0)
- , m_duration(0)
- , m_playbackRate(1.0)
- , m_seekable(false)
-{
-}
-
-DirectShowPlayerControl::~DirectShowPlayerControl()
-{
- if (m_audio)
- m_audio->Release();
-}
-
-QMediaPlayer::State DirectShowPlayerControl::state() const
-{
- return m_state;
-}
-
-QMediaPlayer::MediaStatus DirectShowPlayerControl::mediaStatus() const
-{
- return m_status;
-}
-
-qint64 DirectShowPlayerControl::duration() const
-{
- return m_duration;
-}
-
-qint64 DirectShowPlayerControl::position() const
-{
- return const_cast<qint64 &>(m_position) = m_service->position();
-}
-
-void DirectShowPlayerControl::setPosition(qint64 position)
-{
- m_service->seek(position);
-}
-
-int DirectShowPlayerControl::volume() const
-{
- if (m_muteVolume >= 0) {
- return m_muteVolume;
- } else if (m_audio) {
- long dB = 0;
-
- m_audio->get_Volume(&dB);
-
- return decibelsToVolume(dB);
- } else {
- return 0;
- }
-}
-
-void DirectShowPlayerControl::setVolume(int volume)
-{
- int boundedVolume = qBound(0, volume, 100);
-
- if (m_muteVolume >= 0) {
- m_muteVolume = boundedVolume;
-
- emit volumeChanged(m_muteVolume);
- } else if (m_audio) {
- m_audio->put_Volume(volumeToDecibels(volume));
-
- emit volumeChanged(boundedVolume);
- }
-}
-
-bool DirectShowPlayerControl::isMuted() const
-{
- return m_muteVolume >= 0;
-}
-
-void DirectShowPlayerControl::setMuted(bool muted)
-{
- if (muted && m_muteVolume < 0) {
- if (m_audio) {
- long dB = 0;
-
- m_audio->get_Volume(&dB);
-
- m_muteVolume = decibelsToVolume(dB);
-
- m_audio->put_Volume(-10000);
- } else {
- m_muteVolume = 0;
- }
-
- emit mutedChanged(muted);
- } else if (!muted && m_muteVolume >= 0) {
- if (m_audio) {
- m_audio->put_Volume(volumeToDecibels(m_muteVolume));
- }
- m_muteVolume = -1;
-
- emit mutedChanged(muted);
- }
-}
-
-int DirectShowPlayerControl::bufferStatus() const
-{
- return m_service->bufferStatus();
-}
-
-bool DirectShowPlayerControl::isAudioAvailable() const
-{
- return m_streamTypes & DirectShowPlayerService::AudioStream;
-}
-
-bool DirectShowPlayerControl::isVideoAvailable() const
-{
- return m_streamTypes & DirectShowPlayerService::VideoStream;
-}
-
-bool DirectShowPlayerControl::isSeekable() const
-{
- return m_seekable;
-}
-
-QMediaTimeRange DirectShowPlayerControl::availablePlaybackRanges() const
-{
- return m_service->availablePlaybackRanges();
-}
-
-qreal DirectShowPlayerControl::playbackRate() const
-{
- return m_playbackRate;
-}
-
-void DirectShowPlayerControl::setPlaybackRate(qreal rate)
-{
- if (m_playbackRate != rate) {
- m_service->setRate(rate);
-
- emit playbackRateChanged(m_playbackRate = rate);
- }
-}
-
-QMediaContent DirectShowPlayerControl::media() const
-{
- return m_media;
-}
-
-const QIODevice *DirectShowPlayerControl::mediaStream() const
-{
- return m_stream;
-}
-
-void DirectShowPlayerControl::setMedia(const QMediaContent &media, QIODevice *stream)
-{
- m_media = media;
- m_stream = stream;
-
- m_updateProperties &= PlaybackRateProperty;
-
- m_service->load(media, stream);
-
- emitPropertyChanges();
-}
-
-void DirectShowPlayerControl::play()
-{
- m_service->play();
- emit stateChanged(m_state = QMediaPlayer::PlayingState);
-}
-
-void DirectShowPlayerControl::pause()
-{
- m_service->pause();
- emit stateChanged(m_state = QMediaPlayer::PausedState);
-}
-
-void DirectShowPlayerControl::stop()
-{
- m_service->stop();
- emit stateChanged(m_state = QMediaPlayer::StoppedState);
-}
-
-void DirectShowPlayerControl::customEvent(QEvent *event)
-{
- if (event->type() == QEvent::Type(PropertiesChanged)) {
- emitPropertyChanges();
-
- event->accept();
- } else {
- QMediaPlayerControl::customEvent(event);
- }
-}
-
-void DirectShowPlayerControl::emitPropertyChanges()
-{
- int properties = m_updateProperties;
- m_updateProperties = 0;
-
- if ((properties & ErrorProperty) && m_error != QMediaPlayer::NoError)
- emit error(m_error, m_errorString);
-
- if (properties & PlaybackRateProperty)
- emit playbackRateChanged(m_playbackRate);
-
- if (properties & StreamTypesProperty) {
- emit audioAvailableChanged(m_streamTypes & DirectShowPlayerService::AudioStream);
- emit videoAvailableChanged(m_streamTypes & DirectShowPlayerService::VideoStream);
- }
-
- if (properties & PositionProperty)
- emit positionChanged(m_position);
-
- if (properties & DurationProperty)
- emit durationChanged(m_duration);
-
- if (properties & SeekableProperty)
- emit seekableChanged(m_seekable);
-
- if (properties & StatusProperty)
- emit mediaStatusChanged(m_status);
-
- if (properties & StateProperty)
- emit stateChanged(m_state);
-}
-
-void DirectShowPlayerControl::scheduleUpdate(int properties)
-{
- if (m_updateProperties == 0)
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(PropertiesChanged)));
-
- m_updateProperties |= properties;
-}
-
-void DirectShowPlayerControl::updateState(QMediaPlayer::State state)
-{
- if (m_state != state) {
- m_state = state;
-
- scheduleUpdate(StateProperty);
- }
-}
-
-void DirectShowPlayerControl::updateStatus(QMediaPlayer::MediaStatus status)
-{
- if (m_status != status) {
- m_status = status;
-
- scheduleUpdate(StatusProperty);
- }
-}
-
-void DirectShowPlayerControl::updateMediaInfo(qint64 duration, int streamTypes, bool seekable)
-{
- int properties = 0;
-
- if (m_duration != duration) {
- m_duration = duration;
-
- properties |= DurationProperty;
- }
- if (m_streamTypes != streamTypes) {
- m_streamTypes = streamTypes;
-
- properties |= StreamTypesProperty;
- }
-
- if (m_seekable != seekable) {
- m_seekable = seekable;
-
- properties |= SeekableProperty;
- }
-
- if (properties != 0)
- scheduleUpdate(properties);
-}
-
-void DirectShowPlayerControl::updatePlaybackRate(qreal rate)
-{
- if (m_playbackRate != rate) {
- m_playbackRate = rate;
-
- scheduleUpdate(PlaybackRateProperty);
- }
-}
-
-void DirectShowPlayerControl::updateAudioOutput(IBaseFilter *filter)
-{
- if (m_audio)
- m_audio->Release();
-
- m_audio = com_cast<IBasicAudio>(filter, IID_IBasicAudio);
-}
-
-void DirectShowPlayerControl::updateError(QMediaPlayer::Error error, const QString &errorString)
-{
- m_error = error;
- m_errorString = errorString;
-
- if (m_error != QMediaPlayer::NoError)
- scheduleUpdate(ErrorProperty);
-}
-
-void DirectShowPlayerControl::updatePosition(qint64 position)
-{
- if (m_position != position) {
- m_position = position;
-
- scheduleUpdate(PositionProperty);
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.h
deleted file mode 100644
index 6b5203e..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayercontrol.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWPLAYERCONTROL_H
-#define DIRECTSHOWPLAYERCONTROL_H
-
-#include <QtMediaServices/qmediacontent.h>
-#include <QtMediaServices/qmediaplayercontrol.h>
-
-#include <QtCore/qcoreevent.h>
-
-#include "directshowplayerservice.h"
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowPlayerControl : public QMediaPlayerControl
-{
- Q_OBJECT
-public:
- DirectShowPlayerControl(DirectShowPlayerService *service, QObject *parent = 0);
- ~DirectShowPlayerControl();
-
- QMediaPlayer::State state() const;
-
- QMediaPlayer::MediaStatus mediaStatus() const;
-
- qint64 duration() const;
-
- qint64 position() const;
- void setPosition(qint64 position);
-
- int volume() const;
- void setVolume(int volume);
-
- bool isMuted() const;
- void setMuted(bool muted);
-
- int bufferStatus() const;
-
- bool isAudioAvailable() const;
- bool isVideoAvailable() const;
-
- bool isSeekable() const;
-
- QMediaTimeRange availablePlaybackRanges() const;
-
- qreal playbackRate() const;
- void setPlaybackRate(qreal rate);
-
- QMediaContent media() const;
- const QIODevice *mediaStream() const;
- void setMedia(const QMediaContent &media, QIODevice *stream);
-
- void play();
- void pause();
- void stop();
-
- void updateState(QMediaPlayer::State state);
- void updateStatus(QMediaPlayer::MediaStatus status);
- void updateMediaInfo(qint64 duration, int streamTypes, bool seekable);
- void updatePlaybackRate(qreal rate);
- void updateAudioOutput(IBaseFilter *filter);
- void updateError(QMediaPlayer::Error error, const QString &errorString);
- void updatePosition(qint64 position);
-
-protected:
- void customEvent(QEvent *event);
-
-private:
- enum Properties
- {
- StateProperty = 0x01,
- StatusProperty = 0x02,
- StreamTypesProperty = 0x04,
- DurationProperty = 0x08,
- PlaybackRateProperty = 0x10,
- SeekableProperty = 0x20,
- ErrorProperty = 0x40,
- PositionProperty = 0x80
- };
-
- enum Event
- {
- PropertiesChanged = QEvent::User
- };
-
- void scheduleUpdate(int properties);
- void emitPropertyChanges();
-
- DirectShowPlayerService *m_service;
- IBasicAudio *m_audio;
- QIODevice *m_stream;
- int m_updateProperties;
- QMediaPlayer::State m_state;
- QMediaPlayer::MediaStatus m_status;
- QMediaPlayer::Error m_error;
- int m_streamTypes;
- int m_muteVolume;
- qint64 m_position;
- qint64 m_duration;
- qreal m_playbackRate;
- bool m_seekable;
- QMediaContent m_media;
- QString m_errorString;
-
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp
deleted file mode 100644
index 8ad8cff..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.cpp
+++ /dev/null
@@ -1,1410 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "directshowplayerservice.h"
-
-#include "directshowaudioendpointcontrol.h"
-#include "directshowiosource.h"
-#include "directshowmetadatacontrol.h"
-#include "directshowplayercontrol.h"
-#include "directshowvideooutputcontrol.h"
-#include "directshowvideorenderercontrol.h"
-#include "vmr9videowindowcontrol.h"
-
-#include <QtMediaServices/qmediacontent.h>
-
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qdatetime.h>
-#include <QtCore/qthread.h>
-#include <QtCore/qvarlengtharray.h>
-
-Q_GLOBAL_STATIC(DirectShowEventLoop, qt_directShowEventLoop)
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowPlayerServiceThread : public QThread
-{
-public:
- DirectShowPlayerServiceThread(DirectShowPlayerService *service)
- : m_service(service)
- {
- }
-
-protected:
- void run() { m_service->run(); }
-
-private:
- DirectShowPlayerService *m_service;
-};
-
-DirectShowPlayerService::DirectShowPlayerService(QObject *parent)
- : QMediaService(parent)
- , m_playerControl(0)
- , m_metaDataControl(0)
- , m_videoOutputControl(0)
- , m_videoRendererControl(0)
- , m_videoWindowControl(0)
- , m_audioEndpointControl(0)
- , m_taskThread(0)
- , m_loop(qt_directShowEventLoop())
- , m_pendingTasks(0)
- , m_executingTask(0)
- , m_executedTasks(0)
- , m_taskHandle(::CreateEvent(0, 0, 0, 0))
- , m_eventHandle(0)
- , m_graphStatus(NoMedia)
- , m_stream(0)
- , m_graph(0)
- , m_source(0)
- , m_audioOutput(0)
- , m_videoOutput(0)
- , m_rate(1.0)
- , m_position(0)
- , m_duration(0)
- , m_buffering(false)
- , m_seekable(false)
- , m_atEnd(false)
-{
- m_playerControl = new DirectShowPlayerControl(this);
- m_metaDataControl = new DirectShowMetaDataControl(this);
- m_videoOutputControl = new DirectShowVideoOutputControl;
- m_audioEndpointControl = new DirectShowAudioEndpointControl(this);
- m_videoRendererControl = new DirectShowVideoRendererControl(m_loop);
- m_videoWindowControl = new Vmr9VideoWindowControl;
-
- m_taskThread = new DirectShowPlayerServiceThread(this);
- m_taskThread->start();
-
- connect(m_videoOutputControl, SIGNAL(outputChanged()), this, SLOT(videoOutputChanged()));
- connect(m_videoRendererControl, SIGNAL(filterChanged()), this, SLOT(videoOutputChanged()));
-}
-
-DirectShowPlayerService::~DirectShowPlayerService()
-{
- {
- QMutexLocker locker(&m_mutex);
-
- releaseGraph();
-
- m_pendingTasks = Shutdown;
- ::SetEvent(m_taskHandle);
- }
-
- m_taskThread->wait();
- delete m_taskThread;
-
- if (m_audioOutput) {
- m_audioOutput->Release();
- m_audioOutput = 0;
- }
-
- if (m_videoOutput) {
- m_videoOutput->Release();
- m_videoOutput = 0;
- }
-
- delete m_playerControl;
- delete m_audioEndpointControl;
- delete m_metaDataControl;
- delete m_videoOutputControl;
- delete m_videoRendererControl;
- delete m_videoWindowControl;
-
- ::CloseHandle(m_taskHandle);
-}
-
-QMediaControl *DirectShowPlayerService::control(const char *name) const
-{
- if (qstrcmp(name, QMediaPlayerControl_iid) == 0)
- return m_playerControl;
- else if (qstrcmp(name, QAudioEndpointSelector_iid) == 0)
- return m_audioEndpointControl;
- else if (qstrcmp(name, QMetaDataControl_iid) == 0)
- return m_metaDataControl;
- else if (qstrcmp(name, QVideoOutputControl_iid) == 0)
- return m_videoOutputControl;
- else if (qstrcmp(name, QVideoRendererControl_iid) == 0)
- return m_videoRendererControl;
- else if (qstrcmp(name, QVideoWindowControl_iid) == 0)
- return m_videoWindowControl;
- else
- return 0;
-}
-
-void DirectShowPlayerService::load(const QMediaContent &media, QIODevice *stream)
-{
- QMutexLocker locker(&m_mutex);
-
- m_pendingTasks = 0;
-
- if (m_graph)
- releaseGraph();
-
- m_resources = media.resources();
- m_stream = stream;
- m_error = QMediaPlayer::NoError;
- m_errorString = QString();
- m_position = 0;
- m_duration = 0;
- m_streamTypes = 0;
- m_executedTasks = 0;
- m_buffering = false;
- m_seekable = false;
- m_atEnd = false;
- m_metaDataControl->updateGraph(0, 0);
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(VideoOutputChange)));
-
- if (m_resources.isEmpty() && !stream) {
- m_pendingTasks = 0;
- m_graphStatus = NoMedia;
-
- m_url.clear();
- } else if (stream && (!stream->isReadable() || stream->isSequential())) {
- m_pendingTasks = 0;
- m_graphStatus = InvalidMedia;
- m_error = QMediaPlayer::ResourceError;
- } else {
- // {36b73882-c2c8-11cf-8b46-00805f6cef60}
- static const GUID iid_IFilterGraph2 = {
- 0x36b73882, 0xc2c8, 0x11cf, {0x8b, 0x46, 0x00, 0x80, 0x5f, 0x6c, 0xef, 0x60} };
- m_graphStatus = Loading;
-
- m_graph = com_new<IFilterGraph2>(CLSID_FilterGraph, iid_IFilterGraph2);
-
- if (stream)
- m_pendingTasks = SetStreamSource;
- else
- m_pendingTasks = SetUrlSource;
-
- ::SetEvent(m_taskHandle);
- }
-
- m_playerControl->updateError(m_error, m_errorString);
- m_playerControl->updateMediaInfo(m_duration, m_streamTypes, m_seekable);
- m_playerControl->updateState(QMediaPlayer::StoppedState);
- m_playerControl->updatePosition(m_position);
- updateStatus();
-}
-
-void DirectShowPlayerService::doSetUrlSource(QMutexLocker *locker)
-{
- IBaseFilter *source = 0;
-
- QMediaResource resource = m_resources.takeFirst();
- QUrl url = resource.url();
-
- HRESULT hr = E_FAIL;
-
- if (url.scheme() == QLatin1String("http") || url.scheme() == QLatin1String("https")) {
- static const GUID clsid_WMAsfReader = {
- 0x187463a0, 0x5bb7, 0x11d3, {0xac, 0xbe, 0x00, 0x80, 0xc7, 0x5e, 0x24, 0x6e} };
-
- // {56a868a6-0ad4-11ce-b03a-0020af0ba770}
- static const GUID iid_IFileSourceFilter = {
- 0x56a868a6, 0x0ad4, 0x11ce, {0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70} };
-
- if (IFileSourceFilter *fileSource = com_new<IFileSourceFilter>(
- clsid_WMAsfReader, iid_IFileSourceFilter)) {
- locker->unlock();
- hr = fileSource->Load(reinterpret_cast<const OLECHAR *>(url.toString().utf16()), 0);
- locker->relock();
-
- if (SUCCEEDED(hr)) {
- source = com_cast<IBaseFilter>(fileSource, IID_IBaseFilter);
-
- if (!SUCCEEDED(hr = m_graph->AddFilter(source, L"Source")) && source) {
- source->Release();
- source = 0;
- }
- }
-
- fileSource->Release();
- }
- } else if (url.scheme() == QLatin1String("qrc")) {
- DirectShowRcSource *rcSource = new DirectShowRcSource(m_loop);
-
- if (rcSource->open(url) && SUCCEEDED(hr = m_graph->AddFilter(rcSource, L"Source")))
- source = rcSource;
- else
- rcSource->Release();
- }
-
- if (!SUCCEEDED(hr)) {
- locker->unlock();
- hr = m_graph->AddSourceFilter(
- reinterpret_cast<const OLECHAR *>(url.toString().utf16()), L"Source", &source);
- locker->relock();
- }
-
- if (SUCCEEDED(hr)) {
- m_executedTasks |= SetSource;
- m_pendingTasks |= Render;
-
- if (m_audioOutput)
- m_pendingTasks |= SetAudioOutput;
- if (m_videoOutput)
- m_pendingTasks |= SetVideoOutput;
-
- if (m_rate != 1.0 && m_rate != 0.0)
- m_pendingTasks |= SetRate;
-
- m_source = source;
- } else if (!m_resources.isEmpty()) {
- m_pendingTasks |= SetUrlSource;
- } else {
- m_pendingTasks = 0;
- m_graphStatus = InvalidMedia;
-
- switch (hr) {
- case VFW_E_UNKNOWN_FILE_TYPE:
- m_error = QMediaPlayer::FormatError;
- m_errorString = QString();
- break;
- case E_OUTOFMEMORY:
- case VFW_E_CANNOT_LOAD_SOURCE_FILTER:
- case VFW_E_NOT_FOUND:
- m_error = QMediaPlayer::ResourceError;
- m_errorString = QString();
- default:
- m_error = QMediaPlayer::ResourceError;
- m_errorString = QString();
- qWarning("DirectShowPlayerService::doSetUrlSource: Unresolved error code %x", uint(hr));
- break;
- }
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(Error)));
- }
-}
-
-void DirectShowPlayerService::doSetStreamSource(QMutexLocker *locker)
-{
- DirectShowIOSource *source = new DirectShowIOSource(m_loop);
- source->setDevice(m_stream);
-
- if (SUCCEEDED(m_graph->AddFilter(source, L"Source"))) {
- m_executedTasks |= SetSource;
- m_pendingTasks |= Render;
-
- if (m_audioOutput)
- m_pendingTasks |= SetAudioOutput;
- if (m_videoOutput)
- m_pendingTasks |= SetVideoOutput;
-
- if (m_rate != 1.0 && m_rate != 0.0)
- m_pendingTasks |= SetRate;
-
- m_source = source;
- } else {
- source->Release();
-
- m_pendingTasks = 0;
- m_graphStatus = InvalidMedia;
-
- m_error = QMediaPlayer::ResourceError;
- m_errorString = QString();
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(Error)));
- }
-}
-
-void DirectShowPlayerService::doRender(QMutexLocker *locker)
-{
- if (m_executedTasks & Pause)
- m_pendingTasks |= Pause;
- else if (m_executedTasks & Play && m_rate != 0.0)
- m_pendingTasks |= Play;
-
- if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
- control->Stop();
- control->Release();
- }
-
- if (m_pendingTasks & SetAudioOutput) {
- m_graph->AddFilter(m_audioOutput, L"AudioOutput");
-
- m_pendingTasks ^= SetAudioOutput;
- m_executedTasks |= SetAudioOutput;
- }
- if (m_pendingTasks & SetVideoOutput) {
- m_graph->AddFilter(m_videoOutput, L"VideoOutput");
-
- m_pendingTasks ^= SetVideoOutput;
- m_executedTasks |= SetVideoOutput;
- }
-
- IFilterGraph2 *graph = m_graph;
- graph->AddRef();
-
- QVarLengthArray<IBaseFilter *, 16> filters;
- m_source->AddRef();
- filters.append(m_source);
-
- bool rendered = false;
-
- HRESULT renderHr = S_OK;
-
- while (!filters.isEmpty()) {
- IEnumPins *pins = 0;
- IBaseFilter *filter = filters[filters.size() - 1];
- filters.removeLast();
-
- if (!(m_pendingTasks & ReleaseFilters) && SUCCEEDED(filter->EnumPins(&pins))) {
- int outputs = 0;
- for (IPin *pin = 0; pins->Next(1, &pin, 0) == S_OK; pin->Release()) {
- PIN_DIRECTION direction;
- if (pin->QueryDirection(&direction) == S_OK && direction == PINDIR_OUTPUT) {
- ++outputs;
-
- IPin *peer = 0;
- if (pin->ConnectedTo(&peer) == S_OK) {
- PIN_INFO peerInfo;
- if (SUCCEEDED(peer->QueryPinInfo(&peerInfo)))
- filters.append(peerInfo.pFilter);
- peer->Release();
- } else {
- locker->unlock();
- HRESULT hr;
- if (SUCCEEDED(hr = graph->RenderEx(
- pin, /*AM_RENDEREX_RENDERTOEXISTINGRENDERERS*/ 1, 0))) {
- rendered = true;
- } else if (renderHr == S_OK || renderHr == VFW_E_NO_DECOMPRESSOR){
- renderHr = hr;
- }
- locker->relock();
- }
- }
- }
-
- pins->Release();
-
- if (outputs == 0)
- rendered = true;
- }
- filter->Release();
- }
-
- if (m_audioOutput && !isConnected(m_audioOutput, PINDIR_INPUT)) {
- graph->RemoveFilter(m_audioOutput);
-
- m_executedTasks &= ~SetAudioOutput;
- }
-
- if (m_videoOutput && !isConnected(m_videoOutput, PINDIR_INPUT)) {
- graph->RemoveFilter(m_videoOutput);
-
- m_executedTasks &= ~SetVideoOutput;
- }
-
- graph->Release();
-
- if (!(m_pendingTasks & ReleaseFilters)) {
- if (rendered) {
- if (!(m_executedTasks & FinalizeLoad))
- m_pendingTasks |= FinalizeLoad;
- } else {
- m_pendingTasks = 0;
-
- m_graphStatus = InvalidMedia;
-
- if (!m_audioOutput && !m_videoOutput) {
- m_error = QMediaPlayer::ResourceError;
- m_errorString = QString();
- } else {
- switch (renderHr) {
- case VFW_E_UNSUPPORTED_AUDIO:
- case VFW_E_UNSUPPORTED_VIDEO:
- case VFW_E_UNSUPPORTED_STREAM:
- m_error = QMediaPlayer::FormatError;
- m_errorString = QString();
- default:
- m_error = QMediaPlayer::ResourceError;
- m_errorString = QString();
- qWarning("DirectShowPlayerService::doRender: Unresolved error code %x",
- uint(renderHr));
- }
- }
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(Error)));
- }
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(VideoOutputChange)));
-
- m_executedTasks |= Render;
- }
-}
-
-void DirectShowPlayerService::doFinalizeLoad(QMutexLocker *locker)
-{
- if (m_graphStatus != Loaded) {
- if (IMediaEvent *event = com_cast<IMediaEvent>(m_graph, IID_IMediaEvent)) {
- event->GetEventHandle(reinterpret_cast<OAEVENT *>(&m_eventHandle));
- event->Release();
- }
- if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
- LONGLONG duration = 0;
- seeking->GetDuration(&duration);
- m_duration = duration / 10;
-
- DWORD capabilities = 0;
- seeking->GetCapabilities(&capabilities);
- m_seekable = capabilities & AM_SEEKING_CanSeekAbsolute;
-
- seeking->Release();
- }
- }
-
- if ((m_executedTasks & SetOutputs) == SetOutputs) {
- m_streamTypes = AudioStream | VideoStream;
- } else {
- m_streamTypes = findStreamTypes(m_source);
- }
-
- m_executedTasks |= FinalizeLoad;
-
- m_graphStatus = Loaded;
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(FinalizedLoad)));
-}
-
-void DirectShowPlayerService::releaseGraph()
-{
- if (m_graph) {
- if (m_executingTask != 0) {
- // {8E1C39A1-DE53-11cf-AA63-0080C744528D}
- static const GUID iid_IAMOpenProgress = {
- 0x8E1C39A1, 0xDE53, 0x11cf, {0xAA, 0x63, 0x00, 0x80, 0xC7, 0x44, 0x52, 0x8D} };
-
- if (IAMOpenProgress *progress = com_cast<IAMOpenProgress>(
- m_graph, iid_IAMOpenProgress)) {
- progress->AbortOperation();
- progress->Release();
- }
- m_graph->Abort();
- }
-
- m_pendingTasks = ReleaseGraph;
-
- ::SetEvent(m_taskHandle);
-
- m_loop->wait(&m_mutex);
- }
-}
-
-void DirectShowPlayerService::doReleaseGraph(QMutexLocker *locker)
-{
- Q_UNUSED(locker);
-
- if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
- control->Stop();
- control->Release();
- }
-
- if (m_source) {
- m_source->Release();
- m_source = 0;
- }
-
- m_eventHandle = 0;
-
- m_graph->Release();
- m_graph = 0;
-
- m_loop->wake();
-}
-
-int DirectShowPlayerService::findStreamTypes(IBaseFilter *source) const
-{
- QVarLengthArray<IBaseFilter *, 16> filters;
- source->AddRef();
- filters.append(source);
-
- int streamTypes = 0;
-
- while (!filters.isEmpty()) {
- IEnumPins *pins = 0;
- IBaseFilter *filter = filters[filters.size() - 1];
- filters.removeLast();
-
- if (SUCCEEDED(filter->EnumPins(&pins))) {
- for (IPin *pin = 0; pins->Next(1, &pin, 0) == S_OK; pin->Release()) {
- PIN_DIRECTION direction;
- if (pin->QueryDirection(&direction) == S_OK && direction == PINDIR_OUTPUT) {
- AM_MEDIA_TYPE connectionType;
- if (SUCCEEDED(pin->ConnectionMediaType(&connectionType))) {
- IPin *peer = 0;
-
- if (connectionType.majortype == MEDIATYPE_Audio) {
- streamTypes |= AudioStream;
- } else if (connectionType.majortype == MEDIATYPE_Video) {
- streamTypes |= VideoStream;
- } else if (SUCCEEDED(pin->ConnectedTo(&peer))) {
- PIN_INFO peerInfo;
- if (SUCCEEDED(peer->QueryPinInfo(&peerInfo)))
- filters.append(peerInfo.pFilter);
- peer->Release();
- }
- } else {
- streamTypes |= findStreamType(pin);
- }
- }
- }
- }
- filter->Release();
- }
- return streamTypes;
-}
-
-int DirectShowPlayerService::findStreamType(IPin *pin) const
-{
- IEnumMediaTypes *types;
-
- if (SUCCEEDED(pin->EnumMediaTypes(&types))) {
- bool video = false;
- bool audio = false;
- bool other = false;
-
- for (AM_MEDIA_TYPE *type = 0;
- types->Next(1, &type, 0) == S_OK;
- DirectShowMediaType::deleteType(type)) {
- if (type->majortype == MEDIATYPE_Audio)
- audio = true;
- else if (type->majortype == MEDIATYPE_Video)
- video = true;
- else
- other = true;
- }
- types->Release();
-
- if (other)
- return 0;
- else if (audio && !video)
- return AudioStream;
- else if (!audio && video)
- return VideoStream;
- else
- return 0;
- } else {
- return 0;
- }
-}
-
-void DirectShowPlayerService::play()
-{
- QMutexLocker locker(&m_mutex);
-
- if (m_rate != 0.0) {
- m_pendingTasks &= ~Pause;
- m_pendingTasks |= Play;
- } else {
- m_pendingTasks |= Pause;
- m_executedTasks |= Play;
- }
-
- if (m_executedTasks & Render) {
- if (m_executedTasks & Stop) {
- m_atEnd = false;
- m_position = 0;
- m_pendingTasks |= Seek;
- m_executedTasks ^= Stop;
- }
-
- ::SetEvent(m_taskHandle);
- }
-}
-
-void DirectShowPlayerService::doPlay(QMutexLocker *locker)
-{
- if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
- locker->unlock();
- HRESULT hr = control->Run();
- locker->relock();
-
- control->Release();
-
- if (SUCCEEDED(hr)) {
- m_executedTasks |= Play;
- m_executedTasks &= ~Pause;
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(StatusChange)));
- } else {
- m_error = QMediaPlayer::ResourceError;
- m_errorString = QString();
- qWarning("DirectShowPlayerService::doPlay: Unresolved error code %x", uint(hr));
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(Error)));
- }
- }
-}
-
-void DirectShowPlayerService::pause()
-{
- QMutexLocker locker(&m_mutex);
-
- m_pendingTasks &= ~Play;
- m_pendingTasks |= Pause;
-
- if (m_executedTasks & Render) {
- if (m_executedTasks & Stop) {
- m_atEnd = false;
- m_position = 0;
- m_pendingTasks |= Seek;
- m_executedTasks ^= Stop;
- }
-
- ::SetEvent(m_taskHandle);
- }
-}
-
-void DirectShowPlayerService::doPause(QMutexLocker *locker)
-{
- if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
- locker->unlock();
- HRESULT hr = control->Pause();
- locker->relock();
-
- control->Release();
-
- if (SUCCEEDED(hr)) {
- if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
- LONGLONG position = 0;
-
- seeking->GetCurrentPosition(&position);
- seeking->Release();
-
- m_position = position / 10;
- } else {
- m_position = 0;
- }
-
- m_executedTasks |= Pause;
-
- if (m_rate != 0.0)
- m_executedTasks &= ~Play;
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(StatusChange)));
- } else {
- m_error = QMediaPlayer::ResourceError;
- m_errorString = QString();
- qWarning("DirectShowPlayerService::doPause: Unresolved error code %x", uint(hr));
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(Error)));
- }
- }
-}
-
-void DirectShowPlayerService::stop()
-{
- QMutexLocker locker(&m_mutex);
-
- m_pendingTasks &= ~(Play | Pause | Seek);
-
- if ((m_executingTask | m_executedTasks) & (Play | Pause | Seek)) {
- m_pendingTasks |= Stop;
-
- ::SetEvent(m_taskHandle);
-
- m_loop->wait(&m_mutex);
- }
-
-}
-
-void DirectShowPlayerService::doStop(QMutexLocker *locker)
-{
- if (m_executedTasks & (Play | Pause)) {
- if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
- control->Stop();
- control->Release();
- }
-
- if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
- LONGLONG position = 0;
-
- seeking->GetCurrentPosition(&position);
- seeking->Release();
-
- m_position = position / 10;
- } else {
- m_position = 0;
- }
-
- m_executedTasks &= ~(Play | Pause);
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(StatusChange)));
- }
-
- m_executedTasks |= Stop;
-
- m_loop->wake();
-}
-
-void DirectShowPlayerService::setRate(qreal rate)
-{
- QMutexLocker locker(&m_mutex);
-
- if (m_rate == rate)
- return;
-
- if (rate == 0.0) {
- if (m_pendingTasks & Play) {
- m_executedTasks |= Play;
- m_pendingTasks &= ~(Play | SetRate);
-
- if (!((m_executingTask | m_executedTasks) & Pause))
- m_pendingTasks |= Pause;
- } else if ((m_executingTask | m_executedTasks) & Play) {
- m_pendingTasks |= Pause;
- }
- } else {
- m_pendingTasks |= SetRate;
-
- if (m_rate == 0.0 && (m_executedTasks & Play) && !(m_executingTask & Play))
- m_pendingTasks |= Play;
- }
-
- m_rate = rate;
-
- if (m_executedTasks & FinalizeLoad)
- ::SetEvent(m_taskHandle);
-}
-
-void DirectShowPlayerService::doSetRate(QMutexLocker *locker)
-{
- if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
- // Cache current values as we can't query IMediaSeeking during a seek due to the
- // possibility of a deadlock when flushing the VideoSurfaceFilter.
- LONGLONG currentPosition = 0;
- seeking->GetCurrentPosition(&currentPosition);
- m_position = currentPosition / 10;
-
- LONGLONG minimum = 0;
- LONGLONG maximum = 0;
- m_playbackRange = SUCCEEDED(seeking->GetAvailable(&minimum, &maximum))
- ? QMediaTimeRange(minimum / 10, maximum / 10)
- : QMediaTimeRange();
-
- locker->unlock();
- HRESULT hr = seeking->SetRate(m_rate);
- locker->relock();
-
- if (!SUCCEEDED(hr)) {
- double rate = 0.0;
- m_rate = seeking->GetRate(&rate)
- ? rate
- : 1.0;
- }
-
- seeking->Release();
- } else if (m_rate != 1.0) {
- m_rate = 1.0;
- }
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(RateChange)));
-}
-
-qint64 DirectShowPlayerService::position() const
-{
- QMutexLocker locker(const_cast<QMutex *>(&m_mutex));
-
- if (m_graphStatus == Loaded) {
- if (m_executingTask == Seek || m_executingTask == SetRate) {
- return m_position;
- } else if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
- LONGLONG position = 0;
-
- seeking->GetCurrentPosition(&position);
- seeking->Release();
-
- const_cast<qint64 &>(m_position) = position / 10;
-
- return m_position;
- }
- }
- return 0;
-}
-
-QMediaTimeRange DirectShowPlayerService::availablePlaybackRanges() const
-{
- QMutexLocker locker(const_cast<QMutex *>(&m_mutex));
-
- if (m_graphStatus == Loaded) {
- if (m_executingTask == Seek || m_executingTask == SetRate) {
- return m_playbackRange;
- } else if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
- LONGLONG minimum = 0;
- LONGLONG maximum = 0;
-
- HRESULT hr = seeking->GetAvailable(&minimum, &maximum);
- seeking->Release();
-
- if (SUCCEEDED(hr))
- return QMediaTimeRange(minimum, maximum);
- }
- }
- return QMediaTimeRange();
-}
-
-void DirectShowPlayerService::seek(qint64 position)
-{
- QMutexLocker locker(&m_mutex);
-
- m_position = position;
-
- m_pendingTasks |= Seek;
-
- if (m_executedTasks & FinalizeLoad)
- ::SetEvent(m_taskHandle);
-}
-
-void DirectShowPlayerService::doSeek(QMutexLocker *locker)
-{
- if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
- LONGLONG seekPosition = LONGLONG(m_position) * 10;
-
- // Cache current values as we can't query IMediaSeeking during a seek due to the
- // possibility of a deadlock when flushing the VideoSurfaceFilter.
- LONGLONG currentPosition = 0;
- seeking->GetCurrentPosition(&currentPosition);
- m_position = currentPosition / 10;
-
- LONGLONG minimum = 0;
- LONGLONG maximum = 0;
- m_playbackRange = SUCCEEDED(seeking->GetAvailable(&minimum, &maximum))
- ? QMediaTimeRange(minimum / 10, maximum / 10)
- : QMediaTimeRange();
-
- locker->unlock();
- seeking->SetPositions(
- &seekPosition, AM_SEEKING_AbsolutePositioning, 0, AM_SEEKING_NoPositioning);
- locker->relock();
-
- seeking->GetCurrentPosition(&currentPosition);
- m_position = currentPosition / 10;
-
- seeking->Release();
- } else {
- m_position = 0;
- }
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(PositionChange)));
-}
-
-int DirectShowPlayerService::bufferStatus() const
-{
-#ifndef QT_NO_WMSDK
- QMutexLocker locker(const_cast<QMutex *>(&m_mutex));
-
- if (IWMReaderAdvanced2 *reader = com_cast<IWMReaderAdvanced2>(
- m_source, IID_IWMReaderAdvanced2)) {
- DWORD percentage = 0;
-
- reader->GetBufferProgress(&percentage, 0);
- reader->Release();
-
- return percentage;
- } else {
- return 0;
- }
-#else
- return 0;
-#endif
-}
-
-void DirectShowPlayerService::setAudioOutput(IBaseFilter *filter)
-{
- QMutexLocker locker(&m_mutex);
-
- if (m_graph) {
- if (m_audioOutput) {
- if (m_executedTasks & SetAudioOutput) {
- m_pendingTasks |= ReleaseAudioOutput;
-
- ::SetEvent(m_taskHandle);
-
- m_loop->wait(&m_mutex);
- }
- m_audioOutput->Release();
- }
-
- m_audioOutput = filter;
-
- if (m_audioOutput) {
- m_audioOutput->AddRef();
-
- m_pendingTasks |= SetAudioOutput;
-
- if (m_executedTasks & SetSource) {
- m_pendingTasks |= Render;
-
- ::SetEvent(m_taskHandle);
- }
- } else {
- m_pendingTasks &= ~ SetAudioOutput;
- }
- } else {
- if (m_audioOutput)
- m_audioOutput->Release();
-
- m_audioOutput = filter;
-
- if (m_audioOutput)
- m_audioOutput->AddRef();
- }
-
- m_playerControl->updateAudioOutput(m_audioOutput);
-}
-
-void DirectShowPlayerService::doReleaseAudioOutput(QMutexLocker *locker)
-{
- m_pendingTasks |= m_executedTasks & (Play | Pause);
-
- if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
- control->Stop();
- control->Release();
- }
-
- IBaseFilter *decoder = getConnected(m_audioOutput, PINDIR_INPUT);
- if (!decoder) {
- decoder = m_audioOutput;
- decoder->AddRef();
- }
-
- // {DCFBDCF6-0DC2-45f5-9AB2-7C330EA09C29}
- static const GUID iid_IFilterChain = {
- 0xDCFBDCF6, 0x0DC2, 0x45f5, {0x9A, 0xB2, 0x7C, 0x33, 0x0E, 0xA0, 0x9C, 0x29} };
-
- if (IFilterChain *chain = com_cast<IFilterChain>(m_graph, iid_IFilterChain)) {
- chain->RemoveChain(decoder, m_audioOutput);
- chain->Release();
- } else {
- m_graph->RemoveFilter(m_audioOutput);
- }
-
- decoder->Release();
-
- m_executedTasks &= ~SetAudioOutput;
-
- m_loop->wake();
-}
-
-void DirectShowPlayerService::setVideoOutput(IBaseFilter *filter)
-{
- QMutexLocker locker(&m_mutex);
-
- if (m_graph) {
- if (m_videoOutput) {
- if (m_executedTasks & SetVideoOutput) {
- m_pendingTasks |= ReleaseVideoOutput;
-
- ::SetEvent(m_taskHandle);
-
- m_loop->wait(&m_mutex);
- }
- m_videoOutput->Release();
- }
-
- m_videoOutput = filter;
-
- if (m_videoOutput) {
- m_videoOutput->AddRef();
-
- m_pendingTasks |= SetVideoOutput;
-
- if (m_executedTasks & SetSource) {
- m_pendingTasks |= Render;
-
- ::SetEvent(m_taskHandle);
- }
- }
- } else {
- if (m_videoOutput)
- m_videoOutput->Release();
-
- m_videoOutput = filter;
-
- if (m_videoOutput)
- m_videoOutput->AddRef();
- }
-}
-
-void DirectShowPlayerService::doReleaseVideoOutput(QMutexLocker *locker)
-{
- m_pendingTasks |= m_executedTasks & (Play | Pause);
-
- if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
- control->Stop();
- control->Release();
- }
-
- IBaseFilter *intermediate = 0;
- if (!SUCCEEDED(m_graph->FindFilterByName(L"Color Space Converter", &intermediate))) {
- intermediate = m_videoOutput;
- intermediate->AddRef();
- }
-
- IBaseFilter *decoder = getConnected(intermediate, PINDIR_INPUT);
- if (!decoder) {
- decoder = intermediate;
- decoder->AddRef();
- }
-
- // {DCFBDCF6-0DC2-45f5-9AB2-7C330EA09C29}
- static const GUID iid_IFilterChain = {
- 0xDCFBDCF6, 0x0DC2, 0x45f5, {0x9A, 0xB2, 0x7C, 0x33, 0x0E, 0xA0, 0x9C, 0x29} };
-
- if (IFilterChain *chain = com_cast<IFilterChain>(m_graph, iid_IFilterChain)) {
- chain->RemoveChain(decoder, m_videoOutput);
- chain->Release();
- } else {
- m_graph->RemoveFilter(m_videoOutput);
- }
-
- intermediate->Release();
- decoder->Release();
-
- m_executedTasks &= ~SetVideoOutput;
-
- m_loop->wake();
-}
-
-void DirectShowPlayerService::customEvent(QEvent *event)
-{
- if (event->type() == QEvent::Type(FinalizedLoad)) {
- QMutexLocker locker(&m_mutex);
-
- m_playerControl->updateMediaInfo(m_duration, m_streamTypes, m_seekable);
- m_metaDataControl->updateGraph(m_graph, m_source);
-
- updateStatus();
- } else if (event->type() == QEvent::Type(Error)) {
- QMutexLocker locker(&m_mutex);
-
- if (m_error != QMediaPlayer::NoError) {
- m_playerControl->updateError(m_error, m_errorString);
- m_playerControl->updateMediaInfo(m_duration, m_streamTypes, m_seekable);
- m_playerControl->updateState(QMediaPlayer::StoppedState);
- updateStatus();
- }
- } else if (event->type() == QEvent::Type(RateChange)) {
- QMutexLocker locker(&m_mutex);
-
- m_playerControl->updatePlaybackRate(m_rate);
- } else if (event->type() == QEvent::Type(StatusChange)) {
- QMutexLocker locker(&m_mutex);
-
- updateStatus();
- m_playerControl->updatePosition(m_position);
- } else if (event->type() == QEvent::Type(DurationChange)) {
- QMutexLocker locker(&m_mutex);
-
- m_playerControl->updateMediaInfo(m_duration, m_streamTypes, m_seekable);
- } else if (event->type() == QEvent::Type(EndOfMedia)) {
- QMutexLocker locker(&m_mutex);
-
- if (m_atEnd) {
- m_playerControl->updateState(QMediaPlayer::StoppedState);
- m_playerControl->updateStatus(QMediaPlayer::EndOfMedia);
- m_playerControl->updatePosition(m_position);
- }
- } else if (event->type() == QEvent::Type(PositionChange)) {
- QMutexLocker locker(&m_mutex);
-
- m_playerControl->updatePosition(m_position);
- } else if (event->type() == QEvent::Type(VideoOutputChange)) {
- if (m_videoWindowControl)
- m_videoWindowControl->updateNativeSize();
- } else {
- QMediaService::customEvent(event);
- }
-}
-
-void DirectShowPlayerService::videoOutputChanged()
-{
- IBaseFilter *videoOutput = 0;
-
- switch (m_videoOutputControl->output()) {
- case QVideoOutputControl::RendererOutput:
- videoOutput = m_videoRendererControl->filter();
- break;
- case QVideoOutputControl::WindowOutput:
- videoOutput = m_videoWindowControl->filter();
- break;
- default:
- break;
- }
-
- setVideoOutput(videoOutput);
-}
-
-void DirectShowPlayerService::graphEvent(QMutexLocker *locker)
-{
- if (IMediaEvent *event = com_cast<IMediaEvent>(m_graph, IID_IMediaEvent)) {
- long eventCode;
- LONG_PTR param1;
- LONG_PTR param2;
-
- while (event->GetEvent(&eventCode, &param1, &param2, 0) == S_OK) {
- switch (eventCode) {
- case EC_BUFFERING_DATA:
- m_buffering = param1;
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(StatusChange)));
- break;
- case EC_COMPLETE:
- m_executedTasks &= ~(Play | Pause);
- m_executedTasks |= Stop;
-
- m_buffering = false;
- m_atEnd = true;
-
- if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
- LONGLONG position = 0;
-
- seeking->GetCurrentPosition(&position);
- seeking->Release();
-
- m_position = position / 10;
- }
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(EndOfMedia)));
- break;
- case EC_LENGTH_CHANGED:
- if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
- LONGLONG duration = 0;
- seeking->GetDuration(&duration);
- m_duration = duration / 10;
-
- DWORD capabilities = 0;
- seeking->GetCapabilities(&capabilities);
- m_seekable = capabilities & AM_SEEKING_CanSeekAbsolute;
-
- seeking->Release();
-
- QCoreApplication::postEvent(this, new QEvent(QEvent::Type(DurationChange)));
- }
- break;
- default:
- break;
- }
-
- event->FreeEventParams(eventCode, param1, param2);
- }
- event->Release();
- }
-}
-
-void DirectShowPlayerService::updateStatus()
-{
- switch (m_graphStatus) {
- case NoMedia:
- m_playerControl->updateStatus(QMediaPlayer::NoMedia);
- break;
- case Loading:
- m_playerControl->updateStatus(QMediaPlayer::LoadingMedia);
- break;
- case Loaded:
- if ((m_pendingTasks | m_executingTask | m_executedTasks) & (Play | Pause)) {
- if (m_buffering)
- m_playerControl->updateStatus(QMediaPlayer::BufferingMedia);
- else
- m_playerControl->updateStatus(QMediaPlayer::BufferedMedia);
- } else {
- m_playerControl->updateStatus(QMediaPlayer::LoadedMedia);
- }
- break;
- case InvalidMedia:
- m_playerControl->updateStatus(QMediaPlayer::InvalidMedia);
- break;
- default:
- m_playerControl->updateStatus(QMediaPlayer::UnknownMediaStatus);
- }
-}
-
-bool DirectShowPlayerService::isConnected(IBaseFilter *filter, PIN_DIRECTION direction) const
-{
- bool connected = false;
-
- IEnumPins *pins = 0;
-
- if (SUCCEEDED(filter->EnumPins(&pins))) {
- for (IPin *pin = 0; pins->Next(1, &pin, 0) == S_OK; pin->Release()) {
- PIN_DIRECTION dir;
- if (SUCCEEDED(pin->QueryDirection(&dir)) && dir == direction) {
- IPin *peer = 0;
- if (SUCCEEDED(pin->ConnectedTo(&peer))) {
- connected = true;
-
- peer->Release();
- }
- }
- }
- pins->Release();
- }
- return connected;
-}
-
-IBaseFilter *DirectShowPlayerService::getConnected(
- IBaseFilter *filter, PIN_DIRECTION direction) const
-{
- IBaseFilter *connected = 0;
-
- IEnumPins *pins = 0;
-
- if (SUCCEEDED(filter->EnumPins(&pins))) {
- for (IPin *pin = 0; pins->Next(1, &pin, 0) == S_OK; pin->Release()) {
- PIN_DIRECTION dir;
- if (SUCCEEDED(pin->QueryDirection(&dir)) && dir == direction) {
- IPin *peer = 0;
- if (SUCCEEDED(pin->ConnectedTo(&peer))) {
- PIN_INFO info;
-
- if (SUCCEEDED(peer->QueryPinInfo(&info))) {
- if (connected) {
- qWarning("DirectShowPlayerService::getConnected: "
- "Multiple connected filters");
- connected->Release();
- }
- connected = info.pFilter;
- }
- peer->Release();
- }
- }
- }
- pins->Release();
- }
- return connected;
-}
-
-void DirectShowPlayerService::run()
-{
- QMutexLocker locker(&m_mutex);
-
- for (;;) {
- ::ResetEvent(m_taskHandle);
-
- while (m_pendingTasks == 0) {
- DWORD result = 0;
-
- locker.unlock();
- if (m_eventHandle) {
- HANDLE handles[] = { m_taskHandle, m_eventHandle };
-
- result = ::WaitForMultipleObjects(2, handles, false, INFINITE);
- } else {
- result = ::WaitForSingleObject(m_taskHandle, INFINITE);
- }
- locker.relock();
-
- if (result == WAIT_OBJECT_0 + 1) {
- graphEvent(&locker);
- }
- }
-
- if (m_pendingTasks & ReleaseGraph) {
- m_pendingTasks ^= ReleaseGraph;
- m_executingTask = ReleaseGraph;
-
- doReleaseGraph(&locker);
- } else if (m_pendingTasks & Shutdown) {
- return;
- } else if (m_pendingTasks & ReleaseAudioOutput) {
- m_pendingTasks ^= ReleaseAudioOutput;
- m_executingTask = ReleaseAudioOutput;
-
- doReleaseAudioOutput(&locker);
- } else if (m_pendingTasks & ReleaseVideoOutput) {
- m_pendingTasks ^= ReleaseVideoOutput;
- m_executingTask = ReleaseVideoOutput;
-
- doReleaseVideoOutput(&locker);
- } else if (m_pendingTasks & SetUrlSource) {
- m_pendingTasks ^= SetUrlSource;
- m_executingTask = SetUrlSource;
-
- doSetUrlSource(&locker);
- } else if (m_pendingTasks & SetStreamSource) {
- m_pendingTasks ^= SetStreamSource;
- m_executingTask = SetStreamSource;
-
- doSetStreamSource(&locker);
- } else if (m_pendingTasks & Render) {
- m_pendingTasks ^= Render;
- m_executingTask = Render;
-
- doRender(&locker);
- } else if (!(m_executedTasks & Render)) {
- m_pendingTasks &= ~(FinalizeLoad | SetRate | Stop | Pause | Seek | Play);
- } else if (m_pendingTasks & FinalizeLoad) {
- m_pendingTasks ^= FinalizeLoad;
- m_executingTask = FinalizeLoad;
-
- doFinalizeLoad(&locker);
- } else if (m_pendingTasks & Stop) {
- m_pendingTasks ^= Stop;
- m_executingTask = Stop;
-
- doStop(&locker);
- } else if (m_pendingTasks & Pause) {
- m_pendingTasks ^= Pause;
- m_executingTask = Pause;
-
- doPause(&locker);
- } else if (m_pendingTasks & SetRate) {
- m_pendingTasks ^= SetRate;
- m_executingTask = SetRate;
-
- doSetRate(&locker);
- } else if (m_pendingTasks & Seek) {
- m_pendingTasks ^= Seek;
- m_executingTask = Seek;
-
- doSeek(&locker);
- } else if (m_pendingTasks & Play) {
- m_pendingTasks ^= Play;
- m_executingTask = Play;
-
- doPlay(&locker);
- }
- m_executingTask = 0;
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.h
deleted file mode 100644
index a3f94e1..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowplayerservice.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWPLAYERSERVICE_H
-#define DIRECTSHOWPLAYERSERVICE_H
-
-#include <QtMediaServices/qmediaplayer.h>
-#include <QtMediaServices/qmediaresource.h>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qmediatimerange.h>
-
-#include "directshoweventloop.h"
-#include "directshowglobal.h"
-
-#include <QtCore/qcoreevent.h>
-#include <QtCore/qmutex.h>
-#include <QtCore/qurl.h>
-#include <QtCore/qwaitcondition.h>
-
-#include <QtCore/private/qwineventnotifier_p.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowAudioEndpointControl;
-class DirectShowMetaDataControl;
-class DirectShowPlayerControl;
-class DirectShowVideoOutputControl;
-class DirectShowVideoRendererControl;
-class Vmr9VideoWindowControl;
-
-class DirectShowPlayerService : public QMediaService
-{
- Q_OBJECT
-public:
- enum StreamType
- {
- AudioStream = 0x01,
- VideoStream = 0x02
- };
-
- DirectShowPlayerService(QObject *parent = 0);
- ~DirectShowPlayerService();
-
- QMediaControl* control(const char *name) const;
-
- void load(const QMediaContent &media, QIODevice *stream);
- void play();
- void pause();
- void stop();
-
- qint64 position() const;
- QMediaTimeRange availablePlaybackRanges() const;
-
- void seek(qint64 position);
- void setRate(qreal rate);
-
- int bufferStatus() const;
-
- void setAudioOutput(IBaseFilter *filter);
- void setVideoOutput(IBaseFilter *filter);
-
-protected:
- void customEvent(QEvent *event);
-
-private Q_SLOTS:
- void videoOutputChanged();
-
-private:
- void releaseGraph();
- void updateStatus();
-
- int findStreamTypes(IBaseFilter *source) const;
- int findStreamType(IPin *pin) const;
-
- bool isConnected(IBaseFilter *filter, PIN_DIRECTION direction) const;
- IBaseFilter *getConnected(IBaseFilter *filter, PIN_DIRECTION direction) const;
-
- void run();
-
- void doSetUrlSource(QMutexLocker *locker);
- void doSetStreamSource(QMutexLocker *locker);
- void doRender(QMutexLocker *locker);
- void doFinalizeLoad(QMutexLocker *locker);
- void doSetRate(QMutexLocker *locker);
- void doSeek(QMutexLocker *locker);
- void doPlay(QMutexLocker *locker);
- void doPause(QMutexLocker *locker);
- void doStop(QMutexLocker *locker);
- void doReleaseAudioOutput(QMutexLocker *locker);
- void doReleaseVideoOutput(QMutexLocker *locker);
- void doReleaseGraph(QMutexLocker *locker);
-
- void graphEvent(QMutexLocker *locker);
-
- enum Task
- {
- Shutdown = 0x0001,
- SetUrlSource = 0x0002,
- SetStreamSource = 0x0004,
- SetSource = SetUrlSource | SetStreamSource,
- SetAudioOutput = 0x0008,
- SetVideoOutput = 0x0010,
- SetOutputs = SetAudioOutput | SetVideoOutput,
- Render = 0x0020,
- FinalizeLoad = 0x0040,
- SetRate = 0x0080,
- Seek = 0x0100,
- Play = 0x0200,
- Pause = 0x0400,
- Stop = 0x0800,
- ReleaseGraph = 0x1000,
- ReleaseAudioOutput = 0x2000,
- ReleaseVideoOutput = 0x4000,
- ReleaseFilters = ReleaseGraph | ReleaseAudioOutput | ReleaseVideoOutput
- };
-
- enum Event
- {
- FinalizedLoad = QEvent::User,
- Error,
- RateChange,
- Started,
- Paused,
- DurationChange,
- StatusChange,
- EndOfMedia,
- PositionChange,
- VideoOutputChange
- };
-
- enum GraphStatus
- {
- NoMedia,
- Loading,
- Loaded,
- InvalidMedia
- };
-
- DirectShowPlayerControl *m_playerControl;
- DirectShowMetaDataControl *m_metaDataControl;
- DirectShowVideoOutputControl *m_videoOutputControl;
- DirectShowVideoRendererControl *m_videoRendererControl;
- Vmr9VideoWindowControl *m_videoWindowControl;
- DirectShowAudioEndpointControl *m_audioEndpointControl;
-
- QThread *m_taskThread;
- DirectShowEventLoop *m_loop;
- int m_pendingTasks;
- int m_executingTask;
- int m_executedTasks;
- HANDLE m_taskHandle;
- HANDLE m_eventHandle;
- GraphStatus m_graphStatus;
- QMediaPlayer::Error m_error;
- QIODevice *m_stream;
- IFilterGraph2 *m_graph;
- IBaseFilter *m_source;
- IBaseFilter *m_audioOutput;
- IBaseFilter *m_videoOutput;
- int m_streamTypes;
- qreal m_rate;
- qint64 m_position;
- qint64 m_duration;
- bool m_buffering;
- bool m_seekable;
- bool m_atEnd;
- QMediaTimeRange m_playbackRange;
- QUrl m_url;
- QMediaResourceList m_resources;
- QString m_errorString;
- QMutex m_mutex;
-
- friend class DirectShowPlayerServiceThread;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.cpp
deleted file mode 100644
index 23675fb..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.cpp
+++ /dev/null
@@ -1,403 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "directshowsamplescheduler.h"
-
-#include <QtCore/qcoreevent.h>
-
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowTimedSample
-{
-public:
- DirectShowTimedSample(IMediaSample *sample)
- : m_next(0)
- , m_sample(sample)
- , m_cookie(0)
- , m_lastSample(false)
- {
- m_sample->AddRef();
- }
-
- ~DirectShowTimedSample()
- {
- m_sample->Release();
- }
-
- IMediaSample *sample() const { return m_sample; }
-
- DirectShowTimedSample *nextSample() const { return m_next; }
- void setNextSample(DirectShowTimedSample *sample) { Q_ASSERT(!m_next); m_next = sample; }
-
- DirectShowTimedSample *remove() {
- DirectShowTimedSample *next = m_next; delete this; return next; }
-
- bool schedule(IReferenceClock *clock, REFERENCE_TIME startTime, HANDLE handle);
- void unschedule(IReferenceClock *clock);
-
- bool isReady(IReferenceClock *clock) const;
-
- bool isLast() const { return m_lastSample; }
- void setLast() { m_lastSample = true; }
-
-private:
- DirectShowTimedSample *m_next;
- IMediaSample *m_sample;
- DWORD_PTR m_cookie;
- bool m_lastSample;
-};
-
-bool DirectShowTimedSample::schedule(
- IReferenceClock *clock, REFERENCE_TIME startTime, HANDLE handle)
-{
- REFERENCE_TIME sampleStartTime;
- REFERENCE_TIME sampleEndTime;
- if (m_sample->GetTime(&sampleStartTime, &sampleEndTime) == S_OK) {
- if (clock->AdviseTime(
- startTime, sampleStartTime, reinterpret_cast<HEVENT>(handle), &m_cookie) == S_OK) {
- return true;
- }
- }
- return false;
-}
-
-void DirectShowTimedSample::unschedule(IReferenceClock *clock)
-{
- clock->Unadvise(m_cookie);
-}
-
-bool DirectShowTimedSample::isReady(IReferenceClock *clock) const
-{
- REFERENCE_TIME sampleStartTime;
- REFERENCE_TIME sampleEndTime;
- REFERENCE_TIME currentTime;
- if (m_sample->GetTime(&sampleStartTime, &sampleEndTime) == S_OK) {
- if (clock->GetTime(&currentTime) == S_OK)
- return currentTime >= sampleStartTime;
- }
- return true;
-}
-
-DirectShowSampleScheduler::DirectShowSampleScheduler(IUnknown *pin, QObject *parent)
- : QObject(parent)
- , m_pin(pin)
- , m_clock(0)
- , m_allocator(0)
- , m_head(0)
- , m_tail(0)
- , m_maximumSamples(2)
- , m_state(Stopped)
- , m_startTime(0)
- , m_timeoutEvent(::CreateEvent(0, 0, 0, 0))
-{
- m_semaphore.release(m_maximumSamples);
-
- m_eventNotifier.setHandle(m_timeoutEvent);
- m_eventNotifier.setEnabled(true);
-
- connect(&m_eventNotifier, SIGNAL(activated(HANDLE)), this, SIGNAL(sampleReady()));
-}
-
-DirectShowSampleScheduler::~DirectShowSampleScheduler()
-{
- m_eventNotifier.setEnabled(false);
-
- ::CloseHandle(m_timeoutEvent);
-
- Q_ASSERT(!m_clock);
- Q_ASSERT(!m_allocator);
-}
-
-HRESULT DirectShowSampleScheduler::QueryInterface(REFIID riid, void **ppvObject)
-{
- return m_pin->QueryInterface(riid, ppvObject);
-}
-
-ULONG DirectShowSampleScheduler::AddRef()
-{
- return m_pin->AddRef();
-}
-
-ULONG DirectShowSampleScheduler::Release()
-{
- return m_pin->Release();
-}
-
-// IMemInputPin
-HRESULT DirectShowSampleScheduler::GetAllocator(IMemAllocator **ppAllocator)
-{
- if (!ppAllocator) {
- return E_POINTER;
- } else {
- QMutexLocker locker(&m_mutex);
-
- if (!m_allocator) {
- return VFW_E_NO_ALLOCATOR;
- } else {
- *ppAllocator = m_allocator;
-
- return S_OK;
- }
- }
-}
-
-HRESULT DirectShowSampleScheduler::NotifyAllocator(IMemAllocator *pAllocator, BOOL bReadOnly)
-{
- Q_UNUSED(bReadOnly);
-
- HRESULT hr;
- ALLOCATOR_PROPERTIES properties;
-
- if (!pAllocator) {
- if (m_allocator)
- m_allocator->Release();
-
- m_allocator = 0;
-
- return S_OK;
- } else if ((hr = pAllocator->GetProperties(&properties)) != S_OK) {
- return hr;
- } else {
- if (properties.cBuffers == 1) {
- ALLOCATOR_PROPERTIES actual;
-
- properties.cBuffers = 2;
- if ((hr = pAllocator->SetProperties(&properties, &actual)) != S_OK)
- return hr;
- }
-
- QMutexLocker locker(&m_mutex);
-
- if (m_allocator)
- m_allocator->Release();
-
- m_allocator = pAllocator;
- m_allocator->AddRef();
-
- return S_OK;
- }
-}
-
-HRESULT DirectShowSampleScheduler::GetAllocatorRequirements(ALLOCATOR_PROPERTIES *pProps)
-{
- if (!pProps)
- return E_POINTER;
-
- pProps->cBuffers = 2;
-
- return S_OK;
-}
-
-HRESULT DirectShowSampleScheduler::Receive(IMediaSample *pSample)
-{
- if (!pSample)
- return E_POINTER;
-
- m_semaphore.acquire(1);
-
- QMutexLocker locker(&m_mutex);
-
- if (m_state & Flushing) {
- m_semaphore.release(1);
-
- return S_FALSE;
- } else if (m_state == Stopped) {
- m_semaphore.release();
-
- return VFW_E_WRONG_STATE;
- } else {
- DirectShowTimedSample *timedSample = new DirectShowTimedSample(pSample);
-
- if (m_tail)
- m_tail->setNextSample(timedSample);
- else
- m_head = timedSample;
-
- m_tail = timedSample;
-
- if (m_state == Running) {
- if (!timedSample->schedule(m_clock, m_startTime, m_timeoutEvent)) {
- // Timing information is unavailable, so schedule frames immediately.
- QMetaObject::invokeMethod(this, "sampleReady", Qt::QueuedConnection);
- }
- } else if (m_tail == m_head) {
- // If this is the first frame make is available.
- QMetaObject::invokeMethod(this, "sampleReady", Qt::QueuedConnection);
- }
-
- return S_OK;
- }
-}
-
-HRESULT DirectShowSampleScheduler::ReceiveMultiple(
- IMediaSample **pSamples, long nSamples, long *nSamplesProcessed)
-{
- if (!pSamples || !nSamplesProcessed)
- return E_POINTER;
-
- for (*nSamplesProcessed = 0; *nSamplesProcessed < nSamples; ++(*nSamplesProcessed)) {
- HRESULT hr = Receive(pSamples[*nSamplesProcessed]);
-
- if (hr != S_OK)
- return hr;
- }
- return S_OK;
-}
-
-HRESULT DirectShowSampleScheduler::ReceiveCanBlock()
-{
- return S_OK;
-}
-
-void DirectShowSampleScheduler::run(REFERENCE_TIME startTime)
-{
- QMutexLocker locker(&m_mutex);
-
- m_state = (m_state & Flushing) | Running;
- m_startTime = startTime;
-
- for (DirectShowTimedSample *sample = m_head; sample; sample = sample->nextSample()) {
- sample->schedule(m_clock, m_startTime, m_timeoutEvent);
- }
-}
-
-void DirectShowSampleScheduler::pause()
-{
- QMutexLocker locker(&m_mutex);
-
- m_state = (m_state & Flushing) | Paused;
-
- for (DirectShowTimedSample *sample = m_head; sample; sample = sample->nextSample())
- sample->unschedule(m_clock);
-}
-
-void DirectShowSampleScheduler::stop()
-{
- QMutexLocker locker(&m_mutex);
-
- m_state = m_state & Flushing;
-
- for (DirectShowTimedSample *sample = m_head; sample; sample = sample->remove()) {
- sample->unschedule(m_clock);
-
- m_semaphore.release(1);
- }
-
- m_head = 0;
- m_tail = 0;
-}
-
-void DirectShowSampleScheduler::setFlushing(bool flushing)
-{
- QMutexLocker locker(&m_mutex);
-
- const bool isFlushing = m_state & Flushing;
-
- if (isFlushing != flushing) {
- if (flushing) {
- m_state |= Flushing;
-
- for (DirectShowTimedSample *sample = m_head; sample; sample = sample->remove()) {
- sample->unschedule(m_clock);
-
- m_semaphore.release(1);
- }
- m_head = 0;
- m_tail = 0;
- } else {
- m_state &= ~Flushing;
- }
- }
-}
-
-void DirectShowSampleScheduler::setClock(IReferenceClock *clock)
-{
- QMutexLocker locker(&m_mutex);
-
- if (m_clock)
- m_clock->Release();
-
- m_clock = clock;
-
- if (m_clock)
- m_clock->AddRef();
-}
-
-IMediaSample *DirectShowSampleScheduler::takeSample(bool *eos)
-{
- QMutexLocker locker(&m_mutex);
-
- if (m_head && m_head->isReady(m_clock)) {
- IMediaSample *sample = m_head->sample();
- sample->AddRef();
-
- if (m_state == Running) {
- *eos = m_head->isLast();
-
- m_head = m_head->remove();
-
- if (!m_head)
- m_tail = 0;
-
- m_semaphore.release(1);
- }
-
- return sample;
- } else {
- return 0;
- }
-}
-
-bool DirectShowSampleScheduler::scheduleEndOfStream()
-{
- QMutexLocker locker(&m_mutex);
-
- if (m_tail) {
- m_tail->setLast();
-
- return true;
- } else {
- return false;
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.h
deleted file mode 100644
index 21823c3..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowsamplescheduler.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWSAMPLESCHEDULER_H
-#define DIRECTSHOWSAMPLESCHEDULER_H
-
-#include <QtCore/qmutex.h>
-#include <QtCore/qobject.h>
-#include <QtCore/qsemaphore.h>
-
-#include <QtCore/private/qwineventnotifier_p.h>
-
-#include <dshow.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowTimedSample;
-
-class DirectShowSampleScheduler : public QObject, public IMemInputPin
-{
- Q_OBJECT
-public:
-
- enum State
- {
- Stopped = 0x00,
- Running = 0x01,
- Paused = 0x02,
- RunMask = 0x03,
- Flushing = 0x04
- };
-
- DirectShowSampleScheduler(IUnknown *pin, QObject *parent = 0);
- ~DirectShowSampleScheduler();
-
- // IUnknown
- HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
- ULONG STDMETHODCALLTYPE AddRef();
- ULONG STDMETHODCALLTYPE Release();
-
- // IMemInputPin
- HRESULT STDMETHODCALLTYPE GetAllocator(IMemAllocator **ppAllocator);
- HRESULT STDMETHODCALLTYPE NotifyAllocator(IMemAllocator *pAllocator, BOOL bReadOnly);
- HRESULT STDMETHODCALLTYPE GetAllocatorRequirements(ALLOCATOR_PROPERTIES *pProps);
-
- HRESULT STDMETHODCALLTYPE Receive(IMediaSample *pSample);
- HRESULT STDMETHODCALLTYPE ReceiveMultiple(IMediaSample **pSamples, long nSamples, long *nSamplesProcessed);
- HRESULT STDMETHODCALLTYPE ReceiveCanBlock();
-
- void run(REFERENCE_TIME startTime);
- void pause();
- void stop();
- void setFlushing(bool flushing);
-
- IReferenceClock *clock() const { return m_clock; }
- void setClock(IReferenceClock *clock);
-
- bool schedule(IMediaSample *sample);
- bool scheduleEndOfStream();
-
- IMediaSample *takeSample(bool *eos);
-
-Q_SIGNALS:
- void sampleReady();
-
-private:
- IUnknown *m_pin;
- IReferenceClock *m_clock;
- IMemAllocator *m_allocator;
- DirectShowTimedSample *m_head;
- DirectShowTimedSample *m_tail;
- int m_maximumSamples;
- int m_state;
- REFERENCE_TIME m_startTime;
- HANDLE m_timeoutEvent;
- QSemaphore m_semaphore;
- QMutex m_mutex;
- QWinEventNotifier m_eventNotifier;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.cpp
deleted file mode 100644
index ee2bea8..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "directshowvideooutputcontrol.h"
-
-
-QT_BEGIN_NAMESPACE
-
-DirectShowVideoOutputControl::DirectShowVideoOutputControl(QObject *parent)
- : QVideoOutputControl(parent)
- , m_output(NoOutput)
-{
-
-}
-
-DirectShowVideoOutputControl::~DirectShowVideoOutputControl()
-{
-}
-
-QList<QVideoOutputControl::Output> DirectShowVideoOutputControl::availableOutputs() const
-{
- return QList<Output>()
- << RendererOutput
- << WindowOutput;
-}
-
-
-QVideoOutputControl::Output DirectShowVideoOutputControl::output() const
-{
- return m_output;
-}
-
-void DirectShowVideoOutputControl::setOutput(Output output)
-{
- if (output != m_output) {
- switch (output) {
- case NoOutput:
- case RendererOutput:
- case WindowOutput:
- m_output = output;
- emit outputChanged();
- break;
- default:
- break;
- }
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.h
deleted file mode 100644
index 9b857ce..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowvideooutputcontrol.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWVIDEOUTPUTCONTROL_H
-#define DIRECTSHOWVIDEOOUPUTCONTROL_H
-
-#include <QtMediaServices/qvideooutputcontrol.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowVideoOutputControl : public QVideoOutputControl
-{
- Q_OBJECT
-public:
- DirectShowVideoOutputControl(QObject *parent = 0);
- ~DirectShowVideoOutputControl();
-
- QList<Output> availableOutputs() const;
-
- Output output() const;
- void setOutput(Output output);
-
-Q_SIGNALS:
- void outputChanged();
-
-private:
- Output m_output;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.cpp b/src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.cpp
deleted file mode 100644
index f27cb10..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "directshowvideorenderercontrol.h"
-
-#include "videosurfacefilter.h"
-
-
-QT_BEGIN_NAMESPACE
-
-
-DirectShowVideoRendererControl::DirectShowVideoRendererControl(DirectShowEventLoop *loop, QObject *parent)
- : QVideoRendererControl(parent)
- , m_loop(loop)
- , m_surface(0)
- , m_filter(0)
-{
-}
-
-DirectShowVideoRendererControl::~DirectShowVideoRendererControl()
-{
- delete m_filter;
-}
-
-QAbstractVideoSurface *DirectShowVideoRendererControl::surface() const
-{
- return m_surface;
-}
-
-void DirectShowVideoRendererControl::setSurface(QAbstractVideoSurface *surface)
-{
- if (surface != m_surface) {
- m_surface = surface;
-
- VideoSurfaceFilter *existingFilter = m_filter;
-
- if (surface) {
- m_filter = new VideoSurfaceFilter(surface, m_loop);
- } else {
- m_filter = 0;
- }
-
- emit filterChanged();
-
- delete existingFilter;
- }
-}
-
-IBaseFilter *DirectShowVideoRendererControl::filter()
-{
- return m_filter;
-}
-
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.h b/src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.h
deleted file mode 100644
index adaa0f8..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/directshowvideorenderercontrol.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 DIRECTSHOWVIDEORENDERERCONTROL_H
-#define DIRECTSHOWVIDEORENDERERCONTROL_H
-
-#include <QtMediaServices/qvideorenderercontrol.h>
-
-#include <dshow.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class DirectShowEventLoop;
-class VideoSurfaceFilter;
-
-class DirectShowVideoRendererControl : public QVideoRendererControl
-{
- Q_OBJECT
-public:
- DirectShowVideoRendererControl(DirectShowEventLoop *loop, QObject *parent = 0);
- ~DirectShowVideoRendererControl();
-
- QAbstractVideoSurface *surface() const;
- void setSurface(QAbstractVideoSurface *surface);
-
- IBaseFilter *filter();
-
-Q_SIGNALS:
- void filterChanged();
-
-private:
- DirectShowEventLoop *m_loop;
- QAbstractVideoSurface *m_surface;
- VideoSurfaceFilter *m_filter;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/mediaplayer.pri b/src/plugins/mediaservices/directshow/mediaplayer/mediaplayer.pri
deleted file mode 100644
index 99a1191..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/mediaplayer.pri
+++ /dev/null
@@ -1,45 +0,0 @@
-INCLUDEPATH += $$PWD
-
-DEFINES += QMEDIA_DIRECTSHOW_PLAYER
-
-!contains(QT_CONFIG, wmsdk): DEFINES += QT_NO_WMSDK
-
-HEADERS += \
- $$PWD/directshowaudioendpointcontrol.h \
- $$PWD/directshoweventloop.h \
- $$PWD/directshowglobal.h \
- $$PWD/directshowioreader.h \
- $$PWD/directshowiosource.h \
- $$PWD/directshowmediatype.h \
- $$PWD/directshowmediatypelist.h \
- $$PWD/directshowmetadatacontrol.h \
- $$PWD/directshowpinenum.h \
- $$PWD/directshowplayercontrol.h \
- $$PWD/directshowplayerservice.h \
- $$PWD/directshowsamplescheduler.h \
- $$PWD/directshowvideooutputcontrol.h \
- $$PWD/directshowvideorenderercontrol.h \
- $$PWD/mediasamplevideobuffer.h \
- $$PWD/videosurfacefilter.h \
- $$PWD/vmr9videowindowcontrol.h
-
-SOURCES += \
- $$PWD/directshowaudioendpointcontrol.cpp \
- $$PWD/directshoweventloop.cpp \
- $$PWD/directshowioreader.cpp \
- $$PWD/directshowiosource.cpp \
- $$PWD/directshowmediatype.cpp \
- $$PWD/directshowmediatypelist.cpp \
- $$PWD/directshowmetadatacontrol.cpp \
- $$PWD/directshowpinenum.cpp \
- $$PWD/directshowplayercontrol.cpp \
- $$PWD/directshowplayerservice.cpp \
- $$PWD/directshowsamplescheduler.cpp \
- $$PWD/directshowvideooutputcontrol.cpp \
- $$PWD/directshowvideorenderercontrol.cpp \
- $$PWD/mediasamplevideobuffer.cpp \
- $$PWD/videosurfacefilter.cpp \
- $$PWD/vmr9videowindowcontrol.cpp
-
-LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32
-
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.cpp b/src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.cpp
deleted file mode 100644
index 7eff226..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "mediasamplevideobuffer.h"
-
-
-QT_BEGIN_NAMESPACE
-
-MediaSampleVideoBuffer::MediaSampleVideoBuffer(IMediaSample *sample, int bytesPerLine)
- : QAbstractVideoBuffer(NoHandle)
- , m_sample(sample)
- , m_bytesPerLine(m_bytesPerLine)
- , m_mapMode(NotMapped)
-{
- m_sample->AddRef();
-}
-
-MediaSampleVideoBuffer::~MediaSampleVideoBuffer()
-{
- m_sample->Release();
-}
-
-uchar *MediaSampleVideoBuffer::map(MapMode mode, int *numBytes, int *bytesPerLine)
-{
- if (m_mapMode == NotMapped && mode != NotMapped) {
- if (numBytes)
- *numBytes = m_sample->GetActualDataLength();
-
- if (bytesPerLine)
- *bytesPerLine = m_bytesPerLine;
-
- BYTE *bytes = 0;
-
- if (m_sample->GetPointer(&bytes) == S_OK) {
- m_mapMode = mode;
-
- return reinterpret_cast<uchar *>(bytes);
- }
- }
- return 0;
-}
-
-void MediaSampleVideoBuffer::unmap()
-{
- m_mapMode = NotMapped;
-}
-
-QAbstractVideoBuffer::MapMode MediaSampleVideoBuffer::mapMode() const
-{
- return m_mapMode;
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.h b/src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.h
deleted file mode 100644
index 06dc31c..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/mediasamplevideobuffer.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 MEDIASAMPLEVIDEOBUFFER_H
-#define MEDIASAMPLEVIDEOBUFFER_H
-
-#include <QtMultimedia/qabstractvideobuffer.h>
-
-#include <dshow.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class MediaSampleVideoBuffer : public QAbstractVideoBuffer
-{
-public:
- MediaSampleVideoBuffer(IMediaSample *sample, int bytesPerLine);
- ~MediaSampleVideoBuffer();
-
- IMediaSample *sample() { return m_sample; }
-
- uchar *map(MapMode mode, int *numBytes, int *bytesPerLine);
- void unmap();
-
- MapMode mapMode() const;
-
-private:
- IMediaSample *m_sample;
- int m_bytesPerLine;
- MapMode m_mapMode;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.cpp b/src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.cpp
deleted file mode 100644
index a471c68..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.cpp
+++ /dev/null
@@ -1,633 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "videosurfacefilter.h"
-
-#include "directshoweventloop.h"
-#include "directshowglobal.h"
-#include "directshowpinenum.h"
-#include "mediasamplevideobuffer.h"
-
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qcoreevent.h>
-#include <QtCore/qthread.h>
-#include <QtMultimedia/qabstractvideosurface.h>
-
-#include <initguid.h>
-
-
-QT_BEGIN_NAMESPACE
-
-// { e23cad72-153d-406c-bf3f-4c4b523d96f2 }
-DEFINE_GUID(CLSID_VideoSurfaceFilter,
-0xe23cad72, 0x153d, 0x406c, 0xbf, 0x3f, 0x4c, 0x4b, 0x52, 0x3d, 0x96, 0xf2);
-
-VideoSurfaceFilter::VideoSurfaceFilter(
- QAbstractVideoSurface *surface, DirectShowEventLoop *loop, QObject *parent)
- : QObject(parent)
- , m_ref(1)
- , m_state(State_Stopped)
- , m_surface(surface)
- , m_loop(loop)
- , m_graph(0)
- , m_peerPin(0)
- , m_bytesPerLine(0)
- , m_startResult(S_OK)
- , m_pinId(QString::fromLatin1("reference"))
- , m_sampleScheduler(static_cast<IPin *>(this))
-{
- connect(surface, SIGNAL(supportedFormatsChanged()), this, SLOT(supportedFormatsChanged()));
- connect(&m_sampleScheduler, SIGNAL(sampleReady()), this, SLOT(sampleReady()));
-}
-
-VideoSurfaceFilter::~VideoSurfaceFilter()
-{
- Q_ASSERT(m_ref == 1);
-}
-
-HRESULT VideoSurfaceFilter::QueryInterface(REFIID riid, void **ppvObject)
-{
- // 2dd74950-a890-11d1-abe8-00a0c905f375
- static const GUID iid_IAmFilterMiscFlags = {
- 0x2dd74950, 0xa890, 0x11d1, {0xab, 0xe8, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75} };
-
- if (!ppvObject) {
- return E_POINTER;
- } else if (riid == IID_IUnknown
- || riid == IID_IPersist
- || riid == IID_IMediaFilter
- || riid == IID_IBaseFilter) {
- *ppvObject = static_cast<IBaseFilter *>(this);
- } else if (riid == iid_IAmFilterMiscFlags) {
- *ppvObject = static_cast<IAMFilterMiscFlags *>(this);
- } else if (riid == IID_IPin) {
- *ppvObject = static_cast<IPin *>(this);
- } else if (riid == IID_IMemInputPin) {
- *ppvObject = static_cast<IMemInputPin *>(&m_sampleScheduler);
- } else {
- *ppvObject = 0;
-
- return E_NOINTERFACE;
- }
-
- AddRef();
-
- return S_OK;
-}
-
-ULONG VideoSurfaceFilter::AddRef()
-{
- return InterlockedIncrement(&m_ref);
-}
-
-ULONG VideoSurfaceFilter::Release()
-{
- ULONG ref = InterlockedDecrement(&m_ref);
-
- Q_ASSERT(ref != 0);
-
- return ref;
-}
-
-HRESULT VideoSurfaceFilter::GetClassID(CLSID *pClassID)
-{
- *pClassID = CLSID_VideoSurfaceFilter;
-
- return S_OK;
-}
-
-HRESULT VideoSurfaceFilter::Run(REFERENCE_TIME tStart)
-{
- m_state = State_Running;
-
- m_sampleScheduler.run(tStart);
-
- return S_OK;
-}
-
-HRESULT VideoSurfaceFilter::Pause()
-{
- m_state = State_Paused;
-
- m_sampleScheduler.pause();
-
- return S_OK;
-}
-
-HRESULT VideoSurfaceFilter::Stop()
-{
- m_state = State_Stopped;
-
- m_sampleScheduler.stop();
-
- return S_OK;
-}
-
-HRESULT VideoSurfaceFilter::GetState(DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
-{
- if (!pState)
- return E_POINTER;
-
- *pState = m_state;
-
- return S_OK;
-}
-
-HRESULT VideoSurfaceFilter::SetSyncSource(IReferenceClock *pClock)
-{
-
- m_sampleScheduler.setClock(pClock);
-
- return S_OK;
-}
-
-HRESULT VideoSurfaceFilter::GetSyncSource(IReferenceClock **ppClock)
-{
- if (!ppClock) {
- return E_POINTER;
- } else {
- *ppClock = m_sampleScheduler.clock();
-
- if (*ppClock) {
- (*ppClock)->AddRef();
-
- return S_OK;
- } else {
- return S_FALSE;
- }
- }
-}
-
-HRESULT VideoSurfaceFilter::EnumPins(IEnumPins **ppEnum)
-{
- if (ppEnum) {
- *ppEnum = new DirectShowPinEnum(QList<IPin *>() << this);
-
- return S_OK;
- } else {
- return E_POINTER;
- }
-}
-
-HRESULT VideoSurfaceFilter::FindPin(LPCWSTR pId, IPin **ppPin)
-{
- if (!ppPin || !pId) {
- return E_POINTER;
- } else if (QString::fromWCharArray(pId) == m_pinId) {
- AddRef();
-
- *ppPin = this;
-
- return S_OK;
- } else {
- return VFW_E_NOT_FOUND;
- }
-}
-
-HRESULT VideoSurfaceFilter::JoinFilterGraph(IFilterGraph *pGraph, LPCWSTR pName)
-{
- m_graph = pGraph;
- m_name = QString::fromWCharArray(pName);
-
- return S_OK;
-}
-
-HRESULT VideoSurfaceFilter::QueryFilterInfo(FILTER_INFO *pInfo)
-{
- if (pInfo) {
- QString name = m_name;
-
- if (name.length() >= MAX_FILTER_NAME)
- name.truncate(MAX_FILTER_NAME - 1);
-
- int length = name.toWCharArray(pInfo->achName);
- pInfo->achName[length] = '\0';
-
- if (m_graph)
- m_graph->AddRef();
-
- pInfo->pGraph = m_graph;
-
- return S_OK;
- } else {
- return E_POINTER;
- }
-}
-
-HRESULT VideoSurfaceFilter::QueryVendorInfo(LPWSTR *pVendorInfo)
-{
- Q_UNUSED(pVendorInfo);
-
- return E_NOTIMPL;
-}
-
-ULONG VideoSurfaceFilter::GetMiscFlags()
-{
- return AM_FILTER_MISC_FLAGS_IS_RENDERER;
-}
-
-
-HRESULT VideoSurfaceFilter::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
-{
- // This is an input pin, you shouldn't be calling Connect on it.
- return E_POINTER;
-}
-
-HRESULT VideoSurfaceFilter::ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt)
-{
- if (!pConnector) {
- return E_POINTER;
- } else if (!pmt) {
- return E_POINTER;
- } else {
- HRESULT hr;
- QMutexLocker locker(&m_mutex);
-
- if (m_peerPin) {
- hr = VFW_E_ALREADY_CONNECTED;
- } else if (pmt->majortype != MEDIATYPE_Video) {
- hr = VFW_E_TYPE_NOT_ACCEPTED;
- } else {
- m_surfaceFormat = DirectShowMediaType::formatFromType(*pmt);
- m_bytesPerLine = DirectShowMediaType::bytesPerLine(m_surfaceFormat);
-
- if (thread() == QThread::currentThread()) {
- hr = start();
- } else {
- m_loop->postEvent(this, new QEvent(QEvent::Type(StartSurface)));
-
- m_wait.wait(&m_mutex);
-
- hr = m_startResult;
- }
- }
- if (hr == S_OK) {
- m_peerPin = pConnector;
- m_peerPin->AddRef();
-
- DirectShowMediaType::copy(&m_mediaType, *pmt);
- }
- return hr;
- }
-}
-
-HRESULT VideoSurfaceFilter::start()
-{
- if (!m_surface->start(m_surfaceFormat)) {
- return VFW_E_TYPE_NOT_ACCEPTED;
- } else {
- return S_OK;
- }
-}
-
-HRESULT VideoSurfaceFilter::Disconnect()
-{
- QMutexLocker locker(&m_mutex);
-
- if (!m_peerPin)
- return S_FALSE;
-
- if (thread() == QThread::currentThread()) {
- stop();
- } else {
- m_loop->postEvent(this, new QEvent(QEvent::Type(StopSurface)));
-
- m_wait.wait(&m_mutex);
- }
-
- m_mediaType.clear();
-
- m_sampleScheduler.NotifyAllocator(0, FALSE);
-
- m_peerPin->Release();
- m_peerPin = 0;
-
- return S_OK;
-}
-
-void VideoSurfaceFilter::stop()
-{
- m_surface->stop();
-}
-
-HRESULT VideoSurfaceFilter::ConnectedTo(IPin **ppPin)
-{
- if (!ppPin) {
- return E_POINTER;
- } else {
- QMutexLocker locker(&m_mutex);
-
- if (!m_peerPin) {
- return VFW_E_NOT_CONNECTED;
- } else {
- m_peerPin->AddRef();
-
- *ppPin = m_peerPin;
-
- return S_OK;
- }
- }
-}
-
-HRESULT VideoSurfaceFilter::ConnectionMediaType(AM_MEDIA_TYPE *pmt)
-{
- if (!pmt) {
- return E_POINTER;
- } else {
- QMutexLocker locker(&m_mutex);
-
- if (!m_peerPin) {
- return VFW_E_NOT_CONNECTED;
- } else {
- DirectShowMediaType::copy(pmt, m_mediaType);
-
- return S_OK;
- }
- }
-}
-
-HRESULT VideoSurfaceFilter::QueryPinInfo(PIN_INFO *pInfo)
-{
- if (!pInfo) {
- return E_POINTER;
- } else {
- AddRef();
-
- pInfo->pFilter = this;
- pInfo->dir = PINDIR_INPUT;
-
- const int bytes = qMin(MAX_FILTER_NAME, (m_pinId.length() + 1) * 2);
-
- qMemCopy(pInfo->achName, m_pinId.utf16(), bytes);
-
- return S_OK;
- }
-}
-
-HRESULT VideoSurfaceFilter::QueryId(LPWSTR *Id)
-{
- if (!Id) {
- return E_POINTER;
- } else {
- const int bytes = (m_pinId.length() + 1) * 2;
-
- *Id = static_cast<LPWSTR>(::CoTaskMemAlloc(bytes));
-
- qMemCopy(*Id, m_pinId.utf16(), bytes);
-
- return S_OK;
- }
-}
-
-HRESULT VideoSurfaceFilter::QueryAccept(const AM_MEDIA_TYPE *pmt)
-{
- return !m_surface->isFormatSupported(DirectShowMediaType::formatFromType(*pmt))
- ? S_OK
- : S_FALSE;
-}
-
-HRESULT VideoSurfaceFilter::EnumMediaTypes(IEnumMediaTypes **ppEnum)
-{
- if (!ppEnum) {
- return E_POINTER;
- } else {
- QMutexLocker locker(&m_mutex);
-
- *ppEnum = createMediaTypeEnum();
-
- return S_OK;
- }
-}
-
-HRESULT VideoSurfaceFilter::QueryInternalConnections(IPin **apPin, ULONG *nPin)
-{
- Q_UNUSED(apPin);
- Q_UNUSED(nPin);
-
- return E_NOTIMPL;
-}
-
-HRESULT VideoSurfaceFilter::EndOfStream()
-{
- QMutexLocker locker(&m_mutex);
-
- if (!m_sampleScheduler.scheduleEndOfStream()) {
- if (IMediaEventSink *sink = com_cast<IMediaEventSink>(m_graph, IID_IMediaEventSink)) {
- sink->Notify(
- EC_COMPLETE,
- S_OK,
- reinterpret_cast<LONG_PTR>(static_cast<IBaseFilter *>(this)));
- sink->Release();
- }
- }
-
- return S_OK;
-}
-
-HRESULT VideoSurfaceFilter::BeginFlush()
-{
- QMutexLocker locker(&m_mutex);
-
- m_sampleScheduler.setFlushing(true);
-
- if (thread() == QThread::currentThread()) {
- flush();
- } else {
- m_loop->postEvent(this, new QEvent(QEvent::Type(FlushSurface)));
-
- m_wait.wait(&m_mutex);
- }
-
- return S_OK;
-}
-
-HRESULT VideoSurfaceFilter::EndFlush()
-{
- QMutexLocker locker(&m_mutex);
-
- m_sampleScheduler.setFlushing(false);
-
- return S_OK;
-}
-
-void VideoSurfaceFilter::flush()
-{
- m_surface->present(QVideoFrame());
-
- m_wait.wakeAll();
-}
-
-HRESULT VideoSurfaceFilter::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
-{
- Q_UNUSED(tStart);
- Q_UNUSED(tStop);
- Q_UNUSED(dRate);
-
- return S_OK;
-}
-
-HRESULT VideoSurfaceFilter::QueryDirection(PIN_DIRECTION *pPinDir)
-{
- if (!pPinDir) {
- return E_POINTER;
- } else {
- *pPinDir = PINDIR_INPUT;
-
- return S_OK;
- }
-}
-
-int VideoSurfaceFilter::currentMediaTypeToken()
-{
- QMutexLocker locker(&m_mutex);
-
- return DirectShowMediaTypeList::currentMediaTypeToken();
-}
-
-HRESULT VideoSurfaceFilter::nextMediaType(
- int token, int *index, ULONG count, AM_MEDIA_TYPE **types, ULONG *fetchedCount)
-{
- QMutexLocker locker(&m_mutex);
-
- return DirectShowMediaTypeList::nextMediaType(token, index, count, types, fetchedCount);
-
-}
-
-HRESULT VideoSurfaceFilter::skipMediaType(int token, int *index, ULONG count)
-{
- QMutexLocker locker(&m_mutex);
-
- return DirectShowMediaTypeList::skipMediaType(token, index, count);
-}
-
-HRESULT VideoSurfaceFilter::cloneMediaType(int token, int index, IEnumMediaTypes **enumeration)
-{
- QMutexLocker locker(&m_mutex);
-
- return DirectShowMediaTypeList::cloneMediaType(token, index, enumeration);
-}
-
-void VideoSurfaceFilter::customEvent(QEvent *event)
-{
- if (event->type() == StartSurface) {
- QMutexLocker locker(&m_mutex);
-
- m_startResult = start();
-
- m_wait.wakeAll();
- } else if (event->type() == StopSurface) {
- QMutexLocker locker(&m_mutex);
-
- stop();
-
- m_wait.wakeAll();
- } else if (event->type() == FlushSurface) {
- QMutexLocker locker(&m_mutex);
-
- flush();
-
- m_wait.wakeAll();
- } else {
- QObject::customEvent(event);
- }
-}
-
-void VideoSurfaceFilter::supportedFormatsChanged()
-{
- QMutexLocker locker(&m_mutex);
-
- // MEDIASUBTYPE_None;
- static const GUID none = {
- 0xe436eb8e, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70} };
-
- QList<QVideoFrame::PixelFormat> formats = m_surface->supportedPixelFormats();
-
- QVector<AM_MEDIA_TYPE> mediaTypes;
- mediaTypes.reserve(formats.count());
-
- AM_MEDIA_TYPE type;
- type.majortype = MEDIATYPE_Video;
- type.bFixedSizeSamples = TRUE;
- type.bTemporalCompression = FALSE;
- type.lSampleSize = 0;
- type.formattype = GUID_NULL;
- type.pUnk = 0;
- type.cbFormat = 0;
- type.pbFormat = 0;
-
- foreach (QVideoFrame::PixelFormat format, formats) {
- type.subtype = DirectShowMediaType::convertPixelFormat(format);
-
- if (type.subtype != none)
- mediaTypes.append(type);
- }
-
- setMediaTypes(mediaTypes);
-}
-
-void VideoSurfaceFilter::sampleReady()
-{
- bool eos = false;
-
- IMediaSample *sample = m_sampleScheduler.takeSample(&eos);
-
- if (sample) {
- m_surface->present(QVideoFrame(
- new MediaSampleVideoBuffer(sample, m_bytesPerLine),
- m_surfaceFormat.frameSize(),
- m_surfaceFormat.pixelFormat()));
-
- sample->Release();
-
- if (eos) {
- if (IMediaEventSink *sink = com_cast<IMediaEventSink>(m_graph, IID_IMediaEventSink)) {
- sink->Notify(
- EC_COMPLETE,
- S_OK,
- reinterpret_cast<LONG_PTR>(static_cast<IBaseFilter *>(this)));
- sink->Release();
- }
- }
- }
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.h b/src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.h
deleted file mode 100644
index 0607fd3..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/videosurfacefilter.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 VIDEOSURFACEFILTER_H
-#define VIDEOSURFACEFILTER_H
-
-#include "directshowglobal.h"
-#include "directshowmediatypelist.h"
-#include "directshowsamplescheduler.h"
-#include "directshowmediatype.h"
-
-#include <QtCore/qbasictimer.h>
-#include <QtCore/qcoreevent.h>
-#include <QtCore/qmutex.h>
-#include <QtCore/qsemaphore.h>
-#include <QtCore/qstring.h>
-#include <QtCore/qwaitcondition.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
-class QAbstractVideoSurface;
-
-class DirectShowEventLoop;
-
-class VideoSurfaceFilter
- : public QObject
- , public DirectShowMediaTypeList
- , public IBaseFilter
- , public IAMFilterMiscFlags
- , public IPin
-{
- Q_OBJECT
-public:
- VideoSurfaceFilter(
- QAbstractVideoSurface *surface, DirectShowEventLoop *loop, QObject *parent = 0);
- ~VideoSurfaceFilter();
-
- // IUnknown
- HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
- ULONG STDMETHODCALLTYPE AddRef();
- ULONG STDMETHODCALLTYPE Release();
-
- // IPersist
- HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
-
- // IMediaFilter
- HRESULT STDMETHODCALLTYPE Run(REFERENCE_TIME tStart);
- HRESULT STDMETHODCALLTYPE Pause();
- HRESULT STDMETHODCALLTYPE Stop();
-
- HRESULT STDMETHODCALLTYPE GetState(DWORD dwMilliSecsTimeout, FILTER_STATE *pState);
-
- HRESULT STDMETHODCALLTYPE SetSyncSource(IReferenceClock *pClock);
- HRESULT STDMETHODCALLTYPE GetSyncSource(IReferenceClock **ppClock);
-
- // IBaseFilter
- HRESULT STDMETHODCALLTYPE EnumPins(IEnumPins **ppEnum);
- HRESULT STDMETHODCALLTYPE FindPin(LPCWSTR Id, IPin **ppPin);
-
- HRESULT STDMETHODCALLTYPE JoinFilterGraph(IFilterGraph *pGraph, LPCWSTR pName);
-
- HRESULT STDMETHODCALLTYPE QueryFilterInfo(FILTER_INFO *pInfo);
- HRESULT STDMETHODCALLTYPE QueryVendorInfo(LPWSTR *pVendorInfo);
-
- // IAMFilterMiscFlags
- ULONG STDMETHODCALLTYPE GetMiscFlags();
-
- // IPin
- HRESULT STDMETHODCALLTYPE Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt);
- HRESULT STDMETHODCALLTYPE ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt);
- HRESULT STDMETHODCALLTYPE Disconnect();
- HRESULT STDMETHODCALLTYPE ConnectedTo(IPin **ppPin);
-
- HRESULT STDMETHODCALLTYPE ConnectionMediaType(AM_MEDIA_TYPE *pmt);
-
- HRESULT STDMETHODCALLTYPE QueryPinInfo(PIN_INFO *pInfo);
- HRESULT STDMETHODCALLTYPE QueryId(LPWSTR *Id);
-
- HRESULT STDMETHODCALLTYPE QueryAccept(const AM_MEDIA_TYPE *pmt);
-
- HRESULT STDMETHODCALLTYPE EnumMediaTypes(IEnumMediaTypes **ppEnum);
-
- HRESULT STDMETHODCALLTYPE QueryInternalConnections(IPin **apPin, ULONG *nPin);
-
- HRESULT STDMETHODCALLTYPE EndOfStream();
-
- HRESULT STDMETHODCALLTYPE BeginFlush();
- HRESULT STDMETHODCALLTYPE EndFlush();
-
- HRESULT STDMETHODCALLTYPE NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
-
- HRESULT STDMETHODCALLTYPE QueryDirection(PIN_DIRECTION *pPinDir);
-
- int currentMediaTypeToken();
- HRESULT nextMediaType(
- int token, int *index, ULONG count, AM_MEDIA_TYPE **types, ULONG *fetchedCount);
- HRESULT skipMediaType(int token, int *index, ULONG count);
- HRESULT cloneMediaType(int token, int index, IEnumMediaTypes **enumeration);
-
-protected:
- void customEvent(QEvent *event);
-
-private Q_SLOTS:
- void supportedFormatsChanged();
- void sampleReady();
-
-private:
- HRESULT start();
- void stop();
- void flush();
-
- enum
- {
- StartSurface = QEvent::User,
- StopSurface,
- FlushSurface
- };
-
- LONG m_ref;
- FILTER_STATE m_state;
- QAbstractVideoSurface *m_surface;
- DirectShowEventLoop *m_loop;
- IFilterGraph *m_graph;
- IPin *m_peerPin;
- int m_bytesPerLine;
- HRESULT m_startResult;
- QString m_name;
- QString m_pinId;
- DirectShowMediaType m_mediaType;
- QVideoSurfaceFormat m_surfaceFormat;
- QMutex m_mutex;
- QWaitCondition m_wait;
- DirectShowSampleScheduler m_sampleScheduler;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.cpp b/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.cpp
deleted file mode 100644
index 1c6df2c..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.cpp
+++ /dev/null
@@ -1,317 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "vmr9videowindowcontrol.h"
-
-#include "directshowglobal.h"
-
-
-QT_BEGIN_NAMESPACE
-
-Vmr9VideoWindowControl::Vmr9VideoWindowControl(QObject *parent)
- : QVideoWindowControl(parent)
- , m_filter(com_new<IBaseFilter>(CLSID_VideoMixingRenderer9, IID_IBaseFilter))
- , m_windowId(0)
- , m_dirtyValues(0)
- , m_aspectRatioMode(Qt::KeepAspectRatio)
- , m_brightness(0)
- , m_contrast(0)
- , m_hue(0)
- , m_saturation(0)
- , m_fullScreen(false)
-{
- if (IVMRFilterConfig9 *config = com_cast<IVMRFilterConfig9>(m_filter, IID_IVMRFilterConfig9)) {
- config->SetRenderingMode(VMR9Mode_Windowless);
- config->SetNumberOfStreams(1);
- config->SetRenderingPrefs(RenderPrefs9_DoNotRenderBorder);
- config->Release();
- }
-}
-
-Vmr9VideoWindowControl::~Vmr9VideoWindowControl()
-{
- if (m_filter)
- m_filter->Release();
-}
-
-
-WId Vmr9VideoWindowControl::winId() const
-{
- return m_windowId;
-
-}
-
-void Vmr9VideoWindowControl::setWinId(WId id)
-{
- m_windowId = id;
-
- if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>(
- m_filter, IID_IVMRWindowlessControl9)) {
- control->SetVideoClippingWindow(m_windowId);
- control->Release();
- }
-}
-
-QRect Vmr9VideoWindowControl::displayRect() const
-{
- return m_displayRect;
-}
-
-void Vmr9VideoWindowControl::setDisplayRect(const QRect &rect)
-{
- m_displayRect = rect;
-
- if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>(
- m_filter, IID_IVMRWindowlessControl9)) {
- RECT sourceRect = { 0, 0, 0, 0 };
- RECT displayRect = { rect.left(), rect.top(), rect.right(), rect.bottom() };
-
- control->GetNativeVideoSize(&sourceRect.right, &sourceRect.bottom, 0, 0);
-
- if (m_aspectRatioMode == Qt::KeepAspectRatioByExpanding) {
- QSize clippedSize = rect.size();
- clippedSize.scale(sourceRect.right, sourceRect.bottom, Qt::KeepAspectRatio);
-
- sourceRect.left = (sourceRect.right - clippedSize.width()) / 2;
- sourceRect.top = (sourceRect.bottom - clippedSize.height()) / 2;
- sourceRect.right = sourceRect.left + clippedSize.width();
- sourceRect.bottom = sourceRect.top + clippedSize.height();
- }
-
- control->SetVideoPosition(&sourceRect, &displayRect);
- control->Release();
- }
-}
-
-bool Vmr9VideoWindowControl::isFullScreen() const
-{
- return m_fullScreen;
-}
-
-void Vmr9VideoWindowControl::setFullScreen(bool fullScreen)
-{
- emit fullScreenChanged(m_fullScreen = fullScreen);
-}
-
-void Vmr9VideoWindowControl::repaint()
-{
- if (QWidget *widget = QWidget::find(m_windowId)) {
- HDC dc = widget->getDC();
- if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>(
- m_filter, IID_IVMRWindowlessControl9)) {
- control->RepaintVideo(m_windowId, dc);
- control->Release();
- }
- widget->releaseDC(dc);
- }
-}
-
-QSize Vmr9VideoWindowControl::nativeSize() const
-{
- QSize size;
-
- if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>(
- m_filter, IID_IVMRWindowlessControl9)) {
- LONG width;
- LONG height;
-
- if (control->GetNativeVideoSize(&width, &height, 0, 0) == S_OK)
- size = QSize(width, height);
- control->Release();
- }
- return size;
-}
-
-Qt::AspectRatioMode Vmr9VideoWindowControl::aspectRatioMode() const
-{
- return m_aspectRatioMode;
-}
-
-void Vmr9VideoWindowControl::setAspectRatioMode(Qt::AspectRatioMode mode)
-{
- m_aspectRatioMode = mode;
-
- if (IVMRWindowlessControl9 *control = com_cast<IVMRWindowlessControl9>(
- m_filter, IID_IVMRWindowlessControl9)) {
- switch (mode) {
- case Qt::IgnoreAspectRatio:
- control->SetAspectRatioMode(VMR9ARMode_None);
- break;
- case Qt::KeepAspectRatio:
- control->SetAspectRatioMode(VMR9ARMode_LetterBox);
- break;
- case Qt::KeepAspectRatioByExpanding:
- control->SetAspectRatioMode(VMR9ARMode_LetterBox);
- break;
- default:
- break;
- }
- control->Release();
-
- setDisplayRect(m_displayRect);
- }
-}
-
-int Vmr9VideoWindowControl::brightness() const
-{
- return m_brightness;
-}
-
-void Vmr9VideoWindowControl::setBrightness(int brightness)
-{
- m_brightness = brightness;
-
- m_dirtyValues |= ProcAmpControl9_Brightness;
-
- setProcAmpValues();
-
- emit brightnessChanged(brightness);
-}
-
-int Vmr9VideoWindowControl::contrast() const
-{
- return m_contrast;
-}
-
-void Vmr9VideoWindowControl::setContrast(int contrast)
-{
- m_contrast = contrast;
-
- m_dirtyValues |= ProcAmpControl9_Contrast;
-
- setProcAmpValues();
-
- emit contrastChanged(contrast);
-}
-
-int Vmr9VideoWindowControl::hue() const
-{
- return m_hue;
-}
-
-void Vmr9VideoWindowControl::setHue(int hue)
-{
- m_hue = hue;
-
- m_dirtyValues |= ProcAmpControl9_Hue;
-
- setProcAmpValues();
-
- emit hueChanged(hue);
-}
-
-int Vmr9VideoWindowControl::saturation() const
-{
- return m_saturation;
-}
-
-void Vmr9VideoWindowControl::setSaturation(int saturation)
-{
- m_saturation = saturation;
-
- m_dirtyValues |= ProcAmpControl9_Saturation;
-
- setProcAmpValues();
-
- emit saturationChanged(saturation);
-}
-
-void Vmr9VideoWindowControl::updateNativeSize()
-{
- setDisplayRect(m_displayRect);
-
- emit nativeSizeChanged();
-}
-
-void Vmr9VideoWindowControl::setProcAmpValues()
-{
- if (IVMRMixerControl9 *control = com_cast<IVMRMixerControl9>(m_filter, IID_IVMRMixerControl9)) {
- VMR9ProcAmpControl procAmp;
- procAmp.dwSize = sizeof(VMR9ProcAmpControl);
- procAmp.dwFlags = m_dirtyValues;
-
- if (m_dirtyValues & ProcAmpControl9_Brightness) {
- procAmp.Brightness = scaleProcAmpValue(
- control, ProcAmpControl9_Brightness, m_brightness);
- }
- if (m_dirtyValues & ProcAmpControl9_Contrast) {
- procAmp.Contrast = scaleProcAmpValue(
- control, ProcAmpControl9_Contrast, m_contrast);
- }
- if (m_dirtyValues & ProcAmpControl9_Hue) {
- procAmp.Hue = scaleProcAmpValue(
- control, ProcAmpControl9_Hue, m_hue);
- }
- if (m_dirtyValues & ProcAmpControl9_Saturation) {
- procAmp.Saturation = scaleProcAmpValue(
- control, ProcAmpControl9_Saturation, m_saturation);
- }
-
- if (SUCCEEDED(control->SetProcAmpControl(0, &procAmp))) {
- m_dirtyValues = 0;
- }
-
- control->Release();
- }
-}
-
-float Vmr9VideoWindowControl::scaleProcAmpValue(
- IVMRMixerControl9 *control, VMR9ProcAmpControlFlags property, int value) const
-{
- float scaledValue = 0.0;
-
- VMR9ProcAmpControlRange range;
- range.dwSize = sizeof(VMR9ProcAmpControlRange);
- range.dwProperty = property;
-
- if (SUCCEEDED(control->GetProcAmpControlRange(0, &range))) {
- scaledValue = range.DefaultValue;
- if (value > 0)
- scaledValue += float(value) * (range.MaxValue - range.DefaultValue) / 100;
- else if (value < 0)
- scaledValue -= float(value) * (range.MinValue - range.DefaultValue) / 100;
- }
-
- return scaledValue;
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.h b/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.h
deleted file mode 100644
index 702dfd6..0000000
--- a/src/plugins/mediaservices/directshow/mediaplayer/vmr9videowindowcontrol.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 VMR9VIDEOWINDOWCONTROL_H
-#define VMR9VIDEOWINDOWCONTROL_H
-
-#include <QtMediaServices/qvideowindowcontrol.h>
-
-#include <dshow.h>
-#include <d3d9.h>
-#include <vmr9.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class Vmr9VideoWindowControl : public QVideoWindowControl
-{
- Q_OBJECT
-public:
- Vmr9VideoWindowControl(QObject *parent = 0);
- ~Vmr9VideoWindowControl();
-
- IBaseFilter *filter() const { return m_filter; }
-
- WId winId() const;
- void setWinId(WId id);
-
- QRect displayRect() const;
- void setDisplayRect(const QRect &rect);
-
- bool isFullScreen() const;
- void setFullScreen(bool fullScreen);
-
- void repaint();
-
- QSize nativeSize() const;
-
- Qt::AspectRatioMode aspectRatioMode() const;
- void setAspectRatioMode(Qt::AspectRatioMode mode);
-
- int brightness() const;
- void setBrightness(int brightness);
-
- int contrast() const;
- void setContrast(int contrast);
-
- int hue() const;
- void setHue(int hue);
-
- int saturation() const;
- void setSaturation(int saturation);
-
- void updateNativeSize();
-
-private:
- void setProcAmpValues();
- float scaleProcAmpValue(
- IVMRMixerControl9 *control, VMR9ProcAmpControlFlags property, int value) const;
-
- IBaseFilter *m_filter;
- WId m_windowId;
- DWORD m_dirtyValues;
- Qt::AspectRatioMode m_aspectRatioMode;
- QRect m_displayRect;
- int m_brightness;
- int m_contrast;
- int m_hue;
- int m_saturation;
- bool m_fullScreen;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/gstreamer/gstreamer.pro b/src/plugins/mediaservices/gstreamer/gstreamer.pro
deleted file mode 100644
index 6af9c3f..0000000
--- a/src/plugins/mediaservices/gstreamer/gstreamer.pro
+++ /dev/null
@@ -1,59 +0,0 @@
-TARGET = qgstengine
-include(../../qpluginbase.pri)
-
-QT += mediaservices
-
-unix:contains(QT_CONFIG, alsa) {
- DEFINES += HAVE_ALSA
- LIBS += -lasound
-}
-
-QMAKE_CXXFLAGS += $$QT_CFLAGS_GSTREAMER
-LIBS += $$QT_LIBS_GSTREAMER -lgstinterfaces-0.10 -lgstvideo-0.10 -lgstbase-0.10 -lgstaudio-0.10
-
-# Input
-HEADERS += \
- qgstreamermessage.h \
- qgstreamerbushelper.h \
- qgstreamervideooutputcontrol.h \
- qgstreamervideorendererinterface.h \
- qgstreamerserviceplugin.h \
- qgstreamervideoinputdevicecontrol.h \
- qgstreamervideorenderer.h \
- qgstvideobuffer.h \
- qvideosurfacegstsink.h
-
-
-SOURCES += \
- qgstreamermessage.cpp \
- qgstreamerbushelper.cpp \
- qgstreamervideooutputcontrol.cpp \
- qgstreamervideorendererinterface.cpp \
- qgstreamerserviceplugin.cpp \
- qgstreamervideoinputdevicecontrol.cpp \
- qgstreamervideorenderer.cpp \
- qgstvideobuffer.cpp \
- qvideosurfacegstsink.cpp
-
-
-x11 {
- LIBS += -lXv
-
- HEADERS += \
- qgstreamervideooverlay.h \
- qgstreamervideowidget.h \
- qx11videosurface.h \
- qgstxvimagebuffer.h
-
- SOURCES += \
- qgstreamervideooverlay.cpp \
- qgstreamervideowidget.cpp \
- qx11videosurface.cpp \
- qgstxvimagebuffer.cpp
-}
-
-include(mediaplayer/mediaplayer.pri)
-
-QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/mediaservices
-target.path = $$[QT_INSTALL_PLUGINS]/mediaservices
-INSTALLS += target
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/mediaplayer.pri b/src/plugins/mediaservices/gstreamer/mediaplayer/mediaplayer.pri
deleted file mode 100644
index 19ff034..0000000
--- a/src/plugins/mediaservices/gstreamer/mediaplayer/mediaplayer.pri
+++ /dev/null
@@ -1,17 +0,0 @@
-INCLUDEPATH += $$PWD
-
-DEFINES += QMEDIA_GSTREAMER_PLAYER
-
-HEADERS += \
- $$PWD/qgstreamerplayercontrol.h \
- $$PWD/qgstreamerplayerservice.h \
- $$PWD/qgstreamerplayersession.h \
- $$PWD/qgstreamermetadataprovider.h
-
-SOURCES += \
- $$PWD/qgstreamerplayercontrol.cpp \
- $$PWD/qgstreamerplayerservice.cpp \
- $$PWD/qgstreamerplayersession.cpp \
- $$PWD/qgstreamermetadataprovider.cpp
-
-
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp
deleted file mode 100644
index f51d024..0000000
--- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qgstreamermetadataprovider.h"
-#include "qgstreamerplayersession.h"
-#include <QtCore/qdebug.h>
-
-#include <gst/gstversion.h>
-
-QT_BEGIN_NAMESPACE
-
-struct QGstreamerMetaDataKeyLookup
-{
- QtMediaServices::MetaData key;
- const char *token;
-};
-
-static const QGstreamerMetaDataKeyLookup qt_gstreamerMetaDataKeys[] =
-{
- { QtMediaServices::Title, GST_TAG_TITLE },
- //{ QtMediaServices::SubTitle, 0 },
- //{ QtMediaServices::Author, 0 },
- { QtMediaServices::Comment, GST_TAG_COMMENT },
- { QtMediaServices::Description, GST_TAG_DESCRIPTION },
- //{ QtMediaServices::Category, 0 },
- { QtMediaServices::Genre, GST_TAG_GENRE },
- { QtMediaServices::Year, "year" },
- //{ QtMediaServices::UserRating, 0 },
-
- { QtMediaServices::Language, GST_TAG_LANGUAGE_CODE },
-
- { QtMediaServices::Publisher, GST_TAG_ORGANIZATION },
- { QtMediaServices::Copyright, GST_TAG_COPYRIGHT },
- //{ QtMediaServices::ParentalRating, 0 },
- //{ QtMediaServices::RatingOrganisation, 0 },
-
- // Media
- //{ QtMediaServices::Size, 0 },
- //{ QtMediaServices::MediaType, 0 },
- { QtMediaServices::Duration, GST_TAG_DURATION },
-
- // Audio
- { QtMediaServices::AudioBitRate, GST_TAG_BITRATE },
- { QtMediaServices::AudioCodec, GST_TAG_AUDIO_CODEC },
- //{ QtMediaServices::ChannelCount, 0 },
- //{ QtMediaServices::Frequency, 0 },
-
- // Music
- { QtMediaServices::AlbumTitle, GST_TAG_ALBUM },
- { QtMediaServices::AlbumArtist, GST_TAG_ARTIST},
- { QtMediaServices::ContributingArtist, GST_TAG_PERFORMER },
-#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 19)
- { QtMediaServices::Composer, GST_TAG_COMPOSER },
-#endif
- //{ QtMediaServices::Conductor, 0 },
- //{ QtMediaServices::Lyrics, 0 },
- //{ QtMediaServices::Mood, 0 },
- { QtMediaServices::TrackNumber, GST_TAG_TRACK_NUMBER },
-
- //{ QtMediaServices::CoverArtUrlSmall, 0 },
- //{ QtMediaServices::CoverArtUrlLarge, 0 },
-
- // Image/Video
- //{ QtMediaServices::Resolution, 0 },
- //{ QtMediaServices::PixelAspectRatio, 0 },
-
- // Video
- //{ QtMediaServices::VideoFrameRate, 0 },
- //{ QtMediaServices::VideoBitRate, 0 },
- { QtMediaServices::VideoCodec, GST_TAG_VIDEO_CODEC },
-
- //{ QtMediaServices::PosterUrl, 0 },
-
- // Movie
- //{ QtMediaServices::ChapterNumber, 0 },
- //{ QtMediaServices::Director, 0 },
- { QtMediaServices::LeadPerformer, GST_TAG_PERFORMER },
- //{ QtMediaServices::Writer, 0 },
-
- // Photos
- //{ QtMediaServices::CameraManufacturer, 0 },
- //{ QtMediaServices::CameraModel, 0 },
- //{ QtMediaServices::Event, 0 },
- //{ QtMediaServices::Subject, 0 }
-};
-
-QGstreamerMetaDataProvider::QGstreamerMetaDataProvider(QGstreamerPlayerSession *session, QObject *parent)
- :QMetaDataControl(parent), m_session(session)
-{
- connect(m_session, SIGNAL(tagsChanged()), SLOT(updateTags()));
-}
-
-QGstreamerMetaDataProvider::~QGstreamerMetaDataProvider()
-{
-}
-
-bool QGstreamerMetaDataProvider::isMetaDataAvailable() const
-{
- return !m_session->tags().isEmpty();
-}
-
-bool QGstreamerMetaDataProvider::isWritable() const
-{
- return false;
-}
-
-QVariant QGstreamerMetaDataProvider::metaData(QtMediaServices::MetaData key) const
-{
- static const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
-
- for (int i = 0; i < count; ++i) {
- if (qt_gstreamerMetaDataKeys[i].key == key) {
- return m_session->tags().value(QByteArray(qt_gstreamerMetaDataKeys[i].token));
- }
- }
- return QVariant();
-}
-
-void QGstreamerMetaDataProvider::setMetaData(QtMediaServices::MetaData key, QVariant const &value)
-{
- Q_UNUSED(key);
- Q_UNUSED(value);
-}
-
-QList<QtMediaServices::MetaData> QGstreamerMetaDataProvider::availableMetaData() const
-{
- static QMap<QByteArray, QtMediaServices::MetaData> keysMap;
- if (keysMap.isEmpty()) {
- const int count = sizeof(qt_gstreamerMetaDataKeys) / sizeof(QGstreamerMetaDataKeyLookup);
- for (int i = 0; i < count; ++i) {
- keysMap[QByteArray(qt_gstreamerMetaDataKeys[i].token)] = qt_gstreamerMetaDataKeys[i].key;
- }
- }
-
- QList<QtMediaServices::MetaData> res;
- foreach (const QByteArray &key, m_session->tags().keys()) {
- QtMediaServices::MetaData tag = keysMap.value(key, QtMediaServices::MetaData(-1));
- if (tag != -1)
- res.append(tag);
- }
-
- return res;
-}
-
-QVariant QGstreamerMetaDataProvider::extendedMetaData(const QString &key) const
-{
- return m_session->tags().value(key.toLatin1());
-}
-
-void QGstreamerMetaDataProvider::setExtendedMetaData(const QString &key, QVariant const &value)
-{
- Q_UNUSED(key);
- Q_UNUSED(value);
-}
-
-QStringList QGstreamerMetaDataProvider::availableExtendedMetaData() const
-{
- QStringList res;
- foreach (const QByteArray &key, m_session->tags().keys())
- res.append(QString(key));
-
- return res;
-}
-
-void QGstreamerMetaDataProvider::updateTags()
-{
- emit metaDataChanged();
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.h b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.h
deleted file mode 100644
index 4cf716a..0000000
--- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamermetadataprovider.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTREAMERMETADATAPROVIDER_H
-#define QGSTREAMERMETADATAPROVIDER_H
-
-#include <QtMediaServices/qmetadatacontrol.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGstreamerPlayerSession;
-
-class QGstreamerMetaDataProvider : public QMetaDataControl
-{
- Q_OBJECT
-public:
- QGstreamerMetaDataProvider( QGstreamerPlayerSession *session, QObject *parent );
- virtual ~QGstreamerMetaDataProvider();
-
- bool isMetaDataAvailable() const;
- bool isWritable() const;
-
- QVariant metaData(QtMediaServices::MetaData key) const;
- void setMetaData(QtMediaServices::MetaData key, const QVariant &value);
- QList<QtMediaServices::MetaData> availableMetaData() const;
-
- QVariant extendedMetaData(const QString &key) const ;
- void setExtendedMetaData(const QString &key, const QVariant &value);
- QStringList availableExtendedMetaData() const;
-
-private slots:
- void updateTags();
-
-private:
- QGstreamerPlayerSession *m_session;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QGSTREAMERMETADATAPROVIDER_H
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
deleted file mode 100644
index 6dd914a..0000000
--- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
+++ /dev/null
@@ -1,501 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qgstreamerplayercontrol.h"
-#include "qgstreamerplayersession.h"
-
-#include <qmediaplaylistnavigator.h>
-
-#include <QtCore/qdir.h>
-#include <QtCore/qsocketnotifier.h>
-#include <QtCore/qurl.h>
-#include <QtCore/qdebug.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-QT_BEGIN_NAMESPACE
-
-QGstreamerPlayerControl::QGstreamerPlayerControl(QGstreamerPlayerSession *session, QObject *parent)
- : QMediaPlayerControl(parent)
- , m_session(session)
- , m_state(QMediaPlayer::StoppedState)
- , m_mediaStatus(QMediaPlayer::NoMedia)
- , m_bufferProgress(-1)
- , m_seekToStartPending(false)
- , m_stream(0)
- , m_fifoNotifier(0)
- , m_fifoCanWrite(false)
- , m_bufferSize(0)
- , m_bufferOffset(0)
-{
- m_fifoFd[0] = -1;
- m_fifoFd[1] = -1;
-
- connect(m_session, SIGNAL(positionChanged(qint64)),
- this, SIGNAL(positionChanged(qint64)));
- connect(m_session, SIGNAL(durationChanged(qint64)),
- this, SIGNAL(durationChanged(qint64)));
- connect(m_session, SIGNAL(mutedStateChanged(bool)),
- this, SIGNAL(mutedChanged(bool)));
- connect(m_session, SIGNAL(volumeChanged(int)),
- this, SIGNAL(volumeChanged(int)));
- connect(m_session, SIGNAL(stateChanged(QMediaPlayer::State)),
- this, SLOT(updateState(QMediaPlayer::State)));
- connect(m_session,SIGNAL(bufferingProgressChanged(int)),
- this, SLOT(setBufferProgress(int)));
- connect(m_session, SIGNAL(playbackFinished()),
- this, SLOT(processEOS()));
- connect(m_session, SIGNAL(audioAvailableChanged(bool)),
- this, SIGNAL(audioAvailableChanged(bool)));
- connect(m_session, SIGNAL(videoAvailableChanged(bool)),
- this, SIGNAL(videoAvailableChanged(bool)));
- connect(m_session, SIGNAL(seekableChanged(bool)),
- this, SIGNAL(seekableChanged(bool)));
- connect(m_session, SIGNAL(error(int,QString)),
- this, SIGNAL(error(int,QString)));
-}
-
-QGstreamerPlayerControl::~QGstreamerPlayerControl()
-{
- if (m_fifoFd[0] >= 0) {
- ::close(m_fifoFd[0]);
- ::close(m_fifoFd[1]);
- m_fifoFd[0] = -1;
- m_fifoFd[1] = -1;
- }
-}
-
-qint64 QGstreamerPlayerControl::position() const
-{
- return m_seekToStartPending ? 0 : m_session->position();
-}
-
-qint64 QGstreamerPlayerControl::duration() const
-{
- return m_session->duration();
-}
-
-QMediaPlayer::State QGstreamerPlayerControl::state() const
-{
- return m_state;
-}
-
-QMediaPlayer::MediaStatus QGstreamerPlayerControl::mediaStatus() const
-{
- return m_mediaStatus;
-}
-
-int QGstreamerPlayerControl::bufferStatus() const
-{
- if (m_bufferProgress == -1) {
- return m_session->state() == QMediaPlayer::StoppedState ? 0 : 100;
- } else
- return m_bufferProgress;
-}
-
-int QGstreamerPlayerControl::volume() const
-{
- return m_session->volume();
-}
-
-bool QGstreamerPlayerControl::isMuted() const
-{
- return m_session->isMuted();
-}
-
-bool QGstreamerPlayerControl::isSeekable() const
-{
- return m_session->isSeekable();
-}
-
-QMediaTimeRange QGstreamerPlayerControl::availablePlaybackRanges() const
-{
- QMediaTimeRange ranges;
-
- if (m_session->isSeekable())
- ranges.addInterval(0, m_session->duration());
-
- return ranges;
-}
-
-qreal QGstreamerPlayerControl::playbackRate() const
-{
- return m_session->playbackRate();
-}
-
-void QGstreamerPlayerControl::setPlaybackRate(qreal rate)
-{
- m_session->setPlaybackRate(rate);
-}
-
-void QGstreamerPlayerControl::setPosition(qint64 pos)
-{
- if (m_mediaStatus == QMediaPlayer::EndOfMedia) {
- m_mediaStatus = QMediaPlayer::LoadedMedia;
- emit mediaStatusChanged(m_mediaStatus);
- }
-
- if (m_session->seek(pos))
- m_seekToStartPending = false;
-}
-
-void QGstreamerPlayerControl::play()
-{
- playOrPause(QMediaPlayer::PlayingState);
-}
-
-void QGstreamerPlayerControl::pause()
-{
- playOrPause(QMediaPlayer::PausedState);
-}
-
-void QGstreamerPlayerControl::playOrPause(QMediaPlayer::State newState)
-{
- QMediaPlayer::State oldState = m_state;
- QMediaPlayer::MediaStatus oldMediaStatus = m_mediaStatus;
-
- if (m_mediaStatus == QMediaPlayer::EndOfMedia)
- m_mediaStatus = QMediaPlayer::BufferedMedia;
-
- if (m_seekToStartPending) {
- m_session->pause();
- if (!m_session->seek(0)) {
- m_bufferProgress = -1;
- m_session->stop();
- m_mediaStatus = QMediaPlayer::LoadingMedia;
- }
- m_seekToStartPending = false;
- }
-
- bool ok = false;
- if (newState == QMediaPlayer::PlayingState)
- ok = m_session->play();
- else
- ok = m_session->pause();
-
- if (!ok)
- return;
-
- m_state = newState;
-
- if (m_mediaStatus == QMediaPlayer::EndOfMedia || m_mediaStatus == QMediaPlayer::LoadedMedia) {
- if (m_bufferProgress == -1 || m_bufferProgress == 100)
- m_mediaStatus = QMediaPlayer::BufferedMedia;
- else
- m_mediaStatus = QMediaPlayer::BufferingMedia;
- }
-
- if (m_state != oldState)
- emit stateChanged(m_state);
- if (m_mediaStatus != oldMediaStatus)
- emit mediaStatusChanged(m_mediaStatus);
-
-}
-
-void QGstreamerPlayerControl::stop()
-{
- if (m_state != QMediaPlayer::StoppedState) {
- m_state = QMediaPlayer::StoppedState;
- m_session->pause();
- m_seekToStartPending = true;
- updateState(m_session->state());
- emit positionChanged(0);
- emit stateChanged(m_state);
- }
-}
-
-void QGstreamerPlayerControl::setVolume(int volume)
-{
- m_session->setVolume(volume);
-}
-
-void QGstreamerPlayerControl::setMuted(bool muted)
-{
- m_session->setMuted(muted);
-}
-
-QMediaContent QGstreamerPlayerControl::media() const
-{
- return m_currentResource;
-}
-
-const QIODevice *QGstreamerPlayerControl::mediaStream() const
-{
- return m_stream;
-}
-
-void QGstreamerPlayerControl::setMedia(const QMediaContent &content, QIODevice *stream)
-{
- QMediaPlayer::State oldState = m_state;
- m_state = QMediaPlayer::StoppedState;
- m_session->stop();
-
- if (m_bufferProgress != -1) {
- m_bufferProgress = -1;
- emit bufferStatusChanged(0);
- }
-
- if (m_stream) {
- closeFifo();
-
- disconnect(m_stream, SIGNAL(readyRead()), this, SLOT(writeFifo()));
- m_stream = 0;
- }
-
- m_currentResource = content;
- m_stream = stream;
- m_seekToStartPending = false;
-
- QUrl url;
-
- if (m_stream) {
- if (m_stream->isReadable() && openFifo()) {
- url = QUrl(QString(QLatin1String("fd://%1")).arg(m_fifoFd[0]));
- }
- } else if (!content.isNull()) {
- url = content.canonicalUrl();
- }
-
- m_session->load(url);
-
- if (m_fifoFd[1] >= 0) {
- m_fifoCanWrite = true;
-
- writeFifo();
- }
-
- if (!url.isEmpty()) {
- if (m_mediaStatus != QMediaPlayer::LoadingMedia)
- emit mediaStatusChanged(m_mediaStatus = QMediaPlayer::LoadingMedia);
- m_session->pause();
- } else {
- if (m_mediaStatus != QMediaPlayer::NoMedia)
- emit mediaStatusChanged(m_mediaStatus = QMediaPlayer::NoMedia);
- setBufferProgress(0);
- }
-
- emit mediaChanged(m_currentResource);
- if (m_state != oldState)
- emit stateChanged(m_state);
-}
-
-void QGstreamerPlayerControl::setVideoOutput(QObject *output)
-{
- m_session->setVideoRenderer(output);
-}
-
-bool QGstreamerPlayerControl::isAudioAvailable() const
-{
- return m_session->isAudioAvailable();
-}
-
-bool QGstreamerPlayerControl::isVideoAvailable() const
-{
- return m_session->isVideoAvailable();
-}
-
-void QGstreamerPlayerControl::updateState(QMediaPlayer::State state)
-{
- QMediaPlayer::MediaStatus oldStatus = m_mediaStatus;
- QMediaPlayer::State oldState = m_state;
-
- switch (state) {
- case QMediaPlayer::StoppedState:
- m_state = QMediaPlayer::StoppedState;
- if (m_currentResource.isNull())
- m_mediaStatus = QMediaPlayer::NoMedia;
- else
- m_mediaStatus = QMediaPlayer::LoadingMedia;
- break;
-
- case QMediaPlayer::PlayingState:
- case QMediaPlayer::PausedState:
- if (m_state == QMediaPlayer::StoppedState) {
- m_mediaStatus = QMediaPlayer::LoadedMedia;
- } else {
- if (m_bufferProgress == -1 || m_bufferProgress == 100)
- m_mediaStatus = QMediaPlayer::BufferedMedia;
- }
- break;
- }
-
- //EndOfMedia status should be kept, until reset by pause, play or setMedia
- if (oldStatus == QMediaPlayer::EndOfMedia)
- m_mediaStatus = QMediaPlayer::EndOfMedia;
-
- if (m_state != oldState)
- emit stateChanged(m_state);
- if (m_mediaStatus != oldStatus)
- emit mediaStatusChanged(m_mediaStatus);
-}
-
-void QGstreamerPlayerControl::processEOS()
-{
- m_mediaStatus = QMediaPlayer::EndOfMedia;
- stop();
- emit mediaStatusChanged(m_mediaStatus);
-}
-
-void QGstreamerPlayerControl::setBufferProgress(int progress)
-{
- if (m_bufferProgress == progress || m_mediaStatus == QMediaPlayer::NoMedia)
- return;
-
- QMediaPlayer::MediaStatus oldStatus = m_mediaStatus;
-
- m_bufferProgress = progress;
-
- if (m_state == QMediaPlayer::StoppedState) {
- m_mediaStatus = QMediaPlayer::LoadedMedia;
- } else {
- if (m_bufferProgress < 100) {
- m_mediaStatus = QMediaPlayer::StalledMedia;
- m_session->pause();
- } else {
- m_mediaStatus = QMediaPlayer::BufferedMedia;
- if (m_state == QMediaPlayer::PlayingState)
- m_session->play();
- }
- }
-
- if (m_mediaStatus != oldStatus)
- emit mediaStatusChanged(m_mediaStatus);
-
- emit bufferStatusChanged(m_bufferProgress);
-}
-
-void QGstreamerPlayerControl::writeFifo()
-{
- if (m_fifoCanWrite) {
- qint64 bytesToRead = qMin<qint64>(
- m_stream->bytesAvailable(), PIPE_BUF - m_bufferSize);
-
- if (bytesToRead > 0) {
- int bytesRead = m_stream->read(&m_buffer[m_bufferOffset + m_bufferSize], bytesToRead);
-
- if (bytesRead > 0)
- m_bufferSize += bytesRead;
- }
-
- if (m_bufferSize > 0) {
- int bytesWritten = ::write(m_fifoFd[1], &m_buffer[m_bufferOffset], size_t(m_bufferSize));
-
- if (bytesWritten > 0) {
- m_bufferOffset += bytesWritten;
- m_bufferSize -= bytesWritten;
-
- if (m_bufferSize == 0)
- m_bufferOffset = 0;
- } else if (errno == EAGAIN) {
- m_fifoCanWrite = false;
- } else {
- closeFifo();
- }
- }
- }
-
- m_fifoNotifier->setEnabled(m_stream->bytesAvailable() > 0);
-}
-
-void QGstreamerPlayerControl::fifoReadyWrite(int socket)
-{
- if (socket == m_fifoFd[1]) {
- m_fifoCanWrite = true;
-
- writeFifo();
- }
-}
-
-bool QGstreamerPlayerControl::openFifo()
-{
- Q_ASSERT(m_fifoFd[0] < 0);
- Q_ASSERT(m_fifoFd[1] < 0);
-
- if (::pipe(m_fifoFd) == 0) {
- int flags = ::fcntl(m_fifoFd[1], F_GETFD);
-
- if (::fcntl(m_fifoFd[1], F_SETFD, flags | O_NONBLOCK) >= 0) {
- m_fifoNotifier = new QSocketNotifier(m_fifoFd[1], QSocketNotifier::Write);
-
- connect(m_fifoNotifier, SIGNAL(activated(int)), this, SLOT(fifoReadyWrite(int)));
-
- return true;
- } else {
- qWarning("Failed to make pipe non blocking %d", errno);
-
- ::close(m_fifoFd[0]);
- ::close(m_fifoFd[1]);
-
- m_fifoFd[0] = -1;
- m_fifoFd[1] = -1;
-
- return false;
- }
- } else {
- qWarning("Failed to create pipe %d", errno);
-
- return false;
- }
-}
-
-void QGstreamerPlayerControl::closeFifo()
-{
- if (m_fifoFd[0] >= 0) {
- delete m_fifoNotifier;
- m_fifoNotifier = 0;
-
- ::close(m_fifoFd[0]);
- ::close(m_fifoFd[1]);
- m_fifoFd[0] = -1;
- m_fifoFd[1] = -1;
-
- m_fifoCanWrite = false;
-
- m_bufferSize = 0;
- m_bufferOffset = 0;
- }
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.h b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.h
deleted file mode 100644
index c95f37a..0000000
--- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayercontrol.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTREAMERPLAYERCONTROL_H
-#define QGSTREAMERPLAYERCONTROL_H
-
-#include <QtCore/qobject.h>
-
-#include <QtMediaServices/qmediaplayercontrol.h>
-#include <QtMediaServices/qmediaplayer.h>
-
-#include <limits.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QMediaPlaylist;
-class QGstreamerPlayerSession;
-class QGstreamerPlayerService;
-class QMediaPlaylistNavigator;
-class QSocketNotifier;
-
-class QGstreamerPlayerControl : public QMediaPlayerControl
-{
- Q_OBJECT
-
-public:
- QGstreamerPlayerControl(QGstreamerPlayerSession *session, QObject *parent = 0);
- ~QGstreamerPlayerControl();
-
- QMediaPlayer::State state() const;
- QMediaPlayer::MediaStatus mediaStatus() const;
-
- qint64 position() const;
- qint64 duration() const;
-
- int bufferStatus() const;
-
- int volume() const;
- bool isMuted() const;
-
- bool isAudioAvailable() const;
- bool isVideoAvailable() const;
- void setVideoOutput(QObject *output);
-
- bool isSeekable() const;
- QMediaTimeRange availablePlaybackRanges() const;
-
- qreal playbackRate() const;
- void setPlaybackRate(qreal rate);
-
- QMediaContent media() const;
- const QIODevice *mediaStream() const;
- void setMedia(const QMediaContent&, QIODevice *);
-
-public Q_SLOTS:
- void setPosition(qint64 pos);
-
- void play();
- void pause();
- void stop();
-
- void setVolume(int volume);
- void setMuted(bool muted);
-
-private Q_SLOTS:
- void writeFifo();
- void fifoReadyWrite(int socket);
-
- void updateState(QMediaPlayer::State);
- void processEOS();
- void setBufferProgress(int progress);
-
-private:
- bool openFifo();
- void closeFifo();
- void playOrPause(QMediaPlayer::State state);
-
- QGstreamerPlayerSession *m_session;
- QMediaPlayer::State m_state;
- QMediaPlayer::MediaStatus m_mediaStatus;
- int m_bufferProgress;
- bool m_seekToStartPending;
- QMediaContent m_currentResource;
- QIODevice *m_stream;
- QSocketNotifier *m_fifoNotifier;
- int m_fifoFd[2];
- bool m_fifoCanWrite;
- int m_bufferSize;
- int m_bufferOffset;
- char m_buffer[PIPE_BUF];
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
deleted file mode 100644
index 3228722..0000000
--- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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/qvariant.h>
-#include <QtCore/qdebug.h>
-#include <QtGui/qwidget.h>
-
-#include "qgstreamerplayerservice.h"
-#include "qgstreamerplayercontrol.h"
-#include "qgstreamerplayersession.h"
-#include "qgstreamermetadataprovider.h"
-#include "qgstreamervideooutputcontrol.h"
-
-#include "qgstreamervideooverlay.h"
-#include "qgstreamervideorenderer.h"
-
-#include "qgstreamervideowidget.h"
-//#include "qgstreamerstreamscontrol.h"
-
-#include <qmediaplaylistnavigator.h>
-#include <qmediaplaylist.h>
-
-
-QT_BEGIN_NAMESPACE
-
-
-QGstreamerPlayerService::QGstreamerPlayerService(QObject *parent):
- QMediaService(parent),
- m_videoRenderer(0),
- m_videoWindow(0),
- m_videoWidget(0)
-{
- m_session = new QGstreamerPlayerSession(this);
- m_control = new QGstreamerPlayerControl(m_session, this);
- m_metaData = new QGstreamerMetaDataProvider(m_session, this);
- m_videoOutput = new QGstreamerVideoOutputControl(this);
-// m_streamsControl = new QGstreamerStreamsControl(m_session,this);
-
- connect(m_videoOutput, SIGNAL(outputChanged(QVideoOutputControl::Output)),
- this, SLOT(videoOutputChanged(QVideoOutputControl::Output)));
- m_videoRenderer = new QGstreamerVideoRenderer(this);
-
-#ifdef Q_WS_X11
- m_videoWindow = new QGstreamerVideoOverlay(this);
- m_videoWidget = new QGstreamerVideoWidgetControl(this);
-#endif
-
- QList<QVideoOutputControl::Output> outputs;
-
- if (m_videoRenderer)
- outputs << QVideoOutputControl::RendererOutput;
- if (m_videoWidget)
- outputs << QVideoOutputControl::WidgetOutput;
- if (m_videoWindow)
- outputs << QVideoOutputControl::WindowOutput;
-
- m_videoOutput->setAvailableOutputs(outputs);
-}
-
-QGstreamerPlayerService::~QGstreamerPlayerService()
-{
-}
-
-QMediaControl *QGstreamerPlayerService::control(const char *name) const
-{
- if (qstrcmp(name,QMediaPlayerControl_iid) == 0)
- return m_control;
-
- if (qstrcmp(name,QMetaDataControl_iid) == 0)
- return m_metaData;
-
-// if (qstrcmp(name,QMediaStreamsControl_iid) == 0)
-// return m_streamsControl;
-
- if (qstrcmp(name, QVideoOutputControl_iid) == 0)
- return m_videoOutput;
-
- if (qstrcmp(name, QVideoWidgetControl_iid) == 0)
- return m_videoWidget;
-
- if (qstrcmp(name, QVideoRendererControl_iid) == 0)
- return m_videoRenderer;
-
- if (qstrcmp(name, QVideoWindowControl_iid) == 0)
- return m_videoWindow;
-
- return 0;
-}
-
-void QGstreamerPlayerService::videoOutputChanged(QVideoOutputControl::Output output)
-{
- switch (output) {
- case QVideoOutputControl::NoOutput:
- m_control->setVideoOutput(0);
- break;
- case QVideoOutputControl::RendererOutput:
- m_control->setVideoOutput(m_videoRenderer);
- break;
- case QVideoOutputControl::WindowOutput:
- m_control->setVideoOutput(m_videoWindow);
- break;
- case QVideoOutputControl::WidgetOutput:
- m_control->setVideoOutput(m_videoWidget);
- break;
- default:
- qWarning("Invalid video output selection");
- break;
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.h b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.h
deleted file mode 100644
index 1283966..0000000
--- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTREAMERPLAYERSERVICE_H
-#define QGSTREAMERPLAYERSERVICE_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qiodevice.h>
-
-#include <QtMediaServices/qmediaservice.h>
-
-#include "qgstreamervideooutputcontrol.h"
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QMediaMetaData;
-class QMediaPlayerControl;
-class QMediaPlaylist;
-class QMediaPlaylistNavigator;
-class QGstreamerMetaData;
-class QGstreamerPlayerControl;
-class QGstreamerPlayerSession;
-class QGstreamerMetaDataProvider;
-class QGstreamerStreamsControl;
-class QGstreamerVideoRenderer;
-class QGstreamerVideoOverlay;
-class QGstreamerVideoWidgetControl;
-
-
-class QGstreamerPlayerService : public QMediaService
-{
- Q_OBJECT
-public:
- QGstreamerPlayerService(QObject *parent = 0);
- ~QGstreamerPlayerService();
-
- //void setVideoOutput(QObject *output);
-
- QMediaControl *control(const char *name) const;
-
-private slots:
- void videoOutputChanged(QVideoOutputControl::Output output);
-
-private:
- QGstreamerPlayerControl *m_control;
- QGstreamerPlayerSession *m_session;
- QGstreamerMetaDataProvider *m_metaData;
- QGstreamerVideoOutputControl *m_videoOutput;
- QGstreamerStreamsControl *m_streamsControl;
-
- QGstreamerVideoRenderer *m_videoRenderer;
- QGstreamerVideoOverlay *m_videoWindow;
- QGstreamerVideoWidgetControl *m_videoWidget;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp
deleted file mode 100644
index 6a44aa1..0000000
--- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp
+++ /dev/null
@@ -1,924 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qgstreamerplayersession.h"
-#include "qgstreamerbushelper.h"
-
-#include "qgstreamervideorendererinterface.h"
-
-#include <gst/gstvalue.h>
-
-#include <QtCore/qdatetime.h>
-#include <QtCore/qdebug.h>
-
-//#define USE_PLAYBIN2
-
-//#define DEBUG_VO_BIN_DUMP
-//#define DEBUG_PLAYBIN_STATES
-
-
-QT_BEGIN_NAMESPACE
-
-QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent)
- :QObject(parent),
- m_state(QMediaPlayer::StoppedState),
- m_busHelper(0),
- m_playbin(0),
- m_videoSink(0),
- m_pendingVideoSink(0),
- m_nullVideoSink(0),
- m_bus(0),
- m_renderer(0),
- m_volume(100),
- m_playbackRate(1.0),
- m_muted(false),
- m_audioAvailable(false),
- m_videoAvailable(false),
- m_seekable(false),
- m_lastPosition(0),
- m_duration(-1)
-{
- static bool initialized = false;
- if (!initialized) {
- initialized = true;
- gst_init(NULL, NULL);
- }
-
-#ifdef USE_PLAYBIN2
- m_playbin = gst_element_factory_make("playbin2", NULL);
-#else
- m_playbin = gst_element_factory_make("playbin", NULL);
-#endif
-
- m_videoOutputBin = gst_bin_new("video-output-bin");
- gst_object_ref(GST_OBJECT(m_videoOutputBin));
-
- m_videoIdentity = gst_element_factory_make("identity", "identity-vo");
- m_colorSpace = gst_element_factory_make("ffmpegcolorspace", "ffmpegcolorspace-vo");
- m_videoScale = gst_element_factory_make("videoscale","videoscale-vo");
- m_nullVideoSink = gst_element_factory_make("fakesink", NULL);
- gst_object_ref(GST_OBJECT(m_nullVideoSink));
- gst_bin_add_many(GST_BIN(m_videoOutputBin), m_videoIdentity, m_colorSpace, m_videoScale, m_nullVideoSink, NULL);
- gst_element_link_many(m_videoIdentity, m_colorSpace, m_videoScale, m_nullVideoSink, NULL);
-
- m_videoSink = m_nullVideoSink;
-
- // add ghostpads
- GstPad *pad = gst_element_get_static_pad(m_videoIdentity,"sink");
- gst_element_add_pad(GST_ELEMENT(m_videoOutputBin), gst_ghost_pad_new("videosink", pad));
- gst_object_unref(GST_OBJECT(pad));
-
-
- if (m_playbin != 0) {
- // Sort out messages
- m_bus = gst_element_get_bus(m_playbin);
- m_busHelper = new QGstreamerBusHelper(m_bus, this);
- connect(m_busHelper, SIGNAL(message(QGstreamerMessage)), SLOT(busMessage(QGstreamerMessage)));
- m_busHelper->installSyncEventFilter(this);
-
- g_object_set(G_OBJECT(m_playbin), "video-sink", m_videoOutputBin, NULL);
-
- // Initial volume
- double volume = 1.0;
- g_object_get(G_OBJECT(m_playbin), "volume", &volume, NULL);
- m_volume = int(volume*100);
- }
-}
-
-QGstreamerPlayerSession::~QGstreamerPlayerSession()
-{
- if (m_playbin) {
- stop();
-
- delete m_busHelper;
- gst_object_unref(GST_OBJECT(m_bus));
- gst_object_unref(GST_OBJECT(m_playbin));
- gst_object_unref(GST_OBJECT(m_nullVideoSink));
- gst_object_unref(GST_OBJECT(m_videoOutputBin));
- }
-}
-
-void QGstreamerPlayerSession::load(const QUrl &url)
-{
- m_url = url;
-
- if (m_playbin) {
- m_tags.clear();
- emit tagsChanged();
-
- g_object_set(G_OBJECT(m_playbin), "uri", m_url.toEncoded().constData(), NULL);
-
-// if (!m_streamTypes.isEmpty()) {
-// m_streamProperties.clear();
-// m_streamTypes.clear();
-//
-// emit streamsChanged();
-// }
- }
-}
-
-qint64 QGstreamerPlayerSession::duration() const
-{
- return m_duration;
-}
-
-qint64 QGstreamerPlayerSession::position() const
-{
- GstFormat format = GST_FORMAT_TIME;
- gint64 position = 0;
-
- if ( m_playbin && gst_element_query_position(m_playbin, &format, &position))
- return position / 1000000;
- else
- return 0;
-}
-
-qreal QGstreamerPlayerSession::playbackRate() const
-{
- return m_playbackRate;
-}
-
-void QGstreamerPlayerSession::setPlaybackRate(qreal rate)
-{
- if (!qFuzzyCompare(m_playbackRate, rate)) {
- m_playbackRate = rate;
- if (m_playbin) {
- gst_element_seek(m_playbin, rate, GST_FORMAT_TIME,
- GstSeekFlags(GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_FLUSH),
- GST_SEEK_TYPE_NONE,0,
- GST_SEEK_TYPE_NONE,0 );
- }
- }
-}
-
-
-//int QGstreamerPlayerSession::activeStream(QMediaStreamsControl::StreamType streamType) const
-//{
-// int streamNumber = -1;
-// if (m_playbin) {
-// switch (streamType) {
-// case QMediaStreamsControl::AudioStream:
-// g_object_set(G_OBJECT(m_playbin), "current-audio", streamNumber, NULL);
-// break;
-// case QMediaStreamsControl::VideoStream:
-// g_object_set(G_OBJECT(m_playbin), "current-video", streamNumber, NULL);
-// break;
-// case QMediaStreamsControl::SubPictureStream:
-// g_object_set(G_OBJECT(m_playbin), "current-text", streamNumber, NULL);
-// break;
-// default:
-// break;
-// }
-// }
-//
-//#ifdef USE_PLAYBIN2
-// streamNumber += m_playbin2StreamOffset.value(streamType,0);
-//#endif
-//
-// return streamNumber;
-//}
-
-//void QGstreamerPlayerSession::setActiveStream(QMediaStreamsControl::StreamType streamType, int streamNumber)
-//{
-//#ifdef USE_PLAYBIN2
-// streamNumber -= m_playbin2StreamOffset.value(streamType,0);
-//#endif
-//
-// if (m_playbin) {
-// switch (streamType) {
-// case QMediaStreamsControl::AudioStream:
-// g_object_get(G_OBJECT(m_playbin), "current-audio", &streamNumber, NULL);
-// break;
-// case QMediaStreamsControl::VideoStream:
-// g_object_get(G_OBJECT(m_playbin), "current-video", &streamNumber, NULL);
-// break;
-// case QMediaStreamsControl::SubPictureStream:
-// g_object_get(G_OBJECT(m_playbin), "current-text", &streamNumber, NULL);
-// break;
-// default:
-// break;
-// }
-// }
-//}
-
-
-bool QGstreamerPlayerSession::isBuffering() const
-{
- return false;
-}
-
-int QGstreamerPlayerSession::bufferingProgress() const
-{
- return 0;
-}
-
-int QGstreamerPlayerSession::volume() const
-{
- return m_volume;
-}
-
-bool QGstreamerPlayerSession::isMuted() const
-{
- return m_muted;
-}
-
-bool QGstreamerPlayerSession::isAudioAvailable() const
-{
- return m_audioAvailable;
-}
-
-static void block_pad_cb(GstPad *pad, gboolean blocked, gpointer user_data)
-{
- Q_UNUSED(pad);
- //qDebug() << "block_pad_cb" << blocked;
-
- if (blocked && user_data) {
- QGstreamerPlayerSession *session = reinterpret_cast<QGstreamerPlayerSession*>(user_data);
- QMetaObject::invokeMethod(session, "finishVideoOutputChange", Qt::QueuedConnection);
- }
-}
-
-#ifdef DEBUG_VO_BIN_DUMP
- static int dumpNum = 0;
-#endif
-
-void QGstreamerPlayerSession::setVideoRenderer(QObject *videoOutput)
-{
- QGstreamerVideoRendererInterface* renderer = qobject_cast<QGstreamerVideoRendererInterface*>(videoOutput);
-
- if (m_renderer == renderer)
- return;
-
-#ifdef DEBUG_VO_BIN_DUMP
- dumpNum++;
-
- _gst_debug_bin_to_dot_file(GST_BIN(m_videoOutputBin),
- GstDebugGraphDetails(GST_DEBUG_GRAPH_SHOW_ALL /* GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS | GST_DEBUG_GRAPH_SHOW_STATES*/),
- QString("video_output_change_%1_set").arg(dumpNum).toAscii().constData());
-#endif
-
- m_renderer = renderer;
-
- GstElement *videoSink = m_renderer ? m_renderer->videoSink() : m_nullVideoSink;
-
- if (m_state == QMediaPlayer::StoppedState) {
- m_pendingVideoSink = 0;
- gst_element_unlink(m_videoScale, m_videoSink);
-
- gst_bin_remove(GST_BIN(m_videoOutputBin), m_videoSink);
-
- m_videoSink = videoSink;
-
- gst_bin_add(GST_BIN(m_videoOutputBin), m_videoSink);
- gst_element_link(m_videoScale, m_videoSink);
-
- } else {
- if (m_pendingVideoSink) {
- m_pendingVideoSink = videoSink;
- return;
- }
-
- m_pendingVideoSink = videoSink;
-
- //block pads, async to avoid locking in paused state
- GstPad *srcPad = gst_element_get_static_pad(m_videoIdentity, "src");
- gst_pad_set_blocked_async(srcPad, true, &block_pad_cb, this);
- gst_object_unref(GST_OBJECT(srcPad));
- }
-}
-
-void QGstreamerPlayerSession::finishVideoOutputChange()
-{
- if (!m_pendingVideoSink)
- return;
-
- GstPad *srcPad = gst_element_get_static_pad(m_videoIdentity, "src");
-
- if (!gst_pad_is_blocked(srcPad)) {
- //pad is not blocked, it's possible to swap outputs only in the null state
- GstState identityElementState = GST_STATE_NULL;
- gst_element_get_state(m_videoIdentity, &identityElementState, NULL, GST_CLOCK_TIME_NONE);
- if (identityElementState != GST_STATE_NULL) {
- gst_object_unref(GST_OBJECT(srcPad));
- return; //can't change vo yet, received async call from the previous change
- }
-
- }
-
- if (m_pendingVideoSink == m_videoSink) {
- //video output was change back to the current one,
- //no need to torment the pipeline, just unblock the pad
- if (gst_pad_is_blocked(srcPad))
- gst_pad_set_blocked_async(srcPad, false, &block_pad_cb, 0);
-
- m_pendingVideoSink = 0;
- gst_object_unref(GST_OBJECT(srcPad));
- return;
- }
-
- gst_element_set_state(m_colorSpace, GST_STATE_NULL);
- gst_element_set_state(m_videoScale, GST_STATE_NULL);
- gst_element_set_state(m_videoSink, GST_STATE_NULL);
-
- gst_element_unlink(m_videoScale, m_videoSink);
-
- gst_bin_remove(GST_BIN(m_videoOutputBin), m_videoSink);
-
- m_videoSink = m_pendingVideoSink;
- m_pendingVideoSink = 0;
-
- gst_bin_add(GST_BIN(m_videoOutputBin), m_videoSink);
- if (!gst_element_link(m_videoScale, m_videoSink))
- qWarning() << "Linking video output element failed";
-
- GstState state;
-
- switch (m_state) {
- case QMediaPlayer::StoppedState:
- state = GST_STATE_NULL;
- break;
- case QMediaPlayer::PausedState:
- state = GST_STATE_PAUSED;
- break;
- case QMediaPlayer::PlayingState:
- state = GST_STATE_PLAYING;
- break;
- }
-
- gst_element_set_state(m_colorSpace, state);
- gst_element_set_state(m_videoScale, state);
- gst_element_set_state(m_videoSink, state);
-
- //don't have to wait here, it will unblock eventually
- if (gst_pad_is_blocked(srcPad))
- gst_pad_set_blocked_async(srcPad, false, &block_pad_cb, 0);
- gst_object_unref(GST_OBJECT(srcPad));
-
-#ifdef DEBUG_VO_BIN_DUMP
- dumpNum++;
-
- _gst_debug_bin_to_dot_file(GST_BIN(m_videoOutputBin),
- GstDebugGraphDetails(/*GST_DEBUG_GRAPH_SHOW_ALL */ GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS | GST_DEBUG_GRAPH_SHOW_STATES),
- QString("video_output_change_%1_finish").arg(dumpNum).toAscii().constData());
-#endif
-
-}
-
-bool QGstreamerPlayerSession::isVideoAvailable() const
-{
- return m_videoAvailable;
-}
-
-bool QGstreamerPlayerSession::isSeekable() const
-{
- return m_seekable;
-}
-
-bool QGstreamerPlayerSession::play()
-{
- if (m_playbin) {
- if (gst_element_set_state(m_playbin, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
- qWarning() << "GStreamer; Unable to play -" << m_url.toString();
- m_state = QMediaPlayer::StoppedState;
-
- emit stateChanged(m_state);
- emit error(int(QMediaPlayer::ResourceError), tr("Unable to play %1").arg(m_url.path()));
- } else
- return true;
- }
-
- return false;
-}
-
-bool QGstreamerPlayerSession::pause()
-{
- if (m_playbin) {
- if (gst_element_set_state(m_playbin, GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE) {
- qWarning() << "GStreamer; Unable to play -" << m_url.toString();
- m_state = QMediaPlayer::StoppedState;
-
- emit stateChanged(m_state);
- emit error(int(QMediaPlayer::ResourceError), tr("Unable to play %1").arg(m_url.path()));
- } else
- return true;
- }
-
- return false;
-}
-
-void QGstreamerPlayerSession::stop()
-{
- if (m_playbin) {
- gst_element_set_state(m_playbin, GST_STATE_NULL);
-
- QMediaPlayer::State oldState = QMediaPlayer::StoppedState;
- m_state = QMediaPlayer::StoppedState;
-
- finishVideoOutputChange();
-
- //we have to do it here, since gstreamer will not emit bus messages any more
- if (oldState != m_state)
- emit stateChanged(m_state);
- }
-}
-
-bool QGstreamerPlayerSession::seek(qint64 ms)
-{
- //seek locks when the video output sink is changing and pad is blocked
- if (m_playbin && !m_pendingVideoSink && m_state != QMediaPlayer::StoppedState) {
-
- gint64 position = qMax(ms,qint64(0)) * 1000000;
- return gst_element_seek(m_playbin,
- m_playbackRate,
- GST_FORMAT_TIME,
- GstSeekFlags(GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_FLUSH),
- GST_SEEK_TYPE_SET,
- position,
- GST_SEEK_TYPE_NONE,
- 0);
- }
-
- return false;
-}
-
-void QGstreamerPlayerSession::setVolume(int volume)
-{
- if (m_volume != volume) {
- m_volume = volume;
-
- if (m_playbin) {
-#ifndef USE_PLAYBIN2
- if(!m_muted)
-#endif
- g_object_set(G_OBJECT(m_playbin), "volume", m_volume/100.0, NULL);
- }
-
- emit volumeChanged(m_volume);
- }
-
-}
-
-void QGstreamerPlayerSession::setMuted(bool muted)
-{
- if (m_muted != muted) {
- m_muted = muted;
-
-#ifdef USE_PLAYBIN2
- g_object_set(G_OBJECT(m_playbin), "mute", m_muted, NULL);
-#else
- g_object_set(G_OBJECT(m_playbin), "volume", (m_muted ? 0 : m_volume/100.0), NULL);
-#endif
- emit mutedStateChanged(m_muted);
- }
-}
-
-static void addTagToMap(const GstTagList *list,
- const gchar *tag,
- gpointer user_data)
-{
- QMap<QByteArray, QVariant> *map = reinterpret_cast<QMap<QByteArray, QVariant>* >(user_data);
-
- GValue val;
- val.g_type = 0;
- gst_tag_list_copy_value(&val,list,tag);
-
- switch( G_VALUE_TYPE(&val) ) {
- case G_TYPE_STRING:
- {
- const gchar *str_value = g_value_get_string(&val);
- map->insert(QByteArray(tag), QString::fromUtf8(str_value));
- break;
- }
- case G_TYPE_INT:
- map->insert(QByteArray(tag), g_value_get_int(&val));
- break;
- case G_TYPE_UINT:
- map->insert(QByteArray(tag), g_value_get_uint(&val));
- break;
- case G_TYPE_LONG:
- map->insert(QByteArray(tag), qint64(g_value_get_long(&val)));
- break;
- case G_TYPE_BOOLEAN:
- map->insert(QByteArray(tag), g_value_get_boolean(&val));
- break;
- case G_TYPE_CHAR:
- map->insert(QByteArray(tag), g_value_get_char(&val));
- break;
- case G_TYPE_DOUBLE:
- map->insert(QByteArray(tag), g_value_get_double(&val));
- break;
- default:
- // GST_TYPE_DATE is a function, not a constant, so pull it out of the switch
- if (G_VALUE_TYPE(&val) == GST_TYPE_DATE) {
- const GDate *date = gst_value_get_date(&val);
- if (g_date_valid(date)) {
- int year = g_date_get_year(date);
- int month = g_date_get_month(date);
- int day = g_date_get_day(date);
- map->insert(QByteArray(tag), QDate(year,month,day));
- if (!map->contains("year"))
- map->insert("year", year);
- }
- } else if (G_VALUE_TYPE(&val) == GST_TYPE_FRACTION) {
- int nom = gst_value_get_fraction_numerator(&val);
- int denom = gst_value_get_fraction_denominator(&val);
-
- if (denom > 0) {
- map->insert(QByteArray(tag), double(nom)/denom);
- }
- }
- break;
- }
-
- g_value_unset(&val);
-}
-
-void QGstreamerPlayerSession::setSeekable(bool seekable)
-{
- if (seekable != m_seekable) {
- m_seekable = seekable;
- emit seekableChanged(m_seekable);
- }
-}
-
-bool QGstreamerPlayerSession::processSyncMessage(const QGstreamerMessage &message)
-{
- GstMessage* gm = message.rawMessage();
-
- if (gm &&
- GST_MESSAGE_TYPE(gm) == GST_MESSAGE_ELEMENT &&
- gst_structure_has_name(gm->structure, "prepare-xwindow-id"))
- {
- if (m_renderer)
- m_renderer->precessNewStream();
- return true;
- }
-
- return false;
-}
-
-void QGstreamerPlayerSession::busMessage(const QGstreamerMessage &message)
-{
- GstMessage* gm = message.rawMessage();
-
- if (gm == 0) {
- // Null message, query current position
- quint32 newPos = position();
-
- if (newPos/1000 != m_lastPosition) {
- m_lastPosition = newPos/1000;
- emit positionChanged(newPos);
- }
-
- } else {
- //tag message comes from elements inside playbin, not from playbin itself
- if (GST_MESSAGE_TYPE(gm) == GST_MESSAGE_TAG) {
- //qDebug() << "tag message";
- GstTagList *tag_list;
- gst_message_parse_tag(gm, &tag_list);
- gst_tag_list_foreach(tag_list, addTagToMap, &m_tags);
-
- //qDebug() << m_tags;
-
- emit tagsChanged();
- }
-
- if (GST_MESSAGE_SRC(gm) == GST_OBJECT_CAST(m_playbin)) {
- switch (GST_MESSAGE_TYPE(gm)) {
- case GST_MESSAGE_STATE_CHANGED:
- {
- GstState oldState;
- GstState newState;
- GstState pending;
-
- gst_message_parse_state_changed(gm, &oldState, &newState, &pending);
-
-#ifdef DEBUG_PLAYBIN_STATES
- QStringList states;
- states << "GST_STATE_VOID_PENDING" << "GST_STATE_NULL" << "GST_STATE_READY" << "GST_STATE_PAUSED" << "GST_STATE_PLAYING";
-
- qDebug() << QString("state changed: old: %1 new: %2 pending: %3") \
- .arg(states[oldState]) \
- .arg(states[newState]) \
- .arg(states[pending]);
-#endif
-
- switch (newState) {
- case GST_STATE_VOID_PENDING:
- case GST_STATE_NULL:
- setSeekable(false);
- if (m_state != QMediaPlayer::StoppedState)
- emit stateChanged(m_state = QMediaPlayer::StoppedState);
- break;
- case GST_STATE_READY:
- setSeekable(false);
- if (m_state != QMediaPlayer::StoppedState)
- emit stateChanged(m_state = QMediaPlayer::StoppedState);
- break;
- case GST_STATE_PAUSED:
- if (m_state != QMediaPlayer::PausedState)
- emit stateChanged(m_state = QMediaPlayer::PausedState);
-
- //check for seekable
- if (oldState == GST_STATE_READY) {
- /*
- //gst_element_seek_simple doesn't work reliably here, have to find a better solution
-
- GstFormat format = GST_FORMAT_TIME;
- gint64 position = 0;
- bool seekable = false;
- if (gst_element_query_position(m_playbin, &format, &position)) {
- seekable = gst_element_seek_simple(m_playbin, format, GST_SEEK_FLAG_NONE, position);
- }
-
- setSeekable(seekable);
- */
-
- setSeekable(true);
-
- if (!qFuzzyCompare(m_playbackRate, qreal(1.0))) {
- qreal rate = m_playbackRate;
- m_playbackRate = 1.0;
- setPlaybackRate(rate);
- }
-
- if (m_renderer)
- m_renderer->precessNewStream();
-
- }
-
-
- break;
- case GST_STATE_PLAYING:
- if (oldState == GST_STATE_PAUSED)
- getStreamsInfo();
-
- if (m_state != QMediaPlayer::PlayingState)
- emit stateChanged(m_state = QMediaPlayer::PlayingState);
-
- break;
- }
- }
- break;
-
- case GST_MESSAGE_EOS:
- emit playbackFinished();
- break;
-
- case GST_MESSAGE_TAG:
- case GST_MESSAGE_STREAM_STATUS:
- case GST_MESSAGE_UNKNOWN:
- break;
- case GST_MESSAGE_ERROR:
- {
- GError *err;
- gchar *debug;
- gst_message_parse_error (gm, &err, &debug);
- emit error(int(QMediaPlayer::ResourceError), QString::fromUtf8(err->message));
- qWarning() << "Error:" << QString::fromUtf8(err->message);
- g_error_free (err);
- g_free (debug);
- }
- break;
- case GST_MESSAGE_WARNING:
- case GST_MESSAGE_INFO:
- break;
- case GST_MESSAGE_BUFFERING:
- {
- int progress = 0;
- gst_message_parse_buffering(gm, &progress);
- emit bufferingProgressChanged(progress);
- }
- break;
- case GST_MESSAGE_STATE_DIRTY:
- case GST_MESSAGE_STEP_DONE:
- case GST_MESSAGE_CLOCK_PROVIDE:
- case GST_MESSAGE_CLOCK_LOST:
- case GST_MESSAGE_NEW_CLOCK:
- case GST_MESSAGE_STRUCTURE_CHANGE:
- case GST_MESSAGE_APPLICATION:
- case GST_MESSAGE_ELEMENT:
- break;
- case GST_MESSAGE_SEGMENT_START:
- {
- const GstStructure *structure = gst_message_get_structure(gm);
- qint64 position = g_value_get_int64(gst_structure_get_value(structure, "position"));
- position /= 1000000;
- m_lastPosition = position;
- emit positionChanged(position);
- }
- break;
- case GST_MESSAGE_SEGMENT_DONE:
- break;
- case GST_MESSAGE_DURATION:
- {
- GstFormat format = GST_FORMAT_TIME;
- gint64 duration = 0;
-
- if (gst_element_query_duration(m_playbin, &format, &duration)) {
- int newDuration = duration / 1000000;
- if (m_duration != newDuration) {
- m_duration = newDuration;
- emit durationChanged(m_duration);
- }
- }
- }
- break;
- case GST_MESSAGE_LATENCY:
-#if (GST_VERSION_MAJOR >= 0) && (GST_VERSION_MINOR >= 10) && (GST_VERSION_MICRO >= 13)
- case GST_MESSAGE_ASYNC_START:
- case GST_MESSAGE_ASYNC_DONE:
-#if GST_VERSION_MICRO >= 23
- case GST_MESSAGE_REQUEST_STATE:
-#endif
-#endif
- case GST_MESSAGE_ANY:
- break;
- }
- }
- }
-}
-
-void QGstreamerPlayerSession::getStreamsInfo()
-{
- GstFormat format = GST_FORMAT_TIME;
- gint64 duration = 0;
-
- if (gst_element_query_duration(m_playbin, &format, &duration)) {
- int newDuration = duration / 1000000;
- if (m_duration != newDuration) {
- m_duration = newDuration;
- emit durationChanged(m_duration);
- }
- }
-
- //check if video is available:
- bool haveAudio = false;
- bool haveVideo = false;
-// m_streamProperties.clear();
-// m_streamTypes.clear();
-
-#ifdef USE_PLAYBIN2
- gint audioStreamsCount = 0;
- gint videoStreamsCount = 0;
- gint textStreamsCount = 0;
-
- g_object_get(G_OBJECT(m_playbin), "n-audio", &audioStreamsCount, NULL);
- g_object_get(G_OBJECT(m_playbin), "n-video", &videoStreamsCount, NULL);
- g_object_get(G_OBJECT(m_playbin), "n-text", &textStreamsCount, NULL);
-
- haveAudio = audioStreamsCount > 0;
- haveVideo = videoStreamsCount > 0;
-
- /*m_playbin2StreamOffset[QMediaStreamsControl::AudioStream] = 0;
- m_playbin2StreamOffset[QMediaStreamsControl::VideoStream] = audioStreamsCount;
- m_playbin2StreamOffset[QMediaStreamsControl::SubPictureStream] = audioStreamsCount+videoStreamsCount;
-
- for (int i=0; i<audioStreamsCount; i++)
- m_streamTypes.append(QMediaStreamsControl::AudioStream);
-
- for (int i=0; i<videoStreamsCount; i++)
- m_streamTypes.append(QMediaStreamsControl::VideoStream);
-
- for (int i=0; i<textStreamsCount; i++)
- m_streamTypes.append(QMediaStreamsControl::SubPictureStream);
-
- for (int i=0; i<m_streamTypes.count(); i++) {
- QMediaStreamsControl::StreamType streamType = m_streamTypes[i];
- QMap<QtMediaServices::MetaData, QVariant> streamProperties;
-
- int streamIndex = i - m_playbin2StreamOffset[streamType];
-
- GstTagList *tags = 0;
- switch (streamType) {
- case QMediaStreamsControl::AudioStream:
- g_signal_emit_by_name(G_OBJECT(m_playbin), "get-audio-tags", streamIndex, &tags);
- break;
- case QMediaStreamsControl::VideoStream:
- g_signal_emit_by_name(G_OBJECT(m_playbin), "get-video-tags", streamIndex, &tags);
- break;
- case QMediaStreamsControl::SubPictureStream:
- g_signal_emit_by_name(G_OBJECT(m_playbin), "get-text-tags", streamIndex, &tags);
- break;
- default:
- break;
- }
-
- if (tags && gst_is_tag_list(tags)) {
- gchar *languageCode = 0;
- if (gst_tag_list_get_string(tags, GST_TAG_LANGUAGE_CODE, &languageCode))
- streamProperties[QtMediaServices::Language] = QString::fromUtf8(languageCode);
-
- //qDebug() << "language for setream" << i << QString::fromUtf8(languageCode);
- g_free (languageCode);
- }
-
- m_streamProperties.append(streamProperties);
-
- }
- */
-
-#else
- enum {
- GST_STREAM_TYPE_UNKNOWN,
- GST_STREAM_TYPE_AUDIO,
- GST_STREAM_TYPE_VIDEO,
- GST_STREAM_TYPE_TEXT,
- GST_STREAM_TYPE_SUBPICTURE,
- GST_STREAM_TYPE_ELEMENT
- };
-
- GList* streamInfo;
- g_object_get(G_OBJECT(m_playbin), "stream-info", &streamInfo, NULL);
-
- for (; streamInfo != 0; streamInfo = g_list_next(streamInfo)) {
- gint type;
- gchar *languageCode = 0;
-
- GObject* obj = G_OBJECT(streamInfo->data);
-
- g_object_get(obj, "type", &type, NULL);
- g_object_get(obj, "language-code", &languageCode, NULL);
-
- if (type == GST_STREAM_TYPE_VIDEO)
- haveVideo = true;
- else if (type == GST_STREAM_TYPE_AUDIO)
- haveAudio = true;
-
-// QMediaStreamsControl::StreamType streamType = QMediaStreamsControl::UnknownStream;
-//
-// switch (type) {
-// case GST_STREAM_TYPE_VIDEO:
-// streamType = QMediaStreamsControl::VideoStream;
-// break;
-// case GST_STREAM_TYPE_AUDIO:
-// streamType = QMediaStreamsControl::AudioStream;
-// break;
-// case GST_STREAM_TYPE_SUBPICTURE:
-// streamType = QMediaStreamsControl::SubPictureStream;
-// break;
-// default:
-// streamType = QMediaStreamsControl::UnknownStream;
-// break;
-// }
-//
-// QMap<QtMediaServices::MetaData, QVariant> streamProperties;
-// streamProperties[QtMediaServices::Language] = QString::fromUtf8(languageCode);
-//
-// m_streamProperties.append(streamProperties);
-// m_streamTypes.append(streamType);
- }
-#endif
-
- if (haveAudio != m_audioAvailable) {
- m_audioAvailable = haveAudio;
- emit audioAvailableChanged(m_audioAvailable);
- }
- if (haveVideo != m_videoAvailable) {
- m_videoAvailable = haveVideo;
- emit videoAvailableChanged(m_videoAvailable);
- }
-
- emit streamsChanged();
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.h b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.h
deleted file mode 100644
index 6499a84..0000000
--- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.h
+++ /dev/null
@@ -1,176 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTREAMERPLAYERSESSION_H
-#define QGSTREAMERPLAYERSESSION_H
-
-#include <QObject>
-#include <QUrl>
-#include "qgstreamerplayercontrol.h"
-#include "qgstreamerbushelper.h"
-#include <QtMediaServices/qmediaplayer.h>
-//#include <qmediastreamscontrol.h>
-
-#include <gst/gst.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGstreamerBusHelper;
-class QGstreamerMessage;
-class QGstreamerVideoRendererInterface;
-
-class QGstreamerPlayerSession : public QObject, public QGstreamerSyncEventFilter
-{
-Q_OBJECT
-
-public:
- QGstreamerPlayerSession(QObject *parent);
- virtual ~QGstreamerPlayerSession();
-
- QUrl url() const;
-
- QMediaPlayer::State state() const { return m_state; }
-
- qint64 duration() const;
- qint64 position() const;
-
- bool isBuffering() const;
-
- int bufferingProgress() const;
-
- int volume() const;
- bool isMuted() const;
-
- void setVideoRenderer(QObject *renderer);
- bool isAudioAvailable() const;
- bool isVideoAvailable() const;
-
- bool isSeekable() const;
-
- qreal playbackRate() const;
- void setPlaybackRate(qreal rate);
-
- QMap<QByteArray ,QVariant> tags() const { return m_tags; }
- QMap<QtMediaServices::MetaData,QVariant> streamProperties(int streamNumber) const { return m_streamProperties[streamNumber]; }
-// int streamCount() const { return m_streamProperties.count(); }
-// QMediaStreamsControl::StreamType streamType(int streamNumber) { return m_streamTypes.value(streamNumber, QMediaStreamsControl::UnknownStream); }
-//
-// int activeStream(QMediaStreamsControl::StreamType streamType) const;
-// void setActiveStream(QMediaStreamsControl::StreamType streamType, int streamNumber);
-
- bool processSyncMessage(const QGstreamerMessage &message);
-
-public slots:
- void load(const QUrl &url);
-
- bool play();
- bool pause();
- void stop();
-
- bool seek(qint64 pos);
-
- void setVolume(int volume);
- void setMuted(bool muted);
-
-signals:
- void durationChanged(qint64 duration);
- void positionChanged(qint64 position);
- void stateChanged(QMediaPlayer::State state);
- void volumeChanged(int volume);
- void mutedStateChanged(bool muted);
- void audioAvailableChanged(bool audioAvailable);
- void videoAvailableChanged(bool videoAvailable);
- void bufferingChanged(bool buffering);
- void bufferingProgressChanged(int percentFilled);
- void playbackFinished();
- void tagsChanged();
- void streamsChanged();
- void seekableChanged(bool);
- void error(int error, const QString &errorString);
-
-private slots:
- void busMessage(const QGstreamerMessage &message);
- void getStreamsInfo();
- void setSeekable(bool);
- void finishVideoOutputChange();
-
-private:
- QUrl m_url;
- QMediaPlayer::State m_state;
- QGstreamerBusHelper* m_busHelper;
- GstElement* m_playbin;
-
- GstElement* m_videoOutputBin;
- GstElement* m_videoIdentity;
- GstElement* m_colorSpace;
- GstElement* m_videoScale;
- GstElement* m_videoSink;
- GstElement* m_pendingVideoSink;
- GstElement* m_nullVideoSink;
-
- GstBus* m_bus;
- QGstreamerVideoRendererInterface *m_renderer;
-
- QMap<QByteArray, QVariant> m_tags;
- QList< QMap<QtMediaServices::MetaData,QVariant> > m_streamProperties;
-// QList<QMediaStreamsControl::StreamType> m_streamTypes;
-// QMap<QMediaStreamsControl::StreamType, int> m_playbin2StreamOffset;
-
-
- int m_volume;
- qreal m_playbackRate;
- bool m_muted;
- bool m_audioAvailable;
- bool m_videoAvailable;
- bool m_seekable;
-
- qint64 m_lastPosition;
- qint64 m_duration;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QGSTREAMERPLAYERSESSION_H
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.cpp b/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.cpp
deleted file mode 100644
index 5049fa1..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 <QMap>
-#include <QTimer>
-#include <QMutex>
-
-#include "qgstreamerbushelper.h"
-
-QT_BEGIN_NAMESPACE
-
-#ifndef QT_NO_GLIB
-class QGstreamerBusHelperPrivate : public QObject
-{
- Q_OBJECT
-
-public:
- void addWatch(GstBus* bus, QGstreamerBusHelper* helper)
- {
- setParent(helper);
- m_tag = gst_bus_add_watch_full(bus, 0, busCallback, this, NULL);
- m_helper = helper;
- filter = 0;
- }
-
- void removeWatch(QGstreamerBusHelper* helper)
- {
- Q_UNUSED(helper);
- g_source_remove(m_tag);
- }
-
- static QGstreamerBusHelperPrivate* instance()
- {
- return new QGstreamerBusHelperPrivate;
- }
-
-private:
- void processMessage(GstBus* bus, GstMessage* message)
- {
- Q_UNUSED(bus);
- emit m_helper->message(message);
- }
-
- static gboolean busCallback(GstBus *bus, GstMessage *message, gpointer data)
- {
- reinterpret_cast<QGstreamerBusHelperPrivate*>(data)->processMessage(bus, message);
- return TRUE;
- }
-
- guint m_tag;
- QGstreamerBusHelper* m_helper;
-
-public:
- GstBus* bus;
- QGstreamerSyncEventFilter *filter;
- QMutex filterMutex;
-};
-
-#else
-
-class QGstreamerBusHelperPrivate : public QObject
-{
- Q_OBJECT
- typedef QMap<QGstreamerBusHelper*, GstBus*> HelperMap;
-
-public:
- void addWatch(GstBus* bus, QGstreamerBusHelper* helper)
- {
- m_helperMap.insert(helper, bus);
-
- if (m_helperMap.size() == 1)
- m_intervalTimer->start();
- }
-
- void removeWatch(QGstreamerBusHelper* helper)
- {
- m_helperMap.remove(helper);
-
- if (m_helperMap.size() == 0)
- m_intervalTimer->stop();
- }
-
- static QGstreamerBusHelperPrivate* instance()
- {
- static QGstreamerBusHelperPrivate self;
-
- return &self;
- }
-
-private slots:
- void interval()
- {
- for (HelperMap::iterator it = m_helperMap.begin(); it != m_helperMap.end(); ++it) {
- GstMessage* message;
-
- while ((message = gst_bus_poll(it.value(), GST_MESSAGE_ANY, 0)) != 0) {
- emit it.key()->message(message);
- gst_message_unref(message);
- }
-
- emit it.key()->message(QGstreamerMessage());
- }
- }
-
-private:
- QGstreamerBusHelperPrivate()
- {
- m_intervalTimer = new QTimer(this);
- m_intervalTimer->setInterval(250);
-
- connect(m_intervalTimer, SIGNAL(timeout()), SLOT(interval()));
- }
-
- HelperMap m_helperMap;
- QTimer* m_intervalTimer;
-
-public:
- GstBus* bus;
- QGstreamerSyncEventFilter *filter;
- QMutex filterMutex;
-};
-#endif
-
-
-static GstBusSyncReply syncGstBusFilter(GstBus* bus, GstMessage* message, QGstreamerBusHelperPrivate *d)
-{
- Q_UNUSED(bus);
- QMutexLocker lock(&d->filterMutex);
-
- bool res = false;
-
- if (d->filter)
- res = d->filter->processSyncMessage(QGstreamerMessage(message));
-
- return res ? GST_BUS_DROP : GST_BUS_PASS;
-}
-
-
-/*!
- \class QGstreamerBusHelper
- \internal
-*/
-
-QGstreamerBusHelper::QGstreamerBusHelper(GstBus* bus, QObject* parent):
- QObject(parent),
- d(QGstreamerBusHelperPrivate::instance())
-{
- d->bus = bus;
- d->addWatch(bus, this);
-
- gst_bus_set_sync_handler(bus, (GstBusSyncHandler)syncGstBusFilter, d);
-}
-
-QGstreamerBusHelper::~QGstreamerBusHelper()
-{
- d->removeWatch(this);
- gst_bus_set_sync_handler(d->bus,0,0);
-}
-
-void QGstreamerBusHelper::installSyncEventFilter(QGstreamerSyncEventFilter *filter)
-{
- QMutexLocker lock(&d->filterMutex);
- d->filter = filter;
-}
-
-QT_END_NAMESPACE
-
-#include "qgstreamerbushelper.moc"
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.h b/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.h
deleted file mode 100644
index 8600015..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamerbushelper.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTREAMERBUSHELPER_H
-#define QGSTREAMERBUSHELPER_H
-
-#include <QObject>
-
-#include <qgstreamermessage.h>
-#include <gst/gst.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGstreamerSyncEventFilter {
-public:
- //returns true if message was processed and should be dropped, false otherwise
- virtual bool processSyncMessage(const QGstreamerMessage &message) = 0;
-};
-
-class QGstreamerBusHelperPrivate;
-
-class QGstreamerBusHelper : public QObject
-{
- Q_OBJECT
- friend class QGstreamerBusHelperPrivate;
-
-public:
- QGstreamerBusHelper(GstBus* bus, QObject* parent = 0);
- ~QGstreamerBusHelper();
-
- void installSyncEventFilter(QGstreamerSyncEventFilter *filter);
-
-signals:
- void message(QGstreamerMessage const& message);
-
-
-private:
- QGstreamerBusHelperPrivate* d;
-};
-
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp b/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp
deleted file mode 100644
index d52aa75..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamermessage.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 <gst/gst.h>
-
-#include "qgstreamermessage.h"
-
-
-QT_BEGIN_NAMESPACE
-
-static int wuchi = qRegisterMetaType<QGstreamerMessage>();
-
-
-/*!
- \class QGstreamerMessage
- \internal
-*/
-
-QGstreamerMessage::QGstreamerMessage():
- m_message(0)
-{
-}
-
-QGstreamerMessage::QGstreamerMessage(GstMessage* message):
- m_message(message)
-{
- gst_message_ref(m_message);
-}
-
-QGstreamerMessage::QGstreamerMessage(QGstreamerMessage const& m):
- m_message(m.m_message)
-{
- gst_message_ref(m_message);
-}
-
-
-QGstreamerMessage::~QGstreamerMessage()
-{
- if (m_message != 0)
- gst_message_unref(m_message);
-}
-
-GstMessage* QGstreamerMessage::rawMessage() const
-{
- return m_message;
-}
-
-QGstreamerMessage& QGstreamerMessage::operator=(QGstreamerMessage const& rhs)
-{
- if (m_message != 0)
- gst_message_unref(m_message);
-
- if ((m_message = rhs.m_message) != 0)
- gst_message_ref(m_message);
-
- return *this;
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamermessage.h b/src/plugins/mediaservices/gstreamer/qgstreamermessage.h
deleted file mode 100644
index 4680903..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamermessage.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTREAMERMESSAGE_H
-#define QGSTREAMERMESSAGE_H
-
-#include <QMetaType>
-
-#include <gst/gst.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGstreamerMessage
-{
-public:
- QGstreamerMessage();
- QGstreamerMessage(GstMessage* message);
- QGstreamerMessage(QGstreamerMessage const& m);
- ~QGstreamerMessage();
-
- GstMessage* rawMessage() const;
-
- QGstreamerMessage& operator=(QGstreamerMessage const& rhs);
-
-private:
- GstMessage* m_message;
-};
-
-QT_END_NAMESPACE
-
-Q_DECLARE_METATYPE(QGstreamerMessage);
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.cpp b/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.cpp
deleted file mode 100644
index 0ca7d54..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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/qstring.h>
-#include <QtCore/qdebug.h>
-#include <QtGui/QIcon>
-#include <QtCore/QDir>
-
-#include "qgstreamerserviceplugin.h"
-
-#ifdef QMEDIA_GSTREAMER_PLAYER
-#include "qgstreamerplayerservice.h"
-#endif
-#ifdef QMEDIA_GSTREAMER_CAPTURE
-#include "qgstreamercaptureservice.h"
-#endif
-#include <QtMediaServices/qmediaserviceprovider.h>
-
-#ifdef QMEDIA_GSTREAMER_CAPTURE
-#include <linux/types.h>
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <sys/poll.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/mman.h>
-#include <linux/videodev2.h>
-#endif
-
-
-QT_BEGIN_NAMESPACE
-
-
-QStringList QGstreamerServicePlugin::keys() const
-{
- return QStringList()
-#ifdef QMEDIA_GSTREAMER_PLAYER
- << QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER)
-#endif
-#ifdef QMEDIA_GSTREAMER_CAPTURE
- << QLatin1String(Q_MEDIASERVICE_AUDIOSOURCE)
- << QLatin1String(Q_MEDIASERVICE_CAMERA)
-#endif
- ;
-}
-
-QMediaService* QGstreamerServicePlugin::create(const QString &key)
-{
-#ifdef QMEDIA_GSTREAMER_PLAYER
- if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER))
- return new QGstreamerPlayerService;
-#endif
-#ifdef QMEDIA_GSTREAMER_CAPTURE
- if (key == QLatin1String(Q_MEDIASERVICE_AUDIOSOURCE))
- return new QGstreamerCaptureService(key);
-
- if (key == QLatin1String(Q_MEDIASERVICE_CAMERA))
- return new QGstreamerCaptureService(key);
-#endif
-
- qWarning() << "GStreamer service plugin: unsupported service -" << key;
- return 0;
-}
-
-void QGstreamerServicePlugin::release(QMediaService *service)
-{
- delete service;
-}
-
-QList<QByteArray> QGstreamerServicePlugin::devices(const QByteArray &service) const
-{
-#ifdef QMEDIA_GSTREAMER_CAPTURE
- if (service == Q_MEDIASERVICE_CAMERA) {
- if (m_cameraDevices.isEmpty())
- updateDevices();
-
- return m_cameraDevices;
- }
-#endif
-
- return QList<QByteArray>();
-}
-
-QString QGstreamerServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &device)
-{
-#ifdef QMEDIA_GSTREAMER_CAPTURE
- if (service == Q_MEDIASERVICE_CAMERA) {
- if (m_cameraDevices.isEmpty())
- updateDevices();
-
- for (int i=0; i<m_cameraDevices.count(); i++)
- if (m_cameraDevices[i] == device)
- return m_cameraDescriptions[i];
- }
-#endif
-
- return QString();
-}
-
-void QGstreamerServicePlugin::updateDevices() const
-{
-#ifdef QMEDIA_GSTREAMER_CAPTURE
- m_cameraDevices.clear();
- m_cameraDescriptions.clear();
-
- QDir devDir("/dev");
- devDir.setFilter(QDir::System);
-
- QFileInfoList entries = devDir.entryInfoList(QStringList() << "video*");
-
- foreach( const QFileInfo &entryInfo, entries ) {
-// qDebug() << "Try" << entryInfo.filePath();
-
- int fd = ::open(entryInfo.filePath().toLatin1().constData(), O_RDWR );
- if (fd == -1)
- continue;
-
- bool isCamera = false;
-
- v4l2_input input;
- memset(&input, 0, sizeof(input));
- for (; ::ioctl(fd, VIDIOC_ENUMINPUT, &input) >= 0; ++input.index) {
- if(input.type == V4L2_INPUT_TYPE_CAMERA || input.type == 0) {
- isCamera = ::ioctl(fd, VIDIOC_S_INPUT, input.index) != 0;
- break;
- }
- }
-
- if (isCamera) {
- // find out its driver "name"
- QString name;
- struct v4l2_capability vcap;
- memset(&vcap, 0, sizeof(struct v4l2_capability));
-
- if (ioctl(fd, VIDIOC_QUERYCAP, &vcap) != 0)
- name = entryInfo.fileName();
- else
- name = QString((const char*)vcap.card);
-// qDebug() << "found camera: " << name;
-
- m_cameraDevices.append(entryInfo.filePath().toLocal8Bit());
- m_cameraDescriptions.append(name);
- }
- ::close(fd);
- }
-#endif
-}
-
-Q_EXPORT_PLUGIN2(gstengine, QGstreamerServicePlugin);
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.h b/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.h
deleted file mode 100644
index e0a5dfd..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamerserviceplugin.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTREAMERSERVICEPLUGIN_H
-#define QGSTREAMERSERVICEPLUGIN_H
-
-#include <QtMediaServices/qmediaserviceproviderplugin.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGstreamerServicePlugin : public QMediaServiceProviderPlugin, public QMediaServiceSupportedDevicesInterface
-{
- Q_OBJECT
- Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
-public:
- QStringList keys() const;
- QMediaService* create(QString const& key);
- void release(QMediaService *service);
-
- QList<QByteArray> devices(const QByteArray &service) const;
- QString deviceDescription(const QByteArray &service, const QByteArray &device);
-
-private:
- void updateDevices() const;
-
- mutable QList<QByteArray> m_cameraDevices;
- mutable QStringList m_cameraDescriptions;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QGSTREAMERSERVICEPLUGIN_H
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.cpp
deleted file mode 100644
index 4ecf10b..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qgstreamervideoinputdevicecontrol.h"
-
-#include <QtGui/QIcon>
-#include <QtCore/QDir>
-#include <QtCore/QDebug>
-
-#include <linux/types.h>
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <sys/poll.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/mman.h>
-#include <linux/videodev2.h>
-
-
-QT_BEGIN_NAMESPACE
-
-QGstreamerVideoInputDeviceControl::QGstreamerVideoInputDeviceControl(QObject *parent)
- :QVideoDeviceControl(parent), m_selectedDevice(0)
-{
- update();
-}
-
-QGstreamerVideoInputDeviceControl::~QGstreamerVideoInputDeviceControl()
-{
-}
-
-int QGstreamerVideoInputDeviceControl::deviceCount() const
-{
- return m_names.size();
-}
-
-QString QGstreamerVideoInputDeviceControl::deviceName(int index) const
-{
- return m_names[index];
-}
-
-QString QGstreamerVideoInputDeviceControl::deviceDescription(int index) const
-{
- return m_descriptions[index];
-}
-
-QIcon QGstreamerVideoInputDeviceControl::deviceIcon(int index) const
-{
- Q_UNUSED(index);
- return QIcon();
-}
-
-int QGstreamerVideoInputDeviceControl::defaultDevice() const
-{
- return 0;
-}
-
-int QGstreamerVideoInputDeviceControl::selectedDevice() const
-{
- return m_selectedDevice;
-}
-
-
-void QGstreamerVideoInputDeviceControl::setSelectedDevice(int index)
-{
- if (index != m_selectedDevice) {
- m_selectedDevice = index;
- emit selectedDeviceChanged(index);
- emit selectedDeviceChanged(deviceName(index));
- }
-}
-
-
-void QGstreamerVideoInputDeviceControl::update()
-{
- m_names.clear();
- m_descriptions.clear();
-
-#ifdef QMEDIA_GSTREAMER_CAPTURE
- QDir devDir("/dev");
- devDir.setFilter(QDir::System);
-
- QFileInfoList entries = devDir.entryInfoList(QStringList() << "video*");
-
- foreach( const QFileInfo &entryInfo, entries ) {
-// qDebug() << "Try" << entryInfo.filePath();
-
- int fd = ::open(entryInfo.filePath().toLatin1().constData(), O_RDWR );
- if (fd == -1)
- continue;
-
- bool isCamera = false;
-
- v4l2_input input;
- memset(&input, 0, sizeof(input));
- for (; ::ioctl(fd, VIDIOC_ENUMINPUT, &input) >= 0; ++input.index) {
- if(input.type == V4L2_INPUT_TYPE_CAMERA || input.type == 0) {
- isCamera = ::ioctl(fd, VIDIOC_S_INPUT, input.index) != 0;
- break;
- }
- }
-
- if (isCamera) {
- // find out its driver "name"
- QString name;
- struct v4l2_capability vcap;
- memset(&vcap, 0, sizeof(struct v4l2_capability));
-
- if (ioctl(fd, VIDIOC_QUERYCAP, &vcap) != 0)
- name = entryInfo.fileName();
- else
- name = QString((const char*)vcap.card);
-// qDebug() << "found camera: " << name;
-
- m_names.append(entryInfo.filePath());
- m_descriptions.append(name);
- }
- ::close(fd);
- }
-#endif
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.h b/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.h
deleted file mode 100644
index 7994f9c..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamervideoinputdevicecontrol.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTREAMERVIDEOINPUTDEVICECONTROL_H
-#define QGSTREAMERVIDEOINPUTDEVICECONTROL_H
-
-#include <QtMediaServices/qvideodevicecontrol.h>
-#include <QtCore/qstringlist.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
-class QGstreamerVideoInputDeviceControl : public QVideoDeviceControl
-{
-Q_OBJECT
-public:
- QGstreamerVideoInputDeviceControl(QObject *parent);
- ~QGstreamerVideoInputDeviceControl();
-
- int deviceCount() const;
-
- QString deviceName(int index) const;
- QString deviceDescription(int index) const;
- QIcon deviceIcon(int index) const;
-
- int defaultDevice() const;
- int selectedDevice() const;
-
-public Q_SLOTS:
- void setSelectedDevice(int index);
-
-private:
- void update();
-
- int m_selectedDevice;
- QStringList m_names;
- QStringList m_descriptions;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QGSTREAMERAUDIOINPUTDEVICECONTROL_H
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.cpp
deleted file mode 100644
index f406bff..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qgstreamervideooutputcontrol.h"
-
-QT_BEGIN_NAMESPACE
-
-QGstreamerVideoOutputControl::QGstreamerVideoOutputControl(QObject *parent)
- : QVideoOutputControl(parent)
- , m_output(NoOutput)
-{
-}
-
-QList<QVideoOutputControl::Output> QGstreamerVideoOutputControl::availableOutputs() const
-{
- return m_outputs;
-}
-
-void QGstreamerVideoOutputControl::setAvailableOutputs(const QList<Output> &outputs)
-{
- emit availableOutputsChanged(m_outputs = outputs);
-}
-
-QVideoOutputControl::Output QGstreamerVideoOutputControl::output() const
-{
- return m_output;
-}
-
-void QGstreamerVideoOutputControl::setOutput(Output output)
-{
- if (!m_outputs.contains(output))
- output = NoOutput;
-
- if (m_output != output)
- emit outputChanged(m_output = output);
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.h b/src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.h
deleted file mode 100644
index 6d7d47f..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamervideooutputcontrol.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTREAMERVIDEOOUTPUTCONTROL_H
-#define QGSTREAMERVIDEOOUTPUTCONTROL_H
-
-#include <QtMediaServices/qvideooutputcontrol.h>
-
-#include <gst/gst.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGstreamerVideoRendererInterface
-{
-public:
- virtual ~QGstreamerVideoRendererInterface();
- virtual GstElement *videoSink() = 0;
- virtual void precessNewStream() {}
-};
-
-class QGstreamerVideoOutputControl : public QVideoOutputControl
-{
- Q_OBJECT
-public:
- QGstreamerVideoOutputControl(QObject *parent = 0);
-
- QList<Output> availableOutputs() const;
- void setAvailableOutputs(const QList<Output> &outputs);
-
- Output output() const;
- void setOutput(Output output);
-
-Q_SIGNALS:
- void outputChanged(QVideoOutputControl::Output output);
-
-private:
- QList<Output> m_outputs;
- Output m_output;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.cpp
deleted file mode 100644
index f381f7f..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qgstreamervideooverlay.h"
-#include "qvideosurfacegstsink.h"
-
-#include <QtMultimedia/qvideosurfaceformat.h>
-
-#include "qx11videosurface.h"
-
-QT_BEGIN_NAMESPACE
-
-QGstreamerVideoOverlay::QGstreamerVideoOverlay(QObject *parent)
- : QVideoWindowControl(parent)
- , m_surface(new QX11VideoSurface)
- , m_videoSink(reinterpret_cast<GstElement*>(QVideoSurfaceGstSink::createSink(m_surface)))
- , m_aspectRatioMode(Qt::KeepAspectRatio)
- , m_fullScreen(false)
-{
- if (m_videoSink) {
- gst_object_ref(GST_OBJECT(m_videoSink)); //Take ownership
- gst_object_sink(GST_OBJECT(m_videoSink));
- }
-
- connect(m_surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
- this, SLOT(surfaceFormatChanged()));
-}
-
-QGstreamerVideoOverlay::~QGstreamerVideoOverlay()
-{
- if (m_videoSink)
- gst_object_unref(GST_OBJECT(m_videoSink));
-
- delete m_surface;
-}
-
-WId QGstreamerVideoOverlay::winId() const
-{
- return m_surface->winId();
-}
-
-void QGstreamerVideoOverlay::setWinId(WId id)
-{
- m_surface->setWinId(id);
-}
-
-QRect QGstreamerVideoOverlay::displayRect() const
-{
- return m_displayRect;
-}
-
-void QGstreamerVideoOverlay::setDisplayRect(const QRect &rect)
-{
- m_displayRect = rect;
-
- setScaledDisplayRect();
-}
-
-Qt::AspectRatioMode QGstreamerVideoOverlay::aspectRatioMode() const
-{
- return m_aspectRatioMode;
-}
-
-void QGstreamerVideoOverlay::setAspectRatioMode(Qt::AspectRatioMode mode)
-{
- m_aspectRatioMode = mode;
-
- setScaledDisplayRect();
-}
-
-void QGstreamerVideoOverlay::repaint()
-{
-}
-
-int QGstreamerVideoOverlay::brightness() const
-{
- return m_surface->brightness();
-}
-
-void QGstreamerVideoOverlay::setBrightness(int brightness)
-{
- m_surface->setBrightness(brightness);
-
- emit brightnessChanged(m_surface->brightness());
-}
-
-int QGstreamerVideoOverlay::contrast() const
-{
- return m_surface->contrast();
-}
-
-void QGstreamerVideoOverlay::setContrast(int contrast)
-{
- m_surface->setContrast(contrast);
-
- emit contrastChanged(m_surface->contrast());
-}
-
-int QGstreamerVideoOverlay::hue() const
-{
- return m_surface->hue();
-}
-
-void QGstreamerVideoOverlay::setHue(int hue)
-{
- m_surface->setHue(hue);
-
- emit hueChanged(m_surface->hue());
-}
-
-int QGstreamerVideoOverlay::saturation() const
-{
- return m_surface->saturation();
-}
-
-void QGstreamerVideoOverlay::setSaturation(int saturation)
-{
- m_surface->setSaturation(saturation);
-
- emit saturationChanged(m_surface->saturation());
-}
-
-bool QGstreamerVideoOverlay::isFullScreen() const
-{
- return m_fullScreen;
-}
-
-void QGstreamerVideoOverlay::setFullScreen(bool fullScreen)
-{
- emit fullScreenChanged(m_fullScreen = fullScreen);
-}
-
-QSize QGstreamerVideoOverlay::nativeSize() const
-{
- return m_surface->surfaceFormat().sizeHint();
-}
-
-QAbstractVideoSurface *QGstreamerVideoOverlay::surface() const
-{
- return m_surface;
-}
-
-GstElement *QGstreamerVideoOverlay::videoSink()
-{
- return m_videoSink;
-}
-
-void QGstreamerVideoOverlay::surfaceFormatChanged()
-{
- setScaledDisplayRect();
-
- emit nativeSizeChanged();
-}
-
-void QGstreamerVideoOverlay::setScaledDisplayRect()
-{
- QRect formatViewport = m_surface->surfaceFormat().viewport();
-
- switch (m_aspectRatioMode) {
- case Qt::KeepAspectRatio:
- {
- QSize size = m_surface->surfaceFormat().sizeHint();
- size.scale(m_displayRect.size(), Qt::KeepAspectRatio);
-
- QRect rect(QPoint(0, 0), size);
- rect.moveCenter(m_displayRect.center());
-
- m_surface->setDisplayRect(rect);
- m_surface->setViewport(formatViewport);
- }
- break;
- case Qt::IgnoreAspectRatio:
- m_surface->setDisplayRect(m_displayRect);
- m_surface->setViewport(formatViewport);
- break;
- case Qt::KeepAspectRatioByExpanding:
- {
- QSize size = m_displayRect.size();
- size.scale(m_surface->surfaceFormat().sizeHint(), Qt::KeepAspectRatio);
-
- QRect viewport(QPoint(0, 0), size);
- viewport.moveCenter(formatViewport.center());
-
- m_surface->setDisplayRect(m_displayRect);
- m_surface->setViewport(viewport);
- }
- break;
- };
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.h b/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.h
deleted file mode 100644
index f44c25b..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamervideooverlay.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTREAMERVIDEOOVERLAY_H
-#define QGSTREAMERVIDEOOVERLAY_H
-
-#include <QtMediaServices/qvideowindowcontrol.h>
-
-#include "qgstreamervideorendererinterface.h"
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QAbstractVideoSurface;
-class QX11VideoSurface;
-
-class QGstreamerVideoOverlay : public QVideoWindowControl, public QGstreamerVideoRendererInterface
-{
- Q_OBJECT
- Q_INTERFACES(QGstreamerVideoRendererInterface)
-public:
- QGstreamerVideoOverlay(QObject *parent = 0);
- ~QGstreamerVideoOverlay();
-
- WId winId() const;
- void setWinId(WId id);
-
- QRect displayRect() const;
- void setDisplayRect(const QRect &rect);
-
- bool isFullScreen() const;
- void setFullScreen(bool fullScreen);
-
- QSize nativeSize() const;
-
- Qt::AspectRatioMode aspectRatioMode() const;
- void setAspectRatioMode(Qt::AspectRatioMode mode);
-
- void repaint();
-
- int brightness() const;
- void setBrightness(int brightness);
-
- int contrast() const;
- void setContrast(int contrast);
-
- int hue() const;
- void setHue(int hue);
-
- int saturation() const;
- void setSaturation(int saturation);
-
- QAbstractVideoSurface *surface() const;
-
- GstElement *videoSink();
-
-private slots:
- void surfaceFormatChanged();
-
-private:
- void setScaledDisplayRect();
-
- QX11VideoSurface *m_surface;
- GstElement *m_videoSink;
- Qt::AspectRatioMode m_aspectRatioMode;
- QRect m_displayRect;
- bool m_fullScreen;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.cpp
deleted file mode 100644
index 1f03990..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qgstreamervideorenderer.h"
-#include "qvideosurfacegstsink.h"
-
-#include <QEvent>
-#include <QApplication>
-
-#include <gst/gst.h>
-
-
-QT_BEGIN_NAMESPACE
-
-QGstreamerVideoRenderer::QGstreamerVideoRenderer(QObject *parent)
- :QVideoRendererControl(parent),m_videoSink(0)
-{
-}
-
-QGstreamerVideoRenderer::~QGstreamerVideoRenderer()
-{
- if (m_videoSink)
- gst_object_unref(GST_OBJECT(m_videoSink));
-}
-
-GstElement *QGstreamerVideoRenderer::videoSink()
-{
- if (!m_videoSink) {
- m_videoSink = reinterpret_cast<GstElement*>(QVideoSurfaceGstSink::createSink(m_surface));
- gst_object_ref(GST_OBJECT(m_videoSink)); //Take ownership
- gst_object_sink(GST_OBJECT(m_videoSink));
- }
-
- return m_videoSink;
-}
-
-
-QAbstractVideoSurface *QGstreamerVideoRenderer::surface() const
-{
- return m_surface;
-}
-
-void QGstreamerVideoRenderer::setSurface(QAbstractVideoSurface *surface)
-{
- m_surface = surface;
-}
-
-QT_END_NAMESPACE
-
-
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.h b/src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.h
deleted file mode 100644
index 0fbbd63..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamervideorenderer.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTREAMERVIDEORENDERER_H
-#define QGSTREAMERVIDEORENDERER_H
-
-#include <QtMediaServices/qvideorenderercontrol.h>
-#include "qvideosurfacegstsink.h"
-
-#include "qgstreamervideorendererinterface.h"
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGstreamerVideoRenderer : public QVideoRendererControl, public QGstreamerVideoRendererInterface
-{
- Q_OBJECT
- Q_INTERFACES(QGstreamerVideoRendererInterface)
-public:
- QGstreamerVideoRenderer(QObject *parent = 0);
- virtual ~QGstreamerVideoRenderer();
-
- QAbstractVideoSurface *surface() const;
- void setSurface(QAbstractVideoSurface *surface);
-
- GstElement *videoSink();
- void precessNewStream() {}
-
-private:
- GstElement *m_videoSink;
- QAbstractVideoSurface *m_surface;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QGSTREAMERVIDEORENDRER_H
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.cpp
deleted file mode 100644
index 886a064..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qgstreamervideorendererinterface.h"
-
-
-QT_BEGIN_NAMESPACE
-
-QGstreamerVideoRendererInterface::~QGstreamerVideoRendererInterface()
-{
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.h b/src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.h
deleted file mode 100644
index c63a757..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamervideorendererinterface.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTREAMERVIDEOOUTPUTCONTROL_H
-#define QGSTREAMERVIDEOOUTPUTCONTROL_H
-
-#include <gst/gst.h>
-
-#include <QtCore/qobject.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGstreamerVideoRendererInterface
-{
-public:
- virtual ~QGstreamerVideoRendererInterface();
- virtual GstElement *videoSink() = 0;
- virtual void precessNewStream() {}
-};
-
-#define QGstreamerVideoRendererInterface_iid "com.nokia.Qt.QGstreamerVideoRendererInterface/1.0"
-Q_DECLARE_INTERFACE(QGstreamerVideoRendererInterface, QGstreamerVideoRendererInterface_iid)
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.cpp b/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.cpp
deleted file mode 100644
index 763f7f1..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.cpp
+++ /dev/null
@@ -1,340 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qgstreamervideowidget.h"
-
-#include <QtCore/qcoreevent.h>
-#include <QtCore/qdebug.h>
-#include <QtGui/qapplication.h>
-#include <QtGui/qpainter.h>
-
-#include <X11/Xlib.h>
-#include <gst/gst.h>
-#include <gst/interfaces/xoverlay.h>
-#include <gst/interfaces/propertyprobe.h>
-
-
-QT_BEGIN_NAMESPACE
-
-class QGstreamerVideoWidget : public QWidget
-{
-public:
- QGstreamerVideoWidget(QWidget *parent = 0)
- :QWidget(parent)
- {
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- QPalette palette;
- palette.setColor(QPalette::Background, Qt::black);
- setPalette(palette);
- }
-
- virtual ~QGstreamerVideoWidget() {}
-
- QSize sizeHint() const
- {
- return m_nativeSize;
- }
-
- void setNativeSize( const QSize &size)
- {
- if (size != m_nativeSize) {
- m_nativeSize = size;
- if (size.isEmpty())
- setMinimumSize(0,0);
- else
- setMinimumSize(160,120);
-
- updateGeometry();
- }
- }
-
-protected:
- void paintEvent(QPaintEvent *)
- {
- QPainter painter(this);
- painter.fillRect(rect(), palette().background());
- }
-
- QSize m_nativeSize;
-};
-
-QGstreamerVideoWidgetControl::QGstreamerVideoWidgetControl(QObject *parent)
- : QVideoWidgetControl(parent)
- , m_videoSink(0)
- , m_widget(0)
- , m_fullScreen(false)
-{
-}
-
-QGstreamerVideoWidgetControl::~QGstreamerVideoWidgetControl()
-{
- if (m_videoSink)
- gst_object_unref(GST_OBJECT(m_videoSink));
-
- delete m_widget;
-}
-
-void QGstreamerVideoWidgetControl::createVideoWidget()
-{
- if (m_widget)
- return;
-
- m_widget = new QGstreamerVideoWidget;
-
- m_widget->installEventFilter(this);
- m_windowId = m_widget->winId();
-
- m_videoSink = gst_element_factory_make ("xvimagesink", NULL);
- if (m_videoSink) {
- // Check if the xv sink is usable
- if (gst_element_set_state(m_videoSink, GST_STATE_READY) != GST_STATE_CHANGE_SUCCESS) {
- gst_object_unref(GST_OBJECT(m_videoSink));
- m_videoSink = 0;
- } else {
- gst_element_set_state(m_videoSink, GST_STATE_NULL);
-
- g_object_set(G_OBJECT(m_videoSink), "force-aspect-ratio", 1, (const char*)NULL);
- }
- }
-
- if (!m_videoSink)
- m_videoSink = gst_element_factory_make ("ximagesink", NULL);
-
- gst_object_ref (GST_OBJECT (m_videoSink)); //Take ownership
- gst_object_sink (GST_OBJECT (m_videoSink));
-}
-
-GstElement *QGstreamerVideoWidgetControl::videoSink()
-{
- createVideoWidget();
- return m_videoSink;
-}
-
-bool QGstreamerVideoWidgetControl::eventFilter(QObject *object, QEvent *e)
-{
- if (m_widget && object == m_widget) {
- if (e->type() == QEvent::ParentChange || e->type() == QEvent::Show) {
- WId newWId = m_widget->winId();
- if (newWId != m_windowId) {
- m_windowId = newWId;
- // Even if we have created a winId at this point, other X applications
- // need to be aware of it.
- QApplication::syncX();
- setOverlay();
- }
- }
-
- if (e->type() == QEvent::Show) {
- // Setting these values ensures smooth resizing since it
- // will prevent the system from clearing the background
- m_widget->setAttribute(Qt::WA_NoSystemBackground, true);
- m_widget->setAttribute(Qt::WA_PaintOnScreen, true);
- } else if (e->type() == QEvent::Resize) {
- // This is a workaround for missing background repaints
- // when reducing window size
- windowExposed();
- }
- }
-
- return false;
-}
-
-void QGstreamerVideoWidgetControl::precessNewStream()
-{
- setOverlay();
- QMetaObject::invokeMethod(this, "updateNativeVideoSize", Qt::QueuedConnection);
-}
-
-void QGstreamerVideoWidgetControl::setOverlay()
-{
- if (m_videoSink && GST_IS_X_OVERLAY(m_videoSink)) {
- gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(m_videoSink), m_windowId);
- }
-}
-
-void QGstreamerVideoWidgetControl::updateNativeVideoSize()
-{
- if (m_videoSink) {
- //find video native size to update video widget size hint
- GstPad *pad = gst_element_get_static_pad(m_videoSink,"sink");
- GstCaps *caps = gst_pad_get_negotiated_caps(pad);
-
- if (caps) {
- GstStructure *str;
- gint width, height;
-
- if ((str = gst_caps_get_structure (caps, 0))) {
- if (gst_structure_get_int (str, "width", &width) && gst_structure_get_int (str, "height", &height)) {
- gint aspectNum = 0;
- gint aspectDenum = 0;
- if (gst_structure_get_fraction(str, "pixel-aspect-ratio", &aspectNum, &aspectDenum)) {
- if (aspectDenum > 0)
- width = width*aspectNum/aspectDenum;
- }
- m_widget->setNativeSize(QSize(width, height));
- }
- }
- gst_caps_unref(caps);
- }
- } else {
- if (m_widget)
- m_widget->setNativeSize(QSize());
- }
-}
-
-
-void QGstreamerVideoWidgetControl::windowExposed()
-{
- if (m_videoSink && GST_IS_X_OVERLAY(m_videoSink))
- gst_x_overlay_expose(GST_X_OVERLAY(m_videoSink));
-}
-
-QWidget *QGstreamerVideoWidgetControl::videoWidget()
-{
- createVideoWidget();
- return m_widget;
-}
-
-Qt::AspectRatioMode QGstreamerVideoWidgetControl::aspectRatioMode() const
-{
- return m_aspectRatioMode;
-}
-
-void QGstreamerVideoWidgetControl::setAspectRatioMode(Qt::AspectRatioMode mode)
-{
- if (m_videoSink) {
- g_object_set(G_OBJECT(m_videoSink),
- "force-aspect-ratio",
- (mode == Qt::KeepAspectRatio),
- (const char*)NULL);
- }
-
- m_aspectRatioMode = mode;
-}
-
-bool QGstreamerVideoWidgetControl::isFullScreen() const
-{
- return m_fullScreen;
-}
-
-void QGstreamerVideoWidgetControl::setFullScreen(bool fullScreen)
-{
- emit fullScreenChanged(m_fullScreen = fullScreen);
-}
-
-int QGstreamerVideoWidgetControl::brightness() const
-{
- int brightness = 0;
-
- if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "brightness"))
- g_object_get(G_OBJECT(m_videoSink), "brightness", &brightness, NULL);
-
- return brightness / 10;
-}
-
-void QGstreamerVideoWidgetControl::setBrightness(int brightness)
-{
- if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "brightness")) {
- g_object_set(G_OBJECT(m_videoSink), "brightness", brightness * 10, NULL);
-
- emit brightnessChanged(brightness);
- }
-}
-
-int QGstreamerVideoWidgetControl::contrast() const
-{
- int contrast = 0;
-
- if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "contrast"))
- g_object_get(G_OBJECT(m_videoSink), "contrast", &contrast, NULL);
-
- return contrast / 10;
-}
-
-void QGstreamerVideoWidgetControl::setContrast(int contrast)
-{
- if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "contrast")) {
- g_object_set(G_OBJECT(m_videoSink), "contrast", contrast * 10, NULL);
-
- emit contrastChanged(contrast);
- }
-}
-
-int QGstreamerVideoWidgetControl::hue() const
-{
- int hue = 0;
-
- if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "hue"))
- g_object_get(G_OBJECT(m_videoSink), "hue", &hue, NULL);
-
- return hue / 10;
-}
-
-void QGstreamerVideoWidgetControl::setHue(int hue)
-{
- if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "hue")) {
- g_object_set(G_OBJECT(m_videoSink), "hue", hue * 10, NULL);
-
- emit hueChanged(hue);
- }
-}
-
-int QGstreamerVideoWidgetControl::saturation() const
-{
- int saturation = 0;
-
- if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "saturation"))
- g_object_get(G_OBJECT(m_videoSink), "saturation", &saturation, NULL);
-
- return saturation / 10;
-}
-
-void QGstreamerVideoWidgetControl::setSaturation(int saturation)
-{
- if (m_videoSink && g_object_class_find_property(G_OBJECT_GET_CLASS(m_videoSink), "saturation")) {
- g_object_set(G_OBJECT(m_videoSink), "saturation", saturation * 10, NULL);
-
- emit saturationChanged(saturation);
- }
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.h b/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.h
deleted file mode 100644
index d54a1fc..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstreamervideowidget.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTREAMERVIDEOWIDGET_H
-#define QGSTREAMERVIDEOWIDGET_H
-
-#include <QtMediaServices/qvideowidgetcontrol.h>
-
-#include "qgstreamervideorendererinterface.h"
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGstreamerVideoWidget;
-
-class QGstreamerVideoWidgetControl
- : public QVideoWidgetControl
- , public QGstreamerVideoRendererInterface
-{
- Q_OBJECT
- Q_INTERFACES(QGstreamerVideoRendererInterface)
-public:
- QGstreamerVideoWidgetControl(QObject *parent = 0);
- virtual ~QGstreamerVideoWidgetControl();
-
- GstElement *videoSink();
- void precessNewStream();
-
- QWidget *videoWidget();
-
- Qt::AspectRatioMode aspectRatioMode() const;
- void setAspectRatioMode(Qt::AspectRatioMode mode);
-
- bool isFullScreen() const;
- void setFullScreen(bool fullScreen);
-
- int brightness() const;
- void setBrightness(int brightness);
-
- int contrast() const;
- void setContrast(int contrast);
-
- int hue() const;
- void setHue(int hue);
-
- int saturation() const;
- void setSaturation(int saturation);
-
- void setOverlay();
-
- bool eventFilter(QObject *object, QEvent *event);
-
-public slots:
- void updateNativeVideoSize();
-
-private:
- void createVideoWidget();
- void windowExposed();
-
- GstElement *m_videoSink;
- QGstreamerVideoWidget *m_widget;
- WId m_windowId;
- Qt::AspectRatioMode m_aspectRatioMode;
- bool m_fullScreen;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QGSTREAMERVIDEOWIDGET_H
diff --git a/src/plugins/mediaservices/gstreamer/qgstvideobuffer.cpp b/src/plugins/mediaservices/gstreamer/qgstvideobuffer.cpp
deleted file mode 100644
index 76289bf..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstvideobuffer.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qgstvideobuffer.h"
-
-
-QT_BEGIN_NAMESPACE
-
-QGstVideoBuffer::QGstVideoBuffer(GstBuffer *buffer, int bytesPerLine)
- : QAbstractVideoBuffer(NoHandle)
- , m_buffer(buffer)
- , m_bytesPerLine(bytesPerLine)
- , m_mode(NotMapped)
-{
- gst_buffer_ref(m_buffer);
-}
-
-QGstVideoBuffer::QGstVideoBuffer(GstBuffer *buffer, int bytesPerLine,
- QGstVideoBuffer::HandleType handleType,
- const QVariant &handle)
- : QAbstractVideoBuffer(handleType)
- , m_buffer(buffer)
- , m_bytesPerLine(bytesPerLine)
- , m_mode(NotMapped)
- , m_handle(handle)
-{
- gst_buffer_ref(m_buffer);
-}
-
-QGstVideoBuffer::~QGstVideoBuffer()
-{
- gst_buffer_unref(m_buffer);
-}
-
-
-QAbstractVideoBuffer::MapMode QGstVideoBuffer::mapMode() const
-{
- return m_mode;
-}
-
-uchar *QGstVideoBuffer::map(MapMode mode, int *numBytes, int *bytesPerLine)
-{
- if (mode != NotMapped && m_mode == NotMapped) {
- if (numBytes)
- *numBytes = m_buffer->size;
-
- if (bytesPerLine)
- *bytesPerLine = m_bytesPerLine;
-
- m_mode = mode;
-
- return m_buffer->data;
- } else {
- return 0;
- }
-}
-void QGstVideoBuffer::unmap()
-{
- m_mode = NotMapped;
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/gstreamer/qgstvideobuffer.h b/src/plugins/mediaservices/gstreamer/qgstvideobuffer.h
deleted file mode 100644
index 5133e2e..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstvideobuffer.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTVIDEOBUFFER_H
-#define QGSTVIDEOBUFFER_H
-
-#include <QtMultimedia/QAbstractVideoBuffer>
-#include <QtCore/qvariant.h>
-
-#include <gst/gst.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGstVideoBuffer : public QAbstractVideoBuffer
-{
-public:
- QGstVideoBuffer(GstBuffer *buffer, int bytesPerLine);
- QGstVideoBuffer(GstBuffer *buffer, int bytesPerLine,
- HandleType handleType, const QVariant &handle);
- ~QGstVideoBuffer();
-
- MapMode mapMode() const;
-
- uchar *map(MapMode mode, int *numBytes, int *bytesPerLine);
- void unmap();
-
- QVariant handle() const { return m_handle; }
-private:
- GstBuffer *m_buffer;
- int m_bytesPerLine;
- MapMode m_mode;
- QVariant m_handle;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.cpp b/src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.cpp
deleted file mode 100644
index b2e633d..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.cpp
+++ /dev/null
@@ -1,282 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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/qdebug.h>
-#include <QtCore/qthread.h>
-#include <QtCore/qvariant.h>
-#include <QtGui/qx11info_x11.h>
-
-#include "qgstxvimagebuffer.h"
-#include "qvideosurfacegstsink.h"
-
-
-QT_BEGIN_NAMESPACE
-
-GstBufferClass *QGstXvImageBuffer::parent_class = NULL;
-
-GType QGstXvImageBuffer::get_type(void)
-{
- static GType buffer_type = 0;
-
- if (buffer_type == 0) {
- static const GTypeInfo buffer_info = {
- sizeof (GstBufferClass),
- NULL,
- NULL,
- QGstXvImageBuffer::class_init,
- NULL,
- NULL,
- sizeof(QGstXvImageBuffer),
- 0,
- (GInstanceInitFunc)QGstXvImageBuffer::buffer_init,
- NULL
- };
- buffer_type = g_type_register_static(GST_TYPE_BUFFER,
- "QGstXvImageBuffer", &buffer_info, GTypeFlags(0));
- }
- return buffer_type;
-}
-
-void QGstXvImageBuffer::class_init(gpointer g_class, gpointer class_data)
-{
- Q_UNUSED(class_data);
- GST_MINI_OBJECT_CLASS(g_class)->finalize =
- (GstMiniObjectFinalizeFunction)buffer_finalize;
- parent_class = (GstBufferClass*)g_type_class_peek_parent(g_class);
-}
-
-void QGstXvImageBuffer::buffer_init(QGstXvImageBuffer *xvImage, gpointer g_class)
-{
- Q_UNUSED(g_class);
- xvImage->pool = 0;
- xvImage->shmInfo.shmaddr = ((char *) -1);
- xvImage->shmInfo.shmid = -1;
- xvImage->markedForDeletion = false;
-}
-
-void QGstXvImageBuffer::buffer_finalize(QGstXvImageBuffer * xvImage)
-{
- if (xvImage->pool) {
- if (xvImage->markedForDeletion)
- xvImage->pool->destroyBuffer(xvImage);
- else
- xvImage->pool->recycleBuffer(xvImage);
- }
-}
-
-
-QGstXvImageBufferPool::QGstXvImageBufferPool(QObject *parent)
- :QObject(parent)
-{
-}
-
-QGstXvImageBufferPool::~QGstXvImageBufferPool()
-{
-}
-
-bool QGstXvImageBufferPool::isFormatSupported(const QVideoSurfaceFormat &surfaceFormat)
-{
- bool ok = true;
- surfaceFormat.property("portId").toULongLong(&ok);
- if (!ok)
- return false;
-
- int xvFormatId = surfaceFormat.property("xvFormatId").toInt(&ok);
- if (!ok || xvFormatId < 0)
- return false;
-
- int dataSize = surfaceFormat.property("dataSize").toInt(&ok);
- if (!ok || dataSize<=0)
- return false;
-
- return true;
-}
-
-QGstXvImageBuffer *QGstXvImageBufferPool::takeBuffer(const QVideoSurfaceFormat &format, GstCaps *caps)
-{
- m_poolMutex.lock();
-
- m_caps = caps;
- if (format != m_format) {
- doClear();
- m_format = format;
- }
-
-
- if (m_pool.isEmpty()) {
- //qDebug() << "QGstXvImageBufferPool::takeBuffer: no buffer available, allocate the new one";
- if (QThread::currentThread() == thread()) {
- m_poolMutex.unlock();
- queuedAlloc();
- m_poolMutex.lock();
- } else {
- QMetaObject::invokeMethod(this, "queuedAlloc", Qt::QueuedConnection);
- m_allocWaitCondition.wait(&m_poolMutex, 300);
- }
- }
- QGstXvImageBuffer *res = 0;
-
- if (!m_pool.isEmpty()) {
- res = m_pool.takeLast();
- }
-
- m_poolMutex.unlock();
-
- return res;
-}
-
-void QGstXvImageBufferPool::queuedAlloc()
-{
- QMutexLocker lock(&m_poolMutex);
-
- Q_ASSERT(QThread::currentThread() == thread());
-
- QGstXvImageBuffer *xvBuffer = (QGstXvImageBuffer *)gst_mini_object_new(QGstXvImageBuffer::get_type());
-
- quint64 portId = m_format.property("portId").toULongLong();
- int xvFormatId = m_format.property("xvFormatId").toInt();
-
- xvBuffer->xvImage = XvShmCreateImage(
- QX11Info::display(),
- portId,
- xvFormatId,
- 0,
- m_format.frameWidth(),
- m_format.frameHeight(),
- &xvBuffer->shmInfo
- );
-
- if (!xvBuffer->xvImage) {
-// qDebug() << "QGstXvImageBufferPool: XvShmCreateImage failed";
- m_allocWaitCondition.wakeOne();
- return;
- }
-
- xvBuffer->shmInfo.shmid = shmget(IPC_PRIVATE, xvBuffer->xvImage->data_size, IPC_CREAT | 0777);
- xvBuffer->shmInfo.shmaddr = xvBuffer->xvImage->data = (char*)shmat(xvBuffer->shmInfo.shmid, 0, 0);
- xvBuffer->shmInfo.readOnly = False;
-
- if (!XShmAttach(QX11Info::display(), &xvBuffer->shmInfo)) {
-// qDebug() << "QGstXvImageBufferPool: XShmAttach failed";
- m_allocWaitCondition.wakeOne();
- return;
- }
-
- shmctl (xvBuffer->shmInfo.shmid, IPC_RMID, NULL);
-
- xvBuffer->pool = this;
- GST_MINI_OBJECT_CAST(xvBuffer)->flags = 0;
- gst_buffer_set_caps(GST_BUFFER_CAST(xvBuffer), m_caps);
- GST_BUFFER_DATA(xvBuffer) = (uchar*)xvBuffer->xvImage->data;
- GST_BUFFER_SIZE(xvBuffer) = xvBuffer->xvImage->data_size;
-
- m_allBuffers.append(xvBuffer);
- m_pool.append(xvBuffer);
-
- m_allocWaitCondition.wakeOne();
-}
-
-
-void QGstXvImageBufferPool::clear()
-{
- QMutexLocker lock(&m_poolMutex);
- doClear();
-}
-
-void QGstXvImageBufferPool::doClear()
-{
- foreach (QGstXvImageBuffer *xvBuffer, m_allBuffers) {
- xvBuffer->markedForDeletion = true;
- }
- m_allBuffers.clear();
-
- foreach (QGstXvImageBuffer *xvBuffer, m_pool) {
- gst_buffer_unref(GST_BUFFER(xvBuffer));
- }
- m_pool.clear();
-
- m_format = QVideoSurfaceFormat();
-}
-
-void QGstXvImageBufferPool::queuedDestroy()
-{
- QMutexLocker lock(&m_destroyMutex);
-
- foreach(XvShmImage xvImage, m_imagesToDestroy) {
- if (xvImage.shmInfo.shmaddr != ((void *) -1)) {
- XShmDetach(QX11Info::display(), &xvImage.shmInfo);
- XSync(QX11Info::display(), false);
-
- shmdt(xvImage.shmInfo.shmaddr);
- }
-
- if (xvImage.xvImage)
- XFree(xvImage.xvImage);
- }
-
- m_imagesToDestroy.clear();
-
- XSync(QX11Info::display(), false);
-}
-
-void QGstXvImageBufferPool::recycleBuffer(QGstXvImageBuffer *xvBuffer)
-{
- QMutexLocker lock(&m_poolMutex);
- gst_buffer_ref(GST_BUFFER_CAST(xvBuffer));
- m_pool.append(xvBuffer);
-}
-
-void QGstXvImageBufferPool::destroyBuffer(QGstXvImageBuffer *xvBuffer)
-{
- XvShmImage imageToDestroy;
- imageToDestroy.xvImage = xvBuffer->xvImage;
- imageToDestroy.shmInfo = xvBuffer->shmInfo;
-
- m_destroyMutex.lock();
- m_imagesToDestroy.append(imageToDestroy);
- m_destroyMutex.unlock();
-
- if (m_imagesToDestroy.size() == 1)
- QMetaObject::invokeMethod(this, "queuedDestroy", Qt::QueuedConnection);
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.h b/src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.h
deleted file mode 100644
index 30f77d1..0000000
--- a/src/plugins/mediaservices/gstreamer/qgstxvimagebuffer.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QGSTXVIMAGEBUFFER_H
-#define QGSTXVIMAGEBUFFER_H
-
-#include <QtMultimedia/qabstractvideobuffer.h>
-#include <QtMultimedia/qvideosurfaceformat.h>
-#include <QtCore/qmutex.h>
-#include <QtCore/qwaitcondition.h>
-#include <QtCore/qqueue.h>
-
-#include <X11/Xlib.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <X11/extensions/XShm.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/Xv.h>
-#include <X11/extensions/Xvlib.h>
-
-#include <gst/gst.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QGstXvImageBufferPool;
-
-struct QGstXvImageBuffer {
- GstBuffer buffer;
- QGstXvImageBufferPool *pool;
- XvImage *xvImage;
- XShmSegmentInfo shmInfo;
- bool markedForDeletion;
-
- static GType get_type(void);
- static void class_init(gpointer g_class, gpointer class_data);
- static void buffer_init(QGstXvImageBuffer *xvimage, gpointer g_class);
- static void buffer_finalize(QGstXvImageBuffer * xvimage);
- static GstBufferClass *parent_class;
-};
-
-const QAbstractVideoBuffer::HandleType XvHandleType = QAbstractVideoBuffer::HandleType(4);
-
-
-
-class QGstXvImageBufferPool : public QObject {
-Q_OBJECT
-friend class QGstXvImageBuffer;
-public:
- QGstXvImageBufferPool(QObject *parent = 0);
- virtual ~QGstXvImageBufferPool();
-
- bool isFormatSupported(const QVideoSurfaceFormat &format);
-
- QGstXvImageBuffer *takeBuffer(const QVideoSurfaceFormat &format, GstCaps *caps);
- void clear();
-
-private slots:
- void queuedAlloc();
- void queuedDestroy();
-
- void doClear();
-
- void recycleBuffer(QGstXvImageBuffer *);
- void destroyBuffer(QGstXvImageBuffer *);
-
-private:
- struct XvShmImage {
- XvImage *xvImage;
- XShmSegmentInfo shmInfo;
- };
-
- QMutex m_poolMutex;
- QMutex m_allocMutex;
- QWaitCondition m_allocWaitCondition;
- QMutex m_destroyMutex;
- QVideoSurfaceFormat m_format;
- GstCaps *m_caps;
- QList<QGstXvImageBuffer*> m_pool;
- QList<QGstXvImageBuffer*> m_allBuffers;
- QList<XvShmImage> m_imagesToDestroy;
-};
-
-QT_END_NAMESPACE
-
-Q_DECLARE_METATYPE(::XvImage*)
-
-QT_END_HEADER
-
-
-#endif
diff --git a/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.cpp b/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.cpp
deleted file mode 100644
index 596e39d..0000000
--- a/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.cpp
+++ /dev/null
@@ -1,713 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 <QtMultimedia/QAbstractVideoSurface>
-#include <QtMultimedia/QVideoFrame>
-#include <QtCore/qdebug.h>
-#include <QMap>
-#include <QThread>
-
-#include "qgstvideobuffer.h"
-
-#ifdef Q_WS_X11
-#include <QtGui/qx11info_x11.h>
-#include "qgstxvimagebuffer.h"
-#endif
-
-#include "qvideosurfacegstsink.h"
-
-
-
-
-Q_DECLARE_METATYPE(QVideoSurfaceFormat)
-
-QT_BEGIN_NAMESPACE
-
-QVideoSurfaceGstDelegate::QVideoSurfaceGstDelegate(QAbstractVideoSurface *surface)
- : m_surface(surface)
- , m_renderReturn(GST_FLOW_ERROR)
- , m_bytesPerLine(0)
-{
- m_supportedPixelFormats = m_surface->supportedPixelFormats();
-
- connect(m_surface, SIGNAL(supportedFormatsChanged()), this, SLOT(supportedFormatsChanged()));
-}
-
-QList<QVideoFrame::PixelFormat> QVideoSurfaceGstDelegate::supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType) const
-{
- QMutexLocker locker(const_cast<QMutex *>(&m_mutex));
-
- if (handleType == QAbstractVideoBuffer::NoHandle)
- return m_supportedPixelFormats;
- else
- return m_surface->supportedPixelFormats(handleType);
-}
-
-QVideoSurfaceFormat QVideoSurfaceGstDelegate::surfaceFormat() const
-{
- QMutexLocker locker(const_cast<QMutex *>(&m_mutex));
- return m_format;
-}
-
-bool QVideoSurfaceGstDelegate::start(const QVideoSurfaceFormat &format, int bytesPerLine)
-{
- QMutexLocker locker(&m_mutex);
-
- m_format = format;
- m_bytesPerLine = bytesPerLine;
-
- if (QThread::currentThread() == thread()) {
- m_started = !m_surface.isNull() ? m_surface->start(m_format) : false;
- } else {
- QMetaObject::invokeMethod(this, "queuedStart", Qt::QueuedConnection);
-
- m_setupCondition.wait(&m_mutex);
- }
-
- m_format = m_surface->surfaceFormat();
-
- return m_started;
-}
-
-void QVideoSurfaceGstDelegate::stop()
-{
- QMutexLocker locker(&m_mutex);
-
- if (QThread::currentThread() == thread()) {
- if (!m_surface.isNull())
- m_surface->stop();
- } else {
- QMetaObject::invokeMethod(this, "queuedStop", Qt::QueuedConnection);
-
- m_setupCondition.wait(&m_mutex);
- }
-
- m_started = false;
-}
-
-bool QVideoSurfaceGstDelegate::isActive()
-{
- QMutexLocker locker(&m_mutex);
- return m_surface->isActive();
-}
-
-GstFlowReturn QVideoSurfaceGstDelegate::render(GstBuffer *buffer)
-{
- QMutexLocker locker(&m_mutex);
-
- QGstVideoBuffer *videoBuffer = 0;
-
-#ifdef Q_WS_X11
- if (G_TYPE_CHECK_INSTANCE_TYPE(buffer, QGstXvImageBuffer::get_type())) {
- QGstXvImageBuffer *xvBuffer = reinterpret_cast<QGstXvImageBuffer *>(buffer);
- QVariant handle = QVariant::fromValue(xvBuffer->xvImage);
- videoBuffer = new QGstVideoBuffer(buffer, m_bytesPerLine, XvHandleType, handle);
- } else
-#endif
- videoBuffer = new QGstVideoBuffer(buffer, m_bytesPerLine);
-
- m_frame = QVideoFrame(
- videoBuffer,
- m_format.frameSize(),
- m_format.pixelFormat());
-
- qint64 startTime = GST_BUFFER_TIMESTAMP(buffer);
-
- if (startTime >= 0) {
- m_frame.setStartTime(startTime/G_GINT64_CONSTANT (1000000));
-
- qint64 duration = GST_BUFFER_DURATION(buffer);
-
- if (duration >= 0)
- m_frame.setEndTime((startTime + duration)/G_GINT64_CONSTANT (1000000));
- }
-
- QMetaObject::invokeMethod(this, "queuedRender", Qt::QueuedConnection);
-
- if (!m_renderCondition.wait(&m_mutex, 300)) {
- m_frame = QVideoFrame();
-
- return GST_FLOW_OK;
- } else {
- return m_renderReturn;
- }
-}
-
-void QVideoSurfaceGstDelegate::queuedStart()
-{
- QMutexLocker locker(&m_mutex);
-
- m_started = m_surface->start(m_format);
-
- m_setupCondition.wakeAll();
-}
-
-void QVideoSurfaceGstDelegate::queuedStop()
-{
- QMutexLocker locker(&m_mutex);
-
- m_surface->stop();
-
- m_setupCondition.wakeAll();
-}
-
-void QVideoSurfaceGstDelegate::queuedRender()
-{
- QMutexLocker locker(&m_mutex);
-
- if (m_surface.isNull()) {
- m_renderReturn = GST_FLOW_ERROR;
- } else if (m_surface->present(m_frame)) {
- m_renderReturn = GST_FLOW_OK;
- } else {
- switch (m_surface->error()) {
- case QAbstractVideoSurface::NoError:
- m_renderReturn = GST_FLOW_OK;
- break;
- case QAbstractVideoSurface::StoppedError:
- m_renderReturn = GST_FLOW_NOT_NEGOTIATED;
- break;
- default:
- m_renderReturn = GST_FLOW_ERROR;
- break;
- }
- }
-
- m_renderCondition.wakeAll();
-}
-
-void QVideoSurfaceGstDelegate::supportedFormatsChanged()
-{
- QMutexLocker locker(&m_mutex);
-
- m_supportedPixelFormats = m_surface->supportedPixelFormats();
-}
-
-struct YuvFormat
-{
- QVideoFrame::PixelFormat pixelFormat;
- guint32 fourcc;
- int bitsPerPixel;
-};
-
-static const YuvFormat qt_yuvColorLookup[] =
-{
- { QVideoFrame::Format_YUV420P, GST_MAKE_FOURCC('I','4','2','0'), 8 },
- { QVideoFrame::Format_YV12, GST_MAKE_FOURCC('Y','V','1','2'), 8 },
- { QVideoFrame::Format_UYVY, GST_MAKE_FOURCC('U','Y','V','Y'), 16 },
- { QVideoFrame::Format_YUYV, GST_MAKE_FOURCC('Y','U','Y','2'), 16 },
- { QVideoFrame::Format_NV12, GST_MAKE_FOURCC('N','V','1','2'), 8 },
- { QVideoFrame::Format_NV21, GST_MAKE_FOURCC('N','V','2','1'), 8 },
- { QVideoFrame::Format_AYUV444, GST_MAKE_FOURCC('A','Y','U','V'), 32 }
-};
-
-static int indexOfYuvColor(QVideoFrame::PixelFormat format)
-{
- const int count = sizeof(qt_yuvColorLookup) / sizeof(YuvFormat);
-
- for (int i = 0; i < count; ++i)
- if (qt_yuvColorLookup[i].pixelFormat == format)
- return i;
-
- return -1;
-}
-
-static int indexOfYuvColor(guint32 fourcc)
-{
- const int count = sizeof(qt_yuvColorLookup) / sizeof(YuvFormat);
-
- for (int i = 0; i < count; ++i)
- if (qt_yuvColorLookup[i].fourcc == fourcc)
- return i;
-
- return -1;
-}
-
-struct RgbFormat
-{
- QVideoFrame::PixelFormat pixelFormat;
- int bitsPerPixel;
- int depth;
- int endianness;
- int red;
- int green;
- int blue;
- int alpha;
-};
-
-static const RgbFormat qt_rgbColorLookup[] =
-{
- { QVideoFrame::Format_RGB32 , 32, 24, 4321, 0x0000FF00, 0x00FF0000, 0xFF000000, 0x00000000 },
- { QVideoFrame::Format_RGB32 , 32, 24, 1234, 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 },
- { QVideoFrame::Format_BGR32 , 32, 24, 4321, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x00000000 },
- { QVideoFrame::Format_BGR32 , 32, 24, 1234, 0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000 },
- { QVideoFrame::Format_ARGB32, 32, 24, 4321, 0x0000FF00, 0x00FF0000, 0xFF000000, 0x000000FF },
- { QVideoFrame::Format_ARGB32, 32, 24, 1234, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 },
- { QVideoFrame::Format_RGB24 , 24, 24, 4321, 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 },
- { QVideoFrame::Format_BGR24 , 24, 24, 4321, 0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000 },
- { QVideoFrame::Format_RGB565, 16, 16, 1234, 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }
-};
-
-static int indexOfRgbColor(
- int bits, int depth, int endianness, int red, int green, int blue, int alpha)
-{
- const int count = sizeof(qt_rgbColorLookup) / sizeof(RgbFormat);
-
- for (int i = 0; i < count; ++i) {
- if (qt_rgbColorLookup[i].bitsPerPixel == bits
- && qt_rgbColorLookup[i].depth == depth
- && qt_rgbColorLookup[i].endianness == endianness
- && qt_rgbColorLookup[i].red == red
- && qt_rgbColorLookup[i].green == green
- && qt_rgbColorLookup[i].blue == blue
- && qt_rgbColorLookup[i].alpha == alpha) {
- return i;
- }
- }
- return -1;
-}
-
-static GstVideoSinkClass *sink_parent_class;
-
-#define VO_SINK(s) QVideoSurfaceGstSink *sink(reinterpret_cast<QVideoSurfaceGstSink *>(s))
-
-QVideoSurfaceGstSink *QVideoSurfaceGstSink::createSink(QAbstractVideoSurface *surface)
-{
- QVideoSurfaceGstSink *sink = reinterpret_cast<QVideoSurfaceGstSink *>(
- g_object_new(QVideoSurfaceGstSink::get_type(), 0));
-
- sink->delegate = new QVideoSurfaceGstDelegate(surface);
-
- return sink;
-}
-
-GType QVideoSurfaceGstSink::get_type()
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info =
- {
- sizeof(QVideoSurfaceGstSinkClass), // class_size
- base_init, // base_init
- NULL, // base_finalize
- class_init, // class_init
- NULL, // class_finalize
- NULL, // class_data
- sizeof(QVideoSurfaceGstSink), // instance_size
- 0, // n_preallocs
- instance_init, // instance_init
- 0 // value_table
- };
-
- type = g_type_register_static(
- GST_TYPE_VIDEO_SINK, "QVideoSurfaceGstSink", &info, GTypeFlags(0));
- }
-
- return type;
-}
-
-void QVideoSurfaceGstSink::class_init(gpointer g_class, gpointer class_data)
-{
- Q_UNUSED(class_data);
-
- sink_parent_class = reinterpret_cast<GstVideoSinkClass *>(g_type_class_peek_parent(g_class));
-
- GstBaseSinkClass *base_sink_class = reinterpret_cast<GstBaseSinkClass *>(g_class);
- base_sink_class->get_caps = QVideoSurfaceGstSink::get_caps;
- base_sink_class->set_caps = QVideoSurfaceGstSink::set_caps;
- base_sink_class->buffer_alloc = QVideoSurfaceGstSink::buffer_alloc;
- base_sink_class->start = QVideoSurfaceGstSink::start;
- base_sink_class->stop = QVideoSurfaceGstSink::stop;
- // base_sink_class->unlock = QVideoSurfaceGstSink::unlock; // Not implemented.
- // base_sink_class->event = QVideoSurfaceGstSink::event; // Not implemented.
- base_sink_class->preroll = QVideoSurfaceGstSink::preroll;
- base_sink_class->render = QVideoSurfaceGstSink::render;
-
- GstElementClass *element_class = reinterpret_cast<GstElementClass *>(g_class);
- element_class->change_state = QVideoSurfaceGstSink::change_state;
-
- GObjectClass *object_class = reinterpret_cast<GObjectClass *>(g_class);
- object_class->finalize = QVideoSurfaceGstSink::finalize;
-}
-
-void QVideoSurfaceGstSink::base_init(gpointer g_class)
-{
- static GstStaticPadTemplate sink_pad_template = GST_STATIC_PAD_TEMPLATE(
- "sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS(
- "video/x-raw-rgb, "
- "framerate = (fraction) [ 0, MAX ], "
- "width = (int) [ 1, MAX ], "
- "height = (int) [ 1, MAX ]; "
- "video/x-raw-yuv, "
- "framerate = (fraction) [ 0, MAX ], "
- "width = (int) [ 1, MAX ], "
- "height = (int) [ 1, MAX ]"));
-
- gst_element_class_add_pad_template(
- GST_ELEMENT_CLASS(g_class), gst_static_pad_template_get(&sink_pad_template));
-}
-
-void QVideoSurfaceGstSink::instance_init(GTypeInstance *instance, gpointer g_class)
-{
- VO_SINK(instance);
-
- Q_UNUSED(g_class);
-
- sink->delegate = 0;
-#ifdef Q_WS_X11
- sink->pool = new QGstXvImageBufferPool();
-#endif
- sink->lastRequestedCaps = 0;
- sink->lastBufferCaps = 0;
- sink->lastSurfaceFormat = new QVideoSurfaceFormat;
-}
-
-void QVideoSurfaceGstSink::finalize(GObject *object)
-{
- VO_SINK(object);
-#ifdef Q_WS_X11
- delete sink->pool;
- sink->pool = 0;
-#endif
-
- delete sink->lastSurfaceFormat;
- sink->lastSurfaceFormat = 0;
-
- if (sink->lastBufferCaps)
- gst_caps_unref(sink->lastBufferCaps);
- sink->lastBufferCaps = 0;
-
- if (sink->lastRequestedCaps)
- gst_caps_unref(sink->lastRequestedCaps);
- sink->lastRequestedCaps = 0;
-}
-
-GstStateChangeReturn QVideoSurfaceGstSink::change_state(
- GstElement *element, GstStateChange transition)
-{
- Q_UNUSED(element);
-
- return GST_ELEMENT_CLASS(sink_parent_class)->change_state(
- element, transition);
-}
-
-GstCaps *QVideoSurfaceGstSink::get_caps(GstBaseSink *base)
-{
- VO_SINK(base);
-
- GstCaps *caps = gst_caps_new_empty();
-
- foreach (QVideoFrame::PixelFormat format, sink->delegate->supportedPixelFormats()) {
- int index = indexOfYuvColor(format);
-
- if (index != -1) {
- gst_caps_append_structure(caps, gst_structure_new(
- "video/x-raw-yuv",
- "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, INT_MAX, 1,
- "width" , GST_TYPE_INT_RANGE, 1, INT_MAX,
- "height" , GST_TYPE_INT_RANGE, 1, INT_MAX,
- "format" , GST_TYPE_FOURCC, qt_yuvColorLookup[index].fourcc,
- NULL));
- continue;
- }
-
- const int count = sizeof(qt_rgbColorLookup) / sizeof(RgbFormat);
-
- for (int i = 0; i < count; ++i) {
- if (qt_rgbColorLookup[i].pixelFormat == format) {
- GstStructure *structure = gst_structure_new(
- "video/x-raw-rgb",
- "framerate" , GST_TYPE_FRACTION_RANGE, 0, 1, INT_MAX, 1,
- "width" , GST_TYPE_INT_RANGE, 1, INT_MAX,
- "height" , GST_TYPE_INT_RANGE, 1, INT_MAX,
- "bpp" , G_TYPE_INT, qt_rgbColorLookup[i].bitsPerPixel,
- "depth" , G_TYPE_INT, qt_rgbColorLookup[i].depth,
- "endianness", G_TYPE_INT, qt_rgbColorLookup[i].endianness,
- "red_mask" , G_TYPE_INT, qt_rgbColorLookup[i].red,
- "green_mask", G_TYPE_INT, qt_rgbColorLookup[i].green,
- "blue_mask" , G_TYPE_INT, qt_rgbColorLookup[i].blue,
- NULL);
-
- if (qt_rgbColorLookup[i].alpha != 0) {
- gst_structure_set(
- structure, "alpha_mask", G_TYPE_INT, qt_rgbColorLookup[i].alpha, NULL);
- }
- gst_caps_append_structure(caps, structure);
- }
- }
- }
-
- return caps;
-}
-
-gboolean QVideoSurfaceGstSink::set_caps(GstBaseSink *base, GstCaps *caps)
-{
- VO_SINK(base);
-
- //qDebug() << "set_caps";
- //qDebug() << gst_caps_to_string(caps);
-
- if (!caps) {
- sink->delegate->stop();
-
- return TRUE;
- } else {
- int bytesPerLine = 0;
- QVideoSurfaceFormat format = formatForCaps(caps, &bytesPerLine);
-
- if (sink->delegate->isActive()) {
- QVideoSurfaceFormat surfaceFormst = sink->delegate->surfaceFormat();
-
- if (format.pixelFormat() == surfaceFormst.pixelFormat() &&
- format.frameSize() == surfaceFormst.frameSize())
- return TRUE;
- else
- sink->delegate->stop();
- }
-
- if (sink->lastRequestedCaps)
- gst_caps_unref(sink->lastRequestedCaps);
- sink->lastRequestedCaps = 0;
-
- //qDebug() << "Staring video surface:";
- //qDebug() << format;
- //qDebug() << bytesPerLine;
-
- if (sink->delegate->start(format, bytesPerLine))
- return TRUE;
-
- }
-
- return FALSE;
-}
-
-QVideoSurfaceFormat QVideoSurfaceGstSink::formatForCaps(GstCaps *caps, int *bytesPerLine)
-{
- const GstStructure *structure = gst_caps_get_structure(caps, 0);
-
- QVideoFrame::PixelFormat pixelFormat = QVideoFrame::Format_Invalid;
- int bitsPerPixel = 0;
-
- QSize size;
- gst_structure_get_int(structure, "width", &size.rwidth());
- gst_structure_get_int(structure, "height", &size.rheight());
-
- if (qstrcmp(gst_structure_get_name(structure), "video/x-raw-yuv") == 0) {
- guint32 fourcc = 0;
- gst_structure_get_fourcc(structure, "format", &fourcc);
-
- int index = indexOfYuvColor(fourcc);
- if (index != -1) {
- pixelFormat = qt_yuvColorLookup[index].pixelFormat;
- bitsPerPixel = qt_yuvColorLookup[index].bitsPerPixel;
- }
- } else if (qstrcmp(gst_structure_get_name(structure), "video/x-raw-rgb") == 0) {
- int depth = 0;
- int endianness = 0;
- int red = 0;
- int green = 0;
- int blue = 0;
- int alpha = 0;
-
- gst_structure_get_int(structure, "bpp", &bitsPerPixel);
- gst_structure_get_int(structure, "depth", &depth);
- gst_structure_get_int(structure, "endianness", &endianness);
- gst_structure_get_int(structure, "red_mask", &red);
- gst_structure_get_int(structure, "green_mask", &green);
- gst_structure_get_int(structure, "blue_mask", &blue);
- gst_structure_get_int(structure, "alpha_mask", &alpha);
-
- int index = indexOfRgbColor(bitsPerPixel, depth, endianness, red, green, blue, alpha);
-
- if (index != -1)
- pixelFormat = qt_rgbColorLookup[index].pixelFormat;
- }
-
- if (pixelFormat != QVideoFrame::Format_Invalid) {
- QVideoSurfaceFormat format(size, pixelFormat);
-
- QPair<int, int> rate;
- gst_structure_get_fraction(structure, "framerate", &rate.first, &rate.second);
-
- if (rate.second)
- format.setFrameRate(qreal(rate.first)/rate.second);
-
- gint aspectNum = 0;
- gint aspectDenum = 0;
- if (gst_structure_get_fraction(
- structure, "pixel-aspect-ratio", &aspectNum, &aspectDenum)) {
- if (aspectDenum > 0)
- format.setPixelAspectRatio(aspectNum, aspectDenum);
- }
-
- if (bytesPerLine)
- *bytesPerLine = ((size.width() * bitsPerPixel / 8) + 3) & ~3;
-
- return format;
- }
-
- return QVideoSurfaceFormat();
-}
-
-
-GstFlowReturn QVideoSurfaceGstSink::buffer_alloc(
- GstBaseSink *base, guint64 offset, guint size, GstCaps *caps, GstBuffer **buffer)
-{
- VO_SINK(base);
-
- Q_UNUSED(offset);
- Q_UNUSED(size);
-
- *buffer = 0;
-
-#ifdef Q_WS_X11
-
- if (sink->lastRequestedCaps && gst_caps_is_equal(sink->lastRequestedCaps, caps)) {
- //qDebug() << "reusing last caps";
- *buffer = GST_BUFFER(sink->pool->takeBuffer(*sink->lastSurfaceFormat, sink->lastBufferCaps));
- return GST_FLOW_OK;
- }
-
- if (sink->delegate->supportedPixelFormats(XvHandleType).isEmpty()) {
- //qDebug() << "sink doesn't support Xv buffers, skip buffers allocation";
- return GST_FLOW_OK;
- }
-
- GstCaps *intersection = gst_caps_intersect(get_caps(GST_BASE_SINK(sink)), caps);
-
- if (gst_caps_is_empty (intersection)) {
- gst_caps_unref(intersection);
- return GST_FLOW_NOT_NEGOTIATED;
- }
-
- if (sink->delegate->isActive()) {
- //if format was changed, restart the surface
- QVideoSurfaceFormat format = formatForCaps(intersection);
- QVideoSurfaceFormat surfaceFormat = sink->delegate->surfaceFormat();
-
- if (format.pixelFormat() != surfaceFormat.pixelFormat() ||
- format.frameSize() != surfaceFormat.frameSize()) {
- //qDebug() << "new format requested, restart video surface";
- sink->delegate->stop();
- }
- }
-
- if (!sink->delegate->isActive()) {
- int bytesPerLine = 0;
- QVideoSurfaceFormat format = formatForCaps(intersection, &bytesPerLine);
-
- if (!sink->delegate->start(format, bytesPerLine)) {
- qDebug() << "failed to start video surface";
- return GST_FLOW_NOT_NEGOTIATED;
- }
- }
-
- QVideoSurfaceFormat surfaceFormat = sink->delegate->surfaceFormat();
-
- if (!sink->pool->isFormatSupported(surfaceFormat)) {
- //qDebug() << "sink doesn't provide Xv buffer details, skip buffers allocation";
- return GST_FLOW_OK;
- }
-
- if (sink->lastRequestedCaps)
- gst_caps_unref(sink->lastRequestedCaps);
- sink->lastRequestedCaps = caps;
- gst_caps_ref(sink->lastRequestedCaps);
-
- if (sink->lastBufferCaps)
- gst_caps_unref(sink->lastBufferCaps);
- sink->lastBufferCaps = intersection;
- gst_caps_ref(sink->lastBufferCaps);
-
- *sink->lastSurfaceFormat = surfaceFormat;
-
- *buffer = GST_BUFFER(sink->pool->takeBuffer(surfaceFormat, intersection));
-
-#endif
- return GST_FLOW_OK;
-}
-
-gboolean QVideoSurfaceGstSink::start(GstBaseSink *base)
-{
- Q_UNUSED(base);
-
- return TRUE;
-}
-
-gboolean QVideoSurfaceGstSink::stop(GstBaseSink *base)
-{
- Q_UNUSED(base);
-
- return TRUE;
-}
-
-gboolean QVideoSurfaceGstSink::unlock(GstBaseSink *base)
-{
- Q_UNUSED(base);
-
- return TRUE;
-}
-
-gboolean QVideoSurfaceGstSink::event(GstBaseSink *base, GstEvent *event)
-{
- Q_UNUSED(base);
- Q_UNUSED(event);
-
- return TRUE;
-}
-
-GstFlowReturn QVideoSurfaceGstSink::preroll(GstBaseSink *base, GstBuffer *buffer)
-{
- VO_SINK(base);
-
- return sink->delegate->render(buffer);
-}
-
-GstFlowReturn QVideoSurfaceGstSink::render(GstBaseSink *base, GstBuffer *buffer)
-{
- VO_SINK(base);
- return sink->delegate->render(buffer);
-}
-
-QT_END_NAMESPACE
-
-
diff --git a/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h b/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h
deleted file mode 100644
index 75fa854..0000000
--- a/src/plugins/mediaservices/gstreamer/qvideosurfacegstsink.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 VIDEOSURFACEGSTSINK_H
-#define VIDEOSURFACEGSTSINK_H
-
-#include <gst/video/gstvideosink.h>
-
-#include <QtCore/qlist.h>
-#include <QtCore/qmutex.h>
-#include <QtCore/qpointer.h>
-#include <QtCore/qwaitcondition.h>
-#include <QtMultimedia/qvideosurfaceformat.h>
-#include <QtMultimedia/qvideoframe.h>
-#include <QtMultimedia/qabstractvideobuffer.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QAbstractVideoSurface;
-
-#ifdef Q_WS_X11
-class QGstXvImageBuffer;
-class QGstXvImageBufferPool;
-#endif
-
-
-class QVideoSurfaceGstDelegate : public QObject
-{
- Q_OBJECT
-public:
- QVideoSurfaceGstDelegate(QAbstractVideoSurface *surface);
-
- QList<QVideoFrame::PixelFormat> supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const;
-
- QVideoSurfaceFormat surfaceFormat() const;
-
-
- bool start(const QVideoSurfaceFormat &format, int bytesPerLine);
- void stop();
-
- bool isActive();
-
- GstFlowReturn render(GstBuffer *buffer);
-
-private slots:
- void queuedStart();
- void queuedStop();
- void queuedRender();
-
- void supportedFormatsChanged();
-
-private:
- QPointer<QAbstractVideoSurface> m_surface;
- QList<QVideoFrame::PixelFormat> m_supportedPixelFormats;
- QMutex m_mutex;
- QWaitCondition m_setupCondition;
- QWaitCondition m_renderCondition;
- QVideoSurfaceFormat m_format;
- QVideoFrame m_frame;
- GstFlowReturn m_renderReturn;
- int m_bytesPerLine;
- bool m_started;
-};
-
-class QVideoSurfaceGstSink
-{
-public:
- GstVideoSink parent;
-
- static QVideoSurfaceGstSink *createSink(QAbstractVideoSurface *surface);
- static QVideoSurfaceFormat formatForCaps(GstCaps *caps, int *bytesPerLine = 0);
-
-private:
- static GType get_type();
- static void class_init(gpointer g_class, gpointer class_data);
- static void base_init(gpointer g_class);
- static void instance_init(GTypeInstance *instance, gpointer g_class);
-
- static void finalize(GObject *object);
-
- static GstStateChangeReturn change_state(GstElement *element, GstStateChange transition);
-
- static GstCaps *get_caps(GstBaseSink *sink);
- static gboolean set_caps(GstBaseSink *sink, GstCaps *caps);
-
- static GstFlowReturn buffer_alloc(
- GstBaseSink *sink, guint64 offset, guint size, GstCaps *caps, GstBuffer **buffer);
-
- static gboolean start(GstBaseSink *sink);
- static gboolean stop(GstBaseSink *sink);
-
- static gboolean unlock(GstBaseSink *sink);
-
- static gboolean event(GstBaseSink *sink, GstEvent *event);
- static GstFlowReturn preroll(GstBaseSink *sink, GstBuffer *buffer);
- static GstFlowReturn render(GstBaseSink *sink, GstBuffer *buffer);
-
-private:
- QVideoSurfaceGstDelegate *delegate;
-
-#ifdef Q_WS_X11
- QGstXvImageBufferPool *pool;
-#endif
-
- GstCaps *lastRequestedCaps;
- GstCaps *lastBufferCaps;
- QVideoSurfaceFormat *lastSurfaceFormat;
-};
-
-
-class QVideoSurfaceGstSinkClass
-{
-public:
- GstVideoSinkClass parent_class;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/gstreamer/qx11videosurface.cpp b/src/plugins/mediaservices/gstreamer/qx11videosurface.cpp
deleted file mode 100644
index 70b8527..0000000
--- a/src/plugins/mediaservices/gstreamer/qx11videosurface.cpp
+++ /dev/null
@@ -1,523 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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/qvariant.h>
-#include <QtCore/qdebug.h>
-#include <QtGui/qx11info_x11.h>
-#include <QtMultimedia/qvideosurfaceformat.h>
-
-#include "qx11videosurface.h"
-
-Q_DECLARE_METATYPE(::XvImage*);
-
-QT_BEGIN_NAMESPACE
-
-static QAbstractVideoBuffer::HandleType XvHandleType = QAbstractVideoBuffer::HandleType(4);
-
-struct XvFormatRgb
-{
- QVideoFrame::PixelFormat pixelFormat;
- int bits_per_pixel;
- int format;
- int num_planes;
-
- int depth;
- unsigned int red_mask;
- unsigned int green_mask;
- unsigned int blue_mask;
-
-};
-
-bool operator ==(const XvImageFormatValues &format, const XvFormatRgb &rgb)
-{
- return format.type == XvRGB
- && format.bits_per_pixel == rgb.bits_per_pixel
- && format.format == rgb.format
- && format.num_planes == rgb.num_planes
- && format.depth == rgb.depth
- && format.red_mask == rgb.red_mask
- && format.blue_mask == rgb.blue_mask;
-}
-
-static const XvFormatRgb qt_xvRgbLookup[] =
-{
- { QVideoFrame::Format_ARGB32, 32, XvPacked, 1, 32, 0x00FF0000, 0x0000FF00, 0x000000FF },
- { QVideoFrame::Format_RGB32 , 32, XvPacked, 1, 24, 0x00FF0000, 0x0000FF00, 0x000000FF },
- { QVideoFrame::Format_RGB24 , 24, XvPacked, 1, 24, 0x00FF0000, 0x0000FF00, 0x000000FF },
- { QVideoFrame::Format_RGB565, 16, XvPacked, 1, 16, 0x0000F800, 0x000007E0, 0x0000001F },
- { QVideoFrame::Format_BGRA32, 32, XvPacked, 1, 32, 0xFF000000, 0x00FF0000, 0x0000FF00 },
- { QVideoFrame::Format_BGR32 , 32, XvPacked, 1, 24, 0x00FF0000, 0x0000FF00, 0x000000FF },
- { QVideoFrame::Format_BGR24 , 24, XvPacked, 1, 24, 0x00FF0000, 0x0000FF00, 0x000000FF },
- { QVideoFrame::Format_BGR565, 16, XvPacked, 1, 16, 0x0000F800, 0x000007E0, 0x0000001F }
-};
-
-struct XvFormatYuv
-{
- QVideoFrame::PixelFormat pixelFormat;
- int bits_per_pixel;
- int format;
- int num_planes;
-
- unsigned int y_sample_bits;
- unsigned int u_sample_bits;
- unsigned int v_sample_bits;
- unsigned int horz_y_period;
- unsigned int horz_u_period;
- unsigned int horz_v_period;
- unsigned int vert_y_period;
- unsigned int vert_u_period;
- unsigned int vert_v_period;
- char component_order[32];
-};
-
-bool operator ==(const XvImageFormatValues &format, const XvFormatYuv &yuv)
-{
- return format.type == XvYUV
- && format.bits_per_pixel == yuv.bits_per_pixel
- && format.format == yuv.format
- && format.num_planes == yuv.num_planes
- && format.y_sample_bits == yuv.y_sample_bits
- && format.u_sample_bits == yuv.u_sample_bits
- && format.v_sample_bits == yuv.v_sample_bits
- && format.horz_y_period == yuv.horz_y_period
- && format.horz_u_period == yuv.horz_u_period
- && format.horz_v_period == yuv.horz_v_period
- && format.horz_y_period == yuv.vert_y_period
- && format.vert_u_period == yuv.vert_u_period
- && format.vert_v_period == yuv.vert_v_period
- && qstrncmp(format.component_order, yuv.component_order, 32) == 0;
-}
-
-static const XvFormatYuv qt_xvYuvLookup[] =
-{
- { QVideoFrame::Format_YUV444 , 24, XvPacked, 1, 8, 8, 8, 1, 1, 1, 1, 1, 1, "YUV" },
- { QVideoFrame::Format_YUV420P, 12, XvPlanar, 3, 8, 8, 8, 1, 2, 2, 1, 2, 2, "YUV" },
- { QVideoFrame::Format_YV12 , 12, XvPlanar, 3, 8, 8, 8, 1, 2, 2, 1, 2, 2, "YVU" },
- { QVideoFrame::Format_UYVY , 16, XvPacked, 1, 8, 8, 8, 1, 2, 2, 1, 1, 1, "UYVY" },
- { QVideoFrame::Format_YUYV , 16, XvPacked, 1, 8, 8, 8, 1, 2, 2, 1, 1, 1, "YUY2" },
- { QVideoFrame::Format_YUYV , 16, XvPacked, 1, 8, 8, 8, 1, 2, 2, 1, 1, 1, "YUYV" },
- { QVideoFrame::Format_NV12 , 12, XvPlanar, 2, 8, 8, 8, 1, 2, 2, 1, 2, 2, "YUV" },
- { QVideoFrame::Format_NV12 , 12, XvPlanar, 2, 8, 8, 8, 1, 2, 2, 1, 2, 2, "YVU" },
- { QVideoFrame::Format_Y8 , 8 , XvPlanar, 1, 8, 0, 0, 1, 0, 0, 1, 0, 0, "Y" }
-};
-
-QX11VideoSurface::QX11VideoSurface(QObject *parent)
- : QAbstractVideoSurface(parent)
- , m_winId(0)
- , m_portId(0)
- , m_gc(0)
- , m_image(0)
-{
-}
-
-QX11VideoSurface::~QX11VideoSurface()
-{
- if (m_gc)
- XFreeGC(QX11Info::display(), m_gc);
-
- if (m_portId != 0)
- XvUngrabPort(QX11Info::display(), m_portId, 0);
-}
-
-WId QX11VideoSurface::winId() const
-{
- return m_winId;
-}
-
-void QX11VideoSurface::setWinId(WId id)
-{
- if (id == m_winId)
- return;
-
- if (m_image)
- XFree(m_image);
-
- if (m_gc) {
- XFreeGC(QX11Info::display(), m_gc);
- m_gc = 0;
- }
-
- if (m_portId != 0)
- XvUngrabPort(QX11Info::display(), m_portId, 0);
-
- m_supportedPixelFormats.clear();
- m_formatIds.clear();
-
- m_winId = id;
-
- if (m_winId && findPort()) {
- querySupportedFormats();
-
- m_gc = XCreateGC(QX11Info::display(), m_winId, 0, 0);
-
- if (m_image) {
- m_image = 0;
-
- if (!start(surfaceFormat()))
- QAbstractVideoSurface::stop();
- }
- } else if (m_image) {
- m_image = 0;
-
- QAbstractVideoSurface::stop();
- }
-
- emit supportedFormatsChanged();
-}
-
-QRect QX11VideoSurface::displayRect() const
-{
- return m_displayRect;
-}
-
-void QX11VideoSurface::setDisplayRect(const QRect &rect)
-{
- m_displayRect = rect;
-}
-
-QRect QX11VideoSurface::viewport() const
-{
- return m_viewport;
-}
-
-void QX11VideoSurface::setViewport(const QRect &rect)
-{
- m_viewport = rect;
-}
-
-int QX11VideoSurface::brightness() const
-{
- return getAttribute("XV_BRIGHTNESS", m_brightnessRange.first, m_brightnessRange.second);
-}
-
-void QX11VideoSurface::setBrightness(int brightness)
-{
- setAttribute("XV_BRIGHTNESS", brightness, m_brightnessRange.first, m_brightnessRange.second);
-}
-
-int QX11VideoSurface::contrast() const
-{
- return getAttribute("XV_CONTRAST", m_contrastRange.first, m_contrastRange.second);
-}
-
-void QX11VideoSurface::setContrast(int contrast)
-{
- setAttribute("XV_CONTRAST", contrast, m_contrastRange.first, m_contrastRange.second);
-}
-
-int QX11VideoSurface::hue() const
-{
- return getAttribute("XV_HUE", m_hueRange.first, m_hueRange.second);
-}
-
-void QX11VideoSurface::setHue(int hue)
-{
- setAttribute("XV_HUE", hue, m_hueRange.first, m_hueRange.second);
-}
-
-int QX11VideoSurface::saturation() const
-{
- return getAttribute("XV_SATURATION", m_saturationRange.first, m_saturationRange.second);
-}
-
-void QX11VideoSurface::setSaturation(int saturation)
-{
- setAttribute("XV_SATURATION", saturation, m_saturationRange.first, m_saturationRange.second);
-}
-
-int QX11VideoSurface::getAttribute(const char *attribute, int minimum, int maximum) const
-{
- if (m_portId != 0) {
- Display *display = QX11Info::display();
-
- Atom atom = XInternAtom(display, attribute, True);
-
- int value = 0;
-
- XvGetPortAttribute(display, m_portId, atom, &value);
-
- return redistribute(value, minimum, maximum, -100, 100);
- } else {
- return 0;
- }
-}
-
-void QX11VideoSurface::setAttribute(const char *attribute, int value, int minimum, int maximum)
-{
- if (m_portId != 0) {
- Display *display = QX11Info::display();
-
- Atom atom = XInternAtom(display, attribute, True);
-
- XvSetPortAttribute(
- display, m_portId, atom, redistribute(value, -100, 100, minimum, maximum));
- }
-}
-
-int QX11VideoSurface::redistribute(
- int value, int fromLower, int fromUpper, int toLower, int toUpper)
-{
- return fromUpper != fromLower
- ? ((value - fromLower) * (toUpper - toLower) / (fromUpper - fromLower)) + toLower
- : 0;
-}
-
-QList<QVideoFrame::PixelFormat> QX11VideoSurface::supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType) const
-{
- return handleType == QAbstractVideoBuffer::NoHandle || handleType == XvHandleType
- ? m_supportedPixelFormats
- : QList<QVideoFrame::PixelFormat>();
-}
-
-bool QX11VideoSurface::start(const QVideoSurfaceFormat &format)
-{
- if (m_image)
- XFree(m_image);
-
- int xvFormatId = 0;
- for (int i = 0; i < m_supportedPixelFormats.count(); ++i) {
- if (m_supportedPixelFormats.at(i) == format.pixelFormat()) {
- xvFormatId = m_formatIds.at(i);
- break;
- }
- }
-
- if (xvFormatId == 0) {
- setError(UnsupportedFormatError);
- } else {
- XvImage *image = XvCreateImage(
- QX11Info::display(),
- m_portId,
- xvFormatId,
- 0,
- format.frameWidth(),
- format.frameHeight());
-
- if (!image) {
- setError(ResourceError);
- } else {
- m_viewport = format.viewport();
- m_image = image;
-
- QVideoSurfaceFormat newFormat = format;
- newFormat.setProperty("portId", QVariant(quint64(m_portId)));
- newFormat.setProperty("xvFormatId", xvFormatId);
- newFormat.setProperty("dataSize", image->data_size);
-
- return QAbstractVideoSurface::start(newFormat);
- }
- }
-
- if (m_image) {
- m_image = 0;
-
- QAbstractVideoSurface::stop();
- }
-
- return false;
-}
-
-void QX11VideoSurface::stop()
-{
- if (m_image) {
- XFree(m_image);
- m_image = 0;
-
- QAbstractVideoSurface::stop();
- }
-}
-
-bool QX11VideoSurface::present(const QVideoFrame &frame)
-{
- if (!m_image) {
- setError(StoppedError);
- return false;
- } else if (m_image->width != frame.width() || m_image->height != frame.height()) {
- setError(IncorrectFormatError);
- return false;
- } else {
- QVideoFrame frameCopy(frame);
-
- if (!frameCopy.map(QAbstractVideoBuffer::ReadOnly)) {
- setError(IncorrectFormatError);
- return false;
- } else {
- bool presented = false;
-
- if (frame.handleType() != XvHandleType &&
- m_image->data_size > frame.mappedBytes()) {
- qWarning("Insufficient frame buffer size");
- setError(IncorrectFormatError);
- } else if (frame.handleType() != XvHandleType &&
- m_image->num_planes > 0 &&
- m_image->pitches[0] != frame.bytesPerLine()) {
- qWarning("Incompatible frame pitches");
- setError(IncorrectFormatError);
- } else {
- if (frame.handleType() != XvHandleType) {
- m_image->data = reinterpret_cast<char *>(frameCopy.bits());
-
- //qDebug() << "copy frame";
- XvPutImage(
- QX11Info::display(),
- m_portId,
- m_winId,
- m_gc,
- m_image,
- m_viewport.x(),
- m_viewport.y(),
- m_viewport.width(),
- m_viewport.height(),
- m_displayRect.x(),
- m_displayRect.y(),
- m_displayRect.width(),
- m_displayRect.height());
-
- m_image->data = 0;
- } else {
- XvImage *img = frame.handle().value<XvImage*>();
-
- //qDebug() << "render directly";
- if (img)
- XvShmPutImage(
- QX11Info::display(),
- m_portId,
- m_winId,
- m_gc,
- img,
- m_viewport.x(),
- m_viewport.y(),
- m_viewport.width(),
- m_viewport.height(),
- m_displayRect.x(),
- m_displayRect.y(),
- m_displayRect.width(),
- m_displayRect.height(),
- false);
- }
-
- presented = true;
- }
-
- frameCopy.unmap();
-
- return presented;
- }
- }
-}
-
-bool QX11VideoSurface::findPort()
-{
- unsigned int count = 0;
- XvAdaptorInfo *adaptors = 0;
- bool portFound = false;
-
- if (XvQueryAdaptors(QX11Info::display(), m_winId, &count, &adaptors) == Success) {
- for (unsigned int i = 0; i < count && !portFound; ++i) {
- if (adaptors[i].type & XvImageMask) {
- m_portId = adaptors[i].base_id;
-
- for (unsigned int j = 0; j < adaptors[i].num_ports && !portFound; ++j, ++m_portId)
- portFound = XvGrabPort(QX11Info::display(), m_portId, 0) == Success;
- }
- }
- XvFreeAdaptorInfo(adaptors);
- }
-
- return portFound;
-}
-
-void QX11VideoSurface::querySupportedFormats()
-{
- int count = 0;
- if (XvImageFormatValues *imageFormats = XvListImageFormats(
- QX11Info::display(), m_portId, &count)) {
- const int rgbCount = sizeof(qt_xvRgbLookup) / sizeof(XvFormatRgb);
- const int yuvCount = sizeof(qt_xvYuvLookup) / sizeof(XvFormatYuv);
-
- for (int i = 0; i < count; ++i) {
- switch (imageFormats[i].type) {
- case XvRGB:
- for (int j = 0; j < rgbCount; ++j) {
- if (imageFormats[i] == qt_xvRgbLookup[j]) {
- m_supportedPixelFormats.append(qt_xvRgbLookup[j].pixelFormat);
- m_formatIds.append(imageFormats[i].id);
- break;
- }
- }
- break;
- case XvYUV:
- for (int j = 0; j < yuvCount; ++j) {
- if (imageFormats[i] == qt_xvYuvLookup[j]) {
- m_supportedPixelFormats.append(qt_xvYuvLookup[j].pixelFormat);
- m_formatIds.append(imageFormats[i].id);
- break;
- }
- }
- break;
- }
- }
- XFree(imageFormats);
- }
-
- m_brightnessRange = qMakePair(0, 0);
- m_contrastRange = qMakePair(0, 0);
- m_hueRange = qMakePair(0, 0);
- m_saturationRange = qMakePair(0, 0);
-
- if (XvAttribute *attributes = XvQueryPortAttributes(QX11Info::display(), m_portId, &count)) {
- for (int i = 0; i < count; ++i) {
- if (qstrcmp(attributes[i].name, "XV_BRIGHTNESS") == 0)
- m_brightnessRange = qMakePair(attributes[i].min_value, attributes[i].max_value);
- else if (qstrcmp(attributes[i].name, "XV_CONTRAST") == 0)
- m_contrastRange = qMakePair(attributes[i].min_value, attributes[i].max_value);
- else if (qstrcmp(attributes[i].name, "XV_HUE") == 0)
- m_hueRange = qMakePair(attributes[i].min_value, attributes[i].max_value);
- else if (qstrcmp(attributes[i].name, "XV_SATURATION") == 0)
- m_saturationRange = qMakePair(attributes[i].min_value, attributes[i].max_value);
- }
-
- XFree(attributes);
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/gstreamer/qx11videosurface.h b/src/plugins/mediaservices/gstreamer/qx11videosurface.h
deleted file mode 100644
index 10f79a6..0000000
--- a/src/plugins/mediaservices/gstreamer/qx11videosurface.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QX11VIDEOSURFACE_H
-#define QX11VIDEOSURFACE_H
-
-#include <QtGui/qwidget.h>
-#include <QtMultimedia/qabstractvideosurface.h>
-
-#include <X11/Xlib.h>
-#include <X11/extensions/Xv.h>
-#include <X11/extensions/Xvlib.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QX11VideoSurface : public QAbstractVideoSurface
-{
- Q_OBJECT
-public:
- QX11VideoSurface(QObject *parent = 0);
- ~QX11VideoSurface();
-
- WId winId() const;
- void setWinId(WId id);
-
- QRect displayRect() const;
- void setDisplayRect(const QRect &rect);
-
- QRect viewport() const;
- void setViewport(const QRect &rect);
-
- int brightness() const;
- void setBrightness(int brightness);
-
- int contrast() const;
- void setContrast(int contrast);
-
- int hue() const;
- void setHue(int hue);
-
- int saturation() const;
- void setSaturation(int saturation);
-
- QList<QVideoFrame::PixelFormat> supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const;
-
- bool start(const QVideoSurfaceFormat &format);
- void stop();
-
- bool present(const QVideoFrame &frame);
-
-private:
- WId m_winId;
- XvPortID m_portId;
- GC m_gc;
- XvImage *m_image;
- QList<QVideoFrame::PixelFormat> m_supportedPixelFormats;
- QVector<int> m_formatIds;
- QRect m_viewport;
- QRect m_displayRect;
- QPair<int, int> m_brightnessRange;
- QPair<int, int> m_contrastRange;
- QPair<int, int> m_hueRange;
- QPair<int, int> m_saturationRange;
-
- bool findPort();
- void querySupportedFormats();
-
- int getAttribute(const char *attribute, int minimum, int maximum) const;
- void setAttribute(const char *attribute, int value, int minimum, int maximum);
-
- static int redistribute(int value, int fromLower, int fromUpper, int toLower, int toUpper);
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/mediaservices.pro b/src/plugins/mediaservices/mediaservices.pro
deleted file mode 100644
index 27f05bc..0000000
--- a/src/plugins/mediaservices/mediaservices.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-TEMPLATE = subdirs
-
-contains(QT_CONFIG, media-backend) {
- win32:!wince*: SUBDIRS += directshow
-
- mac: SUBDIRS += qt7
-
- unix:!mac:!symbian:contains(QT_CONFIG, gstreamer) {
- SUBDIRS += gstreamer
- }
-
- symbian:SUBDIRS += symbian
-}
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/mediaplayer.pri b/src/plugins/mediaservices/qt7/mediaplayer/mediaplayer.pri
deleted file mode 100644
index 577209e..0000000
--- a/src/plugins/mediaservices/qt7/mediaplayer/mediaplayer.pri
+++ /dev/null
@@ -1,18 +0,0 @@
-INCLUDEPATH += $$PWD
-
-DEFINES += QMEDIA_QT7_PLAYER
-
-HEADERS += \
- $$PWD/qt7playercontrol.h \
- $$PWD/qt7playermetadata.h \
- $$PWD/qt7playerservice.h \
- $$PWD/qt7playersession.h
-
-OBJECTIVE_SOURCES += \
- $$PWD/qt7playercontrol.mm \
- $$PWD/qt7playermetadata.mm \
- $$PWD/qt7playerservice.mm \
- $$PWD/qt7playersession.mm
-
-
-
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.h b/src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.h
deleted file mode 100644
index 5ac97b1..0000000
--- a/src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QT7PLAYERCONTROL_H
-#define QT7PLAYERCONTROL_H
-
-#include <QtCore/qobject.h>
-#include <QtGui/qmacdefines_mac.h>
-
-#include <QtMediaServices/qmediaplayercontrol.h>
-#include <QtMediaServices/qmediaplayer.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QT7PlayerSession;
-class QT7PlayerService;
-class QMediaPlaylist;
-class QMediaPlaylistNavigator;
-
-class QT7PlayerControl : public QMediaPlayerControl
-{
-Q_OBJECT
-public:
- QT7PlayerControl(QObject *parent = 0);
- ~QT7PlayerControl();
-
- void setSession(QT7PlayerSession *session);
-
- QMediaPlayer::State state() const;
- QMediaPlayer::MediaStatus mediaStatus() const;
-
- QMediaContent media() const;
- const QIODevice *mediaStream() const;
- void setMedia(const QMediaContent &content, QIODevice *stream);
-
- qint64 position() const;
- qint64 duration() const;
-
- int bufferStatus() const;
-
- int volume() const;
- bool isMuted() const;
-
- bool isAudioAvailable() const;
- bool isVideoAvailable() const;
-
- bool isSeekable() const;
-
- QMediaTimeRange availablePlaybackRanges() const;
-
- qreal playbackRate() const;
- void setPlaybackRate(qreal rate);
-
-public Q_SLOTS:
- void setPosition(qint64 pos);
-
- void play();
- void pause();
- void stop();
-
- void setVolume(int volume);
- void setMuted(bool muted);
-
-Q_SIGNALS:
- void mediaChanged(const QMediaContent& content);
- void durationChanged(qint64 duration);
- void positionChanged(qint64 position);
- void stateChanged(QMediaPlayer::State newState);
- void mediaStatusChanged(QMediaPlayer::MediaStatus status);
- void volumeChanged(int volume);
- void mutedChanged(bool muted);
- void videoAvailableChanged(bool videoAvailable);
- void bufferStatusChanged(int percentFilled);
- void seekableChanged(bool);
- void seekRangeChanged(const QPair<qint64,qint64>&);
- void playbackRateChanged(qreal rate);
- void error(int error, const QString &errorString);
-
-private:
- QT7PlayerSession *m_session;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.mm b/src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.mm
deleted file mode 100644
index ba22552..0000000
--- a/src/plugins/mediaservices/qt7/mediaplayer/qt7playercontrol.mm
+++ /dev/null
@@ -1,193 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qt7playercontrol.h"
-#include "qt7playersession.h"
-
-#include <QtMediaServices/qmediaplaylistnavigator.h>
-
-#include <QtCore/qurl.h>
-#include <QtCore/qdebug.h>
-
-
-QT_BEGIN_NAMESPACE
-
-QT7PlayerControl::QT7PlayerControl(QObject *parent)
- : QMediaPlayerControl(parent)
-{
-}
-
-QT7PlayerControl::~QT7PlayerControl()
-{
-}
-
-void QT7PlayerControl::setSession(QT7PlayerSession *session)
-{
- m_session = session;
-
- connect(m_session, SIGNAL(positionChanged(qint64)), this, SIGNAL(positionChanged(qint64)));
- connect(m_session, SIGNAL(durationChanged(qint64)), this, SIGNAL(durationChanged(qint64)));
- connect(m_session, SIGNAL(stateChanged(QMediaPlayer::State)),
- this, SIGNAL(stateChanged(QMediaPlayer::State)));
- connect(m_session, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)),
- this, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)));
- connect(m_session, SIGNAL(volumeChanged(int)), this, SIGNAL(volumeChanged(int)));
- connect(m_session, SIGNAL(mutedChanged(bool)), this, SIGNAL(mutedChanged(bool)));
- connect(m_session, SIGNAL(audioAvailableChanged(bool)), this, SIGNAL(audioAvailableChanged(bool)));
- connect(m_session, SIGNAL(videoAvailableChanged(bool)), this, SIGNAL(videoAvailableChanged(bool)));
- connect(m_session, SIGNAL(error(int,QString)), this, SIGNAL(error(int,QString)));
-}
-
-qint64 QT7PlayerControl::position() const
-{
- return m_session->position();
-}
-
-qint64 QT7PlayerControl::duration() const
-{
- return m_session->duration();
-}
-
-QMediaPlayer::State QT7PlayerControl::state() const
-{
- return m_session->state();
-}
-
-QMediaPlayer::MediaStatus QT7PlayerControl::mediaStatus() const
-{
- return m_session->mediaStatus();
-}
-
-int QT7PlayerControl::bufferStatus() const
-{
- return m_session->bufferStatus();
-}
-
-int QT7PlayerControl::volume() const
-{
- return m_session->volume();
-}
-
-bool QT7PlayerControl::isMuted() const
-{
- return m_session->isMuted();
-}
-
-bool QT7PlayerControl::isSeekable() const
-{
- return m_session->isSeekable();
-}
-
-QMediaTimeRange QT7PlayerControl::availablePlaybackRanges() const
-{
- return isSeekable() ? QMediaTimeRange(0, duration()) : QMediaTimeRange();
-}
-
-qreal QT7PlayerControl::playbackRate() const
-{
- return m_session->playbackRate();
-}
-
-void QT7PlayerControl::setPlaybackRate(qreal rate)
-{
- m_session->setPlaybackRate(rate);
-}
-
-void QT7PlayerControl::setPosition(qint64 pos)
-{
- m_session->setPosition(pos);
-}
-
-void QT7PlayerControl::play()
-{
- m_session->play();
-}
-
-void QT7PlayerControl::pause()
-{
- m_session->pause();
-}
-
-void QT7PlayerControl::stop()
-{
- m_session->stop();
-}
-
-void QT7PlayerControl::setVolume(int volume)
-{
- m_session->setVolume(volume);
-}
-
-void QT7PlayerControl::setMuted(bool muted)
-{
- m_session->setMuted(muted);
-}
-
-QMediaContent QT7PlayerControl::media() const
-{
- return m_session->media();
-}
-
-const QIODevice *QT7PlayerControl::mediaStream() const
-{
- return m_session->mediaStream();
-}
-
-void QT7PlayerControl::setMedia(const QMediaContent &content, QIODevice *stream)
-{
- m_session->setMedia(content, stream);
-
- emit mediaChanged(content);
-}
-
-bool QT7PlayerControl::isAudioAvailable() const
-{
- return m_session->isAudioAvailable();
-}
-
-bool QT7PlayerControl::isVideoAvailable() const
-{
- return m_session->isVideoAvailable();
-}
-
-#include "moc_qt7playercontrol.cpp"
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.h b/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.h
deleted file mode 100644
index 8cbc29a..0000000
--- a/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QT7PLAYERMETADATACONTROL_H
-#define QT7PLAYERMETADATACONTROL_H
-
-#include <QtMediaServices/qmetadatacontrol.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QT7PlayerSession;
-
-class QT7PlayerMetaDataControl : public QMetaDataControl
-{
- Q_OBJECT
-public:
- QT7PlayerMetaDataControl(QT7PlayerSession *session, QObject *parent);
- virtual ~QT7PlayerMetaDataControl();
-
- bool isMetaDataAvailable() const;
- bool isWritable() const;
-
- QVariant metaData(QtMediaServices::MetaData key) const;
- void setMetaData(QtMediaServices::MetaData key, const QVariant &value);
- QList<QtMediaServices::MetaData> availableMetaData() const;
-
- QVariant extendedMetaData(const QString &key) const ;
- void setExtendedMetaData(const QString &key, const QVariant &value);
- QStringList availableExtendedMetaData() const;
-
-private slots:
- void updateTags();
-
-private:
- QT7PlayerSession *m_session;
- QMap<QtMediaServices::MetaData, QVariant> m_tags;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.mm b/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.mm
deleted file mode 100644
index 2ea778d..0000000
--- a/src/plugins/mediaservices/qt7/mediaplayer/qt7playermetadata.mm
+++ /dev/null
@@ -1,274 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qt7backend.h"
-#include "qt7playermetadata.h"
-#include "qt7playersession.h"
-#include <QtCore/qvarlengtharray.h>
-
-#import <QTKit/QTMovie.h>
-
-#ifdef QUICKTIME_C_API_AVAILABLE
- #include <QuickTime/QuickTime.h>
- #undef check // avoid name clash;
-#endif
-
-QT_BEGIN_NAMESPACE
-
-QT7PlayerMetaDataControl::QT7PlayerMetaDataControl(QT7PlayerSession *session, QObject *parent)
- :QMetaDataControl(parent), m_session(session)
-{
-}
-
-QT7PlayerMetaDataControl::~QT7PlayerMetaDataControl()
-{
-}
-
-bool QT7PlayerMetaDataControl::isMetaDataAvailable() const
-{
- return !m_tags.isEmpty();
-}
-
-bool QT7PlayerMetaDataControl::isWritable() const
-{
- return false;
-}
-
-QVariant QT7PlayerMetaDataControl::metaData(QtMediaServices::MetaData key) const
-{
- return m_tags.value(key);
-}
-
-void QT7PlayerMetaDataControl::setMetaData(QtMediaServices::MetaData key, QVariant const &value)
-{
- Q_UNUSED(key);
- Q_UNUSED(value);
-}
-
-QList<QtMediaServices::MetaData> QT7PlayerMetaDataControl::availableMetaData() const
-{
- return m_tags.keys();
-}
-
-QVariant QT7PlayerMetaDataControl::extendedMetaData(const QString &key) const
-{
- Q_UNUSED(key);
- return QVariant();
-}
-
-void QT7PlayerMetaDataControl::setExtendedMetaData(const QString &key, QVariant const &value)
-{
- Q_UNUSED(key);
- Q_UNUSED(value);
-}
-
-QStringList QT7PlayerMetaDataControl::availableExtendedMetaData() const
-{
- return QStringList();
-}
-
-#ifdef QUICKTIME_C_API_AVAILABLE
-
-static QString stripCopyRightSymbol(const QString &key)
-{
- return key.right(key.length()-1);
-}
-
-static QString convertQuickTimeKeyToUserKey(const QString &key)
-{
- if (key == QLatin1String("com.apple.quicktime.displayname"))
- return QLatin1String("nam");
- else if (key == QLatin1String("com.apple.quicktime.album"))
- return QLatin1String("alb");
- else if (key == QLatin1String("com.apple.quicktime.artist"))
- return QLatin1String("ART");
- else
- return QLatin1String("???");
-}
-
-static OSStatus readMetaValue(QTMetaDataRef metaDataRef, QTMetaDataItem item, QTPropertyClass propClass,
- QTPropertyID id, QTPropertyValuePtr *value, ByteCount *size)
-{
- QTPropertyValueType type;
- ByteCount propSize;
- UInt32 propFlags;
- OSStatus err = QTMetaDataGetItemPropertyInfo(metaDataRef, item, propClass, id, &type, &propSize, &propFlags);
-
- if (err == noErr) {
- *value = malloc(propSize);
- if (*value != 0) {
- err = QTMetaDataGetItemProperty(metaDataRef, item, propClass, id, propSize, *value, size);
-
- if (err == noErr && (type == 'code' || type == 'itsk' || type == 'itlk')) {
- // convert from native endian to big endian
- OSTypePtr pType = (OSTypePtr)*value;
- *pType = EndianU32_NtoB(*pType);
- }
- }
- else
- return -1;
- }
-
- return err;
-}
-
-static UInt32 getMetaType(QTMetaDataRef metaDataRef, QTMetaDataItem item)
-{
- QTPropertyValuePtr value = 0;
- ByteCount ignore = 0;
- OSStatus err = readMetaValue(
- metaDataRef, item, kPropertyClass_MetaDataItem, kQTMetaDataItemPropertyID_DataType, &value, &ignore);
-
- if (err == noErr) {
- UInt32 type = *((UInt32 *) value);
- if (value)
- free(value);
- return type;
- }
-
- return 0;
-}
-
-static QString cFStringToQString(CFStringRef str)
-{
- if(!str)
- return QString();
- CFIndex length = CFStringGetLength(str);
- const UniChar *chars = CFStringGetCharactersPtr(str);
- if (chars)
- return QString(reinterpret_cast<const QChar *>(chars), length);
-
- QVarLengthArray<UniChar> buffer(length);
- CFStringGetCharacters(str, CFRangeMake(0, length), buffer.data());
- return QString(reinterpret_cast<const QChar *>(buffer.constData()), length);
-}
-
-
-static QString getMetaValue(QTMetaDataRef metaDataRef, QTMetaDataItem item, SInt32 id)
-{
- QTPropertyValuePtr value = 0;
- ByteCount size = 0;
- OSStatus err = readMetaValue(metaDataRef, item, kPropertyClass_MetaDataItem, id, &value, &size);
- QString string;
-
- if (err == noErr) {
- UInt32 dataType = getMetaType(metaDataRef, item);
- switch (dataType){
- case kQTMetaDataTypeUTF8:
- case kQTMetaDataTypeMacEncodedText:
- string = cFStringToQString(CFStringCreateWithBytes(0, (UInt8*)value, size, kCFStringEncodingUTF8, false));
- break;
- case kQTMetaDataTypeUTF16BE:
- string = cFStringToQString(CFStringCreateWithBytes(0, (UInt8*)value, size, kCFStringEncodingUTF16BE, false));
- break;
- default:
- break;
- }
-
- if (value)
- free(value);
- }
-
- return string;
-}
-
-
-static void readFormattedData(QTMetaDataRef metaDataRef, OSType format, QMultiMap<QString, QString> &result)
-{
- QTMetaDataItem item = kQTMetaDataItemUninitialized;
- OSStatus err = QTMetaDataGetNextItem(metaDataRef, format, item, kQTMetaDataKeyFormatWildcard, 0, 0, &item);
- while (err == noErr){
- QString key = getMetaValue(metaDataRef, item, kQTMetaDataItemPropertyID_Key);
- if (format == kQTMetaDataStorageFormatQuickTime)
- key = convertQuickTimeKeyToUserKey(key);
- else
- key = stripCopyRightSymbol(key);
-
- if (!result.contains(key)){
- QString val = getMetaValue(metaDataRef, item, kQTMetaDataItemPropertyID_Value);
- result.insert(key, val);
- }
- err = QTMetaDataGetNextItem(metaDataRef, format, item, kQTMetaDataKeyFormatWildcard, 0, 0, &item);
- }
-}
-#endif
-
-
-void QT7PlayerMetaDataControl::updateTags()
-{
- bool wasEmpty = m_tags.isEmpty();
- m_tags.clear();
-
- QTMovie *movie = (QTMovie*)m_session->movie();
-
- if (movie) {
- QMultiMap<QString, QString> metaMap;
-
-#ifdef QUICKTIME_C_API_AVAILABLE
- QTMetaDataRef metaDataRef;
- OSStatus err = QTCopyMovieMetaData([movie quickTimeMovie], &metaDataRef);
- if (err == noErr) {
- readFormattedData(metaDataRef, kQTMetaDataStorageFormatUserData, metaMap);
- readFormattedData(metaDataRef, kQTMetaDataStorageFormatQuickTime, metaMap);
- readFormattedData(metaDataRef, kQTMetaDataStorageFormatiTunes, metaMap);
- }
-#else
- AutoReleasePool pool;
- NSString *name = [movie attributeForKey:@"QTMovieDisplayNameAttribute"];
- metaMap.insert(QLatin1String("nam"), QString::fromUtf8([name UTF8String]));
-#endif // QUICKTIME_C_API_AVAILABLE
-
- m_tags.insert(QtMediaServices::AlbumArtist, metaMap.value(QLatin1String("ART")));
- m_tags.insert(QtMediaServices::AlbumTitle, metaMap.value(QLatin1String("alb")));
- m_tags.insert(QtMediaServices::Title, metaMap.value(QLatin1String("nam")));
- m_tags.insert(QtMediaServices::Date, metaMap.value(QLatin1String("day")));
- m_tags.insert(QtMediaServices::Genre, metaMap.value(QLatin1String("gnre")));
- m_tags.insert(QtMediaServices::TrackNumber, metaMap.value(QLatin1String("trk")));
- m_tags.insert(QtMediaServices::Description, metaMap.value(QLatin1String("des")));
- }
-
- if (!wasEmpty || !m_tags.isEmpty())
- emit metaDataChanged();
-}
-
-QT_END_NAMESPACE
-
-#include "moc_qt7playermetadata.cpp"
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.h b/src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.h
deleted file mode 100644
index 9a22c31..0000000
--- a/src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QT7PLAYERSERVICE_H
-#define QT7PLAYERSERVICE_H
-
-#include <QtCore/qobject.h>
-#include <QtMediaServices/qmediaservice.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QMediaMetaData;
-class QMediaPlayerControl;
-class QMediaPlaylist;
-class QMediaPlaylistNavigator;
-class QT7PlayerControl;
-class QT7PlayerMetaDataControl;
-class QT7VideoOutputControl;
-class QT7VideoWindowControl;
-class QT7VideoWidgetControl;
-class QT7VideoRendererControl;
-class QT7VideoOutput;
-class QT7PlayerSession;
-
-class QT7PlayerService : public QMediaService
-{
-Q_OBJECT
-public:
- QT7PlayerService(QObject *parent = 0);
- ~QT7PlayerService();
-
- QMediaControl *control(const char *name) const;
-
-private slots:
- void updateVideoOutput();
-
-private:
- QT7PlayerSession *m_session;
- QT7PlayerControl *m_control;
- QT7VideoOutputControl *m_videoOutputControl;
- QT7VideoWindowControl *m_videoWidnowControl;
- QT7VideoWidgetControl *m_videoWidgetControl;
- QT7VideoRendererControl *m_videoRendererControl;
- QT7PlayerMetaDataControl *m_playerMetaDataControl;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.mm b/src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.mm
deleted file mode 100644
index cf79622..0000000
--- a/src/plugins/mediaservices/qt7/mediaplayer/qt7playerservice.mm
+++ /dev/null
@@ -1,152 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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/qvariant.h>
-#include <QtCore/qdebug.h>
-#include <QtGui/qwidget.h>
-
-#include "qt7backend.h"
-#include "qt7playerservice.h"
-#include "qt7playercontrol.h"
-#include "qt7playersession.h"
-#include "qt7videooutputcontrol.h"
-#include "qt7movieviewoutput.h"
-#include "qt7movieviewrenderer.h"
-#include "qt7movierenderer.h"
-#include "qt7movievideowidget.h"
-#include "qt7playermetadata.h"
-
-#include <QtMediaServices/qmediaplaylistnavigator.h>
-#include <QtMediaServices/qmediaplaylist.h>
-
-QT_BEGIN_NAMESPACE
-
-QT7PlayerService::QT7PlayerService(QObject *parent):
- QMediaService(parent)
-{
- m_session = new QT7PlayerSession(this);
-
- m_control = new QT7PlayerControl(this);
- m_control->setSession(m_session);
-
- m_playerMetaDataControl = new QT7PlayerMetaDataControl(m_session, this);
- connect(m_control, SIGNAL(mediaChanged(QMediaContent)), m_playerMetaDataControl, SLOT(updateTags()));
-
- m_videoOutputControl = new QT7VideoOutputControl(this);
-
- m_videoWidnowControl = 0;
- m_videoWidgetControl = 0;
- m_videoRendererControl = 0;
-
-#if defined(QT_MAC_USE_COCOA)
- m_videoWidnowControl = new QT7MovieViewOutput(this);
- m_videoOutputControl->enableOutput(QVideoOutputControl::WindowOutput);
-// qDebug() << "Using cocoa";
-#endif
-
-#ifdef QUICKTIME_C_API_AVAILABLE
- m_videoRendererControl = new QT7MovieRenderer(this);
- m_videoOutputControl->enableOutput(QVideoOutputControl::RendererOutput);
-
- m_videoWidgetControl = new QT7MovieVideoWidget(this);
- m_videoOutputControl->enableOutput(QVideoOutputControl::WidgetOutput);
-// qDebug() << "QuickTime C API is available";
-#else
- m_videoRendererControl = new QT7MovieViewRenderer(this);
- m_videoOutputControl->enableOutput(QVideoOutputControl::RendererOutput);
-// qDebug() << "QuickTime C API is not available";
-#endif
-
-
- connect(m_videoOutputControl, SIGNAL(videoOutputChanged(QVideoOutputControl::Output)),
- this, SLOT(updateVideoOutput()));
-}
-
-QT7PlayerService::~QT7PlayerService()
-{
- m_session->setVideoOutput(0);
-}
-
-QMediaControl *QT7PlayerService::control(const char *name) const
-{
- if (qstrcmp(name, QMediaPlayerControl_iid) == 0)
- return m_control;
-
- if (qstrcmp(name, QVideoOutputControl_iid) == 0)
- return m_videoOutputControl;
-
- if (qstrcmp(name, QVideoWindowControl_iid) == 0)
- return m_videoWidnowControl;
-
- if (qstrcmp(name, QVideoRendererControl_iid) == 0)
- return m_videoRendererControl;
-
- if (qstrcmp(name, QVideoWidgetControl_iid) == 0)
- return m_videoWidgetControl;
-
- if (qstrcmp(name, QMetaDataControl_iid) == 0)
- return m_playerMetaDataControl;
-
- return 0;
-}
-
-void QT7PlayerService::updateVideoOutput()
-{
-// qDebug() << "QT7PlayerService::updateVideoOutput" << m_videoOutputControl->output();
-
- switch (m_videoOutputControl->output()) {
- case QVideoOutputControl::WindowOutput:
- m_session->setVideoOutput(m_videoWidnowControl);
- break;
- case QVideoOutputControl::RendererOutput:
- m_session->setVideoOutput(m_videoRendererControl);
- break;
- case QVideoOutputControl::WidgetOutput:
- m_session->setVideoOutput(m_videoWidgetControl);
- break;
- default:
- m_session->setVideoOutput(0);
- }
-}
-
-QT_END_NAMESPACE
-
-#include "moc_qt7playerservice.cpp"
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.h b/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.h
deleted file mode 100644
index 2450cf8..0000000
--- a/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QT7PLAYERSESSION_H
-#define QT7PLAYERSESSION_H
-
-#include <QtCore/qobject.h>
-#include <QtGui/qmacdefines_mac.h>
-
-#include <QtMediaServices/qmediaplayercontrol.h>
-#include <QtMediaServices/qmediaplayer.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QT7PlayerControl;
-class QMediaPlaylist;
-class QMediaPlaylistNavigator;
-class QT7VideoOutput;
-class QT7PlayerSession;
-class QT7PlayerService;
-
-class QT7PlayerSession : public QObject
-{
-Q_OBJECT
-public:
- QT7PlayerSession(QObject *parent = 0);
- ~QT7PlayerSession();
-
- void *movie() const;
-
- void setControl(QT7PlayerControl *control);
- void setVideoOutput(QT7VideoOutput *output);
-
- QMediaPlayer::State state() const;
- QMediaPlayer::MediaStatus mediaStatus() const;
-
- QMediaContent media() const;
- const QIODevice *mediaStream() const;
- void setMedia(const QMediaContent &content, QIODevice *stream);
-
- qint64 position() const;
- qint64 duration() const;
-
- int bufferStatus() const;
-
- int volume() const;
- bool isMuted() const;
-
- bool isAudioAvailable() const;
- bool isVideoAvailable() const;
-
- bool isSeekable() const;
-
- qreal playbackRate() const;
-
-public slots:
- void setPlaybackRate(qreal rate);
-
- void setPosition(qint64 pos);
-
- void play();
- void pause();
- void stop();
-
- void setVolume(int volume);
- void setMuted(bool muted);
-
- void processEOS();
- void processLoadStateChange();
- void processVolumeChange();
- void processNaturalSizeChange();
-
-signals:
- void positionChanged(qint64 position);
- void durationChanged(qint64 duration);
- void stateChanged(QMediaPlayer::State newState);
- void mediaStatusChanged(QMediaPlayer::MediaStatus status);
- void volumeChanged(int volume);
- void mutedChanged(bool muted);
- void audioAvailableChanged(bool audioAvailable);
- void videoAvailableChanged(bool videoAvailable);
- void error(int error, const QString &errorString);
-
-private:
- void *m_QTMovie;
- void *m_movieObserver;
-
- QMediaPlayer::State m_state;
- QMediaPlayer::MediaStatus m_mediaStatus;
- QIODevice *m_mediaStream;
- QMediaContent m_resources;
-
- QT7VideoOutput *m_videoOutput;
-
- mutable qint64 m_currentTime;
-
- bool m_muted;
- int m_volume;
- qreal m_rate;
-
- qint64 m_duration;
- bool m_videoAvailable;
- bool m_audioAvailable;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm b/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm
deleted file mode 100644
index 0405bbd..0000000
--- a/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm
+++ /dev/null
@@ -1,552 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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$
-**
-****************************************************************************/
-
-#import <QTKit/QTDataReference.h>
-#import <QTKit/QTMovie.h>
-
-#include "qt7backend.h"
-
-#include "qt7playersession.h"
-#include "qt7playercontrol.h"
-#include "qt7videooutputcontrol.h"
-
-#include <QtNetwork/qnetworkcookie.h>
-#include <QtMediaServices/qmediaplaylistnavigator.h>
-
-#include <CoreFoundation/CoreFoundation.h>
-#include <Foundation/Foundation.h>
-
-#include <QtCore/qdatetime.h>
-#include <QtCore/qurl.h>
-#include <QtCore/qdebug.h>
-
-@interface QTMovieObserver : NSObject
-{
-@private
- QT7PlayerSession *m_session;
- QTMovie *m_movie;
-}
-
-- (QTMovieObserver *) initWithPlayerSession:(QT7PlayerSession*)session;
-- (void) setMovie:(QTMovie *)movie;
-- (void) processEOS:(NSNotification *)notification;
-- (void) processLoadStateChange:(NSNotification *)notification;
-- (void) processVolumeChange:(NSNotification *)notification;
-- (void) processNaturalSizeChange :(NSNotification *)notification;
-@end
-
-@implementation QTMovieObserver
-
-- (QTMovieObserver *) initWithPlayerSession:(QT7PlayerSession*)session
-{
- if (!(self = [super init]))
- return nil;
-
- self->m_session = session;
- return self;
-}
-
-- (void) setMovie:(QTMovie *)movie
-{
- if (m_movie == movie)
- return;
-
- if (m_movie) {
- [[NSNotificationCenter defaultCenter] removeObserver:self];
- [m_movie release];
- }
-
- m_movie = movie;
-
- if (movie) {
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(processEOS:)
- name:QTMovieDidEndNotification
- object:m_movie];
-
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(processLoadStateChange:)
- name:QTMovieLoadStateDidChangeNotification
- object:m_movie];
-
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(processVolumeChange:)
- name:QTMovieVolumeDidChangeNotification
- object:m_movie];
-
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(processNaturalSizeChange:)
- name:
-#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6)
- QTMovieNaturalSizeDidChangeNotification
-#else
- QTMovieEditedNotification
-#endif
- object:m_movie];
- [movie retain];
- }
-}
-
-- (void) processEOS:(NSNotification *)notification
-{
- Q_UNUSED(notification);
- QMetaObject::invokeMethod(m_session, "processEOS", Qt::AutoConnection);
-}
-
-- (void) processLoadStateChange:(NSNotification *)notification
-{
- Q_UNUSED(notification);
- QMetaObject::invokeMethod(m_session, "processLoadStateChange", Qt::AutoConnection);
-}
-
-- (void) processVolumeChange:(NSNotification *)notification
-{
- Q_UNUSED(notification);
- QMetaObject::invokeMethod(m_session, "processVolumeChange", Qt::AutoConnection);
-}
-
-- (void) processNaturalSizeChange :(NSNotification *)notification
-{
- Q_UNUSED(notification);
- QMetaObject::invokeMethod(m_session, "processNaturalSizeChange", Qt::AutoConnection);
-}
-
-@end
-
-QT_BEGIN_NAMESPACE
-
-static inline NSString *qString2CFStringRef(const QString &string)
-{
- return [NSString stringWithCharacters:reinterpret_cast<const UniChar *>(string.unicode()) length:string.length()];
-}
-
-QT7PlayerSession::QT7PlayerSession(QObject *parent)
- : QObject(parent)
- , m_QTMovie(0)
- , m_state(QMediaPlayer::StoppedState)
- , m_mediaStatus(QMediaPlayer::NoMedia)
- , m_mediaStream(0)
- , m_videoOutput(0)
- , m_muted(false)
- , m_volume(100)
- , m_rate(1.0)
- , m_duration(0)
- , m_videoAvailable(false)
- , m_audioAvailable(false)
-{
- m_movieObserver = [[QTMovieObserver alloc] initWithPlayerSession:this];
-}
-
-QT7PlayerSession::~QT7PlayerSession()
-{
- [(QTMovieObserver*)m_movieObserver setMovie:nil];
- [(QTMovieObserver*)m_movieObserver release];
- [(QTMovie*)m_QTMovie release];
-}
-
-void *QT7PlayerSession::movie() const
-{
- return m_QTMovie;
-}
-
-void QT7PlayerSession::setVideoOutput(QT7VideoOutput *output)
-{
- if (m_videoOutput == output)
- return;
-
- if (m_videoOutput)
- m_videoOutput->setMovie(0);
-
- m_videoOutput = output;
-
- if (m_videoOutput && m_state != QMediaPlayer::StoppedState)
- m_videoOutput->setMovie(m_QTMovie);
-}
-
-
-qint64 QT7PlayerSession::position() const
-{
- if (!m_QTMovie || m_state == QMediaPlayer::PausedState)
- return m_currentTime;
-
- AutoReleasePool pool;
-
- QTTime qtTime = [(QTMovie*)m_QTMovie currentTime];
- quint64 t = static_cast<quint64>(float(qtTime.timeValue) / float(qtTime.timeScale) * 1000.0f);
- m_currentTime = t;
-
- return m_currentTime;
-}
-
-qint64 QT7PlayerSession::duration() const
-{
- if (!m_QTMovie)
- return 0;
-
- AutoReleasePool pool;
-
- QTTime qtTime = [(QTMovie*)m_QTMovie duration];
-
- return static_cast<quint64>(float(qtTime.timeValue) / float(qtTime.timeScale) * 1000.0f);
-}
-
-QMediaPlayer::State QT7PlayerSession::state() const
-{
- return m_state;
-}
-
-QMediaPlayer::MediaStatus QT7PlayerSession::mediaStatus() const
-{
- return m_mediaStatus;
-}
-
-int QT7PlayerSession::bufferStatus() const
-{
- return 100;
-}
-
-int QT7PlayerSession::volume() const
-{
- return m_volume;
-}
-
-bool QT7PlayerSession::isMuted() const
-{
- return m_muted;
-}
-
-bool QT7PlayerSession::isSeekable() const
-{
- return true;
-}
-
-qreal QT7PlayerSession::playbackRate() const
-{
- return m_rate;
-}
-
-void QT7PlayerSession::setPlaybackRate(qreal rate)
-{
- if (qFuzzyCompare(m_rate, rate))
- return;
-
- m_rate = rate;
-
- if (m_QTMovie && m_state == QMediaPlayer::PlayingState) {
- float preferredRate = [[(QTMovie*)m_QTMovie attributeForKey:@"QTMoviePreferredRateAttribute"] floatValue];
- [(QTMovie*)m_QTMovie setRate:preferredRate*m_rate];
- }
-}
-
-void QT7PlayerSession::setPosition(qint64 pos)
-{
- if ( !isSeekable() || pos == position())
- return;
-
- AutoReleasePool pool;
-
- pos = qMin(pos, duration());
-
- QTTime newQTTime = [(QTMovie*)m_QTMovie currentTime];
- newQTTime.timeValue = (pos / 1000.0f) * newQTTime.timeScale;
- [(QTMovie*)m_QTMovie setCurrentTime:newQTTime];
-}
-
-void QT7PlayerSession::play()
-{
- if (m_videoOutput)
- m_videoOutput->setMovie(m_QTMovie);
-
- float preferredRate = [[(QTMovie*)m_QTMovie attributeForKey:@"QTMoviePreferredRateAttribute"] floatValue];
- [(QTMovie*)m_QTMovie setRate:preferredRate*m_rate];
-
- if (m_state != QMediaPlayer::PlayingState)
- emit stateChanged(m_state = QMediaPlayer::PlayingState);
-}
-
-void QT7PlayerSession::pause()
-{
- if (m_videoOutput)
- m_videoOutput->setMovie(m_QTMovie);
-
- m_state = QMediaPlayer::PausedState;
-
- [(QTMovie*)m_QTMovie setRate:0];
-
- emit stateChanged(m_state);
-}
-
-void QT7PlayerSession::stop()
-{
- m_state = QMediaPlayer::StoppedState;
-
- [(QTMovie*)m_QTMovie setRate:0];
- setPosition(0);
-
- if (m_videoOutput)
- m_videoOutput->setMovie(0);
-
- if (m_state == QMediaPlayer::StoppedState)
- emit stateChanged(m_state);
-}
-
-void QT7PlayerSession::setVolume(int volume)
-{
- if (m_QTMovie) {
- m_volume = volume;
- [(QTMovie*)m_QTMovie setVolume:(volume/100.0f)];
- }
-}
-
-void QT7PlayerSession::setMuted(bool muted)
-{
- if (m_muted != muted) {
- m_muted = muted;
-
- if (m_QTMovie)
- [(QTMovie*)m_QTMovie setMuted:m_muted];
-
- emit mutedChanged(muted);
- }
-}
-
-QMediaContent QT7PlayerSession::media() const
-{
- return m_resources;
-}
-
-const QIODevice *QT7PlayerSession::mediaStream() const
-{
- return m_mediaStream;
-}
-
-void QT7PlayerSession::setMedia(const QMediaContent &content, QIODevice *stream)
-{
- AutoReleasePool pool;
-
- if (m_QTMovie) {
- [(QTMovieObserver*)m_movieObserver setMovie:nil];
-
- if (m_videoOutput)
- m_videoOutput->setMovie(0);
-
- [(QTMovie*)m_QTMovie release];
- m_QTMovie = 0;
- }
-
- m_resources = content;
- m_mediaStream = stream;
- m_mediaStatus = QMediaPlayer::NoMedia;
-
- QNetworkRequest request;
-
- if (!content.isNull())
- request = content.canonicalResource().request();
- else
- return;
-
- QVariant cookies = request.header(QNetworkRequest::CookieHeader);
- if (cookies.isValid()) {
- NSHTTPCookieStorage *store = [NSHTTPCookieStorage sharedHTTPCookieStorage];
- QList<QNetworkCookie> cookieList = cookies.value<QList<QNetworkCookie> >();
-
- foreach (const QNetworkCookie &requestCookie, cookieList) {
- NSMutableDictionary *p = [NSMutableDictionary dictionaryWithObjectsAndKeys:
- qString2CFStringRef(requestCookie.name()), NSHTTPCookieName,
- qString2CFStringRef(requestCookie.value()), NSHTTPCookieValue,
- qString2CFStringRef(requestCookie.domain()), NSHTTPCookieDomain,
- qString2CFStringRef(requestCookie.path()), NSHTTPCookiePath,
- nil
- ];
- if (requestCookie.isSessionCookie())
- [p setObject:[NSString stringWithUTF8String:"TRUE"] forKey:NSHTTPCookieDiscard];
- else
- [p setObject:[NSDate dateWithTimeIntervalSince1970:requestCookie.expirationDate().toTime_t()] forKey:NSHTTPCookieExpires];
-
- [store setCookie:[NSHTTPCookie cookieWithProperties:p]];
- }
- }
-
- NSError *err = 0;
- NSString *urlString = qString2CFStringRef(request.url().toString());
-
- NSDictionary *attr = [NSDictionary dictionaryWithObjectsAndKeys:
- [NSURL URLWithString:urlString], QTMovieURLAttribute,
- [NSNumber numberWithBool:YES], QTMovieOpenAsyncOKAttribute,
- [NSNumber numberWithBool:YES], QTMovieIsActiveAttribute,
- [NSNumber numberWithBool:YES], QTMovieResolveDataRefsAttribute,
- [NSNumber numberWithBool:YES], QTMovieDontInteractWithUserAttribute,
- nil];
-
- m_QTMovie = [[QTMovie movieWithAttributes:attr error:&err] retain];
-
- if (err) {
- [(QTMovie*)m_QTMovie release];
- m_QTMovie = 0;
- QString description = QString::fromUtf8([[err localizedDescription] UTF8String]);
-
- emit error(QMediaPlayer::FormatError, description );
- } else {
- [(QTMovieObserver*)m_movieObserver setMovie:(QTMovie*)m_QTMovie];
-
- if (m_videoOutput && m_state != QMediaPlayer::StoppedState)
- m_videoOutput->setMovie(m_QTMovie);
-
- processLoadStateChange();
-
- [(QTMovie*)m_QTMovie setMuted:m_muted];
- setVolume(m_volume);
- }
-}
-
-bool QT7PlayerSession::isAudioAvailable() const
-{
- if (!m_QTMovie)
- return false;
-
- AutoReleasePool pool;
- return [[(QTMovie*)m_QTMovie attributeForKey:@"QTMovieHasAudioAttribute"] boolValue] == YES;
-}
-
-bool QT7PlayerSession::isVideoAvailable() const
-{
- if (!m_QTMovie)
- return false;
-
- AutoReleasePool pool;
- return [[(QTMovie*)m_QTMovie attributeForKey:@"QTMovieHasVideoAttribute"] boolValue] == YES;
-}
-
-void QT7PlayerSession::processEOS()
-{
- m_mediaStatus = QMediaPlayer::EndOfMedia;
- if (m_videoOutput)
- m_videoOutput->setMovie(0);
- emit stateChanged(m_state = QMediaPlayer::StoppedState);
- emit mediaStatusChanged(m_mediaStatus);
-}
-
-void QT7PlayerSession::processLoadStateChange()
-{
- if (!m_QTMovie)
- return;
-
- signed long state = [[(QTMovie*)m_QTMovie attributeForKey:QTMovieLoadStateAttribute]
- longValue];
-// qDebug() << "Moview load state changed:" << state;
-
-#ifndef QUICKTIME_C_API_AVAILABLE
- enum {
- kMovieLoadStateError = -1L,
- kMovieLoadStateLoading = 1000,
- kMovieLoadStateLoaded = 2000,
- kMovieLoadStatePlayable = 10000,
- kMovieLoadStatePlaythroughOK = 20000,
- kMovieLoadStateComplete = 100000
- };
-#endif
-
- QMediaPlayer::MediaStatus newStatus = QMediaPlayer::NoMedia;
- bool isPlaying = (m_state != QMediaPlayer::StoppedState);
-
- if (state >= kMovieLoadStateComplete) {
- newStatus = isPlaying ? QMediaPlayer::BufferedMedia : QMediaPlayer::LoadedMedia;
- } else if (state >= kMovieLoadStatePlayable)
- newStatus = isPlaying ? QMediaPlayer::BufferingMedia : QMediaPlayer::LoadingMedia;
- else if (state >= kMovieLoadStateLoading)
- newStatus = isPlaying ? QMediaPlayer::StalledMedia : QMediaPlayer::LoadingMedia;
-
- if (state == kMovieLoadStateError) {
- newStatus = QMediaPlayer::InvalidMedia;
- if (m_videoOutput)
- m_videoOutput->setMovie(0);
-
- emit error(QMediaPlayer::FormatError, tr("Failed to load media"));
- emit stateChanged(m_state = QMediaPlayer::StoppedState);
- }
-
- if (state >= kMovieLoadStatePlayable &&
- m_state == QMediaPlayer::PlayingState &&
- [(QTMovie*)m_QTMovie rate] == 0) {
- QMetaObject::invokeMethod(this, "play", Qt::QueuedConnection);
- }
-
- if (state >= kMovieLoadStateLoaded) {
- qint64 currentDuration = duration();
- if (m_duration != currentDuration)
- emit durationChanged(m_duration = currentDuration);
-
- if (m_audioAvailable != isAudioAvailable())
- emit audioAvailableChanged(m_audioAvailable = !m_audioAvailable);
-
- if (m_videoAvailable != isVideoAvailable())
- emit videoAvailableChanged(m_videoAvailable = !m_videoAvailable);
- }
-
- if (newStatus != m_mediaStatus)
- emit mediaStatusChanged(m_mediaStatus = newStatus);
-}
-
-void QT7PlayerSession::processVolumeChange()
-{
- if (!m_QTMovie)
- return;
-
- int newVolume = qRound(100.0f*[((QTMovie*)m_QTMovie) volume]);
-
- if (newVolume != m_volume) {
- emit volumeChanged(m_volume = newVolume);
- }
-}
-
-void QT7PlayerSession::processNaturalSizeChange()
-{
- if (m_videoOutput) {
- NSSize size = [[(QTMovie*)m_QTMovie attributeForKey:@"QTMovieNaturalSizeAttribute"] sizeValue];
-// qDebug() << "Native size changed:" << QSize(size.width, size.height);
- m_videoOutput->updateNaturalSize(QSize(size.width, size.height));
- }
-}
-
-#include "moc_qt7playersession.cpp"
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/qt7/qcvdisplaylink.h b/src/plugins/mediaservices/qt7/qcvdisplaylink.h
deleted file mode 100644
index 5a1180d..0000000
--- a/src/plugins/mediaservices/qt7/qcvdisplaylink.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QCVDISPLAYLINK_H
-#define QCVDISPLAYLINK_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qmutex.h>
-
-#include <QuartzCore/CVDisplayLink.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QCvDisplayLink : public QObject
-{
-Q_OBJECT
-public:
- QCvDisplayLink(QObject *parent = 0);
- virtual ~QCvDisplayLink();
-
- bool isValid();
- bool isActive() const;
-
-public slots:
- void start();
- void stop();
-
-signals:
- void tick(const CVTimeStamp &ts);
-
-public:
- void displayLinkEvent(const CVTimeStamp *);
-
-protected:
- virtual bool event(QEvent *);
-
-private:
- CVDisplayLinkRef m_displayLink;
- QMutex m_displayLinkMutex;
- bool m_pendingDisplayLinkEvent;
- bool m_isActive;
- CVTimeStamp m_frameTimeStamp;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
-
diff --git a/src/plugins/mediaservices/qt7/qcvdisplaylink.mm b/src/plugins/mediaservices/qt7/qcvdisplaylink.mm
deleted file mode 100644
index 00b4dc5..0000000
--- a/src/plugins/mediaservices/qt7/qcvdisplaylink.mm
+++ /dev/null
@@ -1,158 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qcvdisplaylink.h"
-
-#include <QtCore/qcoreapplication.h>
-#include <QtCore/qdebug.h>
-
-QT_BEGIN_NAMESPACE
-
-static CVReturn CVDisplayLinkCallback(CVDisplayLinkRef displayLink,
- const CVTimeStamp *inNow,
- const CVTimeStamp *inOutputTime,
- CVOptionFlags flagsIn,
- CVOptionFlags *flagsOut,
- void *displayLinkContext)
-{
- Q_UNUSED(displayLink);
- Q_UNUSED(inNow);
- Q_UNUSED(flagsIn);
- Q_UNUSED(flagsOut);
-
- QCvDisplayLink *link = (QCvDisplayLink *)displayLinkContext;
-
- link->displayLinkEvent(inOutputTime);
- return kCVReturnSuccess;
-}
-
-
-QCvDisplayLink::QCvDisplayLink(QObject *parent)
- :QObject(parent),
- m_pendingDisplayLinkEvent(false),
- m_isActive(false)
-{
- // create display link for the main display
- CVDisplayLinkCreateWithCGDisplay(kCGDirectMainDisplay, &m_displayLink);
- if (m_displayLink) {
- // set the current display of a display link.
- CVDisplayLinkSetCurrentCGDisplay(m_displayLink, kCGDirectMainDisplay);
-
- // set the renderer output callback function
- CVDisplayLinkSetOutputCallback(m_displayLink, &CVDisplayLinkCallback, this);
- }
-}
-
-QCvDisplayLink::~QCvDisplayLink()
-{
- if (m_displayLink) {
- CVDisplayLinkStop(m_displayLink);
- CVDisplayLinkRelease(m_displayLink);
- m_displayLink = NULL;
- }
-}
-
-bool QCvDisplayLink::isValid()
-{
- return m_displayLink != 0;
-}
-
-bool QCvDisplayLink::isActive() const
-{
- return m_isActive;
-}
-
-void QCvDisplayLink::start()
-{
- if (m_displayLink && !m_isActive) {
- CVDisplayLinkStart(m_displayLink);
- m_isActive = true;
- }
-}
-
-void QCvDisplayLink::stop()
-{
- if (m_displayLink && m_isActive) {
- CVDisplayLinkStop(m_displayLink);
- m_isActive = false;
- }
-}
-
-void QCvDisplayLink::displayLinkEvent(const CVTimeStamp *ts)
-{
- // This function is called from a
- // thread != gui thread. So we post the event.
- // But we need to make sure that we don't post faster
- // than the event loop can eat:
- m_displayLinkMutex.lock();
- bool pending = m_pendingDisplayLinkEvent;
- m_pendingDisplayLinkEvent = true;
- m_frameTimeStamp = *ts;
- m_displayLinkMutex.unlock();
-
- if (!pending)
- qApp->postEvent(this, new QEvent(QEvent::User), Qt::HighEventPriority);
-}
-
-bool QCvDisplayLink::event(QEvent *event)
-{
- switch (event->type()){
- case QEvent::User: {
- m_displayLinkMutex.lock();
- m_pendingDisplayLinkEvent = false;
- CVTimeStamp ts = m_frameTimeStamp;
- m_displayLinkMutex.unlock();
-
- emit tick(ts);
-
- return false;
- }
- break;
- default:
- break;
- }
- return QObject::event(event);
-}
-
-QT_END_NAMESPACE
-
-#include "moc_qcvdisplaylink.cpp"
-
diff --git a/src/plugins/mediaservices/qt7/qt7.pro b/src/plugins/mediaservices/qt7/qt7.pro
deleted file mode 100644
index baac224..0000000
--- a/src/plugins/mediaservices/qt7/qt7.pro
+++ /dev/null
@@ -1,47 +0,0 @@
-TARGET = qqt7
-include(../../qpluginbase.pri)
-
-QT += opengl mediaservices
-
-LIBS += -framework AppKit -framework AudioUnit \
- -framework AudioToolbox -framework CoreAudio \
- -framework QuartzCore -framework QTKit
-
-# The Quicktime framework is only awailable for 32-bit builds, so we
-# need to check for this before linking against it.
-# QMAKE_MAC_XARCH is not awailable on Tiger, but at the same time,
-# we never build for 64-bit architechtures on Tiger either:
-contains(QMAKE_MAC_XARCH, no) {
- LIBS += -framework QuickTime
-} else {
- LIBS += -Xarch_i386 -framework QuickTime -Xarch_ppc -framework QuickTime
-}
-
-HEADERS += \
- qt7backend.h \
- qt7videooutputcontrol.h \
- qt7movieviewoutput.h \
- qt7movievideowidget.h \
- qt7movieviewrenderer.h \
- qt7serviceplugin.h \
- qt7movierenderer.h \
- qt7ciimagevideobuffer.h \
- qcvdisplaylink.h
-
-OBJECTIVE_SOURCES += \
- qt7backend.mm \
- qt7serviceplugin.mm \
- qt7movieviewoutput.mm \
- qt7movievideowidget.mm \
- qt7movieviewrenderer.mm \
- qt7movierenderer.mm \
- qt7videooutputcontrol.mm \
- qt7ciimagevideobuffer.mm \
- qcvdisplaylink.mm
-
-include(mediaplayer/mediaplayer.pri)
-
-QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/mediaservices
-target.path = $$[QT_INSTALL_PLUGINS]/mediaservices
-INSTALLS += target
-
diff --git a/src/plugins/mediaservices/qt7/qt7backend.h b/src/plugins/mediaservices/qt7/qt7backend.h
deleted file mode 100644
index 5668965..0000000
--- a/src/plugins/mediaservices/qt7/qt7backend.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QT7BACKEND_H
-#define QT7BACKEND_H
-
-#include <QtCore/qstring.h>
-
-#ifndef Q_WS_MAC64
-#define QUICKTIME_C_API_AVAILABLE
-#endif
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class AutoReleasePool
-{
-private:
- void *pool;
-public:
- AutoReleasePool();
- ~AutoReleasePool();
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/qt7/qt7backend.mm b/src/plugins/mediaservices/qt7/qt7backend.mm
deleted file mode 100644
index 478589b..0000000
--- a/src/plugins/mediaservices/qt7/qt7backend.mm
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qt7backend.h"
-
-#import <Foundation/NSAutoreleasePool.h>
-#include <CoreFoundation/CFBase.h>
-
-
-QT_BEGIN_NAMESPACE
-
-AutoReleasePool::AutoReleasePool()
-{
- pool = (void*)[[NSAutoreleasePool alloc] init];
-}
-
-AutoReleasePool::~AutoReleasePool()
-{
- [(NSAutoreleasePool*)pool release];
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/qt7/qt7ciimagevideobuffer.h b/src/plugins/mediaservices/qt7/qt7ciimagevideobuffer.h
deleted file mode 100644
index 669724f..0000000
--- a/src/plugins/mediaservices/qt7/qt7ciimagevideobuffer.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QT7CIIMAGEVIDEOBUFFER_H
-#define QT7CIIMAGEVIDEOBUFFER_H
-
-#include "qt7backend.h"
-#import <QTKit/QTKit.h>
-
-#include <QtCore/qvariant.h>
-#include <QtMultimedia/qabstractvideobuffer.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_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QT7CIImageVideoBuffer : public QAbstractVideoBuffer
-{
-public:
- QT7CIImageVideoBuffer(CIImage *image);
-
- virtual ~QT7CIImageVideoBuffer();
-
- MapMode mapMode() const;
- uchar *map(MapMode mode, int *numBytes, int *bytesPerLine);
- void unmap();
- QVariant handle() const;
-
-private:
- CIImage *m_image;
- NSBitmapImageRep *m_buffer;
- MapMode m_mode;
-};
-
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/qt7/qt7ciimagevideobuffer.mm b/src/plugins/mediaservices/qt7/qt7ciimagevideobuffer.mm
deleted file mode 100644
index 7c02f9f..0000000
--- a/src/plugins/mediaservices/qt7/qt7ciimagevideobuffer.mm
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qt7ciimagevideobuffer.h"
-
-#include <QuartzCore/CIFilter.h>
-#include <QuartzCore/CIVector.h>
-
-QT7CIImageVideoBuffer::QT7CIImageVideoBuffer(CIImage *image)
- : QAbstractVideoBuffer(CoreImageHandle)
- , m_image(image)
- , m_buffer(0)
- , m_mode(NotMapped)
-{
- [m_image retain];
-}
-
-QT7CIImageVideoBuffer::~QT7CIImageVideoBuffer()
-{
- [m_image release];
- [m_buffer release];
-}
-
-QAbstractVideoBuffer::MapMode QT7CIImageVideoBuffer::mapMode() const
-{
- return m_mode;
-}
-
-uchar *QT7CIImageVideoBuffer::map(QAbstractVideoBuffer::MapMode mode, int *numBytes, int *bytesPerLine)
-{
- if (mode == NotMapped || m_mode != NotMapped || !m_image)
- return 0;
-
- if (!m_buffer) {
- //swap R and B channels
- CIFilter *colorSwapFilter = [CIFilter filterWithName: @"CIColorMatrix" keysAndValues:
- @"inputImage", m_image,
- @"inputRVector", [CIVector vectorWithX: 0 Y: 0 Z: 1 W: 0],
- @"inputGVector", [CIVector vectorWithX: 0 Y: 1 Z: 0 W: 0],
- @"inputBVector", [CIVector vectorWithX: 1 Y: 0 Z: 0 W: 0],
- @"inputAVector", [CIVector vectorWithX: 0 Y: 0 Z: 0 W: 1],
- @"inputBiasVector", [CIVector vectorWithX: 0 Y: 0 Z: 0 W: 0],
- nil];
- CIImage *img = [colorSwapFilter valueForKey: @"outputImage"];
-
- m_buffer = [[NSBitmapImageRep alloc] initWithCIImage:img];
- }
-
- if (numBytes)
- *numBytes = [m_buffer bytesPerPlane];
-
- if (bytesPerLine)
- *bytesPerLine = [m_buffer bytesPerRow];
-
- m_mode = mode;
-
- return [m_buffer bitmapData];
-}
-
-void QT7CIImageVideoBuffer::unmap()
-{
- m_mode = NotMapped;
-}
-
-QVariant QT7CIImageVideoBuffer::handle() const
-{
- return QVariant::fromValue<void*>(m_image);
-}
-
diff --git a/src/plugins/mediaservices/qt7/qt7movierenderer.h b/src/plugins/mediaservices/qt7/qt7movierenderer.h
deleted file mode 100644
index 5953b54..0000000
--- a/src/plugins/mediaservices/qt7/qt7movierenderer.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QT7MOVIERENDERER_H
-#define QT7MOVIERENDERER_H
-
-#include "qt7backend.h"
-
-#include <QtCore/qobject.h>
-#include <QtCore/qmutex.h>
-
-#include <qvideorenderercontrol.h>
-#include <qmediaplayer.h>
-
-#include <QtGui/qmacdefines_mac.h>
-#include "qt7videooutputcontrol.h"
-
-#include <QuartzCore/CVOpenGLTexture.h>
-#include <QuickTime/QuickTime.h>
-
-
-QT_BEGIN_HEADER
-
-class QGLContext;
-
-QT_BEGIN_NAMESPACE
-
-class QCvDisplayLink;
-class QT7PlayerSession;
-class QT7PlayerService;
-
-class QT7MovieRenderer : public QT7VideoRendererControl
-{
-Q_OBJECT
-public:
- QT7MovieRenderer(QObject *parent = 0);
- virtual ~QT7MovieRenderer();
-
- void setMovie(void *movie);
- void updateNaturalSize(const QSize &newSize);
-
- QAbstractVideoSurface *surface() const;
- void setSurface(QAbstractVideoSurface *surface);
-
- QSize nativeSize() const;
-
-private slots:
- void updateVideoFrame(const CVTimeStamp &ts);
-
-private:
- void setupVideoOutput();
- bool createPixelBufferVisualContext();
- bool createGLVisualContext();
-
- void *m_movie;
-
- QMutex m_mutex;
-
- QCvDisplayLink *m_displayLink;
-#ifdef QUICKTIME_C_API_AVAILABLE
- QTVisualContextRef m_visualContext;
- bool m_usingGLContext;
- const QGLContext *m_currentGLContext;
- QSize m_pixelBufferContextGeometry;
-#endif
- QAbstractVideoSurface *m_surface;
- QSize m_nativeSize;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/qt7/qt7movierenderer.mm b/src/plugins/mediaservices/qt7/qt7movierenderer.mm
deleted file mode 100644
index 95f5d4c..0000000
--- a/src/plugins/mediaservices/qt7/qt7movierenderer.mm
+++ /dev/null
@@ -1,465 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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$
-**
-****************************************************************************/
-
-#import <QTKit/QTKit.h>
-
-#include "qt7backend.h"
-
-#include "qt7playercontrol.h"
-#include "qt7movierenderer.h"
-#include "qt7playersession.h"
-#include "qt7ciimagevideobuffer.h"
-#include "qcvdisplaylink.h"
-#include <QtCore/qdebug.h>
-#include <QtCore/qcoreapplication.h>
-
-#include <QGLWidget>
-
-#include <QtMultimedia/qabstractvideobuffer.h>
-#include <QtMultimedia/qabstractvideosurface.h>
-#include <QtMultimedia/qvideosurfaceformat.h>
-
-QT_BEGIN_NAMESPACE
-
-//#define USE_MAIN_MONITOR_COLOR_SPACE 1
-
-class CVGLTextureVideoBuffer : public QAbstractVideoBuffer
-{
-public:
- CVGLTextureVideoBuffer(CVOpenGLTextureRef buffer)
- : QAbstractVideoBuffer(GLTextureHandle)
- , m_buffer(buffer)
- , m_mode(NotMapped)
- {
- CVOpenGLTextureRetain(m_buffer);
- }
-
- virtual ~CVGLTextureVideoBuffer()
- {
- CVOpenGLTextureRelease(m_buffer);
- }
-
- QVariant handle() const
- {
- GLuint id = CVOpenGLTextureGetName(m_buffer);
- return QVariant(int(id));
- }
-
- MapMode mapMode() const { return m_mode; }
-
- uchar *map(MapMode mode, int *numBytes, int *bytesPerLine)
- {
- if (numBytes)
- *numBytes = 0;
-
- if (bytesPerLine)
- *bytesPerLine = 0;
-
- m_mode = mode;
- return 0;
- }
-
- void unmap() { m_mode = NotMapped; }
-
-private:
- CVOpenGLTextureRef m_buffer;
- MapMode m_mode;
-};
-
-
-class CVPixelBufferVideoBuffer : public QAbstractVideoBuffer
-{
-public:
- CVPixelBufferVideoBuffer(CVPixelBufferRef buffer)
- : QAbstractVideoBuffer(NoHandle)
- , m_buffer(buffer)
- , m_mode(NotMapped)
- {
- CVPixelBufferRetain(m_buffer);
- }
-
- virtual ~CVPixelBufferVideoBuffer()
- {
- CVPixelBufferRelease(m_buffer);
- }
-
- MapMode mapMode() const { return m_mode; }
-
- uchar *map(MapMode mode, int *numBytes, int *bytesPerLine)
- {
- if (mode != NotMapped && m_mode == NotMapped) {
- CVPixelBufferLockBaseAddress(m_buffer, 0);
-
- if (numBytes)
- *numBytes = CVPixelBufferGetDataSize(m_buffer);
-
- if (bytesPerLine)
- *bytesPerLine = CVPixelBufferGetBytesPerRow(m_buffer);
-
- m_mode = mode;
-
- return (uchar*)CVPixelBufferGetBaseAddress(m_buffer);
- } else {
- return 0;
- }
- }
-
- void unmap()
- {
- if (m_mode != NotMapped) {
- m_mode = NotMapped;
- CVPixelBufferUnlockBaseAddress(m_buffer, 0);
- }
- }
-
-private:
- CVPixelBufferRef m_buffer;
- MapMode m_mode;
-};
-
-
-
-QT7MovieRenderer::QT7MovieRenderer(QObject *parent)
- :QT7VideoRendererControl(parent),
- m_movie(0),
-#ifdef QUICKTIME_C_API_AVAILABLE
- m_visualContext(0),
- m_usingGLContext(false),
- m_currentGLContext(0),
-#endif
- m_surface(0)
-{
-// qDebug() << "QT7MovieRenderer";
-
- m_displayLink = new QCvDisplayLink(this);
- connect(m_displayLink, SIGNAL(tick(CVTimeStamp)), SLOT(updateVideoFrame(CVTimeStamp)));
-}
-
-
-bool QT7MovieRenderer::createGLVisualContext()
-{
-#ifdef QUICKTIME_C_API_AVAILABLE
- AutoReleasePool pool;
- CGLContextObj cglContext = CGLGetCurrentContext();
- NSOpenGLPixelFormat *nsglPixelFormat = [NSOpenGLView defaultPixelFormat];
- CGLPixelFormatObj cglPixelFormat = static_cast<CGLPixelFormatObj>([nsglPixelFormat CGLPixelFormatObj]);
-
- OSStatus err = QTOpenGLTextureContextCreate(kCFAllocatorDefault, cglContext,
- cglPixelFormat, NULL, &m_visualContext);
- if (err != noErr)
- qWarning() << "Could not create visual context (OpenGL)";
-
- return (err == noErr);
-#endif // QUICKTIME_C_API_AVAILABLE
-
- return false;
-}
-
-#ifdef QUICKTIME_C_API_AVAILABLE
-static bool DictionarySetValue(CFMutableDictionaryRef dict, CFStringRef key, SInt32 value)
-{
- CFNumberRef number = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &value);
-
- if (number) {
- CFDictionarySetValue( dict, key, number );
- CFRelease( number );
- return true;
- }
- return false;
-}
-#endif // QUICKTIME_C_API_AVAILABLE
-
-bool QT7MovieRenderer::createPixelBufferVisualContext()
-{
-#ifdef QUICKTIME_C_API_AVAILABLE
- if (m_visualContext) {
- QTVisualContextRelease(m_visualContext);
- m_visualContext = 0;
- }
-
- m_pixelBufferContextGeometry = m_nativeSize;
-
- CFMutableDictionaryRef pixelBufferOptions = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
- &kCFTypeDictionaryKeyCallBacks,
- &kCFTypeDictionaryValueCallBacks);
- //DictionarySetValue(pixelBufferOptions, kCVPixelBufferPixelFormatTypeKey, k32ARGBPixelFormat );
- DictionarySetValue(pixelBufferOptions, kCVPixelBufferPixelFormatTypeKey, k32BGRAPixelFormat );
- DictionarySetValue(pixelBufferOptions, kCVPixelBufferWidthKey, m_nativeSize.width() );
- DictionarySetValue(pixelBufferOptions, kCVPixelBufferHeightKey, m_nativeSize.height() );
- DictionarySetValue(pixelBufferOptions, kCVPixelBufferBytesPerRowAlignmentKey, 16);
- //CFDictionarySetValue(pixelBufferOptions, kCVPixelBufferOpenGLCompatibilityKey, kCFBooleanTrue);
-
- CFMutableDictionaryRef visualContextOptions = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
- &kCFTypeDictionaryKeyCallBacks,
- &kCFTypeDictionaryValueCallBacks);
- CFDictionarySetValue(visualContextOptions, kQTVisualContextPixelBufferAttributesKey, pixelBufferOptions);
-
- CGColorSpaceRef colorSpace = NULL;
-
-#if USE_MAIN_MONITOR_COLOR_SPACE
- CMProfileRef sysprof = NULL;
-
- // Get the Systems Profile for the main display
- if (CMGetSystemProfile(&sysprof) == noErr) {
- // Create a colorspace with the systems profile
- colorSpace = CGColorSpaceCreateWithPlatformColorSpace(sysprof);
- CMCloseProfile(sysprof);
- }
-#endif
-
- if (!colorSpace)
- colorSpace = CGColorSpaceCreateDeviceRGB();
-
- CFDictionarySetValue(visualContextOptions, kQTVisualContextOutputColorSpaceKey, colorSpace);
-
- OSStatus err = QTPixelBufferContextCreate(kCFAllocatorDefault,
- visualContextOptions,
- &m_visualContext);
- CFRelease(pixelBufferOptions);
- CFRelease(visualContextOptions);
-
- if (err != noErr) {
- qWarning() << "Could not create visual context (PixelBuffer)";
- return false;
- }
-
- return true;
-#endif // QUICKTIME_C_API_AVAILABLE
-
- return false;
-}
-
-
-QT7MovieRenderer::~QT7MovieRenderer()
-{
- m_displayLink->stop();
-}
-
-void QT7MovieRenderer::setupVideoOutput()
-{
- AutoReleasePool pool;
-
-// qDebug() << "QT7MovieRenderer::setupVideoOutput" << m_movie;
-
- if (m_movie == 0 || m_surface == 0) {
- m_displayLink->stop();
- return;
- }
-
- NSSize size = [[(QTMovie*)m_movie attributeForKey:@"QTMovieNaturalSizeAttribute"] sizeValue];
- m_nativeSize = QSize(size.width, size.height);
-
-#ifdef QUICKTIME_C_API_AVAILABLE
- bool usedGLContext = m_usingGLContext;
-
- if (!m_nativeSize.isEmpty()) {
-
- bool glSupported = !m_surface->supportedPixelFormats(QAbstractVideoBuffer::GLTextureHandle).isEmpty();
-
- //Try rendering using opengl textures first:
- if (glSupported) {
- QVideoSurfaceFormat format(m_nativeSize, QVideoFrame::Format_RGB32, QAbstractVideoBuffer::GLTextureHandle);
-
- if (m_surface->isActive())
- m_surface->stop();
-
-// qDebug() << "Starting the surface with format" << format;
- if (!m_surface->start(format)) {
-// qDebug() << "failed to start video surface" << m_surface->error();
- glSupported = false;
- } else {
- m_usingGLContext = true;
- }
-
- }
-
- if (!glSupported) {
- m_usingGLContext = false;
- QVideoSurfaceFormat format(m_nativeSize, QVideoFrame::Format_RGB32);
-
- if (m_surface->isActive() && m_surface->surfaceFormat() != format) {
-// qDebug() << "Surface format was changed, stop the surface.";
- m_surface->stop();
- }
-
- if (!m_surface->isActive()) {
-// qDebug() << "Starting the surface with format" << format;
- m_surface->start(format);
-// if (!m_surface->start(format))
-// qDebug() << "failed to start video surface" << m_surface->error();
- }
- }
- }
-
-
- if (m_visualContext) {
- //check if the visual context still can be reused
- if (usedGLContext != m_usingGLContext ||
- (m_usingGLContext && (m_currentGLContext != QGLContext::currentContext())) ||
- (!m_usingGLContext && (m_pixelBufferContextGeometry != m_nativeSize))) {
- QTVisualContextRelease(m_visualContext);
- m_pixelBufferContextGeometry = QSize();
- m_visualContext = 0;
- }
- }
-
- if (!m_nativeSize.isEmpty()) {
- if (!m_visualContext) {
- if (m_usingGLContext) {
-// qDebug() << "Building OpenGL visual context" << m_nativeSize;
- m_currentGLContext = QGLContext::currentContext();
- if (!createGLVisualContext()) {
- qWarning() << "QT7MovieRenderer: failed to create visual context";
- return;
- }
- } else {
-// qDebug() << "Building Pixel Buffer visual context" << m_nativeSize;
- if (!createPixelBufferVisualContext()) {
- qWarning() << "QT7MovieRenderer: failed to create visual context";
- return;
- }
- }
- }
-
- // targets a Movie to render into a visual context
- SetMovieVisualContext([(QTMovie*)m_movie quickTimeMovie], m_visualContext);
-
- m_displayLink->start();
- }
-#endif
-
-}
-
-void QT7MovieRenderer::setMovie(void *movie)
-{
-// qDebug() << "QT7MovieRenderer::setMovie" << movie;
-
-#ifdef QUICKTIME_C_API_AVAILABLE
- QMutexLocker locker(&m_mutex);
-
- if (m_movie != movie) {
- if (m_movie) {
- //ensure the old movie doesn't hold the visual context, otherwise it can't be reused
- SetMovieVisualContext([(QTMovie*)m_movie quickTimeMovie], nil);
- [(QTMovie*)m_movie release];
- }
-
- m_movie = movie;
- [(QTMovie*)m_movie retain];
-
- setupVideoOutput();
- }
-#endif
-}
-
-void QT7MovieRenderer::updateNaturalSize(const QSize &newSize)
-{
- if (m_nativeSize != newSize) {
- m_nativeSize = newSize;
- setupVideoOutput();
- }
-}
-
-QAbstractVideoSurface *QT7MovieRenderer::surface() const
-{
- return m_surface;
-}
-
-void QT7MovieRenderer::setSurface(QAbstractVideoSurface *surface)
-{
-// qDebug() << "Set video surface" << surface;
-
- if (surface == m_surface)
- return;
-
- QMutexLocker locker(&m_mutex);
-
- if (m_surface && m_surface->isActive())
- m_surface->stop();
-
- m_surface = surface;
- setupVideoOutput();
-}
-
-
-QSize QT7MovieRenderer::nativeSize() const
-{
- return m_nativeSize;
-}
-
-void QT7MovieRenderer::updateVideoFrame(const CVTimeStamp &ts)
-{
-#ifdef QUICKTIME_C_API_AVAILABLE
-
- QMutexLocker locker(&m_mutex);
-
- if (m_surface && m_surface->isActive() &&
- m_visualContext && QTVisualContextIsNewImageAvailable(m_visualContext, &ts)) {
-
- CVImageBufferRef imageBuffer = NULL;
-
- OSStatus status = QTVisualContextCopyImageForTime(m_visualContext, NULL, &ts, &imageBuffer);
-
- if (status == noErr && imageBuffer) {
- QAbstractVideoBuffer *buffer = 0;
-
- if (m_usingGLContext) {
- buffer = new QT7CIImageVideoBuffer([CIImage imageWithCVImageBuffer:imageBuffer]);
- CVOpenGLTextureRelease((CVOpenGLTextureRef)imageBuffer);
- } else {
- buffer = new CVPixelBufferVideoBuffer((CVPixelBufferRef)imageBuffer);
- //buffer = new QT7CIImageVideoBuffer( [CIImage imageWithCVImageBuffer:imageBuffer] );
- CVPixelBufferRelease((CVPixelBufferRef)imageBuffer);
- }
-
- QVideoFrame frame(buffer, m_nativeSize, QVideoFrame::Format_RGB32);
- m_surface->present(frame);
- QTVisualContextTask(m_visualContext);
- }
- }
-#else
- Q_UNUSED(ts);
-#endif
-}
-
-#include "moc_qt7movierenderer.cpp"
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/qt7/qt7movievideowidget.h b/src/plugins/mediaservices/qt7/qt7movievideowidget.h
deleted file mode 100644
index 3ff14f5..0000000
--- a/src/plugins/mediaservices/qt7/qt7movievideowidget.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QT7MOVIEVIDEOWIDGET_H
-#define QT7MOVIEVIDEOWIDGET_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qmutex.h>
-
-#include <qvideowindowcontrol.h>
-#include <qmediaplayer.h>
-
-#include <QtGui/qmacdefines_mac.h>
-#include "qt7videooutputcontrol.h"
-
-#include <QuartzCore/CVOpenGLTexture.h>
-#include <QuickTime/QuickTime.h>
-
-
-QT_BEGIN_HEADER
-
-
-QT_BEGIN_NAMESPACE
-
-class GLVideoWidget;
-class QCvDisplayLink;
-class QT7PlayerSession;
-class QT7PlayerService;
-
-class QT7MovieVideoWidget : public QT7VideoWidgetControl
-{
-Q_OBJECT
-public:
- QT7MovieVideoWidget(QObject *parent = 0);
- virtual ~QT7MovieVideoWidget();
-
- void setMovie(void *movie);
- void updateNaturalSize(const QSize &newSize);
-
- QWidget *videoWidget();
-
- bool isFullScreen() const;
- void setFullScreen(bool fullScreen);
-
- QSize nativeSize() const;
-
- Qt::AspectRatioMode aspectRatioMode() const;
- void setAspectRatioMode(Qt::AspectRatioMode mode);
-
- int brightness() const;
- void setBrightness(int brightness);
-
- int contrast() const;
- void setContrast(int contrast);
-
- int hue() const;
- void setHue(int hue);
-
- int saturation() const;
- void setSaturation(int saturation);
-
-private slots:
- void updateVideoFrame(const CVTimeStamp &ts);
-
-private:
- void setupVideoOutput();
- bool createVisualContext();
-
- void updateColors();
-
- void *m_movie;
- GLVideoWidget *m_videoWidget;
-
- QCvDisplayLink *m_displayLink;
-
-#ifdef QUICKTIME_C_API_AVAILABLE
- QTVisualContextRef m_visualContext;
-#endif
-
- bool m_fullscreen;
- QSize m_nativeSize;
- Qt::AspectRatioMode m_aspectRatioMode;
- int m_brightness;
- int m_contrast;
- int m_hue;
- int m_saturation;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/qt7/qt7movievideowidget.mm b/src/plugins/mediaservices/qt7/qt7movievideowidget.mm
deleted file mode 100644
index 648d6b4..0000000
--- a/src/plugins/mediaservices/qt7/qt7movievideowidget.mm
+++ /dev/null
@@ -1,425 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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$
-**
-****************************************************************************/
-
-#import <QTKit/QTKit.h>
-
-#include "qt7backend.h"
-
-#include "qt7playercontrol.h"
-#include "qt7movievideowidget.h"
-#include "qt7playersession.h"
-#include "qcvdisplaylink.h"
-#include <QtCore/qdebug.h>
-#include <QtCore/qcoreapplication.h>
-
-#include <QGLWidget>
-
-#import <QuartzCore/QuartzCore.h>
-
-#include "math.h"
-
-QT_BEGIN_NAMESPACE
-
-class GLVideoWidget : public QGLWidget
-{
-public:
-
- GLVideoWidget(QWidget *parent, const QGLFormat &format)
- : QGLWidget(format, parent),
- m_texRef(0),
- m_nativeSize(640,480),
- m_aspectRatioMode(Qt::KeepAspectRatio)
- {
- setAutoFillBackground(false);
- }
-
- void initializeGL()
- {
- QColor bgColor = palette().color(QPalette::Background);
- glClearColor(bgColor.redF(), bgColor.greenF(), bgColor.blueF(), bgColor.alphaF());
- }
-
- void resizeGL(int w, int h)
- {
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glViewport(0, 0, GLsizei(w), GLsizei(h));
- gluOrtho2D(0, GLsizei(w), 0, GLsizei(h));
- updateGL();
- }
-
- void paintGL()
- {
- glClear(GL_COLOR_BUFFER_BIT);
- if (!m_texRef)
- return;
-
- glPushMatrix();
- glDisable(GL_CULL_FACE);
- GLenum target = CVOpenGLTextureGetTarget(m_texRef);
- glEnable(target);
-
- glBindTexture(target, CVOpenGLTextureGetName(m_texRef));
- glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterf(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- GLfloat lowerLeft[2], lowerRight[2], upperRight[2], upperLeft[2];
- CVOpenGLTextureGetCleanTexCoords(m_texRef, lowerLeft, lowerRight, upperRight, upperLeft);
-
- glBegin(GL_QUADS);
- QRect rect = displayRect();
- glTexCoord2f(lowerLeft[0], lowerLeft[1]);
- glVertex2i(rect.topLeft().x(), rect.topLeft().y());
- glTexCoord2f(lowerRight[0], lowerRight[1]);
- glVertex2i(rect.topRight().x() + 1, rect.topRight().y());
- glTexCoord2f(upperRight[0], upperRight[1]);
- glVertex2i(rect.bottomRight().x() + 1, rect.bottomRight().y() + 1);
- glTexCoord2f(upperLeft[0], upperLeft[1]);
- glVertex2i(rect.bottomLeft().x(), rect.bottomLeft().y() + 1);
- glEnd();
- glPopMatrix();
- }
-
- void setCVTexture(CVOpenGLTextureRef texRef)
- {
- if (m_texRef)
- CVOpenGLTextureRelease(m_texRef);
-
- m_texRef = texRef;
-
- if (m_texRef)
- CVOpenGLTextureRetain(m_texRef);
-
- if (isVisible()) {
- makeCurrent();
- paintGL();
- swapBuffers();
- }
- }
-
- QSize sizeHint() const
- {
- return m_nativeSize;
- }
-
- void setNativeSize(const QSize &size)
- {
- m_nativeSize = size;
- }
-
- void setAspectRatioMode(Qt::AspectRatioMode mode)
- {
- if (m_aspectRatioMode != mode) {
- m_aspectRatioMode = mode;
- update();
- }
- }
-
-private:
- QRect displayRect() const
- {
- QRect displayRect = rect();
-
- if (m_aspectRatioMode == Qt::KeepAspectRatio) {
- QSize size = m_nativeSize;
- size.scale(displayRect.size(), Qt::KeepAspectRatio);
-
- displayRect = QRect(QPoint(0, 0), size);
- displayRect.moveCenter(rect().center());
- }
- return displayRect;
- }
-
- CVOpenGLTextureRef m_texRef;
- QSize m_nativeSize;
- Qt::AspectRatioMode m_aspectRatioMode;
-};
-
-QT7MovieVideoWidget::QT7MovieVideoWidget(QObject *parent)
- :QT7VideoWidgetControl(parent),
- m_movie(0),
- m_videoWidget(0),
- m_fullscreen(false),
- m_aspectRatioMode(Qt::KeepAspectRatio),
- m_brightness(0),
- m_contrast(0),
- m_hue(0),
- m_saturation(0)
-{
-// qDebug() << "QT7MovieVideoWidget";
-
- QGLFormat format = QGLFormat::defaultFormat();
- format.setSwapInterval(1); // Vertical sync (avoid tearing)
- m_videoWidget = new GLVideoWidget(0, format);
-
- m_displayLink = new QCvDisplayLink(this);
-
- connect(m_displayLink, SIGNAL(tick(CVTimeStamp)), SLOT(updateVideoFrame(CVTimeStamp)));
-
- if (!createVisualContext()) {
- qWarning() << "QT7MovieVideoWidget: failed to create visual context";
- }
-}
-
-bool QT7MovieVideoWidget::createVisualContext()
-{
-#ifdef QUICKTIME_C_API_AVAILABLE
- m_videoWidget->makeCurrent();
-
- AutoReleasePool pool;
- CGLContextObj cglContext = CGLGetCurrentContext();
- NSOpenGLPixelFormat *nsglPixelFormat = [NSOpenGLView defaultPixelFormat];
- CGLPixelFormatObj cglPixelFormat = static_cast<CGLPixelFormatObj>([nsglPixelFormat CGLPixelFormatObj]);
-
- CFTypeRef keys[] = { kQTVisualContextOutputColorSpaceKey };
- CGColorSpaceRef colorSpace = NULL;
- CMProfileRef sysprof = NULL;
-
- // Get the Systems Profile for the main display
- if (CMGetSystemProfile(&sysprof) == noErr) {
- // Create a colorspace with the systems profile
- colorSpace = CGColorSpaceCreateWithPlatformColorSpace(sysprof);
- CMCloseProfile(sysprof);
- }
-
- if (!colorSpace)
- colorSpace = CGColorSpaceCreateDeviceRGB();
-
- CFDictionaryRef textureContextAttributes = CFDictionaryCreate(kCFAllocatorDefault,
- (const void **)keys,
- (const void **)&colorSpace, 1,
- &kCFTypeDictionaryKeyCallBacks,
- &kCFTypeDictionaryValueCallBacks);
-
- OSStatus err = QTOpenGLTextureContextCreate(kCFAllocatorDefault,
- cglContext,
- cglPixelFormat,
- textureContextAttributes,
- &m_visualContext);
- if (err != noErr)
- qWarning() << "Could not create visual context (OpenGL)";
-
-
- return (err == noErr);
-#endif // QUICKTIME_C_API_AVAILABLE
-
- return false;
-}
-
-QT7MovieVideoWidget::~QT7MovieVideoWidget()
-{
- m_displayLink->stop();
- [(QTMovie*)m_movie release];
- delete m_videoWidget;
-}
-
-QWidget *QT7MovieVideoWidget::videoWidget()
-{
- return m_videoWidget;
-}
-
-void QT7MovieVideoWidget::setupVideoOutput()
-{
- AutoReleasePool pool;
-
-// qDebug() << "QT7MovieVideoWidget::setupVideoOutput" << m_movie;
-
- if (m_movie == 0) {
- m_displayLink->stop();
- return;
- }
-
- NSSize size = [[(QTMovie*)m_movie attributeForKey:@"QTMovieNaturalSizeAttribute"] sizeValue];
- m_nativeSize = QSize(size.width, size.height);
- m_videoWidget->setNativeSize(m_nativeSize);
-
-#ifdef QUICKTIME_C_API_AVAILABLE
- // targets a Movie to render into a visual context
- SetMovieVisualContext([(QTMovie*)m_movie quickTimeMovie], m_visualContext);
-#endif
-
- m_displayLink->start();
-}
-
-void QT7MovieVideoWidget::setMovie(void *movie)
-{
- if (m_movie == movie)
- return;
-
- if (m_movie) {
-#ifdef QUICKTIME_C_API_AVAILABLE
- SetMovieVisualContext([(QTMovie*)m_movie quickTimeMovie], nil);
-#endif
- [(QTMovie*)m_movie release];
- }
-
- m_movie = movie;
- [(QTMovie*)m_movie retain];
-
- setupVideoOutput();
-}
-
-void QT7MovieVideoWidget::updateNaturalSize(const QSize &newSize)
-{
- if (m_nativeSize != newSize) {
- m_nativeSize = newSize;
- setupVideoOutput();
- }
-}
-
-bool QT7MovieVideoWidget::isFullScreen() const
-{
- return m_fullscreen;
-}
-
-void QT7MovieVideoWidget::setFullScreen(bool fullScreen)
-{
- m_fullscreen = fullScreen;
-}
-
-QSize QT7MovieVideoWidget::nativeSize() const
-{
- return m_nativeSize;
-}
-
-Qt::AspectRatioMode QT7MovieVideoWidget::aspectRatioMode() const
-{
- return m_aspectRatioMode;
-}
-
-void QT7MovieVideoWidget::setAspectRatioMode(Qt::AspectRatioMode mode)
-{
- m_aspectRatioMode = mode;
- m_videoWidget->setAspectRatioMode(mode);
-}
-
-int QT7MovieVideoWidget::brightness() const
-{
- return m_brightness;
-}
-
-void QT7MovieVideoWidget::setBrightness(int brightness)
-{
- m_brightness = brightness;
- updateColors();
-}
-
-int QT7MovieVideoWidget::contrast() const
-{
- return m_contrast;
-}
-
-void QT7MovieVideoWidget::setContrast(int contrast)
-{
- m_contrast = contrast;
- updateColors();
-}
-
-int QT7MovieVideoWidget::hue() const
-{
- return m_hue;
-}
-
-void QT7MovieVideoWidget::setHue(int hue)
-{
- m_hue = hue;
- updateColors();
-}
-
-int QT7MovieVideoWidget::saturation() const
-{
- return m_saturation;
-}
-
-void QT7MovieVideoWidget::setSaturation(int saturation)
-{
- m_saturation = saturation;
- updateColors();
-}
-
-void QT7MovieVideoWidget::updateColors()
-{
-#ifdef QUICKTIME_C_API_AVAILABLE
- if (m_movie) {
- QTMovie *movie = (QTMovie*)m_movie;
-
- Float32 value;
- value = m_brightness/100.0;
- SetMovieVisualBrightness([movie quickTimeMovie], value, 0);
- value = pow(2, m_contrast/50.0);
- SetMovieVisualContrast([movie quickTimeMovie], value, 0);
- value = m_hue/100.0;
- SetMovieVisualHue([movie quickTimeMovie], value, 0);
- value = 1.0+m_saturation/100.0;
- SetMovieVisualSaturation([movie quickTimeMovie], value, 0);
- }
-#endif
-}
-
-void QT7MovieVideoWidget::updateVideoFrame(const CVTimeStamp &ts)
-{
-#ifdef QUICKTIME_C_API_AVAILABLE
- AutoReleasePool pool;
- // check for new frame
- if (m_visualContext && QTVisualContextIsNewImageAvailable(m_visualContext, &ts)) {
- CVOpenGLTextureRef currentFrame = NULL;
-
- // get a "frame" (image buffer) from the Visual Context, indexed by the provided time
- OSStatus status = QTVisualContextCopyImageForTime(m_visualContext, NULL, &ts, &currentFrame);
-
- // the above call may produce a null frame so check for this first
- // if we have a frame, then draw it
- if (status == noErr && currentFrame) {
- //qDebug() << "render video frame";
- m_videoWidget->setCVTexture(currentFrame);
- CVOpenGLTextureRelease(currentFrame);
- }
- QTVisualContextTask(m_visualContext);
- }
-#else
- Q_UNUSED(ts);
-#endif
-}
-
-#include "moc_qt7movievideowidget.cpp"
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/qt7/qt7movieviewoutput.h b/src/plugins/mediaservices/qt7/qt7movieviewoutput.h
deleted file mode 100644
index d6bfd14..0000000
--- a/src/plugins/mediaservices/qt7/qt7movieviewoutput.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QT7MOVIEVIEWOUTPUT_H
-#define QT7MOVIEVIEWOUTPUT_H
-
-#include <QtCore/qobject.h>
-
-#include <QtMediaServices/qvideowindowcontrol.h>
-#include <QtMediaServices/qmediaplayer.h>
-
-#include <QtGui/qmacdefines_mac.h>
-#include "qt7videooutputcontrol.h"
-
-
-QT_BEGIN_HEADER
-QT_BEGIN_NAMESPACE
-
-class QT7PlayerSession;
-class QT7PlayerService;
-
-class QT7MovieViewOutput : public QT7VideoWindowControl
-{
-public:
- QT7MovieViewOutput(QObject *parent = 0);
- ~QT7MovieViewOutput();
-
- void setMovie(void *movie);
- void updateNaturalSize(const QSize &newSize);
-
- WId winId() const;
- void setWinId(WId id);
-
- QRect displayRect() const;
- void setDisplayRect(const QRect &rect);
-
- bool isFullScreen() const;
- void setFullScreen(bool fullScreen);
-
- void repaint();
-
- QSize nativeSize() const;
-
- Qt::AspectRatioMode aspectRatioMode() const;
- void setAspectRatioMode(Qt::AspectRatioMode mode);
-
- int brightness() const;
- void setBrightness(int brightness);
-
- int contrast() const;
- void setContrast(int contrast);
-
- int hue() const;
- void setHue(int hue);
-
- int saturation() const;
- void setSaturation(int saturation);
-
-private:
- void setupVideoOutput();
-
- void *m_movie;
- void *m_movieView;
- bool m_layouted;
-
- WId m_winId;
- QRect m_displayRect;
- bool m_fullscreen;
- QSize m_nativeSize;
- Qt::AspectRatioMode m_aspectRatioMode;
- int m_brightness;
- int m_contrast;
- int m_hue;
- int m_saturation;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm b/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm
deleted file mode 100644
index 06299a3..0000000
--- a/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm
+++ /dev/null
@@ -1,335 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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$
-**
-****************************************************************************/
-
-#import <QTKit/QTKit.h>
-
-#include "qt7backend.h"
-
-#include "qt7playercontrol.h"
-#include "qt7movieviewoutput.h"
-#include "qt7playersession.h"
-#include <QtCore/qdebug.h>
-
-#include <QuartzCore/CIFilter.h>
-#include <QuartzCore/CIVector.h>
-
-
-#define VIDEO_TRANSPARENT(m) -(void)m:(NSEvent *)e{[[self superview] m:e];}
-
-@interface TransparentQTMovieView : QTMovieView
-{
-@private
- QRect *m_drawRect;
- qreal m_brightness, m_contrast, m_saturation, m_hue;
-}
-
-- (TransparentQTMovieView *) init;
-- (void) setDrawRect:(QRect &)rect;
-- (CIImage *) view:(QTMovieView *)view willDisplayImage:(CIImage *)img;
-- (void) setContrast:(qreal) contrast;
-@end
-
-@implementation TransparentQTMovieView
-
-- (TransparentQTMovieView *) init
-{
- self = [super initWithFrame:NSZeroRect];
- if (self) {
- [self setControllerVisible:NO];
- [self setContrast:1.0];
- [self setDelegate:self];
- }
- return self;
-}
-
-- (void) dealloc
-{
- [super dealloc];
-}
-
-- (void) setContrast:(qreal) contrast
-{
- m_hue = 0.0;
- m_brightness = 0.0;
- m_contrast = contrast;
- m_saturation = 1.0;
-}
-
-
-- (void) setDrawRect:(QRect &)rect
-{
- *m_drawRect = rect;
-
- NSRect nsrect;
- nsrect.origin.x = m_drawRect->x();
- nsrect.origin.y = m_drawRect->y();
- nsrect.size.width = m_drawRect->width();
- nsrect.size.height = m_drawRect->height();
- [self setFrame:nsrect];
-}
-
-- (CIImage *) view:(QTMovieView *)view willDisplayImage:(CIImage *)img
-{
- // This method is called from QTMovieView just
- // before the image will be drawn.
- Q_UNUSED(view);
-
- if ( !qFuzzyCompare(m_brightness, 0.0) ||
- !qFuzzyCompare(m_contrast, 1.0) ||
- !qFuzzyCompare(m_saturation, 1.0)){
- CIFilter *colorFilter = [CIFilter filterWithName:@"CIColorControls"];
- [colorFilter setValue:[NSNumber numberWithFloat:m_brightness] forKey:@"inputBrightness"];
- [colorFilter setValue:[NSNumber numberWithFloat:(m_contrast < 1) ? m_contrast : 1 + ((m_contrast-1)*3)] forKey:@"inputContrast"];
- [colorFilter setValue:[NSNumber numberWithFloat:m_saturation] forKey:@"inputSaturation"];
- [colorFilter setValue:img forKey:@"inputImage"];
- img = [colorFilter valueForKey:@"outputImage"];
- }
-
- /*if (m_hue){
- CIFilter *colorFilter = [CIFilter filterWithName:@"CIHueAdjust"];
- [colorFilter setValue:[NSNumber numberWithFloat:(m_hue * 3.14)] forKey:@"inputAngle"];
- [colorFilter setValue:img forKey:@"inputImage"];
- img = [colorFilter valueForKey:@"outputImage"];
- }*/
-
- return img;
-}
-
-
-VIDEO_TRANSPARENT(mouseDown);
-VIDEO_TRANSPARENT(mouseDragged);
-VIDEO_TRANSPARENT(mouseUp);
-VIDEO_TRANSPARENT(mouseMoved);
-VIDEO_TRANSPARENT(mouseEntered);
-VIDEO_TRANSPARENT(mouseExited);
-VIDEO_TRANSPARENT(rightMouseDown);
-VIDEO_TRANSPARENT(rightMouseDragged);
-VIDEO_TRANSPARENT(rightMouseUp);
-VIDEO_TRANSPARENT(otherMouseDown);
-VIDEO_TRANSPARENT(otherMouseDragged);
-VIDEO_TRANSPARENT(otherMouseUp);
-VIDEO_TRANSPARENT(keyDown);
-VIDEO_TRANSPARENT(keyUp);
-VIDEO_TRANSPARENT(scrollWheel)
-
-@end
-
-
-QT7MovieViewOutput::QT7MovieViewOutput(QObject *parent)
- :QT7VideoWindowControl(parent),
- m_movie(0),
- m_movieView(0),
- m_layouted(false),
- m_winId(0),
- m_fullscreen(false),
- m_aspectRatioMode(Qt::KeepAspectRatio),
- m_brightness(0),
- m_contrast(0),
- m_hue(0),
- m_saturation(0)
-{
-}
-
-QT7MovieViewOutput::~QT7MovieViewOutput()
-{
- [(QTMovieView*)m_movieView release];
- [(QTMovie*)m_movie release];
-}
-
-void QT7MovieViewOutput::setupVideoOutput()
-{
- AutoReleasePool pool;
-
- //qDebug() << "QT7MovieViewOutput::setupVideoOutput" << m_movie << m_winId;
- if (m_movie == 0 || m_winId <= 0)
- return;
-
- NSSize size = [[(QTMovie*)m_movie attributeForKey:@"QTMovieNaturalSizeAttribute"] sizeValue];
- m_nativeSize = QSize(size.width, size.height);
-
- if (!m_movieView)
- m_movieView = [[TransparentQTMovieView alloc] init];
-
- [(QTMovieView*)m_movieView setControllerVisible:NO];
- [(QTMovieView*)m_movieView setMovie:(QTMovie*)m_movie];
-
- [(NSView *)m_winId addSubview:(QTMovieView*)m_movieView];
- m_layouted = true;
-
- setDisplayRect(m_displayRect);
-}
-
-void QT7MovieViewOutput::setMovie(void *movie)
-{
- if (m_movie != movie) {
- if (m_movie) {
- if (m_movieView)
- [(QTMovieView*)m_movieView setMovie:nil];
-
- [(QTMovie*)m_movie release];
- }
-
- m_movie = movie;
-
- if (m_movie)
- [(QTMovie*)m_movie retain];
-
- setupVideoOutput();
- }
-}
-
-void QT7MovieViewOutput::updateNaturalSize(const QSize &newSize)
-{
- if (m_nativeSize != newSize) {
- m_nativeSize = newSize;
- emit nativeSizeChanged();
- }
-}
-
-WId QT7MovieViewOutput::winId() const
-{
- return m_winId;
-}
-
-void QT7MovieViewOutput::setWinId(WId id)
-{
- if (m_winId != id) {
- if (m_movieView && m_layouted) {
- [(QTMovieView*)m_movieView removeFromSuperview];
- m_layouted = false;
- }
-
- m_winId = id;
- setupVideoOutput();
- }
-}
-
-QRect QT7MovieViewOutput::displayRect() const
-{
- return m_displayRect;
-}
-
-void QT7MovieViewOutput::setDisplayRect(const QRect &rect)
-{
- m_displayRect = rect;
-
- if (m_movieView) {
- AutoReleasePool pool;
- [(QTMovieView*)m_movieView setPreservesAspectRatio:(m_aspectRatioMode == Qt::KeepAspectRatio ? YES : NO)];
- [(QTMovieView*)m_movieView setFrame:NSMakeRect(m_displayRect.x(),
- m_displayRect.y(),
- m_displayRect.width(),
- m_displayRect.height())];
- }
-
-}
-
-bool QT7MovieViewOutput::isFullScreen() const
-{
- return m_fullscreen;
-}
-
-void QT7MovieViewOutput::setFullScreen(bool fullScreen)
-{
- m_fullscreen = fullScreen;
- setDisplayRect(m_displayRect);
-}
-
-void QT7MovieViewOutput::repaint()
-{
-}
-
-QSize QT7MovieViewOutput::nativeSize() const
-{
- return m_nativeSize;
-}
-
-Qt::AspectRatioMode QT7MovieViewOutput::aspectRatioMode() const
-{
- return m_aspectRatioMode;
-}
-
-void QT7MovieViewOutput::setAspectRatioMode(Qt::AspectRatioMode mode)
-{
- m_aspectRatioMode = mode;
- setDisplayRect(m_displayRect);
-}
-
-int QT7MovieViewOutput::brightness() const
-{
- return m_brightness;
-}
-
-void QT7MovieViewOutput::setBrightness(int brightness)
-{
- m_brightness = brightness;
-}
-
-int QT7MovieViewOutput::contrast() const
-{
- return m_contrast;
-}
-
-void QT7MovieViewOutput::setContrast(int contrast)
-{
- m_contrast = contrast;
- [(TransparentQTMovieView*)m_movieView setContrast:(contrast/100.0+1.0)];
-}
-
-int QT7MovieViewOutput::hue() const
-{
- return m_hue;
-}
-
-void QT7MovieViewOutput::setHue(int hue)
-{
- m_hue = hue;
-}
-
-int QT7MovieViewOutput::saturation() const
-{
- return m_saturation;
-}
-
-void QT7MovieViewOutput::setSaturation(int saturation)
-{
- m_saturation = saturation;
-}
diff --git a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.h b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.h
deleted file mode 100644
index fa4db4d..0000000
--- a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QT7MOVIEVIEWRENDERER_H
-#define QT7MOVIEVIEWRENDERER_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qmutex.h>
-
-#include <QtMediaServices/qvideowindowcontrol.h>
-#include <QtMediaServices/qmediaplayer.h>
-
-#include <QtGui/qmacdefines_mac.h>
-#include "qt7videooutputcontrol.h"
-#include <QtMultimedia/qvideoframe.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
-class QVideoFrame;
-class QT7PlayerSession;
-class QT7PlayerService;
-
-class QT7MovieViewRenderer : public QT7VideoRendererControl
-{
-public:
- QT7MovieViewRenderer(QObject *parent = 0);
- ~QT7MovieViewRenderer();
-
- void setMovie(void *movie);
- void updateNaturalSize(const QSize &newSize);
-
- QAbstractVideoSurface *surface() const;
- void setSurface(QAbstractVideoSurface *surface);
-
- void renderFrame(const QVideoFrame &);
-
-protected:
- bool event(QEvent *event);
-
-private:
- void setupVideoOutput();
-
- void *m_movie;
- void *m_movieView;
- QSize m_nativeSize;
- QAbstractVideoSurface *m_surface;
- QVideoFrame m_currentFrame;
- bool m_pendingRenderEvent;
- QMutex m_mutex;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm b/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm
deleted file mode 100644
index 5af9809..0000000
--- a/src/plugins/mediaservices/qt7/qt7movieviewrenderer.mm
+++ /dev/null
@@ -1,366 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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$
-**
-****************************************************************************/
-
-#import <QTKit/QTKit.h>
-
-#include "qt7backend.h"
-
-#include "qt7playercontrol.h"
-#include "qt7movieviewrenderer.h"
-#include "qt7playersession.h"
-#include "qt7ciimagevideobuffer.h"
-#include <QtCore/qdebug.h>
-#include <QtCore/qcoreevent.h>
-#include <QtCore/qcoreapplication.h>
-
-#include <QtMultimedia/qabstractvideobuffer.h>
-#include <QtMultimedia/qabstractvideosurface.h>
-#include <QtMultimedia/qvideosurfaceformat.h>
-
-#include <QuartzCore/CIFilter.h>
-#include <QuartzCore/CIVector.h>
-
-
-QT_BEGIN_NAMESPACE
-
-class NSBitmapVideoBuffer : public QAbstractVideoBuffer
-{
-public:
- NSBitmapVideoBuffer(NSBitmapImageRep *buffer)
- : QAbstractVideoBuffer(NoHandle)
- , m_buffer(buffer)
- , m_mode(NotMapped)
- {
- [m_buffer retain];
- }
-
- virtual ~NSBitmapVideoBuffer()
- {
- [m_buffer release];
- }
-
- MapMode mapMode() const { return m_mode; }
-
- uchar *map(MapMode mode, int *numBytes, int *bytesPerLine)
- {
- if (mode != NotMapped && m_mode == NotMapped) {
- if (numBytes)
- *numBytes = [m_buffer bytesPerPlane];
-
- if (bytesPerLine)
- *bytesPerLine = [m_buffer bytesPerRow];
-
- m_mode = mode;
-
- return [m_buffer bitmapData];
- } else {
- return 0;
- }
- }
-
- void unmap() { m_mode = NotMapped; }
-
-private:
- NSBitmapImageRep *m_buffer;
- MapMode m_mode;
-};
-
-QT_END_NAMESPACE
-
-#define VIDEO_TRANSPARENT(m) -(void)m:(NSEvent *)e{[[self superview] m:e];}
-
-@interface HiddenQTMovieView : QTMovieView
-{
-@private
- QWidget *m_window;
- QT7MovieViewRenderer *m_renderer;
-}
-
-- (HiddenQTMovieView *) initWithRenderer:(QT7MovieViewRenderer *)renderer;
-- (void) setRenderer:(QT7MovieViewRenderer *)renderer;
-- (void) setDrawRect:(const QRect &)rect;
-- (CIImage *) view:(QTMovieView *)view willDisplayImage:(CIImage *)img;
-@end
-
-@implementation HiddenQTMovieView
-
-- (HiddenQTMovieView *) initWithRenderer:(QT7MovieViewRenderer *)renderer
-{
- self = [super initWithFrame:NSZeroRect];
- if (self) {
- [self setControllerVisible:NO];
- [self setDelegate:self];
-
- self->m_renderer = renderer;
-
- self->m_window = new QWidget;
- self->m_window->setWindowOpacity(0.0);
- self->m_window->show();
- self->m_window->hide();
-
- [(NSView *)(self->m_window->winId()) addSubview:self];
- [self setDrawRect:QRect(0,0,1,1)];
- }
- return self;
-}
-
-- (void) dealloc
-{
- [super dealloc];
-}
-
-- (void) setRenderer:(QT7MovieViewRenderer *)renderer
-{
- m_renderer = renderer;
-}
-
-- (void) setDrawRect:(const QRect &)rect
-{
- NSRect nsrect;
- nsrect.origin.x = rect.x();
- nsrect.origin.y = rect.y();
- nsrect.size.width = rect.width();
- nsrect.size.height = rect.height();
- [self setFrame:nsrect];
-}
-
-- (CIImage *) view:(QTMovieView *)view willDisplayImage:(CIImage *)img
-{
- // This method is called from QTMovieView just
- // before the image will be drawn.
- Q_UNUSED(view);
- if (m_renderer) {
- CGRect bounds = [img extent];
- int w = bounds.size.width;
- int h = bounds.size.height;
-
- QVideoFrame frame;
-
- QAbstractVideoSurface *surface = m_renderer->surface();
- if (!surface || !surface->isActive())
- return img;
-
- if (surface->surfaceFormat().handleType() == QAbstractVideoBuffer::CoreImageHandle) {
- //surface supports rendering of opengl based CIImage
- frame = QVideoFrame(new QT7CIImageVideoBuffer(img), QSize(w,h), QVideoFrame::Format_RGB32 );
- } else {
- //Swap R and B colors
- CIFilter *colorSwapFilter = [CIFilter filterWithName: @"CIColorMatrix" keysAndValues:
- @"inputImage", img,
- @"inputRVector", [CIVector vectorWithX: 0 Y: 0 Z: 1 W: 0],
- @"inputGVector", [CIVector vectorWithX: 0 Y: 1 Z: 0 W: 0],
- @"inputBVector", [CIVector vectorWithX: 1 Y: 0 Z: 0 W: 0],
- @"inputAVector", [CIVector vectorWithX: 0 Y: 0 Z: 0 W: 1],
- @"inputBiasVector", [CIVector vectorWithX: 0 Y: 0 Z: 0 W: 0],
- nil];
- CIImage *img = [colorSwapFilter valueForKey: @"outputImage"];
- NSBitmapImageRep *bitmap =[[NSBitmapImageRep alloc] initWithCIImage:img];
- //requesting the bitmap data is slow,
- //but it's better to do it here to avoid blocking the main thread for a long.
- [bitmap bitmapData];
- frame = QVideoFrame(new NSBitmapVideoBuffer(bitmap), QSize(w,h), QVideoFrame::Format_RGB32 );
- [bitmap release];
- }
-
- if (m_renderer)
- m_renderer->renderFrame(frame);
- }
-
- return img;
-}
-
-// Override this method so that the movie doesn't stop if
-// the window becomes invisible
-- (void)viewWillMoveToWindow:(NSWindow *)newWindow
-{
- Q_UNUSED(newWindow);
-}
-
-
-VIDEO_TRANSPARENT(mouseDown);
-VIDEO_TRANSPARENT(mouseDragged);
-VIDEO_TRANSPARENT(mouseUp);
-VIDEO_TRANSPARENT(mouseMoved);
-VIDEO_TRANSPARENT(mouseEntered);
-VIDEO_TRANSPARENT(mouseExited);
-VIDEO_TRANSPARENT(rightMouseDown);
-VIDEO_TRANSPARENT(rightMouseDragged);
-VIDEO_TRANSPARENT(rightMouseUp);
-VIDEO_TRANSPARENT(otherMouseDown);
-VIDEO_TRANSPARENT(otherMouseDragged);
-VIDEO_TRANSPARENT(otherMouseUp);
-VIDEO_TRANSPARENT(keyDown);
-VIDEO_TRANSPARENT(keyUp);
-VIDEO_TRANSPARENT(scrollWheel)
-
-@end
-
-QT_BEGIN_NAMESPACE
-
-QT7MovieViewRenderer::QT7MovieViewRenderer(QObject *parent)
- :QT7VideoRendererControl(parent),
- m_movie(0),
- m_movieView(0),
- m_surface(0),
- m_pendingRenderEvent(false)
-{
-}
-
-QT7MovieViewRenderer::~QT7MovieViewRenderer()
-{
- [(HiddenQTMovieView*)m_movieView setRenderer:0];
-
- QMutexLocker locker(&m_mutex);
- m_currentFrame = QVideoFrame();
- [(HiddenQTMovieView*)m_movieView release];
-}
-
-void QT7MovieViewRenderer::setupVideoOutput()
-{
- AutoReleasePool pool;
-
-// qDebug() << "QT7MovieViewRenderer::setupVideoOutput" << m_movie << m_surface;
-
- HiddenQTMovieView *movieView = (HiddenQTMovieView*)m_movieView;
-
- if (movieView && !m_movie) {
- [movieView setMovie:nil];
- }
-
- if (m_movie) {
- NSSize size = [[(QTMovie*)m_movie attributeForKey:@"QTMovieNaturalSizeAttribute"] sizeValue];
-
- m_nativeSize = QSize(size.width, size.height);
-
- if (!movieView) {
- movieView = [[HiddenQTMovieView alloc] initWithRenderer:this];
- m_movieView = movieView;
- [movieView setControllerVisible:NO];
- }
-
- [movieView setMovie:(QTMovie*)m_movie];
- [movieView setDrawRect:QRect(QPoint(0,0), m_nativeSize)];
- }
-
- if (m_surface && !m_nativeSize.isEmpty()) {
- bool coreImageFrameSupported = !m_surface->supportedPixelFormats(QAbstractVideoBuffer::CoreImageHandle).isEmpty() &&
- !m_surface->supportedPixelFormats(QAbstractVideoBuffer::GLTextureHandle).isEmpty();
-
- QVideoSurfaceFormat format(m_nativeSize, QVideoFrame::Format_RGB32,
- coreImageFrameSupported ? QAbstractVideoBuffer::CoreImageHandle : QAbstractVideoBuffer::NoHandle);
-
- if (m_surface->isActive() && m_surface->surfaceFormat() != format) {
-// qDebug() << "Surface format was changed, stop the surface.";
- m_surface->stop();
- }
-
- if (!m_surface->isActive()) {
- //qDebug() << "Starting the surface with format" << format;
- if (!m_surface->start(format)) {
- qWarning() << "Failed to start video surface" << m_surface->error();
- qWarning() << "Surface format:" << format;
- }
- }
- }
-}
-
-void QT7MovieViewRenderer::setMovie(void *movie)
-{
- if (movie == m_movie)
- return;
-
- QMutexLocker locker(&m_mutex);
- m_movie = movie;
- setupVideoOutput();
-}
-
-void QT7MovieViewRenderer::updateNaturalSize(const QSize &newSize)
-{
- if (m_nativeSize != newSize) {
- m_nativeSize = newSize;
- setupVideoOutput();
- }
-}
-
-QAbstractVideoSurface *QT7MovieViewRenderer::surface() const
-{
- return m_surface;
-}
-
-void QT7MovieViewRenderer::setSurface(QAbstractVideoSurface *surface)
-{
- if (surface == m_surface)
- return;
-
- QMutexLocker locker(&m_mutex);
-
- if (m_surface && m_surface->isActive())
- m_surface->stop();
-
- m_surface = surface;
- setupVideoOutput();
-}
-
-void QT7MovieViewRenderer::renderFrame(const QVideoFrame &frame)
-{
-
- QMutexLocker locker(&m_mutex);
- m_currentFrame = frame;
-
- if (!m_pendingRenderEvent)
- qApp->postEvent(this, new QEvent(QEvent::User), Qt::HighEventPriority);
-
- m_pendingRenderEvent = true;
-}
-
-bool QT7MovieViewRenderer::event(QEvent *event)
-{
- if (event->type() == QEvent::User) {
- QMutexLocker locker(&m_mutex);
- m_pendingRenderEvent = false;
- if (m_surface->isActive())
- m_surface->present(m_currentFrame);
- }
-
- return QT7VideoRendererControl::event(event);
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/qt7/qt7serviceplugin.h b/src/plugins/mediaservices/qt7/qt7serviceplugin.h
deleted file mode 100644
index 3871e10..0000000
--- a/src/plugins/mediaservices/qt7/qt7serviceplugin.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QT7SERVICEPLUGIN_H
-#define QT7SERVICEPLUGIN_H
-
-#include <QtMediaServices/qmediaserviceproviderplugin.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QT7ServicePlugin : public QMediaServiceProviderPlugin
-{
-public:
- QStringList keys() const;
- QMediaService* create(QString const& key);
- void release(QMediaService *service);
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QGSTREAMERSERVICEPLUGIN_H
diff --git a/src/plugins/mediaservices/qt7/qt7serviceplugin.mm b/src/plugins/mediaservices/qt7/qt7serviceplugin.mm
deleted file mode 100644
index 92b472f..0000000
--- a/src/plugins/mediaservices/qt7/qt7serviceplugin.mm
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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/qstring.h>
-#include <QtCore/qdebug.h>
-
-#include "qt7serviceplugin.h"
-#include "qt7playerservice.h"
-
-#include <QtMediaServices/qmediaserviceprovider.h>
-
-QT_BEGIN_NAMESPACE
-
-QStringList QT7ServicePlugin::keys() const
-{
- return QStringList()
-#ifdef QMEDIA_QT7_PLAYER
- << QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
-#endif
-}
-
-QMediaService* QT7ServicePlugin::create(QString const& key)
-{
-#ifdef QMEDIA_QT7_PLAYER
- if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER))
- return new QT7PlayerService;
-#endif
-
- qWarning() << "Attempt to create unknown service with key" << key;
- return 0;
-}
-
-void QT7ServicePlugin::release(QMediaService *service)
-{
- delete service;
-}
-
-Q_EXPORT_PLUGIN2(qt7_serviceplugin, QT7ServicePlugin);
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/qt7/qt7videooutputcontrol.h b/src/plugins/mediaservices/qt7/qt7videooutputcontrol.h
deleted file mode 100644
index 76066ba..0000000
--- a/src/plugins/mediaservices/qt7/qt7videooutputcontrol.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 QT7VIDEOOUTPUTCONTROL_H
-#define QT7VIDEOOUTPUTCONTROL_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qsize.h>
-
-#include <QtMediaServices/qvideooutputcontrol.h>
-#include <QtMediaServices/qvideowindowcontrol.h>
-#include <QtMediaServices/qvideowidgetcontrol.h>
-#include <QtMediaServices/qvideorenderercontrol.h>
-#include <QtMediaServices/qmediaplayer.h>
-
-#include <QtGui/qmacdefines_mac.h>
-
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QMediaPlaylist;
-class QMediaPlaylistNavigator;
-class QT7PlayerSession;
-class QT7PlayerService;
-
-
-class QT7VideoOutput {
-public:
- virtual ~QT7VideoOutput() {}
- virtual void setMovie(void *movie) = 0;
- virtual void updateNaturalSize(const QSize &newSize) = 0;
-};
-
-class QT7VideoWindowControl : public QVideoWindowControl, public QT7VideoOutput
-{
-public:
- virtual ~QT7VideoWindowControl() {}
-
-protected:
- QT7VideoWindowControl(QObject *parent)
- :QVideoWindowControl(parent)
- {}
-};
-
-class QT7VideoRendererControl : public QVideoRendererControl, public QT7VideoOutput
-{
-public:
- virtual ~QT7VideoRendererControl() {}
-
-protected:
- QT7VideoRendererControl(QObject *parent)
- :QVideoRendererControl(parent)
- {}
-};
-
-class QT7VideoWidgetControl : public QVideoWidgetControl, public QT7VideoOutput
-{
-public:
- virtual ~QT7VideoWidgetControl() {}
-
-protected:
- QT7VideoWidgetControl(QObject *parent)
- :QVideoWidgetControl(parent)
- {}
-};
-
-class QT7VideoOutputControl : public QVideoOutputControl
-{
-Q_OBJECT
-public:
- QT7VideoOutputControl(QObject *parent = 0);
- ~QT7VideoOutputControl();
-
- void setSession(QT7PlayerSession *session);
-
- QList<Output> availableOutputs() const;
- void enableOutput(Output);
-
- Output output() const;
- void setOutput(Output output);
-
-signals:
- void videoOutputChanged(QVideoOutputControl::Output);
-
-private:
- QT7PlayerSession *m_session;
- Output m_output;
- QList<Output> m_outputs;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/plugins/mediaservices/qt7/qt7videooutputcontrol.mm b/src/plugins/mediaservices/qt7/qt7videooutputcontrol.mm
deleted file mode 100644
index a468431..0000000
--- a/src/plugins/mediaservices/qt7/qt7videooutputcontrol.mm
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "qt7playercontrol.h"
-#include "qt7videooutputcontrol.h"
-#include "qt7playersession.h"
-#include <QtCore/qdebug.h>
-
-QT_BEGIN_NAMESPACE
-
-QT7VideoOutputControl::QT7VideoOutputControl(QObject *parent)
- :QVideoOutputControl(parent),
- m_session(0),
- m_output(QVideoOutputControl::NoOutput)
-{
-}
-
-QT7VideoOutputControl::~QT7VideoOutputControl()
-{
-}
-
-void QT7VideoOutputControl::setSession(QT7PlayerSession *session)
-{
- m_session = session;
-}
-
-QList<QVideoOutputControl::Output> QT7VideoOutputControl::availableOutputs() const
-{
- return m_outputs;
-}
-
-void QT7VideoOutputControl::enableOutput(QVideoOutputControl::Output output)
-{
- if (!m_outputs.contains(output))
- m_outputs.append(output);
-}
-
-QVideoOutputControl::Output QT7VideoOutputControl::output() const
-{
- return m_output;
-}
-
-void QT7VideoOutputControl::setOutput(Output output)
-{
- if (m_output != output) {
- m_output = output;
- emit videoOutputChanged(m_output);
- }
-
-}
-
-QT_END_NAMESPACE
-
-#include "moc_qt7videooutputcontrol.cpp"
-
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/mediaplayer.pri b/src/plugins/mediaservices/symbian/mediaplayer/mediaplayer.pri
deleted file mode 100644
index 205e014..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/mediaplayer.pri
+++ /dev/null
@@ -1,63 +0,0 @@
-INCLUDEPATH += $$PWD
-LIBS += -lmediaclientvideo \
- -lmediaclientaudio \
- -lws32 \
- -lfbscli \
- -lcone \
- -lmmfcontrollerframework \
- -lefsrv \
- -lbitgdi \
- -lapgrfx \
- -lapmime
-
-
-# We are building Symbian backend with media player support
-DEFINES += QMEDIA_MMF_PLAYER
-
-
-HEADERS += \
- $$PWD/s60mediaplayercontrol.h \
- $$PWD/s60mediaplayerservice.h \
- $$PWD/s60mediaplayersession.h \
- $$PWD/s60videoplayersession.h \
- $$PWD/s60mediametadataprovider.h \
- $$PWD/s60videosurface.h \
- $$PWD/s60videooverlay.h \
- $$PWD/s60videorenderer.h \
- $$PWD/s60mediarecognizer.h \
- $$PWD/s60audioplayersession.h \
- $$PWD/ms60mediaplayerresolver.h \
- $$PWD/s60videowidget.h \
- $$PWD/s60mediaplayeraudioendpointselector.h
-
-SOURCES += \
- $$PWD/s60mediaplayercontrol.cpp \
- $$PWD/s60mediaplayerservice.cpp \
- $$PWD/s60mediaplayersession.cpp \
- $$PWD/s60videoplayersession.cpp \
- $$PWD/s60mediametadataprovider.cpp \
- $$PWD/s60videosurface.cpp \
- $$PWD/s60videooverlay.cpp \
- $$PWD/s60videorenderer.cpp \
- $$PWD/s60mediarecognizer.cpp \
- $$PWD/s60audioplayersession.cpp \
- $$PWD/s60videowidget.cpp \
- $$PWD/s60mediaplayeraudioendpointselector.cpp
-
-contains(S60_VERSION, 3.1) {
-
- #3.1 doesn't provide audio routing in videoplayer
- DEFINES += HAS_NO_AUDIOROUTING_IN_VIDEOPLAYER
-
- !exists($${EPOCROOT}epoc32\release\winscw\udeb\audiooutputrouting.lib) {
- MMP_RULES += "$${LITERAL_HASH}ifdef WINSCW" \
- "MACRO HAS_NO_AUDIOROUTING" \
- "$${LITERAL_HASH}else" \
- "LIBRARY audiooutputrouting.lib" \
- "$${LITERAL_HASH}endif"
- }
-
-} else {
- LIBS += -laudiooutputrouting
-}
-
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/ms60mediaplayerresolver.h b/src/plugins/mediaservices/symbian/mediaplayer/ms60mediaplayerresolver.h
deleted file mode 100644
index b655a83..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/ms60mediaplayerresolver.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 MS60MEDIAPLAYERRESOLVER_H
-#define MS60MEDIAPLAYERRESOLVER_H
-
-QT_BEGIN_NAMESPACE
-
-class S60MediaPlayerSession;
-
-class MS60MediaPlayerResolver
-{
- public:
- virtual S60MediaPlayerSession* PlayerSession() = 0;
- virtual S60MediaPlayerSession* VideoPlayerSession() = 0;
- virtual S60MediaPlayerSession* AudioPlayerSession() = 0;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.cpp b/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.cpp
deleted file mode 100644
index f4065e4..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.cpp
+++ /dev/null
@@ -1,268 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "s60audioplayersession.h"
-#include <QtCore/qdebug.h>
-#include <QtCore/qvariant.h>
-
-#include <AudioOutput.h>
-#include <MAudioOutputObserver.h>
-
-QT_BEGIN_NAMESPACE
-
-S60AudioPlayerSession::S60AudioPlayerSession(QObject *parent)
- : S60MediaPlayerSession(parent)
- , m_player(0)
- , m_audioOutput(0)
- , m_audioEndpoint("Default")
-{
- QT_TRAP_THROWING(m_player = CAudioPlayer::NewL(*this, 0, EMdaPriorityPreferenceNone));
- m_player->RegisterForAudioLoadingNotification(*this);
-}
-
-S60AudioPlayerSession::~S60AudioPlayerSession()
-{
-#if !defined(HAS_NO_AUDIOROUTING)
- if (m_audioOutput)
- m_audioOutput->UnregisterObserver(*this);
- delete m_audioOutput;
-#endif
- m_player->Close();
- delete m_player;
-}
-
-void S60AudioPlayerSession::doLoadL(const TDesC &path)
-{
- // m_audioOutput needs to be reinitialized after MapcInitComplete
- if (m_audioOutput)
- m_audioOutput->UnregisterObserver(*this);
- delete m_audioOutput;
- m_audioOutput = NULL;
-
- m_player->OpenFileL(path);
-}
-
-qint64 S60AudioPlayerSession::doGetDurationL() const
-{
- return m_player->Duration().Int64() / qint64(1000);
-}
-
-qint64 S60AudioPlayerSession::doGetPositionL() const
-{
- TTimeIntervalMicroSeconds ms = 0;
- m_player->GetPosition(ms);
- return ms.Int64() / qint64(1000);
-}
-
-bool S60AudioPlayerSession::isVideoAvailable() const
-{
- return false;
-}
-bool S60AudioPlayerSession::isAudioAvailable() const
-{
- return true; // this is a bit happy scenario, but we do emit error that we can't play
-}
-
-void S60AudioPlayerSession::MaloLoadingStarted()
-{
- buffering();
-}
-
-void S60AudioPlayerSession::MaloLoadingComplete()
-{
- buffered();
-}
-
-void S60AudioPlayerSession::doPlay()
-{
-// For some reason loading progress callbalck are not called on emulator
-#ifdef __WINSCW__
- buffering();
-#endif
- m_player->Play();
-#ifdef __WINSCW__
- buffered();
-#endif
-
-}
-
-void S60AudioPlayerSession::doPauseL()
-{
- m_player->Pause();
-}
-
-void S60AudioPlayerSession::doStop()
-{
- m_player->Stop();
-}
-
-void S60AudioPlayerSession::doSetVolumeL(int volume)
-{
- m_player->SetVolume((volume / 100.0) * m_player->MaxVolume());
-}
-
-void S60AudioPlayerSession::doSetPositionL(qint64 microSeconds)
-{
- m_player->SetPosition(TTimeIntervalMicroSeconds(microSeconds));
-}
-
-void S60AudioPlayerSession::updateMetaDataEntriesL()
-{
- metaDataEntries().clear();
- int numberOfMetaDataEntries = 0;
-
- m_player->GetNumberOfMetaDataEntries(numberOfMetaDataEntries);
-
- for (int i = 0; i < numberOfMetaDataEntries; i++) {
- CMMFMetaDataEntry *entry = NULL;
- entry = m_player->GetMetaDataEntryL(i);
- metaDataEntries().insert(QString::fromUtf16(entry->Name().Ptr(), entry->Name().Length()), QString::fromUtf16(entry->Value().Ptr(), entry->Value().Length()));
- delete entry;
- }
- emit metaDataChanged();
-}
-
-int S60AudioPlayerSession::doGetBufferStatusL() const
-{
- int progress = 0;
- m_player->GetAudioLoadingProgressL(progress);
- return progress;
-}
-
-void S60AudioPlayerSession::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration)
-{
- Q_UNUSED(aDuration);
- setError(aError);
- TRAPD(err,
- m_audioOutput = CAudioOutput::NewL(*m_player);
- m_audioOutput->RegisterObserverL(*this);
- );
- setActiveEndpoint(m_audioEndpoint);
- setError(err);
- loaded();
-}
-
-void S60AudioPlayerSession::MapcPlayComplete(TInt aError)
-{
- setError(aError);
- endOfMedia();
-}
-
-void S60AudioPlayerSession::doSetAudioEndpoint(const QString& audioEndpoint)
-{
- m_audioEndpoint = audioEndpoint;
-}
-
-QString S60AudioPlayerSession::activeEndpoint() const
-{
- QString outputName = QString("Default");
-#if !defined(HAS_NO_AUDIOROUTING)
- if (m_audioOutput) {
- CAudioOutput::TAudioOutputPreference output = m_audioOutput->AudioOutput();
- outputName = qStringFromTAudioOutputPreference(output);
- }
-#endif
- return outputName;
-}
-
-QString S60AudioPlayerSession::defaultEndpoint() const
-{
- QString outputName = QString("Default");
-#if !defined(HAS_NO_AUDIOROUTING)
- if (m_audioOutput) {
- CAudioOutput::TAudioOutputPreference output = m_audioOutput->DefaultAudioOutput();
- outputName = qStringFromTAudioOutputPreference(output);
- }
-#endif
- return outputName;
-}
-
-void S60AudioPlayerSession::setActiveEndpoint(const QString& name)
-{
- CAudioOutput::TAudioOutputPreference output = CAudioOutput::ENoPreference;
-
- if (name == QString("Default"))
- output = CAudioOutput::ENoPreference;
- else if (name == QString("All"))
- output = CAudioOutput::EAll;
- else if (name == QString("None"))
- output = CAudioOutput::ENoOutput;
- else if (name == QString("Earphone"))
- output = CAudioOutput::EPrivate;
- else if (name == QString("Speaker"))
- output = CAudioOutput::EPublic;
-#if !defined(HAS_NO_AUDIOROUTING)
- if (m_audioOutput) {
- TRAPD(err, m_audioOutput->SetAudioOutputL(output));
- setError(err);
-
- if (m_audioEndpoint != name) {
- m_audioEndpoint = name;
- emit activeEndpointChanged(name);
- }
- }
-#endif
-}
-
-void S60AudioPlayerSession::DefaultAudioOutputChanged(CAudioOutput& aAudioOutput,
- CAudioOutput::TAudioOutputPreference aNewDefault)
-{
- // Emit already implemented in setActiveEndpoint function
- Q_UNUSED(aAudioOutput)
- Q_UNUSED(aNewDefault)
-}
-
-QString S60AudioPlayerSession::qStringFromTAudioOutputPreference(CAudioOutput::TAudioOutputPreference output) const
-{
- if (output == CAudioOutput::ENoPreference)
- return QString("Default");
- else if (output == CAudioOutput::EAll)
- return QString("All");
- else if (output == CAudioOutput::ENoOutput)
- return QString("None");
- else if (output == CAudioOutput::EPrivate)
- return QString("Earphone");
- else if (output == CAudioOutput::EPublic)
- return QString("Speaker");
- return QString("Default");
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h b/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h
deleted file mode 100644
index fca66b3..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60audioplayersession.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60AUDIOPLAYERSESSION_H
-#define S60AUDIOPLAYERSESSION_H
-
-#include "s60mediaplayersession.h"
-
-#include <mdaaudiosampleplayer.h>
-typedef CMdaAudioPlayerUtility CAudioPlayer;
-typedef MMdaAudioPlayerCallback MAudioPlayerObserver;
-
-#include <AudioOutput.h>
-#include <MAudioOutputObserver.h>
-
-QT_BEGIN_NAMESPACE
-
-class S60AudioPlayerSession : public S60MediaPlayerSession
- , public MAudioPlayerObserver
- , public MAudioLoadingObserver
- , public MAudioOutputObserver
-{
- Q_OBJECT
-
-public:
- S60AudioPlayerSession(QObject *parent);
- ~S60AudioPlayerSession();
-
- //From S60MediaPlayerSession
- bool isVideoAvailable() const;
- bool isAudioAvailable() const;
-
- // From MAudioLoadingObserver
- void MaloLoadingStarted();
- void MaloLoadingComplete();
-
- // From MAudioOutputObserver
- void DefaultAudioOutputChanged( CAudioOutput& aAudioOutput,
- CAudioOutput::TAudioOutputPreference aNewDefault );
-
-public:
- // From S60MediaPlayerAudioEndpointSelector
- QString activeEndpoint() const;
- QString defaultEndpoint() const;
-public Q_SLOTS:
- void setActiveEndpoint(const QString& name);
-Q_SIGNALS:
- void activeEndpointChanged(const QString & name);
-
-protected:
- //From S60MediaPlayerSession
- void doLoadL(const TDesC &path);
- void doLoadUrlL(const TDesC &path){Q_UNUSED(path)/*empty implementation*/}
- void doPlay();
- void doStop();
- void doPauseL();
- void doSetVolumeL(int volume);
- qint64 doGetPositionL() const;
- void doSetPositionL(qint64 microSeconds);
- void updateMetaDataEntriesL();
- int doGetBufferStatusL() const;
- qint64 doGetDurationL() const;
- void doSetAudioEndpoint(const QString& audioEndpoint);
-
-private:
- void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
- void MapcPlayComplete(TInt aError);
- QString qStringFromTAudioOutputPreference(CAudioOutput::TAudioOutputPreference output) const;
-
-private:
- CAudioPlayer *m_player;
- CAudioOutput *m_audioOutput;
- QString m_audioEndpoint;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60mediametadataprovider.cpp b/src/plugins/mediaservices/symbian/mediaplayer/s60mediametadataprovider.cpp
deleted file mode 100644
index e80c487..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60mediametadataprovider.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "s60mediametadataprovider.h"
-#include "s60mediaplayersession.h"
-#include <QtCore/qdebug.h>
-
-QT_BEGIN_NAMESPACE
-
-S60MediaMetaDataProvider::S60MediaMetaDataProvider(MS60MediaPlayerResolver& mediaPlayerResolver, QObject *parent)
- : QMetaDataControl(parent)
- , m_mediaPlayerResolver(mediaPlayerResolver)
- , m_session(NULL)
-{
-}
-
-S60MediaMetaDataProvider::~S60MediaMetaDataProvider()
-{
-}
-
-bool S60MediaMetaDataProvider::isMetaDataAvailable() const
-{
- m_session = m_mediaPlayerResolver.PlayerSession();
- if (m_session)
- return m_session->isMetadataAvailable();
- return false;
-}
-
-bool S60MediaMetaDataProvider::isWritable() const
-{
- return false;
-}
-
-QVariant S60MediaMetaDataProvider::metaData(QtMediaServices::MetaData key) const
-{
- m_session = m_mediaPlayerResolver.PlayerSession();
- if (m_session && m_session->isMetadataAvailable())
- return m_session->metaData(metaDataKeyAsString(key));
- return QVariant();
-}
-
-void S60MediaMetaDataProvider::setMetaData(QtMediaServices::MetaData key, QVariant const &value)
-{
- Q_UNUSED(key);
- Q_UNUSED(value);
-}
-QList<QtMediaServices::MetaData> S60MediaMetaDataProvider::availableMetaData() const
-{
- m_session = m_mediaPlayerResolver.PlayerSession();
- QList<QtMediaServices::MetaData> metaDataTags;
- if (m_session && m_session->isMetadataAvailable()) {
- for (int i = QtMediaServices::Title; i <= QtMediaServices::DeviceSettingDescription; i++) {
- QString metaData = metaDataKeyAsString((QtMediaServices::MetaData)i);
- if (!metaData.isEmpty()) {
- if (!m_session->metaData(metaData).toString().isEmpty()) {
- metaDataTags.append((QtMediaServices::MetaData)i);
- }
- }
- }
- }
- return metaDataTags;
-}
-
-QVariant S60MediaMetaDataProvider::extendedMetaData(const QString &key) const
-{
- m_session = m_mediaPlayerResolver.PlayerSession();
- if (m_session && m_session->isMetadataAvailable())
- return m_session->metaData(key);
- return QVariant();
-}
-
-void S60MediaMetaDataProvider::setExtendedMetaData(const QString &key, QVariant const &value)
-{
- Q_UNUSED(key);
- Q_UNUSED(value);
-}
-
-QStringList S60MediaMetaDataProvider::availableExtendedMetaData() const
-{
- m_session = m_mediaPlayerResolver.PlayerSession();
- if (m_session && m_session->isMetadataAvailable())
- return m_session->availableMetaData().keys();
- return QStringList();
-}
-
-QString S60MediaMetaDataProvider::metaDataKeyAsString(QtMediaServices::MetaData key) const
-{
- switch(key) {
- case QtMediaServices::Title: return "title";
- case QtMediaServices::AlbumArtist: return "artist";
- case QtMediaServices::Comment: return "comment";
- case QtMediaServices::Genre: return "genre";
- case QtMediaServices::Year: return "year";
- case QtMediaServices::Copyright: return "copyright";
- case QtMediaServices::AlbumTitle: return "album";
- case QtMediaServices::Composer: return "composer";
- case QtMediaServices::TrackNumber: return "albumtrack";
- case QtMediaServices::AudioBitRate: return "audiobitrate";
- case QtMediaServices::VideoBitRate: return "videobitrate";
- case QtMediaServices::Duration: return "duration";
- case QtMediaServices::MediaType: return "contenttype";
- case QtMediaServices::SubTitle: // TODO: Find the matching metadata keys
- case QtMediaServices::Description:
- case QtMediaServices::Category:
- case QtMediaServices::Date:
- case QtMediaServices::UserRating:
- case QtMediaServices::Keywords:
- case QtMediaServices::Language:
- case QtMediaServices::Publisher:
- case QtMediaServices::ParentalRating:
- case QtMediaServices::RatingOrganisation:
- case QtMediaServices::Size:
- case QtMediaServices::AudioCodec:
- case QtMediaServices::AverageLevel:
- case QtMediaServices::ChannelCount:
- case QtMediaServices::PeakValue:
- case QtMediaServices::SampleRate:
- case QtMediaServices::Author:
- case QtMediaServices::ContributingArtist:
- case QtMediaServices::Conductor:
- case QtMediaServices::Lyrics:
- case QtMediaServices::Mood:
- case QtMediaServices::TrackCount:
- case QtMediaServices::CoverArtUrlSmall:
- case QtMediaServices::CoverArtUrlLarge:
- case QtMediaServices::Resolution:
- case QtMediaServices::PixelAspectRatio:
- case QtMediaServices::VideoFrameRate:
- case QtMediaServices::VideoCodec:
- case QtMediaServices::PosterUrl:
- case QtMediaServices::ChapterNumber:
- case QtMediaServices::Director:
- case QtMediaServices::LeadPerformer:
- case QtMediaServices::Writer:
- case QtMediaServices::CameraManufacturer:
- case QtMediaServices::CameraModel:
- case QtMediaServices::Event:
- case QtMediaServices::Subject:
- default:
- break;
- }
-
- return QString();
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60mediametadataprovider.h b/src/plugins/mediaservices/symbian/mediaplayer/s60mediametadataprovider.h
deleted file mode 100644
index 07ae494..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60mediametadataprovider.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60MEDIAMETADATAPROVIDER_H
-#define S60MEDIAMETADATAPROVIDER_H
-
-#include <qmetadatacontrol.h>
-#include "ms60mediaplayerresolver.h"
-
-QT_BEGIN_NAMESPACE
-
-class S60MediaPlayerSession;
-
-class S60MediaMetaDataProvider : public QMetaDataControl
-{
- Q_OBJECT
-
-public:
- S60MediaMetaDataProvider(MS60MediaPlayerResolver& mediaPlayerResolver, QObject *parent = 0);
- ~S60MediaMetaDataProvider();
-
- bool isMetaDataAvailable() const;
- bool isWritable() const;
-
- QVariant metaData(QtMediaServices::MetaData key) const;
- void setMetaData(QtMediaServices::MetaData key, const QVariant &value);
- QList<QtMediaServices::MetaData> availableMetaData() const;
-
- QVariant extendedMetaData(const QString &key) const ;
- void setExtendedMetaData(const QString &key, const QVariant &value);
- QStringList availableExtendedMetaData() const;
-
-private:
- QString metaDataKeyAsString(QtMediaServices::MetaData key) const;
-
-private:
- MS60MediaPlayerResolver& m_mediaPlayerResolver;
- mutable S60MediaPlayerSession *m_session;
-};
-
-QT_END_NAMESPACE
-
-#endif // S60VIDEOMETADATAPROVIDER_H
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayeraudioendpointselector.cpp b/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayeraudioendpointselector.cpp
deleted file mode 100644
index dbeed90..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayeraudioendpointselector.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "s60mediaplayercontrol.h"
-#include "s60mediaplayersession.h"
-#include "s60mediaplayeraudioendpointselector.h"
-
-#include <QtGui/QIcon>
-#include <QtCore/QDebug>
-
-QT_BEGIN_NAMESPACE
-
-S60MediaPlayerAudioEndpointSelector::S60MediaPlayerAudioEndpointSelector(QObject *control, QObject *parent)
- :QMediaControl(parent)
- , m_control(0)
- , m_audioEndpointNames(0)
-{
- m_control = qobject_cast<S60MediaPlayerControl*>(control);
-}
-
-S60MediaPlayerAudioEndpointSelector::~S60MediaPlayerAudioEndpointSelector()
-{
- delete m_audioEndpointNames;
-}
-
-QList<QString> S60MediaPlayerAudioEndpointSelector::availableEndpoints() const
-{
- if(m_audioEndpointNames->count() == 0) {
- m_audioEndpointNames->append("Default");
- m_audioEndpointNames->append("All");
- m_audioEndpointNames->append("None");
- m_audioEndpointNames->append("Earphone");
- m_audioEndpointNames->append("Speaker");
- }
- return *m_audioEndpointNames;
-}
-
-QString S60MediaPlayerAudioEndpointSelector::endpointDescription(const QString& name) const
-{
- if (name == QString("Default")) //ENoPreference
- return QString("Used to indicate that the playing audio can be routed to"
- "any speaker. This is the default value for audio.");
- else if (name == QString("All")) //EAll
- return QString("Used to indicate that the playing audio should be routed to all speakers.");
- else if (name == QString("None")) //ENoOutput
- return QString("Used to indicate that the playing audio should not be routed to any output.");
- else if (name == QString("Earphone")) //EPrivate
- return QString("Used to indicate that the playing audio should be routed to"
- "the default private speaker. A private speaker is one that can only"
- "be heard by one person.");
- else if (name == QString("Speaker")) //EPublic
- return QString("Used to indicate that the playing audio should be routed to"
- "the default public speaker. A public speaker is one that can "
- "be heard by multiple people.");
-
- return QString();
-}
-
-QString S60MediaPlayerAudioEndpointSelector::activeEndpoint() const
-{
- if (m_control->session())
- return m_control->session()->activeEndpoint();
- else
- return m_control->mediaControlSettings().audioEndpoint();
-}
-
-QString S60MediaPlayerAudioEndpointSelector::defaultEndpoint() const
-{
- if (m_control->session())
- return m_control->session()->defaultEndpoint();
- else
- return m_control->mediaControlSettings().audioEndpoint();
-}
-
-void S60MediaPlayerAudioEndpointSelector::setActiveEndpoint(const QString& name)
-{
- QString oldEndpoint = m_control->mediaControlSettings().audioEndpoint();
-
- if (name != oldEndpoint && (name == QString("Default") || name == QString("All") ||
- name == QString("None") || name == QString("Earphone") || name == QString("Speaker"))) {
-
- if (m_control->session()) {
- m_control->session()->setActiveEndpoint(name);
- }
- m_control->setAudioEndpoint(name);
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayeraudioendpointselector.h b/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayeraudioendpointselector.h
deleted file mode 100644
index a110ae8..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayeraudioendpointselector.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60MEDIAPLAYERAUDIOENDPOINTSELECTOR_H
-#define S60MEDIAPLAYERAUDIOENDPOINTSELECTOR_H
-
-#include <QStringList>
-
-#include <QtMediaServices/qmediacontrol.h>
-
-QT_BEGIN_NAMESPACE
-
-class S60MediaPlayerControl;
-class S60MediaPlayerSession;
-
-class S60MediaPlayerAudioEndpointSelector : public QMediaControl
-{
-
-Q_OBJECT
-
-public:
- S60MediaPlayerAudioEndpointSelector(QObject *control, QObject *parent = 0);
- ~S60MediaPlayerAudioEndpointSelector();
-
- QList<QString> availableEndpoints() const ;
- QString endpointDescription(const QString& name) const;
- QString defaultEndpoint() const;
- QString activeEndpoint() const;
-
-public Q_SLOTS:
- void setActiveEndpoint(const QString& name);
-
-private:
- S60MediaPlayerControl* m_control;
- QString m_audioInput;
- QList<QString> *m_audioEndpointNames;
-};
-
-#define QAudioEndpointSelector_iid "com.nokia.Qt.QAudioEndpointSelector/1.0"
-
-QT_END_NAMESPACE
-
-#endif // S60MEDIAPLAYERAUDIOENDPOINTSELECTOR_H
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayercontrol.cpp b/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayercontrol.cpp
deleted file mode 100644
index 8e03afd..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayercontrol.cpp
+++ /dev/null
@@ -1,274 +0,0 @@
-
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "s60mediaplayercontrol.h"
-#include "s60mediaplayersession.h"
-
-#include <QtCore/qdir.h>
-#include <QtCore/qurl.h>
-#include <QtCore/qdebug.h>
-
-QT_BEGIN_NAMESPACE
-
-S60MediaPlayerControl::S60MediaPlayerControl(MS60MediaPlayerResolver& mediaPlayerResolver, QObject *parent)
- : QMediaPlayerControl(parent),
- m_mediaPlayerResolver(mediaPlayerResolver),
- m_session(NULL),
- m_stream(NULL)
-{
-}
-
-S60MediaPlayerControl::~S60MediaPlayerControl()
-{
-}
-
-qint64 S60MediaPlayerControl::position() const
-{
- if (m_session)
- return m_session->position();
- return 0;
-}
-
-qint64 S60MediaPlayerControl::duration() const
-{
- if (m_session)
- return m_session->duration();
- return -1;
-}
-
-QMediaPlayer::State S60MediaPlayerControl::state() const
-{
- if (m_session)
- return m_session->state();
- return QMediaPlayer::StoppedState;
-}
-
-QMediaPlayer::MediaStatus S60MediaPlayerControl::mediaStatus() const
-{
- if (m_session)
- return m_session->mediaStatus();
- return m_mediaSettings.mediaStatus();
-}
-
-int S60MediaPlayerControl::bufferStatus() const
-{
- if (m_session)
- return m_session->bufferStatus();
- return 0;
-}
-
-int S60MediaPlayerControl::volume() const
-{
- if (m_session)
- return m_session->volume();
- return m_mediaSettings.volume();
-}
-
-bool S60MediaPlayerControl::isMuted() const
-{
- if (m_session)
- return m_session->isMuted();
- return m_mediaSettings.isMuted();
-}
-
-bool S60MediaPlayerControl::isSeekable() const
-{
- if (m_session)
- return m_session->isSeekable();
- return false;
-}
-
-QMediaTimeRange S60MediaPlayerControl::availablePlaybackRanges() const
-{
- QMediaTimeRange ranges;
-
- if(m_session && m_session->isSeekable())
- ranges.addInterval(0, m_session->duration());
-
- return ranges;
-}
-
-qreal S60MediaPlayerControl::playbackRate() const
-{
- //None of symbian players supports this.
- return m_mediaSettings.playbackRate();
-}
-
-void S60MediaPlayerControl::setPlaybackRate(qreal rate)
-{
- //None of symbian players supports this.
- m_mediaSettings.setPlaybackRate(rate);
- emit playbackRateChanged(playbackRate());
-
-}
-
-void S60MediaPlayerControl::setPosition(qint64 pos)
-{
- if (m_session)
- m_session->setPosition(pos);
-}
-
-void S60MediaPlayerControl::play()
-{
- if (m_session)
- m_session->play();
-}
-
-void S60MediaPlayerControl::pause()
-{
- if (m_session)
- m_session->pause();
-}
-
-void S60MediaPlayerControl::stop()
-{
- if (m_session)
- m_session->stop();
-}
-
-void S60MediaPlayerControl::setVolume(int volume)
-{
- int boundVolume = qBound(0, volume, 100);
- if (boundVolume == m_mediaSettings.volume())
- return;
-
- m_mediaSettings.setVolume(boundVolume);
- if (m_session)
- m_session->setVolume(boundVolume);
-
- emit volumeChanged(boundVolume);
-}
-
-void S60MediaPlayerControl::setMuted(bool muted)
-{
- if (m_mediaSettings.isMuted() == muted)
- return;
-
- m_mediaSettings.setMuted(muted);
- if (m_session)
- m_session->setMuted(muted);
-
- emit mutedChanged(muted);
-}
-
-QMediaContent S60MediaPlayerControl::media() const
-{
- return m_currentResource;
-}
-
-const QIODevice *S60MediaPlayerControl::mediaStream() const
-{
- return m_stream;
-}
-
-void S60MediaPlayerControl::setMedia(const QMediaContent &source, QIODevice *stream)
-{
- Q_UNUSED(stream)
- // we don't want to set & load media again when it is already loaded
- if (m_session && m_currentResource == source)
- return;
-
- // store to variable as session is created based on the content type.
- m_currentResource = source;
- S60MediaPlayerSession *newSession = m_mediaPlayerResolver.PlayerSession();
- m_mediaSettings.setMediaStatus(QMediaPlayer::UnknownMediaStatus);
-
- if (m_session)
- m_session->reset();
- else {
- emit mediaStatusChanged(QMediaPlayer::UnknownMediaStatus);
- emit error(QMediaPlayer::NoError, QString());
- }
-
- m_session = newSession;
-
- if (m_session)
- m_session->load(source.canonicalUrl());
- else {
- QMediaPlayer::MediaStatus status = (source.isNull()) ? QMediaPlayer::NoMedia : QMediaPlayer::InvalidMedia;
- m_mediaSettings.setMediaStatus(status);
- emit stateChanged(QMediaPlayer::StoppedState);
- emit error((source.isNull()) ? QMediaPlayer::NoError : QMediaPlayer::ResourceError,
- (source.isNull()) ? "" : tr("Media couldn't be resolved"));
- emit mediaStatusChanged(status);
- }
- emit mediaChanged(m_currentResource);
- }
-
-S60MediaPlayerSession* S60MediaPlayerControl::session()
-{
- return m_session;
-}
-
-void S60MediaPlayerControl::setVideoOutput(QObject *output)
-{
- S60MediaPlayerSession *session = NULL;
- session = m_mediaPlayerResolver.VideoPlayerSession();
- session->setVideoRenderer(output);
-}
-
-bool S60MediaPlayerControl::isAudioAvailable() const
-{
- if (m_session)
- return m_session->isAudioAvailable();
- return false;
-}
-
-bool S60MediaPlayerControl::isVideoAvailable() const
-{
- if (m_session)
- return m_session->isVideoAvailable();
- return false;
-}
-
-const S60MediaSettings& S60MediaPlayerControl::mediaControlSettings() const
-{
- return m_mediaSettings;
-}
-
-void S60MediaPlayerControl::setAudioEndpoint(const QString& name)
-{
- m_mediaSettings.setAudioEndpoint(name);
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayercontrol.h b/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayercontrol.h
deleted file mode 100644
index 3d26a5e..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayercontrol.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60MEDIAPLAYERCONTROL_H
-#define S60MEDIAPLAYERCONTROL_H
-
-#include <QtCore/qobject.h>
-
-#include <qmediaplayercontrol.h>
-
-#include "ms60mediaplayerresolver.h"
-#include <QtCore/qdebug.h>
-
-QT_BEGIN_NAMESPACE
-
-class QMediaPlayer;
-class QMediaTimeRange;
-class QMediaContent;
-
-
-class S60MediaPlayerSession;
-class S60MediaPlayerService;
-
-class S60MediaSettings
-{
-
-public:
- S60MediaSettings()
- : m_volume(0)
- , m_muted(false)
- , m_playbackRate(0)
- , m_mediaStatus(QMediaPlayer::UnknownMediaStatus)
- , m_audioEndpoint(QString("Default"))
- {
- }
-
- void setVolume(int volume) { m_volume = volume; }
- void setMuted(bool muted) { m_muted = muted; }
- void setPlaybackRate(int rate) { m_playbackRate = rate; }
- void setMediaStatus(QMediaPlayer::MediaStatus status) {m_mediaStatus=status;}
- void setAudioEndpoint(const QString& audioEndpoint) { m_audioEndpoint = audioEndpoint; }
-
- int volume() const { return m_volume; }
- bool isMuted() const { return m_muted; }
- qreal playbackRate() const { return m_playbackRate; }
- QMediaPlayer::MediaStatus mediaStatus() const {return m_mediaStatus;}
- QString audioEndpoint() const { return m_audioEndpoint; }
-
-private:
- int m_volume;
- bool m_muted;
- qreal m_playbackRate;
- QMediaPlayer::MediaStatus m_mediaStatus;
- QString m_audioEndpoint;
-};
-
-class S60MediaPlayerControl : public QMediaPlayerControl
-{
- Q_OBJECT
-
-public:
- S60MediaPlayerControl(MS60MediaPlayerResolver& mediaPlayerResolver, QObject *parent = 0);
- ~S60MediaPlayerControl();
-
- // from QMediaPlayerControl
- virtual QMediaPlayer::State state() const;
- virtual QMediaPlayer::MediaStatus mediaStatus() const;
- virtual qint64 duration() const;
- virtual qint64 position() const;
- virtual void setPosition(qint64 pos);
- virtual int volume() const;
- virtual void setVolume(int volume);
- virtual bool isMuted() const;
- virtual void setMuted(bool muted);
- virtual int bufferStatus() const;
- virtual bool isAudioAvailable() const;
- virtual bool isVideoAvailable() const;
- virtual bool isSeekable() const;
- virtual QMediaTimeRange availablePlaybackRanges() const;
- virtual qreal playbackRate() const;
- virtual void setPlaybackRate(qreal rate);
- virtual QMediaContent media() const;
- virtual const QIODevice *mediaStream() const;
- virtual void setMedia(const QMediaContent&, QIODevice *);
- virtual void play();
- virtual void pause();
- virtual void stop();
- S60MediaPlayerSession* session();
- void setAudioEndpoint(const QString& name);
-
- // Own methods
- void setVideoOutput(QObject *output);
- const S60MediaSettings& mediaControlSettings() const;
-
-private:
- MS60MediaPlayerResolver &m_mediaPlayerResolver;
- S60MediaPlayerSession *m_session;
- QMediaContent m_currentResource;
- QIODevice *m_stream;
- S60MediaSettings m_mediaSettings;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayerservice.cpp b/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayerservice.cpp
deleted file mode 100644
index 0b1c7d5..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayerservice.cpp
+++ /dev/null
@@ -1,259 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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/qvariant.h>
-#include <QtCore/qdebug.h>
-#include <QtGui/qwidget.h>
-
-#include "s60mediaplayerservice.h"
-#include "s60mediaplayercontrol.h"
-#include "s60videoplayersession.h"
-#include "s60audioplayersession.h"
-#include "s60mediametadataprovider.h"
-#include "s60videowidget.h"
-#include "s60mediarecognizer.h"
-//#include <qmediatimerange.h>
-#include "s60videooverlay.h"
-#include "s60videorenderer.h"
-#include "s60mediaplayeraudioendpointselector.h"
-
-#include <qmediaplaylistnavigator.h>
-#include <qmediaplaylist.h>
-
-QT_BEGIN_NAMESPACE
-
-S60MediaPlayerService::S60MediaPlayerService(QObject *parent)
- : QMediaService(parent)
- , m_control(NULL)
- , m_videoOutput(NULL)
- , m_videoPlayerSession(NULL)
- , m_audioPlayerSession(NULL)
- , m_metaData(NULL)
- , m_videoWidget(NULL)
- , m_videoWindow(NULL)
- , m_videoRenderer(NULL)
- , m_audioEndpointSelector(NULL)
-{
- m_control = new S60MediaPlayerControl(*this, this);
- m_metaData = new S60MediaMetaDataProvider(*this);
- m_audioEndpointSelector = new S60MediaPlayerAudioEndpointSelector(m_control, this);
-}
-
-S60MediaPlayerService::~S60MediaPlayerService()
-{
- delete m_videoWidget;
- delete m_videoRenderer;
- delete m_videoWindow;
- delete m_videoOutput;
-}
-
-QMediaControl *S60MediaPlayerService::control(const char *name) const
-{
- if (qstrcmp(name, QMediaPlayerControl_iid) == 0)
- return m_control;
-
- if (qstrcmp(name, QMetaDataControl_iid) == 0) {
- return m_metaData;
- }
-
- if (qstrcmp(name, QVideoOutputControl_iid) == 0) {
- if (!m_videoOutput) {
- m_videoOutput = new S60VideoOutputControl;
- connect(m_videoOutput, SIGNAL(outputChanged(QVideoOutputControl::Output)),
- this, SLOT(videoOutputChanged(QVideoOutputControl::Output)));
- m_videoOutput->setAvailableOutputs(QList<QVideoOutputControl::Output>()
-// << QVideoOutputControl::RendererOutput
-// << QVideoOutputControl::WindowOutput
- << QVideoOutputControl::WidgetOutput);
-
- }
- return m_videoOutput;
- }
-
- if (qstrcmp(name, QVideoWidgetControl_iid) == 0) {
- if (!m_videoWidget)
- m_videoWidget = new S60VideoWidgetControl;
- return m_videoWidget;
- }
-
- if (qstrcmp(name, QVideoRendererControl_iid) == 0) {
- if (m_videoRenderer)
- m_videoRenderer = new S60VideoRenderer;
- return m_videoRenderer;
- }
-
- if (qstrcmp(name, QVideoWindowControl_iid) == 0) {
- if (!m_videoWindow)
- m_videoWindow = new S60VideoOverlay;
- return m_videoWindow;
- }
-
- if (qstrcmp(name, QAudioEndpointSelector_iid) == 0) {
- return m_audioEndpointSelector;
- }
-
- return 0;
-
-}
-
-void S60MediaPlayerService::videoOutputChanged(QVideoOutputControl::Output output)
-{
- switch (output) {
- case QVideoOutputControl::NoOutput:
- m_control->setVideoOutput(0);
- break;
-
- case QVideoOutputControl::RendererOutput:
- m_control->setVideoOutput(m_videoRenderer);
- break;
- case QVideoOutputControl::WindowOutput:
- m_control->setVideoOutput(m_videoWindow);
- break;
-
- case QVideoOutputControl::WidgetOutput:
- m_control->setVideoOutput(m_videoWidget);
- break;
- default:
- qWarning("Invalid video output selection");
- break;
- }
-}
-
-S60MediaPlayerSession* S60MediaPlayerService::PlayerSession()
-{
- QUrl url = m_control->media().canonicalUrl();
-
- if (url.isEmpty() == true) {
- return NULL;
- }
-
- S60MediaRecognizer *m_mediaRecognizer = new S60MediaRecognizer(this);
- S60MediaRecognizer::MediaType mediaType = m_mediaRecognizer->mediaType(url);
-
- switch (mediaType) {
- case S60MediaRecognizer::Video:
- case S60MediaRecognizer::Url:
- return VideoPlayerSession();
- case S60MediaRecognizer::Audio:
- return AudioPlayerSession();
- default:
- break;
- }
-
- return NULL;
-}
-
-S60MediaPlayerSession* S60MediaPlayerService::VideoPlayerSession()
-{
- if (!m_videoPlayerSession) {
- m_videoPlayerSession = new S60VideoPlayerSession(this);
-
- connect(m_videoPlayerSession, SIGNAL(positionChanged(qint64)),
- m_control, SIGNAL(positionChanged(qint64)));
- connect(m_videoPlayerSession, SIGNAL(durationChanged(qint64)),
- m_control, SIGNAL(durationChanged(qint64)));
- connect(m_videoPlayerSession, SIGNAL(stateChanged(QMediaPlayer::State)),
- m_control, SIGNAL(stateChanged(QMediaPlayer::State)));
- connect(m_videoPlayerSession, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)),
- m_control, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)));
- connect(m_videoPlayerSession,SIGNAL(bufferStatusChanged(int)),
- m_control, SIGNAL(bufferStatusChanged(int)));
- connect(m_videoPlayerSession, SIGNAL(videoAvailableChanged(bool)),
- m_control, SIGNAL(videoAvailableChanged(bool)));
- connect(m_videoPlayerSession, SIGNAL(audioAvailableChanged(bool)),
- m_control, SIGNAL(audioAvailableChanged(bool)));
- connect(m_videoPlayerSession, SIGNAL(seekableChanged(bool)),
- m_control, SIGNAL(seekableChanged(bool)));
- connect(m_videoPlayerSession, SIGNAL(availablePlaybackRangesChanged(const QMediaTimeRange&)),
- m_control, SIGNAL(availablePlaybackRangesChanged(const QMediaTimeRange&)));
- connect(m_videoPlayerSession, SIGNAL(error(int, const QString &)),
- m_control, SIGNAL(error(int, const QString &)));
- connect(m_videoPlayerSession, SIGNAL(metaDataChanged()),
- m_metaData, SIGNAL(metaDataChanged()));
- connect(m_videoPlayerSession, SIGNAL(activeEndpointChanged(const QString&)),
- m_audioEndpointSelector, SIGNAL(activeEndpointChanged(const QString&)));
- }
-
- m_videoPlayerSession->setVolume(m_control->mediaControlSettings().volume());
- m_videoPlayerSession->setMuted(m_control->mediaControlSettings().isMuted());
- m_videoPlayerSession->setAudioEndpoint(m_control->mediaControlSettings().audioEndpoint());
- return m_videoPlayerSession;
-}
-
-S60MediaPlayerSession* S60MediaPlayerService::AudioPlayerSession()
-{
- if (!m_audioPlayerSession) {
- m_audioPlayerSession = new S60AudioPlayerSession(this);
-
- connect(m_audioPlayerSession, SIGNAL(positionChanged(qint64)),
- m_control, SIGNAL(positionChanged(qint64)));
- connect(m_audioPlayerSession, SIGNAL(durationChanged(qint64)),
- m_control, SIGNAL(durationChanged(qint64)));
- connect(m_audioPlayerSession, SIGNAL(stateChanged(QMediaPlayer::State)),
- m_control, SIGNAL(stateChanged(QMediaPlayer::State)));
- connect(m_audioPlayerSession, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)),
- m_control, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)));
- connect(m_audioPlayerSession,SIGNAL(bufferStatusChanged(int)),
- m_control, SIGNAL(bufferStatusChanged(int)));
- connect(m_audioPlayerSession, SIGNAL(videoAvailableChanged(bool)),
- m_control, SIGNAL(videoAvailableChanged(bool)));
- connect(m_audioPlayerSession, SIGNAL(audioAvailableChanged(bool)),
- m_control, SIGNAL(audioAvailableChanged(bool)));
- connect(m_audioPlayerSession, SIGNAL(seekableChanged(bool)),
- m_control, SIGNAL(seekableChanged(bool)));
- connect(m_audioPlayerSession, SIGNAL(availablePlaybackRangesChanged(const QMediaTimeRange&)),
- m_control, SIGNAL(availablePlaybackRangesChanged(const QMediaTimeRange&)));
- connect(m_audioPlayerSession, SIGNAL(error(int, const QString &)),
- m_control, SIGNAL(error(int, const QString &)));
- connect(m_audioPlayerSession, SIGNAL(metaDataChanged()),
- m_metaData, SIGNAL(metaDataChanged()));
- connect(m_audioPlayerSession, SIGNAL(activeEndpointChanged(const QString&)),
- m_audioEndpointSelector, SIGNAL(activeEndpointChanged(const QString&)));
- }
-
- m_audioPlayerSession->setVolume(m_control->mediaControlSettings().volume());
- m_audioPlayerSession->setMuted(m_control->mediaControlSettings().isMuted());
- m_audioPlayerSession->setAudioEndpoint(m_control->mediaControlSettings().audioEndpoint());
- return m_audioPlayerSession;
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayerservice.h b/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayerservice.h
deleted file mode 100644
index 6c8155d..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayerservice.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60VIDEOPLAYERSERVICE_H
-#define S60VIDEOPLAYERSERVICE_H
-
-#include <QtCore/qobject.h>
-
-#include <qmediaservice.h>
-#include <qvideooutputcontrol.h>
-
-#include "s60videooutputcontrol.h"
-#include "ms60mediaplayerresolver.h"
-
-#include "s60mediaplayeraudioendpointselector.h"
-
-QT_BEGIN_NAMESPACE
-
-class QMediaMetaData;
-class QMediaPlayerControl;
-class QMediaPlaylist;
-
-
-class S60VideoPlayerSession;
-class S60AudioPlayerSession;
-class S60MediaPlayerControl;
-class S60MediaMetaDataProvider;
-class S60VideoWidgetControl;
-class S60MediaRecognizer;
-class S60VideoRenderer;
-class S60VideoOverlay;
-
-class QMediaPlaylistNavigator;
-
-class S60MediaPlayerService : public QMediaService, public MS60MediaPlayerResolver
-{
- Q_OBJECT
-
-public:
- S60MediaPlayerService(QObject *parent = 0);
- ~S60MediaPlayerService();
-
- QMediaControl *control(const char *name) const;
-
-private slots:
- void videoOutputChanged(QVideoOutputControl::Output output);
-
-protected: // From MS60MediaPlayerResolver
- S60MediaPlayerSession* PlayerSession();
- S60MediaPlayerSession* VideoPlayerSession();
- S60MediaPlayerSession* AudioPlayerSession();
-
-private:
- S60MediaPlayerControl *m_control;
- mutable S60VideoOutputControl *m_videoOutput;
- S60VideoPlayerSession *m_videoPlayerSession;
- S60AudioPlayerSession *m_audioPlayerSession;
- mutable S60MediaMetaDataProvider *m_metaData;
- mutable S60VideoWidgetControl *m_videoWidget;
- mutable S60VideoOverlay *m_videoWindow;
- mutable S60VideoRenderer *m_videoRenderer;
- S60MediaPlayerAudioEndpointSelector *m_audioEndpointSelector;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayersession.cpp b/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayersession.cpp
deleted file mode 100644
index 693c103..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayersession.cpp
+++ /dev/null
@@ -1,496 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "s60mediaplayersession.h"
-
-#include <QtCore/qdebug.h>
-#include <QtCore/qdir.h>
-#include <QtCore/qvariant.h>
-#include <QtCore/qtimer.h>
-#include <mmf/common/mmferrors.h>
-#include <qmediatimerange.h>
-
-QT_BEGIN_NAMESPACE
-
-S60MediaPlayerSession::S60MediaPlayerSession(QObject *parent)
- : QObject(parent)
- , m_playbackRate(0)
- , m_muted(false)
- , m_volume(0)
- , m_state(QMediaPlayer::StoppedState)
- , m_mediaStatus(QMediaPlayer::UnknownMediaStatus)
- , m_progressTimer(new QTimer(this))
- , m_stalledTimer(new QTimer(this))
- , m_error(KErrNone)
- , m_play_requested(false)
- , m_stream(false)
-{
- connect(m_progressTimer, SIGNAL(timeout()), this, SLOT(tick()));
- connect(m_stalledTimer, SIGNAL(timeout()), this, SLOT(stalled()));
-}
-
-S60MediaPlayerSession::~S60MediaPlayerSession()
-{
-}
-
-int S60MediaPlayerSession::volume() const
-{
- return m_volume;
-}
-
-void S60MediaPlayerSession::setVolume(int volume)
-{
- if (m_volume == volume)
- return;
-
- m_volume = volume;
- // Dont set symbian players volume until media loaded.
- // Leaves with KerrNotReady although documentation says otherwise.
- if (!m_muted &&
- ( mediaStatus() == QMediaPlayer::LoadedMedia
- || mediaStatus() == QMediaPlayer::StalledMedia
- || mediaStatus() == QMediaPlayer::BufferingMedia
- || mediaStatus() == QMediaPlayer::BufferedMedia
- || mediaStatus() == QMediaPlayer::EndOfMedia)) {
- TRAPD(err, doSetVolumeL(m_volume));
- setError(err);
- }
-}
-
-bool S60MediaPlayerSession::isMuted() const
-{
- return m_muted;
-}
-
-bool S60MediaPlayerSession::isSeekable() const
-{
- return (m_stream)?false:true;
-}
-
-void S60MediaPlayerSession::setMediaStatus(QMediaPlayer::MediaStatus status)
-{
- if (m_mediaStatus == status)
- return;
-
- m_mediaStatus = status;
-
- emit mediaStatusChanged(m_mediaStatus);
-
- if (m_play_requested)
- play();
-}
-
-void S60MediaPlayerSession::setState(QMediaPlayer::State state)
-{
- if (m_state == state)
- return;
-
- m_state = state;
- emit stateChanged(m_state);
-}
-
-QMediaPlayer::State S60MediaPlayerSession::state() const
-{
- return m_state;
-}
-
-QMediaPlayer::MediaStatus S60MediaPlayerSession::mediaStatus() const
-{
- return m_mediaStatus;
-}
-
-void S60MediaPlayerSession::load(QUrl url)
-{
- setMediaStatus(QMediaPlayer::LoadingMedia);
- startStalledTimer();
- m_stream = (url.scheme() == "file")?false:true;
- TRAPD(err,
- if(m_stream)
- doLoadUrlL(QString2TPtrC(url.toString()));
- else
- doLoadL(QString2TPtrC(QDir::toNativeSeparators(url.toLocalFile()))));
- setError(err);
-}
-
-void S60MediaPlayerSession::play()
-{
- if (state() == QMediaPlayer::PlayingState
- || mediaStatus() == QMediaPlayer::UnknownMediaStatus
- || mediaStatus() == QMediaPlayer::NoMedia
- || mediaStatus() == QMediaPlayer::InvalidMedia)
- return;
-
- if (mediaStatus() == QMediaPlayer::LoadingMedia) {
- m_play_requested = true;
- return;
- }
-
- m_play_requested = false;
- setState(QMediaPlayer::PlayingState);
- startProgressTimer();
- doPlay();
-}
-
-void S60MediaPlayerSession::pause()
-{
- if (mediaStatus() == QMediaPlayer::NoMedia ||
- mediaStatus() == QMediaPlayer::InvalidMedia)
- return;
-
- setState(QMediaPlayer::PausedState);
- stopProgressTimer();
- TRAP_IGNORE(doPauseL());
-}
-
-void S60MediaPlayerSession::stop()
-{
- m_play_requested = false;
- setState(QMediaPlayer::StoppedState);
- if (mediaStatus() == QMediaPlayer::BufferingMedia ||
- mediaStatus() == QMediaPlayer::BufferedMedia)
- setMediaStatus(QMediaPlayer::LoadedMedia);
- if (mediaStatus() == QMediaPlayer::LoadingMedia)
- setMediaStatus(QMediaPlayer::UnknownMediaStatus);
- stopProgressTimer();
- stopStalledTimer();
- doStop();
- emit positionChanged(0);
-}
-void S60MediaPlayerSession::reset()
-{
- m_play_requested = false;
- setError(KErrNone, QString(), true);
- stopProgressTimer();
- stopStalledTimer();
- doStop();
- setState(QMediaPlayer::StoppedState);
- setMediaStatus(QMediaPlayer::UnknownMediaStatus);
-}
-
-void S60MediaPlayerSession::setVideoRenderer(QObject *renderer)
-{
- Q_UNUSED(renderer);
-}
-
-int S60MediaPlayerSession::bufferStatus()
-{
- if( mediaStatus() == QMediaPlayer::LoadingMedia
- || mediaStatus() == QMediaPlayer::UnknownMediaStatus
- || mediaStatus() == QMediaPlayer::NoMedia
- || mediaStatus() == QMediaPlayer::InvalidMedia)
- return 0;
-
- int progress = 0;
- TRAPD(err, progress = doGetBufferStatusL());
-
- // If buffer status query not supported by codec return 100
- // do not set error
- if(err == KErrNotSupported)
- return 100;
-
- setError(err);
- return progress;
-}
-
-bool S60MediaPlayerSession::isMetadataAvailable() const
-{
- return !m_metaDataMap.isEmpty();
-}
-
-QVariant S60MediaPlayerSession::metaData(const QString &key) const
-{
- return m_metaDataMap.value(key);
-}
-
-QMap<QString, QVariant> S60MediaPlayerSession::availableMetaData() const
-{
- return m_metaDataMap;
-}
-
-void S60MediaPlayerSession::setMuted(bool muted)
-{
- m_muted = muted;
-
- if( m_mediaStatus == QMediaPlayer::LoadedMedia
- || m_mediaStatus == QMediaPlayer::StalledMedia
- || m_mediaStatus == QMediaPlayer::BufferingMedia
- || m_mediaStatus == QMediaPlayer::BufferedMedia
- || m_mediaStatus == QMediaPlayer::EndOfMedia) {
- TRAPD(err, doSetVolumeL((m_muted)?0:m_volume));
- setError(err);
- }
-}
-
-qint64 S60MediaPlayerSession::duration() const
-{
- if( mediaStatus() == QMediaPlayer::LoadingMedia
- || mediaStatus() == QMediaPlayer::UnknownMediaStatus
- || mediaStatus() == QMediaPlayer::NoMedia
- || mediaStatus() == QMediaPlayer::InvalidMedia)
- return -1;
-
- qint64 pos = 0;
- TRAP_IGNORE(pos = doGetDurationL());
- return pos;
-}
-
-qint64 S60MediaPlayerSession::position() const
-{
- if( mediaStatus() == QMediaPlayer::LoadingMedia
- || mediaStatus() == QMediaPlayer::UnknownMediaStatus
- || mediaStatus() == QMediaPlayer::NoMedia
- || mediaStatus() == QMediaPlayer::InvalidMedia)
- return 0;
-
- qint64 pos = 0;
- TRAP_IGNORE(pos = doGetPositionL());
- return pos;
-}
-
-void S60MediaPlayerSession::setPosition(qint64 pos)
-{
- if (position() == pos)
- return;
-
- if (state() == QMediaPlayer::PlayingState)
- pause();
-
- TRAPD(err, doSetPositionL(pos * 1000));
- setError(err);
-
- if (state() == QMediaPlayer::PausedState)
- play();
-
- emit positionChanged(position());
-}
-
-void S60MediaPlayerSession::setAudioEndpoint(const QString& audioEndpoint)
-{
- doSetAudioEndpoint(audioEndpoint);
-}
-
-void S60MediaPlayerSession::loaded()
-{
- stopStalledTimer();
- if (m_error == KErrNone || m_error == KErrMMPartialPlayback) {
- setMediaStatus(QMediaPlayer::LoadedMedia);
- TRAPD(err, updateMetaDataEntriesL());
- setError(err);
- setVolume(m_volume);
- setMuted(m_muted);
- emit durationChanged(duration());
- emit videoAvailableChanged(isVideoAvailable());
- emit audioAvailableChanged(isAudioAvailable());
- }
-}
-
-void S60MediaPlayerSession::endOfMedia()
-{
- setMediaStatus(QMediaPlayer::EndOfMedia);
- setState(QMediaPlayer::StoppedState);
- emit positionChanged(0);
-}
-
-void S60MediaPlayerSession::buffering()
-{
- startStalledTimer();
- setMediaStatus(QMediaPlayer::BufferingMedia);
-}
-
-void S60MediaPlayerSession::buffered()
-{
- stopStalledTimer();
- setMediaStatus(QMediaPlayer::BufferedMedia);
-}
-void S60MediaPlayerSession::stalled()
-{
- setMediaStatus(QMediaPlayer::StalledMedia);
-}
-
-QMap<QString, QVariant>& S60MediaPlayerSession::metaDataEntries()
-{
- return m_metaDataMap;
-}
-
-QMediaPlayer::Error S60MediaPlayerSession::fromSymbianErrorToMultimediaError(int error)
-{
- switch(error) {
- case KErrNoMemory:
- case KErrNotFound:
- case KErrBadHandle:
- case KErrAbort:
- case KErrNotSupported:
- case KErrCorrupt:
- case KErrGeneral:
- case KErrArgument:
- case KErrPathNotFound:
- case KErrDied:
- case KErrServerTerminated:
- case KErrServerBusy:
- case KErrCompletion:
- case KErrBadPower:
- return QMediaPlayer::ResourceError;
-
- case KErrMMPartialPlayback:
- return QMediaPlayer::FormatError;
-
- case KErrMMAudioDevice:
- case KErrMMVideoDevice:
- case KErrMMDecoder:
- case KErrUnknown:
- return QMediaPlayer::ServiceMissingError;
-
- case KErrMMNotEnoughBandwidth:
- case KErrMMSocketServiceNotFound:
- case KErrMMNetworkRead:
- case KErrMMNetworkWrite:
- case KErrMMServerSocket:
- case KErrMMServerNotSupported:
- case KErrMMUDPReceive:
- case KErrMMInvalidProtocol:
- case KErrMMInvalidURL:
- case KErrMMMulticast:
- case KErrMMProxyServer:
- case KErrMMProxyServerNotSupported:
- case KErrMMProxyServerConnect:
- return QMediaPlayer::NetworkError;
-
- case KErrNotReady:
- case KErrInUse:
- case KErrAccessDenied:
- case KErrLocked:
- case KErrMMDRMNotAuthorized:
- case KErrPermissionDenied:
- case KErrCancel:
- case KErrAlreadyExists:
- return QMediaPlayer::AccessDeniedError;
-
- case KErrNone:
- default:
- return QMediaPlayer::NoError;
- }
-}
-
-void S60MediaPlayerSession::setError(int error, const QString &errorString, bool forceReset)
-{
- if( forceReset ) {
- m_error = KErrNone;
- emit this->error(QMediaPlayer::NoError, QString());
- return;
- }
-
- // If error does not change and m_error is reseted without forceReset flag
- if (error == m_error ||
- (m_error != KErrNone && error == KErrNone))
- return;
-
- m_error = error;
- QMediaPlayer::Error mediaError = fromSymbianErrorToMultimediaError(m_error);
- QString symbianError = QString(errorString);
-
- if (mediaError != QMediaPlayer::NoError) {
- // TODO: fix to user friendly string at some point
- // These error string are only dev usable
- symbianError.append("Symbian:");
- symbianError.append(QString::number(m_error));
- }
-
- emit this->error(mediaError, symbianError);
-
- switch(mediaError){
- case QMediaPlayer::ResourceError:
- case QMediaPlayer::NetworkError:
- case QMediaPlayer::AccessDeniedError:
- case QMediaPlayer::ServiceMissingError:
- m_play_requested = false;
- setMediaStatus(QMediaPlayer::InvalidMedia);
- stop();
- break;
- }
-}
-
-void S60MediaPlayerSession::tick()
-{
- emit positionChanged(position());
-
- if (bufferStatus() < 100)
- emit bufferStatusChanged(bufferStatus());
-}
-
-void S60MediaPlayerSession::startProgressTimer()
-{
- m_progressTimer->start(500);
-}
-
-void S60MediaPlayerSession::stopProgressTimer()
-{
- m_progressTimer->stop();
-}
-
-void S60MediaPlayerSession::startStalledTimer()
-{
- m_stalledTimer->start(30000);
-}
-
-void S60MediaPlayerSession::stopStalledTimer()
-{
- m_stalledTimer->stop();
-}
-QString S60MediaPlayerSession::TDesC2QString(const TDesC& aDescriptor)
-{
- return QString::fromUtf16(aDescriptor.Ptr(), aDescriptor.Length());
-}
-TPtrC S60MediaPlayerSession::QString2TPtrC( const QString& string )
-{
- // Returned TPtrC is valid as long as the given parameter is valid and unmodified
- return TPtrC16(static_cast<const TUint16*>(string.utf16()), string.length());
-}
-QRect S60MediaPlayerSession::TRect2QRect(const TRect& tr)
-{
- return QRect(tr.iTl.iX, tr.iTl.iY, tr.Width(), tr.Height());
-}
-TRect S60MediaPlayerSession::QRect2TRect(const QRect& qr)
-{
- return TRect(TPoint(qr.left(), qr.top()), TSize(qr.width(), qr.height()));
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayersession.h b/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayersession.h
deleted file mode 100644
index bb9eddd..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayersession.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60MEDIAPLAYERSESSION_H
-#define S60MEDIAPLAYERSESSION_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qurl.h>
-#include <QtCore/qpair.h>
-#include <qmediaplayer.h>
-#include <e32cmn.h> // for TDesC
-#include <QRect>
-#include "s60mediaplayerservice.h"
-
-QT_BEGIN_NAMESPACE
-
-class QMediaTimeRange;
-
-class QTimer;
-
-class S60MediaPlayerSession : public QObject
-{
- Q_OBJECT
-
-public:
- S60MediaPlayerSession(QObject *parent);
- virtual ~S60MediaPlayerSession();
-
- // for player control interface to use
- QMediaPlayer::State state() const;
- QMediaPlayer::MediaStatus mediaStatus() const;
- qint64 duration() const;
- qint64 position() const;
- void setPosition(qint64 pos);
- int volume() const;
- void setVolume(int volume);
- bool isMuted() const;
- void setMuted(bool muted);
- virtual bool isVideoAvailable() const = 0;
- virtual bool isAudioAvailable() const = 0;
- bool isSeekable() const;
- void play();
- void pause();
- void stop();
- void reset();
- bool isMetadataAvailable() const;
- QVariant metaData(const QString &key) const;
- QMap<QString, QVariant> availableMetaData() const;
- void load(QUrl url);
- int bufferStatus();
- virtual void setVideoRenderer(QObject *renderer);
- void setMediaStatus(QMediaPlayer::MediaStatus);
- void setState(QMediaPlayer::State state);
- void setAudioEndpoint(const QString& audioEndpoint);
-
-protected:
- virtual void doLoadL(const TDesC &path) = 0;
- virtual void doLoadUrlL(const TDesC &path) = 0;
- virtual void doPlay() = 0;
- virtual void doStop() = 0;
- virtual void doPauseL() = 0;
- virtual void doSetVolumeL(int volume) = 0;
- virtual void doSetPositionL(qint64 microSeconds) = 0;
- virtual qint64 doGetPositionL() const = 0;
- virtual void updateMetaDataEntriesL() = 0;
- virtual int doGetBufferStatusL() const = 0;
- virtual qint64 doGetDurationL() const = 0;
- virtual void doSetAudioEndpoint(const QString& audioEndpoint) = 0;
-
-public:
- // From S60MediaPlayerAudioEndpointSelector
- virtual QString activeEndpoint() const = 0;
- virtual QString defaultEndpoint() const = 0;
-public Q_SLOTS:
- virtual void setActiveEndpoint(const QString& name) = 0;
-
-protected:
- void setError(int error, const QString &errorString = QString(), bool forceReset = false);
- void loaded();
- void buffering();
- void buffered();
- void endOfMedia();
- QMap<QString, QVariant>& metaDataEntries();
- QMediaPlayer::Error fromSymbianErrorToMultimediaError(int error);
- void startProgressTimer();
- void stopProgressTimer();
- void startStalledTimer();
- void stopStalledTimer();
- QString TDesC2QString(const TDesC& aDescriptor);
- TPtrC QString2TPtrC( const QString& string );
- QRect TRect2QRect(const TRect& tr);
- TRect QRect2TRect(const QRect& qr);
-
-
-protected slots:
- void tick();
- void stalled();
-
-signals:
- void durationChanged(qint64 duration);
- void positionChanged(qint64 position);
- void stateChanged(QMediaPlayer::State state);
- void mediaStatusChanged(QMediaPlayer::MediaStatus mediaStatus);
- void videoAvailableChanged(bool videoAvailable);
- void audioAvailableChanged(bool audioAvailable);
- void bufferStatusChanged(int percentFilled);
- void seekableChanged(bool);
- void availablePlaybackRangesChanged(const QMediaTimeRange&);
- void metaDataChanged();
- void error(int error, const QString &errorString);
- void activeEndpointChanged(const QString &name);
-
-private:
- qreal m_playbackRate;
- QMap<QString, QVariant> m_metaDataMap;
- bool m_muted;
- int m_volume;
- QMediaPlayer::State m_state;
- QMediaPlayer::MediaStatus m_mediaStatus;
- QTimer *m_progressTimer;
- QTimer *m_stalledTimer;
- int m_error;
- bool m_play_requested;
- bool m_stream;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60mediarecognizer.cpp b/src/plugins/mediaservices/symbian/mediaplayer/s60mediarecognizer.cpp
deleted file mode 100644
index b563dd9..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60mediarecognizer.cpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "S60mediarecognizer.h"
-#include <e32def.h>
-#include <e32cmn.h>
-#include <QtCore/qurl.h>
-#include <QtCore/qdir.h>
-#include <QtCore/qdebug.h>
-
-#include <apgcli.h>
-
-QT_BEGIN_NAMESPACE
-
-static const TInt KMimeTypePrefixLength = 6; // "audio/" or "video/"
-_LIT(KMimeTypePrefixAudio, "audio/");
-_LIT(KMimeTypePrefixVideo, "video/");
-
-S60MediaRecognizer::S60MediaRecognizer(QObject *parent) : QObject(parent)
-{
-}
-
-S60MediaRecognizer::~S60MediaRecognizer()
-{
- m_file.Close();
- m_fileServer.Close();
- m_recognizer.Close();
-}
-
-S60MediaRecognizer::MediaType S60MediaRecognizer::mediaType(const QUrl &url)
-{
- bool isStream = (url.scheme() == "file")?false:true;
-
- if (isStream)
- return Url;
- else
- return identifyMediaType(url.toLocalFile());
-}
-
-S60MediaRecognizer::MediaType S60MediaRecognizer::identifyMediaType(const QString& fileName)
-{
- S60MediaRecognizer::MediaType result = NotSupported;
- bool recognizerOpened = false;
-
- TInt err = m_recognizer.Connect();
- if (err == KErrNone) {
- recognizerOpened = true;
- }
-
- err = m_fileServer.Connect();
- if (err == KErrNone) {
- recognizerOpened = true;
- }
-
- // This is needed for sharing file handles for the recognizer
- err = m_fileServer.ShareProtected();
- if (err == KErrNone) {
- recognizerOpened = true;
- }
-
- if (recognizerOpened) {
- m_file.Close();
- err = m_file.Open(m_fileServer, QString2TPtrC(QDir::toNativeSeparators(fileName)), EFileRead |
- EFileShareReadersOnly);
-
- if (err == KErrNone) {
- TDataRecognitionResult recognizerResult;
- err = m_recognizer.RecognizeData(m_file, recognizerResult);
- if (err == KErrNone) {
- const TPtrC mimeType = recognizerResult.iDataType.Des();
-
- if (mimeType.Left(KMimeTypePrefixLength).Compare(KMimeTypePrefixAudio) == 0) {
- result = Audio;
- } else if (mimeType.Left(KMimeTypePrefixLength).Compare(KMimeTypePrefixVideo) == 0) {
- result = Video;
- }
- }
- }
- }
- return result;
-}
-
-TPtrC S60MediaRecognizer::QString2TPtrC( const QString& string )
-{
- // Returned TPtrC is valid as long as the given parameter is valid and unmodified
- return TPtrC16(static_cast<const TUint16*>(string.utf16()), string.length());
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60mediarecognizer.h b/src/plugins/mediaservices/symbian/mediaplayer/s60mediarecognizer.h
deleted file mode 100644
index 320c34c..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60mediarecognizer.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60MEDIARECOGNIZER_H_
-#define S60MEDIARECOGNIZER_H_
-
-#include <QtCore/qobject.h>
-
-#include <apgcli.h>
-#include <f32file.h>
-
-QT_BEGIN_NAMESPACE
-
-class QUrl;
-
-class S60MediaRecognizer : public QObject
-{
- Q_OBJECT
-
-public:
- enum MediaType {
- Audio,
- Video,
- Url,
- NotSupported = -1
- };
-
- S60MediaRecognizer(QObject *parent = 0);
- ~S60MediaRecognizer();
-
- S60MediaRecognizer::MediaType mediaType(const QUrl &url);
- S60MediaRecognizer::MediaType identifyMediaType(const QString& fileName);
-
-protected:
- TPtrC QString2TPtrC( const QString& string );
-
-private:
- RApaLsSession m_recognizer;
- RFile m_file;
- RFs m_fileServer;
-};
-
-QT_END_NAMESPACE
-
-#endif /* S60MEDIARECOGNIZER_H_ */
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60videooverlay.cpp b/src/plugins/mediaservices/symbian/mediaplayer/s60videooverlay.cpp
deleted file mode 100644
index 489b2e3..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60videooverlay.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 <QtMultimedia/qvideosurfaceformat.h>
-#include "s60videooverlay.h"
-#include "s60videosurface.h"
-
-QT_BEGIN_NAMESPACE
-
-S60VideoOverlay::S60VideoOverlay(QObject *parent)
- : QVideoWindowControl(parent)
- , m_surface(new S60VideoSurface)
- , m_aspectRatioMode(Qt::KeepAspectRatio)
- , m_fullScreen(false)
-{
- connect(m_surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
- this, SLOT(surfaceFormatChanged()));
-}
-
-S60VideoOverlay::~S60VideoOverlay()
-{
- delete m_surface;
-}
-
-WId S60VideoOverlay::winId() const
-{
- return m_surface->winId();
-}
-
-void S60VideoOverlay::setWinId(WId id)
-{
- m_surface->setWinId(id);
-}
-
-QRect S60VideoOverlay::displayRect() const
-{
- return m_displayRect;
-}
-
-void S60VideoOverlay::setDisplayRect(const QRect &rect)
-{
- m_displayRect = rect;
-
- setScaledDisplayRect();
-}
-
-Qt::AspectRatioMode S60VideoOverlay::aspectRatioMode() const
-{
- return m_aspectRatioMode;
-}
-
-void S60VideoOverlay::setAspectRatioMode(Qt::AspectRatioMode ratio)
-{
- m_aspectRatioMode = ratio;
-
- setScaledDisplayRect();
-}
-
-QSize S60VideoOverlay::customAspectRatio() const
-{
- return m_aspectRatio;
-}
-
-void S60VideoOverlay::setCustomAspectRatio(const QSize &customRatio)
-{
- m_aspectRatio = customRatio;
-
- setScaledDisplayRect();
-}
-
-void S60VideoOverlay::repaint()
-{
-}
-
-int S60VideoOverlay::brightness() const
-{
- return m_surface->brightness();
-}
-
-void S60VideoOverlay::setBrightness(int brightness)
-{
- m_surface->setBrightness(brightness);
-
- emit brightnessChanged(m_surface->brightness());
-}
-
-int S60VideoOverlay::contrast() const
-{
- return m_surface->contrast();
-}
-
-void S60VideoOverlay::setContrast(int contrast)
-{
- m_surface->setContrast(contrast);
-
- emit contrastChanged(m_surface->contrast());
-}
-
-int S60VideoOverlay::hue() const
-{
- return m_surface->hue();
-}
-
-void S60VideoOverlay::setHue(int hue)
-{
- m_surface->setHue(hue);
-
- emit hueChanged(m_surface->hue());
-}
-
-int S60VideoOverlay::saturation() const
-{
- return m_surface->saturation();
-}
-
-void S60VideoOverlay::setSaturation(int saturation)
-{
- m_surface->setSaturation(saturation);
-
- emit saturationChanged(m_surface->saturation());
-}
-
-bool S60VideoOverlay::isFullScreen() const
-{
- return m_fullScreen;
-}
-
-void S60VideoOverlay::setFullScreen(bool fullScreen)
-{
- emit fullScreenChanged(m_fullScreen = fullScreen);
-}
-
-QSize S60VideoOverlay::nativeSize() const
-{
- return m_surface->surfaceFormat().sizeHint();
-}
-
-QAbstractVideoSurface *S60VideoOverlay::surface() const
-{
- return m_surface;
-}
-
-void S60VideoOverlay::surfaceFormatChanged()
-{
- setScaledDisplayRect();
-
- emit nativeSizeChanged();
-}
-
-void S60VideoOverlay::setScaledDisplayRect()
-{
- switch (m_aspectRatioMode) {
- case Qt::KeepAspectRatio:
- {
- QSize size = m_surface->surfaceFormat().viewport().size();
-
- size.scale(m_displayRect.size(), Qt::KeepAspectRatio);
-
- QRect rect(QPoint(0, 0), size);
- rect.moveCenter(m_displayRect.center());
-
- m_surface->setDisplayRect(rect);
- }
- break;
- case Qt::IgnoreAspectRatio:
- m_surface->setDisplayRect(m_displayRect);
- break;
- };
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60videooverlay.h b/src/plugins/mediaservices/symbian/mediaplayer/s60videooverlay.h
deleted file mode 100644
index d846f32..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60videooverlay.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60VIDEOOVERLAY_H
-#define S60VIDEOOVERLAY_H
-
-#include <QtCore/qobject.h>
-#include <qvideowindowcontrol.h>
-
-QT_BEGIN_NAMESPACE
-
-class QAbstractVideoSurface;
-class S60VideoSurface;
-
-class S60VideoOverlay : public QVideoWindowControl
-{
- Q_OBJECT
-
-public:
- S60VideoOverlay(QObject *parent = 0);
- ~S60VideoOverlay();
-
- WId winId() const;
- void setWinId(WId id);
-
- QRect displayRect() const;
- void setDisplayRect(const QRect &rect);
-
- bool isFullScreen() const;
- void setFullScreen(bool fullScreen);
-
- QSize nativeSize() const;
-
- Qt::AspectRatioMode aspectRatioMode() const;
- void setAspectRatioMode(Qt::AspectRatioMode mode);
-
- QSize customAspectRatio() const;
- void setCustomAspectRatio(const QSize &customRatio);
-
- void repaint();
-
- int brightness() const;
- void setBrightness(int brightness);
-
- int contrast() const;
- void setContrast(int contrast);
-
- int hue() const;
- void setHue(int hue);
-
- int saturation() const;
- void setSaturation(int saturation);
-
- QAbstractVideoSurface *surface() const;
-
-private slots:
- void surfaceFormatChanged();
-
-private:
- void setScaledDisplayRect();
-
- S60VideoSurface *m_surface;
- Qt::AspectRatioMode m_aspectRatioMode;
- QRect m_displayRect;
- QSize m_aspectRatio;
- bool m_fullScreen;
-};
-
-QT_END_NAMESPACE
-
-#endif // S60VIDEOOVERLAY_H
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.cpp b/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.cpp
deleted file mode 100644
index 134d5a0..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.cpp
+++ /dev/null
@@ -1,486 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "s60videoplayersession.h"
-#include "s60videowidget.h"
-#include "s60mediaplayerservice.h"
-#include "s60videooverlay.h"
-
-#include <QtCore/qdebug.h>
-#include <QtGui/qwidget.h>
-#include <QtCore/qtimer.h>
-#include <QApplication>
-
-#include <coecntrl.h>
-#include <coemain.h> // For CCoeEnv
-#include <w32std.h>
-#include <mmf/common/mmfcontrollerframeworkbase.h>
-
-#include <AudioOutput.h>
-#include <MAudioOutputObserver.h>
-
-QT_BEGIN_NAMESPACE
-
-S60VideoPlayerSession::S60VideoPlayerSession(QMediaService *service)
- : S60MediaPlayerSession(service)
- , m_player(0)
- , m_rect(0, 0, 0, 0)
- , m_output(QVideoOutputControl::NoOutput)
- , m_windowId(0)
- , m_dsaActive(false)
- , m_dsaStopped(false)
- , m_wsSession(CCoeEnv::Static()->WsSession())
- , m_screenDevice(*CCoeEnv::Static()->ScreenDevice())
- , m_window(0)
- , m_service(*service)
- , m_aspectRatioMode(Qt::KeepAspectRatio)
- , m_originalSize(1, 1)
- , m_audioOutput(0)
- , m_audioEndpoint("Default")
-{
- resetNativeHandles();
- QT_TRAP_THROWING(m_player = CVideoPlayerUtility::NewL(
- *this,
- 0,
- EMdaPriorityPreferenceNone,
- m_wsSession,
- m_screenDevice,
- *m_window,
- m_rect,
- m_rect));
- m_dsaActive = true;
- m_player->RegisterForVideoLoadingNotification(*this);
-}
-
-S60VideoPlayerSession::~S60VideoPlayerSession()
-{
-#if !defined(HAS_NO_AUDIOROUTING_IN_VIDEOPLAYER)
- if (m_audioOutput)
- m_audioOutput->UnregisterObserver(*this);
- delete m_audioOutput;
-#endif
- m_player->Close();
- delete m_player;
-}
-
-void S60VideoPlayerSession::doLoadL(const TDesC &path)
-{
- // m_audioOutput needs to be reinitialized after MapcInitComplete
- if (m_audioOutput)
- m_audioOutput->UnregisterObserver(*this);
- delete m_audioOutput;
- m_audioOutput = NULL;
-
- m_player->OpenFileL(path);
-}
-
-void S60VideoPlayerSession::doLoadUrlL(const TDesC &path)
-{
- // m_audioOutput needs to be reinitialized after MapcInitComplete
- if (m_audioOutput)
- m_audioOutput->UnregisterObserver(*this);
- delete m_audioOutput;
- m_audioOutput = NULL;
-
- m_player->OpenUrlL(path);
-}
-
-int S60VideoPlayerSession::doGetBufferStatusL() const
-{
- int progress = 0;
- m_player->GetVideoLoadingProgressL(progress);
- return progress;
-}
-
-qint64 S60VideoPlayerSession::doGetDurationL() const
-{
- return m_player->DurationL().Int64() / qint64(1000);
-}
-
-void S60VideoPlayerSession::setVideoRenderer(QObject *videoOutput)
-{
- Q_UNUSED(videoOutput)
- QVideoOutputControl *videoControl = qobject_cast<QVideoOutputControl *>(m_service.control(QVideoOutputControl_iid));
-
- //Render changes
- if (m_output != videoControl->output()) {
-
- if (m_output == QVideoOutputControl::WidgetOutput) {
- S60VideoWidgetControl *widgetControl = qobject_cast<S60VideoWidgetControl *>(m_service.control(QVideoWidgetControl_iid));
- disconnect(widgetControl, SIGNAL(widgetUpdated()), this, SLOT(resetVideoDisplay()));
- disconnect(widgetControl, SIGNAL(beginVideoWindowNativePaint()), this, SLOT(suspendDirectScreenAccess()));
- disconnect(widgetControl, SIGNAL(endVideoWindowNativePaint()), this, SLOT(resumeDirectScreenAccess()));
- disconnect(this, SIGNAL(stateChanged(QMediaPlayer::State)), widgetControl, SLOT(videoStateChanged(QMediaPlayer::State)));
- }
-
- if (videoControl->output() == QVideoOutputControl::WidgetOutput) {
- S60VideoWidgetControl *widgetControl = qobject_cast<S60VideoWidgetControl *>(m_service.control(QVideoWidgetControl_iid));
- connect(widgetControl, SIGNAL(widgetUpdated()), this, SLOT(resetVideoDisplay()));
- connect(widgetControl, SIGNAL(beginVideoWindowNativePaint()), this, SLOT(suspendDirectScreenAccess()));
- connect(widgetControl, SIGNAL(endVideoWindowNativePaint()), this, SLOT(resumeDirectScreenAccess()));
- connect(this, SIGNAL(stateChanged(QMediaPlayer::State)), widgetControl, SLOT(videoStateChanged(QMediaPlayer::State)));
- }
-
- m_output = videoControl->output();
- resetVideoDisplay();
- }
-}
-
-bool S60VideoPlayerSession::resetNativeHandles()
-{
- QVideoOutputControl* videoControl = qobject_cast<QVideoOutputControl *>(m_service.control(QVideoOutputControl_iid));
- WId newId = 0;
- TRect newRect = TRect(0,0,0,0);
- Qt::AspectRatioMode aspectRatioMode = Qt::KeepAspectRatio;
-
- if (videoControl->output() == QVideoOutputControl::WidgetOutput) {
- S60VideoWidgetControl* widgetControl = qobject_cast<S60VideoWidgetControl *>(m_service.control(QVideoWidgetControl_iid));
- QWidget *videoWidget = widgetControl->videoWidget();
- newId = widgetControl->videoWidgetWId();
- newRect = QRect2TRect(QRect(videoWidget->mapToGlobal(videoWidget->pos()), videoWidget->size()));
- aspectRatioMode = widgetControl->aspectRatioMode();
- } else if (videoControl->output() == QVideoOutputControl::WindowOutput) {
- S60VideoOverlay* windowControl = qobject_cast<S60VideoOverlay *>(m_service.control(QVideoWindowControl_iid));
- newId = windowControl->winId();
- newRect = TRect( newId->DrawableWindow()->AbsPosition(), newId->DrawableWindow()->Size());
- } else {
- if (QApplication::activeWindow())
- newId = QApplication::activeWindow()->effectiveWinId();
-
- if (!newId && QApplication::allWidgets().count())
- newId = QApplication::allWidgets().at(0)->effectiveWinId();
-
- Q_ASSERT(newId != 0);
- }
-
- if (newRect == m_rect && newId == m_windowId && aspectRatioMode == m_aspectRatioMode)
- return false;
-
- if (newId) {
- m_rect = newRect;
- m_windowId = newId;
- m_window = m_windowId->DrawableWindow();
- m_aspectRatioMode = aspectRatioMode;
- return true;
- }
- return false;
-}
-
-bool S60VideoPlayerSession::isVideoAvailable() const
-{
-#ifdef PRE_S60_50_PLATFORM
- return true; // this is not support in pre 5th platforms
-#else
- if (m_player)
- return m_player->VideoEnabledL();
- else
- return false;
-#endif
-}
-
-bool S60VideoPlayerSession::isAudioAvailable() const
-{
- if (m_player)
- return m_player->AudioEnabledL();
- else
- return false;
-}
-
-void S60VideoPlayerSession::doPlay()
-{
- m_player->Play();
-}
-
-void S60VideoPlayerSession::doPauseL()
-{
- m_player->PauseL();
-}
-
-void S60VideoPlayerSession::doStop()
-{
- m_player->Stop();
-}
-
-qint64 S60VideoPlayerSession::doGetPositionL() const
-{
- return m_player->PositionL().Int64() / qint64(1000);
-}
-
-void S60VideoPlayerSession::doSetPositionL(qint64 microSeconds)
-{
- m_player->SetPositionL(TTimeIntervalMicroSeconds(microSeconds));
-}
-
-void S60VideoPlayerSession::doSetVolumeL(int volume)
-{
- m_player->SetVolumeL((volume / 100.0)* m_player->MaxVolume());
-}
-
-QPair<qreal, qreal> S60VideoPlayerSession::scaleFactor()
-{
- QSize scaled = m_originalSize;
- if (m_aspectRatioMode == Qt::IgnoreAspectRatio)
- scaled.scale(TRect2QRect(m_rect).size(), Qt::IgnoreAspectRatio);
- else if(m_aspectRatioMode == Qt::KeepAspectRatio)
- scaled.scale(TRect2QRect(m_rect).size(), Qt::KeepAspectRatio);
-
- qreal width = qreal(scaled.width()) / qreal(m_originalSize.width()) * qreal(100);
- qreal height = qreal(scaled.height()) / qreal(m_originalSize.height()) * qreal(100);
-
- return QPair<qreal, qreal>(width, height);
-}
-
-void S60VideoPlayerSession::startDirectScreenAccess()
-{
- if(m_dsaActive)
- return;
-
- TRAPD(err, m_player->StartDirectScreenAccessL());
- if(err == KErrNone)
- m_dsaActive = true;
- setError(err);
-}
-
-bool S60VideoPlayerSession::stopDirectScreenAccess()
-{
- if(!m_dsaActive)
- return false;
-
- TRAPD(err, m_player->StopDirectScreenAccessL());
- if(err == KErrNone)
- m_dsaActive = false;
-
- setError(err);
- return true;
-}
-
-void S60VideoPlayerSession::MvpuoOpenComplete(TInt aError)
-{
- setError(aError);
- m_player->Prepare();
-}
-
-void S60VideoPlayerSession::MvpuoPrepareComplete(TInt aError)
-{
- setError(aError);
- TRAPD(err,
- m_player->SetDisplayWindowL(m_wsSession,
- m_screenDevice,
- *m_window,
- m_rect,
- m_rect);
- TSize originalSize;
- m_player->VideoFrameSizeL(originalSize);
- m_originalSize = QSize(originalSize.iWidth, originalSize.iHeight);
- m_player->SetScaleFactorL(scaleFactor().first, scaleFactor().second, true));
-
- setError(err);
- m_dsaActive = true;
-#if !defined(HAS_NO_AUDIOROUTING_IN_VIDEOPLAYER)
- TRAP(err,
- m_audioOutput = CAudioOutput::NewL(*m_player);
- m_audioOutput->RegisterObserverL(*this);
- );
- setActiveEndpoint(m_audioEndpoint);
- setError(err);
-#endif
- loaded();
-}
-
-void S60VideoPlayerSession::MvpuoFrameReady(CFbsBitmap &aFrame, TInt aError)
-{
- Q_UNUSED(aFrame);
- Q_UNUSED(aError);
-}
-
-void S60VideoPlayerSession::MvpuoPlayComplete(TInt aError)
-{
- setError(aError);
- endOfMedia();
-}
-
-void S60VideoPlayerSession::MvpuoEvent(const TMMFEvent &aEvent)
-{
- Q_UNUSED(aEvent);
-}
-
-void S60VideoPlayerSession::updateMetaDataEntriesL()
-{
- metaDataEntries().clear();
- int numberOfMetaDataEntries = 0;
-
- numberOfMetaDataEntries = m_player->NumberOfMetaDataEntriesL();
-
- for (int i = 0; i < numberOfMetaDataEntries; i++) {
- CMMFMetaDataEntry *entry = NULL;
- entry = m_player->MetaDataEntryL(i);
- metaDataEntries().insert(TDesC2QString(entry->Name()), TDesC2QString(entry->Value()));
- delete entry;
- }
- emit metaDataChanged();
-}
-
-void S60VideoPlayerSession::resetVideoDisplay()
-{
- if (resetNativeHandles()) {
- TRAPD(err,
- m_player->SetDisplayWindowL(m_wsSession,
- m_screenDevice,
- *m_window,
- m_rect,
- m_rect));
- setError(err);
- if( mediaStatus() == QMediaPlayer::LoadedMedia
- || mediaStatus() == QMediaPlayer::StalledMedia
- || mediaStatus() == QMediaPlayer::BufferingMedia
- || mediaStatus() == QMediaPlayer::BufferedMedia
- || mediaStatus() == QMediaPlayer::EndOfMedia) {
- TRAPD(err, m_player->SetScaleFactorL(scaleFactor().first, scaleFactor().second, true));
- setError(err);
- }
- }
-}
-
-void S60VideoPlayerSession::suspendDirectScreenAccess()
-{
- m_dsaStopped = stopDirectScreenAccess();
-}
-
-void S60VideoPlayerSession::resumeDirectScreenAccess()
-{
- if(!m_dsaStopped)
- return;
-
- startDirectScreenAccess();
- m_dsaStopped = false;
-}
-
-void S60VideoPlayerSession::MvloLoadingStarted()
-{
- buffering();
-}
-
-void S60VideoPlayerSession::MvloLoadingComplete()
-{
- buffered();
-}
-
-void S60VideoPlayerSession::doSetAudioEndpoint(const QString& audioEndpoint)
-{
- m_audioEndpoint = audioEndpoint;
-}
-
-QString S60VideoPlayerSession::activeEndpoint() const
-{
- QString outputName = QString("Default");
-#if !defined(HAS_NO_AUDIOROUTING_IN_VIDEOPLAYER)
- if (m_audioOutput) {
- CAudioOutput::TAudioOutputPreference output = m_audioOutput->AudioOutput();
- outputName = qStringFromTAudioOutputPreference(output);
- }
-#endif
- return outputName;
-}
-
-QString S60VideoPlayerSession::defaultEndpoint() const
-{
- QString outputName = QString("Default");
-#if !defined(HAS_NO_AUDIOROUTING_IN_VIDEOPLAYER)
- if (m_audioOutput) {
- CAudioOutput::TAudioOutputPreference output = m_audioOutput->DefaultAudioOutput();
- outputName = qStringFromTAudioOutputPreference(output);
- }
-#endif
- return outputName;
-}
-
-void S60VideoPlayerSession::setActiveEndpoint(const QString& name)
-{
- CAudioOutput::TAudioOutputPreference output = CAudioOutput::ENoPreference;
-
- if (name == QString("Default"))
- output = CAudioOutput::ENoPreference;
- else if (name == QString("All"))
- output = CAudioOutput::EAll;
- else if (name == QString("None"))
- output = CAudioOutput::ENoOutput;
- else if (name == QString("Earphone"))
- output = CAudioOutput::EPrivate;
- else if (name == QString("Speaker"))
- output = CAudioOutput::EPublic;
-#if !defined(HAS_NO_AUDIOROUTING_IN_VIDEOPLAYER)
- if (m_audioOutput) {
- TRAPD(err, m_audioOutput->SetAudioOutputL(output));
- setError(err);
-
- if (m_audioEndpoint != name) {
- m_audioEndpoint = name;
- emit activeEndpointChanged(name);
- }
- }
-#endif
-}
-
-void S60VideoPlayerSession::DefaultAudioOutputChanged( CAudioOutput& aAudioOutput,
- CAudioOutput::TAudioOutputPreference aNewDefault )
-{
- // Emit already implemented in setActiveEndpoint function
- Q_UNUSED(aAudioOutput)
- Q_UNUSED(aNewDefault)
-}
-
-QString S60VideoPlayerSession::qStringFromTAudioOutputPreference(CAudioOutput::TAudioOutputPreference output) const
-{
- if (output == CAudioOutput::ENoPreference)
- return QString("Default");
- else if (output == CAudioOutput::EAll)
- return QString("All");
- else if (output == CAudioOutput::ENoOutput)
- return QString("None");
- else if (output == CAudioOutput::EPrivate)
- return QString("Earphone");
- else if (output == CAudioOutput::EPublic)
- return QString("Speaker");
- return QString("Default");
-}
-
-QT_END_NAMESPACE
-
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h b/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h
deleted file mode 100644
index 52e311a..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60videoplayersession.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60VIDEOPLAYERSESSION_H
-#define S60VIDEOPLAYERSESSION_H
-
-#include "s60mediaplayersession.h"
-#include "s60mediaplayeraudioendpointselector.h"
-#include <videoplayer.h>
-#include <QtGui/qwidget.h>
-#include <qvideowidget.h>
-
-#include <AudioOutput.h>
-#include <MAudioOutputObserver.h>
-
-QT_BEGIN_NAMESPACE
-
-class QTimer;
-
-class S60VideoPlayerSession : public S60MediaPlayerSession,
- public MVideoPlayerUtilityObserver,
- public MVideoLoadingObserver,
- public MAudioOutputObserver
-{
- Q_OBJECT
-
-public:
- S60VideoPlayerSession(QMediaService *service);
- ~S60VideoPlayerSession();
-
- //From S60MediaPlayerSession
- bool isVideoAvailable() const;
- bool isAudioAvailable() const;
- void setVideoRenderer(QObject *renderer);
-
- //From MVideoLoadingObserver
- void MvloLoadingStarted();
- void MvloLoadingComplete();
-
- // From MAudioOutputObserver
- void DefaultAudioOutputChanged(CAudioOutput& aAudioOutput,
- CAudioOutput::TAudioOutputPreference aNewDefault);
-
-public:
- // From S60MediaPlayerAudioEndpointSelector
- QString activeEndpoint() const;
- QString defaultEndpoint() const;
-public Q_SLOTS:
- void setActiveEndpoint(const QString& name);
-Q_SIGNALS:
- void activeEndpointChanged(const QString &name);
-
-protected:
- //From S60MediaPlayerSession
- void doLoadL(const TDesC &path);
- void doLoadUrlL(const TDesC &path);
- void doPlay();
- void doStop();
- void doPauseL();
- void doSetVolumeL(int volume);
- qint64 doGetPositionL() const;
- void doSetPositionL(qint64 microSeconds);
- void updateMetaDataEntriesL();
- int doGetBufferStatusL() const;
- qint64 doGetDurationL() const;
- void doSetAudioEndpoint(const QString& audioEndpoint);
-
-private slots:
- void resetVideoDisplay();
- void suspendDirectScreenAccess();
- void resumeDirectScreenAccess();
-
-private:
- bool resetNativeHandles();
- QPair<qreal, qreal> scaleFactor();
- void startDirectScreenAccess();
- bool stopDirectScreenAccess();
- QString qStringFromTAudioOutputPreference(CAudioOutput::TAudioOutputPreference output) const;
-
-
- // From MVideoPlayerUtilityObserver
- void MvpuoOpenComplete(TInt aError);
- void MvpuoPrepareComplete(TInt aError);
- void MvpuoFrameReady(CFbsBitmap &aFrame, TInt aError);
- void MvpuoPlayComplete(TInt aError);
- void MvpuoEvent(const TMMFEvent &aEvent);
-
-private:
- // Qwn
- CVideoPlayerUtility *m_player;
- TRect m_rect;
- QVideoOutputControl::Output m_output;
- WId m_windowId;
- bool m_dsaActive;
- bool m_dsaStopped;
-
- //Reference
- RWsSession &m_wsSession;
- CWsScreenDevice &m_screenDevice;
- RWindowBase *m_window;
- QMediaService &m_service;
- Qt::AspectRatioMode m_aspectRatioMode;
- QSize m_originalSize;
- CAudioOutput *m_audioOutput;
- QString m_audioEndpoint;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60videorenderer.cpp b/src/plugins/mediaservices/symbian/mediaplayer/s60videorenderer.cpp
deleted file mode 100644
index 269dd43..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60videorenderer.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "s60videorenderer.h"
-
-#include <QtCore/qcoreevent.h>
-#include <QtGui/qapplication.h>
-
-QT_BEGIN_NAMESPACE
-
-S60VideoRenderer::S60VideoRenderer(QObject *parent)
- : QVideoRendererControl(parent)
-{
-}
-
-S60VideoRenderer::~S60VideoRenderer()
-{
-}
-
-
-QAbstractVideoSurface *S60VideoRenderer::surface() const
-{
- return m_surface;
-}
-
-void S60VideoRenderer::setSurface(QAbstractVideoSurface *surface)
-{
- m_surface = surface;
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60videorenderer.h b/src/plugins/mediaservices/symbian/mediaplayer/s60videorenderer.h
deleted file mode 100644
index 260dc8b..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60videorenderer.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60VIDEORENDERER_H
-#define S60VIDEORENDERER_H
-
-#include <QtCore/qobject.h>
-#include <qvideorenderercontrol.h>
-
-QT_BEGIN_NAMESPACE
-
-class S60VideoRenderer : public QVideoRendererControl
-{
- Q_OBJECT
-
-public:
- S60VideoRenderer(QObject *parent = 0);
- virtual ~S60VideoRenderer();
-
- QAbstractVideoSurface *surface() const;
- void setSurface(QAbstractVideoSurface *surface);
-
-private:
-
- QAbstractVideoSurface *m_surface;
-};
-
-QT_END_NAMESPACE
-
-#endif // S60VIDEORENDERER_H
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60videosurface.cpp b/src/plugins/mediaservices/symbian/mediaplayer/s60videosurface.cpp
deleted file mode 100644
index bfa7a13..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60videosurface.cpp
+++ /dev/null
@@ -1,478 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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/qx11info_x11.h>
-
-#include "s60videosurface.h"
-
-QT_BEGIN_NAMESPACE
-
-/*struct XvFormatRgb
-{
- QVideoFrame::PixelFormat pixelFormat;
- int bits_per_pixel;
- int format;
- int num_planes;
-
- int depth;
- unsigned int red_mask;
- unsigned int green_mask;
- unsigned int blue_mask;
-
-};*/
-/*
-bool operator ==(const XvImageFormatValues &format, const XvFormatRgb &rgb)
-{
- return format.type == XvRGB
- && format.bits_per_pixel == rgb.bits_per_pixel
- && format.format == rgb.format
- && format.num_planes == rgb.num_planes
- && format.depth == rgb.depth
- && format.red_mask == rgb.red_mask
- && format.blue_mask == rgb.blue_mask;
-}
-
-static const XvFormatRgb qt_xvRgbLookup[] =
-{
- { QVideoFrame::Format_ARGB32, 32, XvPacked, 1, 32, 0x00FF0000, 0x0000FF00, 0x000000FF },
- { QVideoFrame::Format_RGB32 , 32, XvPacked, 1, 24, 0x00FF0000, 0x0000FF00, 0x000000FF },
- { QVideoFrame::Format_RGB24 , 24, XvPacked, 1, 24, 0x00FF0000, 0x0000FF00, 0x000000FF },
- { QVideoFrame::Format_RGB565, 16, XvPacked, 1, 16, 0x0000F800, 0x000007E0, 0x0000001F },
- { QVideoFrame::Format_BGRA32, 32, XvPacked, 1, 32, 0xFF000000, 0x00FF0000, 0x0000FF00 },
- { QVideoFrame::Format_BGR32 , 32, XvPacked, 1, 24, 0x00FF0000, 0x0000FF00, 0x000000FF },
- { QVideoFrame::Format_BGR24 , 24, XvPacked, 1, 24, 0x00FF0000, 0x0000FF00, 0x000000FF },
- { QVideoFrame::Format_BGR565, 16, XvPacked, 1, 16, 0x0000F800, 0x000007E0, 0x0000001F }
-};
-
-struct XvFormatYuv
-{
- QVideoFrame::PixelFormat pixelFormat;
- int bits_per_pixel;
- int format;
- int num_planes;
-
- unsigned int y_sample_bits;
- unsigned int u_sample_bits;
- unsigned int v_sample_bits;
- unsigned int horz_y_period;
- unsigned int horz_u_period;
- unsigned int horz_v_period;
- unsigned int vert_y_period;
- unsigned int vert_u_period;
- unsigned int vert_v_period;
- char component_order[32];
-};
-
-bool operator ==(const XvImageFormatValues &format, const XvFormatYuv &yuv)
-{
- return format.type == XvYUV
- && format.bits_per_pixel == yuv.bits_per_pixel
- && format.format == yuv.format
- && format.num_planes == yuv.num_planes
- && format.y_sample_bits == yuv.y_sample_bits
- && format.u_sample_bits == yuv.u_sample_bits
- && format.v_sample_bits == yuv.v_sample_bits
- && format.horz_y_period == yuv.horz_y_period
- && format.horz_u_period == yuv.horz_u_period
- && format.horz_v_period == yuv.horz_v_period
- && format.horz_y_period == yuv.vert_y_period
- && format.vert_u_period == yuv.vert_u_period
- && format.vert_v_period == yuv.vert_v_period
- && qstrncmp(format.component_order, yuv.component_order, 32) == 0;
-}
-
-static const XvFormatYuv qt_xvYuvLookup[] =
-{
- { QVideoFrame::Format_YUV444 , 24, XvPacked, 1, 8, 8, 8, 1, 1, 1, 1, 1, 1, "YUV" },
- { QVideoFrame::Format_YUV420P, 12, XvPlanar, 3, 8, 8, 8, 1, 2, 2, 1, 2, 2, "YUV" },
- { QVideoFrame::Format_YV12 , 12, XvPlanar, 3, 8, 8, 8, 1, 2, 2, 1, 2, 2, "YVU" },
- { QVideoFrame::Format_UYVY , 16, XvPacked, 1, 8, 8, 8, 1, 2, 2, 1, 1, 1, "UYVY" },
- { QVideoFrame::Format_YUYV , 16, XvPacked, 1, 8, 8, 8, 1, 2, 2, 1, 1, 1, "YUYV" },
- { QVideoFrame::Format_NV12 , 12, XvPlanar, 2, 8, 8, 8, 1, 2, 2, 1, 2, 2, "YUV" },
- { QVideoFrame::Format_NV12 , 12, XvPlanar, 2, 8, 8, 8, 1, 2, 2, 1, 2, 2, "YVU" },
- { QVideoFrame::Format_Y8 , 8 , XvPlanar, 1, 8, 0, 0, 1, 0, 0, 1, 0, 0, "Y" }
-};
-*/
-
-S60VideoSurface::S60VideoSurface(QObject *parent)
- : QAbstractVideoSurface(parent)
- , m_winId(0)
- //, m_portId(0)
- //, m_gc(0)
- //, m_image(0)
-{
-}
-
-S60VideoSurface::~S60VideoSurface()
-{
- /*if (m_gc)
- XFreeGC(QX11Info::display(), m_gc);
-
- if (m_portId != 0)
- XvUngrabPort(QX11Info::display(), m_portId, 0);
- */
-}
-
-WId S60VideoSurface::winId() const
-{
- return m_winId;
-}
-
-void S60VideoSurface::setWinId(WId id)
-{
- /*if (id == m_winId)
- return;
-
- if (m_image)
- XFree(m_image);
-
- if (m_gc) {
- XFreeGC(QX11Info::display(), m_gc);
- m_gc = 0;
- }
-
- if (m_portId != 0)
- XvUngrabPort(QX11Info::display(), m_portId, 0);
-
- m_supportedPixelFormats.clear();
- m_formatIds.clear();
-
- m_winId = id;
-
- if (m_winId && findPort()) {
- querySupportedFormats();
-
- m_gc = XCreateGC(QX11Info::display(), m_winId, 0, 0);
-
- if (m_image) {
- m_image = 0;
-
- if (!start(surfaceFormat()))
- QAbstractVideoSurface::stop();
- }
- } else if (m_image) {
- m_image = 0;
-
- QAbstractVideoSurface::stop();
- }*/
-}
-
-QRect S60VideoSurface::displayRect() const
-{
- return m_displayRect;
-}
-
-void S60VideoSurface::setDisplayRect(const QRect &rect)
-{
- m_displayRect = rect;
-}
-
-int S60VideoSurface::brightness() const
-{
- //return getAttribute("XV_BRIGHTNESS", m_brightnessRange.first, m_brightnessRange.second);
-}
-
-void S60VideoSurface::setBrightness(int brightness)
-{
- //setAttribute("XV_BRIGHTNESS", brightness, m_brightnessRange.first, m_brightnessRange.second);
-}
-
-int S60VideoSurface::contrast() const
-{
- //return getAttribute("XV_CONTRAST", m_contrastRange.first, m_contrastRange.second);
-}
-
-void S60VideoSurface::setContrast(int contrast)
-{
- //setAttribute("XV_CONTRAST", contrast, m_contrastRange.first, m_contrastRange.second);
-}
-
-int S60VideoSurface::hue() const
-{
- //return getAttribute("XV_HUE", m_hueRange.first, m_hueRange.second);
-}
-
-void S60VideoSurface::setHue(int hue)
-{
- // setAttribute("XV_HUE", hue, m_hueRange.first, m_hueRange.second);
-}
-
-int S60VideoSurface::saturation() const
-{
- //return getAttribute("XV_SATURATION", m_saturationRange.first, m_saturationRange.second);
-}
-
-void S60VideoSurface::setSaturation(int saturation)
-{
- //setAttribute("XV_SATURATION", saturation, m_saturationRange.first, m_saturationRange.second);
-}
-
-int S60VideoSurface::getAttribute(const char *attribute, int minimum, int maximum) const
-{
- /*if (m_portId != 0) {
- Display *display = QX11Info::display();
-
- Atom atom = XInternAtom(display, attribute, True);
-
- int value = 0;
-
- XvGetPortAttribute(display, m_portId, atom, &value);
-
- return redistribute(value, minimum, maximum, -100, 100);
- } else {
- return 0;
- }*/
-}
-
-void S60VideoSurface::setAttribute(const char *attribute, int value, int minimum, int maximum)
-{
- /* if (m_portId != 0) {
- Display *display = QX11Info::display();
-
- Atom atom = XInternAtom(display, attribute, True);
-
- XvSetPortAttribute(
- display, m_portId, atom, redistribute(value, -100, 100, minimum, maximum));
- }*/
-}
-
-int S60VideoSurface::redistribute(
- int value, int fromLower, int fromUpper, int toLower, int toUpper)
-{
- /*return fromUpper != fromLower
- ? ((value - fromLower) * (toUpper - toLower) / (fromUpper - fromLower)) + toLower
- : 0;*/
-}
-
-QList<QVideoFrame::PixelFormat> S60VideoSurface::supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType) const
-{
- /*return handleType == QAbstractVideoBuffer::NoHandle
- ? m_supportedPixelFormats
- : QList<QVideoFrame::PixelFormat>();*/
-}
-
-bool S60VideoSurface::start(const QVideoSurfaceFormat &format)
-{
- /*if (m_image)
- XFree(m_image);
-
- int xvFormatId = 0;
- for (int i = 0; i < m_supportedPixelFormats.count(); ++i) {
- if (m_supportedPixelFormats.at(i) == format.pixelFormat()) {
- xvFormatId = m_formatIds.at(i);
- break;
- }
- }
-
- if (xvFormatId == 0) {
- setError(UnsupportedFormatError);
- } else {
- XvImage *image = XvCreateImage(
- QX11Info::display(),
- m_portId,
- xvFormatId,
- 0,
- format.frameWidth(),
- format.frameHeight());
-
- if (!image) {
- setError(ResourceError);
- } else {
- m_viewport = format.viewport();
- m_image = image;
-
- return QAbstractVideoSurface::start(format);
- }
- }
-
- if (m_image) {
- m_image = 0;
-
- QAbstractVideoSurface::stop();
- }
-*/
- return false;
-}
-
-void S60VideoSurface::stop()
-{/*
- if (m_image) {
- XFree(m_image);
- m_image = 0;
-
- QAbstractVideoSurface::stop();
- }*/
-}
-
-bool S60VideoSurface::present(const QVideoFrame &frame)
-{/*
- if (!m_image) {
- setError(StoppedError);
- return false;
- } else if (m_image->width != frame.width() || m_image->height != frame.height()) {
- setError(IncorrectFormatError);
- return false;
- } else {
- QVideoFrame frameCopy(frame);
-
- if (!frameCopy.map(QAbstractVideoBuffer::ReadOnly)) {
- setError(IncorrectFormatError);
- return false;
- } else {
- bool presented = false;
-
- if (m_image->data_size > frame.numBytes()) {
- qWarning("Insufficient frame buffer size");
- setError(IncorrectFormatError);
- } else if (m_image->num_planes > 0 && m_image->pitches[0] != frame.bytesPerLine()) {
- qWarning("Incompatible frame pitches");
- setError(IncorrectFormatError);
- } else {
- m_image->data = reinterpret_cast<char *>(frameCopy.bits());
-
- XvPutImage(
- QX11Info::display(),
- m_portId,
- m_winId,
- m_gc,
- m_image,
- m_viewport.x(),
- m_viewport.y(),
- m_viewport.width(),
- m_viewport.height(),
- m_displayRect.x(),
- m_displayRect.y(),
- m_displayRect.width(),
- m_displayRect.height());
-
- m_image->data = 0;
-
- presented = true;
- }
-
- frameCopy.unmap();
-
- return presented;
- }
- }*/
-}
-
-bool S60VideoSurface::findPort()
-{/*
- unsigned int count = 0;
- XvAdaptorInfo *adaptors = 0;
- bool portFound = false;
-
- if (XvQueryAdaptors(QX11Info::display(), m_winId, &count, &adaptors) == Success) {
- for (unsigned int i = 0; i < count && !portFound; ++i) {
- if (adaptors[i].type & XvImageMask) {
- m_portId = adaptors[i].base_id;
-
- for (unsigned int j = 0; j < adaptors[i].num_ports && !portFound; ++j, ++m_portId)
- portFound = XvGrabPort(QX11Info::display(), m_portId, 0) == Success;
- }
- }
- XvFreeAdaptorInfo(adaptors);
- }
-
- return portFound;*/
-}
-
-void S60VideoSurface::querySupportedFormats()
-{/*
- int count = 0;
- if (XvImageFormatValues *imageFormats = XvListImageFormats(
- QX11Info::display(), m_portId, &count)) {
- const int rgbCount = sizeof(qt_xvRgbLookup) / sizeof(XvFormatRgb);
- const int yuvCount = sizeof(qt_xvYuvLookup) / sizeof(XvFormatYuv);
-
- for (int i = 0; i < count; ++i) {
- switch (imageFormats[i].type) {
- case XvRGB:
- for (int j = 0; j < rgbCount; ++j) {
- if (imageFormats[i] == qt_xvRgbLookup[j]) {
- m_supportedPixelFormats.append(qt_xvRgbLookup[j].pixelFormat);
- m_formatIds.append(imageFormats[i].id);
- break;
- }
- }
- break;
- case XvYUV:
- for (int j = 0; j < yuvCount; ++j) {
- if (imageFormats[i] == qt_xvYuvLookup[j]) {
- m_supportedPixelFormats.append(qt_xvYuvLookup[j].pixelFormat);
- m_formatIds.append(imageFormats[i].id);
- break;
- }
- }
- break;
- }
- }
- XFree(imageFormats);
- }
-
- m_brightnessRange = qMakePair(0, 0);
- m_contrastRange = qMakePair(0, 0);
- m_hueRange = qMakePair(0, 0);
- m_saturationRange = qMakePair(0, 0);
-
- if (XvAttribute *attributes = XvQueryPortAttributes(QX11Info::display(), m_portId, &count)) {
- for (int i = 0; i < count; ++i) {
- if (qstrcmp(attributes[i].name, "XV_BRIGHTNESS") == 0)
- m_brightnessRange = qMakePair(attributes[i].min_value, attributes[i].max_value);
- else if (qstrcmp(attributes[i].name, "XV_CONTRAST") == 0)
- m_contrastRange = qMakePair(attributes[i].min_value, attributes[i].max_value);
- else if (qstrcmp(attributes[i].name, "XV_HUE") == 0)
- m_hueRange = qMakePair(attributes[i].min_value, attributes[i].max_value);
- else if (qstrcmp(attributes[i].name, "XV_SATURATION") == 0)
- m_saturationRange = qMakePair(attributes[i].min_value, attributes[i].max_value);
- }
-
- XFree(attributes);
- }*/
-}
-
-bool S60VideoSurface::isFormatSupported(const QVideoSurfaceFormat &format) const
-{
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60videosurface.h b/src/plugins/mediaservices/symbian/mediaplayer/s60videosurface.h
deleted file mode 100644
index 836e52f..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60videosurface.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60VIDEOSURFACE_H
-#define S60VIDEOSURFACE_H
-
-#include <QtGui/qwidget.h>
-#include <QtMultimedia/qabstractvideosurface.h>
-
-QT_BEGIN_NAMESPACE
-
-class QVideoSurfaceFormat;
-
-class S60VideoSurface : public QAbstractVideoSurface
-{
- Q_OBJECT
-public:
- S60VideoSurface(QObject *parent = 0);
- ~S60VideoSurface();
-
- WId winId() const;
- void setWinId(WId id);
-
- QRect displayRect() const;
- void setDisplayRect(const QRect &rect);
-
- int brightness() const;
- void setBrightness(int brightness);
-
- int contrast() const;
- void setContrast(int contrast);
-
- int hue() const;
- void setHue(int hue);
-
- int saturation() const;
- void setSaturation(int saturation);
-
- QList<QVideoFrame::PixelFormat> supportedPixelFormats(
- QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const;
-
- bool isFormatSupported(const QVideoSurfaceFormat &format) const;
-
- bool start(const QVideoSurfaceFormat &format);
- void stop();
-
- bool present(const QVideoFrame &frame);
-
-private:
- WId m_winId;
- //XvPortID m_portId;
- //GC m_gc;
- //XvImage *m_image;
- QList<QVideoFrame::PixelFormat> m_supportedPixelFormats;
- QVector<int> m_formatIds;
- QRect m_viewport;
- QRect m_displayRect;
- QPair<int, int> m_brightnessRange;
- QPair<int, int> m_contrastRange;
- QPair<int, int> m_hueRange;
- QPair<int, int> m_saturationRange;
-
- bool findPort();
- void querySupportedFormats();
-
- int getAttribute(const char *attribute, int minimum, int maximum) const;
- void setAttribute(const char *attribute, int value, int minimum, int maximum);
-
- static int redistribute(int value, int fromLower, int fromUpper, int toLower, int toUpper);
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60videowidget.cpp b/src/plugins/mediaservices/symbian/mediaplayer/s60videowidget.cpp
deleted file mode 100644
index 84000d5..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60videowidget.cpp
+++ /dev/null
@@ -1,208 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "s60videowidget.h"
-#include <QtGui/private/qwidget_p.h>
-#include <QEvent>
-#include <coemain.h> // For CCoeEnv
-
-QT_BEGIN_NAMESPACE
-
-QBlackWidget::QBlackWidget(QWidget *parent)
- : QWidget(parent)
-{
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- setAttribute(Qt::WA_OpaquePaintEvent, true);
- setAttribute(Qt::WA_NoSystemBackground, true);
- setAutoFillBackground(false);
- setPalette(QPalette(Qt::black));
-#if QT_VERSION >= 0x040601 && !defined(__WINSCW__)
- qt_widget_private(this)->extraData()->nativePaintMode = QWExtra::ZeroFill;
- qt_widget_private(this)->extraData()->receiveNativePaintEvents = true;
-#endif
-}
-
-QBlackWidget::~QBlackWidget()
-{
-}
-
-void QBlackWidget::beginNativePaintEvent(const QRect& /*controlRect*/)
-{
- emit beginVideoWindowNativePaint();
-}
-
-void QBlackWidget::endNativePaintEvent(const QRect& /*controlRect*/)
-{
- CCoeEnv::Static()->WsSession().Flush();
- emit endVideoWindowNativePaint();
-}
-
-void QBlackWidget::paintEvent(QPaintEvent *event)
-{
- Q_UNUSED(event);
- // Do nothing
-}
-
-S60VideoWidgetControl::S60VideoWidgetControl(QObject *parent)
- : QVideoWidgetControl(parent)
- , m_widget(0)
- , m_aspectRatioMode(Qt::KeepAspectRatio)
-{
- m_widget = new QBlackWidget();
- connect(m_widget, SIGNAL(beginVideoWindowNativePaint()), this, SIGNAL(beginVideoWindowNativePaint()));
- connect(m_widget, SIGNAL(endVideoWindowNativePaint()), this, SIGNAL(endVideoWindowNativePaint()));
- m_widget->installEventFilter(this);
- m_widget->winId();
-}
-
-S60VideoWidgetControl::~S60VideoWidgetControl()
-{
- delete m_widget;
-}
-
-QWidget *S60VideoWidgetControl::videoWidget()
-{
- return m_widget;
-}
-
-Qt::AspectRatioMode S60VideoWidgetControl::aspectRatioMode() const
-{
- return m_aspectRatioMode;
-}
-
-void S60VideoWidgetControl::setAspectRatioMode(Qt::AspectRatioMode ratio)
-{
- if (m_aspectRatioMode == ratio)
- return;
-
- m_aspectRatioMode = ratio;
- emit widgetUpdated();
-}
-
-bool S60VideoWidgetControl::isFullScreen() const
-{
- return m_widget->isFullScreen();
-}
-
-void S60VideoWidgetControl::setFullScreen(bool fullScreen)
-{
- emit fullScreenChanged(fullScreen);
-}
-
-int S60VideoWidgetControl::brightness() const
-{
- return 0;
-}
-
-void S60VideoWidgetControl::setBrightness(int brightness)
-{
- Q_UNUSED(brightness);
-}
-
-int S60VideoWidgetControl::contrast() const
-{
- return 0;
-}
-
-void S60VideoWidgetControl::setContrast(int contrast)
-{
- Q_UNUSED(contrast);
-}
-
-int S60VideoWidgetControl::hue() const
-{
- return 0;
-}
-
-void S60VideoWidgetControl::setHue(int hue)
-{
- Q_UNUSED(hue);
-}
-
-int S60VideoWidgetControl::saturation() const
-{
- return 0;
-}
-
-void S60VideoWidgetControl::setSaturation(int saturation)
-{
- Q_UNUSED(saturation);
-}
-
-bool S60VideoWidgetControl::eventFilter(QObject *object, QEvent *e)
-{
- if (object == m_widget) {
- if ( e->type() == QEvent::Resize
- || e->type() == QEvent::Move
- || e->type() == QEvent::WinIdChange
- || e->type() == QEvent::ParentChange
- || e->type() == QEvent::Show)
- emit widgetUpdated();
- }
- return false;
-}
-
-WId S60VideoWidgetControl::videoWidgetWId()
-{
- if (m_widget->internalWinId())
- return m_widget->internalWinId();
-
- if (m_widget->effectiveWinId())
- return m_widget->effectiveWinId();
-
- return NULL;
-}
-
-void S60VideoWidgetControl::videoStateChanged(QMediaPlayer::State state)
-{
- if (state == QMediaPlayer::StoppedState) {
-#if QT_VERSION <= 0x040600 && !defined(FF_QT)
- qt_widget_private(m_widget)->extraData()->disableBlit = false;
-#endif
- m_widget->repaint();
- } else if (state == QMediaPlayer::PlayingState) {
-#if QT_VERSION <= 0x040600 && !defined(FF_QT)
- qt_widget_private(m_widget)->extraData()->disableBlit = true;
-#endif
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/symbian/mediaplayer/s60videowidget.h b/src/plugins/mediaservices/symbian/mediaplayer/s60videowidget.h
deleted file mode 100644
index 28a1455..0000000
--- a/src/plugins/mediaservices/symbian/mediaplayer/s60videowidget.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60VIDEOWIDGET_H
-#define S60VIDEOWIDGET_H
-
-#include <qvideowidgetcontrol.h>
-#include <qmediaplayer.h>
-
-QT_BEGIN_NAMESPACE
-
-class QBlackWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- QBlackWidget(QWidget *parent = 0);
- virtual ~QBlackWidget();
-
-signals:
- void beginVideoWindowNativePaint();
- void endVideoWindowNativePaint();
-
-public slots:
- void beginNativePaintEvent(const QRect&);
- void endNativePaintEvent(const QRect&);
-
-protected:
- void paintEvent(QPaintEvent *event);
-};
-
-class S60VideoWidgetControl : public QVideoWidgetControl
-{
- Q_OBJECT
-
-public:
- S60VideoWidgetControl(QObject *parent = 0);
- virtual ~S60VideoWidgetControl();
-
- // from QVideoWidgetControl
- QWidget *videoWidget();
- Qt::AspectRatioMode aspectRatioMode() const;
- void setAspectRatioMode(Qt::AspectRatioMode ratio);
- bool isFullScreen() const;
- void setFullScreen(bool fullScreen);
- int brightness() const;
- void setBrightness(int brightness);
- int contrast() const;
- void setContrast(int contrast);
- int hue() const;
- void setHue(int hue);
- int saturation() const;
- void setSaturation(int saturation);
-
- // from QObject
- bool eventFilter(QObject *object, QEvent *event);
-
- //new methods
- WId videoWidgetWId();
-
-signals:
- void widgetUpdated();
- void beginVideoWindowNativePaint();
- void endVideoWindowNativePaint();
-
-private slots:
- void videoStateChanged(QMediaPlayer::State state);
-
-private:
- QBlackWidget *m_widget;
- Qt::AspectRatioMode m_aspectRatioMode;
-};
-
-QT_END_NAMESPACE
-
-
-#endif // S60VIDEOWIDGET_H
diff --git a/src/plugins/mediaservices/symbian/s60mediaserviceplugin.cpp b/src/plugins/mediaservices/symbian/s60mediaserviceplugin.cpp
deleted file mode 100644
index 1185583..0000000
--- a/src/plugins/mediaservices/symbian/s60mediaserviceplugin.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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/qstring.h>
-#include <QtCore/qdebug.h>
-
-#include "s60mediaserviceplugin.h"
-#ifdef QMEDIA_MMF_RADIO
-#include "s60radiotunerservice.h"
-#endif
-#ifdef QMEDIA_MMF_PLAYER
-#include "s60mediaplayerservice.h"
-#endif
-#ifdef QMEDIA_MMF_CAPTURE
-#include "s60audiocaptureservice.h"
-#endif
-
-QT_BEGIN_NAMESPACE
-
-QStringList S60MediaServicePlugin::keys() const
-{
- QStringList list;
-#ifdef QMEDIA_MMF_RADIO
- list << QLatin1String(Q_MEDIASERVICE_RADIO);
-#endif
-
-#ifdef QMEDIA_MMF_PLAYER
- list << QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
-#endif
-#ifdef QMEDIA_MMF_CAPTURE
- list << QLatin1String(Q_MEDIASERVICE_AUDIOSOURCE);
-#endif
- return list;
-}
-
-QMediaService* S60MediaServicePlugin::create(QString const& key)
-{
-#ifdef QMEDIA_MMF_PLAYER
- if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER))
- return new S60MediaPlayerService;
-#endif
-#ifdef QMEDIA_MMF_CAPTURE
- if (key == QLatin1String(Q_MEDIASERVICE_AUDIOSOURCE))
- return new S60AudioCaptureService;
-#endif
-#ifdef QMEDIA_MMF_RADIO
- if (key == QLatin1String(Q_MEDIASERVICE_RADIO))
- return new S60RadioTunerService;
-#endif
-
- return 0;
-}
-
-void S60MediaServicePlugin::release(QMediaService *service)
-{
- delete service;
-}
-
-QT_END_NAMESPACE
-
-Q_EXPORT_PLUGIN2(qmmfengine, S60MediaServicePlugin);
-
diff --git a/src/plugins/mediaservices/symbian/s60mediaserviceplugin.h b/src/plugins/mediaservices/symbian/s60mediaserviceplugin.h
deleted file mode 100644
index be2e05d..0000000
--- a/src/plugins/mediaservices/symbian/s60mediaserviceplugin.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60SERVICEPLUGIN_H
-#define S60SERVICEPLUGIN_H
-
-#include <QtCore/qobject.h>
-#include <qmediaservice.h>
-#include <qmediaserviceproviderplugin.h>
-
-QT_BEGIN_NAMESPACE
-
-class S60MediaServicePlugin : public QMediaServiceProviderPlugin
-{
- Q_OBJECT
-public:
-
- QStringList keys() const;
- QMediaService* create(QString const& key);
- void release(QMediaService *service);
-};
-
-QT_END_NAMESPACE
-
-#endif // S60SERVICEPLUGIN_H
diff --git a/src/plugins/mediaservices/symbian/s60videooutputcontrol.cpp b/src/plugins/mediaservices/symbian/s60videooutputcontrol.cpp
deleted file mode 100644
index da07a7d..0000000
--- a/src/plugins/mediaservices/symbian/s60videooutputcontrol.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 "s60videooutputcontrol.h"
-
-QT_BEGIN_NAMESPACE
-
-S60VideoOutputControl::S60VideoOutputControl(QObject *parent)
- : QVideoOutputControl(parent)
- , m_output(NoOutput)
-{
-}
-
-QList<QVideoOutputControl::Output> S60VideoOutputControl::availableOutputs() const
-{
- return m_outputs;
-}
-
-void S60VideoOutputControl::setAvailableOutputs(const QList<Output> &outputs)
-{
- emit availableOutputsChanged(m_outputs = outputs);
-}
-
-QVideoOutputControl::Output S60VideoOutputControl::output() const
-{
- return m_output;
-}
-
-void S60VideoOutputControl::setOutput(Output output)
-{
- if (!m_outputs.contains(output))
- output = NoOutput;
-
- if (m_output != output)
- emit outputChanged(m_output = output);
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/mediaservices/symbian/s60videooutputcontrol.h b/src/plugins/mediaservices/symbian/s60videooutputcontrol.h
deleted file mode 100644
index dbad889..0000000
--- a/src/plugins/mediaservices/symbian/s60videooutputcontrol.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins 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 S60VIDEOOUTPUTCONTROL_H
-#define S60VIDEOOUTPUTCONTROL_H
-
-#include <QObject>
-#include <qvideooutputcontrol.h>
-
-QT_BEGIN_NAMESPACE
-
-class S60VideoOutputControl : public QVideoOutputControl
-{
- Q_OBJECT
-public:
- S60VideoOutputControl(QObject *parent = 0);
-
- QList<Output> availableOutputs() const;
- void setAvailableOutputs(const QList<Output> &outputs);
-
- Output output() const;
- void setOutput(Output output);
-
-Q_SIGNALS:
- void outputChanged(QVideoOutputControl::Output output);
-
-private:
- QList<Output> m_outputs;
- Output m_output;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/mediaservices/symbian/symbian.pro b/src/plugins/mediaservices/symbian/symbian.pro
deleted file mode 100644
index f76858f..0000000
--- a/src/plugins/mediaservices/symbian/symbian.pro
+++ /dev/null
@@ -1,27 +0,0 @@
-TARGET = qmmfengine
-QT += multimedia mediaservices
-
-load(data_caging_paths)
-
-include (../../qpluginbase.pri)
-include(mediaplayer/mediaplayer.pri)
-
-HEADERS += s60mediaserviceplugin.h \
- s60videooutputcontrol.h
-
-SOURCES += s60mediaserviceplugin.cpp \
- s60videooutputcontrol.cpp
-
-contains(S60_VERSION, 3.2)|contains(S60_VERSION, 3.1) {
- DEFINES += PRE_S60_50_PLATFORM
-}
-
-INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
-symbian-abld:INCLUDEPATH += $$QT_BUILD_TREE/include/QtWidget/private
-
-# This is needed for having the .qtplugin file properly created on Symbian.
-QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/mediaservices
-target.path += $$[QT_INSTALL_PLUGINS]/mediaservices
-INSTALLS += target
-
-TARGET.UID3=0x20021318
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index 507654f..722979d 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -13,6 +13,6 @@ 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 mediaservices
+contains(QT_CONFIG, multimedia): SUBDIRS *= audio
diff --git a/src/qt3support/widgets/q3spinwidget.cpp b/src/qt3support/widgets/q3spinwidget.cpp
index 3dc36c5..3bfad06 100644
--- a/src/qt3support/widgets/q3spinwidget.cpp
+++ b/src/qt3support/widgets/q3spinwidget.cpp
@@ -340,11 +340,13 @@ void Q3SpinWidget::paintEvent(QPaintEvent *)
QPainter p(this);
QStyleOptionSpinBox opt = getStyleOption(this);
- if (d->theButton & 1)
+ if (d->theButton & 1) {
opt.activeSubControls = QStyle::SC_SpinBoxDown;
- else if (d->theButton & 2)
+ opt.state |= QStyle::State_Sunken;
+ } else if (d->theButton & 2) {
opt.activeSubControls = QStyle::SC_SpinBoxUp;
- else
+ opt.state |= QStyle::State_Sunken;
+ } else
opt.activeSubControls = QStyle::SC_None;
opt.rect = style()->subControlRect(QStyle::CC_SpinBox, &opt, QStyle::SC_SpinBoxFrame, this);
opt.subControls = QStyle::SC_All;
diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def
index e309e25..c6d7a2c 100644
--- a/src/s60installs/bwins/QtCoreu.def
+++ b/src/s60installs/bwins/QtCoreu.def
@@ -4463,4 +4463,20 @@ EXPORTS
?parentChanged@QAbstractDeclarativeData@@2P6AXPAV1@PAVQObject@@1@ZA @ 4462 NONAME ; void (*QAbstractDeclarativeData::parentChanged)(class QAbstractDeclarativeData *, class QObject *, class QObject *)
?destroyed@QAbstractDeclarativeData@@2P6AXPAV1@PAVQObject@@@ZA @ 4463 NONAME ; void (*QAbstractDeclarativeData::destroyed)(class QAbstractDeclarativeData *, class QObject *)
?selectThread@QEventDispatcherSymbian@@AAEAAVQSelectThread@@XZ @ 4464 NONAME ; class QSelectThread & QEventDispatcherSymbian::selectThread(void)
+ ?setRawData@QByteArray@@QAEAAV1@PBDI@Z @ 4465 NONAME ; class QByteArray & QByteArray::setRawData(char const *, unsigned int)
+ ?setRawData@QString@@QAEAAV1@PBVQChar@@H@Z @ 4466 NONAME ; class QString & QString::setRawData(class QChar const *, int)
+ ?getStaticMetaObject@QEventDispatcherSymbian@@SAABUQMetaObject@@XZ @ 4467 NONAME ; struct QMetaObject const & QEventDispatcherSymbian::getStaticMetaObject(void)
+ ?isHighSurrogate@QChar@@SA_NI@Z @ 4468 NONAME ; bool QChar::isHighSurrogate(unsigned int)
+ ?isLowSurrogate@QChar@@SA_NI@Z @ 4469 NONAME ; bool QChar::isLowSurrogate(unsigned int)
+ ?metaObject@QEventDispatcherSymbian@@UBEPBUQMetaObject@@XZ @ 4470 NONAME ; struct QMetaObject const * QEventDispatcherSymbian::metaObject(void) const
+ ?msecsTo@QDateTime@@QBE_JABV1@@Z @ 4471 NONAME ; long long QDateTime::msecsTo(class QDateTime const &) const
+ ?qt_metacall@QEventDispatcherSymbian@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 4472 NONAME ; int QEventDispatcherSymbian::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?qt_metacast@QEventDispatcherSymbian@@UAEPAXPBD@Z @ 4473 NONAME ; void * QEventDispatcherSymbian::qt_metacast(char const *)
+ ?requiresSurrogates@QChar@@SA_NI@Z @ 4474 NONAME ; bool QChar::requiresSurrogates(unsigned int)
+ ?symbianInit@QCoreApplicationPrivate@@QAEXXZ @ 4475 NONAME ; void QCoreApplicationPrivate::symbianInit(void)
+ ?tr@QEventDispatcherSymbian@@SA?AVQString@@PBD0@Z @ 4476 NONAME ; class QString QEventDispatcherSymbian::tr(char const *, char const *)
+ ?tr@QEventDispatcherSymbian@@SA?AVQString@@PBD0H@Z @ 4477 NONAME ; class QString QEventDispatcherSymbian::tr(char const *, char const *, int)
+ ?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0@Z @ 4478 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *)
+ ?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0H@Z @ 4479 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *, int)
+ ?staticMetaObject@QEventDispatcherSymbian@@2UQMetaObject@@B @ 4480 NONAME ; struct QMetaObject const QEventDispatcherSymbian::staticMetaObject
diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def
index 5f05f08..c960614 100644
--- a/src/s60installs/bwins/QtDeclarativeu.def
+++ b/src/s60installs/bwins/QtDeclarativeu.def
@@ -180,11 +180,11 @@ EXPORTS
??0QDeclarativeView@@QAE@ABVQUrl@@PAVQWidget@@@Z @ 179 NONAME ; QDeclarativeView::QDeclarativeView(class QUrl const &, class QWidget *)
??0QDeclarativeView@@QAE@PAVQWidget@@@Z @ 180 NONAME ; QDeclarativeView::QDeclarativeView(class QWidget *)
??0QDeclarativeViewSection@@QAE@PAVQObject@@@Z @ 181 NONAME ; QDeclarativeViewSection::QDeclarativeViewSection(class QObject *)
- ??0QDeclarativeVisualDataModel@@QAE@PAVQDeclarativeContext@@@Z @ 182 NONAME ; QDeclarativeVisualDataModel::QDeclarativeVisualDataModel(class QDeclarativeContext *)
+ ??0QDeclarativeVisualDataModel@@QAE@PAVQDeclarativeContext@@@Z @ 182 NONAME ABSENT ; QDeclarativeVisualDataModel::QDeclarativeVisualDataModel(class QDeclarativeContext *)
??0QDeclarativeVisualDataModel@@QAE@XZ @ 183 NONAME ; QDeclarativeVisualDataModel::QDeclarativeVisualDataModel(void)
- ??0QDeclarativeVisualItemModel@@QAE@XZ @ 184 NONAME ; QDeclarativeVisualItemModel::QDeclarativeVisualItemModel(void)
+ ??0QDeclarativeVisualItemModel@@QAE@XZ @ 184 NONAME ABSENT ; QDeclarativeVisualItemModel::QDeclarativeVisualItemModel(void)
??0QDeclarativeVisualModel@@IAE@AAVQObjectPrivate@@PAVQObject@@@Z @ 185 NONAME ; QDeclarativeVisualModel::QDeclarativeVisualModel(class QObjectPrivate &, class QObject *)
- ??0QDeclarativeVisualModel@@QAE@XZ @ 186 NONAME ; QDeclarativeVisualModel::QDeclarativeVisualModel(void)
+ ??0QDeclarativeVisualModel@@QAE@XZ @ 186 NONAME ABSENT ; QDeclarativeVisualModel::QDeclarativeVisualModel(void)
??0QDeclarativeWebPage@@QAE@PAVQDeclarativeWebView@@@Z @ 187 NONAME ABSENT ; QDeclarativeWebPage::QDeclarativeWebPage(class QDeclarativeWebView *)
??0QDeclarativeWebView@@QAE@PAVQDeclarativeItem@@@Z @ 188 NONAME ABSENT ; QDeclarativeWebView::QDeclarativeWebView(class QDeclarativeItem *)
??0QDeclarativeXmlListModel@@QAE@PAVQObject@@@Z @ 189 NONAME ; QDeclarativeXmlListModel::QDeclarativeXmlListModel(class QObject *)
@@ -581,7 +581,7 @@ EXPORTS
?advance@QDeclarativeParticleMotionWander@@UAEXAAVQDeclarativeParticle@@H@Z @ 580 NONAME ABSENT ; void QDeclarativeParticleMotionWander::advance(class QDeclarativeParticle &, int)
?alert@QDeclarativeWebView@@IAEXABVQString@@@Z @ 581 NONAME ABSENT ; void QDeclarativeWebView::alert(class QString const &)
?alternateBase@QDeclarativeSystemPalette@@QBE?AVQColor@@XZ @ 582 NONAME ; class QColor QDeclarativeSystemPalette::alternateBase(void) const
- ?anchors@QDeclarativeItem@@QAEPAVQDeclarativeAnchors@@XZ @ 583 NONAME ; class QDeclarativeAnchors * QDeclarativeItem::anchors(void)
+ ?anchors@QDeclarativeItem@@QAEPAVQDeclarativeAnchors@@XZ @ 583 NONAME ABSENT ; class QDeclarativeAnchors * QDeclarativeItem::anchors(void)
?angle@QDeclarativeParticles@@QBEMXZ @ 584 NONAME ABSENT ; float QDeclarativeParticles::angle(void) const
?angleChanged@QDeclarativeParticles@@IAEXXZ @ 585 NONAME ABSENT ; void QDeclarativeParticles::angleChanged(void)
?angleDeviation@QDeclarativeParticles@@QBEMXZ @ 586 NONAME ABSENT ; float QDeclarativeParticles::angleDeviation(void) const
@@ -647,7 +647,7 @@ EXPORTS
?buildObject@QDeclarativeCompiler@@AAE_NPAVObject@QDeclarativeParser@@ABUBindingContext@1@@Z @ 646 NONAME ; bool QDeclarativeCompiler::buildObject(class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
?buildProperty@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@ABUBindingContext@1@@Z @ 647 NONAME ; bool QDeclarativeCompiler::buildProperty(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
?buildPropertyAssignment@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@ABUBindingContext@1@@Z @ 648 NONAME ; bool QDeclarativeCompiler::buildPropertyAssignment(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
- ?buildPropertyInNamespace@QDeclarativeCompiler@@AAE_NPAUImportedNamespace@QDeclarativeEnginePrivate@@PAVProperty@QDeclarativeParser@@PAVObject@5@ABUBindingContext@1@@Z @ 649 NONAME ; bool QDeclarativeCompiler::buildPropertyInNamespace(struct QDeclarativeEnginePrivate::ImportedNamespace *, class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?buildPropertyInNamespace@QDeclarativeCompiler@@AAE_NPAUImportedNamespace@QDeclarativeEnginePrivate@@PAVProperty@QDeclarativeParser@@PAVObject@5@ABUBindingContext@1@@Z @ 649 NONAME ABSENT ; bool QDeclarativeCompiler::buildPropertyInNamespace(struct QDeclarativeEnginePrivate::ImportedNamespace *, class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
?buildPropertyLiteralAssignment@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@PAVValue@3@ABUBindingContext@1@@Z @ 650 NONAME ; bool QDeclarativeCompiler::buildPropertyLiteralAssignment(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, class QDeclarativeParser::Value *, struct QDeclarativeCompiler::BindingContext const &)
?buildPropertyObjectAssignment@QDeclarativeCompiler@@AAE_NPAVProperty@QDeclarativeParser@@PAVObject@3@PAVValue@3@ABUBindingContext@1@@Z @ 651 NONAME ; bool QDeclarativeCompiler::buildPropertyObjectAssignment(class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, class QDeclarativeParser::Value *, struct QDeclarativeCompiler::BindingContext const &)
?buildScript@QDeclarativeCompiler@@AAE_NPAVObject@QDeclarativeParser@@0@Z @ 652 NONAME ABSENT ; bool QDeclarativeCompiler::buildScript(class QDeclarativeParser::Object *, class QDeclarativeParser::Object *)
@@ -693,7 +693,7 @@ EXPORTS
?classBegin@QDeclarativeDateTimeFormatter@@UAEXXZ @ 692 NONAME ABSENT ; void QDeclarativeDateTimeFormatter::classBegin(void)
?classBegin@QDeclarativeItem@@MAEXXZ @ 693 NONAME ; void QDeclarativeItem::classBegin(void)
?classBegin@QDeclarativeNumberFormatter@@UAEXXZ @ 694 NONAME ABSENT ; void QDeclarativeNumberFormatter::classBegin(void)
- ?classBegin@QDeclarativeParserStatus@@UAEXXZ @ 695 NONAME ; void QDeclarativeParserStatus::classBegin(void)
+ ?classBegin@QDeclarativeParserStatus@@UAEXXZ @ 695 NONAME ABSENT ; void QDeclarativeParserStatus::classBegin(void)
?classBegin@QDeclarativeStateGroup@@UAEXXZ @ 696 NONAME ; void QDeclarativeStateGroup::classBegin(void)
?classBegin@QDeclarativeTimer@@MAEXXZ @ 697 NONAME ; void QDeclarativeTimer::classBegin(void)
?classBegin@QDeclarativeXmlListModel@@UAEXXZ @ 698 NONAME ; void QDeclarativeXmlListModel::classBegin(void)
@@ -754,7 +754,7 @@ EXPORTS
?componentComplete@QDeclarativeItem@@MAEXXZ @ 753 NONAME ; void QDeclarativeItem::componentComplete(void)
?componentComplete@QDeclarativeListView@@MAEXXZ @ 754 NONAME ; void QDeclarativeListView::componentComplete(void)
?componentComplete@QDeclarativeNumberFormatter@@UAEXXZ @ 755 NONAME ABSENT ; void QDeclarativeNumberFormatter::componentComplete(void)
- ?componentComplete@QDeclarativeParserStatus@@UAEXXZ @ 756 NONAME ; void QDeclarativeParserStatus::componentComplete(void)
+ ?componentComplete@QDeclarativeParserStatus@@UAEXXZ @ 756 NONAME ABSENT ; void QDeclarativeParserStatus::componentComplete(void)
?componentComplete@QDeclarativeParticles@@MAEXXZ @ 757 NONAME ABSENT ; void QDeclarativeParticles::componentComplete(void)
?componentComplete@QDeclarativePath@@MAEXXZ @ 758 NONAME ; void QDeclarativePath::componentComplete(void)
?componentComplete@QDeclarativePathView@@MAEXXZ @ 759 NONAME ; void QDeclarativePathView::componentComplete(void)
@@ -1127,8 +1127,8 @@ EXPORTS
?flags@QMetaObjectBuilder@@QBE?AV?$QFlags@W4MetaObjectFlag@QMetaObjectBuilder@@@@XZ @ 1126 NONAME ; class QFlags<enum QMetaObjectBuilder::MetaObjectFlag> QMetaObjectBuilder::flags(void) const
?flickDeceleration@QDeclarativeFlickable@@QBEMXZ @ 1127 NONAME ; float QDeclarativeFlickable::flickDeceleration(void) const
?flickDecelerationChanged@QDeclarativeFlickable@@IAEXXZ @ 1128 NONAME ; void QDeclarativeFlickable::flickDecelerationChanged(void)
- ?flickDirection@QDeclarativeFlickable@@QBE?AW4FlickDirection@1@XZ @ 1129 NONAME ; enum QDeclarativeFlickable::FlickDirection QDeclarativeFlickable::flickDirection(void) const
- ?flickDirectionChanged@QDeclarativeFlickable@@IAEXXZ @ 1130 NONAME ; void QDeclarativeFlickable::flickDirectionChanged(void)
+ ?flickDirection@QDeclarativeFlickable@@QBE?AW4FlickDirection@1@XZ @ 1129 NONAME ABSENT ; enum QDeclarativeFlickable::FlickDirection QDeclarativeFlickable::flickDirection(void) const
+ ?flickDirectionChanged@QDeclarativeFlickable@@IAEXXZ @ 1130 NONAME ABSENT ; void QDeclarativeFlickable::flickDirectionChanged(void)
?flickEnded@QDeclarativeFlickable@@IAEXXZ @ 1131 NONAME ; void QDeclarativeFlickable::flickEnded(void)
?flickStarted@QDeclarativeFlickable@@IAEXXZ @ 1132 NONAME ; void QDeclarativeFlickable::flickStarted(void)
?flickableChildren@QDeclarativeFlickable@@QAE?AU?$QDeclarativeListProperty@VQDeclarativeItem@@@@XZ @ 1133 NONAME ABSENT ; struct QDeclarativeListProperty<class QDeclarativeItem> QDeclarativeFlickable::flickableChildren(void)
@@ -1369,7 +1369,7 @@ EXPORTS
?indexOfSignal@QMetaObjectBuilder@@QAEHABVQByteArray@@@Z @ 1368 NONAME ; int QMetaObjectBuilder::indexOfSignal(class QByteArray const &)
?indexOfSlot@QMetaObjectBuilder@@QAEHABVQByteArray@@@Z @ 1369 NONAME ; int QMetaObjectBuilder::indexOfSlot(class QByteArray const &)
?init@QDeclarativeContextPrivate@@QAEXXZ @ 1370 NONAME ABSENT ; void QDeclarativeContextPrivate::init(void)
- ?init@QDeclarativePaintedItem@@AAEXXZ @ 1371 NONAME ; void QDeclarativePaintedItem::init(void)
+ ?init@QDeclarativePaintedItem@@AAEXXZ @ 1371 NONAME ABSENT ; void QDeclarativePaintedItem::init(void)
?init@QDeclarativeWebView@@AAEXXZ @ 1372 NONAME ABSENT ; void QDeclarativeWebView::init(void)
?initialLayout@QDeclarativeWebView@@AAEXXZ @ 1373 NONAME ABSENT ; void QDeclarativeWebView::initialLayout(void)
?initialValue@QDeclarativeOpenMetaObject@@UAE?AVQVariant@@H@Z @ 1374 NONAME ; class QVariant QDeclarativeOpenMetaObject::initialValue(int)
@@ -2214,9 +2214,9 @@ EXPORTS
?resetVerticalCenter@QDeclarativeAnchors@@QAEXXZ @ 2213 NONAME ; void QDeclarativeAnchors::resetVerticalCenter(void)
?resetWidth@QDeclarativeItem@@QAEXXZ @ 2214 NONAME ; void QDeclarativeItem::resetWidth(void)
?resizeEvent@QDeclarativeView@@MAEXPAVQResizeEvent@@@Z @ 2215 NONAME ; void QDeclarativeView::resizeEvent(class QResizeEvent *)
- ?resizeMode@QDeclarativeLoader@@QBE?AW4ResizeMode@1@XZ @ 2216 NONAME ; enum QDeclarativeLoader::ResizeMode QDeclarativeLoader::resizeMode(void) const
+ ?resizeMode@QDeclarativeLoader@@QBE?AW4ResizeMode@1@XZ @ 2216 NONAME ABSENT ; enum QDeclarativeLoader::ResizeMode QDeclarativeLoader::resizeMode(void) const
?resizeMode@QDeclarativeView@@QBE?AW4ResizeMode@1@XZ @ 2217 NONAME ; enum QDeclarativeView::ResizeMode QDeclarativeView::resizeMode(void) const
- ?resizeModeChanged@QDeclarativeLoader@@IAEXXZ @ 2218 NONAME ; void QDeclarativeLoader::resizeModeChanged(void)
+ ?resizeModeChanged@QDeclarativeLoader@@IAEXXZ @ 2218 NONAME ABSENT ; void QDeclarativeLoader::resizeModeChanged(void)
?resolvedUrl@QDeclarativeContext@@QAE?AVQUrl@@ABV2@@Z @ 2219 NONAME ; class QUrl QDeclarativeContext::resolvedUrl(class QUrl const &)
?resources@QDeclarativeItem@@QAE?AU?$QDeclarativeListProperty@VQObject@@@@XZ @ 2220 NONAME ABSENT ; struct QDeclarativeListProperty<class QObject> QDeclarativeItem::resources(void)
?restart@QDeclarativeTimer@@QAEXXZ @ 2221 NONAME ; void QDeclarativeTimer::restart(void)
@@ -2416,7 +2416,7 @@ EXPORTS
?setFillMode@QDeclarativeImage@@QAEXW4FillMode@1@@Z @ 2415 NONAME ; void QDeclarativeImage::setFillMode(enum QDeclarativeImage::FillMode)
?setFlags@QMetaObjectBuilder@@QAEXV?$QFlags@W4MetaObjectFlag@QMetaObjectBuilder@@@@@Z @ 2416 NONAME ; void QMetaObjectBuilder::setFlags(class QFlags<enum QMetaObjectBuilder::MetaObjectFlag>)
?setFlickDeceleration@QDeclarativeFlickable@@QAEXM@Z @ 2417 NONAME ; void QDeclarativeFlickable::setFlickDeceleration(float)
- ?setFlickDirection@QDeclarativeFlickable@@QAEXW4FlickDirection@1@@Z @ 2418 NONAME ; void QDeclarativeFlickable::setFlickDirection(enum QDeclarativeFlickable::FlickDirection)
+ ?setFlickDirection@QDeclarativeFlickable@@QAEXW4FlickDirection@1@@Z @ 2418 NONAME ABSENT ; void QDeclarativeFlickable::setFlickDirection(enum QDeclarativeFlickable::FlickDirection)
?setFlow@QDeclarativeFlow@@QAEXW4Flow@1@@Z @ 2419 NONAME ; void QDeclarativeFlow::setFlow(enum QDeclarativeFlow::Flow)
?setFlow@QDeclarativeGridView@@QAEXW4Flow@1@@Z @ 2420 NONAME ; void QDeclarativeGridView::setFlow(enum QDeclarativeGridView::Flow)
?setFocus@QDeclarativeItem@@QAEX_N@Z @ 2421 NONAME ; void QDeclarativeItem::setFocus(bool)
@@ -2542,7 +2542,7 @@ EXPORTS
?setRepeating@QDeclarativeTimer@@QAEX_N@Z @ 2541 NONAME ; void QDeclarativeTimer::setRepeating(bool)
?setReset@QDeclarativeAnchorChanges@@QAEXABVQString@@@Z @ 2542 NONAME ABSENT ; void QDeclarativeAnchorChanges::setReset(class QString const &)
?setResettable@QMetaPropertyBuilder@@QAEX_N@Z @ 2543 NONAME ; void QMetaPropertyBuilder::setResettable(bool)
- ?setResizeMode@QDeclarativeLoader@@QAEXW4ResizeMode@1@@Z @ 2544 NONAME ; void QDeclarativeLoader::setResizeMode(enum QDeclarativeLoader::ResizeMode)
+ ?setResizeMode@QDeclarativeLoader@@QAEXW4ResizeMode@1@@Z @ 2544 NONAME ABSENT ; void QDeclarativeLoader::setResizeMode(enum QDeclarativeLoader::ResizeMode)
?setResizeMode@QDeclarativeView@@QAEXW4ResizeMode@1@@Z @ 2545 NONAME ; void QDeclarativeView::setResizeMode(enum QDeclarativeView::ResizeMode)
?setRestoreEntryValues@QDeclarativePropertyChanges@@QAEX_N@Z @ 2546 NONAME ; void QDeclarativePropertyChanges::setRestoreEntryValues(bool)
?setReturnType@QMetaMethodBuilder@@QAEXABVQByteArray@@@Z @ 2547 NONAME ; void QMetaMethodBuilder::setReturnType(class QByteArray const &)
@@ -2595,7 +2595,7 @@ EXPORTS
?setStartY@QDeclarativePath@@QAEXM@Z @ 2594 NONAME ; void QDeclarativePath::setStartY(float)
?setState@QDeclarativeDebugQuery@@AAEXW4State@1@@Z @ 2595 NONAME ; void QDeclarativeDebugQuery::setState(enum QDeclarativeDebugQuery::State)
?setState@QDeclarativeDebugWatch@@AAEXW4State@1@@Z @ 2596 NONAME ; void QDeclarativeDebugWatch::setState(enum QDeclarativeDebugWatch::State)
- ?setState@QDeclarativeItem@@QAEXABVQString@@@Z @ 2597 NONAME ; void QDeclarativeItem::setState(class QString const &)
+ ?setState@QDeclarativeItem@@QAEXABVQString@@@Z @ 2597 NONAME ABSENT ; void QDeclarativeItem::setState(class QString const &)
?setState@QDeclarativeStateGroup@@QAEXABVQString@@@Z @ 2598 NONAME ; void QDeclarativeStateGroup::setState(class QString const &)
?setStateGroup@QDeclarativeState@@QAEXPAVQDeclarativeStateGroup@@@Z @ 2599 NONAME ; void QDeclarativeState::setStateGroup(class QDeclarativeStateGroup *)
?setStaticMetacallFunction@QMetaObjectBuilder@@QAEXP6AHW4Call@QMetaObject@@HPAPAX@Z@Z @ 2600 NONAME ; void QMetaObjectBuilder::setStaticMetacallFunction(int (*)(enum QMetaObject::Call, int, void * *))
@@ -2714,7 +2714,7 @@ EXPORTS
?startY@QDeclarativePath@@QBEMXZ @ 2713 NONAME ; float QDeclarativePath::startY(void) const
?state@QDeclarativeDebugQuery@@QBE?AW4State@1@XZ @ 2714 NONAME ; enum QDeclarativeDebugQuery::State QDeclarativeDebugQuery::state(void) const
?state@QDeclarativeDebugWatch@@QBE?AW4State@1@XZ @ 2715 NONAME ; enum QDeclarativeDebugWatch::State QDeclarativeDebugWatch::state(void) const
- ?state@QDeclarativeItem@@QBE?AVQString@@XZ @ 2716 NONAME ; class QString QDeclarativeItem::state(void) const
+ ?state@QDeclarativeItem@@QBE?AVQString@@XZ @ 2716 NONAME ABSENT ; class QString QDeclarativeItem::state(void) const
?state@QDeclarativeStateGroup@@QBE?AVQString@@XZ @ 2717 NONAME ; class QString QDeclarativeStateGroup::state(void) const
?stateChanged@QDeclarativeDebugQuery@@IAEXW4State@1@@Z @ 2718 NONAME ; void QDeclarativeDebugQuery::stateChanged(enum QDeclarativeDebugQuery::State)
?stateChanged@QDeclarativeDebugWatch@@IAEXW4State@1@@Z @ 2719 NONAME ; void QDeclarativeDebugWatch::stateChanged(enum QDeclarativeDebugWatch::State)
@@ -3563,7 +3563,7 @@ EXPORTS
?computeTransformOrigin@QDeclarativeItemPrivate@@QBE?AVQPointF@@XZ @ 3562 NONAME ; class QPointF QDeclarativeItemPrivate::computeTransformOrigin(void) const
?contextObject@QDeclarativeContext@@QBEPAVQObject@@XZ @ 3563 NONAME ; class QObject * QDeclarativeContext::contextObject(void) const
?copyOriginals@QDeclarativeAnchorChanges@@UAEXPAVQDeclarativeActionEvent@@@Z @ 3564 NONAME ; void QDeclarativeAnchorChanges::copyOriginals(class QDeclarativeActionEvent *)
- ?copyOriginals@QDeclarativeParentChange@@UAEXPAVQDeclarativeActionEvent@@@Z @ 3565 NONAME ; void QDeclarativeParentChange::copyOriginals(class QDeclarativeActionEvent *)
+ ?copyOriginals@QDeclarativeParentChange@@UAEXPAVQDeclarativeActionEvent@@@Z @ 3565 NONAME ABSENT ; void QDeclarativeParentChange::copyOriginals(class QDeclarativeActionEvent *)
?countChanged@QDeclarativeListModel@@IAEXXZ @ 3566 NONAME ; void QDeclarativeListModel::countChanged(void)
?countChanged@QDeclarativePathView@@IAEXXZ @ 3567 NONAME ; void QDeclarativePathView::countChanged(void)
?create@QDeclarativeType@@QBEXPAPAVQObject@@PAPAXI@Z @ 3568 NONAME ; void QDeclarativeType::create(class QObject * *, void * *, unsigned int) const
@@ -3576,7 +3576,7 @@ EXPORTS
?d_func@QDeclarativeSmoothedAnimation@@ABEPBVQDeclarativeSmoothedAnimationPrivate@@XZ @ 3575 NONAME ; class QDeclarativeSmoothedAnimationPrivate const * QDeclarativeSmoothedAnimation::d_func(void) const
?d_func@QDeclarativeTranslate@@AAEPAVQDeclarativeTranslatePrivate@@XZ @ 3576 NONAME ; class QDeclarativeTranslatePrivate * QDeclarativeTranslate::d_func(void)
?d_func@QDeclarativeTranslate@@ABEPBVQDeclarativeTranslatePrivate@@XZ @ 3577 NONAME ; class QDeclarativeTranslatePrivate const * QDeclarativeTranslate::d_func(void) const
- ?data@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQObject@@@@XZ @ 3578 NONAME ; class QDeclarativeListProperty<class QObject> QDeclarativeItem::data(void)
+ ?data@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQObject@@@@XZ @ 3578 NONAME ABSENT ; class QDeclarativeListProperty<class QObject> QDeclarativeItem::data(void)
?dataCleared@QDeclarativeXmlListModel@@AAEXXZ @ 3579 NONAME ; void QDeclarativeXmlListModel::dataCleared(void)
?data_append@QDeclarativeItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQObject@@@@PAVQObject@@@Z @ 3580 NONAME ; void QDeclarativeItemPrivate::data_append(class QDeclarativeListProperty<class QObject> *, class QObject *)
?delegateChanged@QDeclarativeGridView@@IAEXXZ @ 3581 NONAME ; void QDeclarativeGridView::delegateChanged(void)
@@ -3707,7 +3707,7 @@ EXPORTS
?request@QDeclarativePixmapCache@@SAPAVQDeclarativePixmapReply@@PAVQDeclarativeEngine@@ABVQUrl@@HH@Z @ 3706 NONAME ; class QDeclarativePixmapReply * QDeclarativePixmapCache::request(class QDeclarativeEngine *, class QUrl const &, int, int)
?resetHeight@QDeclarativeItemPrivate@@UAEXXZ @ 3707 NONAME ; void QDeclarativeItemPrivate::resetHeight(void)
?resetWidth@QDeclarativeItemPrivate@@UAEXXZ @ 3708 NONAME ; void QDeclarativeItemPrivate::resetWidth(void)
- ?resources@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQObject@@@@XZ @ 3709 NONAME ; class QDeclarativeListProperty<class QObject> QDeclarativeItem::resources(void)
+ ?resources@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQObject@@@@XZ @ 3709 NONAME ABSENT ; class QDeclarativeListProperty<class QObject> QDeclarativeItem::resources(void)
?resources_append@QDeclarativeItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQObject@@@@PAVQObject@@@Z @ 3710 NONAME ; void QDeclarativeItemPrivate::resources_append(class QDeclarativeListProperty<class QObject> *, class QObject *)
?resources_at@QDeclarativeItemPrivate@@SAPAVQObject@@PAV?$QDeclarativeListProperty@VQObject@@@@H@Z @ 3711 NONAME ; class QObject * QDeclarativeItemPrivate::resources_at(class QDeclarativeListProperty<class QObject> *, int)
?resources_count@QDeclarativeItemPrivate@@SAHPAV?$QDeclarativeListProperty@VQObject@@@@@Z @ 3712 NONAME ; int QDeclarativeItemPrivate::resources_count(class QDeclarativeListProperty<class QObject> *)
@@ -3771,8 +3771,8 @@ EXPORTS
?start@QDeclarativeItemPrivate@@SAXAAVQTime@@@Z @ 3770 NONAME ; void QDeclarativeItemPrivate::start(class QTime &)
?startXChanged@QDeclarativePath@@IAEXXZ @ 3771 NONAME ; void QDeclarativePath::startXChanged(void)
?startYChanged@QDeclarativePath@@IAEXXZ @ 3772 NONAME ; void QDeclarativePath::startYChanged(void)
- ?states@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeState@@@@XZ @ 3773 NONAME ; class QDeclarativeListProperty<class QDeclarativeState> QDeclarativeItem::states(void)
- ?states@QDeclarativeItemPrivate@@QAEPAVQDeclarativeStateGroup@@XZ @ 3774 NONAME ; class QDeclarativeStateGroup * QDeclarativeItemPrivate::states(void)
+ ?states@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeState@@@@XZ @ 3773 NONAME ABSENT ; class QDeclarativeListProperty<class QDeclarativeState> QDeclarativeItem::states(void)
+ ?states@QDeclarativeItemPrivate@@QAEPAVQDeclarativeStateGroup@@XZ @ 3774 NONAME ABSENT ; class QDeclarativeStateGroup * QDeclarativeItemPrivate::states(void)
?statesProperty@QDeclarativeStateGroup@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeState@@@@XZ @ 3775 NONAME ; class QDeclarativeListProperty<class QDeclarativeState> QDeclarativeStateGroup::statesProperty(void)
?stops@QDeclarativeGradient@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeGradientStop@@@@XZ @ 3776 NONAME ; class QDeclarativeListProperty<class QDeclarativeGradientStop> QDeclarativeGradient::stops(void)
?subFocusItemChange@QDeclarativeItemPrivate@@UAEXXZ @ 3777 NONAME ; void QDeclarativeItemPrivate::subFocusItemChange(void)
@@ -3799,7 +3799,7 @@ EXPORTS
?transform_clear@QDeclarativeItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQGraphicsTransform@@@@@Z @ 3798 NONAME ; void QDeclarativeItemPrivate::transform_clear(class QDeclarativeListProperty<class QGraphicsTransform> *)
?transform_count@QDeclarativeItemPrivate@@SAHPAV?$QDeclarativeListProperty@VQGraphicsTransform@@@@@Z @ 3799 NONAME ; int QDeclarativeItemPrivate::transform_count(class QDeclarativeListProperty<class QGraphicsTransform> *)
?transition@QDeclarativeSmoothedAnimation@@UAEXAAV?$QList@VQDeclarativeAction@@@@AAV?$QList@VQDeclarativeProperty@@@@W4TransitionDirection@QDeclarativeAbstractAnimation@@@Z @ 3800 NONAME ; void QDeclarativeSmoothedAnimation::transition(class QList<class QDeclarativeAction> &, class QList<class QDeclarativeProperty> &, enum QDeclarativeAbstractAnimation::TransitionDirection)
- ?transitions@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeTransition@@@@XZ @ 3801 NONAME ; class QDeclarativeListProperty<class QDeclarativeTransition> QDeclarativeItem::transitions(void)
+ ?transitions@QDeclarativeItem@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeTransition@@@@XZ @ 3801 NONAME ABSENT ; class QDeclarativeListProperty<class QDeclarativeTransition> QDeclarativeItem::transitions(void)
?transitionsProperty@QDeclarativeStateGroup@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeTransition@@@@XZ @ 3802 NONAME ; class QDeclarativeListProperty<class QDeclarativeTransition> QDeclarativeStateGroup::transitionsProperty(void)
?triggeredOnStartChanged@QDeclarativeTimer@@IAEXXZ @ 3803 NONAME ; void QDeclarativeTimer::triggeredOnStartChanged(void)
?type@Variant@QDeclarativeParser@@QBE?AW4Type@12@XZ @ 3804 NONAME ; enum QDeclarativeParser::Variant::Type QDeclarativeParser::Variant::type(void) const
@@ -3920,7 +3920,7 @@ EXPORTS
?execute@QDeclarativeParentChange@@UAEXW4Reason@QDeclarativeActionEvent@@@Z @ 3919 NONAME ; void QDeclarativeParentChange::execute(enum QDeclarativeActionEvent::Reason)
?resetSourceComponent@QDeclarativeLoader@@QAEXXZ @ 3920 NONAME ; void QDeclarativeLoader::resetSourceComponent(void)
?rootIndex@QDeclarativeVisualDataModel@@QBE?AVQVariant@@XZ @ 3921 NONAME ; class QVariant QDeclarativeVisualDataModel::rootIndex(void) const
- ?createObject@QDeclarativeComponent@@IAE?AVQScriptValue@@XZ @ 3922 NONAME ; class QScriptValue QDeclarativeComponent::createObject(void)
+ ?createObject@QDeclarativeComponent@@IAE?AVQScriptValue@@XZ @ 3922 NONAME ABSENT ; class QScriptValue QDeclarativeComponent::createObject(void)
?execute@QDeclarativeStateChangeScript@@UAEXW4Reason@QDeclarativeActionEvent@@@Z @ 3923 NONAME ; void QDeclarativeStateChangeScript::execute(enum QDeclarativeActionEvent::Reason)
?active@QDeclarativeDrag@@QBE_NXZ @ 3924 NONAME ; bool QDeclarativeDrag::active(void) const
?retransformBack@QDeclarativeFlipable@@AAEXXZ @ 3925 NONAME ; void QDeclarativeFlipable::retransformBack(void)
@@ -3955,4 +3955,69 @@ EXPORTS
?parentModelIndex@QDeclarativeVisualDataModel@@QBE?AVQVariant@@XZ @ 3954 NONAME ; class QVariant QDeclarativeVisualDataModel::parentModelIndex(void) const
?usedAnchors@QDeclarativeAnchors@@QBE?AV?$QFlags@W4Anchor@QDeclarativeAnchors@@@@XZ @ 3955 NONAME ; class QFlags<enum QDeclarativeAnchors::Anchor> QDeclarativeAnchors::usedAnchors(void) const
?eventFilter@QDeclarativeView@@MAE_NPAVQObject@@PAVQEvent@@@Z @ 3956 NONAME ; bool QDeclarativeView::eventFilter(class QObject *, class QEvent *)
+ ??0QDeclarativeInfo@@AAE@PAVQDeclarativeInfoPrivate@@@Z @ 3957 NONAME ; QDeclarativeInfo::QDeclarativeInfo(class QDeclarativeInfoPrivate *)
+ ?_states@QDeclarativeItemPrivate@@QAEPAVQDeclarativeStateGroup@@XZ @ 3958 NONAME ; class QDeclarativeStateGroup * QDeclarativeItemPrivate::_states(void)
+ ?baseline@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3959 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::baseline(void) const
+ ?bottom@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3960 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::bottom(void) const
+ ?buildPropertyInNamespace@QDeclarativeCompiler@@AAE_NPAVQDeclarativeImportedNamespace@@PAVProperty@QDeclarativeParser@@PAVObject@4@ABUBindingContext@1@@Z @ 3961 NONAME ; bool QDeclarativeCompiler::buildPropertyInNamespace(class QDeclarativeImportedNamespace *, class QDeclarativeParser::Property *, class QDeclarativeParser::Object *, struct QDeclarativeCompiler::BindingContext const &)
+ ?canceled@QDeclarativeMouseArea@@IAEXXZ @ 3962 NONAME ; void QDeclarativeMouseArea::canceled(void)
+ ?classBegin@QDeclarativeBind@@MAEXXZ @ 3963 NONAME ; void QDeclarativeBind::classBegin(void)
+ ?classBegin@QDeclarativeConnections@@EAEXXZ @ 3964 NONAME ; void QDeclarativeConnections::classBegin(void)
+ ?classBegin@QDeclarativePath@@MAEXXZ @ 3965 NONAME ; void QDeclarativePath::classBegin(void)
+ ?classBegin@QDeclarativeWorkerScript@@MAEXXZ @ 3966 NONAME ; void QDeclarativeWorkerScript::classBegin(void)
+ ?completePending@QDeclarativeVisualDataModel@@UBE_NXZ @ 3967 NONAME ; bool QDeclarativeVisualDataModel::completePending(void) const
+ ?completePending@QDeclarativeVisualItemModel@@UBE_NXZ @ 3968 NONAME ; bool QDeclarativeVisualItemModel::completePending(void) const
+ ?componentFinalized@QDeclarativeBehavior@@AAEXXZ @ 3969 NONAME ; void QDeclarativeBehavior::componentFinalized(void)
+ ?createObject@QDeclarativeComponent@@IAE?AVQScriptValue@@PAVQObject@@@Z @ 3970 NONAME ; class QScriptValue QDeclarativeComponent::createObject(class QObject *)
+ ?data@QDeclarativeItemPrivate@@QAE?AV?$QDeclarativeListProperty@VQObject@@@@XZ @ 3971 NONAME ; class QDeclarativeListProperty<class QObject> QDeclarativeItemPrivate::data(void)
+ ?engine@QDeclarativeWorkerScript@@AAEPAVQDeclarativeWorkerScriptEngine@@XZ @ 3972 NONAME ; class QDeclarativeWorkerScriptEngine * QDeclarativeWorkerScript::engine(void)
+ ?geometryChanged@QDeclarativePaintedItem@@MAEXABVQRectF@@0@Z @ 3973 NONAME ; void QDeclarativePaintedItem::geometryChanged(class QRectF const &, class QRectF const &)
+ ?get@QDeclarativeItemPrivate@@SAPAV1@PAVQDeclarativeItem@@@Z @ 3974 NONAME ; class QDeclarativeItemPrivate * QDeclarativeItemPrivate::get(class QDeclarativeItem *)
+ ?horizontalCenter@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3975 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::horizontalCenter(void) const
+ ?hoverEnabled@QDeclarativeMouseArea@@QBE_NXZ @ 3976 NONAME ; bool QDeclarativeMouseArea::hoverEnabled(void) const
+ ?hoverEnabledChanged@QDeclarativeMouseArea@@IAEXXZ @ 3977 NONAME ; void QDeclarativeMouseArea::hoverEnabledChanged(void)
+ ?ignoreUnknownSignals@QDeclarativeConnections@@QBE_NXZ @ 3978 NONAME ; bool QDeclarativeConnections::ignoreUnknownSignals(void) const
+ ?itemChange@QDeclarativeMouseArea@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 3979 NONAME ; class QVariant QDeclarativeMouseArea::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
+ ?itemChange@QDeclarativePaintedItem@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 3980 NONAME ; class QVariant QDeclarativePaintedItem::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
+ ?left@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3981 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::left(void) const
+ ?reportConflictingAnchors@QDeclarativeColumn@@MAEXXZ @ 3982 NONAME ; void QDeclarativeColumn::reportConflictingAnchors(void)
+ ?reportConflictingAnchors@QDeclarativeFlow@@MAEXXZ @ 3983 NONAME ; void QDeclarativeFlow::reportConflictingAnchors(void)
+ ?reportConflictingAnchors@QDeclarativeGrid@@MAEXXZ @ 3984 NONAME ; void QDeclarativeGrid::reportConflictingAnchors(void)
+ ?reportConflictingAnchors@QDeclarativeRow@@MAEXXZ @ 3985 NONAME ; void QDeclarativeRow::reportConflictingAnchors(void)
+ ?resources@QDeclarativeItemPrivate@@QAE?AV?$QDeclarativeListProperty@VQObject@@@@XZ @ 3986 NONAME ; class QDeclarativeListProperty<class QObject> QDeclarativeItemPrivate::resources(void)
+ ?right@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3987 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::right(void) const
+ ?setHoverEnabled@QDeclarativeMouseArea@@QAEX_N@Z @ 3988 NONAME ; void QDeclarativeMouseArea::setHoverEnabled(bool)
+ ?setIgnoreUnknownSignals@QDeclarativeConnections@@QAEX_N@Z @ 3989 NONAME ; void QDeclarativeConnections::setIgnoreUnknownSignals(bool)
+ ?setState@QDeclarativeItemPrivate@@QAEXABVQString@@@Z @ 3990 NONAME ; void QDeclarativeItemPrivate::setState(class QString const &)
+ ?state@QDeclarativeItemPrivate@@QBE?AVQString@@XZ @ 3991 NONAME ; class QString QDeclarativeItemPrivate::state(void) const
+ ?states@QDeclarativeItemPrivate@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeState@@@@XZ @ 3992 NONAME ; class QDeclarativeListProperty<class QDeclarativeState> QDeclarativeItemPrivate::states(void)
+ ?top@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3993 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::top(void) const
+ ?transitions@QDeclarativeItemPrivate@@QAE?AV?$QDeclarativeListProperty@VQDeclarativeTransition@@@@XZ @ 3994 NONAME ; class QDeclarativeListProperty<class QDeclarativeTransition> QDeclarativeItemPrivate::transitions(void)
+ ?verticalCenter@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 3995 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::verticalCenter(void) const
+ ?flickDirection@QDeclarativeFlickable@@QBE?AW4FlickableDirection@1@XZ @ 3996 NONAME ; enum QDeclarativeFlickable::FlickableDirection QDeclarativeFlickable::flickDirection(void) const
+ ?flickingHorizontallyChanged@QDeclarativeFlickable@@IAEXXZ @ 3997 NONAME ; void QDeclarativeFlickable::flickingHorizontallyChanged(void)
+ ?flickableDirection@QDeclarativeFlickable@@QBE?AW4FlickableDirection@1@XZ @ 3998 NONAME ; enum QDeclarativeFlickable::FlickableDirection QDeclarativeFlickable::flickableDirection(void) const
+ ?setFlickableDirection@QDeclarativeFlickable@@QAEXW4FlickableDirection@1@@Z @ 3999 NONAME ; void QDeclarativeFlickable::setFlickableDirection(enum QDeclarativeFlickable::FlickableDirection)
+ ?isMovingVertically@QDeclarativeFlickable@@QBE_NXZ @ 4000 NONAME ; bool QDeclarativeFlickable::isMovingVertically(void) const
+ ?movingHorizontallyChanged@QDeclarativeFlickable@@IAEXXZ @ 4001 NONAME ; void QDeclarativeFlickable::movingHorizontallyChanged(void)
+ ?d_func@QDeclarativeView@@AAEPAVQDeclarativeViewPrivate@@XZ @ 4002 NONAME ; class QDeclarativeViewPrivate * QDeclarativeView::d_func(void)
+ ?d_func@QDeclarativeView@@ABEPBVQDeclarativeViewPrivate@@XZ @ 4003 NONAME ; class QDeclarativeViewPrivate const * QDeclarativeView::d_func(void) const
+ ??0QDeclarativeVisualDataModel@@QAE@PAVQDeclarativeContext@@PAVQObject@@@Z @ 4004 NONAME ; QDeclarativeVisualDataModel::QDeclarativeVisualDataModel(class QDeclarativeContext *, class QObject *)
+ ?movingVerticallyChanged@QDeclarativeFlickable@@IAEXXZ @ 4005 NONAME ; void QDeclarativeFlickable::movingVerticallyChanged(void)
+ ?isFlickingHorizontally@QDeclarativeFlickable@@QBE_NXZ @ 4006 NONAME ; bool QDeclarativeFlickable::isFlickingHorizontally(void) const
+ ??0QDeclarativeVisualItemModel@@QAE@PAVQObject@@@Z @ 4007 NONAME ; QDeclarativeVisualItemModel::QDeclarativeVisualItemModel(class QObject *)
+ ?flickingVerticallyChanged@QDeclarativeFlickable@@IAEXXZ @ 4008 NONAME ; void QDeclarativeFlickable::flickingVerticallyChanged(void)
+ ?isMovingHorizontally@QDeclarativeFlickable@@QBE_NXZ @ 4009 NONAME ; bool QDeclarativeFlickable::isMovingHorizontally(void) const
+ ??0QDeclarativeVisualModel@@QAE@PAVQObject@@@Z @ 4010 NONAME ; QDeclarativeVisualModel::QDeclarativeVisualModel(class QObject *)
+ ?setFlickDirection@QDeclarativeFlickable@@QAEXW4FlickableDirection@1@@Z @ 4011 NONAME ; void QDeclarativeFlickable::setFlickDirection(enum QDeclarativeFlickable::FlickableDirection)
+ ?flickableDirectionChanged@QDeclarativeFlickable@@IAEXXZ @ 4012 NONAME ; void QDeclarativeFlickable::flickableDirectionChanged(void)
+ ?isFlickingVertically@QDeclarativeFlickable@@QBE_NXZ @ 4013 NONAME ; bool QDeclarativeFlickable::isFlickingVertically(void) const
+ ?componentComplete@QDeclarativeLoader@@MAEXXZ @ 4014 NONAME ; void QDeclarativeLoader::componentComplete(void)
+ ?decrementCurrentIndex@QDeclarativePathView@@QAEXXZ @ 4015 NONAME ; void QDeclarativePathView::decrementCurrentIndex(void)
+ ?incrementCurrentIndex@QDeclarativePathView@@QAEXXZ @ 4016 NONAME ; void QDeclarativePathView::incrementCurrentIndex(void)
+ ?inputMethodPreHandler@QDeclarativeItem@@IAEXPAVQInputMethodEvent@@@Z @ 4017 NONAME ; void QDeclarativeItem::inputMethodPreHandler(class QInputMethodEvent *)
+ ?keyPressPreHandler@QDeclarativeItem@@IAEXPAVQKeyEvent@@@Z @ 4018 NONAME ; void QDeclarativeItem::keyPressPreHandler(class QKeyEvent *)
+ ?keyReleasePreHandler@QDeclarativeItem@@IAEXPAVQKeyEvent@@@Z @ 4019 NONAME ; void QDeclarativeItem::keyReleasePreHandler(class QKeyEvent *)
+ ?loaded@QDeclarativeLoader@@IAEXXZ @ 4020 NONAME ; void QDeclarativeLoader::loaded(void)
+ ?needsCopy@QDeclarativeAnchorChanges@@UAE_NXZ @ 4021 NONAME ; bool QDeclarativeAnchorChanges::needsCopy(void)
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index c3a3a08..15addf6 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -2125,9 +2125,9 @@ EXPORTS
?addText@QPainterPath@@QAEXMMABVQFont@@ABVQString@@@Z @ 2124 NONAME ; void QPainterPath::addText(float, float, class QFont const &, class QString const &)
?addToGroup@QGraphicsItemGroup@@QAEXPAVQGraphicsItem@@@Z @ 2125 NONAME ; void QGraphicsItemGroup::addToGroup(class QGraphicsItem *)
?addToIndex@QGraphicsItem@@IAEXXZ @ 2126 NONAME ; void QGraphicsItem::addToIndex(void)
- ?addToPolygon@QBezier@@QBEXPAVQPolygonF@@@Z @ 2127 NONAME ; void QBezier::addToPolygon(class QPolygonF *) const
- ?addToPolygonIterative@QBezier@@QBEXPAVQPolygonF@@@Z @ 2128 NONAME ; void QBezier::addToPolygonIterative(class QPolygonF *) const
- ?addToPolygonMixed@QBezier@@QBEXPAVQPolygonF@@@Z @ 2129 NONAME ; void QBezier::addToPolygonMixed(class QPolygonF *) const
+ ?addToPolygon@QBezier@@QBEXPAVQPolygonF@@@Z @ 2127 NONAME ABSENT ; void QBezier::addToPolygon(class QPolygonF *) const
+ ?addToPolygonIterative@QBezier@@QBEXPAVQPolygonF@@@Z @ 2128 NONAME ABSENT ; void QBezier::addToPolygonIterative(class QPolygonF *) const
+ ?addToPolygonMixed@QBezier@@QBEXPAVQPolygonF@@@Z @ 2129 NONAME ABSENT ; void QBezier::addToPolygonMixed(class QPolygonF *) const
?addToolBar@QMainWindow@@QAEPAVQToolBar@@ABVQString@@@Z @ 2130 NONAME ; class QToolBar * QMainWindow::addToolBar(class QString const &)
?addToolBar@QMainWindow@@QAEXPAVQToolBar@@@Z @ 2131 NONAME ; void QMainWindow::addToolBar(class QToolBar *)
?addToolBar@QMainWindow@@QAEXW4ToolBarArea@Qt@@PAVQToolBar@@@Z @ 2132 NONAME ; void QMainWindow::addToolBar(enum Qt::ToolBarArea, class QToolBar *)
@@ -3207,7 +3207,7 @@ EXPORTS
?cursorWordForward@QLineControl@@QAEX_N@Z @ 3206 NONAME ; void QLineControl::cursorWordForward(bool)
?cursorWordForward@QLineEdit@@QAEX_N@Z @ 3207 NONAME ; void QLineEdit::cursorWordForward(bool)
?curveThreshold@QPainterPathStroker@@QBEMXZ @ 3208 NONAME ; float QPainterPathStroker::curveThreshold(void) const
- ?curveThreshold@QStroker@@QBEMXZ @ 3209 NONAME ; float QStroker::curveThreshold(void) const
+ ?curveThreshold@QStroker@@QBEMXZ @ 3209 NONAME ABSENT ; float QStroker::curveThreshold(void) const
?customButtonClicked@QWizard@@IAEXH@Z @ 3210 NONAME ; void QWizard::customButtonClicked(int)
?customColor@QColorDialog@@SAIH@Z @ 3211 NONAME ; unsigned int QColorDialog::customColor(int)
?customContextMenuRequested@QWidget@@IAEXABVQPoint@@@Z @ 3212 NONAME ; void QWidget::customContextMenuRequested(class QPoint const &)
@@ -8769,7 +8769,7 @@ EXPORTS
?setCursorWidth@QTextEdit@@QAEXH@Z @ 8768 NONAME ; void QTextEdit::setCursorWidth(int)
?setCursor_sys@QWidgetPrivate@@QAEXABVQCursor@@@Z @ 8769 NONAME ; void QWidgetPrivate::setCursor_sys(class QCursor const &)
?setCurveThreshold@QPainterPathStroker@@QAEXM@Z @ 8770 NONAME ; void QPainterPathStroker::setCurveThreshold(float)
- ?setCurveThreshold@QStroker@@QAEXM@Z @ 8771 NONAME ; void QStroker::setCurveThreshold(float)
+ ?setCurveThreshold@QStroker@@QAEXM@Z @ 8771 NONAME ABSENT ; void QStroker::setCurveThreshold(float)
?setCustomColor@QColorDialog@@SAXHI@Z @ 8772 NONAME ; void QColorDialog::setCustomColor(int, unsigned int)
?setDashOffset@QDashStroker@@QAEXM@Z @ 8773 NONAME ; void QDashStroker::setDashOffset(float)
?setDashOffset@QPainterPathStroker@@QAEXM@Z @ 8774 NONAME ; void QPainterPathStroker::setDashOffset(float)
@@ -10990,7 +10990,7 @@ EXPORTS
?toPointF@QVector2D@@QBE?AVQPointF@@XZ @ 10989 NONAME ; class QPointF QVector2D::toPointF(void) const
?toPointF@QVector3D@@QBE?AVQPointF@@XZ @ 10990 NONAME ; class QPointF QVector3D::toPointF(void) const
?toPointF@QVector4D@@QBE?AVQPointF@@XZ @ 10991 NONAME ; class QPointF QVector4D::toPointF(void) const
- ?toPolygon@QBezier@@QBE?AVQPolygonF@@XZ @ 10992 NONAME ; class QPolygonF QBezier::toPolygon(void) const
+ ?toPolygon@QBezier@@QBE?AVQPolygonF@@XZ @ 10992 NONAME ABSENT ; class QPolygonF QBezier::toPolygon(void) const
?toPolygon@QPolygonF@@QBE?AVQPolygon@@XZ @ 10993 NONAME ; class QPolygon QPolygonF::toPolygon(void) const
?toPrevious@QDataWidgetMapper@@QAEXXZ @ 10994 NONAME ; void QDataWidgetMapper::toPrevious(void)
?toReversed@QPainterPath@@QBE?AV1@XZ @ 10995 NONAME ; class QPainterPath QPainterPath::toReversed(void) const
@@ -12717,7 +12717,7 @@ EXPORTS
?updateInputMethodSensitivity@QGraphicsViewPrivate@@QAEXXZ @ 12716 NONAME ; void QGraphicsViewPrivate::updateInputMethodSensitivity(void)
?updateLastCenterPoint@QGraphicsViewPrivate@@QAEXXZ @ 12717 NONAME ; void QGraphicsViewPrivate::updateLastCenterPoint(void)
?updateRect@QGraphicsViewPrivate@@QAE_NABVQRect@@@Z @ 12718 NONAME ; bool QGraphicsViewPrivate::updateRect(class QRect const &)
- ?updateRegion@QGraphicsViewPrivate@@QAE_NABVQRegion@@@Z @ 12719 NONAME ; bool QGraphicsViewPrivate::updateRegion(class QRegion const &)
+ ?updateRegion@QGraphicsViewPrivate@@QAE_NABVQRegion@@@Z @ 12719 NONAME ABSENT ; bool QGraphicsViewPrivate::updateRegion(class QRegion const &)
?updateScroll@QGraphicsViewPrivate@@QAEXXZ @ 12720 NONAME ; void QGraphicsViewPrivate::updateScroll(void)
?verticalScroll@QGraphicsViewPrivate@@QBE_JXZ @ 12721 NONAME ; long long QGraphicsViewPrivate::verticalScroll(void) const
?viewportEvent@QAbstractScrollAreaPrivate@@QAE_NPAVQEvent@@@Z @ 12722 NONAME ; bool QAbstractScrollAreaPrivate::viewportEvent(class QEvent *)
@@ -12798,4 +12798,24 @@ EXPORTS
?hasPartialUpdateSupport@QWindowSurface@@QBE_NXZ @ 12797 NONAME ; bool QWindowSurface::hasPartialUpdateSupport(void) const
?name@QIcon@@QBE?AVQString@@XZ @ 12798 NONAME ; class QString QIcon::name(void) const
?iconName@QIconEngineV2@@QAE?AVQString@@XZ @ 12799 NONAME ; class QString QIconEngineV2::iconName(void)
+ ?updateRectF@QGraphicsViewPrivate@@QAE_NABVQRectF@@@Z @ 12800 NONAME ; bool QGraphicsViewPrivate::updateRectF(class QRectF const &)
+ ?updateRegion@QGraphicsViewPrivate@@QAE_NABVQRectF@@ABVQTransform@@@Z @ 12801 NONAME ; bool QGraphicsViewPrivate::updateRegion(class QRectF const &, class QTransform const &)
+ ?totalUsed@QPixmapCache@@SAHXZ @ 12802 NONAME ; int QPixmapCache::totalUsed(void)
+ ?allPixmaps@QPixmapCache@@SA?AV?$QList@U?$QPair@VQString@@VQPixmap@@@@@@XZ @ 12803 NONAME ; class QList<struct QPair<class QString, class QPixmap> > QPixmapCache::allPixmaps(void)
+ ?flushDetachedPixmaps@QPixmapCache@@SAXXZ @ 12804 NONAME ; void QPixmapCache::flushDetachedPixmaps(void)
+ ??0QImageTextureGlyphCache@@QAE@W4Type@QFontEngineGlyphCache@@ABVQTransform@@@Z @ 12805 NONAME ; QImageTextureGlyphCache::QImageTextureGlyphCache(enum QFontEngineGlyphCache::Type, class QTransform const &)
+ ??1QImageTextureGlyphCache@@UAE@XZ @ 12806 NONAME ; QImageTextureGlyphCache::~QImageTextureGlyphCache(void)
+ ??_EQImageTextureGlyphCache@@UAE@I@Z @ 12807 NONAME ; QImageTextureGlyphCache::~QImageTextureGlyphCache(unsigned int)
+ ?addToPolygon@QBezier@@QBEXPAVQPolygonF@@M@Z @ 12808 NONAME ; void QBezier::addToPolygon(class QPolygonF *, float) const
+ ?createTextureData@QImageTextureGlyphCache@@UAEXHH@Z @ 12809 NONAME ; void QImageTextureGlyphCache::createTextureData(int, int)
+ ?curveThreshold@QStrokerOps@@QBEMXZ @ 12810 NONAME ; float QStrokerOps::curveThreshold(void) const
+ ?fillTexture@QImageTextureGlyphCache@@UAEXABUCoord@QTextureGlyphCache@@I@Z @ 12811 NONAME ; void QImageTextureGlyphCache::fillTexture(struct QTextureGlyphCache::Coord const &, unsigned int)
+ ?glyphMargin@QImageTextureGlyphCache@@UBEHXZ @ 12812 NONAME ; int QImageTextureGlyphCache::glyphMargin(void) const
+ ?image@QImageTextureGlyphCache@@QBEABVQImage@@XZ @ 12813 NONAME ; class QImage const & QImageTextureGlyphCache::image(void) const
+ ?resizeTextureData@QImageTextureGlyphCache@@UAEXHH@Z @ 12814 NONAME ; void QImageTextureGlyphCache::resizeTextureData(int, int)
+ ?setCurveThreshold@QStrokerOps@@QAEXM@Z @ 12815 NONAME ; void QStrokerOps::setCurveThreshold(float)
+ ?setCurveThresholdFromTransform@QStrokerOps@@QAEXABVQTransform@@@Z @ 12816 NONAME ; void QStrokerOps::setCurveThresholdFromTransform(class QTransform const &)
+ ?setUpdateClip@QGraphicsViewPrivate@@QAEXPAVQGraphicsItem@@@Z @ 12817 NONAME ; void QGraphicsViewPrivate::setUpdateClip(class QGraphicsItem *)
+ ?toPolygon@QBezier@@QBE?AVQPolygonF@@M@Z @ 12818 NONAME ; class QPolygonF QBezier::toPolygon(float) const
+ ?updatePaintedViewBoundingRects@QGraphicsItemPrivate@@QAEX_N@Z @ 12819 NONAME ; void QGraphicsItemPrivate::updatePaintedViewBoundingRects(bool)
diff --git a/src/s60installs/bwins/QtMediaServicesu.def b/src/s60installs/bwins/QtMediaServicesu.def
deleted file mode 100644
index d674d12..0000000
--- a/src/s60installs/bwins/QtMediaServicesu.def
+++ /dev/null
@@ -1,673 +0,0 @@
-EXPORTS
- ??0QGraphicsVideoItem@@QAE@PAVQGraphicsItem@@@Z @ 1 NONAME ; QGraphicsVideoItem::QGraphicsVideoItem(class QGraphicsItem *)
- ??0QLocalMediaPlaylistProvider@@QAE@PAVQObject@@@Z @ 2 NONAME ; QLocalMediaPlaylistProvider::QLocalMediaPlaylistProvider(class QObject *)
- ??0QMediaContent@@QAE@ABV0@@Z @ 3 NONAME ; QMediaContent::QMediaContent(class QMediaContent const &)
- ??0QMediaContent@@QAE@ABV?$QList@VQMediaResource@@@@@Z @ 4 NONAME ; QMediaContent::QMediaContent(class QList<class QMediaResource> const &)
- ??0QMediaContent@@QAE@ABVQMediaResource@@@Z @ 5 NONAME ; QMediaContent::QMediaContent(class QMediaResource const &)
- ??0QMediaContent@@QAE@ABVQNetworkRequest@@@Z @ 6 NONAME ; QMediaContent::QMediaContent(class QNetworkRequest const &)
- ??0QMediaContent@@QAE@ABVQUrl@@@Z @ 7 NONAME ; QMediaContent::QMediaContent(class QUrl const &)
- ??0QMediaContent@@QAE@XZ @ 8 NONAME ; QMediaContent::QMediaContent(void)
- ??0QMediaControl@@IAE@AAVQMediaControlPrivate@@PAVQObject@@@Z @ 9 NONAME ; QMediaControl::QMediaControl(class QMediaControlPrivate &, class QObject *)
- ??0QMediaControl@@IAE@PAVQObject@@@Z @ 10 NONAME ; QMediaControl::QMediaControl(class QObject *)
- ??0QMediaObject@@IAE@AAVQMediaObjectPrivate@@PAVQObject@@PAVQMediaService@@@Z @ 11 NONAME ; QMediaObject::QMediaObject(class QMediaObjectPrivate &, class QObject *, class QMediaService *)
- ??0QMediaObject@@IAE@PAVQObject@@PAVQMediaService@@@Z @ 12 NONAME ; QMediaObject::QMediaObject(class QObject *, class QMediaService *)
- ??0QMediaPlayer@@QAE@PAVQObject@@V?$QFlags@W4Flag@QMediaPlayer@@@@PAVQMediaServiceProvider@@@Z @ 13 NONAME ; QMediaPlayer::QMediaPlayer(class QObject *, class QFlags<enum QMediaPlayer::Flag>, class QMediaServiceProvider *)
- ??0QMediaPlayerControl@@IAE@PAVQObject@@@Z @ 14 NONAME ; QMediaPlayerControl::QMediaPlayerControl(class QObject *)
- ??0QMediaPlaylist@@QAE@PAVQObject@@@Z @ 15 NONAME ; QMediaPlaylist::QMediaPlaylist(class QObject *)
- ??0QMediaPlaylistControl@@IAE@PAVQObject@@@Z @ 16 NONAME ; QMediaPlaylistControl::QMediaPlaylistControl(class QObject *)
- ??0QMediaPlaylistIOPlugin@@QAE@PAVQObject@@@Z @ 17 NONAME ; QMediaPlaylistIOPlugin::QMediaPlaylistIOPlugin(class QObject *)
- ??0QMediaPlaylistNavigator@@QAE@PAVQMediaPlaylistProvider@@PAVQObject@@@Z @ 18 NONAME ; QMediaPlaylistNavigator::QMediaPlaylistNavigator(class QMediaPlaylistProvider *, class QObject *)
- ??0QMediaPlaylistProvider@@IAE@AAVQMediaPlaylistProviderPrivate@@PAVQObject@@@Z @ 19 NONAME ; QMediaPlaylistProvider::QMediaPlaylistProvider(class QMediaPlaylistProviderPrivate &, class QObject *)
- ??0QMediaPlaylistProvider@@QAE@PAVQObject@@@Z @ 20 NONAME ; QMediaPlaylistProvider::QMediaPlaylistProvider(class QObject *)
- ??0QMediaResource@@QAE@ABV0@@Z @ 21 NONAME ; QMediaResource::QMediaResource(class QMediaResource const &)
- ??0QMediaResource@@QAE@ABVQNetworkRequest@@ABVQString@@@Z @ 22 NONAME ; QMediaResource::QMediaResource(class QNetworkRequest const &, class QString const &)
- ??0QMediaResource@@QAE@ABVQUrl@@ABVQString@@@Z @ 23 NONAME ; QMediaResource::QMediaResource(class QUrl const &, class QString const &)
- ??0QMediaResource@@QAE@XZ @ 24 NONAME ; QMediaResource::QMediaResource(void)
- ??0QMediaService@@IAE@AAVQMediaServicePrivate@@PAVQObject@@@Z @ 25 NONAME ; QMediaService::QMediaService(class QMediaServicePrivate &, class QObject *)
- ??0QMediaService@@IAE@PAVQObject@@@Z @ 26 NONAME ; QMediaService::QMediaService(class QObject *)
- ??0QMediaServiceProviderHint@@QAE@ABV0@@Z @ 27 NONAME ; QMediaServiceProviderHint::QMediaServiceProviderHint(class QMediaServiceProviderHint const &)
- ??0QMediaServiceProviderHint@@QAE@ABVQByteArray@@@Z @ 28 NONAME ; QMediaServiceProviderHint::QMediaServiceProviderHint(class QByteArray const &)
- ??0QMediaServiceProviderHint@@QAE@ABVQString@@ABVQStringList@@@Z @ 29 NONAME ; QMediaServiceProviderHint::QMediaServiceProviderHint(class QString const &, class QStringList const &)
- ??0QMediaServiceProviderHint@@QAE@V?$QFlags@W4Feature@QMediaServiceProviderHint@@@@@Z @ 30 NONAME ; QMediaServiceProviderHint::QMediaServiceProviderHint(class QFlags<enum QMediaServiceProviderHint::Feature>)
- ??0QMediaServiceProviderHint@@QAE@XZ @ 31 NONAME ; QMediaServiceProviderHint::QMediaServiceProviderHint(void)
- ??0QMediaTimeInterval@@QAE@ABV0@@Z @ 32 NONAME ; QMediaTimeInterval::QMediaTimeInterval(class QMediaTimeInterval const &)
- ??0QMediaTimeInterval@@QAE@XZ @ 33 NONAME ; QMediaTimeInterval::QMediaTimeInterval(void)
- ??0QMediaTimeInterval@@QAE@_J0@Z @ 34 NONAME ; QMediaTimeInterval::QMediaTimeInterval(long long, long long)
- ??0QMediaTimeRange@@QAE@ABV0@@Z @ 35 NONAME ; QMediaTimeRange::QMediaTimeRange(class QMediaTimeRange const &)
- ??0QMediaTimeRange@@QAE@ABVQMediaTimeInterval@@@Z @ 36 NONAME ; QMediaTimeRange::QMediaTimeRange(class QMediaTimeInterval const &)
- ??0QMediaTimeRange@@QAE@XZ @ 37 NONAME ; QMediaTimeRange::QMediaTimeRange(void)
- ??0QMediaTimeRange@@QAE@_J0@Z @ 38 NONAME ; QMediaTimeRange::QMediaTimeRange(long long, long long)
- ??0QMetaDataControl@@IAE@PAVQObject@@@Z @ 39 NONAME ; QMetaDataControl::QMetaDataControl(class QObject *)
- ??0QPainterVideoSurface@@QAE@PAVQObject@@@Z @ 40 NONAME ; QPainterVideoSurface::QPainterVideoSurface(class QObject *)
- ??0QSoundEffect@@QAE@PAVQObject@@@Z @ 41 NONAME ; QSoundEffect::QSoundEffect(class QObject *)
- ??0QVideoDeviceControl@@IAE@PAVQObject@@@Z @ 42 NONAME ; QVideoDeviceControl::QVideoDeviceControl(class QObject *)
- ??0QVideoOutputControl@@IAE@PAVQObject@@@Z @ 43 NONAME ; QVideoOutputControl::QVideoOutputControl(class QObject *)
- ??0QVideoRendererControl@@IAE@PAVQObject@@@Z @ 44 NONAME ; QVideoRendererControl::QVideoRendererControl(class QObject *)
- ??0QVideoWidget@@QAE@PAVQWidget@@@Z @ 45 NONAME ; QVideoWidget::QVideoWidget(class QWidget *)
- ??0QVideoWidgetControl@@IAE@PAVQObject@@@Z @ 46 NONAME ; QVideoWidgetControl::QVideoWidgetControl(class QObject *)
- ??0QVideoWindowControl@@IAE@PAVQObject@@@Z @ 47 NONAME ; QVideoWindowControl::QVideoWindowControl(class QObject *)
- ??1QGraphicsVideoItem@@UAE@XZ @ 48 NONAME ; QGraphicsVideoItem::~QGraphicsVideoItem(void)
- ??1QLocalMediaPlaylistProvider@@UAE@XZ @ 49 NONAME ; QLocalMediaPlaylistProvider::~QLocalMediaPlaylistProvider(void)
- ??1QMediaContent@@QAE@XZ @ 50 NONAME ; QMediaContent::~QMediaContent(void)
- ??1QMediaControl@@UAE@XZ @ 51 NONAME ; QMediaControl::~QMediaControl(void)
- ??1QMediaObject@@UAE@XZ @ 52 NONAME ; QMediaObject::~QMediaObject(void)
- ??1QMediaPlayer@@UAE@XZ @ 53 NONAME ; QMediaPlayer::~QMediaPlayer(void)
- ??1QMediaPlayerControl@@UAE@XZ @ 54 NONAME ; QMediaPlayerControl::~QMediaPlayerControl(void)
- ??1QMediaPlaylist@@UAE@XZ @ 55 NONAME ; QMediaPlaylist::~QMediaPlaylist(void)
- ??1QMediaPlaylistControl@@UAE@XZ @ 56 NONAME ; QMediaPlaylistControl::~QMediaPlaylistControl(void)
- ??1QMediaPlaylistIOInterface@@UAE@XZ @ 57 NONAME ; QMediaPlaylistIOInterface::~QMediaPlaylistIOInterface(void)
- ??1QMediaPlaylistIOPlugin@@UAE@XZ @ 58 NONAME ; QMediaPlaylistIOPlugin::~QMediaPlaylistIOPlugin(void)
- ??1QMediaPlaylistNavigator@@UAE@XZ @ 59 NONAME ; QMediaPlaylistNavigator::~QMediaPlaylistNavigator(void)
- ??1QMediaPlaylistProvider@@UAE@XZ @ 60 NONAME ; QMediaPlaylistProvider::~QMediaPlaylistProvider(void)
- ??1QMediaPlaylistReader@@UAE@XZ @ 61 NONAME ; QMediaPlaylistReader::~QMediaPlaylistReader(void)
- ??1QMediaPlaylistWriter@@UAE@XZ @ 62 NONAME ; QMediaPlaylistWriter::~QMediaPlaylistWriter(void)
- ??1QMediaResource@@QAE@XZ @ 63 NONAME ; QMediaResource::~QMediaResource(void)
- ??1QMediaService@@UAE@XZ @ 64 NONAME ; QMediaService::~QMediaService(void)
- ??1QMediaServiceFeaturesInterface@@UAE@XZ @ 65 NONAME ; QMediaServiceFeaturesInterface::~QMediaServiceFeaturesInterface(void)
- ??1QMediaServiceProvider@@UAE@XZ @ 66 NONAME ; QMediaServiceProvider::~QMediaServiceProvider(void)
- ??1QMediaServiceProviderHint@@QAE@XZ @ 67 NONAME ; QMediaServiceProviderHint::~QMediaServiceProviderHint(void)
- ??1QMediaServiceSupportedDevicesInterface@@UAE@XZ @ 68 NONAME ; QMediaServiceSupportedDevicesInterface::~QMediaServiceSupportedDevicesInterface(void)
- ??1QMediaServiceSupportedFormatsInterface@@UAE@XZ @ 69 NONAME ; QMediaServiceSupportedFormatsInterface::~QMediaServiceSupportedFormatsInterface(void)
- ??1QMediaTimeRange@@QAE@XZ @ 70 NONAME ; QMediaTimeRange::~QMediaTimeRange(void)
- ??1QMetaDataControl@@UAE@XZ @ 71 NONAME ; QMetaDataControl::~QMetaDataControl(void)
- ??1QPainterVideoSurface@@UAE@XZ @ 72 NONAME ; QPainterVideoSurface::~QPainterVideoSurface(void)
- ??1QSoundEffect@@UAE@XZ @ 73 NONAME ; QSoundEffect::~QSoundEffect(void)
- ??1QVideoDeviceControl@@UAE@XZ @ 74 NONAME ; QVideoDeviceControl::~QVideoDeviceControl(void)
- ??1QVideoOutputControl@@UAE@XZ @ 75 NONAME ; QVideoOutputControl::~QVideoOutputControl(void)
- ??1QVideoRendererControl@@UAE@XZ @ 76 NONAME ; QVideoRendererControl::~QVideoRendererControl(void)
- ??1QVideoWidget@@UAE@XZ @ 77 NONAME ; QVideoWidget::~QVideoWidget(void)
- ??1QVideoWidgetControl@@UAE@XZ @ 78 NONAME ; QVideoWidgetControl::~QVideoWidgetControl(void)
- ??1QVideoWindowControl@@UAE@XZ @ 79 NONAME ; QVideoWindowControl::~QVideoWindowControl(void)
- ??4QMediaContent@@QAEAAV0@ABV0@@Z @ 80 NONAME ; class QMediaContent & QMediaContent::operator=(class QMediaContent const &)
- ??4QMediaResource@@QAEAAV0@ABV0@@Z @ 81 NONAME ; class QMediaResource & QMediaResource::operator=(class QMediaResource const &)
- ??4QMediaServiceProviderHint@@QAEAAV0@ABV0@@Z @ 82 NONAME ; class QMediaServiceProviderHint & QMediaServiceProviderHint::operator=(class QMediaServiceProviderHint const &)
- ??4QMediaTimeRange@@QAEAAV0@ABV0@@Z @ 83 NONAME ; class QMediaTimeRange & QMediaTimeRange::operator=(class QMediaTimeRange const &)
- ??4QMediaTimeRange@@QAEAAV0@ABVQMediaTimeInterval@@@Z @ 84 NONAME ; class QMediaTimeRange & QMediaTimeRange::operator=(class QMediaTimeInterval const &)
- ??8@YA_NABVQMediaTimeInterval@@0@Z @ 85 NONAME ; bool operator==(class QMediaTimeInterval const &, class QMediaTimeInterval const &)
- ??8@YA_NABVQMediaTimeRange@@0@Z @ 86 NONAME ; bool operator==(class QMediaTimeRange const &, class QMediaTimeRange const &)
- ??8QMediaContent@@QBE_NABV0@@Z @ 87 NONAME ; bool QMediaContent::operator==(class QMediaContent const &) const
- ??8QMediaResource@@QBE_NABV0@@Z @ 88 NONAME ; bool QMediaResource::operator==(class QMediaResource const &) const
- ??8QMediaServiceProviderHint@@QBE_NABV0@@Z @ 89 NONAME ; bool QMediaServiceProviderHint::operator==(class QMediaServiceProviderHint const &) const
- ??9@YA_NABVQMediaTimeInterval@@0@Z @ 90 NONAME ; bool operator!=(class QMediaTimeInterval const &, class QMediaTimeInterval const &)
- ??9@YA_NABVQMediaTimeRange@@0@Z @ 91 NONAME ; bool operator!=(class QMediaTimeRange const &, class QMediaTimeRange const &)
- ??9QMediaContent@@QBE_NABV0@@Z @ 92 NONAME ; bool QMediaContent::operator!=(class QMediaContent const &) const
- ??9QMediaResource@@QBE_NABV0@@Z @ 93 NONAME ; bool QMediaResource::operator!=(class QMediaResource const &) const
- ??9QMediaServiceProviderHint@@QBE_NABV0@@Z @ 94 NONAME ; bool QMediaServiceProviderHint::operator!=(class QMediaServiceProviderHint const &) const
- ??G@YA?AVQMediaTimeRange@@ABV0@0@Z @ 95 NONAME ; class QMediaTimeRange operator-(class QMediaTimeRange const &, class QMediaTimeRange const &)
- ??H@YA?AVQMediaTimeRange@@ABV0@0@Z @ 96 NONAME ; class QMediaTimeRange operator+(class QMediaTimeRange const &, class QMediaTimeRange const &)
- ??YQMediaTimeRange@@QAEAAV0@ABV0@@Z @ 97 NONAME ; class QMediaTimeRange & QMediaTimeRange::operator+=(class QMediaTimeRange const &)
- ??YQMediaTimeRange@@QAEAAV0@ABVQMediaTimeInterval@@@Z @ 98 NONAME ; class QMediaTimeRange & QMediaTimeRange::operator+=(class QMediaTimeInterval const &)
- ??ZQMediaTimeRange@@QAEAAV0@ABV0@@Z @ 99 NONAME ; class QMediaTimeRange & QMediaTimeRange::operator-=(class QMediaTimeRange const &)
- ??ZQMediaTimeRange@@QAEAAV0@ABVQMediaTimeInterval@@@Z @ 100 NONAME ; class QMediaTimeRange & QMediaTimeRange::operator-=(class QMediaTimeInterval const &)
- ??_EQGraphicsVideoItem@@UAE@I@Z @ 101 NONAME ; QGraphicsVideoItem::~QGraphicsVideoItem(unsigned int)
- ??_EQLocalMediaPlaylistProvider@@UAE@I@Z @ 102 NONAME ; QLocalMediaPlaylistProvider::~QLocalMediaPlaylistProvider(unsigned int)
- ??_EQMediaControl@@UAE@I@Z @ 103 NONAME ; QMediaControl::~QMediaControl(unsigned int)
- ??_EQMediaObject@@UAE@I@Z @ 104 NONAME ; QMediaObject::~QMediaObject(unsigned int)
- ??_EQMediaPlayer@@UAE@I@Z @ 105 NONAME ; QMediaPlayer::~QMediaPlayer(unsigned int)
- ??_EQMediaPlayerControl@@UAE@I@Z @ 106 NONAME ; QMediaPlayerControl::~QMediaPlayerControl(unsigned int)
- ??_EQMediaPlaylist@@UAE@I@Z @ 107 NONAME ; QMediaPlaylist::~QMediaPlaylist(unsigned int)
- ??_EQMediaPlaylistControl@@UAE@I@Z @ 108 NONAME ; QMediaPlaylistControl::~QMediaPlaylistControl(unsigned int)
- ??_EQMediaPlaylistIOInterface@@UAE@I@Z @ 109 NONAME ; QMediaPlaylistIOInterface::~QMediaPlaylistIOInterface(unsigned int)
- ??_EQMediaPlaylistIOPlugin@@UAE@I@Z @ 110 NONAME ; QMediaPlaylistIOPlugin::~QMediaPlaylistIOPlugin(unsigned int)
- ??_EQMediaPlaylistNavigator@@UAE@I@Z @ 111 NONAME ; QMediaPlaylistNavigator::~QMediaPlaylistNavigator(unsigned int)
- ??_EQMediaPlaylistProvider@@UAE@I@Z @ 112 NONAME ; QMediaPlaylistProvider::~QMediaPlaylistProvider(unsigned int)
- ??_EQMediaPlaylistReader@@UAE@I@Z @ 113 NONAME ; QMediaPlaylistReader::~QMediaPlaylistReader(unsigned int)
- ??_EQMediaPlaylistWriter@@UAE@I@Z @ 114 NONAME ; QMediaPlaylistWriter::~QMediaPlaylistWriter(unsigned int)
- ??_EQMediaService@@UAE@I@Z @ 115 NONAME ; QMediaService::~QMediaService(unsigned int)
- ??_EQMediaServiceFeaturesInterface@@UAE@I@Z @ 116 NONAME ; QMediaServiceFeaturesInterface::~QMediaServiceFeaturesInterface(unsigned int)
- ??_EQMediaServiceProvider@@UAE@I@Z @ 117 NONAME ; QMediaServiceProvider::~QMediaServiceProvider(unsigned int)
- ??_EQMediaServiceSupportedDevicesInterface@@UAE@I@Z @ 118 NONAME ; QMediaServiceSupportedDevicesInterface::~QMediaServiceSupportedDevicesInterface(unsigned int)
- ??_EQMediaServiceSupportedFormatsInterface@@UAE@I@Z @ 119 NONAME ; QMediaServiceSupportedFormatsInterface::~QMediaServiceSupportedFormatsInterface(unsigned int)
- ??_EQMetaDataControl@@UAE@I@Z @ 120 NONAME ; QMetaDataControl::~QMetaDataControl(unsigned int)
- ??_EQPainterVideoSurface@@UAE@I@Z @ 121 NONAME ; QPainterVideoSurface::~QPainterVideoSurface(unsigned int)
- ??_EQSoundEffect@@UAE@I@Z @ 122 NONAME ; QSoundEffect::~QSoundEffect(unsigned int)
- ??_EQVideoDeviceControl@@UAE@I@Z @ 123 NONAME ; QVideoDeviceControl::~QVideoDeviceControl(unsigned int)
- ??_EQVideoOutputControl@@UAE@I@Z @ 124 NONAME ; QVideoOutputControl::~QVideoOutputControl(unsigned int)
- ??_EQVideoRendererControl@@UAE@I@Z @ 125 NONAME ; QVideoRendererControl::~QVideoRendererControl(unsigned int)
- ??_EQVideoWidget@@UAE@I@Z @ 126 NONAME ; QVideoWidget::~QVideoWidget(unsigned int)
- ??_EQVideoWidgetControl@@UAE@I@Z @ 127 NONAME ; QVideoWidgetControl::~QVideoWidgetControl(unsigned int)
- ??_EQVideoWindowControl@@UAE@I@Z @ 128 NONAME ; QVideoWindowControl::~QVideoWindowControl(unsigned int)
- ?activated@QMediaPlaylistNavigator@@IAEXABVQMediaContent@@@Z @ 129 NONAME ; void QMediaPlaylistNavigator::activated(class QMediaContent const &)
- ?addInterval@QMediaTimeRange@@QAEXABVQMediaTimeInterval@@@Z @ 130 NONAME ; void QMediaTimeRange::addInterval(class QMediaTimeInterval const &)
- ?addInterval@QMediaTimeRange@@QAEX_J0@Z @ 131 NONAME ; void QMediaTimeRange::addInterval(long long, long long)
- ?addMedia@QLocalMediaPlaylistProvider@@UAE_NABV?$QList@VQMediaContent@@@@@Z @ 132 NONAME ; bool QLocalMediaPlaylistProvider::addMedia(class QList<class QMediaContent> const &)
- ?addMedia@QLocalMediaPlaylistProvider@@UAE_NABVQMediaContent@@@Z @ 133 NONAME ; bool QLocalMediaPlaylistProvider::addMedia(class QMediaContent const &)
- ?addMedia@QMediaPlaylist@@QAE_NABV?$QList@VQMediaContent@@@@@Z @ 134 NONAME ; bool QMediaPlaylist::addMedia(class QList<class QMediaContent> const &)
- ?addMedia@QMediaPlaylist@@QAE_NABVQMediaContent@@@Z @ 135 NONAME ; bool QMediaPlaylist::addMedia(class QMediaContent const &)
- ?addMedia@QMediaPlaylistProvider@@UAE_NABV?$QList@VQMediaContent@@@@@Z @ 136 NONAME ; bool QMediaPlaylistProvider::addMedia(class QList<class QMediaContent> const &)
- ?addMedia@QMediaPlaylistProvider@@UAE_NABVQMediaContent@@@Z @ 137 NONAME ; bool QMediaPlaylistProvider::addMedia(class QMediaContent const &)
- ?addPropertyWatch@QMediaObject@@IAEXABVQByteArray@@@Z @ 138 NONAME ; void QMediaObject::addPropertyWatch(class QByteArray const &)
- ?addTimeRange@QMediaTimeRange@@QAEXABV1@@Z @ 139 NONAME ; void QMediaTimeRange::addTimeRange(class QMediaTimeRange const &)
- ?aspectRatioMode@QGraphicsVideoItem@@QBE?AW4AspectRatioMode@Qt@@XZ @ 140 NONAME ; enum Qt::AspectRatioMode QGraphicsVideoItem::aspectRatioMode(void) const
- ?aspectRatioMode@QVideoWidget@@QBE?AW4AspectRatioMode@Qt@@XZ @ 141 NONAME ; enum Qt::AspectRatioMode QVideoWidget::aspectRatioMode(void) const
- ?audioAvailableChanged@QMediaPlayer@@IAEX_N@Z @ 142 NONAME ; void QMediaPlayer::audioAvailableChanged(bool)
- ?audioAvailableChanged@QMediaPlayerControl@@IAEX_N@Z @ 143 NONAME ; void QMediaPlayerControl::audioAvailableChanged(bool)
- ?audioBitRate@QMediaResource@@QBEHXZ @ 144 NONAME ; int QMediaResource::audioBitRate(void) const
- ?audioCodec@QMediaResource@@QBE?AVQString@@XZ @ 145 NONAME ; class QString QMediaResource::audioCodec(void) const
- ?availabilityChanged@QMediaObject@@IAEX_N@Z @ 146 NONAME ; void QMediaObject::availabilityChanged(bool)
- ?availabilityError@QMediaObject@@UBE?AW4AvailabilityError@QtMediaServices@@XZ @ 147 NONAME ; enum QtMediaServices::AvailabilityError QMediaObject::availabilityError(void) const
- ?availableExtendedMetaData@QMediaObject@@QBE?AVQStringList@@XZ @ 148 NONAME ; class QStringList QMediaObject::availableExtendedMetaData(void) const
- ?availableMetaData@QMediaObject@@QBE?AV?$QList@W4MetaData@QtMediaServices@@@@XZ @ 149 NONAME ; class QList<enum QtMediaServices::MetaData> QMediaObject::availableMetaData(void) const
- ?availableOutputsChanged@QVideoOutputControl@@IAEXABV?$QList@W4Output@QVideoOutputControl@@@@@Z @ 150 NONAME ; void QVideoOutputControl::availableOutputsChanged(class QList<enum QVideoOutputControl::Output> const &)
- ?availablePlaybackRangesChanged@QMediaPlayerControl@@IAEXABVQMediaTimeRange@@@Z @ 151 NONAME ; void QMediaPlayerControl::availablePlaybackRangesChanged(class QMediaTimeRange const &)
- ?bind@QMediaObject@@UAEXPAVQObject@@@Z @ 152 NONAME ; void QMediaObject::bind(class QObject *)
- ?bind@QMediaPlayer@@UAEXPAVQObject@@@Z @ 153 NONAME ; void QMediaPlayer::bind(class QObject *)
- ?boundingRect@QGraphicsVideoItem@@UBE?AVQRectF@@XZ @ 154 NONAME ; class QRectF QGraphicsVideoItem::boundingRect(void) const
- ?brightness@QPainterVideoSurface@@QBEHXZ @ 155 NONAME ; int QPainterVideoSurface::brightness(void) const
- ?brightness@QVideoWidget@@QBEHXZ @ 156 NONAME ; int QVideoWidget::brightness(void) const
- ?brightnessChanged@QVideoWidget@@IAEXH@Z @ 157 NONAME ; void QVideoWidget::brightnessChanged(int)
- ?brightnessChanged@QVideoWidgetControl@@IAEXH@Z @ 158 NONAME ; void QVideoWidgetControl::brightnessChanged(int)
- ?brightnessChanged@QVideoWindowControl@@IAEXH@Z @ 159 NONAME ; void QVideoWindowControl::brightnessChanged(int)
- ?bufferStatus@QMediaPlayer@@QBEHXZ @ 160 NONAME ; int QMediaPlayer::bufferStatus(void) const
- ?bufferStatusChanged@QMediaPlayer@@IAEXH@Z @ 161 NONAME ; void QMediaPlayer::bufferStatusChanged(int)
- ?bufferStatusChanged@QMediaPlayerControl@@IAEXH@Z @ 162 NONAME ; void QMediaPlayerControl::bufferStatusChanged(int)
- ?canonicalRequest@QMediaContent@@QBE?AVQNetworkRequest@@XZ @ 163 NONAME ; class QNetworkRequest QMediaContent::canonicalRequest(void) const
- ?canonicalResource@QMediaContent@@QBE?AVQMediaResource@@XZ @ 164 NONAME ; class QMediaResource QMediaContent::canonicalResource(void) const
- ?canonicalUrl@QMediaContent@@QBE?AVQUrl@@XZ @ 165 NONAME ; class QUrl QMediaContent::canonicalUrl(void) const
- ?channelCount@QMediaResource@@QBEHXZ @ 166 NONAME ; int QMediaResource::channelCount(void) const
- ?clear@QLocalMediaPlaylistProvider@@UAE_NXZ @ 167 NONAME ; bool QLocalMediaPlaylistProvider::clear(void)
- ?clear@QMediaPlaylist@@QAE_NXZ @ 168 NONAME ; bool QMediaPlaylist::clear(void)
- ?clear@QMediaPlaylistProvider@@UAE_NXZ @ 169 NONAME ; bool QMediaPlaylistProvider::clear(void)
- ?clear@QMediaTimeRange@@QAEXXZ @ 170 NONAME ; void QMediaTimeRange::clear(void)
- ?codecs@QMediaServiceProviderHint@@QBE?AVQStringList@@XZ @ 171 NONAME ; class QStringList QMediaServiceProviderHint::codecs(void) const
- ?contains@QMediaTimeInterval@@QBE_N_J@Z @ 172 NONAME ; bool QMediaTimeInterval::contains(long long) const
- ?contains@QMediaTimeRange@@QBE_N_J@Z @ 173 NONAME ; bool QMediaTimeRange::contains(long long) const
- ?contrast@QPainterVideoSurface@@QBEHXZ @ 174 NONAME ; int QPainterVideoSurface::contrast(void) const
- ?contrast@QVideoWidget@@QBEHXZ @ 175 NONAME ; int QVideoWidget::contrast(void) const
- ?contrastChanged@QVideoWidget@@IAEXH@Z @ 176 NONAME ; void QVideoWidget::contrastChanged(int)
- ?contrastChanged@QVideoWidgetControl@@IAEXH@Z @ 177 NONAME ; void QVideoWidgetControl::contrastChanged(int)
- ?contrastChanged@QVideoWindowControl@@IAEXH@Z @ 178 NONAME ; void QVideoWindowControl::contrastChanged(int)
- ?createPainter@QPainterVideoSurface@@AAEXXZ @ 179 NONAME ; void QPainterVideoSurface::createPainter(void)
- ?currentIndex@QMediaPlaylist@@QBEHXZ @ 180 NONAME ; int QMediaPlaylist::currentIndex(void) const
- ?currentIndex@QMediaPlaylistNavigator@@QBEHXZ @ 181 NONAME ; int QMediaPlaylistNavigator::currentIndex(void) const
- ?currentIndexChanged@QMediaPlaylist@@IAEXH@Z @ 182 NONAME ; void QMediaPlaylist::currentIndexChanged(int)
- ?currentIndexChanged@QMediaPlaylistControl@@IAEXH@Z @ 183 NONAME ; void QMediaPlaylistControl::currentIndexChanged(int)
- ?currentIndexChanged@QMediaPlaylistNavigator@@IAEXH@Z @ 184 NONAME ; void QMediaPlaylistNavigator::currentIndexChanged(int)
- ?currentItem@QMediaPlaylistNavigator@@QBE?AVQMediaContent@@XZ @ 185 NONAME ; class QMediaContent QMediaPlaylistNavigator::currentItem(void) const
- ?currentMedia@QMediaPlaylist@@QBE?AVQMediaContent@@XZ @ 186 NONAME ; class QMediaContent QMediaPlaylist::currentMedia(void) const
- ?currentMediaChanged@QMediaPlaylist@@IAEXABVQMediaContent@@@Z @ 187 NONAME ; void QMediaPlaylist::currentMediaChanged(class QMediaContent const &)
- ?currentMediaChanged@QMediaPlaylistControl@@IAEXABVQMediaContent@@@Z @ 188 NONAME ; void QMediaPlaylistControl::currentMediaChanged(class QMediaContent const &)
- ?d_func@QGraphicsVideoItem@@AAEPAVQGraphicsVideoItemPrivate@@XZ @ 189 NONAME ; class QGraphicsVideoItemPrivate * QGraphicsVideoItem::d_func(void)
- ?d_func@QGraphicsVideoItem@@ABEPBVQGraphicsVideoItemPrivate@@XZ @ 190 NONAME ; class QGraphicsVideoItemPrivate const * QGraphicsVideoItem::d_func(void) const
- ?d_func@QLocalMediaPlaylistProvider@@AAEPAVQLocalMediaPlaylistProviderPrivate@@XZ @ 191 NONAME ; class QLocalMediaPlaylistProviderPrivate * QLocalMediaPlaylistProvider::d_func(void)
- ?d_func@QLocalMediaPlaylistProvider@@ABEPBVQLocalMediaPlaylistProviderPrivate@@XZ @ 192 NONAME ; class QLocalMediaPlaylistProviderPrivate const * QLocalMediaPlaylistProvider::d_func(void) const
- ?d_func@QMediaControl@@AAEPAVQMediaControlPrivate@@XZ @ 193 NONAME ; class QMediaControlPrivate * QMediaControl::d_func(void)
- ?d_func@QMediaControl@@ABEPBVQMediaControlPrivate@@XZ @ 194 NONAME ; class QMediaControlPrivate const * QMediaControl::d_func(void) const
- ?d_func@QMediaObject@@AAEPAVQMediaObjectPrivate@@XZ @ 195 NONAME ; class QMediaObjectPrivate * QMediaObject::d_func(void)
- ?d_func@QMediaObject@@ABEPBVQMediaObjectPrivate@@XZ @ 196 NONAME ; class QMediaObjectPrivate const * QMediaObject::d_func(void) const
- ?d_func@QMediaPlayer@@AAEPAVQMediaPlayerPrivate@@XZ @ 197 NONAME ; class QMediaPlayerPrivate * QMediaPlayer::d_func(void)
- ?d_func@QMediaPlayer@@ABEPBVQMediaPlayerPrivate@@XZ @ 198 NONAME ; class QMediaPlayerPrivate const * QMediaPlayer::d_func(void) const
- ?d_func@QMediaPlaylist@@AAEPAVQMediaPlaylistPrivate@@XZ @ 199 NONAME ; class QMediaPlaylistPrivate * QMediaPlaylist::d_func(void)
- ?d_func@QMediaPlaylist@@ABEPBVQMediaPlaylistPrivate@@XZ @ 200 NONAME ; class QMediaPlaylistPrivate const * QMediaPlaylist::d_func(void) const
- ?d_func@QMediaPlaylistNavigator@@AAEPAVQMediaPlaylistNavigatorPrivate@@XZ @ 201 NONAME ; class QMediaPlaylistNavigatorPrivate * QMediaPlaylistNavigator::d_func(void)
- ?d_func@QMediaPlaylistNavigator@@ABEPBVQMediaPlaylistNavigatorPrivate@@XZ @ 202 NONAME ; class QMediaPlaylistNavigatorPrivate const * QMediaPlaylistNavigator::d_func(void) const
- ?d_func@QMediaPlaylistProvider@@AAEPAVQMediaPlaylistProviderPrivate@@XZ @ 203 NONAME ; class QMediaPlaylistProviderPrivate * QMediaPlaylistProvider::d_func(void)
- ?d_func@QMediaPlaylistProvider@@ABEPBVQMediaPlaylistProviderPrivate@@XZ @ 204 NONAME ; class QMediaPlaylistProviderPrivate const * QMediaPlaylistProvider::d_func(void) const
- ?d_func@QMediaService@@AAEPAVQMediaServicePrivate@@XZ @ 205 NONAME ; class QMediaServicePrivate * QMediaService::d_func(void)
- ?d_func@QMediaService@@ABEPBVQMediaServicePrivate@@XZ @ 206 NONAME ; class QMediaServicePrivate const * QMediaService::d_func(void) const
- ?d_func@QVideoWidget@@AAEPAVQVideoWidgetPrivate@@XZ @ 207 NONAME ; class QVideoWidgetPrivate * QVideoWidget::d_func(void)
- ?d_func@QVideoWidget@@ABEPBVQVideoWidgetPrivate@@XZ @ 208 NONAME ; class QVideoWidgetPrivate const * QVideoWidget::d_func(void) const
- ?dataSize@QMediaResource@@QBE_JXZ @ 209 NONAME ; long long QMediaResource::dataSize(void) const
- ?defaultServiceProvider@QMediaServiceProvider@@SAPAV1@XZ @ 210 NONAME ; class QMediaServiceProvider * QMediaServiceProvider::defaultServiceProvider(void)
- ?device@QMediaServiceProviderHint@@QBE?AVQByteArray@@XZ @ 211 NONAME ; class QByteArray QMediaServiceProviderHint::device(void) const
- ?deviceDescription@QMediaServiceProvider@@UAE?AVQString@@ABVQByteArray@@0@Z @ 212 NONAME ; class QString QMediaServiceProvider::deviceDescription(class QByteArray const &, class QByteArray const &)
- ?devices@QMediaServiceProvider@@UBE?AV?$QList@VQByteArray@@@@ABVQByteArray@@@Z @ 213 NONAME ; class QList<class QByteArray> QMediaServiceProvider::devices(class QByteArray const &) const
- ?devicesChanged@QVideoDeviceControl@@IAEXXZ @ 214 NONAME ; void QVideoDeviceControl::devicesChanged(void)
- ?duration@QMediaPlayer@@QBE_JXZ @ 215 NONAME ; long long QMediaPlayer::duration(void) const
- ?durationChanged@QMediaPlayer@@IAEX_J@Z @ 216 NONAME ; void QMediaPlayer::durationChanged(long long)
- ?durationChanged@QMediaPlayerControl@@IAEX_J@Z @ 217 NONAME ; void QMediaPlayerControl::durationChanged(long long)
- ?earliestTime@QMediaTimeRange@@QBE_JXZ @ 218 NONAME ; long long QMediaTimeRange::earliestTime(void) const
- ?end@QMediaTimeInterval@@QBE_JXZ @ 219 NONAME ; long long QMediaTimeInterval::end(void) const
- ?error@QMediaPlayer@@IAEXW4Error@1@@Z @ 220 NONAME ; void QMediaPlayer::error(enum QMediaPlayer::Error)
- ?error@QMediaPlayer@@QBE?AW4Error@1@XZ @ 221 NONAME ; enum QMediaPlayer::Error QMediaPlayer::error(void) const
- ?error@QMediaPlayerControl@@IAEXHABVQString@@@Z @ 222 NONAME ; void QMediaPlayerControl::error(int, class QString const &)
- ?error@QMediaPlaylist@@QBE?AW4Error@1@XZ @ 223 NONAME ; enum QMediaPlaylist::Error QMediaPlaylist::error(void) const
- ?errorString@QMediaPlayer@@QBE?AVQString@@XZ @ 224 NONAME ; class QString QMediaPlayer::errorString(void) const
- ?errorString@QMediaPlaylist@@QBE?AVQString@@XZ @ 225 NONAME ; class QString QMediaPlaylist::errorString(void) const
- ?event@QGraphicsVideoItem@@MAE_NPAVQEvent@@@Z @ 226 NONAME ; bool QGraphicsVideoItem::event(class QEvent *)
- ?event@QVideoWidget@@MAE_NPAVQEvent@@@Z @ 227 NONAME ; bool QVideoWidget::event(class QEvent *)
- ?extendedMetaData@QMediaObject@@QBE?AVQVariant@@ABVQString@@@Z @ 228 NONAME ; class QVariant QMediaObject::extendedMetaData(class QString const &) const
- ?features@QMediaServiceProviderHint@@QBE?AV?$QFlags@W4Feature@QMediaServiceProviderHint@@@@XZ @ 229 NONAME ; class QFlags<enum QMediaServiceProviderHint::Feature> QMediaServiceProviderHint::features(void) const
- ?frameChanged@QPainterVideoSurface@@IAEXXZ @ 230 NONAME ; void QPainterVideoSurface::frameChanged(void)
- ?fullScreenChanged@QVideoWidget@@IAEX_N@Z @ 231 NONAME ; void QVideoWidget::fullScreenChanged(bool)
- ?fullScreenChanged@QVideoWidgetControl@@IAEX_N@Z @ 232 NONAME ; void QVideoWidgetControl::fullScreenChanged(bool)
- ?fullScreenChanged@QVideoWindowControl@@IAEX_N@Z @ 233 NONAME ; void QVideoWindowControl::fullScreenChanged(bool)
- ?getStaticMetaObject@QGraphicsVideoItem@@SAABUQMetaObject@@XZ @ 234 NONAME ; struct QMetaObject const & QGraphicsVideoItem::getStaticMetaObject(void)
- ?getStaticMetaObject@QLocalMediaPlaylistProvider@@SAABUQMetaObject@@XZ @ 235 NONAME ; struct QMetaObject const & QLocalMediaPlaylistProvider::getStaticMetaObject(void)
- ?getStaticMetaObject@QMediaControl@@SAABUQMetaObject@@XZ @ 236 NONAME ; struct QMetaObject const & QMediaControl::getStaticMetaObject(void)
- ?getStaticMetaObject@QMediaObject@@SAABUQMetaObject@@XZ @ 237 NONAME ; struct QMetaObject const & QMediaObject::getStaticMetaObject(void)
- ?getStaticMetaObject@QMediaPlayer@@SAABUQMetaObject@@XZ @ 238 NONAME ; struct QMetaObject const & QMediaPlayer::getStaticMetaObject(void)
- ?getStaticMetaObject@QMediaPlayerControl@@SAABUQMetaObject@@XZ @ 239 NONAME ; struct QMetaObject const & QMediaPlayerControl::getStaticMetaObject(void)
- ?getStaticMetaObject@QMediaPlaylist@@SAABUQMetaObject@@XZ @ 240 NONAME ; struct QMetaObject const & QMediaPlaylist::getStaticMetaObject(void)
- ?getStaticMetaObject@QMediaPlaylistControl@@SAABUQMetaObject@@XZ @ 241 NONAME ; struct QMetaObject const & QMediaPlaylistControl::getStaticMetaObject(void)
- ?getStaticMetaObject@QMediaPlaylistIOPlugin@@SAABUQMetaObject@@XZ @ 242 NONAME ; struct QMetaObject const & QMediaPlaylistIOPlugin::getStaticMetaObject(void)
- ?getStaticMetaObject@QMediaPlaylistNavigator@@SAABUQMetaObject@@XZ @ 243 NONAME ; struct QMetaObject const & QMediaPlaylistNavigator::getStaticMetaObject(void)
- ?getStaticMetaObject@QMediaPlaylistProvider@@SAABUQMetaObject@@XZ @ 244 NONAME ; struct QMetaObject const & QMediaPlaylistProvider::getStaticMetaObject(void)
- ?getStaticMetaObject@QMediaService@@SAABUQMetaObject@@XZ @ 245 NONAME ; struct QMetaObject const & QMediaService::getStaticMetaObject(void)
- ?getStaticMetaObject@QMediaServiceProvider@@SAABUQMetaObject@@XZ @ 246 NONAME ; struct QMetaObject const & QMediaServiceProvider::getStaticMetaObject(void)
- ?getStaticMetaObject@QMediaServiceProviderPlugin@@SAABUQMetaObject@@XZ @ 247 NONAME ; struct QMetaObject const & QMediaServiceProviderPlugin::getStaticMetaObject(void)
- ?getStaticMetaObject@QMetaDataControl@@SAABUQMetaObject@@XZ @ 248 NONAME ; struct QMetaObject const & QMetaDataControl::getStaticMetaObject(void)
- ?getStaticMetaObject@QPainterVideoSurface@@SAABUQMetaObject@@XZ @ 249 NONAME ; struct QMetaObject const & QPainterVideoSurface::getStaticMetaObject(void)
- ?getStaticMetaObject@QSoundEffect@@SAABUQMetaObject@@XZ @ 250 NONAME ; struct QMetaObject const & QSoundEffect::getStaticMetaObject(void)
- ?getStaticMetaObject@QVideoDeviceControl@@SAABUQMetaObject@@XZ @ 251 NONAME ; struct QMetaObject const & QVideoDeviceControl::getStaticMetaObject(void)
- ?getStaticMetaObject@QVideoOutputControl@@SAABUQMetaObject@@XZ @ 252 NONAME ; struct QMetaObject const & QVideoOutputControl::getStaticMetaObject(void)
- ?getStaticMetaObject@QVideoRendererControl@@SAABUQMetaObject@@XZ @ 253 NONAME ; struct QMetaObject const & QVideoRendererControl::getStaticMetaObject(void)
- ?getStaticMetaObject@QVideoWidget@@SAABUQMetaObject@@XZ @ 254 NONAME ; struct QMetaObject const & QVideoWidget::getStaticMetaObject(void)
- ?getStaticMetaObject@QVideoWidgetControl@@SAABUQMetaObject@@XZ @ 255 NONAME ; struct QMetaObject const & QVideoWidgetControl::getStaticMetaObject(void)
- ?getStaticMetaObject@QVideoWindowControl@@SAABUQMetaObject@@XZ @ 256 NONAME ; struct QMetaObject const & QVideoWindowControl::getStaticMetaObject(void)
- ?hasSupport@QMediaPlayer@@SA?AW4SupportEstimate@QtMediaServices@@ABVQString@@ABVQStringList@@V?$QFlags@W4Flag@QMediaPlayer@@@@@Z @ 257 NONAME ; enum QtMediaServices::SupportEstimate QMediaPlayer::hasSupport(class QString const &, class QStringList const &, class QFlags<enum QMediaPlayer::Flag>)
- ?hasSupport@QMediaServiceProvider@@UBE?AW4SupportEstimate@QtMediaServices@@ABVQByteArray@@ABVQString@@ABVQStringList@@H@Z @ 258 NONAME ; enum QtMediaServices::SupportEstimate QMediaServiceProvider::hasSupport(class QByteArray const &, class QString const &, class QStringList const &, int) const
- ?hideEvent@QVideoWidget@@MAEXPAVQHideEvent@@@Z @ 259 NONAME ; void QVideoWidget::hideEvent(class QHideEvent *)
- ?hue@QPainterVideoSurface@@QBEHXZ @ 260 NONAME ; int QPainterVideoSurface::hue(void) const
- ?hue@QVideoWidget@@QBEHXZ @ 261 NONAME ; int QVideoWidget::hue(void) const
- ?hueChanged@QVideoWidget@@IAEXH@Z @ 262 NONAME ; void QVideoWidget::hueChanged(int)
- ?hueChanged@QVideoWidgetControl@@IAEXH@Z @ 263 NONAME ; void QVideoWidgetControl::hueChanged(int)
- ?hueChanged@QVideoWindowControl@@IAEXH@Z @ 264 NONAME ; void QVideoWindowControl::hueChanged(int)
- ?insertMedia@QLocalMediaPlaylistProvider@@UAE_NHABV?$QList@VQMediaContent@@@@@Z @ 265 NONAME ; bool QLocalMediaPlaylistProvider::insertMedia(int, class QList<class QMediaContent> const &)
- ?insertMedia@QLocalMediaPlaylistProvider@@UAE_NHABVQMediaContent@@@Z @ 266 NONAME ; bool QLocalMediaPlaylistProvider::insertMedia(int, class QMediaContent const &)
- ?insertMedia@QMediaPlaylist@@QAE_NHABV?$QList@VQMediaContent@@@@@Z @ 267 NONAME ; bool QMediaPlaylist::insertMedia(int, class QList<class QMediaContent> const &)
- ?insertMedia@QMediaPlaylist@@QAE_NHABVQMediaContent@@@Z @ 268 NONAME ; bool QMediaPlaylist::insertMedia(int, class QMediaContent const &)
- ?insertMedia@QMediaPlaylistProvider@@UAE_NHABV?$QList@VQMediaContent@@@@@Z @ 269 NONAME ; bool QMediaPlaylistProvider::insertMedia(int, class QList<class QMediaContent> const &)
- ?insertMedia@QMediaPlaylistProvider@@UAE_NHABVQMediaContent@@@Z @ 270 NONAME ; bool QMediaPlaylistProvider::insertMedia(int, class QMediaContent const &)
- ?intervals@QMediaTimeRange@@QBE?AV?$QList@VQMediaTimeInterval@@@@XZ @ 271 NONAME ; class QList<class QMediaTimeInterval> QMediaTimeRange::intervals(void) const
- ?isAudioAvailable@QMediaPlayer@@QBE_NXZ @ 272 NONAME ; bool QMediaPlayer::isAudioAvailable(void) const
- ?isAvailable@QMediaObject@@UBE_NXZ @ 273 NONAME ; bool QMediaObject::isAvailable(void) const
- ?isContinuous@QMediaTimeRange@@QBE_NXZ @ 274 NONAME ; bool QMediaTimeRange::isContinuous(void) const
- ?isEmpty@QMediaPlaylist@@QBE_NXZ @ 275 NONAME ; bool QMediaPlaylist::isEmpty(void) const
- ?isEmpty@QMediaTimeRange@@QBE_NXZ @ 276 NONAME ; bool QMediaTimeRange::isEmpty(void) const
- ?isFormatSupported@QPainterVideoSurface@@QBE_NABVQVideoSurfaceFormat@@PAV2@@Z @ 277 NONAME ; bool QPainterVideoSurface::isFormatSupported(class QVideoSurfaceFormat const &, class QVideoSurfaceFormat *) const
- ?isMetaDataAvailable@QMediaObject@@QBE_NXZ @ 278 NONAME ; bool QMediaObject::isMetaDataAvailable(void) const
- ?isMetaDataWritable@QMediaObject@@QBE_NXZ @ 279 NONAME ; bool QMediaObject::isMetaDataWritable(void) const
- ?isMuted@QMediaPlayer@@QBE_NXZ @ 280 NONAME ; bool QMediaPlayer::isMuted(void) const
- ?isMuted@QSoundEffect@@QBE_NXZ @ 281 NONAME ; bool QSoundEffect::isMuted(void) const
- ?isNormal@QMediaTimeInterval@@QBE_NXZ @ 282 NONAME ; bool QMediaTimeInterval::isNormal(void) const
- ?isNull@QMediaContent@@QBE_NXZ @ 283 NONAME ; bool QMediaContent::isNull(void) const
- ?isNull@QMediaResource@@QBE_NXZ @ 284 NONAME ; bool QMediaResource::isNull(void) const
- ?isNull@QMediaServiceProviderHint@@QBE_NXZ @ 285 NONAME ; bool QMediaServiceProviderHint::isNull(void) const
- ?isReadOnly@QLocalMediaPlaylistProvider@@UBE_NXZ @ 286 NONAME ; bool QLocalMediaPlaylistProvider::isReadOnly(void) const
- ?isReadOnly@QMediaPlaylist@@QBE_NXZ @ 287 NONAME ; bool QMediaPlaylist::isReadOnly(void) const
- ?isReadOnly@QMediaPlaylistProvider@@UBE_NXZ @ 288 NONAME ; bool QMediaPlaylistProvider::isReadOnly(void) const
- ?isReady@QPainterVideoSurface@@QBE_NXZ @ 289 NONAME ; bool QPainterVideoSurface::isReady(void) const
- ?isSeekable@QMediaPlayer@@QBE_NXZ @ 290 NONAME ; bool QMediaPlayer::isSeekable(void) const
- ?isVideoAvailable@QMediaPlayer@@QBE_NXZ @ 291 NONAME ; bool QMediaPlayer::isVideoAvailable(void) const
- ?itemAt@QMediaPlaylistNavigator@@QBE?AVQMediaContent@@H@Z @ 292 NONAME ; class QMediaContent QMediaPlaylistNavigator::itemAt(int) const
- ?itemChange@QGraphicsVideoItem@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 293 NONAME ; class QVariant QGraphicsVideoItem::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &)
- ?jump@QMediaPlaylistNavigator@@QAEXH@Z @ 294 NONAME ; void QMediaPlaylistNavigator::jump(int)
- ?language@QMediaResource@@QBE?AVQString@@XZ @ 295 NONAME ; class QString QMediaResource::language(void) const
- ?latestTime@QMediaTimeRange@@QBE_JXZ @ 296 NONAME ; long long QMediaTimeRange::latestTime(void) const
- ?load@QMediaPlaylist@@QAEXABVQUrl@@PBD@Z @ 297 NONAME ; void QMediaPlaylist::load(class QUrl const &, char const *)
- ?load@QMediaPlaylist@@QAEXPAVQIODevice@@PBD@Z @ 298 NONAME ; void QMediaPlaylist::load(class QIODevice *, char const *)
- ?load@QMediaPlaylistProvider@@UAE_NABVQUrl@@PBD@Z @ 299 NONAME ; bool QMediaPlaylistProvider::load(class QUrl const &, char const *)
- ?load@QMediaPlaylistProvider@@UAE_NPAVQIODevice@@PBD@Z @ 300 NONAME ; bool QMediaPlaylistProvider::load(class QIODevice *, char const *)
- ?loadFailed@QMediaPlaylist@@IAEXXZ @ 301 NONAME ; void QMediaPlaylist::loadFailed(void)
- ?loadFailed@QMediaPlaylistProvider@@IAEXW4Error@QMediaPlaylist@@ABVQString@@@Z @ 302 NONAME ; void QMediaPlaylistProvider::loadFailed(enum QMediaPlaylist::Error, class QString const &)
- ?loaded@QMediaPlaylist@@IAEXXZ @ 303 NONAME ; void QMediaPlaylist::loaded(void)
- ?loaded@QMediaPlaylistProvider@@IAEXXZ @ 304 NONAME ; void QMediaPlaylistProvider::loaded(void)
- ?loops@QSoundEffect@@QBEHXZ @ 305 NONAME ; int QSoundEffect::loops(void) const
- ?loopsChanged@QSoundEffect@@IAEXXZ @ 306 NONAME ; void QSoundEffect::loopsChanged(void)
- ?media@QLocalMediaPlaylistProvider@@UBE?AVQMediaContent@@H@Z @ 307 NONAME ; class QMediaContent QLocalMediaPlaylistProvider::media(int) const
- ?media@QMediaPlayer@@QBE?AVQMediaContent@@XZ @ 308 NONAME ; class QMediaContent QMediaPlayer::media(void) const
- ?media@QMediaPlaylist@@QBE?AVQMediaContent@@H@Z @ 309 NONAME ; class QMediaContent QMediaPlaylist::media(int) const
- ?mediaAboutToBeInserted@QMediaPlaylist@@IAEXHH@Z @ 310 NONAME ; void QMediaPlaylist::mediaAboutToBeInserted(int, int)
- ?mediaAboutToBeInserted@QMediaPlaylistProvider@@IAEXHH@Z @ 311 NONAME ; void QMediaPlaylistProvider::mediaAboutToBeInserted(int, int)
- ?mediaAboutToBeRemoved@QMediaPlaylist@@IAEXHH@Z @ 312 NONAME ; void QMediaPlaylist::mediaAboutToBeRemoved(int, int)
- ?mediaAboutToBeRemoved@QMediaPlaylistProvider@@IAEXHH@Z @ 313 NONAME ; void QMediaPlaylistProvider::mediaAboutToBeRemoved(int, int)
- ?mediaChanged@QMediaPlayer@@IAEXABVQMediaContent@@@Z @ 314 NONAME ; void QMediaPlayer::mediaChanged(class QMediaContent const &)
- ?mediaChanged@QMediaPlayerControl@@IAEXABVQMediaContent@@@Z @ 315 NONAME ; void QMediaPlayerControl::mediaChanged(class QMediaContent const &)
- ?mediaChanged@QMediaPlaylist@@IAEXHH@Z @ 316 NONAME ; void QMediaPlaylist::mediaChanged(int, int)
- ?mediaChanged@QMediaPlaylistProvider@@IAEXHH@Z @ 317 NONAME ; void QMediaPlaylistProvider::mediaChanged(int, int)
- ?mediaCount@QLocalMediaPlaylistProvider@@UBEHXZ @ 318 NONAME ; int QLocalMediaPlaylistProvider::mediaCount(void) const
- ?mediaCount@QMediaPlaylist@@QBEHXZ @ 319 NONAME ; int QMediaPlaylist::mediaCount(void) const
- ?mediaInserted@QMediaPlaylist@@IAEXHH@Z @ 320 NONAME ; void QMediaPlaylist::mediaInserted(int, int)
- ?mediaInserted@QMediaPlaylistProvider@@IAEXHH@Z @ 321 NONAME ; void QMediaPlaylistProvider::mediaInserted(int, int)
- ?mediaObject@QGraphicsVideoItem@@QBEPAVQMediaObject@@XZ @ 322 NONAME ; class QMediaObject * QGraphicsVideoItem::mediaObject(void) const
- ?mediaObject@QMediaPlaylist@@QBEPAVQMediaObject@@XZ @ 323 NONAME ; class QMediaObject * QMediaPlaylist::mediaObject(void) const
- ?mediaObject@QVideoWidget@@QBEPAVQMediaObject@@XZ @ 324 NONAME ; class QMediaObject * QVideoWidget::mediaObject(void) const
- ?mediaRemoved@QMediaPlaylist@@IAEXHH@Z @ 325 NONAME ; void QMediaPlaylist::mediaRemoved(int, int)
- ?mediaRemoved@QMediaPlaylistProvider@@IAEXHH@Z @ 326 NONAME ; void QMediaPlaylistProvider::mediaRemoved(int, int)
- ?mediaStatus@QMediaPlayer@@QBE?AW4MediaStatus@1@XZ @ 327 NONAME ; enum QMediaPlayer::MediaStatus QMediaPlayer::mediaStatus(void) const
- ?mediaStatusChanged@QMediaPlayer@@IAEXW4MediaStatus@1@@Z @ 328 NONAME ; void QMediaPlayer::mediaStatusChanged(enum QMediaPlayer::MediaStatus)
- ?mediaStatusChanged@QMediaPlayerControl@@IAEXW4MediaStatus@QMediaPlayer@@@Z @ 329 NONAME ; void QMediaPlayerControl::mediaStatusChanged(enum QMediaPlayer::MediaStatus)
- ?mediaStream@QMediaPlayer@@QBEPBVQIODevice@@XZ @ 330 NONAME ; class QIODevice const * QMediaPlayer::mediaStream(void) const
- ?metaData@QMediaObject@@QBE?AVQVariant@@W4MetaData@QtMediaServices@@@Z @ 331 NONAME ; class QVariant QMediaObject::metaData(enum QtMediaServices::MetaData) const
- ?metaDataAvailableChanged@QMediaObject@@IAEX_N@Z @ 332 NONAME ; void QMediaObject::metaDataAvailableChanged(bool)
- ?metaDataAvailableChanged@QMetaDataControl@@IAEX_N@Z @ 333 NONAME ; void QMetaDataControl::metaDataAvailableChanged(bool)
- ?metaDataChanged@QMediaObject@@IAEXXZ @ 334 NONAME ; void QMediaObject::metaDataChanged(void)
- ?metaDataChanged@QMetaDataControl@@IAEXXZ @ 335 NONAME ; void QMetaDataControl::metaDataChanged(void)
- ?metaDataWritableChanged@QMediaObject@@IAEX_N@Z @ 336 NONAME ; void QMediaObject::metaDataWritableChanged(bool)
- ?metaObject@QGraphicsVideoItem@@UBEPBUQMetaObject@@XZ @ 337 NONAME ; struct QMetaObject const * QGraphicsVideoItem::metaObject(void) const
- ?metaObject@QLocalMediaPlaylistProvider@@UBEPBUQMetaObject@@XZ @ 338 NONAME ; struct QMetaObject const * QLocalMediaPlaylistProvider::metaObject(void) const
- ?metaObject@QMediaControl@@UBEPBUQMetaObject@@XZ @ 339 NONAME ; struct QMetaObject const * QMediaControl::metaObject(void) const
- ?metaObject@QMediaObject@@UBEPBUQMetaObject@@XZ @ 340 NONAME ; struct QMetaObject const * QMediaObject::metaObject(void) const
- ?metaObject@QMediaPlayer@@UBEPBUQMetaObject@@XZ @ 341 NONAME ; struct QMetaObject const * QMediaPlayer::metaObject(void) const
- ?metaObject@QMediaPlayerControl@@UBEPBUQMetaObject@@XZ @ 342 NONAME ; struct QMetaObject const * QMediaPlayerControl::metaObject(void) const
- ?metaObject@QMediaPlaylist@@UBEPBUQMetaObject@@XZ @ 343 NONAME ; struct QMetaObject const * QMediaPlaylist::metaObject(void) const
- ?metaObject@QMediaPlaylistControl@@UBEPBUQMetaObject@@XZ @ 344 NONAME ; struct QMetaObject const * QMediaPlaylistControl::metaObject(void) const
- ?metaObject@QMediaPlaylistIOPlugin@@UBEPBUQMetaObject@@XZ @ 345 NONAME ; struct QMetaObject const * QMediaPlaylistIOPlugin::metaObject(void) const
- ?metaObject@QMediaPlaylistNavigator@@UBEPBUQMetaObject@@XZ @ 346 NONAME ; struct QMetaObject const * QMediaPlaylistNavigator::metaObject(void) const
- ?metaObject@QMediaPlaylistProvider@@UBEPBUQMetaObject@@XZ @ 347 NONAME ; struct QMetaObject const * QMediaPlaylistProvider::metaObject(void) const
- ?metaObject@QMediaService@@UBEPBUQMetaObject@@XZ @ 348 NONAME ; struct QMetaObject const * QMediaService::metaObject(void) const
- ?metaObject@QMediaServiceProvider@@UBEPBUQMetaObject@@XZ @ 349 NONAME ; struct QMetaObject const * QMediaServiceProvider::metaObject(void) const
- ?metaObject@QMediaServiceProviderPlugin@@UBEPBUQMetaObject@@XZ @ 350 NONAME ; struct QMetaObject const * QMediaServiceProviderPlugin::metaObject(void) const
- ?metaObject@QMetaDataControl@@UBEPBUQMetaObject@@XZ @ 351 NONAME ; struct QMetaObject const * QMetaDataControl::metaObject(void) const
- ?metaObject@QPainterVideoSurface@@UBEPBUQMetaObject@@XZ @ 352 NONAME ; struct QMetaObject const * QPainterVideoSurface::metaObject(void) const
- ?metaObject@QSoundEffect@@UBEPBUQMetaObject@@XZ @ 353 NONAME ; struct QMetaObject const * QSoundEffect::metaObject(void) const
- ?metaObject@QVideoDeviceControl@@UBEPBUQMetaObject@@XZ @ 354 NONAME ; struct QMetaObject const * QVideoDeviceControl::metaObject(void) const
- ?metaObject@QVideoOutputControl@@UBEPBUQMetaObject@@XZ @ 355 NONAME ; struct QMetaObject const * QVideoOutputControl::metaObject(void) const
- ?metaObject@QVideoRendererControl@@UBEPBUQMetaObject@@XZ @ 356 NONAME ; struct QMetaObject const * QVideoRendererControl::metaObject(void) const
- ?metaObject@QVideoWidget@@UBEPBUQMetaObject@@XZ @ 357 NONAME ; struct QMetaObject const * QVideoWidget::metaObject(void) const
- ?metaObject@QVideoWidgetControl@@UBEPBUQMetaObject@@XZ @ 358 NONAME ; struct QMetaObject const * QVideoWidgetControl::metaObject(void) const
- ?metaObject@QVideoWindowControl@@UBEPBUQMetaObject@@XZ @ 359 NONAME ; struct QMetaObject const * QVideoWindowControl::metaObject(void) const
- ?mimeType@QMediaResource@@QBE?AVQString@@XZ @ 360 NONAME ; class QString QMediaResource::mimeType(void) const
- ?mimeType@QMediaServiceProviderHint@@QBE?AVQString@@XZ @ 361 NONAME ; class QString QMediaServiceProviderHint::mimeType(void) const
- ?moveEvent@QVideoWidget@@MAEXPAVQMoveEvent@@@Z @ 362 NONAME ; void QVideoWidget::moveEvent(class QMoveEvent *)
- ?mutedChanged@QMediaPlayer@@IAEX_N@Z @ 363 NONAME ; void QMediaPlayer::mutedChanged(bool)
- ?mutedChanged@QMediaPlayerControl@@IAEX_N@Z @ 364 NONAME ; void QMediaPlayerControl::mutedChanged(bool)
- ?mutedChanged@QSoundEffect@@IAEXXZ @ 365 NONAME ; void QSoundEffect::mutedChanged(void)
- ?nativeSize@QGraphicsVideoItem@@QBE?AVQSizeF@@XZ @ 366 NONAME ; class QSizeF QGraphicsVideoItem::nativeSize(void) const
- ?nativeSizeChanged@QGraphicsVideoItem@@IAEXABVQSizeF@@@Z @ 367 NONAME ; void QGraphicsVideoItem::nativeSizeChanged(class QSizeF const &)
- ?nativeSizeChanged@QVideoWindowControl@@IAEXXZ @ 368 NONAME ; void QVideoWindowControl::nativeSizeChanged(void)
- ?next@QMediaPlaylist@@QAEXXZ @ 369 NONAME ; void QMediaPlaylist::next(void)
- ?next@QMediaPlaylistNavigator@@QAEXXZ @ 370 NONAME ; void QMediaPlaylistNavigator::next(void)
- ?nextIndex@QMediaPlaylist@@QBEHH@Z @ 371 NONAME ; int QMediaPlaylist::nextIndex(int) const
- ?nextIndex@QMediaPlaylistNavigator@@QBEHH@Z @ 372 NONAME ; int QMediaPlaylistNavigator::nextIndex(int) const
- ?nextItem@QMediaPlaylistNavigator@@QBE?AVQMediaContent@@H@Z @ 373 NONAME ; class QMediaContent QMediaPlaylistNavigator::nextItem(int) const
- ?normalized@QMediaTimeInterval@@QBE?AV1@XZ @ 374 NONAME ; class QMediaTimeInterval QMediaTimeInterval::normalized(void) const
- ?notifyInterval@QMediaObject@@QBEHXZ @ 375 NONAME ; int QMediaObject::notifyInterval(void) const
- ?notifyIntervalChanged@QMediaObject@@IAEXH@Z @ 376 NONAME ; void QMediaObject::notifyIntervalChanged(int)
- ?offset@QGraphicsVideoItem@@QBE?AVQPointF@@XZ @ 377 NONAME ; class QPointF QGraphicsVideoItem::offset(void) const
- ?paint@QGraphicsVideoItem@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 378 NONAME ; void QGraphicsVideoItem::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
- ?paint@QPainterVideoSurface@@QAEXPAVQPainter@@ABVQRectF@@1@Z @ 379 NONAME ; void QPainterVideoSurface::paint(class QPainter *, class QRectF const &, class QRectF const &)
- ?paintEvent@QVideoWidget@@MAEXPAVQPaintEvent@@@Z @ 380 NONAME ; void QVideoWidget::paintEvent(class QPaintEvent *)
- ?pause@QMediaPlayer@@QAEXXZ @ 381 NONAME ; void QMediaPlayer::pause(void)
- ?play@QMediaPlayer@@QAEXXZ @ 382 NONAME ; void QMediaPlayer::play(void)
- ?play@QSoundEffect@@QAEXXZ @ 383 NONAME ; void QSoundEffect::play(void)
- ?playbackMode@QMediaPlaylist@@QBE?AW4PlaybackMode@1@XZ @ 384 NONAME ; enum QMediaPlaylist::PlaybackMode QMediaPlaylist::playbackMode(void) const
- ?playbackMode@QMediaPlaylistNavigator@@QBE?AW4PlaybackMode@QMediaPlaylist@@XZ @ 385 NONAME ; enum QMediaPlaylist::PlaybackMode QMediaPlaylistNavigator::playbackMode(void) const
- ?playbackModeChanged@QMediaPlaylist@@IAEXW4PlaybackMode@1@@Z @ 386 NONAME ; void QMediaPlaylist::playbackModeChanged(enum QMediaPlaylist::PlaybackMode)
- ?playbackModeChanged@QMediaPlaylistControl@@IAEXW4PlaybackMode@QMediaPlaylist@@@Z @ 387 NONAME ; void QMediaPlaylistControl::playbackModeChanged(enum QMediaPlaylist::PlaybackMode)
- ?playbackModeChanged@QMediaPlaylistNavigator@@IAEXW4PlaybackMode@QMediaPlaylist@@@Z @ 388 NONAME ; void QMediaPlaylistNavigator::playbackModeChanged(enum QMediaPlaylist::PlaybackMode)
- ?playbackRate@QMediaPlayer@@QBEMXZ @ 389 NONAME ; float QMediaPlayer::playbackRate(void) const
- ?playbackRateChanged@QMediaPlayer@@IAEXM@Z @ 390 NONAME ; void QMediaPlayer::playbackRateChanged(float)
- ?playbackRateChanged@QMediaPlayerControl@@IAEXM@Z @ 391 NONAME ; void QMediaPlayerControl::playbackRateChanged(float)
- ?playlist@QMediaPlaylistNavigator@@QBEPAVQMediaPlaylistProvider@@XZ @ 392 NONAME ; class QMediaPlaylistProvider * QMediaPlaylistNavigator::playlist(void) const
- ?playlistProviderChanged@QMediaPlaylistControl@@IAEXXZ @ 393 NONAME ; void QMediaPlaylistControl::playlistProviderChanged(void)
- ?position@QMediaPlayer@@QBE_JXZ @ 394 NONAME ; long long QMediaPlayer::position(void) const
- ?positionChanged@QMediaPlayer@@IAEX_J@Z @ 395 NONAME ; void QMediaPlayer::positionChanged(long long)
- ?positionChanged@QMediaPlayerControl@@IAEX_J@Z @ 396 NONAME ; void QMediaPlayerControl::positionChanged(long long)
- ?present@QPainterVideoSurface@@UAE_NABVQVideoFrame@@@Z @ 397 NONAME ; bool QPainterVideoSurface::present(class QVideoFrame const &)
- ?previous@QMediaPlaylist@@QAEXXZ @ 398 NONAME ; void QMediaPlaylist::previous(void)
- ?previous@QMediaPlaylistNavigator@@QAEXXZ @ 399 NONAME ; void QMediaPlaylistNavigator::previous(void)
- ?previousIndex@QMediaPlaylist@@QBEHH@Z @ 400 NONAME ; int QMediaPlaylist::previousIndex(int) const
- ?previousIndex@QMediaPlaylistNavigator@@QBEHH@Z @ 401 NONAME ; int QMediaPlaylistNavigator::previousIndex(int) const
- ?previousItem@QMediaPlaylistNavigator@@QBE?AVQMediaContent@@H@Z @ 402 NONAME ; class QMediaContent QMediaPlaylistNavigator::previousItem(int) const
- ?qt_metacall@QGraphicsVideoItem@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 403 NONAME ; int QGraphicsVideoItem::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QLocalMediaPlaylistProvider@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 404 NONAME ; int QLocalMediaPlaylistProvider::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QMediaControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 405 NONAME ; int QMediaControl::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QMediaObject@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 406 NONAME ; int QMediaObject::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QMediaPlayer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 407 NONAME ; int QMediaPlayer::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QMediaPlayerControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 408 NONAME ; int QMediaPlayerControl::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QMediaPlaylist@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 409 NONAME ; int QMediaPlaylist::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QMediaPlaylistControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 410 NONAME ; int QMediaPlaylistControl::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QMediaPlaylistIOPlugin@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 411 NONAME ; int QMediaPlaylistIOPlugin::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QMediaPlaylistNavigator@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 412 NONAME ; int QMediaPlaylistNavigator::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QMediaPlaylistProvider@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 413 NONAME ; int QMediaPlaylistProvider::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QMediaService@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 414 NONAME ; int QMediaService::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QMediaServiceProvider@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 415 NONAME ; int QMediaServiceProvider::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QMediaServiceProviderPlugin@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 416 NONAME ; int QMediaServiceProviderPlugin::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QMetaDataControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 417 NONAME ; int QMetaDataControl::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QPainterVideoSurface@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 418 NONAME ; int QPainterVideoSurface::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QSoundEffect@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 419 NONAME ; int QSoundEffect::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QVideoDeviceControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 420 NONAME ; int QVideoDeviceControl::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QVideoOutputControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 421 NONAME ; int QVideoOutputControl::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QVideoRendererControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 422 NONAME ; int QVideoRendererControl::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QVideoWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 423 NONAME ; int QVideoWidget::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QVideoWidgetControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 424 NONAME ; int QVideoWidgetControl::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacall@QVideoWindowControl@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 425 NONAME ; int QVideoWindowControl::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacast@QGraphicsVideoItem@@UAEPAXPBD@Z @ 426 NONAME ; void * QGraphicsVideoItem::qt_metacast(char const *)
- ?qt_metacast@QLocalMediaPlaylistProvider@@UAEPAXPBD@Z @ 427 NONAME ; void * QLocalMediaPlaylistProvider::qt_metacast(char const *)
- ?qt_metacast@QMediaControl@@UAEPAXPBD@Z @ 428 NONAME ; void * QMediaControl::qt_metacast(char const *)
- ?qt_metacast@QMediaObject@@UAEPAXPBD@Z @ 429 NONAME ; void * QMediaObject::qt_metacast(char const *)
- ?qt_metacast@QMediaPlayer@@UAEPAXPBD@Z @ 430 NONAME ; void * QMediaPlayer::qt_metacast(char const *)
- ?qt_metacast@QMediaPlayerControl@@UAEPAXPBD@Z @ 431 NONAME ; void * QMediaPlayerControl::qt_metacast(char const *)
- ?qt_metacast@QMediaPlaylist@@UAEPAXPBD@Z @ 432 NONAME ; void * QMediaPlaylist::qt_metacast(char const *)
- ?qt_metacast@QMediaPlaylistControl@@UAEPAXPBD@Z @ 433 NONAME ; void * QMediaPlaylistControl::qt_metacast(char const *)
- ?qt_metacast@QMediaPlaylistIOPlugin@@UAEPAXPBD@Z @ 434 NONAME ; void * QMediaPlaylistIOPlugin::qt_metacast(char const *)
- ?qt_metacast@QMediaPlaylistNavigator@@UAEPAXPBD@Z @ 435 NONAME ; void * QMediaPlaylistNavigator::qt_metacast(char const *)
- ?qt_metacast@QMediaPlaylistProvider@@UAEPAXPBD@Z @ 436 NONAME ; void * QMediaPlaylistProvider::qt_metacast(char const *)
- ?qt_metacast@QMediaService@@UAEPAXPBD@Z @ 437 NONAME ; void * QMediaService::qt_metacast(char const *)
- ?qt_metacast@QMediaServiceProvider@@UAEPAXPBD@Z @ 438 NONAME ; void * QMediaServiceProvider::qt_metacast(char const *)
- ?qt_metacast@QMediaServiceProviderPlugin@@UAEPAXPBD@Z @ 439 NONAME ; void * QMediaServiceProviderPlugin::qt_metacast(char const *)
- ?qt_metacast@QMetaDataControl@@UAEPAXPBD@Z @ 440 NONAME ; void * QMetaDataControl::qt_metacast(char const *)
- ?qt_metacast@QPainterVideoSurface@@UAEPAXPBD@Z @ 441 NONAME ; void * QPainterVideoSurface::qt_metacast(char const *)
- ?qt_metacast@QSoundEffect@@UAEPAXPBD@Z @ 442 NONAME ; void * QSoundEffect::qt_metacast(char const *)
- ?qt_metacast@QVideoDeviceControl@@UAEPAXPBD@Z @ 443 NONAME ; void * QVideoDeviceControl::qt_metacast(char const *)
- ?qt_metacast@QVideoOutputControl@@UAEPAXPBD@Z @ 444 NONAME ; void * QVideoOutputControl::qt_metacast(char const *)
- ?qt_metacast@QVideoRendererControl@@UAEPAXPBD@Z @ 445 NONAME ; void * QVideoRendererControl::qt_metacast(char const *)
- ?qt_metacast@QVideoWidget@@UAEPAXPBD@Z @ 446 NONAME ; void * QVideoWidget::qt_metacast(char const *)
- ?qt_metacast@QVideoWidgetControl@@UAEPAXPBD@Z @ 447 NONAME ; void * QVideoWidgetControl::qt_metacast(char const *)
- ?qt_metacast@QVideoWindowControl@@UAEPAXPBD@Z @ 448 NONAME ; void * QVideoWindowControl::qt_metacast(char const *)
- ?removeInterval@QMediaTimeRange@@QAEXABVQMediaTimeInterval@@@Z @ 449 NONAME ; void QMediaTimeRange::removeInterval(class QMediaTimeInterval const &)
- ?removeInterval@QMediaTimeRange@@QAEX_J0@Z @ 450 NONAME ; void QMediaTimeRange::removeInterval(long long, long long)
- ?removeMedia@QLocalMediaPlaylistProvider@@UAE_NH@Z @ 451 NONAME ; bool QLocalMediaPlaylistProvider::removeMedia(int)
- ?removeMedia@QLocalMediaPlaylistProvider@@UAE_NHH@Z @ 452 NONAME ; bool QLocalMediaPlaylistProvider::removeMedia(int, int)
- ?removeMedia@QMediaPlaylist@@QAE_NH@Z @ 453 NONAME ; bool QMediaPlaylist::removeMedia(int)
- ?removeMedia@QMediaPlaylist@@QAE_NHH@Z @ 454 NONAME ; bool QMediaPlaylist::removeMedia(int, int)
- ?removeMedia@QMediaPlaylistProvider@@UAE_NH@Z @ 455 NONAME ; bool QMediaPlaylistProvider::removeMedia(int)
- ?removeMedia@QMediaPlaylistProvider@@UAE_NHH@Z @ 456 NONAME ; bool QMediaPlaylistProvider::removeMedia(int, int)
- ?removePropertyWatch@QMediaObject@@IAEXABVQByteArray@@@Z @ 457 NONAME ; void QMediaObject::removePropertyWatch(class QByteArray const &)
- ?removeTimeRange@QMediaTimeRange@@QAEXABV1@@Z @ 458 NONAME ; void QMediaTimeRange::removeTimeRange(class QMediaTimeRange const &)
- ?request@QMediaResource@@QBE?AVQNetworkRequest@@XZ @ 459 NONAME ; class QNetworkRequest QMediaResource::request(void) const
- ?resizeEvent@QVideoWidget@@MAEXPAVQResizeEvent@@@Z @ 460 NONAME ; void QVideoWidget::resizeEvent(class QResizeEvent *)
- ?resolution@QMediaResource@@QBE?AVQSize@@XZ @ 461 NONAME ; class QSize QMediaResource::resolution(void) const
- ?resources@QMediaContent@@QBE?AV?$QList@VQMediaResource@@@@XZ @ 462 NONAME ; class QList<class QMediaResource> QMediaContent::resources(void) const
- ?sampleRate@QMediaResource@@QBEHXZ @ 463 NONAME ; int QMediaResource::sampleRate(void) const
- ?saturation@QPainterVideoSurface@@QBEHXZ @ 464 NONAME ; int QPainterVideoSurface::saturation(void) const
- ?saturation@QVideoWidget@@QBEHXZ @ 465 NONAME ; int QVideoWidget::saturation(void) const
- ?saturationChanged@QVideoWidget@@IAEXH@Z @ 466 NONAME ; void QVideoWidget::saturationChanged(int)
- ?saturationChanged@QVideoWidgetControl@@IAEXH@Z @ 467 NONAME ; void QVideoWidgetControl::saturationChanged(int)
- ?saturationChanged@QVideoWindowControl@@IAEXH@Z @ 468 NONAME ; void QVideoWindowControl::saturationChanged(int)
- ?save@QMediaPlaylist@@QAE_NABVQUrl@@PBD@Z @ 469 NONAME ; bool QMediaPlaylist::save(class QUrl const &, char const *)
- ?save@QMediaPlaylist@@QAE_NPAVQIODevice@@PBD@Z @ 470 NONAME ; bool QMediaPlaylist::save(class QIODevice *, char const *)
- ?save@QMediaPlaylistProvider@@UAE_NABVQUrl@@PBD@Z @ 471 NONAME ; bool QMediaPlaylistProvider::save(class QUrl const &, char const *)
- ?save@QMediaPlaylistProvider@@UAE_NPAVQIODevice@@PBD@Z @ 472 NONAME ; bool QMediaPlaylistProvider::save(class QIODevice *, char const *)
- ?sceneEvent@QGraphicsVideoItem@@MAE_NPAVQEvent@@@Z @ 473 NONAME ; bool QGraphicsVideoItem::sceneEvent(class QEvent *)
- ?seekableChanged@QMediaPlayer@@IAEX_N@Z @ 474 NONAME ; void QMediaPlayer::seekableChanged(bool)
- ?seekableChanged@QMediaPlayerControl@@IAEX_N@Z @ 475 NONAME ; void QMediaPlayerControl::seekableChanged(bool)
- ?selectedDeviceChanged@QVideoDeviceControl@@IAEXABVQString@@@Z @ 476 NONAME ; void QVideoDeviceControl::selectedDeviceChanged(class QString const &)
- ?selectedDeviceChanged@QVideoDeviceControl@@IAEXH@Z @ 477 NONAME ; void QVideoDeviceControl::selectedDeviceChanged(int)
- ?service@QMediaObject@@UBEPAVQMediaService@@XZ @ 478 NONAME ; class QMediaService * QMediaObject::service(void) const
- ?setAspectRatioMode@QGraphicsVideoItem@@QAEXW4AspectRatioMode@Qt@@@Z @ 479 NONAME ; void QGraphicsVideoItem::setAspectRatioMode(enum Qt::AspectRatioMode)
- ?setAspectRatioMode@QVideoWidget@@QAEXW4AspectRatioMode@Qt@@@Z @ 480 NONAME ; void QVideoWidget::setAspectRatioMode(enum Qt::AspectRatioMode)
- ?setAudioBitRate@QMediaResource@@QAEXH@Z @ 481 NONAME ; void QMediaResource::setAudioBitRate(int)
- ?setAudioCodec@QMediaResource@@QAEXABVQString@@@Z @ 482 NONAME ; void QMediaResource::setAudioCodec(class QString const &)
- ?setBrightness@QPainterVideoSurface@@QAEXH@Z @ 483 NONAME ; void QPainterVideoSurface::setBrightness(int)
- ?setBrightness@QVideoWidget@@QAEXH@Z @ 484 NONAME ; void QVideoWidget::setBrightness(int)
- ?setChannelCount@QMediaResource@@QAEXH@Z @ 485 NONAME ; void QMediaResource::setChannelCount(int)
- ?setContrast@QPainterVideoSurface@@QAEXH@Z @ 486 NONAME ; void QPainterVideoSurface::setContrast(int)
- ?setContrast@QVideoWidget@@QAEXH@Z @ 487 NONAME ; void QVideoWidget::setContrast(int)
- ?setCurrentIndex@QMediaPlaylist@@QAEXH@Z @ 488 NONAME ; void QMediaPlaylist::setCurrentIndex(int)
- ?setDataSize@QMediaResource@@QAEX_J@Z @ 489 NONAME ; void QMediaResource::setDataSize(long long)
- ?setExtendedMetaData@QMediaObject@@QAEXABVQString@@ABVQVariant@@@Z @ 490 NONAME ; void QMediaObject::setExtendedMetaData(class QString const &, class QVariant const &)
- ?setFullScreen@QVideoWidget@@QAEX_N@Z @ 491 NONAME ; void QVideoWidget::setFullScreen(bool)
- ?setHue@QPainterVideoSurface@@QAEXH@Z @ 492 NONAME ; void QPainterVideoSurface::setHue(int)
- ?setHue@QVideoWidget@@QAEXH@Z @ 493 NONAME ; void QVideoWidget::setHue(int)
- ?setLanguage@QMediaResource@@QAEXABVQString@@@Z @ 494 NONAME ; void QMediaResource::setLanguage(class QString const &)
- ?setLoops@QSoundEffect@@QAEXH@Z @ 495 NONAME ; void QSoundEffect::setLoops(int)
- ?setMedia@QMediaPlayer@@QAEXABVQMediaContent@@PAVQIODevice@@@Z @ 496 NONAME ; void QMediaPlayer::setMedia(class QMediaContent const &, class QIODevice *)
- ?setMediaObject@QGraphicsVideoItem@@QAEXPAVQMediaObject@@@Z @ 497 NONAME ; void QGraphicsVideoItem::setMediaObject(class QMediaObject *)
- ?setMediaObject@QMediaPlaylist@@QAEXPAVQMediaObject@@@Z @ 498 NONAME ; void QMediaPlaylist::setMediaObject(class QMediaObject *)
- ?setMediaObject@QVideoWidget@@QAEXPAVQMediaObject@@@Z @ 499 NONAME ; void QVideoWidget::setMediaObject(class QMediaObject *)
- ?setMetaData@QMediaObject@@QAEXW4MetaData@QtMediaServices@@ABVQVariant@@@Z @ 500 NONAME ; void QMediaObject::setMetaData(enum QtMediaServices::MetaData, class QVariant const &)
- ?setMuted@QMediaPlayer@@QAEX_N@Z @ 501 NONAME ; void QMediaPlayer::setMuted(bool)
- ?setMuted@QSoundEffect@@QAEX_N@Z @ 502 NONAME ; void QSoundEffect::setMuted(bool)
- ?setNotifyInterval@QMediaObject@@QAEXH@Z @ 503 NONAME ; void QMediaObject::setNotifyInterval(int)
- ?setOffset@QGraphicsVideoItem@@QAEXABVQPointF@@@Z @ 504 NONAME ; void QGraphicsVideoItem::setOffset(class QPointF const &)
- ?setPlaybackMode@QMediaPlaylist@@QAEXW4PlaybackMode@1@@Z @ 505 NONAME ; void QMediaPlaylist::setPlaybackMode(enum QMediaPlaylist::PlaybackMode)
- ?setPlaybackMode@QMediaPlaylistNavigator@@QAEXW4PlaybackMode@QMediaPlaylist@@@Z @ 506 NONAME ; void QMediaPlaylistNavigator::setPlaybackMode(enum QMediaPlaylist::PlaybackMode)
- ?setPlaybackRate@QMediaPlayer@@QAEXM@Z @ 507 NONAME ; void QMediaPlayer::setPlaybackRate(float)
- ?setPlaylist@QMediaPlaylistNavigator@@QAEXPAVQMediaPlaylistProvider@@@Z @ 508 NONAME ; void QMediaPlaylistNavigator::setPlaylist(class QMediaPlaylistProvider *)
- ?setPosition@QMediaPlayer@@QAEX_J@Z @ 509 NONAME ; void QMediaPlayer::setPosition(long long)
- ?setReady@QPainterVideoSurface@@QAEX_N@Z @ 510 NONAME ; void QPainterVideoSurface::setReady(bool)
- ?setResolution@QMediaResource@@QAEXABVQSize@@@Z @ 511 NONAME ; void QMediaResource::setResolution(class QSize const &)
- ?setResolution@QMediaResource@@QAEXHH@Z @ 512 NONAME ; void QMediaResource::setResolution(int, int)
- ?setSampleRate@QMediaResource@@QAEXH@Z @ 513 NONAME ; void QMediaResource::setSampleRate(int)
- ?setSaturation@QPainterVideoSurface@@QAEXH@Z @ 514 NONAME ; void QPainterVideoSurface::setSaturation(int)
- ?setSaturation@QVideoWidget@@QAEXH@Z @ 515 NONAME ; void QVideoWidget::setSaturation(int)
- ?setSize@QGraphicsVideoItem@@QAEXABVQSizeF@@@Z @ 516 NONAME ; void QGraphicsVideoItem::setSize(class QSizeF const &)
- ?setSource@QSoundEffect@@QAEXABVQUrl@@@Z @ 517 NONAME ; void QSoundEffect::setSource(class QUrl const &)
- ?setVideoBitRate@QMediaResource@@QAEXH@Z @ 518 NONAME ; void QMediaResource::setVideoBitRate(int)
- ?setVideoCodec@QMediaResource@@QAEXABVQString@@@Z @ 519 NONAME ; void QMediaResource::setVideoCodec(class QString const &)
- ?setVolume@QMediaPlayer@@QAEXH@Z @ 520 NONAME ; void QMediaPlayer::setVolume(int)
- ?setVolume@QSoundEffect@@QAEXH@Z @ 521 NONAME ; void QSoundEffect::setVolume(int)
- ?setupMetaData@QMediaObject@@AAEXXZ @ 522 NONAME ; void QMediaObject::setupMetaData(void)
- ?showEvent@QVideoWidget@@MAEXPAVQShowEvent@@@Z @ 523 NONAME ; void QVideoWidget::showEvent(class QShowEvent *)
- ?shuffle@QLocalMediaPlaylistProvider@@UAEXXZ @ 524 NONAME ; void QLocalMediaPlaylistProvider::shuffle(void)
- ?shuffle@QMediaPlaylist@@QAEXXZ @ 525 NONAME ; void QMediaPlaylist::shuffle(void)
- ?shuffle@QMediaPlaylistProvider@@UAEXXZ @ 526 NONAME ; void QMediaPlaylistProvider::shuffle(void)
- ?size@QGraphicsVideoItem@@QBE?AVQSizeF@@XZ @ 527 NONAME ; class QSizeF QGraphicsVideoItem::size(void) const
- ?sizeHint@QVideoWidget@@UBE?AVQSize@@XZ @ 528 NONAME ; class QSize QVideoWidget::sizeHint(void) const
- ?source@QSoundEffect@@QBE?AVQUrl@@XZ @ 529 NONAME ; class QUrl QSoundEffect::source(void) const
- ?sourceChanged@QSoundEffect@@IAEXXZ @ 530 NONAME ; void QSoundEffect::sourceChanged(void)
- ?start@QMediaTimeInterval@@QBE_JXZ @ 531 NONAME ; long long QMediaTimeInterval::start(void) const
- ?start@QPainterVideoSurface@@UAE_NABVQVideoSurfaceFormat@@@Z @ 532 NONAME ; bool QPainterVideoSurface::start(class QVideoSurfaceFormat const &)
- ?state@QMediaPlayer@@QBE?AW4State@1@XZ @ 533 NONAME ; enum QMediaPlayer::State QMediaPlayer::state(void) const
- ?stateChanged@QMediaPlayer@@IAEXW4State@1@@Z @ 534 NONAME ; void QMediaPlayer::stateChanged(enum QMediaPlayer::State)
- ?stateChanged@QMediaPlayerControl@@IAEXW4State@QMediaPlayer@@@Z @ 535 NONAME ; void QMediaPlayerControl::stateChanged(enum QMediaPlayer::State)
- ?stop@QMediaPlayer@@QAEXXZ @ 536 NONAME ; void QMediaPlayer::stop(void)
- ?stop@QPainterVideoSurface@@UAEXXZ @ 537 NONAME ; void QPainterVideoSurface::stop(void)
- ?supportedMimeTypes@QMediaPlayer@@SA?AVQStringList@@V?$QFlags@W4Flag@QMediaPlayer@@@@@Z @ 538 NONAME ; class QStringList QMediaPlayer::supportedMimeTypes(class QFlags<enum QMediaPlayer::Flag>)
- ?supportedMimeTypes@QMediaServiceProvider@@UBE?AVQStringList@@ABVQByteArray@@H@Z @ 539 NONAME ; class QStringList QMediaServiceProvider::supportedMimeTypes(class QByteArray const &, int) const
- ?supportedPixelFormats@QPainterVideoSurface@@UBE?AV?$QList@W4PixelFormat@QVideoFrame@@@@W4HandleType@QAbstractVideoBuffer@@@Z @ 540 NONAME ; class QList<enum QVideoFrame::PixelFormat> QPainterVideoSurface::supportedPixelFormats(enum QAbstractVideoBuffer::HandleType) const
- ?surroundingItemsChanged@QMediaPlaylistNavigator@@IAEXXZ @ 541 NONAME ; void QMediaPlaylistNavigator::surroundingItemsChanged(void)
- ?tr@QGraphicsVideoItem@@SA?AVQString@@PBD0@Z @ 542 NONAME ; class QString QGraphicsVideoItem::tr(char const *, char const *)
- ?tr@QGraphicsVideoItem@@SA?AVQString@@PBD0H@Z @ 543 NONAME ; class QString QGraphicsVideoItem::tr(char const *, char const *, int)
- ?tr@QLocalMediaPlaylistProvider@@SA?AVQString@@PBD0@Z @ 544 NONAME ; class QString QLocalMediaPlaylistProvider::tr(char const *, char const *)
- ?tr@QLocalMediaPlaylistProvider@@SA?AVQString@@PBD0H@Z @ 545 NONAME ; class QString QLocalMediaPlaylistProvider::tr(char const *, char const *, int)
- ?tr@QMediaControl@@SA?AVQString@@PBD0@Z @ 546 NONAME ; class QString QMediaControl::tr(char const *, char const *)
- ?tr@QMediaControl@@SA?AVQString@@PBD0H@Z @ 547 NONAME ; class QString QMediaControl::tr(char const *, char const *, int)
- ?tr@QMediaObject@@SA?AVQString@@PBD0@Z @ 548 NONAME ; class QString QMediaObject::tr(char const *, char const *)
- ?tr@QMediaObject@@SA?AVQString@@PBD0H@Z @ 549 NONAME ; class QString QMediaObject::tr(char const *, char const *, int)
- ?tr@QMediaPlayer@@SA?AVQString@@PBD0@Z @ 550 NONAME ; class QString QMediaPlayer::tr(char const *, char const *)
- ?tr@QMediaPlayer@@SA?AVQString@@PBD0H@Z @ 551 NONAME ; class QString QMediaPlayer::tr(char const *, char const *, int)
- ?tr@QMediaPlayerControl@@SA?AVQString@@PBD0@Z @ 552 NONAME ; class QString QMediaPlayerControl::tr(char const *, char const *)
- ?tr@QMediaPlayerControl@@SA?AVQString@@PBD0H@Z @ 553 NONAME ; class QString QMediaPlayerControl::tr(char const *, char const *, int)
- ?tr@QMediaPlaylist@@SA?AVQString@@PBD0@Z @ 554 NONAME ; class QString QMediaPlaylist::tr(char const *, char const *)
- ?tr@QMediaPlaylist@@SA?AVQString@@PBD0H@Z @ 555 NONAME ; class QString QMediaPlaylist::tr(char const *, char const *, int)
- ?tr@QMediaPlaylistControl@@SA?AVQString@@PBD0@Z @ 556 NONAME ; class QString QMediaPlaylistControl::tr(char const *, char const *)
- ?tr@QMediaPlaylistControl@@SA?AVQString@@PBD0H@Z @ 557 NONAME ; class QString QMediaPlaylistControl::tr(char const *, char const *, int)
- ?tr@QMediaPlaylistIOPlugin@@SA?AVQString@@PBD0@Z @ 558 NONAME ; class QString QMediaPlaylistIOPlugin::tr(char const *, char const *)
- ?tr@QMediaPlaylistIOPlugin@@SA?AVQString@@PBD0H@Z @ 559 NONAME ; class QString QMediaPlaylistIOPlugin::tr(char const *, char const *, int)
- ?tr@QMediaPlaylistNavigator@@SA?AVQString@@PBD0@Z @ 560 NONAME ; class QString QMediaPlaylistNavigator::tr(char const *, char const *)
- ?tr@QMediaPlaylistNavigator@@SA?AVQString@@PBD0H@Z @ 561 NONAME ; class QString QMediaPlaylistNavigator::tr(char const *, char const *, int)
- ?tr@QMediaPlaylistProvider@@SA?AVQString@@PBD0@Z @ 562 NONAME ; class QString QMediaPlaylistProvider::tr(char const *, char const *)
- ?tr@QMediaPlaylistProvider@@SA?AVQString@@PBD0H@Z @ 563 NONAME ; class QString QMediaPlaylistProvider::tr(char const *, char const *, int)
- ?tr@QMediaService@@SA?AVQString@@PBD0@Z @ 564 NONAME ; class QString QMediaService::tr(char const *, char const *)
- ?tr@QMediaService@@SA?AVQString@@PBD0H@Z @ 565 NONAME ; class QString QMediaService::tr(char const *, char const *, int)
- ?tr@QMediaServiceProvider@@SA?AVQString@@PBD0@Z @ 566 NONAME ; class QString QMediaServiceProvider::tr(char const *, char const *)
- ?tr@QMediaServiceProvider@@SA?AVQString@@PBD0H@Z @ 567 NONAME ; class QString QMediaServiceProvider::tr(char const *, char const *, int)
- ?tr@QMediaServiceProviderPlugin@@SA?AVQString@@PBD0@Z @ 568 NONAME ; class QString QMediaServiceProviderPlugin::tr(char const *, char const *)
- ?tr@QMediaServiceProviderPlugin@@SA?AVQString@@PBD0H@Z @ 569 NONAME ; class QString QMediaServiceProviderPlugin::tr(char const *, char const *, int)
- ?tr@QMetaDataControl@@SA?AVQString@@PBD0@Z @ 570 NONAME ; class QString QMetaDataControl::tr(char const *, char const *)
- ?tr@QMetaDataControl@@SA?AVQString@@PBD0H@Z @ 571 NONAME ; class QString QMetaDataControl::tr(char const *, char const *, int)
- ?tr@QPainterVideoSurface@@SA?AVQString@@PBD0@Z @ 572 NONAME ; class QString QPainterVideoSurface::tr(char const *, char const *)
- ?tr@QPainterVideoSurface@@SA?AVQString@@PBD0H@Z @ 573 NONAME ; class QString QPainterVideoSurface::tr(char const *, char const *, int)
- ?tr@QSoundEffect@@SA?AVQString@@PBD0@Z @ 574 NONAME ; class QString QSoundEffect::tr(char const *, char const *)
- ?tr@QSoundEffect@@SA?AVQString@@PBD0H@Z @ 575 NONAME ; class QString QSoundEffect::tr(char const *, char const *, int)
- ?tr@QVideoDeviceControl@@SA?AVQString@@PBD0@Z @ 576 NONAME ; class QString QVideoDeviceControl::tr(char const *, char const *)
- ?tr@QVideoDeviceControl@@SA?AVQString@@PBD0H@Z @ 577 NONAME ; class QString QVideoDeviceControl::tr(char const *, char const *, int)
- ?tr@QVideoOutputControl@@SA?AVQString@@PBD0@Z @ 578 NONAME ; class QString QVideoOutputControl::tr(char const *, char const *)
- ?tr@QVideoOutputControl@@SA?AVQString@@PBD0H@Z @ 579 NONAME ; class QString QVideoOutputControl::tr(char const *, char const *, int)
- ?tr@QVideoRendererControl@@SA?AVQString@@PBD0@Z @ 580 NONAME ; class QString QVideoRendererControl::tr(char const *, char const *)
- ?tr@QVideoRendererControl@@SA?AVQString@@PBD0H@Z @ 581 NONAME ; class QString QVideoRendererControl::tr(char const *, char const *, int)
- ?tr@QVideoWidget@@SA?AVQString@@PBD0@Z @ 582 NONAME ; class QString QVideoWidget::tr(char const *, char const *)
- ?tr@QVideoWidget@@SA?AVQString@@PBD0H@Z @ 583 NONAME ; class QString QVideoWidget::tr(char const *, char const *, int)
- ?tr@QVideoWidgetControl@@SA?AVQString@@PBD0@Z @ 584 NONAME ; class QString QVideoWidgetControl::tr(char const *, char const *)
- ?tr@QVideoWidgetControl@@SA?AVQString@@PBD0H@Z @ 585 NONAME ; class QString QVideoWidgetControl::tr(char const *, char const *, int)
- ?tr@QVideoWindowControl@@SA?AVQString@@PBD0@Z @ 586 NONAME ; class QString QVideoWindowControl::tr(char const *, char const *)
- ?tr@QVideoWindowControl@@SA?AVQString@@PBD0H@Z @ 587 NONAME ; class QString QVideoWindowControl::tr(char const *, char const *, int)
- ?trUtf8@QGraphicsVideoItem@@SA?AVQString@@PBD0@Z @ 588 NONAME ; class QString QGraphicsVideoItem::trUtf8(char const *, char const *)
- ?trUtf8@QGraphicsVideoItem@@SA?AVQString@@PBD0H@Z @ 589 NONAME ; class QString QGraphicsVideoItem::trUtf8(char const *, char const *, int)
- ?trUtf8@QLocalMediaPlaylistProvider@@SA?AVQString@@PBD0@Z @ 590 NONAME ; class QString QLocalMediaPlaylistProvider::trUtf8(char const *, char const *)
- ?trUtf8@QLocalMediaPlaylistProvider@@SA?AVQString@@PBD0H@Z @ 591 NONAME ; class QString QLocalMediaPlaylistProvider::trUtf8(char const *, char const *, int)
- ?trUtf8@QMediaControl@@SA?AVQString@@PBD0@Z @ 592 NONAME ; class QString QMediaControl::trUtf8(char const *, char const *)
- ?trUtf8@QMediaControl@@SA?AVQString@@PBD0H@Z @ 593 NONAME ; class QString QMediaControl::trUtf8(char const *, char const *, int)
- ?trUtf8@QMediaObject@@SA?AVQString@@PBD0@Z @ 594 NONAME ; class QString QMediaObject::trUtf8(char const *, char const *)
- ?trUtf8@QMediaObject@@SA?AVQString@@PBD0H@Z @ 595 NONAME ; class QString QMediaObject::trUtf8(char const *, char const *, int)
- ?trUtf8@QMediaPlayer@@SA?AVQString@@PBD0@Z @ 596 NONAME ; class QString QMediaPlayer::trUtf8(char const *, char const *)
- ?trUtf8@QMediaPlayer@@SA?AVQString@@PBD0H@Z @ 597 NONAME ; class QString QMediaPlayer::trUtf8(char const *, char const *, int)
- ?trUtf8@QMediaPlayerControl@@SA?AVQString@@PBD0@Z @ 598 NONAME ; class QString QMediaPlayerControl::trUtf8(char const *, char const *)
- ?trUtf8@QMediaPlayerControl@@SA?AVQString@@PBD0H@Z @ 599 NONAME ; class QString QMediaPlayerControl::trUtf8(char const *, char const *, int)
- ?trUtf8@QMediaPlaylist@@SA?AVQString@@PBD0@Z @ 600 NONAME ; class QString QMediaPlaylist::trUtf8(char const *, char const *)
- ?trUtf8@QMediaPlaylist@@SA?AVQString@@PBD0H@Z @ 601 NONAME ; class QString QMediaPlaylist::trUtf8(char const *, char const *, int)
- ?trUtf8@QMediaPlaylistControl@@SA?AVQString@@PBD0@Z @ 602 NONAME ; class QString QMediaPlaylistControl::trUtf8(char const *, char const *)
- ?trUtf8@QMediaPlaylistControl@@SA?AVQString@@PBD0H@Z @ 603 NONAME ; class QString QMediaPlaylistControl::trUtf8(char const *, char const *, int)
- ?trUtf8@QMediaPlaylistIOPlugin@@SA?AVQString@@PBD0@Z @ 604 NONAME ; class QString QMediaPlaylistIOPlugin::trUtf8(char const *, char const *)
- ?trUtf8@QMediaPlaylistIOPlugin@@SA?AVQString@@PBD0H@Z @ 605 NONAME ; class QString QMediaPlaylistIOPlugin::trUtf8(char const *, char const *, int)
- ?trUtf8@QMediaPlaylistNavigator@@SA?AVQString@@PBD0@Z @ 606 NONAME ; class QString QMediaPlaylistNavigator::trUtf8(char const *, char const *)
- ?trUtf8@QMediaPlaylistNavigator@@SA?AVQString@@PBD0H@Z @ 607 NONAME ; class QString QMediaPlaylistNavigator::trUtf8(char const *, char const *, int)
- ?trUtf8@QMediaPlaylistProvider@@SA?AVQString@@PBD0@Z @ 608 NONAME ; class QString QMediaPlaylistProvider::trUtf8(char const *, char const *)
- ?trUtf8@QMediaPlaylistProvider@@SA?AVQString@@PBD0H@Z @ 609 NONAME ; class QString QMediaPlaylistProvider::trUtf8(char const *, char const *, int)
- ?trUtf8@QMediaService@@SA?AVQString@@PBD0@Z @ 610 NONAME ; class QString QMediaService::trUtf8(char const *, char const *)
- ?trUtf8@QMediaService@@SA?AVQString@@PBD0H@Z @ 611 NONAME ; class QString QMediaService::trUtf8(char const *, char const *, int)
- ?trUtf8@QMediaServiceProvider@@SA?AVQString@@PBD0@Z @ 612 NONAME ; class QString QMediaServiceProvider::trUtf8(char const *, char const *)
- ?trUtf8@QMediaServiceProvider@@SA?AVQString@@PBD0H@Z @ 613 NONAME ; class QString QMediaServiceProvider::trUtf8(char const *, char const *, int)
- ?trUtf8@QMediaServiceProviderPlugin@@SA?AVQString@@PBD0@Z @ 614 NONAME ; class QString QMediaServiceProviderPlugin::trUtf8(char const *, char const *)
- ?trUtf8@QMediaServiceProviderPlugin@@SA?AVQString@@PBD0H@Z @ 615 NONAME ; class QString QMediaServiceProviderPlugin::trUtf8(char const *, char const *, int)
- ?trUtf8@QMetaDataControl@@SA?AVQString@@PBD0@Z @ 616 NONAME ; class QString QMetaDataControl::trUtf8(char const *, char const *)
- ?trUtf8@QMetaDataControl@@SA?AVQString@@PBD0H@Z @ 617 NONAME ; class QString QMetaDataControl::trUtf8(char const *, char const *, int)
- ?trUtf8@QPainterVideoSurface@@SA?AVQString@@PBD0@Z @ 618 NONAME ; class QString QPainterVideoSurface::trUtf8(char const *, char const *)
- ?trUtf8@QPainterVideoSurface@@SA?AVQString@@PBD0H@Z @ 619 NONAME ; class QString QPainterVideoSurface::trUtf8(char const *, char const *, int)
- ?trUtf8@QSoundEffect@@SA?AVQString@@PBD0@Z @ 620 NONAME ; class QString QSoundEffect::trUtf8(char const *, char const *)
- ?trUtf8@QSoundEffect@@SA?AVQString@@PBD0H@Z @ 621 NONAME ; class QString QSoundEffect::trUtf8(char const *, char const *, int)
- ?trUtf8@QVideoDeviceControl@@SA?AVQString@@PBD0@Z @ 622 NONAME ; class QString QVideoDeviceControl::trUtf8(char const *, char const *)
- ?trUtf8@QVideoDeviceControl@@SA?AVQString@@PBD0H@Z @ 623 NONAME ; class QString QVideoDeviceControl::trUtf8(char const *, char const *, int)
- ?trUtf8@QVideoOutputControl@@SA?AVQString@@PBD0@Z @ 624 NONAME ; class QString QVideoOutputControl::trUtf8(char const *, char const *)
- ?trUtf8@QVideoOutputControl@@SA?AVQString@@PBD0H@Z @ 625 NONAME ; class QString QVideoOutputControl::trUtf8(char const *, char const *, int)
- ?trUtf8@QVideoRendererControl@@SA?AVQString@@PBD0@Z @ 626 NONAME ; class QString QVideoRendererControl::trUtf8(char const *, char const *)
- ?trUtf8@QVideoRendererControl@@SA?AVQString@@PBD0H@Z @ 627 NONAME ; class QString QVideoRendererControl::trUtf8(char const *, char const *, int)
- ?trUtf8@QVideoWidget@@SA?AVQString@@PBD0@Z @ 628 NONAME ; class QString QVideoWidget::trUtf8(char const *, char const *)
- ?trUtf8@QVideoWidget@@SA?AVQString@@PBD0H@Z @ 629 NONAME ; class QString QVideoWidget::trUtf8(char const *, char const *, int)
- ?trUtf8@QVideoWidgetControl@@SA?AVQString@@PBD0@Z @ 630 NONAME ; class QString QVideoWidgetControl::trUtf8(char const *, char const *)
- ?trUtf8@QVideoWidgetControl@@SA?AVQString@@PBD0H@Z @ 631 NONAME ; class QString QVideoWidgetControl::trUtf8(char const *, char const *, int)
- ?trUtf8@QVideoWindowControl@@SA?AVQString@@PBD0@Z @ 632 NONAME ; class QString QVideoWindowControl::trUtf8(char const *, char const *)
- ?trUtf8@QVideoWindowControl@@SA?AVQString@@PBD0H@Z @ 633 NONAME ; class QString QVideoWindowControl::trUtf8(char const *, char const *, int)
- ?translated@QMediaTimeInterval@@QBE?AV1@_J@Z @ 634 NONAME ; class QMediaTimeInterval QMediaTimeInterval::translated(long long) const
- ?type@QMediaServiceProviderHint@@QBE?AW4Type@1@XZ @ 635 NONAME ; enum QMediaServiceProviderHint::Type QMediaServiceProviderHint::type(void) const
- ?unbind@QMediaObject@@UAEXPAVQObject@@@Z @ 636 NONAME ; void QMediaObject::unbind(class QObject *)
- ?unbind@QMediaPlayer@@UAEXPAVQObject@@@Z @ 637 NONAME ; void QMediaPlayer::unbind(class QObject *)
- ?url@QMediaResource@@QBE?AVQUrl@@XZ @ 638 NONAME ; class QUrl QMediaResource::url(void) const
- ?videoAvailableChanged@QMediaPlayer@@IAEX_N@Z @ 639 NONAME ; void QMediaPlayer::videoAvailableChanged(bool)
- ?videoAvailableChanged@QMediaPlayerControl@@IAEX_N@Z @ 640 NONAME ; void QMediaPlayerControl::videoAvailableChanged(bool)
- ?videoBitRate@QMediaResource@@QBEHXZ @ 641 NONAME ; int QMediaResource::videoBitRate(void) const
- ?videoCodec@QMediaResource@@QBE?AVQString@@XZ @ 642 NONAME ; class QString QMediaResource::videoCodec(void) const
- ?volume@QMediaPlayer@@QBEHXZ @ 643 NONAME ; int QMediaPlayer::volume(void) const
- ?volume@QSoundEffect@@QBEHXZ @ 644 NONAME ; int QSoundEffect::volume(void) const
- ?volumeChanged@QMediaPlayer@@IAEXH@Z @ 645 NONAME ; void QMediaPlayer::volumeChanged(int)
- ?volumeChanged@QMediaPlayerControl@@IAEXH@Z @ 646 NONAME ; void QMediaPlayerControl::volumeChanged(int)
- ?volumeChanged@QSoundEffect@@IAEXXZ @ 647 NONAME ; void QSoundEffect::volumeChanged(void)
- ?writableChanged@QMetaDataControl@@IAEX_N@Z @ 648 NONAME ; void QMetaDataControl::writableChanged(bool)
- ?staticMetaObject@QMediaPlaylistProvider@@2UQMetaObject@@B @ 649 NONAME ; struct QMetaObject const QMediaPlaylistProvider::staticMetaObject
- ?staticMetaObject@QSoundEffect@@2UQMetaObject@@B @ 650 NONAME ; struct QMetaObject const QSoundEffect::staticMetaObject
- ?staticMetaObject@QVideoWidget@@2UQMetaObject@@B @ 651 NONAME ; struct QMetaObject const QVideoWidget::staticMetaObject
- ?staticMetaObject@QMediaPlaylistControl@@2UQMetaObject@@B @ 652 NONAME ; struct QMetaObject const QMediaPlaylistControl::staticMetaObject
- ?staticMetaObject@QMediaControl@@2UQMetaObject@@B @ 653 NONAME ; struct QMetaObject const QMediaControl::staticMetaObject
- ?staticMetaObject@QLocalMediaPlaylistProvider@@2UQMetaObject@@B @ 654 NONAME ; struct QMetaObject const QLocalMediaPlaylistProvider::staticMetaObject
- ?staticMetaObject@QMediaServiceProviderPlugin@@2UQMetaObject@@B @ 655 NONAME ; struct QMetaObject const QMediaServiceProviderPlugin::staticMetaObject
- ?staticMetaObject@QVideoOutputControl@@2UQMetaObject@@B @ 656 NONAME ; struct QMetaObject const QVideoOutputControl::staticMetaObject
- ?staticMetaObject@QMetaDataControl@@2UQMetaObject@@B @ 657 NONAME ; struct QMetaObject const QMetaDataControl::staticMetaObject
- ?staticMetaObject@QMediaPlayer@@2UQMetaObject@@B @ 658 NONAME ; struct QMetaObject const QMediaPlayer::staticMetaObject
- ?staticMetaObject@QMediaService@@2UQMetaObject@@B @ 659 NONAME ; struct QMetaObject const QMediaService::staticMetaObject
- ?staticMetaObject@QMediaObject@@2UQMetaObject@@B @ 660 NONAME ; struct QMetaObject const QMediaObject::staticMetaObject
- ?staticMetaObject@QMediaPlaylist@@2UQMetaObject@@B @ 661 NONAME ; struct QMetaObject const QMediaPlaylist::staticMetaObject
- ?staticMetaObject@QMediaServiceProvider@@2UQMetaObject@@B @ 662 NONAME ; struct QMetaObject const QMediaServiceProvider::staticMetaObject
- ?staticMetaObject@QMediaPlayerControl@@2UQMetaObject@@B @ 663 NONAME ; struct QMetaObject const QMediaPlayerControl::staticMetaObject
- ?staticMetaObject@QMediaPlaylistNavigator@@2UQMetaObject@@B @ 664 NONAME ; struct QMetaObject const QMediaPlaylistNavigator::staticMetaObject
- ?staticMetaObject@QVideoWidgetControl@@2UQMetaObject@@B @ 665 NONAME ; struct QMetaObject const QVideoWidgetControl::staticMetaObject
- ?staticMetaObject@QVideoWindowControl@@2UQMetaObject@@B @ 666 NONAME ; struct QMetaObject const QVideoWindowControl::staticMetaObject
- ?staticMetaObject@QVideoDeviceControl@@2UQMetaObject@@B @ 667 NONAME ; struct QMetaObject const QVideoDeviceControl::staticMetaObject
- ?staticMetaObject@QVideoRendererControl@@2UQMetaObject@@B @ 668 NONAME ; struct QMetaObject const QVideoRendererControl::staticMetaObject
- ?staticMetaObject@QPainterVideoSurface@@2UQMetaObject@@B @ 669 NONAME ; struct QMetaObject const QPainterVideoSurface::staticMetaObject
- ?staticMetaObject@QMediaPlaylistIOPlugin@@2UQMetaObject@@B @ 670 NONAME ; struct QMetaObject const QMediaPlaylistIOPlugin::staticMetaObject
- ?staticMetaObject@QGraphicsVideoItem@@2UQMetaObject@@B @ 671 NONAME ; struct QMetaObject const QGraphicsVideoItem::staticMetaObject
-
diff --git a/src/s60installs/bwins/QtNetworku.def b/src/s60installs/bwins/QtNetworku.def
index 9391ad5..9d4507b 100644
--- a/src/s60installs/bwins/QtNetworku.def
+++ b/src/s60installs/bwins/QtNetworku.def
@@ -1143,4 +1143,5 @@ EXPORTS
?setNetworkAccessible@QNetworkAccessManager@@QAEXW4NetworkAccessibility@1@@Z @ 1142 NONAME ; void QNetworkAccessManager::setNetworkAccessible(enum QNetworkAccessManager::NetworkAccessibility)
?startPolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1143 NONAME ; void QNetworkConfigurationManagerPrivate::startPolling(void)
?capabilities@QNetworkConfigurationManagerPrivate@@QAE?AV?$QFlags@W4Capability@QNetworkConfigurationManager@@@@XZ @ 1144 NONAME ; class QFlags<enum QNetworkConfigurationManager::Capability> QNetworkConfigurationManagerPrivate::capabilities(void)
+ ?addPendingConnection@QTcpServer@@IAEXPAVQTcpSocket@@@Z @ 1145 NONAME ; void QTcpServer::addPendingConnection(class QTcpSocket *)
diff --git a/src/s60installs/bwins/QtOpenVGu.def b/src/s60installs/bwins/QtOpenVGu.def
index 28b9e62..f398055 100644
--- a/src/s60installs/bwins/QtOpenVGu.def
+++ b/src/s60installs/bwins/QtOpenVGu.def
@@ -166,9 +166,10 @@ EXPORTS
?hibernate@QVGPixmapData@@UAEXXZ @ 165 NONAME ; void QVGPixmapData::hibernate(void)
?drawStaticTextItem@QVGPaintEngine@@UAEXPAVQStaticTextItem@@@Z @ 166 NONAME ; void QVGPaintEngine::drawStaticTextItem(class QStaticTextItem *)
?drawPixmapFragments@QVGPaintEngine@@UAEXPBVPixmapFragment@QPainter@@HABVQPixmap@@V?$QFlags@W4PixmapFragmentHint@QPainter@@@@@Z @ 167 NONAME ; void QVGPaintEngine::drawPixmapFragments(class QPainter::PixmapFragment const *, int, class QPixmap const &, class QFlags<enum QPainter::PixmapFragmentHint>)
- ?drawCachedGlyphs@QVGPaintEngine@@QAE_NHPBIABVQFont@@PAVQFontEngine@@ABVQPointF@@@Z @ 168 NONAME ; bool QVGPaintEngine::drawCachedGlyphs(int, unsigned int const *, class QFont const &, class QFontEngine *, class QPointF const &)
+ ?drawCachedGlyphs@QVGPaintEngine@@QAE_NHPBIABVQFont@@PAVQFontEngine@@ABVQPointF@@@Z @ 168 NONAME ABSENT ; bool QVGPaintEngine::drawCachedGlyphs(int, unsigned int const *, class QFont const &, class QFontEngine *, class QPointF const &)
?supportsStaticContents@QVGEGLWindowSurfaceDirect@@UBE_NXZ @ 169 NONAME ; bool QVGEGLWindowSurfaceDirect::supportsStaticContents(void) const
?scroll@QVGEGLWindowSurfacePrivate@@UAE_NPAVQWidget@@ABVQRegion@@HH@Z @ 170 NONAME ; bool QVGEGLWindowSurfacePrivate::scroll(class QWidget *, class QRegion const &, int, int)
?scroll@QVGEGLWindowSurfaceDirect@@UAE_NPAVQWidget@@ABVQRegion@@HH@Z @ 171 NONAME ; bool QVGEGLWindowSurfaceDirect::scroll(class QWidget *, class QRegion const &, int, int)
?supportsStaticContents@QVGEGLWindowSurfacePrivate@@UBE_NXZ @ 172 NONAME ; bool QVGEGLWindowSurfacePrivate::supportsStaticContents(void) const
+ ?drawCachedGlyphs@QVGPaintEngine@@QAE_NHPBIABVQFont@@PAVQFontEngine@@ABVQPointF@@PBUQFixedPoint@@@Z @ 173 NONAME ; bool QVGPaintEngine::drawCachedGlyphs(int, unsigned int const *, class QFont const &, class QFontEngine *, class QPointF const &, struct QFixedPoint const *)
diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def
index 92a4020..48ba8d2 100644
--- a/src/s60installs/eabi/QtCoreu.def
+++ b/src/s60installs/eabi/QtCoreu.def
@@ -3698,4 +3698,13 @@ EXPORTS
_ZN24QAbstractDeclarativeData13parentChangedE @ 3697 NONAME DATA 4
_ZN24QAbstractDeclarativeData9destroyedE @ 3698 NONAME DATA 4
_ZN23QEventDispatcherSymbian12selectThreadEv @ 3699 NONAME
+ _ZN10QByteArray10setRawDataEPKcj @ 3700 NONAME
+ _ZN7QString10setRawDataEPK5QChari @ 3701 NONAME
+ _ZN23QCoreApplicationPrivate11symbianInitEv @ 3702 NONAME
+ _ZN23QEventDispatcherSymbian11qt_metacallEN11QMetaObject4CallEiPPv @ 3703 NONAME
+ _ZN23QEventDispatcherSymbian11qt_metacastEPKc @ 3704 NONAME
+ _ZN23QEventDispatcherSymbian16staticMetaObjectE @ 3705 NONAME DATA 16
+ _ZN23QEventDispatcherSymbian19getStaticMetaObjectEv @ 3706 NONAME
+ _ZNK23QEventDispatcherSymbian10metaObjectEv @ 3707 NONAME
+ _ZNK9QDateTime7msecsToERKS_ @ 3708 NONAME
diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def
index ad12166..a26e193 100644
--- a/src/s60installs/eabi/QtDeclarativeu.def
+++ b/src/s60installs/eabi/QtDeclarativeu.def
@@ -111,7 +111,7 @@ EXPORTS
_ZN16QDeclarativeItem11qt_metacallEN11QMetaObject4CallEiPPv @ 110 NONAME
_ZN16QDeclarativeItem11qt_metacastEPKc @ 111 NONAME
_ZN16QDeclarativeItem11resetHeightEv @ 112 NONAME
- _ZN16QDeclarativeItem11transitionsEv @ 113 NONAME
+ _ZN16QDeclarativeItem11transitionsEv @ 113 NONAME ABSENT
_ZN16QDeclarativeItem12childrenRectEv @ 114 NONAME
_ZN16QDeclarativeItem12focusChangedEb @ 115 NONAME
_ZN16QDeclarativeItem12stateChangedERK7QString @ 116 NONAME
@@ -135,17 +135,17 @@ EXPORTS
_ZN16QDeclarativeItem19getStaticMetaObjectEv @ 134 NONAME
_ZN16QDeclarativeItem21baselineOffsetChangedEf @ 135 NONAME
_ZN16QDeclarativeItem22transformOriginChangedENS_15TransformOriginE @ 136 NONAME
- _ZN16QDeclarativeItem4dataEv @ 137 NONAME
+ _ZN16QDeclarativeItem4dataEv @ 137 NONAME ABSENT
_ZN16QDeclarativeItem5eventEP6QEvent @ 138 NONAME
_ZN16QDeclarativeItem5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 139 NONAME
- _ZN16QDeclarativeItem6statesEv @ 140 NONAME
- _ZN16QDeclarativeItem7anchorsEv @ 141 NONAME
+ _ZN16QDeclarativeItem6statesEv @ 140 NONAME ABSENT
+ _ZN16QDeclarativeItem7anchorsEv @ 141 NONAME ABSENT
_ZN16QDeclarativeItem7setClipEb @ 142 NONAME
_ZN16QDeclarativeItem7setSizeERK6QSizeF @ 143 NONAME
_ZN16QDeclarativeItem8setFocusEb @ 144 NONAME
- _ZN16QDeclarativeItem8setStateERK7QString @ 145 NONAME
+ _ZN16QDeclarativeItem8setStateERK7QString @ 145 NONAME ABSENT
_ZN16QDeclarativeItem8setWidthEf @ 146 NONAME
- _ZN16QDeclarativeItem9resourcesEv @ 147 NONAME
+ _ZN16QDeclarativeItem9resourcesEv @ 147 NONAME ABSENT
_ZN16QDeclarativeItem9setHeightEf @ 148 NONAME
_ZN16QDeclarativeItem9setSmoothEb @ 149 NONAME
_ZN16QDeclarativeItem9transformEv @ 150 NONAME
@@ -361,13 +361,13 @@ EXPORTS
_ZN18QDeclarativeLoader11itemChangedEv @ 360 NONAME
_ZN18QDeclarativeLoader11qt_metacallEN11QMetaObject4CallEiPPv @ 361 NONAME
_ZN18QDeclarativeLoader11qt_metacastEPKc @ 362 NONAME
- _ZN18QDeclarativeLoader13setResizeModeENS_10ResizeModeE @ 363 NONAME
+ _ZN18QDeclarativeLoader13setResizeModeENS_10ResizeModeE @ 363 NONAME ABSENT
_ZN18QDeclarativeLoader13sourceChangedEv @ 364 NONAME
_ZN18QDeclarativeLoader13statusChangedEv @ 365 NONAME
_ZN18QDeclarativeLoader15geometryChangedERK6QRectFS2_ @ 366 NONAME
_ZN18QDeclarativeLoader15progressChangedEv @ 367 NONAME
_ZN18QDeclarativeLoader16staticMetaObjectE @ 368 NONAME DATA 16
- _ZN18QDeclarativeLoader17resizeModeChangedEv @ 369 NONAME
+ _ZN18QDeclarativeLoader17resizeModeChangedEv @ 369 NONAME ABSENT
_ZN18QDeclarativeLoader18setSourceComponentEP21QDeclarativeComponent @ 370 NONAME
_ZN18QDeclarativeLoader19getStaticMetaObjectEv @ 371 NONAME
_ZN18QDeclarativeLoader9setSourceERK4QUrl @ 372 NONAME
@@ -586,7 +586,7 @@ EXPORTS
_ZN20QDeclarativeCompiler22completeComponentBuildEv @ 585 NONAME
_ZN20QDeclarativeCompiler22isAttachedPropertyNameERK10QByteArray @ 586 NONAME
_ZN20QDeclarativeCompiler23buildPropertyAssignmentEPN18QDeclarativeParser8PropertyEPNS0_6ObjectERKNS_14BindingContextE @ 587 NONAME
- _ZN20QDeclarativeCompiler24buildPropertyInNamespaceEPN25QDeclarativeEnginePrivate17ImportedNamespaceEPN18QDeclarativeParser8PropertyEPNS3_6ObjectERKNS_14BindingContextE @ 588 NONAME
+ _ZN20QDeclarativeCompiler24buildPropertyInNamespaceEPN25QDeclarativeEnginePrivate17ImportedNamespaceEPN18QDeclarativeParser8PropertyEPNS3_6ObjectERKNS_14BindingContextE @ 588 NONAME ABSENT
_ZN20QDeclarativeCompiler25buildPropertyOnAssignmentEPN18QDeclarativeParser8PropertyEPNS0_6ObjectES4_PNS0_5ValueERKNS_14BindingContextE @ 589 NONAME
_ZN20QDeclarativeCompiler25buildScriptStringPropertyEPN18QDeclarativeParser8PropertyEPNS0_6ObjectERKNS_14BindingContextE @ 590 NONAME
_ZN20QDeclarativeCompiler26mergeDynamicMetaPropertiesEPN18QDeclarativeParser6ObjectE @ 591 NONAME
@@ -969,7 +969,7 @@ EXPORTS
_ZN21QDeclarativeComponent11beginCreateEP19QDeclarativeContext @ 968 NONAME
_ZN21QDeclarativeComponent11qt_metacallEN11QMetaObject4CallEiPPv @ 969 NONAME
_ZN21QDeclarativeComponent11qt_metacastEPKc @ 970 NONAME
- _ZN21QDeclarativeComponent12createObjectEv @ 971 NONAME
+ _ZN21QDeclarativeComponent12createObjectEv @ 971 NONAME ABSENT
_ZN21QDeclarativeComponent13statusChangedENS_6StatusE @ 972 NONAME
_ZN21QDeclarativeComponent14completeCreateEv @ 973 NONAME
_ZN21QDeclarativeComponent15progressChangedEf @ 974 NONAME
@@ -1044,14 +1044,14 @@ EXPORTS
_ZN21QDeclarativeFlickable17flickableChildrenEv @ 1043 NONAME
_ZN21QDeclarativeFlickable17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 1044 NONAME
_ZN21QDeclarativeFlickable17pressDelayChangedEv @ 1045 NONAME
- _ZN21QDeclarativeFlickable17setFlickDirectionENS_14FlickDirectionE @ 1046 NONAME
+ _ZN21QDeclarativeFlickable17setFlickDirectionENS_14FlickDirectionE @ 1046 NONAME ABSENT
_ZN21QDeclarativeFlickable18interactiveChangedEv @ 1047 NONAME
_ZN21QDeclarativeFlickable19contentWidthChangedEv @ 1048 NONAME
_ZN21QDeclarativeFlickable19getStaticMetaObjectEv @ 1049 NONAME
_ZN21QDeclarativeFlickable19isAtBoundaryChangedEv @ 1050 NONAME
_ZN21QDeclarativeFlickable20contentHeightChangedEv @ 1051 NONAME
_ZN21QDeclarativeFlickable20setFlickDecelerationEf @ 1052 NONAME
- _ZN21QDeclarativeFlickable21flickDirectionChangedEv @ 1053 NONAME
+ _ZN21QDeclarativeFlickable21flickDirectionChangedEv @ 1053 NONAME ABSENT
_ZN21QDeclarativeFlickable23setMaximumFlickVelocityEf @ 1054 NONAME
_ZN21QDeclarativeFlickable23verticalVelocityChangedEv @ 1055 NONAME
_ZN21QDeclarativeFlickable24flickDecelerationChangedEv @ 1056 NONAME
@@ -1493,7 +1493,7 @@ EXPORTS
_ZN23QDeclarativePaintedItem19contentsSizeChangedEv @ 1492 NONAME
_ZN23QDeclarativePaintedItem19getStaticMetaObjectEv @ 1493 NONAME
_ZN23QDeclarativePaintedItem20contentsScaleChangedEv @ 1494 NONAME
- _ZN23QDeclarativePaintedItem4initEv @ 1495 NONAME
+ _ZN23QDeclarativePaintedItem4initEv @ 1495 NONAME ABSENT
_ZN23QDeclarativePaintedItem5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 1496 NONAME
_ZN23QDeclarativePaintedItemC2EP16QDeclarativeItem @ 1497 NONAME
_ZN23QDeclarativePaintedItemC2ER30QDeclarativePaintedItemPrivateP16QDeclarativeItem @ 1498 NONAME
@@ -1602,7 +1602,7 @@ EXPORTS
_ZN24QDeclarativeParentChange11qt_metacastEPKc @ 1601 NONAME
_ZN24QDeclarativeParentChange11setRotationEf @ 1602 NONAME
_ZN24QDeclarativeParentChange12isReversableEv @ 1603 NONAME
- _ZN24QDeclarativeParentChange13copyOriginalsEP23QDeclarativeActionEvent @ 1604 NONAME
+ _ZN24QDeclarativeParentChange13copyOriginalsEP23QDeclarativeActionEvent @ 1604 NONAME ABSENT
_ZN24QDeclarativeParentChange13saveOriginalsEv @ 1605 NONAME
_ZN24QDeclarativeParentChange16staticMetaObjectE @ 1606 NONAME DATA 16
_ZN24QDeclarativeParentChange17saveCurrentValuesEv @ 1607 NONAME
@@ -1624,9 +1624,9 @@ EXPORTS
_ZN24QDeclarativeParentChangeD0Ev @ 1623 NONAME
_ZN24QDeclarativeParentChangeD1Ev @ 1624 NONAME
_ZN24QDeclarativeParentChangeD2Ev @ 1625 NONAME
- _ZN24QDeclarativeParserStatus10classBeginEv @ 1626 NONAME
- _ZN24QDeclarativeParserStatus17componentCompleteEv @ 1627 NONAME
- _ZN24QDeclarativeParserStatusC1Ev @ 1628 NONAME
+ _ZN24QDeclarativeParserStatus10classBeginEv @ 1626 NONAME ABSENT
+ _ZN24QDeclarativeParserStatus17componentCompleteEv @ 1627 NONAME ABSENT
+ _ZN24QDeclarativeParserStatusC1Ev @ 1628 NONAME ABSENT
_ZN24QDeclarativeParserStatusC2Ev @ 1629 NONAME
_ZN24QDeclarativeParserStatusD0Ev @ 1630 NONAME
_ZN24QDeclarativeParserStatusD1Ev @ 1631 NONAME
@@ -1941,9 +1941,9 @@ EXPORTS
_ZN27QDeclarativeVisualDataModel7setPartERK7QString @ 1940 NONAME
_ZN27QDeclarativeVisualDataModel8evaluateEiRK7QStringP7QObject @ 1941 NONAME
_ZN27QDeclarativeVisualDataModel8setModelERK8QVariant @ 1942 NONAME
- _ZN27QDeclarativeVisualDataModelC1EP19QDeclarativeContext @ 1943 NONAME
+ _ZN27QDeclarativeVisualDataModelC1EP19QDeclarativeContext @ 1943 NONAME ABSENT
_ZN27QDeclarativeVisualDataModelC1Ev @ 1944 NONAME
- _ZN27QDeclarativeVisualDataModelC2EP19QDeclarativeContext @ 1945 NONAME
+ _ZN27QDeclarativeVisualDataModelC2EP19QDeclarativeContext @ 1945 NONAME ABSENT
_ZN27QDeclarativeVisualDataModelC2Ev @ 1946 NONAME
_ZN27QDeclarativeVisualDataModelD0Ev @ 1947 NONAME
_ZN27QDeclarativeVisualDataModelD1Ev @ 1948 NONAME
@@ -1960,8 +1960,8 @@ EXPORTS
_ZN27QDeclarativeVisualItemModel7releaseEP16QDeclarativeItem @ 1959 NONAME
_ZN27QDeclarativeVisualItemModel8childrenEv @ 1960 NONAME
_ZN27QDeclarativeVisualItemModel8evaluateEiRK7QStringP7QObject @ 1961 NONAME
- _ZN27QDeclarativeVisualItemModelC1Ev @ 1962 NONAME
- _ZN27QDeclarativeVisualItemModelC2Ev @ 1963 NONAME
+ _ZN27QDeclarativeVisualItemModelC1Ev @ 1962 NONAME ABSENT
+ _ZN27QDeclarativeVisualItemModelC2Ev @ 1963 NONAME ABSENT
_ZN28QDeclarativeCustomParserNodeC1ERKS_ @ 1964 NONAME
_ZN28QDeclarativeCustomParserNodeC1Ev @ 1965 NONAME
_ZN28QDeclarativeCustomParserNodeC2ERKS_ @ 1966 NONAME
@@ -2203,21 +2203,21 @@ EXPORTS
_ZNK16QDeclarativeItem13keepMouseGrabEv @ 2202 NONAME
_ZNK16QDeclarativeItem14baselineOffsetEv @ 2203 NONAME
_ZNK16QDeclarativeItem14implicitHeightEv @ 2204 NONAME
- _ZNK16QDeclarativeItem14verticalCenterEv @ 2205 NONAME
+ _ZNK16QDeclarativeItem14verticalCenterEv @ 2205 NONAME ABSENT
_ZNK16QDeclarativeItem15transformOriginEv @ 2206 NONAME
- _ZNK16QDeclarativeItem16horizontalCenterEv @ 2207 NONAME
+ _ZNK16QDeclarativeItem16horizontalCenterEv @ 2207 NONAME ABSENT
_ZNK16QDeclarativeItem16inputMethodQueryEN2Qt16InputMethodQueryE @ 2208 NONAME
_ZNK16QDeclarativeItem19isComponentCompleteEv @ 2209 NONAME
- _ZNK16QDeclarativeItem3topEv @ 2210 NONAME
+ _ZNK16QDeclarativeItem3topEv @ 2210 NONAME ABSENT
_ZNK16QDeclarativeItem4clipEv @ 2211 NONAME
- _ZNK16QDeclarativeItem4leftEv @ 2212 NONAME
- _ZNK16QDeclarativeItem5rightEv @ 2213 NONAME
- _ZNK16QDeclarativeItem5stateEv @ 2214 NONAME
+ _ZNK16QDeclarativeItem4leftEv @ 2212 NONAME ABSENT
+ _ZNK16QDeclarativeItem5rightEv @ 2213 NONAME ABSENT
+ _ZNK16QDeclarativeItem5stateEv @ 2214 NONAME ABSENT
_ZNK16QDeclarativeItem5widthEv @ 2215 NONAME
- _ZNK16QDeclarativeItem6bottomEv @ 2216 NONAME
+ _ZNK16QDeclarativeItem6bottomEv @ 2216 NONAME ABSENT
_ZNK16QDeclarativeItem6heightEv @ 2217 NONAME
_ZNK16QDeclarativeItem6smoothEv @ 2218 NONAME
- _ZNK16QDeclarativeItem8baselineEv @ 2219 NONAME
+ _ZNK16QDeclarativeItem8baselineEv @ 2219 NONAME ABSENT
_ZNK16QDeclarativeItem8hasFocusEv @ 2220 NONAME
_ZNK16QDeclarativeItem9mapToItemERK12QScriptValueff @ 2221 NONAME
_ZNK16QDeclarativePath10attributesEv @ 2222 NONAME
@@ -2310,7 +2310,7 @@ EXPORTS
_ZNK18QDeclarativeEngine27networkAccessManagerFactoryEv @ 2309 NONAME
_ZNK18QDeclarativeEngine7baseUrlEv @ 2310 NONAME
_ZNK18QDeclarativeLoader10metaObjectEv @ 2311 NONAME
- _ZNK18QDeclarativeLoader10resizeModeEv @ 2312 NONAME
+ _ZNK18QDeclarativeLoader10resizeModeEv @ 2312 NONAME ABSENT
_ZNK18QDeclarativeLoader15sourceComponentEv @ 2313 NONAME
_ZNK18QDeclarativeLoader4itemEv @ 2314 NONAME
_ZNK18QDeclarativeLoader6sourceEv @ 2315 NONAME
@@ -3306,7 +3306,7 @@ EXPORTS
_ZThn8_N23QDeclarativePaintedItemD0Ev @ 3305 NONAME
_ZThn8_N23QDeclarativePaintedItemD1Ev @ 3306 NONAME
_ZThn8_N24QDeclarativeParentChange12isReversableEv @ 3307 NONAME
- _ZThn8_N24QDeclarativeParentChange13copyOriginalsEP23QDeclarativeActionEvent @ 3308 NONAME
+ _ZThn8_N24QDeclarativeParentChange13copyOriginalsEP23QDeclarativeActionEvent @ 3308 NONAME ABSENT
_ZThn8_N24QDeclarativeParentChange13saveOriginalsEv @ 3309 NONAME
_ZThn8_N24QDeclarativeParentChange17saveCurrentValuesEv @ 3310 NONAME
_ZThn8_N24QDeclarativeParentChange6rewindEv @ 3311 NONAME
@@ -3536,4 +3536,70 @@ EXPORTS
_ZThn8_N25QDeclarativeAnchorChanges7executeEN23QDeclarativeActionEvent6ReasonE @ 3535 NONAME
_ZThn8_N25QDeclarativeAnchorChanges7reverseEN23QDeclarativeActionEvent6ReasonE @ 3536 NONAME
_ZThn8_N29QDeclarativeStateChangeScript7executeEN23QDeclarativeActionEvent6ReasonE @ 3537 NONAME
+ _ZN15QDeclarativeRow24reportConflictingAnchorsEv @ 3538 NONAME
+ _ZN16QDeclarativeBind10classBeginEv @ 3539 NONAME
+ _ZN16QDeclarativeFlow24reportConflictingAnchorsEv @ 3540 NONAME
+ _ZN16QDeclarativeGrid24reportConflictingAnchorsEv @ 3541 NONAME
+ _ZN16QDeclarativePath10classBeginEv @ 3542 NONAME
+ _ZN18QDeclarativeColumn24reportConflictingAnchorsEv @ 3543 NONAME
+ _ZN20QDeclarativeBehavior18componentFinalizedEv @ 3544 NONAME
+ _ZN20QDeclarativeCompiler24buildPropertyInNamespaceEP29QDeclarativeImportedNamespacePN18QDeclarativeParser8PropertyEPNS2_6ObjectERKNS_14BindingContextE @ 3545 NONAME
+ _ZN21QDeclarativeComponent12createObjectEP7QObject @ 3546 NONAME
+ _ZN21QDeclarativeMouseArea10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3547 NONAME
+ _ZN21QDeclarativeMouseArea15setHoverEnabledEb @ 3548 NONAME
+ _ZN21QDeclarativeMouseArea19hoverEnabledChangedEv @ 3549 NONAME
+ _ZN21QDeclarativeMouseArea8canceledEv @ 3550 NONAME
+ _ZN23QDeclarativeConnections10classBeginEv @ 3551 NONAME
+ _ZN23QDeclarativeConnections23setIgnoreUnknownSignalsEb @ 3552 NONAME
+ _ZN23QDeclarativeItemPrivate11transitionsEv @ 3553 NONAME
+ _ZN23QDeclarativeItemPrivate4dataEv @ 3554 NONAME
+ _ZN23QDeclarativeItemPrivate7_statesEv @ 3555 NONAME
+ _ZN23QDeclarativeItemPrivate8setStateERK7QString @ 3556 NONAME
+ _ZN23QDeclarativeItemPrivate9resourcesEv @ 3557 NONAME
+ _ZN23QDeclarativePaintedItem10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3558 NONAME
+ _ZN23QDeclarativePaintedItem15geometryChangedERK6QRectFS2_ @ 3559 NONAME
+ _ZN24QDeclarativeWorkerScript10classBeginEv @ 3560 NONAME
+ _ZN24QDeclarativeWorkerScript6engineEv @ 3561 NONAME
+ _ZNK21QDeclarativeMouseArea12hoverEnabledEv @ 3562 NONAME
+ _ZNK23QDeclarativeConnections20ignoreUnknownSignalsEv @ 3563 NONAME
+ _ZNK23QDeclarativeItemPrivate14verticalCenterEv @ 3564 NONAME
+ _ZNK23QDeclarativeItemPrivate16horizontalCenterEv @ 3565 NONAME
+ _ZNK23QDeclarativeItemPrivate3topEv @ 3566 NONAME
+ _ZNK23QDeclarativeItemPrivate4leftEv @ 3567 NONAME
+ _ZNK23QDeclarativeItemPrivate5rightEv @ 3568 NONAME
+ _ZNK23QDeclarativeItemPrivate5stateEv @ 3569 NONAME
+ _ZNK23QDeclarativeItemPrivate6bottomEv @ 3570 NONAME
+ _ZNK23QDeclarativeItemPrivate8baselineEv @ 3571 NONAME
+ _ZNK27QDeclarativeVisualDataModel15completePendingEv @ 3572 NONAME
+ _ZNK27QDeclarativeVisualItemModel15completePendingEv @ 3573 NONAME
+ _ZThn8_N16QDeclarativeBind10classBeginEv @ 3574 NONAME
+ _ZThn8_N16QDeclarativePath10classBeginEv @ 3575 NONAME
+ _ZThn8_N21QDeclarativeMouseArea10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3576 NONAME
+ _ZThn8_N23QDeclarativeConnections10classBeginEv @ 3577 NONAME
+ _ZThn8_N23QDeclarativePaintedItem10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 3578 NONAME
+ _ZThn8_N24QDeclarativeWorkerScript10classBeginEv @ 3579 NONAME
+ _ZN16QDeclarativeItem18keyPressPreHandlerEP9QKeyEvent @ 3580 NONAME
+ _ZN16QDeclarativeItem20keyReleasePreHandlerEP9QKeyEvent @ 3581 NONAME
+ _ZN16QDeclarativeItem21inputMethodPreHandlerEP17QInputMethodEvent @ 3582 NONAME
+ _ZN18QDeclarativeLoader17componentCompleteEv @ 3583 NONAME
+ _ZN18QDeclarativeLoader6loadedEv @ 3584 NONAME
+ _ZN20QDeclarativePathView21decrementCurrentIndexEv @ 3585 NONAME
+ _ZN20QDeclarativePathView21incrementCurrentIndexEv @ 3586 NONAME
+ _ZN21QDeclarativeFlickable17setFlickDirectionENS_18FlickableDirectionE @ 3587 NONAME
+ _ZN21QDeclarativeFlickable21setFlickableDirectionENS_18FlickableDirectionE @ 3588 NONAME
+ _ZN21QDeclarativeFlickable23movingVerticallyChangedEv @ 3589 NONAME
+ _ZN21QDeclarativeFlickable25flickableDirectionChangedEv @ 3590 NONAME
+ _ZN21QDeclarativeFlickable25flickingVerticallyChangedEv @ 3591 NONAME
+ _ZN21QDeclarativeFlickable25movingHorizontallyChangedEv @ 3592 NONAME
+ _ZN21QDeclarativeFlickable27flickingHorizontallyChangedEv @ 3593 NONAME
+ _ZN27QDeclarativeVisualDataModelC1EP19QDeclarativeContextP7QObject @ 3594 NONAME
+ _ZN27QDeclarativeVisualDataModelC2EP19QDeclarativeContextP7QObject @ 3595 NONAME
+ _ZN27QDeclarativeVisualItemModelC1EP7QObject @ 3596 NONAME
+ _ZN27QDeclarativeVisualItemModelC2EP7QObject @ 3597 NONAME
+ _ZNK21QDeclarativeFlickable18flickableDirectionEv @ 3598 NONAME
+ _ZNK21QDeclarativeFlickable18isMovingVerticallyEv @ 3599 NONAME
+ _ZNK21QDeclarativeFlickable20isFlickingVerticallyEv @ 3600 NONAME
+ _ZNK21QDeclarativeFlickable20isMovingHorizontallyEv @ 3601 NONAME
+ _ZNK21QDeclarativeFlickable22isFlickingHorizontallyEv @ 3602 NONAME
+ _ZThn16_N18QDeclarativeLoader17componentCompleteEv @ 3603 NONAME
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index b1166c5..6b05e9b 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -9899,17 +9899,17 @@ EXPORTS
_ZNK7QAction9statusTipEv @ 9898 NONAME
_ZNK7QAction9whatsThisEv @ 9899 NONAME
_ZNK7QBezier10addIfCloseEPff @ 9900 NONAME
- _ZNK7QBezier12addToPolygonEP9QPolygonF @ 9901 NONAME
+ _ZNK7QBezier12addToPolygonEP9QPolygonF @ 9901 NONAME ABSENT
_ZNK7QBezier16bezierOnIntervalEff @ 9902 NONAME
- _ZNK7QBezier17addToPolygonMixedEP9QPolygonF @ 9903 NONAME
+ _ZNK7QBezier17addToPolygonMixedEP9QPolygonF @ 9903 NONAME ABSENT
_ZNK7QBezier17stationaryYPointsERfS0_ @ 9904 NONAME
- _ZNK7QBezier21addToPolygonIterativeEP9QPolygonF @ 9905 NONAME
+ _ZNK7QBezier21addToPolygonIterativeEP9QPolygonF @ 9905 NONAME ABSENT
_ZNK7QBezier5tForYEfff @ 9906 NONAME
_ZNK7QBezier6boundsEv @ 9907 NONAME
_ZNK7QBezier6lengthEf @ 9908 NONAME
_ZNK7QBezier7shiftedEPS_iff @ 9909 NONAME
_ZNK7QBezier9tAtLengthEf @ 9910 NONAME
- _ZNK7QBezier9toPolygonEv @ 9911 NONAME
+ _ZNK7QBezier9toPolygonEv @ 9911 NONAME ABSENT
_ZNK7QBitmap11transformedERK10QTransform @ 9912 NONAME
_ZNK7QBitmap11transformedERK7QMatrix @ 9913 NONAME
_ZNK7QBitmapcv8QVariantEv @ 9914 NONAME
@@ -11849,7 +11849,7 @@ EXPORTS
_ZN19QApplicationPrivate15getPixmapCursorEN2Qt11CursorShapeE @ 11848 NONAME
_ZN20QGraphicsViewPrivate10centerViewEN13QGraphicsView14ViewportAnchorE @ 11849 NONAME
_ZN20QGraphicsViewPrivate10updateRectERK5QRect @ 11850 NONAME
- _ZN20QGraphicsViewPrivate12updateRegionERK7QRegion @ 11851 NONAME
+ _ZN20QGraphicsViewPrivate12updateRegionERK7QRegion @ 11851 NONAME ABSENT
_ZN20QGraphicsViewPrivate12updateScrollEv @ 11852 NONAME
_ZN20QGraphicsViewPrivate15storeMouseEventEP11QMouseEvent @ 11853 NONAME
_ZN20QGraphicsViewPrivate18storeDragDropEventEPK27QGraphicsSceneDragDropEvent @ 11854 NONAME
@@ -11998,4 +11998,18 @@ EXPORTS
_ZN14QWindowSurface23setPartialUpdateSupportEb @ 11997 NONAME
_ZNK14QWindowSurface23hasPartialUpdateSupportEv @ 11998 NONAME
_ZNK5QIcon4nameEv @ 11999 NONAME
+ _ZN20QGraphicsViewPrivate12updateRegionERK6QRectFRK10QTransform @ 12000 NONAME
+ _ZN12QPixmapCache10allPixmapsEv @ 12001 NONAME
+ _ZN12QPixmapCache20flushDetachedPixmapsEv @ 12002 NONAME
+ _ZN12QPixmapCache9totalUsedEv @ 12003 NONAME
+ _ZN20QGraphicsItemPrivate30updatePaintedViewBoundingRectsEb @ 12004 NONAME
+ _ZN20QGraphicsViewPrivate13setUpdateClipEP13QGraphicsItem @ 12005 NONAME
+ _ZN23QImageTextureGlyphCache11fillTextureERKN18QTextureGlyphCache5CoordEj @ 12006 NONAME
+ _ZN23QImageTextureGlyphCache17createTextureDataEii @ 12007 NONAME
+ _ZN23QImageTextureGlyphCache17resizeTextureDataEii @ 12008 NONAME
+ _ZNK23QImageTextureGlyphCache11glyphMarginEv @ 12009 NONAME
+ _ZNK7QBezier12addToPolygonEP9QPolygonFf @ 12010 NONAME
+ _ZNK7QBezier9toPolygonEf @ 12011 NONAME
+ _ZTI23QImageTextureGlyphCache @ 12012 NONAME
+ _ZTV23QImageTextureGlyphCache @ 12013 NONAME
diff --git a/src/s60installs/eabi/QtMediaServicesu.def b/src/s60installs/eabi/QtMediaServicesu.def
deleted file mode 100644
index 0b4083d..0000000
--- a/src/s60installs/eabi/QtMediaServicesu.def
+++ /dev/null
@@ -1,674 +0,0 @@
-EXPORTS
- _ZN12QMediaObject11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
- _ZN12QMediaObject11qt_metacastEPKc @ 2 NONAME
- _ZN12QMediaObject11setMetaDataEN15QtMediaServices8MetaDataERK8QVariant @ 3 NONAME
- _ZN12QMediaObject13setupMetaDataEv @ 4 NONAME
- _ZN12QMediaObject15metaDataChangedEv @ 5 NONAME
- _ZN12QMediaObject16addPropertyWatchERK10QByteArray @ 6 NONAME
- _ZN12QMediaObject16staticMetaObjectE @ 7 NONAME DATA 16
- _ZN12QMediaObject17setNotifyIntervalEi @ 8 NONAME
- _ZN12QMediaObject19availabilityChangedEb @ 9 NONAME
- _ZN12QMediaObject19getStaticMetaObjectEv @ 10 NONAME
- _ZN12QMediaObject19removePropertyWatchERK10QByteArray @ 11 NONAME
- _ZN12QMediaObject19setExtendedMetaDataERK7QStringRK8QVariant @ 12 NONAME
- _ZN12QMediaObject21notifyIntervalChangedEi @ 13 NONAME
- _ZN12QMediaObject23metaDataWritableChangedEb @ 14 NONAME
- _ZN12QMediaObject24metaDataAvailableChangedEb @ 15 NONAME
- _ZN12QMediaObject4bindEP7QObject @ 16 NONAME
- _ZN12QMediaObject6unbindEP7QObject @ 17 NONAME
- _ZN12QMediaObjectC1EP7QObjectP13QMediaService @ 18 NONAME
- _ZN12QMediaObjectC1ER19QMediaObjectPrivateP7QObjectP13QMediaService @ 19 NONAME
- _ZN12QMediaObjectC2EP7QObjectP13QMediaService @ 20 NONAME
- _ZN12QMediaObjectC2ER19QMediaObjectPrivateP7QObjectP13QMediaService @ 21 NONAME
- _ZN12QMediaObjectD0Ev @ 22 NONAME
- _ZN12QMediaObjectD1Ev @ 23 NONAME
- _ZN12QMediaObjectD2Ev @ 24 NONAME
- _ZN12QMediaPlayer10hasSupportERK7QStringRK11QStringList6QFlagsINS_4FlagEE @ 25 NONAME
- _ZN12QMediaPlayer11qt_metacallEN11QMetaObject4CallEiPPv @ 26 NONAME
- _ZN12QMediaPlayer11qt_metacastEPKc @ 27 NONAME
- _ZN12QMediaPlayer11setPositionEx @ 28 NONAME
- _ZN12QMediaPlayer12mediaChangedERK13QMediaContent @ 29 NONAME
- _ZN12QMediaPlayer12mutedChangedEb @ 30 NONAME
- _ZN12QMediaPlayer12stateChangedENS_5StateE @ 31 NONAME
- _ZN12QMediaPlayer13volumeChangedEi @ 32 NONAME
- _ZN12QMediaPlayer15durationChangedEx @ 33 NONAME
- _ZN12QMediaPlayer15positionChangedEx @ 34 NONAME
- _ZN12QMediaPlayer15seekableChangedEb @ 35 NONAME
- _ZN12QMediaPlayer15setPlaybackRateEf @ 36 NONAME
- _ZN12QMediaPlayer16staticMetaObjectE @ 37 NONAME DATA 16
- _ZN12QMediaPlayer18mediaStatusChangedENS_11MediaStatusE @ 38 NONAME
- _ZN12QMediaPlayer18supportedMimeTypesE6QFlagsINS_4FlagEE @ 39 NONAME
- _ZN12QMediaPlayer19bufferStatusChangedEi @ 40 NONAME
- _ZN12QMediaPlayer19getStaticMetaObjectEv @ 41 NONAME
- _ZN12QMediaPlayer19playbackRateChangedEf @ 42 NONAME
- _ZN12QMediaPlayer21audioAvailableChangedEb @ 43 NONAME
- _ZN12QMediaPlayer21videoAvailableChangedEb @ 44 NONAME
- _ZN12QMediaPlayer4bindEP7QObject @ 45 NONAME
- _ZN12QMediaPlayer4playEv @ 46 NONAME
- _ZN12QMediaPlayer4stopEv @ 47 NONAME
- _ZN12QMediaPlayer5errorENS_5ErrorE @ 48 NONAME
- _ZN12QMediaPlayer5pauseEv @ 49 NONAME
- _ZN12QMediaPlayer6unbindEP7QObject @ 50 NONAME
- _ZN12QMediaPlayer8setMediaERK13QMediaContentP9QIODevice @ 51 NONAME
- _ZN12QMediaPlayer8setMutedEb @ 52 NONAME
- _ZN12QMediaPlayer9setVolumeEi @ 53 NONAME
- _ZN12QMediaPlayerC1EP7QObject6QFlagsINS_4FlagEEP21QMediaServiceProvider @ 54 NONAME
- _ZN12QMediaPlayerC2EP7QObject6QFlagsINS_4FlagEEP21QMediaServiceProvider @ 55 NONAME
- _ZN12QMediaPlayerD0Ev @ 56 NONAME
- _ZN12QMediaPlayerD1Ev @ 57 NONAME
- _ZN12QMediaPlayerD2Ev @ 58 NONAME
- _ZN12QSoundEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 59 NONAME
- _ZN12QSoundEffect11qt_metacastEPKc @ 60 NONAME
- _ZN12QSoundEffect12loopsChangedEv @ 61 NONAME
- _ZN12QSoundEffect12mutedChangedEv @ 62 NONAME
- _ZN12QSoundEffect13sourceChangedEv @ 63 NONAME
- _ZN12QSoundEffect13volumeChangedEv @ 64 NONAME
- _ZN12QSoundEffect16staticMetaObjectE @ 65 NONAME DATA 16
- _ZN12QSoundEffect19getStaticMetaObjectEv @ 66 NONAME
- _ZN12QSoundEffect4playEv @ 67 NONAME
- _ZN12QSoundEffect8setLoopsEi @ 68 NONAME
- _ZN12QSoundEffect8setMutedEb @ 69 NONAME
- _ZN12QSoundEffect9setSourceERK4QUrl @ 70 NONAME
- _ZN12QSoundEffect9setVolumeEi @ 71 NONAME
- _ZN12QSoundEffectC1EP7QObject @ 72 NONAME
- _ZN12QSoundEffectC2EP7QObject @ 73 NONAME
- _ZN12QSoundEffectD0Ev @ 74 NONAME
- _ZN12QSoundEffectD1Ev @ 75 NONAME
- _ZN12QSoundEffectD2Ev @ 76 NONAME
- _ZN12QVideoWidget10hueChangedEi @ 77 NONAME
- _ZN12QVideoWidget10paintEventEP11QPaintEvent @ 78 NONAME
- _ZN12QVideoWidget11qt_metacallEN11QMetaObject4CallEiPPv @ 79 NONAME
- _ZN12QVideoWidget11qt_metacastEPKc @ 80 NONAME
- _ZN12QVideoWidget11resizeEventEP12QResizeEvent @ 81 NONAME
- _ZN12QVideoWidget11setContrastEi @ 82 NONAME
- _ZN12QVideoWidget13setBrightnessEi @ 83 NONAME
- _ZN12QVideoWidget13setFullScreenEb @ 84 NONAME
- _ZN12QVideoWidget13setSaturationEi @ 85 NONAME
- _ZN12QVideoWidget14setMediaObjectEP12QMediaObject @ 86 NONAME
- _ZN12QVideoWidget15contrastChangedEi @ 87 NONAME
- _ZN12QVideoWidget16staticMetaObjectE @ 88 NONAME DATA 16
- _ZN12QVideoWidget17brightnessChangedEi @ 89 NONAME
- _ZN12QVideoWidget17fullScreenChangedEb @ 90 NONAME
- _ZN12QVideoWidget17saturationChangedEi @ 91 NONAME
- _ZN12QVideoWidget18setAspectRatioModeEN2Qt15AspectRatioModeE @ 92 NONAME
- _ZN12QVideoWidget19getStaticMetaObjectEv @ 93 NONAME
- _ZN12QVideoWidget5eventEP6QEvent @ 94 NONAME
- _ZN12QVideoWidget6setHueEi @ 95 NONAME
- _ZN12QVideoWidget9hideEventEP10QHideEvent @ 96 NONAME
- _ZN12QVideoWidget9moveEventEP10QMoveEvent @ 97 NONAME
- _ZN12QVideoWidget9showEventEP10QShowEvent @ 98 NONAME
- _ZN12QVideoWidgetC1EP7QWidget @ 99 NONAME
- _ZN12QVideoWidgetC2EP7QWidget @ 100 NONAME
- _ZN12QVideoWidgetD0Ev @ 101 NONAME
- _ZN12QVideoWidgetD1Ev @ 102 NONAME
- _ZN12QVideoWidgetD2Ev @ 103 NONAME
- _ZN13QMediaContentC1ERK14QMediaResource @ 104 NONAME
- _ZN13QMediaContentC1ERK15QNetworkRequest @ 105 NONAME
- _ZN13QMediaContentC1ERK4QUrl @ 106 NONAME
- _ZN13QMediaContentC1ERK5QListI14QMediaResourceE @ 107 NONAME
- _ZN13QMediaContentC1ERKS_ @ 108 NONAME
- _ZN13QMediaContentC1Ev @ 109 NONAME
- _ZN13QMediaContentC2ERK14QMediaResource @ 110 NONAME
- _ZN13QMediaContentC2ERK15QNetworkRequest @ 111 NONAME
- _ZN13QMediaContentC2ERK4QUrl @ 112 NONAME
- _ZN13QMediaContentC2ERK5QListI14QMediaResourceE @ 113 NONAME
- _ZN13QMediaContentC2ERKS_ @ 114 NONAME
- _ZN13QMediaContentC2Ev @ 115 NONAME
- _ZN13QMediaContentD1Ev @ 116 NONAME
- _ZN13QMediaContentD2Ev @ 117 NONAME
- _ZN13QMediaContentaSERKS_ @ 118 NONAME
- _ZN13QMediaControl11qt_metacallEN11QMetaObject4CallEiPPv @ 119 NONAME
- _ZN13QMediaControl11qt_metacastEPKc @ 120 NONAME
- _ZN13QMediaControl16staticMetaObjectE @ 121 NONAME DATA 16
- _ZN13QMediaControl19getStaticMetaObjectEv @ 122 NONAME
- _ZN13QMediaControlC1EP7QObject @ 123 NONAME
- _ZN13QMediaControlC1ER20QMediaControlPrivateP7QObject @ 124 NONAME
- _ZN13QMediaControlC2EP7QObject @ 125 NONAME
- _ZN13QMediaControlC2ER20QMediaControlPrivateP7QObject @ 126 NONAME
- _ZN13QMediaControlD0Ev @ 127 NONAME
- _ZN13QMediaControlD1Ev @ 128 NONAME
- _ZN13QMediaControlD2Ev @ 129 NONAME
- _ZN13QMediaService11qt_metacallEN11QMetaObject4CallEiPPv @ 130 NONAME
- _ZN13QMediaService11qt_metacastEPKc @ 131 NONAME
- _ZN13QMediaService16staticMetaObjectE @ 132 NONAME DATA 16
- _ZN13QMediaService19getStaticMetaObjectEv @ 133 NONAME
- _ZN13QMediaServiceC2EP7QObject @ 134 NONAME
- _ZN13QMediaServiceC2ER20QMediaServicePrivateP7QObject @ 135 NONAME
- _ZN13QMediaServiceD0Ev @ 136 NONAME
- _ZN13QMediaServiceD1Ev @ 137 NONAME
- _ZN13QMediaServiceD2Ev @ 138 NONAME
- _ZN14QMediaPlaylist10loadFailedEv @ 139 NONAME
- _ZN14QMediaPlaylist11insertMediaEiRK13QMediaContent @ 140 NONAME
- _ZN14QMediaPlaylist11insertMediaEiRK5QListI13QMediaContentE @ 141 NONAME
- _ZN14QMediaPlaylist11qt_metacallEN11QMetaObject4CallEiPPv @ 142 NONAME
- _ZN14QMediaPlaylist11qt_metacastEPKc @ 143 NONAME
- _ZN14QMediaPlaylist11removeMediaEi @ 144 NONAME
- _ZN14QMediaPlaylist11removeMediaEii @ 145 NONAME
- _ZN14QMediaPlaylist12mediaChangedEii @ 146 NONAME
- _ZN14QMediaPlaylist12mediaRemovedEii @ 147 NONAME
- _ZN14QMediaPlaylist13mediaInsertedEii @ 148 NONAME
- _ZN14QMediaPlaylist14setMediaObjectEP12QMediaObject @ 149 NONAME
- _ZN14QMediaPlaylist15setCurrentIndexEi @ 150 NONAME
- _ZN14QMediaPlaylist15setPlaybackModeENS_12PlaybackModeE @ 151 NONAME
- _ZN14QMediaPlaylist16staticMetaObjectE @ 152 NONAME DATA 16
- _ZN14QMediaPlaylist19currentIndexChangedEi @ 153 NONAME
- _ZN14QMediaPlaylist19currentMediaChangedERK13QMediaContent @ 154 NONAME
- _ZN14QMediaPlaylist19getStaticMetaObjectEv @ 155 NONAME
- _ZN14QMediaPlaylist19playbackModeChangedENS_12PlaybackModeE @ 156 NONAME
- _ZN14QMediaPlaylist21mediaAboutToBeRemovedEii @ 157 NONAME
- _ZN14QMediaPlaylist22mediaAboutToBeInsertedEii @ 158 NONAME
- _ZN14QMediaPlaylist4loadEP9QIODevicePKc @ 159 NONAME
- _ZN14QMediaPlaylist4loadERK4QUrlPKc @ 160 NONAME
- _ZN14QMediaPlaylist4nextEv @ 161 NONAME
- _ZN14QMediaPlaylist4saveEP9QIODevicePKc @ 162 NONAME
- _ZN14QMediaPlaylist4saveERK4QUrlPKc @ 163 NONAME
- _ZN14QMediaPlaylist5clearEv @ 164 NONAME
- _ZN14QMediaPlaylist6loadedEv @ 165 NONAME
- _ZN14QMediaPlaylist7shuffleEv @ 166 NONAME
- _ZN14QMediaPlaylist8addMediaERK13QMediaContent @ 167 NONAME
- _ZN14QMediaPlaylist8addMediaERK5QListI13QMediaContentE @ 168 NONAME
- _ZN14QMediaPlaylist8previousEv @ 169 NONAME
- _ZN14QMediaPlaylistC1EP7QObject @ 170 NONAME
- _ZN14QMediaPlaylistC2EP7QObject @ 171 NONAME
- _ZN14QMediaPlaylistD0Ev @ 172 NONAME
- _ZN14QMediaPlaylistD1Ev @ 173 NONAME
- _ZN14QMediaPlaylistD2Ev @ 174 NONAME
- _ZN14QMediaResource11setDataSizeEx @ 175 NONAME
- _ZN14QMediaResource11setLanguageERK7QString @ 176 NONAME
- _ZN14QMediaResource13setAudioCodecERK7QString @ 177 NONAME
- _ZN14QMediaResource13setResolutionERK5QSize @ 178 NONAME
- _ZN14QMediaResource13setResolutionEii @ 179 NONAME
- _ZN14QMediaResource13setSampleRateEi @ 180 NONAME
- _ZN14QMediaResource13setVideoCodecERK7QString @ 181 NONAME
- _ZN14QMediaResource15setAudioBitRateEi @ 182 NONAME
- _ZN14QMediaResource15setChannelCountEi @ 183 NONAME
- _ZN14QMediaResource15setVideoBitRateEi @ 184 NONAME
- _ZN14QMediaResourceC1ERK15QNetworkRequestRK7QString @ 185 NONAME
- _ZN14QMediaResourceC1ERK4QUrlRK7QString @ 186 NONAME
- _ZN14QMediaResourceC1ERKS_ @ 187 NONAME
- _ZN14QMediaResourceC1Ev @ 188 NONAME
- _ZN14QMediaResourceC2ERK15QNetworkRequestRK7QString @ 189 NONAME
- _ZN14QMediaResourceC2ERK4QUrlRK7QString @ 190 NONAME
- _ZN14QMediaResourceC2ERKS_ @ 191 NONAME
- _ZN14QMediaResourceC2Ev @ 192 NONAME
- _ZN14QMediaResourceD1Ev @ 193 NONAME
- _ZN14QMediaResourceD2Ev @ 194 NONAME
- _ZN14QMediaResourceaSERKS_ @ 195 NONAME
- _ZN15QMediaTimeRange11addIntervalERK18QMediaTimeInterval @ 196 NONAME
- _ZN15QMediaTimeRange11addIntervalExx @ 197 NONAME
- _ZN15QMediaTimeRange12addTimeRangeERKS_ @ 198 NONAME
- _ZN15QMediaTimeRange14removeIntervalERK18QMediaTimeInterval @ 199 NONAME
- _ZN15QMediaTimeRange14removeIntervalExx @ 200 NONAME
- _ZN15QMediaTimeRange15removeTimeRangeERKS_ @ 201 NONAME
- _ZN15QMediaTimeRange5clearEv @ 202 NONAME
- _ZN15QMediaTimeRangeC1ERK18QMediaTimeInterval @ 203 NONAME
- _ZN15QMediaTimeRangeC1ERKS_ @ 204 NONAME
- _ZN15QMediaTimeRangeC1Ev @ 205 NONAME
- _ZN15QMediaTimeRangeC1Exx @ 206 NONAME
- _ZN15QMediaTimeRangeC2ERK18QMediaTimeInterval @ 207 NONAME
- _ZN15QMediaTimeRangeC2ERKS_ @ 208 NONAME
- _ZN15QMediaTimeRangeC2Ev @ 209 NONAME
- _ZN15QMediaTimeRangeC2Exx @ 210 NONAME
- _ZN15QMediaTimeRangeD1Ev @ 211 NONAME
- _ZN15QMediaTimeRangeD2Ev @ 212 NONAME
- _ZN15QMediaTimeRangeaSERK18QMediaTimeInterval @ 213 NONAME
- _ZN15QMediaTimeRangeaSERKS_ @ 214 NONAME
- _ZN15QMediaTimeRangemIERK18QMediaTimeInterval @ 215 NONAME
- _ZN15QMediaTimeRangemIERKS_ @ 216 NONAME
- _ZN15QMediaTimeRangepLERK18QMediaTimeInterval @ 217 NONAME
- _ZN15QMediaTimeRangepLERKS_ @ 218 NONAME
- _ZN16QMetaDataControl11qt_metacallEN11QMetaObject4CallEiPPv @ 219 NONAME
- _ZN16QMetaDataControl11qt_metacastEPKc @ 220 NONAME
- _ZN16QMetaDataControl15metaDataChangedEv @ 221 NONAME
- _ZN16QMetaDataControl15writableChangedEb @ 222 NONAME
- _ZN16QMetaDataControl16staticMetaObjectE @ 223 NONAME DATA 16
- _ZN16QMetaDataControl19getStaticMetaObjectEv @ 224 NONAME
- _ZN16QMetaDataControl24metaDataAvailableChangedEb @ 225 NONAME
- _ZN16QMetaDataControlC2EP7QObject @ 226 NONAME
- _ZN16QMetaDataControlD0Ev @ 227 NONAME
- _ZN16QMetaDataControlD1Ev @ 228 NONAME
- _ZN16QMetaDataControlD2Ev @ 229 NONAME
- _ZN18QGraphicsVideoItem10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 230 NONAME
- _ZN18QGraphicsVideoItem10sceneEventEP6QEvent @ 231 NONAME
- _ZN18QGraphicsVideoItem11qt_metacallEN11QMetaObject4CallEiPPv @ 232 NONAME
- _ZN18QGraphicsVideoItem11qt_metacastEPKc @ 233 NONAME
- _ZN18QGraphicsVideoItem14setMediaObjectEP12QMediaObject @ 234 NONAME
- _ZN18QGraphicsVideoItem16staticMetaObjectE @ 235 NONAME DATA 16
- _ZN18QGraphicsVideoItem17nativeSizeChangedERK6QSizeF @ 236 NONAME
- _ZN18QGraphicsVideoItem18setAspectRatioModeEN2Qt15AspectRatioModeE @ 237 NONAME
- _ZN18QGraphicsVideoItem19getStaticMetaObjectEv @ 238 NONAME
- _ZN18QGraphicsVideoItem5eventEP6QEvent @ 239 NONAME
- _ZN18QGraphicsVideoItem5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 240 NONAME
- _ZN18QGraphicsVideoItem7setSizeERK6QSizeF @ 241 NONAME
- _ZN18QGraphicsVideoItem9setOffsetERK7QPointF @ 242 NONAME
- _ZN18QGraphicsVideoItemC1EP13QGraphicsItem @ 243 NONAME
- _ZN18QGraphicsVideoItemC2EP13QGraphicsItem @ 244 NONAME
- _ZN18QGraphicsVideoItemD0Ev @ 245 NONAME
- _ZN18QGraphicsVideoItemD1Ev @ 246 NONAME
- _ZN18QGraphicsVideoItemD2Ev @ 247 NONAME
- _ZN18QMediaTimeIntervalC1ERKS_ @ 248 NONAME
- _ZN18QMediaTimeIntervalC1Ev @ 249 NONAME
- _ZN18QMediaTimeIntervalC1Exx @ 250 NONAME
- _ZN18QMediaTimeIntervalC2ERKS_ @ 251 NONAME
- _ZN18QMediaTimeIntervalC2Ev @ 252 NONAME
- _ZN18QMediaTimeIntervalC2Exx @ 253 NONAME
- _ZN19QMediaPlayerControl11qt_metacallEN11QMetaObject4CallEiPPv @ 254 NONAME
- _ZN19QMediaPlayerControl11qt_metacastEPKc @ 255 NONAME
- _ZN19QMediaPlayerControl12mediaChangedERK13QMediaContent @ 256 NONAME
- _ZN19QMediaPlayerControl12mutedChangedEb @ 257 NONAME
- _ZN19QMediaPlayerControl12stateChangedEN12QMediaPlayer5StateE @ 258 NONAME
- _ZN19QMediaPlayerControl13volumeChangedEi @ 259 NONAME
- _ZN19QMediaPlayerControl15durationChangedEx @ 260 NONAME
- _ZN19QMediaPlayerControl15positionChangedEx @ 261 NONAME
- _ZN19QMediaPlayerControl15seekableChangedEb @ 262 NONAME
- _ZN19QMediaPlayerControl16staticMetaObjectE @ 263 NONAME DATA 16
- _ZN19QMediaPlayerControl18mediaStatusChangedEN12QMediaPlayer11MediaStatusE @ 264 NONAME
- _ZN19QMediaPlayerControl19bufferStatusChangedEi @ 265 NONAME
- _ZN19QMediaPlayerControl19getStaticMetaObjectEv @ 266 NONAME
- _ZN19QMediaPlayerControl19playbackRateChangedEf @ 267 NONAME
- _ZN19QMediaPlayerControl21audioAvailableChangedEb @ 268 NONAME
- _ZN19QMediaPlayerControl21videoAvailableChangedEb @ 269 NONAME
- _ZN19QMediaPlayerControl30availablePlaybackRangesChangedERK15QMediaTimeRange @ 270 NONAME
- _ZN19QMediaPlayerControl5errorEiRK7QString @ 271 NONAME
- _ZN19QMediaPlayerControlC2EP7QObject @ 272 NONAME
- _ZN19QMediaPlayerControlD0Ev @ 273 NONAME
- _ZN19QMediaPlayerControlD1Ev @ 274 NONAME
- _ZN19QMediaPlayerControlD2Ev @ 275 NONAME
- _ZN19QVideoDeviceControl11qt_metacallEN11QMetaObject4CallEiPPv @ 276 NONAME
- _ZN19QVideoDeviceControl11qt_metacastEPKc @ 277 NONAME
- _ZN19QVideoDeviceControl14devicesChangedEv @ 278 NONAME
- _ZN19QVideoDeviceControl16staticMetaObjectE @ 279 NONAME DATA 16
- _ZN19QVideoDeviceControl19getStaticMetaObjectEv @ 280 NONAME
- _ZN19QVideoDeviceControl21selectedDeviceChangedERK7QString @ 281 NONAME
- _ZN19QVideoDeviceControl21selectedDeviceChangedEi @ 282 NONAME
- _ZN19QVideoDeviceControlC2EP7QObject @ 283 NONAME
- _ZN19QVideoDeviceControlD0Ev @ 284 NONAME
- _ZN19QVideoDeviceControlD1Ev @ 285 NONAME
- _ZN19QVideoDeviceControlD2Ev @ 286 NONAME
- _ZN19QVideoOutputControl11qt_metacallEN11QMetaObject4CallEiPPv @ 287 NONAME
- _ZN19QVideoOutputControl11qt_metacastEPKc @ 288 NONAME
- _ZN19QVideoOutputControl16staticMetaObjectE @ 289 NONAME DATA 16
- _ZN19QVideoOutputControl19getStaticMetaObjectEv @ 290 NONAME
- _ZN19QVideoOutputControl23availableOutputsChangedERK5QListINS_6OutputEE @ 291 NONAME
- _ZN19QVideoOutputControlC2EP7QObject @ 292 NONAME
- _ZN19QVideoOutputControlD0Ev @ 293 NONAME
- _ZN19QVideoOutputControlD1Ev @ 294 NONAME
- _ZN19QVideoOutputControlD2Ev @ 295 NONAME
- _ZN19QVideoWidgetControl10hueChangedEi @ 296 NONAME
- _ZN19QVideoWidgetControl11qt_metacallEN11QMetaObject4CallEiPPv @ 297 NONAME
- _ZN19QVideoWidgetControl11qt_metacastEPKc @ 298 NONAME
- _ZN19QVideoWidgetControl15contrastChangedEi @ 299 NONAME
- _ZN19QVideoWidgetControl16staticMetaObjectE @ 300 NONAME DATA 16
- _ZN19QVideoWidgetControl17brightnessChangedEi @ 301 NONAME
- _ZN19QVideoWidgetControl17fullScreenChangedEb @ 302 NONAME
- _ZN19QVideoWidgetControl17saturationChangedEi @ 303 NONAME
- _ZN19QVideoWidgetControl19getStaticMetaObjectEv @ 304 NONAME
- _ZN19QVideoWidgetControlC2EP7QObject @ 305 NONAME
- _ZN19QVideoWidgetControlD0Ev @ 306 NONAME
- _ZN19QVideoWidgetControlD1Ev @ 307 NONAME
- _ZN19QVideoWidgetControlD2Ev @ 308 NONAME
- _ZN19QVideoWindowControl10hueChangedEi @ 309 NONAME
- _ZN19QVideoWindowControl11qt_metacallEN11QMetaObject4CallEiPPv @ 310 NONAME
- _ZN19QVideoWindowControl11qt_metacastEPKc @ 311 NONAME
- _ZN19QVideoWindowControl15contrastChangedEi @ 312 NONAME
- _ZN19QVideoWindowControl16staticMetaObjectE @ 313 NONAME DATA 16
- _ZN19QVideoWindowControl17brightnessChangedEi @ 314 NONAME
- _ZN19QVideoWindowControl17fullScreenChangedEb @ 315 NONAME
- _ZN19QVideoWindowControl17nativeSizeChangedEv @ 316 NONAME
- _ZN19QVideoWindowControl17saturationChangedEi @ 317 NONAME
- _ZN19QVideoWindowControl19getStaticMetaObjectEv @ 318 NONAME
- _ZN19QVideoWindowControlC2EP7QObject @ 319 NONAME
- _ZN19QVideoWindowControlD0Ev @ 320 NONAME
- _ZN19QVideoWindowControlD1Ev @ 321 NONAME
- _ZN19QVideoWindowControlD2Ev @ 322 NONAME
- _ZN20QMediaPlaylistReaderD0Ev @ 323 NONAME
- _ZN20QMediaPlaylistReaderD1Ev @ 324 NONAME
- _ZN20QMediaPlaylistReaderD2Ev @ 325 NONAME
- _ZN20QMediaPlaylistWriterD0Ev @ 326 NONAME
- _ZN20QMediaPlaylistWriterD1Ev @ 327 NONAME
- _ZN20QMediaPlaylistWriterD2Ev @ 328 NONAME
- _ZN20QPainterVideoSurface11qt_metacallEN11QMetaObject4CallEiPPv @ 329 NONAME
- _ZN20QPainterVideoSurface11qt_metacastEPKc @ 330 NONAME
- _ZN20QPainterVideoSurface11setContrastEi @ 331 NONAME
- _ZN20QPainterVideoSurface12frameChangedEv @ 332 NONAME
- _ZN20QPainterVideoSurface13createPainterEv @ 333 NONAME
- _ZN20QPainterVideoSurface13setBrightnessEi @ 334 NONAME
- _ZN20QPainterVideoSurface13setSaturationEi @ 335 NONAME
- _ZN20QPainterVideoSurface16staticMetaObjectE @ 336 NONAME DATA 16
- _ZN20QPainterVideoSurface19getStaticMetaObjectEv @ 337 NONAME
- _ZN20QPainterVideoSurface4stopEv @ 338 NONAME
- _ZN20QPainterVideoSurface5paintEP8QPainterRK6QRectFS4_ @ 339 NONAME
- _ZN20QPainterVideoSurface5startERK19QVideoSurfaceFormat @ 340 NONAME
- _ZN20QPainterVideoSurface6setHueEi @ 341 NONAME
- _ZN20QPainterVideoSurface7presentERK11QVideoFrame @ 342 NONAME
- _ZN20QPainterVideoSurface8setReadyEb @ 343 NONAME
- _ZN20QPainterVideoSurfaceC1EP7QObject @ 344 NONAME
- _ZN20QPainterVideoSurfaceC2EP7QObject @ 345 NONAME
- _ZN20QPainterVideoSurfaceD0Ev @ 346 NONAME
- _ZN20QPainterVideoSurfaceD1Ev @ 347 NONAME
- _ZN20QPainterVideoSurfaceD2Ev @ 348 NONAME
- _ZN21QMediaPlaylistControl11qt_metacallEN11QMetaObject4CallEiPPv @ 349 NONAME
- _ZN21QMediaPlaylistControl11qt_metacastEPKc @ 350 NONAME
- _ZN21QMediaPlaylistControl16staticMetaObjectE @ 351 NONAME DATA 16
- _ZN21QMediaPlaylistControl19currentIndexChangedEi @ 352 NONAME
- _ZN21QMediaPlaylistControl19currentMediaChangedERK13QMediaContent @ 353 NONAME
- _ZN21QMediaPlaylistControl19getStaticMetaObjectEv @ 354 NONAME
- _ZN21QMediaPlaylistControl19playbackModeChangedEN14QMediaPlaylist12PlaybackModeE @ 355 NONAME
- _ZN21QMediaPlaylistControl23playlistProviderChangedEv @ 356 NONAME
- _ZN21QMediaPlaylistControlC2EP7QObject @ 357 NONAME
- _ZN21QMediaPlaylistControlD0Ev @ 358 NONAME
- _ZN21QMediaPlaylistControlD1Ev @ 359 NONAME
- _ZN21QMediaPlaylistControlD2Ev @ 360 NONAME
- _ZN21QMediaServiceProvider11qt_metacallEN11QMetaObject4CallEiPPv @ 361 NONAME
- _ZN21QMediaServiceProvider11qt_metacastEPKc @ 362 NONAME
- _ZN21QMediaServiceProvider16staticMetaObjectE @ 363 NONAME DATA 16
- _ZN21QMediaServiceProvider17deviceDescriptionERK10QByteArrayS2_ @ 364 NONAME
- _ZN21QMediaServiceProvider19getStaticMetaObjectEv @ 365 NONAME
- _ZN21QMediaServiceProvider22defaultServiceProviderEv @ 366 NONAME
- _ZN21QVideoRendererControl11qt_metacallEN11QMetaObject4CallEiPPv @ 367 NONAME
- _ZN21QVideoRendererControl11qt_metacastEPKc @ 368 NONAME
- _ZN21QVideoRendererControl16staticMetaObjectE @ 369 NONAME DATA 16
- _ZN21QVideoRendererControl19getStaticMetaObjectEv @ 370 NONAME
- _ZN21QVideoRendererControlC2EP7QObject @ 371 NONAME
- _ZN21QVideoRendererControlD0Ev @ 372 NONAME
- _ZN21QVideoRendererControlD1Ev @ 373 NONAME
- _ZN21QVideoRendererControlD2Ev @ 374 NONAME
- _ZN22QMediaPlaylistIOPlugin11qt_metacallEN11QMetaObject4CallEiPPv @ 375 NONAME
- _ZN22QMediaPlaylistIOPlugin11qt_metacastEPKc @ 376 NONAME
- _ZN22QMediaPlaylistIOPlugin16staticMetaObjectE @ 377 NONAME DATA 16
- _ZN22QMediaPlaylistIOPlugin19getStaticMetaObjectEv @ 378 NONAME
- _ZN22QMediaPlaylistIOPluginC2EP7QObject @ 379 NONAME
- _ZN22QMediaPlaylistIOPluginD0Ev @ 380 NONAME
- _ZN22QMediaPlaylistIOPluginD1Ev @ 381 NONAME
- _ZN22QMediaPlaylistIOPluginD2Ev @ 382 NONAME
- _ZN22QMediaPlaylistProvider10loadFailedEN14QMediaPlaylist5ErrorERK7QString @ 383 NONAME
- _ZN22QMediaPlaylistProvider11insertMediaEiRK13QMediaContent @ 384 NONAME
- _ZN22QMediaPlaylistProvider11insertMediaEiRK5QListI13QMediaContentE @ 385 NONAME
- _ZN22QMediaPlaylistProvider11qt_metacallEN11QMetaObject4CallEiPPv @ 386 NONAME
- _ZN22QMediaPlaylistProvider11qt_metacastEPKc @ 387 NONAME
- _ZN22QMediaPlaylistProvider11removeMediaEi @ 388 NONAME
- _ZN22QMediaPlaylistProvider11removeMediaEii @ 389 NONAME
- _ZN22QMediaPlaylistProvider12mediaChangedEii @ 390 NONAME
- _ZN22QMediaPlaylistProvider12mediaRemovedEii @ 391 NONAME
- _ZN22QMediaPlaylistProvider13mediaInsertedEii @ 392 NONAME
- _ZN22QMediaPlaylistProvider16staticMetaObjectE @ 393 NONAME DATA 16
- _ZN22QMediaPlaylistProvider19getStaticMetaObjectEv @ 394 NONAME
- _ZN22QMediaPlaylistProvider21mediaAboutToBeRemovedEii @ 395 NONAME
- _ZN22QMediaPlaylistProvider22mediaAboutToBeInsertedEii @ 396 NONAME
- _ZN22QMediaPlaylistProvider4loadEP9QIODevicePKc @ 397 NONAME
- _ZN22QMediaPlaylistProvider4loadERK4QUrlPKc @ 398 NONAME
- _ZN22QMediaPlaylistProvider4saveEP9QIODevicePKc @ 399 NONAME
- _ZN22QMediaPlaylistProvider4saveERK4QUrlPKc @ 400 NONAME
- _ZN22QMediaPlaylistProvider5clearEv @ 401 NONAME
- _ZN22QMediaPlaylistProvider6loadedEv @ 402 NONAME
- _ZN22QMediaPlaylistProvider7shuffleEv @ 403 NONAME
- _ZN22QMediaPlaylistProvider8addMediaERK13QMediaContent @ 404 NONAME
- _ZN22QMediaPlaylistProvider8addMediaERK5QListI13QMediaContentE @ 405 NONAME
- _ZN22QMediaPlaylistProviderC2EP7QObject @ 406 NONAME
- _ZN22QMediaPlaylistProviderC2ER29QMediaPlaylistProviderPrivateP7QObject @ 407 NONAME
- _ZN22QMediaPlaylistProviderD0Ev @ 408 NONAME
- _ZN22QMediaPlaylistProviderD1Ev @ 409 NONAME
- _ZN22QMediaPlaylistProviderD2Ev @ 410 NONAME
- _ZN23QMediaPlaylistNavigator11qt_metacallEN11QMetaObject4CallEiPPv @ 411 NONAME
- _ZN23QMediaPlaylistNavigator11qt_metacastEPKc @ 412 NONAME
- _ZN23QMediaPlaylistNavigator11setPlaylistEP22QMediaPlaylistProvider @ 413 NONAME
- _ZN23QMediaPlaylistNavigator15setPlaybackModeEN14QMediaPlaylist12PlaybackModeE @ 414 NONAME
- _ZN23QMediaPlaylistNavigator16staticMetaObjectE @ 415 NONAME DATA 16
- _ZN23QMediaPlaylistNavigator19currentIndexChangedEi @ 416 NONAME
- _ZN23QMediaPlaylistNavigator19getStaticMetaObjectEv @ 417 NONAME
- _ZN23QMediaPlaylistNavigator19playbackModeChangedEN14QMediaPlaylist12PlaybackModeE @ 418 NONAME
- _ZN23QMediaPlaylistNavigator23surroundingItemsChangedEv @ 419 NONAME
- _ZN23QMediaPlaylistNavigator4jumpEi @ 420 NONAME
- _ZN23QMediaPlaylistNavigator4nextEv @ 421 NONAME
- _ZN23QMediaPlaylistNavigator8previousEv @ 422 NONAME
- _ZN23QMediaPlaylistNavigator9activatedERK13QMediaContent @ 423 NONAME
- _ZN23QMediaPlaylistNavigatorC1EP22QMediaPlaylistProviderP7QObject @ 424 NONAME
- _ZN23QMediaPlaylistNavigatorC2EP22QMediaPlaylistProviderP7QObject @ 425 NONAME
- _ZN23QMediaPlaylistNavigatorD0Ev @ 426 NONAME
- _ZN23QMediaPlaylistNavigatorD1Ev @ 427 NONAME
- _ZN23QMediaPlaylistNavigatorD2Ev @ 428 NONAME
- _ZN25QMediaServiceProviderHintC1E6QFlagsINS_7FeatureEE @ 429 NONAME
- _ZN25QMediaServiceProviderHintC1ERK10QByteArray @ 430 NONAME
- _ZN25QMediaServiceProviderHintC1ERK7QStringRK11QStringList @ 431 NONAME
- _ZN25QMediaServiceProviderHintC1ERKS_ @ 432 NONAME
- _ZN25QMediaServiceProviderHintC1Ev @ 433 NONAME
- _ZN25QMediaServiceProviderHintC2E6QFlagsINS_7FeatureEE @ 434 NONAME
- _ZN25QMediaServiceProviderHintC2ERK10QByteArray @ 435 NONAME
- _ZN25QMediaServiceProviderHintC2ERK7QStringRK11QStringList @ 436 NONAME
- _ZN25QMediaServiceProviderHintC2ERKS_ @ 437 NONAME
- _ZN25QMediaServiceProviderHintC2Ev @ 438 NONAME
- _ZN25QMediaServiceProviderHintD1Ev @ 439 NONAME
- _ZN25QMediaServiceProviderHintD2Ev @ 440 NONAME
- _ZN25QMediaServiceProviderHintaSERKS_ @ 441 NONAME
- _ZN27QLocalMediaPlaylistProvider11insertMediaEiRK13QMediaContent @ 442 NONAME
- _ZN27QLocalMediaPlaylistProvider11insertMediaEiRK5QListI13QMediaContentE @ 443 NONAME
- _ZN27QLocalMediaPlaylistProvider11qt_metacallEN11QMetaObject4CallEiPPv @ 444 NONAME
- _ZN27QLocalMediaPlaylistProvider11qt_metacastEPKc @ 445 NONAME
- _ZN27QLocalMediaPlaylistProvider11removeMediaEi @ 446 NONAME
- _ZN27QLocalMediaPlaylistProvider11removeMediaEii @ 447 NONAME
- _ZN27QLocalMediaPlaylistProvider16staticMetaObjectE @ 448 NONAME DATA 16
- _ZN27QLocalMediaPlaylistProvider19getStaticMetaObjectEv @ 449 NONAME
- _ZN27QLocalMediaPlaylistProvider5clearEv @ 450 NONAME
- _ZN27QLocalMediaPlaylistProvider7shuffleEv @ 451 NONAME
- _ZN27QLocalMediaPlaylistProvider8addMediaERK13QMediaContent @ 452 NONAME
- _ZN27QLocalMediaPlaylistProvider8addMediaERK5QListI13QMediaContentE @ 453 NONAME
- _ZN27QLocalMediaPlaylistProviderC1EP7QObject @ 454 NONAME
- _ZN27QLocalMediaPlaylistProviderC2EP7QObject @ 455 NONAME
- _ZN27QLocalMediaPlaylistProviderD0Ev @ 456 NONAME
- _ZN27QLocalMediaPlaylistProviderD1Ev @ 457 NONAME
- _ZN27QLocalMediaPlaylistProviderD2Ev @ 458 NONAME
- _ZN27QMediaServiceProviderPlugin11qt_metacallEN11QMetaObject4CallEiPPv @ 459 NONAME
- _ZN27QMediaServiceProviderPlugin11qt_metacastEPKc @ 460 NONAME
- _ZN27QMediaServiceProviderPlugin16staticMetaObjectE @ 461 NONAME DATA 16
- _ZN27QMediaServiceProviderPlugin19getStaticMetaObjectEv @ 462 NONAME
- _ZNK12QMediaObject10metaObjectEv @ 463 NONAME
- _ZNK12QMediaObject11isAvailableEv @ 464 NONAME
- _ZNK12QMediaObject14notifyIntervalEv @ 465 NONAME
- _ZNK12QMediaObject16extendedMetaDataERK7QString @ 466 NONAME
- _ZNK12QMediaObject17availabilityErrorEv @ 467 NONAME
- _ZNK12QMediaObject17availableMetaDataEv @ 468 NONAME
- _ZNK12QMediaObject18isMetaDataWritableEv @ 469 NONAME
- _ZNK12QMediaObject19isMetaDataAvailableEv @ 470 NONAME
- _ZNK12QMediaObject25availableExtendedMetaDataEv @ 471 NONAME
- _ZNK12QMediaObject7serviceEv @ 472 NONAME
- _ZNK12QMediaObject8metaDataEN15QtMediaServices8MetaDataE @ 473 NONAME
- _ZNK12QMediaPlayer10isSeekableEv @ 474 NONAME
- _ZNK12QMediaPlayer10metaObjectEv @ 475 NONAME
- _ZNK12QMediaPlayer11errorStringEv @ 476 NONAME
- _ZNK12QMediaPlayer11mediaStatusEv @ 477 NONAME
- _ZNK12QMediaPlayer11mediaStreamEv @ 478 NONAME
- _ZNK12QMediaPlayer12bufferStatusEv @ 479 NONAME
- _ZNK12QMediaPlayer12playbackRateEv @ 480 NONAME
- _ZNK12QMediaPlayer16isAudioAvailableEv @ 481 NONAME
- _ZNK12QMediaPlayer16isVideoAvailableEv @ 482 NONAME
- _ZNK12QMediaPlayer5errorEv @ 483 NONAME
- _ZNK12QMediaPlayer5mediaEv @ 484 NONAME
- _ZNK12QMediaPlayer5stateEv @ 485 NONAME
- _ZNK12QMediaPlayer6volumeEv @ 486 NONAME
- _ZNK12QMediaPlayer7isMutedEv @ 487 NONAME
- _ZNK12QMediaPlayer8durationEv @ 488 NONAME
- _ZNK12QMediaPlayer8positionEv @ 489 NONAME
- _ZNK12QSoundEffect10metaObjectEv @ 490 NONAME
- _ZNK12QSoundEffect5loopsEv @ 491 NONAME
- _ZNK12QSoundEffect6sourceEv @ 492 NONAME
- _ZNK12QSoundEffect6volumeEv @ 493 NONAME
- _ZNK12QSoundEffect7isMutedEv @ 494 NONAME
- _ZNK12QVideoWidget10brightnessEv @ 495 NONAME
- _ZNK12QVideoWidget10metaObjectEv @ 496 NONAME
- _ZNK12QVideoWidget10saturationEv @ 497 NONAME
- _ZNK12QVideoWidget11mediaObjectEv @ 498 NONAME
- _ZNK12QVideoWidget15aspectRatioModeEv @ 499 NONAME
- _ZNK12QVideoWidget3hueEv @ 500 NONAME
- _ZNK12QVideoWidget8contrastEv @ 501 NONAME
- _ZNK12QVideoWidget8sizeHintEv @ 502 NONAME
- _ZNK13QMediaContent12canonicalUrlEv @ 503 NONAME
- _ZNK13QMediaContent16canonicalRequestEv @ 504 NONAME
- _ZNK13QMediaContent17canonicalResourceEv @ 505 NONAME
- _ZNK13QMediaContent6isNullEv @ 506 NONAME
- _ZNK13QMediaContent9resourcesEv @ 507 NONAME
- _ZNK13QMediaContenteqERKS_ @ 508 NONAME
- _ZNK13QMediaContentneERKS_ @ 509 NONAME
- _ZNK13QMediaControl10metaObjectEv @ 510 NONAME
- _ZNK13QMediaService10metaObjectEv @ 511 NONAME
- _ZNK14QMediaPlaylist10isReadOnlyEv @ 512 NONAME
- _ZNK14QMediaPlaylist10mediaCountEv @ 513 NONAME
- _ZNK14QMediaPlaylist10metaObjectEv @ 514 NONAME
- _ZNK14QMediaPlaylist11errorStringEv @ 515 NONAME
- _ZNK14QMediaPlaylist11mediaObjectEv @ 516 NONAME
- _ZNK14QMediaPlaylist12currentIndexEv @ 517 NONAME
- _ZNK14QMediaPlaylist12currentMediaEv @ 518 NONAME
- _ZNK14QMediaPlaylist12playbackModeEv @ 519 NONAME
- _ZNK14QMediaPlaylist13previousIndexEi @ 520 NONAME
- _ZNK14QMediaPlaylist5errorEv @ 521 NONAME
- _ZNK14QMediaPlaylist5mediaEi @ 522 NONAME
- _ZNK14QMediaPlaylist7isEmptyEv @ 523 NONAME
- _ZNK14QMediaPlaylist9nextIndexEi @ 524 NONAME
- _ZNK14QMediaResource10audioCodecEv @ 525 NONAME
- _ZNK14QMediaResource10resolutionEv @ 526 NONAME
- _ZNK14QMediaResource10sampleRateEv @ 527 NONAME
- _ZNK14QMediaResource10videoCodecEv @ 528 NONAME
- _ZNK14QMediaResource12audioBitRateEv @ 529 NONAME
- _ZNK14QMediaResource12channelCountEv @ 530 NONAME
- _ZNK14QMediaResource12videoBitRateEv @ 531 NONAME
- _ZNK14QMediaResource3urlEv @ 532 NONAME
- _ZNK14QMediaResource6isNullEv @ 533 NONAME
- _ZNK14QMediaResource7requestEv @ 534 NONAME
- _ZNK14QMediaResource8dataSizeEv @ 535 NONAME
- _ZNK14QMediaResource8languageEv @ 536 NONAME
- _ZNK14QMediaResource8mimeTypeEv @ 537 NONAME
- _ZNK14QMediaResourceeqERKS_ @ 538 NONAME
- _ZNK14QMediaResourceneERKS_ @ 539 NONAME
- _ZNK15QMediaTimeRange10latestTimeEv @ 540 NONAME
- _ZNK15QMediaTimeRange12earliestTimeEv @ 541 NONAME
- _ZNK15QMediaTimeRange12isContinuousEv @ 542 NONAME
- _ZNK15QMediaTimeRange7isEmptyEv @ 543 NONAME
- _ZNK15QMediaTimeRange8containsEx @ 544 NONAME
- _ZNK15QMediaTimeRange9intervalsEv @ 545 NONAME
- _ZNK16QMetaDataControl10metaObjectEv @ 546 NONAME
- _ZNK18QGraphicsVideoItem10metaObjectEv @ 547 NONAME
- _ZNK18QGraphicsVideoItem10nativeSizeEv @ 548 NONAME
- _ZNK18QGraphicsVideoItem11mediaObjectEv @ 549 NONAME
- _ZNK18QGraphicsVideoItem12boundingRectEv @ 550 NONAME
- _ZNK18QGraphicsVideoItem15aspectRatioModeEv @ 551 NONAME
- _ZNK18QGraphicsVideoItem4sizeEv @ 552 NONAME
- _ZNK18QGraphicsVideoItem6offsetEv @ 553 NONAME
- _ZNK18QMediaTimeInterval10normalizedEv @ 554 NONAME
- _ZNK18QMediaTimeInterval10translatedEx @ 555 NONAME
- _ZNK18QMediaTimeInterval3endEv @ 556 NONAME
- _ZNK18QMediaTimeInterval5startEv @ 557 NONAME
- _ZNK18QMediaTimeInterval8containsEx @ 558 NONAME
- _ZNK18QMediaTimeInterval8isNormalEv @ 559 NONAME
- _ZNK19QMediaPlayerControl10metaObjectEv @ 560 NONAME
- _ZNK19QVideoDeviceControl10metaObjectEv @ 561 NONAME
- _ZNK19QVideoOutputControl10metaObjectEv @ 562 NONAME
- _ZNK19QVideoWidgetControl10metaObjectEv @ 563 NONAME
- _ZNK19QVideoWindowControl10metaObjectEv @ 564 NONAME
- _ZNK20QPainterVideoSurface10brightnessEv @ 565 NONAME
- _ZNK20QPainterVideoSurface10metaObjectEv @ 566 NONAME
- _ZNK20QPainterVideoSurface10saturationEv @ 567 NONAME
- _ZNK20QPainterVideoSurface17isFormatSupportedERK19QVideoSurfaceFormatPS0_ @ 568 NONAME
- _ZNK20QPainterVideoSurface21supportedPixelFormatsEN20QAbstractVideoBuffer10HandleTypeE @ 569 NONAME
- _ZNK20QPainterVideoSurface3hueEv @ 570 NONAME
- _ZNK20QPainterVideoSurface7isReadyEv @ 571 NONAME
- _ZNK20QPainterVideoSurface8contrastEv @ 572 NONAME
- _ZNK21QMediaPlaylistControl10metaObjectEv @ 573 NONAME
- _ZNK21QMediaServiceProvider10hasSupportERK10QByteArrayRK7QStringRK11QStringListi @ 574 NONAME
- _ZNK21QMediaServiceProvider10metaObjectEv @ 575 NONAME
- _ZNK21QMediaServiceProvider18supportedMimeTypesERK10QByteArrayi @ 576 NONAME
- _ZNK21QMediaServiceProvider7devicesERK10QByteArray @ 577 NONAME
- _ZNK21QVideoRendererControl10metaObjectEv @ 578 NONAME
- _ZNK22QMediaPlaylistIOPlugin10metaObjectEv @ 579 NONAME
- _ZNK22QMediaPlaylistProvider10isReadOnlyEv @ 580 NONAME
- _ZNK22QMediaPlaylistProvider10metaObjectEv @ 581 NONAME
- _ZNK23QMediaPlaylistNavigator10metaObjectEv @ 582 NONAME
- _ZNK23QMediaPlaylistNavigator11currentItemEv @ 583 NONAME
- _ZNK23QMediaPlaylistNavigator12currentIndexEv @ 584 NONAME
- _ZNK23QMediaPlaylistNavigator12playbackModeEv @ 585 NONAME
- _ZNK23QMediaPlaylistNavigator12previousItemEi @ 586 NONAME
- _ZNK23QMediaPlaylistNavigator13previousIndexEi @ 587 NONAME
- _ZNK23QMediaPlaylistNavigator6itemAtEi @ 588 NONAME
- _ZNK23QMediaPlaylistNavigator8nextItemEi @ 589 NONAME
- _ZNK23QMediaPlaylistNavigator8playlistEv @ 590 NONAME
- _ZNK23QMediaPlaylistNavigator9nextIndexEi @ 591 NONAME
- _ZNK25QMediaServiceProviderHint4typeEv @ 592 NONAME
- _ZNK25QMediaServiceProviderHint6codecsEv @ 593 NONAME
- _ZNK25QMediaServiceProviderHint6deviceEv @ 594 NONAME
- _ZNK25QMediaServiceProviderHint6isNullEv @ 595 NONAME
- _ZNK25QMediaServiceProviderHint8featuresEv @ 596 NONAME
- _ZNK25QMediaServiceProviderHint8mimeTypeEv @ 597 NONAME
- _ZNK25QMediaServiceProviderHinteqERKS_ @ 598 NONAME
- _ZNK25QMediaServiceProviderHintneERKS_ @ 599 NONAME
- _ZNK27QLocalMediaPlaylistProvider10isReadOnlyEv @ 600 NONAME
- _ZNK27QLocalMediaPlaylistProvider10mediaCountEv @ 601 NONAME
- _ZNK27QLocalMediaPlaylistProvider10metaObjectEv @ 602 NONAME
- _ZNK27QLocalMediaPlaylistProvider5mediaEi @ 603 NONAME
- _ZNK27QMediaServiceProviderPlugin10metaObjectEv @ 604 NONAME
- _ZTI12QMediaObject @ 605 NONAME
- _ZTI12QMediaPlayer @ 606 NONAME
- _ZTI12QSoundEffect @ 607 NONAME
- _ZTI12QVideoWidget @ 608 NONAME
- _ZTI13QMediaControl @ 609 NONAME
- _ZTI13QMediaService @ 610 NONAME
- _ZTI14QMediaPlaylist @ 611 NONAME
- _ZTI16QMetaDataControl @ 612 NONAME
- _ZTI18QGraphicsVideoItem @ 613 NONAME
- _ZTI19QMediaPlayerControl @ 614 NONAME
- _ZTI19QVideoDeviceControl @ 615 NONAME
- _ZTI19QVideoOutputControl @ 616 NONAME
- _ZTI19QVideoWidgetControl @ 617 NONAME
- _ZTI19QVideoWindowControl @ 618 NONAME
- _ZTI20QMediaPlaylistReader @ 619 NONAME
- _ZTI20QMediaPlaylistWriter @ 620 NONAME
- _ZTI20QPainterVideoSurface @ 621 NONAME
- _ZTI21QMediaPlaylistControl @ 622 NONAME
- _ZTI21QMediaServiceProvider @ 623 NONAME
- _ZTI21QVideoRendererControl @ 624 NONAME
- _ZTI22QMediaPlaylistIOPlugin @ 625 NONAME
- _ZTI22QMediaPlaylistProvider @ 626 NONAME
- _ZTI23QMediaPlaylistNavigator @ 627 NONAME
- _ZTI25QMediaPlaylistIOInterface @ 628 NONAME
- _ZTI27QLocalMediaPlaylistProvider @ 629 NONAME
- _ZTI27QMediaServiceProviderPlugin @ 630 NONAME
- _ZTI37QMediaServiceProviderFactoryInterface @ 631 NONAME
- _ZTV12QMediaObject @ 632 NONAME
- _ZTV12QMediaPlayer @ 633 NONAME
- _ZTV12QSoundEffect @ 634 NONAME
- _ZTV12QVideoWidget @ 635 NONAME
- _ZTV13QMediaControl @ 636 NONAME
- _ZTV13QMediaService @ 637 NONAME
- _ZTV14QMediaPlaylist @ 638 NONAME
- _ZTV16QMetaDataControl @ 639 NONAME
- _ZTV18QGraphicsVideoItem @ 640 NONAME
- _ZTV19QMediaPlayerControl @ 641 NONAME
- _ZTV19QVideoDeviceControl @ 642 NONAME
- _ZTV19QVideoOutputControl @ 643 NONAME
- _ZTV19QVideoWidgetControl @ 644 NONAME
- _ZTV19QVideoWindowControl @ 645 NONAME
- _ZTV20QMediaPlaylistReader @ 646 NONAME
- _ZTV20QMediaPlaylistWriter @ 647 NONAME
- _ZTV20QPainterVideoSurface @ 648 NONAME
- _ZTV21QMediaPlaylistControl @ 649 NONAME
- _ZTV21QMediaServiceProvider @ 650 NONAME
- _ZTV21QVideoRendererControl @ 651 NONAME
- _ZTV22QMediaPlaylistIOPlugin @ 652 NONAME
- _ZTV22QMediaPlaylistProvider @ 653 NONAME
- _ZTV23QMediaPlaylistNavigator @ 654 NONAME
- _ZTV27QLocalMediaPlaylistProvider @ 655 NONAME
- _ZTV27QMediaServiceProviderPlugin @ 656 NONAME
- _ZThn8_N12QVideoWidgetD0Ev @ 657 NONAME
- _ZThn8_N12QVideoWidgetD1Ev @ 658 NONAME
- _ZThn8_N18QGraphicsVideoItem10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 659 NONAME
- _ZThn8_N18QGraphicsVideoItem10sceneEventEP6QEvent @ 660 NONAME
- _ZThn8_N18QGraphicsVideoItem5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 661 NONAME
- _ZThn8_N18QGraphicsVideoItemD0Ev @ 662 NONAME
- _ZThn8_N18QGraphicsVideoItemD1Ev @ 663 NONAME
- _ZThn8_N22QMediaPlaylistIOPluginD0Ev @ 664 NONAME
- _ZThn8_N22QMediaPlaylistIOPluginD1Ev @ 665 NONAME
- _ZThn8_NK18QGraphicsVideoItem12boundingRectEv @ 666 NONAME
- _ZeqRK15QMediaTimeRangeS1_ @ 667 NONAME
- _ZeqRK18QMediaTimeIntervalS1_ @ 668 NONAME
- _ZmiRK15QMediaTimeRangeS1_ @ 669 NONAME
- _ZneRK15QMediaTimeRangeS1_ @ 670 NONAME
- _ZneRK18QMediaTimeIntervalS1_ @ 671 NONAME
- _ZplRK15QMediaTimeRangeS1_ @ 672 NONAME
-
diff --git a/src/s60installs/eabi/QtNetworku.def b/src/s60installs/eabi/QtNetworku.def
index 2566415..87e0805 100644
--- a/src/s60installs/eabi/QtNetworku.def
+++ b/src/s60installs/eabi/QtNetworku.def
@@ -1167,4 +1167,5 @@ EXPORTS
_ZNK13QBearerEngine19configurationsInUseEv @ 1166 NONAME
_ZNK21QNetworkAccessManager17networkAccessibleEv @ 1167 NONAME
_ZN35QNetworkConfigurationManagerPrivate12capabilitiesEv @ 1168 NONAME
+ _ZN10QTcpServer20addPendingConnectionEP10QTcpSocket @ 1169 NONAME
diff --git a/src/s60installs/eabi/QtOpenVGu.def b/src/s60installs/eabi/QtOpenVGu.def
index 5db9dce..04f7876 100644
--- a/src/s60installs/eabi/QtOpenVGu.def
+++ b/src/s60installs/eabi/QtOpenVGu.def
@@ -196,7 +196,7 @@ EXPORTS
_ZN13QVGPixmapData19detachImageFromPoolEv @ 195 NONAME
_ZTI12QVGImagePool @ 196 NONAME
_ZTV12QVGImagePool @ 197 NONAME
- _ZN14QVGPaintEngine16drawCachedGlyphsEiPKjRK5QFontP11QFontEngineRK7QPointF @ 198 NONAME
+ _ZN14QVGPaintEngine16drawCachedGlyphsEiPKjRK5QFontP11QFontEngineRK7QPointF @ 198 NONAME ABSENT
_ZN14QVGPaintEngine18drawStaticTextItemEP15QStaticTextItem @ 199 NONAME
_ZN14QVGPaintEngine19drawPixmapFragmentsEPKN8QPainter14PixmapFragmentEiRK7QPixmap6QFlagsINS0_18PixmapFragmentHintEE @ 200 NONAME
_ZN25QVGEGLWindowSurfaceDirect6scrollEP7QWidgetRK7QRegionii @ 201 NONAME
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index dfd2694..90c362b 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -151,20 +151,10 @@ symbian: {
graphicssystems_plugins.sources += $$QT_BUILD_TREE/plugins/graphicssystems/qvggraphicssystem$${QT_LIBINFIX}.dll
}
- contains(QT_CONFIG, multimedia):contains(QT_CONFIG, mediaservices):contains(QT_CONFIG, media-backend) {
+ contains(QT_CONFIG, multimedia){
qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtMultimedia$${QT_LIBINFIX}.dll
}
- contains(QT_CONFIG, media-backend) {
- qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtMediaServices$${QT_LIBINFIX}.dll
-
- mediaservices_plugins.path = c:$$QT_PLUGINS_BASE_DIR/mediaservices
- mediaservices_plugins.sources += $$QT_BUILD_TREE/plugins/mediaservices/qmmfengine$${QT_LIBINFIX}.dll
-
- DEPLOYMENT += mediaservices_plugins
-
- }
-
BLD_INF_RULES.prj_exports += "qt.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qt.iby)"
BLD_INF_RULES.prj_exports += "qtdemoapps.iby $$CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH(qtdemoapps.iby)"
}
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 014889b..4c92246 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -294,9 +294,20 @@ QT_BEGIN_NAMESPACE
This enum specifies the ownership when wrapping a C++ value, e.g. by using newQObject().
- \value QtOwnership The standard Qt ownership rules apply, i.e. the associated object will never be explicitly deleted by the script engine. This is the default. (QObject ownership is explained in \l{Object Trees and Object Ownership}.)
- \value ScriptOwnership The value is owned by the script environment. The associated data will be deleted when appropriate (i.e. after the garbage collector has discovered that there are no more live references to the value).
- \value AutoOwnership If the associated object has a parent, the Qt ownership rules apply (QtOwnership); otherwise, the object is owned by the script environment (ScriptOwnership).
+ \value QtOwnership The standard Qt ownership rules apply, i.e. the
+ associated object will never be explicitly deleted by the script
+ engine. This is the default. (QObject ownership is explained in
+ \l{Object Trees & Ownership}.)
+
+ \value ScriptOwnership The value is owned by the script
+ environment. The associated data will be deleted when appropriate
+ (i.e. after the garbage collector has discovered that there are no
+ more live references to the value).
+
+ \value AutoOwnership If the associated object has a parent, the Qt
+ ownership rules apply (QtOwnership); otherwise, the object is
+ owned by the script environment (ScriptOwnership).
+
*/
/*!
diff --git a/src/src.pro b/src/src.pro
index 9c4831c..7574796 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -17,7 +17,6 @@ contains(QT_CONFIG, openvg): SRC_SUBDIRS += src_openvg
contains(QT_CONFIG, xmlpatterns): SRC_SUBDIRS += src_xmlpatterns
contains(QT_CONFIG, phonon): SRC_SUBDIRS += src_phonon
contains(QT_CONFIG, multimedia): SRC_SUBDIRS += src_multimedia
-contains(QT_CONFIG, mediaservices): SRC_SUBDIRS += src_mediaservices
contains(QT_CONFIG, svg): SRC_SUBDIRS += src_svg
contains(QT_CONFIG, webkit) {
exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): SRC_SUBDIRS += src_javascriptcore
@@ -67,10 +66,8 @@ src_qt3support.subdir = $$QT_SOURCE_TREE/src/qt3support
src_qt3support.target = sub-qt3support
src_phonon.subdir = $$QT_SOURCE_TREE/src/phonon
src_phonon.target = sub-phonon
-src_multimedia.subdir = $$QT_SOURCE_TREE/src/multimedia/multimedia
+src_multimedia.subdir = $$QT_SOURCE_TREE/src/multimedia
src_multimedia.target = sub-multimedia
-src_mediaservices.subdir = $$QT_SOURCE_TREE/src/multimedia/mediaservices
-src_mediaservices.target = sub-mediaservices
src_activeqt.subdir = $$QT_SOURCE_TREE/src/activeqt
src_activeqt.target = sub-activeqt
src_plugins.subdir = $$QT_SOURCE_TREE/src/plugins
@@ -94,7 +91,7 @@ src_declarative.target = sub-declarative
src_xml.depends = src_corelib
src_xmlpatterns.depends = src_corelib src_network
src_dbus.depends = src_corelib src_xml
- src_svg.depends = src_xml src_gui
+ src_svg.depends = src_corelib src_gui
src_script.depends = src_corelib
src_scripttools.depends = src_script src_gui src_network
src_network.depends = src_corelib
@@ -108,17 +105,14 @@ src_declarative.target = sub-declarative
src_phonon.depends = src_gui
src_multimedia.depends = src_gui
contains(QT_CONFIG, opengl):src_multimedia.depends += src_opengl
- src_mediaservices.depends = src_multimedia
src_tools_activeqt.depends = src_tools_idc src_gui
- src_declarative.depends = src_xml src_gui src_script src_network src_svg
+ src_declarative.depends = src_gui src_script src_network
src_plugins.depends = src_gui src_sql src_svg src_multimedia
src_s60installs.depends = $$TOOLS_SUBDIRS $$SRC_SUBDIRS
src_imports.depends = src_gui src_declarative
contains(QT_CONFIG, webkit) {
- src_webkit.depends = src_gui src_sql src_network src_xml
- contains(QT_CONFIG, mediaservices):src_webkit.depends += src_mediaservices
+ src_webkit.depends = src_gui src_sql src_network
contains(QT_CONFIG, xmlpatterns): src_webkit.depends += src_xmlpatterns
- contains(QT_CONFIG, declarative):src_declarative.depends += src_webkit
src_imports.depends += src_webkit
exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): src_webkit.depends += src_javascriptcore
}
@@ -127,7 +121,18 @@ src_declarative.target = sub-declarative
src_plugins.depends += src_dbus
src_phonon.depends += src_dbus
}
- contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): src_plugins.depends += src_opengl
+ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) {
+ src_plugins.depends += src_opengl
+ src_declarative.depends += src_opengl
+ src_webkit.depends += src_opengl
+ }
+ contains(QT_CONFIG, xmlpatterns) {
+ src_declarative.depends += src_xmlpatterns
+ src_webkit.depends += src_xmlpatterns
+ }
+ contains(QT_CONFIG, svg) {
+ src_declarative.depends += src_svg
+ }
}
diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp
index 46431a8..1a0e737 100644
--- a/src/testlib/qplaintestlogger.cpp
+++ b/src/testlib/qplaintestlogger.cpp
@@ -182,6 +182,7 @@ namespace QTest {
hbuffer->Des().Copy(ptr.Mid(i, size));
RDebug::Print(format, hbuffer);
}
+ delete hbuffer;
}
else {
// fast, no allocations, but truncates silently
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 0000000..b203473
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1,6 @@
+QObject.log
+tst_*
+!tst_*.*
+tst_*.log
+tst_*.debug
+tst_*~
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 12ebc75..c0004f7 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -16,7 +16,6 @@ unix:!embedded:contains(QT_CONFIG, dbus): SUBDIRS += dbus.pro
contains(QT_CONFIG, script): SUBDIRS += script.pro
contains(QT_CONFIG, webkit): SUBDIRS += webkit.pro
contains(QT_CONFIG, multimedia): SUBDIRS += multimedia.pro
-contains(QT_CONFIG, mediaservices): SUBDIRS += mediaservices.pro
contains(QT_CONFIG, phonon): SUBDIRS += phonon.pro
contains(QT_CONFIG, svg): SUBDIRS += svg.pro
contains(QT_CONFIG, declarative): SUBDIRS += declarative.pro
diff --git a/tests/auto/bic/tst_bic.cpp b/tests/auto/bic/tst_bic.cpp
index 010965c..400fcc1 100644
--- a/tests/auto/bic/tst_bic.cpp
+++ b/tests/auto/bic/tst_bic.cpp
@@ -191,7 +191,7 @@ void tst_Bic::sizesAndVTables_data()
#elif defined Q_OS_MAC && defined(__i386__)
# define FILESUFFIX "macx-gcc-ia32"
#elif defined Q_OS_MAC && defined(__amd64__)
-# define FILESUFFIX "macx-gcc-amd64";
+# define FILESUFFIX "macx-gcc-amd64"
#elif defined Q_OS_WIN && defined Q_CC_GNU
# define FILESUFFIX "win32-gcc-ia32"
#else
diff --git a/tests/auto/compilerwarnings/tst_compilerwarnings.cpp b/tests/auto/compilerwarnings/tst_compilerwarnings.cpp
index f910a18..82c327a 100644
--- a/tests/auto/compilerwarnings/tst_compilerwarnings.cpp
+++ b/tests/auto/compilerwarnings/tst_compilerwarnings.cpp
@@ -62,6 +62,9 @@ class tst_CompilerWarnings: public QObject
private slots:
void warnings_data();
void warnings();
+
+private:
+ bool shouldIgnoreWarning(QString const&);
};
#if 0
@@ -242,16 +245,37 @@ void tst_CompilerWarnings::warnings()
if (!errs.isEmpty()) {
errList = errs.split("\n");
qDebug() << "Arguments:" << args;
- foreach (QString err, errList) {
- qDebug() << err;
+ QStringList validErrors;
+ foreach (QString const& err, errList) {
+ bool ignore = shouldIgnoreWarning(err);
+ qDebug() << err << (ignore ? " [ignored]" : "");
+ if (!ignore) {
+ validErrors << err;
+ }
}
+ errList = validErrors;
}
QCOMPARE(errList.count(), 0); // verbose info how many lines of errors in output
- QVERIFY(errs.isEmpty());
tmpQSourceFile.remove();
}
+bool tst_CompilerWarnings::shouldIgnoreWarning(QString const& warning)
+{
+ if (warning.isEmpty()) {
+ return true;
+ }
+
+ // icecc outputs warnings if some icecc node breaks
+ if (warning.startsWith("ICECC[")) {
+ return true;
+ }
+
+ // Add more bogus warnings here
+
+ return false;
+}
+
QTEST_APPLESS_MAIN(tst_CompilerWarnings)
#include "tst_compilerwarnings.moc"
diff --git a/tests/auto/dbus.pro b/tests/auto/dbus.pro
index 1c808df..e5f87e3 100644
--- a/tests/auto/dbus.pro
+++ b/tests/auto/dbus.pro
@@ -13,7 +13,6 @@ SUBDIRS=\
qdbuspendingreply \
qdbusperformance \
qdbusreply \
- qdbusserver \
qdbusservicewatcher \
qdbusthreading \
qdbusxmlparser \
diff --git a/tests/auto/declarative/.gitignore b/tests/auto/declarative/.gitignore
deleted file mode 100644
index 57608cf..0000000
--- a/tests/auto/declarative/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-tst_*
-!tst_*.*
-tst_*.log
-tst_*.debug
-tst_*~
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index 9b3b3d0..4bb3518 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -1,77 +1,80 @@
TEMPLATE = subdirs
+!symbian: {
SUBDIRS += \
examples \
- graphicswidgets \ # Cover
- parserstress \ # Cover
- qmetaobjectbuilder \ # Cover
- qdeclarativeanimations \ # Cover
- qdeclarativebehaviors \ # Cover
- qdeclarativebinding \ # Cover
- qdeclarativecomponent \ # Cover
- qdeclarativeconnection \ # Cover
- qdeclarativecontext \ # Cover
- qdeclarativedebug \ # Cover
- qdeclarativedebugclient \ # Cover
- qdeclarativedebugservice \ # Cover
- qdeclarativedom \ # Cover
- qdeclarativeecmascript \ # Cover
- qdeclarativeengine \ # Cover
- qdeclarativeerror \ # Cover
- qdeclarativefontloader \ # Cover
- qdeclarativeanchors \ # Cover
- qdeclarativeanimatedimage \ # Cover
- qdeclarativeimage \ # Cover
- qdeclarativeborderimage \ # Cover
- qdeclarativeflickable \ # Cover
- qdeclarativeflipable \ # Cover
- qdeclarativefocusscope \ # Cover
- qdeclarativegridview \ # Cover
- qdeclarativeitem \ # Cover
- qdeclarativelistview \ # Cover
- qdeclarativeloader \ # Cover
- qdeclarativelayouts \ # Cover
- qdeclarativemousearea \ # Cover
- qdeclarativeparticles \ # Cover
- qdeclarativepathview \ # Cover
- qdeclarativepositioners \ # Cover
- qdeclarativetext \ # Cover
- qdeclarativetextedit \ # Cover
- qdeclarativetextinput \ # Cover
- qdeclarativeinfo \ # Cover
- qdeclarativeinstruction \ # Cover
- qdeclarativelanguage \ # Cover
- qdeclarativelistreference \ # Cover
- qdeclarativelistmodel \ # Cover
- qdeclarativeproperty \ # Cover
- qdeclarativemetatype \ # Cover
- qdeclarativemoduleplugin \ # Cover
- qdeclarativepixmapcache \ # Cover
- qdeclarativepropertymap \ # Cover
- qdeclarativeqt \ # Cover
- qdeclarativesmoothedanimation \ # Cover
- qdeclarativesmoothedfollow\ # Cover
- qdeclarativespringfollow \ # Cover
- qdeclarativestates \ # Cover
- qdeclarativesystempalette \ # Cover
- qdeclarativetimer \ # Cover
- qdeclarativexmllistmodel \ # Cover
- qpacketprotocol \ # Cover
- qdeclarativerepeater \ # Cover
- qdeclarativeworkerscript \ # Cover
- qdeclarativevaluetypes \ # Cover
- qdeclarativeview \ # Cover
- qdeclarativexmlhttprequest \ # Cover
- qdeclarativeimageprovider \ # Cover
- qdeclarativestyledtext \ # Cover
- qdeclarativesqldatabase \ # Cover
- qdeclarativevisualdatamodel \ # Cover
- qmlvisual # Cover
+ qdeclarativemetatype \
+ qmetaobjectbuilder
+}
+
+SUBDIRS += \
+ parserstress \
+ qdeclarativeanchors \
+ qdeclarativeanimatedimage \
+ qdeclarativeanimations \
+ qdeclarativebehaviors \
+ qdeclarativebinding \
+ qdeclarativeborderimage \
+ qdeclarativecomponent \
+ qdeclarativeconnection \
+ qdeclarativecontext \
+ qdeclarativedebug \
+ qdeclarativedebugclient \
+ qdeclarativedebugservice \
+ qdeclarativedom \
+ qdeclarativeecmascript \
+ qdeclarativeengine \
+ qdeclarativeerror \
+ qdeclarativefontloader \
+ qdeclarativeflickable \
+ qdeclarativeflipable \
+ qdeclarativefocusscope \
+ qdeclarativegridview \
+ qdeclarativeimage \
+ qdeclarativeimageprovider \
+ qdeclarativeinfo \
+ qdeclarativeinstruction \
+ qdeclarativeitem \
+ qdeclarativelanguage \
+ qdeclarativelayoutitem \
+ qdeclarativelistmodel \
+ qdeclarativelistreference \
+ qdeclarativelistview \
+ qdeclarativeloader \
+ qdeclarativemoduleplugin \
+ qdeclarativemousearea \
+ qdeclarativeparticles \
+ qdeclarativepathview \
+ qdeclarativepixmapcache \
+ qdeclarativepositioners \
+ qdeclarativeproperty \
+ qdeclarativepropertymap \
+ qdeclarativeqt \
+ qdeclarativerepeater \
+ qdeclarativesmoothedanimation \
+ qdeclarativesmoothedfollow\
+ qdeclarativespringfollow \
+ qdeclarativesqldatabase \
+ qdeclarativestates \
+ qdeclarativestyledtext \
+ qdeclarativesystempalette \
+ qdeclarativetext \
+ qdeclarativetextedit \
+ qdeclarativetextinput \
+ qdeclarativetimer \
+ qdeclarativevaluetypes \
+ qdeclarativeview \
+ qdeclarativeviewer \
+ qdeclarativevisualdatamodel \
+ qdeclarativeworkerscript \
+ qdeclarativexmlhttprequest \
+ qdeclarativexmllistmodel \
+ qmlvisual \
+ qpacketprotocol
contains(QT_CONFIG, webkit) {
SUBDIRS += \
- qdeclarativewebview # Cover
+ qdeclarativewebview
}
# Tests which should run in Pulse
PULSE_TESTS = $$SUBDIRS
-
diff --git a/tests/auto/declarative/examples/examples.pro b/tests/auto/declarative/examples/examples.pro
index 4c32524..92a16f1 100644
--- a/tests/auto/declarative/examples/examples.pro
+++ b/tests/auto/declarative/examples/examples.pro
@@ -6,7 +6,14 @@ SOURCES += tst_examples.cpp
include(../../../../tools/qml/qml.pri)
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp
index 16b0cbe..605345e 100644
--- a/tests/auto/declarative/examples/tst_examples.cpp
+++ b/tests/auto/declarative/examples/tst_examples.cpp
@@ -80,22 +80,14 @@ tst_examples::tst_examples()
// Add directories you want excluded here
- excludedDirs << "examples/declarative/extending";
- excludedDirs << "examples/declarative/tutorials/extending";
- excludedDirs << "examples/declarative/plugins";
- excludedDirs << "examples/declarative/proxywidgets";
- excludedDirs << "examples/declarative/gestures";
-
- excludedDirs << "examples/declarative/imageprovider";
- excludedDirs << "demos/declarative/minehunt";
#ifdef QT_NO_WEBKIT
- excludedDirs << "examples/declarative/webview";
+ excludedDirs << "examples/declarative/modelviews/webview";
excludedDirs << "demos/declarative/webbrowser";
#endif
#ifdef QT_NO_XMLPATTERNS
- excludedDirs << "examples/declarative/xmldata";
+ excludedDirs << "examples/declarative/xml/xmldata";
excludedDirs << "demos/declarative/twitter";
excludedDirs << "demos/declarative/flickr";
excludedDirs << "demos/declarative/photoviewer";
@@ -157,11 +149,14 @@ QStringList tst_examples::findQmlFiles(const QDir &d)
QStringList rv;
- QStringList files = d.entryList(QStringList() << QLatin1String("*.qml"),
- QDir::Files);
- foreach (const QString &file, files) {
- if (file.at(0).isLower()) {
- rv << d.absoluteFilePath(file);
+ QStringList cppfiles = d.entryList(QStringList() << QLatin1String("*.cpp"), QDir::Files);
+ if (cppfiles.isEmpty()) {
+ QStringList files = d.entryList(QStringList() << QLatin1String("*.qml"),
+ QDir::Files);
+ foreach (const QString &file, files) {
+ if (file.at(0).isLower()) {
+ rv << d.absoluteFilePath(file);
+ }
}
}
diff --git a/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml b/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml
deleted file mode 100644
index d6cf4de..0000000
--- a/tests/auto/declarative/graphicswidgets/data/graphicswidgets.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-import Qt 4.7
-import Qt.widgets 4.7
-
-QGraphicsWidget {
- geometry: "20,0,600x400"
- layout: QGraphicsLinearLayout {
- orientation: Qt.Horizontal
- QGraphicsWidget {
- layout: QGraphicsLinearLayout {
- spacing: 10; orientation: Qt.Vertical
- LayoutItem {
- QGraphicsLinearLayout.stretchFactor: 1
- QGraphicsLinearLayout.spacing: 1
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "yellow"; anchors.fill: parent }
- }
- LayoutItem {
- QGraphicsLinearLayout.stretchFactor: 10
- QGraphicsLinearLayout.spacing: 10
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "blue"; anchors.fill: parent }
- }
- }
- }
- QGraphicsWidget {
- layout: QGraphicsLinearLayout {
- spacing: 10; orientation: Qt.Horizontal; contentsMargin: 10
- LayoutItem {
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "red"; anchors.fill: parent }
- }
- LayoutItem {
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "green"; anchors.fill: parent }
- }
- }
- }
- }
-}
-
diff --git a/tests/auto/declarative/graphicswidgets/graphicswidgets.pro b/tests/auto/declarative/graphicswidgets/graphicswidgets.pro
deleted file mode 100644
index b77b430..0000000
--- a/tests/auto/declarative/graphicswidgets/graphicswidgets.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-load(qttest_p4)
-contains(QT_CONFIG,declarative): QT += declarative gui
-macx:CONFIG -= app_bundle
-
-SOURCES += tst_graphicswidgets.cpp
-
-# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
-
-CONFIG += parallel_test
diff --git a/tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp b/tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp
deleted file mode 100644
index f1a71d5..0000000
--- a/tests/auto/declarative/graphicswidgets/tst_graphicswidgets.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <qtest.h>
-#include <QFile>
-#include <QtDeclarative/qdeclarativeengine.h>
-#include <QtDeclarative/qdeclarativecomponent.h>
-#include <QtGui/qgraphicswidget.h>
-
-class tst_graphicswidgets : public QObject
-
-{
- Q_OBJECT
-public:
- tst_graphicswidgets();
-
-private slots:
- void widgets();
-};
-
-tst_graphicswidgets::tst_graphicswidgets()
-{
-}
-
-void tst_graphicswidgets::widgets()
-{
- QDeclarativeEngine engine;
- QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/graphicswidgets.qml"));
- QGraphicsWidget *obj = qobject_cast<QGraphicsWidget*>(c.create());
-
- QVERIFY(obj != 0);
- delete obj;
-}
-
-QTEST_MAIN(tst_graphicswidgets)
-
-#include "tst_graphicswidgets.moc"
diff --git a/tests/auto/declarative/parserstress/parserstress.pro b/tests/auto/declarative/parserstress/parserstress.pro
index 8830511..a95a855 100644
--- a/tests/auto/declarative/parserstress/parserstress.pro
+++ b/tests/auto/declarative/parserstress/parserstress.pro
@@ -4,7 +4,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_parserstress.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = ..\..\qscriptjstestsuite\tests
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/parserstress/tst_parserstress.cpp b/tests/auto/declarative/parserstress/tst_parserstress.cpp
index 294f2f7..c86908b 100644
--- a/tests/auto/declarative/parserstress/tst_parserstress.cpp
+++ b/tests/auto/declarative/parserstress/tst_parserstress.cpp
@@ -86,12 +86,15 @@ QStringList tst_parserstress::findJSFiles(const QDir &d)
void tst_parserstress::ecmascript_data()
{
+#ifdef Q_OS_SYMBIAN
+ QDir dir("tests");
+#else
QDir dir(SRCDIR);
dir.cdUp();
dir.cdUp();
dir.cd("qscriptjstestsuite");
dir.cd("tests");
-
+#endif
QStringList files = findJSFiles(dir);
QTest::addColumn<QString>("file");
@@ -129,6 +132,7 @@ void tst_parserstress::ecmascript()
QByteArray qmlData = qml.toUtf8();
QDeclarativeComponent component(&engine);
+
component.setData(qmlData, QUrl::fromLocalFile(SRCDIR + QString("/dummy.qml")));
QFileInfo info(file);
diff --git a/tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml b/tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml
index 91973a3..d430c2c 100644
--- a/tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml
+++ b/tests/auto/declarative/qdeclarativeanchors/data/anchorsqgraphicswidget.qml
@@ -1,5 +1,4 @@
import Qt 4.7
-import Qt.widgets 4.7
Rectangle {
color: "white"
diff --git a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
index a2403f2..452ad55 100644
--- a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
+++ b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro
@@ -3,7 +3,14 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativeanchors.cpp
macx:CONFIG -= app_bundle
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
index dff62c7..e169fa2 100644
--- a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
+++ b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp
@@ -48,6 +48,7 @@
#include <private/qdeclarativerectangle_p.h>
#include <private/qdeclarativetext_p.h>
#include <QtDeclarative/private/qdeclarativeanchors_p_p.h>
+#include <QtDeclarative/private/qdeclarativeitem_p.h>
Q_DECLARE_METATYPE(QDeclarativeAnchors::Anchor)
Q_DECLARE_METATYPE(QDeclarativeAnchorLine::AnchorLine)
@@ -376,15 +377,16 @@ void tst_qdeclarativeanchors::reset()
anchor.anchorLine = anchorLine;
QDeclarativeItem *item = new QDeclarativeItem;
+ QDeclarativeItemPrivate *itemPrivate = QDeclarativeItemPrivate::get(item);
- const QMetaObject *meta = item->anchors()->metaObject();
+ const QMetaObject *meta = itemPrivate->anchors()->metaObject();
QMetaProperty p = meta->property(meta->indexOfProperty(side.toUtf8().constData()));
- QVERIFY(p.write(item->anchors(), qVariantFromValue(anchor)));
- QCOMPARE(item->anchors()->usedAnchors().testFlag(usedAnchor), true);
+ QVERIFY(p.write(itemPrivate->anchors(), qVariantFromValue(anchor)));
+ QCOMPARE(itemPrivate->anchors()->usedAnchors().testFlag(usedAnchor), true);
- QVERIFY(p.reset(item->anchors()));
- QCOMPARE(item->anchors()->usedAnchors().testFlag(usedAnchor), false);
+ QVERIFY(p.reset(itemPrivate->anchors()));
+ QCOMPARE(itemPrivate->anchors()->usedAnchors().testFlag(usedAnchor), false);
delete item;
delete baseItem;
@@ -410,18 +412,19 @@ void tst_qdeclarativeanchors::resetConvenience()
{
QDeclarativeItem *baseItem = new QDeclarativeItem;
QDeclarativeItem *item = new QDeclarativeItem;
+ QDeclarativeItemPrivate *itemPrivate = QDeclarativeItemPrivate::get(item);
//fill
- item->anchors()->setFill(baseItem);
- QVERIFY(item->anchors()->fill() == baseItem);
- item->anchors()->resetFill();
- QVERIFY(item->anchors()->fill() == 0);
+ itemPrivate->anchors()->setFill(baseItem);
+ QVERIFY(itemPrivate->anchors()->fill() == baseItem);
+ itemPrivate->anchors()->resetFill();
+ QVERIFY(itemPrivate->anchors()->fill() == 0);
//centerIn
- item->anchors()->setCenterIn(baseItem);
- QVERIFY(item->anchors()->centerIn() == baseItem);
- item->anchors()->resetCenterIn();
- QVERIFY(item->anchors()->centerIn() == 0);
+ itemPrivate->anchors()->setCenterIn(baseItem);
+ QVERIFY(itemPrivate->anchors()->centerIn() == baseItem);
+ itemPrivate->anchors()->resetCenterIn();
+ QVERIFY(itemPrivate->anchors()->centerIn() == 0);
delete item;
delete baseItem;
@@ -433,12 +436,13 @@ void tst_qdeclarativeanchors::nullItem()
QDeclarativeAnchorLine anchor;
QDeclarativeItem *item = new QDeclarativeItem;
+ QDeclarativeItemPrivate *itemPrivate = QDeclarativeItemPrivate::get(item);
- const QMetaObject *meta = item->anchors()->metaObject();
+ const QMetaObject *meta = itemPrivate->anchors()->metaObject();
QMetaProperty p = meta->property(meta->indexOfProperty(side.toUtf8().constData()));
QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML Item: Cannot anchor to a null item.");
- QVERIFY(p.write(item->anchors(), qVariantFromValue(anchor)));
+ QVERIFY(p.write(itemPrivate->anchors(), qVariantFromValue(anchor)));
delete item;
}
@@ -486,15 +490,16 @@ void tst_qdeclarativeanchors::fill()
qApp->processEvents();
QDeclarativeRectangle* rect = findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("filler"));
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QCOMPARE(rect->x(), 0.0 + 10.0);
QCOMPARE(rect->y(), 0.0 + 30.0);
QCOMPARE(rect->width(), 200.0 - 10.0 - 20.0);
QCOMPARE(rect->height(), 200.0 - 30.0 - 40.0);
//Alter Offsets (tests QTBUG-6631)
- rect->anchors()->setLeftMargin(20.0);
- rect->anchors()->setRightMargin(0.0);
- rect->anchors()->setBottomMargin(0.0);
- rect->anchors()->setTopMargin(10.0);
+ rectPrivate->anchors()->setLeftMargin(20.0);
+ rectPrivate->anchors()->setRightMargin(0.0);
+ rectPrivate->anchors()->setBottomMargin(0.0);
+ rectPrivate->anchors()->setTopMargin(10.0);
QCOMPARE(rect->x(), 0.0 + 20.0);
QCOMPARE(rect->y(), 0.0 + 10.0);
QCOMPARE(rect->width(), 200.0 - 20.0);
@@ -509,11 +514,12 @@ void tst_qdeclarativeanchors::centerIn()
qApp->processEvents();
QDeclarativeRectangle* rect = findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("centered"));
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QCOMPARE(rect->x(), 75.0 + 10);
QCOMPARE(rect->y(), 75.0 + 30);
//Alter Offsets (tests QTBUG-6631)
- rect->anchors()->setHorizontalCenterOffset(-20.0);
- rect->anchors()->setVerticalCenterOffset(-10.0);
+ rectPrivate->anchors()->setHorizontalCenterOffset(-20.0);
+ rectPrivate->anchors()->setVerticalCenterOffset(-10.0);
QCOMPARE(rect->x(), 75.0 - 20.0);
QCOMPARE(rect->y(), 75.0 - 10.0);
@@ -526,13 +532,14 @@ void tst_qdeclarativeanchors::margins()
qApp->processEvents();
QDeclarativeRectangle* rect = findItem<QDeclarativeRectangle>(view->rootObject(), QLatin1String("filler"));
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QCOMPARE(rect->x(), 5.0);
QCOMPARE(rect->y(), 6.0);
QCOMPARE(rect->width(), 200.0 - 5.0 - 10.0);
QCOMPARE(rect->height(), 200.0 - 6.0 - 10.0);
- rect->anchors()->setTopMargin(0.0);
- rect->anchors()->setMargins(20.0);
+ rectPrivate->anchors()->setTopMargin(0.0);
+ rectPrivate->anchors()->setMargins(20.0);
QCOMPARE(rect->x(), 5.0);
QCOMPARE(rect->y(), 20.0);
diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
index 74f9be0..7213abd 100644
--- a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
+++ b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro
@@ -4,7 +4,14 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativeanimatedimage.cpp ../shared/testhttpserver.cpp
macx:CONFIG -= app_bundle
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
index ce38eeb..f7ed371 100644
--- a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
+++ b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro
@@ -3,7 +3,14 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativeanimations.cpp
macx:CONFIG -= app_bundle
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
index e217e34..ed7e506 100644
--- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
+++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
@@ -44,6 +44,7 @@
#include <QtDeclarative/qdeclarativeview.h>
#include <private/qdeclarativerectangle_p.h>
#include <private/qdeclarativeanimation_p.h>
+#include <private/qdeclarativeitem_p.h>
#include <QVariantAnimation>
#include <QEasingCurve>
@@ -324,7 +325,7 @@ void tst_qdeclarativeanimations::badTypes()
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QVERIFY(rect);
- rect->setState("state1");
+ QDeclarativeItemPrivate::get(rect)->setState("state1");
QTest::qWait(1000 + 50);
QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("MyRect");
QVERIFY(myRect);
@@ -366,7 +367,7 @@ void tst_qdeclarativeanimations::mixedTypes()
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QVERIFY(rect);
- rect->setState("state1");
+ QDeclarativeItemPrivate::get(rect)->setState("state1");
QTest::qWait(500);
QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("MyRect");
QVERIFY(myRect);
@@ -382,7 +383,7 @@ void tst_qdeclarativeanimations::mixedTypes()
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QVERIFY(rect);
- rect->setState("state1");
+ QDeclarativeItemPrivate::get(rect)->setState("state1");
QTest::qWait(500);
QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("MyRect");
QVERIFY(myRect);
@@ -468,7 +469,7 @@ void tst_qdeclarativeanimations::propertiesTransition()
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QVERIFY(rect);
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
QVERIFY(myRect);
QTest::qWait(waitDuration);
@@ -483,7 +484,7 @@ void tst_qdeclarativeanimations::propertiesTransition()
QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
QVERIFY(myRect);
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
QCOMPARE(myRect->x(),qreal(200));
QCOMPARE(myRect->y(),qreal(100));
QTest::qWait(waitDuration);
@@ -498,7 +499,7 @@ void tst_qdeclarativeanimations::propertiesTransition()
QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
QVERIFY(myRect);
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
QCOMPARE(myRect->x(),qreal(200));
QCOMPARE(myRect->y(),qreal(100));
}
@@ -511,7 +512,7 @@ void tst_qdeclarativeanimations::propertiesTransition()
QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
QVERIFY(myRect);
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
QCOMPARE(myRect->x(),qreal(100));
QTest::qWait(waitDuration);
QTIMED_COMPARE(myRect->x(),qreal(200));
@@ -525,7 +526,7 @@ void tst_qdeclarativeanimations::propertiesTransition()
QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
QVERIFY(myRect);
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
QCOMPARE(myRect->x(),qreal(100));
QTest::qWait(waitDuration);
QTIMED_COMPARE(myRect->x(),qreal(200));
@@ -539,7 +540,7 @@ void tst_qdeclarativeanimations::propertiesTransition()
QDeclarativeRectangle *myRect = rect->findChild<QDeclarativeRectangle*>("TheRect");
QVERIFY(myRect);
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
QCOMPARE(myRect->x(),qreal(100));
QTest::qWait(waitDuration);
QTIMED_COMPARE(myRect->x(),qreal(100));
@@ -709,7 +710,7 @@ void tst_qdeclarativeanimations::rotation()
QDeclarativeRectangle *rr3 = rect->findChild<QDeclarativeRectangle*>("rr3");
QDeclarativeRectangle *rr4 = rect->findChild<QDeclarativeRectangle*>("rr4");
- rect->setState("state1");
+ QDeclarativeItemPrivate::get(rect)->setState("state1");
QTest::qWait(800);
qreal r1 = rr->rotation();
qreal r2 = rr2->rotation();
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/startup2.qml b/tests/auto/declarative/qdeclarativebehaviors/data/startup2.qml
new file mode 100644
index 0000000..1911cc4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/startup2.qml
@@ -0,0 +1,16 @@
+import Qt 4.7
+
+Rectangle {
+ width: 800;
+ height: 480;
+
+ Text { id:theText; text: "hello world" }
+
+ Rectangle {
+ objectName: "innerRect"
+ color: "red"
+ x: theText.width
+ Behavior on x { NumberAnimation {} }
+ width: 100; height: 100
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
index c2781b8..7137af1 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
+++ b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro
@@ -3,7 +3,14 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativebehaviors.cpp
macx:CONFIG -= app_bundle
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
index ee9e282..1dc4b53 100644
--- a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
+++ b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
@@ -43,8 +43,10 @@
#include <QtDeclarative/qdeclarativecomponent.h>
#include <QtDeclarative/qdeclarativeview.h>
#include <private/qdeclarativerectangle_p.h>
+#include <private/qdeclarativetext_p.h>
#include <private/qdeclarativebehavior_p.h>
#include <private/qdeclarativeanimation_p.h>
+#include <private/qdeclarativeitem_p.h>
#include "../../../shared/util.h"
class tst_qdeclarativebehaviors : public QObject
@@ -80,7 +82,7 @@ void tst_qdeclarativebehaviors::simpleBehavior()
QTRY_VERIFY(rect);
QTRY_VERIFY(qobject_cast<QDeclarativeBehavior*>(rect->findChild<QDeclarativeBehavior*>("MyBehavior"))->animation());
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() > 0);
QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() < 200);
//i.e. the behavior has been triggered
@@ -128,7 +130,7 @@ void tst_qdeclarativebehaviors::loop()
QTRY_VERIFY(rect);
//don't crash
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
delete rect;
}
@@ -140,7 +142,7 @@ void tst_qdeclarativebehaviors::colorBehavior()
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QTRY_VERIFY(rect);
- rect->setState("red");
+ QDeclarativeItemPrivate::get(rect)->setState("red");
QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->color() != QColor("red"));
QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->color() != QColor("green"));
//i.e. the behavior has been triggered
@@ -155,7 +157,7 @@ void tst_qdeclarativebehaviors::parentBehavior()
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QTRY_VERIFY(rect);
- rect->setState("reparented");
+ QDeclarativeItemPrivate::get(rect)->setState("reparented");
QTRY_VERIFY(rect->findChild<QDeclarativeRectangle*>("MyRect")->parentItem() != rect->findChild<QDeclarativeItem*>("NewParent"));
QTRY_VERIFY(rect->findChild<QDeclarativeRectangle*>("MyRect")->parentItem() == rect->findChild<QDeclarativeItem*>("NewParent"));
@@ -169,7 +171,7 @@ void tst_qdeclarativebehaviors::replaceBinding()
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QTRY_VERIFY(rect);
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
QTRY_VERIFY(innerRect);
QTRY_VERIFY(innerRect->x() > 0);
@@ -181,7 +183,7 @@ void tst_qdeclarativebehaviors::replaceBinding()
rect->setProperty("movedx", 210);
QTRY_COMPARE(innerRect->x(), (qreal)210);
- rect->setState("");
+ QDeclarativeItemPrivate::get(rect)->setState("");
QTRY_VERIFY(innerRect->x() > 10);
QTRY_VERIFY(innerRect->x() < 210); //i.e. the behavior has been triggered
QTRY_COMPARE(innerRect->x(), (qreal)10);
@@ -201,7 +203,7 @@ void tst_qdeclarativebehaviors::group()
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QTRY_VERIFY(rect);
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
//QTest::qWait(200);
QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() > 0);
QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() < 200);
@@ -216,7 +218,7 @@ void tst_qdeclarativebehaviors::group()
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QTRY_VERIFY(rect);
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() > 0);
QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() < 200);
//i.e. the behavior has been triggered
@@ -230,11 +232,11 @@ void tst_qdeclarativebehaviors::emptyBehavior()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/empty.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QTRY_VERIFY(rect);
+ QVERIFY(rect);
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
- QTRY_COMPARE(x, qreal(200)); //should change immediately
+ QCOMPARE(x, qreal(200)); //should change immediately
delete rect;
}
@@ -244,9 +246,9 @@ void tst_qdeclarativebehaviors::explicitSelection()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/explicit.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QTRY_VERIFY(rect);
+ QVERIFY(rect);
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() > 0);
QTRY_VERIFY(qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x() < 200);
//i.e. the behavior has been triggered
@@ -259,11 +261,11 @@ void tst_qdeclarativebehaviors::nonSelectingBehavior()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/nonSelecting2.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QTRY_VERIFY(rect);
+ QVERIFY(rect);
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
- QTRY_COMPARE(x, qreal(200)); //should change immediately
+ QCOMPARE(x, qreal(200)); //should change immediately
delete rect;
}
@@ -275,10 +277,9 @@ void tst_qdeclarativebehaviors::reassignedAnimation()
QString warning = QUrl::fromLocalFile(SRCDIR "/data/reassignedAnimation.qml").toString() + ":9:9: QML Behavior: Cannot change the animation assigned to a Behavior.";
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QTRY_VERIFY(rect);
- QTRY_COMPARE(qobject_cast<QDeclarativeNumberAnimation*>(
- qobject_cast<QDeclarativeBehavior*>(
- rect->findChild<QDeclarativeBehavior*>("MyBehavior"))->animation())->duration(), 200);
+ QVERIFY(rect);
+ QCOMPARE(qobject_cast<QDeclarativeNumberAnimation*>(
+ rect->findChild<QDeclarativeBehavior*>("MyBehavior")->animation())->duration(), 200);
delete rect;
}
@@ -288,12 +289,12 @@ void tst_qdeclarativebehaviors::disabled()
QDeclarativeEngine engine;
QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/disabled.qml"));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QTRY_VERIFY(rect);
- QTRY_COMPARE(rect->findChild<QDeclarativeBehavior*>("MyBehavior")->enabled(), false);
+ QVERIFY(rect);
+ QCOMPARE(rect->findChild<QDeclarativeBehavior*>("MyBehavior")->enabled(), false);
- rect->setState("moved");
+ QDeclarativeItemPrivate::get(rect)->setState("moved");
qreal x = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"))->x();
- QTRY_COMPARE(x, qreal(200)); //should change immediately
+ QCOMPARE(x, qreal(200)); //should change immediately
delete rect;
}
@@ -307,28 +308,47 @@ void tst_qdeclarativebehaviors::dontStart()
QString warning = c.url().toString() + ":13:13: QML NumberAnimation: setRunning() cannot be used on non-root animation nodes.";
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning));
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QTRY_VERIFY(rect);
+ QVERIFY(rect);
QDeclarativeAbstractAnimation *myAnim = rect->findChild<QDeclarativeAbstractAnimation*>("MyAnim");
- QTRY_VERIFY(myAnim && myAnim->qtAnimation());
- QTRY_VERIFY(myAnim->qtAnimation()->state() == QAbstractAnimation::Stopped);
+ QVERIFY(myAnim && myAnim->qtAnimation());
+ QVERIFY(myAnim->qtAnimation()->state() == QAbstractAnimation::Stopped);
delete rect;
}
void tst_qdeclarativebehaviors::startup()
{
- QDeclarativeEngine engine;
- QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/startup.qml"));
- QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
- QTRY_VERIFY(rect);
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/startup.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
- QDeclarativeRectangle *innerRect = rect->findChild<QDeclarativeRectangle*>("innerRect");
- QTRY_VERIFY(innerRect);
+ QDeclarativeRectangle *innerRect = rect->findChild<QDeclarativeRectangle*>("innerRect");
+ QVERIFY(innerRect);
- QTRY_COMPARE(innerRect->x(), qreal(100)); //should be set immediately
+ QCOMPARE(innerRect->x(), qreal(100)); //should be set immediately
- delete rect;
+ delete rect;
+ }
+
+ {
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/startup2.qml"));
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect);
+
+ QDeclarativeRectangle *innerRect = rect->findChild<QDeclarativeRectangle*>("innerRect");
+ QVERIFY(innerRect);
+
+ QDeclarativeText *text = rect->findChild<QDeclarativeText*>();
+ QVERIFY(text);
+
+ QCOMPARE(innerRect->x(), text->width()); //should be set immediately
+
+ delete rect;
+ }
}
QTEST_MAIN(tst_qdeclarativebehaviors)
diff --git a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
index 04dd6f5..04535db 100644
--- a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
+++ b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro
@@ -5,7 +5,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativebinding.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
index e754923..3aa2197 100644
--- a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
+++ b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro
@@ -6,7 +6,14 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativeborderimage.cpp ../shared/testhttpserver.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
index e58c798..98c38ad 100644
--- a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
+++ b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
@@ -5,7 +5,11 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativecomponent.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-ignored.qml b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-ignored.qml
new file mode 100644
index 0000000..764d5ab
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-ignored.qml
@@ -0,0 +1,8 @@
+import Qt 4.7
+
+Item {
+ id: screen
+
+ Connections { target: screen; onNotFooBar1: {} ignoreUnknownSignals: true }
+ Connections { objectName: "connections"; onNotFooBar2: {} ignoreUnknownSignals: true }
+}
diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-notarget.qml b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-notarget.qml
new file mode 100644
index 0000000..09e7812
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-notarget.qml
@@ -0,0 +1,7 @@
+import Qt 4.7
+
+Item {
+ id: screen
+
+ Connections { objectName: "connections"; target: null; onNotFooBar: {} }
+}
diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-parent.qml b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-parent.qml
new file mode 100644
index 0000000..478503d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-parent.qml
@@ -0,0 +1,7 @@
+import Qt 4.7
+
+Item {
+ id: screen
+
+ Connections { objectName: "connections"; onFooBar: {} }
+}
diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals.qml b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals.qml
new file mode 100644
index 0000000..d4e8d7e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals.qml
@@ -0,0 +1,7 @@
+import Qt 4.7
+
+Item {
+ id: screen
+
+ Connections { objectName: "connections"; target: screen; onFooBar: {} }
+}
diff --git a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
index 959354d..bbf8630 100644
--- a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
+++ b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro
@@ -5,7 +5,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeconnection.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp b/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp
index 0efae3b..00e97ca 100644
--- a/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp
+++ b/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp
@@ -59,6 +59,8 @@ private slots:
void connection();
void trimming();
void targetChanged();
+ void unknownSignals_data();
+ void unknownSignals();
private:
QDeclarativeEngine engine;
@@ -156,6 +158,41 @@ void tst_qdeclarativeconnection::targetChanged()
delete item;
}
+void tst_qdeclarativeconnection::unknownSignals_data()
+{
+ QTest::addColumn<QString>("file");
+ QTest::addColumn<QString>("error");
+
+ QTest::newRow("basic") << "connection-unknownsignals.qml" << ":6:5: QML Connections: Cannot assign to non-existent property \"onFooBar\"";
+ QTest::newRow("parent") << "connection-unknownsignals-parent.qml" << ":6:5: QML Connections: Cannot assign to non-existent property \"onFooBar\"";
+ QTest::newRow("ignored") << "connection-unknownsignals-ignored.qml" << ""; // should be NO error
+ QTest::newRow("notarget") << "connection-unknownsignals-notarget.qml" << ""; // should be NO error
+}
+
+void tst_qdeclarativeconnection::unknownSignals()
+{
+ QFETCH(QString, file);
+ QFETCH(QString, error);
+
+ QUrl url = QUrl::fromLocalFile(SRCDIR "/data/" + file);
+ if (!error.isEmpty()) {
+ QTest::ignoreMessage(QtWarningMsg, (url.toString() + error).toLatin1());
+ } else {
+ // QTest has no way to insist no message (i.e. fail)
+ }
+
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, url);
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(c.create());
+ QVERIFY(item != 0);
+
+ // check that connection is created (they are all runtime errors)
+ QDeclarativeConnections *connections = item->findChild<QDeclarativeConnections*>("connections");
+ QVERIFY(connections);
+
+ delete item;
+}
+
QTEST_MAIN(tst_qdeclarativeconnection)
#include "tst_qdeclarativeconnection.moc"
diff --git a/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro b/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
index 5db9a9e..0e1a5b1 100644
--- a/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
+++ b/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro
@@ -3,7 +3,11 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativecontext.cpp
macx:CONFIG -= app_bundle
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
index 851460f..7f0e6c0 100644
--- a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
+++ b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
@@ -398,7 +398,7 @@ void tst_qdeclarativecontext::destruction()
QObject obj;
QDeclarativeEngine::setContextForObject(&obj, ctxt);
- QDeclarativeExpression expr(ctxt, "a", 0);
+ QDeclarativeExpression expr(ctxt, 0, "a");
QCOMPARE(ctxt, QDeclarativeEngine::contextForObject(&obj));
QCOMPARE(ctxt, expr.context());
diff --git a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
index 466c563..9f1e50c 100644
--- a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
+++ b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro
@@ -4,7 +4,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativedom.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
index a951827..6c19566 100644
--- a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
+++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
@@ -419,10 +419,8 @@ void tst_qdeclarativedom::loadSyntaxErrors()
void tst_qdeclarativedom::loadRemoteErrors()
{
QByteArray qml = "import Qt 4.7\n"
+ "import \"http://localhost/exampleQmlScript.js\" as Script\n"
"Item {\n"
- " Script {\n"
- " source: \"http://localhost/exampleQmlScript.js\""
- " }\n"
"}";
QDeclarativeDomDocument document;
QVERIFY(false == document.load(&engine, qml));
diff --git a/tests/auto/qmediaplaylist/tmp.unsupported_format b/tests/auto/declarative/qdeclarativeecmascript/data/blank.js
index e69de29..e69de29 100644
--- a/tests/auto/qmediaplaylist/tmp.unsupported_format
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/blank.js
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml
index 72b59ae..2337e44 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml
@@ -19,7 +19,7 @@ QtObject {
myObject.deleteOnSet = 1;
- test3 = myObject.value == undefined;
- test4 = obj.value == undefined;
+ test3 = myObject == null
+ test4 = obj == null
}
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml
index 3047e9b..7b132e1 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml
@@ -11,7 +11,7 @@ MyQmlObject{
function createTwo()
{
var component = Qt.createComponent('dynamicCreation.helper.qml');
- obj.objectProperty = component.createObject();
+ obj.objectProperty = component.createObject(obj);
}
function createThree()
@@ -22,6 +22,6 @@ MyQmlObject{
function dontCrash()
{
var component = Qt.createComponent('file-doesnt-exist.qml');
- obj.objectProperty = component.createObject();
+ obj.objectProperty = component.createObject(obj);
}
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/eval.qml b/tests/auto/declarative/qdeclarativeecmascript/data/eval.qml
new file mode 100644
index 0000000..bc2df98
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/eval.qml
@@ -0,0 +1,23 @@
+import Qt 4.7
+
+QtObject {
+ property bool test1: false;
+ property bool test2: false;
+ property bool test3: false;
+ property bool test4: false;
+ property bool test5: false;
+
+
+ property int a: 7
+ property int b: 8
+
+ Component.onCompleted: {
+ var b = 9;
+
+ test1 = (eval("a") == 7);
+ test2 = (eval("b") == 9);
+ test3 = (eval("c") == undefined);
+ test4 = (eval("console") == console);
+ test5 = (eval("Qt") == Qt);
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/exception.js b/tests/auto/declarative/qdeclarativeecmascript/data/exception.js
new file mode 100644
index 0000000..160bbfa
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/exception.js
@@ -0,0 +1 @@
+throw("Whoops!");
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/function.qml b/tests/auto/declarative/qdeclarativeecmascript/data/function.qml
new file mode 100644
index 0000000..b435f58
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/function.qml
@@ -0,0 +1,19 @@
+import Qt 4.7
+
+QtObject {
+ property bool test1: false;
+ property bool test2: false;
+ property bool test3: false;
+
+ Component.onCompleted: {
+ var a = 10;
+
+ var func1 = new Function("a", "return a + 7");
+ var func2 = new Function("a", "return Qt.atob(a)");
+ var func3 = new Function("return a");
+
+ test1 = (func1(4) == 11);
+ test2 = (func2("Hello World!") == Qt.atob("Hello World!"));
+ test3 = (func3() == undefined);
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.1.qml
new file mode 100644
index 0000000..09540f1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.1.qml
@@ -0,0 +1,5 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property variant a: function myFunction() { return 2; }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.2.qml
new file mode 100644
index 0000000..948b39c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.2.qml
@@ -0,0 +1,13 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property variant a
+ property bool runTest: false
+ onRunTestChanged: {
+ function myFunction() {
+ console.log("hello world");
+ }
+ a = myFunction;
+ }
+
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include.js b/tests/auto/declarative/qdeclarativeecmascript/data/include.js
new file mode 100644
index 0000000..232fd80
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/include.js
@@ -0,0 +1,8 @@
+var test1 = true
+var test2 = false
+var test3 = false
+
+function go() {
+ Qt.include("js/include2.js");
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include.qml b/tests/auto/declarative/qdeclarativeecmascript/data/include.qml
new file mode 100644
index 0000000..18543b2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/include.qml
@@ -0,0 +1,23 @@
+import Qt 4.7
+import "include.js" as IncludeTest
+
+QtObject {
+ property int test0: 0
+ property bool test1: false
+ property bool test2: false
+ property bool test2_1: false
+ property bool test3: false
+ property bool test3_1: false
+
+ property int testValue: 99
+
+ Component.onCompleted: {
+ IncludeTest.go();
+ test0 = IncludeTest.value
+ test1 = IncludeTest.test1
+ test2 = IncludeTest.test2
+ test2_1 = IncludeTest.test2_1
+ test3 = IncludeTest.test3
+ test3_1 = IncludeTest.test3_1
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_callback.js b/tests/auto/declarative/qdeclarativeecmascript/data/include_callback.js
new file mode 100644
index 0000000..ea19eba
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_callback.js
@@ -0,0 +1,11 @@
+function go() {
+ var a = Qt.include("missing.js", function(o) { test2 = o.status == o.NETWORK_ERROR });
+ test1 = a.status == a.NETWORK_ERROR
+
+ var b = Qt.include("blank.js", function(o) { test4 = o.status == o.OK });
+ test3 = b.status == b.OK
+
+ var c = Qt.include("exception.js", function(o) { test6 = o.status == o.EXCEPTION });
+ test5 = c.status == c.EXCEPTION
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_callback.qml b/tests/auto/declarative/qdeclarativeecmascript/data/include_callback.qml
new file mode 100644
index 0000000..a39e821
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_callback.qml
@@ -0,0 +1,15 @@
+import Qt 4.7
+import "include_callback.js" as IncludeTest
+
+QtObject {
+ property bool test1: false
+ property bool test2: false
+ property bool test3: false
+ property bool test4: false
+ property bool test5: false
+ property bool test6: false
+
+ Component.onCompleted: {
+ IncludeTest.go();
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma.qml b/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma.qml
new file mode 100644
index 0000000..67b8cfd
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma.qml
@@ -0,0 +1,11 @@
+import Qt 4.7
+import "include_pragma_outer.js" as Script
+
+Item {
+ property int test1
+
+ Component.onCompleted: {
+ test1 = Script.callFunction()
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma_inner.js b/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma_inner.js
new file mode 100644
index 0000000..a0380a2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma_inner.js
@@ -0,0 +1,5 @@
+.pragma library
+
+function getValue() {
+ return 100;
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma_outer.js b/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma_outer.js
new file mode 100644
index 0000000..d87bafc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma_outer.js
@@ -0,0 +1,6 @@
+Qt.include("include_pragma_inner.js")
+
+function callFunction() {
+ return getValue();
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_remote.js b/tests/auto/declarative/qdeclarativeecmascript/data/include_remote.js
new file mode 100644
index 0000000..e6a4676
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_remote.js
@@ -0,0 +1,26 @@
+var myvar = 10;
+
+function go()
+{
+ var a = Qt.include("http://127.0.0.1:8111/remote_file.js",
+ function(o) {
+ test2 = o.status == o.OK
+ test3 = a.status == a.OK
+ test4 = myvar == 13
+
+ done = true;
+ });
+ test1 = a.status == a.LOADING
+
+
+ var b = Qt.include("http://127.0.0.1:8111/exception.js",
+ function(o) {
+ test7 = o.status == o.EXCEPTION
+ test8 = b.status == a.EXCEPTION
+ test9 = b.exception.toString() == "Whoops!";
+ test10 = o.exception.toString() == "Whoops!";
+
+ done2 = true;
+ });
+ test6 = b.status == b.LOADING
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_remote.qml b/tests/auto/declarative/qdeclarativeecmascript/data/include_remote.qml
new file mode 100644
index 0000000..06bd174
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_remote.qml
@@ -0,0 +1,21 @@
+import Qt 4.7
+import "include_remote.js" as IncludeTest
+
+QtObject {
+ property bool done: false
+ property bool done2: false
+
+ property bool test1: false
+ property bool test2: false
+ property bool test3: false
+ property bool test4: false
+ property bool test5: false
+
+ property bool test6: false
+ property bool test7: false
+ property bool test8: false
+ property bool test9: false
+ property bool test10: false
+
+ Component.onCompleted: IncludeTest.go();
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.js b/tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.js
new file mode 100644
index 0000000..cc90860
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.js
@@ -0,0 +1,13 @@
+function go()
+{
+ var a = Qt.include("http://127.0.0.1:8111/missing.js",
+ function(o) {
+ test2 = o.status == o.NETWORK_ERROR
+ test3 = a.status == a.NETWORK_ERROR
+
+ done = true;
+ });
+
+ test1 = a.status == a.LOADING
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.qml b/tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.qml
new file mode 100644
index 0000000..8e486b2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.qml
@@ -0,0 +1,12 @@
+import Qt 4.7
+import "include_remote_missing.js" as IncludeTest
+
+QtObject {
+ property bool done: false
+
+ property bool test1: false
+ property bool test2: false
+ property bool test3: false
+
+ Component.onCompleted: IncludeTest.go();
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_shared.js b/tests/auto/declarative/qdeclarativeecmascript/data/include_shared.js
new file mode 100644
index 0000000..a49c07b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_shared.js
@@ -0,0 +1,12 @@
+.pragma library
+
+var test1 = true
+var test2 = false
+var test3 = false
+
+var testValue = 99;
+
+function go() {
+ Qt.include("js/include2.js");
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_shared.qml b/tests/auto/declarative/qdeclarativeecmascript/data/include_shared.qml
new file mode 100644
index 0000000..e957018
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_shared.qml
@@ -0,0 +1,22 @@
+import Qt 4.7
+import "include_shared.js" as IncludeTest
+
+QtObject {
+ property int test0: 0
+ property bool test1: false
+ property bool test2: false
+ property bool test2_1: false
+ property bool test3: false
+ property bool test3_1: false
+
+ Component.onCompleted: {
+ IncludeTest.go();
+ test0 = IncludeTest.value
+ test1 = IncludeTest.test1
+ test2 = IncludeTest.test2
+ test2_1 = IncludeTest.test2_1
+ test3 = IncludeTest.test3
+ test3_1 = IncludeTest.test3_1
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/js/include2.js b/tests/auto/declarative/qdeclarativeecmascript/data/js/include2.js
new file mode 100644
index 0000000..2a0c039
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/js/include2.js
@@ -0,0 +1,4 @@
+test2 = true
+var test2_1 = true
+
+Qt.include("include3.js");
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/js/include3.js b/tests/auto/declarative/qdeclarativeecmascript/data/js/include3.js
new file mode 100644
index 0000000..84b2770
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/js/include3.js
@@ -0,0 +1,3 @@
+test3 = true
+var test3_1 = true
+var value = testValue
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_10696.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_10696.qml
new file mode 100644
index 0000000..cb5c4c9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_10696.qml
@@ -0,0 +1,26 @@
+import Qt 4.7
+
+QtObject {
+ property string test: "aaaa"
+ + "bbbb"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc"
+ + "cccc";
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtcreatorbug_1289.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qtcreatorbug_1289.qml
new file mode 100644
index 0000000..b6d31d5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtcreatorbug_1289.qml
@@ -0,0 +1,13 @@
+import Qt 4.7
+
+QtObject {
+ id: root
+ property QtObject object: QtObject {
+ id: nested
+ property QtObject nestedObject
+ }
+
+ Component.onCompleted: {
+ nested.nestedObject = root;
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/remote_file.js b/tests/auto/declarative/qdeclarativeecmascript/data/remote_file.js
new file mode 100644
index 0000000..1b123ae
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/remote_file.js
@@ -0,0 +1,2 @@
+myvar = 13;
+test5 = true;
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.2.qml
new file mode 100644
index 0000000..a36b4c0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.2.qml
@@ -0,0 +1,14 @@
+import Qt 4.7
+
+QtObject {
+ id: root
+
+ property variant a: 10
+ property int x: 10
+ property int test: a.x
+
+ Component.onCompleted: {
+ a = 11;
+ a = root;
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
index eabed26..c907be5 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
+++ b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro
@@ -1,13 +1,18 @@
load(qttest_p4)
-contains(QT_CONFIG,declarative): QT += declarative script
+contains(QT_CONFIG,declarative): QT += declarative script network
macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeecmascript.cpp \
- testtypes.cpp
-HEADERS += testtypes.h
+ testtypes.cpp \
+ ../shared/testhttpserver.cpp
+HEADERS += testtypes.h \
+ ../shared/testhttpserver.h
+INCLUDEPATH += ../shared
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
+DEFINES += SRCDIR=\\\"$$PWD\\\"
+
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
index 1381d57..7bb8a8e 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
+++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
@@ -190,7 +190,7 @@ class MyExpression : public QDeclarativeExpression
Q_OBJECT
public:
MyExpression(QDeclarativeContext *ctxt, const QString &expr)
- : QDeclarativeExpression(ctxt, expr, 0), changed(false)
+ : QDeclarativeExpression(ctxt, 0, expr), changed(false)
{
QObject::connect(this, SIGNAL(valueChanged()), this, SLOT(expressionValueChanged()));
setNotifyOnValueChanged(true);
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index 491a736..4900fa2 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -51,6 +51,7 @@
#include <private/qdeclarativeengine_p.h>
#include <private/qdeclarativeglobalscriptclass_p.h>
#include "testtypes.h"
+#include "testhttpserver.h"
/*
This test covers evaluation of ECMAScript expressions and bindings from within
@@ -142,8 +143,15 @@ private slots:
void libraryScriptAssert();
void variantsAssignedUndefined();
void qtbug_9792();
+ void qtcreatorbug_1289();
void noSpuriousWarningsAtShutdown();
void canAssignNullToQObject();
+ void functionAssignment();
+ void eval();
+ void function();
+ void qtbug_10696();
+
+ void include();
void callQtInvokables();
private:
@@ -1100,7 +1108,7 @@ void tst_qdeclarativeecmascript::exceptionClearsOnReeval()
QDeclarativeComponent component(&engine, TEST_FILE("exceptionClearsOnReeval.qml"));
QString url = component.url().toString();
- QString warning = url + ":4: TypeError: Result of expression 'objectProperty.objectProperty' [undefined] is not an object.";
+ QString warning = url + ":4: TypeError: Result of expression 'objectProperty' [null] is not an object.";
QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create());
@@ -1149,6 +1157,7 @@ static void transientErrorsMsgHandler(QtMsgType, const char *)
// Check that transient binding errors are not displayed
void tst_qdeclarativeecmascript::transientErrors()
{
+ {
QDeclarativeComponent component(&engine, TEST_FILE("transientErrors.qml"));
transientErrorsMsgCount = 0;
@@ -1160,6 +1169,22 @@ void tst_qdeclarativeecmascript::transientErrors()
qInstallMsgHandler(old);
QCOMPARE(transientErrorsMsgCount, 0);
+ }
+
+ // One binding erroring multiple times, but then resolving
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("transientErrors.2.qml"));
+
+ transientErrorsMsgCount = 0;
+ QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler);
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ qInstallMsgHandler(old);
+
+ QCOMPARE(transientErrorsMsgCount, 0);
+ }
}
// Check that errors during shutdown are minimized
@@ -2058,10 +2083,9 @@ void tst_qdeclarativeecmascript::compiled()
QCOMPARE(object->property("test15").toBool(), false);
QCOMPARE(object->property("test16").toBool(), true);
- QCOMPARE(object->property("test17").toInt(), 4);
+ QCOMPARE(object->property("test17").toInt(), 5);
QCOMPARE(object->property("test18").toReal(), qreal(176));
- QEXPECT_FAIL("", "QTBUG-9538", Continue);
- QCOMPARE(object->property("test19").toInt(), 6);
+ QCOMPARE(object->property("test19").toInt(), 7);
QCOMPARE(object->property("test20").toReal(), qreal(6.7));
QCOMPARE(object->property("test21").toString(), QLatin1String("6.7"));
QCOMPARE(object->property("test22").toString(), QLatin1String("!"));
@@ -2078,20 +2102,21 @@ void tst_qdeclarativeecmascript::numberAssignment()
QObject *object = component.create();
QVERIFY(object != 0);
- QVERIFY(object->property("test1") == QVariant((qreal)6.7));
- QVERIFY(object->property("test2") == QVariant((qreal)6.7));
- QVERIFY(object->property("test3") == QVariant((qreal)6));
- QVERIFY(object->property("test4") == QVariant((qreal)6));
+ QCOMPARE(object->property("test1"), QVariant((qreal)6.7));
+ QCOMPARE(object->property("test2"), QVariant((qreal)6.7));
+ QCOMPARE(object->property("test2"), QVariant((qreal)6.7));
+ QCOMPARE(object->property("test3"), QVariant((qreal)6));
+ QCOMPARE(object->property("test4"), QVariant((qreal)6));
- QVERIFY(object->property("test5") == QVariant((int)7));
- QVERIFY(object->property("test6") == QVariant((int)7));
- QVERIFY(object->property("test7") == QVariant((int)6));
- QVERIFY(object->property("test8") == QVariant((int)6));
+ QCOMPARE(object->property("test5"), QVariant((int)7));
+ QCOMPARE(object->property("test6"), QVariant((int)7));
+ QCOMPARE(object->property("test7"), QVariant((int)6));
+ QCOMPARE(object->property("test8"), QVariant((int)6));
- QVERIFY(object->property("test9") == QVariant((unsigned int)7));
- QVERIFY(object->property("test10") == QVariant((unsigned int)7));
- QVERIFY(object->property("test11") == QVariant((unsigned int)6));
- QVERIFY(object->property("test12") == QVariant((unsigned int)6));
+ QCOMPARE(object->property("test9"), QVariant((unsigned int)7));
+ QCOMPARE(object->property("test10"), QVariant((unsigned int)7));
+ QCOMPARE(object->property("test11"), QVariant((unsigned int)6));
+ QCOMPARE(object->property("test12"), QVariant((unsigned int)6));
delete object;
}
@@ -2188,6 +2213,27 @@ void tst_qdeclarativeecmascript::qtbug_9792()
delete object;
}
+// Verifies that QDeclarativeGuard<>s used in the vmemetaobject are cleaned correctly
+void tst_qdeclarativeecmascript::qtcreatorbug_1289()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("qtcreatorbug_1289.qml"));
+
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ QObject *nested = qvariant_cast<QObject *>(o->property("object"));
+ QVERIFY(nested != 0);
+
+ QVERIFY(qvariant_cast<QObject *>(nested->property("nestedObject")) == o);
+
+ delete nested;
+ nested = qvariant_cast<QObject *>(o->property("object"));
+ QVERIFY(nested == 0);
+
+ // If the bug is present, the next line will crash
+ delete o;
+}
+
// Test that we shut down without stupid warnings
void tst_qdeclarativeecmascript::noSpuriousWarningsAtShutdown()
{
@@ -2252,6 +2298,199 @@ void tst_qdeclarativeecmascript::canAssignNullToQObject()
}
}
+void tst_qdeclarativeecmascript::functionAssignment()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("functionAssignment.1.qml"));
+
+ QString url = component.url().toString();
+ QString warning = url + ":4: Unable to assign a function to a property.";
+ QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
+
+ MyQmlObject *o = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(o != 0);
+
+ QVERIFY(!o->property("a").isValid());
+
+ delete o;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("functionAssignment.2.qml"));
+
+ MyQmlObject *o = qobject_cast<MyQmlObject *>(component.create());
+ QVERIFY(o != 0);
+
+ QVERIFY(!o->property("a").isValid());
+
+ QString url = component.url().toString();
+ QString warning = url + ":10: Error: Cannot assign a function to a property.";
+ QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
+
+ o->setProperty("runTest", true);
+
+ QVERIFY(!o->property("a").isValid());
+
+ delete o;
+ }
+}
+
+void tst_qdeclarativeecmascript::eval()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("eval.qml"));
+
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ QCOMPARE(o->property("test1").toBool(), true);
+ QCOMPARE(o->property("test2").toBool(), true);
+ QCOMPARE(o->property("test3").toBool(), true);
+ QCOMPARE(o->property("test4").toBool(), true);
+ QCOMPARE(o->property("test5").toBool(), true);
+
+ delete o;
+}
+
+void tst_qdeclarativeecmascript::function()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("function.qml"));
+
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ QCOMPARE(o->property("test1").toBool(), true);
+ QCOMPARE(o->property("test2").toBool(), true);
+ QCOMPARE(o->property("test3").toBool(), true);
+
+ delete o;
+}
+
+#define TRY_WAIT(expr) \
+ do { \
+ for (int ii = 0; ii < 6; ++ii) { \
+ if ((expr)) break; \
+ QTest::qWait(50); \
+ } \
+ QVERIFY((expr)); \
+ } while (false)
+
+// Test the "Qt.include" method
+void tst_qdeclarativeecmascript::include()
+{
+ // Non-library relative include
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("include.qml"));
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ QCOMPARE(o->property("test0").toInt(), 99);
+ QCOMPARE(o->property("test1").toBool(), true);
+ QCOMPARE(o->property("test2").toBool(), true);
+ QCOMPARE(o->property("test2_1").toBool(), true);
+ QCOMPARE(o->property("test3").toBool(), true);
+ QCOMPARE(o->property("test3_1").toBool(), true);
+
+ delete o;
+ }
+
+ // Library relative include
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("include_shared.qml"));
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ QCOMPARE(o->property("test0").toInt(), 99);
+ QCOMPARE(o->property("test1").toBool(), true);
+ QCOMPARE(o->property("test2").toBool(), true);
+ QCOMPARE(o->property("test2_1").toBool(), true);
+ QCOMPARE(o->property("test3").toBool(), true);
+ QCOMPARE(o->property("test3_1").toBool(), true);
+
+ delete o;
+ }
+
+ // Callback
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("include_callback.qml"));
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ QCOMPARE(o->property("test1").toBool(), true);
+ QCOMPARE(o->property("test2").toBool(), true);
+ QCOMPARE(o->property("test3").toBool(), true);
+ QCOMPARE(o->property("test4").toBool(), true);
+ QCOMPARE(o->property("test5").toBool(), true);
+ QCOMPARE(o->property("test6").toBool(), true);
+
+ delete o;
+ }
+
+ // Including file with ".pragma library"
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("include_pragma.qml"));
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+ QCOMPARE(o->property("test1").toInt(), 100);
+
+ delete o;
+ }
+
+ // Remote - success
+ {
+ TestHTTPServer server(8111);
+ QVERIFY(server.isValid());
+ server.serveDirectory(SRCDIR "/data");
+
+ QDeclarativeComponent component(&engine, TEST_FILE("include_remote.qml"));
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ TRY_WAIT(o->property("done").toBool() == true);
+ TRY_WAIT(o->property("done2").toBool() == true);
+
+ QCOMPARE(o->property("test1").toBool(), true);
+ QCOMPARE(o->property("test2").toBool(), true);
+ QCOMPARE(o->property("test3").toBool(), true);
+ QCOMPARE(o->property("test4").toBool(), true);
+ QCOMPARE(o->property("test5").toBool(), true);
+
+ QCOMPARE(o->property("test6").toBool(), true);
+ QCOMPARE(o->property("test7").toBool(), true);
+ QCOMPARE(o->property("test8").toBool(), true);
+ QCOMPARE(o->property("test9").toBool(), true);
+ QCOMPARE(o->property("test10").toBool(), true);
+
+ delete o;
+ }
+
+ // Remote - error
+ {
+ TestHTTPServer server(8111);
+ QVERIFY(server.isValid());
+ server.serveDirectory(SRCDIR "/data");
+
+ QDeclarativeComponent component(&engine, TEST_FILE("include_remote_missing.qml"));
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ TRY_WAIT(o->property("done").toBool() == true);
+
+ QCOMPARE(o->property("test1").toBool(), true);
+ QCOMPARE(o->property("test2").toBool(), true);
+ QCOMPARE(o->property("test3").toBool(), true);
+
+ delete o;
+ }
+}
+
+void tst_qdeclarativeecmascript::qtbug_10696()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("qtbug_10696.qml"));
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+ delete o;
+}
+
QTEST_MAIN(tst_qdeclarativeecmascript)
#include "tst_qdeclarativeecmascript.moc"
diff --git a/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro b/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
index e0ea2e5..23afd07 100644
--- a/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
+++ b/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro
@@ -5,7 +5,11 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeengine.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro b/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
index 501f32c..fae11f9 100644
--- a/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
+++ b/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro
@@ -3,7 +3,11 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativeerror.cpp
macx:CONFIG -= app_bundle
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
index 07637c9..7a70109 100644
--- a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
+++ b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro
@@ -5,7 +5,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeflickable.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
index 9ce9c49..2c6890e 100644
--- a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
+++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp
@@ -61,6 +61,7 @@ private slots:
void maximumFlickVelocity();
void flickDeceleration();
void pressDelay();
+ void flickableDirection();
private:
QDeclarativeEngine engine;
@@ -224,6 +225,33 @@ void tst_qdeclarativeflickable::pressDelay()
QCOMPARE(spy.count(),1);
}
+void tst_qdeclarativeflickable::flickableDirection()
+{
+ QDeclarativeComponent component(&engine);
+ component.setData("import Qt 4.7; Flickable { flickableDirection: Flickable.VerticalFlick; }", QUrl::fromLocalFile(""));
+ QDeclarativeFlickable *flickable = qobject_cast<QDeclarativeFlickable*>(component.create());
+ QSignalSpy spy(flickable, SIGNAL(flickableDirectionChanged()));
+
+ QVERIFY(flickable);
+ QCOMPARE(flickable->flickableDirection(), QDeclarativeFlickable::VerticalFlick);
+
+ flickable->setFlickableDirection(QDeclarativeFlickable::HorizontalAndVerticalFlick);
+ QCOMPARE(flickable->flickableDirection(), QDeclarativeFlickable::HorizontalAndVerticalFlick);
+ QCOMPARE(spy.count(),1);
+
+ flickable->setFlickableDirection(QDeclarativeFlickable::AutoFlickDirection);
+ QCOMPARE(flickable->flickableDirection(), QDeclarativeFlickable::AutoFlickDirection);
+ QCOMPARE(spy.count(),2);
+
+ flickable->setFlickableDirection(QDeclarativeFlickable::HorizontalFlick);
+ QCOMPARE(flickable->flickableDirection(), QDeclarativeFlickable::HorizontalFlick);
+ QCOMPARE(spy.count(),3);
+
+ flickable->setFlickableDirection(QDeclarativeFlickable::HorizontalFlick);
+ QCOMPARE(flickable->flickableDirection(), QDeclarativeFlickable::HorizontalFlick);
+ QCOMPARE(spy.count(),3);
+}
+
QTEST_MAIN(tst_qdeclarativeflickable)
#include "tst_qdeclarativeflickable.moc"
diff --git a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
index 9830b55..9b4fbc9 100644
--- a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
+++ b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro
@@ -5,7 +5,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeflipable.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
index 687c80c..c021fcf 100644
--- a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
+++ b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro
@@ -3,5 +3,12 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativefocusscope.cpp
macx:CONFIG -= app_bundle
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/data/basic.qml b/tests/auto/declarative/qdeclarativefolderlistmodel/data/basic.qml
new file mode 100644
index 0000000..2c4977d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativefolderlistmodel/data/basic.qml
@@ -0,0 +1,5 @@
+import Qt.labs.folderlistmodel 1.0
+
+FolderListModel {
+ nameFilters: [ "*.qml" ]
+}
diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/data/dummy.qml b/tests/auto/declarative/qdeclarativefolderlistmodel/data/dummy.qml
new file mode 100644
index 0000000..609638b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativefolderlistmodel/data/dummy.qml
@@ -0,0 +1 @@
+// This file is not used, it is just content for QDirModel
diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
new file mode 100644
index 0000000..487d0e1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro
@@ -0,0 +1,17 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativefolderlistmodel.cpp
+
+# Define SRCDIR equal to test's source directory
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
+
+CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp b/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp
new file mode 100644
index 0000000..8a8bfe7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** 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 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 <qtest.h>
+#include <QtTest/QSignalSpy>
+#include "../../../shared/util.h"
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qabstractitemmodel.h>
+#include <QDebug>
+
+// From qdeclarastivefolderlistmodel.h
+const int FileNameRole = Qt::UserRole+1;
+const int FilePathRole = Qt::UserRole+2;
+enum SortField { Unsorted, Name, Time, Size, Type };
+
+class tst_qdeclarativefolderlistmodel : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativefolderlistmodel() {}
+
+private slots:
+ void basicProperties();
+
+private:
+ void checkNoErrors(const QDeclarativeComponent& component);
+ QDeclarativeEngine engine;
+};
+
+void tst_qdeclarativefolderlistmodel::checkNoErrors(const QDeclarativeComponent& component)
+{
+ // Wait until the component is ready
+ QTRY_VERIFY(component.isReady() || component.isError());
+
+ if (component.isError()) {
+ QList<QDeclarativeError> errors = component.errors();
+ for (int ii = 0; ii < errors.count(); ++ii) {
+ const QDeclarativeError &error = errors.at(ii);
+ QByteArray errorStr = QByteArray::number(error.line()) + ":" +
+ QByteArray::number(error.column()) + ":" +
+ error.description().toUtf8();
+ qWarning() << errorStr;
+ }
+ }
+ QVERIFY(!component.isError());
+}
+
+void tst_qdeclarativefolderlistmodel::basicProperties()
+{
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/basic.qml"));
+ checkNoErrors(component);
+
+ QAbstractListModel *flm = qobject_cast<QAbstractListModel*>(component.create());
+ QVERIFY(flm != 0);
+
+
+ flm->setProperty("folder",QUrl::fromLocalFile(SRCDIR "/data"));
+ QTRY_COMPARE(flm->property("count").toInt(),2); // wait for refresh
+ QCOMPARE(flm->property("folder").toUrl(), QUrl::fromLocalFile(SRCDIR "/data"));
+ QCOMPARE(flm->property("parentFolder").toUrl(), QUrl::fromLocalFile(SRCDIR));
+ QCOMPARE(flm->property("sortField").toInt(), int(Name));
+ QCOMPARE(flm->property("nameFilters").toStringList(), QStringList() << "*.qml");
+ QCOMPARE(flm->property("sortReversed").toBool(), false);
+ QCOMPARE(flm->property("showDirs").toBool(), true);
+ QCOMPARE(flm->property("showDotAndDotDot").toBool(), false);
+ QCOMPARE(flm->property("showOnlyReadable").toBool(), false);
+ QCOMPARE(flm->data(flm->index(0),FileNameRole).toString(), QLatin1String("basic.qml"));
+ QCOMPARE(flm->data(flm->index(1),FileNameRole).toString(), QLatin1String("dummy.qml"));
+}
+
+QTEST_MAIN(tst_qdeclarativefolderlistmodel)
+
+#include "tst_qdeclarativefolderlistmodel.moc"
diff --git a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
index 9a8a3ff..dbe0dcb 100644
--- a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
+++ b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro
@@ -6,7 +6,14 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativefontloader.cpp ../shared/testhttpserver.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativegridview/data/manual-highlight.qml b/tests/auto/declarative/qdeclarativegridview/data/manual-highlight.qml
new file mode 100644
index 0000000..510fcc5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/data/manual-highlight.qml
@@ -0,0 +1,48 @@
+import Qt 4.7
+
+Item {
+
+ ListModel {
+ id: model
+ ListElement {
+ name: "Bill Smith"
+ number: "555 3264"
+ }
+ ListElement {
+ name: "John Brown"
+ number: "555 8426"
+ }
+ ListElement {
+ name: "Sam Wise"
+ number: "555 0473"
+ }
+ ListElement {
+ name: "Bob Brown"
+ number: "555 5845"
+ }
+ }
+
+ Component {
+ id: highlight
+ Rectangle {
+ objectName: "highlight"
+ width: 80; height: 80
+ color: "lightsteelblue"; radius: 5
+ y: grid.currentItem.y
+ x: grid.currentItem.x
+ }
+ }
+
+ GridView {
+ id: grid
+ objectName: "grid"
+ anchors.fill: parent
+ model: model
+ delegate: Text { objectName: "wrapper"; text: name; width: 80; height: 80 }
+
+ highlight: highlight
+ highlightFollowsCurrentItem: false
+ focus: true
+ }
+
+}
diff --git a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
index b069260..033e20e 100644
--- a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
+++ b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro
@@ -5,7 +5,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativegridview.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
index 89be151..2db3ee6 100644
--- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
+++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
@@ -75,6 +75,7 @@ private slots:
void resetModel();
void enforceRange();
void QTBUG_8456();
+ void manualHighlight();
private:
QDeclarativeView *createView();
@@ -1107,6 +1108,35 @@ void tst_QDeclarativeGridView::QTBUG_8456()
QTRY_COMPARE(gridview->currentIndex(), 0);
}
+void tst_QDeclarativeGridView::manualHighlight()
+{
+ QDeclarativeView *canvas = createView();
+
+ QString filename(SRCDIR "/data/manual-highlight.qml");
+ canvas->setSource(QUrl::fromLocalFile(filename));
+
+ qApp->processEvents();
+
+ QDeclarativeGridView *gridview = findItem<QDeclarativeGridView>(canvas->rootObject(), "grid");
+ QTRY_VERIFY(gridview != 0);
+
+ QDeclarativeItem *viewport = gridview->viewport();
+ QTRY_VERIFY(viewport != 0);
+
+ QTRY_COMPARE(gridview->currentIndex(), 0);
+ QTRY_COMPARE(gridview->currentItem(), findItem<QDeclarativeItem>(viewport, "wrapper", 0));
+ QTRY_COMPARE(gridview->highlightItem()->y(), gridview->currentItem()->y());
+ QTRY_COMPARE(gridview->highlightItem()->x(), gridview->currentItem()->x());
+
+ gridview->setCurrentIndex(2);
+
+ QTRY_COMPARE(gridview->currentIndex(), 2);
+ QTRY_COMPARE(gridview->currentItem(), findItem<QDeclarativeItem>(viewport, "wrapper", 2));
+ QTRY_COMPARE(gridview->highlightItem()->y(), gridview->currentItem()->y());
+ QTRY_COMPARE(gridview->highlightItem()->x(), gridview->currentItem()->x());
+}
+
+
QDeclarativeView *tst_QDeclarativeGridView::createView()
{
QDeclarativeView *canvas = new QDeclarativeView(0);
diff --git a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
index ff365ee..a8b8eca 100644
--- a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
+++ b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro
@@ -6,7 +6,14 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativeimage.cpp ../shared/testhttpserver.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index e0143a6..720702a 100644
--- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -400,7 +400,7 @@ T *tst_qdeclarativeimage::findItem(QGraphicsObject *parent, const QString &objec
//qDebug() << "try" << item;
if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
if (index != -1) {
- QDeclarativeExpression e(qmlContext(item), "index", item);
+ QDeclarativeExpression e(qmlContext(item), item, "index");
if (e.evaluate().toInt() == index)
return static_cast<T*>(item);
} else {
diff --git a/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro b/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
index 22be991..1b828a5 100644
--- a/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
+++ b/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro
@@ -9,7 +9,14 @@ SOURCES += tst_qdeclarativeimageprovider.cpp
# LIBS += -lgcov
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
index bb54d6c..c6719c0 100644
--- a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
+++ b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro
@@ -4,7 +4,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeinfo.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro b/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
index 0daa9e5..350f6c6 100644
--- a/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
+++ b/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro
@@ -3,7 +3,11 @@ contains(QT_CONFIG,declarative): QT += declarative script
SOURCES += tst_qdeclarativeinstruction.cpp
macx:CONFIG -= app_bundle
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
index 9ae26f2..1e88255 100644
--- a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
+++ b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
@@ -534,7 +534,6 @@ void tst_qdeclarativeinstruction::dump()
<< "-------------------------------------------------------------------------------"
<< "0\t\t0\tINIT\t\t\t0\t3\t-1\t-1"
<< "1\t\t1\tCREATE\t\t\t0\t\t\t\"Test\""
- << "1\t\t1\tCREATE_SIMPLE\t\t-1"
<< "2\t\t2\tSETID\t\t\t0\t\t\t\"testId\""
<< "3\t\t3\tSET_DEFAULT"
<< "4\t\t4\tCREATE_COMPONENT\t3"
diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenRect.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenRect.qml
new file mode 100644
index 0000000..f351b53
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRect.qml
@@ -0,0 +1,27 @@
+import Qt 4.7
+
+Rectangle {
+ width: 400
+ height: 400
+
+ property int childCount: 0;
+
+ Item {
+ objectName: "testItem"
+ width: childrenRect.width
+ height: childrenRect.height
+
+ Repeater {
+ id: repeater
+ model: childCount
+ delegate: Rectangle {
+ x: index*10
+ y: index*20
+ width: 10
+ height: 20
+
+ color: "red"
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml b/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml
new file mode 100644
index 0000000..171536b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml
@@ -0,0 +1,9 @@
+import Qt 4.7
+import Test 1.0
+
+KeyTestItem {
+ focus: true
+ Keys.onPressed: keysTestObject.keyPress(event.key, event.text, event.modifiers)
+ Keys.onReleased: { keysTestObject.keyRelease(event.key, event.text, event.modifiers); event.accepted = true; }
+ Keys.priority: keysTestObject.processLast ? Keys.AfterItem : Keys.BeforeItem
+}
diff --git a/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml b/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml
new file mode 100644
index 0000000..a562b8b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml
@@ -0,0 +1,20 @@
+import Qt 4.7
+
+QGraphicsWidget {
+ size: "200x100"
+ focusPolicy: QGraphicsWidget.ClickFocus
+ Item {
+ objectName: "declarativeItem"
+ id: item
+ width: 200
+ height: 100
+ MouseArea {
+ anchors.fill: parent
+ onPressed: {
+ if (!item.focus) {
+ item.focus = true;
+ }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
index e834a4e..f494ef1 100644
--- a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
+++ b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro
@@ -4,7 +4,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeitem.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
index d2c328e..ecc813e 100644
--- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
+++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -45,6 +45,7 @@
#include <QtDeclarative/qdeclarativecontext.h>
#include <QtDeclarative/qdeclarativeview.h>
#include <QtDeclarative/qdeclarativeitem.h>
+#include "../../../shared/util.h"
class tst_QDeclarativeItem : public QObject
@@ -54,7 +55,9 @@ public:
tst_QDeclarativeItem();
private slots:
+ void initTestCase();
void keys();
+ void keysProcessingOrder();
void keyNavigation();
void smooth();
void clip();
@@ -63,9 +66,11 @@ private slots:
void propertyChanges();
void transforms();
void transforms_data();
+ void childrenRect();
void childrenProperty();
void resourcesProperty();
+ void mouseFocus();
private:
template<typename T>
@@ -76,8 +81,11 @@ private:
class KeysTestObject : public QObject
{
Q_OBJECT
+
+ Q_PROPERTY(bool processLast READ processLast NOTIFY processLastChanged)
+
public:
- KeysTestObject() : mKey(0), mModifiers(0), mForwardedKey(0) {}
+ KeysTestObject() : mKey(0), mModifiers(0), mForwardedKey(0), mLast(false) {}
void reset() {
mKey = 0;
@@ -86,6 +94,14 @@ public:
mForwardedKey = 0;
}
+ bool processLast() const { return mLast; }
+ void setProcessLast(bool b) {
+ if (b != mLast) {
+ mLast = b;
+ emit processLastChanged();
+ }
+ }
+
public slots:
void keyPress(int key, QString text, int modifiers) {
mKey = key;
@@ -101,20 +117,73 @@ public slots:
mForwardedKey = key;
}
+signals:
+ void processLastChanged();
+
public:
int mKey;
QString mText;
int mModifiers;
int mForwardedKey;
+ bool mLast;
private:
};
+class KeyTestItem : public QDeclarativeItem
+{
+ Q_OBJECT
+public:
+ KeyTestItem(QDeclarativeItem *parent=0) : QDeclarativeItem(parent), mKey(0) {}
+
+protected:
+ void keyPressEvent(QKeyEvent *e) {
+ keyPressPreHandler(e);
+ if (e->isAccepted())
+ return;
+
+ mKey = e->key();
+
+ if (e->key() == Qt::Key_A)
+ e->accept();
+ else
+ e->ignore();
+
+ if (!e->isAccepted())
+ QDeclarativeItem::keyPressEvent(e);
+ }
+
+ void keyReleaseEvent(QKeyEvent *e) {
+ keyReleasePreHandler(e);
+
+ if (e->isAccepted())
+ return;
+
+ if (e->key() == Qt::Key_B)
+ e->accept();
+ else
+ e->ignore();
+
+ if (!e->isAccepted())
+ QDeclarativeItem::keyReleaseEvent(e);
+ }
+
+public:
+ int mKey;
+};
+
+QML_DECLARE_TYPE(KeyTestItem);
+
tst_QDeclarativeItem::tst_QDeclarativeItem()
{
}
+void tst_QDeclarativeItem::initTestCase()
+{
+ qmlRegisterType<KeyTestItem>("Test",1,0,"KeyTestItem");
+}
+
void tst_QDeclarativeItem::keys()
{
QDeclarativeView *canvas = new QDeclarativeView(0);
@@ -211,6 +280,69 @@ void tst_QDeclarativeItem::keys()
QCOMPARE(testObject->mKey, 0);
QVERIFY(!key.isAccepted());
+ canvas->rootContext()->setContextProperty("enableKeyHanding", QVariant(true));
+
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_Return, Qt::NoModifier, "", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QCOMPARE(testObject->mKey, int(Qt::Key_Return));
+ QVERIFY(key.isAccepted());
+
+ delete canvas;
+ delete testObject;
+}
+
+void tst_QDeclarativeItem::keysProcessingOrder()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(240,320);
+
+ KeysTestObject *testObject = new KeysTestObject;
+ canvas->rootContext()->setContextProperty("keysTestObject", testObject);
+
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/keyspriority.qml"));
+ canvas->show();
+ qApp->processEvents();
+
+ KeyTestItem *testItem = qobject_cast<KeyTestItem*>(canvas->rootObject());
+ QVERIFY(testItem);
+
+ QEvent wa(QEvent::WindowActivate);
+ QApplication::sendEvent(canvas, &wa);
+ QFocusEvent fe(QEvent::FocusIn);
+ QApplication::sendEvent(canvas, &fe);
+
+ QKeyEvent key(QEvent::KeyPress, Qt::Key_A, Qt::NoModifier, "A", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QCOMPARE(testObject->mKey, int(Qt::Key_A));
+ QCOMPARE(testObject->mText, QLatin1String("A"));
+ QVERIFY(testObject->mModifiers == Qt::NoModifier);
+ QVERIFY(key.isAccepted());
+
+ testObject->reset();
+
+ testObject->setProcessLast(true);
+
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_A, Qt::NoModifier, "A", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QCOMPARE(testObject->mKey, 0);
+ QVERIFY(key.isAccepted());
+
+ testObject->reset();
+
+ key = QKeyEvent(QEvent::KeyPress, Qt::Key_B, Qt::NoModifier, "B", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QCOMPARE(testObject->mKey, int(Qt::Key_B));
+ QCOMPARE(testObject->mText, QLatin1String("B"));
+ QVERIFY(testObject->mModifiers == Qt::NoModifier);
+ QVERIFY(!key.isAccepted());
+
+ testObject->reset();
+
+ key = QKeyEvent(QEvent::KeyRelease, Qt::Key_B, Qt::NoModifier, "B", false, 1);
+ QApplication::sendEvent(canvas, &key);
+ QCOMPARE(testObject->mKey, 0);
+ QVERIFY(key.isAccepted());
+
delete canvas;
delete testObject;
}
@@ -465,6 +597,41 @@ void tst_QDeclarativeItem::resourcesProperty()
delete o;
}
+void tst_QDeclarativeItem::mouseFocus()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ QVERIFY(canvas);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/mouseFocus.qml"));
+ canvas->show();
+ QVERIFY(canvas->rootObject());
+ QApplication::setActiveWindow(canvas);
+ QTest::qWaitForWindowShown(canvas);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(canvas));
+
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(canvas->rootObject(), "declarativeItem");
+ QVERIFY(item);
+ QSignalSpy focusSpy(item, SIGNAL(focusChanged(bool)));
+
+ QTest::mouseClick(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(item->scenePos()));
+ QApplication::processEvents();
+ QCOMPARE(focusSpy.count(), 1);
+ QVERIFY(item->hasFocus());
+
+ // make sure focusable graphics widget underneath does not steal focus
+ QTest::mouseClick(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(item->scenePos()));
+ QApplication::processEvents();
+ QCOMPARE(focusSpy.count(), 1);
+ QVERIFY(item->hasFocus());
+
+ item->setFocus(false);
+ QVERIFY(!item->hasFocus());
+ QCOMPARE(focusSpy.count(), 2);
+ item->setFocus(true);
+ QCOMPARE(focusSpy.count(), 3);
+
+ delete canvas;
+}
+
void tst_QDeclarativeItem::propertyChanges()
{
QDeclarativeView *canvas = new QDeclarativeView(0);
@@ -537,6 +704,33 @@ void tst_QDeclarativeItem::propertyChanges()
delete canvas;
}
+void tst_QDeclarativeItem::childrenRect()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(240,320);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/childrenRect.qml"));
+ canvas->show();
+
+ QGraphicsObject *o = canvas->rootObject();
+ QDeclarativeItem *item = o->findChild<QDeclarativeItem*>("testItem");
+ QCOMPARE(item->width(), qreal(0));
+ QCOMPARE(item->height(), qreal(0));
+
+ o->setProperty("childCount", 1);
+ QCOMPARE(item->width(), qreal(10));
+ QCOMPARE(item->height(), qreal(20));
+
+ o->setProperty("childCount", 5);
+ QCOMPARE(item->width(), qreal(50));
+ QCOMPARE(item->height(), qreal(100));
+
+ o->setProperty("childCount", 0);
+ QCOMPARE(item->width(), qreal(0));
+ QCOMPARE(item->height(), qreal(0));
+
+ delete o;
+}
+
template<typename T>
T *tst_QDeclarativeItem::findItem(QGraphicsObject *parent, const QString &objectName)
{
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml
index 5af3d6e..bac704e 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml
@@ -10,5 +10,7 @@ QtObject {
property variant test7: "10x10"
property variant test8: "100,100,100"
property variant test9: String("#FF008800")
+ property variant test10: true
+ property variant test11: false
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignValueToSignal.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/assignValueToSignal.errors.txt
new file mode 100644
index 0000000..eb1430a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignValueToSignal.errors.txt
@@ -0,0 +1 @@
+4:5:Cannot assign a value to a signal (expecting a script to be run)
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignValueToSignal.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignValueToSignal.qml
new file mode 100644
index 0000000..6fa1259
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/assignValueToSignal.qml
@@ -0,0 +1,6 @@
+import Test 1.0
+
+MyQmlObject {
+ onBasicSignal: "hello world"
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.2.qml
new file mode 100644
index 0000000..df3de20
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.2.qml
@@ -0,0 +1,11 @@
+import Qt 4.7
+import Qt 4.7 as Qt47
+
+Qt.QtObject {
+ property Qt47.QtObject objectProperty
+ property list<Qt47.QtObject> objectPropertyList
+
+ objectProperty: QtObject {}
+ objectPropertyList: QtObject {}
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.errors.txt
deleted file mode 100644
index 8b20434..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.errors.txt
+++ /dev/null
@@ -1 +0,0 @@
-4:5:Incorrectly specified signal assignment
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.qml
deleted file mode 100644
index c84fea3..0000000
--- a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-import Test 1.0
-
-MyQmlObject {
- onBasicSignal {
- }
-}
-
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.errors.txt
index 353bbf5..8b20434 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.errors.txt
+++ b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.errors.txt
@@ -1 +1 @@
-4:5:Empty signal assignment
+4:5:Incorrectly specified signal assignment
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml
index 4c5a122..c84fea3 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.qml
@@ -1,6 +1,7 @@
import Test 1.0
MyQmlObject {
- onBasicSignal: " "
+ onBasicSignal {
+ }
}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString2.qml b/tests/auto/declarative/qdeclarativelanguage/data/scriptString2.qml
new file mode 100644
index 0000000..c42da2b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/scriptString2.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyTypeObject {
+ scriptProperty: "hello\n\"world\""
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString3.qml b/tests/auto/declarative/qdeclarativelanguage/data/scriptString3.qml
new file mode 100644
index 0000000..0cd82ff
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/scriptString3.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyTypeObject {
+ scriptProperty: 12.345
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/scriptString4.qml b/tests/auto/declarative/qdeclarativelanguage/data/scriptString4.qml
new file mode 100644
index 0000000..3e2f9a4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/scriptString4.qml
@@ -0,0 +1,5 @@
+import Test 1.0
+
+MyTypeObject {
+ scriptProperty: true
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
index 5771469..2b7eb1c 100644
--- a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
+++ b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro
@@ -11,6 +11,13 @@ INCLUDEPATH += ../shared/
HEADERS += ../shared/testhttpserver.h
SOURCES += ../shared/testhttpserver.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"\"\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/declarative/qdeclarativelanguage/testtypes.h
index 89f99c8..acbe219 100644
--- a/tests/auto/declarative/qdeclarativelanguage/testtypes.h
+++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.h
@@ -99,7 +99,7 @@ private:
int m_value2;
};
-class MyQmlObject : public QObject, public MyInterface, public QDeclarativeParserStatus
+class MyQmlObject : public QObject, public MyInterface
{
Q_OBJECT
Q_PROPERTY(int value READ value WRITE setValue FINAL)
@@ -113,7 +113,7 @@ class MyQmlObject : public QObject, public MyInterface, public QDeclarativeParse
Q_PROPERTY(MyQmlObject *qmlobjectProperty READ qmlobject WRITE setQmlobject)
Q_PROPERTY(int propertyWithNotify READ propertyWithNotify WRITE setPropertyWithNotify NOTIFY oddlyNamedNotifySignal)
- Q_INTERFACES(MyInterface QDeclarativeParserStatus)
+ Q_INTERFACES(MyInterface)
public:
MyQmlObject() : m_value(-1), m_interface(0), m_qmlobject(0) { qRegisterMetaType<MyCustomVariantType>("MyCustomVariantType"); }
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index ff03005..011870c 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -351,8 +351,8 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("invalidAttachedProperty.12") << "invalidAttachedProperty.12.qml" << "invalidAttachedProperty.12.errors.txt" << false;
QTest::newRow("invalidAttachedProperty.13") << "invalidAttachedProperty.13.qml" << "invalidAttachedProperty.13.errors.txt" << false;
+ QTest::newRow("assignValueToSignal") << "assignValueToSignal.qml" << "assignValueToSignal.errors.txt" << false;
QTest::newRow("emptySignal") << "emptySignal.qml" << "emptySignal.errors.txt" << false;
- QTest::newRow("emptySignal.2") << "emptySignal.2.qml" << "emptySignal.2.errors.txt" << false;
QTest::newRow("nestedErrors") << "nestedErrors.qml" << "nestedErrors.errors.txt" << false;
QTest::newRow("defaultGrouped") << "defaultGrouped.qml" << "defaultGrouped.errors.txt" << false;
@@ -536,6 +536,8 @@ void tst_qdeclarativelanguage::assignLiteralToVariant()
QCOMPARE(object->property("test7").userType(), (int)QVariant::SizeF);
QCOMPARE(object->property("test8").userType(), (int)QVariant::Vector3D);
QCOMPARE(object->property("test9").userType(), (int)QVariant::String);
+ QCOMPARE(object->property("test10").userType(), (int)QVariant::Bool);
+ QCOMPARE(object->property("test11").userType(), (int)QVariant::Bool);
QVERIFY(object->property("test1") == QVariant(1));
QVERIFY(object->property("test2") == QVariant((double)1.7));
@@ -546,6 +548,8 @@ void tst_qdeclarativelanguage::assignLiteralToVariant()
QVERIFY(object->property("test7") == QVariant(QSizeF(10, 10)));
QVERIFY(object->property("test8") == QVariant(QVector3D(100, 100, 100)));
QVERIFY(object->property("test9") == QVariant(QString(QLatin1String("#FF008800"))));
+ QVERIFY(object->property("test10") == QVariant(bool(true)));
+ QVERIFY(object->property("test11") == QVariant(bool(false)));
delete object;
}
@@ -679,6 +683,7 @@ void tst_qdeclarativelanguage::listProperties()
// ### Not complete
void tst_qdeclarativelanguage::dynamicObjectProperties()
{
+ {
QDeclarativeComponent component(&engine, TEST_FILE("dynamicObjectProperties.qml"));
VERIFY_ERRORS(0);
QObject *object = component.create();
@@ -686,6 +691,16 @@ void tst_qdeclarativelanguage::dynamicObjectProperties()
QVERIFY(object->property("objectProperty") == qVariantFromValue((QObject*)0));
QVERIFY(object->property("objectProperty2") != qVariantFromValue((QObject*)0));
+ }
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("dynamicObjectProperties.2.qml"));
+ QEXPECT_FAIL("", "QTBUG-10822", Abort);
+ VERIFY_ERRORS(0);
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QVERIFY(object->property("objectProperty") != qVariantFromValue((QObject*)0));
+ }
}
// Tests the declaration of dynamic signals and slots
@@ -1101,19 +1116,48 @@ void tst_qdeclarativelanguage::onDestruction()
// Check that assignments to QDeclarativeScriptString properties work
void tst_qdeclarativelanguage::scriptString()
{
- QDeclarativeComponent component(&engine, TEST_FILE("scriptString.qml"));
- VERIFY_ERRORS(0);
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptString.qml"));
+ VERIFY_ERRORS(0);
- MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create());
- QVERIFY(object != 0);
- QCOMPARE(object->scriptProperty().script(), QString("foo + bar"));
- QCOMPARE(object->scriptProperty().scopeObject(), qobject_cast<QObject*>(object));
- QCOMPARE(object->scriptProperty().context(), qmlContext(object));
-
- QVERIFY(object->grouped() != 0);
- QCOMPARE(object->grouped()->script().script(), QString("console.log(1921)"));
- QCOMPARE(object->grouped()->script().scopeObject(), qobject_cast<QObject*>(object));
- QCOMPARE(object->grouped()->script().context(), qmlContext(object));
+ MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->scriptProperty().script(), QString("foo + bar"));
+ QCOMPARE(object->scriptProperty().scopeObject(), qobject_cast<QObject*>(object));
+ QCOMPARE(object->scriptProperty().context(), qmlContext(object));
+
+ QVERIFY(object->grouped() != 0);
+ QCOMPARE(object->grouped()->script().script(), QString("console.log(1921)"));
+ QCOMPARE(object->grouped()->script().scopeObject(), qobject_cast<QObject*>(object));
+ QCOMPARE(object->grouped()->script().context(), qmlContext(object));
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptString2.qml"));
+ VERIFY_ERRORS(0);
+
+ MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->scriptProperty().script(), QString("\"hello\\n\\\"world\\\"\""));
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptString3.qml"));
+ VERIFY_ERRORS(0);
+
+ MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->scriptProperty().script(), QString("12.345"));
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("scriptString4.qml"));
+ VERIFY_ERRORS(0);
+
+ MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create());
+ QVERIFY(object != 0);
+ QCOMPARE(object->scriptProperty().script(), QString("true"));
+ }
}
// Check that default property assignments are correctly spliced into explicit
diff --git a/tests/auto/declarative/qdeclarativelayoutitem/data/layoutItem.qml b/tests/auto/declarative/qdeclarativelayoutitem/data/layoutItem.qml
new file mode 100644
index 0000000..ee881a2
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelayoutitem/data/layoutItem.qml
@@ -0,0 +1,9 @@
+import Qt 4.7
+
+LayoutItem {//Sized by the layout
+ id: resizable
+ objectName: "resizable"
+ minimumSize: "100x100"
+ maximumSize: "300x300"
+ preferredSize: "200x200"
+}
diff --git a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
new file mode 100644
index 0000000..79954fe
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro
@@ -0,0 +1,15 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+SOURCES += tst_qdeclarativelayoutitem.cpp
+
+# Define SRCDIR equal to test's source directory
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+} \ No newline at end of file
diff --git a/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp b/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp
new file mode 100644
index 0000000..c0c5abc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** 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 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 <qdeclarativecomponent.h>
+#include <qdeclarativeengine.h>
+#include <qdeclarativeitem.h>
+#include <private/qdeclarativelayoutitem_p.h>
+#include <qgraphicsview.h>
+#include <qgraphicsscene.h>
+#include <qgraphicswidget.h>
+#include <qgraphicslinearlayout.h>
+#include "../../../shared/util.h"
+
+class tst_qdeclarativelayoutitem : public QObject
+{
+ Q_OBJECT
+public:
+ tst_qdeclarativelayoutitem();
+
+private slots:
+ void test_resizing();
+};
+
+tst_qdeclarativelayoutitem::tst_qdeclarativelayoutitem()
+{
+}
+
+void tst_qdeclarativelayoutitem::test_resizing()
+{
+ //Create Layout (must be done in C++)
+ QGraphicsView view;
+ QGraphicsScene scene;
+ QGraphicsWidget *widget = new QGraphicsWidget();
+ QGraphicsLinearLayout *layout = new QGraphicsLinearLayout();
+ widget->setLayout(layout);
+ scene.addItem(widget);
+ view.setScene(&scene);
+ //Add the QML snippet into the layout
+ QDeclarativeEngine engine;
+ QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/layoutItem.qml"));
+ QDeclarativeLayoutItem* obj = static_cast<QDeclarativeLayoutItem*>(c.create());
+ layout->addItem(obj);
+ layout->setContentsMargins(0,0,0,0);
+ widget->setContentsMargins(0,0,0,0);
+ view.show();
+
+ QVERIFY(obj!= 0);
+
+ widget->setGeometry(QRectF(0,0, 400,400));
+ QCOMPARE(obj->width(), 300.0);
+ QCOMPARE(obj->height(), 300.0);
+
+ widget->setGeometry(QRectF(0,0, 300,300));
+ QCOMPARE(obj->width(), 300.0);
+ QCOMPARE(obj->height(), 300.0);
+
+ widget->setGeometry(QRectF(0,0, 200,200));
+ QCOMPARE(obj->width(), 200.0);
+ QCOMPARE(obj->height(), 200.0);
+
+ widget->setGeometry(QRectF(0,0, 100,100));
+ QCOMPARE(obj->width(), 100.0);
+ QCOMPARE(obj->height(), 100.0);
+
+ widget->setGeometry(QRectF(0,0, 40,40));
+ QCOMPARE(obj->width(), 100.0);
+ QCOMPARE(obj->height(), 100.0);
+
+ widget->setGeometry(QRectF(0,0, 412,112));
+ QCOMPARE(obj->width(), 300.0);
+ QCOMPARE(obj->height(), 112.0);
+}
+
+
+QTEST_MAIN(tst_qdeclarativelayoutitem)
+
+#include "tst_qdeclarativelayoutitem.moc"
diff --git a/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml b/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml
deleted file mode 100644
index 0538738..0000000
--- a/tests/auto/declarative/qdeclarativelayouts/data/layouts.qml
+++ /dev/null
@@ -1,31 +0,0 @@
-import Qt 4.7
-import Qt.widgets 4.7
-
-Item {
- id: resizable
- width:300
- height:300
- QGraphicsWidget {
- x : resizable.x
- y : resizable.y
- width : resizable.width
- height : resizable.height
- layout: QGraphicsLinearLayout {
- spacing: 0
- LayoutItem {
- objectName: "left"
- minimumSize: "100x100"
- maximumSize: "300x300"
- preferredSize: "100x100"
- Rectangle { objectName: "yellowRect"; color: "yellow"; anchors.fill: parent }
- }
- LayoutItem {
- objectName: "right"
- minimumSize: "100x100"
- maximumSize: "400x400"
- preferredSize: "200x200"
- Rectangle { objectName: "greenRect"; color: "green"; anchors.fill: parent }
- }
- }
- }
-}
diff --git a/tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro b/tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro
deleted file mode 100644
index a2065f4..0000000
--- a/tests/auto/declarative/qdeclarativelayouts/qdeclarativelayouts.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-load(qttest_p4)
-contains(QT_CONFIG,declarative): QT += declarative
-SOURCES += tst_qdeclarativelayouts.cpp
-macx:CONFIG -= app_bundle
-
-# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
-
-CONFIG += parallel_test
-
diff --git a/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp b/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp
deleted file mode 100644
index 412c3b7..0000000
--- a/tests/auto/declarative/qdeclarativelayouts/tst_qdeclarativelayouts.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <private/qlistmodelinterface_p.h>
-#include <qdeclarativeview.h>
-#include <private/qdeclarativelayoutitem_p.h>
-#include <qdeclarativeexpression.h>
-#include <QStyle>
-
-class tst_QDeclarativeLayouts : public QObject
-{
- Q_OBJECT
-public:
- tst_QDeclarativeLayouts();
-
-private slots:
- void test_qml();//GraphicsLayout set up in Qml
- void test_cpp();//GraphicsLayout set up in C++
-
-private:
- QDeclarativeView *createView(const QString &filename);
-};
-
-tst_QDeclarativeLayouts::tst_QDeclarativeLayouts()
-{
-}
-
-void tst_QDeclarativeLayouts::test_qml()
-{
- QDeclarativeView *canvas = createView(SRCDIR "/data/layouts.qml");
-
- qApp->processEvents();
- QDeclarativeLayoutItem *left = static_cast<QDeclarativeLayoutItem*>(canvas->rootObject()->findChild<QDeclarativeItem*>("left"));
- QVERIFY(left != 0);
-
- QDeclarativeLayoutItem *right = static_cast<QDeclarativeLayoutItem*>(canvas->rootObject()->findChild<QDeclarativeItem*>("right"));
- QVERIFY(right != 0);
-
- qreal l = QApplication::style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
- qreal r = QApplication::style()->pixelMetric(QStyle::PM_LayoutRightMargin);
- qreal t = QApplication::style()->pixelMetric(QStyle::PM_LayoutTopMargin);
- qreal b = QApplication::style()->pixelMetric(QStyle::PM_LayoutBottomMargin);
- QVERIFY2(l == r && r == t && t == b, "Test assumes equal margins.");
- qreal gvMargin = l;
-
- QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(canvas->rootObject());
- QVERIFY(rootItem != 0);
-
- //Preferred Size
- rootItem->setWidth(300 + 2*gvMargin);
- rootItem->setHeight(300 + 2*gvMargin);
-
- QCOMPARE(left->x(), gvMargin);
- QCOMPARE(left->y(), gvMargin);
- QCOMPARE(left->width(), 100.0);
- QCOMPARE(left->height(), 300.0);
-
- QCOMPARE(right->x(), 100.0 + gvMargin);
- QCOMPARE(right->y(), 0.0 + gvMargin);
- QCOMPARE(right->width(), 200.0);
- QCOMPARE(right->height(), 300.0);
-
- //Minimum Size
- rootItem->setWidth(10+2*gvMargin);
- rootItem->setHeight(10+2*gvMargin);
-
- QCOMPARE(left->x(), gvMargin);
- QCOMPARE(left->width(), 100.0);
- QCOMPARE(left->height(), 100.0);
-
- QCOMPARE(right->x(), 100.0 + gvMargin);
- QCOMPARE(right->width(), 100.0);
- QCOMPARE(right->height(), 100.0);
-
- //Between preferred and Maximum Size
- /*Note that if set to maximum size (or above) GraphicsLinearLayout behavior
- is to shrink them down to preferred size. So the exact maximum size can't
- be used*/
- rootItem->setWidth(670 + 2*gvMargin);
- rootItem->setHeight(300 + 2*gvMargin);
-
- QCOMPARE(left->x(), gvMargin);
- QCOMPARE(left->width(), 270.0);
- QCOMPARE(left->height(), 300.0);
-
- QCOMPARE(right->x(), 270.0 + gvMargin);
- QCOMPARE(right->width(), 400.0);
- QCOMPARE(right->height(), 300.0);
-
- delete canvas;
-}
-
-void tst_QDeclarativeLayouts::test_cpp()
-{
- //TODO: This test!
-}
-
-QDeclarativeView *tst_QDeclarativeLayouts::createView(const QString &filename)
-{
- QDeclarativeView *canvas = new QDeclarativeView(0);
- canvas->setSource(QUrl::fromLocalFile(filename));
-
- return canvas;
-}
-
-
-QTEST_MAIN(tst_QDeclarativeLayouts)
-
-#include "tst_qdeclarativelayouts.moc"
diff --git a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
index 9f1e146..53bb9ec 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
+++ b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro
@@ -6,7 +6,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativelistmodel.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index ec97461..be4ffe8 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -184,8 +184,8 @@ void tst_qdeclarativelistmodel::dynamic_data()
QTest::newRow("count") << "count" << 0 << "";
- QTest::newRow("get1") << "{get(0)}" << 0 << "<Unknown File>: QML ListModel: get: index 0 out of range";
- QTest::newRow("get2") << "{get(-1)}" << 0 << "<Unknown File>: QML ListModel: get: index -1 out of range";
+ QTest::newRow("get1") << "{get(0)}" << 0 << "";
+ QTest::newRow("get2") << "{get(-1)}" << 0 << "";
QTest::newRow("append1") << "{append({'foo':123});count}" << 1 << "";
QTest::newRow("append2") << "{append({'foo':123,'bar':456});count}" << 1 << "";
@@ -196,13 +196,13 @@ void tst_qdeclarativelistmodel::dynamic_data()
QTest::newRow("clear1") << "{append({'foo':456});clear();count}" << 0 << "";
QTest::newRow("clear2") << "{append({'foo':123});append({'foo':456});clear();count}" << 0 << "";
- QTest::newRow("clear3") << "{append({'foo':123});clear();get(0).foo}" << 0 << "<Unknown File>: QML ListModel: get: index 0 out of range";
+ QTest::newRow("clear3") << "{append({'foo':123});clear()}" << 0 << "";
QTest::newRow("remove1") << "{append({'foo':123});remove(0);count}" << 0 << "";
QTest::newRow("remove2a") << "{append({'foo':123});append({'foo':456});remove(0);count}" << 1 << "";
QTest::newRow("remove2b") << "{append({'foo':123});append({'foo':456});remove(0);get(0).foo}" << 456 << "";
QTest::newRow("remove2c") << "{append({'foo':123});append({'foo':456});remove(1);get(0).foo}" << 123 << "";
- QTest::newRow("remove3") << "{append({'foo':123});remove(0);get(0).foo}" << 0 << "<Unknown File>: QML ListModel: get: index 0 out of range";
+ QTest::newRow("remove3") << "{append({'foo':123});remove(0)}" << 0 << "";
QTest::newRow("remove3a") << "{append({'foo':123});remove(-1);count}" << 1 << "<Unknown File>: QML ListModel: remove: index -1 out of range";
QTest::newRow("remove4a") << "{remove(0)}" << 0 << "<Unknown File>: QML ListModel: remove: index 0 out of range";
QTest::newRow("remove4b") << "{append({'foo':123});remove(0);remove(0);count}" << 0 << "<Unknown File>: QML ListModel: remove: index 0 out of range";
@@ -275,14 +275,16 @@ void tst_qdeclarativelistmodel::dynamic()
QDeclarativeListModel model;
QDeclarativeEngine::setContextForObject(&model,engine.rootContext());
engine.rootContext()->setContextObject(&model);
- QDeclarativeExpression e(engine.rootContext(), script, &model);
+ QDeclarativeExpression e(engine.rootContext(), &model, script);
if (!warning.isEmpty())
QTest::ignoreMessage(QtWarningMsg, warning.toLatin1());
int actual = e.evaluate().toInt();
if (e.hasError())
qDebug() << e.error(); // errors not expected
- QVERIFY(!e.hasError());
+
+ if (QTest::currentDataTag() != QLatin1String("clear3") && QTest::currentDataTag() != QLatin1String("remove3"))
+ QVERIFY(!e.hasError());
QCOMPARE(actual,result);
}
@@ -326,17 +328,11 @@ void tst_qdeclarativelistmodel::dynamic_worker()
if (QByteArray(QTest::currentDataTag()).startsWith("nested"))
QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML ListModel: Cannot add nested list values when modifying or after modification from a worker script");
- if (QByteArray(QTest::currentDataTag()).startsWith("nested-append")) {
- int callsToGet = script.count(QLatin1String(";get("));
- for (int i=0; i<callsToGet; i++)
- QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML ListModel: get: index 0 out of range");
- }
-
QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker",
Q_ARG(QVariant, operations.mid(0, operations.length()-1))));
waitForWorker(item);
- QDeclarativeExpression e(eng.rootContext(), operations.last().toString(), &model);
+ QDeclarativeExpression e(eng.rootContext(), &model, operations.last().toString());
if (QByteArray(QTest::currentDataTag()).startsWith("nested"))
QVERIFY(e.evaluate().toInt() != result);
else
diff --git a/tests/auto/declarative/qdeclarativelistview/data/manual-highlight.qml b/tests/auto/declarative/qdeclarativelistview/data/manual-highlight.qml
new file mode 100644
index 0000000..4913ebe
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelistview/data/manual-highlight.qml
@@ -0,0 +1,47 @@
+import Qt 4.7
+
+Item {
+
+ ListModel {
+ id: model
+ ListElement {
+ name: "Bill Smith"
+ number: "555 3264"
+ }
+ ListElement {
+ name: "John Brown"
+ number: "555 8426"
+ }
+ ListElement {
+ name: "Sam Wise"
+ number: "555 0473"
+ }
+ ListElement {
+ name: "Bob Brown"
+ number: "555 5845"
+ }
+ }
+
+ Component {
+ id: highlight
+ Rectangle {
+ objectName: "highlight"
+ width: 180; height: 20
+ color: "lightsteelblue"; radius: 5
+ y: list.currentItem.y
+ }
+ }
+
+ ListView {
+ id: list
+ objectName: "list"
+ anchors.fill: parent
+ model: model
+ delegate: Text { objectName: "wrapper"; text: name }
+
+ highlight: highlight
+ highlightFollowsCurrentItem: false
+ focus: true
+ }
+
+}
diff --git a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
index 5d962c0..b406fde 100644
--- a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
+++ b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro
@@ -5,6 +5,13 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativelistview.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index 22eb734..203760e 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -90,6 +90,7 @@ private slots:
void componentChanges();
void modelChanges();
void QTBUG_9791();
+ void manualHighlight();
private:
template <class T> void items();
@@ -1432,8 +1433,6 @@ void tst_QDeclarativeListView::QTBUG_9791()
{
QDeclarativeView *canvas = createView();
- QDeclarativeContext *ctxt = canvas->rootContext();
-
canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/strictlyenforcerange.qml"));
qApp->processEvents();
@@ -1465,6 +1464,34 @@ void tst_QDeclarativeListView::QTBUG_9791()
delete canvas;
}
+void tst_QDeclarativeListView::manualHighlight()
+{
+ QDeclarativeView *canvas = new QDeclarativeView(0);
+ canvas->setFixedSize(240,320);
+
+ QDeclarativeContext *ctxt = canvas->rootContext();
+
+ QString filename(SRCDIR "/data/manual-highlight.qml");
+ canvas->setSource(QUrl::fromLocalFile(filename));
+
+ qApp->processEvents();
+
+ QDeclarativeListView *listview = findItem<QDeclarativeListView>(canvas->rootObject(), "list");
+ QTRY_VERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QTRY_VERIFY(viewport != 0);
+
+ QTRY_COMPARE(listview->currentIndex(), 0);
+ QTRY_COMPARE(listview->currentItem(), findItem<QDeclarativeItem>(viewport, "wrapper", 0));
+ QTRY_COMPARE(listview->highlightItem()->y(), listview->currentItem()->y());
+
+ listview->setCurrentIndex(2);
+
+ QTRY_COMPARE(listview->currentIndex(), 2);
+ QTRY_COMPARE(listview->currentItem(), findItem<QDeclarativeItem>(viewport, "wrapper", 2));
+ QTRY_COMPARE(listview->highlightItem()->y(), listview->currentItem()->y());
+}
void tst_QDeclarativeListView::qListModelInterface_items()
{
@@ -1552,7 +1579,7 @@ T *tst_QDeclarativeListView::findItem(QGraphicsObject *parent, const QString &ob
//qDebug() << "try" << item;
if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
if (index != -1) {
- QDeclarativeExpression e(qmlContext(item), "index", item);
+ QDeclarativeExpression e(qmlContext(item), item, "index");
if (e.evaluate().toInt() == index)
return static_cast<T*>(item);
} else {
diff --git a/tests/auto/declarative/qdeclarativeloader/data/AnchoredLoader.qml b/tests/auto/declarative/qdeclarativeloader/data/AnchoredLoader.qml
new file mode 100644
index 0000000..5d02dae
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/AnchoredLoader.qml
@@ -0,0 +1,14 @@
+import Qt 4.7
+
+Rectangle {
+ width: 300
+ height: 200
+ color: "blue"
+ Loader {
+ objectName: "loader"
+ anchors.fill: parent
+ sourceComponent: Component {
+ Rectangle { color: "red"; objectName: "sourceElement" }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml b/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml
index 9bb0b37..3b851c1 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml
@@ -1,5 +1,4 @@
import Qt 4.7
-import Qt.widgets 4.6
QGraphicsWidget {
size: "250x250"
diff --git a/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml b/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml
index 6aa3d2f..72cd3b9 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml
@@ -1,7 +1,8 @@
import Qt 4.7
-Loader {
- resizeMode: "NoResize"
+Item {
width: 200; height: 80
- source: "Rect120x60.qml"
+ Loader {
+ source: "Rect120x60.qml"
+ }
}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml b/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml
index 9322141..0cff506 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml
@@ -1,8 +1,9 @@
import Qt 4.7
-Loader {
- resizeMode: Loader.NoResize
- source: "GraphicsWidget250x250.qml"
+Item {
width: 200
- height: 80
+ height: 80
+ Loader {
+ source: "GraphicsWidget250x250.qml"
+ }
}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml
index 0cfb4df..81610ad 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml
@@ -1,7 +1,6 @@
import Qt 4.7
Loader {
- resizeMode: Loader.SizeItemToLoader
width: 200
height: 80
source: "GraphicsWidget250x250.qml"
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml
index b588c9d..a801a42 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml
@@ -1,6 +1,5 @@
import Qt 4.7
Loader {
- resizeMode: Loader.SizeLoaderToItem
source: "GraphicsWidget250x250.qml"
}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml
index 93be6f1..77aa8d9 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml
@@ -1,6 +1,5 @@
import Qt 4.7
Loader {
- resizeMode: "SizeLoaderToItem"
source: "Rect120x60.qml"
}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml
index 04b46fb..0098927 100644
--- a/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml
+++ b/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml
@@ -1,7 +1,6 @@
import Qt 4.7
Loader {
- resizeMode: "SizeItemToLoader"
width: 200; height: 80
source: "Rect120x60.qml"
}
diff --git a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
index 96fea5b..9334928 100644
--- a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
+++ b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro
@@ -7,7 +7,14 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativeloader.cpp \
../shared/testhttpserver.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
index 7cdadb4..11cc61b 100644
--- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
+++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
@@ -78,6 +78,7 @@ private slots:
void clear();
void urlToComponent();
void componentToUrl();
+ void anchoredLoader();
void sizeLoaderToItem();
void sizeItemToLoader();
void noResize();
@@ -104,13 +105,14 @@ tst_QDeclarativeLoader::tst_QDeclarativeLoader()
void tst_QDeclarativeLoader::url()
{
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.7\nLoader { source: \"Rect120x60.qml\" }"), TEST_FILE(""));
+ component.setData(QByteArray("import Qt 4.7\nLoader { property int did_load: 0; onLoaded: did_load=123; source: \"Rect120x60.qml\" }"), TEST_FILE(""));
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
QVERIFY(loader->item());
QVERIFY(loader->source() == QUrl::fromLocalFile(SRCDIR "/data/Rect120x60.qml"));
QCOMPARE(loader->progress(), 1.0);
QCOMPARE(loader->status(), QDeclarativeLoader::Ready);
+ QCOMPARE(loader->property("did_load").toInt(), 123);
QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
delete loader;
@@ -265,12 +267,32 @@ void tst_QDeclarativeLoader::componentToUrl()
delete item;
}
+void tst_QDeclarativeLoader::anchoredLoader()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("/AnchoredLoader.qml"));
+ QDeclarativeItem *rootItem = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(rootItem != 0);
+ QDeclarativeItem *loader = rootItem->findChild<QDeclarativeItem*>("loader");
+ QDeclarativeItem *sourceElement = rootItem->findChild<QDeclarativeItem*>("sourceElement");
+
+ QVERIFY(loader != 0);
+ QVERIFY(sourceElement != 0);
+
+ QCOMPARE(rootItem->width(), 300.0);
+ QCOMPARE(rootItem->height(), 200.0);
+
+ QCOMPARE(loader->width(), 300.0);
+ QCOMPARE(loader->height(), 200.0);
+
+ QCOMPARE(sourceElement->width(), 300.0);
+ QCOMPARE(sourceElement->height(), 200.0);
+}
+
void tst_QDeclarativeLoader::sizeLoaderToItem()
{
QDeclarativeComponent component(&engine, TEST_FILE("/SizeToItem.qml"));
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
- QVERIFY(loader->resizeMode() == QDeclarativeLoader::SizeLoaderToItem);
QCOMPARE(loader->width(), 120.0);
QCOMPARE(loader->height(), 60.0);
@@ -282,20 +304,28 @@ void tst_QDeclarativeLoader::sizeLoaderToItem()
QCOMPARE(loader->width(), 150.0);
QCOMPARE(loader->height(), 45.0);
+ // Check explicit width
+ loader->setWidth(200.0);
+ QCOMPARE(loader->width(), 200.0);
+ QCOMPARE(rect->width(), 200.0);
+ rect->setWidth(100.0); // when rect changes ...
+ QCOMPARE(rect->width(), 100.0); // ... it changes
+ QCOMPARE(loader->width(), 200.0); // ... but loader stays the same
+
+ // Check explicit height
+ loader->setHeight(200.0);
+ QCOMPARE(loader->height(), 200.0);
+ QCOMPARE(rect->height(), 200.0);
+ rect->setHeight(100.0); // when rect changes ...
+ QCOMPARE(rect->height(), 100.0); // ... it changes
+ QCOMPARE(loader->height(), 200.0); // ... but loader stays the same
+
// Switch mode
- loader->setResizeMode(QDeclarativeLoader::SizeItemToLoader);
loader->setWidth(180);
loader->setHeight(30);
QCOMPARE(rect->width(), 180.0);
QCOMPARE(rect->height(), 30.0);
- // notify
- QSignalSpy spy(loader, SIGNAL(resizeModeChanged()));
- loader->setResizeMode(QDeclarativeLoader::NoResize);
- QCOMPARE(spy.count(),1);
- loader->setResizeMode(QDeclarativeLoader::NoResize);
- QCOMPARE(spy.count(),1);
-
delete loader;
}
@@ -304,7 +334,6 @@ void tst_QDeclarativeLoader::sizeItemToLoader()
QDeclarativeComponent component(&engine, TEST_FILE("/SizeToLoader.qml"));
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
- QVERIFY(loader->resizeMode() == QDeclarativeLoader::SizeItemToLoader);
QCOMPARE(loader->width(), 200.0);
QCOMPARE(loader->height(), 80.0);
@@ -320,7 +349,8 @@ void tst_QDeclarativeLoader::sizeItemToLoader()
QCOMPARE(rect->height(), 30.0);
// Switch mode
- loader->setResizeMode(QDeclarativeLoader::SizeLoaderToItem);
+ loader->resetWidth(); // reset explicit size
+ loader->resetHeight();
rect->setWidth(160);
rect->setHeight(45);
QCOMPARE(loader->width(), 160.0);
@@ -332,17 +362,12 @@ void tst_QDeclarativeLoader::sizeItemToLoader()
void tst_QDeclarativeLoader::noResize()
{
QDeclarativeComponent component(&engine, TEST_FILE("/NoResize.qml"));
- QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
- QVERIFY(loader != 0);
- QCOMPARE(loader->width(), 200.0);
- QCOMPARE(loader->height(), 80.0);
+ QDeclarativeItem* item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item != 0);
+ QCOMPARE(item->width(), 200.0);
+ QCOMPARE(item->height(), 80.0);
- QDeclarativeItem *rect = qobject_cast<QDeclarativeItem*>(loader->item());
- QVERIFY(rect);
- QCOMPARE(rect->width(), 120.0);
- QCOMPARE(rect->height(), 60.0);
-
- delete loader;
+ delete item;
}
void tst_QDeclarativeLoader::sizeLoaderToGraphicsWidget()
@@ -353,7 +378,6 @@ void tst_QDeclarativeLoader::sizeLoaderToGraphicsWidget()
scene.addItem(loader);
QVERIFY(loader != 0);
- QVERIFY(loader->resizeMode() == QDeclarativeLoader::SizeLoaderToItem);
QCOMPARE(loader->width(), 250.0);
QCOMPARE(loader->height(), 250.0);
@@ -365,7 +389,6 @@ void tst_QDeclarativeLoader::sizeLoaderToGraphicsWidget()
QCOMPARE(loader->height(), 45.0);
// Switch mode
- loader->setResizeMode(QDeclarativeLoader::SizeItemToLoader);
loader->setWidth(180);
loader->setHeight(30);
QCOMPARE(widget->size().width(), 180.0);
@@ -382,7 +405,6 @@ void tst_QDeclarativeLoader::sizeGraphicsWidgetToLoader()
scene.addItem(loader);
QVERIFY(loader != 0);
- QVERIFY(loader->resizeMode() == QDeclarativeLoader::SizeItemToLoader);
QCOMPARE(loader->width(), 200.0);
QCOMPARE(loader->height(), 80.0);
@@ -398,7 +420,8 @@ void tst_QDeclarativeLoader::sizeGraphicsWidgetToLoader()
QCOMPARE(widget->size().height(), 30.0);
// Switch mode
- loader->setResizeMode(QDeclarativeLoader::SizeLoaderToItem);
+ loader->resetWidth(); // reset explicit size
+ loader->resetHeight();
widget->resize(QSizeF(160,45));
QCOMPARE(loader->width(), 160.0);
QCOMPARE(loader->height(), 45.0);
@@ -409,20 +432,15 @@ void tst_QDeclarativeLoader::sizeGraphicsWidgetToLoader()
void tst_QDeclarativeLoader::noResizeGraphicsWidget()
{
QDeclarativeComponent component(&engine, TEST_FILE("/NoResizeGraphicsWidget.qml"));
- QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
QGraphicsScene scene;
- scene.addItem(loader);
+ scene.addItem(item);
- QVERIFY(loader != 0);
- QCOMPARE(loader->width(), 200.0);
- QCOMPARE(loader->height(), 80.0);
-
- QGraphicsWidget *widget = qobject_cast<QGraphicsWidget*>(loader->item());
- QVERIFY(widget);
- QCOMPARE(widget->size().width(), 250.0);
- QCOMPARE(widget->size().height(), 250.0);
+ QVERIFY(item != 0);
+ QCOMPARE(item->width(), 200.0);
+ QCOMPARE(item->height(), 80.0);
- delete loader;
+ delete item;
}
void tst_QDeclarativeLoader::networkRequestUrl()
@@ -432,7 +450,7 @@ void tst_QDeclarativeLoader::networkRequestUrl()
server.serveDirectory(SRCDIR "/data");
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.7\nLoader { source: \"http://127.0.0.1:14450/Rect120x60.qml\" }"), QUrl::fromLocalFile(SRCDIR "/dummy.qml"));
+ component.setData(QByteArray("import Qt 4.7\nLoader { property int did_load : 0; source: \"http://127.0.0.1:14450/Rect120x60.qml\"; onLoaded: did_load=123 }"), QUrl::fromLocalFile(SRCDIR "/dummy.qml"));
if (component.isError())
qDebug() << component.errors();
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
@@ -442,6 +460,7 @@ void tst_QDeclarativeLoader::networkRequestUrl()
QVERIFY(loader->item());
QCOMPARE(loader->progress(), 1.0);
+ QCOMPARE(loader->property("did_load").toInt(), 123);
QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
delete loader;
@@ -488,7 +507,7 @@ void tst_QDeclarativeLoader::failNetworkRequest()
QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: Network error for URL http://127.0.0.1:14450/IDontExist.qml");
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.7\nLoader { source: \"http://127.0.0.1:14450/IDontExist.qml\" }"), QUrl::fromLocalFile("http://127.0.0.1:14450/dummy.qml"));
+ component.setData(QByteArray("import Qt 4.7\nLoader { property int did_load: 123; source: \"http://127.0.0.1:14450/IDontExist.qml\"; onLoaded: did_load=456 }"), QUrl::fromLocalFile("http://127.0.0.1:14450/dummy.qml"));
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
@@ -496,6 +515,7 @@ void tst_QDeclarativeLoader::failNetworkRequest()
QVERIFY(loader->item() == 0);
QCOMPARE(loader->progress(), 0.0);
+ QCOMPARE(loader->property("did_load").toInt(), 123);
QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 0);
delete loader;
diff --git a/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro b/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
index cf3fa65..0d32ab8 100644
--- a/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
+++ b/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro
@@ -3,7 +3,11 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativemetatype.cpp
macx:CONFIG -= app_bundle
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
index 36efe13..76e86c9 100644
--- a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
+++ b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp
@@ -88,7 +88,10 @@ QML_DECLARE_TYPE(TestType);
class ParserStatusTestType : public QObject, public QDeclarativeParserStatus
{
Q_OBJECT
+ void classBegin(){}
+ void componentComplete(){}
Q_CLASSINFO("DefaultProperty", "foo") // Missing default property
+ Q_INTERFACES(QDeclarativeParserStatus)
};
QML_DECLARE_TYPE(ParserStatusTestType);
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro
index fc77225..173a302 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro
@@ -4,3 +4,6 @@ SOURCES = plugin.cpp
QT = core declarative
DESTDIR = ../imports/com/nokia/AutoTestQmlPluginType
+symbian: {
+ TARGET.EPOCALLOWDLLDATA=1
+}
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
index d895ed0..29a1009 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro
@@ -2,4 +2,11 @@ load(qttest_p4)
SOURCES = tst_qdeclarativemoduleplugin.cpp
QT += declarative
CONFIG -= app_bundle
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
diff --git a/tests/auto/declarative/qdeclarativemousearea/data/rejectEvent.qml b/tests/auto/declarative/qdeclarativemousearea/data/rejectEvent.qml
new file mode 100644
index 0000000..c01e938
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativemousearea/data/rejectEvent.qml
@@ -0,0 +1,28 @@
+import Qt 4.7
+
+Rectangle {
+ id: root
+ color: "#ffffff"
+ width: 320; height: 240
+ property bool mr1_pressed: false
+ property bool mr1_released: false
+ property bool mr1_canceled: false
+ property bool mr2_pressed: false
+ property bool mr2_released: false
+ property bool mr2_canceled: false
+
+ MouseArea {
+ id: mouseRegion1
+ anchors.fill: parent
+ onPressed: { root.mr1_pressed = true }
+ onReleased: { root.mr1_released = true }
+ onCanceled: { root.mr1_canceled = true }
+ }
+ MouseArea {
+ id: mouseRegion2
+ width: 120; height: 120
+ onPressed: { root.mr2_pressed = true; mouse.accepted = false }
+ onReleased: { root.mr2_released = true }
+ onCanceled: { root.mr2_canceled = true }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
index 48fe025..6f9c98c 100644
--- a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
+++ b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro
@@ -6,7 +6,14 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativemousearea.cpp ../shared/testhttpserver.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
index eb4aa12..ff3bf45 100644
--- a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
+++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
@@ -56,6 +56,8 @@ private slots:
void updateMouseAreaPosOnClick();
void updateMouseAreaPosOnResize();
void noOnClickedWithPressAndHold();
+ void onMousePressRejected();
+
private:
QDeclarativeView *createView();
};
@@ -320,7 +322,7 @@ void tst_QDeclarativeMouseArea::noOnClickedWithPressAndHold()
QTest::qWait(1000);
- QGraphicsSceneMouseEvent releaseEvent(QEvent::GraphicsSceneMousePress);
+ QGraphicsSceneMouseEvent releaseEvent(QEvent::GraphicsSceneMouseRelease);
releaseEvent.setScenePos(QPointF(100, 100));
releaseEvent.setButton(Qt::LeftButton);
releaseEvent.setButtons(Qt::LeftButton);
@@ -330,6 +332,48 @@ void tst_QDeclarativeMouseArea::noOnClickedWithPressAndHold()
QVERIFY(canvas->rootObject()->property("held").toBool());
}
+void tst_QDeclarativeMouseArea::onMousePressRejected()
+{
+ QDeclarativeView *canvas = createView();
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/rejectEvent.qml"));
+ canvas->show();
+ canvas->setFocus();
+ QVERIFY(canvas->rootObject() != 0);
+
+ QVERIFY(!canvas->rootObject()->property("mr1_pressed").toBool());
+ QVERIFY(!canvas->rootObject()->property("mr1_released").toBool());
+ QVERIFY(!canvas->rootObject()->property("mr1_canceled").toBool());
+ QVERIFY(!canvas->rootObject()->property("mr2_pressed").toBool());
+ QVERIFY(!canvas->rootObject()->property("mr2_released").toBool());
+ QVERIFY(!canvas->rootObject()->property("mr2_canceled").toBool());
+
+ QGraphicsScene *scene = canvas->scene();
+ QGraphicsSceneMouseEvent pressEvent(QEvent::GraphicsSceneMousePress);
+ pressEvent.setScenePos(QPointF(100, 100));
+ pressEvent.setButton(Qt::LeftButton);
+ pressEvent.setButtons(Qt::LeftButton);
+ QApplication::sendEvent(scene, &pressEvent);
+
+ QVERIFY(canvas->rootObject()->property("mr1_pressed").toBool());
+ QVERIFY(!canvas->rootObject()->property("mr1_released").toBool());
+ QVERIFY(!canvas->rootObject()->property("mr1_canceled").toBool());
+ QVERIFY(canvas->rootObject()->property("mr2_pressed").toBool());
+ QVERIFY(!canvas->rootObject()->property("mr2_released").toBool());
+ QVERIFY(canvas->rootObject()->property("mr2_canceled").toBool());
+
+ QTest::qWait(200);
+
+ QGraphicsSceneMouseEvent releaseEvent(QEvent::GraphicsSceneMouseRelease);
+ releaseEvent.setScenePos(QPointF(100, 100));
+ releaseEvent.setButton(Qt::LeftButton);
+ releaseEvent.setButtons(Qt::LeftButton);
+ QApplication::sendEvent(scene, &releaseEvent);
+
+ QVERIFY(canvas->rootObject()->property("mr1_released").toBool());
+ QVERIFY(!canvas->rootObject()->property("mr1_canceled").toBool());
+ QVERIFY(!canvas->rootObject()->property("mr2_released").toBool());
+}
+
QTEST_MAIN(tst_QDeclarativeMouseArea)
#include "tst_qdeclarativemousearea.moc"
diff --git a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
index 8a061c3..31172a9 100644
--- a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
+++ b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro
@@ -5,7 +5,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeparticles.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathUpdateOnStartChanged.qml b/tests/auto/declarative/qdeclarativepathview/data/pathUpdateOnStartChanged.qml
new file mode 100644
index 0000000..ce0f0c9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepathview/data/pathUpdateOnStartChanged.qml
@@ -0,0 +1,38 @@
+import Qt 4.7
+
+Rectangle {
+ width: 800
+ height: 480
+ color: "black"
+ resources: [
+ ListModel {
+ id: appModel
+ ListElement { color: "green" }
+ },
+ Component {
+ id: appDelegate
+ Rectangle {
+ id: wrapper
+ objectName: "wrapper"
+ color: "green"
+ width: 100
+ height: 100
+ }
+ }
+ ]
+ PathView {
+ id: pathView
+ objectName: "pathView"
+ model: appModel
+ anchors.fill: parent
+
+ transformOrigin: "Top"
+ delegate: appDelegate
+ path: Path {
+ objectName: "path"
+ startX: pathView.width / 2 // startX: 400 <- this works as expected
+ startY: 300
+ PathLine { x: 400; y: 120 }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview_package.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview_package.qml
new file mode 100644
index 0000000..082da13
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepathview/data/pathview_package.qml
@@ -0,0 +1,88 @@
+import Qt 4.7
+
+Item {
+ width: 800; height: 600
+ Component {
+ id: photoDelegate
+ Package {
+ Item { id: pathItem; objectName: "pathItem"; Package.name: 'path'; width: 85; height: 85; scale: pathItem.PathView.scale }
+ Item { id: linearItem; Package.name: 'linear'; width: 85; height: 85 }
+ Rectangle {
+ id: wrapper
+ width: 85; height: 85; color: lColor
+
+ transform: Rotation {
+ id: itemRotation; origin.x: wrapper.width/2; origin.y: wrapper.height/2
+ axis.y: 1; axis.z: 0
+ }
+ state: 'path'
+ states: [
+ State {
+ name: 'path'
+ ParentChange { target: wrapper; parent: pathItem; x: 0; y: 0 }
+ PropertyChanges { target: wrapper; opacity: pathItem.PathView.onPath ? 1.0 : 0 }
+ }
+ ]
+ }
+ }
+ }
+ ListModel {
+ id: rssModel
+ ListElement { lColor: "red" }
+ ListElement { lColor: "green" }
+ ListElement { lColor: "yellow" }
+ ListElement { lColor: "blue" }
+ ListElement { lColor: "purple" }
+ ListElement { lColor: "gray" }
+ ListElement { lColor: "brown" }
+ ListElement { lColor: "thistle" }
+ }
+ VisualDataModel { id: visualModel; model: rssModel; delegate: photoDelegate }
+
+ PathView {
+ id: photoPathView
+ objectName: "photoPathView"
+ width: 800; height: 330; pathItemCount: 4; offset: 1
+ dragMargin: 24
+ preferredHighlightBegin: 0.50
+ preferredHighlightEnd: 0.50
+
+ path: Path {
+ startX: -50; startY: 40;
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: -45 }
+
+ PathCubic {
+ x: 400; y: 220
+ control1X: 140; control1Y: 40
+ control2X: 210; control2Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 1.2 }
+ PathAttribute { name: "angle"; value: 0 }
+
+ PathCubic {
+ x: 850; y: 40
+ control2X: 660; control2Y: 40
+ control1X: 590; control1Y: 220
+ }
+
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: 45 }
+ }
+
+ model: visualModel.parts.path
+ }
+
+ PathView {
+ y: 400; width: 800; height: 330; pathItemCount: 8
+
+ path: Path {
+ startX: 0; startY: 40;
+ PathLine { x: 800; y: 40 }
+ }
+
+ model: visualModel.parts.linear
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
index 3c327d5..6bef61c 100644
--- a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
+++ b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro
@@ -5,7 +5,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativepathview.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
index 0e3a74d..f32a6c7 100644
--- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
+++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
@@ -77,6 +77,8 @@ private slots:
void pathChanges();
void componentChanges();
void modelChanges();
+ void pathUpdateOnStartChanged();
+ void package();
private:
@@ -436,7 +438,8 @@ void tst_QDeclarativePathView::pathMoved()
for(int i=0; i<model.count(); i++){
QDeclarativeRectangle *curItem = findItem<QDeclarativeRectangle>(pathview, "wrapper", i);
- QCOMPARE(curItem->pos() + offset, path->pointAt(0.25 + i*0.25));
+ QPointF itemPos(path->pointAt(0.25 + i*0.25));
+ QCOMPARE(curItem->pos() + offset, QPointF(qRound(itemPos.x()), qRound(itemPos.y())));
}
pathview->setOffset(0.0);
@@ -477,13 +480,36 @@ void tst_QDeclarativePathView::setCurrentIndex()
QCOMPARE(canvas->rootObject()->property("currentB").toInt(), 0);
pathview->setCurrentIndex(2);
- QTest::qWait(1000);
firstItem = findItem<QDeclarativeRectangle>(pathview, "wrapper", 2);
- QCOMPARE(firstItem->pos() + offset, start);
+ QTRY_COMPARE(firstItem->pos() + offset, start);
QCOMPARE(canvas->rootObject()->property("currentA").toInt(), 2);
QCOMPARE(canvas->rootObject()->property("currentB").toInt(), 2);
+ pathview->decrementCurrentIndex();
+ QTRY_COMPARE(pathview->currentIndex(), 1);
+ firstItem = findItem<QDeclarativeRectangle>(pathview, "wrapper", 1);
+ QVERIFY(firstItem);
+ QTRY_COMPARE(firstItem->pos() + offset, start);
+
+ pathview->decrementCurrentIndex();
+ QTRY_COMPARE(pathview->currentIndex(), 0);
+ firstItem = findItem<QDeclarativeRectangle>(pathview, "wrapper", 0);
+ QVERIFY(firstItem);
+ QTRY_COMPARE(firstItem->pos() + offset, start);
+
+ pathview->decrementCurrentIndex();
+ QTRY_COMPARE(pathview->currentIndex(), 3);
+ firstItem = findItem<QDeclarativeRectangle>(pathview, "wrapper", 3);
+ QVERIFY(firstItem);
+ QTRY_COMPARE(firstItem->pos() + offset, start);
+
+ pathview->incrementCurrentIndex();
+ QTRY_COMPARE(pathview->currentIndex(), 0);
+ firstItem = findItem<QDeclarativeRectangle>(pathview, "wrapper", 0);
+ QVERIFY(firstItem);
+ QTRY_COMPARE(firstItem->pos() + offset, start);
+
delete canvas;
}
@@ -672,6 +698,44 @@ void tst_QDeclarativePathView::modelChanges()
delete canvas;
}
+void tst_QDeclarativePathView::pathUpdateOnStartChanged()
+{
+ QDeclarativeView *canvas = createView();
+ QVERIFY(canvas);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pathUpdateOnStartChanged.qml"));
+
+ QDeclarativePathView *pathView = canvas->rootObject()->findChild<QDeclarativePathView*>("pathView");
+ QVERIFY(pathView);
+
+ QDeclarativePath *path = canvas->rootObject()->findChild<QDeclarativePath*>("path");
+ QVERIFY(path);
+ QCOMPARE(path->startX(), 400.0);
+ QCOMPARE(path->startY(), 300.0);
+
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(pathView, "wrapper", 0);
+ QVERIFY(item);
+ QCOMPARE(item->x(), path->startX() - item->width() / 2.0);
+ QCOMPARE(item->y(), path->startY() - item->height() / 2.0);
+
+ delete canvas;
+}
+
+void tst_QDeclarativePathView::package()
+{
+ QDeclarativeView *canvas = createView();
+ QVERIFY(canvas);
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pathview_package.qml"));
+
+ QDeclarativePathView *pathView = canvas->rootObject()->findChild<QDeclarativePathView*>("photoPathView");
+ QVERIFY(pathView);
+
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(pathView, "pathItem");
+ QVERIFY(item);
+ QVERIFY(item->scale() != 1.0);
+
+ delete canvas;
+}
+
QDeclarativeView *tst_QDeclarativePathView::createView()
{
QDeclarativeView *canvas = new QDeclarativeView(0);
@@ -696,7 +760,7 @@ T *tst_QDeclarativePathView::findItem(QGraphicsObject *parent, const QString &ob
//qDebug() << "try" << item;
if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
if (index != -1) {
- QDeclarativeExpression e(qmlContext(item), "index", item);
+ QDeclarativeExpression e(qmlContext(item), item, "index");
if (e.evaluate().toInt() == index)
return static_cast<T*>(item);
} else {
diff --git a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
index 4b247fc..99a94bc 100644
--- a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
+++ b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro
@@ -9,7 +9,14 @@ INCLUDEPATH += ../shared/
HEADERS += ../shared/testhttpserver.h
SOURCES += ../shared/testhttpserver.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
diff --git a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
index dbe2cbee..2c5b473 100644
--- a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
+++ b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro
@@ -4,7 +4,14 @@ SOURCES += tst_qdeclarativepositioners.cpp
macx:CONFIG -= app_bundle
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
index b4ac0e1..e639014 100644
--- a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
+++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
@@ -41,6 +41,7 @@
#include <QtTest/QtTest>
#include <private/qlistmodelinterface_p.h>
#include <qdeclarativeview.h>
+#include <qdeclarativeengine.h>
#include <private/qdeclarativerectangle_p.h>
#include <private/qdeclarativepositioners_p.h>
#include <private/qdeclarativetransition_p.h>
@@ -69,6 +70,7 @@ private slots:
void test_repeater();
void test_flow();
void test_flow_resize();
+ void test_conflictinganchors();
private:
QDeclarativeView *createView(const QString &filename);
};
@@ -100,6 +102,8 @@ void tst_QDeclarativePositioners::test_horizontal()
QDeclarativeItem *row = canvas->rootObject()->findChild<QDeclarativeItem*>("row");
QCOMPARE(row->width(), 110.0);
QCOMPARE(row->height(), 50.0);
+
+ delete canvas;
}
void tst_QDeclarativePositioners::test_horizontal_spacing()
@@ -125,6 +129,8 @@ void tst_QDeclarativePositioners::test_horizontal_spacing()
QDeclarativeItem *row = canvas->rootObject()->findChild<QDeclarativeItem*>("row");
QCOMPARE(row->width(), 130.0);
QCOMPARE(row->height(), 50.0);
+
+ delete canvas;
}
void tst_QDeclarativePositioners::test_horizontal_animated()
@@ -175,6 +181,8 @@ void tst_QDeclarativePositioners::test_horizontal_animated()
QTRY_COMPARE(two->x(), 50.0);
QTRY_COMPARE(three->x(), 100.0);
+
+ delete canvas;
}
void tst_QDeclarativePositioners::test_vertical()
@@ -201,6 +209,8 @@ void tst_QDeclarativePositioners::test_vertical()
QVERIFY(column);
QCOMPARE(column->height(), 80.0);
QCOMPARE(column->width(), 50.0);
+
+ delete canvas;
}
void tst_QDeclarativePositioners::test_vertical_spacing()
@@ -226,6 +236,8 @@ void tst_QDeclarativePositioners::test_vertical_spacing()
QDeclarativeItem *column = canvas->rootObject()->findChild<QDeclarativeItem*>("column");
QCOMPARE(column->height(), 100.0);
QCOMPARE(column->width(), 50.0);
+
+ delete canvas;
}
void tst_QDeclarativePositioners::test_vertical_animated()
@@ -273,6 +285,7 @@ void tst_QDeclarativePositioners::test_vertical_animated()
QTRY_COMPARE(two->y(), 50.0);
QTRY_COMPARE(three->y(), 100.0);
+ delete canvas;
}
void tst_QDeclarativePositioners::test_grid()
@@ -304,6 +317,8 @@ void tst_QDeclarativePositioners::test_grid()
QDeclarativeItem *grid = canvas->rootObject()->findChild<QDeclarativeItem*>("grid");
QCOMPARE(grid->width(), 120.0);
QCOMPARE(grid->height(), 100.0);
+
+ delete canvas;
}
void tst_QDeclarativePositioners::test_grid_topToBottom()
@@ -335,6 +350,8 @@ void tst_QDeclarativePositioners::test_grid_topToBottom()
QDeclarativeItem *grid = canvas->rootObject()->findChild<QDeclarativeItem*>("grid");
QCOMPARE(grid->width(), 100.0);
QCOMPARE(grid->height(), 120.0);
+
+ delete canvas;
}
void tst_QDeclarativePositioners::test_grid_spacing()
@@ -366,6 +383,8 @@ void tst_QDeclarativePositioners::test_grid_spacing()
QDeclarativeItem *grid = canvas->rootObject()->findChild<QDeclarativeItem*>("grid");
QCOMPARE(grid->width(), 128.0);
QCOMPARE(grid->height(), 104.0);
+
+ delete canvas;
}
void tst_QDeclarativePositioners::test_grid_animated()
@@ -446,6 +465,7 @@ void tst_QDeclarativePositioners::test_grid_animated()
QTRY_COMPARE(five->x(), 50.0);
QTRY_COMPARE(five->y(), 50.0);
+ delete canvas;
}
void tst_QDeclarativePositioners::test_grid_zero_columns()
@@ -477,6 +497,8 @@ void tst_QDeclarativePositioners::test_grid_zero_columns()
QDeclarativeItem *grid = canvas->rootObject()->findChild<QDeclarativeItem*>("grid");
QCOMPARE(grid->width(), 170.0);
QCOMPARE(grid->height(), 60.0);
+
+ delete canvas;
}
void tst_QDeclarativePositioners::test_propertychanges()
@@ -534,6 +556,8 @@ void tst_QDeclarativePositioners::test_propertychanges()
grid->setRows(2);
QCOMPARE(columnsSpy.count(),2);
QCOMPARE(rowsSpy.count(),2);
+
+ delete canvas;
}
void tst_QDeclarativePositioners::test_repeater()
@@ -555,6 +579,8 @@ void tst_QDeclarativePositioners::test_repeater()
QCOMPARE(two->y(), 0.0);
QCOMPARE(three->x(), 100.0);
QCOMPARE(three->y(), 0.0);
+
+ delete canvas;
}
void tst_QDeclarativePositioners::test_flow()
@@ -587,6 +613,8 @@ void tst_QDeclarativePositioners::test_flow()
QVERIFY(flow);
QCOMPARE(flow->width(), 90.0);
QCOMPARE(flow->height(), 120.0);
+
+ delete canvas;
}
void tst_QDeclarativePositioners::test_flow_resize()
@@ -618,6 +646,101 @@ void tst_QDeclarativePositioners::test_flow_resize()
QCOMPARE(four->y(), 50.0);
QCOMPARE(five->x(), 50.0);
QCOMPARE(five->y(), 50.0);
+
+ delete canvas;
+}
+
+QString warningMessage;
+
+void interceptWarnings(QtMsgType type, const char *msg)
+{
+ Q_UNUSED( type );
+ warningMessage = msg;
+}
+
+void tst_QDeclarativePositioners::test_conflictinganchors()
+{
+ qInstallMsgHandler(interceptWarnings);
+ QDeclarativeEngine engine;
+ QDeclarativeComponent component(&engine);
+
+ component.setData("import Qt 4.7\nColumn { Item {} }", QUrl::fromLocalFile(""));
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QVERIFY(warningMessage.isEmpty());
+
+ component.setData("import Qt 4.7\nRow { Item {} }", QUrl::fromLocalFile(""));
+ item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QVERIFY(warningMessage.isEmpty());
+
+ component.setData("import Qt 4.7\nGrid { Item {} }", QUrl::fromLocalFile(""));
+ item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QVERIFY(warningMessage.isEmpty());
+
+ component.setData("import Qt 4.7\nFlow { Item {} }", QUrl::fromLocalFile(""));
+ item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QVERIFY(warningMessage.isEmpty());
+
+ component.setData("import Qt 4.7\nColumn { Item { anchors.top: parent.top } }", QUrl::fromLocalFile(""));
+ item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QCOMPARE(warningMessage, QString("file::2:1: QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column"));
+ warningMessage.clear();
+
+ component.setData("import Qt 4.7\nColumn { Item { anchors.centerIn: parent } }", QUrl::fromLocalFile(""));
+ item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QCOMPARE(warningMessage, QString("file::2:1: QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column"));
+ warningMessage.clear();
+
+ component.setData("import Qt 4.7\nColumn { Item { anchors.left: parent.left } }", QUrl::fromLocalFile(""));
+ item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QVERIFY(warningMessage.isEmpty());
+ warningMessage.clear();
+
+ component.setData("import Qt 4.7\nRow { Item { anchors.left: parent.left } }", QUrl::fromLocalFile(""));
+ item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QCOMPARE(warningMessage, QString("file::2:1: QML Row: Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row"));
+ warningMessage.clear();
+
+ component.setData("import Qt 4.7\nRow { Item { anchors.fill: parent } }", QUrl::fromLocalFile(""));
+ item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QCOMPARE(warningMessage, QString("file::2:1: QML Row: Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row"));
+ warningMessage.clear();
+
+ component.setData("import Qt 4.7\nRow { Item { anchors.top: parent.top } }", QUrl::fromLocalFile(""));
+ item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QVERIFY(warningMessage.isEmpty());
+ warningMessage.clear();
+
+ component.setData("import Qt 4.7\nGrid { Item { anchors.horizontalCenter: parent.horizontalCenter } }", QUrl::fromLocalFile(""));
+ item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QCOMPARE(warningMessage, QString("file::2:1: QML Grid: Cannot specify anchors for items inside Grid"));
+ warningMessage.clear();
+
+ component.setData("import Qt 4.7\nGrid { Item { anchors.centerIn: parent } }", QUrl::fromLocalFile(""));
+ item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QCOMPARE(warningMessage, QString("file::2:1: QML Grid: Cannot specify anchors for items inside Grid"));
+ warningMessage.clear();
+
+ component.setData("import Qt 4.7\nFlow { Item { anchors.verticalCenter: parent.verticalCenter } }", QUrl::fromLocalFile(""));
+ item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QCOMPARE(warningMessage, QString("file::2:1: QML Flow: Cannot specify anchors for items inside Flow"));
+
+ component.setData("import Qt 4.7\nFlow { Item { anchors.fill: parent } }", QUrl::fromLocalFile(""));
+ item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+ QCOMPARE(warningMessage, QString("file::2:1: QML Flow: Cannot specify anchors for items inside Flow"));
}
QDeclarativeView *tst_QDeclarativePositioners::createView(const QString &filename)
diff --git a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
index 6910ccc..f37d952 100644
--- a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
+++ b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro
@@ -4,7 +4,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeproperty.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeqt/data/darker.qml b/tests/auto/declarative/qdeclarativeqt/data/darker.qml
index f6333fe..738095d 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/darker.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/darker.qml
@@ -3,9 +3,10 @@ import Qt 4.7
QtObject {
property variant test1: Qt.darker(Qt.rgba(1, 0.8, 0.3))
property variant test2: Qt.darker()
- property variant test3: Qt.darker(Qt.rgba(1, 0.8, 0.3), 10)
+ property variant test3: Qt.darker(Qt.rgba(1, 0.8, 0.3), 2.8)
property variant test4: Qt.darker("red");
property variant test5: Qt.darker("perfectred"); // Non-existant color
property variant test6: Qt.darker(10);
+ property variant test7: Qt.darker(Qt.rgba(1, 0.8, 0.3), 2.8, 10)
}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/fontFamilies.qml b/tests/auto/declarative/qdeclarativeqt/data/fontFamilies.qml
new file mode 100644
index 0000000..e66c7be
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeqt/data/fontFamilies.qml
@@ -0,0 +1,6 @@
+import Qt 4.7
+
+QtObject {
+ property variant test1: Qt.fontFamilies(10)
+ property variant test2: Qt.fontFamilies();
+}
diff --git a/tests/auto/declarative/qdeclarativeqt/data/lighter.qml b/tests/auto/declarative/qdeclarativeqt/data/lighter.qml
index 6c0053ba..ddaf78d 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/lighter.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/lighter.qml
@@ -3,8 +3,9 @@ import Qt 4.7
QtObject {
property variant test1: Qt.lighter(Qt.rgba(1, 0.8, 0.3))
property variant test2: Qt.lighter()
- property variant test3: Qt.lighter(Qt.rgba(1, 0.8, 0.3), 10)
+ property variant test3: Qt.lighter(Qt.rgba(1, 0.8, 0.3), 1.8)
property variant test4: Qt.lighter("red");
property variant test5: Qt.lighter("perfectred"); // Non-existant color
property variant test6: Qt.lighter(10);
+ property variant test7: Qt.lighter(Qt.rgba(1, 0.8, 0.3), 1.8, 5)
}
diff --git a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
index 10e10a3..b381a9b 100644
--- a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
+++ b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro
@@ -3,7 +3,14 @@ contains(QT_CONFIG,declarative): QT += declarative
SOURCES += tst_qdeclarativeqt.cpp
macx:CONFIG -= app_bundle
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index 7cbd8db..5095be8 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -42,6 +42,7 @@
#include <qtest.h>
#include <QDebug>
#include <QDeclarativeEngine>
+#include <QFontDatabase>
#include <QFileInfo>
#include <QDeclarativeComponent>
#include <QDesktopServices>
@@ -76,6 +77,7 @@ private slots:
void isQtObject();
void btoa();
void atob();
+ void fontFamilies();
private:
QDeclarativeEngine engine;
@@ -232,7 +234,7 @@ void tst_qdeclarativeqt::lighter()
QDeclarativeComponent component(&engine, TEST_FILE("lighter.qml"));
QString warning1 = component.url().toString() + ":5: Error: Qt.lighter(): Invalid arguments";
- QString warning2 = component.url().toString() + ":6: Error: Qt.lighter(): Invalid arguments";
+ QString warning2 = component.url().toString() + ":10: Error: Qt.lighter(): Invalid arguments";
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
@@ -241,7 +243,7 @@ void tst_qdeclarativeqt::lighter()
QCOMPARE(qvariant_cast<QColor>(object->property("test1")), QColor::fromRgbF(1, 0.8, 0.3).lighter());
QCOMPARE(qvariant_cast<QColor>(object->property("test2")), QColor());
- QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor::fromRgbF(1, 0.8, 0.3).lighter(180));
QCOMPARE(qvariant_cast<QColor>(object->property("test4")), QColor("red").lighter());
QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor());
QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor());
@@ -254,7 +256,7 @@ void tst_qdeclarativeqt::darker()
QDeclarativeComponent component(&engine, TEST_FILE("darker.qml"));
QString warning1 = component.url().toString() + ":5: Error: Qt.darker(): Invalid arguments";
- QString warning2 = component.url().toString() + ":6: Error: Qt.darker(): Invalid arguments";
+ QString warning2 = component.url().toString() + ":10: Error: Qt.darker(): Invalid arguments";
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
@@ -263,7 +265,7 @@ void tst_qdeclarativeqt::darker()
QCOMPARE(qvariant_cast<QColor>(object->property("test1")), QColor::fromRgbF(1, 0.8, 0.3).darker());
QCOMPARE(qvariant_cast<QColor>(object->property("test2")), QColor());
- QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor());
+ QCOMPARE(qvariant_cast<QColor>(object->property("test3")), QColor::fromRgbF(1, 0.8, 0.3).darker(280));
QCOMPARE(qvariant_cast<QColor>(object->property("test4")), QColor("red").darker());
QCOMPARE(qvariant_cast<QColor>(object->property("test5")), QColor());
QCOMPARE(qvariant_cast<QColor>(object->property("test6")), QColor());
@@ -483,6 +485,22 @@ void tst_qdeclarativeqt::atob()
delete object;
}
+void tst_qdeclarativeqt::fontFamilies()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("fontFamilies.qml"));
+
+ QString warning1 = component.url().toString() + ":4: Error: Qt.fontFamilies(): Invalid arguments";
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QFontDatabase database;
+ QCOMPARE(object->property("test2"), QVariant::fromValue(database.families()));
+
+ delete object;
+}
+
QTEST_MAIN(tst_qdeclarativeqt)
#include "tst_qdeclarativeqt.moc"
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml b/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml
index 17c5d8d..e1bd2e2 100644
--- a/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml
+++ b/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml
@@ -14,7 +14,7 @@ Rectangle {
property int instantiated: 0
Component {
Item{
- Component.onCompleted: {if(index!=model.idx) repeater.errors += 1; repeater.instantiated++}
+ Component.onCompleted: {if(index!=modelData.idx) repeater.errors += 1; repeater.instantiated++}
}
}
}
diff --git a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
index abd36e0..51667af 100644
--- a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
+++ b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro
@@ -5,6 +5,13 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativerepeater.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
index 8be7d80..e6b2fdd 100644
--- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
+++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
@@ -185,15 +185,24 @@ void tst_QDeclarativeRepeater::numberModel()
delete canvas;
}
+class MyObject : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int idx READ idx CONSTANT)
+public:
+ MyObject(int i) : QObject(), m_idx(i) {}
+
+ int idx() const { return m_idx; }
+
+ int m_idx;
+};
+
void tst_QDeclarativeRepeater::objectList()
{
QDeclarativeView *canvas = createView();
-
QObjectList data;
- for(int i=0; i<100; i++){
- data << new QObject();
- data.back()->setProperty("idx", i);
- }
+ for(int i=0; i<100; i++)
+ data << new MyObject(i);
QDeclarativeContext *ctxt = canvas->rootContext();
ctxt->setContextProperty("testData", QVariant::fromValue(data));
diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
index 80b757d..6b98f1e 100644
--- a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
+++ b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro
@@ -5,7 +5,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesmoothedanimation.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro b/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro
index 7f737c2..eb7d793 100644
--- a/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro
+++ b/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro
@@ -5,7 +5,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesmoothedfollow.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro b/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
index 6f400a3..6ed8924 100644
--- a/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
+++ b/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro
@@ -5,7 +5,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativespringfollow.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
index 3ff4529..9cdb884 100644
--- a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
+++ b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro
@@ -6,7 +6,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesqldatabase.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml
new file mode 100644
index 0000000..2215ee4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml
@@ -0,0 +1,24 @@
+import Qt 4.7
+
+Rectangle {
+ id: myRect
+ width: 400
+ height: 400
+
+ states: [
+ State {
+ name: "state1"
+ PropertyChanges {
+ target: myRect
+ onHeightChanged: console.log("Hello World")
+ color: "green"
+ }
+ },
+ State {
+ name: "state2"; extend: "state1"
+ PropertyChanges {
+ target: myRect
+ color: "red"
+ }
+ }]
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml b/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml
new file mode 100644
index 0000000..a70840c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml
@@ -0,0 +1,14 @@
+import Qt 4.7
+
+Rectangle {
+ id: theRect
+ property bool triggerState: false
+ property string stateString: ""
+ states: State {
+ when: triggerState
+ PropertyChanges {
+ target: theRect
+ stateString: "inState"
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
index 706d045..6f4ecb3 100644
--- a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
+++ b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro
@@ -5,6 +5,13 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativestates.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index a016fa7..ea074a4 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -47,6 +47,7 @@
#include <private/qdeclarativetext_p.h>
#include <private/qdeclarativepropertychanges_p.h>
#include <private/qdeclarativestategroup_p.h>
+#include <private/qdeclarativeitem_p.h>
class MyRect : public QDeclarativeRectangle
@@ -86,6 +87,7 @@ private slots:
void basicBinding();
void signalOverride();
void signalOverrideCrash();
+ void signalOverrideCrash2();
void parentChange();
void parentChangeErrors();
void anchorChanges();
@@ -109,6 +111,7 @@ private slots:
void illegalObjectCreation();
void whenOrdering();
void urlResolution();
+ void unnamedWhen();
};
void tst_qdeclarativestates::initTestCase()
@@ -128,63 +131,66 @@ void tst_qdeclarativestates::basicChanges()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicChanges.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
}
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicChanges2.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("green");
+ rectPrivate->setState("green");
QCOMPARE(rect->color(),QColor("green"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("green");
+ rectPrivate->setState("green");
QCOMPARE(rect->color(),QColor("green"));
}
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicChanges3.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
QCOMPARE(rect->border()->width(),1);
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
QCOMPARE(rect->border()->width(),1);
- rect->setState("bordered");
+ rectPrivate->setState("bordered");
QCOMPARE(rect->color(),QColor("red"));
QCOMPARE(rect->border()->width(),2);
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
QCOMPARE(rect->border()->width(),1);
//### we should be checking that this is an implicit rather than explicit 1 (which currently fails)
- rect->setState("bordered");
+ rectPrivate->setState("bordered");
QCOMPARE(rect->color(),QColor("red"));
QCOMPARE(rect->border()->width(),2);
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
QCOMPARE(rect->border()->width(),1);
@@ -220,32 +226,33 @@ void tst_qdeclarativestates::basicExtension()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicExtension.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
QCOMPARE(rect->border()->width(),1);
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
QCOMPARE(rect->border()->width(),1);
- rect->setState("bordered");
+ rectPrivate->setState("bordered");
QCOMPARE(rect->color(),QColor("blue"));
QCOMPARE(rect->border()->width(),2);
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
QCOMPARE(rect->border()->width(),1);
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
QCOMPARE(rect->border()->width(),1);
- rect->setState("bordered");
+ rectPrivate->setState("bordered");
QCOMPARE(rect->color(),QColor("blue"));
QCOMPARE(rect->border()->width(),2);
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
QCOMPARE(rect->border()->width(),1);
}
@@ -253,26 +260,27 @@ void tst_qdeclarativestates::basicExtension()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/fakeExtension.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("green");
+ rectPrivate->setState("green");
QCOMPARE(rect->color(),QColor("green"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("green");
+ rectPrivate->setState("green");
QCOMPARE(rect->color(),QColor("green"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("green");
+ rectPrivate->setState("green");
QCOMPARE(rect->color(),QColor("green"));
}
}
@@ -284,77 +292,80 @@ void tst_qdeclarativestates::basicBinding()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicBinding.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
rect->setProperty("sourceColor", QColor("green"));
QCOMPARE(rect->color(),QColor("green"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
rect->setProperty("sourceColor", QColor("yellow"));
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("yellow"));
}
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicBinding2.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
rect->setProperty("sourceColor", QColor("green"));
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("green"));
rect->setProperty("sourceColor", QColor("yellow"));
QCOMPARE(rect->color(),QColor("yellow"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("yellow"));
}
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicBinding3.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
rect->setProperty("sourceColor", QColor("green"));
QCOMPARE(rect->color(),QColor("green"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
rect->setProperty("sourceColor", QColor("red"));
QCOMPARE(rect->color(),QColor("blue"));
rect->setProperty("sourceColor2", QColor("yellow"));
QCOMPARE(rect->color(),QColor("yellow"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
rect->setProperty("sourceColor2", QColor("green"));
QCOMPARE(rect->color(),QColor("red"));
@@ -365,27 +376,28 @@ void tst_qdeclarativestates::basicBinding()
{
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicBinding4.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QVERIFY(rect != 0);
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
rect->setProperty("sourceColor", QColor("yellow"));
QCOMPARE(rect->color(),QColor("yellow"));
- rect->setState("green");
+ rectPrivate->setState("green");
QCOMPARE(rect->color(),QColor("green"));
rect->setProperty("sourceColor", QColor("purple"));
QCOMPARE(rect->color(),QColor("green"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("purple"));
- rect->setState("green");
+ rectPrivate->setState("green");
QCOMPARE(rect->color(),QColor("green"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
}
}
@@ -403,7 +415,7 @@ void tst_qdeclarativestates::signalOverride()
rect->doSomething();
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("green");
+ QDeclarativeItemPrivate::get(rect)->setState("green");
rect->doSomething();
QCOMPARE(rect->color(),QColor("green"));
}
@@ -418,8 +430,7 @@ void tst_qdeclarativestates::signalOverride()
QCOMPARE(rect->color(),QColor("blue"));
QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("extendedRect"));
-
- innerRect->setState("green");
+ QDeclarativeItemPrivate::get(innerRect)->setState("green");
rect->doSomething();
QCOMPARE(rect->color(),QColor("blue"));
QCOMPARE(innerRect->color(),QColor("green"));
@@ -435,10 +446,25 @@ void tst_qdeclarativestates::signalOverrideCrash()
MyRect *rect = qobject_cast<MyRect*>(rectComponent.create());
QVERIFY(rect != 0);
- rect->setState("overridden");
+ QDeclarativeItemPrivate::get(rect)->setState("overridden");
rect->doSomething();
}
+void tst_qdeclarativestates::signalOverrideCrash2()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/signalOverrideCrash2.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
+ QVERIFY(rect != 0);
+
+ QDeclarativeItemPrivate::get(rect)->setState("state1");
+ QDeclarativeItemPrivate::get(rect)->setState("state2");
+ QDeclarativeItemPrivate::get(rect)->setState("state1");
+
+ delete rect;
+}
+
void tst_qdeclarativestates::parentChange()
{
QDeclarativeEngine engine;
@@ -463,7 +489,7 @@ void tst_qdeclarativestates::parentChange()
QCOMPARE(pChange->parent(), nParent);
- rect->setState("reparented");
+ QDeclarativeItemPrivate::get(rect)->setState("reparented");
QCOMPARE(innerRect->rotation(), qreal(0));
QCOMPARE(innerRect->scale(), qreal(1));
QCOMPARE(innerRect->x(), qreal(-133));
@@ -474,11 +500,11 @@ void tst_qdeclarativestates::parentChange()
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange2.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
-
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
- rect->setState("reparented");
+ rectPrivate->setState("reparented");
QCOMPARE(innerRect->rotation(), qreal(15));
QCOMPARE(innerRect->scale(), qreal(.5));
QCOMPARE(QString("%1").arg(innerRect->x()), QString("%1").arg(-19.9075));
@@ -489,17 +515,17 @@ void tst_qdeclarativestates::parentChange()
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/parentChange3.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
-
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
- rect->setState("reparented");
+ rectPrivate->setState("reparented");
QCOMPARE(innerRect->rotation(), qreal(-37));
QCOMPARE(innerRect->scale(), qreal(.25));
QCOMPARE(QString("%1").arg(innerRect->x()), QString("%1").arg(-217.305));
QCOMPARE(QString("%1").arg(innerRect->y()), QString("%1").arg(-164.413));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(innerRect->rotation(), qreal(0));
QCOMPARE(innerRect->scale(), qreal(1));
QCOMPARE(innerRect->x(), qreal(5));
@@ -521,7 +547,7 @@ void tst_qdeclarativestates::parentChangeErrors()
QVERIFY(innerRect != 0);
QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/parentChange4.qml") + ":25:9: QML ParentChange: Unable to preserve appearance under non-uniform scale");
- rect->setState("reparented");
+ QDeclarativeItemPrivate::get(rect)->setState("reparented");
QCOMPARE(innerRect->rotation(), qreal(0));
QCOMPARE(innerRect->scale(), qreal(1));
QCOMPARE(innerRect->x(), qreal(5));
@@ -537,7 +563,7 @@ void tst_qdeclarativestates::parentChangeErrors()
QVERIFY(innerRect != 0);
QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/parentChange5.qml") + ":25:9: QML ParentChange: Unable to preserve appearance under complex transform");
- rect->setState("reparented");
+ QDeclarativeItemPrivate::get(rect)->setState("reparented");
QCOMPARE(innerRect->rotation(), qreal(0));
QCOMPARE(innerRect->scale(), qreal(1));
QCOMPARE(innerRect->x(), qreal(5));
@@ -552,6 +578,7 @@ void tst_qdeclarativestates::anchorChanges()
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges1.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
@@ -564,14 +591,14 @@ void tst_qdeclarativestates::anchorChanges()
QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
QVERIFY(aChanges != 0);
- rect->setState("right");
+ rectPrivate->setState("right");
QCOMPARE(innerRect->x(), qreal(150));
QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
- QCOMPARE(aChanges->object()->anchors()->left().anchorLine, QDeclarativeAnchorLine::Invalid); //### was reset (how do we distinguish from not set at all)
- QCOMPARE(aChanges->object()->anchors()->right().item, rect->right().item);
- QCOMPARE(aChanges->object()->anchors()->right().anchorLine, rect->right().anchorLine);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QDeclarativeAnchorLine::Invalid); //### was reset (how do we distinguish from not set at all)
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine);
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(innerRect->x(), qreal(5));
delete rect;
@@ -584,14 +611,15 @@ void tst_qdeclarativestates::anchorChanges2()
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges2.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
- rect->setState("right");
+ rectPrivate->setState("right");
QCOMPARE(innerRect->x(), qreal(150));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(innerRect->x(), qreal(5));
delete rect;
@@ -604,6 +632,7 @@ void tst_qdeclarativestates::anchorChanges3()
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/anchorChanges3.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QDeclarativeRectangle *innerRect = qobject_cast<QDeclarativeRectangle*>(rect->findChild<QDeclarativeRectangle*>("MyRect"));
QVERIFY(innerRect != 0);
@@ -622,23 +651,23 @@ void tst_qdeclarativestates::anchorChanges3()
QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
QVERIFY(aChanges != 0);
- rect->setState("reanchored");
+ rectPrivate->setState("reanchored");
QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
- QCOMPARE(aChanges->object()->anchors()->left().item, leftGuideline->left().item);
- QCOMPARE(aChanges->object()->anchors()->left().anchorLine, leftGuideline->left().anchorLine);
- QCOMPARE(aChanges->object()->anchors()->right().item, rect->right().item);
- QCOMPARE(aChanges->object()->anchors()->right().anchorLine, rect->right().anchorLine);
- QCOMPARE(aChanges->object()->anchors()->top().item, rect->top().item);
- QCOMPARE(aChanges->object()->anchors()->top().anchorLine, rect->top().anchorLine);
- QCOMPARE(aChanges->object()->anchors()->bottom().item, bottomGuideline->bottom().item);
- QCOMPARE(aChanges->object()->anchors()->bottom().anchorLine, bottomGuideline->bottom().anchorLine);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->left().item, QDeclarativeItemPrivate::get(leftGuideline)->left().item);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->left().anchorLine, QDeclarativeItemPrivate::get(leftGuideline)->left().anchorLine);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->right().item, rectPrivate->right().item);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->right().anchorLine, rectPrivate->right().anchorLine);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->top().item, rectPrivate->top().item);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->top().anchorLine, rectPrivate->top().anchorLine);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->bottom().item, QDeclarativeItemPrivate::get(bottomGuideline)->bottom().item);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->bottom().anchorLine, QDeclarativeItemPrivate::get(bottomGuideline)->bottom().anchorLine);
QCOMPARE(innerRect->x(), qreal(10));
QCOMPARE(innerRect->y(), qreal(0));
QCOMPARE(innerRect->width(), qreal(190));
QCOMPARE(innerRect->height(), qreal(150));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(innerRect->x(), qreal(0));
QCOMPARE(innerRect->y(), qreal(10));
QCOMPARE(innerRect->width(), qreal(150));
@@ -672,12 +701,12 @@ void tst_qdeclarativestates::anchorChanges4()
QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
QVERIFY(aChanges != 0);
- rect->setState("reanchored");
+ QDeclarativeItemPrivate::get(rect)->setState("reanchored");
QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
- QCOMPARE(aChanges->object()->anchors()->horizontalCenter().item, bottomGuideline->horizontalCenter().item);
- QCOMPARE(aChanges->object()->anchors()->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine);
- QCOMPARE(aChanges->object()->anchors()->verticalCenter().item, leftGuideline->verticalCenter().item);
- QCOMPARE(aChanges->object()->anchors()->verticalCenter().anchorLine, leftGuideline->verticalCenter().anchorLine);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->horizontalCenter().item, QDeclarativeItemPrivate::get(bottomGuideline)->horizontalCenter().item);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->horizontalCenter().anchorLine, QDeclarativeItemPrivate::get(bottomGuideline)->horizontalCenter().anchorLine);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->verticalCenter().item, QDeclarativeItemPrivate::get(leftGuideline)->verticalCenter().item);
+ QCOMPARE(QDeclarativeItemPrivate::get(aChanges->object())->anchors()->verticalCenter().anchorLine, QDeclarativeItemPrivate::get(leftGuideline)->verticalCenter().anchorLine);
delete rect;
}
@@ -707,7 +736,7 @@ void tst_qdeclarativestates::anchorChanges5()
QDeclarativeAnchorChanges *aChanges = qobject_cast<QDeclarativeAnchorChanges*>(state->operationAt(0));
QVERIFY(aChanges != 0);
- rect->setState("reanchored");
+ QDeclarativeItemPrivate::get(rect)->setState("reanchored");
QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
//QCOMPARE(aChanges->anchors()->horizontalCenter().item, bottomGuideline->horizontalCenter().item);
//QCOMPARE(aChanges->anchors()->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine);
@@ -726,7 +755,7 @@ void tst_qdeclarativestates::anchorChangesCrash()
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
- rect->setState("reanchored");
+ QDeclarativeItemPrivate::get(rect)->setState("reanchored");
delete rect;
}
@@ -739,13 +768,13 @@ void tst_qdeclarativestates::script()
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/script.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
-
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("blue")); // a script isn't reverted
}
}
@@ -757,13 +786,13 @@ void tst_qdeclarativestates::restoreEntryValues()
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/restoreEntryValues.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
-
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("blue"));
}
@@ -774,7 +803,7 @@ void tst_qdeclarativestates::explicitChanges()
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/explicit.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
-
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QDeclarativeListReference list(rect, "states");
QDeclarativeState *state = qobject_cast<QDeclarativeState*>(list.at(0));
QVERIFY(state != 0);
@@ -786,18 +815,18 @@ void tst_qdeclarativestates::explicitChanges()
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
rect->setProperty("sourceColor", QColor("green"));
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
rect->setProperty("sourceColor", QColor("yellow"));
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("yellow"));
}
@@ -812,7 +841,7 @@ void tst_qdeclarativestates::propertyErrors()
QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/propertyErrors.qml") + ":8:9: QML PropertyChanges: Cannot assign to non-existent property \"colr\"");
QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/propertyErrors.qml") + ":8:9: QML PropertyChanges: Cannot assign to read-only property \"wantsFocus\"");
- rect->setState("blue");
+ QDeclarativeItemPrivate::get(rect)->setState("blue");
}
void tst_qdeclarativestates::incorrectRestoreBug()
@@ -822,22 +851,22 @@ void tst_qdeclarativestates::incorrectRestoreBug()
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/basicChanges.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
-
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QCOMPARE(rect->color(),QColor("red"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
// make sure if we change the base state value, we then restore to it correctly
rect->setColor(QColor("green"));
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("green"));
}
@@ -865,12 +894,12 @@ void tst_qdeclarativestates::deletingChange()
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/deleting.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
-
- rect->setState("blue");
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("blue"));
QCOMPARE(rect->radius(),qreal(5));
- rect->setState("");
+ rectPrivate->setState("");
QCOMPARE(rect->color(),QColor("red"));
QCOMPARE(rect->radius(),qreal(0));
@@ -883,7 +912,7 @@ void tst_qdeclarativestates::deletingChange()
qmlExecuteDeferred(state);
QCOMPARE(state->operationCount(), 1);
- rect->setState("blue");
+ rectPrivate->setState("blue");
QCOMPARE(rect->color(),QColor("red"));
QCOMPARE(rect->radius(),qreal(5));
@@ -928,11 +957,11 @@ void tst_qdeclarativestates::tempState()
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/legalTempState.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
-
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QTest::ignoreMessage(QtDebugMsg, "entering placed");
QTest::ignoreMessage(QtDebugMsg, "entering idle");
- rect->setState("placed");
- QCOMPARE(rect->state(), QLatin1String("idle"));
+ rectPrivate->setState("placed");
+ QCOMPARE(rectPrivate->state(), QLatin1String("idle"));
}
void tst_qdeclarativestates::illegalTempState()
@@ -942,10 +971,10 @@ void tst_qdeclarativestates::illegalTempState()
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/illegalTempState.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
-
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QTest::ignoreMessage(QtWarningMsg, "<Unknown File>: QML StateGroup: Can't apply a state change as part of a state definition.");
- rect->setState("placed");
- QCOMPARE(rect->state(), QLatin1String("placed"));
+ rectPrivate->setState("placed");
+ QCOMPARE(rectPrivate->state(), QLatin1String("placed"));
}
void tst_qdeclarativestates::nonExistantProperty()
@@ -955,10 +984,10 @@ void tst_qdeclarativestates::nonExistantProperty()
QDeclarativeComponent rectComponent(&engine, SRCDIR "/data/nonExistantProp.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(rectComponent.create());
QVERIFY(rect != 0);
-
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
QTest::ignoreMessage(QtWarningMsg, fullDataPath("/data/nonExistantProp.qml") + ":9:9: QML PropertyChanges: Cannot assign to non-existent property \"colr\"");
- rect->setState("blue");
- QCOMPARE(rect->state(), QLatin1String("blue"));
+ rectPrivate->setState("blue");
+ QCOMPARE(rectPrivate->state(), QLatin1String("blue"));
}
void tst_qdeclarativestates::reset()
@@ -974,7 +1003,7 @@ void tst_qdeclarativestates::reset()
QCOMPARE(text->width(), qreal(40.));
QVERIFY(text->width() < text->height());
- rect->setState("state1");
+ QDeclarativeItemPrivate::get(rect)->setState("state1");
QVERIFY(text->width() > 41);
QVERIFY(text->width() > text->height());
@@ -1000,19 +1029,20 @@ void tst_qdeclarativestates::whenOrdering()
QDeclarativeComponent c(&engine, SRCDIR "/data/whenOrdering.qml");
QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
QVERIFY(rect != 0);
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
- QCOMPARE(rect->state(), QLatin1String(""));
+ QCOMPARE(rectPrivate->state(), QLatin1String(""));
rect->setProperty("condition2", true);
- QCOMPARE(rect->state(), QLatin1String("state2"));
+ QCOMPARE(rectPrivate->state(), QLatin1String("state2"));
rect->setProperty("condition1", true);
- QCOMPARE(rect->state(), QLatin1String("state1"));
+ QCOMPARE(rectPrivate->state(), QLatin1String("state1"));
rect->setProperty("condition2", false);
- QCOMPARE(rect->state(), QLatin1String("state1"));
+ QCOMPARE(rectPrivate->state(), QLatin1String("state1"));
rect->setProperty("condition2", true);
- QCOMPARE(rect->state(), QLatin1String("state1"));
+ QCOMPARE(rectPrivate->state(), QLatin1String("state1"));
rect->setProperty("condition1", false);
rect->setProperty("condition2", false);
- QCOMPARE(rect->state(), QLatin1String(""));
+ QCOMPARE(rectPrivate->state(), QLatin1String(""));
}
void tst_qdeclarativestates::urlResolution()
@@ -1029,13 +1059,32 @@ void tst_qdeclarativestates::urlResolution()
QDeclarativeImage *image3 = rect->findChild<QDeclarativeImage*>("image3");
QVERIFY(myType != 0 && image1 != 0 && image2 != 0 && image3 != 0);
- myType->setState("SetImageState");
+ QDeclarativeItemPrivate::get(myType)->setState("SetImageState");
QUrl resolved = QUrl::fromLocalFile(SRCDIR "/data/Implementation/images/qt-logo.png");
QCOMPARE(image1->source(), resolved);
QCOMPARE(image2->source(), resolved);
QCOMPARE(image3->source(), resolved);
}
+void tst_qdeclarativestates::unnamedWhen()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent c(&engine, SRCDIR "/data/unnamedWhen.qml");
+ QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create());
+ QVERIFY(rect != 0);
+ QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect);
+
+ QCOMPARE(rectPrivate->state(), QLatin1String(""));
+ QCOMPARE(rect->property("stateString").toString(), QLatin1String(""));
+ rect->setProperty("triggerState", true);
+ QCOMPARE(rectPrivate->state(), QLatin1String("anonymousState1"));
+ QCOMPARE(rect->property("stateString").toString(), QLatin1String("inState"));
+ rect->setProperty("triggerState", false);
+ QCOMPARE(rectPrivate->state(), QLatin1String(""));
+ QCOMPARE(rect->property("stateString").toString(), QLatin1String(""));
+}
+
QTEST_MAIN(tst_qdeclarativestates)
#include "tst_qdeclarativestates.moc"
diff --git a/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro b/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
index b2705fa..786bc1b 100644
--- a/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
+++ b/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro
@@ -4,5 +4,12 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativesystempalette.cpp
+# Define SRCDIR equal to test's source directory
+symbian: {
+ DEFINES += SRCDIR=\".\"
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
+
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
index e70443e..51c7f43 100644
--- a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
+++ b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro
@@ -9,7 +9,14 @@ INCLUDEPATH += ../shared/
HEADERS += ../shared/testhttpserver.h
SOURCES += ../shared/testhttpserver.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml b/tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml
new file mode 100644
index 0000000..b39ba5b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml
@@ -0,0 +1,12 @@
+import Qt 4.7
+
+Item {
+ width: 400; height: 500;
+ property int bindingWidth: text.width
+ property int bindingHeight: text.height
+
+ TextInput {
+ id: text
+ anchors.fill: parent
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_default.qml b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_default.qml
new file mode 100644
index 0000000..f1cf86c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_default.qml
@@ -0,0 +1,7 @@
+import Qt 4.7
+
+TextEdit {
+ focus: true
+ text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ selectByMouse: false
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_false.qml b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_false.qml
new file mode 100644
index 0000000..f1cf86c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_false.qml
@@ -0,0 +1,7 @@
+import Qt 4.7
+
+TextEdit {
+ focus: true
+ text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ selectByMouse: false
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_true.qml b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_true.qml
new file mode 100644
index 0000000..90383b9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_true.qml
@@ -0,0 +1,7 @@
+import Qt 4.7
+
+TextEdit {
+ focus: true
+ text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ selectByMouse: true
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
index 2228f11..2adb2b8 100644
--- a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
+++ b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro
@@ -6,4 +6,11 @@ SOURCES += tst_qdeclarativetextedit.cpp ../shared/testhttpserver.cpp
HEADERS += ../shared/testhttpserver.h
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index 3307b7c..4befc4c 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -76,6 +76,8 @@ private slots:
void persistentSelection();
void focusOnPress();
void selection();
+ void mouseSelection_data();
+ void mouseSelection();
void inputMethodHints();
void cursorDelegate();
@@ -84,7 +86,7 @@ private slots:
void navigation();
void readOnly();
void sendRequestSoftwareInputPanelEvent();
-
+ void geometrySignals();
private:
void simulateKey(QDeclarativeView *, int key);
QDeclarativeView *createView(const QString &filename);
@@ -202,7 +204,7 @@ void tst_qdeclarativetextedit::width()
QFont f;
QFontMetricsF fm(f);
qreal metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width();
- metricWidth = floor(metricWidth);
+ metricWidth = ceil(metricWidth);
QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + standard.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
@@ -219,7 +221,7 @@ void tst_qdeclarativetextedit::width()
document.setHtml(richText.at(i));
document.setDocumentMargin(0);
- int documentWidth = document.idealWidth();
+ int documentWidth = ceil(document.idealWidth());
QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + richText.at(i) + "\" }";
QDeclarativeComponent texteditComponent(&engine);
@@ -602,6 +604,49 @@ void tst_qdeclarativetextedit::selection()
QVERIFY(textEditObject->selectedText().size() == 10);
}
+void tst_qdeclarativetextedit::mouseSelection_data()
+{
+ QTest::addColumn<QString>("qmlfile");
+ QTest::addColumn<bool>("expectSelection");
+
+ // import installed
+ QTest::newRow("on") << SRCDIR "/data/mouseselection_true.qml" << true;
+ QTest::newRow("off") << SRCDIR "/data/mouseselection_false.qml" << false;
+ QTest::newRow("default") << SRCDIR "/data/mouseselection_default.qml" << false;
+}
+
+void tst_qdeclarativetextedit::mouseSelection()
+{
+ QFETCH(QString, qmlfile);
+ QFETCH(bool, expectSelection);
+
+ QDeclarativeView *canvas = createView(qmlfile);
+
+ canvas->show();
+ QApplication::setActiveWindow(canvas);
+ QTest::qWaitForWindowShown(canvas);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(canvas));
+
+ QVERIFY(canvas->rootObject() != 0);
+ QDeclarativeTextEdit *textEditObject = qobject_cast<QDeclarativeTextEdit *>(canvas->rootObject());
+ QVERIFY(textEditObject != 0);
+
+ // press-and-drag-and-release from x1 to x2
+ int x1 = 10;
+ int x2 = 70;
+ int y = textEditObject->height()/2;
+ QTest::mousePress(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x1,y)));
+ //QTest::mouseMove(canvas->viewport(), canvas->mapFromScene(QPoint(x2,y))); // doesn't work
+ QMouseEvent mv(QEvent::MouseMove, canvas->mapFromScene(QPoint(x2,y)), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier);
+ QApplication::sendEvent(canvas->viewport(), &mv);
+ QTest::mouseRelease(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x2,y)));
+ QString str = textEditObject->selectedText();
+ if (expectSelection)
+ QVERIFY(str.length() > 3); // don't reallly care *what* was selected (and it's too sensitive to platform)
+ else
+ QVERIFY(str.isEmpty());
+}
+
void tst_qdeclarativetextedit::inputMethodHints()
{
QDeclarativeView *canvas = createView(SRCDIR "/data/inputmethodhints.qml");
@@ -793,8 +838,6 @@ void tst_qdeclarativetextedit::sendRequestSoftwareInputPanelEvent()
view.viewport()->setInputContext(&ic);
QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel(
view.style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
- if ((behavior != QStyle::RSIP_OnMouseClick))
- QSKIP("This test need to have a style with RSIP_OnMouseClick", SkipSingle);
QDeclarativeTextEdit edit;
edit.setText("Hello world");
edit.setPos(0, 0);
@@ -806,8 +849,26 @@ void tst_qdeclarativetextedit::sendRequestSoftwareInputPanelEvent()
QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&view));
QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
QApplication::processEvents();
- QCOMPARE(ic.softwareInputPanelEventReceived, true);
+ if (behavior == QStyle::RSIP_OnMouseClickAndAlreadyFocused) {
+ QCOMPARE(ic.softwareInputPanelEventReceived, false);
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos()));
+ QApplication::processEvents();
+ QCOMPARE(ic.softwareInputPanelEventReceived, true);
+ } else if (behavior == QStyle::RSIP_OnMouseClick) {
+ QCOMPARE(ic.softwareInputPanelEventReceived, true);
+ }
+}
+
+void tst_qdeclarativetextedit::geometrySignals()
+{
+ QDeclarativeComponent component(&engine, SRCDIR "/data/geometrySignals.qml");
+ QObject *o = component.create();
+ QVERIFY(o);
+ QCOMPARE(o->property("bindingWidth").toInt(), 400);
+ QCOMPARE(o->property("bindingHeight").toInt(), 500);
+ delete o;
}
+
QTEST_MAIN(tst_qdeclarativetextedit)
#include "tst_qdeclarativetextedit.moc"
diff --git a/tests/auto/declarative/qdeclarativetextinput/data/geometrySignals.qml b/tests/auto/declarative/qdeclarativetextinput/data/geometrySignals.qml
new file mode 100644
index 0000000..a9b50fe
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextinput/data/geometrySignals.qml
@@ -0,0 +1,12 @@
+import Qt 4.7
+
+Item {
+ width: 400; height: 500;
+ property int bindingWidth: text.width
+ property int bindingHeight: text.height
+
+ TextEdit {
+ id: text
+ anchors.fill: parent
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
index 957e75c..2953567 100644
--- a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
+++ b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro
@@ -5,5 +5,12 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativetextinput.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index 83ebe6c..ac80edb 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -76,6 +76,7 @@ private slots:
void focusOutClearSelection();
void echoMode();
+ void geometrySignals();
private:
void simulateKey(QDeclarativeView *, int key);
QDeclarativeView *createView(const QString &filename);
@@ -575,6 +576,14 @@ void tst_qdeclarativetextinput::navigation()
simulateKey(canvas, Qt::Key_Left);
QVERIFY(input->hasFocus() == true);
+ // Up and Down should NOT do Home/End, even on Mac OS X (QTBUG-10438).
+ input->setCursorPosition(2);
+ QCOMPARE(input->cursorPosition(),2);
+ simulateKey(canvas, Qt::Key_Up);
+ QCOMPARE(input->cursorPosition(),2);
+ simulateKey(canvas, Qt::Key_Down);
+ QCOMPARE(input->cursorPosition(),2);
+
delete canvas;
}
@@ -734,8 +743,6 @@ void tst_qdeclarativetextinput::sendRequestSoftwareInputPanelEvent()
view.viewport()->setInputContext(&ic);
QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel(
view.style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
- if ((behavior != QStyle::RSIP_OnMouseClick))
- QSKIP("This test need to have a style with RSIP_OnMouseClick", SkipSingle);
QDeclarativeTextInput input;
input.setText("Hello world");
input.setPos(0, 0);
@@ -747,7 +754,14 @@ void tst_qdeclarativetextinput::sendRequestSoftwareInputPanelEvent()
QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&view));
QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
QApplication::processEvents();
- QCOMPARE(ic.softwareInputPanelEventReceived, true);
+ if (behavior == QStyle::RSIP_OnMouseClickAndAlreadyFocused) {
+ QCOMPARE(ic.softwareInputPanelEventReceived, false);
+ QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos()));
+ QApplication::processEvents();
+ QCOMPARE(ic.softwareInputPanelEventReceived, true);
+ } else if (behavior == QStyle::RSIP_OnMouseClick) {
+ QCOMPARE(ic.softwareInputPanelEventReceived, true);
+ }
}
class MyTextInput : public QDeclarativeTextInput
@@ -805,6 +819,16 @@ void tst_qdeclarativetextinput::focusOutClearSelection()
QTRY_COMPARE(input.selectedText(), QLatin1String(""));
}
+void tst_qdeclarativetextinput::geometrySignals()
+{
+ QDeclarativeComponent component(&engine, SRCDIR "/data/geometrySignals.qml");
+ QObject *o = component.create();
+ QVERIFY(o);
+ QCOMPARE(o->property("bindingWidth").toInt(), 400);
+ QCOMPARE(o->property("bindingHeight").toInt(), 500);
+ delete o;
+}
+
QTEST_MAIN(tst_qdeclarativetextinput)
#include "tst_qdeclarativetextinput.moc"
diff --git a/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro b/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
index 42604d8..d95165c 100644
--- a/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
+++ b/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro
@@ -4,6 +4,10 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativetimer.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.5.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.5.qml
new file mode 100644
index 0000000..a66e9d6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.5.qml
@@ -0,0 +1,10 @@
+import Test 1.0
+import Qt 4.7 as MyQt
+
+MyTypeObject {
+ MyQt.Component.onCompleted: {
+ font.capitalization = MyQt.Font.AllUppercase
+ }
+}
+
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_read.qml
new file mode 100644
index 0000000..6c4a682
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_read.qml
@@ -0,0 +1,22 @@
+import Test 1.0
+
+MyTypeObject {
+ property real v_m11: matrix.m11
+ property real v_m12: matrix.m12
+ property real v_m13: matrix.m13
+ property real v_m14: matrix.m14
+ property real v_m21: matrix.m21
+ property real v_m22: matrix.m22
+ property real v_m23: matrix.m23
+ property real v_m24: matrix.m24
+ property real v_m31: matrix.m31
+ property real v_m32: matrix.m32
+ property real v_m33: matrix.m33
+ property real v_m34: matrix.m34
+ property real v_m41: matrix.m41
+ property real v_m42: matrix.m42
+ property real v_m43: matrix.m43
+ property real v_m44: matrix.m44
+ property variant copy: matrix
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_write.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_write.qml
new file mode 100644
index 0000000..2a9f154
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/matrix4x4_write.qml
@@ -0,0 +1,21 @@
+import Test 1.0
+
+MyTypeObject {
+ matrix.m11: if (true) 11
+ matrix.m12: if (true) 12
+ matrix.m13: if (true) 13
+ matrix.m14: if (true) 14
+ matrix.m21: if (true) 21
+ matrix.m22: if (true) 22
+ matrix.m23: if (true) 23
+ matrix.m24: if (true) 24
+ matrix.m31: if (true) 31
+ matrix.m32: if (true) 32
+ matrix.m33: if (true) 33
+ matrix.m34: if (true) 34
+ matrix.m41: if (true) 41
+ matrix.m42: if (true) 42
+ matrix.m43: if (true) 43
+ matrix.m44: if (true) 44
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_read.qml
new file mode 100644
index 0000000..d1a21dc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_read.qml
@@ -0,0 +1,10 @@
+import Test 1.0
+
+MyTypeObject {
+ property real v_scalar: quaternion.scalar
+ property real v_x: quaternion.x
+ property real v_y: quaternion.y
+ property real v_z: quaternion.z
+ property variant copy: quaternion
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_write.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_write.qml
new file mode 100644
index 0000000..0c3e5af
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/quaternion_write.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+
+MyTypeObject {
+ quaternion.scalar: if (true) 88.5
+ quaternion.x: if (true) -0.3
+ quaternion.y: if (true) -12.9
+ quaternion.z: if (true) 907.4
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/varAssignment.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/varAssignment.qml
new file mode 100644
index 0000000..e4715ab
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/varAssignment.qml
@@ -0,0 +1,14 @@
+import Qt 4.7
+
+QtObject {
+ property int x;
+ property int y;
+ property int z;
+
+ Component.onCompleted: {
+ var vec3 = Qt.vector3d(1, 2, 3);
+ x = vec3.x;
+ y = vec3.y;
+ z = vec3.z;
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_read.qml
new file mode 100644
index 0000000..fc315f7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_read.qml
@@ -0,0 +1,8 @@
+import Test 1.0
+
+MyTypeObject {
+ property real v_x: vector2.x
+ property real v_y: vector2.y
+ property variant copy: vector2
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_write.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_write.qml
new file mode 100644
index 0000000..f0e35ff
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/vector2d_write.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyTypeObject {
+ vector2.x: if (true) -0.3
+ vector2.y: if (true) -12.9
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_read.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_read.qml
new file mode 100644
index 0000000..f9d5d60
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_read.qml
@@ -0,0 +1,10 @@
+import Test 1.0
+
+MyTypeObject {
+ property real v_x: vector4.x
+ property real v_y: vector4.y
+ property real v_z: vector4.z
+ property real v_w: vector4.w
+ property variant copy: vector4
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_write.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_write.qml
new file mode 100644
index 0000000..5486981
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevaluetypes/data/vector4d_write.qml
@@ -0,0 +1,9 @@
+import Test 1.0
+
+MyTypeObject {
+ vector4.x: if (true) -0.3
+ vector4.y: if (true) -12.9
+ vector4.z: if (true) 907.4
+ vector4.w: if (true) 88.5
+}
+
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
index d9f1c13..02c480c 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
+++ b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro
@@ -7,7 +7,14 @@ HEADERS += testtypes.h
SOURCES += tst_qdeclarativevaluetypes.cpp \
testtypes.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h b/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
index 8a9b981..7ed3993 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
+++ b/tests/auto/declarative/qdeclarativevaluetypes/testtypes.h
@@ -48,7 +48,11 @@
#include <QSizeF>
#include <QRect>
#include <QRectF>
+#include <QVector2D>
#include <QVector3D>
+#include <QVector4D>
+#include <QQuaternion>
+#include <QMatrix4x4>
#include <QFont>
#include <qdeclarative.h>
#include <QDeclarativePropertyValueSource>
@@ -66,7 +70,11 @@ class MyTypeObject : public QObject
Q_PROPERTY(QSize sizereadonly READ size NOTIFY changed)
Q_PROPERTY(QRect rect READ rect WRITE setRect NOTIFY changed)
Q_PROPERTY(QRectF rectf READ rectf WRITE setRectf NOTIFY changed)
+ Q_PROPERTY(QVector2D vector2 READ vector2 WRITE setVector2 NOTIFY changed)
Q_PROPERTY(QVector3D vector READ vector WRITE setVector NOTIFY changed)
+ Q_PROPERTY(QVector4D vector4 READ vector4 WRITE setVector4 NOTIFY changed)
+ Q_PROPERTY(QQuaternion quaternion READ quaternion WRITE setQuaternion NOTIFY changed)
+ Q_PROPERTY(QMatrix4x4 matrix READ matrix WRITE setMatrix NOTIFY changed)
Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY changed)
public:
@@ -77,7 +85,11 @@ public:
m_sizef(0.1, 100923.2),
m_rect(2, 3, 109, 102),
m_rectf(103.8, 99.2, 88.1, 77.6),
- m_vector(23.88, 3.1, 4.3)
+ m_vector2(32.88, 1.3),
+ m_vector(23.88, 3.1, 4.3),
+ m_vector4(54.2, 23.88, 3.1, 4.3),
+ m_quaternion(4.3, 54.2, 23.88, 3.1),
+ m_matrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
{
m_font.setFamily("Arial");
m_font.setBold(true);
@@ -87,7 +99,7 @@ public:
m_font.setOverline(true);
m_font.setStrikeOut(true);
m_font.setPointSize(29);
- m_font.setCapitalization(QFont::AllUppercase);
+ m_font.setCapitalization(QFont::AllLowercase);
m_font.setLetterSpacing(QFont::AbsoluteSpacing, 10.2);
m_font.setWordSpacing(19.7);
}
@@ -116,10 +128,26 @@ public:
QRectF rectf() const { return m_rectf; }
void setRectf(const QRectF &v) { m_rectf = v; emit changed(); }
+ QVector2D m_vector2;
+ QVector2D vector2() const { return m_vector2; }
+ void setVector2(const QVector2D &v) { m_vector2 = v; emit changed(); }
+
QVector3D m_vector;
QVector3D vector() const { return m_vector; }
void setVector(const QVector3D &v) { m_vector = v; emit changed(); }
+ QVector4D m_vector4;
+ QVector4D vector4() const { return m_vector4; }
+ void setVector4(const QVector4D &v) { m_vector4 = v; emit changed(); }
+
+ QQuaternion m_quaternion;
+ QQuaternion quaternion() const { return m_quaternion; }
+ void setQuaternion(const QQuaternion &v) { m_quaternion = v; emit changed(); }
+
+ QMatrix4x4 m_matrix;
+ QMatrix4x4 matrix() const { return m_matrix; }
+ void setMatrix(const QMatrix4x4 &v) { m_matrix = v; emit changed(); }
+
QFont m_font;
QFont font() const { return m_font; }
void setFont(const QFont &v) { m_font = v; emit changed(); }
diff --git a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
index b733b10..53fd68c 100644
--- a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
+++ b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp
@@ -62,7 +62,11 @@ private slots:
void sizereadonly();
void rect();
void rectf();
+ void vector2d();
void vector3d();
+ void vector4d();
+ void quaternion();
+ void matrix4x4();
void font();
void bindingAssignment();
@@ -80,6 +84,7 @@ private slots:
void enums();
void conflictingBindings();
void returnValues();
+ void varAssignment();
private:
QDeclarativeEngine engine;
@@ -293,6 +298,31 @@ void tst_qdeclarativevaluetypes::rectf()
}
}
+void tst_qdeclarativevaluetypes::vector2d()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("vector2d_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE((float)object->property("v_x").toDouble(), (float)32.88);
+ QCOMPARE((float)object->property("v_y").toDouble(), (float)1.3);
+ QCOMPARE(object->property("copy"), QVariant(QVector2D(32.88, 1.3)));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("vector2d_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->vector2(), QVector2D(-0.3, -12.9));
+
+ delete object;
+ }
+}
+
void tst_qdeclarativevaluetypes::vector3d()
{
{
@@ -319,6 +349,106 @@ void tst_qdeclarativevaluetypes::vector3d()
}
}
+void tst_qdeclarativevaluetypes::vector4d()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("vector4d_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE((float)object->property("v_x").toDouble(), (float)54.2);
+ QCOMPARE((float)object->property("v_y").toDouble(), (float)23.88);
+ QCOMPARE((float)object->property("v_z").toDouble(), (float)3.1);
+ QCOMPARE((float)object->property("v_w").toDouble(), (float)4.3);
+ QCOMPARE(object->property("copy"), QVariant(QVector4D(54.2, 23.88, 3.1, 4.3)));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("vector4d_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->vector4(), QVector4D(-0.3, -12.9, 907.4, 88.5));
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativevaluetypes::quaternion()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("quaternion_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE((float)object->property("v_scalar").toDouble(), (float)4.3);
+ QCOMPARE((float)object->property("v_x").toDouble(), (float)54.2);
+ QCOMPARE((float)object->property("v_y").toDouble(), (float)23.88);
+ QCOMPARE((float)object->property("v_z").toDouble(), (float)3.1);
+ QCOMPARE(object->property("copy"), QVariant(QQuaternion(4.3, 54.2, 23.88, 3.1)));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("quaternion_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->quaternion(), QQuaternion(88.5, -0.3, -12.9, 907.4));
+
+ delete object;
+ }
+}
+
+void tst_qdeclarativevaluetypes::matrix4x4()
+{
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("matrix4x4_read.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE((float)object->property("v_m11").toDouble(), (float)1);
+ QCOMPARE((float)object->property("v_m12").toDouble(), (float)2);
+ QCOMPARE((float)object->property("v_m13").toDouble(), (float)3);
+ QCOMPARE((float)object->property("v_m14").toDouble(), (float)4);
+ QCOMPARE((float)object->property("v_m21").toDouble(), (float)5);
+ QCOMPARE((float)object->property("v_m22").toDouble(), (float)6);
+ QCOMPARE((float)object->property("v_m23").toDouble(), (float)7);
+ QCOMPARE((float)object->property("v_m24").toDouble(), (float)8);
+ QCOMPARE((float)object->property("v_m31").toDouble(), (float)9);
+ QCOMPARE((float)object->property("v_m32").toDouble(), (float)10);
+ QCOMPARE((float)object->property("v_m33").toDouble(), (float)11);
+ QCOMPARE((float)object->property("v_m34").toDouble(), (float)12);
+ QCOMPARE((float)object->property("v_m41").toDouble(), (float)13);
+ QCOMPARE((float)object->property("v_m42").toDouble(), (float)14);
+ QCOMPARE((float)object->property("v_m43").toDouble(), (float)15);
+ QCOMPARE((float)object->property("v_m44").toDouble(), (float)16);
+ QCOMPARE(object->property("copy"),
+ QVariant(QMatrix4x4(1, 2, 3, 4,
+ 5, 6, 7, 8,
+ 9, 10, 11, 12,
+ 13, 14, 15, 16)));
+
+ delete object;
+ }
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("matrix4x4_write.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->matrix(), QMatrix4x4(11, 12, 13, 14,
+ 21, 22, 23, 24,
+ 31, 32, 33, 34,
+ 41, 42, 43, 44));
+
+ delete object;
+ }
+}
+
void tst_qdeclarativevaluetypes::font()
{
{
@@ -665,7 +795,12 @@ void tst_qdeclarativevaluetypes::cppClasses()
CPP_TEST(QDeclarativeSizeFValueType, QSizeF(-100.7, 18.2));
CPP_TEST(QDeclarativeRectValueType, QRect(13, 39, 10928, 88));
CPP_TEST(QDeclarativeRectFValueType, QRectF(88.2, -90.1, 103.2, 118));
+ CPP_TEST(QDeclarativeVector2DValueType, QVector2D(19.7, 1002));
CPP_TEST(QDeclarativeVector3DValueType, QVector3D(18.2, 19.7, 1002));
+ CPP_TEST(QDeclarativeVector4DValueType, QVector4D(18.2, 19.7, 1002, 54));
+ CPP_TEST(QDeclarativeQuaternionValueType, QQuaternion(18.2, 19.7, 1002, 54));
+ CPP_TEST(QDeclarativeMatrix4x4ValueType,
+ QMatrix4x4(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16));
CPP_TEST(QDeclarativeFontValueType, QFont("Helvetica"));
}
@@ -703,6 +838,14 @@ void tst_qdeclarativevaluetypes::enums()
QVERIFY(object->font().capitalization() == QFont::AllUppercase);
delete object;
}
+
+ {
+ QDeclarativeComponent component(&engine, TEST_FILE("enums.5.qml"));
+ MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
+ QVERIFY(object != 0);
+ QVERIFY(object->font().capitalization() == QFont::AllUppercase);
+ delete object;
+ }
}
// Tests switching between "conflicting" bindings (eg. a binding on the core
@@ -777,6 +920,19 @@ void tst_qdeclarativevaluetypes::returnValues()
delete object;
}
+void tst_qdeclarativevaluetypes::varAssignment()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("varAssignment.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("x").toInt(), 1);
+ QCOMPARE(object->property("y").toInt(), 2);
+ QCOMPARE(object->property("z").toInt(), 3);
+
+ delete object;
+}
+
QTEST_MAIN(tst_qdeclarativevaluetypes)
#include "tst_qdeclarativevaluetypes.moc"
diff --git a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
index d6be728..ad54713 100644
--- a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
+++ b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro
@@ -4,4 +4,11 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeview.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
diff --git a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
index 1ed51c1..b183105 100644
--- a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
+++ b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp
@@ -45,6 +45,7 @@
#include <QtDeclarative/qdeclarativeview.h>
#include <QtDeclarative/qdeclarativeitem.h>
#include <QtGui/qgraphicswidget.h>
+#include "../../../shared/util.h"
class tst_QDeclarativeView : public QObject
@@ -106,9 +107,9 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
// size update from root object
declarativeItem->setWidth(250);
declarativeItem->setHeight(350);
- qApp->processEvents();
QCOMPARE(declarativeItem->width(), 250.0);
QCOMPARE(declarativeItem->height(), 350.0);
+ QTRY_COMPARE(canvas->size(), QSize(250, 350));
QCOMPARE(canvas->size(), QSize(250, 350));
QCOMPARE(canvas->size(), canvas->sizeHint());
QCOMPARE(sceneResizedSpy.count(), 4);
@@ -134,9 +135,9 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
// size update from root object
declarativeItem->setWidth(80);
declarativeItem->setHeight(100);
- qApp->processEvents();
QCOMPARE(declarativeItem->width(), 80.0);
QCOMPARE(declarativeItem->height(), 100.0);
+ QTRY_COMPARE(canvas->size(), QSize(80, 100));
QCOMPARE(canvas->size(), QSize(80, 100));
QCOMPARE(canvas->size(), canvas->sizeHint());
QCOMPARE(sceneResizedSpy2.count(), 2);
@@ -147,7 +148,7 @@ void tst_QDeclarativeView::resizemodedeclarativeitem()
declarativeItem->setHeight(80);
QCOMPARE(canvas->width(), 80);
QCOMPARE(canvas->height(), 100);
- QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(QSize(declarativeItem->width(), declarativeItem->height()), canvas->sizeHint());
QCOMPARE(sceneResizedSpy2.count(), 2);
// size update from view
@@ -230,7 +231,7 @@ void tst_QDeclarativeView::resizemodegraphicswidget()
canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
graphicsWidget->resize(QSizeF(60,80));
QCOMPARE(canvas->size(), QSize(80,100));
- QCOMPARE(canvas->size(), canvas->sizeHint());
+ QCOMPARE(QSize(graphicsWidget->size().width(), graphicsWidget->size().height()), canvas->sizeHint());
QCOMPARE(sceneResizedSpy2.count(), 2);
// size update from view
diff --git a/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml b/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml
new file mode 100644
index 0000000..687fac6
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml
@@ -0,0 +1,10 @@
+import Qt 4.7
+Rectangle {
+ color: "black"
+ width: (runtime.orientation == Orientation.Landscape) ? 300 : 200
+ height: (runtime.orientation == Orientation.Landscape) ? 200 : 300
+ Text {
+ text: runtime.orientation == Orientation.Landscape ? "Landscape" : "Portrait"
+ color: "white"
+ }
+} \ No newline at end of file
diff --git a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
new file mode 100644
index 0000000..9bb6161
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro
@@ -0,0 +1,18 @@
+load(qttest_p4)
+contains(QT_CONFIG,declarative): QT += declarative gui
+macx:CONFIG -= app_bundle
+
+include(../../../../tools/qml/qml.pri)
+
+SOURCES += tst_qdeclarativeviewer.cpp
+
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
+
+CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
new file mode 100644
index 0000000..9429dc9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** 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 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 <qtest.h>
+#include <QtDeclarative/qdeclarativeengine.h>
+#include <QtDeclarative/qdeclarativeview.h>
+#include <QtDeclarative/qdeclarativeitem.h>
+#include "qmlruntime.h"
+
+class tst_QDeclarativeViewer : public QObject
+
+{
+ Q_OBJECT
+public:
+ tst_QDeclarativeViewer();
+
+private slots:
+ void orientation();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_QDeclarativeViewer::tst_QDeclarativeViewer()
+{
+}
+
+void tst_QDeclarativeViewer::orientation()
+{
+ QWidget window;
+ QDeclarativeViewer *viewer = new QDeclarativeViewer(&window);
+ QVERIFY(viewer);
+ viewer->open(SRCDIR "/data/orientation.qml");
+ QVERIFY(viewer->view());
+ QVERIFY(viewer->menuBar());
+ QDeclarativeItem* rootItem = qobject_cast<QDeclarativeItem*>(viewer->view()->rootObject());
+ QVERIFY(rootItem);
+ window.show();
+
+ QCOMPARE(rootItem->width(), 200.0);
+ QCOMPARE(rootItem->height(), 300.0);
+ QCOMPARE(viewer->view()->size(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
+ QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+
+ viewer->toggleOrientation();
+ qApp->processEvents();
+
+ QCOMPARE(rootItem->width(), 300.0);
+ QCOMPARE(rootItem->height(), 200.0);
+ QCOMPARE(viewer->view()->size(), QSize(300, 200));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(300, 200));
+ QCOMPARE(viewer->size(), QSize(300, 200+viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+
+ viewer->toggleOrientation();
+ qApp->processEvents();
+
+ QCOMPARE(rootItem->width(), 200.0);
+ QCOMPARE(rootItem->height(), 300.0);
+ QCOMPARE(viewer->view()->size(), QSize(200, 300));
+ QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300));
+ QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height()));
+ QCOMPARE(viewer->size(), viewer->sizeHint());
+}
+
+QTEST_MAIN(tst_QDeclarativeViewer)
+
+#include "tst_qdeclarativeviewer.moc"
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/objectlist.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/objectlist.qml
new file mode 100644
index 0000000..f5198c9
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/objectlist.qml
@@ -0,0 +1,16 @@
+import Qt 4.7
+
+ListView {
+ width: 100
+ height: 100
+ anchors.fill: parent
+ model: myModel
+ delegate: Component {
+ Rectangle {
+ height: 25
+ width: 100
+ color: model.modelData.color
+ Text { objectName: "name"; text: name }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
index d76b582..c87171b 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro
@@ -4,8 +4,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativevisualdatamodel.cpp
-# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
index 7de15a3..8f3fb16 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
@@ -44,6 +44,10 @@
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
#include <QtDeclarative/qdeclarativecontext.h>
+#include <QtDeclarative/qdeclarativeexpression.h>
+#include <QtDeclarative/qdeclarativeview.h>
+#include <private/qdeclarativelistview_p.h>
+#include <private/qdeclarativetext_p.h>
#include <private/qdeclarativevisualitemmodel_p.h>
#include <private/qdeclarativevaluetype_p.h>
#include <math.h>
@@ -74,9 +78,50 @@ public:
private slots:
void rootIndex();
+ void objectListModel();
private:
QDeclarativeEngine engine;
+ template<typename T>
+ T *findItem(QGraphicsObject *parent, const QString &objectName, int index);
+};
+
+class DataObject : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+ Q_PROPERTY(QString color READ color WRITE setColor NOTIFY colorChanged)
+
+public:
+ DataObject(QObject *parent=0) : QObject(parent) {}
+ DataObject(const QString &name, const QString &color, QObject *parent=0)
+ : QObject(parent), m_name(name), m_color(color) { }
+
+
+ QString name() const { return m_name; }
+ void setName(const QString &name) {
+ if (name != m_name) {
+ m_name = name;
+ emit nameChanged();
+ }
+ }
+
+ QString color() const { return m_color; }
+ void setColor(const QString &color) {
+ if (color != m_color) {
+ m_color = color;
+ emit colorChanged();
+ }
+ }
+
+signals:
+ void nameChanged();
+ void colorChanged();
+
+private:
+ QString m_name;
+ QString m_color;
};
tst_qdeclarativevisualdatamodel::tst_qdeclarativevisualdatamodel()
@@ -105,6 +150,60 @@ void tst_qdeclarativevisualdatamodel::rootIndex()
delete obj;
}
+void tst_qdeclarativevisualdatamodel::objectListModel()
+{
+ QDeclarativeView view;
+
+ QList<QObject*> dataList;
+ dataList.append(new DataObject("Item 1", "red"));
+ dataList.append(new DataObject("Item 2", "green"));
+ dataList.append(new DataObject("Item 3", "blue"));
+ dataList.append(new DataObject("Item 4", "yellow"));
+
+ QDeclarativeContext *ctxt = view.rootContext();
+ ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
+
+ view.setSource(QUrl::fromLocalFile(SRCDIR "/data/objectlist.qml"));
+
+ QDeclarativeListView *listview = qobject_cast<QDeclarativeListView*>(view.rootObject());
+ QVERIFY(listview != 0);
+
+ QDeclarativeItem *viewport = listview->viewport();
+ QVERIFY(viewport != 0);
+
+ QDeclarativeText *name = findItem<QDeclarativeText>(viewport, "name", 0);
+ QCOMPARE(name->text(), QString("Item 1"));
+
+ dataList[0]->setProperty("name", QLatin1String("Changed"));
+ QCOMPARE(name->text(), QString("Changed"));
+}
+
+template<typename T>
+T *tst_qdeclarativevisualdatamodel::findItem(QGraphicsObject *parent, const QString &objectName, int index)
+{
+ const QMetaObject &mo = T::staticMetaObject;
+ //qDebug() << parent->childItems().count() << "children";
+ for (int i = 0; i < parent->childItems().count(); ++i) {
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(parent->childItems().at(i));
+ if(!item)
+ continue;
+ //qDebug() << "try" << item;
+ if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) {
+ if (index != -1) {
+ QDeclarativeExpression e(qmlContext(item), item, "index");
+ if (e.evaluate().toInt() == index)
+ return static_cast<T*>(item);
+ } else {
+ return static_cast<T*>(item);
+ }
+ }
+ item = findItem<T>(item, objectName, index);
+ if (item)
+ return static_cast<T*>(item);
+ }
+
+ return 0;
+}
QTEST_MAIN(tst_qdeclarativevisualdatamodel)
diff --git a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
index 956272f..8caa393 100644
--- a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
+++ b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro
@@ -6,6 +6,13 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativewebview.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
index 2e3da4d..36b3449 100644
--- a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
+++ b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro
@@ -5,7 +5,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativeworkerscript.cpp
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
index 160300e..b54f670 100644
--- a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
+++ b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro
@@ -8,9 +8,15 @@ HEADERS += ../shared/testhttpserver.h
SOURCES += tst_qdeclarativexmlhttprequest.cpp \
../shared/testhttpserver.cpp
-
# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
index 8c5052a..1bf1c58 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro
@@ -8,7 +8,14 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativexmllistmodel.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian: {
+ DEFINES += SRCDIR=\".\"
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
CONFIG += parallel_test
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
index 831e318..4173a44 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
@@ -238,7 +238,7 @@ void tst_qdeclarativexmllistmodel::roleErrors()
QCOMPARE(data.value(Qt::UserRole+1), QVariant());
QCOMPARE(data.value(Qt::UserRole+2), QVariant());
- QEXPECT_FAIL("", "QT-2456", Continue);
+ QEXPECT_FAIL("", "QTBUG-10797", Continue);
QCOMPARE(data.value(Qt::UserRole+3), QVariant());
delete model;
diff --git a/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.0.png b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.0.png
new file mode 100644
index 0000000..135911c
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.1.png b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.1.png
new file mode 100644
index 0000000..0d71292
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.2.png b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.2.png
new file mode 100644
index 0000000..920d992
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.3.png b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.3.png
new file mode 100644
index 0000000..1c4d89e
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.qml b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.qml
new file mode 100644
index 0000000..9e1b923
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/data/parentAnimation2.qml
@@ -0,0 +1,1023 @@
+import Qt.VisualTest 4.7
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 32
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 48
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 64
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 80
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 96
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 112
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 128
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 144
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 160
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 176
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 192
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 208
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 224
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 240
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 256
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 272
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 288
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 304
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 320
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 336
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 352
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 368
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 384
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 400
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 416
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 432
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 448
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 464
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 480
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 496
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 512
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 528
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 544
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 560
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 576
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 592
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 608
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 624
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 640
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 656
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 672
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 688
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 704
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 350; y: 182
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 720
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 736
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 752
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 768
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 784
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 800
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 350; y: 182
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 816
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 832
+ hash: "9b524b546d250d239ea99dd3319f3d6a"
+ }
+ Frame {
+ msec: 848
+ hash: "593300f166c2fd3c325cb35114ca595b"
+ }
+ Frame {
+ msec: 864
+ hash: "4451e76e111c99faa77b5fff9a2642fa"
+ }
+ Frame {
+ msec: 880
+ hash: "0b4a5675afba935e17eba19e29b709ee"
+ }
+ Frame {
+ msec: 896
+ hash: "8682866f0234eebf25aca27a7737c777"
+ }
+ Frame {
+ msec: 912
+ hash: "5b3b70dd366bb4c1b5e7d56ce50e59a6"
+ }
+ Frame {
+ msec: 928
+ hash: "897394982c93ebcbea68c25cec6d47d3"
+ }
+ Frame {
+ msec: 944
+ hash: "23c3c0383a517d33767adeebc53bfa3a"
+ }
+ Frame {
+ msec: 960
+ image: "parentAnimation2.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "95b4fe1e5eeffe1673e199308e8ce76c"
+ }
+ Frame {
+ msec: 992
+ hash: "dbb9a5aa9f569b97711aa2c1f5ebda47"
+ }
+ Frame {
+ msec: 1008
+ hash: "0a5a73409b019e650ea860e1a8e27328"
+ }
+ Frame {
+ msec: 1024
+ hash: "496bd0d053522bcf71d506b497ede0d5"
+ }
+ Frame {
+ msec: 1040
+ hash: "97a32b4a6c99ffe842c35e903bd23d79"
+ }
+ Frame {
+ msec: 1056
+ hash: "496dfbbb0c0c28e108adf4c25341ef11"
+ }
+ Frame {
+ msec: 1072
+ hash: "aa2e5eb88b1498f0d36897be2a36b0ff"
+ }
+ Frame {
+ msec: 1088
+ hash: "0c6f7b54264ab36cfd5145fb7b30432f"
+ }
+ Frame {
+ msec: 1104
+ hash: "797fc3ea1db51f12d900b4e0e4998065"
+ }
+ Frame {
+ msec: 1120
+ hash: "2b076b8bc1ec1e2f21a4d7a77c94cfeb"
+ }
+ Frame {
+ msec: 1136
+ hash: "8d5888ca1cfba19cea569bd38bada417"
+ }
+ Frame {
+ msec: 1152
+ hash: "15ae94de5aa106eaa18d0faefa5d61f5"
+ }
+ Frame {
+ msec: 1168
+ hash: "96e90d74d5a7788d5a6da6cfdb92b185"
+ }
+ Frame {
+ msec: 1184
+ hash: "5698a5e9e628209fc28644198eac65da"
+ }
+ Frame {
+ msec: 1200
+ hash: "074ac8f08de8f22c241e23ad8b89b0f0"
+ }
+ Frame {
+ msec: 1216
+ hash: "a49fdf41e9ee1e5d764262d4585af2ff"
+ }
+ Frame {
+ msec: 1232
+ hash: "accc9b6573a676a40fcf0129085f6fce"
+ }
+ Frame {
+ msec: 1248
+ hash: "1cc956d55f0c382c2f74dcc05a05494f"
+ }
+ Frame {
+ msec: 1264
+ hash: "38ff3121566b2c719f47d027fcef8b8e"
+ }
+ Frame {
+ msec: 1280
+ hash: "4de97b3361a16ca1710f2e75d5c9de6f"
+ }
+ Frame {
+ msec: 1296
+ hash: "dbd1455105630bb8f262140e79ceda1b"
+ }
+ Frame {
+ msec: 1312
+ hash: "bcdac4ab71a29b78bfa756b56b8d8414"
+ }
+ Frame {
+ msec: 1328
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1344
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1360
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1376
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1392
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1408
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1424
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1440
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1456
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1472
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1488
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1504
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1520
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1536
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1552
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1568
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1584
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1600
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1616
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1632
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1648
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1664
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1680
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1696
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1712
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 415; y: 121
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1728
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1744
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1760
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1776
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1792
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1808
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1824
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 415; y: 121
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1840
+ hash: "f02f73a85532c1dd403d64c50c7e73ca"
+ }
+ Frame {
+ msec: 1856
+ hash: "b59fbcfb7db77cf30ea4ff039a9163ae"
+ }
+ Frame {
+ msec: 1872
+ hash: "432a76f0663bfd35f6bbeb3fbeb91799"
+ }
+ Frame {
+ msec: 1888
+ hash: "098e18005d3a2ff9095587954c92339c"
+ }
+ Frame {
+ msec: 1904
+ hash: "069100bf4ec523a9e9d5bf557ffc51d1"
+ }
+ Frame {
+ msec: 1920
+ image: "parentAnimation2.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "60ed700e49bf2c51aba9b44400b56294"
+ }
+ Frame {
+ msec: 1952
+ hash: "79aa15dc74668d963f36f28524f4d091"
+ }
+ Frame {
+ msec: 1968
+ hash: "6838cb2d728259adc8d91a4a69e35adf"
+ }
+ Frame {
+ msec: 1984
+ hash: "3f73c720ce5f1e65fb8537a9beb66d26"
+ }
+ Frame {
+ msec: 2000
+ hash: "95d990ccd3e45e780d875aae1f4654f8"
+ }
+ Frame {
+ msec: 2016
+ hash: "5389a121571f61e73903305860e60016"
+ }
+ Frame {
+ msec: 2032
+ hash: "66f0018b6f35c1c18b28f4959eef96a8"
+ }
+ Frame {
+ msec: 2048
+ hash: "c0fa0560a9a5a0f773394c4fd98c9fa3"
+ }
+ Frame {
+ msec: 2064
+ hash: "e2d665ae0ac3007520003bb4a24ca708"
+ }
+ Frame {
+ msec: 2080
+ hash: "ab6e6976e4214c725f71a4f0ba6d3f68"
+ }
+ Frame {
+ msec: 2096
+ hash: "642f48f731f896d0d4b66956485b615b"
+ }
+ Frame {
+ msec: 2112
+ hash: "cdc36222978e4361dd3ddc2cba78328d"
+ }
+ Frame {
+ msec: 2128
+ hash: "22fe869d83d9d290c4d1702e7553c7aa"
+ }
+ Frame {
+ msec: 2144
+ hash: "3cf2b6a4fd5c73c24717a1ce901cfb19"
+ }
+ Frame {
+ msec: 2160
+ hash: "ea7ecad2a9b7e6ca9a9d1c9c46e0f6dc"
+ }
+ Frame {
+ msec: 2176
+ hash: "3a7e7e2145b40732ef4e18218a959536"
+ }
+ Frame {
+ msec: 2192
+ hash: "1386046373ab246ae533aba206ffe502"
+ }
+ Frame {
+ msec: 2208
+ hash: "2183072e2117c2bc660767bc67e6c355"
+ }
+ Frame {
+ msec: 2224
+ hash: "659c6fedf573d19727f9852a9034e4fe"
+ }
+ Frame {
+ msec: 2240
+ hash: "5be4e8fa87593aeb4d59768a61441c37"
+ }
+ Frame {
+ msec: 2256
+ hash: "2030b883508d07735b20726d218fd751"
+ }
+ Frame {
+ msec: 2272
+ hash: "fd70334fa8a1ff80369cce6aa69255c4"
+ }
+ Frame {
+ msec: 2288
+ hash: "be666aafc8a3d2de9ffaff54d9ac15d1"
+ }
+ Frame {
+ msec: 2304
+ hash: "3370f2246f679068e40cdb48c92decad"
+ }
+ Frame {
+ msec: 2320
+ hash: "f0b4565fd441c071112bdc8225861f76"
+ }
+ Frame {
+ msec: 2336
+ hash: "61babd82afc20a3023c2fe483a2e73cb"
+ }
+ Frame {
+ msec: 2352
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2368
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2384
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2400
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2416
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2432
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2448
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2464
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2480
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2496
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2512
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2528
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2544
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2560
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2576
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2592
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2608
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2624
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2640
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2656
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2672
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2688
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2704
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2720
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2736
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2752
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2768
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 207; y: 255
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2784
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2800
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2816
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2832
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2848
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2864
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2880
+ image: "parentAnimation2.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 207; y: 255
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2912
+ hash: "acab4a79f22ebc8a45759ae282e8f3db"
+ }
+ Frame {
+ msec: 2928
+ hash: "608af88c841d6058c3304cc134de0187"
+ }
+ Frame {
+ msec: 2944
+ hash: "96a727d6ff02c7baf85865fda9d871bd"
+ }
+ Frame {
+ msec: 2960
+ hash: "22cacf109e40b457041d6c2862c4f97f"
+ }
+ Frame {
+ msec: 2976
+ hash: "ea2a53381eef8ac75fce23c518f1e261"
+ }
+ Frame {
+ msec: 2992
+ hash: "a719237e74e9c40b46cc1f27cca5e286"
+ }
+ Frame {
+ msec: 3008
+ hash: "804ef3519ba9852afb0bd4ef793e0006"
+ }
+ Frame {
+ msec: 3024
+ hash: "4abc5026f0de1165717bd14630c9d9f6"
+ }
+ Frame {
+ msec: 3040
+ hash: "1e4dd04698691932725076073a0bd2e7"
+ }
+ Frame {
+ msec: 3056
+ hash: "12aae9dcfd9597ce600588b19bdf5a7d"
+ }
+ Frame {
+ msec: 3072
+ hash: "9176b69f7df68d860b7d7aecc2496f09"
+ }
+ Frame {
+ msec: 3088
+ hash: "9cba95a510685ab6367ba87246f6c922"
+ }
+ Frame {
+ msec: 3104
+ hash: "33ef448b9485fafb7a2af319f9f6e816"
+ }
+ Frame {
+ msec: 3120
+ hash: "791760db748e46aceb9f469c33b7bf2f"
+ }
+ Frame {
+ msec: 3136
+ hash: "201a00feef1bb445f2fd0ba8ef9467a1"
+ }
+ Frame {
+ msec: 3152
+ hash: "6e8962c3cb522f5a45b093f1780d2dae"
+ }
+ Frame {
+ msec: 3168
+ hash: "d75cb08203a4f2c05b4dfdca2196e3db"
+ }
+ Frame {
+ msec: 3184
+ hash: "0417d681c9b64e2cc252ab6fcf20148b"
+ }
+ Frame {
+ msec: 3200
+ hash: "85993e5a91a86cedb8c88819b035b6bb"
+ }
+ Frame {
+ msec: 3216
+ hash: "d7a0db647e641df9625b8eb5078a8ec3"
+ }
+ Frame {
+ msec: 3232
+ hash: "fa29824ed3fd3d4e0d8036079be6bcf8"
+ }
+ Frame {
+ msec: 3248
+ hash: "4fc84a3ae74bb6ab7b0b846c8747eb54"
+ }
+ Frame {
+ msec: 3264
+ hash: "a172921ffe15077382db8e8915fb340b"
+ }
+ Frame {
+ msec: 3280
+ hash: "480ee71d2407d729814a2e19d4320c59"
+ }
+ Frame {
+ msec: 3296
+ hash: "b8cf02a1ad96d5c3354f2b658085ed28"
+ }
+ Frame {
+ msec: 3312
+ hash: "80fc0f57f58250f63a77b1988a9e1d2e"
+ }
+ Frame {
+ msec: 3328
+ hash: "bc283b5d7c5b88ef447be5992a77b6a9"
+ }
+ Frame {
+ msec: 3344
+ hash: "89c86df88dc1a3188d52c1f75b80ccf1"
+ }
+ Frame {
+ msec: 3360
+ hash: "84148139d89b45949561321bd6f6c835"
+ }
+ Frame {
+ msec: 3376
+ hash: "9118d6933b3f77e0b5b8da2d630152e8"
+ }
+ Frame {
+ msec: 3392
+ hash: "2b5f746225053778fb07a606ff113e64"
+ }
+ Frame {
+ msec: 3408
+ hash: "0a1ed1bea6ed674826d0a2c3146a1c31"
+ }
+ Frame {
+ msec: 3424
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3440
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3456
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3472
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3488
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3504
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3520
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3536
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3552
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3568
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3584
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3600
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3616
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3632
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3648
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 3664
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3680
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3696
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3712
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3728
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3744
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3760
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3776
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3792
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3808
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3824
+ hash: "b3bfd7a06d3e246f4256ab5a267360b0"
+ }
+ Frame {
+ msec: 3840
+ image: "parentAnimation2.3.png"
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml
new file mode 100644
index 0000000..dfab108
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml
@@ -0,0 +1,64 @@
+import Qt 4.7
+
+/*
+Blue rect fills (with 10px margin) screen, then red, then green, then screen again.
+*/
+
+Rectangle {
+ id: whiteRect
+ width: 640; height: 480;
+
+ Rectangle {
+ id: redRect
+ x: 400; y: 50
+ width: 100; height: 100
+ color: "red"
+ }
+
+ Rectangle {
+ id: greenRect
+ x: 100; y: 150
+ width: 200; height: 300
+ color: "green"
+ }
+
+ Rectangle {
+ id: blueRect
+ x: 5; y: 5
+ width: parent.width-10
+ height: parent.height-10
+ color: "lightblue"
+
+ //Text { text: "Click me!"; anchors.centerIn: parent }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ switch(blueRect.state) {
+ case "": blueRect.state = "inRed"; break;
+ case "inRed": blueRect.state = "inGreen"; break;
+ case "inGreen": blueRect.state = ""; break;
+ }
+ }
+ }
+
+ states: [
+ State {
+ name: "inRed"
+ ParentChange { target: blueRect; parent: redRect; x: 5; y: 5; width: parent.width-10; height: parent.height-10 }
+ PropertyChanges { target: redRect; z: 1 }
+ },
+ State {
+ name: "inGreen"
+ ParentChange { target: blueRect; parent: greenRect; x: 5; y: 5; width: parent.width-10; height: parent.height-10 }
+ PropertyChanges { target: greenRect; z: 1 }
+ }
+ ]
+
+ transitions: Transition {
+ ParentAnimation { target: blueRect; //via: whiteRect;
+ NumberAnimation { properties: "x, y, width, height"; duration: 500 }
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml
index d82c6df..cc9a639 100644
--- a/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml
+++ b/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml
@@ -16,7 +16,7 @@ Rectangle {
id: img
source: "pics/qtlogo.png"
x: 60-width/2
- y: 100
+ y: 200-img.height
SequentialAnimation on y {
loops: Animation.Infinite
NumberAnimation {
@@ -24,7 +24,7 @@ Rectangle {
easing.type: "InOutQuad"
}
NumberAnimation {
- to: 100
+ to: 200-img.height
easing.type: "OutBounce"
duration: 2000
}
diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.0.png b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.0.png
new file mode 100644
index 0000000..d8be67b
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.1.png b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.1.png
new file mode 100644
index 0000000..249e0dd
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.2.png b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.2.png
new file mode 100644
index 0000000..044f823
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.3.png b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.3.png
new file mode 100644
index 0000000..d8be67b
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.qml b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.qml
new file mode 100644
index 0000000..dc8e2e2
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.qml
@@ -0,0 +1,1151 @@
+import Qt.VisualTest 4.7
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 32
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 48
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 64
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 80
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 96
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 112
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 128
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 144
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 160
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 176
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 192
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 208
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 224
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 240
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 256
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 272
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 288
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 304
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 320
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 336
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 352
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 368
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 384
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 400
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 416
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 432
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 448
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 464
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 480
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 496
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 512
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 528
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 544
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 560
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 576
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 592
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 608
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 624
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 640
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 656
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 672
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 688
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 704
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 720
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 736
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 752
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 768
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 784
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 800
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 816
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 832
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 848
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 864
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 880
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 896
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 912
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 928
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 944
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 960
+ image: "qtbug10586.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 992
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1008
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1024
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1040
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1056
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1072
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1088
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1104
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1120
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1136
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1152
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1168
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1184
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1200
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1216
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1232
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1248
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1264
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1280
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1296
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1312
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 174; y: 204
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1328
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1344
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1360
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1376
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1392
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 170; y: 204
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1408
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 156; y: 204
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1424
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 1440
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 130; y: 204
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 130; y: 204
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 1456
+ hash: "8b7dd0f0a3881f10d76b47cbec4754c3"
+ }
+ Frame {
+ msec: 1472
+ hash: "b6fc4990acb245e015c35261a3c6fd75"
+ }
+ Frame {
+ msec: 1488
+ hash: "849fa4174134804dadc000323141b341"
+ }
+ Frame {
+ msec: 1504
+ hash: "35f2d6405ed7d992bb62eb6e24478492"
+ }
+ Frame {
+ msec: 1520
+ hash: "673ebb4499522c3f27b775dff1dbbe44"
+ }
+ Frame {
+ msec: 1536
+ hash: "96945f5489ffd0dc8ab995c96eb5da43"
+ }
+ Frame {
+ msec: 1552
+ hash: "2e4543754429ac3db831a2432098c063"
+ }
+ Frame {
+ msec: 1568
+ hash: "02253fe8a9fd5009a07265c2c6ffc8e4"
+ }
+ Frame {
+ msec: 1584
+ hash: "200a89949df1e9ef58d005a139857d2c"
+ }
+ Frame {
+ msec: 1600
+ hash: "ceb28be34c7ea8eff5fa00fdea087439"
+ }
+ Frame {
+ msec: 1616
+ hash: "a9ece475c51f126094c5eff4e20f4a19"
+ }
+ Frame {
+ msec: 1632
+ hash: "aa0776f84aef87d6971affdfa2d8dd82"
+ }
+ Frame {
+ msec: 1648
+ hash: "4c74661e1c73fefc9c5154b257239352"
+ }
+ Frame {
+ msec: 1664
+ hash: "c10d23df3a75966aad5016bd8ba8e9d8"
+ }
+ Frame {
+ msec: 1680
+ hash: "41692977d654a55d3b1d037aea9f2c03"
+ }
+ Frame {
+ msec: 1696
+ hash: "2f1835a1de94f962eb5dc781c85b4c32"
+ }
+ Frame {
+ msec: 1712
+ hash: "7cb78e2e5f6d35d456c95f2bd8652eb5"
+ }
+ Frame {
+ msec: 1728
+ hash: "4388aee9b1c8b4fde43634ad08f03557"
+ }
+ Frame {
+ msec: 1744
+ hash: "1cdc71100fd11cb6e60c9ab7e65e95bf"
+ }
+ Frame {
+ msec: 1760
+ hash: "feddbf269adfc8bb1b1a3656b5b5736d"
+ }
+ Frame {
+ msec: 1776
+ hash: "76b39ce0ee9b9b4af8aa0141577b8460"
+ }
+ Frame {
+ msec: 1792
+ hash: "bac963d3df2841ab7a3770a371f3a94d"
+ }
+ Frame {
+ msec: 1808
+ hash: "403007bb6c0782fece1cedbd40994550"
+ }
+ Frame {
+ msec: 1824
+ hash: "72076c743fdd33fab2ac789c7c22973a"
+ }
+ Frame {
+ msec: 1840
+ hash: "662be553c32b0145b3f4fee9bb0d659d"
+ }
+ Frame {
+ msec: 1856
+ hash: "e6b9049949a0ee4ff8a0fcaf5464f479"
+ }
+ Frame {
+ msec: 1872
+ hash: "eb1939458851780b7bb51ee50f0a3bd7"
+ }
+ Frame {
+ msec: 1888
+ hash: "41c8d2686ddb882981a7d3a5c8c69005"
+ }
+ Frame {
+ msec: 1904
+ hash: "7d3b1fc34082a160cbea4409af85fc9c"
+ }
+ Frame {
+ msec: 1920
+ image: "qtbug10586.1.png"
+ }
+ Frame {
+ msec: 1936
+ hash: "17be4a9c3d4d19e93bf1fc3a13a374a2"
+ }
+ Frame {
+ msec: 1952
+ hash: "d449593024a59487eb92195ee6b77a64"
+ }
+ Frame {
+ msec: 1968
+ hash: "c6ccbc2acec8e32f043f2cfb7b7848a9"
+ }
+ Frame {
+ msec: 1984
+ hash: "cef9f8e8cdd5e2d33b86a9a6fb64ecb4"
+ }
+ Frame {
+ msec: 2000
+ hash: "2a8956de5ce417431bdb156144985370"
+ }
+ Frame {
+ msec: 2016
+ hash: "73721425a9c658bd9d40eac3fcbe8e25"
+ }
+ Frame {
+ msec: 2032
+ hash: "9a9cf8eee0bf2f09944a4fb3b1c139d5"
+ }
+ Frame {
+ msec: 2048
+ hash: "3673cdee04343ce679ec2cebadc9f512"
+ }
+ Frame {
+ msec: 2064
+ hash: "eedd62019867e3189f9cf6e2b4149c6d"
+ }
+ Frame {
+ msec: 2080
+ hash: "7a66bc37f5cf917e8b121003af0530b0"
+ }
+ Frame {
+ msec: 2096
+ hash: "401667ed0f38858553de27164e9cadb5"
+ }
+ Frame {
+ msec: 2112
+ hash: "b391699437c4092de3ad1684a35bfd30"
+ }
+ Frame {
+ msec: 2128
+ hash: "109c91215f075292910095a25eaded49"
+ }
+ Frame {
+ msec: 2144
+ hash: "c44d3f6ce1fa1ab324dd9ef394f37f87"
+ }
+ Frame {
+ msec: 2160
+ hash: "299d43cb3dcf7b95af8803df3eb17a46"
+ }
+ Frame {
+ msec: 2176
+ hash: "7ddd97266383d954a008fbe7b95a3169"
+ }
+ Frame {
+ msec: 2192
+ hash: "941f2837ff5145a26df9a0d9f6d20bd9"
+ }
+ Frame {
+ msec: 2208
+ hash: "d99d76cba43f3ae953605d7732d6ce21"
+ }
+ Frame {
+ msec: 2224
+ hash: "929f49416f7ca80d7f5f2be3b13b849e"
+ }
+ Frame {
+ msec: 2240
+ hash: "929f49416f7ca80d7f5f2be3b13b849e"
+ }
+ Frame {
+ msec: 2256
+ hash: "fff9bbf16d1c3f7510ddfc44af616a5e"
+ }
+ Frame {
+ msec: 2272
+ hash: "70b6cdb95ad6723d18c623e1dc79a8db"
+ }
+ Frame {
+ msec: 2288
+ hash: "70b6cdb95ad6723d18c623e1dc79a8db"
+ }
+ Frame {
+ msec: 2304
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2320
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2336
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2352
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2368
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2384
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2400
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2416
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2432
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2448
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2464
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2480
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2496
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2512
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2528
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2544
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2560
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2576
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2592
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2608
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2624
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2640
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2656
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2672
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2688
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2704
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2720
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2736
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Mouse {
+ type: 2
+ button: 1
+ buttons: 1
+ x: 29; y: 239
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2752
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2768
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2784
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2800
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Frame {
+ msec: 2816
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 35; y: 241
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2832
+ hash: "cdb3c12b1b0b6ab269ba7fcf75320f69"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 63; y: 243
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2848
+ hash: "2732b282b8ac482033694cd04c6f5b7e"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 106; y: 244
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2864
+ hash: "7d253797885f8b304d8fb3ba727a3c5d"
+ }
+ Mouse {
+ type: 5
+ button: 0
+ buttons: 1
+ x: 158; y: 243
+ modifiers: 0
+ sendToViewport: true
+ }
+ Mouse {
+ type: 3
+ button: 1
+ buttons: 0
+ x: 158; y: 243
+ modifiers: 0
+ sendToViewport: true
+ }
+ Frame {
+ msec: 2880
+ image: "qtbug10586.2.png"
+ }
+ Frame {
+ msec: 2896
+ hash: "d85a416e4ddf59dfd0723b0be0e2b418"
+ }
+ Frame {
+ msec: 2912
+ hash: "f1934f6ca6a3c5ac5df3451596b8d8ba"
+ }
+ Frame {
+ msec: 2928
+ hash: "28fc74a76f9eaeeccbd3063dc55a1000"
+ }
+ Frame {
+ msec: 2944
+ hash: "eb8ad8dae734b624664fcf584cda6ba0"
+ }
+ Frame {
+ msec: 2960
+ hash: "a6d0f4aba3e5ae1e003520f45b75d6dd"
+ }
+ Frame {
+ msec: 2976
+ hash: "4e5a4d04dfa5f06292774e6bf4f86508"
+ }
+ Frame {
+ msec: 2992
+ hash: "fc9e16fd8c7379d774a09fe50d4259dc"
+ }
+ Frame {
+ msec: 3008
+ hash: "721ea322d9a5e9d48117336476f568cb"
+ }
+ Frame {
+ msec: 3024
+ hash: "5930448341bce1c50de7acaba1f64ca1"
+ }
+ Frame {
+ msec: 3040
+ hash: "7194bacd56906f83948844224ce6a3e7"
+ }
+ Frame {
+ msec: 3056
+ hash: "fcf11cf70b8ac210d4bb2bc716942053"
+ }
+ Frame {
+ msec: 3072
+ hash: "767d707db4dbb02b6f97153b3822a1d1"
+ }
+ Frame {
+ msec: 3088
+ hash: "f8eb75b97f5233aa82b887aab34a38e3"
+ }
+ Frame {
+ msec: 3104
+ hash: "1d3beb06b39fa1d5cabd31ec4297f59f"
+ }
+ Frame {
+ msec: 3120
+ hash: "cadc775e0764afa7b50c5bab782035dd"
+ }
+ Frame {
+ msec: 3136
+ hash: "385f5a6e80da0d3ddf24539a64f26eb9"
+ }
+ Frame {
+ msec: 3152
+ hash: "34204871a684ea251c9d07fb125436da"
+ }
+ Frame {
+ msec: 3168
+ hash: "bc3e496535e66ff0d1e800092b7c78ca"
+ }
+ Frame {
+ msec: 3184
+ hash: "d6c4ff5bf223361be42c78d6d81248c3"
+ }
+ Frame {
+ msec: 3200
+ hash: "cb09d41612df66a8d099153026adcbf3"
+ }
+ Frame {
+ msec: 3216
+ hash: "f82180b8c0389ddc3623107a049c3366"
+ }
+ Frame {
+ msec: 3232
+ hash: "1b0f65e4599c65b8a603abd8da718d48"
+ }
+ Frame {
+ msec: 3248
+ hash: "897391a8206178356858139b3d1a4ce8"
+ }
+ Frame {
+ msec: 3264
+ hash: "b66d268dc7a42a7b1172b1ff566f4eb8"
+ }
+ Frame {
+ msec: 3280
+ hash: "0fe5d38a253dbd1ebcc67cca7ea86dc7"
+ }
+ Frame {
+ msec: 3296
+ hash: "b788f8a7e1e42f768fd1fe1198ca0344"
+ }
+ Frame {
+ msec: 3312
+ hash: "4f7f8b7f5bb78bb9327b6fa8142ce3a2"
+ }
+ Frame {
+ msec: 3328
+ hash: "30f041278c08174671568a0dfb7cbdf7"
+ }
+ Frame {
+ msec: 3344
+ hash: "6ecd90fc89ab9b6c4813fa6a6e9dffdb"
+ }
+ Frame {
+ msec: 3360
+ hash: "6ecd90fc89ab9b6c4813fa6a6e9dffdb"
+ }
+ Frame {
+ msec: 3376
+ hash: "6d79d9d0ba8da0b5654b39768b25591f"
+ }
+ Frame {
+ msec: 3392
+ hash: "6d79d9d0ba8da0b5654b39768b25591f"
+ }
+ Frame {
+ msec: 3408
+ hash: "6d79d9d0ba8da0b5654b39768b25591f"
+ }
+ Frame {
+ msec: 3424
+ hash: "6d79d9d0ba8da0b5654b39768b25591f"
+ }
+ Frame {
+ msec: 3440
+ hash: "6d79d9d0ba8da0b5654b39768b25591f"
+ }
+ Frame {
+ msec: 3456
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3472
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3488
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3504
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3520
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3536
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3552
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3568
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3584
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3600
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3616
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3632
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3648
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3664
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3680
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3696
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3712
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3728
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3744
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3760
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3776
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3792
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3808
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3824
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3840
+ image: "qtbug10586.3.png"
+ }
+ Frame {
+ msec: 3856
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3872
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3888
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3904
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3920
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3936
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3952
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3968
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 3984
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 4000
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 4016
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 4032
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 4048
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 4064
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Key {
+ type: 6
+ key: 16777249
+ modifiers: 67108864
+ text: ""
+ autorep: false
+ count: 1
+ }
+ Frame {
+ msec: 4080
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 4096
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 4112
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 4128
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 4144
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 4160
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 4176
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+ Frame {
+ msec: 4192
+ hash: "cba9afe3f351e6cd6dc72d7f263401b0"
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/qtbug10586.qml b/tests/auto/declarative/qmlvisual/animation/qtbug10586/qtbug10586.qml
new file mode 100644
index 0000000..f1a3ef7
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/animation/qtbug10586/qtbug10586.qml
@@ -0,0 +1,27 @@
+import Qt 4.7
+
+Rectangle {
+ width: 200
+ height: 400
+ Flickable {
+ id: flick
+ anchors.fill: parent
+ contentWidth: 1000; contentHeight: parent.height
+ Rectangle {
+ border.color: "black"
+ border.width: 10
+ width: 1000; height: 1000
+ rotation: 90
+ gradient: Gradient {
+ GradientStop { position: 0; color: "black" }
+ GradientStop { position: 1; color: "white" }
+ }
+ }
+ }
+ Rectangle {
+ color: "red"
+ width: 100; height: 100
+ y: flick.contentX < 10 ? 300 : 0
+ Behavior on y { NumberAnimation {} }
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-flickable.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-flickable.qml
index a0b787f..e223f5e 100644
--- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-flickable.qml
+++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-flickable.qml
@@ -25,7 +25,7 @@ Rectangle {
MouseArea {
anchors.fill: parent
onPressed: blue.color = "lightsteelblue"
- onReleased: blue.color = "steelblue"
+ onCanceled: blue.color = "steelblue"
}
}
Rectangle {
@@ -36,7 +36,7 @@ Rectangle {
MouseArea {
anchors.fill: parent
onEntered: { red.color = "darkred"; tooltip.opacity = 1 }
- onExited: { red.color = "red"; tooltip.opacity = 0 }
+ onCanceled: { red.color = "red"; tooltip.opacity = 0 }
}
Rectangle {
id: tooltip
diff --git a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data-X11/autosize.0.png b/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data-X11/autosize.0.png
deleted file mode 100644
index 1f28b9a..0000000
--- a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data-X11/autosize.0.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data-X11/autosize.qml b/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data-X11/autosize.qml
deleted file mode 100644
index f4c4e29..0000000
--- a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data-X11/autosize.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-import Qt.VisualTest 4.7
-
-VisualTest {
- Frame {
- msec: 0
- }
- Frame {
- msec: 16
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 32
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 48
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 64
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 80
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 96
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 112
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 128
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 144
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 160
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 176
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 192
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 208
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 224
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 240
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 256
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 272
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 288
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
- Frame {
- msec: 304
- hash: "0c70d855adc847fe33d7959ccb98bb8b"
- }
-}
diff --git a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data/autosize.0.png b/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data/autosize.0.png
deleted file mode 100644
index 1f28b9a..0000000
--- a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data/autosize.0.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data/autosize.qml b/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data/autosize.qml
deleted file mode 100644
index 273c2b0..0000000
--- a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/data/autosize.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-import Qt.VisualTest 4.7
-
-VisualTest {
- Frame {
- msec: 0
- }
- Frame {
- msec: 16
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 32
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 48
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 64
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 80
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 96
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 112
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 128
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 144
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 160
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 176
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 192
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 208
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 224
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 240
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 256
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 272
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 288
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
- Frame {
- msec: 304
- hash: "66539e1b1983d95386b0d30d6e969904"
- }
-}
diff --git a/tests/auto/declarative/qmlvisual/qmlvisual.pro b/tests/auto/declarative/qmlvisual/qmlvisual.pro
index a3abbe3..dca9b04 100644
--- a/tests/auto/declarative/qmlvisual/qmlvisual.pro
+++ b/tests/auto/declarative/qmlvisual/qmlvisual.pro
@@ -4,7 +4,34 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qmlvisual.cpp
-DEFINES += QT_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\"
+symbian: {
+ importFiles.path =
+ importFiles.sources = animation \
+ fillmode \
+ focusscope \
+ ListView \
+ qdeclarativeborderimage \
+ qdeclarativeflickable \
+ qdeclarativeflipable \
+ qdeclarativegridview \
+ qdeclarativemousearea \
+ qdeclarativeparticles \
+ qdeclarativepathview \
+ qdeclarativepositioners \
+ qdeclarativesmoothedanimation \
+ qdeclarativespringfollow \
+ qdeclarativetext \
+ qdeclarativetextedit \
+ qdeclarativetextinput \
+ rect \
+ repeater \
+ selftest_noimages \
+ webview
+ DEPLOYMENT = importFiles
+
+ DEFINES += QT_TEST_SOURCE_DIR=\".\"
+} else {
+ DEFINES += QT_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\"
+}
CONFIG += parallel_test
-
diff --git a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
index 5f25882..f105692 100644
--- a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
+++ b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp
@@ -82,7 +82,7 @@ QString tst_qmlvisual::viewer()
#if defined(Q_WS_MAC)
qmlruntime = QDir(binaries).absoluteFilePath("qml.app/Contents/MacOS/qml");
-#elif defined(Q_WS_WIN)
+#elif defined(Q_WS_WIN) || defined(Q_WS_S60)
qmlruntime = QDir(binaries).absoluteFilePath("qml.exe");
#else
qmlruntime = QDir(binaries).absoluteFilePath("qml");
@@ -101,11 +101,11 @@ void tst_qmlvisual::visual_data()
files << findQmlFiles(QDir(QT_TEST_SOURCE_DIR));
else {
//these are newly added tests we want to try out in CI (then move to the stable list)
- files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/borders.qml";
+ files << QT_TEST_SOURCE_DIR "/animation/qtbug10586/qtbug10586.qml";
files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/animated.qml";
- files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/animated-smooth.qml";
files << QT_TEST_SOURCE_DIR "/qdeclarativeflipable/test-flipable.qml";
files << QT_TEST_SOURCE_DIR "/qdeclarativepositioners/usingRepeater.qml";
+ files << QT_TEST_SOURCE_DIR "/animation/parentAnimation2/parentAnimation2.qml";
//these are tests we think are stable and useful enough to be run by the CI system
files << QT_TEST_SOURCE_DIR "/animation/bindinganimation/bindinganimation.qml";
@@ -123,6 +123,8 @@ void tst_qmlvisual::visual_data()
//these reliably fail in CI, for unknown reasons
//files << QT_TEST_SOURCE_DIR "/animation/easing/easing.qml";
//files << QT_TEST_SOURCE_DIR "/animation/pauseAnimation/pauseAnimation-visual.qml";
+ //files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/borders.qml";
+ //files << QT_TEST_SOURCE_DIR "/qdeclarativeborderimage/animated-smooth.qml";
//these reliably fail on Linux because of color interpolation (different float rounding)
#if !defined(Q_WS_X11) && !defined(Q_WS_QWS)
diff --git a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/autosize.qml b/tests/auto/declarative/qmlvisual/webview/autosize/autosize.qml
index c4a502e..c4a502e 100644
--- a/tests/auto/declarative/qmlvisual/qfxwebview/autosize/autosize.qml
+++ b/tests/auto/declarative/qmlvisual/webview/autosize/autosize.qml
diff --git a/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.0.png b/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.0.png
new file mode 100644
index 0000000..ed87174
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.1.png b/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.1.png
new file mode 100644
index 0000000..ed87174
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.2.png b/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.2.png
new file mode 100644
index 0000000..ed87174
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.3.png b/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.3.png
new file mode 100644
index 0000000..ed87174
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.4.png b/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.4.png
new file mode 100644
index 0000000..ed87174
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.qml b/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.qml
new file mode 100644
index 0000000..6122138
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/webview/autosize/data-X11/autosize.qml
@@ -0,0 +1,115 @@
+import Qt.VisualTest 4.7
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "b2d863e57dee2a297d038e18acc70f92"
+ }
+ Frame {
+ msec: 32
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 48
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 64
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 80
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 96
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 112
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 128
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 144
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 160
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 176
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 192
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 208
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 224
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 240
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 256
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 272
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 288
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 304
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 320
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 336
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 352
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 368
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 384
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 400
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 416
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 432
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.0.png b/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.0.png
new file mode 100644
index 0000000..ed87174
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.0.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.1.png b/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.1.png
new file mode 100644
index 0000000..ed87174
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.1.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.2.png b/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.2.png
new file mode 100644
index 0000000..ed87174
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.2.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.3.png b/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.3.png
new file mode 100644
index 0000000..ed87174
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.3.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.4.png b/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.4.png
new file mode 100644
index 0000000..ed87174
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.4.png
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.qml b/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.qml
new file mode 100644
index 0000000..6122138
--- /dev/null
+++ b/tests/auto/declarative/qmlvisual/webview/autosize/data/autosize.qml
@@ -0,0 +1,115 @@
+import Qt.VisualTest 4.7
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "b2d863e57dee2a297d038e18acc70f92"
+ }
+ Frame {
+ msec: 32
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 48
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 64
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 80
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 96
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 112
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 128
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 144
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 160
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 176
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 192
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 208
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 224
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 240
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 256
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 272
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 288
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 304
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 320
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 336
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 352
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 368
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 384
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 400
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 416
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+ Frame {
+ msec: 432
+ hash: "903a4c7e619abba5342c8c827f26a722"
+ }
+}
diff --git a/tests/auto/declarative/qmlvisual/webview/embedding/data/nesting.0.png b/tests/auto/declarative/qmlvisual/webview/embedding/data/nesting.0.png
deleted file mode 100644
index 57de710..0000000
--- a/tests/auto/declarative/qmlvisual/webview/embedding/data/nesting.0.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/qmlvisual/webview/embedding/data/nesting.qml b/tests/auto/declarative/qmlvisual/webview/embedding/data/nesting.qml
deleted file mode 100644
index 9664566..0000000
--- a/tests/auto/declarative/qmlvisual/webview/embedding/data/nesting.qml
+++ /dev/null
@@ -1,363 +0,0 @@
-import Qt.VisualTest 4.7
-
-VisualTest {
- Frame {
- msec: 0
- }
- Frame {
- msec: 16
- hash: "5dc8dca7a73022fbf2116b654b709244"
- }
- Frame {
- msec: 32
- hash: "5dc8dca7a73022fbf2116b654b709244"
- }
- Frame {
- msec: 48
- hash: "34079c4076ab6aadd8b64fcba7d95e15"
- }
- Frame {
- msec: 64
- hash: "5ab5fc62b49e78d0609dcb4be6c9a157"
- }
- Frame {
- msec: 80
- hash: "063cc7438bbffae717648d98006021a8"
- }
- Frame {
- msec: 96
- hash: "c5cd16663e48639cbeade82c3bfa0403"
- }
- Frame {
- msec: 112
- hash: "ea7f8df84ddbad0f683fe97ddb0a0130"
- }
- Frame {
- msec: 128
- hash: "3c353e09bdb3a1e6ff388ad6020f55ea"
- }
- Frame {
- msec: 144
- hash: "5b6de430365d0c9824337011916b0c0b"
- }
- Frame {
- msec: 160
- hash: "48d353ac9e7ee1ce41361d0a2b47e008"
- }
- Frame {
- msec: 176
- hash: "c96e4d02d343ddd78e8d3dd6aa8e0198"
- }
- Frame {
- msec: 192
- hash: "543c63d77ec635b77672ba4c5160a3d4"
- }
- Frame {
- msec: 208
- hash: "2d56ad9c2352e555fef613d625e71151"
- }
- Frame {
- msec: 224
- hash: "18e433c3e3ee64510f875f674791d51c"
- }
- Frame {
- msec: 240
- hash: "56889122c1ddacdd8ebd88310c7410bc"
- }
- Frame {
- msec: 256
- hash: "d51c85458e0109bd5bf9528b741d98d0"
- }
- Frame {
- msec: 272
- hash: "ac54137afc29a3022c6f01df7cdf2fd6"
- }
- Frame {
- msec: 288
- hash: "c7a42b389bae3b729ba9e6cba7f54530"
- }
- Frame {
- msec: 304
- hash: "7583b55841e80891652c3472c658f989"
- }
- Frame {
- msec: 320
- hash: "95a7f8d47c3788261427727f82c9ff59"
- }
- Frame {
- msec: 336
- hash: "a87bad3e2f010680e16cd1e3f5e03e99"
- }
- Frame {
- msec: 352
- hash: "e16bc51653f21819e0eec412b99a069f"
- }
- Frame {
- msec: 368
- hash: "f1e869580ac148ae207141c5f0adc185"
- }
- Frame {
- msec: 384
- hash: "7e496e44363a16d7c62e4258af9ce087"
- }
- Frame {
- msec: 400
- hash: "19e97915c84d3554c66d5a9ad3aa6a3e"
- }
- Frame {
- msec: 416
- hash: "181181b48a1085d1850f18ca9b163549"
- }
- Frame {
- msec: 432
- hash: "4637cb04595a543867bd43b0c1c829ea"
- }
- Frame {
- msec: 448
- hash: "bd0a074fed5507f8556de6110bf56aa4"
- }
- Frame {
- msec: 464
- hash: "9547618923edac6f7f9a3ff324c4f2d8"
- }
- Frame {
- msec: 480
- hash: "a2f90c88eacb7c66878d45e33c2a787d"
- }
- Frame {
- msec: 496
- hash: "d5ffd3e35d0426887c106069310f84d8"
- }
- Frame {
- msec: 512
- hash: "6bc50a5b76e2a2ef0e6bee762abeb330"
- }
- Frame {
- msec: 528
- hash: "d4439933c842ed8432434d272fea2845"
- }
- Frame {
- msec: 544
- hash: "61699e6ec476ac3f090e4f485430421d"
- }
- Frame {
- msec: 560
- hash: "02d7fa9bcd697d2cab364d0a3ca4a0e2"
- }
- Frame {
- msec: 576
- hash: "914178cbf1f6a6822cc40f81823475e4"
- }
- Frame {
- msec: 592
- hash: "280f867ea27891ee764332998567d40d"
- }
- Frame {
- msec: 608
- hash: "ea0d00fe54a172a89c24eac781f7ae6d"
- }
- Frame {
- msec: 624
- hash: "4e910fb507964a710e26f318c62227bf"
- }
- Frame {
- msec: 640
- hash: "b0c3392eb739f270dd21f552ad999c23"
- }
- Frame {
- msec: 656
- hash: "f3698c83b0972bd66a53ad95d4fc301e"
- }
- Frame {
- msec: 672
- hash: "0d303a0d6a9b626943ac93cc6f3fb230"
- }
- Frame {
- msec: 688
- hash: "ba56d49e6f51aa6f1bd2a7500e3538fd"
- }
- Frame {
- msec: 704
- hash: "273ce89d5194168e5bfd1dcefad49be2"
- }
- Frame {
- msec: 720
- hash: "c2beef4fb7996dbccdaff4f54bdc33f1"
- }
- Frame {
- msec: 736
- hash: "1e1aa7d84f27158a8e61bd8698ddbf2a"
- }
- Frame {
- msec: 752
- hash: "24e82479802e710c673133ca0413be66"
- }
- Frame {
- msec: 768
- hash: "b77e935a690bcb396e15b942d772cf1b"
- }
- Frame {
- msec: 784
- hash: "7b729c74df1d15d6b0e8e1fc19c2d710"
- }
- Frame {
- msec: 800
- hash: "fd6cbdca3e481baaf35022dfea76e74c"
- }
- Frame {
- msec: 816
- hash: "c975f6eb592793aa81895ffcb74ca577"
- }
- Frame {
- msec: 832
- hash: "677c4039a650df53b4e885f37b049ab3"
- }
- Frame {
- msec: 848
- hash: "89563aae36552cb1749ec06567e46d9d"
- }
- Frame {
- msec: 864
- hash: "01f57402874de6608cc02937aaf91794"
- }
- Frame {
- msec: 880
- hash: "50c9c4e5eaaadee1ff230975390d34e3"
- }
- Frame {
- msec: 896
- hash: "20b7d277d398afad59afdf9e6b41a57e"
- }
- Frame {
- msec: 912
- hash: "8f9ea938a2375afeba419199de66dd52"
- }
- Frame {
- msec: 928
- hash: "b96745888ba954bcf304c0840a030f93"
- }
- Frame {
- msec: 944
- hash: "f5715e931274011123160f7ad10d6c52"
- }
- Frame {
- msec: 960
- image: "nesting.0.png"
- }
- Frame {
- msec: 976
- hash: "459fe967816c795a177a3926093fae75"
- }
- Frame {
- msec: 992
- hash: "c599a26083068b6db628c8d8416bab60"
- }
- Frame {
- msec: 1008
- hash: "e0aee7d1152c971b1beee9d36542acb7"
- }
- Frame {
- msec: 1024
- hash: "2af0facdf6412f7b06979aae25e4db26"
- }
- Frame {
- msec: 1040
- hash: "f147a92cb1826f95d4fdb7d011ba79b1"
- }
- Frame {
- msec: 1056
- hash: "12a1cb894b0fb8e44152cccacf855c1a"
- }
- Frame {
- msec: 1072
- hash: "c7500cf58b74fef2c3e9820d1de8f843"
- }
- Frame {
- msec: 1088
- hash: "3a031b2206835f8b2dc9837016df6ae6"
- }
- Frame {
- msec: 1104
- hash: "7a4796b419bbc04237764dea0b1d47d5"
- }
- Frame {
- msec: 1120
- hash: "151d350f0064e2faf0bfb9c58bc3e4f2"
- }
- Frame {
- msec: 1136
- hash: "d72c20a97e678908acc1d6c1f8114d9e"
- }
- Frame {
- msec: 1152
- hash: "22da1e645640a3c31b064ff757113197"
- }
- Frame {
- msec: 1168
- hash: "401f0bf370e2ecea5a84276fb72eb1da"
- }
- Frame {
- msec: 1184
- hash: "c6e00d7b0ac14a5c3860b6a29901c915"
- }
- Frame {
- msec: 1200
- hash: "f1f7dc55d7719fcb6e97157c0ca85fc0"
- }
- Frame {
- msec: 1216
- hash: "6a112e1d79c7128c235d093e4f1f9325"
- }
- Frame {
- msec: 1232
- hash: "14a2caf8cdca8d5147261a315059b69d"
- }
- Frame {
- msec: 1248
- hash: "5645243aa3cfd12b0b32442f063bedb2"
- }
- Frame {
- msec: 1264
- hash: "c7f72534a88e33c72a54cb8580534551"
- }
- Frame {
- msec: 1280
- hash: "6cd5e2e8e0128586a682b3c649ae0631"
- }
- Frame {
- msec: 1296
- hash: "67cefb4526b52d40a31811bc0dfaeb6a"
- }
- Frame {
- msec: 1312
- hash: "fbe2a43a27bf490719c8b9e2b094e34f"
- }
- Frame {
- msec: 1328
- hash: "e028aad6f51a47d8189efcf9c5d277ee"
- }
- Frame {
- msec: 1344
- hash: "2b4cc50c37c07289fa6f9309991d36da"
- }
- Frame {
- msec: 1360
- hash: "b67b2244cd0616d07e100d7b3b00bbe2"
- }
- Frame {
- msec: 1376
- hash: "4e4690cffc98c49e91bdb600f1e94c79"
- }
- Frame {
- msec: 1392
- hash: "e5215c727836a5547a170d42363bc5c8"
- }
- Frame {
- msec: 1408
- hash: "26868e91d1794bb3f42d51f508fef613"
- }
- Frame {
- msec: 1424
- hash: "1e5f431b125a66096ac9a4d5a211a2c4"
- }
-}
diff --git a/tests/auto/declarative/qmlvisual/webview/embedding/egg.qml b/tests/auto/declarative/qmlvisual/webview/embedding/egg.qml
deleted file mode 100644
index c569c9a..0000000
--- a/tests/auto/declarative/qmlvisual/webview/embedding/egg.qml
+++ /dev/null
@@ -1,26 +0,0 @@
-import Qt 4.7
-
-Item {
- property variant period : 250
- property variant color : "black"
- id: root
-
- Item {
- x: root.width/2
- y: root.height/2
- Rectangle {
- radius: width/2
- color: root.color
- x: -width/2
- y: -height/2
- width: root.width*1.5
- height: root.height*1.5
- }
- rotation: NumberAnimation {
- from: 0
- to: 360
- repeat: true
- duration: root.period
- }
- }
-}
diff --git a/tests/auto/declarative/qmlvisual/webview/embedding/nesting.html b/tests/auto/declarative/qmlvisual/webview/embedding/nesting.html
deleted file mode 100644
index 6e81689..0000000
--- a/tests/auto/declarative/qmlvisual/webview/embedding/nesting.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-<head><title>Nesting</title>
-<link rel="icon" sizes="48x48" href="basic.png">
-</head>
-<body bgcolor="green">
-<h1>Nesting</h1>
-This is a test...
-<OBJECT data=egg.qml TYPE=application/x-qt-plugin width=50 height=70 period=2000 color=white></OBJECT>
-... with a spinning QML egg nested in it.
diff --git a/tests/auto/declarative/qmlvisual/webview/embedding/nesting.qml b/tests/auto/declarative/qmlvisual/webview/embedding/nesting.qml
deleted file mode 100644
index 9e008de..0000000
--- a/tests/auto/declarative/qmlvisual/webview/embedding/nesting.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import Qt 4.7
-import org.webkit 1.0
-
-WebView {
- width: 300
- height: 200
- url: "nesting.html"
- settings.pluginsEnabled: true
-}
diff --git a/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp b/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp
index b8e317e..7d34698 100644
--- a/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp
+++ b/tests/auto/declarative/qpacketprotocol/tst_qpacketprotocol.cpp
@@ -225,7 +225,7 @@ void tst_QPacketProtocol::read()
void tst_QPacketProtocol::device()
{
QPacketProtocol p(m_client);
- QCOMPARE(p.device(), m_client);
+ QVERIFY(p.device() == m_client);
}
void tst_QPacketProtocol::tst_QPacket_clear()
diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp
index f8ecca3..4a9f1d1 100644
--- a/tests/auto/gestures/tst_gestures.cpp
+++ b/tests/auto/gestures/tst_gestures.cpp
@@ -50,6 +50,7 @@
#include <qgesturerecognizer.h>
#include <qgraphicsitem.h>
#include <qgraphicsview.h>
+#include <qmainwindow.h>
#include <qdebug.h>
@@ -335,6 +336,7 @@ private slots:
void finishedWithoutStarted();
void unknownGesture();
void graphicsItemGesture();
+ void graphicsView();
void graphicsItemTreeGesture();
void explicitGraphicsObjectTarget();
void gestureOverChildGraphicsItem();
@@ -355,6 +357,7 @@ private slots:
void deleteGestureTargetItem();
void viewportCoordinates();
void partialGesturePropagation();
+ void testQGestureRecognizerCleanup();
};
tst_Gestures::tst_Gestures()
@@ -857,7 +860,6 @@ void tst_Gestures::graphicsItemGesture()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item->grabGesture(CustomGesture::GestureType);
static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
@@ -906,6 +908,71 @@ void tst_Gestures::graphicsItemGesture()
QCOMPARE(item->gestureOverrideEventsReceived, 0);
}
+void tst_Gestures::graphicsView()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ view.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ GestureItem *item = new GestureItem("item");
+ scene.addItem(item);
+ item->setPos(100, 100);
+
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ view.ensureVisible(scene.sceneRect());
+
+ item->grabGesture(CustomGesture::GestureType);
+
+ static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
+ static const int TotalCustomEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialMaybeThreshold + 1;
+
+ CustomEvent event;
+ // make sure the event is properly delivered if only the hotspot is set.
+ event.hotSpot = mapToGlobal(QPointF(10, 10), item, &view);
+ event.hasHotSpot = true;
+ sendCustomGesture(&event, item, &scene);
+
+ QCOMPARE(item->customEventsReceived, TotalCustomEventsCount);
+ QCOMPARE(item->gestureEventsReceived, TotalGestureEventsCount);
+ QCOMPARE(item->gestureOverrideEventsReceived, 0);
+
+ // change the viewport and try again
+ QWidget *newViewport = new QWidget;
+ view.setViewport(newViewport);
+
+ item->reset();
+ sendCustomGesture(&event, item, &scene);
+
+ QCOMPARE(item->customEventsReceived, TotalCustomEventsCount);
+ QCOMPARE(item->gestureEventsReceived, TotalGestureEventsCount);
+ QCOMPARE(item->gestureOverrideEventsReceived, 0);
+
+ // change the scene and try again
+ QGraphicsScene newScene;
+ item = new GestureItem("newItem");
+ newScene.addItem(item);
+ item->setPos(100, 100);
+ view.setScene(&newScene);
+
+ item->reset();
+ // first without a gesture
+ sendCustomGesture(&event, item, &newScene);
+
+ QCOMPARE(item->customEventsReceived, TotalCustomEventsCount);
+ QCOMPARE(item->gestureEventsReceived, 0);
+ QCOMPARE(item->gestureOverrideEventsReceived, 0);
+
+ // then grab the gesture and try again
+ item->reset();
+ item->grabGesture(CustomGesture::GestureType);
+ sendCustomGesture(&event, item, &newScene);
+
+ QCOMPARE(item->customEventsReceived, TotalCustomEventsCount);
+ QCOMPARE(item->gestureEventsReceived, TotalGestureEventsCount);
+ QCOMPARE(item->gestureOverrideEventsReceived, 0);
+}
+
void tst_Gestures::graphicsItemTreeGesture()
{
QGraphicsScene scene;
@@ -931,7 +998,6 @@ void tst_Gestures::graphicsItemTreeGesture()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item1->grabGesture(CustomGesture::GestureType);
static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
@@ -989,7 +1055,6 @@ void tst_Gestures::explicitGraphicsObjectTarget()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item1->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item2->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item2_child1->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
@@ -1049,7 +1114,6 @@ void tst_Gestures::gestureOverChildGraphicsItem()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item1->grabGesture(CustomGesture::GestureType);
static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
@@ -1517,8 +1581,6 @@ void tst_Gestures::autoCancelGestures2()
parent->setPos(0, 0);
child->setPos(10, 10);
scene.addItem(parent);
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
- view.viewport()->grabGesture(secondGesture, Qt::DontStartGestureOnChildren);
parent->grabGesture(CustomGesture::GestureType);
child->grabGesture(secondGesture);
@@ -1571,7 +1633,6 @@ void tst_Gestures::graphicsViewParentPropagation()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item0->grabGesture(CustomGesture::GestureType, Qt::ReceivePartialGestures | Qt::IgnoredGesturesPropagateToParent);
item1->grabGesture(CustomGesture::GestureType, Qt::ReceivePartialGestures | Qt::IgnoredGesturesPropagateToParent);
item1_c1->grabGesture(CustomGesture::GestureType, Qt::IgnoredGesturesPropagateToParent);
@@ -1642,8 +1703,6 @@ void tst_Gestures::panelPropagation()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
-
static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
static const int TotalCustomEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialMaybeThreshold + 1;
@@ -1755,8 +1814,6 @@ void tst_Gestures::panelStacksBehindParent()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
-
static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
CustomEvent event;
@@ -1841,8 +1898,6 @@ void tst_Gestures::deleteGestureTargetItem()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
-
if (propagateUpdateGesture)
item2->ignoredUpdatedGestures << CustomGesture::GestureType;
connect(items.value(emitter, 0), signalName, items.value(receiver, 0), slotName);
@@ -1888,8 +1943,6 @@ void tst_Gestures::viewportCoordinates()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
-
CustomEvent event;
event.hotSpot = mapToGlobal(item1->boundingRect().center(), item1, &view);
event.hasHotSpot = true;
@@ -1927,8 +1980,6 @@ void tst_Gestures::partialGesturePropagation()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
-
item1->ignoredUpdatedGestures << CustomGesture::GestureType;
CustomEvent event;
@@ -1949,5 +2000,74 @@ void tst_Gestures::partialGesturePropagation()
QCOMPARE(item4->gestureEventsReceived, 0);
}
+class WinNativePan : public QPanGesture {
+public:
+ WinNativePan() {}
+};
+
+class Pan : public QPanGesture {
+public:
+ Pan() {}
+};
+
+class CustomPan : public QPanGesture {
+public:
+ CustomPan() {}
+};
+
+// Recognizer for active gesture triggers on mouse press
+class PanRecognizer : public QGestureRecognizer {
+public:
+ enum PanType { Platform, Default, Custom };
+
+ PanRecognizer(int id) : m_id(id) {}
+ QGesture *create(QObject *) {
+ switch(m_id) {
+ case Platform: return new WinNativePan();
+ case Default: return new Pan();
+ default: return new CustomPan();
+ }
+ }
+
+ Result recognize(QGesture *, QObject *, QEvent *) { return QGestureRecognizer::Ignore; }
+
+ const int m_id;
+};
+
+void tst_Gestures::testQGestureRecognizerCleanup()
+{
+ // Clean first the current recognizers in QGManager
+ QGestureRecognizer::unregisterRecognizer(Qt::PanGesture);
+
+ // v-- Qt singleton QGManager initialization
+
+ // Mimic QGestureManager: register both default and "platform" recognizers
+ // (this is done in windows when QT_NO_NATIVE_GESTURES is not defined)
+ PanRecognizer *def = new PanRecognizer(PanRecognizer::Default);
+ QGestureRecognizer::registerRecognizer(def);
+ PanRecognizer *plt = new PanRecognizer(PanRecognizer::Platform);
+ QGestureRecognizer::registerRecognizer(plt);
+ qDebug () << "register: default =" << def << "; platform =" << plt;
+
+ // ^-- Qt singleton QGManager initialization
+
+ // Here, application code would start
+
+ // Create QGV (has a QAScrollArea, which uses Qt::PanGesture)
+ QMainWindow *w = new QMainWindow;
+ QGraphicsView *v = new QGraphicsView();
+ w->setCentralWidget(v);
+
+ // Unregister Qt recognizers
+ QGestureRecognizer::unregisterRecognizer(Qt::PanGesture);
+
+ // Register a custom Pan recognizer
+ //QGestureRecognizer::registerRecognizer(new PanRecognizer(PanRecognizer::Custom));
+
+ w->show();
+ QTest::qWaitForWindowShown(w);
+ delete w;
+}
+
QTEST_MAIN(tst_Gestures)
#include "tst_gestures.moc"
diff --git a/tests/auto/languagechange/tst_languagechange.cpp b/tests/auto/languagechange/tst_languagechange.cpp
index d04707e..bcc3be4 100644
--- a/tests/auto/languagechange/tst_languagechange.cpp
+++ b/tests/auto/languagechange/tst_languagechange.cpp
@@ -238,8 +238,8 @@ void tst_languageChange::retranslatability()
QString fooName = tmpParentDir + "/foo";
QDir dir;
QCOMPARE(dir.mkpath(tmpDir), true);
-#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
- // Just create a new file instead of copying exe, because exe is not there in emulator
+#if defined(Q_OS_SYMBIAN)
+ // Just create a new file instead of copying exe, because there is no read access to /sys/bin
{
QFile fooFile(fooName);
QVERIFY(fooFile.open(QIODevice::WriteOnly | QIODevice::Text));
diff --git a/tests/auto/mediaservices.pro b/tests/auto/mediaservices.pro
deleted file mode 100644
index 1b50cd7..0000000
--- a/tests/auto/mediaservices.pro
+++ /dev/null
@@ -1,19 +0,0 @@
-TEMPLATE=subdirs
-SUBDIRS=\
- qsoundeffect \
- qdeclarativeaudio \
- qdeclarativevideo \
- qgraphicsvideoitem \
- qmediacontent \
- qmediaobject \
- qmediaplayer \
- qmediaplaylist \
- qmediaplaylistnavigator \
- qmediapluginloader \
- qmediaresource \
- qmediaservice \
- qmediaserviceprovider \
- qmediatimerange \
- qvideowidget
-
-
diff --git a/tests/auto/qabstractnetworkcache/qabstractnetworkcache.pro b/tests/auto/qabstractnetworkcache/qabstractnetworkcache.pro
index a57c56f..2e2577d 100644
--- a/tests/auto/qabstractnetworkcache/qabstractnetworkcache.pro
+++ b/tests/auto/qabstractnetworkcache/qabstractnetworkcache.pro
@@ -9,3 +9,4 @@ wince*|symbian: {
DEPLOYMENT += testFiles
}
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qabstractsocket/qabstractsocket.pro b/tests/auto/qabstractsocket/qabstractsocket.pro
index 59999af..814a7d2 100644
--- a/tests/auto/qabstractsocket/qabstractsocket.pro
+++ b/tests/auto/qabstractsocket/qabstractsocket.pro
@@ -7,4 +7,5 @@ QT = core network
SOURCES += tst_qabstractsocket.cpp
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qbuffer/tst_qbuffer.cpp b/tests/auto/qbuffer/tst_qbuffer.cpp
index fcef6a3..dd5ca91 100644
--- a/tests/auto/qbuffer/tst_qbuffer.cpp
+++ b/tests/auto/qbuffer/tst_qbuffer.cpp
@@ -76,6 +76,7 @@ private slots:
void atEnd();
void readLineBoundaries();
void writeAfterQByteArrayResize();
+ void read_null();
protected slots:
void readyReadSlot();
@@ -529,5 +530,30 @@ void tst_QBuffer::writeAfterQByteArrayResize()
QCOMPARE(buffer.buffer().size(), 1000);
}
+void tst_QBuffer::read_null()
+{
+ QByteArray buffer;
+ buffer.resize(32000);
+ for (int i = 0; i < buffer.size(); ++i)
+ buffer[i] = char(i & 0xff);
+
+ QBuffer in(&buffer);
+ in.open(QIODevice::ReadOnly);
+
+ QByteArray chunk;
+
+ chunk.resize(16380);
+ in.read(chunk.data(), 16380);
+
+ QCOMPARE(chunk, buffer.mid(0, chunk.size()));
+
+ in.read(chunk.data(), 0);
+
+ chunk.resize(8);
+ in.read(chunk.data(), chunk.size());
+
+ QCOMPARE(chunk, buffer.mid(16380, chunk.size()));
+}
+
QTEST_MAIN(tst_QBuffer)
#include "tst_qbuffer.moc"
diff --git a/tests/auto/qcolumnview/tst_qcolumnview.cpp b/tests/auto/qcolumnview/tst_qcolumnview.cpp
index 90f499d..1da8c5d 100644
--- a/tests/auto/qcolumnview/tst_qcolumnview.cpp
+++ b/tests/auto/qcolumnview/tst_qcolumnview.cpp
@@ -596,11 +596,11 @@ void tst_QColumnView::clicked()
QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, localPoint);
QCOMPARE(clickedSpy.count(), 1);
qApp->processEvents();
-
+
if (sizeof(qreal) != sizeof(double)) {
QSKIP("Skipped due to rounding errors", SkipAll);
}
-
+
for (int i = 0; i < view.createdColumns.count(); ++i) {
QAbstractItemView *column = view.createdColumns.at(i);
if (column && column->selectionModel() && (column->rootIndex() == home))
@@ -961,9 +961,9 @@ void tst_QColumnView::parentCurrentIndex()
QVERIFY(third.isValid());
view.setCurrentIndex(third);
QTest::qWait(ANIMATION_DELAY);
- QCOMPARE(view.createdColumns[0]->currentIndex(), first);
- QCOMPARE(view.createdColumns[1]->currentIndex(), second);
- QCOMPARE(view.createdColumns[2]->currentIndex(), third);
+ QTRY_COMPARE(view.createdColumns[0]->currentIndex(), first);
+ QTRY_COMPARE(view.createdColumns[1]->currentIndex(), second);
+ QTRY_COMPARE(view.createdColumns[2]->currentIndex(), third);
first = model.index(0, 0, QModelIndex());
second = model.index(secondRow, 0, first);
diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp
index 6aca996..47c54a5 100644
--- a/tests/auto/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/qdatetime/tst_qdatetime.cpp
@@ -106,6 +106,8 @@ private slots:
void daysTo();
void secsTo_data();
void secsTo();
+ void msecsTo_data();
+ void msecsTo();
void operator_eqeq();
void currentDateTime();
void currentDateTimeUtc();
@@ -910,6 +912,30 @@ void tst_QDateTime::secsTo()
QVERIFY((dt >= result) == (0 >= nsecs));
}
+void tst_QDateTime::msecsTo_data()
+{
+ addMSecs_data();
+}
+
+void tst_QDateTime::msecsTo()
+{
+ QFETCH(QDateTime, dt);
+ QFETCH(int, nsecs);
+ QFETCH(QDateTime, result);
+
+#ifdef Q_OS_IRIX
+ QEXPECT_FAIL("cet4", "IRIX databases say 1970 had DST", Abort);
+#endif
+ QCOMPARE(dt.msecsTo(result), qint64(nsecs) * 1000);
+ QCOMPARE(result.msecsTo(dt), -qint64(nsecs) * 1000);
+ QVERIFY((dt == result) == (0 == (qint64(nsecs) * 1000)));
+ QVERIFY((dt != result) == (0 != (qint64(nsecs) * 1000)));
+ QVERIFY((dt < result) == (0 < (qint64(nsecs) * 1000)));
+ QVERIFY((dt <= result) == (0 <= (qint64(nsecs) * 1000)));
+ QVERIFY((dt > result) == (0 > (qint64(nsecs) * 1000)));
+ QVERIFY((dt >= result) == (0 >= (qint64(nsecs) * 1000)));
+}
+
void tst_QDateTime::currentDateTime()
{
#if defined(Q_OS_WINCE)
diff --git a/tests/auto/qdbusserver/.gitignore b/tests/auto/qdbusserver/.gitignore
deleted file mode 100644
index 33a9be2..0000000
--- a/tests/auto/qdbusserver/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-tst_qdbusserver
diff --git a/tests/auto/qdbusserver/qdbusserver.pro b/tests/auto/qdbusserver/qdbusserver.pro
deleted file mode 100644
index 05a4eb8..0000000
--- a/tests/auto/qdbusserver/qdbusserver.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-load(qttest_p4)
-QT = core
-
-contains(QT_CONFIG,dbus): {
- SOURCES += tst_qdbusserver.cpp
- QT += dbus
-} else {
- SOURCES += ../qdbusmarshall/dummy.cpp
-}
-
-
diff --git a/tests/auto/qdbusserver/server.cpp b/tests/auto/qdbusserver/server.cpp
deleted file mode 100644
index d4422f0..0000000
--- a/tests/auto/qdbusserver/server.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QtCore/QtCore>
-#include <QtDBus/QtDBus>
-
-int main(int argc, char *argv[])
-{
- QCoreApplication app(argc, argv);
- QDBusServer server("unix:path=/tmp/qdbus-test");
- return app.exec();
-}
diff --git a/tests/auto/qdbusserver/tst_qdbusserver.cpp b/tests/auto/qdbusserver/tst_qdbusserver.cpp
deleted file mode 100644
index f0da02a..0000000
--- a/tests/auto/qdbusserver/tst_qdbusserver.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <qcoreapplication.h>
-#include <qdebug.h>
-
-#include <QtTest/QtTest>
-#include <QtDBus/QtDBus>
-
-static const QString bus = "unix:path=/tmp/qdbus-test";
-static const QString service = "com.trolltech.Qt.Autotests.QDBusServer";
-static const QString path = "/com/trolltech/test";
-
-class tst_QDBusServer : public QObject
-{
- Q_OBJECT
-
- void connectToServer();
- void callMethod();
-private slots:
-};
-
-void tst_QDBusServer::connectToServer()
-{
- QDBusConnection connection = QDBusConnection::connectToBus(bus, "test-connection");
- QTest::qWait(100);
- QVERIFY(connection.isConnected());
-}
-
-void tst_QDBusServer::callMethod()
-{
- QDBusConnection connection = QDBusConnection::connectToBus(bus, "test-connection");
- QTest::qWait(100);
- QVERIFY(connection.isConnected());
- //QDBusMessage msg = QDBusMessage::createMethodCall(bus, path, /*service*/"", "method");
- //QDBusMessage reply = connection.call(msg, QDBus::Block);
-}
-
-QTEST_MAIN(tst_QDBusServer)
-
-#include "tst_qdbusserver.moc"
diff --git a/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro b/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro
deleted file mode 100644
index ecfe299..0000000
--- a/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro
+++ /dev/null
@@ -1,14 +0,0 @@
-load(qttest_p4)
-
-HEADERS += \
- $$PWD/../../../src/imports/multimedia/qdeclarativeaudio_p.h \
- $$PWD/../../../src/imports/multimedia/qdeclarativemediabase_p.h \
- $$PWD/../../../src/imports/multimedia/qmetadatacontrolmetaobject_p.h
-
-SOURCES += \
- tst_qdeclarativeaudio.cpp \
- $$PWD/../../../src/imports/multimedia/qdeclarativeaudio.cpp \
- $$PWD/../../../src/imports/multimedia/qdeclarativemediabase.cpp \
- $$PWD/../../../src/imports/multimedia/qmetadatacontrolmetaobject.cpp
-
-QT += mediaservices declarative
diff --git a/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp b/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
deleted file mode 100644
index e393599..0000000
--- a/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
+++ /dev/null
@@ -1,1252 +0,0 @@
-/****************************************************************************
-**
-** 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 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 "../../../src/imports/multimedia/qdeclarativeaudio_p.h"
-
-#include <QtGui/qapplication.h>
-#include <QtMediaServices/qmediaplayercontrol.h>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qmetadatacontrol.h>
-
-
-class tst_QDeclarativeAudio : public QObject
-{
- Q_OBJECT
-public slots:
- void initTestCase();
-
-private slots:
- void nullPlayerControl();
- void nullMetaDataControl();
- void nullService();
-
- void source();
- void autoLoad();
- void playing();
- void paused();
- void duration();
- void position();
- void volume();
- void muted();
- void bufferProgress();
- void seekable();
- void playbackRate();
- void status();
- void metaData_data();
- void metaData();
- void error();
-};
-
-Q_DECLARE_METATYPE(QtMediaServices::MetaData);
-Q_DECLARE_METATYPE(QDeclarativeAudio::Error);
-
-class QtTestMediaPlayerControl : public QMediaPlayerControl
-{
- Q_OBJECT
-public:
- QtTestMediaPlayerControl(QObject *parent = 0)
- : QMediaPlayerControl(parent)
- , m_state(QMediaPlayer::StoppedState)
- , m_mediaStatus(QMediaPlayer::NoMedia)
- , m_duration(0)
- , m_position(0)
- , m_playbackRate(1.0)
- , m_volume(50)
- , m_bufferStatus(0)
- , m_muted(false)
- , m_audioAvailable(false)
- , m_videoAvailable(false)
- , m_seekable(false)
- {
- }
-
- QMediaPlayer::State state() const { return m_state; }
- void updateState(QMediaPlayer::State state) { emit stateChanged(m_state = state); }
-
- QMediaPlayer::MediaStatus mediaStatus() const { return m_mediaStatus; }
- void updateMediaStatus(QMediaPlayer::MediaStatus status) {
- emit mediaStatusChanged(m_mediaStatus = status); }
- void updateMediaStatus(QMediaPlayer::MediaStatus status, QMediaPlayer::State state)
- {
- m_mediaStatus = status;
- m_state = state;
-
- emit mediaStatusChanged(m_mediaStatus);
- emit stateChanged(m_state);
- }
-
- qint64 duration() const { return m_duration; }
- void setDuration(qint64 duration) { emit durationChanged(m_duration = duration); }
-
- qint64 position() const { return m_position; }
- void setPosition(qint64 position) { emit positionChanged(m_position = position); }
-
- int volume() const { return m_volume; }
- void setVolume(int volume) { emit volumeChanged(m_volume = volume); }
-
- bool isMuted() const { return m_muted; }
- void setMuted(bool muted) { emit mutedChanged(m_muted = muted); }
-
- int bufferStatus() const { return m_bufferStatus; }
- void setBufferStatus(int status) { emit bufferStatusChanged(m_bufferStatus = status); }
-
- bool isAudioAvailable() const { return m_audioAvailable; }
- void setAudioAvailable(bool available) {
- emit audioAvailableChanged(m_audioAvailable = available); }
- bool isVideoAvailable() const { return m_videoAvailable; }
- void setVideoAvailable(bool available) {
- emit videoAvailableChanged(m_videoAvailable = available); }
-
- bool isSeekable() const { return m_seekable; }
- void setSeekable(bool seekable) { emit seekableChanged(m_seekable = seekable); }
-
- QMediaTimeRange availablePlaybackRanges() const { return QMediaTimeRange(); }
-
- qreal playbackRate() const { return m_playbackRate; }
- void setPlaybackRate(qreal rate) { emit playbackRateChanged(m_playbackRate = rate); }
-
- QMediaContent media() const { return m_media; }
- const QIODevice *mediaStream() const { return 0; }
- void setMedia(const QMediaContent &media, QIODevice *)
- {
- m_media = media;
-
- m_mediaStatus = m_media.isNull()
- ? QMediaPlayer::NoMedia
- : QMediaPlayer::LoadingMedia;
-
- emit mediaChanged(m_media);
- emit mediaStatusChanged(m_mediaStatus);
- }
-
- void play() { emit stateChanged(m_state = QMediaPlayer::PlayingState); }
- void pause() { emit stateChanged(m_state = QMediaPlayer::PausedState); }
- void stop() { emit stateChanged(m_state = QMediaPlayer::StoppedState); }
-
- void emitError(QMediaPlayer::Error err, const QString &errorString) {
- emit error(err, errorString); }
-
-private:
- QMediaPlayer::State m_state;
- QMediaPlayer::MediaStatus m_mediaStatus;
- qint64 m_duration;
- qint64 m_position;
- qreal m_playbackRate;
- int m_volume;
- int m_bufferStatus;
- bool m_muted;
- bool m_audioAvailable;
- bool m_videoAvailable;
- bool m_seekable;
- QMediaContent m_media;
-};
-
-class QtTestMetaDataControl : public QMetaDataControl
-{
- Q_OBJECT
-public:
- QtTestMetaDataControl(QObject *parent = 0)
- : QMetaDataControl(parent)
- {
- }
-
- bool isWritable() const { return true; }
- bool isMetaDataAvailable() const { return true; }
-
- QVariant metaData(QtMediaServices::MetaData key) const { return m_metaData.value(key); }
- void setMetaData(QtMediaServices::MetaData key, const QVariant &value) {
- m_metaData.insert(key, value); emit metaDataChanged(); }
- void setMetaData(const QMap<QtMediaServices::MetaData, QVariant> &metaData) {
- m_metaData = metaData; emit metaDataChanged(); }
-
- QList<QtMediaServices::MetaData> availableMetaData() const { return m_metaData.keys(); }
-
- QVariant extendedMetaData(const QString &) const { return QVariant(); }
- void setExtendedMetaData(const QString &, const QVariant &) {}
- QStringList availableExtendedMetaData() const { return QStringList(); }
-
-private:
- QMap<QtMediaServices::MetaData, QVariant> m_metaData;
-};
-
-class QtTestMediaService : public QMediaService
-{
- Q_OBJECT
-public:
- QtTestMediaService(
- QtTestMediaPlayerControl *playerControl,
- QtTestMetaDataControl *metaDataControl,
- QObject *parent)
- : QMediaService(parent)
- , playerControl(playerControl)
- , metaDataControl(metaDataControl)
- {
- }
-
- QMediaControl *control(const char *name) const
- {
- if (qstrcmp(name, QMediaPlayerControl_iid) == 0)
- return playerControl;
- else if (qstrcmp(name, QMetaDataControl_iid) == 0)
- return metaDataControl;
- else
- return 0;
- }
-
- QtTestMediaPlayerControl *playerControl;
- QtTestMetaDataControl *metaDataControl;
-};
-
-class QtTestMediaServiceProvider : public QMediaServiceProvider
-{
- Q_OBJECT
-public:
- QtTestMediaServiceProvider()
- : service(new QtTestMediaService(
- new QtTestMediaPlayerControl(this), new QtTestMetaDataControl(this), this))
- {
- setDefaultServiceProvider(this);
- }
-
- QtTestMediaServiceProvider(QtTestMediaService *service)
- : service(service)
- {
- setDefaultServiceProvider(this);
- }
-
- QtTestMediaServiceProvider(
- QtTestMediaPlayerControl *playerControl, QtTestMetaDataControl *metaDataControl)
- : service(new QtTestMediaService(playerControl, metaDataControl, this))
- {
- setDefaultServiceProvider(this);
- }
-
- ~QtTestMediaServiceProvider()
- {
- setDefaultServiceProvider(0);
- }
-
- QMediaService *requestService(
- const QByteArray &type,
- const QMediaServiceProviderHint & = QMediaServiceProviderHint())
- {
- requestedService = type;
-
- return service;
- }
-
- void releaseService(QMediaService *) {}
-
- inline QtTestMediaPlayerControl *playerControl() { return service->playerControl; }
- inline QtTestMetaDataControl *metaDataControl() { return service->metaDataControl; }
-
- QtTestMediaService *service;
- QByteArray requestedService;
-};
-
-
-void tst_QDeclarativeAudio::initTestCase()
-{
- qRegisterMetaType<QDeclarativeAudio::Error>();
-}
-
-void tst_QDeclarativeAudio::nullPlayerControl()
-{
- QtTestMetaDataControl metaDataControl;
- QtTestMediaServiceProvider provider(0, &metaDataControl);
-
- QDeclarativeAudio audio;
-
- QCOMPARE(audio.source(), QUrl());
- audio.setSource(QUrl("http://example.com"));
- QCOMPARE(audio.source(), QUrl("http://example.com"));
-
- QCOMPARE(audio.isPlaying(), false);
- audio.setPlaying(true);
- QCOMPARE(audio.isPlaying(), true);
- audio.setPlaying(false);
- audio.play();
- QCOMPARE(audio.isPlaying(), false);
-
- QCOMPARE(audio.isPaused(), false);
- audio.pause();
- QCOMPARE(audio.isPaused(), false);
- audio.setPaused(true);
- QCOMPARE(audio.isPaused(), true);
-
- QCOMPARE(audio.duration(), 0);
-
- QCOMPARE(audio.position(), 0);
- audio.setPosition(10000);
- QCOMPARE(audio.position(), 10000);
-
- QCOMPARE(audio.volume(), qreal(1.0));
- audio.setVolume(0.5);
- QCOMPARE(audio.volume(), qreal(0.5));
-
- QCOMPARE(audio.isMuted(), false);
- audio.setMuted(true);
- QCOMPARE(audio.isMuted(), true);
-
- QCOMPARE(audio.bufferProgress(), qreal(0));
-
- QCOMPARE(audio.isSeekable(), false);
-
- QCOMPARE(audio.playbackRate(), qreal(1.0));
-
- QCOMPARE(audio.status(), QDeclarativeAudio::NoMedia);
-
- QCOMPARE(audio.error(), QDeclarativeAudio::ServiceMissing);
-}
-
-void tst_QDeclarativeAudio::nullMetaDataControl()
-{
- QtTestMediaPlayerControl playerControl;
- QtTestMediaServiceProvider provider(&playerControl, 0);
-
- QDeclarativeAudio audio;
-
- QCOMPARE(audio.metaObject()->indexOfProperty("title"), -1);
- QCOMPARE(audio.metaObject()->indexOfProperty("genre"), -1);
- QCOMPARE(audio.metaObject()->indexOfProperty("description"), -1);
-}
-
-void tst_QDeclarativeAudio::nullService()
-{
- QtTestMediaServiceProvider provider(0);
-
- QDeclarativeAudio audio;
-
- QCOMPARE(audio.source(), QUrl());
- audio.setSource(QUrl("http://example.com"));
- QCOMPARE(audio.source(), QUrl("http://example.com"));
-
- QCOMPARE(audio.isPlaying(), false);
- audio.setPlaying(true);
- QCOMPARE(audio.isPlaying(), true);
- audio.setPlaying(false);
- audio.play();
- QCOMPARE(audio.isPlaying(), false);
-
- QCOMPARE(audio.isPaused(), false);
- audio.pause();
- QCOMPARE(audio.isPaused(), false);
- audio.setPaused(true);
- QCOMPARE(audio.isPaused(), true);
-
- QCOMPARE(audio.duration(), 0);
-
- QCOMPARE(audio.position(), 0);
- audio.setPosition(10000);
- QCOMPARE(audio.position(), 10000);
-
- QCOMPARE(audio.volume(), qreal(1.0));
- audio.setVolume(0.5);
- QCOMPARE(audio.volume(), qreal(0.5));
-
- QCOMPARE(audio.isMuted(), false);
- audio.setMuted(true);
- QCOMPARE(audio.isMuted(), true);
-
- QCOMPARE(audio.bufferProgress(), qreal(0));
-
- QCOMPARE(audio.isSeekable(), false);
-
- QCOMPARE(audio.playbackRate(), qreal(1.0));
-
- QCOMPARE(audio.status(), QDeclarativeAudio::NoMedia);
-
- QCOMPARE(audio.error(), QDeclarativeAudio::ServiceMissing);
-
- QCOMPARE(audio.metaObject()->indexOfProperty("title"), -1);
- QCOMPARE(audio.metaObject()->indexOfProperty("genre"), -1);
- QCOMPARE(audio.metaObject()->indexOfProperty("description"), -1);
-}
-
-void tst_QDeclarativeAudio::source()
-{
- const QUrl url1("http://example.com");
- const QUrl url2("file:///local/path");
- const QUrl url3;
-
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
- audio.componentComplete();
-
- QSignalSpy spy(&audio, SIGNAL(sourceChanged()));
-
- audio.setSource(url1);
- QCOMPARE(audio.source(), url1);
- QCOMPARE(provider.playerControl()->media().canonicalUrl(), url1);
- QCOMPARE(spy.count(), 1);
-
- audio.setSource(url2);
- QCOMPARE(audio.source(), url2);
- QCOMPARE(provider.playerControl()->media().canonicalUrl(), url2);
- QCOMPARE(spy.count(), 2);
-
- audio.setSource(url3);
- QCOMPARE(audio.source(), url3);
- QCOMPARE(provider.playerControl()->media().canonicalUrl(), url3);
- QCOMPARE(spy.count(), 3);
-}
-
-void tst_QDeclarativeAudio::autoLoad()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
- audio.componentComplete();
-
- QSignalSpy spy(&audio, SIGNAL(autoLoadChanged()));
-
- QCOMPARE(audio.isAutoLoad(), true);
-
- audio.setAutoLoad(false);
- QCOMPARE(audio.isAutoLoad(), false);
- QCOMPARE(spy.count(), 1);
-
- audio.setSource(QUrl("http://example.com"));
- QCOMPARE(audio.source(), QUrl("http://example.com"));
- audio.play();
- QCOMPARE(audio.isPlaying(), true);
- audio.stop();
-
- audio.setAutoLoad(true);
- audio.setSource(QUrl("http://example.com"));
- audio.setPaused(true);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(audio.isPaused(), true);
-}
-
-void tst_QDeclarativeAudio::playing()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
-
- QSignalSpy playingChangedSpy(&audio, SIGNAL(playingChanged()));
- QSignalSpy startedSpy(&audio, SIGNAL(started()));
- QSignalSpy stoppedSpy(&audio, SIGNAL(stopped()));
-
- int playingChanged = 0;
- int started = 0;
- int stopped = 0;
-
- audio.componentComplete();
-
- QCOMPARE(audio.isPlaying(), false);
-
- // setPlaying(true) when stopped.
- audio.setPlaying(true);
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(false) when playing.
- audio.setPlaying(false);
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(stoppedSpy.count(), ++stopped);
-
- // play() when stopped.
- audio.play();
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // stop() when playing.
- audio.stop();
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(stoppedSpy.count(), ++stopped);
-
- // stop() when stopped.
- audio.stop();
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(false) when stopped.
- audio.setPlaying(false);
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- audio.setPlaying(true);
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(true) when playing.
- audio.setPlaying(true);
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // play() when playing.
- audio.play();
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(stoppedSpy.count(), stopped);
-}
-
-void tst_QDeclarativeAudio::paused()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
-
- QSignalSpy playingChangedSpy(&audio, SIGNAL(playingChanged()));
- QSignalSpy pausedChangedSpy(&audio, SIGNAL(pausedChanged()));
- QSignalSpy startedSpy(&audio, SIGNAL(started()));
- QSignalSpy pausedSpy(&audio, SIGNAL(paused()));
- QSignalSpy resumedSpy(&audio, SIGNAL(resumed()));
- QSignalSpy stoppedSpy(&audio, SIGNAL(stopped()));
-
- int playingChanged = 0;
- int pausedChanged = 0;
- int started = 0;
- int paused = 0;
- int resumed = 0;
- int stopped = 0;
-
- audio.componentComplete();
-
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(audio.isPaused(), false);
-
- // setPlaying(true) when stopped.
- audio.setPlaying(true);
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(audio.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(true) when playing.
- audio.setPaused(true);
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), ++paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(true) when paused.
- audio.setPaused(true);
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // pause() when paused.
- audio.pause();
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(false) when paused.
- audio.setPaused(false);
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(audio.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), ++resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(false) when playing.
- audio.setPaused(false);
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(audio.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // pause() when playing.
- audio.pause();
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), ++paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(false) when paused.
- audio.setPlaying(false);
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), ++stopped);
-
- // setPaused(true) when stopped and paused.
- audio.setPaused(true);
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(false) when stopped and paused.
- audio.setPaused(false);
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(audio.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(true) when stopped.
- audio.setPaused(true);
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(true) when stopped and paused.
- audio.setPlaying(true);
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(pausedSpy.count(), ++paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // play() when paused.
- audio.play();
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(audio.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), ++resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(true) when playing.
- audio.setPaused(true);
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), ++paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // stop() when paused.
- audio.stop();
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(audio.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), ++stopped);
-
- // setPaused(true) when stopped.
- audio.setPaused(true);
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // stop() when stopped and paused.
- audio.stop();
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(audio.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // pause() when stopped.
- audio.pause();
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(pausedSpy.count(), ++paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(false) when paused.
- audio.setPlaying(false);
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), ++stopped);
-
- // pause() when stopped and paused.
- audio.pause();
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(pausedSpy.count(), ++paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(false) when paused.
- audio.setPlaying(false);
- QCOMPARE(audio.isPlaying(), false);
- QCOMPARE(audio.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), ++stopped);
-
- // play() when stopped and paused.
- audio.play();
- QCOMPARE(audio.isPlaying(), true);
- QCOMPARE(audio.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-}
-
-void tst_QDeclarativeAudio::duration()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
-
- audio.componentComplete();
-
- QSignalSpy spy(&audio, SIGNAL(durationChanged()));
-
- QCOMPARE(audio.duration(), 0);
-
- provider.playerControl()->setDuration(4040);
- QCOMPARE(audio.duration(), 4040);
- QCOMPARE(spy.count(), 1);
-
- provider.playerControl()->setDuration(-129);
- QCOMPARE(audio.duration(), -129);
- QCOMPARE(spy.count(), 2);
-
- provider.playerControl()->setDuration(0);
- QCOMPARE(audio.duration(), 0);
- QCOMPARE(spy.count(), 3);
-
- // Unnecessary duration changed signals aren't filtered.
- provider.playerControl()->setDuration(0);
- QCOMPARE(audio.duration(), 0);
- QCOMPARE(spy.count(), 4);
-}
-
-void tst_QDeclarativeAudio::position()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
- audio.componentComplete();
-
- QSignalSpy spy(&audio, SIGNAL(positionChanged()));
-
- QCOMPARE(audio.position(), 0);
-
- // QDeclarativeAudio won't bound set positions to the duration. A media service may though.
- QCOMPARE(audio.duration(), 0);
-
- audio.setPosition(450);
- QCOMPARE(audio.position(), 450);
- QCOMPARE(provider.playerControl()->position(), qint64(450));
- QCOMPARE(spy.count(), 1);
-
- audio.setPosition(-5403);
- QCOMPARE(audio.position(), -5403);
- QCOMPARE(provider.playerControl()->position(), qint64(-5403));
- QCOMPARE(spy.count(), 2);
-
- audio.setPosition(-5403);
- QCOMPARE(audio.position(), -5403);
- QCOMPARE(provider.playerControl()->position(), qint64(-5403));
- QCOMPARE(spy.count(), 2);
-
- // Check the signal change signal is emitted if the change originates from the media service.
- provider.playerControl()->setPosition(0);
- QCOMPARE(audio.position(), 0);
- QCOMPARE(spy.count(), 3);
-
- connect(&audio, SIGNAL(positionChanged()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- provider.playerControl()->updateState(QMediaPlayer::PlayingState);
- QTestEventLoop::instance().enterLoop(1);
- QVERIFY(spy.count() > 3 && spy.count() < 6); // 4 or 5
-
- provider.playerControl()->updateState(QMediaPlayer::PausedState);
- QTestEventLoop::instance().enterLoop(1);
- QVERIFY(spy.count() < 6);
-}
-
-void tst_QDeclarativeAudio::volume()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
- audio.componentComplete();
-
- QSignalSpy spy(&audio, SIGNAL(volumeChanged()));
-
- QCOMPARE(audio.volume(), qreal(1.0));
-
- audio.setVolume(0.7);
- QCOMPARE(audio.volume(), qreal(0.7));
- QCOMPARE(provider.playerControl()->volume(), 70);
- QCOMPARE(spy.count(), 1);
-
- audio.setVolume(0.7);
- QCOMPARE(audio.volume(), qreal(0.7));
- QCOMPARE(provider.playerControl()->volume(), 70);
- QCOMPARE(spy.count(), 1);
-
- provider.playerControl()->setVolume(30);
- QCOMPARE(audio.volume(), qreal(0.3));
- QCOMPARE(spy.count(), 2);
-}
-
-void tst_QDeclarativeAudio::muted()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
- audio.componentComplete();
-
- QSignalSpy spy(&audio, SIGNAL(mutedChanged()));
-
- QCOMPARE(audio.isMuted(), false);
-
- audio.setMuted(true);
- QCOMPARE(audio.isMuted(), true);
- QCOMPARE(provider.playerControl()->isMuted(), true);
- QCOMPARE(spy.count(), 1);
-
- provider.playerControl()->setMuted(false);
- QCOMPARE(audio.isMuted(), false);
- QCOMPARE(spy.count(), 2);
-
- audio.setMuted(false);
- QCOMPARE(audio.isMuted(), false);
- QCOMPARE(provider.playerControl()->isMuted(), false);
- QCOMPARE(spy.count(), 3);
-}
-
-void tst_QDeclarativeAudio::bufferProgress()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
-
- audio.componentComplete();
-
- QSignalSpy spy(&audio, SIGNAL(bufferProgressChanged()));
-
- QCOMPARE(audio.bufferProgress(), qreal(0.0));
-
- provider.playerControl()->setBufferStatus(20);
- QCOMPARE(audio.bufferProgress(), qreal(0.2));
- QCOMPARE(spy.count(), 1);
-
- provider.playerControl()->setBufferStatus(20);
- QCOMPARE(audio.bufferProgress(), qreal(0.2));
- QCOMPARE(spy.count(), 2);
-
- provider.playerControl()->setBufferStatus(40);
- QCOMPARE(audio.bufferProgress(), qreal(0.4));
- QCOMPARE(spy.count(), 3);
-
- connect(&audio, SIGNAL(positionChanged()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- provider.playerControl()->updateMediaStatus(
- QMediaPlayer::BufferingMedia, QMediaPlayer::PlayingState);
- QTestEventLoop::instance().enterLoop(1);
- QVERIFY(spy.count() > 3 && spy.count() < 6); // 4 or 5
-
- provider.playerControl()->updateMediaStatus(QMediaPlayer::BufferedMedia);
- QTestEventLoop::instance().enterLoop(1);
- QVERIFY(spy.count() < 6);
-}
-
-void tst_QDeclarativeAudio::seekable()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
-
- audio.componentComplete();
-
- QSignalSpy spy(&audio, SIGNAL(seekableChanged()));
-
- QCOMPARE(audio.isSeekable(), false);
-
- provider.playerControl()->setSeekable(true);
- QCOMPARE(audio.isSeekable(), true);
- QCOMPARE(spy.count(), 1);
-
- provider.playerControl()->setSeekable(true);
- QCOMPARE(audio.isSeekable(), true);
- QCOMPARE(spy.count(), 2);
-
- provider.playerControl()->setSeekable(false);
- QCOMPARE(audio.isSeekable(), false);
- QCOMPARE(spy.count(), 3);
-}
-
-void tst_QDeclarativeAudio::playbackRate()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
-
- audio.componentComplete();
-
- QSignalSpy spy(&audio, SIGNAL(playbackRateChanged()));
-
- QCOMPARE(audio.playbackRate(), qreal(1.0));
-
- audio.setPlaybackRate(0.5);
- QCOMPARE(audio.playbackRate(), qreal(0.5));
- QCOMPARE(provider.playerControl()->playbackRate(), qreal(0.5));
- QCOMPARE(spy.count(), 1);
-
- provider.playerControl()->setPlaybackRate(2.0);
- QCOMPARE(provider.playerControl()->playbackRate(), qreal(2.0));
- QCOMPARE(spy.count(), 2);
-
- audio.setPlaybackRate(2.0);
- QCOMPARE(audio.playbackRate(), qreal(2.0));
- QCOMPARE(provider.playerControl()->playbackRate(), qreal(2.0));
- QCOMPARE(spy.count(), 3);
-}
-
-void tst_QDeclarativeAudio::status()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
-
- audio.componentComplete();
-
- QSignalSpy statusChangedSpy(&audio, SIGNAL(statusChanged()));
- QSignalSpy loadedSpy(&audio, SIGNAL(loaded()));
- QSignalSpy bufferingSpy(&audio, SIGNAL(buffering()));
- QSignalSpy stalledSpy(&audio, SIGNAL(stalled()));
- QSignalSpy bufferedSpy(&audio, SIGNAL(buffered()));
- QSignalSpy endOfMediaSpy(&audio, SIGNAL(endOfMedia()));
-
- QCOMPARE(audio.status(), QDeclarativeAudio::NoMedia);
-
- // Set media, start loading.
- provider.playerControl()->updateMediaStatus(QMediaPlayer::LoadingMedia);
- QCOMPARE(audio.status(), QDeclarativeAudio::Loading);
- QCOMPARE(statusChangedSpy.count(), 1);
- QCOMPARE(loadedSpy.count(), 0);
- QCOMPARE(bufferingSpy.count(), 0);
- QCOMPARE(stalledSpy.count(), 0);
- QCOMPARE(bufferedSpy.count(), 0);
- QCOMPARE(endOfMediaSpy.count(), 0);
-
- // Finish loading.
- provider.playerControl()->updateMediaStatus(QMediaPlayer::LoadedMedia);
- QCOMPARE(audio.status(), QDeclarativeAudio::Loaded);
- QCOMPARE(statusChangedSpy.count(), 2);
- QCOMPARE(loadedSpy.count(), 1);
- QCOMPARE(bufferingSpy.count(), 0);
- QCOMPARE(stalledSpy.count(), 0);
- QCOMPARE(bufferedSpy.count(), 0);
- QCOMPARE(endOfMediaSpy.count(), 0);
-
- // Play, start buffering.
- provider.playerControl()->updateMediaStatus(
- QMediaPlayer::StalledMedia, QMediaPlayer::PlayingState);
- QCOMPARE(audio.status(), QDeclarativeAudio::Stalled);
- QCOMPARE(statusChangedSpy.count(), 3);
- QCOMPARE(loadedSpy.count(), 1);
- QCOMPARE(bufferingSpy.count(), 0);
- QCOMPARE(stalledSpy.count(), 1);
- QCOMPARE(bufferedSpy.count(), 0);
- QCOMPARE(endOfMediaSpy.count(), 0);
-
- // Enough data buffered to proceed.
- provider.playerControl()->updateMediaStatus(QMediaPlayer::BufferingMedia);
- QCOMPARE(audio.status(), QDeclarativeAudio::Buffering);
- QCOMPARE(statusChangedSpy.count(), 4);
- QCOMPARE(loadedSpy.count(), 1);
- QCOMPARE(bufferingSpy.count(), 1);
- QCOMPARE(stalledSpy.count(), 1);
- QCOMPARE(bufferedSpy.count(), 0);
- QCOMPARE(endOfMediaSpy.count(), 0);
-
- // Errant second buffering status changed.
- provider.playerControl()->updateMediaStatus(QMediaPlayer::BufferingMedia);
- QCOMPARE(audio.status(), QDeclarativeAudio::Buffering);
- QCOMPARE(statusChangedSpy.count(), 4);
- QCOMPARE(loadedSpy.count(), 1);
- QCOMPARE(bufferingSpy.count(), 1);
- QCOMPARE(stalledSpy.count(), 1);
- QCOMPARE(bufferedSpy.count(), 0);
- QCOMPARE(endOfMediaSpy.count(), 0);
-
- // Buffer full.
- provider.playerControl()->updateMediaStatus(QMediaPlayer::BufferedMedia);
- QCOMPARE(audio.status(), QDeclarativeAudio::Buffered);
- QCOMPARE(statusChangedSpy.count(), 5);
- QCOMPARE(loadedSpy.count(), 1);
- QCOMPARE(bufferingSpy.count(), 1);
- QCOMPARE(stalledSpy.count(), 1);
- QCOMPARE(bufferedSpy.count(), 1);
- QCOMPARE(endOfMediaSpy.count(), 0);
-
- // Buffer getting low.
- provider.playerControl()->updateMediaStatus(QMediaPlayer::BufferingMedia);
- QCOMPARE(audio.status(), QDeclarativeAudio::Buffering);
- QCOMPARE(statusChangedSpy.count(), 6);
- QCOMPARE(loadedSpy.count(), 1);
- QCOMPARE(bufferingSpy.count(), 2);
- QCOMPARE(stalledSpy.count(), 1);
- QCOMPARE(bufferedSpy.count(), 1);
- QCOMPARE(endOfMediaSpy.count(), 0);
-
- // Buffer full.
- provider.playerControl()->updateMediaStatus(QMediaPlayer::BufferedMedia);
- QCOMPARE(audio.status(), QDeclarativeAudio::Buffered);
- QCOMPARE(statusChangedSpy.count(), 7);
- QCOMPARE(loadedSpy.count(), 1);
- QCOMPARE(bufferingSpy.count(), 2);
- QCOMPARE(stalledSpy.count(), 1);
- QCOMPARE(bufferedSpy.count(), 2);
- QCOMPARE(endOfMediaSpy.count(), 0);
-
- // Finished.
- provider.playerControl()->updateMediaStatus(
- QMediaPlayer::EndOfMedia, QMediaPlayer::StoppedState);
- QCOMPARE(audio.status(), QDeclarativeAudio::EndOfMedia);
- QCOMPARE(statusChangedSpy.count(), 8);
- QCOMPARE(loadedSpy.count(), 1);
- QCOMPARE(bufferingSpy.count(), 2);
- QCOMPARE(stalledSpy.count(), 1);
- QCOMPARE(bufferedSpy.count(), 2);
- QCOMPARE(endOfMediaSpy.count(), 1);
-}
-
-void tst_QDeclarativeAudio::metaData_data()
-{
- QTest::addColumn<QByteArray>("propertyName");
- QTest::addColumn<QtMediaServices::MetaData>("propertyKey");
- QTest::addColumn<QVariant>("value1");
- QTest::addColumn<QVariant>("value2");
-
- QTest::newRow("title")
- << QByteArray("title")
- << QtMediaServices::Title
- << QVariant(QString::fromLatin1("This is a title"))
- << QVariant(QString::fromLatin1("This is another title"));
-
- QTest::newRow("genre")
- << QByteArray("genre")
- << QtMediaServices::Genre
- << QVariant(QString::fromLatin1("rock"))
- << QVariant(QString::fromLatin1("pop"));
-
- QTest::newRow("trackNumber")
- << QByteArray("trackNumber")
- << QtMediaServices::TrackNumber
- << QVariant(8)
- << QVariant(12);
-}
-
-void tst_QDeclarativeAudio::metaData()
-{
- QFETCH(QByteArray, propertyName);
- QFETCH(QtMediaServices::MetaData, propertyKey);
- QFETCH(QVariant, value1);
- QFETCH(QVariant, value2);
-
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
-
- audio.componentComplete();
-
- QSignalSpy spy(&audio, SIGNAL(__metaDataChanged()));
-
- const int index = audio.metaObject()->indexOfProperty(propertyName.constData());
- QVERIFY(index != -1);
-
- QMetaProperty property = audio.metaObject()->property(index);
- QCOMPARE(property.read(&audio), QVariant());
-
- property.write(&audio, value1);
- QCOMPARE(property.read(&audio), value1);
- QCOMPARE(provider.metaDataControl()->metaData(propertyKey), value1);
- QCOMPARE(spy.count(), 1);
-
- provider.metaDataControl()->setMetaData(propertyKey, value2);
- QCOMPARE(property.read(&audio), value2);
- QCOMPARE(spy.count(), 2);
-}
-
-void tst_QDeclarativeAudio::error()
-{
- const QString errorString = QLatin1String("Failed to open device.");
-
- QtTestMediaServiceProvider provider;
- QDeclarativeAudio audio;
-
- audio.componentComplete();
-
- QSignalSpy errorSpy(&audio, SIGNAL(error(QDeclarativeAudio::Error,QString)));
- QSignalSpy errorChangedSpy(&audio, SIGNAL(errorChanged()));
-
- QCOMPARE(audio.error(), QDeclarativeAudio::NoError);
- QCOMPARE(audio.errorString(), QString());
-
- provider.playerControl()->emitError(QMediaPlayer::ResourceError, errorString);
-
- QCOMPARE(audio.error(), QDeclarativeAudio::ResourceError);
- QCOMPARE(audio.errorString(), errorString);
- QCOMPARE(errorSpy.count(), 1);
- QCOMPARE(errorChangedSpy.count(), 1);
-
- // Changing the source resets the error properties.
- audio.setSource(QUrl("http://example.com"));
- QCOMPARE(audio.error(), QDeclarativeAudio::NoError);
- QCOMPARE(audio.errorString(), QString());
- QCOMPARE(errorSpy.count(), 1);
- QCOMPARE(errorChangedSpy.count(), 2);
-
- // But isn't noisy.
- audio.setSource(QUrl("file:///file/path"));
- QCOMPARE(audio.error(), QDeclarativeAudio::NoError);
- QCOMPARE(audio.errorString(), QString());
- QCOMPARE(errorSpy.count(), 1);
- QCOMPARE(errorChangedSpy.count(), 2);
-}
-
-
-QTEST_MAIN(tst_QDeclarativeAudio)
-
-#include "tst_qdeclarativeaudio.moc"
diff --git a/tests/auto/qdeclarativevideo/qdeclarativevideo.pro b/tests/auto/qdeclarativevideo/qdeclarativevideo.pro
deleted file mode 100644
index 64a20da..0000000
--- a/tests/auto/qdeclarativevideo/qdeclarativevideo.pro
+++ /dev/null
@@ -1,14 +0,0 @@
-load(qttest_p4)
-
-HEADERS += \
- $$PWD/../../../src/imports/multimedia/qdeclarativevideo_p.h \
- $$PWD/../../../src/imports/multimedia/qdeclarativemediabase_p.h \
- $$PWD/../../../src/imports/multimedia/qmetadatacontrolmetaobject_p.h
-
-SOURCES += \
- tst_qdeclarativevideo.cpp \
- $$PWD/../../../src/imports/multimedia/qdeclarativevideo.cpp \
- $$PWD/../../../src/imports/multimedia/qdeclarativemediabase.cpp \
- $$PWD/../../../src/imports/multimedia/qmetadatacontrolmetaobject.cpp
-
-QT += multimedia mediaservices declarative
diff --git a/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp b/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
deleted file mode 100644
index 99b447a..0000000
--- a/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
+++ /dev/null
@@ -1,921 +0,0 @@
-/****************************************************************************
-**
-** 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 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 "../../../src/imports/multimedia/qdeclarativevideo_p.h"
-
-#include <QtGui/qapplication.h>
-#include <QtMultimedia/qabstractvideosurface.h>
-#include <QtMediaServices/qgraphicsvideoitem.h>
-#include <QtMediaServices/qmediaplayercontrol.h>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qvideooutputcontrol.h>
-#include <QtMediaServices/qvideorenderercontrol.h>
-#include <QtMultimedia/qvideosurfaceformat.h>
-
-
-class tst_QDeclarativeVideo : public QObject
-{
- Q_OBJECT
-public slots:
- void initTestCase();
-
-private slots:
- void nullPlayerControl();
- void nullService();
-
- void playing();
- void paused();
- void error();
-
- void hasAudio();
- void hasVideo();
- void fillMode();
- void geometry();
-};
-
-Q_DECLARE_METATYPE(QtMediaServices::MetaData);
-Q_DECLARE_METATYPE(QDeclarativeVideo::Error);
-
-class QtTestMediaPlayerControl : public QMediaPlayerControl
-{
- Q_OBJECT
-public:
- QtTestMediaPlayerControl(QObject *parent = 0)
- : QMediaPlayerControl(parent)
- , m_state(QMediaPlayer::StoppedState)
- , m_mediaStatus(QMediaPlayer::NoMedia)
- , m_duration(0)
- , m_position(0)
- , m_playbackRate(1.0)
- , m_volume(50)
- , m_bufferStatus(0)
- , m_muted(false)
- , m_audioAvailable(false)
- , m_videoAvailable(false)
- , m_seekable(false)
- {
- }
-
- QMediaPlayer::State state() const { return m_state; }
- void updateState(QMediaPlayer::State state) { emit stateChanged(m_state = state); }
-
- QMediaPlayer::MediaStatus mediaStatus() const { return m_mediaStatus; }
- void updateMediaStatus(QMediaPlayer::MediaStatus status) {
- emit mediaStatusChanged(m_mediaStatus = status); }
- void updateMediaStatus(QMediaPlayer::MediaStatus status, QMediaPlayer::State state)
- {
- m_mediaStatus = status;
- m_state = state;
-
- emit mediaStatusChanged(m_mediaStatus);
- emit stateChanged(m_state);
- }
-
- qint64 duration() const { return m_duration; }
- void setDuration(qint64 duration) { emit durationChanged(m_duration = duration); }
-
- qint64 position() const { return m_position; }
- void setPosition(qint64 position) { emit positionChanged(m_position = position); }
-
- int volume() const { return m_volume; }
- void setVolume(int volume) { emit volumeChanged(m_volume = volume); }
-
- bool isMuted() const { return m_muted; }
- void setMuted(bool muted) { emit mutedChanged(m_muted = muted); }
-
- int bufferStatus() const { return m_bufferStatus; }
- void setBufferStatus(int status) { emit bufferStatusChanged(m_bufferStatus = status); }
-
- bool isAudioAvailable() const { return m_audioAvailable; }
- void setAudioAvailable(bool available) {
- emit audioAvailableChanged(m_audioAvailable = available); }
- bool isVideoAvailable() const { return m_videoAvailable; }
- void setVideoAvailable(bool available) {
- emit videoAvailableChanged(m_videoAvailable = available); }
-
- bool isSeekable() const { return m_seekable; }
- void setSeekable(bool seekable) { emit seekableChanged(m_seekable = seekable); }
-
- QMediaTimeRange availablePlaybackRanges() const { return QMediaTimeRange(); }
-
- qreal playbackRate() const { return m_playbackRate; }
- void setPlaybackRate(qreal rate) { emit playbackRateChanged(m_playbackRate = rate); }
-
- QMediaContent media() const { return m_media; }
- const QIODevice *mediaStream() const { return 0; }
- void setMedia(const QMediaContent &media, QIODevice *)
- {
- m_media = media;
-
- m_mediaStatus = m_media.isNull()
- ? QMediaPlayer::NoMedia
- : QMediaPlayer::LoadingMedia;
-
- emit mediaChanged(m_media);
- emit mediaStatusChanged(m_mediaStatus);
- }
-
- void play() { emit stateChanged(m_state = QMediaPlayer::PlayingState); }
- void pause() { emit stateChanged(m_state = QMediaPlayer::PausedState); }
- void stop() { emit stateChanged(m_state = QMediaPlayer::StoppedState); }
-
- void emitError(QMediaPlayer::Error err, const QString &errorString) {
- emit error(err, errorString); }
-
-private:
- QMediaPlayer::State m_state;
- QMediaPlayer::MediaStatus m_mediaStatus;
- qint64 m_duration;
- qint64 m_position;
- qreal m_playbackRate;
- int m_volume;
- int m_bufferStatus;
- bool m_muted;
- bool m_audioAvailable;
- bool m_videoAvailable;
- bool m_seekable;
- QMediaContent m_media;
-};
-
-class QtTestOutputControl : public QVideoOutputControl
-{
-public:
- QtTestOutputControl(QObject *parent) : QVideoOutputControl(parent), m_output(NoOutput) {}
-
- QList<Output> availableOutputs() const { return m_outputs; }
- void setAvailableOutputs(const QList<Output> outputs) { m_outputs = outputs; }
-
- Output output() const { return m_output; }
- virtual void setOutput(Output output) { m_output = output; }
-
-private:
- Output m_output;
- QList<Output> m_outputs;
-};
-
-class QtTestRendererControl : public QVideoRendererControl
-{
-public:
- QtTestRendererControl(QObject *parent ) : QVideoRendererControl(parent), m_surface(0) {}
-
- QAbstractVideoSurface *surface() const { return m_surface; }
- void setSurface(QAbstractVideoSurface *surface) { m_surface = surface; }
-
-private:
- QAbstractVideoSurface *m_surface;
-};
-
-class QtTestMediaService : public QMediaService
-{
- Q_OBJECT
-public:
- QtTestMediaService(
- QtTestMediaPlayerControl *playerControl,
- QtTestOutputControl *outputControl,
- QtTestRendererControl *rendererControl,
- QObject *parent)
- : QMediaService(parent)
- , playerControl(playerControl)
- , outputControl(outputControl)
- , rendererControl(rendererControl)
- {
- }
-
- QMediaControl *control(const char *name) const
- {
- if (qstrcmp(name, QMediaPlayerControl_iid) == 0)
- return playerControl;
- else if (qstrcmp(name, QVideoOutputControl_iid) == 0)
- return outputControl;
- else if (qstrcmp(name, QVideoRendererControl_iid) == 0)
- return rendererControl;
- else
- return 0;
- }
-
- QtTestMediaPlayerControl *playerControl;
- QtTestOutputControl *outputControl;
- QtTestRendererControl *rendererControl;
-};
-
-class QtTestMediaServiceProvider : public QMediaServiceProvider
-{
- Q_OBJECT
-public:
- QtTestMediaServiceProvider()
- : service(new QtTestMediaService(
- new QtTestMediaPlayerControl(this),
- new QtTestOutputControl(this),
- new QtTestRendererControl(this),
- this))
- {
- setDefaultServiceProvider(this);
- }
-
- QtTestMediaServiceProvider(QtTestMediaService *service)
- : service(service)
- {
- setDefaultServiceProvider(this);
- }
-
- QtTestMediaServiceProvider(
- QtTestMediaPlayerControl *playerControl,
- QtTestOutputControl *outputControl,
- QtTestRendererControl *rendererControl)
- : service(new QtTestMediaService(playerControl, outputControl, rendererControl, this))
- {
- setDefaultServiceProvider(this);
- }
-
- ~QtTestMediaServiceProvider()
- {
- setDefaultServiceProvider(0);
- }
-
- QMediaService *requestService(
- const QByteArray &type,
- const QMediaServiceProviderHint & = QMediaServiceProviderHint())
- {
- requestedService = type;
-
- return service;
- }
-
- void releaseService(QMediaService *) {}
-
- inline QtTestMediaPlayerControl *playerControl() { return service->playerControl; }
- inline QtTestRendererControl *rendererControl() { return service->rendererControl; }
-
- QtTestMediaService *service;
- QByteArray requestedService;
-};
-
-
-void tst_QDeclarativeVideo::initTestCase()
-{
- qRegisterMetaType<QDeclarativeVideo::Error>();
-}
-
-void tst_QDeclarativeVideo::nullPlayerControl()
-{
- QtTestMediaServiceProvider provider(0, 0, 0);
-
- QDeclarativeVideo video;
-
- QCOMPARE(video.source(), QUrl());
- video.setSource(QUrl("http://example.com"));
- QCOMPARE(video.source(), QUrl("http://example.com"));
-
- QCOMPARE(video.isPlaying(), false);
- video.setPlaying(true);
- QCOMPARE(video.isPlaying(), true);
- video.setPlaying(false);
- video.play();
- QCOMPARE(video.isPlaying(), false);
-
- QCOMPARE(video.isPaused(), false);
- video.pause();
- QCOMPARE(video.isPaused(), false);
- video.setPaused(true);
- QCOMPARE(video.isPaused(), true);
-
- QCOMPARE(video.duration(), 0);
-
- QCOMPARE(video.position(), 0);
- video.setPosition(10000);
- QCOMPARE(video.position(), 10000);
-
- QCOMPARE(video.volume(), qreal(1.0));
- video.setVolume(0.5);
- QCOMPARE(video.volume(), qreal(0.5));
-
- QCOMPARE(video.isMuted(), false);
- video.setMuted(true);
- QCOMPARE(video.isMuted(), true);
-
- QCOMPARE(video.bufferProgress(), qreal(0));
-
- QCOMPARE(video.isSeekable(), false);
-
- QCOMPARE(video.playbackRate(), qreal(1.0));
-
- QCOMPARE(video.hasAudio(), false);
- QCOMPARE(video.hasVideo(), false);
-
- QCOMPARE(video.status(), QDeclarativeVideo::NoMedia);
-
- QCOMPARE(video.error(), QDeclarativeVideo::ServiceMissing);
-}
-
-void tst_QDeclarativeVideo::nullService()
-{
- QtTestMediaServiceProvider provider(0);
-
- QDeclarativeVideo video;
-
- QCOMPARE(video.source(), QUrl());
- video.setSource(QUrl("http://example.com"));
- QCOMPARE(video.source(), QUrl("http://example.com"));
-
- QCOMPARE(video.isPlaying(), false);
- video.setPlaying(true);
- QCOMPARE(video.isPlaying(), true);
- video.setPlaying(false);
- video.play();
- QCOMPARE(video.isPlaying(), false);
-
- QCOMPARE(video.isPaused(), false);
- video.pause();
- QCOMPARE(video.isPaused(), false);
- video.setPaused(true);
- QCOMPARE(video.isPaused(), true);
-
- QCOMPARE(video.duration(), 0);
-
- QCOMPARE(video.position(), 0);
- video.setPosition(10000);
- QCOMPARE(video.position(), 10000);
-
- QCOMPARE(video.volume(), qreal(1.0));
- video.setVolume(0.5);
- QCOMPARE(video.volume(), qreal(0.5));
-
- QCOMPARE(video.isMuted(), false);
- video.setMuted(true);
- QCOMPARE(video.isMuted(), true);
-
- QCOMPARE(video.bufferProgress(), qreal(0));
-
- QCOMPARE(video.isSeekable(), false);
-
- QCOMPARE(video.playbackRate(), qreal(1.0));
-
- QCOMPARE(video.hasAudio(), false);
- QCOMPARE(video.hasVideo(), false);
-
- QCOMPARE(video.status(), QDeclarativeVideo::NoMedia);
-
- QCOMPARE(video.error(), QDeclarativeVideo::ServiceMissing);
-
- QCOMPARE(video.metaObject()->indexOfProperty("title"), -1);
- QCOMPARE(video.metaObject()->indexOfProperty("genre"), -1);
- QCOMPARE(video.metaObject()->indexOfProperty("description"), -1);
-}
-
-void tst_QDeclarativeVideo::playing()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeVideo video;
- video.componentComplete();
-
- QSignalSpy playingChangedSpy(&video, SIGNAL(playingChanged()));
- QSignalSpy startedSpy(&video, SIGNAL(started()));
- QSignalSpy stoppedSpy(&video, SIGNAL(stopped()));
-
- int playingChanged = 0;
- int started = 0;
- int stopped = 0;
-
- QCOMPARE(video.isPlaying(), false);
-
- // setPlaying(true) when stopped.
- video.setPlaying(true);
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(false) when playing.
- video.setPlaying(false);
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(stoppedSpy.count(), ++stopped);
-
- // play() when stopped.
- video.play();
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // stop() when playing.
- video.stop();
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(stoppedSpy.count(), ++stopped);
-
- // stop() when stopped.
- video.stop();
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(false) when stopped.
- video.setPlaying(false);
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- video.setPlaying(true);
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(true) when playing.
- video.setPlaying(true);
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // play() when playing.
- video.play();
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(stoppedSpy.count(), stopped);
-}
-
-void tst_QDeclarativeVideo::paused()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeVideo video;
- video.componentComplete();
-
- QSignalSpy playingChangedSpy(&video, SIGNAL(playingChanged()));
- QSignalSpy pausedChangedSpy(&video, SIGNAL(pausedChanged()));
- QSignalSpy startedSpy(&video, SIGNAL(started()));
- QSignalSpy pausedSpy(&video, SIGNAL(paused()));
- QSignalSpy resumedSpy(&video, SIGNAL(resumed()));
- QSignalSpy stoppedSpy(&video, SIGNAL(stopped()));
-
- int playingChanged = 0;
- int pausedChanged = 0;
- int started = 0;
- int paused = 0;
- int resumed = 0;
- int stopped = 0;
-
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(video.isPaused(), false);
-
- // setPlaying(true) when stopped.
- video.setPlaying(true);
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(video.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(true) when playing.
- video.setPaused(true);
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), ++paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(true) when paused.
- video.setPaused(true);
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // pause() when paused.
- video.pause();
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(false) when paused.
- video.setPaused(false);
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(video.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), ++resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(false) when playing.
- video.setPaused(false);
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(video.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // pause() when playing.
- video.pause();
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), ++paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(false) when paused.
- video.setPlaying(false);
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), ++stopped);
-
- // setPaused(true) when stopped and paused.
- video.setPaused(true);
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(false) when stopped and paused.
- video.setPaused(false);
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(video.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(true) when stopped.
- video.setPaused(true);
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(true) when stopped and paused.
- video.setPlaying(true);
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(pausedSpy.count(), ++paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // play() when paused.
- video.play();
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(video.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), ++resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPaused(true) when playing.
- video.setPaused(true);
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), ++paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // stop() when paused.
- video.stop();
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(video.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), ++stopped);
-
- // setPaused(true) when stopped.
- video.setPaused(true);
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // stop() when stopped and paused.
- video.stop();
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(video.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // pause() when stopped.
- video.pause();
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(pausedSpy.count(), ++paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(false) when paused.
- video.setPlaying(false);
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), ++stopped);
-
- // pause() when stopped and paused.
- video.pause();
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PausedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(pausedSpy.count(), ++paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-
- // setPlaying(false) when paused.
- video.setPlaying(false);
- QCOMPARE(video.isPlaying(), false);
- QCOMPARE(video.isPaused(), true);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::StoppedState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), pausedChanged);
- QCOMPARE(startedSpy.count(), started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), ++stopped);
-
- // play() when stopped and paused.
- video.play();
- QCOMPARE(video.isPlaying(), true);
- QCOMPARE(video.isPaused(), false);
- QCOMPARE(provider.playerControl()->state(), QMediaPlayer::PlayingState);
- QCOMPARE(playingChangedSpy.count(), ++playingChanged);
- QCOMPARE(pausedChangedSpy.count(), ++pausedChanged);
- QCOMPARE(startedSpy.count(), ++started);
- QCOMPARE(pausedSpy.count(), paused);
- QCOMPARE(resumedSpy.count(), resumed);
- QCOMPARE(stoppedSpy.count(), stopped);
-}
-
-void tst_QDeclarativeVideo::error()
-{
- const QString errorString = QLatin1String("Failed to open device.");
-
- QtTestMediaServiceProvider provider;
- QDeclarativeVideo video;
- video.componentComplete();
-
- QSignalSpy errorSpy(&video, SIGNAL(error(QDeclarativeVideo::Error,QString)));
- QSignalSpy errorChangedSpy(&video, SIGNAL(errorChanged()));
-
- QCOMPARE(video.error(), QDeclarativeVideo::NoError);
- QCOMPARE(video.errorString(), QString());
-
- provider.playerControl()->emitError(QMediaPlayer::ResourceError, errorString);
-
- QCOMPARE(video.error(), QDeclarativeVideo::ResourceError);
- QCOMPARE(video.errorString(), errorString);
- QCOMPARE(errorSpy.count(), 1);
- QCOMPARE(errorChangedSpy.count(), 1);
-
- // Changing the source resets the error properties.
- video.setSource(QUrl("http://example.com"));
- QCOMPARE(video.error(), QDeclarativeVideo::NoError);
- QCOMPARE(video.errorString(), QString());
- QCOMPARE(errorSpy.count(), 1);
- QCOMPARE(errorChangedSpy.count(), 2);
-
- // But isn't noisy.
- video.setSource(QUrl("file:///file/path"));
- QCOMPARE(video.error(), QDeclarativeVideo::NoError);
- QCOMPARE(video.errorString(), QString());
- QCOMPARE(errorSpy.count(), 1);
- QCOMPARE(errorChangedSpy.count(), 2);
-}
-
-
-void tst_QDeclarativeVideo::hasAudio()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeVideo video;
- video.componentComplete();
-
- QSignalSpy spy(&video, SIGNAL(hasAudioChanged()));
-
- QCOMPARE(video.hasAudio(), false);
-
- provider.playerControl()->setAudioAvailable(true);
- QCOMPARE(video.hasAudio(), true);
- QCOMPARE(spy.count(), 1);
-
- provider.playerControl()->setAudioAvailable(true);
- QCOMPARE(video.hasAudio(), true);
- QCOMPARE(spy.count(), 2);
-
- provider.playerControl()->setAudioAvailable(false);
- QCOMPARE(video.hasAudio(), false);
- QCOMPARE(spy.count(), 3);
-}
-
-void tst_QDeclarativeVideo::hasVideo()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeVideo video;
-
- video.componentComplete();
-
- QSignalSpy spy(&video, SIGNAL(hasVideoChanged()));
-
- QCOMPARE(video.hasVideo(), false);
-
- provider.playerControl()->setVideoAvailable(true);
- QCOMPARE(video.hasVideo(), true);
- QCOMPARE(spy.count(), 1);
-
- provider.playerControl()->setVideoAvailable(true);
- QCOMPARE(video.hasVideo(), true);
- QCOMPARE(spy.count(), 2);
-
- provider.playerControl()->setVideoAvailable(false);
- QCOMPARE(video.hasVideo(), false);
- QCOMPARE(spy.count(), 3);
-}
-
-void tst_QDeclarativeVideo::fillMode()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeVideo video;
- video.componentComplete();
-
- QList<QGraphicsItem *> children = video.childItems();
- QCOMPARE(children.count(), 1);
- QGraphicsVideoItem *videoItem = qgraphicsitem_cast<QGraphicsVideoItem *>(children.first());
- QVERIFY(videoItem != 0);
-
- QCOMPARE(video.fillMode(), QDeclarativeVideo::PreserveAspectFit);
-
- video.setFillMode(QDeclarativeVideo::PreserveAspectCrop);
- QCOMPARE(video.fillMode(), QDeclarativeVideo::PreserveAspectCrop);
- QCOMPARE(videoItem->aspectRatioMode(), Qt::KeepAspectRatioByExpanding);
-
- video.setFillMode(QDeclarativeVideo::Stretch);
- QCOMPARE(video.fillMode(), QDeclarativeVideo::Stretch);
- QCOMPARE(videoItem->aspectRatioMode(), Qt::IgnoreAspectRatio);
-
- video.setFillMode(QDeclarativeVideo::PreserveAspectFit);
- QCOMPARE(video.fillMode(), QDeclarativeVideo::PreserveAspectFit);
- QCOMPARE(videoItem->aspectRatioMode(), Qt::KeepAspectRatio);
-}
-
-void tst_QDeclarativeVideo::geometry()
-{
- QtTestMediaServiceProvider provider;
- QDeclarativeVideo video;
- video.componentComplete();
-
- QAbstractVideoSurface *surface = provider.rendererControl()->surface();
- QVERIFY(surface != 0);
-
- QList<QGraphicsItem *> children = video.childItems();
- QCOMPARE(children.count(), 1);
- QGraphicsVideoItem *videoItem = qgraphicsitem_cast<QGraphicsVideoItem *>(children.first());
- QVERIFY(videoItem != 0);
-
- QVideoSurfaceFormat format(QSize(640, 480), QVideoFrame::Format_RGB32);
-
- QVERIFY(surface->start(format));
-
- QCOMPARE(video.implicitWidth(), qreal(640));
- QCOMPARE(video.implicitHeight(), qreal(480));
-
- video.setWidth(560);
- video.setHeight(328);
-
- QCOMPARE(videoItem->size().width(), qreal(560));
- QCOMPARE(videoItem->size().height(), qreal(328));
-}
-
-QTEST_MAIN(tst_QDeclarativeVideo)
-
-#include "tst_qdeclarativevideo.moc"
diff --git a/tests/auto/qdirmodel/tst_qdirmodel.cpp b/tests/auto/qdirmodel/tst_qdirmodel.cpp
index 1bc5b7f..41bbd87 100644
--- a/tests/auto/qdirmodel/tst_qdirmodel.cpp
+++ b/tests/auto/qdirmodel/tst_qdirmodel.cpp
@@ -613,6 +613,11 @@ void tst_QDirModel::task196768_sorting()
//this task showed that the persistent model indexes got corrupted when sorting
QString path = SRCDIR;
+#ifdef Q_OS_SYMBIAN
+ if(!RProcess().HasCapability(ECapabilityAllFiles))
+ QEXPECT_FAIL("", "QTBUG-9746", Continue);
+#endif
+
QDirModel model;
/* QDirModel has a bug if we show the content of the subdirectory inside a hidden directory
diff --git a/tests/auto/qdockwidget/tst_qdockwidget.cpp b/tests/auto/qdockwidget/tst_qdockwidget.cpp
index a734985..2059101 100644
--- a/tests/auto/qdockwidget/tst_qdockwidget.cpp
+++ b/tests/auto/qdockwidget/tst_qdockwidget.cpp
@@ -96,6 +96,7 @@ private slots:
void task248604_infiniteResize();
void task258459_visibilityChanged();
void taskQTBUG_1665_closableChanged();
+ void taskQTBUG_9758_undockedGeometry();
};
// Testing get/set functions
@@ -653,7 +654,7 @@ void tst_QDockWidget::dockLocationChanged()
QCOMPARE(qvariant_cast<Qt::DockWidgetArea>(spy.at(0).at(0)),
Qt::TopDockWidgetArea);
spy.clear();
-
+
dw.setFloating(true);
QTest::qWait(100);
dw.setFloating(false);
@@ -878,6 +879,27 @@ void tst_QDockWidget::taskQTBUG_1665_closableChanged()
QVERIFY(!(dock.windowFlags() & Qt::WindowCloseButtonHint));
}
+void tst_QDockWidget::taskQTBUG_9758_undockedGeometry()
+{
+ QMainWindow window;
+ QDockWidget dock1(&window);
+ QDockWidget dock2(&window);
+ window.addDockWidget(Qt::RightDockWidgetArea, &dock1);
+ window.addDockWidget(Qt::RightDockWidgetArea, &dock2);
+ window.tabifyDockWidget(&dock1, &dock2);
+ dock1.hide();
+ dock2.hide();
+ window.show();
+ QTest::qWaitForWindowShown(&window);
+ dock1.setFloating(true);
+ dock1.show();
+ QTest::qWaitForWindowShown(&dock1);
+
+ QVERIFY(dock1.x() >= 0);
+ QVERIFY(dock1.y() >= 0);
+}
+
+
QTEST_MAIN(tst_QDockWidget)
#include "tst_qdockwidget.moc"
diff --git a/tests/auto/qfile/largefile/tst_largefile.cpp b/tests/auto/qfile/largefile/tst_largefile.cpp
index 041e5f2..60c5f89 100644
--- a/tests/auto/qfile/largefile/tst_largefile.cpp
+++ b/tests/auto/qfile/largefile/tst_largefile.cpp
@@ -523,6 +523,10 @@ void tst_LargeFile::mapFile()
void tst_LargeFile::mapOffsetOverflow()
{
+#if defined(Q_OS_MAC)
+ QSKIP("mmap'ping beyond EOF may succeed; generate bus error on access", SkipAll);
+#endif
+
// Out-of-range mappings should fail, and not silently clip the offset
for (int i = 50; i < 63; ++i) {
uchar *address = 0;
diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp
index 38a1ee7..ca7c445 100644
--- a/tests/auto/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp
@@ -529,10 +529,6 @@ void tst_QFiledialog::completer()
#endif
++expected;
}
-#if !defined(Q_OS_WIN)
- if (inputStartsWithRootPath)
- expected++;
-#endif
}
QTest::qWait(1000);
diff --git a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
index 6bfa8be..eee495f 100644
--- a/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/qfiledialog2/tst_qfiledialog2.cpp
@@ -76,6 +76,13 @@
# define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/"
#endif
+#if defined QT_BUILD_INTERNAL
+QT_BEGIN_NAMESPACE
+Q_GUI_EXPORT bool qt_test_isFetchedRoot();
+Q_GUI_EXPORT void qt_test_resetFetchedRoot();
+QT_END_NAMESPACE
+#endif
+
class QNonNativeFileDialog : public QFileDialog
{
Q_OBJECT
@@ -139,7 +146,7 @@ private:
};
tst_QFileDialog2::tst_QFileDialog2()
-{
+{
#if defined(Q_OS_WINCE)
qApp->setAutoMaximizeThreshold(-1);
#endif
@@ -177,19 +184,18 @@ void tst_QFileDialog2::listRoot()
QFileInfoGatherer fileInfoGatherer;
fileInfoGatherer.start();
QTest::qWait(1500);
-
- QFileInfoGatherer::fetchedRoot = false;
+ qt_test_resetFetchedRoot();
QString dir(QDir::currentPath());
QNonNativeFileDialog fd(0, QString(), dir);
fd.show();
- QCOMPARE(QFileInfoGatherer::fetchedRoot,false);
+ QCOMPARE(qt_test_isFetchedRoot(),false);
fd.setDirectory("");
#ifdef Q_OS_WINCE
QTest::qWait(1500);
#else
QTest::qWait(500);
#endif
- QCOMPARE(QFileInfoGatherer::fetchedRoot,true);
+ QCOMPARE(qt_test_isFetchedRoot(),true);
#endif
}
diff --git a/tests/auto/qftp/qftp.pro b/tests/auto/qftp/qftp.pro
index c060296..33d479a 100644
--- a/tests/auto/qftp/qftp.pro
+++ b/tests/auto/qftp/qftp.pro
@@ -14,6 +14,7 @@ wince*: {
addFiles.path = .
DEPLOYMENT += addFiles
TARGET.EPOCHEAPSIZE="0x100 0x1000000"
+ TARGET.CAPABILITY = NetworkServices
} else {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 81097be..5a5a821 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -45,6 +45,7 @@
#include <private/qtextcontrol_p.h>
#include <private/qgraphicsitem_p.h>
#include <private/qgraphicsview_p.h>
+#include <private/qgraphicsscene_p.h>
#include <QStyleOptionGraphicsItem>
#include <QAbstractTextDocumentLayout>
#include <QBitmap>
@@ -447,6 +448,7 @@ private slots:
void QT_2649_focusScope();
void sortItemsWhileAdding();
void doNotMarkFullUpdateIfNotInScene();
+ void itemDiesDuringDraggingOperation();
private:
QList<QGraphicsItem *> paintedItems;
@@ -10484,5 +10486,27 @@ void tst_QGraphicsItem::doNotMarkFullUpdateIfNotInScene()
QTRY_COMPARE(item3->painted, 3);
}
+void tst_QGraphicsItem::itemDiesDuringDraggingOperation()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ QGraphicsRectItem *item = new QGraphicsRectItem(QRectF(0, 0, 100, 100));
+ item->setFlag(QGraphicsItem::ItemIsMovable);
+ item->setAcceptDrops(true);
+ scene.addItem(item);
+ view.show();
+ QApplication::setActiveWindow(&view);
+ QTest::qWaitForWindowShown(&view);
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget *)&view);
+ QGraphicsSceneDragDropEvent dragEnter(QEvent::GraphicsSceneDragEnter);
+ dragEnter.setScenePos(item->boundingRect().center());
+ QApplication::sendEvent(&scene, &dragEnter);
+ QGraphicsSceneDragDropEvent event(QEvent::GraphicsSceneDragMove);
+ event.setScenePos(item->boundingRect().center());
+ QApplication::sendEvent(&scene, &event);
+ QVERIFY(QGraphicsScenePrivate::get(&scene)->dragDropItem == item);
+ delete item;
+ QVERIFY(QGraphicsScenePrivate::get(&scene)->dragDropItem == 0);
+}
QTEST_MAIN(tst_QGraphicsItem)
#include "tst_qgraphicsitem.moc"
diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index d5f63d3..6cea834 100644
--- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -3436,6 +3436,21 @@ void tst_QGraphicsProxyWidget::inputMethod()
qApp->sendEvent(proxy, &event);
QCOMPARE(lineEdit->inputMethodEvents, i);
}
+
+ scene.clear();
+ QGraphicsView view(&scene);
+ QWidget *w = new QWidget;
+ w->setLayout(new QVBoxLayout(w));
+ QLineEdit *lineEdit = new QLineEdit;
+ lineEdit->setEchoMode(QLineEdit::Password);
+ w->layout()->addWidget(lineEdit);
+ lineEdit->setAttribute(Qt::WA_InputMethodEnabled, true);
+ QGraphicsProxyWidget *proxy = scene.addWidget(w);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ QTRY_VERIFY(!(proxy->flags() & QGraphicsItem::ItemAcceptsInputMethod));
+ lineEdit->setFocus();
+ QVERIFY((proxy->flags() & QGraphicsItem::ItemAcceptsInputMethod));
}
void tst_QGraphicsProxyWidget::clickFocus()
diff --git a/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro b/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro
deleted file mode 100644
index b57e8e3..0000000
--- a/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-load(qttest_p4)
-SOURCES += tst_qgraphicsvideoitem.cpp
-
-QT += multimedia mediaservices
-requires(contains(QT_CONFIG, mediaservices))
diff --git a/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp b/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
deleted file mode 100644
index 1815779..0000000
--- a/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
+++ /dev/null
@@ -1,670 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QtMediaServices/qgraphicsvideoitem.h>
-
-#include <QtGui/qapplication.h>
-#include <QtGui/qgraphicsscene.h>
-#include <QtGui/qgraphicsview.h>
-#include <QtMultimedia/qabstractvideosurface.h>
-#include <QtMediaServices/qmediaobject.h>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qvideooutputcontrol.h>
-#include <QtMediaServices/qvideorenderercontrol.h>
-#include <QtMultimedia/qvideosurfaceformat.h>
-
-#include <QtMediaServices/private/qpaintervideosurface_p.h>
-
-class tst_QGraphicsVideoItem : public QObject
-{
- Q_OBJECT
-public slots:
- void initTestCase();
-
-private slots:
- void nullObject();
- void nullService();
- void nullOutputControl();
- void noOutputs();
- void serviceDestroyed();
- void mediaObjectDestroyed();
- void setMediaObject();
-
- void show();
-
- void aspectRatioMode();
- void offset();
- void size();
- void nativeSize_data();
- void nativeSize();
-
- void boundingRect_data();
- void boundingRect();
-
- void paint();
-};
-
-Q_DECLARE_METATYPE(const uchar *)
-Q_DECLARE_METATYPE(Qt::AspectRatioMode)
-
-class QtTestOutputControl : public QVideoOutputControl
-{
-public:
- QtTestOutputControl() : m_output(NoOutput) {}
-
- QList<Output> availableOutputs() const { return m_outputs; }
- void setAvailableOutputs(const QList<Output> outputs) { m_outputs = outputs; }
-
- Output output() const { return m_output; }
- virtual void setOutput(Output output) { m_output = output; }
-
-private:
- Output m_output;
- QList<Output> m_outputs;
-};
-
-class QtTestRendererControl : public QVideoRendererControl
-{
-public:
- QtTestRendererControl()
- : m_surface(0)
- {
- }
-
- QAbstractVideoSurface *surface() const { return m_surface; }
- void setSurface(QAbstractVideoSurface *surface) { m_surface = surface; }
-
-private:
- QAbstractVideoSurface *m_surface;
-};
-
-class QtTestVideoService : public QMediaService
-{
- Q_OBJECT
-public:
- QtTestVideoService(
- QtTestOutputControl *output,
- QtTestRendererControl *renderer)
- : QMediaService(0)
- , outputControl(output)
- , rendererControl(renderer)
- {
- }
-
- ~QtTestVideoService()
- {
- delete outputControl;
- delete rendererControl;
- }
-
- QMediaControl *control(const char *name) const
- {
- if (qstrcmp(name, QVideoOutputControl_iid) == 0)
- return outputControl;
- else if (qstrcmp(name, QVideoRendererControl_iid) == 0)
- return rendererControl;
- else
- return 0;
- }
-
- QtTestOutputControl *outputControl;
- QtTestRendererControl *rendererControl;
-};
-
-class QtTestVideoObject : public QMediaObject
-{
- Q_OBJECT
-public:
- QtTestVideoObject(QtTestRendererControl *renderer):
- QMediaObject(0, new QtTestVideoService(new QtTestOutputControl, renderer))
- {
- testService = qobject_cast<QtTestVideoService*>(service());
- QList<QVideoOutputControl::Output> outputs;
-
- if (renderer)
- outputs.append(QVideoOutputControl::RendererOutput);
-
- testService->outputControl->setAvailableOutputs(outputs);
- }
-
- QtTestVideoObject(QtTestVideoService *service):
- QMediaObject(0, service),
- testService(service)
- {
- }
-
- ~QtTestVideoObject()
- {
- delete testService;
- }
-
- QtTestVideoService *testService;
-};
-
-class QtTestGraphicsVideoItem : public QGraphicsVideoItem
-{
-public:
- QtTestGraphicsVideoItem(QGraphicsItem *parent = 0)
- : QGraphicsVideoItem(parent)
- , m_paintCount(0)
- {
- }
-
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
- {
- ++m_paintCount;
-
- QTestEventLoop::instance().exitLoop();
-
- QGraphicsVideoItem::paint(painter, option, widget);
- }
-
- bool waitForPaint(int secs)
- {
- const int paintCount = m_paintCount;
-
- QTestEventLoop::instance().enterLoop(secs);
-
- return m_paintCount != paintCount;
- }
-
- int paintCount() const
- {
- return m_paintCount;
- }
-
-private:
- int m_paintCount;
-};
-
-void tst_QGraphicsVideoItem::initTestCase()
-{
- qRegisterMetaType<Qt::AspectRatioMode>();
-}
-
-void tst_QGraphicsVideoItem::nullObject()
-{
- QGraphicsVideoItem item(0);
-
- QVERIFY(item.boundingRect().isEmpty());
-}
-
-void tst_QGraphicsVideoItem::nullService()
-{
- QtTestVideoService *service = 0;
-
- QtTestVideoObject object(service);
-
- QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem;
- item->setMediaObject(&object);
-
- QVERIFY(item->boundingRect().isEmpty());
-
- item->hide();
- item->show();
-
- QGraphicsScene graphicsScene;
- graphicsScene.addItem(item);
- QGraphicsView graphicsView(&graphicsScene);
- graphicsView.show();
-}
-
-void tst_QGraphicsVideoItem::nullOutputControl()
-{
- QtTestVideoObject object(new QtTestVideoService(0, 0));
-
- QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem;
- item->setMediaObject(&object);
-
- QVERIFY(item->boundingRect().isEmpty());
-
- item->hide();
- item->show();
-
- QGraphicsScene graphicsScene;
- graphicsScene.addItem(item);
- QGraphicsView graphicsView(&graphicsScene);
- graphicsView.show();
-}
-
-void tst_QGraphicsVideoItem::noOutputs()
-{
- QtTestRendererControl *control = 0;
- QtTestVideoObject object(control);
-
- QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem;
- item->setMediaObject(&object);
-
- QVERIFY(item->boundingRect().isEmpty());
-
- item->hide();
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
- item->show();
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
-
- QGraphicsScene graphicsScene;
- graphicsScene.addItem(item);
- QGraphicsView graphicsView(&graphicsScene);
- graphicsView.show();
-}
-
-void tst_QGraphicsVideoItem::serviceDestroyed()
-{
- QtTestVideoObject object(new QtTestRendererControl);
-
- QGraphicsVideoItem item;
- item.setMediaObject(&object);
-
- QtTestVideoService *service = object.testService;
- object.testService = 0;
-
- delete service;
-
- QCOMPARE(item.mediaObject(), static_cast<QMediaObject *>(&object));
- QVERIFY(item.boundingRect().isEmpty());
-}
-
-void tst_QGraphicsVideoItem::mediaObjectDestroyed()
-{
- QtTestVideoObject *object = new QtTestVideoObject(new QtTestRendererControl);
-
- QGraphicsVideoItem item;
- item.setMediaObject(object);
-
- delete object;
- object = 0;
-
- QCOMPARE(item.mediaObject(), static_cast<QMediaObject *>(object));
- QVERIFY(item.boundingRect().isEmpty());
-}
-
-void tst_QGraphicsVideoItem::setMediaObject()
-{
- QMediaObject *nullObject = 0;
- QtTestVideoObject object(new QtTestRendererControl);
-
- QGraphicsVideoItem item;
-
- QCOMPARE(item.mediaObject(), nullObject);
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
-
- item.setMediaObject(&object);
- QCOMPARE(item.mediaObject(), static_cast<QMediaObject *>(&object));
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
- QVERIFY(object.testService->rendererControl->surface() != 0);
-
- item.setMediaObject(0);
- QCOMPARE(item.mediaObject(), nullObject);
-
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
-
- item.setVisible(false);
-
- item.setMediaObject(&object);
- QCOMPARE(item.mediaObject(), static_cast<QMediaObject *>(&object));
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
- QVERIFY(object.testService->rendererControl->surface() != 0);
-}
-
-void tst_QGraphicsVideoItem::show()
-{
- QtTestVideoObject object(new QtTestRendererControl);
- QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem;
- item->setMediaObject(&object);
-
- // Graphics items are visible by default
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
- QVERIFY(object.testService->rendererControl->surface() != 0);
-
- item->hide();
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
-
- item->show();
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
- QVERIFY(object.testService->rendererControl->surface() != 0);
-
- QVERIFY(item->boundingRect().isEmpty());
-
- QVideoSurfaceFormat format(QSize(320,240),QVideoFrame::Format_RGB32);
- QVERIFY(object.testService->rendererControl->surface()->start(format));
-
- QVERIFY(!item->boundingRect().isEmpty());
-
- QGraphicsScene graphicsScene;
- graphicsScene.addItem(item);
- QGraphicsView graphicsView(&graphicsScene);
- graphicsView.show();
-
- QVERIFY(item->paintCount() || item->waitForPaint(1));
-}
-
-void tst_QGraphicsVideoItem::aspectRatioMode()
-{
- QGraphicsVideoItem item;
-
- QCOMPARE(item.aspectRatioMode(), Qt::KeepAspectRatio);
-
- item.setAspectRatioMode(Qt::IgnoreAspectRatio);
- QCOMPARE(item.aspectRatioMode(), Qt::IgnoreAspectRatio);
-
- item.setAspectRatioMode(Qt::KeepAspectRatioByExpanding);
- QCOMPARE(item.aspectRatioMode(), Qt::KeepAspectRatioByExpanding);
-
- item.setAspectRatioMode(Qt::KeepAspectRatio);
- QCOMPARE(item.aspectRatioMode(), Qt::KeepAspectRatio);
-}
-
-void tst_QGraphicsVideoItem::offset()
-{
- QGraphicsVideoItem item;
-
- QCOMPARE(item.offset(), QPointF(0, 0));
-
- item.setOffset(QPointF(-32.4, 43.0));
- QCOMPARE(item.offset(), QPointF(-32.4, 43.0));
-
- item.setOffset(QPointF(1, 1));
- QCOMPARE(item.offset(), QPointF(1, 1));
-
- item.setOffset(QPointF(12, -30.4));
- QCOMPARE(item.offset(), QPointF(12, -30.4));
-
- item.setOffset(QPointF(-90.4, -75));
- QCOMPARE(item.offset(), QPointF(-90.4, -75));
-}
-
-void tst_QGraphicsVideoItem::size()
-{
- QGraphicsVideoItem item;
-
- QCOMPARE(item.size(), QSizeF(320, 240));
-
- item.setSize(QSizeF(542.5, 436.3));
- QCOMPARE(item.size(), QSizeF(542.5, 436.3));
-
- item.setSize(QSizeF(-43, 12));
- QCOMPARE(item.size(), QSizeF(0, 0));
-
- item.setSize(QSizeF(54, -9));
- QCOMPARE(item.size(), QSizeF(0, 0));
-
- item.setSize(QSizeF(-90, -65));
- QCOMPARE(item.size(), QSizeF(0, 0));
-
- item.setSize(QSizeF(1000, 1000));
- QCOMPARE(item.size(), QSizeF(1000, 1000));
-}
-
-void tst_QGraphicsVideoItem::nativeSize_data()
-{
- QTest::addColumn<QSize>("frameSize");
- QTest::addColumn<QRect>("viewport");
- QTest::addColumn<QSize>("pixelAspectRatio");
- QTest::addColumn<QSizeF>("nativeSize");
-
- QTest::newRow("640x480")
- << QSize(640, 480)
- << QRect(0, 0, 640, 480)
- << QSize(1, 1)
- << QSizeF(640, 480);
-
- QTest::newRow("800x600, (80,60, 640x480) viewport")
- << QSize(800, 600)
- << QRect(80, 60, 640, 480)
- << QSize(1, 1)
- << QSizeF(640, 480);
-
- QTest::newRow("800x600, (80,60, 640x480) viewport, 4:3")
- << QSize(800, 600)
- << QRect(80, 60, 640, 480)
- << QSize(4, 3)
- << QSizeF(853, 480);
-}
-
-void tst_QGraphicsVideoItem::nativeSize()
-{
- QFETCH(QSize, frameSize);
- QFETCH(QRect, viewport);
- QFETCH(QSize, pixelAspectRatio);
- QFETCH(QSizeF, nativeSize);
-
- QtTestVideoObject object(new QtTestRendererControl);
- QGraphicsVideoItem item;
- item.setMediaObject(&object);
-
- QCOMPARE(item.nativeSize(), QSizeF());
-
- QSignalSpy spy(&item, SIGNAL(nativeSizeChanged(QSizeF)));
-
- QVideoSurfaceFormat format(frameSize, QVideoFrame::Format_ARGB32);
- format.setViewport(viewport);
- format.setPixelAspectRatio(pixelAspectRatio);
-
- QVERIFY(object.testService->rendererControl->surface()->start(format));
-
- QCOMPARE(item.nativeSize(), nativeSize);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.last().first().toSizeF(), nativeSize);
-
- object.testService->rendererControl->surface()->stop();
-
- QCOMPARE(item.nativeSize(), QSizeF(0, 0));
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.last().first().toSizeF(), QSizeF(0, 0));
-}
-
-void tst_QGraphicsVideoItem::boundingRect_data()
-{
- QTest::addColumn<QSize>("frameSize");
- QTest::addColumn<QPointF>("offset");
- QTest::addColumn<QSizeF>("size");
- QTest::addColumn<Qt::AspectRatioMode>("aspectRatioMode");
- QTest::addColumn<QRectF>("expectedRect");
-
-
- QTest::newRow("640x480: (0,0 640x480), Keep")
- << QSize(640, 480)
- << QPointF(0, 0)
- << QSizeF(640, 480)
- << Qt::KeepAspectRatio
- << QRectF(0, 0, 640, 480);
-
- QTest::newRow("800x600, (0,0, 640x480), Keep")
- << QSize(800, 600)
- << QPointF(0, 0)
- << QSizeF(640, 480)
- << Qt::KeepAspectRatio
- << QRectF(0, 0, 640, 480);
-
- QTest::newRow("800x600, (0,0, 640x480), KeepByExpanding")
- << QSize(800, 600)
- << QPointF(0, 0)
- << QSizeF(640, 480)
- << Qt::KeepAspectRatioByExpanding
- << QRectF(0, 0, 640, 480);
-
- QTest::newRow("800x600, (0,0, 640x480), Ignore")
- << QSize(800, 600)
- << QPointF(0, 0)
- << QSizeF(640, 480)
- << Qt::IgnoreAspectRatio
- << QRectF(0, 0, 640, 480);
-
- QTest::newRow("800x600, (100,100, 640x480), Keep")
- << QSize(800, 600)
- << QPointF(100, 100)
- << QSizeF(640, 480)
- << Qt::KeepAspectRatio
- << QRectF(100, 100, 640, 480);
-
- QTest::newRow("800x600, (100,-100, 640x480), KeepByExpanding")
- << QSize(800, 600)
- << QPointF(100, -100)
- << QSizeF(640, 480)
- << Qt::KeepAspectRatioByExpanding
- << QRectF(100, -100, 640, 480);
-
- QTest::newRow("800x600, (-100,-100, 640x480), Ignore")
- << QSize(800, 600)
- << QPointF(-100, -100)
- << QSizeF(640, 480)
- << Qt::IgnoreAspectRatio
- << QRectF(-100, -100, 640, 480);
-
- QTest::newRow("800x600, (0,0, 1920x1024), Keep")
- << QSize(800, 600)
- << QPointF(0, 0)
- << QSizeF(1920, 1024)
- << Qt::KeepAspectRatio
- << QRectF(832.0 / 3, 0, 4096.0 / 3, 1024);
-
- QTest::newRow("800x600, (0,0, 1920x1024), KeepByExpanding")
- << QSize(800, 600)
- << QPointF(0, 0)
- << QSizeF(1920, 1024)
- << Qt::KeepAspectRatioByExpanding
- << QRectF(0, 0, 1920, 1024);
-
- QTest::newRow("800x600, (0,0, 1920x1024), Ignore")
- << QSize(800, 600)
- << QPointF(0, 0)
- << QSizeF(1920, 1024)
- << Qt::IgnoreAspectRatio
- << QRectF(0, 0, 1920, 1024);
-
- QTest::newRow("800x600, (100,100, 1920x1024), Keep")
- << QSize(800, 600)
- << QPointF(100, 100)
- << QSizeF(1920, 1024)
- << Qt::KeepAspectRatio
- << QRectF(100 + 832.0 / 3, 100, 4096.0 / 3, 1024);
-
- QTest::newRow("800x600, (100,-100, 1920x1024), KeepByExpanding")
- << QSize(800, 600)
- << QPointF(100, -100)
- << QSizeF(1920, 1024)
- << Qt::KeepAspectRatioByExpanding
- << QRectF(100, -100, 1920, 1024);
-
- QTest::newRow("800x600, (-100,-100, 1920x1024), Ignore")
- << QSize(800, 600)
- << QPointF(-100, -100)
- << QSizeF(1920, 1024)
- << Qt::IgnoreAspectRatio
- << QRectF(-100, -100, 1920, 1024);
-}
-
-void tst_QGraphicsVideoItem::boundingRect()
-{
- QFETCH(QSize, frameSize);
- QFETCH(QPointF, offset);
- QFETCH(QSizeF, size);
- QFETCH(Qt::AspectRatioMode, aspectRatioMode);
- QFETCH(QRectF, expectedRect);
-
- QtTestVideoObject object(new QtTestRendererControl);
- QGraphicsVideoItem item;
- item.setMediaObject(&object);
-
- item.setOffset(offset);
- item.setSize(size);
- item.setAspectRatioMode(aspectRatioMode);
-
- QVideoSurfaceFormat format(frameSize, QVideoFrame::Format_ARGB32);
-
- QVERIFY(object.testService->rendererControl->surface()->start(format));
-
- QCOMPARE(item.boundingRect(), expectedRect);
-}
-
-static const uchar rgb32ImageData[] =
-{
- 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00,
- 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00
-};
-
-void tst_QGraphicsVideoItem::paint()
-{
- QtTestVideoObject object(new QtTestRendererControl);
- QtTestGraphicsVideoItem *item = new QtTestGraphicsVideoItem;
- item->setMediaObject(&object);
-
- QGraphicsScene graphicsScene;
- graphicsScene.addItem(item);
- QGraphicsView graphicsView(&graphicsScene);
- graphicsView.show();
-
- QPainterVideoSurface *surface = qobject_cast<QPainterVideoSurface *>(
- object.testService->rendererControl->surface());
-
- QVideoSurfaceFormat format(QSize(2, 2), QVideoFrame::Format_RGB32);
-
- QVERIFY(surface->start(format));
- QCOMPARE(surface->isActive(), true);
- QCOMPARE(surface->isReady(), true);
-
- QVERIFY(item->waitForPaint(1));
-
- QCOMPARE(surface->isActive(), true);
- QCOMPARE(surface->isReady(), true);
-
- QVideoFrame frame(sizeof(rgb32ImageData), QSize(2, 2), 8, QVideoFrame::Format_RGB32);
-
- frame.map(QAbstractVideoBuffer::WriteOnly);
- memcpy(frame.bits(), rgb32ImageData, frame.mappedBytes());
- frame.unmap();
-
- QVERIFY(surface->present(frame));
- QCOMPARE(surface->isActive(), true);
- QCOMPARE(surface->isReady(), false);
-
- QVERIFY(item->waitForPaint(1));
-
- QCOMPARE(surface->isActive(), true);
- QCOMPARE(surface->isReady(), true);
-}
-
-
-QTEST_MAIN(tst_QGraphicsVideoItem)
-
-#include "tst_qgraphicsvideoitem.moc"
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index 1df9a37..b8df7f6 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -218,6 +218,7 @@ private slots:
void update();
void update2_data();
void update2();
+ void update_ancestorClipsChildrenToShape();
void inputMethodSensitivity();
void inputContextReset();
void indirectPainting();
@@ -3758,6 +3759,62 @@ void tst_QGraphicsView::update2()
#endif
}
+void tst_QGraphicsView::update_ancestorClipsChildrenToShape()
+{
+ QGraphicsScene scene(-150, -150, 300, 300);
+
+ /*
+ Add three rects:
+
+ +------------------+
+ | child |
+ | +--------------+ |
+ | | parent | |
+ | | +-----------+ |
+ | | |grandParent| |
+ | | +-----------+ |
+ | +--------------+ |
+ +------------------+
+
+ ... where both the parent and the grand parent clips children to shape.
+ */
+ QApplication::processEvents(); // Get rid of pending update.
+
+ QGraphicsRectItem *grandParent = static_cast<QGraphicsRectItem *>(scene.addRect(0, 0, 50, 50));
+ grandParent->setBrush(Qt::black);
+ grandParent->setFlag(QGraphicsItem::ItemClipsChildrenToShape);
+
+ QGraphicsRectItem *parent = static_cast<QGraphicsRectItem *>(scene.addRect(-50, -50, 100, 100));
+ parent->setBrush(QColor(0, 0, 255, 125));
+ parent->setParentItem(grandParent);
+ parent->setFlag(QGraphicsItem::ItemClipsChildrenToShape);
+
+ QGraphicsRectItem *child = static_cast<QGraphicsRectItem *>(scene.addRect(-100, -100, 200, 200));
+ child->setBrush(QColor(255, 0, 0, 125));
+ child->setParentItem(parent);
+
+ CustomView view(&scene);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ QTRY_VERIFY(view.painted);
+
+ view.lastUpdateRegions.clear();
+ view.painted = false;
+
+ // Call child->update() and make sure the updated area is within the ancestors' clip.
+ QRectF expected = child->deviceTransform(view.viewportTransform()).mapRect(child->boundingRect());
+ expected &= grandParent->deviceTransform(view.viewportTransform()).mapRect(grandParent->boundingRect());
+
+ child->update();
+ QTRY_VERIFY(view.painted);
+
+#ifndef QT_MAC_USE_COCOA //cocoa doesn't support drawing regions
+ QTRY_VERIFY(view.painted);
+ QCOMPARE(view.lastUpdateRegions.size(), 1);
+ QCOMPARE(view.lastUpdateRegions.at(0), QRegion(expected.toAlignedRect()));
+#endif
+}
+
class FocusItem : public QGraphicsRectItem
{
public:
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
index 5a1d20b..ed8ff04 100644
--- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -169,6 +169,7 @@ private slots:
void initialShow();
void initialShow2();
void itemChangeEvents();
+ void itemSendGeometryPosChangesDeactivated();
// Task fixes
void task236127_bspTreeIndexFails();
@@ -3030,6 +3031,34 @@ void tst_QGraphicsWidget::itemChangeEvents()
QTRY_VERIFY(!item->valueDuringEvents.value(QEvent::EnabledChange).toBool());
}
+void tst_QGraphicsWidget::itemSendGeometryPosChangesDeactivated()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ QGraphicsWidget *item = new QGraphicsWidget;
+ scene.addItem(item);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ item->setGeometry(QRectF(0, 0, 50, 50));
+ QTRY_COMPARE(item->geometry(), QRectF(0, 0, 50, 50));
+
+ item->setFlag(QGraphicsItem::ItemSendsGeometryChanges, false);
+ item->setGeometry(QRectF(0, 0, 60, 60));
+ QCOMPARE(item->geometry(), QRectF(0, 0, 60, 60));
+ QCOMPARE(item->pos(), QPointF(0, 0));
+ item->setPos(QPointF(10, 10));
+ QCOMPARE(item->pos(), QPointF(10, 10));
+ QCOMPARE(item->geometry(), QRectF(10, 10, 60, 60));
+
+ item->setFlag(QGraphicsItem::ItemSendsScenePositionChanges, false);
+ item->setGeometry(QRectF(0, 0, 60, 60));
+ QCOMPARE(item->geometry(), QRectF(0, 0, 60, 60));
+ QCOMPARE(item->pos(), QPointF(0, 0));
+ item->setPos(QPointF(10, 10));
+ QCOMPARE(item->pos(), QPointF(10, 10));
+ QCOMPARE(item->geometry(), QRectF(10, 10, 60, 60));
+}
+
void tst_QGraphicsWidget::QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems()
{
QGraphicsScene scene;
diff --git a/tests/auto/qhostaddress/qhostaddress.pro b/tests/auto/qhostaddress/qhostaddress.pro
index b208214..7bcbfb0 100644
--- a/tests/auto/qhostaddress/qhostaddress.pro
+++ b/tests/auto/qhostaddress/qhostaddress.pro
@@ -12,3 +12,4 @@ wince*: {
}
}
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qhostinfo/qhostinfo.pro b/tests/auto/qhostinfo/qhostinfo.pro
index 9bfe576..97197a9 100644
--- a/tests/auto/qhostinfo/qhostinfo.pro
+++ b/tests/auto/qhostinfo/qhostinfo.pro
@@ -2,7 +2,7 @@ load(qttest_p4)
SOURCES += tst_qhostinfo.cpp
-QT = core network core
+QT = core network
wince*: {
LIBS += ws2.lib
@@ -10,4 +10,7 @@ wince*: {
win32:LIBS += -lws2_32
}
-
+symbian: TARGET.CAPABILITY = NetworkServices
+symbian: {
+ INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE
+}
diff --git a/tests/auto/qhttp/qhttp.pro b/tests/auto/qhttp/qhttp.pro
index 8678a19..23a73c4 100644
--- a/tests/auto/qhttp/qhttp.pro
+++ b/tests/auto/qhttp/qhttp.pro
@@ -21,6 +21,7 @@ wince*: {
addFiles.sources = rfc3252.txt trolltech
addFiles.path = .
DEPLOYMENT = addFiles webFiles cgi
+ TARGET.CAPABILITY = NetworkServices
} else:vxworks*: {
DEFINES += SRCDIR=\\\"\\\"
} else {
diff --git a/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro b/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
index 0021bc1..d9e2dce 100644
--- a/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
+++ b/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
@@ -4,3 +4,5 @@ INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/zlib
requires(contains(QT_CONFIG,private_tests))
QT = core network
+
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index 21f228a..89f608e 100644
--- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -109,6 +109,9 @@ private Q_SLOTS:
void getMultipleWithPriorities();
void getEmptyWithPipelining();
+
+ void getAndThenDeleteObject();
+ void getAndThenDeleteObject_data();
};
tst_QHttpNetworkConnection::tst_QHttpNetworkConnection()
@@ -1033,6 +1036,47 @@ void tst_QHttpNetworkConnection::getEmptyWithPipelining()
qDeleteAll(replies);
}
+void tst_QHttpNetworkConnection::getAndThenDeleteObject_data()
+{
+ QTest::addColumn<bool>("replyFirst");
+
+ QTest::newRow("delete-reply-first") << true;
+ QTest::newRow("delete-connection-first") << false;
+}
+
+void tst_QHttpNetworkConnection::getAndThenDeleteObject()
+{
+ // yes, this will leak if the testcase fails. I don't care. It must not fail then :P
+ QHttpNetworkConnection *connection = new QHttpNetworkConnection(QtNetworkSettings::serverName());
+ QHttpNetworkRequest request("http://" + QtNetworkSettings::serverName() + "/qtest/bigfile");
+ QHttpNetworkReply *reply = connection->sendRequest(request);
+ reply->setDownstreamLimited(true);
+
+ QTime stopWatch;
+ stopWatch.start();
+ forever {
+ QCoreApplication::instance()->processEvents();
+ if (reply->bytesAvailable())
+ break;
+ if (stopWatch.elapsed() >= 30000)
+ break;
+ }
+
+ QVERIFY(reply->bytesAvailable());
+ QCOMPARE(reply->statusCode() ,200);
+ QVERIFY(!reply->isFinished()); // must not be finished
+
+ QFETCH(bool, replyFirst);
+
+ if (replyFirst) {
+ delete reply;
+ delete connection;
+ } else {
+ delete connection;
+ delete reply;
+ }
+}
+
QTEST_MAIN(tst_QHttpNetworkConnection)
diff --git a/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro b/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro
index 1782b43..36d56c6 100644
--- a/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro
+++ b/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro
@@ -4,3 +4,4 @@ INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/zlib
requires(contains(QT_CONFIG,private_tests))
QT = core network
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qhttpsocketengine/qhttpsocketengine.pro b/tests/auto/qhttpsocketengine/qhttpsocketengine.pro
index f6ad073..d76ebb6 100644
--- a/tests/auto/qhttpsocketengine/qhttpsocketengine.pro
+++ b/tests/auto/qhttpsocketengine/qhttpsocketengine.pro
@@ -8,5 +8,6 @@ MOC_DIR=tmp
QT = core network
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp
index 1b4c502..aadee5b 100644
--- a/tests/auto/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/qimagereader/tst_qimagereader.cpp
@@ -114,6 +114,9 @@ private slots:
void readFromFileAfterJunk_data();
void readFromFileAfterJunk();
+ void devicePosition_data();
+ void devicePosition();
+
void setBackgroundColor_data();
void setBackgroundColor();
@@ -1117,7 +1120,7 @@ void tst_QImageReader::readFromFileAfterJunk()
QByteArray imageData = imageFile.readAll();
QVERIFY(!imageData.isNull());
- int iterations = 10;
+ int iterations = 3;
if (format == "ppm" || format == "pbm" || format == "pgm" || format == "svg" || format == "svgz")
iterations = 1;
@@ -1147,6 +1150,64 @@ void tst_QImageReader::readFromFileAfterJunk()
}
}
+void tst_QImageReader::devicePosition_data()
+{
+ QTest::addColumn<QString>("fileName");
+ QTest::addColumn<QByteArray>("format");
+
+ QTest::newRow("pbm") << QString("image.pbm") << QByteArray("pbm");
+ QTest::newRow("pgm") << QString("image.pgm") << QByteArray("pgm");
+ QTest::newRow("ppm-1") << QString("image.ppm") << QByteArray("ppm");
+#ifdef QTEST_HAVE_JPEG
+ QTest::newRow("jpeg-1") << QString("beavis.jpg") << QByteArray("jpeg");
+ QTest::newRow("jpeg-2") << QString("YCbCr_cmyk.jpg") << QByteArray("jpeg");
+ QTest::newRow("jpeg-3") << QString("YCbCr_rgb.jpg") << QByteArray("jpeg");
+#endif
+#if defined QTEST_HAVE_GIF
+ QTest::newRow("gif-1") << QString("earth.gif") << QByteArray("gif");
+#endif
+ QTest::newRow("xbm") << QString("gnus.xbm") << QByteArray("xbm");
+ QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm");
+ QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp");
+ QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp");
+ QTest::newRow("png") << QString("kollada.png") << QByteArray("png");
+// QTest::newRow("mng-1") << QString("images/ball.mng") << QByteArray("mng");
+// QTest::newRow("mng-2") << QString("images/fire.mng") << QByteArray("mng");
+#if defined QTEST_HAVE_SVG
+ QTest::newRow("svg") << QString("rect.svg") << QByteArray("svg");
+ QTest::newRow("svgz") << QString("rect.svgz") << QByteArray("svgz");
+#endif
+}
+
+void tst_QImageReader::devicePosition()
+{
+ QFETCH(QString, fileName);
+ QFETCH(QByteArray, format);
+
+ QImage expected(prefix + fileName);
+ QVERIFY(!expected.isNull());
+
+ QFile imageFile(prefix + fileName);
+ QVERIFY(imageFile.open(QFile::ReadOnly));
+ QByteArray imageData = imageFile.readAll();
+ QVERIFY(!imageData.isNull());
+ int imageDataSize = imageData.size();
+
+ const char *preStr = "prebeef\n";
+ int preLen = qstrlen(preStr);
+ imageData.prepend(preStr);
+ if (format != "svg" && format != "svgz") // Doesn't handle trailing data
+ imageData.append("\npostbeef");
+ QBuffer buf(&imageData);
+ buf.open(QIODevice::ReadOnly);
+ buf.seek(preLen);
+ QImageReader reader(&buf, format);
+ QCOMPARE(expected, reader.read());
+ if (format != "ppm" && format != "gif") // Known not to work
+ QCOMPARE(buf.pos(), qint64(preLen+imageDataSize));
+}
+
+
void tst_QImageReader::description_data()
{
QTest::addColumn<QString>("fileName");
diff --git a/tests/auto/qiodevice/qiodevice.pro b/tests/auto/qiodevice/qiodevice.pro
index e695bf6..716cdce 100644
--- a/tests/auto/qiodevice/qiodevice.pro
+++ b/tests/auto/qiodevice/qiodevice.pro
@@ -14,6 +14,7 @@ wince*: {
addFiles.sources = tst_qiodevice.cpp
addFiles.path = .
DEPLOYMENT += addFiles
+ TARGET.CAPABILITY = NetworkServices
} else {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
contains(QT_CONFIG, qt3support):QT += qt3support
diff --git a/tests/auto/qlocale/tst_qlocale.cpp b/tests/auto/qlocale/tst_qlocale.cpp
index 7a5d8a6..7e9b8ec 100644
--- a/tests/auto/qlocale/tst_qlocale.cpp
+++ b/tests/auto/qlocale/tst_qlocale.cpp
@@ -192,6 +192,7 @@ void tst_QLocale::ctor()
TEST_CTOR(French, France, QLocale::French, QLocale::France)
TEST_CTOR(C, France, QLocale::C, QLocale::AnyCountry)
+ TEST_CTOR(Spanish, LatinAmericaAndTheCaribbean, QLocale::Spanish, QLocale::LatinAmericaAndTheCaribbean)
QLocale::setDefault(QLocale(QLocale::English, QLocale::France));
@@ -323,6 +324,12 @@ void tst_QLocale::ctor()
TEST_CTOR("no_NO", Norwegian, Norway)
TEST_CTOR("nb_NO", Norwegian, Norway)
TEST_CTOR("nn_NO", NorwegianNynorsk, Norway)
+ TEST_CTOR("es_ES", Spanish, Spain)
+ TEST_CTOR("es_419", Spanish, LatinAmericaAndTheCaribbean)
+
+ // test default countries for languages
+ TEST_CTOR("mn", Mongolian, Mongolia)
+ TEST_CTOR("ne", Nepali, Nepal)
#undef TEST_CTOR
@@ -1321,10 +1328,12 @@ static const LocaleListItem g_locale_list[] = {
{ 9, 11}, // Armenian/Armenia
{ 10, 100}, // Assamese/India
{ 12, 15}, // Azerbaijani/Azerbaijan
+ { 12, 102}, // Azerbaijani/Iran
{ 14, 197}, // Basque/Spain
{ 15, 18}, // Bengali/Bangladesh
{ 15, 100}, // Bengali/India
{ 16, 25}, // Bhutani/Bhutan
+ { 19, 74}, // Breton/France
{ 20, 33}, // Bulgarian/Bulgaria
{ 21, 147}, // Burmese/Myanmar
{ 22, 20}, // Byelorussian/Belarus
@@ -1354,6 +1363,7 @@ static const LocaleListItem g_locale_list[] = {
{ 31, 107}, // English/Jamaica
{ 31, 133}, // English/Malta
{ 31, 134}, // English/MarshallIslands
+ { 31, 137}, // English/Mauritius
{ 31, 148}, // English/Namibia
{ 31, 154}, // English/NewZealand
{ 31, 160}, // English/NorthernMarianaIslands
@@ -1371,11 +1381,23 @@ static const LocaleListItem g_locale_list[] = {
{ 36, 73}, // Finnish/Finland
{ 37, 74}, // French/France
{ 37, 21}, // French/Belgium
+ { 37, 37}, // French/Cameroon
{ 37, 38}, // French/Canada
+ { 37, 41}, // French/CentralAfricanRepublic
+ { 37, 53}, // French/IvoryCoast
+ { 37, 88}, // French/Guadeloupe
+ { 37, 91}, // French/Guinea
{ 37, 125}, // French/Luxembourg
+ { 37, 128}, // French/Madagascar
+ { 37, 132}, // French/Mali
+ { 37, 135}, // French/Martinique
{ 37, 142}, // French/Monaco
+ { 37, 156}, // French/Niger
+ { 37, 176}, // French/Reunion
{ 37, 187}, // French/Senegal
{ 37, 206}, // French/Switzerland
+ { 37, 244}, // French/Saint Barthelemy
+ { 37, 245}, // French/Saint Martin
{ 40, 197}, // Galician/Spain
{ 41, 81}, // Georgian/Georgia
{ 42, 82}, // German/Germany
@@ -1406,6 +1428,9 @@ static const LocaleListItem g_locale_list[] = {
{ 64, 179}, // Kinyarwanda/Rwanda
{ 65, 116}, // Kirghiz/Kyrgyzstan
{ 66, 114}, // Korean/RepublicOfKorea
+ { 67, 102}, // Kurdish/Iran
+ { 67, 103}, // Kurdish/Iraq
+ { 67, 207}, // Kurdish/SyrianArabRepublic
{ 67, 217}, // Kurdish/Turkey
{ 69, 117}, // Laothian/Lao
{ 71, 118}, // Latvian/Latvia
@@ -1413,16 +1438,19 @@ static const LocaleListItem g_locale_list[] = {
{ 72, 50}, // Lingala/PeoplesRepublicOfCongo
{ 73, 124}, // Lithuanian/Lithuania
{ 74, 127}, // Macedonian/Macedonia
+ { 75, 128}, // Malagasy/Madagascar
{ 76, 130}, // Malay/Malaysia
{ 76, 32}, // Malay/BruneiDarussalam
{ 77, 100}, // Malayalam/India
{ 78, 133}, // Maltese/Malta
+ { 79, 154}, // Maori/NewZealand
{ 80, 100}, // Marathi/India
{ 82, 44}, // Mongolian/China
{ 82, 143}, // Mongolian/Mongolia
{ 84, 100}, // Nepali/India
{ 84, 150}, // Nepali/Nepal
{ 85, 161}, // Norwegian/Norway
+ { 86, 74}, // Occitan/France
{ 87, 100}, // Oriya/India
{ 88, 1}, // Pashto/Afghanistan
{ 89, 102}, // Persian/Iran
@@ -1430,22 +1458,30 @@ static const LocaleListItem g_locale_list[] = {
{ 90, 172}, // Polish/Poland
{ 91, 173}, // Portuguese/Portugal
{ 91, 30}, // Portuguese/Brazil
+ { 91, 92}, // Portuguese/GuineaBissau
+ { 91, 146}, // Portuguese/Mozambique
{ 92, 100}, // Punjabi/India
{ 92, 163}, // Punjabi/Pakistan
+ { 94, 206}, // RhaetoRomance/Switzerland
{ 95, 141}, // Romanian/Moldova
{ 95, 177}, // Romanian/Romania
{ 96, 178}, // Russian/RussianFederation
+ { 96, 141}, // Russian/Moldova
{ 96, 222}, // Russian/Ukraine
+ { 98, 41}, // Sangho/CentralAfricanRepublic
{ 99, 100}, // Sanskrit/India
{ 100, 241}, // Serbian/SerbiaAndMontenegro
{ 100, 27}, // Serbian/BosniaAndHerzegowina
{ 100, 238}, // Serbian/Yugoslavia
+ { 100, 242}, // Serbian/Montenegro
+ { 100, 243}, // Serbian/Serbia
{ 101, 241}, // SerboCroatian/SerbiaAndMontenegro
{ 101, 27}, // SerboCroatian/BosniaAndHerzegowina
{ 101, 238}, // SerboCroatian/Yugoslavia
{ 102, 120}, // Sesotho/Lesotho
{ 102, 195}, // Sesotho/SouthAfrica
{ 103, 195}, // Setswana/SouthAfrica
+ { 104, 240}, // Shona/Zimbabwe
{ 106, 198}, // Singhalese/SriLanka
{ 107, 195}, // Siswati/SouthAfrica
{ 107, 204}, // Siswati/Swaziland
@@ -1464,6 +1500,7 @@ static const LocaleListItem g_locale_list[] = {
{ 111, 61}, // Spanish/DominicanRepublic
{ 111, 63}, // Spanish/Ecuador
{ 111, 65}, // Spanish/ElSalvador
+ { 111, 66}, // Spanish/EquatorialGuinea
{ 111, 90}, // Spanish/Guatemala
{ 111, 96}, // Spanish/Honduras
{ 111, 139}, // Spanish/Mexico
@@ -1481,9 +1518,12 @@ static const LocaleListItem g_locale_list[] = {
{ 114, 73}, // Swedish/Finland
{ 116, 209}, // Tajik/Tajikistan
{ 117, 100}, // Tamil/India
+ { 117, 198}, // Tamil/SriLanka
{ 118, 178}, // Tatar/RussianFederation
{ 119, 100}, // Telugu/India
{ 120, 211}, // Thai/Thailand
+ { 121, 44}, // Tibetan/China
+ { 121, 100}, // Tibetan/India
{ 122, 67}, // Tigrinya/Eritrea
{ 122, 69}, // Tigrinya/Ethiopia
{ 123, 214}, // Tonga/Tonga
@@ -1524,9 +1564,63 @@ static const LocaleListItem g_locale_list[] = {
{ 160, 195}, // Venda/SouthAfrica
{ 161, 83}, // Ewe/Ghana
{ 161, 212}, // Ewe/Togo
+ { 162, 69}, // Walamo/Ethiopia
{ 163, 225}, // Hawaiian/UnitedStates
{ 164, 157}, // Tyap/Nigeria
- { 165, 129} // Chewa/Malawi
+ { 165, 129}, // Chewa/Malawi
+ { 166, 170}, // Filipino/Philippines
+ { 167, 206}, // Swiss German/Switzerland
+ { 168, 44}, // Sichuan Yi/China
+ { 169, 91}, // Kpelle/Guinea
+ { 169, 121}, // Kpelle/Liberia
+ { 170, 82}, // Low German/Germany
+ { 171, 195}, // South Ndebele/SouthAfrica
+ { 172, 195}, // Northern Sotho/SouthAfrica
+ { 173, 73}, // Northern Sami/Finland
+ { 173, 161}, // Northern Sami/Norway
+ { 174, 208}, // Taroko/Taiwan
+ { 175, 111}, // Gusii/Kenya
+ { 176, 111}, // Taita/Kenya
+ { 177, 187}, // Fulah/Senegal
+ { 178, 111}, // Kikuyu/Kenya
+ { 179, 111}, // Samburu/Kenya
+ { 180, 146}, // Sena/Mozambique
+ { 181, 240}, // North Ndebele/Zimbabwe
+ { 182, 210}, // Rombo/Tanzania
+ { 183, 145}, // Tachelhit/Morocco
+ { 184, 3}, // Kabyle/Algeria
+ { 185, 221}, // Nyankole/Uganda
+ { 186, 210}, // Bena/Tanzania
+ { 187, 210}, // Vunjo/Tanzania
+ { 188, 132}, // Bambara/Mali
+ { 189, 111}, // Embu/Kenya
+ { 190, 225}, // Cherokee/UnitedStates
+ { 191, 137}, // Morisyen/Mauritius
+ { 192, 210}, // Makonde/Tanzania
+ { 193, 210}, // Langi/Tanzania
+ { 194, 221}, // Ganda/Uganda
+ { 195, 239}, // Bemba/Zambia
+ { 196, 39}, // Kabuverdianu/CapeVerde
+ { 197, 111}, // Meru/Kenya
+ { 198, 111}, // Kalenjin/Kenya
+ { 199, 148}, // Nama/Namibia
+ { 200, 210}, // Machame/Tanzania
+ { 201, 82}, // Colognian/Germany
+ { 202, 111}, // Masai/Kenya
+ { 202, 210}, // Masai/Tanzania
+ { 203, 221}, // Soga/Uganda
+ { 204, 111}, // Luyia/Kenya
+ { 205, 210}, // Asu/Tanzania
+ { 206, 111}, // Teso/Kenya
+ { 206, 221}, // Teso/Uganda
+ { 207, 67}, // Saho/Eritrea
+ { 208, 132}, // Koyra Chiini/Mali
+ { 209, 210}, // Rwa/Tanzania
+ { 210, 111}, // Luo/Kenya
+ { 211, 221}, // Chiga/Uganda
+ { 212, 145}, // Central Morocco Tamazight/Morocco
+ { 213, 132}, // Koyraboro Senni/Mali
+ { 214, 210} // Shambala/Tanzania
};
static const int g_locale_list_count = sizeof(g_locale_list)/sizeof(g_locale_list[0]);
@@ -1896,8 +1990,8 @@ void tst_QLocale::ampm()
QCOMPARE(c.pmText(), QLatin1String("PM"));
QLocale de("de_DE");
- QCOMPARE(de.amText(), QLatin1String("AM"));
- QCOMPARE(de.pmText(), QLatin1String("PM"));
+ QCOMPARE(de.amText(), QLatin1String("vorm."));
+ QCOMPARE(de.pmText(), QLatin1String("nachm."));
QLocale sv("sv_SE");
QCOMPARE(sv.amText(), QLatin1String("fm"));
diff --git a/tests/auto/qlocalsocket/qlocalsocket.pro b/tests/auto/qlocalsocket/qlocalsocket.pro
index 0849453..287e946 100644
--- a/tests/auto/qlocalsocket/qlocalsocket.pro
+++ b/tests/auto/qlocalsocket/qlocalsocket.pro
@@ -1,3 +1,4 @@
TEMPLATE = subdirs
SUBDIRS = lackey test
!wince*:!symbian*: SUBDIRS += example
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qmediacontent/qmediacontent.pro b/tests/auto/qmediacontent/qmediacontent.pro
deleted file mode 100644
index e20b4db..0000000
--- a/tests/auto/qmediacontent/qmediacontent.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4)
-
-SOURCES += tst_qmediacontent.cpp
-
-QT = core network mediaservices
-
diff --git a/tests/auto/qmediacontent/tst_qmediacontent.cpp b/tests/auto/qmediacontent/tst_qmediacontent.cpp
deleted file mode 100644
index e33149a..0000000
--- a/tests/auto/qmediacontent/tst_qmediacontent.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QtMediaServices/qmediacontent.h>
-
-
-class tst_QMediaContent : public QObject
-{
- Q_OBJECT
-
-private slots:
- void testNull();
- void testUrlCtor();
- void testRequestCtor();
- void testResourceCtor();
- void testResourceListCtor();
- void testCopy();
- void testAssignment();
- void testEquality();
- void testResources();
-};
-
-void tst_QMediaContent::testNull()
-{
- QMediaContent media;
-
- QCOMPARE(media.isNull(), true);
- QCOMPARE(media.canonicalUrl(), QUrl());
- QCOMPARE(media.canonicalResource(), QMediaResource());
- QCOMPARE(media.resources(), QMediaResourceList());
-}
-
-void tst_QMediaContent::testUrlCtor()
-{
- QMediaContent media(QUrl("http://example.com/movie.mov"));
-
- QCOMPARE(media.canonicalUrl(), QUrl("http://example.com/movie.mov"));
- QCOMPARE(media.canonicalResource().url(), QUrl("http://example.com/movie.mov"));
-}
-
-void tst_QMediaContent::testRequestCtor()
-{
- QNetworkRequest request(QUrl("http://example.com/movie.mov"));
- request.setAttribute(QNetworkRequest::User, QVariant(1234));
-
- QMediaContent media(request);
-
- QCOMPARE(media.canonicalRequest(), request);
- QCOMPARE(media.canonicalUrl(), QUrl("http://example.com/movie.mov"));
- QCOMPARE(media.canonicalResource().request(), request);
- QCOMPARE(media.canonicalResource().url(), QUrl("http://example.com/movie.mov"));
-}
-
-void tst_QMediaContent::testResourceCtor()
-{
- QMediaContent media(QMediaResource(QUrl("http://example.com/movie.mov")));
-
- QCOMPARE(media.canonicalResource(), QMediaResource(QUrl("http://example.com/movie.mov")));
-}
-
-void tst_QMediaContent::testResourceListCtor()
-{
- QMediaResourceList resourceList;
- resourceList << QMediaResource(QUrl("http://example.com/movie.mov"));
-
- QMediaContent media(resourceList);
-
- QCOMPARE(media.canonicalUrl(), QUrl("http://example.com/movie.mov"));
- QCOMPARE(media.canonicalResource().url(), QUrl("http://example.com/movie.mov"));
-}
-
-void tst_QMediaContent::testCopy()
-{
- QMediaContent media1(QMediaResource(QUrl("http://example.com/movie.mov")));
- QMediaContent media2(media1);
-
- QVERIFY(media1 == media2);
-}
-
-void tst_QMediaContent::testAssignment()
-{
- QMediaContent media1(QMediaResource(QUrl("http://example.com/movie.mov")));
- QMediaContent media2;
- QMediaContent media3;
-
- media2 = media1;
- QVERIFY(media2 == media1);
-
- media2 = media3;
- QVERIFY(media2 == media3);
-}
-
-void tst_QMediaContent::testEquality()
-{
- QMediaContent media1;
- QMediaContent media2;
- QMediaContent media3(QMediaResource(QUrl("http://example.com/movie.mov")));
- QMediaContent media4(QMediaResource(QUrl("http://example.com/movie.mov")));
- QMediaContent media5(QMediaResource(QUrl("file:///some/where/over/the/rainbow.mp3")));
-
- // null == null
- QCOMPARE(media1 == media2, true);
- QCOMPARE(media1 != media2, false);
-
- // null != something
- QCOMPARE(media1 == media3, false);
- QCOMPARE(media1 != media3, true);
-
- // equiv
- QCOMPARE(media3 == media4, true);
- QCOMPARE(media3 != media4, false);
-
- // not equiv
- QCOMPARE(media4 == media5, false);
- QCOMPARE(media4 != media5, true);
-}
-
-void tst_QMediaContent::testResources()
-{
- QMediaResourceList resourceList;
-
- resourceList << QMediaResource(QUrl("http://example.com/movie-main.mov"));
- resourceList << QMediaResource(QUrl("http://example.com/movie-big.mov"));
- QMediaContent media(resourceList);
-
- QMediaResourceList res = media.resources();
- QCOMPARE(res.size(), 2);
- QCOMPARE(res[0], QMediaResource(QUrl("http://example.com/movie-main.mov")));
- QCOMPARE(res[1], QMediaResource(QUrl("http://example.com/movie-big.mov")));
-}
-
-QTEST_MAIN(tst_QMediaContent)
-
-#include "tst_qmediacontent.moc"
diff --git a/tests/auto/qmediaobject/qmediaobject.pro b/tests/auto/qmediaobject/qmediaobject.pro
deleted file mode 100644
index d6a0f7b..0000000
--- a/tests/auto/qmediaobject/qmediaobject.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-load(qttest_p4)
-
-SOURCES += tst_qmediaobject.cpp
-QT = core mediaservices
diff --git a/tests/auto/qmediaobject/tst_qmediaobject.cpp b/tests/auto/qmediaobject/tst_qmediaobject.cpp
deleted file mode 100644
index 5a2fdeb..0000000
--- a/tests/auto/qmediaobject/tst_qmediaobject.cpp
+++ /dev/null
@@ -1,549 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QtCore/qtimer.h>
-
-#include <QtMediaServices/qmediaobject.h>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qmetadatacontrol.h>
-
-
-class tst_QMediaObject : public QObject
-{
- Q_OBJECT
-
-private slots:
- void propertyWatch();
- void notifySignals_data();
- void notifySignals();
- void notifyInterval_data();
- void notifyInterval();
-
- void nullMetaDataControl();
- void isMetaDataAvailable();
- void isWritable();
- void metaDataChanged();
- void metaData_data();
- void metaData();
- void setMetaData_data();
- void setMetaData();
- void extendedMetaData_data() { metaData_data(); }
- void extendedMetaData();
- void setExtendedMetaData_data() { extendedMetaData_data(); }
- void setExtendedMetaData();
-
-
-private:
- void setupNotifyTests();
-};
-
-class QtTestMetaDataProvider : public QMetaDataControl
-{
- Q_OBJECT
-public:
- QtTestMetaDataProvider(QObject *parent = 0)
- : QMetaDataControl(parent)
- , m_available(false)
- , m_writable(false)
- {
- }
-
- bool isMetaDataAvailable() const { return m_available; }
- void setMetaDataAvailable(bool available) {
- if (m_available != available)
- emit metaDataAvailableChanged(m_available = available);
- }
- QList<QtMediaServices::MetaData> availableMetaData() const { return m_data.keys(); }
-
- bool isWritable() const { return m_writable; }
- void setWritable(bool writable) { emit writableChanged(m_writable = writable); }
-
- QVariant metaData(QtMediaServices::MetaData key) const { return m_data.value(key); }
- void setMetaData(QtMediaServices::MetaData key, const QVariant &value) {
- m_data.insert(key, value); }
-
- QVariant extendedMetaData(const QString &key) const { return m_extendedData.value(key); }
- void setExtendedMetaData(const QString &key, const QVariant &value) {
- m_extendedData.insert(key, value); }
-
- QStringList availableExtendedMetaData() const { return m_extendedData.keys(); }
-
- using QMetaDataControl::metaDataChanged;
-
- void populateMetaData()
- {
- m_available = true;
- }
-
- bool m_available;
- bool m_writable;
- QMap<QtMediaServices::MetaData, QVariant> m_data;
- QMap<QString, QVariant> m_extendedData;
-};
-
-class QtTestMetaDataService : public QMediaService
-{
- Q_OBJECT
-public:
- QtTestMetaDataService(QObject *parent = 0):QMediaService(parent), hasMetaData(true)
- {
- }
-
- QMediaControl *control(const char *iid) const
- {
- if (hasMetaData && qstrcmp(iid, QMetaDataControl_iid) == 0)
- return const_cast<QtTestMetaDataProvider *>(&metaData);
- else
- return 0;
- }
-
- QtTestMetaDataProvider metaData;
- bool hasMetaData;
-};
-
-
-class QtTestMediaObject : public QMediaObject
-{
- Q_OBJECT
- Q_PROPERTY(int a READ a WRITE setA NOTIFY aChanged)
- Q_PROPERTY(int b READ b WRITE setB NOTIFY bChanged)
- Q_PROPERTY(int c READ c WRITE setC NOTIFY cChanged)
- Q_PROPERTY(int d READ d WRITE setD)
-public:
- QtTestMediaObject(QMediaService *service = 0): QMediaObject(0, service), m_a(0), m_b(0), m_c(0), m_d(0) {}
-
- using QMediaObject::addPropertyWatch;
- using QMediaObject::removePropertyWatch;
-
- int a() const { return m_a; }
- void setA(int a) { m_a = a; }
-
- int b() const { return m_b; }
- void setB(int b) { m_b = b; }
-
- int c() const { return m_c; }
- void setC(int c) { m_c = c; }
-
- int d() const { return m_d; }
- void setD(int d) { m_d = d; }
-
-Q_SIGNALS:
- void aChanged(int a);
- void bChanged(int b);
- void cChanged(int c);
-
-private:
- int m_a;
- int m_b;
- int m_c;
- int m_d;
-};
-
-void tst_QMediaObject::propertyWatch()
-{
- QtTestMediaObject object;
- object.setNotifyInterval(0);
-
- QEventLoop loop;
- connect(&object, SIGNAL(aChanged(int)), &QTestEventLoop::instance(), SLOT(exitLoop()));
- connect(&object, SIGNAL(bChanged(int)), &QTestEventLoop::instance(), SLOT(exitLoop()));
- connect(&object, SIGNAL(cChanged(int)), &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QSignalSpy aSpy(&object, SIGNAL(aChanged(int)));
- QSignalSpy bSpy(&object, SIGNAL(bChanged(int)));
- QSignalSpy cSpy(&object, SIGNAL(cChanged(int)));
-
- QTestEventLoop::instance().enterLoop(1);
-
- QCOMPARE(aSpy.count(), 0);
- QCOMPARE(bSpy.count(), 0);
- QCOMPARE(cSpy.count(), 0);
-
- int aCount = 0;
- int bCount = 0;
- int cCount = 0;
-
- object.addPropertyWatch("a");
-
- QTestEventLoop::instance().enterLoop(1);
-
- QVERIFY(aSpy.count() > aCount);
- QCOMPARE(bSpy.count(), 0);
- QCOMPARE(cSpy.count(), 0);
- QCOMPARE(aSpy.last().value(0).toInt(), 0);
-
- aCount = aSpy.count();
-
- object.setA(54);
- object.setB(342);
- object.setC(233);
-
- QTestEventLoop::instance().enterLoop(1);
-
- QVERIFY(aSpy.count() > aCount);
- QCOMPARE(bSpy.count(), 0);
- QCOMPARE(cSpy.count(), 0);
- QCOMPARE(aSpy.last().value(0).toInt(), 54);
-
- aCount = aSpy.count();
-
- object.addPropertyWatch("b");
- object.addPropertyWatch("d");
- object.removePropertyWatch("e");
- object.setA(43);
- object.setB(235);
- object.setC(90);
-
- QTestEventLoop::instance().enterLoop(1);
-
- QVERIFY(aSpy.count() > aCount);
- QVERIFY(bSpy.count() > bCount);
- QCOMPARE(cSpy.count(), 0);
- QCOMPARE(aSpy.last().value(0).toInt(), 43);
- QCOMPARE(bSpy.last().value(0).toInt(), 235);
-
- aCount = aSpy.count();
- bCount = bSpy.count();
-
- object.removePropertyWatch("a");
- object.addPropertyWatch("c");
- object.addPropertyWatch("e");
-
- QTestEventLoop::instance().enterLoop(1);
-
- QCOMPARE(aSpy.count(), aCount);
- QVERIFY(bSpy.count() > bCount);
- QVERIFY(cSpy.count() > cCount);
- QCOMPARE(bSpy.last().value(0).toInt(), 235);
- QCOMPARE(cSpy.last().value(0).toInt(), 90);
-
- bCount = bSpy.count();
- cCount = cSpy.count();
-
- object.setA(435);
- object.setC(9845);
-
- QTestEventLoop::instance().enterLoop(1);
-
- QCOMPARE(aSpy.count(), aCount);
- QVERIFY(bSpy.count() > bCount);
- QVERIFY(cSpy.count() > cCount);
- QCOMPARE(bSpy.last().value(0).toInt(), 235);
- QCOMPARE(cSpy.last().value(0).toInt(), 9845);
-
- bCount = bSpy.count();
- cCount = cSpy.count();
-
- object.setA(8432);
- object.setB(324);
- object.setC(443);
- object.removePropertyWatch("c");
- object.removePropertyWatch("d");
-
- QTestEventLoop::instance().enterLoop(1);
-
- QCOMPARE(aSpy.count(), aCount);
- QVERIFY(bSpy.count() > bCount);
- QCOMPARE(cSpy.count(), cCount);
- QCOMPARE(bSpy.last().value(0).toInt(), 324);
- QCOMPARE(cSpy.last().value(0).toInt(), 9845);
-
- bCount = bSpy.count();
-
- object.removePropertyWatch("b");
-
- QTestEventLoop::instance().enterLoop(1);
-
- QCOMPARE(aSpy.count(), aCount);
- QCOMPARE(bSpy.count(), bCount);
- QCOMPARE(cSpy.count(), cCount);
-}
-
-void tst_QMediaObject::setupNotifyTests()
-{
- QTest::addColumn<int>("interval");
- QTest::addColumn<int>("count");
-
- QTest::newRow("single 750ms")
- << 750
- << 1;
- QTest::newRow("single 600ms")
- << 600
- << 1;
- QTest::newRow("x3 300ms")
- << 300
- << 3;
- QTest::newRow("x5 180ms")
- << 180
- << 5;
-}
-
-void tst_QMediaObject::notifySignals_data()
-{
- setupNotifyTests();
-}
-
-void tst_QMediaObject::notifySignals()
-{
- QFETCH(int, interval);
- QFETCH(int, count);
-
- QtTestMediaObject object;
- object.setNotifyInterval(interval);
- object.addPropertyWatch("a");
-
- QSignalSpy spy(&object, SIGNAL(aChanged(int)));
-
- QTestEventLoop::instance().enterLoop(1);
-
- QCOMPARE(spy.count(), count);
-}
-
-void tst_QMediaObject::notifyInterval_data()
-{
- setupNotifyTests();
-}
-
-void tst_QMediaObject::notifyInterval()
-{
- QFETCH(int, interval);
-
- QtTestMediaObject object;
- QSignalSpy spy(&object, SIGNAL(notifyIntervalChanged(int)));
-
- object.setNotifyInterval(interval);
- QCOMPARE(object.notifyInterval(), interval);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.last().value(0).toInt(), interval);
-
- object.setNotifyInterval(interval);
- QCOMPARE(object.notifyInterval(), interval);
- QCOMPARE(spy.count(), 1);
-}
-
-void tst_QMediaObject::nullMetaDataControl()
-{
- const QString titleKey(QLatin1String("Title"));
- const QString title(QLatin1String("Host of Seraphim"));
-
- QtTestMetaDataService service;
- service.hasMetaData = false;
-
- QtTestMediaObject object(&service);
-
- QSignalSpy spy(&object, SIGNAL(metaDataChanged()));
-
- QCOMPARE(object.isMetaDataAvailable(), false);
- QCOMPARE(object.isMetaDataWritable(), false);
-
- object.setMetaData(QtMediaServices::Title, title);
- object.setExtendedMetaData(titleKey, title);
-
- QCOMPARE(object.metaData(QtMediaServices::Title).toString(), QString());
- QCOMPARE(object.extendedMetaData(titleKey).toString(), QString());
- QCOMPARE(object.availableMetaData(), QList<QtMediaServices::MetaData>());
- QCOMPARE(object.availableExtendedMetaData(), QStringList());
- QCOMPARE(spy.count(), 0);
-}
-
-void tst_QMediaObject::isMetaDataAvailable()
-{
- QtTestMetaDataService service;
- service.metaData.setMetaDataAvailable(false);
-
- QtTestMediaObject object(&service);
- QCOMPARE(object.isMetaDataAvailable(), false);
-
- QSignalSpy spy(&object, SIGNAL(metaDataAvailableChanged(bool)));
- service.metaData.setMetaDataAvailable(true);
-
- QCOMPARE(object.isMetaDataAvailable(), true);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.at(0).at(0).toBool(), true);
-
- service.metaData.setMetaDataAvailable(false);
-
- QCOMPARE(object.isMetaDataAvailable(), false);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.at(1).at(0).toBool(), false);
-}
-
-void tst_QMediaObject::isWritable()
-{
- QtTestMetaDataService service;
- service.metaData.setWritable(false);
-
- QtTestMediaObject object(&service);
-
- QSignalSpy spy(&object, SIGNAL(metaDataWritableChanged(bool)));
-
- QCOMPARE(object.isMetaDataWritable(), false);
-
- service.metaData.setWritable(true);
-
- QCOMPARE(object.isMetaDataWritable(), true);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.at(0).at(0).toBool(), true);
-
- service.metaData.setWritable(false);
-
- QCOMPARE(object.isMetaDataWritable(), false);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.at(1).at(0).toBool(), false);
-}
-
-void tst_QMediaObject::metaDataChanged()
-{
- QtTestMetaDataService service;
- QtTestMediaObject object(&service);
-
- QSignalSpy spy(&object, SIGNAL(metaDataChanged()));
-
- service.metaData.metaDataChanged();
- QCOMPARE(spy.count(), 1);
-
- service.metaData.metaDataChanged();
- QCOMPARE(spy.count(), 2);
-}
-
-void tst_QMediaObject::metaData_data()
-{
- QTest::addColumn<QString>("artist");
- QTest::addColumn<QString>("title");
- QTest::addColumn<QString>("genre");
-
- QTest::newRow("")
- << QString::fromLatin1("Dead Can Dance")
- << QString::fromLatin1("Host of Seraphim")
- << QString::fromLatin1("Awesome");
-}
-
-void tst_QMediaObject::metaData()
-{
- QFETCH(QString, artist);
- QFETCH(QString, title);
- QFETCH(QString, genre);
-
- QtTestMetaDataService service;
- service.metaData.populateMetaData();
-
- QtTestMediaObject object(&service);
- QVERIFY(object.availableMetaData().isEmpty());
-
- service.metaData.m_data.insert(QtMediaServices::AlbumArtist, artist);
- service.metaData.m_data.insert(QtMediaServices::Title, title);
- service.metaData.m_data.insert(QtMediaServices::Genre, genre);
-
- QCOMPARE(object.metaData(QtMediaServices::AlbumArtist).toString(), artist);
- QCOMPARE(object.metaData(QtMediaServices::Title).toString(), title);
-
- QList<QtMediaServices::MetaData> metaDataKeys = object.availableMetaData();
- QCOMPARE(metaDataKeys.size(), 3);
- QVERIFY(metaDataKeys.contains(QtMediaServices::AlbumArtist));
- QVERIFY(metaDataKeys.contains(QtMediaServices::Title));
- QVERIFY(metaDataKeys.contains(QtMediaServices::Genre));
-}
-
-void tst_QMediaObject::setMetaData_data()
-{
- QTest::addColumn<QString>("title");
-
- QTest::newRow("")
- << QString::fromLatin1("In the Kingdom of the Blind the One eyed are Kings");
-}
-
-void tst_QMediaObject::setMetaData()
-{
- QFETCH(QString, title);
-
- QtTestMetaDataService service;
- service.metaData.populateMetaData();
-
- QtTestMediaObject object(&service);
-
- object.setMetaData(QtMediaServices::Title, title);
- QCOMPARE(object.metaData(QtMediaServices::Title).toString(), title);
- QCOMPARE(service.metaData.m_data.value(QtMediaServices::Title).toString(), title);
-}
-
-void tst_QMediaObject::extendedMetaData()
-{
- QFETCH(QString, artist);
- QFETCH(QString, title);
- QFETCH(QString, genre);
-
- QtTestMetaDataService service;
- QtTestMediaObject object(&service);
- QVERIFY(object.availableExtendedMetaData().isEmpty());
-
- service.metaData.m_extendedData.insert(QLatin1String("Artist"), artist);
- service.metaData.m_extendedData.insert(QLatin1String("Title"), title);
- service.metaData.m_extendedData.insert(QLatin1String("Genre"), genre);
-
- QCOMPARE(object.extendedMetaData(QLatin1String("Artist")).toString(), artist);
- QCOMPARE(object.extendedMetaData(QLatin1String("Title")).toString(), title);
-
- QStringList extendedKeys = object.availableExtendedMetaData();
- QCOMPARE(extendedKeys.size(), 3);
- QVERIFY(extendedKeys.contains(QLatin1String("Artist")));
- QVERIFY(extendedKeys.contains(QLatin1String("Title")));
- QVERIFY(extendedKeys.contains(QLatin1String("Genre")));
-}
-
-void tst_QMediaObject::setExtendedMetaData()
-{
- QtTestMetaDataService service;
- service.metaData.populateMetaData();
-
- QtTestMediaObject object(&service);
-
- QString title(QLatin1String("In the Kingdom of the Blind the One eyed are Kings"));
-
- object.setExtendedMetaData(QLatin1String("Title"), title);
- QCOMPARE(object.extendedMetaData(QLatin1String("Title")).toString(), title);
- QCOMPARE(service.metaData.m_extendedData.value(QLatin1String("Title")).toString(), title);
-}
-
-QTEST_MAIN(tst_QMediaObject)
-
-#include "tst_qmediaobject.moc"
diff --git a/tests/auto/qmediaplayer/qmediaplayer.pro b/tests/auto/qmediaplayer/qmediaplayer.pro
deleted file mode 100644
index f355078..0000000
--- a/tests/auto/qmediaplayer/qmediaplayer.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4)
-
-SOURCES += tst_qmediaplayer.cpp
-
-QT = core mediaservices
-
diff --git a/tests/auto/qmediaplayer/tst_qmediaplayer.cpp b/tests/auto/qmediaplayer/tst_qmediaplayer.cpp
deleted file mode 100644
index 9a597e2..0000000
--- a/tests/auto/qmediaplayer/tst_qmediaplayer.cpp
+++ /dev/null
@@ -1,986 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QtCore/qdebug.h>
-#include <QtCore/qbuffer.h>
-
-#include <QtMediaServices/qmediaplayer.h>
-#include <QtMediaServices/qmediaplayercontrol.h>
-#include <QtMediaServices/qmediaplaylist.h>
-#include <QtMediaServices/qmediaservice.h>
-
-
-
-class AutoConnection
-{
-public:
- AutoConnection(QObject *sender, const char *signal, QObject *receiver, const char *method)
- : sender(sender), signal(signal), receiver(receiver), method(method)
- {
- QObject::connect(sender, signal, receiver, method);
- }
-
- ~AutoConnection()
- {
- QObject::disconnect(sender, signal, receiver, method);
- }
-
-private:
- QObject *sender;
- const char *signal;
- QObject *receiver;
- const char *method;
-};
-
-
-class MockPlayerControl : public QMediaPlayerControl
-{
- friend class MockPlayerService;
-
-public:
- MockPlayerControl():QMediaPlayerControl(0) {}
-
- QMediaPlayer::State state() const { return _state; }
- QMediaPlayer::MediaStatus mediaStatus() const { return _mediaStatus; }
-
- qint64 duration() const { return _duration; }
-
- qint64 position() const { return _position; }
-
- void setPosition(qint64 position) { if (position != _position) emit positionChanged(_position = position); }
-
- int volume() const { return _volume; }
- void setVolume(int volume) { emit volumeChanged(_volume = volume); }
-
- bool isMuted() const { return _muted; }
- void setMuted(bool muted) { if (muted != _muted) emit mutedChanged(_muted = muted); }
-
- int bufferStatus() const { return _bufferStatus; }
-
- bool isAudioAvailable() const { return _audioAvailable; }
- bool isVideoAvailable() const { return _videoAvailable; }
-
- bool isSeekable() const { return _isSeekable; }
- QMediaTimeRange availablePlaybackRanges() const { return QMediaTimeRange(_seekRange.first, _seekRange.second); }
- void setSeekRange(qint64 minimum, qint64 maximum) { _seekRange = qMakePair(minimum, maximum); }
-
- qreal playbackRate() const { return _playbackRate; }
- void setPlaybackRate(qreal rate) { if (rate != _playbackRate) emit playbackRateChanged(_playbackRate = rate); }
-
- QMediaContent media() const { return _media; }
- void setMedia(const QMediaContent &content, QIODevice *stream)
- {
- _stream = stream;
- _media = content;
- if (_state != QMediaPlayer::StoppedState) {
- _mediaStatus = _media.isNull() ? QMediaPlayer::NoMedia : QMediaPlayer::LoadingMedia;
- emit stateChanged(_state = QMediaPlayer::StoppedState);
- emit mediaStatusChanged(_mediaStatus);
- }
- emit mediaChanged(_media = content);
- }
- QIODevice *mediaStream() const { return _stream; }
-
- void play() { if (_isValid && !_media.isNull() && _state != QMediaPlayer::PlayingState) emit stateChanged(_state = QMediaPlayer::PlayingState); }
- void pause() { if (_isValid && !_media.isNull() && _state != QMediaPlayer::PausedState) emit stateChanged(_state = QMediaPlayer::PausedState); }
- void stop() { if (_state != QMediaPlayer::StoppedState) emit stateChanged(_state = QMediaPlayer::StoppedState); }
-
- QMediaPlayer::State _state;
- QMediaPlayer::MediaStatus _mediaStatus;
- QMediaPlayer::Error _error;
- qint64 _duration;
- qint64 _position;
- int _volume;
- bool _muted;
- int _bufferStatus;
- bool _audioAvailable;
- bool _videoAvailable;
- bool _isSeekable;
- QPair<qint64, qint64> _seekRange;
- qreal _playbackRate;
- QMediaContent _media;
- QIODevice *_stream;
- bool _isValid;
- QString _errorString;
-};
-
-
-class MockPlayerService : public QMediaService
-{
- Q_OBJECT
-
-public:
- MockPlayerService():QMediaService(0)
- {
- mockControl = new MockPlayerControl;
- }
-
- ~MockPlayerService()
- {
- delete mockControl;
- }
-
- QMediaControl* control(const char *iid) const
- {
- if (qstrcmp(iid, QMediaPlayerControl_iid) == 0)
- return mockControl;
-
- return 0;
- }
-
- void setState(QMediaPlayer::State state) { emit mockControl->stateChanged(mockControl->_state = state); }
- void setState(QMediaPlayer::State state, QMediaPlayer::MediaStatus status) {
- mockControl->_state = state;
- mockControl->_mediaStatus = status;
- emit mockControl->mediaStatusChanged(status);
- emit mockControl->stateChanged(state);
- }
- void setMediaStatus(QMediaPlayer::MediaStatus status) { emit mockControl->mediaStatusChanged(mockControl->_mediaStatus = status); }
- void setIsValid(bool isValid) { mockControl->_isValid = isValid; }
- void setMedia(QMediaContent media) { mockControl->_media = media; }
- void setDuration(qint64 duration) { mockControl->_duration = duration; }
- void setPosition(qint64 position) { mockControl->_position = position; }
- void setSeekable(bool seekable) { mockControl->_isSeekable = seekable; }
- void setVolume(int volume) { mockControl->_volume = volume; }
- void setMuted(bool muted) { mockControl->_muted = muted; }
- void setVideoAvailable(bool videoAvailable) { mockControl->_videoAvailable = videoAvailable; }
- void setBufferStatus(int bufferStatus) { mockControl->_bufferStatus = bufferStatus; }
- void setPlaybackRate(qreal playbackRate) { mockControl->_playbackRate = playbackRate; }
- void setError(QMediaPlayer::Error error) { mockControl->_error = error; emit mockControl->error(mockControl->_error, mockControl->_errorString); }
- void setErrorString(QString errorString) { mockControl->_errorString = errorString; emit mockControl->error(mockControl->_error, mockControl->_errorString); }
-
- void reset()
- {
- mockControl->_state = QMediaPlayer::StoppedState;
- mockControl->_mediaStatus = QMediaPlayer::UnknownMediaStatus;
- mockControl->_error = QMediaPlayer::NoError;
- mockControl->_duration = 0;
- mockControl->_position = 0;
- mockControl->_volume = 0;
- mockControl->_muted = false;
- mockControl->_bufferStatus = 0;
- mockControl->_videoAvailable = false;
- mockControl->_isSeekable = false;
- mockControl->_playbackRate = 0.0;
- mockControl->_media = QMediaContent();
- mockControl->_stream = 0;
- mockControl->_isValid = false;
- mockControl->_errorString = QString();
- }
-
- MockPlayerControl *mockControl;
-};
-
-class MockProvider : public QMediaServiceProvider
-{
-public:
- MockProvider(MockPlayerService *service):mockService(service) {}
- QMediaService *requestService(const QByteArray &, const QMediaServiceProviderHint &)
- {
- return mockService;
- }
-
- void releaseService(QMediaService *service) { delete service; }
-
- MockPlayerService *mockService;
-};
-
-class tst_QMediaPlayer: public QObject
-{
- Q_OBJECT
-
-public slots:
- void initTestCase_data();
- void initTestCase();
- void cleanupTestCase();
- void init();
- void cleanup();
-
-private slots:
- void testNullService();
- void testValid();
- void testMedia();
- void testDuration();
- void testPosition();
- void testVolume();
- void testMuted();
- void testVideoAvailable();
- void testBufferStatus();
- void testSeekable();
- void testPlaybackRate();
- void testError();
- void testErrorString();
- void testService();
- void testPlay();
- void testPause();
- void testStop();
- void testMediaStatus();
- void testPlaylist();
-
-private:
- MockProvider *mockProvider;
- MockPlayerService *mockService;
- QMediaPlayer *player;
-};
-
-void tst_QMediaPlayer::initTestCase_data()
-{
- QTest::addColumn<bool>("valid");
- QTest::addColumn<QMediaPlayer::State>("state");
- QTest::addColumn<QMediaPlayer::MediaStatus>("status");
- QTest::addColumn<QMediaContent>("mediaContent");
- QTest::addColumn<qint64>("duration");
- QTest::addColumn<qint64>("position");
- QTest::addColumn<bool>("seekable");
- QTest::addColumn<int>("volume");
- QTest::addColumn<bool>("muted");
- QTest::addColumn<bool>("videoAvailable");
- QTest::addColumn<int>("bufferStatus");
- QTest::addColumn<qreal>("playbackRate");
- QTest::addColumn<QMediaPlayer::Error>("error");
- QTest::addColumn<QString>("errorString");
-
- QTest::newRow("invalid") << false << QMediaPlayer::StoppedState << QMediaPlayer::UnknownMediaStatus <<
- QMediaContent() << qint64(0) << qint64(0) << false << 0 << false << false << 0 <<
- qreal(0) << QMediaPlayer::NoError << QString();
- QTest::newRow("valid+null") << true << QMediaPlayer::StoppedState << QMediaPlayer::UnknownMediaStatus <<
- QMediaContent() << qint64(0) << qint64(0) << false << 0 << false << false << 50 <<
- qreal(0) << QMediaPlayer::NoError << QString();
- QTest::newRow("valid+content+stopped") << true << QMediaPlayer::StoppedState << QMediaPlayer::UnknownMediaStatus <<
- QMediaContent(QUrl("file:///some.mp3")) << qint64(0) << qint64(0) << false << 50 << false << false << 0 <<
- qreal(1) << QMediaPlayer::NoError << QString();
- QTest::newRow("valid+content+playing") << true << QMediaPlayer::PlayingState << QMediaPlayer::LoadedMedia <<
- QMediaContent(QUrl("file:///some.mp3")) << qint64(10000) << qint64(10) << true << 50 << true << false << 0 <<
- qreal(1) << QMediaPlayer::NoError << QString();
- QTest::newRow("valid+content+paused") << true << QMediaPlayer::PausedState << QMediaPlayer::LoadedMedia <<
- QMediaContent(QUrl("file:///some.mp3")) << qint64(10000) << qint64(10) << true << 50 << true << false << 0 <<
- qreal(1) << QMediaPlayer::NoError << QString();
- QTest::newRow("valud+streaming") << true << QMediaPlayer::PlayingState << QMediaPlayer::LoadedMedia <<
- QMediaContent(QUrl("http://example.com/stream")) << qint64(10000) << qint64(10000) << false << 50 << false << true << 0 <<
- qreal(1) << QMediaPlayer::NoError << QString();
- QTest::newRow("valid+error") << true << QMediaPlayer::StoppedState << QMediaPlayer::UnknownMediaStatus <<
- QMediaContent(QUrl("http://example.com/stream")) << qint64(0) << qint64(0) << false << 50 << false << false << 0 <<
- qreal(0) << QMediaPlayer::ResourceError << QString("Resource unavailable");
-}
-
-void tst_QMediaPlayer::initTestCase()
-{
- qRegisterMetaType<QMediaContent>();
-
- mockService = new MockPlayerService;
- mockProvider = new MockProvider(mockService);
- player = new QMediaPlayer(0, 0, mockProvider);
-}
-
-void tst_QMediaPlayer::cleanupTestCase()
-{
- delete player;
-}
-
-void tst_QMediaPlayer::init()
-{
- mockService->reset();
-}
-
-void tst_QMediaPlayer::cleanup()
-{
-}
-
-void tst_QMediaPlayer::testNullService()
-{
- MockProvider provider(0);
- QMediaPlayer player(0, 0, &provider);
-
- const QIODevice *nullDevice = 0;
-
- QCOMPARE(player.media(), QMediaContent());
- QCOMPARE(player.mediaStream(), nullDevice);
- QCOMPARE(player.state(), QMediaPlayer::StoppedState);
- QCOMPARE(player.mediaStatus(), QMediaPlayer::UnknownMediaStatus);
- QCOMPARE(player.duration(), qint64(-1));
- QCOMPARE(player.position(), qint64(0));
- QCOMPARE(player.volume(), 0);
- QCOMPARE(player.isMuted(), false);
- QCOMPARE(player.isVideoAvailable(), false);
- QCOMPARE(player.bufferStatus(), 0);
- QCOMPARE(player.isSeekable(), false);
- QCOMPARE(player.playbackRate(), qreal(0));
- QCOMPARE(player.error(), QMediaPlayer::ServiceMissingError);
-
- {
- QFETCH_GLOBAL(QMediaContent, mediaContent);
-
- QSignalSpy spy(&player, SIGNAL(mediaChanged(QMediaContent)));
- QFile file;
-
- player.setMedia(mediaContent, &file);
- QCOMPARE(player.media(), QMediaContent());
- QCOMPARE(player.mediaStream(), nullDevice);
- QCOMPARE(spy.count(), 0);
- } {
- QSignalSpy stateSpy(&player, SIGNAL(stateChanged(QMediaPlayer::State)));
- QSignalSpy statusSpy(&player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)));
-
- player.play();
- QCOMPARE(player.state(), QMediaPlayer::StoppedState);
- QCOMPARE(player.mediaStatus(), QMediaPlayer::UnknownMediaStatus);
- QCOMPARE(stateSpy.count(), 0);
- QCOMPARE(statusSpy.count(), 0);
-
- player.pause();
- QCOMPARE(player.state(), QMediaPlayer::StoppedState);
- QCOMPARE(player.mediaStatus(), QMediaPlayer::UnknownMediaStatus);
- QCOMPARE(stateSpy.count(), 0);
- QCOMPARE(statusSpy.count(), 0);
-
- player.stop();
- QCOMPARE(player.state(), QMediaPlayer::StoppedState);
- QCOMPARE(player.mediaStatus(), QMediaPlayer::UnknownMediaStatus);
- QCOMPARE(stateSpy.count(), 0);
- QCOMPARE(statusSpy.count(), 0);
- } {
- QFETCH_GLOBAL(int, volume);
- QFETCH_GLOBAL(bool, muted);
-
- QSignalSpy volumeSpy(&player, SIGNAL(volumeChanged(int)));
- QSignalSpy mutingSpy(&player, SIGNAL(mutedChanged(bool)));
-
- player.setVolume(volume);
- QCOMPARE(player.volume(), 0);
- QCOMPARE(volumeSpy.count(), 0);
-
- player.setMuted(muted);
- QCOMPARE(player.isMuted(), false);
- QCOMPARE(mutingSpy.count(), 0);
- } {
- QFETCH_GLOBAL(qint64, position);
-
- QSignalSpy spy(&player, SIGNAL(positionChanged(qint64)));
-
- player.setPosition(position);
- QCOMPARE(player.position(), qint64(0));
- QCOMPARE(spy.count(), 0);
- } {
- QFETCH_GLOBAL(qreal, playbackRate);
-
- QSignalSpy spy(&player, SIGNAL(playbackRateChanged(qreal)));
-
- player.setPlaybackRate(playbackRate);
- QCOMPARE(player.playbackRate(), qreal(0));
- QCOMPARE(spy.count(), 0);
- } {
- QMediaPlaylist playlist;
- playlist.setMediaObject(&player);
-
- QSignalSpy mediaSpy(&player, SIGNAL(mediaChanged(QMediaContent)));
- QSignalSpy statusSpy(&player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)));
-
- playlist.addMedia(QUrl("http://example.com/stream"));
- playlist.addMedia(QUrl("file:///some.mp3"));
-
- playlist.setCurrentIndex(0);
- QCOMPARE(playlist.currentIndex(), 0);
- QCOMPARE(player.media(), QMediaContent());
- QCOMPARE(mediaSpy.count(), 0);
- QCOMPARE(statusSpy.count(), 0);
-
- playlist.next();
- QCOMPARE(playlist.currentIndex(), 1);
- QCOMPARE(player.media(), QMediaContent());
- QCOMPARE(mediaSpy.count(), 0);
- QCOMPARE(statusSpy.count(), 0);
- }
-}
-
-void tst_QMediaPlayer::testValid()
-{
- /*
- QFETCH_GLOBAL(bool, valid);
-
- mockService->setIsValid(valid);
- QCOMPARE(player->isValid(), valid);
- */
-}
-
-void tst_QMediaPlayer::testMedia()
-{
- QFETCH_GLOBAL(QMediaContent, mediaContent);
-
- mockService->setMedia(mediaContent);
- QCOMPARE(player->media(), mediaContent);
-
- QBuffer stream;
- player->setMedia(mediaContent, &stream);
- QCOMPARE(player->media(), mediaContent);
- QCOMPARE((QBuffer*)player->mediaStream(), &stream);
-}
-
-void tst_QMediaPlayer::testDuration()
-{
- QFETCH_GLOBAL(qint64, duration);
-
- mockService->setDuration(duration);
- QVERIFY(player->duration() == duration);
-}
-
-void tst_QMediaPlayer::testPosition()
-{
- QFETCH_GLOBAL(bool, valid);
- QFETCH_GLOBAL(bool, seekable);
- QFETCH_GLOBAL(qint64, position);
- QFETCH_GLOBAL(qint64, duration);
-
- mockService->setIsValid(valid);
- mockService->setSeekable(seekable);
- mockService->setPosition(position);
- mockService->setDuration(duration);
- QVERIFY(player->isSeekable() == seekable);
- QVERIFY(player->position() == position);
- QVERIFY(player->duration() == duration);
-
- if (seekable) {
- { QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));
- player->setPosition(position);
- QCOMPARE(player->position(), position);
- QCOMPARE(spy.count(), 0); }
-
- mockService->setPosition(position);
- { QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));
- player->setPosition(0);
- QCOMPARE(player->position(), qint64(0));
- QCOMPARE(spy.count(), position == 0 ? 0 : 1); }
-
- mockService->setPosition(position);
- { QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));
- player->setPosition(duration);
- QCOMPARE(player->position(), duration);
- QCOMPARE(spy.count(), position == duration ? 0 : 1); }
-
- mockService->setPosition(position);
- { QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));
- player->setPosition(-1);
- QCOMPARE(player->position(), qint64(0));
- QCOMPARE(spy.count(), position == 0 ? 0 : 1); }
-
- mockService->setPosition(position);
- { QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));
- player->setPosition(duration + 1);
- QCOMPARE(player->position(), duration);
- QCOMPARE(spy.count(), position == duration ? 0 : 1); }
- }
- else {
- QSignalSpy spy(player, SIGNAL(positionChanged(qint64)));
- player->setPosition(position);
-
- QCOMPARE(player->position(), position);
- QCOMPARE(spy.count(), 0);
- }
-}
-
-void tst_QMediaPlayer::testVolume()
-{
- QFETCH_GLOBAL(bool, valid);
- QFETCH_GLOBAL(int, volume);
-
- mockService->setVolume(volume);
- QVERIFY(player->volume() == volume);
-
- if (valid) {
- { QSignalSpy spy(player, SIGNAL(volumeChanged(int)));
- player->setVolume(10);
- QCOMPARE(player->volume(), 10);
- QCOMPARE(spy.count(), 1); }
-
- { QSignalSpy spy(player, SIGNAL(volumeChanged(int)));
- player->setVolume(-1000);
- QCOMPARE(player->volume(), 0);
- QCOMPARE(spy.count(), 1); }
-
- { QSignalSpy spy(player, SIGNAL(volumeChanged(int)));
- player->setVolume(100);
- QCOMPARE(player->volume(), 100);
- QCOMPARE(spy.count(), 1); }
-
- { QSignalSpy spy(player, SIGNAL(volumeChanged(int)));
- player->setVolume(1000);
- QCOMPARE(player->volume(), 100);
- QCOMPARE(spy.count(), 0); }
- }
-}
-
-void tst_QMediaPlayer::testMuted()
-{
- QFETCH_GLOBAL(bool, valid);
- QFETCH_GLOBAL(bool, muted);
- QFETCH_GLOBAL(int, volume);
-
- if (valid) {
- mockService->setMuted(muted);
- mockService->setVolume(volume);
- QVERIFY(player->isMuted() == muted);
-
- QSignalSpy spy(player, SIGNAL(mutedChanged(bool)));
- player->setMuted(!muted);
- QCOMPARE(player->isMuted(), !muted);
- QCOMPARE(player->volume(), volume);
- QCOMPARE(spy.count(), 1);
- }
-}
-
-void tst_QMediaPlayer::testVideoAvailable()
-{
- QFETCH_GLOBAL(bool, videoAvailable);
-
- mockService->setVideoAvailable(videoAvailable);
- QVERIFY(player->isVideoAvailable() == videoAvailable);
-}
-
-void tst_QMediaPlayer::testBufferStatus()
-{
- QFETCH_GLOBAL(int, bufferStatus);
-
- mockService->setBufferStatus(bufferStatus);
- QVERIFY(player->bufferStatus() == bufferStatus);
-}
-
-void tst_QMediaPlayer::testSeekable()
-{
- QFETCH_GLOBAL(bool, seekable);
-
- mockService->setSeekable(seekable);
- QVERIFY(player->isSeekable() == seekable);
-}
-
-void tst_QMediaPlayer::testPlaybackRate()
-{
- QFETCH_GLOBAL(bool, valid);
- QFETCH_GLOBAL(qreal, playbackRate);
-
- if (valid) {
- mockService->setPlaybackRate(playbackRate);
- QVERIFY(player->playbackRate() == playbackRate);
-
- QSignalSpy spy(player, SIGNAL(playbackRateChanged(qreal)));
- player->setPlaybackRate(playbackRate + 0.5f);
- QCOMPARE(player->playbackRate(), playbackRate + 0.5f);
- QCOMPARE(spy.count(), 1);
- }
-}
-
-void tst_QMediaPlayer::testError()
-{
- QFETCH_GLOBAL(QMediaPlayer::Error, error);
-
- mockService->setError(error);
- QVERIFY(player->error() == error);
-}
-
-void tst_QMediaPlayer::testErrorString()
-{
- QFETCH_GLOBAL(QString, errorString);
-
- mockService->setErrorString(errorString);
- QVERIFY(player->errorString() == errorString);
-}
-
-void tst_QMediaPlayer::testService()
-{
- /*
- QFETCH_GLOBAL(bool, valid);
-
- mockService->setIsValid(valid);
-
- if (valid)
- QVERIFY(player->service() != 0);
- else
- QVERIFY(player->service() == 0);
- */
-}
-
-void tst_QMediaPlayer::testPlay()
-{
- QFETCH_GLOBAL(bool, valid);
- QFETCH_GLOBAL(QMediaContent, mediaContent);
- QFETCH_GLOBAL(QMediaPlayer::State, state);
-
- mockService->setIsValid(valid);
- mockService->setState(state);
- mockService->setMedia(mediaContent);
- QVERIFY(player->state() == state);
- QVERIFY(player->media() == mediaContent);
-
- QSignalSpy spy(player, SIGNAL(stateChanged(QMediaPlayer::State)));
-
- player->play();
-
- if (!valid || mediaContent.isNull()) {
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
- QCOMPARE(spy.count(), 0);
- }
- else {
- QCOMPARE(player->state(), QMediaPlayer::PlayingState);
- QCOMPARE(spy.count(), state == QMediaPlayer::PlayingState ? 0 : 1);
- }
-}
-
-void tst_QMediaPlayer::testPause()
-{
- QFETCH_GLOBAL(bool, valid);
- QFETCH_GLOBAL(QMediaContent, mediaContent);
- QFETCH_GLOBAL(QMediaPlayer::State, state);
-
- mockService->setIsValid(valid);
- mockService->setState(state);
- mockService->setMedia(mediaContent);
- QVERIFY(player->state() == state);
- QVERIFY(player->media() == mediaContent);
-
- QSignalSpy spy(player, SIGNAL(stateChanged(QMediaPlayer::State)));
-
- player->pause();
-
- if (!valid || mediaContent.isNull()) {
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
- QCOMPARE(spy.count(), 0);
- }
- else {
- QCOMPARE(player->state(), QMediaPlayer::PausedState);
- QCOMPARE(spy.count(), state == QMediaPlayer::PausedState ? 0 : 1);
- }
-}
-
-void tst_QMediaPlayer::testStop()
-{
- QFETCH_GLOBAL(QMediaContent, mediaContent);
- QFETCH_GLOBAL(QMediaPlayer::State, state);
-
- mockService->setState(state);
- mockService->setMedia(mediaContent);
- QVERIFY(player->state() == state);
- QVERIFY(player->media() == mediaContent);
-
- QSignalSpy spy(player, SIGNAL(stateChanged(QMediaPlayer::State)));
-
- player->stop();
-
- if (mediaContent.isNull() || state == QMediaPlayer::StoppedState) {
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
- QCOMPARE(spy.count(), 0);
- }
- else {
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
- QCOMPARE(spy.count(), 1);
- }
-}
-
-void tst_QMediaPlayer::testMediaStatus()
-{
- QFETCH_GLOBAL(int, bufferStatus);
- int bufferSignals = 0;
-
- player->setNotifyInterval(10);
-
- mockService->setMediaStatus(QMediaPlayer::NoMedia);
- mockService->setBufferStatus(bufferStatus);
-
- AutoConnection connection(
- player, SIGNAL(bufferStatusChanged(int)),
- &QTestEventLoop::instance(), SLOT(exitLoop()));
-
- QSignalSpy statusSpy(player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)));
- QSignalSpy bufferSpy(player, SIGNAL(bufferStatusChanged(int)));
-
- QCOMPARE(player->mediaStatus(), QMediaPlayer::NoMedia);
-
- mockService->setMediaStatus(QMediaPlayer::LoadingMedia);
- QCOMPARE(player->mediaStatus(), QMediaPlayer::LoadingMedia);
- QCOMPARE(statusSpy.count(), 1);
-
- QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)),
- QMediaPlayer::LoadingMedia);
-
- mockService->setMediaStatus(QMediaPlayer::LoadedMedia);
- QCOMPARE(player->mediaStatus(), QMediaPlayer::LoadedMedia);
- QCOMPARE(statusSpy.count(), 2);
-
- QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)),
- QMediaPlayer::LoadedMedia);
-
- // Verify the bufferStatusChanged() signal isn't being emitted.
- QTestEventLoop::instance().enterLoop(1);
- QCOMPARE(bufferSpy.count(), 0);
-
- mockService->setMediaStatus(QMediaPlayer::StalledMedia);
- QCOMPARE(player->mediaStatus(), QMediaPlayer::StalledMedia);
- QCOMPARE(statusSpy.count(), 3);
-
- QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)),
- QMediaPlayer::StalledMedia);
-
- // Verify the bufferStatusChanged() signal is being emitted.
- QTestEventLoop::instance().enterLoop(1);
- QVERIFY(bufferSpy.count() > bufferSignals);
- QCOMPARE(bufferSpy.last().value(0).toInt(), bufferStatus);
- bufferSignals = bufferSpy.count();
-
- mockService->setMediaStatus(QMediaPlayer::BufferingMedia);
- QCOMPARE(player->mediaStatus(), QMediaPlayer::BufferingMedia);
- QCOMPARE(statusSpy.count(), 4);
-
- QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)),
- QMediaPlayer::BufferingMedia);
-
- // Verify the bufferStatusChanged() signal is being emitted.
- QTestEventLoop::instance().enterLoop(1);
- QVERIFY(bufferSpy.count() > bufferSignals);
- QCOMPARE(bufferSpy.last().value(0).toInt(), bufferStatus);
- bufferSignals = bufferSpy.count();
-
- mockService->setMediaStatus(QMediaPlayer::BufferedMedia);
- QCOMPARE(player->mediaStatus(), QMediaPlayer::BufferedMedia);
- QCOMPARE(statusSpy.count(), 5);
-
- QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)),
- QMediaPlayer::BufferedMedia);
-
- // Verify the bufferStatusChanged() signal isn't being emitted.
- QTestEventLoop::instance().enterLoop(1);
- QCOMPARE(bufferSpy.count(), bufferSignals);
-
- mockService->setMediaStatus(QMediaPlayer::EndOfMedia);
- QCOMPARE(player->mediaStatus(), QMediaPlayer::EndOfMedia);
- QCOMPARE(statusSpy.count(), 6);
-
- QCOMPARE(qvariant_cast<QMediaPlayer::MediaStatus>(statusSpy.last().value(0)),
- QMediaPlayer::EndOfMedia);
-}
-
-void tst_QMediaPlayer::testPlaylist()
-{
- QMediaContent content0(QUrl(QLatin1String("test://audio/song1.mp3")));
- QMediaContent content1(QUrl(QLatin1String("test://audio/song2.mp3")));
- QMediaContent content2(QUrl(QLatin1String("test://video/movie1.mp4")));
- QMediaContent content3(QUrl(QLatin1String("test://video/movie2.mp4")));
- QMediaContent content4(QUrl(QLatin1String("test://image/photo.jpg")));
-
- mockService->setIsValid(true);
- mockService->setState(QMediaPlayer::StoppedState, QMediaPlayer::NoMedia);
-
- QMediaPlaylist *playlist = new QMediaPlaylist;
- playlist->setMediaObject(player);
-
- QSignalSpy stateSpy(player, SIGNAL(stateChanged(QMediaPlayer::State)));
- QSignalSpy mediaSpy(player, SIGNAL(mediaChanged(QMediaContent)));
-
- // Test the player does nothing with an empty playlist attached.
- player->play();
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
- QCOMPARE(player->media(), QMediaContent());
- QCOMPARE(stateSpy.count(), 0);
- QCOMPARE(mediaSpy.count(), 0);
-
- playlist->addMedia(content0);
- playlist->addMedia(content1);
- playlist->addMedia(content2);
- playlist->addMedia(content3);
-
- // Test changing the playlist position, changes the current media, but not the playing state.
- playlist->setCurrentIndex(1);
- QCOMPARE(player->media(), content1);
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
- QCOMPARE(stateSpy.count(), 0);
- QCOMPARE(mediaSpy.count(), 1);
-
- // Test playing starts with the current media.
- player->play();
- QCOMPARE(player->media(), content1);
- QCOMPARE(player->state(), QMediaPlayer::PlayingState);
- QCOMPARE(stateSpy.count(), 1);
- QCOMPARE(mediaSpy.count(), 1);
-
- // Test pausing doesn't change the current media.
- player->pause();
- QCOMPARE(player->media(), content1);
- QCOMPARE(player->state(), QMediaPlayer::PausedState);
- QCOMPARE(stateSpy.count(), 2);
- QCOMPARE(mediaSpy.count(), 1);
-
- // Test stopping doesn't change the current media.
- player->stop();
- QCOMPARE(player->media(), content1);
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
- QCOMPARE(stateSpy.count(), 3);
- QCOMPARE(mediaSpy.count(), 1);
-
- // Test when the player service reaches the end of the current media, the player moves onto
- // the next item without stopping.
- player->play();
- QCOMPARE(player->media(), content1);
- QCOMPARE(player->state(), QMediaPlayer::PlayingState);
- QCOMPARE(stateSpy.count(), 4);
- QCOMPARE(mediaSpy.count(), 1);
-
- mockService->setState(QMediaPlayer::StoppedState, QMediaPlayer::EndOfMedia);
- QCOMPARE(player->media(), content2);
- QCOMPARE(player->state(), QMediaPlayer::PlayingState);
- QCOMPARE(stateSpy.count(), 4);
- QCOMPARE(mediaSpy.count(), 2);
-
- // Test skipping the current media doesn't change the state.
- playlist->next();
- QCOMPARE(player->media(), content3);
- QCOMPARE(player->state(), QMediaPlayer::PlayingState);
- QCOMPARE(stateSpy.count(), 4);
- QCOMPARE(mediaSpy.count(), 3);
-
- // Test changing the current media while paused doesn't change the state.
- player->pause();
- mockService->setMediaStatus(QMediaPlayer::BufferedMedia);
- QCOMPARE(player->media(), content3);
- QCOMPARE(player->state(), QMediaPlayer::PausedState);
- QCOMPARE(stateSpy.count(), 5);
- QCOMPARE(mediaSpy.count(), 3);
-
- playlist->previous();
- QCOMPARE(player->media(), content2);
- QCOMPARE(player->state(), QMediaPlayer::PausedState);
- QCOMPARE(stateSpy.count(), 5);
- QCOMPARE(mediaSpy.count(), 4);
-
- // Test changing the current media while stopped doesn't change the state.
- player->stop();
- mockService->setMediaStatus(QMediaPlayer::LoadedMedia);
- QCOMPARE(player->media(), content2);
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
- QCOMPARE(stateSpy.count(), 6);
- QCOMPARE(mediaSpy.count(), 4);
-
- playlist->next();
- QCOMPARE(player->media(), content3);
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
- QCOMPARE(stateSpy.count(), 6);
- QCOMPARE(mediaSpy.count(), 5);
-
- // Test the player is stopped and the current media cleared when it reaches the end of the last
- // item in the playlist.
- player->play();
- QCOMPARE(player->media(), content3);
- QCOMPARE(player->state(), QMediaPlayer::PlayingState);
- QCOMPARE(stateSpy.count(), 7);
- QCOMPARE(mediaSpy.count(), 5);
-
- // Double up the signals to ensure some noise doesn't destabalize things.
- mockService->setState(QMediaPlayer::StoppedState, QMediaPlayer::EndOfMedia);
- mockService->setState(QMediaPlayer::StoppedState, QMediaPlayer::EndOfMedia);
- QCOMPARE(player->media(), QMediaContent());
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
- QCOMPARE(stateSpy.count(), 8);
- QCOMPARE(mediaSpy.count(), 6);
-
- // Test starts playing from the start of the playlist if there is no current media selected.
- player->play();
- QCOMPARE(player->media(), content0);
- QCOMPARE(player->state(), QMediaPlayer::PlayingState);
- QCOMPARE(stateSpy.count(), 9);
- QCOMPARE(mediaSpy.count(), 7);
-
- // Test deleting the playlist stops the player and clears the media it set.
- delete playlist;
- QCOMPARE(player->media(), QMediaContent());
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
- QCOMPARE(stateSpy.count(), 10);
- QCOMPARE(mediaSpy.count(), 8);
-
- // Test the player works as normal with the playlist removed.
- player->play();
- QCOMPARE(player->media(), QMediaContent());
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
- QCOMPARE(stateSpy.count(), 10);
- QCOMPARE(mediaSpy.count(), 8);
-
- player->setMedia(content1);
- player->play();
-
- QCOMPARE(player->media(), content1);
- QCOMPARE(player->state(), QMediaPlayer::PlayingState);
- QCOMPARE(stateSpy.count(), 11);
- QCOMPARE(mediaSpy.count(), 9);
-
- // Test the player can bind to playlist again
- playlist = new QMediaPlaylist;
- playlist->setMediaObject(player);
- QCOMPARE(playlist->mediaObject(), qobject_cast<QMediaObject*>(player));
-
- QCOMPARE(player->media(), QMediaContent());
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
-
- playlist->addMedia(content0);
- playlist->addMedia(content1);
- playlist->addMedia(content2);
- playlist->addMedia(content3);
-
- playlist->setCurrentIndex(1);
- QCOMPARE(player->media(), content1);
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
-
- // Test attaching the new playlist,
- // player should detach the current one
- QMediaPlaylist *playlist2 = new QMediaPlaylist;
- playlist2->addMedia(content1);
- playlist2->addMedia(content2);
- playlist2->addMedia(content3);
- playlist2->setCurrentIndex(2);
-
- player->play();
- playlist2->setMediaObject(player);
- QCOMPARE(playlist2->mediaObject(), qobject_cast<QMediaObject*>(player));
- QVERIFY(playlist->mediaObject() == 0);
- QCOMPARE(player->media(), playlist2->currentMedia());
- QCOMPARE(player->state(), QMediaPlayer::StoppedState);
-
- playlist2->setCurrentIndex(1);
- QCOMPARE(player->media(), playlist2->currentMedia());
-}
-
-QTEST_MAIN(tst_QMediaPlayer)
-
-#include "tst_qmediaplayer.moc"
diff --git a/tests/auto/qmediaplaylist/qmediaplaylist.pro b/tests/auto/qmediaplaylist/qmediaplaylist.pro
deleted file mode 100644
index 809473b..0000000
--- a/tests/auto/qmediaplaylist/qmediaplaylist.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4)
-
-SOURCES = tst_qmediaplaylist.cpp
-
-QT = core mediaservices
-
diff --git a/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp b/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp
deleted file mode 100644
index 1037f37..0000000
--- a/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp
+++ /dev/null
@@ -1,593 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QDebug>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qmediaplaylist.h>
-#include <QtMediaServices/qmediaplaylistcontrol.h>
-#include <QtMediaServices/qmediaplaylistnavigator.h>
-#include <QtMediaServices/private/qmediapluginloader_p.h>
-
-
-class MockReadOnlyPlaylistProvider : public QMediaPlaylistProvider
-{
- Q_OBJECT
-public:
- MockReadOnlyPlaylistProvider(QObject *parent)
- :QMediaPlaylistProvider(parent)
- {
- m_items.append(QMediaContent(QUrl(QLatin1String("file:///1"))));
- m_items.append(QMediaContent(QUrl(QLatin1String("file:///2"))));
- m_items.append(QMediaContent(QUrl(QLatin1String("file:///3"))));
- }
-
- int mediaCount() const { return m_items.size(); }
- QMediaContent media(int index) const
- {
- return index >=0 && index < mediaCount() ? m_items.at(index) : QMediaContent();
- }
-
-private:
- QList<QMediaContent> m_items;
-};
-
-class MockPlaylistControl : public QMediaPlaylistControl
-{
- Q_OBJECT
-public:
- MockPlaylistControl(QObject *parent) : QMediaPlaylistControl(parent)
- {
- m_navigator = new QMediaPlaylistNavigator(new MockReadOnlyPlaylistProvider(this), this);
- }
-
- ~MockPlaylistControl()
- {
- }
-
- QMediaPlaylistProvider* playlistProvider() const { return m_navigator->playlist(); }
- bool setPlaylistProvider(QMediaPlaylistProvider *playlist) { m_navigator->setPlaylist(playlist); return true; }
-
- int currentIndex() const { return m_navigator->currentIndex(); }
- void setCurrentIndex(int position) { m_navigator->jump(position); }
- int nextIndex(int steps) const { return m_navigator->nextIndex(steps); }
- int previousIndex(int steps) const { return m_navigator->previousIndex(steps); }
-
- void next() { m_navigator->next(); }
- void previous() { m_navigator->previous(); }
-
- QMediaPlaylist::PlaybackMode playbackMode() const { return m_navigator->playbackMode(); }
- void setPlaybackMode(QMediaPlaylist::PlaybackMode mode) { m_navigator->setPlaybackMode(mode); }
-
-private:
- QMediaPlaylistNavigator *m_navigator;
-};
-
-class MockPlaylistService : public QMediaService
-{
- Q_OBJECT
-
-public:
- MockPlaylistService():QMediaService(0)
- {
- mockControl = new MockPlaylistControl(this);
- }
-
- ~MockPlaylistService()
- {
- }
-
- QMediaControl* control(const char *iid) const
- {
- if (qstrcmp(iid, QMediaPlaylistControl_iid) == 0)
- return mockControl;
- return 0;
- }
-
- MockPlaylistControl *mockControl;
-};
-
-class MockReadOnlyPlaylistObject : public QMediaObject
-{
- Q_OBJECT
-public:
- MockReadOnlyPlaylistObject(QObject *parent = 0)
- :QMediaObject(parent, new MockPlaylistService)
- {
- }
-};
-
-
-class tst_QMediaPlaylist : public QObject
-{
- Q_OBJECT
-public slots:
- void init();
- void cleanup();
- void initTestCase();
-
-private slots:
- void construction();
- void append();
- void insert();
- void clear();
- void removeMedia();
- void currentItem();
- void saveAndLoad();
- void playbackMode();
- void playbackMode_data();
- void shuffle();
- void readOnlyPlaylist();
- void setMediaObject();
-
-private:
- QMediaContent content1;
- QMediaContent content2;
- QMediaContent content3;
-};
-
-void tst_QMediaPlaylist::init()
-{
-}
-
-void tst_QMediaPlaylist::initTestCase()
-{
- content1 = QMediaContent(QUrl(QLatin1String("file:///1")));
- content2 = QMediaContent(QUrl(QLatin1String("file:///2")));
- content3 = QMediaContent(QUrl(QLatin1String("file:///3")));
-}
-
-void tst_QMediaPlaylist::cleanup()
-{
-}
-
-void tst_QMediaPlaylist::construction()
-{
- QMediaPlaylist playlist;
- QCOMPARE(playlist.mediaCount(), 0);
- QVERIFY(playlist.isEmpty());
-}
-
-void tst_QMediaPlaylist::append()
-{
- QMediaPlaylist playlist;
- QVERIFY(!playlist.isReadOnly());
-
- playlist.addMedia(content1);
- QCOMPARE(playlist.mediaCount(), 1);
- QCOMPARE(playlist.media(0), content1);
-
- QSignalSpy aboutToBeInsertedSignalSpy(&playlist, SIGNAL(mediaAboutToBeInserted(int,int)));
- QSignalSpy insertedSignalSpy(&playlist, SIGNAL(mediaInserted(int,int)));
- playlist.addMedia(content2);
- QCOMPARE(playlist.mediaCount(), 2);
- QCOMPARE(playlist.media(1), content2);
-
- QCOMPARE(aboutToBeInsertedSignalSpy.count(), 1);
- QCOMPARE(aboutToBeInsertedSignalSpy.first()[0].toInt(), 1);
- QCOMPARE(aboutToBeInsertedSignalSpy.first()[1].toInt(), 1);
-
- QCOMPARE(insertedSignalSpy.count(), 1);
- QCOMPARE(insertedSignalSpy.first()[0].toInt(), 1);
- QCOMPARE(insertedSignalSpy.first()[1].toInt(), 1);
-
- aboutToBeInsertedSignalSpy.clear();
- insertedSignalSpy.clear();
-
- QMediaContent content4(QUrl(QLatin1String("file:///4")));
- QMediaContent content5(QUrl(QLatin1String("file:///5")));
- playlist.addMedia(QList<QMediaContent>() << content3 << content4 << content5);
- QCOMPARE(playlist.mediaCount(), 5);
- QCOMPARE(playlist.media(2), content3);
- QCOMPARE(playlist.media(3), content4);
- QCOMPARE(playlist.media(4), content5);
-
- QCOMPARE(aboutToBeInsertedSignalSpy.count(), 1);
- QCOMPARE(aboutToBeInsertedSignalSpy[0][0].toInt(), 2);
- QCOMPARE(aboutToBeInsertedSignalSpy[0][1].toInt(), 4);
-
- QCOMPARE(insertedSignalSpy.count(), 1);
- QCOMPARE(insertedSignalSpy[0][0].toInt(), 2);
- QCOMPARE(insertedSignalSpy[0][1].toInt(), 4);
-
- aboutToBeInsertedSignalSpy.clear();
- insertedSignalSpy.clear();
-
- playlist.addMedia(QList<QMediaContent>());
- QCOMPARE(aboutToBeInsertedSignalSpy.count(), 0);
- QCOMPARE(insertedSignalSpy.count(), 0);
-}
-
-void tst_QMediaPlaylist::insert()
-{
- QMediaPlaylist playlist;
- QVERIFY(!playlist.isReadOnly());
-
- playlist.addMedia(content1);
- QCOMPARE(playlist.mediaCount(), 1);
- QCOMPARE(playlist.media(0), content1);
-
- playlist.addMedia(content2);
- QCOMPARE(playlist.mediaCount(), 2);
- QCOMPARE(playlist.media(1), content2);
-
- QSignalSpy aboutToBeInsertedSignalSpy(&playlist, SIGNAL(mediaAboutToBeInserted(int,int)));
- QSignalSpy insertedSignalSpy(&playlist, SIGNAL(mediaInserted(int,int)));
-
- playlist.insertMedia(1, content3);
- QCOMPARE(playlist.mediaCount(), 3);
- QCOMPARE(playlist.media(0), content1);
- QCOMPARE(playlist.media(1), content3);
- QCOMPARE(playlist.media(2), content2);
-
- QCOMPARE(aboutToBeInsertedSignalSpy.count(), 1);
- QCOMPARE(aboutToBeInsertedSignalSpy.first()[0].toInt(), 1);
- QCOMPARE(aboutToBeInsertedSignalSpy.first()[1].toInt(), 1);
-
- QCOMPARE(insertedSignalSpy.count(), 1);
- QCOMPARE(insertedSignalSpy.first()[0].toInt(), 1);
- QCOMPARE(insertedSignalSpy.first()[1].toInt(), 1);
-
- aboutToBeInsertedSignalSpy.clear();
- insertedSignalSpy.clear();
-
- QMediaContent content4(QUrl(QLatin1String("file:///4")));
- QMediaContent content5(QUrl(QLatin1String("file:///5")));
- playlist.insertMedia(1, QList<QMediaContent>() << content4 << content5);
-
- QCOMPARE(playlist.media(0), content1);
- QCOMPARE(playlist.media(1), content4);
- QCOMPARE(playlist.media(2), content5);
- QCOMPARE(playlist.media(3), content3);
- QCOMPARE(playlist.media(4), content2);
- QCOMPARE(aboutToBeInsertedSignalSpy.count(), 1);
- QCOMPARE(aboutToBeInsertedSignalSpy[0][0].toInt(), 1);
- QCOMPARE(aboutToBeInsertedSignalSpy[0][1].toInt(), 2);
-
- QCOMPARE(insertedSignalSpy.count(), 1);
- QCOMPARE(insertedSignalSpy[0][0].toInt(), 1);
- QCOMPARE(insertedSignalSpy[0][1].toInt(), 2);
-
- aboutToBeInsertedSignalSpy.clear();
- insertedSignalSpy.clear();
-
- playlist.insertMedia(1, QList<QMediaContent>());
- QCOMPARE(aboutToBeInsertedSignalSpy.count(), 0);
- QCOMPARE(insertedSignalSpy.count(), 0);
-}
-
-
-void tst_QMediaPlaylist::currentItem()
-{
- QMediaPlaylist playlist;
- playlist.addMedia(content1);
- playlist.addMedia(content2);
-
- QCOMPARE(playlist.currentIndex(), -1);
- QCOMPARE(playlist.currentMedia(), QMediaContent());
-
- QCOMPARE(playlist.nextIndex(), 0);
- QCOMPARE(playlist.nextIndex(2), 1);
- QCOMPARE(playlist.previousIndex(), 1);
- QCOMPARE(playlist.previousIndex(2), 0);
-
- playlist.setCurrentIndex(0);
- QCOMPARE(playlist.currentIndex(), 0);
- QCOMPARE(playlist.currentMedia(), content1);
-
- QCOMPARE(playlist.nextIndex(), 1);
- QCOMPARE(playlist.nextIndex(2), -1);
- QCOMPARE(playlist.previousIndex(), -1);
- QCOMPARE(playlist.previousIndex(2), -1);
-
- playlist.setCurrentIndex(1);
- QCOMPARE(playlist.currentIndex(), 1);
- QCOMPARE(playlist.currentMedia(), content2);
-
- QCOMPARE(playlist.nextIndex(), -1);
- QCOMPARE(playlist.nextIndex(2), -1);
- QCOMPARE(playlist.previousIndex(), 0);
- QCOMPARE(playlist.previousIndex(2), -1);
-
- QTest::ignoreMessage(QtWarningMsg, "QMediaPlaylistNavigator: Jump outside playlist range ");
- playlist.setCurrentIndex(2);
-
- QCOMPARE(playlist.currentIndex(), -1);
- QCOMPARE(playlist.currentMedia(), QMediaContent());
-}
-
-void tst_QMediaPlaylist::clear()
-{
- QMediaPlaylist playlist;
- playlist.addMedia(content1);
- playlist.addMedia(content2);
-
- playlist.clear();
- QVERIFY(playlist.isEmpty());
- QCOMPARE(playlist.mediaCount(), 0);
-}
-
-void tst_QMediaPlaylist::removeMedia()
-{
- QMediaPlaylist playlist;
- playlist.addMedia(content1);
- playlist.addMedia(content2);
- playlist.addMedia(content3);
-
- QSignalSpy aboutToBeRemovedSignalSpy(&playlist, SIGNAL(mediaAboutToBeRemoved(int,int)));
- QSignalSpy removedSignalSpy(&playlist, SIGNAL(mediaRemoved(int,int)));
- playlist.removeMedia(1);
- QCOMPARE(playlist.mediaCount(), 2);
- QCOMPARE(playlist.media(1), content3);
-
- QCOMPARE(aboutToBeRemovedSignalSpy.count(), 1);
- QCOMPARE(aboutToBeRemovedSignalSpy.first()[0].toInt(), 1);
- QCOMPARE(aboutToBeRemovedSignalSpy.first()[1].toInt(), 1);
-
- QCOMPARE(removedSignalSpy.count(), 1);
- QCOMPARE(removedSignalSpy.first()[0].toInt(), 1);
- QCOMPARE(removedSignalSpy.first()[1].toInt(), 1);
-
- aboutToBeRemovedSignalSpy.clear();
- removedSignalSpy.clear();
-
- playlist.removeMedia(0,1);
- QVERIFY(playlist.isEmpty());
-
- QCOMPARE(aboutToBeRemovedSignalSpy.count(), 1);
- QCOMPARE(aboutToBeRemovedSignalSpy.first()[0].toInt(), 0);
- QCOMPARE(aboutToBeRemovedSignalSpy.first()[1].toInt(), 1);
-
- QCOMPARE(removedSignalSpy.count(), 1);
- QCOMPARE(removedSignalSpy.first()[0].toInt(), 0);
- QCOMPARE(removedSignalSpy.first()[1].toInt(), 1);
-
-
- playlist.addMedia(content1);
- playlist.addMedia(content2);
- playlist.addMedia(content3);
-
- playlist.removeMedia(0,1);
- QCOMPARE(playlist.mediaCount(), 1);
- QCOMPARE(playlist.media(0), content3);
-}
-
-void tst_QMediaPlaylist::saveAndLoad()
-{
- QMediaPlaylist playlist;
- playlist.addMedia(content1);
- playlist.addMedia(content2);
- playlist.addMedia(content3);
-
- QCOMPARE(playlist.error(), QMediaPlaylist::NoError);
- QVERIFY(playlist.errorString().isEmpty());
-
- QBuffer buffer;
- buffer.open(QBuffer::ReadWrite);
-
- bool res = playlist.save(&buffer, "unsupported_format");
- QVERIFY(!res);
- QVERIFY(playlist.error() != QMediaPlaylist::NoError);
- QVERIFY(!playlist.errorString().isEmpty());
-
- QSignalSpy errorSignal(&playlist, SIGNAL(loadFailed()));
- playlist.load(&buffer, "unsupported_format");
- QCOMPARE(errorSignal.size(), 1);
- QVERIFY(playlist.error() != QMediaPlaylist::NoError);
- QVERIFY(!playlist.errorString().isEmpty());
-
- res = playlist.save(QUrl(QLatin1String("tmp.unsupported_format")), "unsupported_format");
- QVERIFY(!res);
- QVERIFY(playlist.error() != QMediaPlaylist::NoError);
- QVERIFY(!playlist.errorString().isEmpty());
-
- errorSignal.clear();
- playlist.load(QUrl(QLatin1String("tmp.unsupported_format")), "unsupported_format");
- QCOMPARE(errorSignal.size(), 1);
- QVERIFY(playlist.error() != QMediaPlaylist::NoError);
- QVERIFY(!playlist.errorString().isEmpty());
-}
-
-void tst_QMediaPlaylist::playbackMode_data()
-{
- QTest::addColumn<QMediaPlaylist::PlaybackMode>("playbackMode");
- QTest::addColumn<int>("expectedPrevious");
- QTest::addColumn<int>("pos");
- QTest::addColumn<int>("expectedNext");
-
- QTest::newRow("Linear, 0") << QMediaPlaylist::Linear << -1 << 0 << 1;
- QTest::newRow("Linear, 1") << QMediaPlaylist::Linear << 0 << 1 << 2;
- QTest::newRow("Linear, 2") << QMediaPlaylist::Linear << 1 << 2 << -1;
-
- QTest::newRow("Loop, 0") << QMediaPlaylist::Loop << 2 << 0 << 1;
- QTest::newRow("Loop, 1") << QMediaPlaylist::Loop << 0 << 1 << 2;
- QTest::newRow("Lopp, 2") << QMediaPlaylist::Loop << 1 << 2 << 0;
-
- QTest::newRow("ItemOnce, 1") << QMediaPlaylist::CurrentItemOnce << -1 << 1 << -1;
- QTest::newRow("ItemInLoop, 1") << QMediaPlaylist::CurrentItemInLoop << 1 << 1 << 1;
-
-}
-
-void tst_QMediaPlaylist::playbackMode()
-{
- QFETCH(QMediaPlaylist::PlaybackMode, playbackMode);
- QFETCH(int, expectedPrevious);
- QFETCH(int, pos);
- QFETCH(int, expectedNext);
-
- QMediaPlaylist playlist;
- playlist.addMedia(content1);
- playlist.addMedia(content2);
- playlist.addMedia(content3);
-
- QCOMPARE(playlist.playbackMode(), QMediaPlaylist::Linear);
- QCOMPARE(playlist.currentIndex(), -1);
-
- playlist.setPlaybackMode(playbackMode);
- QCOMPARE(playlist.playbackMode(), playbackMode);
-
- playlist.setCurrentIndex(pos);
- QCOMPARE(playlist.currentIndex(), pos);
- QCOMPARE(playlist.nextIndex(), expectedNext);
- QCOMPARE(playlist.previousIndex(), expectedPrevious);
-
- playlist.next();
- QCOMPARE(playlist.currentIndex(), expectedNext);
-
- playlist.setCurrentIndex(pos);
- playlist.previous();
- QCOMPARE(playlist.currentIndex(), expectedPrevious);
-}
-
-void tst_QMediaPlaylist::shuffle()
-{
- QMediaPlaylist playlist;
- QList<QMediaContent> contentList;
-
- for (int i=0; i<100; i++) {
- QMediaContent content(QUrl(QString::number(i)));
- contentList.append(content);
- playlist.addMedia(content);
- }
-
- playlist.shuffle();
-
- QList<QMediaContent> shuffledContentList;
- for (int i=0; i<playlist.mediaCount(); i++)
- shuffledContentList.append(playlist.media(i));
-
- QVERIFY(contentList != shuffledContentList);
-
-}
-
-void tst_QMediaPlaylist::readOnlyPlaylist()
-{
- MockReadOnlyPlaylistObject mediaObject;
- QMediaPlaylist playlist;
- playlist.setMediaObject(&mediaObject);
-
- QVERIFY(playlist.isReadOnly());
- QVERIFY(!playlist.isEmpty());
- QCOMPARE(playlist.mediaCount(), 3);
-
- QCOMPARE(playlist.media(0), content1);
- QCOMPARE(playlist.media(1), content2);
- QCOMPARE(playlist.media(2), content3);
- QCOMPARE(playlist.media(3), QMediaContent());
-
- //it's a read only playlist, so all the modification should fail
- QVERIFY(!playlist.addMedia(content1));
- QCOMPARE(playlist.mediaCount(), 3);
- QVERIFY(!playlist.addMedia(QList<QMediaContent>() << content1 << content2));
- QCOMPARE(playlist.mediaCount(), 3);
- QVERIFY(!playlist.insertMedia(1, content1));
- QCOMPARE(playlist.mediaCount(), 3);
- QVERIFY(!playlist.insertMedia(1, QList<QMediaContent>() << content1 << content2));
- QCOMPARE(playlist.mediaCount(), 3);
- QVERIFY(!playlist.removeMedia(1));
- QCOMPARE(playlist.mediaCount(), 3);
- QVERIFY(!playlist.removeMedia(0,2));
- QCOMPARE(playlist.mediaCount(), 3);
- QVERIFY(!playlist.clear());
- QCOMPARE(playlist.mediaCount(), 3);
-
- //but it is still allowed to append/insert an empty list
- QVERIFY(playlist.addMedia(QList<QMediaContent>()));
- QVERIFY(playlist.insertMedia(1, QList<QMediaContent>()));
-
- playlist.shuffle();
- //it's still the same
- QCOMPARE(playlist.media(0), content1);
- QCOMPARE(playlist.media(1), content2);
- QCOMPARE(playlist.media(2), content3);
- QCOMPARE(playlist.media(3), QMediaContent());
-
-
- //load to read only playlist should fail,
- //unless underlaying provider supports it
- QBuffer buffer;
- buffer.open(QBuffer::ReadWrite);
- buffer.write(QByteArray("file:///1\nfile:///2"));
- buffer.seek(0);
-
- QSignalSpy errorSignal(&playlist, SIGNAL(loadFailed()));
- playlist.load(&buffer, "m3u");
- QCOMPARE(errorSignal.size(), 1);
- QCOMPARE(playlist.error(), QMediaPlaylist::AccessDeniedError);
- QVERIFY(!playlist.errorString().isEmpty());
- QCOMPARE(playlist.mediaCount(), 3);
-
- errorSignal.clear();
- playlist.load(QUrl(QLatin1String("tmp.m3u")), "m3u");
-
- QCOMPARE(errorSignal.size(), 1);
- QCOMPARE(playlist.error(), QMediaPlaylist::AccessDeniedError);
- QVERIFY(!playlist.errorString().isEmpty());
- QCOMPARE(playlist.mediaCount(), 3);
-}
-
-void tst_QMediaPlaylist::setMediaObject()
-{
- MockReadOnlyPlaylistObject mediaObject;
-
- QMediaPlaylist playlist;
- QVERIFY(playlist.mediaObject() == 0);
- QVERIFY(!playlist.isReadOnly());
-
- playlist.setMediaObject(&mediaObject);
- QCOMPARE(playlist.mediaObject(), qobject_cast<QMediaObject*>(&mediaObject));
- QCOMPARE(playlist.mediaCount(), 3);
- QVERIFY(playlist.isReadOnly());
-
- playlist.setMediaObject(0);
- QVERIFY(playlist.mediaObject() == 0);
- QCOMPARE(playlist.mediaCount(), 0);
- QVERIFY(!playlist.isReadOnly());
-
- playlist.setMediaObject(&mediaObject);
- QCOMPARE(playlist.mediaObject(), qobject_cast<QMediaObject*>(&mediaObject));
- QCOMPARE(playlist.mediaCount(), 3);
- QVERIFY(playlist.isReadOnly());
-}
-
-QTEST_MAIN(tst_QMediaPlaylist)
-#include "tst_qmediaplaylist.moc"
-
diff --git a/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro b/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro
deleted file mode 100644
index 3265762..0000000
--- a/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4)
-
-SOURCES = tst_qmediaplaylistnavigator.cpp
-
-QT = core mediaservices
-
diff --git a/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp b/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp
deleted file mode 100644
index 04f736c..0000000
--- a/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp
+++ /dev/null
@@ -1,316 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QDebug>
-#include <QtMediaServices/qlocalmediaplaylistprovider.h>
-#include <QtMediaServices/qmediaplaylistnavigator.h>
-
-
-class tst_QMediaPlaylistNavigator : public QObject
-{
- Q_OBJECT
-public slots:
- void init();
- void cleanup();
-
-private slots:
- void construction();
- void setPlaylist();
- void linearPlayback();
- void loopPlayback();
- void currentItemOnce();
- void currentItemInLoop();
- void randomPlayback();
-};
-
-void tst_QMediaPlaylistNavigator::init()
-{
-}
-
-void tst_QMediaPlaylistNavigator::cleanup()
-{
-}
-
-void tst_QMediaPlaylistNavigator::construction()
-{
- QLocalMediaPlaylistProvider playlist;
- QCOMPARE(playlist.mediaCount(), 0);
-
- QMediaPlaylistNavigator navigator(&playlist);
- QVERIFY(navigator.currentItem().isNull());
- QCOMPARE(navigator.currentIndex(), -1);
-}
-
-void tst_QMediaPlaylistNavigator::setPlaylist()
-{
- QMediaPlaylistNavigator navigator(0);
- QVERIFY(navigator.playlist() != 0);
- QCOMPARE(navigator.playlist()->mediaCount(), 0);
- QCOMPARE(navigator.playlist()->media(0), QMediaContent());
- QVERIFY(navigator.playlist()->isReadOnly() );
-
- QLocalMediaPlaylistProvider playlist;
- QCOMPARE(playlist.mediaCount(), 0);
-
- navigator.setPlaylist(&playlist);
- QCOMPARE(navigator.playlist(), (QMediaPlaylistProvider*)&playlist);
- QCOMPARE(navigator.playlist()->mediaCount(), 0);
- QVERIFY(!navigator.playlist()->isReadOnly() );
-}
-
-void tst_QMediaPlaylistNavigator::linearPlayback()
-{
- QLocalMediaPlaylistProvider playlist;
- QMediaPlaylistNavigator navigator(&playlist);
-
- navigator.setPlaybackMode(QMediaPlaylist::Linear);
- QTest::ignoreMessage(QtWarningMsg, "QMediaPlaylistNavigator: Jump outside playlist range ");
- navigator.jump(0);//it's ok to have warning here
- QVERIFY(navigator.currentItem().isNull());
- QCOMPARE(navigator.currentIndex(), -1);
-
- QMediaContent content1(QUrl(QLatin1String("file:///1")));
- playlist.addMedia(content1);
- navigator.jump(0);
- QVERIFY(!navigator.currentItem().isNull());
-
- QCOMPARE(navigator.currentIndex(), 0);
- QCOMPARE(navigator.currentItem(), content1);
- QCOMPARE(navigator.nextItem(), QMediaContent());
- QCOMPARE(navigator.nextItem(2), QMediaContent());
- QCOMPARE(navigator.previousItem(), QMediaContent());
- QCOMPARE(navigator.previousItem(2), QMediaContent());
-
- QMediaContent content2(QUrl(QLatin1String("file:///2")));
- playlist.addMedia(content2);
- QCOMPARE(navigator.currentIndex(), 0);
- QCOMPARE(navigator.currentItem(), content1);
- QCOMPARE(navigator.nextItem(), content2);
- QCOMPARE(navigator.nextItem(2), QMediaContent());
- QCOMPARE(navigator.previousItem(), QMediaContent());
- QCOMPARE(navigator.previousItem(2), QMediaContent());
-
- navigator.jump(1);
- QCOMPARE(navigator.currentIndex(), 1);
- QCOMPARE(navigator.currentItem(), content2);
- QCOMPARE(navigator.nextItem(), QMediaContent());
- QCOMPARE(navigator.nextItem(2), QMediaContent());
- QCOMPARE(navigator.previousItem(), content1);
- QCOMPARE(navigator.previousItem(2), QMediaContent());
-
- navigator.jump(0);
- navigator.next();
- QCOMPARE(navigator.currentIndex(), 1);
- navigator.next();
- QCOMPARE(navigator.currentIndex(), -1);
- navigator.next();//jump to the first item
- QCOMPARE(navigator.currentIndex(), 0);
-
- navigator.previous();
- QCOMPARE(navigator.currentIndex(), -1);
- navigator.previous();//jump to the last item
- QCOMPARE(navigator.currentIndex(), 1);
-}
-
-void tst_QMediaPlaylistNavigator::loopPlayback()
-{
- QLocalMediaPlaylistProvider playlist;
- QMediaPlaylistNavigator navigator(&playlist);
-
- navigator.setPlaybackMode(QMediaPlaylist::Loop);
- QTest::ignoreMessage(QtWarningMsg, "QMediaPlaylistNavigator: Jump outside playlist range ");
- navigator.jump(0);
- QVERIFY(navigator.currentItem().isNull());
- QCOMPARE(navigator.currentIndex(), -1);
-
- QMediaContent content1(QUrl(QLatin1String("file:///1")));
- playlist.addMedia(content1);
- navigator.jump(0);
- QVERIFY(!navigator.currentItem().isNull());
-
- QCOMPARE(navigator.currentIndex(), 0);
- QCOMPARE(navigator.currentItem(), content1);
- QCOMPARE(navigator.nextItem(), content1);
- QCOMPARE(navigator.nextItem(2), content1);
- QCOMPARE(navigator.previousItem(), content1);
- QCOMPARE(navigator.previousItem(2), content1);
-
- QMediaContent content2(QUrl(QLatin1String("file:///2")));
- playlist.addMedia(content2);
- QCOMPARE(navigator.currentIndex(), 0);
- QCOMPARE(navigator.currentItem(), content1);
- QCOMPARE(navigator.nextItem(), content2);
- QCOMPARE(navigator.nextItem(2), content1); //loop over end of the list
- QCOMPARE(navigator.previousItem(), content2);
- QCOMPARE(navigator.previousItem(2), content1);
-
- navigator.jump(1);
- QCOMPARE(navigator.currentIndex(), 1);
- QCOMPARE(navigator.currentItem(), content2);
- QCOMPARE(navigator.nextItem(), content1);
- QCOMPARE(navigator.nextItem(2), content2);
- QCOMPARE(navigator.previousItem(), content1);
- QCOMPARE(navigator.previousItem(2), content2);
-
- navigator.jump(0);
- navigator.next();
- QCOMPARE(navigator.currentIndex(), 1);
- navigator.next();
- QCOMPARE(navigator.currentIndex(), 0);
- navigator.previous();
- QCOMPARE(navigator.currentIndex(), 1);
- navigator.previous();
- QCOMPARE(navigator.currentIndex(), 0);
-}
-
-void tst_QMediaPlaylistNavigator::currentItemOnce()
-{
- QLocalMediaPlaylistProvider playlist;
- QMediaPlaylistNavigator navigator(&playlist);
-
- navigator.setPlaybackMode(QMediaPlaylist::CurrentItemOnce);
-
- QCOMPARE(navigator.playbackMode(), QMediaPlaylist::CurrentItemOnce);
- QCOMPARE(navigator.currentIndex(), -1);
-
- playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///1"))));
- playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///2"))));
- playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///3"))));
-
- QCOMPARE(navigator.currentIndex(), -1);
- navigator.next();
- QCOMPARE(navigator.currentIndex(), -1);
-
- navigator.jump(1);
- QCOMPARE(navigator.currentIndex(), 1);
- navigator.next();
- QCOMPARE(navigator.currentIndex(), -1);
- navigator.next();
- QCOMPARE(navigator.currentIndex(), -1);
- navigator.previous();
- QCOMPARE(navigator.currentIndex(), -1);
- navigator.jump(1);
- navigator.previous();
- QCOMPARE(navigator.currentIndex(), -1);
-}
-
-void tst_QMediaPlaylistNavigator::currentItemInLoop()
-{
- QLocalMediaPlaylistProvider playlist;
- QMediaPlaylistNavigator navigator(&playlist);
-
- navigator.setPlaybackMode(QMediaPlaylist::CurrentItemInLoop);
-
- QCOMPARE(navigator.playbackMode(), QMediaPlaylist::CurrentItemInLoop);
- QCOMPARE(navigator.currentIndex(), -1);
-
- playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///1"))));
- playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///2"))));
- playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///3"))));
-
- QCOMPARE(navigator.currentIndex(), -1);
- navigator.next();
- QCOMPARE(navigator.currentIndex(), -1);
- navigator.jump(1);
- navigator.next();
- QCOMPARE(navigator.currentIndex(), 1);
- navigator.next();
- QCOMPARE(navigator.currentIndex(), 1);
- navigator.previous();
- QCOMPARE(navigator.currentIndex(), 1);
- navigator.previous();
- QCOMPARE(navigator.currentIndex(), 1);
-}
-
-void tst_QMediaPlaylistNavigator::randomPlayback()
-{
- QLocalMediaPlaylistProvider playlist;
- QMediaPlaylistNavigator navigator(&playlist);
-
- navigator.setPlaybackMode(QMediaPlaylist::Random);
-
- QCOMPARE(navigator.playbackMode(), QMediaPlaylist::Random);
- QCOMPARE(navigator.currentIndex(), -1);
-
- playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///1"))));
- playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///2"))));
- playlist.addMedia(QMediaContent(QUrl(QLatin1String("file:///3"))));
-
- playlist.shuffle();
-
- QCOMPARE(navigator.currentIndex(), -1);
- navigator.next();
- int pos1 = navigator.currentIndex();
- navigator.next();
- int pos2 = navigator.currentIndex();
- navigator.next();
- int pos3 = navigator.currentIndex();
-
- QVERIFY(pos1 != -1);
- QVERIFY(pos2 != -1);
- QVERIFY(pos3 != -1);
-
- navigator.previous();
- QCOMPARE(navigator.currentIndex(), pos2);
- navigator.next();
- QCOMPARE(navigator.currentIndex(), pos3);
- navigator.next();
- int pos4 = navigator.currentIndex();
- navigator.previous();
- QCOMPARE(navigator.currentIndex(), pos3);
- navigator.previous();
- QCOMPARE(navigator.currentIndex(), pos2);
- navigator.previous();
- QCOMPARE(navigator.currentIndex(), pos1);
- navigator.previous();
- int pos0 = navigator.currentIndex();
- QVERIFY(pos0 != -1);
- navigator.next();
- navigator.next();
- navigator.next();
- navigator.next();
- QCOMPARE(navigator.currentIndex(), pos4);
-
-}
-
-QTEST_MAIN(tst_QMediaPlaylistNavigator)
-#include "tst_qmediaplaylistnavigator.moc"
diff --git a/tests/auto/qmediapluginloader/qmediapluginloader.pro b/tests/auto/qmediapluginloader/qmediapluginloader.pro
deleted file mode 100644
index a47cc57..0000000
--- a/tests/auto/qmediapluginloader/qmediapluginloader.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4)
-
-SOURCES = tst_qmediapluginloader.cpp
-
-QT = core mediaservices
-
diff --git a/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp b/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp
deleted file mode 100644
index 001e68a..0000000
--- a/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QDebug>
-
-#include <QtMediaServices/private/qmediapluginloader_p.h>
-#include <QtMediaServices/qmediaserviceproviderplugin.h>
-
-
-
-class tst_QMediaPluginLoader : public QObject
-{
- Q_OBJECT
-
-public slots:
- void initTestCase();
- void cleanupTestCase();
-
-private slots:
- void testInstance();
- void testInstances();
- void testInvalidKey();
-
-private:
- QMediaPluginLoader *loader;
-};
-
-void tst_QMediaPluginLoader::initTestCase()
-{
- loader = new QMediaPluginLoader(QMediaServiceProviderFactoryInterface_iid,
- QLatin1String("/mediaservice"),
- Qt::CaseInsensitive);
-}
-
-void tst_QMediaPluginLoader::cleanupTestCase()
-{
- delete loader;
-}
-
-void tst_QMediaPluginLoader::testInstance()
-{
- const QStringList keys = loader->keys();
-
- if (keys.isEmpty()) // Test is invalidated, skip.
- QSKIP("No plug-ins available", SkipAll);
-
- foreach (const QString &key, keys)
- QVERIFY(loader->instance(key) != 0);
-}
-
-void tst_QMediaPluginLoader::testInstances()
-{
- const QStringList keys = loader->keys();
-
- if (keys.isEmpty()) // Test is invalidated, skip.
- QSKIP("No plug-ins available", SkipAll);
-
- foreach (const QString &key, keys)
- QVERIFY(loader->instances(key).size() > 0);
-}
-
-// Last so as to not interfere with the other tests if there is a failure.
-void tst_QMediaPluginLoader::testInvalidKey()
-{
- const QString key(QLatin1String("invalid-key"));
-
- // This test assumes there is no 'invalid-key' in the key list, verify that.
- if (loader->keys().contains(key))
- QSKIP("a plug-in includes the invalid key", SkipAll);
-
- QVERIFY(loader->instance(key) == 0);
-
- // Test looking up the key hasn't inserted it into the list. See QMap::operator[].
- QVERIFY(!loader->keys().contains(key));
-
- QVERIFY(loader->instances(key).isEmpty());
- QVERIFY(!loader->keys().contains(key));
-}
-
-QTEST_MAIN(tst_QMediaPluginLoader)
-
-#include "tst_qmediapluginloader.moc"
diff --git a/tests/auto/qmediaresource/qmediaresource.pro b/tests/auto/qmediaresource/qmediaresource.pro
deleted file mode 100644
index 64669a2..0000000
--- a/tests/auto/qmediaresource/qmediaresource.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4)
-
-SOURCES = tst_qmediaresource.cpp
-
-QT = core mediaservices network
-
diff --git a/tests/auto/qmediaresource/tst_qmediaresource.cpp b/tests/auto/qmediaresource/tst_qmediaresource.cpp
deleted file mode 100644
index 984cfef..0000000
--- a/tests/auto/qmediaresource/tst_qmediaresource.cpp
+++ /dev/null
@@ -1,516 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QtMediaServices/qmediaresource.h>
-
-
-class tst_QMediaResource : public QObject
-{
- Q_OBJECT
-private slots:
- void constructNull();
- void construct_data();
- void construct();
- void setResolution();
- void equality();
- void copy();
- void assign();
-};
-
-void tst_QMediaResource::constructNull()
-{
- QMediaResource resource;
-
- QCOMPARE(resource.isNull(), true);
- QCOMPARE(resource.url(), QUrl());
- QCOMPARE(resource.request(), QNetworkRequest());
- QCOMPARE(resource.mimeType(), QString());
- QCOMPARE(resource.language(), QString());
- QCOMPARE(resource.audioCodec(), QString());
- QCOMPARE(resource.videoCodec(), QString());
- QCOMPARE(resource.dataSize(), qint64(0));
- QCOMPARE(resource.audioBitRate(), 0);
- QCOMPARE(resource.sampleRate(), 0);
- QCOMPARE(resource.channelCount(), 0);
- QCOMPARE(resource.videoBitRate(), 0);
- QCOMPARE(resource.resolution(), QSize());
-}
-
-void tst_QMediaResource::construct_data()
-{
- QTest::addColumn<QUrl>("url");
- QTest::addColumn<QNetworkRequest>("request");
- QTest::addColumn<QString>("mimeType");
- QTest::addColumn<QString>("language");
- QTest::addColumn<QString>("audioCodec");
- QTest::addColumn<QString>("videoCodec");
- QTest::addColumn<qint64>("dataSize");
- QTest::addColumn<int>("audioBitRate");
- QTest::addColumn<int>("sampleRate");
- QTest::addColumn<int>("channelCount");
- QTest::addColumn<int>("videoBitRate");
- QTest::addColumn<QSize>("resolution");
-
- QTest::newRow("audio content")
- << QUrl(QString::fromLatin1("http:://test.com/test.mp3"))
- << QNetworkRequest(QUrl(QString::fromLatin1("http:://test.com/test.mp3")))
- << QString::fromLatin1("audio/mpeg")
- << QString::fromLatin1("eng")
- << QString::fromLatin1("mp3")
- << QString()
- << qint64(5465433)
- << 128000
- << 44100
- << 2
- << 0
- << QSize();
- QTest::newRow("image content")
- << QUrl(QString::fromLatin1("http:://test.com/test.jpg"))
- << QNetworkRequest(QUrl(QString::fromLatin1("http:://test.com/test.jpg")))
- << QString::fromLatin1("image/jpeg")
- << QString()
- << QString()
- << QString()
- << qint64(23600)
- << 0
- << 0
- << 0
- << 0
- << QSize(640, 480);
- QTest::newRow("video content")
- << QUrl(QString::fromLatin1("http:://test.com/test.mp4"))
- << QNetworkRequest(QUrl(QString::fromLatin1("http:://test.com/test.mp4")))
- << QString::fromLatin1("video/mp4")
- << QString()
- << QString::fromLatin1("aac")
- << QString::fromLatin1("h264")
- << qint64(36245851)
- << 96000
- << 44000
- << 5
- << 750000
- << QSize(720, 576);
- QTest::newRow("thumbnail")
- << QUrl(QString::fromLatin1("file::///thumbs/test.png"))
- << QNetworkRequest(QUrl(QString::fromLatin1("file::///thumbs/test.png")))
- << QString::fromLatin1("image/png")
- << QString()
- << QString()
- << QString()
- << qint64(2360)
- << 0
- << 0
- << 0
- << 0
- << QSize(128, 128);
-}
-
-void tst_QMediaResource::construct()
-{
- QFETCH(QUrl, url);
- QFETCH(QNetworkRequest, request);
- QFETCH(QString, mimeType);
- QFETCH(QString, language);
- QFETCH(QString, audioCodec);
- QFETCH(QString, videoCodec);
- QFETCH(qint64, dataSize);
- QFETCH(int, audioBitRate);
- QFETCH(int, sampleRate);
- QFETCH(int, channelCount);
- QFETCH(int, videoBitRate);
- QFETCH(QSize, resolution);
-
- {
- QMediaResource resource(url);
-
- QCOMPARE(resource.isNull(), false);
- QCOMPARE(resource.url(), url);
- QCOMPARE(resource.mimeType(), QString());
- QCOMPARE(resource.language(), QString());
- QCOMPARE(resource.audioCodec(), QString());
- QCOMPARE(resource.videoCodec(), QString());
- QCOMPARE(resource.dataSize(), qint64(0));
- QCOMPARE(resource.audioBitRate(), 0);
- QCOMPARE(resource.sampleRate(), 0);
- QCOMPARE(resource.channelCount(), 0);
- QCOMPARE(resource.videoBitRate(), 0);
- QCOMPARE(resource.resolution(), QSize());
- }
- {
- QMediaResource resource(url, mimeType);
-
- QCOMPARE(resource.isNull(), false);
- QCOMPARE(resource.url(), url);
- QCOMPARE(resource.request(), request);
- QCOMPARE(resource.mimeType(), mimeType);
- QCOMPARE(resource.language(), QString());
- QCOMPARE(resource.audioCodec(), QString());
- QCOMPARE(resource.videoCodec(), QString());
- QCOMPARE(resource.dataSize(), qint64(0));
- QCOMPARE(resource.audioBitRate(), 0);
- QCOMPARE(resource.sampleRate(), 0);
- QCOMPARE(resource.channelCount(), 0);
- QCOMPARE(resource.videoBitRate(), 0);
- QCOMPARE(resource.resolution(), QSize());
-
- resource.setLanguage(language);
- resource.setAudioCodec(audioCodec);
- resource.setVideoCodec(videoCodec);
- resource.setDataSize(dataSize);
- resource.setAudioBitRate(audioBitRate);
- resource.setSampleRate(sampleRate);
- resource.setChannelCount(channelCount);
- resource.setVideoBitRate(videoBitRate);
- resource.setResolution(resolution);
-
- QCOMPARE(resource.language(), language);
- QCOMPARE(resource.audioCodec(), audioCodec);
- QCOMPARE(resource.videoCodec(), videoCodec);
- QCOMPARE(resource.dataSize(), dataSize);
- QCOMPARE(resource.audioBitRate(), audioBitRate);
- QCOMPARE(resource.sampleRate(), sampleRate);
- QCOMPARE(resource.channelCount(), channelCount);
- QCOMPARE(resource.videoBitRate(), videoBitRate);
- QCOMPARE(resource.resolution(), resolution);
- }
- {
- QMediaResource resource(request, mimeType);
-
- QCOMPARE(resource.isNull(), false);
- QCOMPARE(resource.url(), url);
- QCOMPARE(resource.request(), request);
- QCOMPARE(resource.mimeType(), mimeType);
- QCOMPARE(resource.language(), QString());
- QCOMPARE(resource.audioCodec(), QString());
- QCOMPARE(resource.videoCodec(), QString());
- QCOMPARE(resource.dataSize(), qint64(0));
- QCOMPARE(resource.audioBitRate(), 0);
- QCOMPARE(resource.sampleRate(), 0);
- QCOMPARE(resource.channelCount(), 0);
- QCOMPARE(resource.videoBitRate(), 0);
- QCOMPARE(resource.resolution(), QSize());
-
- resource.setLanguage(language);
- resource.setAudioCodec(audioCodec);
- resource.setVideoCodec(videoCodec);
- resource.setDataSize(dataSize);
- resource.setAudioBitRate(audioBitRate);
- resource.setSampleRate(sampleRate);
- resource.setChannelCount(channelCount);
- resource.setVideoBitRate(videoBitRate);
- resource.setResolution(resolution);
-
- QCOMPARE(resource.language(), language);
- QCOMPARE(resource.audioCodec(), audioCodec);
- QCOMPARE(resource.videoCodec(), videoCodec);
- QCOMPARE(resource.dataSize(), dataSize);
- QCOMPARE(resource.audioBitRate(), audioBitRate);
- QCOMPARE(resource.sampleRate(), sampleRate);
- QCOMPARE(resource.channelCount(), channelCount);
- QCOMPARE(resource.videoBitRate(), videoBitRate);
- QCOMPARE(resource.resolution(), resolution);
- }
-}
-
-void tst_QMediaResource::setResolution()
-{
- QMediaResource resource(
- QUrl(QString::fromLatin1("file::///thumbs/test.png")),
- QString::fromLatin1("image/png"));
-
- QCOMPARE(resource.resolution(), QSize());
-
- resource.setResolution(QSize(120, 80));
- QCOMPARE(resource.resolution(), QSize(120, 80));
-
- resource.setResolution(QSize(-1, 23));
- QCOMPARE(resource.resolution(), QSize(-1, 23));
-
- resource.setResolution(QSize(-43, 34));
- QCOMPARE(resource.resolution(), QSize(-43, 34));
-
- resource.setResolution(QSize(64, -1));
- QCOMPARE(resource.resolution(), QSize(64, -1));
-
- resource.setResolution(QSize(64, -83));
- QCOMPARE(resource.resolution(), QSize(64, -83));
-
- resource.setResolution(QSize(-12, -83));
- QCOMPARE(resource.resolution(), QSize(-12, -83));
-
- resource.setResolution(QSize());
- QCOMPARE(resource.resolution(), QSize(-1, -1));
-
- resource.setResolution(120, 80);
- QCOMPARE(resource.resolution(), QSize(120, 80));
-
- resource.setResolution(-1, 23);
- QCOMPARE(resource.resolution(), QSize(-1, 23));
-
- resource.setResolution(-43, 34);
- QCOMPARE(resource.resolution(), QSize(-43, 34));
-
- resource.setResolution(64, -1);
- QCOMPARE(resource.resolution(), QSize(64, -1));
-
- resource.setResolution(64, -83);
- QCOMPARE(resource.resolution(), QSize(64, -83));
-
- resource.setResolution(-12, -83);
- QCOMPARE(resource.resolution(), QSize(-12, -83));
-
- resource.setResolution(-1, -1);
- QCOMPARE(resource.resolution(), QSize());
-}
-
-void tst_QMediaResource::equality()
-{
- QMediaResource resource1(
- QUrl(QString::fromLatin1("http://test.com/test.mp4")),
- QString::fromLatin1("video/mp4"));
- QMediaResource resource2(
- QUrl(QString::fromLatin1("http://test.com/test.mp4")),
- QString::fromLatin1("video/mp4"));
- QMediaResource resource3(
- QUrl(QString::fromLatin1("file:///thumbs/test.jpg")));
- QMediaResource resource4(
- QUrl(QString::fromLatin1("file:///thumbs/test.jpg")));
- QMediaResource resource5(
- QUrl(QString::fromLatin1("http://test.com/test.mp3")),
- QString::fromLatin1("audio/mpeg"));
-
- QCOMPARE(resource1 == resource2, true);
- QCOMPARE(resource1 != resource2, false);
-
- QCOMPARE(resource3 == resource4, true);
- QCOMPARE(resource3 != resource4, false);
-
- QCOMPARE(resource1 == resource3, false);
- QCOMPARE(resource1 != resource3, true);
-
- QCOMPARE(resource1 == resource5, false);
- QCOMPARE(resource1 != resource5, true);
-
- resource1.setAudioCodec(QString::fromLatin1("mp3"));
- resource2.setAudioCodec(QString::fromLatin1("aac"));
-
- // Not equal differing audio codecs.
- QCOMPARE(resource1 == resource2, false);
- QCOMPARE(resource1 != resource2, true);
-
- resource1.setAudioCodec(QString::fromLatin1("aac"));
-
- // Equal.
- QCOMPARE(resource1 == resource2, true);
- QCOMPARE(resource1 != resource2, false);
-
- resource1.setVideoCodec(QString());
-
- // Equal.
- QCOMPARE(resource1 == resource2, true);
- QCOMPARE(resource1 != resource2, false);
-
- resource1.setVideoCodec(QString::fromLatin1("h264"));
-
- // Not equal differing video codecs.
- QCOMPARE(resource1 == resource2, false);
- QCOMPARE(resource1 != resource2, true);
-
- resource2.setVideoCodec(QString::fromLatin1("h264"));
-
- // Equal.
- QCOMPARE(resource1 == resource2, true);
- QCOMPARE(resource1 != resource2, false);
-
- resource2.setDataSize(0);
-
- // Equal.
- QCOMPARE(resource1 == resource2, true);
- QCOMPARE(resource1 != resource2, false);
-
- resource1.setDataSize(546423);
-
- // Not equal differing video codecs.
- QCOMPARE(resource1 == resource2, false);
- QCOMPARE(resource1 != resource2, true);
-
- resource2.setDataSize(546423);
-
- // Equal.
- QCOMPARE(resource1 == resource2, true);
- QCOMPARE(resource1 != resource2, false);
-
- resource1.setAudioBitRate(96000);
- resource1.setSampleRate(48000);
- resource2.setSampleRate(44100);
- resource1.setChannelCount(0);
- resource1.setVideoBitRate(900000);
- resource2.setLanguage(QString::fromLatin1("eng"));
-
- // Not equal, audio bit rate, sample rate, video bit rate, and
- // language.
- QCOMPARE(resource1 == resource2, false);
- QCOMPARE(resource1 != resource2, true);
-
- resource2.setAudioBitRate(96000);
- resource1.setSampleRate(44100);
-
- // Not equal, differing video bit rate, and language.
- QCOMPARE(resource1 == resource2, false);
- QCOMPARE(resource1 != resource2, true);
-
- resource2.setVideoBitRate(900000);
- resource1.setLanguage(QString::fromLatin1("eng"));
-
- // Equal
- QCOMPARE(resource1 == resource2, true);
- QCOMPARE(resource1 != resource2, false);
-
- resource1.setResolution(QSize());
-
- // Equal
- QCOMPARE(resource1 == resource2, true);
- QCOMPARE(resource1 != resource2, false);
-
- resource2.setResolution(-1, -1);
-
- // Equal
- QCOMPARE(resource1 == resource2, true);
- QCOMPARE(resource1 != resource2, false);
-
- resource1.setResolution(QSize(-640, -480));
-
- // Not equal, differing resolution.
- QCOMPARE(resource1 == resource2, false);
- QCOMPARE(resource1 != resource2, true);
- resource1.setResolution(QSize(640, 480));
- resource2.setResolution(QSize(800, 600));
-
- // Not equal, differing resolution.
- QCOMPARE(resource1 == resource2, false);
- QCOMPARE(resource1 != resource2, true);
-
- resource1.setResolution(800, 600);
-
- // Equal
- QCOMPARE(resource1 == resource2, true);
- QCOMPARE(resource1 != resource2, false);
-}
-
-void tst_QMediaResource::copy()
-{
- const QUrl url(QString::fromLatin1("http://test.com/test.mp4"));
- const QString mimeType(QLatin1String("video/mp4"));
- const QString amrCodec(QLatin1String("amr"));
- const QString mp3Codec(QLatin1String("mp3"));
- const QString aacCodec(QLatin1String("aac"));
- const QString h264Codec(QLatin1String("h264"));
-
- QMediaResource original(url, mimeType);
- original.setAudioCodec(amrCodec);
-
- QMediaResource copy(original);
-
- QCOMPARE(copy.url(), url);
- QCOMPARE(copy.mimeType(), mimeType);
- QCOMPARE(copy.audioCodec(), amrCodec);
-
- QCOMPARE(original == copy, true);
- QCOMPARE(original != copy, false);
-
- original.setAudioCodec(mp3Codec);
-
- QCOMPARE(copy.audioCodec(), amrCodec);
- QCOMPARE(original == copy, false);
- QCOMPARE(original != copy, true);
-
- copy.setAudioCodec(aacCodec);
- copy.setVideoCodec(h264Codec);
-
- QCOMPARE(copy.url(), url);
- QCOMPARE(copy.mimeType(), mimeType);
-
- QCOMPARE(original.audioCodec(), mp3Codec);
-}
-
-void tst_QMediaResource::assign()
-{
- const QUrl url(QString::fromLatin1("http://test.com/test.mp4"));
- const QString mimeType(QLatin1String("video/mp4"));
- const QString amrCodec(QLatin1String("amr"));
- const QString mp3Codec(QLatin1String("mp3"));
- const QString aacCodec(QLatin1String("aac"));
- const QString h264Codec(QLatin1String("h264"));
-
- QMediaResource copy(QUrl(QString::fromLatin1("file:///thumbs/test.jpg")));
-
- QMediaResource original(url, mimeType);
- original.setAudioCodec(amrCodec);
-
- copy = original;
-
- QCOMPARE(copy.url(), url);
- QCOMPARE(copy.mimeType(), mimeType);
- QCOMPARE(copy.audioCodec(), amrCodec);
-
- QCOMPARE(original == copy, true);
- QCOMPARE(original != copy, false);
-
- original.setAudioCodec(mp3Codec);
-
- QCOMPARE(copy.audioCodec(), amrCodec);
- QCOMPARE(original == copy, false);
- QCOMPARE(original != copy, true);
-
- copy.setAudioCodec(aacCodec);
- copy.setVideoCodec(h264Codec);
-
- QCOMPARE(copy.url(), url);
- QCOMPARE(copy.mimeType(), mimeType);
-
- QCOMPARE(original.audioCodec(), mp3Codec);
-}
-
-QTEST_MAIN(tst_QMediaResource)
-
-#include "tst_qmediaresource.moc"
diff --git a/tests/auto/qmediaservice/qmediaservice.pro b/tests/auto/qmediaservice/qmediaservice.pro
deleted file mode 100644
index 8acd03a..0000000
--- a/tests/auto/qmediaservice/qmediaservice.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4)
-
-SOURCES = tst_qmediaservice.cpp
-
-QT = core gui mediaservices
-
diff --git a/tests/auto/qmediaservice/tst_qmediaservice.cpp b/tests/auto/qmediaservice/tst_qmediaservice.cpp
deleted file mode 100644
index a544e77..0000000
--- a/tests/auto/qmediaservice/tst_qmediaservice.cpp
+++ /dev/null
@@ -1,219 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QtMediaServices/qvideodevicecontrol.h>
-#include <QtMediaServices/qmediacontrol.h>
-#include <QtMediaServices/qmediaservice.h>
-
-#include <QtGui/qapplication.h>
-#include <QtGui/qstyle.h>
-
-class QtTestMediaService;
-
-
-class tst_QMediaService : public QObject
-{
- Q_OBJECT
-private slots:
- void initTestCase();
-
- void control_iid();
- void control();
-};
-
-
-class QtTestMediaControlA : public QMediaControl
-{
- Q_OBJECT
-};
-
-
-#define QtTestMediaControlA_iid "com.nokia.QtTestMediaControlA"
-QT_BEGIN_NAMESPACE
-Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlA, QtTestMediaControlA_iid)
-QT_END_NAMESPACE
-
-
-class QtTestMediaControlB : public QMediaControl
-{
- Q_OBJECT
-};
-
-#define QtTestMediaControlB_iid "com.nokia.QtTestMediaControlB"
-QT_BEGIN_NAMESPACE
-Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlB, QtTestMediaControlB_iid)
-QT_END_NAMESPACE
-
-
-class QtTestMediaControlC : public QMediaControl
-{
- Q_OBJECT
-};
-
-#define QtTestMediaControlC_iid "com.nokia.QtTestMediaControlC"
-QT_BEGIN_NAMESPACE
-Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlC, QtTestMediaControlA_iid) // Yes A.
-QT_END_NAMESPACE
-
-class QtTestMediaControlD : public QMediaControl
-{
- Q_OBJECT
-};
-
-#define QtTestMediaControlD_iid "com.nokia.QtTestMediaControlD"
-QT_BEGIN_NAMESPACE
-Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlD, QtTestMediaControlD_iid)
-QT_END_NAMESPACE
-
-class QtTestMediaControlE : public QMediaControl
-{
- Q_OBJECT
-};
-
-struct QtTestDevice
-{
- QtTestDevice() {}
- QtTestDevice(const QString &name, const QString &description, const QIcon &icon)
- : name(name), description(description), icon(icon)
- {
- }
-
- QString name;
- QString description;
- QIcon icon;
-};
-
-class QtTestVideoDeviceControl : public QVideoDeviceControl
-{
-public:
- QtTestVideoDeviceControl(QObject *parent = 0)
- : QVideoDeviceControl(parent)
- , m_selectedDevice(-1)
- , m_defaultDevice(-1)
- {
- }
-
- int deviceCount() const { return devices.count(); }
-
- QString deviceName(int index) const { return devices.value(index).name; }
- QString deviceDescription(int index) const { return devices.value(index).description; }
- QIcon deviceIcon(int index) const { return devices.value(index).icon; }
-
- int defaultDevice() const { return m_defaultDevice; }
- void setDefaultDevice(int index) { m_defaultDevice = index; }
-
- int selectedDevice() const { return m_selectedDevice; }
- void setSelectedDevice(int index)
- {
- emit selectedDeviceChanged(m_selectedDevice = index);
- emit selectedDeviceChanged(devices.value(index).name);
- }
-
- QList<QtTestDevice> devices;
-
-private:
- int m_selectedDevice;
- int m_defaultDevice;
-};
-
-class QtTestMediaService : public QMediaService
-{
- Q_OBJECT
-public:
- QtTestMediaService()
- : QMediaService(0)
- , hasDeviceControls(false)
- {
- }
-
- QMediaControl* control(const char *name) const
- {
- if (strcmp(name, QtTestMediaControlA_iid) == 0)
- return const_cast<QtTestMediaControlA *>(&controlA);
- else if (strcmp(name, QtTestMediaControlB_iid) == 0)
- return const_cast<QtTestMediaControlB *>(&controlB);
- else if (strcmp(name, QtTestMediaControlC_iid) == 0)
- return const_cast<QtTestMediaControlC *>(&controlC);
- else if (hasDeviceControls && strcmp(name, QVideoDeviceControl_iid) == 0)
- return const_cast<QtTestVideoDeviceControl *>(&videoDeviceControl);
- else
- return 0;
- }
-
- using QMediaService::control;
-
- QtTestMediaControlA controlA;
- QtTestMediaControlB controlB;
- QtTestMediaControlC controlC;
- QtTestVideoDeviceControl videoDeviceControl;
- bool hasDeviceControls;
-};
-
-void tst_QMediaService::initTestCase()
-{
-}
-
-void tst_QMediaService::control_iid()
-{
- const char *nullString = 0;
-
- // Default implementation.
- QCOMPARE(qmediacontrol_iid<QtTestMediaControlE *>(), nullString);
-
- // Partial template.
- QVERIFY(qstrcmp(qmediacontrol_iid<QtTestMediaControlA *>(), QtTestMediaControlA_iid) == 0);
-}
-
-void tst_QMediaService::control()
-{
- QtTestMediaService service;
-
- QCOMPARE(service.control<QtTestMediaControlA *>(), &service.controlA);
- QCOMPARE(service.control<QtTestMediaControlB *>(), &service.controlB);
- QVERIFY(!service.control<QtTestMediaControlC *>()); // Faulty implementation returns A.
- QVERIFY(!service.control<QtTestMediaControlD *>()); // No control of that type.
-}
-
-QTEST_MAIN(tst_QMediaService)
-
-#include "tst_qmediaservice.moc"
diff --git a/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro b/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro
deleted file mode 100644
index 69b3864..0000000
--- a/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4)
-
-SOURCES = tst_qmediaserviceprovider.cpp
-
-QT = core gui mediaservices
-
diff --git a/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp b/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp
deleted file mode 100644
index 64abedb..0000000
--- a/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp
+++ /dev/null
@@ -1,481 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QDebug>
-#include <QStringList>
-
-#include <QtMediaServices/qmediaserviceprovider.h>
-#include <QtMediaServices/qmediaserviceproviderplugin.h>
-#include <QtMediaServices/private/qmediapluginloader_p.h>
-#include <QtMediaServices/qmediaobject.h>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/qmediaplayer.h>
-
-class MockMediaService : public QMediaService
-{
- Q_OBJECT
-public:
- MockMediaService(const QString& name, QObject *parent = 0) : QMediaService(parent)
- { setObjectName(name); }
- ~MockMediaService() {}
-
- QMediaControl* control(const char *) const {return 0;}
-};
-
-class MockServicePlugin1 : public QMediaServiceProviderPlugin,
- public QMediaServiceSupportedFormatsInterface,
- public QMediaServiceSupportedDevicesInterface
-{
- Q_OBJECT
- Q_INTERFACES(QMediaServiceSupportedFormatsInterface)
- Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
-public:
- QStringList keys() const
- {
- return QStringList() <<
- QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
- }
-
- QMediaService* create(QString const& key)
- {
- if (keys().contains(key))
- return new MockMediaService("MockServicePlugin1");
- else
- return 0;
- }
-
- void release(QMediaService *service)
- {
- delete service;
- }
-
- QtMediaServices::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const
- {
- if (codecs.contains(QLatin1String("mpeg4")))
- return QtMediaServices::NotSupported;
-
- if (mimeType == "audio/ogg") {
- return QtMediaServices::ProbablySupported;
- }
-
- return QtMediaServices::MaybeSupported;
- }
-
- QStringList supportedMimeTypes() const
- {
- return QStringList("audio/ogg");
- }
-
- QList<QByteArray> devices(const QByteArray &service) const
- {
- Q_UNUSED(service);
- QList<QByteArray> res;
- return res;
- }
-
- QString deviceDescription(const QByteArray &service, const QByteArray &device)
- {
- if (devices(service).contains(device))
- return QString(device)+" description";
- else
- return QString();
- }
-};
-
-class MockServicePlugin2 : public QMediaServiceProviderPlugin,
- public QMediaServiceSupportedFormatsInterface,
- public QMediaServiceFeaturesInterface
-{
- Q_OBJECT
- Q_INTERFACES(QMediaServiceSupportedFormatsInterface)
- Q_INTERFACES(QMediaServiceFeaturesInterface)
-public:
- QStringList keys() const
- {
- return QStringList() << QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
- }
-
- QMediaService* create(QString const& key)
- {
- if (keys().contains(key))
- return new MockMediaService("MockServicePlugin2");
- else
- return 0;
- }
-
- void release(QMediaService *service)
- {
- delete service;
- }
-
- QtMediaServices::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const
- {
- Q_UNUSED(codecs);
-
- if (mimeType == "audio/wav")
- return QtMediaServices::PreferredService;
-
- return QtMediaServices::NotSupported;
- }
-
- QStringList supportedMimeTypes() const
- {
- return QStringList("audio/wav");
- }
-
- QMediaServiceProviderHint::Features supportedFeatures(const QByteArray &service) const
- {
- if (service == QByteArray(Q_MEDIASERVICE_MEDIAPLAYER))
- return QMediaServiceProviderHint::LowLatencyPlayback;
- else
- return 0;
- }
-};
-
-
-class MockServicePlugin3 : public QMediaServiceProviderPlugin,
- public QMediaServiceSupportedDevicesInterface
-{
- Q_OBJECT
- Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
-public:
- QStringList keys() const
- {
- return QStringList() <<
- QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
- }
-
- QMediaService* create(QString const& key)
- {
- if (keys().contains(key))
- return new MockMediaService("MockServicePlugin3");
- else
- return 0;
- }
-
- void release(QMediaService *service)
- {
- delete service;
- }
-
- QList<QByteArray> devices(const QByteArray &service) const
- {
- Q_UNUSED(service);
- QList<QByteArray> res;
- return res;
- }
-
- QString deviceDescription(const QByteArray &service, const QByteArray &device)
- {
- if (devices(service).contains(device))
- return QString(device)+" description";
- else
- return QString();
- }
-};
-
-class MockServicePlugin4 : public QMediaServiceProviderPlugin,
- public QMediaServiceSupportedFormatsInterface,
- public QMediaServiceFeaturesInterface
-{
- Q_OBJECT
- Q_INTERFACES(QMediaServiceSupportedFormatsInterface)
- Q_INTERFACES(QMediaServiceFeaturesInterface)
-public:
- QStringList keys() const
- {
- return QStringList() << QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER);
- }
-
- QMediaService* create(QString const& key)
- {
- if (keys().contains(key))
- return new MockMediaService("MockServicePlugin4");
- else
- return 0;
- }
-
- void release(QMediaService *service)
- {
- delete service;
- }
-
- QtMediaServices::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const
- {
- if (codecs.contains(QLatin1String("jpeg2000")))
- return QtMediaServices::NotSupported;
-
- if (supportedMimeTypes().contains(mimeType))
- return QtMediaServices::ProbablySupported;
-
- return QtMediaServices::MaybeSupported;
- }
-
- QStringList supportedMimeTypes() const
- {
- return QStringList() << "video/mp4" << "video/quicktime";
- }
-
- QMediaServiceProviderHint::Features supportedFeatures(const QByteArray &service) const
- {
- if (service == QByteArray(Q_MEDIASERVICE_MEDIAPLAYER))
- return QMediaServiceProviderHint::StreamPlayback;
- else
- return 0;
- }
-};
-
-
-
-class MockMediaServiceProvider : public QMediaServiceProvider
-{
- QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &)
- {
- Q_UNUSED(type);
- return 0;
- }
-
- void releaseService(QMediaService *service)
- {
- Q_UNUSED(service);
- }
-};
-
-
-class tst_QMediaServiceProvider : public QObject
-{
- Q_OBJECT
-
-public slots:
- void initTestCase();
-
-private slots:
- void testDefaultProviderAvailable();
- void testObtainService();
- void testHasSupport();
- void testSupportedMimeTypes();
- void testProviderHints();
-
-private:
- QObjectList plugins;
-};
-
-void tst_QMediaServiceProvider::initTestCase()
-{
- plugins << new MockServicePlugin1;
- plugins << new MockServicePlugin2;
- plugins << new MockServicePlugin3;
- plugins << new MockServicePlugin4;
-
- QMediaPluginLoader::setStaticPlugins(QLatin1String("/mediaservices"), plugins);
-}
-
-void tst_QMediaServiceProvider::testDefaultProviderAvailable()
-{
- // Must always be a default provider available
- QVERIFY(QMediaServiceProvider::defaultServiceProvider() != 0);
-}
-
-void tst_QMediaServiceProvider::testObtainService()
-{
- QMediaServiceProvider *provider = QMediaServiceProvider::defaultServiceProvider();
-
- if (provider == 0)
- QSKIP("No default provider", SkipSingle);
-
- QMediaService *service = 0;
-
- // Player
- service = provider->requestService(Q_MEDIASERVICE_MEDIAPLAYER);
- QVERIFY(service != 0);
- provider->releaseService(service);
-}
-
-void tst_QMediaServiceProvider::testHasSupport()
-{
- MockMediaServiceProvider mockProvider;
- QCOMPARE(mockProvider.hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "video/ogv", QStringList()),
- QtMediaServices::MaybeSupported);
-
- QMediaServiceProvider *provider = QMediaServiceProvider::defaultServiceProvider();
-
- if (provider == 0)
- QSKIP("No default provider", SkipSingle);
-
- QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "video/ogv", QStringList()),
- QtMediaServices::MaybeSupported);
-
- QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "audio/ogg", QStringList()),
- QtMediaServices::ProbablySupported);
-
- //while the service returns PreferredService, provider should return ProbablySupported
- QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "audio/wav", QStringList()),
- QtMediaServices::ProbablySupported);
-
- //even while all the plugins with "hasSupport" returned NotSupported,
- //MockServicePlugin3 has no "hasSupport" interface, so MaybeSupported
- QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "video/avi",
- QStringList() << "mpeg4"),
- QtMediaServices::MaybeSupported);
-
- QCOMPARE(provider->hasSupport(QByteArray("non existing service"), "video/ogv", QStringList()),
- QtMediaServices::NotSupported);
-
- QCOMPARE(QMediaPlayer::hasSupport("video/ogv"), QtMediaServices::MaybeSupported);
- QCOMPARE(QMediaPlayer::hasSupport("audio/ogg"), QtMediaServices::ProbablySupported);
- QCOMPARE(QMediaPlayer::hasSupport("audio/wav"), QtMediaServices::ProbablySupported);
-
- //test low latency flag support
- QCOMPARE(QMediaPlayer::hasSupport("audio/wav", QStringList(), QMediaPlayer::LowLatency),
- QtMediaServices::ProbablySupported);
- //plugin1 probably supports audio/ogg, it checked because it doesn't provide features iface
- QCOMPARE(QMediaPlayer::hasSupport("audio/ogg", QStringList(), QMediaPlayer::LowLatency),
- QtMediaServices::ProbablySupported);
- //Plugin4 is not checked here, sine it's known not support low latency
- QCOMPARE(QMediaPlayer::hasSupport("video/quicktime", QStringList(), QMediaPlayer::LowLatency),
- QtMediaServices::MaybeSupported);
-
- //test streaming flag support
- QCOMPARE(QMediaPlayer::hasSupport("video/quicktime", QStringList(), QMediaPlayer::StreamPlayback),
- QtMediaServices::ProbablySupported);
- //Plugin2 is not checked here, sine it's known not support streaming
- QCOMPARE(QMediaPlayer::hasSupport("audio/wav", QStringList(), QMediaPlayer::StreamPlayback),
- QtMediaServices::MaybeSupported);
-
- //ensure the correct media player plugin is choosen for mime type
- QMediaPlayer simplePlayer(0, QMediaPlayer::LowLatency);
- QCOMPARE(simplePlayer.service()->objectName(), QLatin1String("MockServicePlugin2"));
-
- QMediaPlayer mediaPlayer;
- QVERIFY(mediaPlayer.service()->objectName() != QLatin1String("MockServicePlugin2"));
-
- QMediaPlayer streamPlayer(0, QMediaPlayer::StreamPlayback);
- QCOMPARE(streamPlayer.service()->objectName(), QLatin1String("MockServicePlugin4"));
-}
-
-void tst_QMediaServiceProvider::testSupportedMimeTypes()
-{
- QMediaServiceProvider *provider = QMediaServiceProvider::defaultServiceProvider();
-
- if (provider == 0)
- QSKIP("No default provider", SkipSingle);
-
- QVERIFY(provider->supportedMimeTypes(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER)).contains("audio/ogg"));
- QVERIFY(!provider->supportedMimeTypes(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER)).contains("audio/mp3"));
-}
-
-void tst_QMediaServiceProvider::testProviderHints()
-{
- {
- QMediaServiceProviderHint hint;
- QVERIFY(hint.isNull());
- QCOMPARE(hint.type(), QMediaServiceProviderHint::Null);
- QVERIFY(hint.device().isEmpty());
- QVERIFY(hint.mimeType().isEmpty());
- QVERIFY(hint.codecs().isEmpty());
- QCOMPARE(hint.features(), 0);
- }
-
- {
- QByteArray deviceName(QByteArray("testDevice"));
- QMediaServiceProviderHint hint(deviceName);
- QVERIFY(!hint.isNull());
- QCOMPARE(hint.type(), QMediaServiceProviderHint::Device);
- QCOMPARE(hint.device(), deviceName);
- QVERIFY(hint.mimeType().isEmpty());
- QVERIFY(hint.codecs().isEmpty());
- QCOMPARE(hint.features(), 0);
- }
-
- {
- QMediaServiceProviderHint hint(QMediaServiceProviderHint::LowLatencyPlayback);
- QVERIFY(!hint.isNull());
- QCOMPARE(hint.type(), QMediaServiceProviderHint::SupportedFeatures);
- QVERIFY(hint.device().isEmpty());
- QVERIFY(hint.mimeType().isEmpty());
- QVERIFY(hint.codecs().isEmpty());
- QCOMPARE(hint.features(), QMediaServiceProviderHint::LowLatencyPlayback);
- }
-
- {
- QString mimeType(QLatin1String("video/ogg"));
- QStringList codecs;
- codecs << "theora" << "vorbis";
-
- QMediaServiceProviderHint hint(mimeType,codecs);
- QVERIFY(!hint.isNull());
- QCOMPARE(hint.type(), QMediaServiceProviderHint::ContentType);
- QVERIFY(hint.device().isEmpty());
- QCOMPARE(hint.mimeType(), mimeType);
- QCOMPARE(hint.codecs(), codecs);
-
- QMediaServiceProviderHint hint2(hint);
-
- QVERIFY(!hint2.isNull());
- QCOMPARE(hint2.type(), QMediaServiceProviderHint::ContentType);
- QVERIFY(hint2.device().isEmpty());
- QCOMPARE(hint2.mimeType(), mimeType);
- QCOMPARE(hint2.codecs(), codecs);
-
- QMediaServiceProviderHint hint3;
- QVERIFY(hint3.isNull());
- hint3 = hint;
- QVERIFY(!hint3.isNull());
- QCOMPARE(hint3.type(), QMediaServiceProviderHint::ContentType);
- QVERIFY(hint3.device().isEmpty());
- QCOMPARE(hint3.mimeType(), mimeType);
- QCOMPARE(hint3.codecs(), codecs);
-
- QCOMPARE(hint, hint2);
- QCOMPARE(hint3, hint2);
-
- QMediaServiceProviderHint hint4(mimeType,codecs);
- QCOMPARE(hint, hint4);
-
- QMediaServiceProviderHint hint5(mimeType,QStringList());
- QVERIFY(hint != hint5);
- }
-}
-
-QTEST_MAIN(tst_QMediaServiceProvider)
-
-#include "tst_qmediaserviceprovider.moc"
diff --git a/tests/auto/qmediatimerange/qmediatimerange.pro b/tests/auto/qmediatimerange/qmediatimerange.pro
deleted file mode 100644
index c5e74ce..0000000
--- a/tests/auto/qmediatimerange/qmediatimerange.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4)
-
-SOURCES = tst_qmediatimerange.cpp
-
-QT = core mediaservices
-
diff --git a/tests/auto/qmediatimerange/tst_qmediatimerange.cpp b/tests/auto/qmediatimerange/tst_qmediatimerange.cpp
deleted file mode 100644
index a21abe2..0000000
--- a/tests/auto/qmediatimerange/tst_qmediatimerange.cpp
+++ /dev/null
@@ -1,735 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QtCore/qdebug.h>
-
-#include <QtMediaServices/qmediatimerange.h>
-
-class tst_QMediaTimeRange: public QObject
-{
- Q_OBJECT
-
-public slots:
-
-private slots:
- void testCtor();
- void testGetters();
- void testAssignment();
- void testNormalize();
- void testTranslated();
- void testEarliestLatest();
- void testContains();
- void testAddInterval();
- void testAddTimeRange();
- void testRemoveInterval();
- void testRemoveTimeRange();
- void testClear();
- void testComparisons();
- void testArithmetic();
-};
-
-void tst_QMediaTimeRange::testCtor()
-{
- // Default Ctor
- QMediaTimeRange a;
- QVERIFY(a.isEmpty());
-
- // (qint, qint) Ctor
- QMediaTimeRange b(10, 20);
-
- QVERIFY(!b.isEmpty());
- QVERIFY(b.isContinuous());
- QVERIFY(b.earliestTime() == 10);
- QVERIFY(b.latestTime() == 20);
-
- // Interval Ctor
- QMediaTimeRange c(QMediaTimeInterval(30, 40));
-
- QVERIFY(!c.isEmpty());
- QVERIFY(c.isContinuous());
- QVERIFY(c.earliestTime() == 30);
- QVERIFY(c.latestTime() == 40);
-
- // Abnormal Interval Ctor
- QMediaTimeRange d(QMediaTimeInterval(20, 10));
-
- QVERIFY(d.isEmpty());
-
- // Copy Ctor
- QMediaTimeRange e(b);
-
- QVERIFY(!e.isEmpty());
- QVERIFY(e.isContinuous());
- QVERIFY(e.earliestTime() == 10);
- QVERIFY(e.latestTime() == 20);
-}
-
-void tst_QMediaTimeRange::testGetters()
-{
- QMediaTimeRange x;
-
- // isEmpty
- QVERIFY(x.isEmpty());
-
- x.addInterval(10, 20);
-
- // isEmpty + isContinuous
- QVERIFY(!x.isEmpty());
- QVERIFY(x.isContinuous());
-
- x.addInterval(30, 40);
-
- // isEmpty + isContinuous + intervals + start + end
- QVERIFY(!x.isEmpty());
- QVERIFY(!x.isContinuous());
- QVERIFY(x.intervals().count() == 2);
- QVERIFY(x.intervals()[0].start() == 10);
- QVERIFY(x.intervals()[0].end() == 20);
- QVERIFY(x.intervals()[1].start() == 30);
- QVERIFY(x.intervals()[1].end() == 40);
-}
-
-void tst_QMediaTimeRange::testAssignment()
-{
- QMediaTimeRange x;
-
- // Range Assignment
- x = QMediaTimeRange(10, 20);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(x.isContinuous());
- QVERIFY(x.earliestTime() == 10);
- QVERIFY(x.latestTime() == 20);
-
- // Interval Assignment
- x = QMediaTimeInterval(30, 40);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(x.isContinuous());
- QVERIFY(x.earliestTime() == 30);
- QVERIFY(x.latestTime() == 40);
-
- // Shared Data Check
- QMediaTimeRange y;
-
- y = x;
- y.addInterval(10, 20);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(x.isContinuous());
- QVERIFY(x.earliestTime() == 30);
- QVERIFY(x.latestTime() == 40);
-}
-
-void tst_QMediaTimeRange::testNormalize()
-{
- QMediaTimeInterval x(20, 10);
-
- QVERIFY(!x.isNormal());
-
- x = x.normalized();
-
- QVERIFY(x.isNormal());
- QVERIFY(x.start() == 10);
- QVERIFY(x.end() == 20);
-}
-
-void tst_QMediaTimeRange::testTranslated()
-{
- QMediaTimeInterval x(10, 20);
- x = x.translated(10);
-
- QVERIFY(x.start() == 20);
- QVERIFY(x.end() == 30);
-}
-
-void tst_QMediaTimeRange::testEarliestLatest()
-{
- // Test over a single interval
- QMediaTimeRange x(30, 40);
-
- QVERIFY(x.earliestTime() == 30);
- QVERIFY(x.latestTime() == 40);
-
- // Test over multiple intervals
- x.addInterval(50, 60);
-
- QVERIFY(x.earliestTime() == 30);
- QVERIFY(x.latestTime() == 60);
-}
-
-void tst_QMediaTimeRange::testContains()
-{
- // Test over a single interval
- QMediaTimeRange x(10, 20);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(x.isContinuous());
- QVERIFY(x.contains(15));
- QVERIFY(x.contains(10));
- QVERIFY(x.contains(20));
- QVERIFY(!x.contains(25));
-
- // Test over multiple intervals
- x.addInterval(40, 50);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(!x.isContinuous());
- QVERIFY(x.contains(15));
- QVERIFY(x.contains(45));
- QVERIFY(!x.contains(30));
-
- // Test over a concrete interval
- QMediaTimeInterval y(10, 20);
- QVERIFY(y.contains(15));
- QVERIFY(y.contains(10));
- QVERIFY(y.contains(20));
- QVERIFY(!y.contains(25));
-}
-
-void tst_QMediaTimeRange::testAddInterval()
-{
- // All intervals Overlap
- QMediaTimeRange x;
- x.addInterval(10, 40);
- x.addInterval(30, 50);
- x.addInterval(20, 60);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(x.isContinuous());
- QVERIFY(x.earliestTime() == 10);
- QVERIFY(x.latestTime() == 60);
-
- // 1 adjacent interval, 1 encompassed interval
- x = QMediaTimeRange();
- x.addInterval(10, 40);
- x.addInterval(20, 30);
- x.addInterval(41, 50);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(x.isContinuous());
- QVERIFY(x.earliestTime() == 10);
- QVERIFY(x.latestTime() == 50);
-
- // 1 overlapping interval, 1 disjoint interval
- x = QMediaTimeRange();
- x.addInterval(10, 30);
- x.addInterval(20, 40);
- x.addInterval(50, 60);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(!x.isContinuous());
- QVERIFY(x.intervals().count() == 2);
- QVERIFY(x.intervals()[0].start() == 10);
- QVERIFY(x.intervals()[0].end() == 40);
- QVERIFY(x.intervals()[1].start() == 50);
- QVERIFY(x.intervals()[1].end() == 60);
-
- // Identical Add
- x = QMediaTimeRange();
- x.addInterval(10, 20);
- x.addInterval(10, 20);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(x.isContinuous());
- QVERIFY(x.earliestTime() == 10);
- QVERIFY(x.latestTime() == 20);
-
- // Multi-Merge
- x = QMediaTimeRange();
- x.addInterval(10, 20);
- x.addInterval(30, 40);
- x.addInterval(50, 60);
- x.addInterval(15, 55);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(x.isContinuous());
- QVERIFY(x.earliestTime() == 10);
- QVERIFY(x.latestTime() == 60);
-
- // Interval Parameter - All intervals Overlap
- x = QMediaTimeRange();
- x.addInterval(QMediaTimeInterval(10, 40));
- x.addInterval(QMediaTimeInterval(30, 50));
- x.addInterval(QMediaTimeInterval(20, 60));
-
- QVERIFY(!x.isEmpty());
- QVERIFY(x.isContinuous());
- QVERIFY(x.earliestTime() == 10);
- QVERIFY(x.latestTime() == 60);
-
- // Interval Parameter - Abnormal Interval
- x = QMediaTimeRange();
- x.addInterval(QMediaTimeInterval(20, 10));
-
- QVERIFY(x.isEmpty());
-}
-
-void tst_QMediaTimeRange::testAddTimeRange()
-{
- // Add Time Range uses Add Interval internally,
- // so in this test the focus is on combinations of number
- // of intervals added, rather than the different types of
- // merges which can occur.
- QMediaTimeRange a, b;
-
- // Add Single into Single
- a = QMediaTimeRange(10, 30);
- b = QMediaTimeRange(20, 40);
-
- b.addTimeRange(a);
-
- QVERIFY(!b.isEmpty());
- QVERIFY(b.isContinuous());
- QVERIFY(b.earliestTime() == 10);
- QVERIFY(b.latestTime() == 40);
-
- // Add Multiple into Single
- a = QMediaTimeRange();
- a.addInterval(10, 30);
- a.addInterval(40, 60);
-
- b = QMediaTimeRange(20, 50);
-
- b.addTimeRange(a);
-
- QVERIFY(!b.isEmpty());
- QVERIFY(b.isContinuous());
- QVERIFY(b.earliestTime() == 10);
- QVERIFY(b.latestTime() == 60);
-
- // Add Single into Multiple
- a = QMediaTimeRange(20, 50);
-
- b = QMediaTimeRange();
- b.addInterval(10, 30);
- b.addInterval(40, 60);
-
- b.addTimeRange(a);
-
- QVERIFY(!b.isEmpty());
- QVERIFY(b.isContinuous());
- QVERIFY(b.earliestTime() == 10);
- QVERIFY(b.latestTime() == 60);
-
- // Add Multiple into Multiple
- a = QMediaTimeRange();
- a.addInterval(10, 30);
- a.addInterval(40, 70);
- a.addInterval(80, 100);
-
- b = QMediaTimeRange();
- b.addInterval(20, 50);
- b.addInterval(60, 90);
-
- b.addTimeRange(a);
-
- QVERIFY(!b.isEmpty());
- QVERIFY(b.isContinuous());
- QVERIFY(b.earliestTime() == 10);
- QVERIFY(b.latestTime() == 100);
-
- // Add Nothing to Single
- a = QMediaTimeRange();
- b = QMediaTimeRange(10, 20);
-
- b.addTimeRange(a);
-
- QVERIFY(!b.isEmpty());
- QVERIFY(b.isContinuous());
- QVERIFY(b.earliestTime() == 10);
- QVERIFY(b.latestTime() == 20);
-
- // Add Single to Nothing
- a = QMediaTimeRange(10, 20);
- b = QMediaTimeRange();
-
- b.addTimeRange(a);
-
- QVERIFY(!b.isEmpty());
- QVERIFY(b.isContinuous());
- QVERIFY(b.earliestTime() == 10);
- QVERIFY(b.latestTime() == 20);
-
- // Add Nothing to Nothing
- a = QMediaTimeRange();
- b = QMediaTimeRange();
-
- b.addTimeRange(a);
-
- QVERIFY(b.isEmpty());
-}
-
-void tst_QMediaTimeRange::testRemoveInterval()
-{
- // Removing an interval, causing a split
- QMediaTimeRange x;
- x.addInterval(10, 50);
- x.removeInterval(20, 40);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(!x.isContinuous());
- QVERIFY(x.intervals().count() == 2);
- QVERIFY(x.intervals()[0].start() == 10);
- QVERIFY(x.intervals()[0].end() == 19);
- QVERIFY(x.intervals()[1].start() == 41);
- QVERIFY(x.intervals()[1].end() == 50);
-
- // Removing an interval, causing a deletion
- x = QMediaTimeRange();
- x.addInterval(20, 30);
- x.removeInterval(10, 40);
-
- QVERIFY(x.isEmpty());
-
- // Removing an interval, causing a tail trim
- x = QMediaTimeRange();
- x.addInterval(20, 40);
- x.removeInterval(30, 50);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(x.isContinuous());
- QVERIFY(x.earliestTime() == 20);
- QVERIFY(x.latestTime() == 29);
-
- // Removing an interval, causing a head trim
- x = QMediaTimeRange();
- x.addInterval(20, 40);
- x.removeInterval(10, 30);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(x.isContinuous());
- QVERIFY(x.earliestTime() == 31);
- QVERIFY(x.latestTime() == 40);
-
- // Identical Remove
- x = QMediaTimeRange();
- x.addInterval(10, 20);
- x.removeInterval(10, 20);
-
- QVERIFY(x.isEmpty());
-
- // Multi-Trim
- x = QMediaTimeRange();
- x.addInterval(10, 20);
- x.addInterval(30, 40);
- x.removeInterval(15, 35);
-
- QVERIFY(!x.isEmpty());
- QVERIFY(!x.isContinuous());
- QVERIFY(x.intervals().count() == 2);
- QVERIFY(x.intervals()[0].start() == 10);
- QVERIFY(x.intervals()[0].end() == 14);
- QVERIFY(x.intervals()[1].start() == 36);
- QVERIFY(x.intervals()[1].end() == 40);
-
- // Multi-Delete
- x = QMediaTimeRange();
- x.addInterval(10, 20);
- x.addInterval(30, 40);
- x.addInterval(50, 60);
- x.removeInterval(10, 60);
-
- QVERIFY(x.isEmpty());
-
- // Interval Parameter - Removing an interval, causing a split
- x = QMediaTimeRange();
- x.addInterval(10, 50);
- x.removeInterval(QMediaTimeInterval(20, 40));
-
- QVERIFY(!x.isEmpty());
- QVERIFY(!x.isContinuous());
- QVERIFY(x.intervals().count() == 2);
- QVERIFY(x.intervals()[0].start() == 10);
- QVERIFY(x.intervals()[0].end() == 19);
- QVERIFY(x.intervals()[1].start() == 41);
- QVERIFY(x.intervals()[1].end() == 50);
-
- // Interval Parameter - Abnormal Interval
- x = QMediaTimeRange();
- x.addInterval(10, 40);
- x.removeInterval(QMediaTimeInterval(30, 20));
-
- QVERIFY(!x.isEmpty());
- QVERIFY(x.isContinuous());
- QVERIFY(x.earliestTime() == 10);
- QVERIFY(x.latestTime() == 40);
-}
-
-void tst_QMediaTimeRange::testRemoveTimeRange()
-{
- // Remove Time Range uses Remove Interval internally,
- // so in this test the focus is on combinations of number
- // of intervals removed, rather than the different types of
- // deletions which can occur.
- QMediaTimeRange a, b;
-
- // Remove Single from Single
- a = QMediaTimeRange(10, 30);
- b = QMediaTimeRange(20, 40);
-
- b.removeTimeRange(a);
-
- QVERIFY(!b.isEmpty());
- QVERIFY(b.isContinuous());
- QVERIFY(b.earliestTime() == 31);
- QVERIFY(b.latestTime() == 40);
-
- // Remove Multiple from Single
- a = QMediaTimeRange();
- a.addInterval(10, 30);
- a.addInterval(40, 60);
-
- b = QMediaTimeRange(20, 50);
-
- b.removeTimeRange(a);
-
- QVERIFY(!b.isEmpty());
- QVERIFY(b.isContinuous());
- QVERIFY(b.earliestTime() == 31);
- QVERIFY(b.latestTime() == 39);
-
- // Remove Single from Multiple
- a = QMediaTimeRange(20, 50);
-
- b = QMediaTimeRange();
- b.addInterval(10, 30);
- b.addInterval(40, 60);
-
- b.removeTimeRange(a);
-
- QVERIFY(!b.isEmpty());
- QVERIFY(!b.isContinuous());
- QVERIFY(b.intervals().count() == 2);
- QVERIFY(b.intervals()[0].start() == 10);
- QVERIFY(b.intervals()[0].end() == 19);
- QVERIFY(b.intervals()[1].start() == 51);
- QVERIFY(b.intervals()[1].end() == 60);
-
- // Remove Multiple from Multiple
- a = QMediaTimeRange();
- a.addInterval(20, 50);
- a.addInterval(50, 90);
-
-
- b = QMediaTimeRange();
- b.addInterval(10, 30);
- b.addInterval(40, 70);
- b.addInterval(80, 100);
-
- b.removeTimeRange(a);
-
- QVERIFY(!b.isEmpty());
- QVERIFY(!b.isContinuous());
- QVERIFY(b.intervals().count() == 2);
- QVERIFY(b.intervals()[0].start() == 10);
- QVERIFY(b.intervals()[0].end() == 19);
- QVERIFY(b.intervals()[1].start() == 91);
- QVERIFY(b.intervals()[1].end() == 100);
-
- // Remove Nothing from Single
- a = QMediaTimeRange();
- b = QMediaTimeRange(10, 20);
-
- b.removeTimeRange(a);
-
- QVERIFY(!b.isEmpty());
- QVERIFY(b.isContinuous());
- QVERIFY(b.earliestTime() == 10);
- QVERIFY(b.latestTime() == 20);
-
- // Remove Single from Nothing
- a = QMediaTimeRange(10, 20);
- b = QMediaTimeRange();
-
- b.removeTimeRange(a);
-
- QVERIFY(b.isEmpty());
-
- // Remove Nothing from Nothing
- a = QMediaTimeRange();
- b = QMediaTimeRange();
-
- b.removeTimeRange(a);
-
- QVERIFY(b.isEmpty());
-}
-
-void tst_QMediaTimeRange::testClear()
-{
- QMediaTimeRange x;
-
- // Clear Nothing
- x.clear();
-
- QVERIFY(x.isEmpty());
-
- // Clear Single
- x = QMediaTimeRange(10, 20);
- x.clear();
-
- QVERIFY(x.isEmpty());
-
- // Clear Multiple
- x = QMediaTimeRange();
- x.addInterval(10, 20);
- x.addInterval(30, 40);
- x.clear();
-
- QVERIFY(x.isEmpty());
-}
-
-void tst_QMediaTimeRange::testComparisons()
-{
- // Interval equality
- QVERIFY(QMediaTimeInterval(10, 20) == QMediaTimeInterval(10, 20));
- QVERIFY(QMediaTimeInterval(10, 20) != QMediaTimeInterval(10, 30));
- QVERIFY(!(QMediaTimeInterval(10, 20) != QMediaTimeInterval(10, 20)));
- QVERIFY(!(QMediaTimeInterval(10, 20) == QMediaTimeInterval(10, 30)));
-
- // Time range equality - Single Interval
- QMediaTimeRange a(10, 20), b(20, 30), c(10, 20);
-
- QVERIFY(a == c);
- QVERIFY(!(a == b));
- QVERIFY(a != b);
- QVERIFY(!(a != c));
-
- // Time Range Equality - Multiple Intervals
- QMediaTimeRange x, y, z;
-
- x.addInterval(10, 20);
- x.addInterval(30, 40);
- x.addInterval(50, 60);
-
- y.addInterval(10, 20);
- y.addInterval(35, 45);
- y.addInterval(50, 60);
-
- z.addInterval(10, 20);
- z.addInterval(30, 40);
- z.addInterval(50, 60);
-
- QVERIFY(x == z);
- QVERIFY(!(x == y));
- QVERIFY(x != y);
- QVERIFY(!(x != z));
-}
-
-void tst_QMediaTimeRange::testArithmetic()
-{
- QMediaTimeRange a(10, 20), b(20, 30);
-
- // Test +=
- a += b;
-
- QVERIFY(a.isContinuous());
- QVERIFY(a.earliestTime() == 10);
- QVERIFY(a.latestTime() == 30);
-
- // Test -=
- a -= b;
-
- QVERIFY(a.isContinuous());
- QVERIFY(a.earliestTime() == 10);
- QVERIFY(a.latestTime() == 19);
-
- // Test += and -= on intervals
- a -= QMediaTimeInterval(10, 20);
- a += QMediaTimeInterval(40, 50);
-
- QVERIFY(a.isContinuous());
- QVERIFY(a.earliestTime() == 40);
- QVERIFY(a.latestTime() == 50);
-
- // Test Interval + Interval
- a = QMediaTimeInterval(10, 20) + QMediaTimeInterval(20, 30);
- QVERIFY(a.isContinuous());
- QVERIFY(a.earliestTime() == 10);
- QVERIFY(a.latestTime() == 30);
-
- // Test Range + Interval
- a = a + QMediaTimeInterval(30, 40);
- QVERIFY(a.isContinuous());
- QVERIFY(a.earliestTime() == 10);
- QVERIFY(a.latestTime() == 40);
-
- // Test Interval + Range
- a = QMediaTimeInterval(40, 50) + a;
- QVERIFY(a.isContinuous());
- QVERIFY(a.earliestTime() == 10);
- QVERIFY(a.latestTime() == 50);
-
- // Test Range + Range
- a = a + QMediaTimeRange(50, 60);
- QVERIFY(a.isContinuous());
- QVERIFY(a.earliestTime() == 10);
- QVERIFY(a.latestTime() == 60);
-
- // Test Range - Interval
- a = a - QMediaTimeInterval(50, 60);
- QVERIFY(a.isContinuous());
- QVERIFY(a.earliestTime() == 10);
- QVERIFY(a.latestTime() == 49);
-
- // Test Range - Range
- a = a - QMediaTimeRange(40, 50);
- QVERIFY(a.isContinuous());
- QVERIFY(a.earliestTime() == 10);
- QVERIFY(a.latestTime() == 39);
-
- // Test Interval - Range
- b = QMediaTimeInterval(0, 20) - a;
- QVERIFY(b.isContinuous());
- QVERIFY(b.earliestTime() == 0);
- QVERIFY(b.latestTime() == 9);
-
- // Test Interval - Interval
- a = QMediaTimeInterval(10, 20) - QMediaTimeInterval(15, 30);
- QVERIFY(a.isContinuous());
- QVERIFY(a.earliestTime() == 10);
- QVERIFY(a.latestTime() == 14);
-}
-
-QTEST_MAIN(tst_QMediaTimeRange)
-
-#include "tst_qmediatimerange.moc"
diff --git a/tests/auto/qmessagebox/tst_qmessagebox.cpp b/tests/auto/qmessagebox/tst_qmessagebox.cpp
index 2de1c52..d4ca064 100644
--- a/tests/auto/qmessagebox/tst_qmessagebox.cpp
+++ b/tests/auto/qmessagebox/tst_qmessagebox.cpp
@@ -140,6 +140,8 @@ private:
tst_QMessageBox::tst_QMessageBox() : keyToSend(-1)
{
+ int argc = qApp->argc();
+ QT_REQUIRE_VERSION(argc, qApp->argv(), "4.6.2")
}
int tst_QMessageBox::exec(QMessageBox *msgBox, int key)
diff --git a/tests/auto/qnativesocketengine/qnativesocketengine.pro b/tests/auto/qnativesocketengine/qnativesocketengine.pro
index ad40d53..0275d37 100644
--- a/tests/auto/qnativesocketengine/qnativesocketengine.pro
+++ b/tests/auto/qnativesocketengine/qnativesocketengine.pro
@@ -9,4 +9,5 @@ MOC_DIR=tmp
QT = core network
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qnetworkaccessmanager/qnetworkaccessmanager.pro b/tests/auto/qnetworkaccessmanager/qnetworkaccessmanager.pro
index e2889c1..3ccbffb 100644
--- a/tests/auto/qnetworkaccessmanager/qnetworkaccessmanager.pro
+++ b/tests/auto/qnetworkaccessmanager/qnetworkaccessmanager.pro
@@ -2,4 +2,5 @@ load(qttest_p4)
SOURCES += tst_qnetworkaccessmanager.cpp
QT = core network
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qnetworkaccessmanager_and_qprogressdialog/qnetworkaccessmanager_and_qprogressdialog.pro b/tests/auto/qnetworkaccessmanager_and_qprogressdialog/qnetworkaccessmanager_and_qprogressdialog.pro
index 7ed5b07..378deba 100644
--- a/tests/auto/qnetworkaccessmanager_and_qprogressdialog/qnetworkaccessmanager_and_qprogressdialog.pro
+++ b/tests/auto/qnetworkaccessmanager_and_qprogressdialog/qnetworkaccessmanager_and_qprogressdialog.pro
@@ -2,4 +2,5 @@ load(qttest_p4)
SOURCES += tst_qnetworkaccessmanager_and_qprogressdialog.cpp
QT += network
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qnetworkaddressentry/qnetworkaddressentry.pro b/tests/auto/qnetworkaddressentry/qnetworkaddressentry.pro
index 8feb95f..885dbf7 100644
--- a/tests/auto/qnetworkaddressentry/qnetworkaddressentry.pro
+++ b/tests/auto/qnetworkaddressentry/qnetworkaddressentry.pro
@@ -2,3 +2,5 @@ load(qttest_p4)
SOURCES += tst_qnetworkaddressentry.cpp
QT = core network
+
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qnetworkcachemetadata/qnetworkcachemetadata.pro b/tests/auto/qnetworkcachemetadata/qnetworkcachemetadata.pro
index b24fe00..77ad347 100644
--- a/tests/auto/qnetworkcachemetadata/qnetworkcachemetadata.pro
+++ b/tests/auto/qnetworkcachemetadata/qnetworkcachemetadata.pro
@@ -2,4 +2,5 @@ load(qttest_p4)
QT += network
SOURCES += tst_qnetworkcachemetadata.cpp
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp b/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
index ce3acb7..e66719a 100644
--- a/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
+++ b/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
@@ -45,7 +45,14 @@
#include <QtNetwork/qnetworkconfiguration.h>
#include <QtNetwork/qnetworkconfigmanager.h>
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+/*
+ Although this unit test doesn't use QNetworkAccessManager
+ this include is used to ensure that bearer continues to compile against
+ Qt 4.7+ which has a QNetworkConfiguration enabled QNetworkAccessManager
+*/
+#include <QNetworkAccessManager>
+
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
#include <stdio.h>
#include <iapconf.h>
#endif
@@ -66,7 +73,7 @@ private slots:
void isRoamingAvailable();
private:
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
Maemo::IAPConf *iapconf;
Maemo::IAPConf *iapconf2;
Maemo::IAPConf *gprsiap;
@@ -78,7 +85,7 @@ private:
void tst_QNetworkConfiguration::initTestCase()
{
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
iapconf = new Maemo::IAPConf("007");
iapconf->setValue("ipv4_type", "AUTO");
iapconf->setValue("wlan_wepkey1", "connt");
@@ -151,7 +158,7 @@ void tst_QNetworkConfiguration::initTestCase()
void tst_QNetworkConfiguration::cleanupTestCase()
{
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
iapconf->clear();
delete iapconf;
iapconf2->clear();
diff --git a/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp b/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
index 7cc527c..c732a5b 100644
--- a/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
+++ b/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
@@ -45,7 +45,7 @@
#include <QtNetwork/qnetworkconfiguration.h>
#include <QtNetwork/qnetworkconfigmanager.h>
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
#include <stdio.h>
#include <iapconf.h>
#endif
@@ -67,7 +67,7 @@ private slots:
void configurationFromIdentifier();
private:
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
Maemo::IAPConf *iapconf;
Maemo::IAPConf *iapconf2;
Maemo::IAPConf *gprsiap;
@@ -79,7 +79,7 @@ private:
void tst_QNetworkConfigurationManager::initTestCase()
{
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
iapconf = new Maemo::IAPConf("007");
iapconf->setValue("ipv4_type", "AUTO");
iapconf->setValue("wlan_wepkey1", "connt");
@@ -153,7 +153,7 @@ void tst_QNetworkConfigurationManager::initTestCase()
void tst_QNetworkConfigurationManager::cleanupTestCase()
{
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
iapconf->clear();
delete iapconf;
iapconf2->clear();
diff --git a/tests/auto/qnetworkcookie/qnetworkcookie.pro b/tests/auto/qnetworkcookie/qnetworkcookie.pro
index 95d8b6e..2f31138 100644
--- a/tests/auto/qnetworkcookie/qnetworkcookie.pro
+++ b/tests/auto/qnetworkcookie/qnetworkcookie.pro
@@ -2,3 +2,4 @@ load(qttest_p4)
SOURCES += tst_qnetworkcookie.cpp
QT = core network
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qnetworkcookiejar/qnetworkcookiejar.pro b/tests/auto/qnetworkcookiejar/qnetworkcookiejar.pro
index 3a8e61b..6d75fab 100644
--- a/tests/auto/qnetworkcookiejar/qnetworkcookiejar.pro
+++ b/tests/auto/qnetworkcookiejar/qnetworkcookiejar.pro
@@ -2,3 +2,4 @@ load(qttest_p4)
SOURCES += tst_qnetworkcookiejar.cpp
QT = core network
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qnetworkdiskcache/qnetworkdiskcache.pro b/tests/auto/qnetworkdiskcache/qnetworkdiskcache.pro
index f47d6d7..3b13087 100644
--- a/tests/auto/qnetworkdiskcache/qnetworkdiskcache.pro
+++ b/tests/auto/qnetworkdiskcache/qnetworkdiskcache.pro
@@ -2,4 +2,5 @@ load(qttest_p4)
QT += network
SOURCES += tst_qnetworkdiskcache.cpp
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qnetworkinterface/qnetworkinterface.pro b/tests/auto/qnetworkinterface/qnetworkinterface.pro
index 26095e9..1c5feee 100644
--- a/tests/auto/qnetworkinterface/qnetworkinterface.pro
+++ b/tests/auto/qnetworkinterface/qnetworkinterface.pro
@@ -3,4 +3,5 @@ SOURCES += tst_qnetworkinterface.cpp
QT = core network
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qnetworkproxy/qnetworkproxy.pro b/tests/auto/qnetworkproxy/qnetworkproxy.pro
index 8ffc80c..fc0a216 100644
--- a/tests/auto/qnetworkproxy/qnetworkproxy.pro
+++ b/tests/auto/qnetworkproxy/qnetworkproxy.pro
@@ -7,4 +7,5 @@ QT = core network
SOURCES += tst_qnetworkproxy.cpp
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qnetworkreply/qnetworkreply.pro b/tests/auto/qnetworkreply/qnetworkreply.pro
index fd8454c..86d3155 100644
--- a/tests/auto/qnetworkreply/qnetworkreply.pro
+++ b/tests/auto/qnetworkreply/qnetworkreply.pro
@@ -4,3 +4,4 @@ SUBDIRS = test
requires(contains(QT_CONFIG,private_tests))
!wince*:SUBDIRS += echo
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qnetworkreply/smb-file.txt b/tests/auto/qnetworkreply/smb-file.txt
new file mode 100644
index 0000000..73c3ac2
--- /dev/null
+++ b/tests/auto/qnetworkreply/smb-file.txt
@@ -0,0 +1 @@
+This is 34 bytes. Do not change... \ No newline at end of file
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index ff79c09..01d7783 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -284,6 +284,11 @@ private Q_SLOTS:
void ignoreSslErrorsListWithSlot();
#endif
+ void getAndThenDeleteObject_data();
+ void getAndThenDeleteObject();
+
+ void symbianOpenCDataUrlCrash();
+
// NOTE: This test must be last!
void parentingRepliesToTheApp();
};
@@ -522,8 +527,8 @@ public:
active->connectToHost("127.0.0.1", server.serverPort());
#ifndef Q_OS_SYMBIAN
// need more time as working with embedded
- // device and testing from emualtor
- // things tend to get slower
+ // device and testing from emualtor
+ // things tend to get slower
if (!active->waitForConnected(1000))
return false;
@@ -929,7 +934,7 @@ void tst_QNetworkReply::invalidProtocol()
void tst_QNetworkReply::getFromData_data()
{
- QTest::addColumn<QString>("request");
+ QTest::addColumn<QString>("request");
QTest::addColumn<QByteArray>("expected");
QTest::addColumn<QString>("mimeType");
@@ -1025,7 +1030,7 @@ void tst_QNetworkReply::getFromData()
void tst_QNetworkReply::getFromFile()
{
- // create the file:
+ // create the file:
QTemporaryFile file(QDir::currentPath() + "/temp-XXXXXX");
file.setAutoRemove(true);
QVERIFY(file.open());
@@ -1073,11 +1078,14 @@ void tst_QNetworkReply::getFromFileSpecial_data()
QTest::newRow("resource") << ":/resource" << "qrc:/resource";
QTest::newRow("search-path") << "srcdir:/rfc3252.txt" << "srcdir:/rfc3252.txt";
QTest::newRow("bigfile-path") << "srcdir:/bigfile" << "srcdir:/bigfile";
+#ifdef Q_OS_WIN
+ QTest::newRow("smb-path") << "srcdir:/smb-file.txt" << "file://" + QtNetworkSettings::winServerName() + "/testshare/test.pri";
+#endif
}
void tst_QNetworkReply::getFromFileSpecial()
{
- QFETCH(QString, fileName);
+ QFETCH(QString, fileName);
QFETCH(QString, url);
// open the resource so we can find out its size
@@ -1107,7 +1115,7 @@ void tst_QNetworkReply::getFromFtp_data()
void tst_QNetworkReply::getFromFtp()
{
- QFETCH(QString, referenceName);
+ QFETCH(QString, referenceName);
QFETCH(QString, url);
QFile reference(referenceName);
@@ -1136,7 +1144,7 @@ void tst_QNetworkReply::getFromHttp_data()
void tst_QNetworkReply::getFromHttp()
{
- QFETCH(QString, referenceName);
+ QFETCH(QString, referenceName);
QFETCH(QString, url);
QFile reference(referenceName);
@@ -3456,8 +3464,8 @@ void tst_QNetworkReply::downloadProgress_data()
QTest::newRow("big") << 4096;
#else
// it can run even with 4096
- // but it takes lot time
- //especially on emulator
+ // but it takes lot time
+ //especially on emulator
QTest::newRow("big") << 1024;
#endif
}
@@ -3646,7 +3654,7 @@ void tst_QNetworkReply::receiveCookiesFromHttp_data()
void tst_QNetworkReply::receiveCookiesFromHttp()
{
- QFETCH(QString, cookieString);
+ QFETCH(QString, cookieString);
QByteArray data = cookieString.toLatin1() + '\n';
QUrl url("http://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/set-cookie.cgi");
@@ -4208,6 +4216,66 @@ void tst_QNetworkReply::ignoreSslErrorsListWithSlot()
#endif // QT_NO_OPENSSL
+void tst_QNetworkReply::getAndThenDeleteObject_data()
+{
+ QTest::addColumn<bool>("replyFirst");
+
+ QTest::newRow("delete-reply-first") << true;
+ QTest::newRow("delete-qnam-first") << false;
+}
+
+void tst_QNetworkReply::getAndThenDeleteObject()
+{
+ // yes, this will leak if the testcase fails. I don't care. It must not fail then :P
+ QNetworkAccessManager *manager = new QNetworkAccessManager();
+ QNetworkRequest request("http://" + QtNetworkSettings::serverName() + "/qtest/bigfile");
+ QNetworkReply *reply = manager->get(request);
+ reply->setReadBufferSize(1);
+ reply->setParent((QObject*)0); // must be 0 because else it is the manager
+
+ QTime stopWatch;
+ stopWatch.start();
+ forever {
+ QCoreApplication::instance()->processEvents();
+ if (reply->bytesAvailable())
+ break;
+ if (stopWatch.elapsed() >= 30000)
+ break;
+ }
+
+ QVERIFY(reply->bytesAvailable());
+ QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
+ QVERIFY(!reply->isFinished()); // must not be finished
+
+ QFETCH(bool, replyFirst);
+
+ if (replyFirst) {
+ delete reply;
+ delete manager;
+ } else {
+ delete manager;
+ delete reply;
+ }
+}
+
+// see https://bugs.webkit.org/show_bug.cgi?id=38935
+void tst_QNetworkReply::symbianOpenCDataUrlCrash()
+{
+ QString requestUrl("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAWCAYAAAA1vze2AAAAB3RJTUUH2AUSEgolrgBvVQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAARnQU1BAACxjwv8YQUAAAHlSURBVHja5VbNShxBEK6ZaXtnHTebQPA1gngNmfaeq+QNPIlIXkC9iQdJxJNvEHLN3VkxhxxE8gTmEhAVddXZ6Z3f9Ndriz89/sHmkBQUVVT1fB9d9c3uOERUKTunIdn3HzstxGpYBDS4wZk7TAJj/wlJ90J+jnuygqs8svSj+/rGHBos3rE18XBvfU3no7NzlJfUaY/5whAwl8Lr/WDUv4ODxTMb+P5xLExe5LmO559WqTX/MQR4WZYEAtSePS4pE0qSnuhnRUcBU5Gm2k9XljU4Z26I3NRxBrd80rj2fh+KNE0FY4xevRgTjREvPFpasAK8Xli6MUbbuKw3afAGgSBXozo5u4hkmncAlkl5wx8iMGbdyQjnCFEiEwGiosj1UQA/x2rVddiVoi+l4IxE0PTDnx+mrQBvvnx9cFz3krhVvuhzFn579/aq/n5rW8fbtTqiWhIQZEo17YBvbkxOXNVndnYpTvod7AtiuN2re0+siwcB9oH8VxxrNwQQAhzyRs30n7wTI2HIN2g2QtQwjjhJIQatOq7E8bIVCLwzpl83Lvtvl+NohWWlE8UZTWEMAGCcR77fHKhPnZF5tYie6dfdxCphACmLPM+j8bYfmTryg64kV9Vh3mV8jP0b/4wO/YUPiT/8i0MLf55lSQAAAABJRU5ErkJggg==");
+ QUrl url = QUrl::fromEncoded(requestUrl.toLatin1());
+ QNetworkRequest req(url);
+ QNetworkReplyPtr reply;
+
+ RUN_REQUEST(runSimpleRequest(QNetworkAccessManager::GetOperation, req, reply));
+
+ QCOMPARE(reply->url(), url);
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+
+ QCOMPARE(reply->header(QNetworkRequest::ContentLengthHeader).toLongLong(), qint64(598));
+}
+
+
+
// NOTE: This test must be last testcase in tst_qnetworkreply!
void tst_QNetworkReply::parentingRepliesToTheApp()
{
diff --git a/tests/auto/qnetworkrequest/qnetworkrequest.pro b/tests/auto/qnetworkrequest/qnetworkrequest.pro
index f576ba2..f96fd3b 100644
--- a/tests/auto/qnetworkrequest/qnetworkrequest.pro
+++ b/tests/auto/qnetworkrequest/qnetworkrequest.pro
@@ -2,3 +2,4 @@ load(qttest_p4)
SOURCES += tst_qnetworkrequest.cpp
QT = core network
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qnetworksession/lackey/main.cpp b/tests/auto/qnetworksession/lackey/main.cpp
index 8759b52..ec2fad9 100644
--- a/tests/auto/qnetworksession/lackey/main.cpp
+++ b/tests/auto/qnetworksession/lackey/main.cpp
@@ -47,6 +47,8 @@
#include <QtNetwork/qnetworkconfigmanager.h>
#include <QtNetwork/qnetworksession.h>
+#include <QEventLoop>
+#include <QTimer>
#include <QDebug>
QT_USE_NAMESPACE
@@ -60,15 +62,14 @@ int main(int argc, char** argv)
{
QCoreApplication app(argc, argv);
- // Cannot read/write to processes on WinCE or Symbian.
- // Easiest alternative is to use sockets for IPC.
-
- QLocalSocket oopSocket;
-
- oopSocket.connectToServer("tst_qnetworksession");
- oopSocket.waitForConnected(-1);
-
+ // Update configurations so that everything is up to date for this process too.
+ // Event loop is used to wait for awhile.
QNetworkConfigurationManager manager;
+ manager.updateConfigurations();
+ QEventLoop iIgnoreEventLoop;
+ QTimer::singleShot(3000, &iIgnoreEventLoop, SLOT(quit()));
+ iIgnoreEventLoop.exec();
+
QList<QNetworkConfiguration> discovered =
manager.allConfigurations(QNetworkConfiguration::Discovered);
@@ -82,6 +83,13 @@ int main(int argc, char** argv)
return NO_DISCOVERED_CONFIGURATIONS_ERROR;
}
+ // Cannot read/write to processes on WinCE or Symbian.
+ // Easiest alternative is to use sockets for IPC.
+ QLocalSocket oopSocket;
+
+ oopSocket.connectToServer("tst_qnetworksession");
+ oopSocket.waitForConnected(-1);
+
qDebug() << "Lackey started";
QNetworkSession *session = 0;
diff --git a/tests/auto/qnetworksession/qnetworksession.pro b/tests/auto/qnetworksession/qnetworksession.pro
index a85925b..34761e5 100644
--- a/tests/auto/qnetworksession/qnetworksession.pro
+++ b/tests/auto/qnetworksession/qnetworksession.pro
@@ -1,2 +1,3 @@
TEMPLATE = subdirs
SUBDIRS = lackey test
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
index 23cdc6a..e4f2486 100644
--- a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
+++ b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
@@ -48,7 +48,7 @@
#include <QtNetwork/qnetworkconfigmanager.h>
#include <QtNetwork/qnetworksession.h>
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
#include <stdio.h>
#include <iapconf.h>
#endif
@@ -100,10 +100,11 @@ private slots:
private:
QNetworkConfigurationManager manager;
+ QMap<QString, bool> testsToRun;
int inProcessSessionManagementCount;
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
Maemo::IAPConf *iapconf;
Maemo::IAPConf *iapconf2;
Maemo::IAPConf *gprsiap;
@@ -117,6 +118,7 @@ private:
bool openSession(QNetworkSession *session);
bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration = true);
void updateConfigurations();
+void printConfigurations();
QNetworkConfiguration suitableConfiguration(QString bearerType, QNetworkConfiguration::Type configType);
void tst_QNetworkSession::initTestCase()
@@ -125,8 +127,20 @@ void tst_QNetworkSession::initTestCase()
qRegisterMetaType<QNetworkSession::SessionError>("QNetworkSession::SessionError");
qRegisterMetaType<QNetworkConfiguration>("QNetworkConfiguration");
qRegisterMetaType<QNetworkConfiguration::Type>("QNetworkConfiguration::Type");
-
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+
+ // If you wish to skip tests, set value as false. This is often very convinient because tests are so lengthy.
+ // Better way still would be to make this readable from a file.
+ testsToRun["robustnessBombing"] = true;
+ testsToRun["outOfProcessSession"] = true;
+ testsToRun["invalidSession"] = true;
+ testsToRun["repeatedOpenClose"] = true;
+ testsToRun["roamingErrorCodes"] = true;
+ testsToRun["sessionStop"] = true;
+ testsToRun["sessionProperties"] = true;
+ testsToRun["userChoiceSession"] = true;
+ testsToRun["sessionOpenCloseStop"] = true;
+
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
iapconf = new Maemo::IAPConf("007");
iapconf->setValue("ipv4_type", "AUTO");
iapconf->setValue("wlan_wepkey1", "connt");
@@ -212,7 +226,7 @@ void tst_QNetworkSession::cleanupTestCase()
"inProcessSessionManagement()");
}
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
iapconf->clear();
delete iapconf;
iapconf2->clear();
@@ -238,6 +252,10 @@ void tst_QNetworkSession::cleanupTestCase()
// Robustness test for calling interfaces in nonsense order / with nonsense parameters
void tst_QNetworkSession::robustnessBombing()
{
+ if (!testsToRun["robustnessBombing"]) {
+ QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);
+ }
+
QNetworkConfigurationManager mgr;
QNetworkSession testSession(mgr.defaultConfiguration());
// Should not reset even session is not opened
@@ -245,15 +263,14 @@ void tst_QNetworkSession::robustnessBombing()
testSession.accept();
testSession.ignore();
testSession.reject();
- quint64 temp;
- temp = testSession.bytesWritten();
- temp = testSession.bytesReceived();
- temp = testSession.activeTime();
}
void tst_QNetworkSession::invalidSession()
-{
+{
+ if (!testsToRun["invalidSession"]) {
+ QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);
+ }
// 1. Verify that session created with invalid configuration remains in invalid state
QNetworkSession session(QNetworkConfiguration(), 0);
QVERIFY(!session.isOpen());
@@ -270,11 +287,24 @@ void tst_QNetworkSession::invalidSession()
QVERIFY(error == QNetworkSession::InvalidConfigurationError);
QVERIFY(session.error() == QNetworkSession::InvalidConfigurationError);
QVERIFY(session.state() == QNetworkSession::Invalid);
-
+
#ifdef QNETWORKSESSION_MANUAL_TESTS
+
+ QNetworkConfiguration invalidatedConfig = suitableConfiguration("WLAN",QNetworkConfiguration::InternetAccessPoint);
+ if (invalidatedConfig.isValid()) {
+ // 3. Verify that invalidating a session after its successfully configured works
+ QNetworkSession invalidatedSession(invalidatedConfig);
+ qDebug() << "Delete the WLAN IAP from phone now (waiting 60 seconds): " << invalidatedConfig.name();
+ QTest::qWait(60000);
+ QVERIFY(!invalidatedConfig.isValid());
+ QVERIFY(invalidatedSession.state() == QNetworkSession::Invalid);
+ qDebug() << "Add the WLAN IAP back (waiting 60 seconds): " << invalidatedConfig.name();
+ QTest::qWait(60000);
+ }
+
QNetworkConfiguration definedConfig = suitableConfiguration("WLAN",QNetworkConfiguration::InternetAccessPoint);
if (definedConfig.isValid()) {
- // 3. Verify that opening a session with defined configuration emits error and enters notavailable-state
+ // 4. Verify that opening a session with defined configuration emits error and enters notavailable-state
// TODO these timer waits should be changed to waiting appropriate signals, now these wait excessively
qDebug() << "Shutdown WLAN IAP (waiting 60 seconds): " << definedConfig.name();
QTest::qWait(60000);
@@ -283,43 +313,27 @@ void tst_QNetworkSession::invalidSession()
QNetworkSession definedSession(definedConfig);
QSignalSpy errorSpy(&definedSession, SIGNAL(error(QNetworkSession::SessionError)));
QNetworkSession::SessionError sessionError;
+ updateConfigurations();
definedSession.open();
+#ifdef Q_OS_SYMBIAN
+ // On symbian, the connection opening is tried even with defined state.
+ qDebug("Waiting for 10 seconds to all signals to propagate.");
+ QTest::qWait(10000);
+#endif
+ updateConfigurations();
QVERIFY(definedConfig.isValid()); // Session remains valid
QVERIFY(definedSession.state() == QNetworkSession::NotAvailable); // State is not available because WLAN is not in coverage
QVERIFY(!errorSpy.isEmpty()); // Session tells with error about invalidated configuration
sessionError = qvariant_cast<QNetworkSession::SessionError> (errorSpy.first().at(0));
- qDebug() << "Error code is: " << sessionError;
QVERIFY(sessionError == QNetworkSession::InvalidConfigurationError);
-
qDebug() << "Turn the WLAN IAP back on (waiting 60 seconds): " << definedConfig.name();
QTest::qWait(60000);
- updateConfigurations();
-
+ updateConfigurations();
QVERIFY(definedConfig.state() == QNetworkConfiguration::Discovered);
}
-
- QNetworkConfiguration invalidatedConfig = suitableConfiguration("WLAN",QNetworkConfiguration::InternetAccessPoint);
- if (invalidatedConfig.isValid()) {
- // 4. Verify that invalidating a session after its successfully configured works
- QNetworkSession invalidatedSession(invalidatedConfig);
- QSignalSpy errorSpy(&invalidatedSession, SIGNAL(error(QNetworkSession::SessionError)));
- QNetworkSession::SessionError sessionError;
-
- qDebug() << "Delete the WLAN IAP from phone now (waiting 60 seconds): " << invalidatedConfig.name();
- QTest::qWait(60000);
-
- invalidatedSession.open();
- QVERIFY(!invalidatedConfig.isValid());
- QVERIFY(invalidatedSession.state() == QNetworkSession::Invalid);
- QVERIFY(!errorSpy.isEmpty());
-
- sessionError = qvariant_cast<QNetworkSession::SessionError> (errorSpy.first().at(0));
- QVERIFY(sessionError == QNetworkSession::InvalidConfigurationError);
- qDebug() << "Add the WLAN IAP back (waiting 60 seconds): " << invalidatedConfig.name();
- QTest::qWait(60000);
- }
+
#endif
}
@@ -337,12 +351,12 @@ void tst_QNetworkSession::sessionProperties_data()
void tst_QNetworkSession::sessionProperties()
{
+ if (!testsToRun["sessionProperties"]) {
+ QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);
+ }
QFETCH(QNetworkConfiguration, configuration);
-
QNetworkSession session(configuration);
-
QVERIFY(session.configuration() == configuration);
-
QStringList validBearerNames = QStringList() << QLatin1String("Unknown")
<< QLatin1String("Ethernet")
<< QLatin1String("WLAN")
@@ -356,9 +370,6 @@ void tst_QNetworkSession::sessionProperties()
if (!configuration.isValid()) {
QVERIFY(configuration.bearerName().isEmpty());
} else {
- qDebug() << "Type:" << configuration.type()
- << "Bearer:" << configuration.bearerName();
-
switch (configuration.type())
{
case QNetworkConfiguration::ServiceNetwork:
@@ -374,9 +385,7 @@ void tst_QNetworkSession::sessionProperties()
// QNetworkSession::interface() should return an invalid interface unless
// session is in the connected state.
- qDebug() << "Session state:" << session.state();
#ifndef QT_NO_NETWORKINTERFACE
- qDebug() << "Session iface:" << session.interface().isValid() << session.interface().name();
#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
// On Symbian emulator, the support for data bearers is limited
QCOMPARE(session.state() == QNetworkSession::Connected, session.interface().isValid());
@@ -420,7 +429,12 @@ void tst_QNetworkSession::repeatedOpenClose_data() {
}
// Tests repeated-open close.
-void tst_QNetworkSession::repeatedOpenClose() {
+void tst_QNetworkSession::repeatedOpenClose()
+{
+ if (!testsToRun["repeatedOpenClose"]) {
+ QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);
+ }
+
QFETCH(QString, bearerType);
QFETCH(QNetworkConfiguration::Type, configurationType);
QFETCH(int, repeatTimes);
@@ -436,13 +450,20 @@ void tst_QNetworkSession::repeatedOpenClose() {
!closeSession(&permanentSession)) {
QSKIP("Unable to open/close session, skipping this round of repeated open-close test.", SkipSingle);
}
- for (int i = repeatTimes; i > 0; i--) {
+ for (int i = 0; i < repeatTimes; i++) {
+ qDebug() << "Opening, loop number " << i;
QVERIFY(openSession(&permanentSession));
+ qDebug() << "Closing, loop number, then waiting 5 seconds: " << i;
QVERIFY(closeSession(&permanentSession));
+ QTest::qWait(5000);
}
}
-void tst_QNetworkSession::roamingErrorCodes() {
+void tst_QNetworkSession::roamingErrorCodes()
+{
+ if (!testsToRun["roamingErrorCodes"]) {
+ QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);
+ }
#ifndef Q_OS_SYMBIAN
QSKIP("Roaming supported on Symbian.", SkipAll);
#else
@@ -466,41 +487,11 @@ void tst_QNetworkSession::roamingErrorCodes() {
adminIapSession.stop(); // requires NetworkControl capabilities
QTRY_VERIFY(!errorSpy.isEmpty()); // wait for error signals
QNetworkSession::SessionError error = qvariant_cast<QNetworkSession::SessionError>(errorSpy.first().at(0));
+ QTest::qWait(2000); // Wait for a moment to all platform signals to propagate
QVERIFY(error == QNetworkSession::SessionAbortedError);
QVERIFY(iapSession.state() == QNetworkSession::Disconnected);
QVERIFY(adminIapSession.state() == QNetworkSession::Disconnected);
#endif // Q_OS_SYMBIAN
-
-#ifdef QNETWORKSESSION_MANUAL_TESTS
- // Check for roaming error.
- // Case requires that you have controllable WLAN in Internet SNAP (only).
- QNetworkConfiguration snapConfig = suitableConfiguration("bearer_not_relevant_with_snaps", QNetworkConfiguration::ServiceNetwork);
- if (!snapConfig.isValid()) {
- QSKIP("No SNAP accessible, skipping test.", SkipAll);
- }
- QNetworkSession snapSession(snapConfig);
- QVERIFY(openSession(&snapSession));
- QSignalSpy errorSpySnap(&snapSession, SIGNAL(error(QNetworkSession::SessionError)));
- qDebug("Disconnect the WLAN now");
- QTRY_VERIFY(!errorSpySnap.isEmpty()); // wait for error signals
- QVERIFY(errorSpySnap.count() == 1);
- error = qvariant_cast<QNetworkSession::SessionError>(errorSpySnap.first().at(0));
- qDebug() << "Error received when turning off wlan on SNAP: " << error;
- QVERIFY(error == QNetworkSession::RoamingError);
-
- qDebug("Connect the WLAN now");
- QTest::qWait(60000); // Wait for WLAN to get up
- QNetworkConfiguration wlanIapConfig2 = suitableConfiguration("WLAN", QNetworkConfiguration::InternetAccessPoint);
- QNetworkSession iapSession2(wlanIapConfig2);
- QVERIFY(openSession(&iapSession2));
- QSignalSpy errorSpy2(&iapSession2, SIGNAL(error(QNetworkSession::SessionError)));
- qDebug("Disconnect the WLAN now");
- QTRY_VERIFY(!errorSpy2.isEmpty()); // wait for error signals
- QVERIFY(errorSpy2.count() == 1);
- error = qvariant_cast<QNetworkSession::SessionError>(errorSpy2.first().at(0));
- QVERIFY(error == QNetworkSession::SessionAbortedError);
- QVERIFY(iapSession2.state() == QNetworkSession::Disconnected);
-#endif
}
@@ -515,6 +506,9 @@ void tst_QNetworkSession::sessionStop_data() {
void tst_QNetworkSession::sessionStop()
{
+ if (!testsToRun["sessionStop"]) {
+ QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);
+ }
#ifndef Q_OS_SYMBIAN
QSKIP("Testcase contains mainly Symbian specific checks, because it is only platform to really support interface (IAP-level) Stop.", SkipAll);
#endif
@@ -522,6 +516,9 @@ void tst_QNetworkSession::sessionStop()
QFETCH(QNetworkConfiguration::Type, configurationType);
int configWaitdelayInMs = 2000;
+
+ updateConfigurations();
+ printConfigurations();
QNetworkConfiguration config = suitableConfiguration(bearerType, configurationType);
if (!config.isValid()) {
@@ -539,6 +536,9 @@ void tst_QNetworkSession::sessionStop()
QSignalSpy closedSessionStateChangedSpy(&closedSession, SIGNAL(stateChanged(QNetworkSession::State)));
QSignalSpy closedErrorSpy(&closedSession, SIGNAL(error(QNetworkSession::SessionError)));
+ QSignalSpy openedSessionClosedSpy(&openedSession, SIGNAL(closed()));
+ QSignalSpy openedSessionStateChangedSpy(&openedSession, SIGNAL(stateChanged(QNetworkSession::State)));
+
QSignalSpy innocentSessionClosedSpy(&innocentSession, SIGNAL(closed()));
QSignalSpy innocentSessionStateChangedSpy(&innocentSession, SIGNAL(stateChanged(QNetworkSession::State)));
QSignalSpy innocentErrorSpy(&innocentSession, SIGNAL(error(QNetworkSession::SessionError)));
@@ -554,10 +554,18 @@ void tst_QNetworkSession::sessionStop()
closedSessionClosedSpy.clear();
closedSessionStateChangedSpy.clear();
closedErrorSpy.clear();
+ openedSessionStateChangedSpy.clear();
+ openedSessionClosedSpy.clear();
+
openedSession.stop();
- QVERIFY(openedSession.state() == QNetworkSession::Disconnected);
+ qDebug("Waiting for %d ms to get all configurationChange signals from platform.", configWaitdelayInMs);
QTest::qWait(configWaitdelayInMs); // Wait to get all relevant configurationChange() signals
+
+ // First to closing, then to disconnected
+ QVERIFY(openedSessionStateChangedSpy.count() == 2);
+ QVERIFY(!openedSessionClosedSpy.isEmpty());
+ QVERIFY(openedSession.state() == QNetworkSession::Disconnected);
QVERIFY(config.state() != QNetworkConfiguration::Active);
// 2. Verify that stopping a session based on non-connected configuration does nothing
@@ -583,18 +591,20 @@ void tst_QNetworkSession::sessionStop()
// 3. Check that stopping a opened session affects also other opened session based on the same configuration.
if (config.type() == QNetworkConfiguration::InternetAccessPoint) {
qDebug("----------3. Check that stopping a opened session affects also other opened session based on the same configuration.");
+
QVERIFY(openSession(&openedSession));
QVERIFY(openSession(&innocentSession));
-
+
configChangeSpy.clear();
innocentSessionClosedSpy.clear();
innocentSessionStateChangedSpy.clear();
innocentErrorSpy.clear();
-
+
openedSession.stop();
qDebug("Waiting for %d ms to get all configurationChange signals from platform.", configWaitdelayInMs);
QTest::qWait(configWaitdelayInMs); // Wait to get all relevant configurationChange() signals
-
+ QTest::qWait(configWaitdelayInMs); // Wait to get all relevant configurationChange() signals
+
QVERIFY(!innocentSessionClosedSpy.isEmpty());
QVERIFY(!innocentSessionStateChangedSpy.isEmpty());
QVERIFY(!innocentErrorSpy.isEmpty());
@@ -614,14 +624,19 @@ void tst_QNetworkSession::sessionStop()
if (config.type() == QNetworkConfiguration::ServiceNetwork) {
qDebug("----------4. Skip for SNAP configuration.");
} else if (config.type() == QNetworkConfiguration::InternetAccessPoint) {
- qDebug("----------4. Check that stopping a non-opened session stops the other session based on the same configuration");
- QVERIFY(openSession(&innocentSession));
+ qDebug("----------4. Check that stopping a non-opened session stops the other session based on the same configuration");
+ qDebug("----------4.1 Opening innocent session");
+ QVERIFY(openSession(&innocentSession));
qDebug("Waiting for %d ms after open to make sure all platform indications are propagated", configWaitdelayInMs);
QTest::qWait(configWaitdelayInMs);
+ qDebug("----------4.2 Calling closedSession.stop()");
closedSession.stop();
qDebug("Waiting for %d ms to get all configurationChange signals from platform..", configWaitdelayInMs);
QTest::qWait(configWaitdelayInMs); // Wait to get all relevant configurationChange() signals
+ QTest::qWait(configWaitdelayInMs);
+ QTest::qWait(configWaitdelayInMs);
+
QVERIFY(!innocentSessionClosedSpy.isEmpty());
QVERIFY(!innocentSessionStateChangedSpy.isEmpty());
QVERIFY(!innocentErrorSpy.isEmpty());
@@ -653,6 +668,9 @@ void tst_QNetworkSession::userChoiceSession_data()
void tst_QNetworkSession::userChoiceSession()
{
+ if (!testsToRun["userChoiceSession"]) {
+ QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);
+ }
QFETCH(QNetworkConfiguration, configuration);
QVERIFY(configuration.type() == QNetworkConfiguration::UserChoice);
@@ -682,7 +700,20 @@ void tst_QNetworkSession::userChoiceSession()
session.open();
+#if defined(Q_OS_SYMBIAN)
+ // Opening & closing multiple connections in a row sometimes
+ // results hanging of connection opening on Symbian devices
+ // => If first open fails, wait a moment and try again.
+ if (!session.waitForOpened()) {
+ qDebug("**** Session open Timeout - Wait 5 seconds and try once again ****");
+ session.close();
+ QTest::qWait(5000); // Wait a while before trying to open session again
+ session.open();
+ session.waitForOpened();
+ }
+#else
session.waitForOpened();
+#endif
if (session.isOpen())
QVERIFY(!sessionOpenedSpy.isEmpty() || !errorSpy.isEmpty());
@@ -786,6 +817,9 @@ void tst_QNetworkSession::sessionOpenCloseStop_data()
void tst_QNetworkSession::sessionOpenCloseStop()
{
+ if (!testsToRun["sessionOpenCloseStop"]) {
+ QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);
+ }
QFETCH(QNetworkConfiguration, configuration);
QFETCH(bool, forceSessionStop);
@@ -818,7 +852,20 @@ void tst_QNetworkSession::sessionOpenCloseStop()
session.open();
+#if defined(Q_OS_SYMBIAN)
+ // Opening & closing multiple connections in a row sometimes
+ // results hanging of connection opening on Symbian devices
+ // => If first open fails, wait a moment and try again.
+ if (!session.waitForOpened()) {
+ qDebug("**** Session open Timeout - Wait 5 seconds and try once again ****");
+ session.close();
+ QTest::qWait(5000); // Wait a while before trying to open session again
+ session.open();
+ session.waitForOpened();
+ }
+#else
session.waitForOpened();
+#endif
if (session.isOpen())
QVERIFY(!sessionOpenedSpy.isEmpty() || !errorSpy.isEmpty());
@@ -894,26 +941,30 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QVERIFY(session.error() == QNetworkSession::UnknownSessionError);
session2.open();
-
+
QTRY_VERIFY(!sessionOpenedSpy2.isEmpty() || !errorSpy2.isEmpty());
+ if (errorSpy2.isEmpty()) {
+ QVERIFY(session2.isOpen());
+ QVERIFY(session2.state() == QNetworkSession::Connected);
+ }
QVERIFY(session.isOpen());
- QVERIFY(session2.isOpen());
QVERIFY(session.state() == QNetworkSession::Connected);
- QVERIFY(session2.state() == QNetworkSession::Connected);
#ifndef QT_NO_NETWORKINTERFACE
#if !(defined(Q_OS_SYMBIAN) && defined(__WINS__))
// On Symbian emulator, the support for data bearers is limited
QVERIFY(session.interface().isValid());
#endif
- QCOMPARE(session.interface().hardwareAddress(), session2.interface().hardwareAddress());
- QCOMPARE(session.interface().index(), session2.interface().index());
+ if (errorSpy2.isEmpty()) {
+ QCOMPARE(session.interface().hardwareAddress(), session2.interface().hardwareAddress());
+ QCOMPARE(session.interface().index(), session2.interface().index());
+ }
#endif
}
sessionOpenedSpy2.clear();
- if (forceSessionStop) {
+ if (forceSessionStop && session2.isOpen()) {
// Test forcing the second session to stop the interface.
QNetworkSession::State previousState = session.state();
#ifdef Q_CC_NOKIAX86
@@ -922,15 +973,17 @@ void tst_QNetworkSession::sessionOpenCloseStop()
#else
bool expectStateChange = previousState != QNetworkSession::Disconnected;
#endif
-
session2.stop();
+ // QNetworkSession::stop() must result either closed() signal
+ // or error() signal
QTRY_VERIFY(!sessionClosedSpy2.isEmpty() || !errorSpy2.isEmpty());
-
QVERIFY(!session2.isOpen());
if (!errorSpy2.isEmpty()) {
- QVERIFY(!errorSpy.isEmpty());
+ // QNetworkSession::stop() resulted error() signal for session2
+ // => also session should emit error() signal
+ QTRY_VERIFY(!errorSpy.isEmpty());
// check for SessionAbortedError
QNetworkSession::SessionError error =
@@ -950,9 +1003,12 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QVERIFY(errorSpy.isEmpty());
QVERIFY(errorSpy2.isEmpty());
-
+
+ // Wait for Disconnected state
+ QTRY_NOOP(session2.state() == QNetworkSession::Disconnected);
+
if (expectStateChange)
- QTRY_VERIFY(stateChangedSpy2.count() >= 2 || !errorSpy2.isEmpty());
+ QTRY_VERIFY(stateChangedSpy2.count() >= 1 || !errorSpy2.isEmpty());
if (!errorSpy2.isEmpty()) {
QVERIFY(session2.state() == previousState);
@@ -996,16 +1052,29 @@ void tst_QNetworkSession::sessionOpenCloseStop()
state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(3).at(0));
QVERIFY(state == QNetworkSession::Disconnected);
+
+ QTRY_VERIFY(session.state() == QNetworkSession::Roaming ||
+ session.state() == QNetworkSession::Connected ||
+ session.state() == QNetworkSession::Disconnected);
+
QTRY_VERIFY(stateChangedSpy.count() > 0);
- state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(0).at(0));
+ state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 1).at(0));
+
if (state == QNetworkSession::Roaming) {
- QTRY_VERIFY(!errorSpy.isEmpty() || stateChangedSpy.count() > 1);
- if (stateChangedSpy.count() > 1 &&
- qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(1).at(0)) ==
- QNetworkSession::Connected) {
- roamedSuccessfully = true;
+ QTRY_VERIFY(session.state() == QNetworkSession::Connected);
+ QTRY_VERIFY(session2.state() == QNetworkSession::Connected);
+ roamedSuccessfully = true;
+ } else if (state == QNetworkSession::Disconnected) {
+ QTRY_VERIFY(!errorSpy.isEmpty());
+ QTRY_VERIFY(session2.state() == QNetworkSession::Disconnected);
+ } else if (state == QNetworkSession::Connected) {
+ QTRY_VERIFY(errorSpy.isEmpty());
+ if (stateChangedSpy.count() > 1) {
+ state = qvariant_cast<QNetworkSession::State>(stateChangedSpy.at(stateChangedSpy.count() - 2).at(0));
+ QVERIFY(state == QNetworkSession::Roaming);
}
- }
+ roamedSuccessfully = true;
+ }
if (roamedSuccessfully) {
QString configId = session.sessionProperty("ActiveConfiguration").toString();
@@ -1013,37 +1082,36 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QNetworkSession session3(config);
QSignalSpy errorSpy3(&session3, SIGNAL(error(QNetworkSession::SessionError)));
QSignalSpy sessionOpenedSpy3(&session3, SIGNAL(opened()));
-
session3.open();
- session3.waitForOpened();
-
+ session3.waitForOpened();
if (session.isOpen())
QVERIFY(!sessionOpenedSpy3.isEmpty() || !errorSpy3.isEmpty());
-
session.stop();
-
QTRY_VERIFY(session.state() == QNetworkSession::Disconnected);
- QTRY_VERIFY(session3.state() == QNetworkSession::Disconnected);
}
#ifndef Q_CC_NOKIAX86
if (!roamedSuccessfully)
QVERIFY(!errorSpy.isEmpty());
#endif
} else {
- QCOMPARE(stateChangedSpy2.count(), 2);
-
- QNetworkSession::State state =
- qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(0).at(0));
- QVERIFY(state == QNetworkSession::Closing);
-
- state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(1).at(0));
- QVERIFY(state == QNetworkSession::Disconnected);
+ QTest::qWait(2000); // Wait awhile to get all signals from platform
+
+ if (stateChangedSpy2.count() == 2) {
+ QNetworkSession::State state =
+ qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(0).at(0));
+ QVERIFY(state == QNetworkSession::Closing);
+ state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(1).at(0));
+ QVERIFY(state == QNetworkSession::Disconnected);
+ } else { // Assume .count() == 1
+ QCOMPARE(stateChangedSpy2.count(), 1);
+ QNetworkSession::State state = qvariant_cast<QNetworkSession::State>(stateChangedSpy2.at(0).at(0));
+ // Symbian version dependant.
+ QVERIFY(state == QNetworkSession::Disconnected);
+ }
}
QTRY_VERIFY(!sessionClosedSpy.isEmpty());
-
QTRY_VERIFY(session.state() == QNetworkSession::Disconnected);
- QTRY_VERIFY(session2.state() == QNetworkSession::Disconnected);
}
QVERIFY(errorSpy2.isEmpty());
@@ -1062,7 +1130,7 @@ void tst_QNetworkSession::sessionOpenCloseStop()
QVERIFY(!session.isOpen());
#endif
QVERIFY(!session2.isOpen());
- } else {
+ } else if (session2.isOpen()) {
// Test closing the second session.
{
int stateChangedCountBeforeClose = stateChangedSpy2.count();
@@ -1161,11 +1229,15 @@ QDebug operator<<(QDebug debug, const QList<QNetworkConfiguration> &list)
// at Discovered -state.
void tst_QNetworkSession::outOfProcessSession()
{
- qDebug() << "START";
-
+ if (!testsToRun["outOfProcessSession"]) {
+ QSKIP("Temporary skip due to value set false (or it is missing) in testsToRun map", SkipAll);
+ }
#if defined(Q_OS_SYMBIAN) && defined(__WINS__)
QSKIP("Symbian emulator does not support two [QR]PRocesses linking a dll (QtBearer.dll) with global writeable static data.", SkipAll);
#endif
+ updateConfigurations();
+ QTest::qWait(2000);
+
QNetworkConfigurationManager manager;
// Create a QNetworkConfigurationManager to detect configuration changes made in Lackey. This
// is actually the essence of this testcase - to check that platform mediates/reflects changes
@@ -1182,16 +1254,15 @@ void tst_QNetworkSession::outOfProcessSession()
QLocalServer::removeServer("tst_qnetworksession");
oopServer.listen("tst_qnetworksession");
- qDebug() << "starting lackey";
QProcess lackey;
lackey.start("lackey/lackey");
qDebug() << lackey.error() << lackey.errorString();
QVERIFY(lackey.waitForStarted());
- qDebug() << "waiting for connection";
+
QVERIFY(oopServer.waitForNewConnection(-1));
QLocalSocket *oopSocket = oopServer.nextPendingConnection();
- qDebug() << "got connection";
+
do {
QByteArray output;
@@ -1258,7 +1329,6 @@ void tst_QNetworkSession::outOfProcessSession()
default:
QSKIP("Lackey failed", SkipAll);
}
- qDebug("STOP");
}
// A convinience / helper function for testcases. Return the first matching configuration.
@@ -1269,6 +1339,7 @@ QNetworkConfiguration suitableConfiguration(QString bearerType, QNetworkConfigur
// Refresh configurations and derive configurations matching given parameters.
QNetworkConfigurationManager mgr;
QSignalSpy updateSpy(&mgr, SIGNAL(updateCompleted()));
+
mgr.updateConfigurations();
QTRY_NOOP(updateSpy.count() == 1);
if (updateSpy.count() != 1) {
@@ -1277,8 +1348,7 @@ QNetworkConfiguration suitableConfiguration(QString bearerType, QNetworkConfigur
}
QList<QNetworkConfiguration> discoveredConfigs = mgr.allConfigurations(QNetworkConfiguration::Discovered);
foreach(QNetworkConfiguration config, discoveredConfigs) {
- if ((config.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
- // qDebug() << "Dumping config because is active: " << config.name();
+ if ((config.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
discoveredConfigs.removeOne(config);
} else if (config.type() != configType) {
// qDebug() << "Dumping config because type (IAP/SNAP) mismatches: " << config.name();
@@ -1315,9 +1385,23 @@ void updateConfigurations()
QTRY_NOOP(updateSpy.count() == 1);
}
+// A convinience-function: updates and prints all available confiurations and their states
+void printConfigurations()
+{
+ QNetworkConfigurationManager manager;
+ QList<QNetworkConfiguration> allConfigs =
+ manager.allConfigurations();
+ qDebug("tst_QNetworkSession::printConfigurations QNetworkConfigurationManager gives following configurations: ");
+ foreach(QNetworkConfiguration config, allConfigs) {
+ qDebug() << "Name of the configuration: " << config.name();
+ qDebug() << "State of the configuration: " << config.state();
+ }
+}
+
// A convinience function for test-cases: opens the given configuration and return
// true if it was done gracefully.
bool openSession(QNetworkSession *session) {
+ bool result = true;
QNetworkConfigurationManager mgr;
QSignalSpy openedSpy(session, SIGNAL(opened()));
QSignalSpy stateChangeSpy(session, SIGNAL(stateChanged(QNetworkSession::State)));
@@ -1327,43 +1411,57 @@ bool openSession(QNetworkSession *session) {
// active by some other session
QNetworkConfiguration::StateFlags configInitState = session->configuration().state();
QNetworkSession::State sessionInitState = session->state();
+ qDebug() << "tst_QNetworkSession::openSession() name of the configuration to be opened: " << session->configuration().name();
+ qDebug() << "tst_QNetworkSession::openSession() state of the configuration to be opened: " << session->configuration().state();
+ qDebug() << "tst_QNetworkSession::openSession() state of the session to be opened: " << session->state();
if (session->isOpen() ||
!session->sessionProperty("ActiveConfiguration").toString().isEmpty()) {
qDebug("tst_QNetworkSession::openSession() failure: session was already open / active.");
- return false;
+ result = false;
} else {
session->open();
session->waitForOpened(120000); // Bringing interfaces up and down may take time at platform
}
+ QTest::qWait(5000); // Wait a moment to ensure all signals are propagated
// Check that connection opening went by the book. Add checks here if more strictness needed.
if (!session->isOpen()) {
qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::open() failed.");
- return false;
+ result = false;
}
if (openedSpy.count() != 1) {
qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::opened() - signal not received.");
- return false;
+ result = false;
}
if (!errorSpy.isEmpty()) {
qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::error() - signal was detected.");
- return false;
+ result = false;
}
if (sessionInitState != QNetworkSession::Connected &&
stateChangeSpy.isEmpty()) {
qDebug("tst_QNetworkSession::openSession() failure: QNetworkSession::stateChanged() - signals not detected.");
- return false;
+ result = false;
}
if (configInitState != QNetworkConfiguration::Active &&
configChangeSpy.isEmpty()) {
qDebug("tst_QNetworkSession::openSession() failure: QNetworkConfigurationManager::configurationChanged() - signals not detected.");
- return false;
+ result = false;
}
if (session->configuration().state() != QNetworkConfiguration::Active) {
qDebug("tst_QNetworkSession::openSession() failure: session's configuration is not in 'Active' -state.");
- return false;
+ qDebug() << "tst_QNetworkSession::openSession() state is: " << session->configuration().state();
+ result = false;
+ }
+ if (result == false) {
+ qDebug() << "tst_QNetworkSession::openSession() opening session failed.";
+ } else {
+ qDebug() << "tst_QNetworkSession::openSession() opening session succeeded.";
}
- return true;
+ qDebug() << "tst_QNetworkSession::openSession() name of the configuration is: " << session->configuration().name();
+ qDebug() << "tst_QNetworkSession::openSession() configuration state is: " << session->configuration().state();
+ qDebug() << "tst_QNetworkSession::openSession() session state is: " << session->state();
+
+ return result;
}
// Helper function for closing opened session. Performs checks that
@@ -1376,6 +1474,11 @@ bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration) {
qDebug("tst_QNetworkSession::closeSession() failure: NULL session given");
return false;
}
+
+ qDebug() << "tst_QNetworkSession::closeSession() name of the configuration to be closed: " << session->configuration().name();
+ qDebug() << "tst_QNetworkSession::closeSession() state of the configuration to be closed: " << session->configuration().state();
+ qDebug() << "tst_QNetworkSession::closeSession() state of the session to be closed: " << session->state();
+
if (session->state() != QNetworkSession::Connected ||
!session->isOpen()) {
qDebug("tst_QNetworkSession::closeSession() failure: session is not opened.");
@@ -1387,38 +1490,48 @@ bool closeSession(QNetworkSession *session, bool lastSessionOnConfiguration) {
QSignalSpy sessionErrorSpy(session, SIGNAL(error(QNetworkSession::SessionError)));
QSignalSpy configChangeSpy(&mgr, SIGNAL(configurationChanged(QNetworkConfiguration)));
+ bool result = true;
session->close();
+ QTest::qWait(5000); // Wait a moment so that all signals are propagated
if (!sessionErrorSpy.isEmpty()) {
qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::error() received.");
- return false;
+ result = false;
}
if (sessionClosedSpy.count() != 1) {
qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::closed() signal not received.");
- return false;
+ result = false;
}
if (lastSessionOnConfiguration &&
sessionStateChangedSpy.isEmpty()) {
qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession::stateChanged() signals not received.");
- return false;
+ result = false;
}
if (lastSessionOnConfiguration &&
session->state() != QNetworkSession::Disconnected) {
qDebug("tst_QNetworkSession::closeSession() failure: QNetworkSession is not in Disconnected -state");
- return false;
+ result = false;
}
QTRY_NOOP(!configChangeSpy.isEmpty());
if (lastSessionOnConfiguration &&
configChangeSpy.isEmpty()) {
qDebug("tst_QNetworkSession::closeSession() failure: QNetworkConfigurationManager::configurationChanged() - signal not detected.");
- return false;
+ result = false;
}
if (lastSessionOnConfiguration &&
session->configuration().state() == QNetworkConfiguration::Active) {
qDebug("tst_QNetworkSession::closeSession() failure: session's configuration is still in active state.");
- return false;
+ result = false;
}
- return true;
+ if (result == false) {
+ qDebug() << "tst_QNetworkSession::closeSession() closing session failed.";
+ } else {
+ qDebug() << "tst_QNetworkSession::closeSession() closing session succeeded.";
+ }
+ qDebug() << "tst_QNetworkSession::closeSession() name of the configuration is: " << session->configuration().name();
+ qDebug() << "tst_QNetworkSession::closeSession() configuration state is: " << session->configuration().state();
+ qDebug() << "tst_QNetworkSession::closeSession() session state is: " << session->state();
+ return result;
}
void tst_QNetworkSession::sessionAutoClose_data()
diff --git a/tests/auto/qpixmapcache/tst_qpixmapcache.cpp b/tests/auto/qpixmapcache/tst_qpixmapcache.cpp
index f8951f5..70f2ac3 100644
--- a/tests/auto/qpixmapcache/tst_qpixmapcache.cpp
+++ b/tests/auto/qpixmapcache/tst_qpixmapcache.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#define Q_TEST_QPIXMAPCACHE
#include <QtTest/QtTest>
@@ -152,6 +153,7 @@ void tst_QPixmapCache::setCacheLimit()
p1 = new QPixmap(2, 3);
key = QPixmapCache::insert(*p1);
QVERIFY(QPixmapCache::find(key, p1) != 0);
+ p1->detach(); // dectach so that the cache thinks no-one is using it.
QPixmapCache::setCacheLimit(0);
QVERIFY(QPixmapCache::find(key, p1) == 0);
QPixmapCache::setCacheLimit(1000);
@@ -169,6 +171,8 @@ void tst_QPixmapCache::setCacheLimit()
key = QPixmapCache::insert(*p1);
QVERIFY(QPixmapCache::find(key, &p2) != 0);
//we flush the cache
+ p1->detach();
+ p2.detach();
QPixmapCache::setCacheLimit(0);
QPixmapCache::setCacheLimit(1000);
QPixmapCache::Key key2 = QPixmapCache::insert(*p1);
@@ -180,21 +184,25 @@ void tst_QPixmapCache::setCacheLimit()
delete p1;
//Here we simulate the flushing when the app is idle
- /*QPixmapCache::clear();
+ QPixmapCache::clear();
QPixmapCache::setCacheLimit(originalCacheLimit);
p1 = new QPixmap(300, 300);
key = QPixmapCache::insert(*p1);
+ p1->detach();
QCOMPARE(getPrivate(key)->key, 1);
key2 = QPixmapCache::insert(*p1);
+ p1->detach();
key2 = QPixmapCache::insert(*p1);
+ p1->detach();
QPixmapCache::Key key3 = QPixmapCache::insert(*p1);
- QTest::qWait(32000);
+ p1->detach();
+ QPixmapCache::flushDetachedPixmaps();
key2 = QPixmapCache::insert(*p1);
QCOMPARE(getPrivate(key2)->key, 1);
//This old key is not valid anymore after the flush
QCOMPARE(getPrivate(key)->isValid, false);
QVERIFY(QPixmapCache::find(key, &p2) == 0);
- delete p1;*/
+ delete p1;
}
void tst_QPixmapCache::find()
@@ -225,12 +233,14 @@ void tst_QPixmapCache::find()
QPixmapCache::clear();
QPixmapCache::setCacheLimit(128);
- key = QPixmapCache::insert(p1);
+ QPixmap p4(10,10);
+ key = QPixmapCache::insert(p4);
+ p4.detach();
- //The int part of the API
+ QPixmap p5(10,10);
QList<QPixmapCache::Key> keys;
for (int i = 0; i < 4000; ++i)
- QPixmapCache::insert(p1);
+ QPixmapCache::insert(p5);
//at that time the first key has been erase because no more place in the cache
QVERIFY(QPixmapCache::find(key, &p1) == 0);
@@ -257,8 +267,10 @@ void tst_QPixmapCache::insert()
QPixmapCache::insert("0", p1);
// ditto
- for (int j = 0; j < numberOfKeys; ++j)
- QPixmapCache::insert(QString::number(j), p1);
+ for (int j = 0; j < numberOfKeys; ++j) {
+ QPixmap p3(10, 10);
+ QPixmapCache::insert(QString::number(j), p3);
+ }
int num = 0;
for (int k = 0; k < numberOfKeys; ++k) {
@@ -286,8 +298,10 @@ void tst_QPixmapCache::insert()
//The int part of the API
// make sure it doesn't explode
QList<QPixmapCache::Key> keys;
- for (int i = 0; i < numberOfKeys; ++i)
- keys.append(QPixmapCache::insert(p1));
+ for (int i = 0; i < numberOfKeys; ++i) {
+ QPixmap p3(10,10);
+ keys.append(QPixmapCache::insert(p3));
+ }
num = 0;
for (int k = 0; k < numberOfKeys; ++k) {
diff --git a/tests/auto/qprinter/tst_qprinter.cpp b/tests/auto/qprinter/tst_qprinter.cpp
index 49bddb2..8b79533 100644
--- a/tests/auto/qprinter/tst_qprinter.cpp
+++ b/tests/auto/qprinter/tst_qprinter.cpp
@@ -110,6 +110,7 @@ private slots:
void testCurrentPage();
void taskQTBUG4497_reusePrinterOnDifferentFiles();
+ void testPdfTitle();
private:
};
@@ -417,7 +418,7 @@ void tst_QPrinter::testMargins()
printer.setFullPage(fullpage);
printer.setPageSize((QPrinter::PageSize)pagesize);
if (withPainter)
- painter = new QPainter(&printer);
+ painter = new QPainter(&printer);
#ifdef QT3_SUPPORT
Q3PaintDeviceMetrics metrics(&printer);
@@ -1028,5 +1029,30 @@ void tst_QPrinter::testCurrentPage()
}
+void tst_QPrinter::testPdfTitle()
+{
+ // Check the document name is represented correctly in produced pdf
+ {
+ QPainter painter;
+ QPrinter printer;
+ // This string is just the UTF-8 encoding of the string: \()f &oslash; hiragana o
+ const char title[]={0x5c, 0x28, 0x29, 0x66, 0xc3, 0xb8, 0xe3, 0x81, 0x8a, 0x00};
+ printer.setOutputFileName("file.pdf");
+ printer.setDocName(QString::fromUtf8(title));
+ painter.begin(&printer);
+ painter.end();
+ }
+ QFile file("file.pdf");
+ QVERIFY(file.open(QIODevice::ReadOnly));
+ // The we expect the title to appear in the PDF as:
+ // ASCII('\title (') UTF16(\\\(\)f &oslash; hiragana o) ASCII(')').
+ // which has the following binary representation
+ const char expected[] = {
+ 0x2f, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x20, 0x28, 0xfe,
+ 0xff, 0x00, 0x5c, 0x5c, 0x00, 0x5c, 0x28, 0x00, 0x5c,
+ 0x29, 0x00, 0x66, 0x00, 0xf8, 0x30, 0x4a, 0x29};
+ QVERIFY(file.readAll().contains(QByteArray(expected, 26)));
+}
+
QTEST_MAIN(tst_QPrinter)
#include "tst_qprinter.moc"
diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
index 849b8b2..ea527de 100644
--- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
+++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
@@ -133,6 +133,7 @@ private slots:
void twoAnimations();
void deletedInUpdateCurrentTime();
void totalDuration();
+ void zeroLoopCount();
};
tst_QPropertyAnimation::tst_QPropertyAnimation()
@@ -1214,6 +1215,29 @@ void tst_QPropertyAnimation::totalDuration()
QCOMPARE(anim.totalDuration(), 0);
}
+void tst_QPropertyAnimation::zeroLoopCount()
+{
+ DummyPropertyAnimation* anim;
+ anim = new DummyPropertyAnimation;
+ anim->setStartValue(0);
+ anim->setDuration(20);
+ anim->setLoopCount(0);
+
+ QSignalSpy runningSpy(anim, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));
+ QSignalSpy finishedSpy(anim, SIGNAL(finished()));
+
+ QCOMPARE(anim->state(), QAnimationGroup::Stopped);
+ QCOMPARE(anim->currentValue().toInt(), 0);
+ QCOMPARE(runningSpy.count(), 0);
+ QCOMPARE(finishedSpy.count(), 0);
+
+ anim->start();
+
+ QCOMPARE(anim->state(), QAnimationGroup::Stopped);
+ QCOMPARE(anim->currentValue().toInt(), 0);
+ QCOMPARE(runningSpy.count(), 0);
+ QCOMPARE(finishedSpy.count(), 0);
+}
QTEST_MAIN(tst_QPropertyAnimation)
#include "tst_qpropertyanimation.moc"
diff --git a/tests/auto/qsocketnotifier/qsocketnotifier.pro b/tests/auto/qsocketnotifier/qsocketnotifier.pro
index ec924c1..c43c96a 100644
--- a/tests/auto/qsocketnotifier/qsocketnotifier.pro
+++ b/tests/auto/qsocketnotifier/qsocketnotifier.pro
@@ -6,5 +6,6 @@ requires(contains(QT_CONFIG,private_tests))
include(../qnativesocketengine/qsocketengine.pri)
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qsocks5socketengine/qsocks5socketengine.pro b/tests/auto/qsocks5socketengine/qsocks5socketengine.pro
index 4a32852..cd5e6e7 100644
--- a/tests/auto/qsocks5socketengine/qsocks5socketengine.pro
+++ b/tests/auto/qsocks5socketengine/qsocks5socketengine.pro
@@ -11,6 +11,7 @@ QT = core network
# Symbian toolchain does not support correct include semantics
symbian:INCPATH+=..\..\..\include\QtNetwork\private
+symbian: TARGET.CAPABILITY = NetworkServices
requires(contains(QT_CONFIG,private_tests))
diff --git a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index 2339b21..992c95e 100644
--- a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -138,6 +138,7 @@ private slots:
void taskQTBUG_6205_doubleProxySelectionSetSourceModel();
void taskQTBUG_7537_appearsAndSort();
void taskQTBUG_7716_unnecessaryDynamicSorting();
+ void taskQTBUG_10287_unnecessaryMapCreation();
void testMultipleProxiesWithSelection();
@@ -3038,5 +3039,65 @@ void tst_QSortFilterProxyModel::testMultipleProxiesWithSelection()
}
+class Model10287 : public QStandardItemModel
+{
+ Q_OBJECT
+
+public:
+ Model10287(QObject *parent = 0)
+ : QStandardItemModel(0, 1, parent)
+ {
+ parentItem = new QStandardItem("parent");
+ parentItem->setData(false, Qt::UserRole);
+ appendRow(parentItem);
+
+ childItem = new QStandardItem("child");
+ childItem->setData(true, Qt::UserRole);
+ parentItem->appendRow(childItem);
+
+ childItem2 = new QStandardItem("child2");
+ childItem2->setData(true, Qt::UserRole);
+ parentItem->appendRow(childItem2);
+ }
+
+ void removeChild()
+ {
+ childItem2->setData(false, Qt::UserRole);
+ parentItem->removeRow(0);
+ }
+
+private:
+ QStandardItem *parentItem, *childItem, *childItem2;
+};
+
+class Proxy10287 : public QSortFilterProxyModel
+{
+ Q_OBJECT
+
+public:
+ Proxy10287(QAbstractItemModel *model, QObject *parent = 0)
+ : QSortFilterProxyModel(parent)
+ {
+ setSourceModel(model);
+ setDynamicSortFilter(true);
+ }
+
+protected:
+ virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
+ {
+ // Filter based on UserRole in model
+ QModelIndex i = sourceModel()->index(source_row, 0, source_parent);
+ return i.data(Qt::UserRole).toBool();
+ }
+};
+
+void tst_QSortFilterProxyModel::taskQTBUG_10287_unnecessaryMapCreation()
+{
+ Model10287 m;
+ Proxy10287 p(&m);
+ m.removeChild();
+ // No assert failure, it passes.
+}
+
QTEST_MAIN(tst_QSortFilterProxyModel)
#include "tst_qsortfilterproxymodel.moc"
diff --git a/tests/auto/qsoundeffect/qsoundeffect.pro b/tests/auto/qsoundeffect/qsoundeffect.pro
deleted file mode 100644
index 5344a16..0000000
--- a/tests/auto/qsoundeffect/qsoundeffect.pro
+++ /dev/null
@@ -1,20 +0,0 @@
-load(qttest_p4)
-
-SOURCES += tst_qsoundeffect.cpp
-
-QT = core multimedia mediaservices
-
-wince* {
- deploy.sources += 4.wav
- DEPLOYMENT = deploy
- DEFINES += SRCDIR=\\\"\\\"
- QT += gui
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
-
-unix:!mac {
- !contains(QT_CONFIG, pulseaudio) {
- DEFINES += QT_MULTIMEDIA_QMEDIAPLAYER
- }
-}
diff --git a/tests/auto/qsoundeffect/test.wav b/tests/auto/qsoundeffect/test.wav
deleted file mode 100644
index e4088a9..0000000
--- a/tests/auto/qsoundeffect/test.wav
+++ /dev/null
Binary files differ
diff --git a/tests/auto/qsoundeffect/tst_qsoundeffect.cpp b/tests/auto/qsoundeffect/tst_qsoundeffect.cpp
deleted file mode 100644
index e76a4c5..0000000
--- a/tests/auto/qsoundeffect/tst_qsoundeffect.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QtCore/qlocale.h>
-#include <qaudiooutput.h>
-#include <qaudiodeviceinfo.h>
-#include <qaudio.h>
-#include <private/qsoundeffect_p.h>
-
-
-class tst_QSoundEffect : public QObject
-{
- Q_OBJECT
-public:
- tst_QSoundEffect(QObject* parent=0) : QObject(parent) {}
-
-private slots:
- void initTestCase();
- void testSource();
- void testLooping();
- void testVolume();
- void testMuting();
-
-private:
- QSoundEffect* sound;
-};
-
-void tst_QSoundEffect::initTestCase()
-{
-#ifndef QT_MULTIMEDIA_QMEDIAPLAYER
- sound = new QSoundEffect;
-
- QVERIFY(sound->source().isEmpty());
- QVERIFY(sound->loops() == 1);
- QVERIFY(sound->volume() == 100);
- QVERIFY(sound->isMuted() == false);
-#endif
-}
-
-void tst_QSoundEffect::testSource()
-{
-#ifndef QT_MULTIMEDIA_QMEDIAPLAYER
- QSignalSpy readSignal(sound, SIGNAL(sourceChanged()));
-
- QUrl url = QUrl::fromLocalFile(QString("%1%2").arg(SRCDIR).arg("test.wav"));
- sound->setSource(url);
-
- QCOMPARE(sound->source(),url);
- QCOMPARE(readSignal.count(),1);
-
- QTestEventLoop::instance().enterLoop(1);
- sound->play();
-
- QTest::qWait(3000);
-#endif
-}
-
-void tst_QSoundEffect::testLooping()
-{
-#ifndef QT_MULTIMEDIA_QMEDIAPLAYER
- QSignalSpy readSignal(sound, SIGNAL(loopsChanged()));
-
- sound->setLoops(5);
- QCOMPARE(sound->loops(),5);
-
- sound->play();
-
- // test.wav is about 200ms, wait until it has finished playing 5 times
- QTest::qWait(3000);
-#endif
-}
-
-void tst_QSoundEffect::testVolume()
-{
-#ifndef QT_MULTIMEDIA_QMEDIAPLAYER
- QSignalSpy readSignal(sound, SIGNAL(volumeChanged()));
-
- sound->setVolume(50);
- QCOMPARE(sound->volume(),50);
-
- QTest::qWait(20);
- QCOMPARE(readSignal.count(),1);
-#endif
-}
-
-void tst_QSoundEffect::testMuting()
-{
-#ifndef QT_MULTIMEDIA_QMEDIAPLAYER
- QSignalSpy readSignal(sound, SIGNAL(mutedChanged()));
-
- sound->setMuted(true);
- QCOMPARE(sound->isMuted(),true);
-
- QTest::qWait(20);
- QCOMPARE(readSignal.count(),1);
-
- delete sound;
-#endif
-}
-
-QTEST_MAIN(tst_QSoundEffect)
-
-#include "tst_qsoundeffect.moc"
diff --git a/tests/auto/qsslcertificate/qsslcertificate.pro b/tests/auto/qsslcertificate/qsslcertificate.pro
index b237f2e..d7671ea 100644
--- a/tests/auto/qsslcertificate/qsslcertificate.pro
+++ b/tests/auto/qsslcertificate/qsslcertificate.pro
@@ -24,4 +24,5 @@ wince*: {
DEFINES += SRCDIR=\\\".\\\"
} else:!symbian {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
+ TARGET.CAPABILITY = NetworkServices
}
diff --git a/tests/auto/qsslcipher/qsslcipher.pro b/tests/auto/qsslcipher/qsslcipher.pro
index 6eae588..78fd387 100644
--- a/tests/auto/qsslcipher/qsslcipher.pro
+++ b/tests/auto/qsslcipher/qsslcipher.pro
@@ -14,4 +14,5 @@ win32 {
}
}
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qsslerror/qsslerror.pro b/tests/auto/qsslerror/qsslerror.pro
index ee5872b..5b907fb 100644
--- a/tests/auto/qsslerror/qsslerror.pro
+++ b/tests/auto/qsslerror/qsslerror.pro
@@ -14,4 +14,5 @@ win32 {
}
}
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qsslkey/qsslkey.pro b/tests/auto/qsslkey/qsslkey.pro
index 32138f8..e3eeef9 100644
--- a/tests/auto/qsslkey/qsslkey.pro
+++ b/tests/auto/qsslkey/qsslkey.pro
@@ -24,4 +24,5 @@ wince*: {
DEFINES += SRCDIR=\\\".\\\"
} else:!symbian {
DEFINES+= SRCDIR=\\\"$$PWD\\\"
+ TARGET.CAPABILITY = NetworkServices
}
diff --git a/tests/auto/qsslsocket/qsslsocket.pro b/tests/auto/qsslsocket/qsslsocket.pro
index 541b2d9..3557fc8 100644
--- a/tests/auto/qsslsocket/qsslsocket.pro
+++ b/tests/auto/qsslsocket/qsslsocket.pro
@@ -24,7 +24,7 @@ wince* {
} else:symbian {
DEFINES += QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
TARGET.EPOCHEAPSIZE="0x100 0x1000000"
- TARGET.CAPABILITY="ALL -TCB"
+ TARGET.CAPABILITY=NetworkServices
certFiles.sources = certs ssl.tar.gz
certFiles.path = .
diff --git a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
index e0512a9..e370309 100644
--- a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -98,6 +98,7 @@ private slots:
void complexWidgetFocus();
void task188195_baseBackground();
void task232085_spinBoxLineEditBg();
+ void changeStyleInChangeEvent();
//at the end because it mess with the style.
void widgetStyle();
@@ -1256,7 +1257,7 @@ void tst_QStyleSheetStyle::proxyStyle()
QStyleOptionViewItemV4 opt;
opt.initFrom(w);
opt.features |= QStyleOptionViewItemV2::HasCheckIndicator;
- QVERIFY(pb5->style()->subElementRect(QStyle::SE_ItemViewItemCheckIndicator,
+ QVERIFY(pb5->style()->subElementRect(QStyle::SE_ItemViewItemCheckIndicator,
&opt, pb5).width() == 3);
delete w;
delete proxy;
@@ -1579,6 +1580,34 @@ void tst_QStyleSheetStyle::task232085_spinBoxLineEditBg()
.toLocal8Bit().constData());
}
+class ChangeEventWidget : public QWidget
+{ public:
+ void changeEvent(QEvent * event)
+ {
+ if(event->type() == QEvent::StyleChange) {
+ static bool recurse = false;
+ if (!recurse) {
+ recurse = true;
+ QStyle *style = new QMotifStyle;
+ style->setParent(this);
+ setStyle(style);
+ recurse = false;
+ }
+ }
+ QWidget::changeEvent(event);
+ }
+};
+
+void tst_QStyleSheetStyle::changeStyleInChangeEvent()
+{ //must not crash;
+ ChangeEventWidget wid;
+ wid.ensurePolished();
+ wid.setStyleSheet(" /* */ ");
+ wid.ensurePolished();
+ wid.setStyleSheet(" /* ** */ ");
+ wid.ensurePolished();
+}
+
QTEST_MAIN(tst_QStyleSheetStyle)
#include "tst_qstylesheetstyle.moc"
diff --git a/tests/auto/qtcpserver/qtcpserver.pro b/tests/auto/qtcpserver/qtcpserver.pro
index fe5ea37..a3744a2 100644
--- a/tests/auto/qtcpserver/qtcpserver.pro
+++ b/tests/auto/qtcpserver/qtcpserver.pro
@@ -1,5 +1,6 @@
TEMPLATE = subdirs
SUBDIRS = test crashingServer
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qtcpsocket/qtcpsocket.pro b/tests/auto/qtcpsocket/qtcpsocket.pro
index 3d4eba3..370a695 100644
--- a/tests/auto/qtcpsocket/qtcpsocket.pro
+++ b/tests/auto/qtcpsocket/qtcpsocket.pro
@@ -6,3 +6,4 @@ wince*|symbian*|vxworks* : SUBDIRS = test
requires(contains(QT_CONFIG,private_tests))
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index cd512a1..31cae40 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -144,6 +144,7 @@ private slots:
void blockingIMAP();
void nonBlockingIMAP();
void hostNotFound();
+ void timeoutConnect_data();
void timeoutConnect();
void delayedClose();
void partialRead();
@@ -544,19 +545,36 @@ void tst_QTcpSocket::hostNotFound()
}
//----------------------------------------------------------------------------------
+void tst_QTcpSocket::timeoutConnect_data()
+{
+ QTest::addColumn<QString>("address");
+ QTest::newRow("host") << QtNetworkSettings::serverName();
+ QTest::newRow("ip") << QtNetworkSettings::serverIP().toString();
+}
void tst_QTcpSocket::timeoutConnect()
{
+ QFETCH(QString, address);
QTcpSocket *socket = newSocket();
- // Outgoing port 53 is firewalled in the Oslo office.
- socket->connectToHost("cisco.com", 53);
+ QElapsedTimer timer;
+ timer.start();
+
+ // Port 1357 is configured to drop packets on the test server
+ socket->connectToHost(address, 1357);
+ QVERIFY(timer.elapsed() < 50);
QVERIFY(!socket->waitForConnected(200));
QCOMPARE(socket->state(), QTcpSocket::UnconnectedState);
QCOMPARE(int(socket->error()), int(QTcpSocket::SocketTimeoutError));
- socket->connectToHost("cisco.com", 53);
- QTest::qSleep(50);
+ timer.start();
+ socket->connectToHost(address, 1357);
+ QVERIFY(timer.elapsed() < 50);
+ QTimer::singleShot(50, &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(5);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QVERIFY(socket->state() == QTcpSocket::ConnectingState
+ || socket->state() == QTcpSocket::HostLookupState);
socket->abort();
QCOMPARE(socket->state(), QTcpSocket::UnconnectedState);
QCOMPARE(socket->openMode(), QIODevice::NotOpen);
diff --git a/tests/auto/qudpsocket/qudpsocket.pro b/tests/auto/qudpsocket/qudpsocket.pro
index 4ef8a40..8fd3545 100644
--- a/tests/auto/qudpsocket/qudpsocket.pro
+++ b/tests/auto/qudpsocket/qudpsocket.pro
@@ -1,5 +1,6 @@
TEMPLATE = subdirs
SUBDIRS = test clientserver
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qurl/qurl.pro b/tests/auto/qurl/qurl.pro
index 72c93bc..018bb38 100644
--- a/tests/auto/qurl/qurl.pro
+++ b/tests/auto/qurl/qurl.pro
@@ -1,3 +1,4 @@
load(qttest_p4)
SOURCES += tst_qurl.cpp
QT = core
+symbian: TARGET.CAPABILITY = NetworkServices
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index fa42adc..820e32d 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -1410,7 +1410,7 @@ void tst_QUrl::setUrl()
void tst_QUrl::i18n_data()
{
QTest::addColumn<QString>("input");
- QTest::addColumn<QByteArray>("punyOutput");
+ QTest::addColumn<QByteArray>("punyOutput");
QTest::newRow("l") << QString::fromLatin1("http://ole:passord@www.l.no/index.html?ole=semann&ilder gud=hei#top")
<< QByteArray("http://ole:passord@www.xn--l-4ga.no/index.html?ole=%C3%A6semann&ilder%20gud=hei#top");
@@ -2165,25 +2165,25 @@ void tst_QUrl::toPercentEncoding_data()
QTest::addColumn<QByteArray>("includeInEncoding");
QTest::newRow("test_01") << QString::fromLatin1("abcdevghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345678-._~")
- << QByteArray("abcdevghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345678-._~")
+ << QByteArray("abcdevghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345678-._~")
<< QByteArray("")
<< QByteArray("");
QTest::newRow("test_02") << QString::fromLatin1("{\t\n\r^\"abc}")
- << QByteArray("%7B%09%0A%0D%5E%22abc%7D")
+ << QByteArray("%7B%09%0A%0D%5E%22abc%7D")
<< QByteArray("")
<< QByteArray("");
QTest::newRow("test_03") << QString::fromLatin1("://?#[]@!$&'()*+,;=")
- << QByteArray("%3A%2F%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D")
+ << QByteArray("%3A%2F%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D")
<< QByteArray("")
<< QByteArray("");
QTest::newRow("test_04") << QString::fromLatin1("://?#[]@!$&'()*+,;=")
- << QByteArray("%3A%2F%2F%3F%23%5B%5D%40!$&'()*+,;=")
+ << QByteArray("%3A%2F%2F%3F%23%5B%5D%40!$&'()*+,;=")
<< QByteArray("!$&'()*+,;=")
<< QByteArray("");
QTest::newRow("test_05") << QString::fromLatin1("abcd")
<< QByteArray("a%62%63d")
<< QByteArray("")
- << QByteArray("bc");
+ << QByteArray("bc");
}
void tst_QUrl::toPercentEncoding()
@@ -2193,7 +2193,7 @@ void tst_QUrl::toPercentEncoding()
QFETCH(QByteArray, excludeInEncoding);
QFETCH(QByteArray, includeInEncoding);
- QByteArray encodedUrl = QUrl::toPercentEncoding(original, excludeInEncoding, includeInEncoding);
+ QByteArray encodedUrl = QUrl::toPercentEncoding(original, excludeInEncoding, includeInEncoding);
QCOMPARE(encodedUrl.constData(), encoded.constData());
QCOMPARE(original, QUrl::fromPercentEncoding(encodedUrl));
}
@@ -2461,6 +2461,8 @@ void tst_QUrl::isValid()
QUrl url = QUrl::fromEncoded("http://strange<username>@ok-hostname/", QUrl::StrictMode);
QVERIFY(!url.isValid());
// < and > are not allowed in userinfo in strict mode
+ url.setUserName("normal_username");
+ QVERIFY(url.isValid());
}
{
QUrl url = QUrl::fromEncoded("http://strange<username>@ok-hostname/");
@@ -2471,7 +2473,18 @@ void tst_QUrl::isValid()
QUrl url = QUrl::fromEncoded("http://strange;hostname/here");
QVERIFY(!url.isValid());
QCOMPARE(url.path(), QString("/here"));
+ url.setAuthority("foobar@bar");
+ QVERIFY(url.isValid());
}
+
+ {
+ QUrl url = QUrl::fromEncoded("foo://stuff;1/g");
+ QVERIFY(!url.isValid());
+ QCOMPARE(url.path(), QString("/g"));
+ url.setHost("stuff-1");
+ QVERIFY(url.isValid());
+ }
+
}
void tst_QUrl::schemeValidator_data()
@@ -3194,6 +3207,32 @@ void tst_QUrl::ace_testsuite_data()
QTest::newRow("separator-3002") << QString::fromUtf8("example\343\200\202com")
<< "example.com" << "." << "example.com";
+
+ QString egyptianIDN =
+ QString::fromUtf8("\331\210\330\262\330\247\330\261\330\251\055\330\247\331\204\330"
+ "\243\330\252\330\265\330\247\331\204\330\247\330\252.\331\205"
+ "\330\265\330\261");
+ QTest::newRow("egyptian-tld-ace")
+ << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c"
+ << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c"
+ << "."
+ << egyptianIDN;
+ QTest::newRow("egyptian-tld-unicode")
+ << egyptianIDN
+ << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c"
+ << "."
+ << egyptianIDN;
+ QTest::newRow("egyptian-tld-mix1")
+ << QString::fromUtf8("\331\210\330\262\330\247\330\261\330\251\055\330\247\331\204\330"
+ "\243\330\252\330\265\330\247\331\204\330\247\330\252.xn--wgbh1c")
+ << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c"
+ << "."
+ << egyptianIDN;
+ QTest::newRow("egyptian-tld-mix2")
+ << QString::fromUtf8("xn----rmckbbajlc6dj7bxne2c.\331\205\330\265\330\261")
+ << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c"
+ << "."
+ << egyptianIDN;
}
void tst_QUrl::ace_testsuite()
diff --git a/tests/auto/qvideowidget/qvideowidget.pro b/tests/auto/qvideowidget/qvideowidget.pro
deleted file mode 100644
index 12686f3..0000000
--- a/tests/auto/qvideowidget/qvideowidget.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-load(qttest_p4)
-
-SOURCES = tst_qvideowidget.cpp
-
-QT = core gui multimedia mediaservices
-
diff --git a/tests/auto/qvideowidget/tst_qvideowidget.cpp b/tests/auto/qvideowidget/tst_qvideowidget.cpp
deleted file mode 100644
index 8a54789..0000000
--- a/tests/auto/qvideowidget/tst_qvideowidget.cpp
+++ /dev/null
@@ -1,1602 +0,0 @@
-/****************************************************************************
-**
-** 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 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 <QtMediaServices/qvideowidget.h>
-
-#include <QtMediaServices/qmediaobject.h>
-#include <QtMediaServices/qmediaservice.h>
-#include <QtMediaServices/private/qpaintervideosurface_p.h>
-#include <QtMediaServices/qvideooutputcontrol.h>
-#include <QtMediaServices/qvideowindowcontrol.h>
-#include <QtMediaServices/qvideowidgetcontrol.h>
-#include <QtMediaServices/qvideorenderercontrol.h>
-#include <QtMultimedia/qabstractvideosurface.h>
-#include <QtMultimedia/qvideosurfaceformat.h>
-
-#include <QtGui/qapplication.h>
-
-
-class tst_QVideoWidget : public QObject
-{
- Q_OBJECT
-private slots:
- void nullObject();
- void nullService();
- void nullOutputControl();
- void noOutputs();
- void serviceDestroyed();
- void objectDestroyed();
- void setMediaObject();
-
- void showWindowControl();
- void aspectRatioWindowControl();
- void sizeHintWindowControl_data() { sizeHint_data(); }
- void sizeHintWindowControl();
- void brightnessWindowControl_data() { color_data(); }
- void brightnessWindowControl();
- void contrastWindowControl_data() { color_data(); }
- void contrastWindowControl();
- void hueWindowControl_data() { color_data(); }
- void hueWindowControl();
- void saturationWindowControl_data() { color_data(); }
- void saturationWindowControl();
-
- void showWidgetControl();
- void aspectRatioWidgetControl();
- void sizeHintWidgetControl_data() { sizeHint_data(); }
- void sizeHintWidgetControl();
- void brightnessWidgetControl_data() { color_data(); }
- void brightnessWidgetControl();
- void contrastWidgetControl_data() { color_data(); }
- void contrastWidgetControl();
- void hueWidgetControl_data() { color_data(); }
- void hueWidgetControl();
- void saturationWidgetControl_data() { color_data(); }
- void saturationWidgetControl();
-
- void showRendererControl();
- void aspectRatioRendererControl();
- void sizeHintRendererControl_data();
- void sizeHintRendererControl();
- void brightnessRendererControl_data() { color_data(); }
- void brightnessRendererControl();
- void contrastRendererControl_data() { color_data(); }
- void contrastRendererControl();
- void hueRendererControl_data() { color_data(); }
- void hueRendererControl();
- void saturationRendererControl_data() { color_data(); }
- void saturationRendererControl();
-
- void paintRendererControl();
-
-#ifndef Q_WS_X11
- void fullScreenWindowControl();
- void fullScreenWidgetControl();
- void fullScreenRendererControl();
-#endif
-
-private:
- void sizeHint_data();
- void color_data();
-};
-
-Q_DECLARE_METATYPE(Qt::AspectRatioMode)
-Q_DECLARE_METATYPE(const uchar *)
-
-class QtTestOutputControl : public QVideoOutputControl
-{
-public:
- QtTestOutputControl() : m_output(NoOutput) {}
-
- QList<Output> availableOutputs() const { return m_outputs; }
- void setAvailableOutputs(const QList<Output> outputs) { m_outputs = outputs; }
-
- Output output() const { return m_output; }
- virtual void setOutput(Output output) { m_output = output; }
-
-private:
- Output m_output;
- QList<Output> m_outputs;
-};
-
-class QtTestWindowControl : public QVideoWindowControl
-{
-public:
- QtTestWindowControl()
- : m_winId(0)
- , m_repaintCount(0)
- , m_brightness(0)
- , m_contrast(0)
- , m_saturation(0)
- , m_aspectRatioMode(Qt::KeepAspectRatio)
- , m_fullScreen(0)
- {
- }
-
- WId winId() const { return m_winId; }
- void setWinId(WId id) { m_winId = id; }
-
- QRect displayRect() const { return m_displayRect; }
- void setDisplayRect(const QRect &rect) { m_displayRect = rect; }
-
- bool isFullScreen() const { return m_fullScreen; }
- void setFullScreen(bool fullScreen) { emit fullScreenChanged(m_fullScreen = fullScreen); }
-
- int repaintCount() const { return m_repaintCount; }
- void setRepaintCount(int count) { m_repaintCount = count; }
- void repaint() { ++m_repaintCount; }
-
- QSize nativeSize() const { return m_nativeSize; }
- void setNativeSize(const QSize &size) { m_nativeSize = size; emit nativeSizeChanged(); }
-
- Qt::AspectRatioMode aspectRatioMode() const { return m_aspectRatioMode; }
- void setAspectRatioMode(Qt::AspectRatioMode mode) { m_aspectRatioMode = mode; }
-
- int brightness() const { return m_brightness; }
- void setBrightness(int brightness) { emit brightnessChanged(m_brightness = brightness); }
-
- int contrast() const { return m_contrast; }
- void setContrast(int contrast) { emit contrastChanged(m_contrast = contrast); }
-
- int hue() const { return m_hue; }
- void setHue(int hue) { emit hueChanged(m_hue = hue); }
-
- int saturation() const { return m_saturation; }
- void setSaturation(int saturation) { emit saturationChanged(m_saturation = saturation); }
-
-private:
- WId m_winId;
- int m_repaintCount;
- int m_brightness;
- int m_contrast;
- int m_hue;
- int m_saturation;
- Qt::AspectRatioMode m_aspectRatioMode;
- QRect m_displayRect;
- QSize m_nativeSize;
- bool m_fullScreen;
-};
-
-class QtTestWidgetControl : public QVideoWidgetControl
-{
-public:
- QtTestWidgetControl()
- : m_brightness(1.0)
- , m_contrast(1.0)
- , m_hue(1.0)
- , m_saturation(1.0)
- , m_aspectRatioMode(Qt::KeepAspectRatio)
- , m_fullScreen(false)
- {
- }
-
- bool isFullScreen() const { return m_fullScreen; }
- void setFullScreen(bool fullScreen) { emit fullScreenChanged(m_fullScreen = fullScreen); }
-
- Qt::AspectRatioMode aspectRatioMode() const { return m_aspectRatioMode; }
- void setAspectRatioMode(Qt::AspectRatioMode mode) { m_aspectRatioMode = mode; }
-
- int brightness() const { return m_brightness; }
- void setBrightness(int brightness) { emit brightnessChanged(m_brightness = brightness); }
-
- int contrast() const { return m_contrast; }
- void setContrast(int contrast) { emit contrastChanged(m_contrast = contrast); }
-
- int hue() const { return m_hue; }
- void setHue(int hue) { emit hueChanged(m_hue = hue); }
-
- int saturation() const { return m_saturation; }
- void setSaturation(int saturation) { emit saturationChanged(m_saturation = saturation); }
-
- void setSizeHint(const QSize &size) { m_widget.setSizeHint(size); }
-
- QWidget *videoWidget() { return &m_widget; }
-
-private:
- class Widget : public QWidget
- {
- public:
- QSize sizeHint() const { return m_sizeHint; }
- void setSizeHint(const QSize &size) { m_sizeHint = size; updateGeometry(); }
- private:
- QSize m_sizeHint;
- } m_widget;
- int m_brightness;
- int m_contrast;
- int m_hue;
- int m_saturation;
- Qt::AspectRatioMode m_aspectRatioMode;
- QSize m_sizeHint;
- bool m_fullScreen;
-};
-
-class QtTestRendererControl : public QVideoRendererControl
-{
-public:
- QtTestRendererControl()
- : m_surface(0)
- {
- }
-
- QAbstractVideoSurface *surface() const { return m_surface; }
- void setSurface(QAbstractVideoSurface *surface) { m_surface = surface; }
-
-private:
- QAbstractVideoSurface *m_surface;
-};
-
-class QtTestVideoService : public QMediaService
-{
- Q_OBJECT
-public:
- QtTestVideoService(
- QtTestOutputControl *output,
- QtTestWindowControl *window,
- QtTestWidgetControl *widget,
- QtTestRendererControl *renderer)
- : QMediaService(0)
- , outputControl(output)
- , windowControl(window)
- , widgetControl(widget)
- , rendererControl(renderer)
- {
- }
-
- ~QtTestVideoService()
- {
- delete outputControl;
- delete windowControl;
- delete widgetControl;
- delete rendererControl;
- }
-
- QMediaControl *control(const char *name) const
- {
- if (qstrcmp(name, QVideoOutputControl_iid) == 0)
- return outputControl;
- else if (qstrcmp(name, QVideoWindowControl_iid) == 0)
- return windowControl;
- else if (qstrcmp(name, QVideoWidgetControl_iid) == 0)
- return widgetControl;
- else if (qstrcmp(name, QVideoRendererControl_iid) == 0)
- return rendererControl;
- else
- return 0;
- }
-
- QtTestOutputControl *outputControl;
- QtTestWindowControl *windowControl;
- QtTestWidgetControl *widgetControl;
- QtTestRendererControl *rendererControl;
-};
-
-class QtTestVideoObject : public QMediaObject
-{
- Q_OBJECT
-public:
- QtTestVideoObject(
- QtTestWindowControl *window,
- QtTestWidgetControl *widget,
- QtTestRendererControl *renderer):
- QMediaObject(0, new QtTestVideoService(new QtTestOutputControl, window, widget, renderer))
- {
- testService = qobject_cast<QtTestVideoService*>(service());
- QList<QVideoOutputControl::Output> outputs;
-
- if (window)
- outputs.append(QVideoOutputControl::WindowOutput);
- if (widget)
- outputs.append(QVideoOutputControl::WidgetOutput);
- if (renderer)
- outputs.append(QVideoOutputControl::RendererOutput);
-
- testService->outputControl->setAvailableOutputs(outputs);
- }
-
- QtTestVideoObject(QtTestVideoService *service):
- QMediaObject(0, service),
- testService(service)
- {
- }
-
- ~QtTestVideoObject()
- {
- delete testService;
- }
-
- QtTestVideoService *testService;
-};
-
-void tst_QVideoWidget::nullObject()
-{
- QVideoWidget widget;
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- QVERIFY(widget.sizeHint().isEmpty());
-
- widget.setFullScreen(true);
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.isFullScreen(), true);
-
- widget.setAspectRatioMode(Qt::IgnoreAspectRatio);
- QCOMPARE(widget.aspectRatioMode(), Qt::IgnoreAspectRatio);
-
- {
- QSignalSpy spy(&widget, SIGNAL(brightnessChanged(int)));
-
- widget.setBrightness(100);
- QCOMPARE(widget.brightness(), 100);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), 100);
-
- widget.setBrightness(100);
- QCOMPARE(widget.brightness(), 100);
- QCOMPARE(spy.count(), 1);
-
- widget.setBrightness(-120);
- QCOMPARE(widget.brightness(), -100);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toInt(), -100);
- } {
- QSignalSpy spy(&widget, SIGNAL(contrastChanged(int)));
-
- widget.setContrast(100);
- QCOMPARE(widget.contrast(), 100);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), 100);
-
- widget.setContrast(100);
- QCOMPARE(widget.contrast(), 100);
- QCOMPARE(spy.count(), 1);
-
- widget.setContrast(-120);
- QCOMPARE(widget.contrast(), -100);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toInt(), -100);
- } {
- QSignalSpy spy(&widget, SIGNAL(hueChanged(int)));
-
- widget.setHue(100);
- QCOMPARE(widget.hue(), 100);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), 100);
-
- widget.setHue(100);
- QCOMPARE(widget.hue(), 100);
- QCOMPARE(spy.count(), 1);
-
- widget.setHue(-120);
- QCOMPARE(widget.hue(), -100);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toInt(), -100);
- } {
- QSignalSpy spy(&widget, SIGNAL(saturationChanged(int)));
-
- widget.setSaturation(100);
- QCOMPARE(widget.saturation(), 100);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), 100);
-
- widget.setSaturation(100);
- QCOMPARE(widget.saturation(), 100);
- QCOMPARE(spy.count(), 1);
-
- widget.setSaturation(-120);
- QCOMPARE(widget.saturation(), -100);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toInt(), -100);
- }
-}
-
-void tst_QVideoWidget::nullService()
-{
- QtTestVideoObject object(0);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
-
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- QVERIFY(widget.sizeHint().isEmpty());
-
- widget.setFullScreen(true);
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.isFullScreen(), true);
-
- widget.setAspectRatioMode(Qt::IgnoreAspectRatio);
- QCOMPARE(widget.aspectRatioMode(), Qt::IgnoreAspectRatio);
-
- widget.setBrightness(100);
- QCOMPARE(widget.brightness(), 100);
-
- widget.setContrast(100);
- QCOMPARE(widget.contrast(), 100);
-
- widget.setHue(100);
- QCOMPARE(widget.hue(), 100);
-
- widget.setSaturation(100);
- QCOMPARE(widget.saturation(), 100);
-}
-
-void tst_QVideoWidget::nullOutputControl()
-{
- QtTestVideoObject object(new QtTestVideoService(0, 0, 0, 0));
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- QVERIFY(widget.sizeHint().isEmpty());
-
- widget.setFullScreen(true);
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.isFullScreen(), true);
-
- widget.setBrightness(100);
- QCOMPARE(widget.brightness(), 100);
-
- widget.setContrast(100);
- QCOMPARE(widget.contrast(), 100);
-
- widget.setHue(100);
- QCOMPARE(widget.hue(), 100);
-
- widget.setSaturation(100);
- QCOMPARE(widget.saturation(), 100);
-}
-
-void tst_QVideoWidget::noOutputs()
-{
- QtTestVideoObject object(0, 0, 0);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- QVERIFY(widget.sizeHint().isEmpty());
-
- widget.setFullScreen(true);
- QCOMPARE(widget.isFullScreen(), true);
-
- widget.setBrightness(100);
- QCOMPARE(widget.brightness(), 100);
-
- widget.setContrast(100);
- QCOMPARE(widget.contrast(), 100);
-
- widget.setHue(100);
- QCOMPARE(widget.hue(), 100);
-
- widget.setSaturation(100);
- QCOMPARE(widget.saturation(), 100);
-}
-
-void tst_QVideoWidget::serviceDestroyed()
-{
- QtTestVideoObject object(new QtTestWindowControl, new QtTestWidgetControl, 0);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- widget.setBrightness(100);
- widget.setContrast(100);
- widget.setHue(100);
- widget.setSaturation(100);
-
- delete object.testService;
- object.testService = 0;
-
- QCOMPARE(widget.mediaObject(), static_cast<QMediaObject *>(&object));
-
- QCOMPARE(widget.brightness(), 100);
- QCOMPARE(widget.contrast(), 100);
- QCOMPARE(widget.hue(), 100);
- QCOMPARE(widget.saturation(), 100);
-
- widget.setFullScreen(true);
- QCOMPARE(widget.isFullScreen(), true);
-}
-
-void tst_QVideoWidget::objectDestroyed()
-{
- QtTestVideoObject *object = new QtTestVideoObject(
- new QtTestWindowControl,
- new QtTestWidgetControl,
- 0);
-
- QVideoWidget widget;
- widget.setMediaObject(object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- widget.setBrightness(100);
- widget.setContrast(100);
- widget.setHue(100);
- widget.setSaturation(100);
-
- // Delete the media object without deleting the service.
- QtTestVideoService *service = object->testService;
- object->testService = 0;
-
- delete object;
- object = 0;
-
- QCOMPARE(widget.mediaObject(), static_cast<QMediaObject *>(object));
-
- QCOMPARE(service->outputControl->output(), QVideoOutputControl::NoOutput);
-
- QCOMPARE(widget.brightness(), 100);
- QCOMPARE(widget.contrast(), 100);
- QCOMPARE(widget.hue(), 100);
- QCOMPARE(widget.saturation(), 100);
-
- widget.setFullScreen(true);
- QCOMPARE(widget.isFullScreen(), true);
-
- delete service;
-}
-
-void tst_QVideoWidget::setMediaObject()
-{
- QMediaObject *nullObject = 0;
- QtTestVideoObject windowObject(new QtTestWindowControl, 0, 0);
- QtTestVideoObject widgetObject(0, new QtTestWidgetControl, 0);
- QtTestVideoObject rendererObject(0, 0, new QtTestRendererControl);
-
- QVideoWidget widget;
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- QCOMPARE(widget.mediaObject(), nullObject);
- QCOMPARE(windowObject.testService->outputControl->output(), QVideoOutputControl::NoOutput);
- QCOMPARE(widgetObject.testService->outputControl->output(), QVideoOutputControl::NoOutput);
- QCOMPARE(rendererObject.testService->outputControl->output(), QVideoOutputControl::NoOutput);
-
- widget.setMediaObject(&windowObject);
- QCOMPARE(widget.mediaObject(), static_cast<QMediaObject *>(&windowObject));
- QCOMPARE(windowObject.testService->outputControl->output(), QVideoOutputControl::WindowOutput);
- QVERIFY(windowObject.testService->windowControl->winId() != 0);
-
-
- widget.setMediaObject(&widgetObject);
- QCOMPARE(widget.mediaObject(), static_cast<QMediaObject *>(&widgetObject));
- QCOMPARE(widgetObject.testService->outputControl->output(), QVideoOutputControl::WidgetOutput);
-
- QCoreApplication::processEvents(QEventLoop::AllEvents);
- QCOMPARE(widgetObject.testService->widgetControl->videoWidget()->isVisible(), true);
-
- QCOMPARE(windowObject.testService->outputControl->output(), QVideoOutputControl::NoOutput);
-
- widget.setMediaObject(&rendererObject);
- QCOMPARE(widget.mediaObject(), static_cast<QMediaObject *>(&rendererObject));
- QCOMPARE(rendererObject.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
- QVERIFY(rendererObject.testService->rendererControl->surface() != 0);
-
- QCOMPARE(widgetObject.testService->outputControl->output(), QVideoOutputControl::NoOutput);
-
- widget.setMediaObject(0);
- QCOMPARE(widget.mediaObject(), nullObject);
-
- QCOMPARE(rendererObject.testService->outputControl->output(), QVideoOutputControl::NoOutput);
-}
-
-void tst_QVideoWidget::showWindowControl()
-{
- QtTestVideoObject object(new QtTestWindowControl, 0, 0);
- object.testService->windowControl->setNativeSize(QSize(240, 180));
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
-
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::WindowOutput);
- QVERIFY(object.testService->windowControl->winId() != 0);
-
- QVERIFY(object.testService->windowControl->repaintCount() > 0);
-
- widget.resize(640, 480);
- QCOMPARE(object.testService->windowControl->displayRect(), QRect(0, 0, 640, 480));
-
- widget.move(10, 10);
- QCOMPARE(object.testService->windowControl->displayRect(), QRect(0, 0, 640, 480));
-
- widget.hide();
-
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::WindowOutput);
-}
-
-void tst_QVideoWidget::showWidgetControl()
-{
- QtTestVideoObject object(0, new QtTestWidgetControl, 0);
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
-
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::WidgetOutput);
- QCOMPARE(object.testService->widgetControl->videoWidget()->isVisible(), true);
-
- widget.resize(640, 480);
-
- widget.move(10, 10);
-
- widget.hide();
-
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::WidgetOutput);
- QCOMPARE(object.testService->widgetControl->videoWidget()->isVisible(), false);
-}
-
-void tst_QVideoWidget::showRendererControl()
-{
- QtTestVideoObject object(0, 0, new QtTestRendererControl);
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::NoOutput);
-
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
- QVERIFY(object.testService->rendererControl->surface() != 0);
-
- widget.resize(640, 480);
-
- widget.move(10, 10);
-
- widget.hide();
-
- QCOMPARE(object.testService->outputControl->output(), QVideoOutputControl::RendererOutput);
-}
-
-void tst_QVideoWidget::aspectRatioWindowControl()
-{
- QtTestVideoObject object(new QtTestWindowControl, 0, 0);
- object.testService->windowControl->setAspectRatioMode(Qt::IgnoreAspectRatio);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- // Test the aspect ratio defaults to keeping the aspect ratio.
- QCOMPARE(widget.aspectRatioMode(), Qt::KeepAspectRatio);
-
- // Test the control has been informed of the aspect ratio change, post show.
- widget.show();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.aspectRatioMode(), Qt::KeepAspectRatio);
- QCOMPARE(object.testService->windowControl->aspectRatioMode(), Qt::KeepAspectRatio);
-
- // Test an aspect ratio change is enforced immediately while visible.
- widget.setAspectRatioMode(Qt::IgnoreAspectRatio);
- QCOMPARE(widget.aspectRatioMode(), Qt::IgnoreAspectRatio);
- QCOMPARE(object.testService->windowControl->aspectRatioMode(), Qt::IgnoreAspectRatio);
-
- // Test an aspect ratio set while not visible is respected.
- widget.hide();
- widget.setAspectRatioMode(Qt::KeepAspectRatio);
- QCOMPARE(widget.aspectRatioMode(), Qt::KeepAspectRatio);
- widget.show();
- QCOMPARE(widget.aspectRatioMode(), Qt::KeepAspectRatio);
- QCOMPARE(object.testService->windowControl->aspectRatioMode(), Qt::KeepAspectRatio);
-}
-
-void tst_QVideoWidget::aspectRatioWidgetControl()
-{
- QtTestVideoObject object(0, new QtTestWidgetControl, 0);
- object.testService->widgetControl->setAspectRatioMode(Qt::IgnoreAspectRatio);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- // Test the aspect ratio defaults to keeping the aspect ratio.
- QCOMPARE(widget.aspectRatioMode(), Qt::KeepAspectRatio);
-
- // Test the control has been informed of the aspect ratio change, post show.
- widget.show();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.aspectRatioMode(), Qt::KeepAspectRatio);
- QCOMPARE(object.testService->widgetControl->aspectRatioMode(), Qt::KeepAspectRatio);
-
- // Test an aspect ratio change is enforced immediately while visible.
- widget.setAspectRatioMode(Qt::IgnoreAspectRatio);
- QCOMPARE(widget.aspectRatioMode(), Qt::IgnoreAspectRatio);
- QCOMPARE(object.testService->widgetControl->aspectRatioMode(), Qt::IgnoreAspectRatio);
-
- // Test an aspect ratio set while not visible is respected.
- widget.hide();
- widget.setAspectRatioMode(Qt::KeepAspectRatio);
- QCOMPARE(widget.aspectRatioMode(), Qt::KeepAspectRatio);
- widget.show();
- QCOMPARE(widget.aspectRatioMode(), Qt::KeepAspectRatio);
- QCOMPARE(object.testService->widgetControl->aspectRatioMode(), Qt::KeepAspectRatio);
-}
-
-void tst_QVideoWidget::aspectRatioRendererControl()
-{
- QtTestVideoObject object(0, 0, new QtTestRendererControl);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- // Test the aspect ratio defaults to keeping the aspect ratio.
- QCOMPARE(widget.aspectRatioMode(), Qt::KeepAspectRatio);
-
- // Test the control has been informed of the aspect ratio change, post show.
- widget.show();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.aspectRatioMode(), Qt::KeepAspectRatio);
-
- // Test an aspect ratio change is enforced immediately while visible.
- widget.setAspectRatioMode(Qt::IgnoreAspectRatio);
- QCOMPARE(widget.aspectRatioMode(), Qt::IgnoreAspectRatio);
-
- // Test an aspect ratio set while not visible is respected.
- widget.hide();
- widget.setAspectRatioMode(Qt::KeepAspectRatio);
- QCOMPARE(widget.aspectRatioMode(), Qt::KeepAspectRatio);
- widget.show();
- QCOMPARE(widget.aspectRatioMode(), Qt::KeepAspectRatio);
-}
-
-void tst_QVideoWidget::sizeHint_data()
-{
- QTest::addColumn<QSize>("size");
-
- QTest::newRow("720x576")
- << QSize(720, 576);
-}
-
-void tst_QVideoWidget::sizeHintWindowControl()
-{
- QFETCH(QSize, size);
-
- QtTestVideoObject object(new QtTestWindowControl, 0, 0);
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- QVERIFY(widget.sizeHint().isEmpty());
-
- object.testService->windowControl->setNativeSize(size);
- QCOMPARE(widget.sizeHint(), size);
-}
-
-void tst_QVideoWidget::sizeHintWidgetControl()
-{
- QFETCH(QSize, size);
-
- QtTestVideoObject object(0, new QtTestWidgetControl, 0);
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- QVERIFY(widget.sizeHint().isEmpty());
-
- object.testService->widgetControl->setSizeHint(size);
- QCOMPARE(widget.sizeHint(), size);
-}
-
-void tst_QVideoWidget::sizeHintRendererControl_data()
-{
- QTest::addColumn<QSize>("frameSize");
- QTest::addColumn<QRect>("viewport");
- QTest::addColumn<QSize>("pixelAspectRatio");
- QTest::addColumn<QSize>("expectedSize");
-
- QTest::newRow("640x480")
- << QSize(640, 480)
- << QRect(0, 0, 640, 480)
- << QSize(1, 1)
- << QSize(640, 480);
-
- QTest::newRow("800x600, (80,60, 640x480) viewport")
- << QSize(800, 600)
- << QRect(80, 60, 640, 480)
- << QSize(1, 1)
- << QSize(640, 480);
-
- QTest::newRow("800x600, (80,60, 640x480) viewport, 4:3")
- << QSize(800, 600)
- << QRect(80, 60, 640, 480)
- << QSize(4, 3)
- << QSize(853, 480);
-
-}
-
-void tst_QVideoWidget::sizeHintRendererControl()
-{
- QFETCH(QSize, frameSize);
- QFETCH(QRect, viewport);
- QFETCH(QSize, pixelAspectRatio);
- QFETCH(QSize, expectedSize);
-
- QtTestVideoObject object(0, 0, new QtTestRendererControl);
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- QVideoSurfaceFormat format(frameSize, QVideoFrame::Format_ARGB32);
- format.setViewport(viewport);
- format.setPixelAspectRatio(pixelAspectRatio);
-
- QVERIFY(object.testService->rendererControl->surface()->start(format));
-
- QCOMPARE(widget.sizeHint(), expectedSize);
-}
-
-#ifndef Q_WS_X11
-
-void tst_QVideoWidget::fullScreenWindowControl()
-{
- QtTestVideoObject object(new QtTestWindowControl, 0, 0);
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- Qt::WindowFlags windowFlags = widget.windowFlags();
-
- QSignalSpy spy(&widget, SIGNAL(fullScreenChanged(bool)));
-
- // Test showing full screen with setFullScreen(true).
- widget.setFullScreen(true);
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(object.testService->windowControl->isFullScreen(), true);
- QCOMPARE(widget.isFullScreen(), true);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toBool(), true);
-
- // Test returning to normal with setFullScreen(false).
- widget.setFullScreen(false);
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(object.testService->windowControl->isFullScreen(), false);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toBool(), false);
- QCOMPARE(widget.windowFlags(), windowFlags);
-
- // Test showing full screen with showFullScreen().
- widget.showFullScreen();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(object.testService->windowControl->isFullScreen(), true);
- QCOMPARE(widget.isFullScreen(), true);
- QCOMPARE(spy.count(), 3);
- QCOMPARE(spy.value(2).value(0).toBool(), true);
-
- // Test returning to normal with showNormal().
- widget.showNormal();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(object.testService->windowControl->isFullScreen(), false);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 4);
- QCOMPARE(spy.value(3).value(0).toBool(), false);
- QCOMPARE(widget.windowFlags(), windowFlags);
-
- // Test setFullScreen(false) and showNormal() do nothing when isFullScreen() == false.
- widget.setFullScreen(false);
- QCOMPARE(object.testService->windowControl->isFullScreen(), false);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 4);
- widget.showNormal();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(object.testService->windowControl->isFullScreen(), false);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 4);
-
- // Test setFullScreen(true) and showFullScreen() do nothing when isFullScreen() == true.
- widget.showFullScreen();
- QTest::qWaitForWindowShown(&widget);
- widget.setFullScreen(true);
- QCOMPARE(object.testService->windowControl->isFullScreen(), true);
- QCOMPARE(widget.isFullScreen(), true);
- QCOMPARE(spy.count(), 5);
- widget.showFullScreen();
- QCOMPARE(object.testService->windowControl->isFullScreen(), true);
- QCOMPARE(widget.isFullScreen(), true);
- QCOMPARE(spy.count(), 5);
-
- // Test if the window control exits full screen mode, the widget follows suit.
- object.testService->windowControl->setFullScreen(false);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 6);
- QCOMPARE(spy.value(5).value(0).toBool(), false);
-
- // Test if the window control enters full screen mode, the widget does nothing.
- object.testService->windowControl->setFullScreen(false);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 6);
-}
-
-void tst_QVideoWidget::fullScreenWidgetControl()
-{
- QtTestVideoObject object(0, new QtTestWidgetControl, 0);
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- Qt::WindowFlags windowFlags = widget.windowFlags();
-
- QSignalSpy spy(&widget, SIGNAL(fullScreenChanged(bool)));
-
- // Test showing full screen with setFullScreen(true).
- widget.setFullScreen(true);
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(object.testService->widgetControl->isFullScreen(), true);
- QCOMPARE(widget.isFullScreen(), true);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toBool(), true);
-
- // Test returning to normal with setFullScreen(false).
- widget.setFullScreen(false);
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(object.testService->widgetControl->isFullScreen(), false);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toBool(), false);
- QCOMPARE(widget.windowFlags(), windowFlags);
-
- // Test showing full screen with showFullScreen().
- widget.showFullScreen();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(object.testService->widgetControl->isFullScreen(), true);
- QCOMPARE(widget.isFullScreen(), true);
- QCOMPARE(spy.count(), 3);
- QCOMPARE(spy.value(2).value(0).toBool(), true);
-
- // Test returning to normal with showNormal().
- widget.showNormal();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(object.testService->widgetControl->isFullScreen(), false);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 4);
- QCOMPARE(spy.value(3).value(0).toBool(), false);
- QCOMPARE(widget.windowFlags(), windowFlags);
-
- // Test setFullScreen(false) and showNormal() do nothing when isFullScreen() == false.
- widget.setFullScreen(false);
- QCOMPARE(object.testService->widgetControl->isFullScreen(), false);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 4);
- widget.showNormal();
- QCOMPARE(object.testService->widgetControl->isFullScreen(), false);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 4);
-
- // Test setFullScreen(true) and showFullScreen() do nothing when isFullScreen() == true.
- widget.showFullScreen();
- QTest::qWaitForWindowShown(&widget);
- widget.setFullScreen(true);
- QCOMPARE(object.testService->widgetControl->isFullScreen(), true);
- QCOMPARE(widget.isFullScreen(), true);
- QCOMPARE(spy.count(), 5);
- widget.showFullScreen();
- QCOMPARE(object.testService->widgetControl->isFullScreen(), true);
- QCOMPARE(widget.isFullScreen(), true);
- QCOMPARE(spy.count(), 5);
-
- // Test if the window control exits full screen mode, the widget follows suit.
- object.testService->widgetControl->setFullScreen(false);
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 6);
- QCOMPARE(spy.value(5).value(0).toBool(), false);
-
- // Test if the window control enters full screen mode, the widget does nothing.
- object.testService->widgetControl->setFullScreen(false);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 6);
-}
-
-
-void tst_QVideoWidget::fullScreenRendererControl()
-{
- QtTestVideoObject object(0, 0, new QtTestRendererControl);
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- Qt::WindowFlags windowFlags = widget.windowFlags();
-
- QSignalSpy spy(&widget, SIGNAL(fullScreenChanged(bool)));
-
- // Test showing full screen with setFullScreen(true).
- widget.setFullScreen(true);
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.isFullScreen(), true);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toBool(), true);
-
- // Test returning to normal with setFullScreen(false).
- widget.setFullScreen(false);
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toBool(), false);
- QCOMPARE(widget.windowFlags(), windowFlags);
-
- // Test showing full screen with showFullScreen().
- widget.showFullScreen();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.isFullScreen(), true);
- QCOMPARE(spy.count(), 3);
- QCOMPARE(spy.value(2).value(0).toBool(), true);
-
- // Test returning to normal with showNormal().
- widget.showNormal();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 4);
- QCOMPARE(spy.value(3).value(0).toBool(), false);
- QCOMPARE(widget.windowFlags(), windowFlags);
-
- // Test setFullScreen(false) and showNormal() do nothing when isFullScreen() == false.
- widget.setFullScreen(false);
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 4);
- widget.showNormal();
- QCOMPARE(widget.isFullScreen(), false);
- QCOMPARE(spy.count(), 4);
-
- // Test setFullScreen(true) and showFullScreen() do nothing when isFullScreen() == true.
- widget.showFullScreen();
- QTest::qWaitForWindowShown(&widget);
- widget.setFullScreen(true);
- QCOMPARE(widget.isFullScreen(), true);
- QCOMPARE(spy.count(), 5);
- widget.showFullScreen();
- QCOMPARE(widget.isFullScreen(), true);
- QCOMPARE(spy.count(), 5);
-}
-
-#endif
-
-void tst_QVideoWidget::color_data()
-{
- QTest::addColumn<int>("controlValue");
- QTest::addColumn<int>("value");
- QTest::addColumn<int>("expectedValue");
-
- QTest::newRow("12")
- << 0
- << 12
- << 12;
- QTest::newRow("-56")
- << 87
- << -56
- << -56;
- QTest::newRow("100")
- << 32
- << 100
- << 100;
- QTest::newRow("1294")
- << 0
- << 1294
- << 100;
- QTest::newRow("-102")
- << 34
- << -102
- << -100;
-}
-
-void tst_QVideoWidget::brightnessWindowControl()
-{
- QFETCH(int, controlValue);
- QFETCH(int, value);
- QFETCH(int, expectedValue);
-
- QtTestVideoObject object(new QtTestWindowControl, 0, 0);
- object.testService->windowControl->setBrightness(controlValue);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- // Test the video widget resets the controls starting brightness to the default.
- QCOMPARE(widget.brightness(), 0);
-
- QSignalSpy spy(&widget, SIGNAL(brightnessChanged(int)));
-
- // Test the video widget sets the brightness value, bounded if necessary and emits a changed
- // signal.
- widget.setBrightness(value);
- QCOMPARE(widget.brightness(), expectedValue);
- QCOMPARE(object.testService->windowControl->brightness(), expectedValue);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
-
- // Test the changed signal isn't emitted if the value is unchanged.
- widget.setBrightness(value);
- QCOMPARE(widget.brightness(), expectedValue);
- QCOMPARE(object.testService->windowControl->brightness(), expectedValue);
- QCOMPARE(spy.count(), 1);
-
- // Test the changed signal is emitted if the brightness is changed internally.
- object.testService->windowControl->setBrightness(controlValue);
- QCOMPARE(widget.brightness(), controlValue);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
-}
-
-void tst_QVideoWidget::brightnessWidgetControl()
-{
- QFETCH(int, controlValue);
- QFETCH(int, value);
- QFETCH(int, expectedValue);
-
- QtTestVideoObject object(0, new QtTestWidgetControl, 0);
- object.testService->widgetControl->setBrightness(controlValue);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- QCOMPARE(widget.brightness(), 0);
-
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- QSignalSpy spy(&widget, SIGNAL(brightnessChanged(int)));
-
- widget.setBrightness(value);
- QCOMPARE(widget.brightness(), expectedValue);
- QCOMPARE(object.testService->widgetControl->brightness(), expectedValue);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
-
- widget.setBrightness(value);
- QCOMPARE(widget.brightness(), expectedValue);
- QCOMPARE(object.testService->widgetControl->brightness(), expectedValue);
- QCOMPARE(spy.count(), 1);
-
- object.testService->widgetControl->setBrightness(controlValue);
- QCOMPARE(widget.brightness(), controlValue);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
-}
-
-void tst_QVideoWidget::brightnessRendererControl()
-{
- QFETCH(int, value);
- QFETCH(int, expectedValue);
-
- QtTestVideoObject object(0, 0, new QtTestRendererControl);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- QSignalSpy spy(&widget, SIGNAL(brightnessChanged(int)));
-
- widget.setBrightness(value);
- QCOMPARE(widget.brightness(), expectedValue);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
-
- widget.setBrightness(value);
- QCOMPARE(widget.brightness(), expectedValue);
- QCOMPARE(spy.count(), 1);
-}
-
-void tst_QVideoWidget::contrastWindowControl()
-{
- QFETCH(int, controlValue);
- QFETCH(int, value);
- QFETCH(int, expectedValue);
-
- QtTestVideoObject object(new QtTestWindowControl, 0, 0);
- object.testService->windowControl->setContrast(controlValue);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- QCOMPARE(widget.contrast(), 0);
-
- widget.show();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.contrast(), 0);
-
- QSignalSpy spy(&widget, SIGNAL(contrastChanged(int)));
-
- widget.setContrast(value);
- QCOMPARE(widget.contrast(), expectedValue);
- QCOMPARE(object.testService->windowControl->contrast(), expectedValue);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
-
- widget.setContrast(value);
- QCOMPARE(widget.contrast(), expectedValue);
- QCOMPARE(object.testService->windowControl->contrast(), expectedValue);
- QCOMPARE(spy.count(), 1);
-
- object.testService->windowControl->setContrast(controlValue);
- QCOMPARE(widget.contrast(), controlValue);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
-}
-
-void tst_QVideoWidget::contrastWidgetControl()
-{
- QFETCH(int, controlValue);
- QFETCH(int, value);
- QFETCH(int, expectedValue);
-
- QtTestVideoObject object(0, new QtTestWidgetControl, 0);
- object.testService->widgetControl->setContrast(controlValue);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
- QCOMPARE(widget.contrast(), 0);
-
- widget.show();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.contrast(), 0);
-
- QSignalSpy spy(&widget, SIGNAL(contrastChanged(int)));
-
- widget.setContrast(value);
- QCOMPARE(widget.contrast(), expectedValue);
- QCOMPARE(object.testService->widgetControl->contrast(), expectedValue);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
-
- widget.setContrast(value);
- QCOMPARE(widget.contrast(), expectedValue);
- QCOMPARE(object.testService->widgetControl->contrast(), expectedValue);
- QCOMPARE(spy.count(), 1);
-
- object.testService->widgetControl->setContrast(controlValue);
- QCOMPARE(widget.contrast(), controlValue);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
-}
-
-void tst_QVideoWidget::contrastRendererControl()
-{
- QFETCH(int, value);
- QFETCH(int, expectedValue);
-
- QtTestVideoObject object(0, 0, new QtTestRendererControl);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- QSignalSpy spy(&widget, SIGNAL(contrastChanged(int)));
-
- widget.setContrast(value);
- QCOMPARE(widget.contrast(), expectedValue);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
-
- widget.setContrast(value);
- QCOMPARE(widget.contrast(), expectedValue);
- QCOMPARE(spy.count(), 1);
-}
-
-void tst_QVideoWidget::hueWindowControl()
-{
- QFETCH(int, controlValue);
- QFETCH(int, value);
- QFETCH(int, expectedValue);
-
- QtTestVideoObject object(new QtTestWindowControl, 0, 0);
- object.testService->windowControl->setHue(controlValue);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
- QCOMPARE(widget.hue(), 0);
-
- widget.show();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.hue(), 0);
-
- QSignalSpy spy(&widget, SIGNAL(hueChanged(int)));
-
- widget.setHue(value);
- QCOMPARE(widget.hue(), expectedValue);
- QCOMPARE(object.testService->windowControl->hue(), expectedValue);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
-
- widget.setHue(value);
- QCOMPARE(widget.hue(), expectedValue);
- QCOMPARE(object.testService->windowControl->hue(), expectedValue);
- QCOMPARE(spy.count(), 1);
-
- object.testService->windowControl->setHue(controlValue);
- QCOMPARE(widget.hue(), controlValue);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
-}
-
-void tst_QVideoWidget::hueWidgetControl()
-{
- QFETCH(int, controlValue);
- QFETCH(int, value);
- QFETCH(int, expectedValue);
-
- QtTestVideoObject object(0, new QtTestWidgetControl, 0);
- object.testService->widgetControl->setHue(controlValue);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
- QCOMPARE(widget.hue(), 0);
-
- widget.show();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.hue(), 0);
-
- QSignalSpy spy(&widget, SIGNAL(hueChanged(int)));
-
- widget.setHue(value);
- QCOMPARE(widget.hue(), expectedValue);
- QCOMPARE(object.testService->widgetControl->hue(), expectedValue);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
-
- widget.setHue(value);
- QCOMPARE(widget.hue(), expectedValue);
- QCOMPARE(object.testService->widgetControl->hue(), expectedValue);
- QCOMPARE(spy.count(), 1);
-
- object.testService->widgetControl->setHue(controlValue);
- QCOMPARE(widget.hue(), controlValue);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
-}
-
-void tst_QVideoWidget::hueRendererControl()
-{
- QFETCH(int, value);
- QFETCH(int, expectedValue);
-
- QtTestVideoObject object(0, 0, new QtTestRendererControl);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- QSignalSpy spy(&widget, SIGNAL(hueChanged(int)));
-
- widget.setHue(value);
- QCOMPARE(widget.hue(), expectedValue);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
-
- widget.setHue(value);
- QCOMPARE(widget.hue(), expectedValue);
- QCOMPARE(spy.count(), 1);
-}
-
-void tst_QVideoWidget::saturationWindowControl()
-{
- QFETCH(int, controlValue);
- QFETCH(int, value);
- QFETCH(int, expectedValue);
-
- QtTestVideoObject object(new QtTestWindowControl, 0, 0);
- object.testService->windowControl->setSaturation(controlValue);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
- QCOMPARE(widget.saturation(), 0);
- widget.show();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.saturation(), 0);
-
- QSignalSpy spy(&widget, SIGNAL(saturationChanged(int)));
-
- widget.setSaturation(value);
- QCOMPARE(widget.saturation(), expectedValue);
- QCOMPARE(object.testService->windowControl->saturation(), expectedValue);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
-
- widget.setSaturation(value);
- QCOMPARE(widget.saturation(), expectedValue);
- QCOMPARE(object.testService->windowControl->saturation(), expectedValue);
- QCOMPARE(spy.count(), 1);
-
- object.testService->windowControl->setSaturation(controlValue);
- QCOMPARE(widget.saturation(), controlValue);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
-}
-
-void tst_QVideoWidget::saturationWidgetControl()
-{
- QFETCH(int, controlValue);
- QFETCH(int, value);
- QFETCH(int, expectedValue);
-
- QtTestVideoObject object(0, new QtTestWidgetControl, 0);
- object.testService->widgetControl->setSaturation(controlValue);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
-
- QCOMPARE(widget.saturation(), 0);
- widget.show();
- QTest::qWaitForWindowShown(&widget);
- QCOMPARE(widget.saturation(), 0);
-
- QSignalSpy spy(&widget, SIGNAL(saturationChanged(int)));
-
- widget.setSaturation(value);
- QCOMPARE(widget.saturation(), expectedValue);
- QCOMPARE(object.testService->widgetControl->saturation(), expectedValue);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
-
- widget.setSaturation(value);
- QCOMPARE(widget.saturation(), expectedValue);
- QCOMPARE(object.testService->widgetControl->saturation(), expectedValue);
- QCOMPARE(spy.count(), 1);
-
- object.testService->widgetControl->setSaturation(controlValue);
- QCOMPARE(widget.saturation(), controlValue);
- QCOMPARE(spy.count(), 2);
- QCOMPARE(spy.value(1).value(0).toInt(), controlValue);
-
-}
-
-void tst_QVideoWidget::saturationRendererControl()
-{
- QFETCH(int, value);
- QFETCH(int, expectedValue);
-
- QtTestVideoObject object(0, 0, new QtTestRendererControl);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
- widget.show();
- QTest::qWaitForWindowShown(&widget);
- QSignalSpy spy(&widget, SIGNAL(saturationChanged(int)));
-
- widget.setSaturation(value);
- QCOMPARE(widget.saturation(), expectedValue);
- QCOMPARE(spy.count(), 1);
- QCOMPARE(spy.value(0).value(0).toInt(), expectedValue);
-
- widget.setSaturation(value);
- QCOMPARE(widget.saturation(), expectedValue);
- QCOMPARE(spy.count(), 1);
-}
-
-static const uchar rgb32ImageData[] =
-{
- 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00,
- 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00
-};
-
-void tst_QVideoWidget::paintRendererControl()
-{
- QtTestVideoObject object(0, 0, new QtTestRendererControl);
-
- QVideoWidget widget;
- widget.setMediaObject(&object);
- widget.setWindowFlags(Qt::X11BypassWindowManagerHint);
- widget.show();
- QTest::qWaitForWindowShown(&widget);
-
- QPainterVideoSurface *surface = qobject_cast<QPainterVideoSurface *>(
- object.testService->rendererControl->surface());
-
- QVideoSurfaceFormat format(QSize(2, 2), QVideoFrame::Format_RGB32);
-
- QVERIFY(surface->start(format));
- QCOMPARE(surface->isActive(), true);
- QCOMPARE(surface->isReady(), true);
-
- QCoreApplication::processEvents(QEventLoop::AllEvents);
-
- QCOMPARE(surface->isActive(), true);
- QCOMPARE(surface->isReady(), true);
-
- QVideoFrame frame(sizeof(rgb32ImageData), QSize(2, 2), 8, QVideoFrame::Format_RGB32);
-
- frame.map(QAbstractVideoBuffer::WriteOnly);
- memcpy(frame.bits(), rgb32ImageData, frame.mappedBytes());
- frame.unmap();
-
- QVERIFY(surface->present(frame));
- QCOMPARE(surface->isActive(), true);
- QCOMPARE(surface->isReady(), false);
-
- //wait up to 2 seconds for the frame to be presented
- for (int i=0; i<200 && !surface->isReady(); i++)
- QTest::qWait(10);
-
- QCOMPARE(surface->isActive(), true);
- QCOMPARE(surface->isReady(), true);
-}
-
-QTEST_MAIN(tst_QVideoWidget)
-
-#include "tst_qvideowidget.moc"
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 76e20b9..5d47aed 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -9514,6 +9514,8 @@ void tst_QWidget::destroyBackingStore()
w.update();
QApplication::processEvents();
QCOMPARE(w.numPaintEvents, 2);
+#else
+ QSKIP("Test case relies on developer build (AUTOTEST_EXPORT)", SkipAll);
#endif
}
@@ -9992,6 +9994,7 @@ void tst_QWidget::focusProxyAndInputMethods()
delete toplevel;
}
+#ifdef QT_BUILD_INTERNAL
class scrollWidgetWBS : public QWidget
{
public:
@@ -10011,9 +10014,11 @@ public:
}
}
};
+#endif
void tst_QWidget::scrollWithoutBackingStore()
{
+#ifdef QT_BUILD_INTERNAL
scrollWidgetWBS scrollable;
scrollable.resize(100,100);
QLabel child(QString("@"),&scrollable);
@@ -10027,6 +10032,9 @@ void tst_QWidget::scrollWithoutBackingStore()
QCOMPARE(child.pos(),QPoint(25,25));
scrollable.enableBackingStore();
QCOMPARE(child.pos(),QPoint(25,25));
+#else
+ QSKIP("Test case relies on developer build (AUTOTEST_EXPORT)", SkipAll);
+#endif
}
void tst_QWidget::taskQTBUG_7532_tabOrderWithFocusProxy()
diff --git a/tests/auto/qwidgetaction/tst_qwidgetaction.cpp b/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
index 5dfcd43..53dc4b5 100644
--- a/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
+++ b/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
@@ -51,6 +51,8 @@
#include <qmainwindow.h>
#include <qmenubar.h>
+#include "../../shared/util.h"
+
//TESTED_CLASS=
//TESTED_FILES=
@@ -190,8 +192,8 @@ void tst_QWidgetAction::visibilityUpdate()
QVERIFY(action->isVisible());
action->setVisible(false);
- QTest::qWait(100); //the call to hide is delayed by the toolbar layout
- QVERIFY(!combo->isVisible());
+ qApp->processEvents(); //the call to hide is delayed by the toolbar layout
+ QTRY_VERIFY(!combo->isVisible());
delete action;
// action also deletes combo
diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp
index be0d708..6fd9b93 100644
--- a/tests/auto/qxmlquery/tst_qxmlquery.cpp
+++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp
@@ -857,7 +857,7 @@ void tst_QXmlQuery::bindVariableXSLTSuccess() const
stylesheet.bindVariable(QLatin1String("paramSelectWithTypeIntBoundWithBindVariableRequired"),
QVariant(QLatin1String("param5")));
- stylesheet.setQuery(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/parameters.xsl"))));
+ stylesheet.setQuery(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/parameters.xsl"))));
QVERIFY(stylesheet.isValid());
@@ -1798,11 +1798,11 @@ void tst_QXmlQuery::setFocusQUrl() const
{
QXmlQuery query(QXmlQuery::XSLT20);
- const TestURIResolver resolver(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml"))));
+ const TestURIResolver resolver(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml"))));
query.setUriResolver(&resolver);
QVERIFY(query.setFocus(QUrl(QLatin1String("arbitraryURI"))));
- query.setQuery(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/copyWholeDocument.xsl"))));
+ query.setQuery(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/copyWholeDocument.xsl"))));
QVERIFY(query.isValid());
QBuffer result;
@@ -2997,7 +2997,7 @@ void tst_QXmlQuery::setInitialTemplateNameQXmlName() const
QCOMPARE(query.initialTemplateName(), name);
- query.setQuery(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/namedTemplate.xsl"))));
+ query.setQuery(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/namedTemplate.xsl"))));
QVERIFY(query.isValid());
QBuffer result;
@@ -3059,7 +3059,7 @@ void tst_QXmlQuery::setNetworkAccessManager() const
/* Ensure fn:doc() picks up the right QNetworkAccessManager. */
{
NetworkOverrider networkOverrider(QUrl(QLatin1String("tag:example.com:DOESNOTEXIST")),
- QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/queries/simpleDocument.xml"))));
+ QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/queries/simpleDocument.xml"))));
QXmlQuery query;
query.setNetworkAccessManager(&networkOverrider);
@@ -3075,7 +3075,7 @@ void tst_QXmlQuery::setNetworkAccessManager() const
/* Ensure setQuery() is using the right network manager. */
{
NetworkOverrider networkOverrider(QUrl(QLatin1String("tag:example.com:DOESNOTEXIST")),
- QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/queries/concat.xq"))));
+ QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/queries/concat.xq"))));
QXmlQuery query;
query.setNetworkAccessManager(&networkOverrider);
@@ -3135,7 +3135,7 @@ void tst_QXmlQuery::multipleDocsAndFocus() const
query.setQuery(QLatin1String("string(doc('") +
inputFile(QLatin1String(SRCDIR "../xmlpatterns/queries/simpleDocument.xml")) +
QLatin1String("'))"));
- query.setFocus(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml"))));
+ query.setFocus(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml"))));
query.setQuery(QLatin1String("string(.)"));
QStringList result;
@@ -3159,11 +3159,11 @@ void tst_QXmlQuery::multipleEvaluationsWithDifferentFocus() const
QXmlQuery query;
QStringList result;
- query.setFocus(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml"))));
+ query.setFocus(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml"))));
query.setQuery(QLatin1String("string(.)"));
QVERIFY(query.evaluateTo(&result));
- query.setFocus(QUrl(inputFile(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml"))));
+ query.setFocus(QUrl(inputFileAsURI(QLatin1String(SRCDIR "../xmlpatterns/stylesheets/documentElement.xml"))));
QVERIFY(query.evaluateTo(&result));
}
diff --git a/tests/auto/xmlpatterns.pro b/tests/auto/xmlpatterns.pro
index 923f2c4..b9244d6 100644
--- a/tests/auto/xmlpatterns.pro
+++ b/tests/auto/xmlpatterns.pro
@@ -36,6 +36,7 @@ SUBDIRS=\
xmlpatternsdiagnosticsts.depends = xmlpatternssdk
xmlpatternsview.depends = xmlpatternssdk
xmlpatternsxslts.depends = xmlpatternssdk
+xmlpatternsxqts.depends = xmlpatternssdk
xmlpatternsschemats.depends = xmlpatternssdk
xmlpatternsxqts.depends = xmlpatternssdk
diff --git a/tests/auto/xmlpatternsxqts/tst_suitetest.cpp b/tests/auto/xmlpatternsxqts/tst_suitetest.cpp
index 64120c7..ec63858 100644
--- a/tests/auto/xmlpatternsxqts/tst_suitetest.cpp
+++ b/tests/auto/xmlpatternsxqts/tst_suitetest.cpp
@@ -89,10 +89,17 @@ void tst_SuiteTest::runTestSuite() const
TestSuite::SuiteType suiteType;
switch (m_suiteType) {
- case XQuerySuite: suiteType = TestSuite::XQuerySuite;
- case XsltSuite: suiteType = TestSuite::XsltSuite;
- case XsdSuite: suiteType = TestSuite::XsdSuite;
- default: break;
+ case XQuerySuite:
+ suiteType = TestSuite::XQuerySuite;
+ break;
+ case XsltSuite:
+ suiteType = TestSuite::XsltSuite;
+ break;
+ case XsdSuite:
+ suiteType = TestSuite::XsdSuite;
+ break;
+ default:
+ break;
}
TestSuite *const ts = TestSuite::openCatalog(catalogPath, errMsg, true, suiteType);
diff --git a/tests/benchmarks/corelib/thread/qmutex/qmutex.pro b/tests/benchmarks/corelib/thread/qmutex/qmutex.pro
new file mode 100644
index 0000000..eda2f11
--- /dev/null
+++ b/tests/benchmarks/corelib/thread/qmutex/qmutex.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_bench_qmutex
+
+SOURCES += tst_qmutex.cpp
+
diff --git a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp
new file mode 100644
index 0000000..fded508
--- /dev/null
+++ b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** 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 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 <qtest.h>
+#include <QtCore>
+
+#include <math.h>
+
+//TESTED_FILES=
+
+
+class tst_QMutex : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QMutex();
+ virtual ~tst_QMutex();
+
+private slots:
+ void noThread_data();
+ void noThread();
+};
+
+tst_QMutex::tst_QMutex()
+{
+}
+
+tst_QMutex::~tst_QMutex()
+{
+}
+
+void tst_QMutex::noThread_data()
+{
+ QTest::addColumn<int>("t");
+
+ QTest::newRow("noLock") << 1;
+ QTest::newRow("QMutexInline") << 2;
+ QTest::newRow("QMutex") << 3;
+ QTest::newRow("QMutexLocker") << 4;
+}
+
+void tst_QMutex::noThread()
+{
+ volatile int count = 0;
+ const int N = 5000000;
+ QMutex mtx;
+
+ QFETCH(int, t);
+ switch(t) {
+ case 1:
+ QBENCHMARK {
+ count = 0;
+ for (int i = 0; i < N; i++) {
+ count++;
+ }
+ }
+ break;
+ case 2:
+ QBENCHMARK {
+ count = 0;
+ for (int i = 0; i < N; i++) {
+ mtx.lockInline();
+ count++;
+ mtx.unlockInline();
+ }
+ }
+ break;
+ case 3:
+ QBENCHMARK {
+ count = 0;
+ for (int i = 0; i < N; i++) {
+ mtx.lock();
+ count++;
+ mtx.unlock();
+ }
+ }
+ break;
+ case 4:
+ QBENCHMARK {
+ count = 0;
+ for (int i = 0; i < N; i++) {
+ QMutexLocker locker(&mtx);
+ count++;
+ }
+ }
+ break;
+ }
+ QCOMPARE(int(count), N);
+}
+
+QTEST_MAIN(tst_QMutex)
+#include "tst_qmutex.moc"
diff --git a/tests/benchmarks/declarative/binding/binding.pro b/tests/benchmarks/declarative/binding/binding.pro
index 5ceaf34..c1a8223 100644
--- a/tests/benchmarks/declarative/binding/binding.pro
+++ b/tests/benchmarks/declarative/binding/binding.pro
@@ -7,12 +7,11 @@ macx:CONFIG -= app_bundle
SOURCES += tst_binding.cpp testtypes.cpp
HEADERS += testtypes.h
-# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
-
-symbian* {
- data.sources = data/*
- data.path = data
+symbian {
+ data.sources = data
+ data.path = .
DEPLOYMENT = data
+} else {
+ # Define SRCDIR equal to test's source directory
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
}
-
diff --git a/tests/benchmarks/declarative/binding/tst_binding.cpp b/tests/benchmarks/declarative/binding/tst_binding.cpp
index dbddac3..6e3e146 100644
--- a/tests/benchmarks/declarative/binding/tst_binding.cpp
+++ b/tests/benchmarks/declarative/binding/tst_binding.cpp
@@ -48,6 +48,11 @@
//TESTED_FILES=
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
class tst_binding : public QObject
{
Q_OBJECT
diff --git a/tests/benchmarks/declarative/compilation/compilation.pro b/tests/benchmarks/declarative/compilation/compilation.pro
new file mode 100644
index 0000000..9277187
--- /dev/null
+++ b/tests/benchmarks/declarative/compilation/compilation.pro
@@ -0,0 +1,17 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_compilation
+QT += declarative
+macx:CONFIG -= app_bundle
+
+CONFIG += release
+
+SOURCES += tst_compilation.cpp
+
+symbian {
+ data.sources += data
+ data.path = .
+ DEPLOYMENT += data
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
diff --git a/tests/benchmarks/declarative/compilation/data/BoomBlock.qml b/tests/benchmarks/declarative/compilation/data/BoomBlock.qml
new file mode 100644
index 0000000..47f43c2
--- /dev/null
+++ b/tests/benchmarks/declarative/compilation/data/BoomBlock.qml
@@ -0,0 +1,65 @@
+import Qt 4.7
+import Qt.labs.particles 1.0
+
+Item {
+ id: block
+ property bool dying: false
+ property bool spawned: false
+ property int type: 0
+ property int targetX: 0
+ property int targetY: 0
+
+ SpringFollow on x { enabled: spawned; to: targetX; spring: 2; damping: 0.2 }
+ SpringFollow on y { to: targetY; spring: 2; damping: 0.2 }
+
+ Image {
+ id: img
+ source: {
+ if(type == 0){
+ "pics/redStone.png";
+ } else if(type == 1) {
+ "pics/blueStone.png";
+ } else {
+ "pics/greenStone.png";
+ }
+ }
+ opacity: 0
+ Behavior on opacity { NumberAnimation { duration: 200 } }
+ anchors.fill: parent
+ }
+
+ Particles {
+ id: particles
+
+ width: 1; height: 1
+ anchors.centerIn: parent
+
+ emissionRate: 0
+ lifeSpan: 700; lifeSpanDeviation: 600
+ angle: 0; angleDeviation: 360;
+ velocity: 100; velocityDeviation: 30
+ source: {
+ if(type == 0){
+ "pics/redStar.png";
+ } else if (type == 1) {
+ "pics/blueStar.png";
+ } else {
+ "pics/greenStar.png";
+ }
+ }
+ }
+
+ states: [
+ State {
+ name: "AliveState"; when: spawned == true && dying == false
+ PropertyChanges { target: img; opacity: 1 }
+ },
+
+ State {
+ name: "DeathState"; when: dying == true
+ StateChangeScript { script: particles.burst(50); }
+ PropertyChanges { target: img; opacity: 0 }
+ StateChangeScript { script: block.destroy(1000); }
+ }
+ ]
+}
diff --git a/tests/benchmarks/declarative/compilation/tst_compilation.cpp b/tests/benchmarks/declarative/compilation/tst_compilation.cpp
new file mode 100644
index 0000000..0c6e917
--- /dev/null
+++ b/tests/benchmarks/declarative/compilation/tst_compilation.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** 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 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 <qtest.h>
+#include <QDeclarativeEngine>
+#include <QDeclarativeComponent>
+#include <QFile>
+
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
+
+class tst_compilation : public QObject
+{
+ Q_OBJECT
+public:
+ tst_compilation();
+
+private slots:
+ void boomblock();
+
+private:
+ QDeclarativeEngine engine;
+};
+
+tst_compilation::tst_compilation()
+{
+}
+
+inline QUrl TEST_FILE(const QString &filename)
+{
+ return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
+}
+
+void tst_compilation::boomblock()
+{
+ QFile f(SRCDIR + QLatin1String("/data/BoomBlock.qml"));
+ QVERIFY(f.open(QIODevice::ReadOnly));
+ QByteArray data = f.readAll();
+
+ QBENCHMARK {
+ QDeclarativeComponent c(&engine);
+ c.setData(data, QUrl());
+// QVERIFY(c.isReady());
+ }
+}
+
+QTEST_MAIN(tst_compilation)
+
+#include "tst_compilation.moc"
diff --git a/tests/benchmarks/declarative/creation/creation.pro b/tests/benchmarks/declarative/creation/creation.pro
index 3e0caf6..6540fa2 100644
--- a/tests/benchmarks/declarative/creation/creation.pro
+++ b/tests/benchmarks/declarative/creation/creation.pro
@@ -6,10 +6,10 @@ macx:CONFIG -= app_bundle
SOURCES += tst_creation.cpp
-symbian* {
- data.sources = data/*
- data.path = data
- DEPLOYMENT += addFiles
+symbian {
+ data.sources = data
+ data.path = .
+ DEPLOYMENT += data
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
-} \ No newline at end of file
+}
diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp
index 6f00473..1c3332e 100644
--- a/tests/benchmarks/declarative/creation/tst_creation.cpp
+++ b/tests/benchmarks/declarative/creation/tst_creation.cpp
@@ -52,8 +52,7 @@
#ifdef Q_OS_SYMBIAN
// In Symbian OS test data is located in applications private dir
-// Application private dir is default serach path for files, so SRCDIR can be set to empty
-#define SRCDIR ""
+#define SRCDIR "."
#endif
class tst_creation : public QObject
@@ -97,8 +96,8 @@ public:
TestType(QObject *parent = 0)
: QObject(parent) {}
- QDeclarativeListProperty<QObject> resources() {
- return QDeclarativeListProperty<QObject>(this, 0, resources_append);
+ QDeclarativeListProperty<QObject> resources() {
+ return QDeclarativeListProperty<QObject>(this, 0, resources_append);
}
static void resources_append(QDeclarativeListProperty<QObject> *p, QObject *o) {
@@ -106,7 +105,7 @@ public:
}
};
-tst_creation::tst_creation()
+tst_creation::tst_creation()
{
qmlRegisterType<TestType>("Qt.test", 1, 0, "TestType");
}
@@ -203,7 +202,7 @@ void tst_creation::qobject_10tree_cpp()
void tst_creation::qobject_qmltype()
{
- QDeclarativeType *t = QDeclarativeMetaType::qmlType("Qt/QtObject", 4, 6);
+ QDeclarativeType *t = QDeclarativeMetaType::qmlType("Qt/QtObject", 4, 7);
QBENCHMARK {
QObject *obj = t->create();
@@ -347,7 +346,7 @@ void tst_creation::elements_data()
void tst_creation::elements()
{
QFETCH(QByteArray, type);
- QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 4, 6);
+ QDeclarativeType *t = QDeclarativeMetaType::qmlType(type, 4, 7);
if (!t || !t->isCreatable())
QSKIP("Non-creatable type", SkipSingle);
diff --git a/tests/benchmarks/declarative/declarative.pro b/tests/benchmarks/declarative/declarative.pro
index a7d426c..5dd31f3 100644
--- a/tests/benchmarks/declarative/declarative.pro
+++ b/tests/benchmarks/declarative/declarative.pro
@@ -1,11 +1,15 @@
TEMPLATE = subdirs
+
SUBDIRS += \
binding \
creation \
- painting \
pointers \
qdeclarativecomponent \
qdeclarativeimage \
qdeclarativemetaproperty \
script \
qmltime
+
+contains(QT_CONFIG, opengl): SUBDIRS += painting
+
+
diff --git a/tests/benchmarks/declarative/painting/painting.pro b/tests/benchmarks/declarative/painting/painting.pro
index 2f98e8b..69c0006 100644
--- a/tests/benchmarks/declarative/painting/painting.pro
+++ b/tests/benchmarks/declarative/painting/painting.pro
@@ -2,6 +2,8 @@
# Automatically generated by qmake (2.01a) fr 29. jan 13:57:52 2010
######################################################################
+requires(contains(QT_CONFIG,opengl))
+
TEMPLATE = app
TARGET =
DEPENDPATH += .
@@ -11,3 +13,4 @@ INCLUDEPATH += .
SOURCES += paintbenchmark.cpp
QT += opengl
CONFIG += console
+macx:CONFIG -= app_bundle
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
index 30ef235..b2f39c1 100644
--- a/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/qdeclarativecomponent.pro
@@ -7,16 +7,11 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativecomponent.cpp testtypes.cpp
HEADERS += testtypes.h
-# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
-
-symbian* {
- data.sources = data/*
- data.path = data
- samegame.sources = data/samegame/*
- samegame.path = data/samegame
- samegame_pics.sources = data/samegame/pics/*
- samegame_pics.path = data/samegame/pics
- DEPLOYMENT += data samegame samegame_pics
+symbian {
+ data.sources = data
+ data.path = .
+ DEPLOYMENT += data
+} else {
+ # Define SRCDIR equal to test's source directory
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
}
-
diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
index 4b1456e..13420ff 100644
--- a/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
+++ b/tests/benchmarks/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
@@ -48,6 +48,10 @@
//TESTED_FILES=
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
class tst_qmlcomponent : public QObject
{
diff --git a/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro
index bbe4e8d..a68792b 100644
--- a/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro
+++ b/tests/benchmarks/declarative/qdeclarativeimage/qdeclarativeimage.pro
@@ -7,10 +7,11 @@ CONFIG += release
SOURCES += tst_qdeclarativeimage.cpp
-symbian* {
- data.sources = image.png
- data.path = .
- DEPLOYMENT += data
+symbian {
+ importFiles.sources = image.png
+ importFiles.path =
+ DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
+
diff --git a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index 4bba022..2d9744e 100644
--- a/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/benchmarks/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -46,8 +46,7 @@
#ifdef Q_OS_SYMBIAN
// In Symbian OS test data is located in applications private dir
-// Application private dir is default serach path for files, so SRCDIR can be set to empty
-#define SRCDIR ""
+#define SRCDIR "."
#endif
class tst_qmlgraphicsimage : public QObject
@@ -68,7 +67,7 @@ private:
void tst_qmlgraphicsimage::qmlgraphicsimage()
{
int x = 0;
- QUrl url("image.png");
+ QUrl url(SRCDIR "/image.png");
QBENCHMARK {
QUrl url2("http://localhost/image" + QString::number(x++) + ".png");
QDeclarativeImage *image = new QDeclarativeImage;
@@ -80,7 +79,7 @@ void tst_qmlgraphicsimage::qmlgraphicsimage()
void tst_qmlgraphicsimage::qmlgraphicsimage_file()
{
int x = 0;
- QUrl url("image.png");
+ QUrl url(SRCDIR "/image.png");
QBENCHMARK {
QUrl url2("http://localhost/image" + QString::number(x++) + ".png");
QDeclarativeImage *image = new QDeclarativeImage;
@@ -93,7 +92,7 @@ void tst_qmlgraphicsimage::qmlgraphicsimage_file()
void tst_qmlgraphicsimage::qmlgraphicsimage_url()
{
int x = 0;
- QUrl url("image.png");
+ QUrl url(SRCDIR "/image.png");
QBENCHMARK {
QUrl url2("http://localhost/image" + QString::number(x++) + ".png");
QDeclarativeImage *image = new QDeclarativeImage;
diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro b/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro
index 79fdd26..65ee7e0 100644
--- a/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro
+++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/qdeclarativemetaproperty.pro
@@ -6,5 +6,11 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qdeclarativemetaproperty.cpp
-# Define SRCDIR equal to test's source directory
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+symbian {
+ data.sources += data
+ data.path = .
+ DEPLOYMENT += data
+} else {
+ # Define SRCDIR equal to test's source directory
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp b/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp
index 8a5f4ae..6e71e7d 100644
--- a/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp
+++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/tst_qdeclarativemetaproperty.cpp
@@ -48,6 +48,10 @@
//TESTED_FILES=
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+#define SRCDIR "."
+#endif
class tst_qmlmetaproperty : public QObject
{
diff --git a/tests/benchmarks/declarative/qmltime/qmltime.pro b/tests/benchmarks/declarative/qmltime/qmltime.pro
index 9352f3b..6f5ad5e 100644
--- a/tests/benchmarks/declarative/qmltime/qmltime.pro
+++ b/tests/benchmarks/declarative/qmltime/qmltime.pro
@@ -6,18 +6,10 @@ macx:CONFIG -= app_bundle
SOURCES += qmltime.cpp
-symbian* {
+symbian {
TARGET.CAPABILITY = "All -TCB"
- example.sources = example.qml
- esample.path = .
- tests.sources = tests/*
- tests.path = tests
- anshors.sources = tests/anchors/*
- anchors.path = tests/anchors
- item_creation.sources = tests/item_creation/*
- item_creation.path = tests/item_creation
- positioner_creation.sources = tests/positioner_creation/*
- positioner_creation.path = tests/positioner_creation
- DEPLOYMENT += example tests anchors item_creation positioner_creation
+ example.sources = example.qml tests
+ example.path = .
+ DEPLOYMENT += example
}
diff --git a/tests/benchmarks/declarative/script/data/slot_complex_js.js b/tests/benchmarks/declarative/script/data/slot_complex_js.js
new file mode 100644
index 0000000..64a1f65
--- /dev/null
+++ b/tests/benchmarks/declarative/script/data/slot_complex_js.js
@@ -0,0 +1,8 @@
+function myCustomFunction(n) {
+ var a = 1;
+ while (n > 0) {
+ a = a * n;
+ n--;
+ }
+ return a;
+}
diff --git a/tests/benchmarks/declarative/script/data/slot_complex_js.qml b/tests/benchmarks/declarative/script/data/slot_complex_js.qml
index ed4f78b..7bda48b 100644
--- a/tests/benchmarks/declarative/script/data/slot_complex_js.qml
+++ b/tests/benchmarks/declarative/script/data/slot_complex_js.qml
@@ -1,18 +1,8 @@
import Qt.test 1.0
+import "slot_complex_js.js" as Logic
TestObject {
- Script {
- function myCustomFunction(n) {
- var a = 1;
- while (n > 0) {
- a = a * n;
- n--;
- }
- return a;
- }
- }
-
- onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(10); } }
+ onMySignal: { for (var ii = 0; ii < 10000; ++ii) { Logic.myCustomFunction(10); } }
}
diff --git a/tests/benchmarks/declarative/script/data/slot_simple_js.js b/tests/benchmarks/declarative/script/data/slot_simple_js.js
new file mode 100644
index 0000000..d6e6060
--- /dev/null
+++ b/tests/benchmarks/declarative/script/data/slot_simple_js.js
@@ -0,0 +1,3 @@
+function myCustomFunction() {
+ return 0;
+}
diff --git a/tests/benchmarks/declarative/script/data/slot_simple_js.qml b/tests/benchmarks/declarative/script/data/slot_simple_js.qml
index a88265c..7ea3177 100644
--- a/tests/benchmarks/declarative/script/data/slot_simple_js.qml
+++ b/tests/benchmarks/declarative/script/data/slot_simple_js.qml
@@ -1,13 +1,7 @@
import Qt.test 1.0
+import "slot_simple_js.js" as Logic
TestObject {
-
- Script {
- function myCustomFunction() {
- return 0;
- }
- }
-
- onMySignal: { for (var ii = 0; ii < 10000; ++ii) { myCustomFunction(); } }
+ onMySignal: { for (var ii = 0; ii < 10000; ++ii) { Logic.myCustomFunction(); } }
}
diff --git a/tests/benchmarks/declarative/script/script.pro b/tests/benchmarks/declarative/script/script.pro
index 6255acc..685ba03 100644
--- a/tests/benchmarks/declarative/script/script.pro
+++ b/tests/benchmarks/declarative/script/script.pro
@@ -7,10 +7,10 @@ CONFIG += release
SOURCES += tst_script.cpp
-symbian* {
- data.sources = data/*
- data.path = data
- DEPLOYMENT += data
+symbian {
+ importFiles.sources = data
+ importFiles.path =
+ DEPLOYMENT = importFiles
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
}
diff --git a/tests/benchmarks/declarative/script/tst_script.cpp b/tests/benchmarks/declarative/script/tst_script.cpp
index 8ea6dcd..99f294c 100644
--- a/tests/benchmarks/declarative/script/tst_script.cpp
+++ b/tests/benchmarks/declarative/script/tst_script.cpp
@@ -50,7 +50,6 @@
#ifdef Q_OS_SYMBIAN
// In Symbian OS test data is located in applications private dir
-// Application private dir is default serach path for files, so SRCDIR can be set to empty
#define SRCDIR "."
#endif
diff --git a/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp b/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp
index b92ab46..f4c4c1f 100644
--- a/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp
+++ b/tests/benchmarks/declarative/typeimports/tst_typeimports.cpp
@@ -46,8 +46,7 @@
#ifdef Q_OS_SYMBIAN
// In Symbian OS test data is located in applications private dir
-// Application private dir is default serach path for files, so SRCDIR can be set to empty
-#define SRCDIR ""
+#define SRCDIR "."
#endif
class tst_typeimports : public QObject
@@ -72,8 +71,8 @@ class TestType1 : public QObject
public:
TestType1(QObject *parent = 0) : QObject(parent) {}
- QDeclarativeListProperty<QObject> resources() {
- return QDeclarativeListProperty<QObject>(this, 0, resources_append);
+ QDeclarativeListProperty<QObject> resources() {
+ return QDeclarativeListProperty<QObject>(this, 0, resources_append);
}
static void resources_append(QDeclarativeListProperty<QObject> *p, QObject *o) {
@@ -104,7 +103,7 @@ public:
};
-tst_typeimports::tst_typeimports()
+tst_typeimports::tst_typeimports()
{
qmlRegisterType<TestType1>("Qt.test", 1, 0, "TestType1");
qmlRegisterType<TestType2>("Qt.test", 1, 0, "TestType2");
diff --git a/tests/benchmarks/declarative/typeimports/typeimports.pro b/tests/benchmarks/declarative/typeimports/typeimports.pro
index 8a74e0d..a5df3f0 100644
--- a/tests/benchmarks/declarative/typeimports/typeimports.pro
+++ b/tests/benchmarks/declarative/typeimports/typeimports.pro
@@ -6,10 +6,10 @@ macx:CONFIG -= app_bundle
SOURCES += tst_typeimports.cpp
-symbian* {
- data.sources = data/*
- data.path = data
- DEPLOYMENT += addFiles
+symbian {
+ data.sources = data
+ data.path = .
+ DEPLOYMENT += data
} else {
DEFINES += SRCDIR=\\\"$$PWD\\\"
} \ No newline at end of file
diff --git a/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp b/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
index 9ffbefb..8e9de4a 100644
--- a/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/benchmarks/gui/image/qpixmap/tst_qpixmap.cpp
@@ -43,6 +43,7 @@
#include <QPixmap>
#include <QBitmap>
#include <QPainter>
+#include <private/qpixmap_raster_p.h>
class tst_QPixmap : public QObject
{
@@ -67,6 +68,31 @@ Q_DECLARE_METATYPE(QImage::Format)
Q_DECLARE_METATYPE(Qt::AspectRatioMode)
Q_DECLARE_METATYPE(Qt::TransformationMode)
+QPixmap rasterPixmap(int width, int height)
+{
+ QPixmapData *data =
+ new QRasterPixmapData(QPixmapData::PixmapType);
+
+ data->resize(width, height);
+
+ return QPixmap(data);
+}
+
+QPixmap rasterPixmap(const QSize &size)
+{
+ return rasterPixmap(size.width(), size.height());
+}
+
+QPixmap rasterPixmap(const QImage &image)
+{
+ QPixmapData *data =
+ new QRasterPixmapData(QPixmapData::PixmapType);
+
+ data->fromImage(image, Qt::AutoColor);
+
+ return QPixmap(data);
+}
+
tst_QPixmap::tst_QPixmap()
{
}
@@ -90,7 +116,7 @@ void tst_QPixmap::fill()
QFETCH(int, height);
const QColor color = opaque ? QColor(255, 0, 0) : QColor(255, 0, 0, 200);
- QPixmap pixmap(width, height);
+ QPixmap pixmap = rasterPixmap(width, height);
QBENCHMARK {
pixmap.fill(color);
@@ -126,8 +152,8 @@ void tst_QPixmap::scaled()
QFETCH(Qt::AspectRatioMode, ratioMode);
QFETCH(Qt::TransformationMode, transformMode);
- QPixmap opaque(size);
- QPixmap transparent(size);
+ QPixmap opaque = rasterPixmap(size);
+ QPixmap transparent = rasterPixmap(size);
opaque.fill(QColor(255, 0, 0));
transparent.fill(QColor(255, 0, 0, 200));
@@ -180,8 +206,8 @@ void tst_QPixmap::transformed()
QFETCH(QTransform, transform);
QFETCH(Qt::TransformationMode, transformMode);
- QPixmap opaque(size);
- QPixmap transparent(size);
+ QPixmap opaque = rasterPixmap(size);
+ QPixmap transparent = rasterPixmap(size);
opaque.fill(QColor(255, 0, 0));
transparent.fill(QColor(255, 0, 0, 200));
@@ -209,7 +235,7 @@ void tst_QPixmap::mask()
{
QFETCH(QSize, size);
- QPixmap src(size);
+ QPixmap src = rasterPixmap(size);
src.fill(Qt::transparent);
{
QPainter p(&src);
diff --git a/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp
index 8c30be4..7015bd1 100644
--- a/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/benchmarks/gui/kernel/qwidget/tst_qwidget.cpp
@@ -159,12 +159,17 @@ void tst_QWidget::update_data()
QTest::newRow("10x10x1 opaque") << 10 << 10 << 1 << true;
QTest::newRow("10x10x10 opaque") << 10 << 10 << 10 << true;
QTest::newRow("10x10x100 opaque") << 10 << 10 << 100 << true;
+#ifndef Q_OS_SYMBIAN
+ //These test cases cause stack overflow in QWidgetPrivate::paintSiblingsRecursive
+ //see http://bugreports.qt.nokia.com/browse/QTBUG-8512
+ //Symbian threads have a hard limit of 80kB user stack
QTest::newRow("25x25x1 transparent ") << 25 << 25 << 1 << false;
QTest::newRow("25x25x10 transparent") << 25 << 25 << 10 << false;
QTest::newRow("25x25x100 transparent") << 25 << 25 << 100 << false;
QTest::newRow("25x25x1 opaque") << 25 << 25 << 1 << true;
QTest::newRow("25x25x10 opaque") << 25 << 25 << 10 << true;
QTest::newRow("25x25x100 opaque") << 25 << 25 << 100 << true;
+#endif
}
void tst_QWidget::update()
diff --git a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
index d570bb3..318b671 100644
--- a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp
@@ -50,6 +50,8 @@
#define M_PI 3.14159265358979323846
#endif
+#include <private/qpixmap_raster_p.h>
+
Q_DECLARE_METATYPE(QLine)
Q_DECLARE_METATYPE(QRect)
Q_DECLARE_METATYPE(QSize)
@@ -125,6 +127,32 @@ struct PrimitiveSet {
};
+QPixmap rasterPixmap(int width, int height)
+{
+ QPixmapData *data =
+ new QRasterPixmapData(QPixmapData::PixmapType);
+
+ data->resize(width, height);
+
+ return QPixmap(data);
+}
+
+QPixmap rasterPixmap(const QSize &size)
+{
+ return rasterPixmap(size.width(), size.height());
+}
+
+QPixmap rasterPixmap(const QImage &image)
+{
+ QPixmapData *data =
+ new QRasterPixmapData(QPixmapData::PixmapType);
+
+ data->fromImage(image, Qt::AutoColor);
+
+ return QPixmap(data);
+}
+
+
class tst_QPainter : public QObject
{
Q_OBJECT
@@ -222,7 +250,8 @@ private:
QPaintDevice *surface()
{
- return new QPixmap(1024, 1024);
+ m_pixmap = rasterPixmap(1024, 1024);
+ return &m_pixmap;
}
@@ -233,6 +262,7 @@ private:
PrimitiveSet m_primitives_100;
PrimitiveSet m_primitives_1000;
+ QPixmap m_pixmap;
QPaintDevice *m_surface;
QPainter m_painter;
@@ -490,7 +520,7 @@ void tst_QPainter::setupBrushes()
void tst_QPainter::beginAndEnd()
{
- QPixmap pixmap(100, 100);
+ QPixmap pixmap = rasterPixmap(100, 100);
QBENCHMARK {
QPainter p;
@@ -505,10 +535,11 @@ void tst_QPainter::drawLine()
QFETCH(QPen, pen);
const int offset = 5;
- QPixmap pixmapUnclipped(qMin(line.x1(), line.x2())
- + 2*offset + qAbs(line.dx()),
- qMin(line.y1(), line.y2())
- + 2*offset + qAbs(line.dy()));
+ QPixmap pixmapUnclipped =
+ rasterPixmap(qMin(line.x1(), line.x2())
+ + 2*offset + qAbs(line.dx()),
+ qMin(line.y1(), line.y2())
+ + 2*offset + qAbs(line.dy()));
pixmapUnclipped.fill(Qt::white);
QPainter p(&pixmapUnclipped);
@@ -535,10 +566,11 @@ void tst_QPainter::drawLine_clipped()
QFETCH(QPen, pen);
const int offset = 5;
- QPixmap pixmapClipped(qMin(line.x1(), line.x2())
- + 2*offset + qAbs(line.dx()),
- qMin(line.y1(), line.y2())
- + 2*offset + qAbs(line.dy()));
+ QPixmap pixmapClipped
+ = rasterPixmap(qMin(line.x1(), line.x2())
+ + 2*offset + qAbs(line.dx()),
+ qMin(line.y1(), line.y2())
+ + 2*offset + qAbs(line.dy()));
const QRect clip = QRect(line.p1(), line.p2()).normalized();
@@ -569,10 +601,11 @@ void tst_QPainter::drawLine_antialiased_clipped()
QFETCH(QPen, pen);
const int offset = 5;
- QPixmap pixmapClipped(qMin(line.x1(), line.x2())
- + 2*offset + qAbs(line.dx()),
- qMin(line.y1(), line.y2())
- + 2*offset + qAbs(line.dy()));
+ QPixmap pixmapClipped
+ = rasterPixmap(qMin(line.x1(), line.x2())
+ + 2*offset + qAbs(line.dx()),
+ qMin(line.y1(), line.y2())
+ + 2*offset + qAbs(line.dy()));
const QRect clip = QRect(line.p1(), line.p2()).normalized();
@@ -696,8 +729,8 @@ void tst_QPainter::drawPixmap()
QImage sourceImage = createImage(type, size).convertToFormat(sourceFormat);
QImage targetImage(size, targetFormat);
- QPixmap sourcePixmap = QPixmap::fromImage(sourceImage);
- QPixmap targetPixmap = QPixmap::fromImage(targetImage);
+ QPixmap sourcePixmap = rasterPixmap(sourceImage);
+ QPixmap targetPixmap = rasterPixmap(targetImage);
QPainter p(&targetPixmap);
@@ -759,10 +792,10 @@ void tst_QPainter::compositionModes()
QFETCH(QSize, size);
QFETCH(QColor, color);
- QPixmap src(size);
+ QPixmap src = rasterPixmap(size);
src.fill(color);
- QPixmap dest(size);
+ QPixmap dest = rasterPixmap(size);
if (mode < QPainter::RasterOp_SourceOrDestination)
color.setAlpha(127); // porter-duff needs an alpha channel
dest.fill(color);
@@ -844,11 +877,11 @@ void tst_QPainter::drawTiledPixmap()
QFETCH(QColor, color);
QFETCH(QPainter::RenderHint, renderHint);
- QPixmap src(srcSize);
+ QPixmap src = rasterPixmap(srcSize);
src.fill(color);
const QRect dstRect = transform.mapRect(QRect(QPoint(), dstSize));
- QPixmap dst(dstRect.right() + 5, dstRect.bottom() + 5);
+ QPixmap dst = rasterPixmap(dstRect.right() + 5, dstRect.bottom() + 5);
QPainter p(&dst);
p.setTransform(transform);
p.setRenderHint(renderHint);
@@ -1411,7 +1444,7 @@ void tst_QPainter::drawBorderPixmapRoundedRect()
rp.drawRoundedRect(QRectF(qreal(pw)/2+1, qreal(pw)/2+1, rectImage.width()-(pw+1), rectImage.height()-(pw+1)), radius, radius);
else
rp.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, rectImage.width()-pw, rectImage.height()-pw), radius, radius);
- QPixmap rectPixmap = QPixmap::fromImage(rectImage);
+ QPixmap rectPixmap = rasterPixmap(rectImage);
//setup surface
QImage surface(100, 100, QImage::Format_RGB16);
@@ -1466,7 +1499,7 @@ void tst_QPainter::drawScaledBorderPixmapRoundedRect()
else
rp.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, rectImage.width()-pw, rectImage.height()-pw), radius, radius);
- QPixmap rectPixmap = QPixmap::fromImage(rectImage);
+ QPixmap rectPixmap = rasterPixmap(rectImage);
//setup surface
QImage surface(400, 400, QImage::Format_RGB16);
@@ -1522,7 +1555,7 @@ void tst_QPainter::drawTransformedBorderPixmapRoundedRect()
else
rp.drawRoundedRect(QRectF(qreal(pw)/2, qreal(pw)/2, rectImage.width()-pw, rectImage.height()-pw), radius, radius);
- QPixmap rectPixmap = QPixmap::fromImage(rectImage);
+ QPixmap rectPixmap = rasterPixmap(rectImage);
//setup surface
QImage surface(400, 400, QImage::Format_RGB16);
diff --git a/tests/manual/bearerex/bearerex.cpp b/tests/manual/bearerex/bearerex.cpp
index 19246a2..bf60dd1 100644
--- a/tests/manual/bearerex/bearerex.cpp
+++ b/tests/manual/bearerex/bearerex.cpp
@@ -300,8 +300,12 @@ SessionTab::SessionTab(QNetworkConfiguration* apNetworkConfiguration,
SessionTab::~SessionTab()
{
+ // Need to be nulled, because modal dialogs may return after destruction of this object and
+ // use already released resources.
delete m_NetworkSession;
+ m_NetworkSession = NULL;
delete m_http;
+ m_http = NULL;
}
void SessionTab::on_createQHttpButton_clicked()
@@ -551,10 +555,16 @@ void SessionTab::done(bool error)
msgBox.setText(QString("HTTP request finished successfully.\nReceived ")+QString::number(result.length())+QString(" bytes."));
}
msgBox.exec();
-
- sentRecDataLineEdit->setText(QString::number(m_NetworkSession->bytesWritten())+
- QString(" / ")+
- QString::number(m_NetworkSession->bytesReceived()));
+ // Check if the networksession still exists - it may have gone after returning from
+ // the modal dialog (in the case that app has been closed, and deleting QHttp will
+ // trigger the done() invokation).
+ if (m_NetworkSession) {
+ sentRecDataLineEdit->setText(QString::number(m_NetworkSession->bytesWritten())+
+ QString(" / ")+
+ QString::number(m_NetworkSession->bytesReceived()));
+ } else {
+ sentRecDataLineEdit->setText("Data amounts not available.");
+ }
}
// End of file
diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp
index edf7a50..b6fa159 100644
--- a/tools/assistant/tools/assistant/centralwidget.cpp
+++ b/tools/assistant/tools/assistant/centralwidget.cpp
@@ -466,6 +466,7 @@ void CentralWidget::connectSignals(HelpViewer *page)
SLOT(handleSourceChanged(QUrl)));
connect(page, SIGNAL(highlighted(QString)), this,
SIGNAL(highlighted(QString)));
+ connect(page, SIGNAL(printRequested()), this, SLOT(print()));
}
bool CentralWidget::eventFilter(QObject *object, QEvent *e)
diff --git a/tools/assistant/tools/assistant/contentwindow.cpp b/tools/assistant/tools/assistant/contentwindow.cpp
index 3234980..d966cf0 100644
--- a/tools/assistant/tools/assistant/contentwindow.cpp
+++ b/tools/assistant/tools/assistant/contentwindow.cpp
@@ -135,11 +135,13 @@ bool ContentWindow::eventFilter(QObject *o, QEvent *e)
if (m_contentWidget && o == m_contentWidget->viewport()
&& e->type() == QEvent::MouseButtonRelease) {
QMouseEvent *me = static_cast<QMouseEvent*>(e);
- QModelIndex index = m_contentWidget->indexAt(me->pos());
- QItemSelectionModel *sm = m_contentWidget->selectionModel();
+ const QModelIndex &index = m_contentWidget->indexAt(me->pos());
+ if (!index.isValid())
+ return QWidget::eventFilter(o, e);
- Qt::MouseButtons button = me->button();
- if (index.isValid() && (sm && sm->isSelected(index))) {
+ const Qt::MouseButtons button = me->button();
+ QItemSelectionModel *sm = m_contentWidget->selectionModel();
+ if (sm->isSelected(index)) {
if ((button == Qt::LeftButton && (me->modifiers() & Qt::ControlModifier))
|| (button == Qt::MidButton)) {
QHelpContentModel *contentModel =
@@ -191,9 +193,11 @@ void ContentWindow::itemClicked(const QModelIndex &index)
qobject_cast<QHelpContentModel*>(m_contentWidget->model());
if (contentModel) {
- QHelpContentItem *itm = contentModel->contentItemAt(index);
- if (itm)
- emit linkActivated(itm->url());
+ if (QHelpContentItem *itm = contentModel->contentItemAt(index)) {
+ const QUrl &url = itm->url();
+ if (url != CentralWidget::instance()->currentSource())
+ emit linkActivated(url);
+ }
}
}
diff --git a/tools/assistant/tools/assistant/helpviewer.h b/tools/assistant/tools/assistant/helpviewer.h
index d881545..1f897d9 100644
--- a/tools/assistant/tools/assistant/helpviewer.h
+++ b/tools/assistant/tools/assistant/helpviewer.h
@@ -125,6 +125,7 @@ signals:
void forwardAvailable(bool enabled);
void backwardAvailable(bool enabled);
void highlighted(const QString &link);
+ void printRequested();
#else
void loadFinished(bool finished);
#endif
diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp
index f9c8161..869789b 100644
--- a/tools/assistant/tools/assistant/helpviewer_qwv.cpp
+++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp
@@ -271,6 +271,7 @@ HelpViewer::HelpViewer(qreal zoom, QWidget *parent)
connect(this, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl)));
connect(this, SIGNAL(loadFinished(bool)), this, SLOT(setLoadFinished(bool)));
connect(this, SIGNAL(titleChanged(QString)), this, SIGNAL(titleChanged()));
+ connect(page(), SIGNAL(printRequested(QWebFrame*)), this, SIGNAL(printRequested()));
setFont(viewerFont());
setTextSizeMultiplier(zoom == 0.0 ? 1.0 : zoom);
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index c0cb034..2ec5b98 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -195,10 +195,37 @@ Configure::Configure( int& argc, char** argv )
}
}
+ // make patch_capabilities and createpackage scripts for Symbian that can be used from the shadow build
+ QFile patch_capabilities(buildPath + "/bin/patch_capabilities");
+ if(patch_capabilities.open(QFile::WriteOnly)) {
+ QTextStream stream(&patch_capabilities);
+ stream << "#!/usr/bin/perl -w" << endl
+ << "require \"" << sourcePath + "/bin/patch_capabilities\";" << endl;
+ }
+ QFile patch_capabilities_bat(buildPath + "/bin/patch_capabilities.bat");
+ if(patch_capabilities_bat.open(QFile::WriteOnly)) {
+ QTextStream stream(&patch_capabilities_bat);
+ stream << "@echo off" << endl
+ << "call " << fixSeparators(sourcePath) << fixSeparators("/bin/patch_capabilities.bat %*") << endl;
+ patch_capabilities_bat.close();
+ }
+ QFile createpackage(buildPath + "/bin/createpackage");
+ if(createpackage.open(QFile::WriteOnly)) {
+ QTextStream stream(&createpackage);
+ stream << "#!/usr/bin/perl -w" << endl
+ << "require \"" << sourcePath + "/bin/createpackage\";" << endl;
+ }
+ QFile createpackage_bat(buildPath + "/bin/createpackage.bat");
+ if(createpackage_bat.open(QFile::WriteOnly)) {
+ QTextStream stream(&createpackage_bat);
+ stream << "@echo off" << endl
+ << "call " << fixSeparators(sourcePath) << fixSeparators("/bin/createpackage.bat %*") << endl;
+ createpackage_bat.close();
+ }
+
// For Windows CE and shadow builds we need to copy these to the
// build directory.
QFile::copy(sourcePath + "/bin/setcepaths.bat" , buildPath + "/bin/setcepaths.bat");
-
//copy the mkspecs
buildDir.mkpath("mkspecs");
if(!Environment::cpdir(sourcePath + "/mkspecs", buildPath + "/mkspecs")){
@@ -247,9 +274,7 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "PHONON" ] = "auto";
dictionary[ "PHONON_BACKEND" ] = "yes";
dictionary[ "MULTIMEDIA" ] = "yes";
- dictionary[ "MEDIASERVICES" ] = "yes";
dictionary[ "AUDIO_BACKEND" ] = "auto";
- dictionary[ "MEDIA_BACKEND"] = "auto";
dictionary[ "WMSDK" ] = "auto";
dictionary[ "DIRECTSHOW" ] = "no";
dictionary[ "WEBKIT" ] = "auto";
@@ -906,18 +931,10 @@ void Configure::parseCmdLine()
dictionary[ "MULTIMEDIA" ] = "no";
} else if( configCmdLine.at(i) == "-multimedia" ) {
dictionary[ "MULTIMEDIA" ] = "yes";
- } else if( configCmdLine.at(i) == "-no-mediaservices" ) {
- dictionary[ "MEDIASERVICES" ] = "no";
- } else if( configCmdLine.at(i) == "-mediaservices" ) {
- dictionary[ "MEDIASERVICES" ] = "yes";
} else if( configCmdLine.at(i) == "-audio-backend" ) {
dictionary[ "AUDIO_BACKEND" ] = "yes";
} else if( configCmdLine.at(i) == "-no-audio-backend" ) {
dictionary[ "AUDIO_BACKEND" ] = "no";
- } else if( configCmdLine.at(i) == "-media-backend") {
- dictionary[ "MEDIA_BACKEND" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-media-backend") {
- dictionary[ "MEDIA_BACKEND" ] = "no";
} else if( configCmdLine.at(i) == "-no-phonon" ) {
dictionary[ "PHONON" ] = "no";
} else if( configCmdLine.at(i) == "-phonon" ) {
@@ -1603,7 +1620,6 @@ bool Configure::displayHelp()
"[-qtnamespace <namespace>] [-qtlibinfix <infix>] [-no-phonon]\n"
"[-phonon] [-no-phonon-backend] [-phonon-backend]\n"
"[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n"
- "[-no-mediaservices] [-mediaservices] [-no-media-backend] [-media-backend]\n"
"[-no-script] [-script] [-no-scripttools] [-scripttools]\n"
"[-no-webkit] [-webkit] [-graphicssystem raster|opengl|openvg]\n\n", 0, 7);
@@ -1788,10 +1804,6 @@ bool Configure::displayHelp()
desc("MULTIMEDIA", "yes","-multimedia", "Compile in multimedia module");
desc("AUDIO_BACKEND", "no","-no-audio-backend", "Do not compile in the platform audio backend into QtMultimedia");
desc("AUDIO_BACKEND", "yes","-audio-backend", "Compile in the platform audio backend into QtMultimedia");
- desc("MEDIASERVICES", "no", "-no-mediaservices","Do not compile the QtMediaServices module");
- desc("MEDIASERVICES", "yes","-mediaservices", "Compile in QtMediaServices module");
- desc("MEDIA_BACKEND", "no","-no-media-backend", "Do not compile in the platform-specific QtMediaServices media service.");
- desc("MEDIA_BACKEND", "yes","-media-backend", "Compile in the platform-specific QtMediaServices media service.");
desc("WEBKIT", "no", "-no-webkit", "Do not compile in the WebKit module");
desc("WEBKIT", "yes", "-webkit", "Compile in the WebKit module (WebKit is built if a decent C++ compiler is used.)");
desc("SCRIPT", "no", "-no-script", "Do not build the QtScript module.");
@@ -2093,7 +2105,7 @@ bool Configure::checkAvailability(const QString &part)
&& dictionary.value("QMAKESPEC") != "win32-msvc.net" // Leave for now, since we can't be sure if they are using 2002 or 2003 with this spec
&& dictionary.value("QMAKESPEC") != "win32-msvc2002"
&& dictionary.value("EXCEPTIONS") == "yes";
- } else if (part == "PHONON" || part == "MEDIA_BACKEND") {
+ } else if (part == "PHONON") {
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) {
available = true;
} else {
@@ -2257,8 +2269,6 @@ void Configure::autoDetection()
dictionary["DECLARATIVE"] = dictionary["SCRIPT"] == "yes" ? "yes" : "no";
if (dictionary["AUDIO_BACKEND"] == "auto")
dictionary["AUDIO_BACKEND"] = checkAvailability("AUDIO_BACKEND") ? "yes" : "no";
- if (dictionary["MEDIA_BACKEND"] == "auto")
- dictionary["MEDIA_BACKEND"] = checkAvailability("MEDIA_BACKEND") ? "yes" : "no";
if (dictionary["WMSDK"] == "auto")
dictionary["WMSDK"] = checkAvailability("WMSDK") ? "yes" : "no";
@@ -2393,7 +2403,7 @@ void Configure::generateBuildKey()
+ buildSymbianKey + "\"\n"
"#else\n"
// Debug builds
- "# if (defined(_DEBUG) || defined(DEBUG))\n"
+ "# if (!QT_NO_DEBUG)\n"
"# if (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))\n"
+ build64Key.arg("debug") + "\"\n"
"# else\n"
@@ -2659,14 +2669,6 @@ void Configure::generateOutputVars()
qtConfig += "multimedia";
if (dictionary["AUDIO_BACKEND"] == "yes")
qtConfig += "audio-backend";
- if (dictionary["MEDIASERVICES"] == "yes") {
- qtConfig += "mediaservices";
- if (dictionary["MEDIA_BACKEND"] == "yes") {
- qtConfig += "media-backend";
- if (dictionary["WMSDK"] == "yes")
- qtConfig += "wmsdk";
- }
- }
}
if (dictionary["WEBKIT"] == "yes")
@@ -3068,7 +3070,6 @@ void Configure::generateConfigfiles()
if(dictionary["DECLARATIVE"] == "no") qconfigList += "QT_NO_DECLARATIVE";
if(dictionary["PHONON"] == "no") qconfigList += "QT_NO_PHONON";
if(dictionary["MULTIMEDIA"] == "no") qconfigList += "QT_NO_MULTIMEDIA";
- if(dictionary["MEDIASERVICES"] == "no") qconfigList += "QT_NO_MEDIASERVICES";
if(dictionary["XMLPATTERNS"] == "no") qconfigList += "QT_NO_XMLPATTERNS";
if(dictionary["SCRIPT"] == "no") qconfigList += "QT_NO_SCRIPT";
if(dictionary["SCRIPTTOOLS"] == "no") qconfigList += "QT_NO_SCRIPTTOOLS";
@@ -3371,7 +3372,6 @@ void Configure::displayConfig()
cout << "QtXmlPatterns support......." << dictionary[ "XMLPATTERNS" ] << endl;
cout << "Phonon support.............." << dictionary[ "PHONON" ] << endl;
cout << "QtMultimedia support........" << dictionary[ "MULTIMEDIA" ] << endl;
- cout << "QtMediaServices support....." << dictionary[ "MEDIASERVICES" ] << endl;
cout << "WebKit support.............." << dictionary[ "WEBKIT" ] << endl;
cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl;
cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl;
@@ -3477,7 +3477,7 @@ void Configure::displayConfig()
cout << "NOTE: When linking against OpenSSL, you can override the default" << endl;
cout << "library names through OPENSSL_LIBS." << endl;
cout << "For example:" << endl;
- cout << " configure -openssl-linked OPENSSL_LIBS='-lssleay32 -llibeay32'" << endl;
+ cout << " configure -openssl-linked OPENSSL_LIBS=\"-lssleay32 -llibeay32\"" << endl;
}
if( dictionary[ "ZLIB_FORCED" ] == "yes" ) {
QString which_zlib = "supplied";
diff --git a/tools/designer/src/designer/qdesigner_actions.cpp b/tools/designer/src/designer/qdesigner_actions.cpp
index a593a76..86b6214 100644
--- a/tools/designer/src/designer/qdesigner_actions.cpp
+++ b/tools/designer/src/designer/qdesigner_actions.cpp
@@ -347,6 +347,7 @@ QDesignerActions::QDesignerActions(QDesignerWorkbench *workbench)
connect(m_editWidgetsAction, SIGNAL(triggered()), this, SLOT(editWidgetsSlot()));
m_editWidgetsAction->setChecked(true);
m_editWidgetsAction->setEnabled(false);
+ m_editWidgetsAction->setProperty(QDesignerActions::defaultToolbarPropertyName, true);
m_toolActions->addAction(m_editWidgetsAction);
connect(formWindowManager, SIGNAL(activeFormWindowChanged(QDesignerFormWindowInterface*)),
diff --git a/tools/designer/src/lib/sdk/abstractformeditor.cpp b/tools/designer/src/lib/sdk/abstractformeditor.cpp
index 5353cab..c301f46 100644
--- a/tools/designer/src/lib/sdk/abstractformeditor.cpp
+++ b/tools/designer/src/lib/sdk/abstractformeditor.cpp
@@ -71,7 +71,6 @@ static void initResources()
{
Q_INIT_RESOURCE(shared);
Q_INIT_RESOURCE(ClamshellPhone);
- Q_INIT_RESOURCE(PDAPhone);
Q_INIT_RESOURCE(PortableMedia);
Q_INIT_RESOURCE(S60_nHD_Touchscreen);
Q_INIT_RESOURCE(S60_QVGA_Candybar);
@@ -79,8 +78,6 @@ static void initResources()
Q_INIT_RESOURCE(SmartPhone);
Q_INIT_RESOURCE(SmartPhoneWithButtons);
Q_INIT_RESOURCE(TouchscreenPhone);
- Q_INIT_RESOURCE(Trolltech_Keypad);
- Q_INIT_RESOURCE(Trolltech_Touchscreen);
}
QT_BEGIN_NAMESPACE
diff --git a/tools/designer/src/lib/shared/filterwidget.cpp b/tools/designer/src/lib/shared/filterwidget.cpp
index 9363b7c..a501c02 100644
--- a/tools/designer/src/lib/shared/filterwidget.cpp
+++ b/tools/designer/src/lib/shared/filterwidget.cpp
@@ -163,7 +163,7 @@ FilterWidget::FilterWidget(QWidget *parent, LayoutMode lm) :
m_editor->setPlaceholderText(tr("Filter"));
// Let the style determine minimum height for our widget
- QSize size(ICONBUTTON_SIZE + 2, ICONBUTTON_SIZE + 2);
+ QSize size(ICONBUTTON_SIZE + 6, ICONBUTTON_SIZE + 2);
// Note KDE does not reserve space for the highlight color
if (style()->inherits("OxygenStyle")) {
diff --git a/tools/designer/src/lib/shared/previewconfigurationwidget.cpp b/tools/designer/src/lib/shared/previewconfigurationwidget.cpp
index e07d155..d116d58 100644
--- a/tools/designer/src/lib/shared/previewconfigurationwidget.cpp
+++ b/tools/designer/src/lib/shared/previewconfigurationwidget.cpp
@@ -41,7 +41,7 @@
/* It is possible to link the skins as resources into Designer by specifying:
* QVFB_ROOT=$$QT_SOURCE_TREE/tools/qvfb
- * RESOURCES += $$QVFB_ROOT/ClamshellPhone.qrc $$QVFB_ROOT/PDAPhone.qrc ...
+ * RESOURCES += $$QVFB_ROOT/ClamshellPhone.qrc $$QVFB_ROOT/TouchScreenPhone.qrc ...
* in lib/shared/shared.pri. However, this exceeds a limit of Visual Studio 6. */
#include "previewconfigurationwidget_p.h"
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index a0cd560..dda2cf3 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -599,7 +599,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
generateAnnotatedList(relative, marker, nonCompatClasses);
}
else if (atom->string() == "classes") {
- generateCompactList(relative, marker, nonCompatClasses);
+ generateCompactList(relative, marker, nonCompatClasses, true);
}
else if (atom->string().contains("classesbymodule")) {
QString arg = atom->string().trimmed();
@@ -647,10 +647,10 @@ int HtmlGenerator::generateAtom(const Atom *atom,
generateClassHierarchy(relative, marker, nonCompatClasses);
}
else if (atom->string() == "compatclasses") {
- generateCompactList(relative, marker, compatClasses);
+ generateCompactList(relative, marker, compatClasses, false);
}
else if (atom->string() == "obsoleteclasses") {
- generateCompactList(relative, marker, obsoleteClasses);
+ generateCompactList(relative, marker, obsoleteClasses, false);
}
else if (atom->string() == "functionindex") {
generateFunctionIndex(relative, marker);
@@ -659,10 +659,10 @@ int HtmlGenerator::generateAtom(const Atom *atom,
generateLegaleseList(relative, marker);
}
else if (atom->string() == "mainclasses") {
- generateCompactList(relative, marker, mainClasses);
+ generateCompactList(relative, marker, mainClasses, true);
}
else if (atom->string() == "services") {
- generateCompactList(relative, marker, serviceClasses);
+ generateCompactList(relative, marker, serviceClasses, false);
}
else if (atom->string() == "overviews") {
generateOverviewList(relative, marker);
@@ -802,9 +802,9 @@ int HtmlGenerator::generateAtom(const Atom *atom,
<< "\"></a>\n";
out() << "<h3>" << protectEnc((*s).name) << "</h3>\n";
if (idx == Class)
- generateCompactList(0, marker, ncmap.value(), QString("Q"));
+ generateCompactList(0, marker, ncmap.value(), false, QString("Q"));
else if (idx == QmlClass)
- generateCompactList(0, marker, nqcmap.value(), QString("Q"));
+ generateCompactList(0, marker, nqcmap.value(), false, QString("Q"));
else if (idx == MemberFunction) {
ParentMaps parentmaps;
ParentMaps::iterator pmap;
@@ -830,7 +830,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "</a>" << ":</p>\n";
generateSection(nlist, 0, marker, CodeMarker::Summary);
- out() << "<br />";
+ out() << "<br/>";
++pmap;
}
}
@@ -876,7 +876,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "</div>";
break;
case Atom::LineBreak:
- out() << "<br />";
+ out() << "<br/>";
break;
case Atom::Link:
{
@@ -912,8 +912,14 @@ int HtmlGenerator::generateAtom(const Atom *atom,
else if (atom->string() == ATOM_LIST_VALUE) {
threeColumnEnumValueTable = isThreeColumnEnumValueTable(atom);
if (threeColumnEnumValueTable) {
- out() << "<table class=\"valuelist\">"
- << "<tr><th>Constant</th>"
+ out() << "<table class=\"valuelist\">";
+ // << "<tr>"
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd\">";
+ else
+ out() << "<tr class=\"even\">";
+
+ out() << "<tr><th>Constant</th>"
<< "<th>Value</th>"
<< "<th>Description</th></tr>\n";
}
@@ -926,7 +932,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "<ol type=";
if (atom->string() == ATOM_LIST_UPPERALPHA) {
out() << "\"A\"";
- }
+ } /* why type? */
else if (atom->string() == ATOM_LIST_LOWERALPHA) {
out() << "\"a\"";
}
@@ -956,7 +962,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "<tr><td class=\"topAlign\"><tt>"
<< protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(),
relative)))
- << "</tt></td><td class=\"centerAlign topAlign\">";
+ << "</tt></td><td class=\" topAlign\">";
QString itemValue;
if (relative->type() == Node::Enum) {
@@ -1093,13 +1099,13 @@ int HtmlGenerator::generateAtom(const Atom *atom,
}
if (!atom->string().isEmpty()) {
if (atom->string().contains("%"))
- out() << "<table class=\"generic centerAlign\" width=\"" << atom->string() << "\">\n ";
+ out() << "<table class=\"generic\">\n "; // width=\"" << atom->string() << "\">\n ";
else {
- out() << "<table class=\"generic centerAlign\">\n";
+ out() << "<table class=\"generic\">\n";
}
}
else {
- out() << "<table class=\"generic centerAlign\">\n";
+ out() << "<table class=\"generic\">\n";
}
numTableRows = 0;
break;
@@ -1143,7 +1149,10 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << " colspan=\"" << spans.at(0) << "\"";
if (spans.at(1) != "1")
out() << " rowspan=\"" << spans.at(1) << "\"";
+ if (inTableHeader)
out() << ">";
+ else
+ out() << "><p>";
}
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
@@ -1153,7 +1162,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
if (inTableHeader)
out() << "</th>";
else
- out() << "</td>";
+ out() << "</p></td>";
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
break;
@@ -1243,6 +1252,8 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")"
<< Atom(Atom::LineBreak);
+#if 0
+ // No longer used because the modeule name is a breadcrumb.
QString fixedModule = inner->moduleName();
if (fixedModule == "Qt3SupportLight")
fixedModule = "Qt3Support";
@@ -1263,6 +1274,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
subtitleText << "]";
}
}
+#endif
generateHeader(title, inner, marker);
sections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
@@ -1585,7 +1597,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
NodeList::ConstIterator m = (*s).members.begin();
while (m != (*s).members.end()) {
generateDetailedQmlMember(*m, fake, marker);
- out() << "<br />\n";
+ out() << "<br/>\n";
fakeSection.keywords += qMakePair((*m)->name(),
linkForNode(*m,0));
++m;
@@ -1739,6 +1751,9 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title,
}
}
else if (node->subType() == Node::QmlClass) {
+ out() << " <li><a href=\"qdeclarativeelements.html\">QML Elements</a></li>";
+ out() << " <li><a href=\"" << fn->name() << "\">" << title
+ << "</a></li>";
}
else if (node->subType() == Node::Example) {
out() << " <li><a href=\"examples.html\">All Examples</a></li>";
@@ -1786,29 +1801,31 @@ void HtmlGenerator::generateHeader(const QString& title,
out() << " <title>" << shortVersion << protectEnc(title) << "</title>\n";
+ out() << " <!--[if IE]>";
+ out() << "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">";
+ out() << "<meta http-equiv=\"imagetoolbar\" content=\"no\">";
+ out() << "<![endif]-->";
+ out() << "<!--[if lt IE 7]>";
+ out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">";
+ out() << "<![endif]-->";
+ out() << "<!--[if IE 7]>";
+ out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">";
+ out() << "<![endif]-->";
+ out() << "<!--[if IE 8]>";
+ out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">";
+ out() << "<![endif]-->";
+
+
//out() << " <title>Qt Reference Documentation</title>";
out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />\n";
- out() << " <!--[if IE]>\n";
- out() << " <meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n";
- out() << " <meta http-equiv=\"imagetoolbar\" content=\"no\">\n";
- out() << " <![endif]-->\n";
- out() << " <!--[if lt IE 7]>\n";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">\n";
- out() << " <![endif]-->\n";
- out() << " <!--[if IE 7]>\n";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">\n";
- out() << " <![endif]-->\n";
- out() << " <!--[if IE 8]>\n";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">\n";
- out() << " <![endif]-->\n";
out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n";
out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
out() << "</head>\n";
if (offlineDocs)
- out() << "<body class=\"offline\">\n";
+ out() << "<body class=\"offline\" onload=\"CheckEmptyAndLoadList();\">\n";
else
- out() << "<body class=\"\">\n";
+ out() << "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n";
#ifdef GENERATE_MAC_REFS
if (mainPage)
@@ -1831,18 +1848,16 @@ void HtmlGenerator::generateTitle(const QString& title,
CodeMarker *marker)
{
if (!title.isEmpty())
- out() << "<h1 class=\"title\">" << protectEnc(title);
+ out() << "<h1 class=\"title\">" << protectEnc(title) << "</h1>\n";
if (!subTitle.isEmpty()) {
- out() << "<br />";
- if (subTitleSize == SmallSubTitle)
- out() << "<span class=\"small-subtitle\">";
+ out() << "<span";
+ if (subTitleSize == SmallSubTitle)
+ out() << " class=\"small-subtitle\">";
else
- out() << "<span class=\"subtitle\">";
+ out() << " class=\"subtitle\">";
generateText(subTitle, relative, marker);
out() << "</span>\n";
}
- if (!title.isEmpty())
- out() << "</h1>\n";
}
void HtmlGenerator::generateFooter(const Node *node)
@@ -1851,9 +1866,10 @@ void HtmlGenerator::generateFooter(const Node *node)
out() << "<p>\n" << navigationLinks << "</p>\n";
out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version())
- << QString(address).replace("\\" + COMMAND_VERSION, myTree->version())
- << "</body>\n"
- "</html>\n";
+ << QString(address).replace("\\" + COMMAND_VERSION, myTree->version());
+ out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
+ out() << "</body>\n";
+ out() << "</html>\n";
}
void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker,
@@ -1874,7 +1890,7 @@ void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker,
void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker)
{
if (!inner->includes().isEmpty()) {
- out() << "<pre clas=\"highlightedCode\">"
+ out() << "<pre class=\"highlightedCode\">"
<< trimmedTrailing(highlightedCode(indent(codeIndent,
marker->markedUpIncludes(inner->includes())),
marker,inner))
@@ -2278,22 +2294,22 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
out() << "<tr class=\"odd topAlign\">";
else
out() << "<tr class=\"even topAlign\">";
- out() << "<th>";
+ out() << "<td><p>";
generateFullName(node, relative, marker);
- out() << "</th>";
+ out() << "</p></td>";
if (!(node->type() == Node::Fake)) {
Text brief = node->doc().trimmedBriefText(name);
if (!brief.isEmpty()) {
- out() << "<td>";
+ out() << "<td><p>";
generateText(brief, node, marker);
- out() << "</td>";
+ out() << "</p></td>";
}
}
else {
- out() << "<td>";
+ out() << "<td><p>";
out() << protectEnc(node->doc().briefText().toString());
- out() << "</td>";
+ out() << "</p></td>";
}
out() << "</tr>\n";
}
@@ -2312,6 +2328,7 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
void HtmlGenerator::generateCompactList(const Node *relative,
CodeMarker *marker,
const NodeMap &classMap,
+ bool includeAlphabet,
QString commonPrefix)
{
const int NumParagraphs = 37; // '0' to '9', 'A' to 'Z', '_'
@@ -2384,6 +2401,7 @@ void HtmlGenerator::generateCompactList(const Node *relative,
*/
NodeMap paragraph[NumParagraphs+1];
QString paragraphName[NumParagraphs+1];
+ QSet<char> usedParagraphNames;
NodeMap::ConstIterator c = classMap.begin();
while (c != classMap.end()) {
@@ -2407,6 +2425,7 @@ void HtmlGenerator::generateCompactList(const Node *relative,
}
paragraphName[paragraphNo] = key[0].toUpper();
+ usedParagraphNames.insert(key[0].toLower().cell());
paragraph[paragraphNo].insert(key, c.value());
++c;
}
@@ -2426,15 +2445,15 @@ void HtmlGenerator::generateCompactList(const Node *relative,
for (j = 0; j < NumParagraphs; j++) // j = 0..36
paragraphOffset[j + 1] = paragraphOffset[j] + paragraph[j].count();
- int firstOffset[NumColumns + 1]; // 4 + 1
- int currentOffset[NumColumns]; // 4
- int currentParagraphNo[NumColumns]; // 4
- int currentOffsetInParagraph[NumColumns]; // 4
+ int firstOffset[NumColumns + 1];
+ int currentOffset[NumColumns];
+ int currentParagraphNo[NumColumns];
+ int currentOffsetInParagraph[NumColumns];
int numRows = (classMap.count() + NumColumns - 1) / NumColumns;
int curParagNo = 0;
- for (i = 0; i < NumColumns; i++) { // i = 0..3
+ for (i = 0; i < NumColumns; i++) {
firstOffset[i] = qMin(i * numRows, classMap.size());
currentOffset[i] = firstOffset[i];
@@ -2450,13 +2469,29 @@ void HtmlGenerator::generateCompactList(const Node *relative,
}
firstOffset[NumColumns] = classMap.count();
+ if (includeAlphabet) {
+ out() << "<p class=\"centerAlign functionIndex\"><b>";
+ for (int i = 0; i < 26; i++) {
+ QChar ch('a' + i);
+ if (usedParagraphNames.contains(char('a' + i)))
+ out() << QString("<a href=\"#%1\">%2</a>&nbsp;").arg(ch).arg(ch.toUpper());
+ }
+ out() << "</b></p>\n";
+ }
+
out() << "<table class=\"generic\">\n";
for (k = 0; k < numRows; k++) {
- out() << "<tr>\n";
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd topAlign\">";
+ else
+ out() << "<tr class=\"even topAlign\">";
+ //break;
+
+// out() << "<tr>\n";
for (i = 0; i < NumColumns; i++) {
if (currentOffset[i] >= firstOffset[i + 1]) {
// this column is finished
- out() << "<td>\n</td>\n";
+ out() << "<td>\n</td>\n"; // check why?
}
else {
while ((currentParagraphNo[i] < NumParagraphs) &&
@@ -2471,16 +2506,20 @@ void HtmlGenerator::generateCompactList(const Node *relative,
currentParagraphNo[i] = NumParagraphs - 1;
}
#endif
- out() << "<td class=\"rightAlign\">";
+ out() << "<th class=\"rightAlign alphaChar\"><p>";
if (currentOffsetInParagraph[i] == 0) {
// start a new paragraph
+ if (includeAlphabet) {
+ QChar c = paragraphName[currentParagraphNo[i]][0].toLower();
+ out() << QString("<a name=\"%1\"></a>").arg(c);
+ }
out() << "<b>"
<< paragraphName[currentParagraphNo[i]]
- << "&nbsp;</b>";
+ << "</b>";
}
- out() << "</td>\n";
+ out() << "</p></th>\n";
- out() << "<td>";
+ out() << "<td><p>";
if ((currentParagraphNo[i] < NumParagraphs) &&
!paragraphName[currentParagraphNo[i]].isEmpty()) {
NodeMap::Iterator it;
@@ -2506,7 +2545,7 @@ void HtmlGenerator::generateCompactList(const Node *relative,
out() << ")";
}
}
- out() << "</td>\n";
+ out() << "</p></td>\n";
currentOffset[i]++;
currentOffsetInParagraph[i]++;
@@ -2646,7 +2685,7 @@ void HtmlGenerator::generateQmlItem(const Node *node,
if (summary)
marked.replace("@name>", "b>");
- marked.replace("<@extra>", "&nbsp;&nbsp;<tt>");
+ marked.replace("<@extra>", "<tt>");
marked.replace("</@extra>", "</tt>");
if (summary) {
@@ -2812,14 +2851,14 @@ void HtmlGenerator::generateSection(const NodeList& nl,
else {
if (twoColumn && i == (int) (nl.count() + 1) / 2)
out() << "</ul></td><td class=\"topAlign\"><ul>\n";
- out() << "<li><div class=\"fn\">";
+ out() << "<li class=\"fn\">";
}
generateSynopsis(*m, relative, marker, style, name_alignment);
if (name_alignment)
out() << "</td></tr>\n";
else
- out() << "</div></li>\n";
+ out() << "</li>\n";
i++;
++m;
}
@@ -2873,14 +2912,14 @@ void HtmlGenerator::generateSectionList(const Section& section,
else {
if (twoColumn && i == (int) (section.members.count() + 1) / 2)
out() << "</ul></td><td class=\"topAlign\"><ul>\n";
- out() << "<li><div class=\"fn\">";
+ out() << "<li class=\"fn\">";
}
generateSynopsis(*m, relative, marker, style, name_alignment);
if (name_alignment)
out() << "</td></tr>\n";
else
- out() << "</div></li>\n";
+ out() << "</li>\n";
i++;
++m;
}
@@ -2908,9 +2947,9 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section,
QList<QPair<ClassNode *, int> >::ConstIterator p = section.inherited.begin();
while (p != section.inherited.end()) {
if (nameAlignment)
- out() << "<li><div bar=\"2\" class=\"fn\"></div>";
+ out() << "<li class=\"fn\">";
else
- out() << "<li><div class=\"fn\"></div>";
+ out() << "<li class=\"fn\">";
out() << (*p).second << " ";
if ((*p).second == 1) {
out() << section.singularMember;
@@ -2955,7 +2994,7 @@ void HtmlGenerator::generateSynopsis(const Node *node,
extraRegExp.setMinimal(true);
marked.replace(extraRegExp, "");
} else {
- marked.replace("<@extra>", "&nbsp;&nbsp;<tt>");
+ marked.replace("<@extra>", "<tt>");
marked.replace("</@extra>", "</tt>");
}
@@ -3151,8 +3190,13 @@ void HtmlGenerator::generateSectionList(const Section& section,
twoColumn = (section.members.count() >= 5);
}
if (twoColumn)
- out() << "<table class=\"generic\">\n"
- << "<tr><td class=\"topAlign\">";
+ out() << "<table class=\"generic\">\n";
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd topAlign\">";
+ else
+ out() << "<tr class=\"even topAlign\">";
+
+// << "<tr><td class=\"topAlign\">";
out() << "<ul>\n";
int i = 0;
@@ -3166,7 +3210,7 @@ void HtmlGenerator::generateSectionList(const Section& section,
if (twoColumn && i == (int) (section.members.count() + 1) / 2)
out() << "</ul></td><td class=\"topAlign\"><ul>\n";
- out() << "<li><div class=\"fn\"></div>";
+ out() << "<li class=\"fn\">";
if (style == CodeMarker::Accessors)
out() << "<b>";
generateSynopsis(*m, relative, marker, style);
@@ -3194,7 +3238,7 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section,
{
QList<QPair<ClassNode *, int> >::ConstIterator p = section.inherited.begin();
while (p != section.inherited.end()) {
- out() << "<li><div bar=\"2\" class=\"fn\"></div>";
+ out() << "<li class=\"fn\">";
out() << (*p).second << " ";
if ((*p).second == 1) {
out() << section.singularMember;
@@ -3234,7 +3278,7 @@ void HtmlGenerator::generateSynopsis(const Node *node,
extraRegExp.setMinimal(true);
marked.replace(extraRegExp, "");
} else {
- marked.replace("<@extra>", "&nbsp;&nbsp;<tt>");
+ marked.replace("<@extra>", "<tt>");
marked.replace("</@extra>", "</tt>");
}
@@ -3764,7 +3808,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node,
out() << "<h3 class=\"flags\">";
out() << "<a name=\"" + refForNode(node) + "\"></a>";
generateSynopsis(enume, relative, marker, CodeMarker::Detailed);
- out() << "<br />";
+ out() << "<br/>";
generateSynopsis(enume->flagsType(),
relative,
marker,
@@ -4359,8 +4403,12 @@ void HtmlGenerator::generateQmlSummary(const Section& section,
twoColumn = (count >= 5);
}
if (twoColumn)
- out() << "<table class=\"qmlsummary\">\n"
- << "<tr><td class=\"topAlign\">";
+ out() << "<table class=\"qmlsummary\">\n";
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd topAlign\">";
+ else
+ out() << "<tr class=\"even topAlign\">";
+ // << "<tr><td class=\"topAlign\">";
out() << "<ul>\n";
int row = 0;
@@ -4368,7 +4416,7 @@ void HtmlGenerator::generateQmlSummary(const Section& section,
while (m != section.members.end()) {
if (twoColumn && row == (int) (count + 1) / 2)
out() << "</ul></td><td class=\"topAlign\"><ul>\n";
- out() << "<li><div class=\"fn\"></div>";
+ out() << "<li class=\"fn\">";
generateQmlItem(*m,relative,marker,true);
out() << "</li>\n";
row++;
@@ -4402,22 +4450,21 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
while (p != qpgn->childNodes().end()) {
if ((*p)->type() == Node::QmlProperty) {
qpn = static_cast<const QmlPropertyNode*>(*p);
- out() << "<tr><td>";
+
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd\">";
+ else
+ out() << "<tr class=\"even\">";
+
+ out() << "<td><p>";
+ //out() << "<tr><td>"; // old
out() << "<a name=\"" + refForNode(qpn) + "\"></a>";
if (!qpn->isWritable())
- out() << "<span class=\"qmlreadonly\">read-only&nbsp;</span>";
+ out() << "<span class=\"qmlreadonly\">read-only</span>";
if (qpgn->isDefault())
- out() << "<span class=\"qmldefault\">default&nbsp;</span>";
+ out() << "<span class=\"qmldefault\">default</span>";
generateQmlItem(qpn, relative, marker, false);
out() << "</td></tr>";
- if (qpgn->isDefault()) {
- out() << "</table>"
- << "</div></div>"
- << "<div class=\"qmlitem\">"
- << "<div class=\"qmlproto\">"
- << "<table class=\"qmlname\">"
- << "<tr><td>default</td></tr>";
- }
}
++p;
}
@@ -4428,11 +4475,16 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
const FunctionNode* qsn = static_cast<const FunctionNode*>(node);
out() << "<div class=\"qmlproto\">";
out() << "<table class=\"qmlname\">";
- out() << "<tr><td>";
+ //out() << "<tr>";
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd\">";
+ else
+ out() << "<tr class=\"even\">";
+ out() << "<td><p>";
out() << "<a name=\"" + refForNode(qsn) + "\"></a>";
generateSynopsis(qsn,relative,marker,CodeMarker::Detailed,false);
//generateQmlItem(qsn,relative,marker,false);
- out() << "</td></tr>";
+ out() << "</p></td></tr>";
out() << "</table>";
out() << "</div>";
}
@@ -4440,10 +4492,15 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
const FunctionNode* qmn = static_cast<const FunctionNode*>(node);
out() << "<div class=\"qmlproto\">";
out() << "<table class=\"qmlname\">";
- out() << "<tr><td>";
+ //out() << "<tr>";
+ if (++numTableRows % 2 == 1)
+ out() << "<tr class=\"odd\">";
+ else
+ out() << "<tr class=\"even\">";
+ out() << "<td><p>";
out() << "<a name=\"" + refForNode(qmn) + "\"></a>";
generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false);
- out() << "</td></tr>";
+ out() << "</p></td></tr>";
out() << "</table>";
out() << "</div>";
}
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index d80cbdb..e060257 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -173,6 +173,7 @@ class HtmlGenerator : public PageGenerator
void generateCompactList(const Node *relative,
CodeMarker *marker,
const NodeMap &classMap,
+ bool includeAlphabet,
QString commonPrefix = QString());
void generateFunctionIndex(const Node *relative, CodeMarker *marker);
void generateLegaleseList(const Node *relative, CodeMarker *marker);
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index a2bd948..4ba3a32 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -1289,7 +1289,7 @@ QmlClassNode::QmlClassNode(InnerNode *parent,
const ClassNode* cn)
: FakeNode(parent, name, QmlClass), cnode(cn)
{
- setTitle((qmlOnly ? "" : "QML ") + name + " Element Reference");
+ setTitle((qmlOnly ? "" : "QML ") + name + " Element");
}
/*!
diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf
index 51afb69..9f32e52 100644
--- a/tools/qdoc3/test/assistant.qdocconf
+++ b/tools/qdoc3/test/assistant.qdocconf
@@ -16,44 +16,29 @@ qhp.Assistant.file = assistant.qhp
qhp.Assistant.namespace = com.trolltech.assistant.480
qhp.Assistant.virtualFolder = qdoc
qhp.Assistant.indexTitle = Qt Assistant Manual
-qhp.Assistant.extraFiles = images/api_examples.png \
- images/api_lookup.png \
- images/api_topics.png \
+qhp.Assistant.extraFiles = images/bg_l.png \
images/bg_l_blank.png \
- images/bg_ll_blank.png \
- images/bg_ll.png \
- images/bg_l.png \
- images/bg_lr.png \
images/bg_r.png \
- images/bg_ul_blank.png \
- images/bg_ul.png \
- images/bg_ur_blank.png \
- images/bg_ur.png \
- images/box_bg.png \
- images/breadcrumb.png \
+ images/box_bg.png \
+ images/breadcrumb.png \
+ images/bullet_gt.png \
images/bullet_dn.png \
- images/bullet_gt.png \
- images/bullet_sq.png \
+ images/bullet_sq.png \
images/bullet_up.png \
- images/coloreditorfactoryimage.png \
- images/content_bg.png \
- images/dynamiclayouts-example.png \
images/feedbackground.png \
- images/form_bg.png \
images/horBar.png \
- images/page_bg.png \
- images/print.png \
- images/qt_guide.png \
- images/qt_icon.png \
- images/qt-logo.png \
- images/qt_ref_doc.png \
- images/qt_tools.png \
- images/sep.png \
- images/sprites-combined.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
images/stylesheet-coffee-plastique.png \
images/taskmenuextension-example.png \
- scripts/functions.js \
- scripts/jquery.js \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ scripts/functions.js \
+ scripts/jquery.js \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
style/style.css
qhp.Assistant.filterAttributes = qt 4.8.0 tools assistant
diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf
index 23b6c78..9c80f74 100644
--- a/tools/qdoc3/test/designer.qdocconf
+++ b/tools/qdoc3/test/designer.qdocconf
@@ -16,45 +16,31 @@ qhp.Designer.file = designer.qhp
qhp.Designer.namespace = com.trolltech.designer.470
qhp.Designer.virtualFolder = qdoc
qhp.Designer.indexTitle = Qt Designer Manual
-qhp.Designer.extraFiles = images/api_examples.png \
- images/api_lookup.png \
- images/api_topics.png \
- images/bg_l_blank.png \
- images/bg_ll_blank.png \
- images/bg_ll.png \
- images/bg_l.png \
- images/bg_lr.png \
- images/bg_r.png \
- images/bg_ul_blank.png \
- images/bg_ul.png \
- images/bg_ur_blank.png \
- images/bg_ur.png \
- images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_dn.png \
- images/bullet_gt.png \
- images/bullet_sq.png \
- images/bullet_up.png \
+qhp.Designer.extraFiles = images/bg_l.png \
+ images/bg_l_blank.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/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
images/coloreditorfactoryimage.png \
- images/content_bg.png \
images/dynamiclayouts-example.png \
- images/feedbackground.png \
- images/form_bg.png \
- images/horBar.png \
- images/page_bg.png \
- images/print.png \
- images/qt_guide.png \
- images/qt_icon.png \
- images/qt-logo.png \
- images/qt_ref_doc.png \
- images/qt_tools.png \
- images/sep.png \
- images/sprites-combined.png \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- scripts/functions.js \
- scripts/jquery.js \
- style/style.css
+ scripts/functions.js \
+ scripts/jquery.js \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
+
qhp.Designer.filterAttributes = qt 4.8.0 tools designer
qhp.Designer.customFilters.Designer.name = Qt Designer Manual
qhp.Designer.customFilters.Designer.filterAttributes = qt tools designer
diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf
index 4936bc9..05eeb88 100644
--- a/tools/qdoc3/test/linguist.qdocconf
+++ b/tools/qdoc3/test/linguist.qdocconf
@@ -16,45 +16,31 @@ qhp.Linguist.file = linguist.qhp
qhp.Linguist.namespace = com.trolltech.linguist.480
qhp.Linguist.virtualFolder = qdoc
qhp.Linguist.indexTitle = Qt Linguist Manual
-qhp.Linguist.extraFiles = images/api_examples.png \
- images/api_lookup.png \
- images/api_topics.png \
- images/bg_l_blank.png \
- images/bg_ll_blank.png \
- images/bg_ll.png \
- images/bg_l.png \
- images/bg_lr.png \
- images/bg_r.png \
- images/bg_ul_blank.png \
- images/bg_ul.png \
- images/bg_ur_blank.png \
- images/bg_ur.png \
- images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_dn.png \
- images/bullet_gt.png \
- images/bullet_sq.png \
- images/bullet_up.png \
+qhp.Linguist.extraFiles = images/bg_l.png \
+ images/bg_l_blank.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/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
images/coloreditorfactoryimage.png \
- images/content_bg.png \
images/dynamiclayouts-example.png \
- images/feedbackground.png \
- images/form_bg.png \
- images/horBar.png \
- images/page_bg.png \
- images/print.png \
- images/qt_guide.png \
- images/qt_icon.png \
- images/qt-logo.png \
- images/qt_ref_doc.png \
- images/qt_tools.png \
- images/sep.png \
- images/sprites-combined.png \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- scripts/functions.js \
- scripts/jquery.js \
- style/style.css
+ scripts/functions.js \
+ scripts/jquery.js \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
+
qhp.Linguist.filterAttributes = qt 4.8.0 tools linguist
qhp.Linguist.customFilters.Linguist.name = Qt Linguist Manual
qhp.Linguist.customFilters.Linguist.filterAttributes = qt tools linguist
diff --git a/tools/qdoc3/test/macros.qdocconf b/tools/qdoc3/test/macros.qdocconf
index 22db23e..510a8b3 100644
--- a/tools/qdoc3/test/macros.qdocconf
+++ b/tools/qdoc3/test/macros.qdocconf
@@ -18,6 +18,7 @@ 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;"
diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf
index 80050e3..f744879 100644
--- a/tools/qdoc3/test/qdeclarative.qdocconf
+++ b/tools/qdoc3/test/qdeclarative.qdocconf
@@ -27,45 +27,30 @@ qhp.Qml.indexTitle = Qml Reference
# Files not referenced in any qdoc file
# See also extraimages.HTML
-qhp.Qml.extraFiles = images/api_examples.png \
- images/api_lookup.png \
- images/api_topics.png \
- images/bg_l_blank.png \
- images/bg_ll_blank.png \
- images/bg_ll.png \
- images/bg_l.png \
- images/bg_lr.png \
- images/bg_r.png \
- images/bg_ul_blank.png \
- images/bg_ul.png \
- images/bg_ur_blank.png \
- images/bg_ur.png \
- images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_dn.png \
- images/bullet_gt.png \
- images/bullet_sq.png \
- images/bullet_up.png \
- images/coloreditorfactoryimage.png \
- images/content_bg.png \
- images/dynamiclayouts-example.png \
- images/feedbackground.png \
- images/form_bg.png \
- images/horBar.png \
- images/page_bg.png \
- images/print.png \
- images/qt_guide.png \
- images/qt_icon.png \
- images/qt-logo.png \
- images/qt_ref_doc.png \
- images/qt_tools.png \
- images/sep.png \
- images/sprites-combined.png \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- scripts/functions.js \
- scripts/jquery.js \
- style/style.css
+qhp.Qml.extraFiles = images/bg_l.png \
+ images/bg_l_blank.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/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ scripts/functions.js \
+ scripts/jquery.js \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
qhp.Qml.filterAttributes = qt 4.6.0 qtrefdoc
qhp.Qml.customFilters.Qt.name = Qt 4.6.0
diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf
index 5c7cc29..490faf57 100644
--- a/tools/qdoc3/test/qmake.qdocconf
+++ b/tools/qdoc3/test/qmake.qdocconf
@@ -16,45 +16,30 @@ qhp.qmake.file = qmake.qhp
qhp.qmake.namespace = com.trolltech.qmake.480
qhp.qmake.virtualFolder = qdoc
qhp.qmake.indexTitle = QMake Manual
-qhp.qmake.extraFiles = images/api_examples.png \
- images/api_lookup.png \
- images/api_topics.png \
- images/bg_l_blank.png \
- images/bg_ll_blank.png \
- images/bg_ll.png \
- images/bg_l.png \
- images/bg_lr.png \
- images/bg_r.png \
- images/bg_ul_blank.png \
- images/bg_ul.png \
- images/bg_ur_blank.png \
- images/bg_ur.png \
- images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_dn.png \
- images/bullet_gt.png \
- images/bullet_sq.png \
- images/bullet_up.png \
- images/coloreditorfactoryimage.png \
- images/content_bg.png \
- images/dynamiclayouts-example.png \
- images/feedbackground.png \
- images/form_bg.png \
- images/horBar.png \
- images/page_bg.png \
- images/print.png \
- images/qt_guide.png \
- images/qt_icon.png \
- images/qt-logo.png \
- images/qt_ref_doc.png \
- images/qt_tools.png \
- images/sep.png \
- images/sprites-combined.png \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- scripts/functions.js \
- scripts/jquery.js \
- style/style.css
+qhp.qmake.extraFiles = images/bg_l.png \
+ images/bg_l_blank.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/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ scripts/functions.js \
+ scripts/jquery.js \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
qhp.qmake.filterAttributes = qt 4.8.0 tools qmake
qhp.qmake.customFilters.qmake.name = qmake Manual
diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf
index 7165c24..1401fd3 100644
--- a/tools/qdoc3/test/qt-build-docs.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs.qdocconf
@@ -22,45 +22,30 @@ qhp.Qt.indexTitle = Qt Reference Documentation
# Files not referenced in any qdoc file (last four are needed by qtdemo)
# See also extraimages.HTML
qhp.Qt.extraFiles = index.html \
- images/api_examples.png \
- images/api_lookup.png \
- images/api_topics.png \
- images/bg_l_blank.png \
- images/bg_ll_blank.png \
- images/bg_ll.png \
- images/bg_l.png \
- images/bg_lr.png \
- images/bg_r.png \
- images/bg_ul_blank.png \
- images/bg_ul.png \
- images/bg_ur_blank.png \
- images/bg_ur.png \
- images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_dn.png \
- images/bullet_gt.png \
- images/bullet_sq.png \
- images/bullet_up.png \
- images/coloreditorfactoryimage.png \
- images/content_bg.png \
- images/dynamiclayouts-example.png \
- images/feedbackground.png \
- images/form_bg.png \
- images/horBar.png \
- images/page_bg.png \
- images/print.png \
- images/qt_guide.png \
- images/qt_icon.png \
- images/qt-logo.png \
- images/qt_ref_doc.png \
- images/qt_tools.png \
- images/sep.png \
- images/sprites-combined.png \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- scripts/functions.js \
- scripts/jquery.js \
- style/style.css
+ images/bg_l.png \
+ images/bg_l_blank.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/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ scripts/functions.js \
+ scripts/jquery.js \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
index 5cbb146..13afcd9 100644
--- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
@@ -30,45 +30,30 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.8.0
# Files not referenced in any qdoc file (last four are needed by qtdemo)
# See also extraimages.HTML
qhp.Qt.extraFiles = index.html \
- images/api_examples.png \
- images/api_lookup.png \
- images/api_topics.png \
- images/bg_l_blank.png \
- images/bg_ll_blank.png \
- images/bg_ll.png \
- images/bg_l.png \
- images/bg_lr.png \
- images/bg_r.png \
- images/bg_ul_blank.png \
- images/bg_ul.png \
- images/bg_ur_blank.png \
- images/bg_ur.png \
- images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_dn.png \
- images/bullet_gt.png \
- images/bullet_sq.png \
- images/bullet_up.png \
- images/coloreditorfactoryimage.png \
- images/content_bg.png \
- images/dynamiclayouts-example.png \
- images/feedbackground.png \
- images/form_bg.png \
- images/horBar.png \
- images/page_bg.png \
- images/print.png \
- images/qt_guide.png \
- images/qt_icon.png \
- images/qt-logo.png \
- images/qt_ref_doc.png \
- images/qt_tools.png \
- images/sep.png \
- images/sprites-combined.png \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- scripts/functions.js \
- scripts/jquery.js \
- style/style.css
+ images/bg_l.png \
+ images/bg_l_blank.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/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ scripts/functions.js \
+ scripts/jquery.js \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
language = Cpp
diff --git a/tools/qdoc3/test/qt-defines.qdocconf b/tools/qdoc3/test/qt-defines.qdocconf
index 0426f4d..f3291df 100644
--- a/tools/qdoc3/test/qt-defines.qdocconf
+++ b/tools/qdoc3/test/qt-defines.qdocconf
@@ -20,37 +20,20 @@ codeindent = 1
# See also qhp.Qt.extraFiles
extraimages.HTML = qt-logo \
trolltech-logo \
- api_examples.png \
- bg_ll.png \
- bg_ul_blank.png \
+ bg_l.png \
+ bg_l_blank.png \
+ bg_r.png \
+ box_bg.png \
+ breadcrumb.png \
bullet_gt.png \
- horBar.png \
- qt_ref_doc.png \
- api_lookup.png \
- bg_ll_blank.png \
- bg_ur.png \
+ bullet_dn.png \
bullet_sq.png \
- bullet_dn.png \
- bullet_up.png \
+ bullet_up.png \
+ feedbackground.png \
+ horBar.png \
+ page.png \
page_bg.png \
- qt_tools.png \
- api_topics.png \
- bg_lr.png \
- bg_ur_blank.png \
- content_bg.png \
- print.png \
- sep.png \
- bg_l.png \
- bg_r.png \
- box_bg.png \
- feedbackground.png \
- qt_guide.png \
sprites-combined.png \
- bg_l_blank.png \
- bg_ul.png \
- breadcrumb.png \
- form_bg.png \
- qt_icon.png \
taskmenuextension-example.png \
coloreditorfactoryimage.png \
dynamiclayouts-example.png \
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 447467c..f34b262 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -1,4 +1,8 @@
-HTML.stylesheets = style/style.css
+HTML.stylesheets = style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
+
HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <div id=\"nav-logo\">\n" \
" <a href=\"index.html\">Home</a></div>\n" \
@@ -31,55 +35,55 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <div class=\"searchlabel\">\n" \
" Search index:</div>\n" \
" <div class=\"search\">\n" \
- " <form id=\"qtdocsearch\" action=\"#\">\n" \
+ " <form id=\"qtdocsearch\" action=\"\">\n" \
" <fieldset>\n" \
- " <input type=\"text\" name=\"searchstring\" id=\"searchstring\" value=\"\" onkeyup=\"doSearch(this.value);\" />\n" \
+ " <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \
" </fieldset>\n" \
" </form>\n" \
" </div>\n" \
" <div class=\"box first bottombar\" id=\"lookup\">\n" \
- " <h2>\n" \
+ " <h2><span></span>\n" \
" API Lookup</h2>\n" \
- " <div class=\"list\">\n" \
- " <ul>\n" \
- " <li><a href=\"modules.html\">All modules</a></li>\n" \
- " <li><a href=\"classes.html\">All classes</a></li>\n" \
- " <li><a href=\"functions.html\">All functions</a></li>\n" \
- " <li><a href=\"namespaces.html\">All namespaces</a></li>\n" \
- " <li><a href=\"platform-specific.html\">Platform specifics</a></li>\n" \
- " </ul>\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 stuff</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
+ " </ul> \n" \
" </div>\n" \
- " <div class=\"live\">\n" \
+ " <div id=\"live001\" class=\"live\">\n" \
" </div>\n" \
" </div>\n" \
" <div class=\"box bottombar\" id=\"topics\">\n" \
- " <h2>\n" \
- " API Topics</h2>\n" \
- " <div class=\"list\">\n" \
- " <ul>\n" \
- " <li><a href=\"object.html\">QObject model</a></li>\n" \
- " <li><a href=\"eventsandfilters.html\">Events, signals &amp; slots</a></li>\n" \
- " <li><a href=\"paintsystem.html\">Graphics &amp; Paint system</a></li>\n" \
- " <li><a href=\"declarativeui.html\">Qt Quick</a></li>\n" \
- " <li><a href=\"widgets-and-layouts.html\">Widget style &amp; layout</a></li>\n" \
- " </ul>\n" \
+ " <h2><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\">Basic Qt architecture</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"declarativeui.html\">Device UI's &amp; Qt Quick</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li>\n" \
+ " </ul> \n" \
" </div>\n" \
- " <div class=\"live\">\n" \
+ " <div id=\"live002\" class=\"live\">\n" \
" </div>\n" \
" </div>\n" \
" <div class=\"box\" id=\"examples\">\n" \
- " <h2>\n" \
- " API Examples</h2>\n" \
- " <div class=\"list\">\n" \
- " <ul>\n" \
- " <li><a href=\"examples.html\">All examples</a></li>\n" \
- " <li><a href=\"tutorials.html\">All tutorials</a></li>\n" \
- " <li><a href=\"examples.html\">Qt Quick examples</a></li>\n" \
- " <li><a href=\"examples.html\">Desktop examples</a></li>\n" \
- " <li><a href=\"examples.html\">Device examples</a></li>\n" \
- " </ul>\n" \
+ " <h2><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" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li>\n" \
+ " </ul> \n" \
" </div>\n" \
- " <div class=\"live\">\n" \
+ " <div id=\"live003\" class=\"live\">\n" \
" </div>\n" \
" </div>\n" \
" </div>\n" \
@@ -98,20 +102,21 @@ HTML.postpostheader = " </ul>\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" \
- " <img src=\"images/sep.png\" alt=\"\" /><img id=\"printIcon\" src=\"images/print.png\" alt=\"Print this page\" /></a></li>\n" \
+ " <span>Print</span></a></li>\n" \
" </ul>\n" \
" </div>\n" \
" </div>\n" \
" <div class=\"content\">\n"
-HTML.footer = " </div>\n" \
- " <div class=\"feedback t_button\" onclick=\"\$(\'#feedbackBox\').show();\$(\'#blurpage\').show()\">\n" \
+HTML.footer = " <!-- /div -->\n" \
+ " <div class=\"feedback t_button\" onclick=\"\$(\'.bd\').hide();\$(\'.hd\').hide();\$(\'.footer\').hide();\$(\'#feedbackBox\').show();\$(\'#blurpage\').show()\">\n" \
" [+] Documentation Feedback</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" \
@@ -123,17 +128,18 @@ HTML.footer = " </div>\n" \
" </div>\n" \
" <div id=\"feedbackBox\">\n" \
" <div id=\"feedcloseX\">\n" \
- " <a href=\"#\" onclick=\"\$(\'#feedbackBox\').hide();\$(\'#blurpage\').hide()\">X</a>\n" \
+ " <a href=\"#\" onclick=\"\$(\'.bd\').show();\$(\'.hd\').show();\$(\'.footer\').show();\$(\'#feedbackBox\').hide();\$(\'#blurpage\').hide()\">X</a>\n" \
" </div>\n" \
- " <form action=\"#\">\n" \
- " <textarea id=\"feedbox\" rows=\"5\" cols=\"40\">Please submit you feedback...</textarea>\n" \
- " <input id=\"feedsubmit\" type=\"submit\" onclick=\"\$(\'#feedbackBox\').hide();\$(\'#blurpage\').hide()\"\n" \
- " name=\"feedback\" />\n" \
+ " <form id=\"feedform\" action=\"feedback.php\" method=\"get\">\n" \
+ " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\">Please submit you feedback...</textarea></p>\n" \
+ " <input id=\"page\" name=\"pageVal\" value=\"\$(\'title\').html();\" style=\"display:none;\">\n" \
+ " <p><input id=\"feedsubmit\" type=\"submit\" onclick=\"\$(\'.bd\').show();\$(\'.hd\').show();\$(\'.footer\').show();\$(\'#feedbackBox\').hide();\$(\'#blurpage\').hide()\"\n" \
+ " name=\"feedback\" /></p>\n" \
" </form>\n" \
" </div>\n" \
" <div id=\"blurpage\">\n" \
" </div>\n" \
- "<script type=\"text/javascript\">\n" \
+ "<!-- <script type=\"text/javascript\">\n" \
" var _gaq = _gaq || [];\n" \
" _gaq.push([\'_setAccount\', \'UA-4457116-5\']);\n" \
" _gaq.push([\'_trackPageview\']);\n" \
@@ -142,4 +148,4 @@ HTML.footer = " </div>\n" \
" ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';\n" \
" var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);\n" \
" })();\n" \
- "</script>\n"
+ "</script> -->\n"
diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf
index 7c0ed86..0c2e2f3 100644
--- a/tools/qdoc3/test/qt.qdocconf
+++ b/tools/qdoc3/test/qt.qdocconf
@@ -26,45 +26,30 @@ qhp.Qt.indexRoot =
# Files not referenced in any qdoc file (last four are needed by qtdemo)
# See also extraimages.HTML
qhp.Qt.extraFiles = index.html \
- images/api_examples.png \
- images/api_lookup.png \
- images/api_topics.png \
- images/bg_l_blank.png \
- images/bg_ll_blank.png \
- images/bg_ll.png \
- images/bg_l.png \
- images/bg_lr.png \
+ images/bg_l.png \
+ images/bg_l_blank.png \
images/bg_r.png \
- images/bg_ul_blank.png \
- images/bg_ul.png \
- images/bg_ur_blank.png \
- images/bg_ur.png \
images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_dn.png \
- images/bullet_gt.png \
- images/bullet_sq.png \
- images/bullet_up.png \
- images/coloreditorfactoryimage.png \
- images/content_bg.png \
- images/dynamiclayouts-example.png \
- images/feedbackground.png \
- images/form_bg.png \
- images/horBar.png \
- images/page_bg.png \
- images/print.png \
- images/qt_guide.png \
- images/qt_icon.png \
- images/qt-logo.png \
- images/qt_ref_doc.png \
- images/qt_tools.png \
- images/sep.png \
- images/sprites-combined.png \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
+ images/breadcrumb.png \
+ images/bullet_gt.png \
+ images/bullet_dn.png \
+ images/bullet_sq.png \
+ images/bullet_up.png \
+ images/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
scripts/functions.js \
scripts/jquery.js \
- style/style.css
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
qhp.Qt.filterAttributes = qt 4.8.0 qtrefdoc
qhp.Qt.customFilters.Qt.name = Qt 4.8.0
diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf
index f6d6fad..0a8d936 100644
--- a/tools/qdoc3/test/qt_zh_CN.qdocconf
+++ b/tools/qdoc3/test/qt_zh_CN.qdocconf
@@ -32,45 +32,27 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.8.0
# Files not referenced in any qdoc file (last four are needed by qtdemo)
# See also extraimages.HTML
qhp.Qt.extraFiles = index.html \
- images/api_examples.png \
- images/api_lookup.png \
- images/api_topics.png \
- images/bg_l_blank.png \
- images/bg_ll_blank.png \
- images/bg_ll.png \
- images/bg_l.png \
- images/bg_lr.png \
- images/bg_r.png \
- images/bg_ul_blank.png \
- images/bg_ul.png \
- images/bg_ur_blank.png \
- images/bg_ur.png \
- images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_dn.png \
- images/bullet_gt.png \
- images/bullet_sq.png \
- images/bullet_up.png \
- images/coloreditorfactoryimage.png \
- images/content_bg.png \
- images/dynamiclayouts-example.png \
- images/feedbackground.png \
- images/form_bg.png \
- images/horBar.png \
- images/page_bg.png \
- images/print.png \
- images/qt_guide.png \
- images/qt_icon.png \
- images/qt-logo.png \
- images/qt_ref_doc.png \
- images/qt_tools.png \
- images/sep.png \
- images/sprites-combined.png \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- scripts/functions.js \
- scripts/jquery.js \
- style/style.css
+ images/bg_l.png \
+ images/bg_l_blank.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/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ scripts/functions.js \
+ scripts/jquery.js \
+ style/style.css
language = Cpp
diff --git a/tools/qdoc3/test/style/style.css b/tools/qdoc3/test/style/style.css
index 1ed49fa..9c290f5 100644
--- a/tools/qdoc3/test/style/style.css
+++ b/tools/qdoc3/test/style/style.css
@@ -58,6 +58,19 @@
{
vertical-align: baseline;
}
+ .heading
+ {
+ font: normal 600 16px/1.0 Arial;
+ padding-bottom: 15px;
+ }
+ .subtitle
+ {
+ font-size: 13px;
+ }
+ .small-subtitle
+ {
+ font-size: 13px;
+ }
legend
{
color: #000000;
@@ -73,7 +86,6 @@
{
font-size: 100%;
}
- /* Page style */
html
{
background-color: #e5e5e5;
@@ -92,6 +104,11 @@
{
font-style: italic;
}
+ a
+ {
+ color: #00732f;
+ text-decoration: none;
+ }
.header, .footer, .wrapper
{
min-width: 600px;
@@ -106,23 +123,19 @@
{
padding-left: 216px;
height: 15px;
- background: url(../images/bg_ul.png) no-repeat 0 0;
+ background: url(../images/page.png) no-repeat 0 0;
overflow: hidden;
}
.offline .wrapper .hd
{
- background: url(../images/bg_ul_blank.png) no-repeat 0 0;
+ background: url(../images/page.png) no-repeat 0 -15px;
}
.wrapper .hd span
{
height: 15px;
display: block;
- background: url(../images/bg_ur.png) no-repeat 100% 0;
overflow: hidden;
- }
- .offline .wrapper .hd span
- {
- /* background: url(../images/bg_ur_blank.png) no-repeat 100% 0; */
+ background: url(../images/page.png) no-repeat 100% -30px;
}
.wrapper .bd
{
@@ -137,18 +150,18 @@
{
padding-left: 216px;
height: 15px;
- background: url(../images/bg_ll.png) no-repeat 0 0;
+ background: url(../images/page.png) no-repeat 0 -75px;
overflow: hidden;
}
.offline .wrapper .ft
{
- background: url(../images/bg_ll_blank.png) no-repeat 0 0;
+ background: url(../images/page.png) no-repeat 0 -90px;
}
.wrapper .ft span
{
height: 15px;
display: block;
- background: url(../images/bg_lr.png) no-repeat 100% 0;
+ background: url(../images/page.png) no-repeat 100% -60px;
overflow: hidden;
}
.header, .footer
@@ -182,186 +195,9 @@
width: 302px;
height: 22px;
text-indent: -999em;
- background: url(../images/header.png) no-repeat 0 0;
- }
- /* header elements */
- #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;
- }
- /* Clearing */
- .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after
- {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
- }
- /* ^ Clearing */
-
-
-
- .shortCut-topleft-inactive
- {
- padding-left: 3px;
- background: transparent url( "../images/sprites-combined.png" ) no-repeat 0px -58px;
- height: 20px;
- width: 93px;
- }
- .shortCut-topleft-inactive span
- {
- font-variant: normal;
- }
- #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;
- text-decoration: none;
- }
- #shortCut li a:hover
- {
- color: #44a51c;
- text-decoration: none;
+ background: url(../images/sprites-combined.png) no-repeat -78px -235px;
}
- /* end of header elements */
-
- /* menu element */
.sidebar
{
float: left;
@@ -369,32 +205,32 @@
width: 200px;
font-size: 11px;
}
- .sidebar a
- {
- color: #00732f;
- text-decoration: none;
- }
- .offline .sidebar, .offline .feedback
+
+ .offline .sidebar, .offline .feedback, .offline .t_button
{
display: none;
}
+
.sidebar .searchlabel
{
padding: 0 0 2px 17px;
font: normal bold 11px/1.2 Verdana;
}
+
.sidebar .search
{
padding: 0 15px 0 16px;
}
+
.sidebar .search form
{
- width: 167px;
- height: 21px;
- padding: 2px 0 0 5px;
- background: url(../images/form_bg.png) no-repeat 0 0;
+ background: url(../images/sprites-combined.png) no-repeat -6px -348px;
+ height:21px;
+ padding:2px 0 0 5px;
+ width:167px;
}
- .sidebar .search form fieldset input#searchstring
+
+ .sidebar .search form input#pageType
{
width: 158px;
height: 19px;
@@ -403,32 +239,62 @@
outline: none;
font: 13px/1.2 Verdana;
}
+
.sidebar .box
{
padding: 17px 15px 5px 16px;
}
+
.sidebar .box .first
{
background-image: none;
}
+
.sidebar .box h2
{
font: normal 18px/1.2 Arial;
- padding: 15px 0 0 40px;
+ padding: 0;
min-height: 32px;
}
+ .sidebar .box h2 span
+ {
+ overflow: hidden;
+ display: inline-block;
+ }
.sidebar .box#lookup h2
{
- background: url(../images/api_lookup.png) no-repeat 0 0;
+ background-image: none;
+ }
+ .sidebar #lookup.box h2 span
+ {
+ background: url(../images/sprites-combined.png) no-repeat -6px -311px;
+ width: 27px;
+ height: 35px;
+ margin-right: 13px;
}
.sidebar .box#topics h2
{
- background: url(../images/api_topics.png) no-repeat 0 0;
+ background-image: none;
+ }
+ .sidebar #topics.box h2 span
+ {
+ background: url(../images/sprites-combined.png) no-repeat -94px -311px;
+ width: 27px;
+ height: 32px;
+ margin-right: 13px;
}
.sidebar .box#examples h2
{
- background: url(../images/api_examples.png) no-repeat 0 0;
+ background-image: none;
+ }
+ .sidebar #examples.box h2 span
+ {
+ background: url(../images/sprites-combined.png) no-repeat -48px -311px;
+ width: 30px;
+ height: 31px;
+ margin-right: 9px;
}
+
.sidebar .box .list
{
display: block;
@@ -443,6 +309,9 @@
{
text-decoration: underline;
}
+ .sidebar .box ul
+ {
+ }
.sidebar .box ul li
{
padding-left: 12px;
@@ -453,23 +322,20 @@
{
background: url(../images/box_bg.png) repeat-x 0 bottom;
}
- /* content elements */
.wrap
{
- overflow: hidden;
+ margin: 0 5px 0 208px;
+ overflow: visible;
}
.offline .wrap
{
margin: 0 5px 0 5px;
}
- /* tool bar */
.wrap .toolbar
{
background-color: #fafafa;
border-bottom: 1px solid #d1d1d1;
- height: 20px;
- margin-left: 3px;
- margin-right: 5px;
+ height: 20px;
position: relative;
}
.wrap .toolbar .toolblock
@@ -487,7 +353,7 @@
{
padding: 0 0 10px 21px;
right: 5px;
- vertical-align: top;
+ vertical-align: middle;
overflow: hidden;
}
.wrap .toolbar .toolbuttons .active
@@ -507,32 +373,56 @@
font-weight: bold;
color: #B0ADAB;
}
- #smallA
+
+ .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;
}
- #medA
+ .toolbuttons #medA
{
font-size: 12pt;
}
- #bigA
+ .toolbuttons #bigA
{
font-size: 14pt;
+ margin-right: 7px;
}
+
#smallA:hover, #medA:hover, #bigA:hover
{
color: #00732F;
}
- #print
+
+ .offline .wrap .breadcrumb
{
- font-size: 14pt;
- line-height: 20pt;
}
- #printIcon
+
+ .wrap .breadcrumb ul
{
- margin-left: 5px;
}
- /* bread crumbs */
.wrap .breadcrumb ul li
{
float: left;
@@ -545,6 +435,10 @@
{
font-weight: normal;
}
+ .wrap .breadcrumb ul li a
+ {
+ color: #363534;
+ }
.wrap .breadcrumb ul li.first
{
background-image: none;
@@ -554,29 +448,29 @@
.wrap .content
{
padding: 30px;
- position: relative;
}
- /* text elements */
- .heading
+
+ .wrap .content li
{
- font: normal 600 16px/1.0 Arial;
- padding-bottom: 15px;
+ padding-left: 12px;
+ background: url(../images/bullet_sq.png) no-repeat 0 5px;
+ font: normal 400 10pt/1 Verdana;
+ color: #44a51c;
+ margin-bottom: 10px;
}
-
- .subtitle
+ .content li:hover
{
- font-size: 13px;
+ text-decoration: underline;
}
- .small-subtitle
+ .offline .wrap .content
{
- font-size: 13px;
+ padding-top: 15px;
}
-
+
.wrap .content h1
{
font: 600 18px/1.2 Arial;
- padding-bottom: 15px;
}
.wrap .content h2
{
@@ -588,26 +482,13 @@
}
.wrap .content p
{
- line-height:20px;
- padding:10px 5px 10px 5px;
+ line-height: 20px;
+ padding: 10px 5px 10px 5px;
}
.wrap .content ul
{
padding-left: 25px;
}
- .wrap .content li
- {
- padding-left: 12px;
- background: url(../images/bullet_sq.png) no-repeat 0 5px;
- font: normal 400 10pt/1 Verdana;
- margin-bottom: 10px;
- line-height: 14px;
- }
- a
- {
- color: #00732F;
- text-decoration: none;
- }
a:hover
{
color: #4c0033;
@@ -618,10 +499,6 @@
color: #4c0033;
text-decoration: none;
}
- .offline .wrap .content
- {
- padding-top: 15px;
- }
.footer
{
min-height: 100px;
@@ -629,11 +506,15 @@
font: normal 9px/1 Verdana;
text-align: center;
padding-top: 40px;
+ background-color: #E6E7E8;
+ margin: 0;
}
.feedback
{
- float: right;
- padding-right: 10px;
+ float: none;
+ position: absolute;
+ right: 15px;
+ bottom: 10px;
font: normal 8px/1 Verdana;
color: #B0ADAB;
}
@@ -644,37 +525,223 @@
color: #00732F;
text-decoration: underline;
}
+ .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after
+ {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ }
+ #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;
+ background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px;
+ height: 20px;
+ width: 47px;
+ }
+ .shortCut-topleft-inactive span
+ {
+ font-variant: normal;
+ }
+ #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;
+ }
+
hr
{
- background-color: #e0e0e0;
+ background-color: #E6E6E6;
+ border: 1px solid #E6E6E6;
height: 1px;
width: 100%;
text-align: left;
margin: 15px 0px 15px 0px;
}
-
+
.content .alignedsummary
{
margin: 15px;
}
- /* tables */
+ pre
+ {
+ border: 1px solid #DDDDDD;
+ margin: 0 20px 10px 10px;
+ padding: 20px 15px 20px 20px;
+ overflow-x: auto;
+ }
table, pre
{
-moz-border-radius: 7px 7px 7px 7px;
background-color: #F6F6F6;
border: 1px solid #E6E6E6;
border-collapse: separate;
- font-size: 11px;
- min-width: 395px;
+ font-size: 11px;
+ /*min-width: 395px;*/
margin-bottom: 25px;
+ display: inline-block;
+ }
+ thead
+ {
+ margin-top: 5px;
+ }
+ th
+ {
+ padding: 3px 15px 3px 15px;
+ }
+ td
+ {
+ padding: 3px 15px 3px 20px;
}
- thead{margin-top: 5px;}
- th{ padding: 3px 15px 3px 15px;}
- td{padding: 3px 15px 3px 20px;}
table tr.odd
{
border-left: 1px solid #E6E6E6;
- background-color: #F6F6F6;
+ background-color: #F6F6F6;
color: #66666E;
}
table tr.even
@@ -685,12 +752,13 @@
}
table tr.odd:hover
{
- background-color: #E6E6E6;
+ background-color: #E6E6E6;
}
table tr.even:hover
{
background-color: #E6E6E6;
}
+
span.comment
{
color: #8B0000;
@@ -700,15 +768,7 @@
{
color: #254117;
}
- pre
- {
- -moz-border-radius:7px 7px 7px 7px;
- background-color:#F6F6F6;
- border:1px solid #DDDDDD;
- margin:0 20px 10px 10px;
- padding:20px 15px 20px 20px;
- overflow-x:auto;
- }
+
.qmltype
{
text-align: center;
@@ -719,13 +779,28 @@
float: right;
color: #254117;
}
+
+ .qmldefault
+ {
+ float: right;
+ color: red;
+ }
+
+ .qmldoc
+ {
+ }
+
+ *.qmlitem p
+ {
+ }
+
#feedbackBox
{
- display:none;
- -moz-border-radius:7px 7px 7px 7px;
- border:1px solid #DDDDDD;
- position:fixed;
- top:100px;
+ display: none;
+ -moz-border-radius: 7px 7px 7px 7px;
+ border: 1px solid #DDDDDD;
+ position: fixed;
+ top: 100px;
left: 33%;
height: 190px;
width: 400px;
@@ -735,27 +810,27 @@
}
#feedcloseX a
{
- display:inline;
+ display: inline;
padding: 5px 5px 0 0;
- margin-bottom:3px;
+ margin-bottom: 3px;
color: #363534;
- font-weight:600;
+ font-weight: 600;
float: right;
text-decoration: none;
}
+
#feedbox
- /* here */
{
- display:inline;
+ display: inline;
width: 370px;
height: 120px;
- margin:0px 25px 10px 15px;
+ margin: 0px 25px 10px 15px;
}
#feedsubmit
{
- display:inline;
- float:right;
- margin:4px 32px 0 0;
+ display: inline;
+ float: right;
+ margin: 4px 32px 0 0;
}
#blurpage
{
@@ -771,141 +846,172 @@
}
.toc
{
- float: right;
- -moz-border-radius:7px 7px 7px 7px;
- background-color:#F6F6F6;
- border:1px solid #DDDDDD;
- margin:0 20px 10px 10px;
- padding:20px 15px 20px 20px;
+ float: right;
+ -moz-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 ul
+ .toc h3
{
- float: left;
- padding: 15px;
-
+ font: 600 12px/1.2 Arial;
+ }
+
+ .wrap .content .toc ul
+ {
+ padding-left: 0px;
+ }
+
+
+ .wrap .content .toc .level2
+ {
+ margin-left: 15px;
}
-
.content .toc li
{
- font: normal 12px/1.2 Verdana;
+ font: normal 10px/1.2 Verdana;
background: url(../images/bullet_dn.png) no-repeat 0 5px;
}
- .relpage
+ .relpage
{
-moz-border-radius: 7px 7px 7px 7px;
border: 1px solid #DDDDDD;
padding: 25px 25px;
- clear:both;
+ clear: both;
}
.relpage ul
{
float: none;
padding: 15px;
}
- .content .relpage li
+ .content .relpage li
{
font: normal 11px/1.2 Verdana;
}
- /* edit */
h3.fn, span.fn
{
background-color: #F6F6F6;
border-width: 1px;
border-style: solid;
border-color: #E6E6E6;
- font-weight: bold;
- /* padding: 6px 0px 6px 10px;*/
- /* margin: 42px 0px 0px 0px;*/
+ font-weight: bold;
}
- /* edit */
- .indexbox
- {
- width: 100%;
- }
- .content .indexboxcont li
- {
- font: normal 600 13px/1 Verdana;
- }
- /* .indexbox a
- {
- color: #00732f;
- text-decoration: none;
- }*/
- .indexbox a:hover, .indexbox a:visited:hover
- {
- color: #4c0033;
- text-decoration: underline;
- }
- .indexbox a:visited
+ /* start index box */
+ .indexbox
{
- color: #00732f;
- text-decoration: none;
+ width: 100%;
+ display:inline-block;
}
.indexboxcont
{
display: block;
+ /* overflow: hidden;*/
}
.indexboxbar
{
- background: transparent url( "../images/horBar.png" ) repeat-x left bottom;
+ background: transparent url(../images/horBar.png ) repeat-x left bottom;
margin-bottom: 25px;
+ /* background-image: none;
+ border-bottom: 1px solid #e2e2e2;*/
}
.indexboxcont .section
{
- display: inline-block;
+ 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 p
- {
+ {
padding-top: 20px;
padding-bottom: 20px;
}
-
.indexboxcont .sectionlist
{
display: inline-block;
width: 33%;
- margin-right: -2px;
- vertical-align: top;
padding: 0;
}
- .tricol
- {
-
- }
.indexboxcont .sectionlist ul
{
- padding-left: 15px;
margin-bottom: 20px;
}
-/*
+
.indexboxcont .sectionlist ul li
{
line-height: 12px;
}
-*/
+
+ .content .indexboxcont li
+ {
+ font: normal 600 13px/1 Verdana;
+ }
+
+ .indexbox a:hover, .indexbox a:visited:hover
+ {
+ color: #4c0033;
+ text-decoration: underline;
+ }
+
+ .indexbox a:visited
+ {
+ color: #00732f;
+ text-decoration: none;
+ }
+
+ .indexboxcont:after
+ {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ }
+
+ .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;
+ }
+
.lastcol
{
display: inline-block;
@@ -916,12 +1022,9 @@
.tricol .lastcol
{
- margin-left:-6px;
+ margin-left: -6px;
}
-
- /*.toc ul*/
-
- /* end page elements */
+ /* end indexbox */
}
/* end of screen media */
@@ -929,7 +1032,7 @@
@media print
{
- .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft
+ input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft
{
display: none;
background: none;
diff --git a/tools/qml/Info_mac.plist b/tools/qml/Info_mac.plist
index ce4ebe3..80ca6a3 100644
--- a/tools/qml/Info_mac.plist
+++ b/tools/qml/Info_mac.plist
@@ -2,6 +2,8 @@
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.1">
<dict>
+ <key>CFBundleIconFile</key>
+ <string>@ICON@</string>
<key>CFBundleIdentifier</key>
<string>com.nokia.qt.qml</string>
<key>CFBundlePackageType</key>
diff --git a/tools/qml/content/Browser.qml b/tools/qml/content/Browser.qml
index 0912f58..7238203 100644
--- a/tools/qml/content/Browser.qml
+++ b/tools/qml/content/Browser.qml
@@ -1,4 +1,5 @@
import Qt 4.7
+import Qt.labs.folderlistmodel 1.0
Rectangle {
id: root
diff --git a/tools/qml/loggerwidget.cpp b/tools/qml/loggerwidget.cpp
index 9eca4a6..3ae2b5e 100644
--- a/tools/qml/loggerwidget.cpp
+++ b/tools/qml/loggerwidget.cpp
@@ -42,29 +42,141 @@
#include "loggerwidget.h"
#include <qglobal.h>
#include <QDebug>
+#include <QSettings>
+#include <QActionGroup>
+#include <QMenu>
QT_BEGIN_NAMESPACE
LoggerWidget::LoggerWidget(QWidget *parent) :
QPlainTextEdit(parent),
- m_keepClosed(false)
+ m_visibilityOrigin(SettingsOrigin)
{
setAttribute(Qt::WA_QuitOnClose, false);
- setWindowTitle(tr("Logger"));
+ setWindowTitle(tr("Warnings"));
+
+ readSettings();
+ setupPreferencesMenu();
}
void LoggerWidget::append(const QString &msg)
{
appendPlainText(msg);
- if (!m_keepClosed && !isVisible())
+ if (!isVisible() && (defaultVisibility() == AutoShowWarnings))
setVisible(true);
}
+LoggerWidget::Visibility LoggerWidget::defaultVisibility() const
+{
+ return m_visibility;
+}
+
+void LoggerWidget::setDefaultVisibility(LoggerWidget::Visibility visibility)
+{
+ if (m_visibility == visibility)
+ return;
+
+ m_visibility = visibility;
+ m_visibilityOrigin = CommandLineOrigin;
+
+ m_preferencesMenu->setEnabled(m_visibilityOrigin == SettingsOrigin);
+}
+
+QMenu *LoggerWidget::preferencesMenu()
+{
+ return m_preferencesMenu;
+}
+
+QAction *LoggerWidget::showAction()
+{
+ return m_showWidgetAction;
+}
+
+void LoggerWidget::readSettings()
+{
+ QSettings settings;
+ QString warningsPreferences = settings.value("warnings", "hide").toString();
+ if (warningsPreferences == "show") {
+ m_visibility = ShowWarnings;
+ } else if (warningsPreferences == "hide") {
+ m_visibility = HideWarnings;
+ } else {
+ m_visibility = AutoShowWarnings;
+ }
+}
+
+void LoggerWidget::saveSettings()
+{
+ if (m_visibilityOrigin != SettingsOrigin)
+ return;
+
+ QString value = "autoShow";
+ if (defaultVisibility() == ShowWarnings) {
+ value = "show";
+ } else if (defaultVisibility() == HideWarnings) {
+ value = "hide";
+ }
+
+ QSettings settings;
+ settings.setValue("warnings", value);
+}
+
+void LoggerWidget::warningsPreferenceChanged(QAction *action)
+{
+ Visibility newSetting = static_cast<Visibility>(action->data().toInt());
+ m_visibility = newSetting;
+ saveSettings();
+}
+
+void LoggerWidget::showEvent(QShowEvent *event)
+{
+ QWidget::showEvent(event);
+ emit opened();
+}
+
void LoggerWidget::closeEvent(QCloseEvent *event)
{
- m_keepClosed = true;
QWidget::closeEvent(event);
+ emit closed();
+}
+
+void LoggerWidget::setupPreferencesMenu()
+{
+ m_preferencesMenu = new QMenu(tr("Warnings"));
+ QActionGroup *warnings = new QActionGroup(m_preferencesMenu);
+ warnings->setExclusive(true);
+
+ connect(warnings, SIGNAL(triggered(QAction*)), this, SLOT(warningsPreferenceChanged(QAction*)));
+
+ QAction *showWarningsPreference = new QAction(tr("Show by default"), m_preferencesMenu);
+ showWarningsPreference->setCheckable(true);
+ showWarningsPreference->setData(LoggerWidget::ShowWarnings);
+ warnings->addAction(showWarningsPreference);
+ m_preferencesMenu->addAction(showWarningsPreference);
+
+ QAction *hideWarningsPreference = new QAction(tr("Hide by default"), m_preferencesMenu);
+ hideWarningsPreference->setCheckable(true);
+ hideWarningsPreference->setData(LoggerWidget::HideWarnings);
+ warnings->addAction(hideWarningsPreference);
+ m_preferencesMenu->addAction(hideWarningsPreference);
+
+ QAction *autoWarningsPreference = new QAction(tr("Show for first warning"), m_preferencesMenu);
+ autoWarningsPreference->setCheckable(true);
+ autoWarningsPreference->setData(LoggerWidget::AutoShowWarnings);
+ warnings->addAction(autoWarningsPreference);
+ m_preferencesMenu->addAction(autoWarningsPreference);
+
+ switch (defaultVisibility()) {
+ case LoggerWidget::ShowWarnings:
+ showWarningsPreference->setChecked(true);
+ break;
+ case LoggerWidget::HideWarnings:
+ hideWarningsPreference->setChecked(true);
+ break;
+ default:
+ autoWarningsPreference->setChecked(true);
+ }
}
QT_END_NAMESPACE
diff --git a/tools/qml/loggerwidget.h b/tools/qml/loggerwidget.h
index 5c4a701..fd20c41 100644
--- a/tools/qml/loggerwidget.h
+++ b/tools/qml/loggerwidget.h
@@ -50,14 +50,44 @@ class LoggerWidget : public QPlainTextEdit {
Q_OBJECT
public:
LoggerWidget(QWidget *parent=0);
+
+ enum Visibility { ShowWarnings, HideWarnings, AutoShowWarnings };
+
+ Visibility defaultVisibility() const;
+ void setDefaultVisibility(Visibility visibility);
+
+ QMenu *preferencesMenu();
+ QAction *showAction();
+
public slots:
void append(const QString &msg);
+
+private slots:
+ void warningsPreferenceChanged(QAction *action);
+ void readSettings();
+ void saveSettings();
+
protected:
+ void showEvent(QShowEvent *event);
void closeEvent(QCloseEvent *event);
+
+signals:
+ void opened();
+ void closed();
+
private:
- bool m_keepClosed;
+ void setupPreferencesMenu();
+
+ QMenu *m_preferencesMenu;
+ QAction *m_showWidgetAction;
+
+ enum ConfigOrigin { CommandLineOrigin, SettingsOrigin };
+ ConfigOrigin m_visibilityOrigin;
+ Visibility m_visibility;
};
QT_END_NAMESPACE
+Q_DECLARE_METATYPE(LoggerWidget::Visibility)
+
#endif // LOGGERWIDGET_H
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 9ccc3d2..0cce1cc 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -50,11 +50,10 @@
#include <QDebug>
#include <QMessageBox>
#include "qdeclarativetester.h"
-#include "qdeclarativefolderlistmodel.h"
QT_USE_NAMESPACE
-QtMsgHandler systemMsgOutput;
+QtMsgHandler systemMsgOutput = 0;
#if defined (Q_OS_SYMBIAN)
#include <unistd.h>
@@ -86,7 +85,7 @@ QString warnings;
void showWarnings()
{
if (!warnings.isEmpty()) {
- QMessageBox::warning(0, QApplication::tr("Qt Declarative UI Runtime"), warnings);
+ QMessageBox::warning(0, QApplication::tr("Qt QML Viewer"), warnings);
}
}
@@ -111,7 +110,7 @@ void myMessageOutput(QtMsgType type, const char *msg)
void usage()
{
- qWarning("Usage: qml [options] <filename>");
+ qWarning("Usage: qmlviewer [options] <filename>");
qWarning(" ");
qWarning(" options:");
qWarning(" -v, -version ............................. display version");
@@ -119,13 +118,10 @@ void usage()
qWarning(" -maximized................................ run maximized");
qWarning(" -fullscreen............................... run fullscreen");
qWarning(" -stayontop................................ keep viewer window on top");
- qWarning(" -skin <qvfbskindir> ...................... run with a skin window frame");
- qWarning(" \"list\" for a list of built-ins");
- qWarning(" -resizeview .............................. resize the view, not the skin");
qWarning(" -sizeviewtorootobject .................... the view resizes to the changes in the content");
qWarning(" -sizerootobjecttoview .................... the content resizes to the changes in the view");
qWarning(" -qmlbrowser .............................. use a QML-based file browser");
- qWarning(" -nolog ................................... do not show log window");
+ qWarning(" -warnings [show|hide]..................... show warnings in a separate log window");
qWarning(" -recordfile <output> ..................... set video recording file");
qWarning(" - ImageMagick 'convert' for GIF)");
qWarning(" - png file for raw frames");
@@ -152,7 +148,7 @@ void usage()
void scriptOptsUsage()
{
- qWarning("Usage: qml -scriptopts <option>[,<option>...] ...");
+ qWarning("Usage: qmlviewer -scriptopts <option>[,<option>...] ...");
qWarning(" options:");
qWarning(" record ................................... record a new script");
qWarning(" play ..................................... playback an existing script");
@@ -168,6 +164,8 @@ void scriptOptsUsage()
exit(1);
}
+enum WarningsConfig { ShowWarnings, HideWarnings, DefaultWarnings };
+
int main(int argc, char ** argv)
{
#if defined (Q_OS_SYMBIAN)
@@ -182,7 +180,7 @@ int main(int argc, char ** argv)
atexit(showWarnings);
#endif
-#if defined (Q_WS_X11)
+#if defined (Q_WS_X11) || defined (Q_WS_MAC)
//### default to using raster graphics backend for now
bool gsSpecified = false;
for (int i = 0; i < argc; ++i) {
@@ -198,16 +196,14 @@ int main(int argc, char ** argv)
#endif
QApplication app(argc, argv);
- app.setApplicationName("QtQmlRuntime");
+ app.setApplicationName("QtQmlViewer");
app.setOrganizationName("Nokia");
app.setOrganizationDomain("nokia.com");
QDeclarativeViewer::registerTypes();
QDeclarativeTester::registerTypes();
- QDeclarativeFolderListModel::registerTypes();
bool frameless = false;
- bool resizeview = false;
QString fileName;
double fps = 0;
int autorecord_from = 0;
@@ -217,7 +213,6 @@ int main(int argc, char ** argv)
QStringList recordargs;
QStringList imports;
QStringList plugins;
- QString skin;
QString script;
QString scriptopts;
bool runScript = false;
@@ -229,7 +224,9 @@ int main(int argc, char ** argv)
bool stayOnTop = false;
bool maximized = false;
bool useNativeFileBrowser = true;
- bool showLogWidget = true;
+ bool experimentalGestures = false;
+
+ WarningsConfig warningsConfig = DefaultWarnings;
bool sizeToView = true;
#if defined(Q_OS_SYMBIAN)
@@ -237,6 +234,10 @@ int main(int argc, char ** argv)
useNativeFileBrowser = false;
#endif
+#if defined(Q_WS_MAC)
+ useGL = true;
+#endif
+
for (int i = 1; i < argc; ++i) {
bool lastArg = (i == argc - 1);
QString arg = argv[i];
@@ -248,11 +249,6 @@ int main(int argc, char ** argv)
fullScreen = true;
} else if (arg == "-stayontop") {
stayOnTop = true;
- } else if (arg == "-skin") {
- if (lastArg) usage();
- skin = QString(argv[++i]);
- } else if (arg == "-resizeview") {
- resizeview = true;
} else if (arg == "-netcache") {
if (lastArg) usage();
cache = QString(argv[++i]).toInt();
@@ -281,7 +277,7 @@ int main(int argc, char ** argv)
if (lastArg) usage();
app.setStartDragDistance(QString(argv[++i]).toInt());
} else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) {
- qWarning("Qt Qml Runtime version %s", QT_VERSION_STR);
+ qWarning("Qt QML Viewer version %s", QT_VERSION_STR);
exit(0);
} else if (arg == "-translation") {
if (lastArg) usage();
@@ -290,8 +286,16 @@ int main(int argc, char ** argv)
useGL = true;
} else if (arg == "-qmlbrowser") {
useNativeFileBrowser = false;
- } else if (arg == "-nolog") {
- showLogWidget = false;
+ } else if (arg == "-warnings") {
+ if (lastArg) usage();
+ QString warningsStr = QString(argv[++i]);
+ if (warningsStr == QLatin1String("show")) {
+ warningsConfig = ShowWarnings;
+ } else if (warningsStr == QLatin1String("hide")) {
+ warningsConfig = HideWarnings;
+ } else {
+ usage();
+ }
} else if (arg == "-I" || arg == "-L") {
if (arg == "-L")
qWarning("-L option provided for compatibility only, use -I instead");
@@ -323,6 +327,8 @@ int main(int argc, char ** argv)
sizeToView = false;
} else if (arg == "-sizerootobjecttoview") {
sizeToView = true;
+ } else if (arg == "-experimentalgestures") {
+ experimentalGestures = true;
} else if (arg[0] != '-') {
fileName = arg;
} else if (1 || arg == "-help") {
@@ -340,13 +346,6 @@ int main(int argc, char ** argv)
if (stayOnTop)
wflags |= Qt::WindowStaysOnTopHint;
-#if !defined(Q_OS_SYMBIAN)
- LoggerWidget loggerWidget(0);
- if (showLogWidget) {
- logger = &loggerWidget;
- }
-#endif
-
QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags);
if (!scriptopts.isEmpty()) {
QStringList options =
@@ -389,6 +388,19 @@ int main(int argc, char ** argv)
usage();
}
+#if !defined(Q_OS_SYMBIAN)
+ logger = viewer->warningsWidget();
+ if (warningsConfig == ShowWarnings) {
+ logger.data()->setDefaultVisibility(LoggerWidget::ShowWarnings);
+ logger.data()->show();
+ } else if (warningsConfig == HideWarnings){
+ logger.data()->setDefaultVisibility(LoggerWidget::HideWarnings);
+ }
+#endif
+
+ if (experimentalGestures)
+ viewer->enableExperimentalGestures();
+
foreach (QString lib, imports)
viewer->addLibraryPath(lib);
@@ -398,21 +410,10 @@ int main(int argc, char ** argv)
viewer->setNetworkCacheSize(cache);
viewer->setRecordFile(recordfile);
viewer->setSizeToView(sizeToView);
- if (resizeview)
- viewer->setScaleView();
if (fps>0)
viewer->setRecordRate(fps);
if (autorecord_to)
viewer->setAutoRecord(autorecord_from,autorecord_to);
- if (!skin.isEmpty()) {
- if (skin == "list") {
- foreach (QString s, viewer->builtinSkins())
- qWarning() << qPrintable(s);
- exit(0);
- } else {
- viewer->setSkin(skin);
- }
- }
if (devkeys)
viewer->setDeviceKeys(true);
viewer->setRecordDither(dither);
diff --git a/tools/qml/qdeclarativefolderlistmodel.cpp b/tools/qml/qdeclarativefolderlistmodel.cpp
deleted file mode 100644
index 5a9d88b..0000000
--- a/tools/qml/qdeclarativefolderlistmodel.cpp
+++ /dev/null
@@ -1,420 +0,0 @@
-/****************************************************************************
-**
-** 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: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 "qdeclarativefolderlistmodel.h"
-#include <QDirModel>
-#include <QDebug>
-#include <qdeclarativecontext.h>
-
-QT_BEGIN_NAMESPACE
-
-class QDeclarativeFolderListModelPrivate
-{
-public:
- QDeclarativeFolderListModelPrivate()
- : sortField(QDeclarativeFolderListModel::Name), sortReversed(false), count(0) {
- nameFilters << QLatin1String("*");
- }
-
- void updateSorting() {
- QDir::SortFlags flags = 0;
- switch(sortField) {
- case QDeclarativeFolderListModel::Unsorted:
- flags |= QDir::Unsorted;
- break;
- case QDeclarativeFolderListModel::Name:
- flags |= QDir::Name;
- break;
- case QDeclarativeFolderListModel::Time:
- flags |= QDir::Time;
- break;
- case QDeclarativeFolderListModel::Size:
- flags |= QDir::Size;
- break;
- case QDeclarativeFolderListModel::Type:
- flags |= QDir::Type;
- break;
- }
-
- if (sortReversed)
- flags |= QDir::Reversed;
-
- model.setSorting(flags);
- }
-
- QDirModel model;
- QUrl folder;
- QStringList nameFilters;
- QModelIndex folderIndex;
- QDeclarativeFolderListModel::SortField sortField;
- bool sortReversed;
- int count;
-};
-
-/*!
- \qmlclass FolderListModel
- \brief The FolderListModel provides a model of the contents of a folder in a filesystem.
-
- FolderListModel provides access to the local filesystem. The \e folder property
- specifies the folder to list.
-
- Qt uses "/" as a universal directory separator in the same way that "/" is
- used as a path separator in URLs. If you always use "/" as a directory
- separator, Qt will translate your paths to conform to the underlying
- operating system.
-
- The roles available are:
- \list
- \o fileName
- \o filePath
- \endlist
-
- Additionally a file entry can be differentiated from a folder entry
- via the \l isFolder() method.
-*/
-
-QDeclarativeFolderListModel::QDeclarativeFolderListModel(QObject *parent)
- : QListModelInterface(parent)
-{
- d = new QDeclarativeFolderListModelPrivate;
- d->model.setFilter(QDir::AllDirs | QDir::Files | QDir::Drives | QDir::NoDotAndDotDot);
- connect(&d->model, SIGNAL(rowsInserted(const QModelIndex&,int,int))
- , this, SLOT(inserted(const QModelIndex&,int,int)));
- connect(&d->model, SIGNAL(rowsRemoved(const QModelIndex&,int,int))
- , this, SLOT(removed(const QModelIndex&,int,int)));
- connect(&d->model, SIGNAL(dataChanged(const QModelIndex&,const QModelIndex&))
- , this, SLOT(dataChanged(const QModelIndex&,const QModelIndex&)));
- connect(&d->model, SIGNAL(modelReset()), this, SLOT(refresh()));
- connect(&d->model, SIGNAL(layoutChanged()), this, SLOT(refresh()));
-}
-
-QDeclarativeFolderListModel::~QDeclarativeFolderListModel()
-{
- delete d;
-}
-
-QHash<int,QVariant> QDeclarativeFolderListModel::data(int index, const QList<int> &roles) const
-{
- Q_UNUSED(roles);
- QHash<int,QVariant> folderData;
- QModelIndex modelIndex = d->model.index(index, 0, d->folderIndex);
- if (modelIndex.isValid()) {
- folderData[QDirModel::FileNameRole] = d->model.data(modelIndex, QDirModel::FileNameRole);
- folderData[QDirModel::FilePathRole] = QUrl::fromLocalFile(d->model.data(modelIndex, QDirModel::FilePathRole).toString());
- }
-
- return folderData;
-}
-
-QVariant QDeclarativeFolderListModel::data(int index, int role) const
-{
- QVariant rv;
- QModelIndex modelIndex = d->model.index(index, 0, d->folderIndex);
- if (modelIndex.isValid()) {
- if (role == QDirModel::FileNameRole)
- rv = d->model.data(modelIndex, QDirModel::FileNameRole);
- else if (role == QDirModel::FilePathRole)
- rv = QUrl::fromLocalFile(d->model.data(modelIndex, QDirModel::FilePathRole).toString());
- }
-
- return rv;
-}
-
-int QDeclarativeFolderListModel::count() const
-{
- return d->count;
-}
-
-QList<int> QDeclarativeFolderListModel::roles() const
-{
- QList<int> r;
- r << QDirModel::FileNameRole;
- r << QDirModel::FilePathRole;
- return r;
-}
-
-QString QDeclarativeFolderListModel::toString(int role) const
-{
- switch (role) {
- case QDirModel::FileNameRole:
- return QLatin1String("fileName");
- case QDirModel::FilePathRole:
- return QLatin1String("filePath");
- }
-
- return QString();
-}
-
-/*!
- \qmlproperty string FolderListModel::folder
-
- The \a folder property holds the folder the model is currently providing.
-
- It is a URL, but must be a file: or qrc: URL (or relative to such a URL).
-*/
-QUrl QDeclarativeFolderListModel::folder() const
-{
- return d->folder;
-}
-
-void QDeclarativeFolderListModel::setFolder(const QUrl &folder)
-{
- if (folder == d->folder)
- return;
- QModelIndex index = d->model.index(folder.toLocalFile());
- if (index.isValid() && d->model.isDir(index)) {
- d->folder = folder;
- QMetaObject::invokeMethod(this, "refresh", Qt::QueuedConnection);
- emit folderChanged();
- }
-}
-
-QUrl QDeclarativeFolderListModel::parentFolder() const
-{
- QUrl r;
- QString localFile = d->folder.toLocalFile();
- if (!localFile.isEmpty()) {
- QDir dir(localFile);
-#if defined(Q_OS_SYMBIAN)
- if (dir.isRoot())
- dir.setPath("");
- else
-#endif
- dir.cdUp();
- r = d->folder;
- r.setPath(dir.path());
- } else {
- int pos = d->folder.path().lastIndexOf(QLatin1Char('/'));
- if (pos == -1)
- return QUrl();
- r = d->folder;
- r.setPath(d->folder.path().left(pos));
- }
- return r;
-}
-
-/*!
- \qmlproperty list<string> FolderListModel::nameFilters
-
- The \a nameFilters property contains a list of filename filters.
- The filters may include the ? and * wildcards.
-
- The example below filters on PNG and JPEG files:
-
- \code
- FolderListModel {
- nameFilters: [ "*.png", "*.jpg" ]
- }
- \endcode
-*/
-QStringList QDeclarativeFolderListModel::nameFilters() const
-{
- return d->nameFilters;
-}
-
-void QDeclarativeFolderListModel::setNameFilters(const QStringList &filters)
-{
- d->nameFilters = filters;
- d->model.setNameFilters(d->nameFilters);
-}
-
-void QDeclarativeFolderListModel::componentComplete()
-{
- if (!d->folder.isValid() || !QDir().exists(d->folder.toLocalFile()))
- setFolder(QUrl(QLatin1String("file://")+QDir::currentPath()));
-
- if (!d->folderIndex.isValid())
- QMetaObject::invokeMethod(this, "refresh", Qt::QueuedConnection);
-}
-
-QDeclarativeFolderListModel::SortField QDeclarativeFolderListModel::sortField() const
-{
- return d->sortField;
-}
-
-void QDeclarativeFolderListModel::setSortField(SortField field)
-{
- if (field != d->sortField) {
- d->sortField = field;
- d->updateSorting();
- }
-}
-
-bool QDeclarativeFolderListModel::sortReversed() const
-{
- return d->sortReversed;
-}
-
-void QDeclarativeFolderListModel::setSortReversed(bool rev)
-{
- if (rev != d->sortReversed) {
- d->sortReversed = rev;
- d->updateSorting();
- }
-}
-
-/*!
- \qmlmethod bool FolderListModel::isFolder(int index)
-
- Returns true if the entry \a index is a folder; otherwise
- returns false.
-*/
-bool QDeclarativeFolderListModel::isFolder(int index) const
-{
- if (index != -1) {
- QModelIndex idx = d->model.index(index, 0, d->folderIndex);
- if (idx.isValid())
- return d->model.isDir(idx);
- }
- return false;
-}
-
-void QDeclarativeFolderListModel::refresh()
-{
- d->folderIndex = QModelIndex();
- if (d->count) {
- int tmpCount = d->count;
- d->count = 0;
- emit itemsRemoved(0, tmpCount);
- }
- d->folderIndex = d->model.index(d->folder.toLocalFile());
- d->count = d->model.rowCount(d->folderIndex);
- if (d->count) {
- emit itemsInserted(0, d->count);
- }
-}
-
-void QDeclarativeFolderListModel::inserted(const QModelIndex &index, int start, int end)
-{
- if (index == d->folderIndex) {
- d->count = d->model.rowCount(d->folderIndex);
- emit itemsInserted(start, end - start + 1);
- }
-}
-
-void QDeclarativeFolderListModel::removed(const QModelIndex &index, int start, int end)
-{
- if (index == d->folderIndex) {
- d->count = d->model.rowCount(d->folderIndex);
- emit itemsRemoved(start, end - start + 1);
- }
-}
-
-void QDeclarativeFolderListModel::dataChanged(const QModelIndex &start, const QModelIndex &end)
-{
- qDebug() << "data changed";
- if (start.parent() == d->folderIndex)
- emit itemsChanged(start.row(), end.row() - start.row() + 1, roles());
-}
-
-/*!
- \qmlproperty bool FolderListModel::showDirs
-
- If true (the default), directories are included in the model.
-
- Note that the nameFilters are ignored for directories.
-*/
-bool QDeclarativeFolderListModel::showDirs() const
-{
- return d->model.filter() & QDir::AllDirs;
-}
-
-void QDeclarativeFolderListModel::setShowDirs(bool on)
-{
- if (!(d->model.filter() & QDir::AllDirs) == !on)
- return;
- if (on)
- d->model.setFilter(d->model.filter() | QDir::AllDirs | QDir::Drives);
- else
- d->model.setFilter(d->model.filter() & ~(QDir::AllDirs | QDir::Drives));
-}
-
-/*!
- \qmlproperty bool FolderListModel::showDotAndDotDot
-
- If true, the "." and ".." directories are included in the model.
-
- The default is false.
-*/
-bool QDeclarativeFolderListModel::showDotAndDotDot() const
-{
- return !(d->model.filter() & QDir::NoDotAndDotDot);
-}
-
-void QDeclarativeFolderListModel::setShowDotAndDotDot(bool on)
-{
- if (!(d->model.filter() & QDir::NoDotAndDotDot) == on)
- return;
- if (on)
- d->model.setFilter(d->model.filter() & ~QDir::NoDotAndDotDot);
- else
- d->model.setFilter(d->model.filter() | QDir::NoDotAndDotDot);
-}
-
-/*!
- \qmlproperty bool FolderListModel::showOnlyReadable
-
- If true, only readable files and directories are shown.
-
- The default is false.
-*/
-bool QDeclarativeFolderListModel::showOnlyReadable() const
-{
- return d->model.filter() & QDir::Readable;
-}
-
-void QDeclarativeFolderListModel::setShowOnlyReadable(bool on)
-{
- if (!(d->model.filter() & QDir::Readable) == !on)
- return;
- if (on)
- d->model.setFilter(d->model.filter() | QDir::Readable);
- else
- d->model.setFilter(d->model.filter() & ~QDir::Readable);
-}
-
-void QDeclarativeFolderListModel::registerTypes()
-{
- qmlRegisterType<QDeclarativeFolderListModel>("Qt",4,7,"FolderListModel");
-}
-
-QT_END_NAMESPACE
-
diff --git a/tools/qml/qdeclarativefolderlistmodel.h b/tools/qml/qdeclarativefolderlistmodel.h
deleted file mode 100644
index 57b7fe5..0000000
--- a/tools/qml/qdeclarativefolderlistmodel.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** 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: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 QDECLARATIVEFOLDERLISTMODEL_H
-#define QDECLARATIVEFOLDERLISTMODEL_H
-
-#include <qdeclarative.h>
-#include <QStringList>
-#include <QUrl>
-#include "../../src/declarative/3rdparty/qlistmodelinterface_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QDeclarativeContext;
-class QModelIndex;
-
-class QDeclarativeFolderListModelPrivate;
-class QDeclarativeFolderListModel : public QListModelInterface, public QDeclarativeParserStatus
-{
- Q_OBJECT
- Q_INTERFACES(QDeclarativeParserStatus)
-
- Q_PROPERTY(QUrl folder READ folder WRITE setFolder NOTIFY folderChanged)
- Q_PROPERTY(QUrl parentFolder READ parentFolder NOTIFY folderChanged)
- Q_PROPERTY(QStringList nameFilters READ nameFilters WRITE setNameFilters)
- Q_PROPERTY(SortField sortField READ sortField WRITE setSortField)
- Q_PROPERTY(bool sortReversed READ sortReversed WRITE setSortReversed)
- Q_PROPERTY(bool showDirs READ showDirs WRITE setShowDirs)
- Q_PROPERTY(bool showDotAndDotDot READ showDotAndDotDot WRITE setShowDotAndDotDot)
- Q_PROPERTY(bool showOnlyReadable READ showOnlyReadable WRITE setShowOnlyReadable)
-
-public:
- QDeclarativeFolderListModel(QObject *parent = 0);
- ~QDeclarativeFolderListModel();
-
- static void registerTypes();
-
- virtual QHash<int,QVariant> data(int index, const QList<int> &roles = (QList<int>())) const;
- virtual QVariant data(int index, int role) const;
- virtual int count() const;
- virtual QList<int> roles() const;
- virtual QString toString(int role) const;
-
- QUrl folder() const;
- void setFolder(const QUrl &folder);
-
- QUrl parentFolder() const;
-
- QStringList nameFilters() const;
- void setNameFilters(const QStringList &filters);
-
- virtual void componentComplete();
-
- Q_INVOKABLE bool isFolder(int index) const;
-
- enum SortField { Unsorted, Name, Time, Size, Type };
- SortField sortField() const;
- void setSortField(SortField field);
- Q_ENUMS(SortField)
-
- bool sortReversed() const;
- void setSortReversed(bool rev);
-
- bool showDirs() const;
- void setShowDirs(bool);
- bool showDotAndDotDot() const;
- void setShowDotAndDotDot(bool);
- bool showOnlyReadable() const;
- void setShowOnlyReadable(bool);
-
-Q_SIGNALS:
- void folderChanged();
-
-private Q_SLOTS:
- void refresh();
- void inserted(const QModelIndex &index, int start, int end);
- void removed(const QModelIndex &index, int start, int end);
- void dataChanged(const QModelIndex &start, const QModelIndex &end);
-
-private:
- Q_DISABLE_COPY(QDeclarativeFolderListModel)
- QDeclarativeFolderListModelPrivate *d;
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QDeclarativeFolderListModel)
-
-#endif // QDECLARATIVEFOLDERLISTMODEL_H
diff --git a/tools/qml/qml.icns b/tools/qml/qml.icns
new file mode 100644
index 0000000..c760516
--- /dev/null
+++ b/tools/qml/qml.icns
Binary files differ
diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri
index d343c76..5e3e74b 100644
--- a/tools/qml/qml.pri
+++ b/tools/qml/qml.pri
@@ -10,12 +10,10 @@ HEADERS += $$PWD/qmlruntime.h \
$$PWD/proxysettings.h \
$$PWD/qdeclarativetester.h \
$$PWD/deviceorientation.h \
- $$PWD/qdeclarativefolderlistmodel.h \
$$PWD/loggerwidget.h
SOURCES += $$PWD/qmlruntime.cpp \
$$PWD/proxysettings.cpp \
$$PWD/qdeclarativetester.cpp \
- $$PWD/qdeclarativefolderlistmodel.cpp \
$$PWD/loggerwidget.cpp
RESOURCES = $$PWD/qmlruntime.qrc
@@ -24,7 +22,11 @@ maemo5 {
} else {
SOURCES += $$PWD/deviceorientation.cpp
}
+
+symbian {
+ INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
+ LIBS += -lesock -lcommdb -lconnmon -linsock
+}
+
FORMS = $$PWD/recopts.ui \
$$PWD/proxysettings.ui
-
-include(../shared/deviceskin/deviceskin.pri)
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro
index b33d48b..9cdec77 100644
--- a/tools/qml/qml.pro
+++ b/tools/qml/qml.pro
@@ -32,12 +32,13 @@ wince* {
symbian {
TARGET.UID3 = 0x20021317
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
- INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
- LIBS += -lesock -lcommdb -lconnmon -linsock
TARGET.CAPABILITY = NetworkServices ReadUserData
}
mac {
QMAKE_INFO_PLIST=Info_mac.plist
- TARGET=Qml
+ TARGET=QMLViewer
+ ICON=qml.icns
+} else {
+ TARGET=qmlviewer
}
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 008f163..8df250f 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -53,7 +53,6 @@
#include "qdeclarative.h"
#include <private/qabstractanimation_p.h>
#include <QAbstractAnimation>
-#include "deviceskin.h"
#include <QSettings>
#include <QXmlStreamReader>
@@ -66,6 +65,7 @@
#include <QDeclarativeComponent>
#include <QWidget>
#include <QApplication>
+#include <QTranslator>
#include <QDir>
#include <QTextBrowser>
#include <QFile>
@@ -167,89 +167,6 @@ private:
QWidget *refWidget;
};
-
-class PreviewDeviceSkin : public DeviceSkin
-{
- Q_OBJECT
-public:
- explicit PreviewDeviceSkin(const DeviceSkinParameters &parameters, QWidget *parent);
-
- void setPreview(QWidget *formWidget);
- void setPreviewAndScale(QWidget *formWidget);
-
- void setScreenSize(const QSize& size)
- {
- QMatrix fit;
- fit = fit.scale(qreal(size.width())/m_screenSize.width(),
- qreal(size.height())/m_screenSize.height());
- setTransform(fit);
- QApplication::syncX();
- }
-
- QSize standardScreenSize() const { return m_screenSize; }
-
- QMenu* menu;
-
-private slots:
- void slotSkinKeyPressEvent(int code, const QString& text, bool autorep);
- void slotSkinKeyReleaseEvent(int code, const QString& text, bool autorep);
- void slotPopupMenu();
-
-private:
- const QSize m_screenSize;
-};
-
-
-PreviewDeviceSkin::PreviewDeviceSkin(const DeviceSkinParameters &parameters, QWidget *parent) :
- DeviceSkin(parameters, parent),
- m_screenSize(parameters.screenSize())
-{
- menu = new QMenu(this);
- connect(this, SIGNAL(skinKeyPressEvent(int,QString,bool)),
- this, SLOT(slotSkinKeyPressEvent(int,QString,bool)));
- connect(this, SIGNAL(skinKeyReleaseEvent(int,QString,bool)),
- this, SLOT(slotSkinKeyReleaseEvent(int,QString,bool)));
- connect(this, SIGNAL(popupMenu()), this, SLOT(slotPopupMenu()));
-}
-
-void PreviewDeviceSkin::setPreview(QWidget *formWidget)
-{
- formWidget->setFixedSize(m_screenSize);
- formWidget->setParent(this, Qt::SubWindow);
- formWidget->setAutoFillBackground(true);
- setView(formWidget);
-}
-
-void PreviewDeviceSkin::setPreviewAndScale(QWidget *formWidget)
-{
- setScreenSize(formWidget->sizeHint());
- formWidget->setParent(this, Qt::SubWindow);
- formWidget->setAutoFillBackground(true);
- setView(formWidget);
-}
-
-void PreviewDeviceSkin::slotSkinKeyPressEvent(int code, const QString& text, bool autorep)
-{
- if (QWidget *focusWidget = QApplication::focusWidget()) {
- QKeyEvent e(QEvent::KeyPress,code,0,text,autorep);
- QApplication::sendEvent(focusWidget, &e);
- }
-
-}
-
-void PreviewDeviceSkin::slotSkinKeyReleaseEvent(int code, const QString& text, bool autorep)
-{
- if (QWidget *focusWidget = QApplication::focusWidget()) {
- QKeyEvent e(QEvent::KeyRelease,code,0,text,autorep);
- QApplication::sendEvent(focusWidget, &e);
- }
-}
-
-void PreviewDeviceSkin::slotPopupMenu()
-{
- menu->exec(QCursor::pos());
-}
-
static struct { const char *name, *args; } ffmpegprofiles[] = {
{"Maximum Quality", "-sameq"},
{"High Quality", "-qmax 2"},
@@ -433,7 +350,7 @@ QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent)
setupProxy(manager);
if (cacheSize > 0) {
QNetworkDiskCache *cache = new QNetworkDiskCache;
- cache->setCacheDirectory(QDir::tempPath()+QLatin1String("/qml-duiviewer-network-cache"));
+ cache->setCacheDirectory(QDir::tempPath()+QLatin1String("/qml-viewer-network-cache"));
cache->setMaximumCacheSize(cacheSize);
manager->setCache(cache);
} else {
@@ -461,15 +378,19 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
#else
: QWidget(parent, flags)
#endif
- , frame_stream(0), scaleSkin(true), mb(0)
+ , loggerWindow(new LoggerWidget())
+ , frame_stream(0), mb(0)
, portraitOrientation(0), landscapeOrientation(0)
- , m_scriptOptions(0), tester(0), useQmlFileBrowser(true)
+ , showWarningsWindow(0)
+ , m_scriptOptions(0)
+ , tester(0)
+ , useQmlFileBrowser(true)
+ , translator(0)
{
QDeclarativeViewer::registerTypes();
- setWindowTitle(tr("Qt Qml Runtime"));
+ setWindowTitle(tr("Qt QML Viewer"));
devicemode = false;
- skin = 0;
canvas = 0;
record_autotime = 0;
record_rate = 50;
@@ -495,6 +416,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
}
canvas = new QDeclarativeView(this);
+
canvas->setAttribute(Qt::WA_OpaquePaintEvent);
canvas->setAttribute(Qt::WA_NoSystemBackground);
@@ -504,6 +426,9 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
QObject::connect(canvas, SIGNAL(statusChanged(QDeclarativeView::Status)), this, SLOT(statusChanged()));
QObject::connect(canvas->engine(), SIGNAL(quit()), QCoreApplication::instance (), SLOT(quit()));
+ QObject::connect(warningsWidget(), SIGNAL(opened()), this, SLOT(warningsWidgetOpened()));
+ QObject::connect(warningsWidget(), SIGNAL(closed()), this, SLOT(warningsWidgetClosed()));
+
if (!(flags & Qt::FramelessWindowHint)) {
createMenu(menuBar(),0);
setPortrait();
@@ -526,6 +451,8 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
connect(&autoStartTimer, SIGNAL(triggered()), this, SLOT(autoStartRecording()));
connect(&autoStopTimer, SIGNAL(triggered()), this, SLOT(autoStopRecording()));
connect(&recordTimer, SIGNAL(triggered()), this, SLOT(recordFrame()));
+ connect(DeviceOrientation::instance(), SIGNAL(orientationChanged()),
+ this, SLOT(orientationChanged()), Qt::QueuedConnection);
autoStartTimer.setRunning(false);
autoStopTimer.setRunning(false);
recordTimer.setRunning(false);
@@ -534,10 +461,21 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
QDeclarativeViewer::~QDeclarativeViewer()
{
+ delete loggerWindow;
canvas->engine()->setNetworkAccessManagerFactory(0);
delete namFactory;
}
+void QDeclarativeViewer::enableExperimentalGestures()
+{
+ canvas->viewport()->grabGesture(Qt::TapGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->grabGesture(Qt::TapAndHoldGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->grabGesture(Qt::PanGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->grabGesture(Qt::PinchGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->grabGesture(Qt::SwipeGesture,Qt::DontStartGestureOnChildren|Qt::ReceivePartialGestures|Qt::IgnoredGesturesPropagateToParent);
+ canvas->viewport()->setAttribute(Qt::WA_AcceptTouchEvents);
+}
+
int QDeclarativeViewer::menuBarHeight() const
{
if (!(windowFlags() & Qt::FramelessWindowHint))
@@ -563,6 +501,11 @@ QDeclarativeView *QDeclarativeViewer::view() const
return canvas;
}
+LoggerWidget *QDeclarativeViewer::warningsWidget() const
+{
+ return loggerWindow;
+}
+
void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu)
{
QObject *parent = flatmenu ? (QObject*)flatmenu : (QObject*)menu;
@@ -614,53 +557,17 @@ void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu)
connect(slowAction, SIGNAL(triggered(bool)), this, SLOT(setSlowMode(bool)));
debugMenu->addAction(slowAction);
- if (flatmenu) flatmenu->addSeparator();
+ showWarningsWindow = new QAction(tr("Show Warnings"), parent);
+ showWarningsWindow->setCheckable((true));
+ showWarningsWindow->setChecked(loggerWindow->isVisible());
+ connect(showWarningsWindow, SIGNAL(triggered(bool)), this, SLOT(showWarnings(bool)));
- QMenu *skinMenu = flatmenu ? flatmenu->addMenu(tr("&Skin")) : menu->addMenu(tr("&Skin"));
-
- QActionGroup *skinActions;
- QAction *skinAction;
-
- skinActions = new QActionGroup(parent);
- skinAction = new QAction(tr("Scale skin"), parent);
- skinAction->setCheckable(true);
- skinAction->setChecked(scaleSkin);
- skinActions->addAction(skinAction);
- skinMenu->addAction(skinAction);
- connect(skinAction, SIGNAL(triggered()), this, SLOT(setScaleSkin()));
- skinAction = new QAction(tr("Resize view"), parent);
- skinAction->setCheckable(true);
- skinAction->setChecked(!scaleSkin);
- skinActions->addAction(skinAction);
- skinMenu->addAction(skinAction);
- connect(skinAction, SIGNAL(triggered()), this, SLOT(setScaleView()));
- skinMenu->addSeparator();
-
- skinActions = new QActionGroup(parent);
- QSignalMapper *mapper = new QSignalMapper(parent);
- skinAction = new QAction(tr("None"), parent);
- skinAction->setCheckable(true);
- if (currentSkin.isEmpty())
- skinAction->setChecked(true);
- skinActions->addAction(skinAction);
- skinMenu->addAction(skinAction);
- mapper->setMapping(skinAction, "");
- connect(skinAction, SIGNAL(triggered()), mapper, SLOT(map()));
- skinMenu->addSeparator();
-
- foreach (QString name, builtinSkins()) {
- skinAction = new QAction(name, parent);
- skinActions->addAction(skinAction);
- skinMenu->addAction(skinAction);
- skinAction->setCheckable(true);
- if (":skin/"+name+".skin" == currentSkin)
- skinAction->setChecked(true);
- mapper->setMapping(skinAction, name);
- connect(skinAction, SIGNAL(triggered()), mapper, SLOT(map()));
- }
- connect(mapper, SIGNAL(mapped(QString)), this, SLOT(setSkin(QString)));
+#if !defined(Q_OS_SYMBIAN)
+ debugMenu->addAction(showWarningsWindow);
+#endif
if (flatmenu) flatmenu->addSeparator();
+
#endif // Q_OS_SYMBIAN
QMenu *settingsMenu = flatmenu ? flatmenu : menu->addMenu(tr("S&ettings"));
@@ -670,6 +577,8 @@ void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu)
#if !defined(Q_OS_SYMBIAN)
if (!flatmenu)
settingsMenu->addAction(recordOptions);
+
+ settingsMenu->addMenu(loggerWindow->preferencesMenu());
#else
QAction *fullscreenAction = new QAction(tr("Full Screen"), parent);
fullscreenAction->setCheckable(true);
@@ -677,7 +586,10 @@ void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu)
settingsMenu->addAction(fullscreenAction);
#endif
+ if (flatmenu) flatmenu->addSeparator();
+
QMenu *propertiesMenu = settingsMenu->addMenu(tr("Properties"));
+
QActionGroup *orientation = new QActionGroup(parent);
QAction *toggleOrientation = new QAction(tr("&Toggle Orientation"), parent);
@@ -756,30 +668,20 @@ void QDeclarativeViewer::toggleFullScreen()
showFullScreen();
}
-void QDeclarativeViewer::setScaleSkin()
+void QDeclarativeViewer::showWarnings(bool show)
{
- if (scaleSkin)
- return;
- scaleSkin = true;
- if (skin) {
- canvas->resize(initialSize);
- canvas->setFixedSize(initialSize);
- canvas->setResizeMode(QDeclarativeView::SizeViewToRootObject);
- updateSizeHints();
- }
+ loggerWindow->setVisible(show);
}
-void QDeclarativeViewer::setScaleView()
+void QDeclarativeViewer::warningsWidgetOpened()
{
- if (!scaleSkin)
- return;
- scaleSkin = false;
- if (skin) {
- canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
- updateSizeHints();
- }
+ showWarningsWindow->setChecked(true);
}
+void QDeclarativeViewer::warningsWidgetClosed()
+{
+ showWarningsWindow->setChecked(false);
+}
void QDeclarativeViewer::takeSnapShot()
{
@@ -924,10 +826,8 @@ void QDeclarativeViewer::statusChanged()
if (canvas->status() == QDeclarativeView::Ready) {
initialSize = canvas->sizeHint();
if (canvas->resizeMode() == QDeclarativeView::SizeRootObjectToView) {
- QSize newWindowSize = initialSize;
- newWindowSize.setHeight(newWindowSize.height()+menuBarHeight());
updateSizeHints();
- resize(newWindowSize);
+ resize(QSize(initialSize.width(), initialSize.height()+menuBarHeight()));
}
}
}
@@ -937,6 +837,46 @@ void QDeclarativeViewer::launch(const QString& file_or_url)
QMetaObject::invokeMethod(this, "open", Qt::QueuedConnection, Q_ARG(QString, file_or_url));
}
+void QDeclarativeViewer::loadTranslationFile(const QString& directory)
+{
+ if (!translator) {
+ translator = new QTranslator(this);
+ QApplication::installTranslator(translator);
+ }
+
+ translator->load(QLatin1String("qml_" )+QLocale::system().name(), directory + QLatin1String("/i18n"));
+}
+
+void QDeclarativeViewer::loadDummyDataFiles(const QString& directory)
+{
+ QDir dir(directory+"/dummydata", "*.qml");
+ QStringList list = dir.entryList();
+ for (int i = 0; i < list.size(); ++i) {
+ QString qml = list.at(i);
+ QFile f(dir.filePath(qml));
+ f.open(QIODevice::ReadOnly);
+ QByteArray data = f.readAll();
+ QDeclarativeComponent comp(canvas->engine());
+ comp.setData(data, QUrl());
+ QObject *dummyData = comp.create();
+
+ if(comp.isError()) {
+ QList<QDeclarativeError> errors = comp.errors();
+ foreach (const QDeclarativeError &error, errors) {
+ qWarning() << error;
+ }
+ if (tester) tester->executefailure();
+ }
+
+ if (dummyData) {
+ qWarning() << "Loaded dummy data:" << dir.filePath(qml);
+ qml.truncate(qml.length()-4);
+ canvas->rootContext()->setContextProperty(qml, dummyData);
+ dummyData->setParent(this);
+ }
+ }
+}
+
bool QDeclarativeViewer::open(const QString& file_or_url)
{
currentFileOrUrl = file_or_url;
@@ -947,7 +887,7 @@ bool QDeclarativeViewer::open(const QString& file_or_url)
url = QUrl::fromLocalFile(fi.absoluteFilePath());
else
url = QUrl(file_or_url);
- setWindowTitle(tr("%1 - Qt Qml Runtime").arg(file_or_url));
+ setWindowTitle(tr("%1 - Qt QML Viewer").arg(file_or_url));
if (!m_script.isEmpty())
tester = new QDeclarativeTester(m_script, m_scriptOptions, canvas);
@@ -966,39 +906,16 @@ bool QDeclarativeViewer::open(const QString& file_or_url)
QString fileName = url.toLocalFile();
if (!fileName.isEmpty()) {
- QFileInfo fi(fileName);
+ fi.setFile(fileName);
if (fi.exists()) {
if (fi.suffix().toLower() != QLatin1String("qml")) {
qWarning() << "qml cannot open non-QML file" << fileName;
return false;
}
- QDir dir(fi.path()+"/dummydata", "*.qml");
- QStringList list = dir.entryList();
- for (int i = 0; i < list.size(); ++i) {
- QString qml = list.at(i);
- QFile f(dir.filePath(qml));
- f.open(QIODevice::ReadOnly);
- QByteArray data = f.readAll();
- QDeclarativeComponent comp(canvas->engine());
- comp.setData(data, QUrl());
- QObject *dummyData = comp.create();
-
- if(comp.isError()) {
- QList<QDeclarativeError> errors = comp.errors();
- foreach (const QDeclarativeError &error, errors) {
- qWarning() << error;
- }
- if (tester) tester->executefailure();
- }
-
- if (dummyData) {
- qWarning() << "Loaded dummy data:" << dir.filePath(qml);
- qml.truncate(qml.length()-4);
- ctxt->setContextProperty(qml, dummyData);
- dummyData->setParent(this);
- }
- }
+ QFileInfo fi(fileName);
+ loadTranslationFile(fi.path());
+ loadDummyDataFiles(fi.path());
} else {
qWarning() << "qml cannot find file:" << fileName;
return false;
@@ -1020,83 +937,6 @@ void QDeclarativeViewer::startNetwork()
#endif
}
-QStringList QDeclarativeViewer::builtinSkins() const
-{
- QDir dir(":/skins/","*.skin");
- const QFileInfoList l = dir.entryInfoList();
- QStringList r;
- for (QFileInfoList::const_iterator it = l.begin(); it != l.end(); ++it) {
- r += (*it).baseName();
- }
- return r;
-}
-
-void QDeclarativeViewer::setSkin(const QString& skinDirOrName)
-{
- QString skinDirectory = skinDirOrName;
-
- if (!QDir(skinDirOrName).exists() && QDir(":/skins/"+skinDirOrName+".skin").exists())
- skinDirectory = ":/skins/"+skinDirOrName+".skin";
-
- if (currentSkin == skinDirectory)
- return;
-
- currentSkin = skinDirectory;
-
- // XXX QWidget::setMask does not handle changes well, and we may
- // XXX have been signalled from an item in a menu we're replacing,
- // XXX hence some rather convoluted resetting here...
-
- QString err;
- if (skin) {
- skin->hide();
- skin->deleteLater();
- }
-
- DeviceSkinParameters parameters;
- if (!skinDirectory.isEmpty() && parameters.read(skinDirectory,DeviceSkinParameters::ReadAll,&err)) {
- layout()->setEnabled(false);
- if (mb)
- mb->hide();
- if (!err.isEmpty())
- qWarning() << err;
- skin = new PreviewDeviceSkin(parameters,this);
- if (scaleSkin)
- skin->setPreviewAndScale(canvas);
- else
- skin->setPreview(canvas);
- createMenu(0,skin->menu);
- if (scaleSkin) {
- canvas->setResizeMode(QDeclarativeView::SizeViewToRootObject);
- }
- updateSizeHints();
- skin->show();
- } else if (skin) {
- skin = 0;
- clearMask();
- if ((windowFlags() & Qt::FramelessWindowHint)) {
- menuBar()->clear();
- createMenu(menuBar(),0);
- }
- canvas->setParent(this, Qt::SubWindow);
- setParent(0,windowFlags()); // recreate
- mb->show();
- canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView);
- updateSizeHints();
-
- layout()->setEnabled(true);
- if (!scaleSkin) {
- canvas->resize(initialSize);
- canvas->setFixedSize(initialSize);
- }
- QSize newWindowSize = canvas->size();
- newWindowSize.setHeight(newWindowSize.height()+menuBarHeight());
- resize(newWindowSize);
- show();
- }
- canvas->show();
-}
-
void QDeclarativeViewer::setAutoRecord(int from, int to)
{
if (from==0) from=1; // ensure resized
@@ -1365,6 +1205,19 @@ void QDeclarativeViewer::recordFrame()
}
}
+void QDeclarativeViewer::orientationChanged()
+{
+ if (canvas->resizeMode() == QDeclarativeView::SizeRootObjectToView) {
+ if (canvas->rootObject()) {
+ QSizeF rootObjectSize = canvas->rootObject()->boundingRect().size();
+ QSize newSize(rootObjectSize.width(), rootObjectSize.height()+menuBarHeight());
+ if (size() != newSize) {
+ resize(newSize);
+ }
+ }
+ }
+}
+
void QDeclarativeViewer::setDeviceKeys(bool on)
{
devicemode = on;
@@ -1412,24 +1265,16 @@ void QDeclarativeViewer::updateSizeHints()
{
if (canvas->resizeMode() == QDeclarativeView::SizeViewToRootObject) {
QSize newWindowSize = canvas->sizeHint();
- if (!skin)
- newWindowSize.setHeight(newWindowSize.height()+menuBarHeight());
+ newWindowSize.setHeight(newWindowSize.height()+menuBarHeight());
if (!isFullScreen() && !isMaximized()) {
resize(newWindowSize);
setFixedSize(newWindowSize);
- if (skin && scaleSkin) {
- skin->setScreenSize(newWindowSize);
- }
}
} else { // QDeclarativeView::SizeRootObjectToView
canvas->setMinimumSize(QSize(0,0));
canvas->setMaximumSize(QSize(16777215,16777215));
setMinimumSize(QSize(0,0));
setMaximumSize(QSize(16777215,16777215));
- if (skin && !scaleSkin) {
- canvas->setFixedSize(skin->standardScreenSize());
- skin->setScreenSize(skin->standardScreenSize());
- }
}
updateGeometry();
}
diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h
index 2a0a07d..0416b32 100644
--- a/tools/qml/qmlruntime.h
+++ b/tools/qml/qmlruntime.h
@@ -48,6 +48,8 @@
#include <QTime>
#include <QList>
+#include "loggerwidget.h"
+
QT_BEGIN_NAMESPACE
class QDeclarativeView;
@@ -59,6 +61,7 @@ class QDeclarativeTester;
class QNetworkReply;
class QNetworkCookieJar;
class NetworkAccessManagerFactory;
+class QTranslator;
class QDeclarativeViewer
#if defined(Q_OS_SYMBIAN)
@@ -102,11 +105,13 @@ public:
void setUseNativeFileBrowser(bool);
void updateSizeHints();
void setSizeToView(bool sizeToView);
- QStringList builtinSkins() const;
QMenuBar *menuBar() const;
QDeclarativeView *view() const;
+ LoggerWidget *warningsWidget() const;
+
+ void enableExperimentalGestures();
public slots:
void sceneResized(QSize size);
@@ -117,10 +122,9 @@ public slots:
void toggleRecording();
void toggleRecordingWithSelection();
void ffmpegFinished(int code);
- void setSkin(const QString& skinDirectory);
void showProxySettings ();
void proxySettingsChanged ();
- void setScaleView();
+ void toggleOrientation();
void statusChanged();
void setSlowMode(bool);
void launch(const QString &);
@@ -128,7 +132,6 @@ public slots:
protected:
virtual void keyPressEvent(QKeyEvent *);
virtual bool event(QEvent *);
-
void createMenu(QMenuBar *menu, QMenu *flatmenu);
private slots:
@@ -137,19 +140,21 @@ private slots:
void recordFrame();
void chooseRecordingOptions();
void pickRecordingFile();
- void setScaleSkin();
void setPortrait();
void setLandscape();
- void toggleOrientation();
void startNetwork();
void toggleFullScreen();
+ void orientationChanged();
+
+ void showWarnings(bool show);
+ void warningsWidgetOpened();
+ void warningsWidgetClosed();
private:
QString getVideoFileName();
int menuBarHeight() const;
- PreviewDeviceSkin *skin;
- QSize skinscreensize;
+ LoggerWidget *loggerWindow;
QDeclarativeView *canvas;
QSize initialSize;
QString currentFileOrUrl;
@@ -182,16 +187,22 @@ private:
QAction *portraitOrientation;
QAction *landscapeOrientation;
+ QAction *showWarningsWindow;
+
QString m_script;
ScriptOptions m_scriptOptions;
QDeclarativeTester *tester;
QNetworkReply *wgtreply;
QString wgtdir;
-
NetworkAccessManagerFactory *namFactory;
bool useQmlFileBrowser;
+
+ QTranslator *translator;
+ void loadTranslationFile(const QString& directory);
+
+ void loadDummyDataFiles(const QString& directory);
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeViewer::ScriptOptions)
diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp
index 37e4548..885d029 100644
--- a/tools/runonphone/main.cpp
+++ b/tools/runonphone/main.cpp
@@ -102,6 +102,10 @@ int main(int argc, char *argv[])
else if (arg == "--sis" || arg == "-s") {
CHECK_PARAMETER_EXISTS
sisFile = it.next();
+ if (!QFileInfo(sisFile).exists()) {
+ errstream << "Sis file (" << sisFile << ") doesn't exist" << endl;
+ return 1;
+ }
}
else if (arg == "--download" || arg == "-d") {
CHECK_PARAMETER_EXISTS
diff --git a/tools/runonphone/symbianutils/launcher.cpp b/tools/runonphone/symbianutils/launcher.cpp
index fa509e7..ecb067e 100644
--- a/tools/runonphone/symbianutils/launcher.cpp
+++ b/tools/runonphone/symbianutils/launcher.cpp
@@ -365,8 +365,22 @@ void Launcher::handleResult(const TrkResult &result)
QByteArray prefix = "READ BUF: ";
QByteArray str = result.toString().toUtf8();
if (result.isDebugOutput) { // handle application output
- logMessage("APPLICATION OUTPUT: " + result.data);
- emit applicationOutputReceived(result.data);
+ QString msg;
+ if (result.multiplex == MuxTextTrace) {
+ if (result.data.length() > 8) {
+ quint64 timestamp = extractInt64(result.data) & 0x0FFFFFFFFFFFFFFFULL;
+ quint64 secs = timestamp / 1000000000;
+ quint64 ns = timestamp % 1000000000;
+ msg = QString("[%1.%2] %3").arg(secs).arg(ns).arg(QString(result.data.mid(8)));
+ logMessage("TEXT TRACE: " + msg);
+ }
+ } else {
+ logMessage("APPLICATION OUTPUT: " + result.data);
+ msg = result.data;
+ }
+ msg.replace("\r\n", "\n");
+ if(!msg.endsWith('\n')) msg.append('\n');
+ emit applicationOutputReceived(msg);
return;
}
switch (result.code) {
diff --git a/tools/runonphone/symbianutils/trkutils.cpp b/tools/runonphone/symbianutils/trkutils.cpp
index 9b43c96..60e391e 100644
--- a/tools/runonphone/symbianutils/trkutils.cpp
+++ b/tools/runonphone/symbianutils/trkutils.cpp
@@ -276,14 +276,13 @@ QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool s
/* returns 0 if array doesn't represent a result,
otherwise returns the length of the result data */
-ushort isValidTrkResult(const QByteArray &buffer, bool serialFrame)
+ushort isValidTrkResult(const QByteArray &buffer, bool serialFrame, ushort& mux)
{
if (serialFrame) {
// Serial protocol with length info
if (buffer.length() < 4)
return 0;
- if (buffer.at(0) != 0x01 || byte(buffer.at(1)) != 0x90)
- return 0;
+ mux = extractShort(buffer.data());
const ushort len = extractShort(buffer.data() + 2);
return (buffer.size() >= len + 4) ? len : ushort(0);
}
@@ -292,6 +291,7 @@ ushort isValidTrkResult(const QByteArray &buffer, bool serialFrame)
const int firstDelimiterPos = buffer.indexOf(delimiter);
// Regular message delimited by 0x7e..0x7e
if (firstDelimiterPos == 0) {
+ mux = MuxTrk;
const int endPos = buffer.indexOf(delimiter, firstDelimiterPos + 1);
return endPos != -1 ? endPos + 1 - firstDelimiterPos : 0;
}
@@ -304,7 +304,7 @@ bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *result, QByt
result->clear();
if(rawData)
rawData->clear();
- const ushort len = isValidTrkResult(*buffer, serialFrame);
+ const ushort len = isValidTrkResult(*buffer, serialFrame, result->multiplex);
if (!len)
return false;
// handle receiving application output, which is not a regular command
@@ -312,7 +312,6 @@ bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *result, QByt
if (buffer->at(delimiterPos) != 0x7e) {
result->isDebugOutput = true;
result->data = buffer->mid(delimiterPos, len);
- result->data.replace("\r\n", "\n");
*buffer->remove(0, delimiterPos + len);
return true;
}
@@ -353,6 +352,19 @@ SYMBIANUTILS_EXPORT uint extractInt(const char *data)
return res;
}
+SYMBIANUTILS_EXPORT quint64 extractInt64(const char *data)
+{
+ quint64 res = byte(data[0]);
+ res <<= 8; res += byte(data[1]);
+ res <<= 8; res += byte(data[2]);
+ res <<= 8; res += byte(data[3]);
+ res <<= 8; res += byte(data[4]);
+ res <<= 8; res += byte(data[5]);
+ res <<= 8; res += byte(data[6]);
+ res <<= 8; res += byte(data[7]);
+ return res;
+}
+
SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba)
{
QString res;
diff --git a/tools/runonphone/symbianutils/trkutils.h b/tools/runonphone/symbianutils/trkutils.h
index 553fc7d..e571028 100644
--- a/tools/runonphone/symbianutils/trkutils.h
+++ b/tools/runonphone/symbianutils/trkutils.h
@@ -135,9 +135,16 @@ enum Command {
TrkDSPositionFile = 0xd4
};
+enum SerialMultiplexor {
+ MuxRaw = 0,
+ MuxTextTrace = 0x0102,
+ MuxTrk = 0x0190
+};
+
inline byte extractByte(const char *data) { return *data; }
SYMBIANUTILS_EXPORT ushort extractShort(const char *data);
SYMBIANUTILS_EXPORT uint extractInt(const char *data);
+SYMBIANUTILS_EXPORT quint64 extractInt64(const char *data);
SYMBIANUTILS_EXPORT QString quoteUnprintableLatin1(const QByteArray &ba);
@@ -217,6 +224,7 @@ struct SYMBIANUTILS_EXPORT TrkResult
int errorCode() const;
QString errorString() const;
+ ushort multiplex;
byte code;
byte token;
QByteArray data;
diff --git a/tools/shared/deviceskin/deviceskin.pri b/tools/shared/deviceskin/deviceskin.pri
index 2552c92..3e9935a 100644
--- a/tools/shared/deviceskin/deviceskin.pri
+++ b/tools/shared/deviceskin/deviceskin.pri
@@ -2,13 +2,10 @@ INCLUDEPATH += $$PWD
HEADERS += $$PWD/deviceskin.h
SOURCES += $$PWD/deviceskin.cpp
RESOURCES += $$PWD/skins/ClamshellPhone.qrc \
- $$PWD/skins/PDAPhone.qrc \
$$PWD/skins/SmartPhone2.qrc \
$$PWD/skins/SmartPhone.qrc \
$$PWD/skins/SmartPhoneWithButtons.qrc \
$$PWD/skins/TouchscreenPhone.qrc \
- $$PWD/skins/Trolltech-Keypad.qrc \
- $$PWD/skins/Trolltech-Touchscreen.qrc \
$$PWD/skins/PortableMedia.qrc \
$$PWD/skins/S60-QVGA-Candybar.qrc \
$$PWD/skins/S60-nHD-Touchscreen.qrc
diff --git a/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen-pressed.png b/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen-pressed.png
deleted file mode 100644
index d62ef4a..0000000
--- a/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen-pressed.png
+++ /dev/null
Binary files differ
diff --git a/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen.png b/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen.png
deleted file mode 100644
index cb3d1a7..0000000
--- a/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreen.png
+++ /dev/null
Binary files differ
diff --git a/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreenPhone.skin b/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreenPhone.skin
deleted file mode 100644
index a82ef23..0000000
--- a/tools/shared/deviceskin/skins/DualScreenPhone.skin/DualScreenPhone.skin
+++ /dev/null
@@ -1,29 +0,0 @@
-[SkinFile]
-Up=DualScreen.png
-Down=DualScreen-pressed.png
-Screen=128 155 176 208
-BackScreen=18 44 98 119
-Areas=21
-HasMouseHover=false
-
-"Context1" 0x1100000 144 368 189 368 168 396 176 427 150 398
-"Back" 0x1000061 245 365 291 366 283 398 258 424 265 394
-"Select" 0x1010000 202 401 210 389 224 388 233 402 224 415 208 415
-"Up" 0x1000013 202 381 196 374 218 363 239 373 229 382
-"Left" 0x1000012 199 385 189 375 176 403 185 426 197 415 194 401
-"Right" 0x1000014 235 390 248 379 253 402 246 421 238 413
-"Down" 0x1000015 204 421 233 422 241 432 214 443 191 430
-"Call" 0x1100004 163 452 137 450 125 465 136 484 159 485 169 467
-"Hangup" 0x1100005 266 475 279 448 295 447 309 460 301 480 289 487
-"1" 0x31 175 514 147 504 133 518 161 532 180 534
-"2" 0x32 199 515 229 519 238 533 222 540 195 538
-"2" 0x32 260 512 286 506 299 513 284 527 264 535 248 525
-"4" 0x34 164 541 177 546 182 560 164 565 146 560 135 545 154 539
-"5" 0x35 204 546 225 546 243 560 231 574 205 573 191 558
-"6" 0x36 257 547 281 537 294 540 287 555 274 566 254 561
-"7" 0x37 145 569 176 578 177 595 156 597 138 584
-"8" 0x38 197 582 229 584 241 593 226 604 201 603 189 594
-"9" 0x39 253 577 288 564 301 578 283 593 259 597 251 586
-"*" 0x2a 145 598 181 611 182 623 163 632 144 623 138 607
-"0" 0x30 196 611 233 613 240 630 220 642 193 637 191 622
-"#" 0x23 255 610 286 600 302 615 279 625 258 629 247 616
diff --git a/tools/shared/deviceskin/skins/DualScreenPhone.skin/defaultbuttons.conf b/tools/shared/deviceskin/skins/DualScreenPhone.skin/defaultbuttons.conf
deleted file mode 100644
index 1103350..0000000
--- a/tools/shared/deviceskin/skins/DualScreenPhone.skin/defaultbuttons.conf
+++ /dev/null
@@ -1,78 +0,0 @@
-[Translation]
-File=QtopiaDefaults
-Context=Buttons
-[Menu]
-Rows=4
-Columns=3
-Map=123456789*0#
-Default=5
-1=Applications/camera.desktop
-2=Applications/datebook.desktop
-3=Applications
-4=Applications/qtmail.desktop
-5=Applications/addressbook.desktop
-6=Games
-7=Settings/Beaming.desktop
-8=Applications/simapp.desktop,Applications/calculator.desktop
-9=Settings
-*=Applications/mediarecorder.desktop
-0=Applications/todolist.desktop
-#=Documents
-Animator=Bounce
-AnimatorBackground=Radial
-[SoftKeys]
-Count=3
-Key0=Context1
-Key1=Select
-Key2=Back
-[SystemButtons]
-Count=5
-Key0=Context1
-Key1=Select
-Key2=Back
-Key3=Call
-Key4=Hangup
-[TextButtons]
-Buttons=0123456789*#
-Hold0='0
-Hold1='1
-Hold2='2
-Hold3='3
-Hold4='4
-Hold5='5
-Hold6='6
-Hold7='7
-Hold8='8
-Hold9='9
-Hold*=symbol
-Hold#=mode
-Tap0=space
-Tap1="\".,'?!-@:1"
-Tap2="\"a\xe4\xe5\xe6\xe0\xe1\xe2\x62\x63\xe7\x32"
-Tap3="\"de\xe8\xe9\xea\x66\x33"
-Tap4="\"ghi\xec\xed\xee\x34"
-Tap5="\"jkl5"
-Tap6="\"mn\xf1o\xf6\xf8\xf2\xf3\x36"
-Tap7="\"pqrs\xdf\x37"
-Tap8="\"tu\xfc\xf9\xfav8"
-Tap9="\"wxyz9"
-Tap*=modify
-Tap#=shift
-[LocaleTextButtons]
-Buttons=23456789
-Tap2[]='abc
-Tap3[]='def
-Tap4[]='ghi
-Tap5[]='jkl
-Tap6[]='mno
-Tap7[]='pqrs
-Tap8[]='tuv
-Tap9[]='wxyz
-[PhoneTextButtons]
-Buttons=*#
-Tap*='*+pw
-Hold*=+
-Tap#='#
-Hold#=mode
-[Device]
-PrimaryInput=Keypad
diff --git a/tools/shared/deviceskin/skins/PDAPhone.qrc b/tools/shared/deviceskin/skins/PDAPhone.qrc
deleted file mode 100644
index 1a1c35a..0000000
--- a/tools/shared/deviceskin/skins/PDAPhone.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="/skins">
- <file>PDAPhone.skin</file>
-</qresource>
-</RCC>
diff --git a/tools/shared/deviceskin/skins/PDAPhone.skin/PDAPhone.skin b/tools/shared/deviceskin/skins/PDAPhone.skin/PDAPhone.skin
deleted file mode 100644
index d6a1966..0000000
--- a/tools/shared/deviceskin/skins/PDAPhone.skin/PDAPhone.skin
+++ /dev/null
@@ -1,18 +0,0 @@
-[SkinFile]
-Up=pda_up.png
-Down=pda_down.png
-Screen=42 59 176 220
-Cursor=finger.png 20 20
-Areas=10
-HasMouseHover=false
-
-"Power" 0x0100000a 117 21 141 42
-"Context1" 0x01100000 43 284 74 315
-"Call" 0x01100004 74 284 104 315
-"Hangup" 0x01100005 154 284 184 315
-"Back" 0x01000061 184 284 214 315
-"Left" 0x1000012 123 315 110 326 106 307 113 288 123 300 120 307
-"Down" 0x1000015 123 315 130 318 138 315 150 326 129 335 111 325
-"Right" 0x1000014 137 301 149 290 155 308 150 324 138 315 140 308
-"Up" 0x1000013 123 300 112 289 130 282 149 290 137 300 130 298
-"Select" 0x01010000 131 298 137 300 140 307 138 315 130 318 123 316 120 307 123 300
diff --git a/tools/shared/deviceskin/skins/PDAPhone.skin/defaultbuttons.conf b/tools/shared/deviceskin/skins/PDAPhone.skin/defaultbuttons.conf
deleted file mode 100644
index e3ae813..0000000
--- a/tools/shared/deviceskin/skins/PDAPhone.skin/defaultbuttons.conf
+++ /dev/null
@@ -1,36 +0,0 @@
-[Translation]
-File=QtopiaDefaults
-Context=Buttons
-[Menu]
-Rows=4
-Columns=3
-Map=123456789*0#
-Default=5
-1=Applications/camera.desktop
-2=Applications/datebook.desktop
-3=Applications
-4=Applications/qtmail.desktop
-5=Applications/addressbook.desktop
-6=Games
-7=Settings/Beaming.desktop
-8=Applications/simapp.desktop,Applications/calculator.desktop
-9=Settings
-*=Applications/mediarecorder.desktop
-0=Applications/todolist.desktop
-#=Documents
-Animator=Bounce
-AnimatorBackground=Radial
-[SoftKeys]
-Count=3
-Key0=Context1
-Key1=Select
-Key2=Back
-[SystemButtons]
-Count=5
-Key0=Context1
-Key1=Back
-Key2=Select
-Key3=Call
-Key4=Hangup
-[Device]
-PrimaryInput=Touchscreen
diff --git a/tools/shared/deviceskin/skins/PDAPhone.skin/finger.png b/tools/shared/deviceskin/skins/PDAPhone.skin/finger.png
deleted file mode 100644
index 24cf0cb..0000000
--- a/tools/shared/deviceskin/skins/PDAPhone.skin/finger.png
+++ /dev/null
Binary files differ
diff --git a/tools/shared/deviceskin/skins/PDAPhone.skin/pda_down.png b/tools/shared/deviceskin/skins/PDAPhone.skin/pda_down.png
deleted file mode 100644
index f65c059..0000000
--- a/tools/shared/deviceskin/skins/PDAPhone.skin/pda_down.png
+++ /dev/null
Binary files differ
diff --git a/tools/shared/deviceskin/skins/PDAPhone.skin/pda_up.png b/tools/shared/deviceskin/skins/PDAPhone.skin/pda_up.png
deleted file mode 100644
index 541e3c4..0000000
--- a/tools/shared/deviceskin/skins/PDAPhone.skin/pda_up.png
+++ /dev/null
Binary files differ
diff --git a/tools/shared/deviceskin/skins/Trolltech-Keypad.qrc b/tools/shared/deviceskin/skins/Trolltech-Keypad.qrc
deleted file mode 100644
index 4775068..0000000
--- a/tools/shared/deviceskin/skins/Trolltech-Keypad.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="/skins">
- <file>Trolltech-Keypad.skin</file>
-</qresource>
-</RCC>
diff --git a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-closed.png b/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-closed.png
deleted file mode 100644
index 8dd5719..0000000
--- a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-closed.png
+++ /dev/null
Binary files differ
diff --git a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-down.png b/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-down.png
deleted file mode 100644
index 5e1e6be..0000000
--- a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad-down.png
+++ /dev/null
Binary files differ
diff --git a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.png b/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.png
deleted file mode 100644
index fb3d549..0000000
--- a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.png
+++ /dev/null
Binary files differ
diff --git a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.skin b/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.skin
deleted file mode 100644
index 4d90321..0000000
--- a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/Trolltech-Keypad.skin
+++ /dev/null
@@ -1,35 +0,0 @@
-[SkinFile]
-Up=Trolltech-Keypad.png
-Down=Trolltech-Keypad-down.png
-Closed=Trolltech-Keypad-closed.png
-ClosedAreas=F1 F2 F3 Flip
-ClosedScreen=95 456 128 96
-Screen=75 85 176 220
-Areas=25
-HasMouseHover=false
-"1" 0x0031 65 542 68 536 76 532 114 536 114 573 64 568
-"2" 0x0032 133 537 188 574
-"3" 0x0033 206 536 246 532 252 536 256 542 258 569 205 572
-"4" 0x0034 64 578 114 618
-"5" 0x0035 133 581 188 618
-"6" 0x0036 206 580 256 577 258 613 206 616
-"7" 0x0037 66 622 116 625 114 662 66 658
-"8" 0x0038 133 626 188 662
-"9" 0x0039 206 625 256 622 256 658 206 661
-"*" 0x002a 68 667 116 670 114 705 86 699 76 693 69 686
-"0" 0x0030 133 671 188 708
-"#" 0x0023 206 670 254 665 254 684 245 692 232 699 206 704
-"Context1" 0x01100000 69 420 75 410 85 404 101 404 102 458 69 458
-"Back" 0x01000061 218 404 234 404 240 408 248 418 248 456 218 457
-"Home" 0x1000010 140 494 180 514
-"Hangup" 0x01100005 218 457 248 456 248 496 243 507 230 514 194 514 194 494 206 492 213 486 218 478
-"Call" 0x01100004 68 458 102 460 102 479 108 487 118 492 126 494 126 514 86 514 77 507 72 496
-"Select" 0x01010000 138 426 182 458
-"Up" 0x1000013 118 406 201 402 184 423 134 422
-"Right" 0x1000014 184 424 201 402 202 476 184 460
-"Down" 0x1000015 135 462 184 461 199 477 118 477
-"Left" 0x1000012 118 406 134 424 134 461 117 476
-"F1" 0x1000030 0 408 45 456
-"F2" 0x1000031 0 456 45 509
-"F3" 0x1000032 0 545 45 582
-"Flip" 0x1100006 32 353 293 386
diff --git a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/defaultbuttons.conf b/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/defaultbuttons.conf
deleted file mode 100644
index 6a78e67..0000000
--- a/tools/shared/deviceskin/skins/Trolltech-Keypad.skin/defaultbuttons.conf
+++ /dev/null
@@ -1,142 +0,0 @@
-[Translation]
-File=QtopiaDefaults
-Context=Buttons
-[Button]
-Count=8
-[Button7]
-Name[]=Home Down Button
-Key=Down
-Context=HomeScreen
-PressedActionMappable=0
-HeldActionService=Messaging
-HeldActionMessage=raise()
-[Button6]
-Name[]=Home Up Button
-Key=Up
-Context=HomeScreen
-PressedActionMappable=0
-HeldActionService=Contacts
-HeldActionMessage=raise()
-[Button5]
-Name[]=Home Right Button
-Key=Right
-Context=HomeScreen
-PressedActionMappable=0
-HeldActionService=mediaplayer
-HeldActionMessage=raise()
-[Button4]
-Name[]=Calender Button
-Key=Left
-Context=HomeScreen
-PressedActionMappable=0
-HeldActionService=Calendar
-HeldActionMessage=raiseToday()
-[Button3]
-Name[]=Left Soft Key
-Key=Context1
-HeldActionService=TaskManager
-HeldActionMessage=showRunningTasks()
-HeldActionMappable=0
-PressActionMappable=0
-[Button2]
-Name[]=VoiceNotes Button
-Key=F1
-PressedActionService=mediarecorder
-PressedActionMessage=raise()
-HeldActionService=mediarecorder
-HeldActionMessage=newEvent()
-[Button1]
-Name[]=Camera Button
-Key=F2
-PressedActionService=Camera
-PressedActionMessage=raise()
-HeldActionService=Tasks
-HeldActionMessage=newTask()
-[Button0]
-Name[]=Home Button
-Key=Home
-PressedActionMappable=0
-PressedActionService=TaskManager
-PressedActionMessage=multitask()
-HeldActionMappable=0
-HeldActionService=TaskManager
-HeldActionMessage=showRunningTasks()
-[Menu]
-Rows=4
-Columns=3
-Map=123456789*0#
-Default=5
-1=Applications/camera.desktop
-2=Applications/mediaplayer.desktop
-3=Applications/simapp.desktop,Applications/calculator.desktop
-4=Applications/qtmail.desktop
-5=Applications/addressbook.desktop
-6=Applications/datebook.desktop
-7=Games
-8=Settings/Beaming.desktop
-9=Applications/todolist.desktop
-*=Settings
-0=Applications
-#=Documents
-Animator=Bounce
-AnimatorBackground=Radial
-[SoftKeys]
-Count=3
-Key0=Context1
-Key1=Select
-Key2=Back
-[SystemButtons]
-Count=6
-Key0=Context1
-Key1=Select
-Key2=Back
-Key3=Call
-Key4=Hangup
-Key5=Flip
-[TextButtons]
-Buttons=0123456789*#
-Hold0='0
-Hold1='1
-Hold2='2
-Hold3='3
-Hold4='4
-Hold5='5
-Hold6='6
-Hold7='7
-Hold8='8
-Hold9='9
-Hold*=symbol
-Hold#=mode
-Tap0=space
-Tap0=space
-Tap1="\".,'?!-@:1"
-Tap2="\"a\xe4\xe5\xe6\xe0\xe1\xe2\x62\x63\xe7\x32"
-Tap3="\"de\xe8\xe9\xea\x66\x33"
-Tap4="\"ghi\xec\xed\xee\x34"
-Tap5="\"jkl5"
-Tap6="\"mn\xf1o\xf6\xf8\xf2\xf3\x36"
-Tap7="\"pqrs\xdf\x37"
-Tap8="\"tu\xfc\xf9\xfav8"
-Tap9="\"wxyz9"
-Tap*=modify
-Tap#=shift
-[LocaleTextButtons]
-Buttons=23456789
-Tap2[]='abc
-Tap3[]='def
-Tap4[]='ghi
-Tap5[]='jkl
-Tap6[]='mno
-Tap7[]='pqrs
-Tap8[]='tuv
-Tap9[]='wxyz
-[PhoneTextButtons]
-Buttons=*#
-Tap*='*+pw
-Hold*=+
-Tap#='#
-Hold#=mode
-[Device]
-PrimaryInput=Keypad
-[Environment]
-QWS_DISPLAY=Multi: LinuxFb:mmHeight57:0 LinuxFb:offset=0,320:1 :0
diff --git a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.qrc b/tools/shared/deviceskin/skins/Trolltech-Touchscreen.qrc
deleted file mode 100644
index 40fafeb..0000000
--- a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="/skins">
- <file>Trolltech-Touchscreen.skin</file>
-</qresource>
-</RCC>
diff --git a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen-down.png b/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen-down.png
deleted file mode 100644
index c1a422f..0000000
--- a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen-down.png
+++ /dev/null
Binary files differ
diff --git a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.png b/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.png
deleted file mode 100644
index 544a425..0000000
--- a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.png
+++ /dev/null
Binary files differ
diff --git a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.skin b/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.skin
deleted file mode 100644
index 5de882e..0000000
--- a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/Trolltech-Touchscreen.skin
+++ /dev/null
@@ -1,17 +0,0 @@
-[SkinFile]
-Up=Trolltech-Touchscreen.png
-Down=Trolltech-Touchscreen-down.png
-Screen=40 109 176 220
-Areas=10
-HasMouseHover=false
-
-"Context1" 0x01100000 38 420 44 408 52 404 68 403 68 458 40 458
-"Back" 0x01000061 185 42 202 398 211 410 216 418 219 456 186 456
-"Call" 0x01100004 38 458 70 458 71 478 75 486 83 492 94 494 94 516 56 516 45 507 38 498
-"Hangup" 0x01100005 186 458 220 458 220 496 214 508 200 516 162 516 161 494 172 492 180 486 185 478
-"Left" 0x1000012 86 405 106 426 106 461 85 478
-"Down" 0x1000015 106 460 151 460 170 480 85 480
-"Right" 0x1000014 151 424 170 404 170 480 151 460
-"Up" 0x1000013 85 403 168 403 150 424 106 424
-"Select" 0x01010000 106 426 150 456
-"Home" 0x1000010 105 493 145 512
diff --git a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/defaultbuttons.conf b/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/defaultbuttons.conf
deleted file mode 100644
index 6665125..0000000
--- a/tools/shared/deviceskin/skins/Trolltech-Touchscreen.skin/defaultbuttons.conf
+++ /dev/null
@@ -1,53 +0,0 @@
-[Translation]
-File=QtopiaDefaults
-Context=Buttons
-[Menu]
-Rows=4
-Columns=3
-Map=123456789*0#
-Default=5
-1=Applications/camera.desktop
-2=Applications/mediaplayer.desktop
-3=Applications/simapp.desktop,Applications/calculator.desktop
-4=Applications/qtmail.desktop
-5=Applications/addressbook.desktop
-6=Applications/datebook.desktop
-7=Games
-8=Settings/beaming.desktop
-9=Applications/todolist.desktop
-*=Settings
-0=Applications
-#=Documents
-Animator=Bounce
-AnimatorBackground=Radial
-[SoftKeys]
-Count=3
-Key0=Context1
-Key1=Select
-Key2=Back
-[SystemButtons]
-Count=5
-Key0=Context1
-Key1=Back
-Key2=Select
-Key3=Call
-Key4=Hangup
-[Device]
-PrimaryInput=Touchscreen
-[Button]
-Count=2
-[Button0]
-Name[]=Home Button
-Key=Home
-PressedActionMappable=0
-PressedActionService=TaskManager
-PressedActionMessage=multitask()
-HeldActionMappable=0
-HeldActionService=TaskManager
-HeldActionMessage=showRunningTasks()
-[Button1]
-Name=Power Button
-Key=Hangup
-HeldActionService=Launcher
-HeldActionMessage=execute(QString)
-HeldActionArgs=@ByteArray(\0\0\0\x1\0\0\0\n\0\0\0\0\x10\0s\0h\0u\0t\0\x64\0o\0w\0n)
diff --git a/tools/shared/symbian/epocroot.cpp b/tools/shared/symbian/epocroot.cpp
index 071477d..064e056 100644
--- a/tools/shared/symbian/epocroot.cpp
+++ b/tools/shared/symbian/epocroot.cpp
@@ -153,10 +153,13 @@ QString epocRoot()
while (!(xml.isEndElement() && xml.name() == "devices") && !xml.atEnd()) {
xml.readNext();
if (xml.isStartElement() && xml.name() == "device") {
- const bool isDefault = xml.attributes().value("default") == "yes";
+ const bool isDefault = xml.attributes().value("default") == "yes";
const QString id = xml.attributes().value("id").toString();
- const QString name = xml.attributes().value("name").toString();
- const bool epocDeviceMatch = (id + ":" + name) == epocDeviceValue;
+ const QString name = xml.attributes().value("name").toString();
+ const QString alias = xml.attributes().value("alias").toString();
+ bool epocDeviceMatch = (id + ":" + name) == epocDeviceValue;
+ if (!alias.isEmpty())
+ epocDeviceMatch |= alias == epocDeviceValue;
epocDeviceFound |= epocDeviceMatch;
if((epocDeviceValue.isEmpty() && isDefault) || epocDeviceMatch) {
diff --git a/translations/assistant_pl.ts b/translations/assistant_pl.ts
index 0ef3251..c8c4e5f 100644
--- a/translations/assistant_pl.ts
+++ b/translations/assistant_pl.ts
@@ -4,7 +4,7 @@
<context>
<name>AboutDialog</name>
<message>
- <location filename="../tools/assistant/tools/assistant/aboutdialog.cpp" line="+110"/>
+ <location filename="../tools/assistant/tools/assistant/aboutdialog.cpp" line="+117"/>
<source>&amp;Close</source>
<translation>Za&amp;mknij</translation>
</message>
@@ -12,7 +12,7 @@
<context>
<name>AboutLabel</name>
<message>
- <location line="-14"/>
+ <location line="-15"/>
<source>Warning</source>
<translation>Ostrzeżenie</translation>
</message>
@@ -23,23 +23,83 @@
<translation>Nie można uruchomić zewnętrznej aplikacji.</translation>
</message>
<message>
- <location line="+1"/>
+ <location line="+0"/>
<source>OK</source>
<translation>OK</translation>
</message>
</context>
<context>
- <name>BookmarkDialog</name>
+ <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 filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="+184"/>
- <location line="+18"/>
<location line="+39"/>
- <location line="+18"/>
- <location line="+30"/>
- <source>Bookmarks</source>
- <translation>Zakładki</translation>
+ <source>Error: %1</source>
+ <translation>Błąd: %1</translation>
</message>
<message>
+ <location line="+42"/>
+ <source>Could not register documentation file
+%1
+
+Reason:
+%2</source>
+ <translation>Nie można zarejestrować pliku z dokumentacją
+%1
+
+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
+
+Reason:
+%2</source>
+ <translation>Nie można wyrejestrować pliku z dokumentacją
+%1
+
+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>
+ </message>
+ <message>
+ <location line="+53"/>
+ <source>Cannot load sqlite database driver!</source>
+ <translation>Nie można załadować sterownika bazy danych sqlite!</translation>
+ </message>
+</context>
+<context>
+ <name>BookmarkDialog</name>
+ <message>
<location filename="../tools/assistant/tools/assistant/bookmarkdialog.ui"/>
<source>Add Bookmark</source>
<translation>Dodaj zakładkę</translation>
@@ -64,26 +124,16 @@
<source>New Folder</source>
<translation>Nowy katalog</translation>
</message>
- <message>
- <location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="-61"/>
- <source>Delete Folder</source>
- <translation>Usuń katalog</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Rename Folder</source>
- <translation>Zmień nazwę katalogu</translation>
- </message>
</context>
<context>
<name>BookmarkManager</name>
<message>
- <location line="+435"/>
- <source>Bookmarks</source>
- <translation>Zakładki</translation>
+ <location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="+151"/>
+ <source>Untitled</source>
+ <translation>Nienazwany</translation>
</message>
<message>
- <location line="+37"/>
+ <location line="+65"/>
<source>Remove</source>
<translation>Usuń</translation>
</message>
@@ -93,26 +143,22 @@
<translation>Zamierzasz usunąć katalog co spowoduje również usunięcie jego zawartości. Czy chcesz kontynuować?</translation>
</message>
<message>
- <location line="+143"/>
- <location line="+9"/>
- <source>New Folder</source>
- <translation>Nowy katalog</translation>
+ <location line="+147"/>
+ <source>Manage Bookmarks...</source>
+ <translation>Zarządzanie zakładkami...</translation>
</message>
-</context>
-<context>
- <name>BookmarkWidget</name>
<message>
- <location line="-417"/>
- <source>Filter:</source>
- <translation>Filtr:</translation>
+ <location line="+3"/>
+ <source>Add Bookmark...</source>
+ <translation>Dodaj zakładkę...</translation>
</message>
<message>
- <location line="+33"/>
- <source>Remove</source>
- <translation>Usuń</translation>
+ <location line="+1"/>
+ <source>Ctrl+D</source>
+ <translation>Ctrl+D</translation>
</message>
<message>
- <location line="-79"/>
+ <location line="+68"/>
<source>Delete Folder</source>
<translation>Usuń katalog</translation>
</message>
@@ -132,7 +178,7 @@
<translation>Pokaż zakładkę w nowej karcie</translation>
</message>
<message>
- <location line="+3"/>
+ <location line="+2"/>
<source>Delete Bookmark</source>
<translation>Usuń zakładkę</translation>
</message>
@@ -141,16 +187,11 @@
<source>Rename Bookmark</source>
<translation>Zmień nazwę zakładki</translation>
</message>
- <message>
- <location line="+62"/>
- <source>Add</source>
- <translation>Dodaj</translation>
- </message>
</context>
<context>
<name>CentralWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+239"/>
+ <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+121"/>
<source>Add new page</source>
<translation>Dodaj nową stronę</translation>
</message>
@@ -160,18 +201,18 @@
<translation>Zamknij bieżącą stronę</translation>
</message>
<message>
- <location line="+312"/>
+ <location line="+287"/>
<source>Print Document</source>
<translation>Wydrukuj dokument</translation>
</message>
<message>
- <location line="+130"/>
+ <location line="+126"/>
<location line="+2"/>
<source>unknown</source>
<translation>nieznany</translation>
</message>
<message>
- <location line="+93"/>
+ <location line="+101"/>
<source>Add New Page</source>
<translation>Dodaj nową stronę</translation>
</message>
@@ -191,15 +232,78 @@
<translation>Dodaj zakładkę dla tej strony...</translation>
</message>
<message>
- <location line="+235"/>
+ <location line="+264"/>
<source>Search</source>
<translation>Wyszukaj</translation>
</message>
</context>
<context>
+ <name>CmdLineParser</name>
+ <message>
+ <location filename="../tools/assistant/tools/assistant/cmdlineparser.cpp" line="+137"/>
+ <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>
+</context>
+<context>
<name>ContentWindow</name>
<message>
- <location filename="../tools/assistant/tools/assistant/contentwindow.cpp" line="+158"/>
+ <location filename="../tools/assistant/tools/assistant/contentwindow.cpp" line="+173"/>
<source>Open Link</source>
<translation>Otwórz odsyłacz</translation>
</message>
@@ -223,34 +327,6 @@
</message>
</context>
<context>
- <name>FindWidget</name>
- <message>
- <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="-918"/>
- <source>Previous</source>
- <translation>Poprzedni</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Next</source>
- <translation>Następny</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Case Sensitive</source>
- <translation>Uwzględniaj wielkość liter</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Whole words</source>
- <translation>Tylko całe słowa</translation>
- </message>
- <message>
- <location line="+12"/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Szukanie od początku</translation>
- </message>
-</context>
-<context>
<name>FontPanel</name>
<message>
<location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
@@ -281,52 +357,25 @@
<context>
<name>HelpViewer</name>
<message>
- <location filename="../tools/assistant/tools/assistant/helpviewer.cpp" line="+489"/>
- <source>Help</source>
- <translation>Pomoc</translation>
+ <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="+1"/>
- <source>OK</source>
- <translation>OK</translation>
- </message>
- <message>
- <location line="-62"/>
+ <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 line="+125"/>
- <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 line="-275"/>
- <source>Open Link in New Tab</source>
- <translation>Otwórz odsyłacz w nowej karcie</translation>
- </message>
- <message>
- <location line="+209"/>
- <source>Unable to launch external application.
-</source>
- <translation>Nie można uruchomić zewnętrznej aplikacji.
-</translation>
- </message>
</context>
<context>
<name>IndexWindow</name>
<message>
- <location filename="../tools/assistant/tools/assistant/indexwindow.cpp" line="+66"/>
+ <location filename="../tools/assistant/tools/assistant/indexwindow.cpp" line="+68"/>
<source>&amp;Look for:</source>
<translation>Wy&amp;szukaj:</translation>
</message>
<message>
- <location line="+72"/>
+ <location line="+74"/>
<source>Open Link</source>
<translation>Otwórz odsyłacz</translation>
</message>
@@ -340,29 +389,29 @@
<name>InstallDialog</name>
<message>
<location filename="../tools/assistant/tools/assistant/installdialog.ui"/>
- <location filename="../tools/assistant/tools/assistant/installdialog.cpp" line="+76"/>
+ <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="+30"/>
+ <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="+48"/>
+ <location line="+51"/>
<source>Download canceled.</source>
<translation>Anulowano pobieranie.</translation>
</message>
<message>
- <location line="+26"/>
- <location line="+78"/>
+ <location line="+28"/>
+ <location line="+79"/>
<location line="+27"/>
<source>Done.</source>
<translation>Zrobione.</translation>
</message>
<message>
- <location line="-90"/>
+ <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>
@@ -377,14 +426,14 @@
<translation>Pobieranie %1...</translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+20"/>
<location line="+42"/>
- <location line="+38"/>
+ <location line="+40"/>
<source>Download failed: %1.</source>
<translation>Pobieranie nie powiodło się: %1.</translation>
</message>
<message>
- <location line="-70"/>
+ <location line="-72"/>
<source>Documentation info file is corrupt!</source>
<translation>Plik z informacjami o dokumentacji jest uszkodzony!</translation>
</message>
@@ -399,7 +448,7 @@
<translation>Instalowanie dokumentacji %1...</translation>
</message>
<message>
- <location line="+22"/>
+ <location line="+23"/>
<source>Error while installing documentation:
%1</source>
<translation>Błąd podczas instalowania dokumentacji:
@@ -439,20 +488,20 @@
<context>
<name>MainWindow</name>
<message>
- <location filename="../tools/assistant/tools/assistant/mainwindow.cpp" line="+110"/>
- <location line="+383"/>
+ <location filename="../tools/assistant/tools/assistant/mainwindow.cpp" line="+123"/>
+ <location line="+369"/>
<source>Index</source>
<translation>Indeks</translation>
</message>
<message>
- <location line="-377"/>
- <location line="+375"/>
+ <location line="-363"/>
+ <location line="+361"/>
<source>Contents</source>
<translation>Spis treści</translation>
</message>
<message>
- <location line="-370"/>
- <location line="+374"/>
+ <location line="-354"/>
+ <location line="+358"/>
<source>Bookmarks</source>
<translation>Zakładki</translation>
</message>
@@ -462,20 +511,14 @@
<translation>Wyszukaj</translation>
</message>
<message>
- <location line="-364"/>
- <location line="+207"/>
- <location line="+514"/>
+ <location line="-338"/>
+ <location line="+680"/>
+ <location line="+284"/>
<source>Qt Assistant</source>
<translation>Qt Assistant</translation>
</message>
<message>
- <location line="-546"/>
- <location line="+5"/>
- <source>Unfiltered</source>
- <translation>Nieprzefiltrowany</translation>
- </message>
- <message>
- <location line="+107"/>
+ <location line="-705"/>
<source>Page Set&amp;up...</source>
<translation>&amp;Ustawienia strony...</translation>
</message>
@@ -490,22 +533,27 @@
<translation>Wy&amp;drukuj...</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="-10"/>
<source>New &amp;Tab</source>
<translation>Nowa kar&amp;ta</translation>
</message>
<message>
- <location line="+3"/>
+ <location line="+17"/>
<source>&amp;Close Tab</source>
<translation>&amp;Zamknij kartę</translation>
</message>
<message>
- <location line="+4"/>
+ <location line="+5"/>
<source>&amp;Quit</source>
<translation>Za&amp;kończ</translation>
</message>
<message>
- <location line="+5"/>
+ <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>
@@ -615,27 +663,27 @@
<translation></translation>
</message>
<message>
- <location line="+4"/>
- <source>Add Bookmark...</source>
- <translation>Dodaj zakładkę...</translation>
+ <location line="+596"/>
+ <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="+5"/>
+ <location line="-589"/>
<source>About...</source>
<translation>Informacje o programie...</translation>
</message>
<message>
- <location line="+16"/>
+ <location line="+21"/>
<source>Navigation Toolbar</source>
<translation>Pasek do nawigacji</translation>
</message>
<message>
- <location line="+76"/>
+ <location line="+69"/>
<source>Toolbars</source>
<translation>Paski narzędzi</translation>
</message>
<message>
- <location line="+15"/>
+ <location line="+16"/>
<source>Filter Toolbar</source>
<translation>Pasek filtrowania</translation>
</message>
@@ -645,7 +693,7 @@
<translation>Przefiltrowane przez:</translation>
</message>
<message>
- <location line="+25"/>
+ <location line="+26"/>
<source>Address Toolbar</source>
<translation>Pasek adresu</translation>
</message>
@@ -655,27 +703,27 @@
<translation>Adres:</translation>
</message>
<message>
- <location line="+114"/>
+ <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="+71"/>
+ <location line="+60"/>
<source>About %1</source>
<translation>Informacje o %1</translation>
</message>
<message>
- <location line="+114"/>
+ <location line="+175"/>
<source>Updating search index</source>
<translation>Uaktualnianie indeksu wyszukiwawczego</translation>
</message>
<message>
- <location line="-640"/>
+ <location line="-669"/>
<source>Looking for Qt Documentation...</source>
<translation>Szukanie dokumentacji Qt...</translation>
</message>
<message>
- <location line="+241"/>
+ <location line="+227"/>
<source>&amp;Window</source>
<translation>&amp;Okno</translation>
</message>
@@ -695,12 +743,12 @@
<translation>Powiększenie</translation>
</message>
<message>
- <location line="-159"/>
+ <location line="-169"/>
<source>&amp;File</source>
<translation>&amp;Plik</translation>
</message>
<message>
- <location line="+25"/>
+ <location line="+32"/>
<source>&amp;Edit</source>
<translation>&amp;Edycja</translation>
</message>
@@ -720,41 +768,36 @@
<translation>ALT+Home</translation>
</message>
<message>
- <location line="+29"/>
+ <location line="+30"/>
<source>&amp;Bookmarks</source>
<translation>&amp;Zakładki</translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+2"/>
<source>&amp;Help</source>
<translation>&amp;Pomoc</translation>
</message>
<message>
- <location line="-40"/>
+ <location line="-38"/>
<source>ALT+O</source>
<translation>ALT+O</translation>
</message>
- <message>
- <location line="+38"/>
- <source>CTRL+D</source>
- <translation>CTRL+D</translation>
- </message>
</context>
<context>
<name>PreferencesDialog</name>
<message>
- <location filename="../tools/assistant/tools/assistant/preferencesdialog.cpp" line="+259"/>
- <location line="+43"/>
+ <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="-43"/>
+ <location line="-44"/>
<source>Qt Compressed Help Files (*.qch)</source>
<translation>Skompresowane pliki pomocy Qt (*.qch)</translation>
</message>
<message>
- <location line="+37"/>
+ <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>
@@ -764,7 +807,7 @@
<translation>Przestrzeń nazw %1 jest już zarejestrowana!</translation>
</message>
<message>
- <location line="+31"/>
+ <location line="+32"/>
<source>Remove Documentation</source>
<translation>Usuń dokumentację</translation>
</message>
@@ -784,7 +827,7 @@
<translation>OK</translation>
</message>
<message>
- <location line="+88"/>
+ <location line="+83"/>
<source>Use custom settings</source>
<translation>Użyj własnych ustawień</translation>
</message>
@@ -908,120 +951,9 @@
</message>
</context>
<context>
- <name>QObject</name>
- <message>
- <location filename="../tools/assistant/tools/assistant/cmdlineparser.cpp" line="+112"/>
- <source>The specified collection file does not exist!</source>
- <translation>Podany plik z kolekcją nie istnieje!</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Missing collection file!</source>
- <translation>Brak pliku z kolekcją!</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Invalid URL!</source>
- <translation>Niepoprawny URL!</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Missing URL!</source>
- <translation>Brak URL!</translation>
- </message>
- <message>
- <location line="+17"/>
- <location line="+19"/>
- <location line="+19"/>
- <source>Unknown widget: %1</source>
- <translation>Nieznany widżet: %1</translation>
- </message>
- <message>
- <location line="-34"/>
- <location line="+19"/>
- <location line="+19"/>
- <source>Missing widget!</source>
- <translation>Brak widżetu!</translation>
- </message>
- <message>
- <location line="+7"/>
- <location line="+12"/>
- <source>The specified Qt help file does not exist!</source>
- <translation>Podany plik pomocy Qt nie istnieje!</translation>
- </message>
- <message>
- <location line="-7"/>
- <location line="+12"/>
- <source>Missing help file!</source>
- <translation>Brak pliku pomocy!</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Missing filter argument!</source>
- <translation>Brak argumentu filtra!</translation>
- </message>
- <message>
- <location line="+12"/>
- <source>Unknown option: %1</source>
- <translation>Nieznana opcja: %1</translation>
- </message>
- <message>
- <location line="+30"/>
- <location line="+2"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location filename="../tools/assistant/tools/assistant/main.cpp" line="+228"/>
- <source>Could not register documentation file
-%1
-
-Reason:
-%2</source>
- <translation>Nie można zarejestrować pliku z dokumentacją
-%1
-
-Powód:
-%2</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Documentation successfully registered.</source>
- <translation>Dokumentacja poprawnie zarejestrowana.</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>Could not unregister documentation file
-%1
-
-Reason:
-%2</source>
- <translation>Nie można wyrejestrować pliku z dokumentacją
-%1
-
-Powód:
-%2</translation>
- </message>
- <message>
- <location line="-3"/>
- <source>Documentation successfully unregistered.</source>
- <translation>Dokumentacja poprawnie wyrejestrowana.</translation>
- </message>
- <message>
- <location line="+40"/>
- <source>Cannot load sqlite database driver!</source>
- <translation>Nie można odczytać sterownika bazy danych sqlite!</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The specified collection file could not be read!</source>
- <translation>Podany plik z kolekcją nie może być odczytany!</translation>
- </message>
-</context>
-<context>
<name>RemoteControl</name>
<message>
- <location filename="../tools/assistant/tools/assistant/remotecontrol.cpp" line="+163"/>
+ <location filename="../tools/assistant/tools/assistant/remotecontrol.cpp" line="+165"/>
<source>Debugging Remote Control</source>
<translation>Zdalne debugowanie</translation>
</message>
@@ -1034,7 +966,7 @@ Powód:
<context>
<name>SearchWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/searchwidget.cpp" line="+196"/>
+ <location filename="../tools/assistant/tools/assistant/searchwidget.cpp" line="+210"/>
<source>&amp;Copy</source>
<translation>S&amp;kopiuj</translation>
</message>
@@ -1057,7 +989,7 @@ Powód:
<context>
<name>TopicChooser</name>
<message>
- <location filename="../tools/assistant/tools/assistant/topicchooser.cpp" line="+54"/>
+ <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>
diff --git a/translations/designer_pl.ts b/translations/designer_pl.ts
index 3b998ba..0298a27 100644
--- a/translations/designer_pl.ts
+++ b/translations/designer_pl.ts
@@ -255,7 +255,7 @@
<translation>Linie krzyżujące się</translation>
</message>
<message>
- <location line="+83"/>
+ <location line="+93"/>
<source>Style</source>
<translation>Styl</translation>
</message>
@@ -506,7 +506,7 @@
<translation>Usuń pasek narzędzi</translation>
</message>
<message>
- <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="+1195"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="+1194"/>
<source>Set action text</source>
<translation>Ustaw tekst akcji</translation>
</message>
@@ -621,7 +621,7 @@
<translation>Zmień skrypt</translation>
</message>
<message>
- <location filename="../tools/designer/src/lib/shared/qdesigner_propertycommand.cpp" line="+1213"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_propertycommand.cpp" line="+1225"/>
<source>Changed &apos;%1&apos; of &apos;%2&apos;</source>
<translation>Zmień &apos;%1&apos; w &apos;%2&apos;</translation>
</message>
@@ -635,7 +635,7 @@
</translation>
</message>
<message>
- <location line="+76"/>
+ <location line="+84"/>
<source>Reset &apos;%1&apos; of &apos;%2&apos;</source>
<translation>Przywróć domyślną wartość &apos;%1&apos; w &apos;%2&apos;</translation>
</message>
@@ -742,7 +742,7 @@
<context>
<name>Designer</name>
<message>
- <location filename="../tools/designer/src/components/formeditor/qdesigner_resource.cpp" line="+449"/>
+ <location filename="../tools/designer/src/components/formeditor/qdesigner_resource.cpp" line="+446"/>
<source>Qt Designer</source>
<translation>Qt Designer</translation>
</message>
@@ -1110,7 +1110,7 @@
<context>
<name>FormWindow</name>
<message>
- <location filename="../tools/designer/src/components/formeditor/formwindow.cpp" line="+1701"/>
+ <location filename="../tools/designer/src/components/formeditor/formwindow.cpp" line="+1754"/>
<source>Unexpected element &lt;%1&gt;</source>
<translation>Niespodziewany element &lt;%1&gt;</translation>
</message>
@@ -1203,7 +1203,7 @@
<context>
<name>MainWindowBase</name>
<message>
- <location filename="../tools/designer/src/designer/mainwindow.cpp" line="+119"/>
+ <location filename="../tools/designer/src/designer/mainwindow.cpp" line="+121"/>
<source>Main</source>
<extracomment>Not currently used (main tool bar)</extracomment>
<translation>Główny</translation>
@@ -1582,12 +1582,12 @@ Skrypt: %3</translation>
<context>
<name>QDesignerActions</name>
<message>
- <location filename="../tools/designer/src/designer/qdesigner_actions.cpp" line="+493"/>
+ <location filename="../tools/designer/src/designer/qdesigner_actions.cpp" line="+519"/>
<source>Clear &amp;Menu</source>
<translation>Wyczyść &amp;menu</translation>
</message>
<message>
- <location line="-305"/>
+ <location line="-329"/>
<source>&amp;Quit</source>
<translation>Za&amp;kończ</translation>
</message>
@@ -1597,22 +1597,22 @@ Skrypt: %3</translation>
<translation>Modyfikuj widżety</translation>
</message>
<message>
- <location line="+195"/>
+ <location line="+219"/>
<source>CTRL+R</source>
<translation>CTRL+R</translation>
</message>
<message>
- <location line="-182"/>
+ <location line="-206"/>
<source>&amp;Minimize</source>
<translation>&amp;Zminimalizuj</translation>
</message>
<message>
- <location line="+200"/>
+ <location line="+224"/>
<source>CTRL+M</source>
<translation>CTRL+M</translation>
</message>
<message>
- <location line="-198"/>
+ <location line="-222"/>
<source>Bring All to Front</source>
<translation>Wszystkie na wierzch</translation>
</message>
@@ -1622,7 +1622,7 @@ Skrypt: %3</translation>
<translation>Dodatkowe czcionki...</translation>
</message>
<message>
- <location line="+226"/>
+ <location line="+250"/>
<source>Qt Designer &amp;Help</source>
<translation>Pomo&amp;c Qt Designer</translation>
</message>
@@ -1694,41 +1694,41 @@ Czy chcesz spróbować ponownie lub zmienić nazwę pliku?</translation>
<translation>Wybierz nowy plik</translation>
</message>
<message>
- <location line="-699"/>
+ <location line="-723"/>
<source>%1 already exists.
Do you want to replace it?</source>
<translation>%1 już istnieje.
Czy chcesz go zastąpić?</translation>
</message>
<message>
- <location line="+930"/>
+ <location line="+954"/>
<source>&amp;Close Preview</source>
<translation>Za&amp;mknij podgląd</translation>
</message>
<message>
- <location line="-889"/>
+ <location line="-913"/>
<source>Preferences...</source>
<translation>Ustawienia...</translation>
</message>
<message>
- <location line="+65"/>
+ <location line="+75"/>
<source>CTRL+SHIFT+S</source>
<translation>CTRL+SHIFT+S</translation>
</message>
<message>
- <location line="+317"/>
+ <location line="+331"/>
<location line="+37"/>
<location line="+160"/>
<source>Designer UI files (*.%1);;All Files (*)</source>
<translation>Pliki Designer UI (*.%1);;Wszystkie pliki (*)</translation>
</message>
<message>
- <location line="-646"/>
+ <location line="-670"/>
<source>Saved %1.</source>
<translation>Formularz %1 zachowany pomyślnie.</translation>
</message>
<message>
- <location line="+632"/>
+ <location line="+656"/>
<source>Read error</source>
<translation>Błąd odczytu</translation>
</message>
@@ -1760,7 +1760,7 @@ Czy chcesz zaktualizować położenie pliku lub wygenerować nowy formularz?</tr
<translation>Nie można zapisać pliku</translation>
</message>
<message>
- <location line="-704"/>
+ <location line="-728"/>
<source>&amp;New...</source>
<translation>&amp;Nowy...</translation>
</message>
@@ -1791,12 +1791,12 @@ Czy chcesz zaktualizować położenie pliku lub wygenerować nowy formularz?</tr
</message>
<message>
<location line="+1"/>
- <location line="+901"/>
+ <location line="+925"/>
<source>&amp;Close</source>
<translation>Za&amp;mknij</translation>
</message>
<message>
- <location line="-900"/>
+ <location line="-924"/>
<source>Save &amp;Image...</source>
<translation>Zachowaj o&amp;brazek...</translation>
</message>
@@ -1811,7 +1811,7 @@ Czy chcesz zaktualizować położenie pliku lub wygenerować nowy formularz?</tr
<translation>Pokaż &amp;kod...</translation>
</message>
<message>
- <location line="+424"/>
+ <location line="+448"/>
<location line="+248"/>
<source>Save Form As</source>
<translation>Zachowaj formularz jako</translation>
@@ -1889,7 +1889,7 @@ Czy chcesz spróbować ponownie?</translation>
<translation>Wydrukowano %1.</translation>
</message>
<message>
- <location line="-1149"/>
+ <location line="-1163"/>
<source>ALT+CTRL+S</source>
<translation>ALT+CTRL+S</translation>
</message>
@@ -1988,7 +1988,7 @@ Czy chcesz spróbować ponownie?</translation>
<context>
<name>QDesignerMenu</name>
<message>
- <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="-1181"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_menu.cpp" line="-1179"/>
<source>Type Here</source>
<translation>Wpisz tutaj</translation>
</message>
@@ -2003,18 +2003,18 @@ Czy chcesz spróbować ponownie?</translation>
<translation>Usuń akcję &apos;%1&apos;</translation>
</message>
<message>
- <location line="+327"/>
+ <location line="+325"/>
<source>Insert action</source>
<translation>Wstaw akcję</translation>
</message>
<message>
- <location line="-302"/>
- <location line="+650"/>
+ <location line="-300"/>
+ <location line="+648"/>
<source>Add separator</source>
<translation>Dodaj separator</translation>
</message>
<message>
- <location line="-682"/>
+ <location line="-680"/>
<source>Insert separator</source>
<translation>Wstaw separator</translation>
</message>
@@ -2088,7 +2088,7 @@ Czy chcesz spróbować ponownie?</translation>
<context>
<name>QDesignerPropertySheet</name>
<message>
- <location filename="../tools/designer/src/lib/shared/qdesigner_propertysheet.cpp" line="+754"/>
+ <location filename="../tools/designer/src/lib/shared/qdesigner_propertysheet.cpp" line="+758"/>
<source>Dynamic Properties</source>
<translation>Dynamiczne właściwości</translation>
</message>
@@ -2101,14 +2101,14 @@ Czy chcesz spróbować ponownie?</translation>
<translation>Rozmieszczenie typu &apos;%1&apos; nie jest obsługiwane. Będzie ono zastąpione siatką.</translation>
</message>
<message>
- <location line="+243"/>
+ <location line="+239"/>
<source>The container extension of the widget &apos;%1&apos; (%2) returned a widget not managed by Designer &apos;%3&apos; (%4) when queried for page #%5.
Container pages should only be added by specifying them in XML returned by the domXml() method of the custom widget.</source>
<translation>Rozszerzenie pojemnikowe widżetu &quot;%1&quot; (%2) zwróciło widżet który nie jest zarządzany przez Designera &quot;%3&quot; (%4) podczas pytania o stronę #%5.
Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w XML zwróconym przez metodę domXml() w widżecie użytkownika.</translation>
</message>
<message>
- <location line="+599"/>
+ <location line="+545"/>
<source>Unexpected element &lt;%1&gt;</source>
<extracomment>Parsing clipboard contents</extracomment>
<translation>Niespodziewany element &lt;%1&gt;</translation>
@@ -2205,7 +2205,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<translation>Panel widżetów</translation>
</message>
<message>
- <location line="+391"/>
+ <location line="+392"/>
<source>The last session of Designer was not terminated correctly. Backup files were left behind. Do you want to load them?</source>
<translation>Designer nie został poprawnie zamknięty w trakcie ostatniej sesji. Istnieją pliki zapasowe, czy chcesz je otworzyć?</translation>
</message>
@@ -2215,7 +2215,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<translation>Plik &lt;b&gt;%1&lt;/b&gt; nie jest poprawnym plikiem UI Designera.</translation>
</message>
<message>
- <location line="-750"/>
+ <location line="-751"/>
<source>&amp;Window</source>
<translation>&amp;Okno</translation>
</message>
@@ -2235,7 +2235,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<translation>Paski narzędzi</translation>
</message>
<message>
- <location line="+465"/>
+ <location line="+466"/>
<source>Save Forms?</source>
<translation>Zachować formularze?</translation>
</message>
@@ -2317,6 +2317,16 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<source>The property %1 could not be written. The type %2 is not supported yet.</source>
<translation>Nie można zapisać właściwości %1. Typ %2 nie jest jeszcze obsługiwany.</translation>
</message>
+ <message>
+ <location filename="../tools/designer/src/lib/uilib/properties_p.h" line="+132"/>
+ <source>The enumeration-value &apos;%1&apos; is invalid. The default value &apos;%2&apos; will be used instead.</source>
+ <translation>Wartość &quot;%1&quot; typu wyliczeniowego jest niepoprawna. Użyta zostanie domyślna wartość &quot;%2&quot;.</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>The flag-value &apos;%1&apos; is invalid. Zero will be used instead.</source>
+ <translation>Wartość &quot;%1&quot; flagi jest niepoprawna. Użyta zostanie wartość zerowa.</translation>
+ </message>
</context>
<context>
<name>QStackedWidgetEventFilter</name>
@@ -2450,7 +2460,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<context>
<name>QtBoolEdit</name>
<message>
- <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="+226"/>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="+255"/>
<location line="+10"/>
<location line="+25"/>
<source>True</source>
@@ -2466,7 +2476,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<context>
<name>QtBoolPropertyManager</name>
<message>
- <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="+1469"/>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="+1507"/>
<source>True</source>
<translation>Prawda</translation>
</message>
@@ -2479,7 +2489,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<context>
<name>QtCharEdit</name>
<message>
- <location filename="../tools/shared/qtpropertybrowser/qteditorfactory.cpp" line="+1581"/>
+ <location filename="../tools/shared/qtpropertybrowser/qteditorfactory.cpp" line="+1584"/>
<source>Clear Char</source>
<translation>Wyczyść znak</translation>
</message>
@@ -2495,7 +2505,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<context>
<name>QtColorPropertyManager</name>
<message>
- <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="+4743"/>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertymanager.cpp" line="+4718"/>
<source>Red</source>
<translation>Czerwień</translation>
</message>
@@ -2518,7 +2528,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<context>
<name>QtCursorDatabase</name>
<message>
- <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="-202"/>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="-230"/>
<source>Cross</source>
<translation>Krzyż</translation>
</message>
@@ -3066,6 +3076,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<name>QtGradientViewDialog</name>
<message>
<location filename="../tools/shared/qtgradienteditor/qtgradientviewdialog.ui"/>
+ <location filename="../tools/shared/qtgradienteditor/qtgradientviewdialog.h" line="+62"/>
<source>Select Gradient</source>
<translation>Wybierz gradient</translation>
</message>
@@ -3073,7 +3084,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<context>
<name>QtKeySequenceEdit</name>
<message>
- <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="+221"/>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="+249"/>
<source>Clear Shortcut</source>
<translation>Wyczyść skrót</translation>
</message>
@@ -3135,7 +3146,7 @@ Strony pojemników powinny być dodawane jedynie poprzez wyspecyfikowanie ich w
<context>
<name>QtPropertyBrowserUtils</name>
<message>
- <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="-136"/>
+ <location filename="../tools/shared/qtpropertybrowser/qtpropertybrowserutils.cpp" line="-156"/>
<source>[%1, %2, %3] (%4)</source>
<translation>[%1, %2, %3] (%4)</translation>
</message>
@@ -3490,7 +3501,7 @@ jako:
<context>
<name>QtResourceView</name>
<message>
- <location filename="../tools/designer/src/lib/shared/qtresourceview.cpp" line="+566"/>
+ <location filename="../tools/designer/src/lib/shared/qtresourceview.cpp" line="+567"/>
<source>Size: %1 x %2
%3</source>
<translation>Rozmiar: %1 x %2
@@ -3515,7 +3526,7 @@ jako:
<context>
<name>QtResourceViewDialog</name>
<message>
- <location line="+250"/>
+ <location line="+252"/>
<source>Select Resource</source>
<translation>Wybierz zasób</translation>
</message>
@@ -3901,6 +3912,26 @@ Czy chcesz nadpisać szablon?</translation>
</message>
<message>
<location line="+6"/>
+ <source>File</source>
+ <translation>Plik</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Edit</source>
+ <translation>Edycja</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Tools</source>
+ <translation>Narzędzia</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Form</source>
+ <translation>Formularz</translation>
+ </message>
+ <message>
+ <location line="+4"/>
<source>Toolbars</source>
<translation>Paski narzędzi</translation>
</message>
@@ -3908,7 +3939,7 @@ Czy chcesz nadpisać szablon?</translation>
<context>
<name>VersionDialog</name>
<message>
- <location filename="../tools/designer/src/designer/versiondialog.cpp" line="+172"/>
+ <location filename="../tools/designer/src/designer/versiondialog.cpp" line="+171"/>
<source>Qt Designer</source>
<translation>Qt Designer</translation>
</message>
@@ -4027,7 +4058,7 @@ Czy chcesz nadpisać szablon?</translation>
<context>
<name>qdesigner_internal::ActionModel</name>
<message>
- <location filename="../tools/designer/src/lib/shared/actionrepository.cpp" line="+95"/>
+ <location filename="../tools/designer/src/lib/shared/actionrepository.cpp" line="+89"/>
<source>Name</source>
<translation>Nazwa</translation>
</message>
@@ -4694,9 +4725,14 @@ Czy chcesz nadpisać szablon?</translation>
<context>
<name>qdesigner_internal::FilterWidget</name>
<message>
- <location filename="../tools/designer/src/lib/shared/filterwidget.cpp" line="+185"/>
- <source>&lt;Filter&gt;</source>
- <translation>&lt;Filtr&gt;</translation>
+ <location filename="../tools/designer/src/lib/shared/filterwidget.cpp" line="+163"/>
+ <source>Filter</source>
+ <translation>Filtr</translation>
+ </message>
+ <message>
+ <location line="+36"/>
+ <source>Clear text</source>
+ <translation>Wyczyść tekst</translation>
</message>
</context>
<context>
@@ -4723,7 +4759,7 @@ Czy chcesz nadpisać szablon?</translation>
<context>
<name>qdesigner_internal::FormWindow</name>
<message>
- <location filename="../tools/designer/src/components/formeditor/formwindow.cpp" line="-1267"/>
+ <location filename="../tools/designer/src/components/formeditor/formwindow.cpp" line="-1322"/>
<source>Edit contents</source>
<translation>Modyfikuj zawartość</translation>
</message>
@@ -4733,18 +4769,22 @@ Czy chcesz nadpisać szablon?</translation>
<translation>F2</translation>
</message>
<message>
- <location line="+841"/>
+ <location line="+840"/>
<source>Resize</source>
<translation>Zmień rozmiar</translation>
</message>
<message>
- <location line="+218"/>
- <location line="+15"/>
+ <location line="+248"/>
<source>Key Move</source>
<translation>Przeniesienie</translation>
</message>
<message>
- <location line="+270"/>
+ <location line="+0"/>
+ <source>Key Resize</source>
+ <translation>Zmiana rozmiaru</translation>
+ </message>
+ <message>
+ <location line="+311"/>
<source>Cannot paste widgets. Designer could not find a container without a layout to paste into.</source>
<translation>Nie można wkleić widżetów. Nie można było odnaleźć pojemnika bez rozmieszczenia do którego można by wkleić widżety.</translation>
</message>
@@ -4759,18 +4799,18 @@ Czy chcesz nadpisać szablon?</translation>
<translation>Błąd wklejania</translation>
</message>
<message>
- <location line="+445"/>
+ <location line="+448"/>
<source>Lay out</source>
<translation>Rozmieść</translation>
</message>
<message>
- <location line="+493"/>
+ <location line="+485"/>
<location line="+55"/>
<source>Drop widget</source>
<translation>Upuść widżet</translation>
</message>
<message numerus="yes">
- <location line="-1058"/>
+ <location line="-1053"/>
<source>Paste %n action(s)</source>
<translation>
<numerusform>Wklej %n akcję</numerusform>
@@ -4779,12 +4819,12 @@ Czy chcesz nadpisać szablon?</translation>
</translation>
</message>
<message>
- <location line="-511"/>
+ <location line="-565"/>
<source>Insert widget &apos;%1&apos;</source>
<translation>Wstaw widżet &apos;%1</translation>
</message>
<message numerus="yes">
- <location line="+513"/>
+ <location line="+567"/>
<source>Paste %n widget(s)</source>
<translation>
<numerusform>Wklej %n widżet</numerusform>
@@ -4798,17 +4838,17 @@ Czy chcesz nadpisać szablon?</translation>
<translation>Wklej (%1 widżetów, %2 akcji)</translation>
</message>
<message>
- <location line="+466"/>
+ <location line="+464"/>
<source>Select Ancestor</source>
<translation>Wybierz przodka</translation>
</message>
<message>
- <location line="+576"/>
+ <location line="+573"/>
<source>A QMainWindow-based form does not contain a central widget.</source>
<translation>Formularz bazujący na QMainWindow nie zawiera centralnego widżetu.</translation>
</message>
<message>
- <location line="-797"/>
+ <location line="-794"/>
<source>Raise widgets</source>
<translation>Przenieś widżety na wierzch</translation>
</message>
@@ -4821,7 +4861,7 @@ Czy chcesz nadpisać szablon?</translation>
<context>
<name>qdesigner_internal::FormWindowBase</name>
<message>
- <location filename="../tools/designer/src/lib/shared/formwindowbase.cpp" line="+393"/>
+ <location filename="../tools/designer/src/lib/shared/formwindowbase.cpp" line="+404"/>
<source>Delete</source>
<translation>Usuń</translation>
</message>
@@ -4991,7 +5031,7 @@ Czy chcesz nadpisać szablon?</translation>
<translation>Us&amp;tawienia formularza...</translation>
</message>
<message>
- <location line="+92"/>
+ <location line="+94"/>
<source>Break Layout</source>
<translation>Usuń rozmieszczenie</translation>
</message>
@@ -5012,7 +5052,7 @@ Czy chcesz nadpisać szablon?</translation>
<translation>Ustawienia formularza - %1</translation>
</message>
<message>
- <location line="-525"/>
+ <location line="-527"/>
<source>Removes empty columns and rows</source>
<translation>Usuń puste kolumny i wiersze</translation>
</message>
@@ -5971,7 +6011,7 @@ chrząszcz brzmi w trzcinie.</translation>
<context>
<name>qdesigner_internal::PropertyEditor</name>
<message>
- <location filename="../tools/designer/src/components/propertyeditor/propertyeditor.cpp" line="+183"/>
+ <location filename="../tools/designer/src/components/propertyeditor/propertyeditor.cpp" line="+231"/>
<source>Add Dynamic Property...</source>
<translation>Dodaj dynamiczną właściwość ...</translation>
</message>
@@ -6001,19 +6041,19 @@ chrząszcz brzmi w trzcinie.</translation>
<translation>Widok z rozszerzalnymi przyciskami</translation>
</message>
<message>
- <location line="+64"/>
+ <location line="+59"/>
<source>Configure Property Editor</source>
<translation>Skonfiguruj edytor właściwości</translation>
</message>
<message>
- <location line="+533"/>
+ <location line="+539"/>
<source>Object: %1
Class: %2</source>
<translation>Obiekt: %1
Klasa: %2</translation>
</message>
<message>
- <location line="-547"/>
+ <location line="-553"/>
<source>String...</source>
<translation>String...</translation>
</message>
diff --git a/translations/linguist_pl.ts b/translations/linguist_pl.ts
index 4df19c3..a2cf4c9 100644
--- a/translations/linguist_pl.ts
+++ b/translations/linguist_pl.ts
@@ -4,7 +4,7 @@
<context>
<name>AboutDialog</name>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+1364"/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+1366"/>
<source>Qt Linguist</source>
<translation>Qt Linguist</translation>
</message>
@@ -287,7 +287,7 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
<context>
<name>FormMultiWidget</name>
<message>
- <location filename="../tools/linguist/linguist/messageeditorwidgets.cpp" line="+296"/>
+ <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>
@@ -531,11 +531,6 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
</message>
<message>
<location/>
- <source>Display information about the Qt toolkit by Trolltech.</source>
- <translation>Pokaż informacje o bibliotece Qt Trolltech&apos;a.</translation>
- </message>
- <message>
- <location/>
<source>&amp;Done and Next</source>
<translation>&amp;Zrobione i do następnego</translation>
</message>
@@ -546,7 +541,7 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
</message>
<message>
<location/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+742"/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="+764"/>
<source>Edit</source>
<translation>Edycja</translation>
</message>
@@ -720,13 +715,13 @@ Przyjmie on uniwersalną formę liczby pojedynczej.</translation>
<translation>Zamienia tłumaczenia we wszystkich pasujących do wzorca wpisach.</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-2011"/>
+ <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="+188"/>
+ <location line="+190"/>
<source>Source text</source>
<translation>Tekst źródłowy</translation>
</message>
@@ -840,12 +835,12 @@ Czy chcesz pominąć pierwszy plik?</translation>
<message>
<location filename="../tools/linguist/linguist/mainwindow.ui"/>
<location filename="../tools/linguist/linguist/mainwindow.cpp" line="-511"/>
- <location line="+1165"/>
+ <location line="+1187"/>
<source>Release</source>
<translation>Wydaj</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-1164"/>
+ <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)
@@ -912,7 +907,7 @@ Wszystkie pliki (*)</translation>
<location line="+34"/>
<location line="+24"/>
<location line="+22"/>
- <location line="+516"/>
+ <location line="+538"/>
<location line="+1"/>
<location line="+274"/>
<location line="+40"/>
@@ -921,7 +916,7 @@ Wszystkie pliki (*)</translation>
<translation>Qt Linguist</translation>
</message>
<message>
- <location line="-1198"/>
+ <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>
@@ -1047,7 +1042,7 @@ Wszystkie pliki (*)</translation>
<translation>Wszystkie wyrażenia są przetłumaczone.</translation>
</message>
<message>
- <location line="+176"/>
+ <location line="+198"/>
<source>&amp;Window</source>
<translation>&amp;Okno</translation>
</message>
@@ -1182,7 +1177,7 @@ Wszystkie pliki (*)</translation>
<translation>Czy chcesz zachować książke wyrażeń &apos;%1&apos;?</translation>
</message>
<message>
- <location line="+334"/>
+ <location line="+349"/>
<source>All</source>
<translation>Wszystko</translation>
</message>
@@ -1248,7 +1243,7 @@ Wszystkie pliki (*)</translation>
</message>
<message>
<location/>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-481"/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-496"/>
<source>Translation</source>
<translation>Tłumaczenie</translation>
</message>
@@ -1505,6 +1500,11 @@ Wszystkie pliki (*)</translation>
<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>
</context>
<context>
<name>MessageEditor</name>
@@ -1545,12 +1545,12 @@ Wszystkie pliki (*)</translation>
<translation>chiński</translation>
</message>
<message>
- <location line="+53"/>
+ <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="+18"/>
+ <location line="+10"/>
<source>Source text</source>
<translation>Tekst źródłowy</translation>
</message>
@@ -1615,7 +1615,7 @@ Linia: %2</translation>
<context>
<name>MessageModel</name>
<message>
- <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+825"/>
+ <location filename="../tools/linguist/linguist/messagemodel.cpp" line="+839"/>
<source>Completion status for %1</source>
<translation>Stan ukończenia dla %1</translation>
</message>
@@ -1638,7 +1638,7 @@ Linia: %2</translation>
<context>
<name>MsgEdit</name>
<message>
- <location filename="../tools/linguist/linguist/messageeditor.cpp" line="-614"/>
+ <location filename="../tools/linguist/linguist/messageeditor.cpp" line="-600"/>
<source></source>
<comment>This is the right panel of the main window.</comment>
<translation></translation>
@@ -1807,7 +1807,7 @@ Linia: %2</translation>
<translation>Skompilowane tłumaczenia Qt</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-1280"/>
+ <location filename="../tools/linguist/linguist/mainwindow.cpp" line="-1302"/>
<source>Translation files (%1);;</source>
<translation>Pliki z tłumaczeniami (%1);;</translation>
</message>
@@ -1817,7 +1817,7 @@ Linia: %2</translation>
<translation>Wszystkie pliki (*)</translation>
</message>
<message>
- <location filename="../tools/linguist/linguist/messagemodel.cpp" line="-1120"/>
+ <location filename="../tools/linguist/linguist/messagemodel.cpp" line="-1134"/>
<location line="+27"/>
<location line="+67"/>
<location line="+39"/>
@@ -1828,11 +1828,16 @@ Linia: %2</translation>
<translation>Qt Linguist</translation>
</message>
<message>
- <location filename="../tools/linguist/shared/po.cpp" line="+658"/>
+ <location filename="../tools/linguist/shared/po.cpp" line="+817"/>
<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>
@@ -1848,7 +1853,7 @@ Linia: %2</translation>
<translation>Źródła tłumaczeń Qt (najnowszy format)</translation>
</message>
<message>
- <location filename="../tools/linguist/shared/xliff.cpp" line="+827"/>
+ <location filename="../tools/linguist/shared/xliff.cpp" line="+829"/>
<source>XLIFF localization files</source>
<translation>Pliki XLIFF</translation>
</message>
diff --git a/translations/qt_de.ts b/translations/qt_de.ts
index 86d5edb..226b7da 100644
--- a/translations/qt_de.ts
+++ b/translations/qt_de.ts
@@ -3683,15 +3683,6 @@ Möchten Sie die Datei trotzdem löschen?</translation>
</message>
</context>
<context>
- <name>QGstreamerPlayerSession</name>
- <message>
- <location filename="../src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp" line="+423"/>
- <location line="+16"/>
- <source>Unable to play %1</source>
- <translation>%1 kann nicht abgespielt werden</translation>
- </message>
-</context>
-<context>
<name>QHostInfo</name>
<message>
<location filename="../src/network/kernel/qhostinfo_p.h" line="+103"/>
diff --git a/translations/qt_iw.ts b/translations/qt_he.ts
index 72a6df9..72a6df9 100644
--- a/translations/qt_iw.ts
+++ b/translations/qt_he.ts
diff --git a/translations/qt_help_pl.ts b/translations/qt_help_pl.ts
index f2eb6c9..74555cc 100644
--- a/translations/qt_help_pl.ts
+++ b/translations/qt_help_pl.ts
@@ -43,7 +43,7 @@
</message>
<message>
<location line="+11"/>
- <location line="+49"/>
+ <location line="+52"/>
<source>Cannot open collection file: %1</source>
<translation>Nie można otworzyć pliku z kolekcją: %1</translation>
</message>
@@ -58,12 +58,12 @@
<translation>Plik z kolekcją &quot;%1&quot; już istnieje!</translation>
</message>
<message>
- <location line="+148"/>
+ <location line="+151"/>
<source>Unknown filter &apos;%1&apos;!</source>
<translation>Nieznany filtr &quot;%1&quot;!</translation>
</message>
<message>
- <location line="+105"/>
+ <location line="+103"/>
<source>Invalid documentation file &apos;%1&apos;!</source>
<translation>Niepoprawny plik z dokumentacją &quot;%1&quot;!</translation>
</message>
@@ -78,17 +78,17 @@
<translation>Nie można otworzyć bazy danych &quot;%1&quot; do zoptymalizowania!</translation>
</message>
<message>
- <location line="-438"/>
+ <location line="-439"/>
<source>Cannot create directory: %1</source>
<translation>Nie można utworzyć katalogu: %1</translation>
</message>
<message>
- <location line="+23"/>
+ <location line="+26"/>
<source>Cannot copy collection file: %1</source>
<translation>Nie można skopiować pliku z kolekcją: %1</translation>
</message>
<message>
- <location line="+174"/>
+ <location line="+172"/>
<source>Cannot register filter %1!</source>
<translation>Nie można zarejestrować pliku %1!</translation>
</message>
@@ -120,23 +120,20 @@
<context>
<name>QHelpEngineCore</name>
<message>
- <location filename="../tools/assistant/lib/qhelpenginecore.cpp" line="+525"/>
- <source>The specified namespace does not exist!</source>
- <translation>Podana przestrzeń nazw nie istnieje!</translation>
- </message>
-</context>
-<context>
- <name>QHelpEngineCorePrivate</name>
- <message>
- <location line="-403"/>
+ <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>
</context>
<context>
<name>QHelpGenerator</name>
<message>
- <location filename="../tools/assistant/lib/qhelpgenerator.cpp" line="+157"/>
+ <location filename="../tools/assistant/lib/qhelpgenerator.cpp" line="+158"/>
<source>Invalid help data!</source>
<translation>Niepoprawne dane pomocy!</translation>
</message>
@@ -161,7 +158,7 @@
<translation>Nie można otworzyć pliku z bazą danych %1!</translation>
</message>
<message>
- <location line="+11"/>
+ <location line="+14"/>
<source>Cannot register namespace %1!</source>
<translation>Nie można zarejestrować przestrzeni nazw %1!</translation>
</message>
@@ -216,7 +213,7 @@
<translation>Nie można otworzyć pliku %1! Zostaje on opuszczony.</translation>
</message>
<message>
- <location line="+131"/>
+ <location line="+133"/>
<source>The filter %1 is already registered!</source>
<translation>Filtr %1 jest już zarejestrowany!</translation>
</message>
@@ -231,7 +228,7 @@
<translation>Wstaw indeksy...</translation>
</message>
<message>
- <location line="+80"/>
+ <location line="+91"/>
<source>Insert contents...</source>
<translation>Wstaw zawartość...</translation>
</message>
@@ -245,122 +242,143 @@
<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>
+</context>
+<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="+141"/>
+ <source>The input file %1 could not be opened!</source>
+ <translation>Nie można otworzyć pliku wejściowego %1!</translation>
+ </message>
</context>
<context>
<name>QHelpSearchQueryWidget</name>
<message>
- <location filename="../tools/assistant/lib/qhelpsearchquerywidget.cpp" line="+411"/>
+ <location filename="../tools/assistant/lib/qhelpsearchquerywidget.cpp" line="+124"/>
<source>Search for:</source>
<translation>Wyszukaj:</translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+1"/>
<source>Previous search</source>
<translation>Poprzednie wyszukiwanie</translation>
</message>
<message>
- <location line="+4"/>
+ <location line="+1"/>
<source>Next search</source>
<translation>Następne wyszukiwanie</translation>
</message>
<message>
- <location line="+2"/>
+ <location line="+1"/>
<source>Search</source>
<translation>Wyszukaj</translation>
</message>
<message>
- <location line="+20"/>
+ <location line="+2"/>
<source>Advanced search</source>
<translation>Wyszukiwanie zaawansowane</translation>
</message>
<message>
- <location line="+18"/>
+ <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="+6"/>
+ <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="+6"/>
+ <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="+6"/>
+ <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="+6"/>
+ <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>
</context>
<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>
+ <numerusform>%1 - %2 z %n trafień</numerusform>
+ <numerusform>%1 - %2 z %n trafień</numerusform>
+ </translation>
+ </message>
<message>
- <location filename="../tools/assistant/lib/qhelpsearchresultwidget.cpp" line="+235"/>
+ <location line="+61"/>
<source>0 - 0 of 0 Hits</source>
<translation>0 - 0 z 0 Trafień</translation>
</message>
</context>
-<context>
- <name>QHelpSearchResultWidgetPrivate</name>
- <message>
- <location line="-61"/>
- <source>%1 - %2 of %3 Hits</source>
- <translation>%1 - %2 z %3 Trafień</translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <location filename="../tools/assistant/lib/qhelpprojectdata.cpp" line="+85"/>
- <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="+5"/>
- <source>Error in line %1: %2</source>
- <translation>Błąd w linii %1: %2</translation>
- </message>
- <message>
- <location line="+13"/>
- <source>A virtual folder must not contain a &apos;/&apos; character!</source>
- <translation>Wirtualny katalog nie może zawierać znaku &apos;/&apos;!</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>A namespace must not contain a &apos;/&apos; character!</source>
- <translation>Przestrzeń nazw nie może zawierać znaku &apos;/&apos;!</translation>
- </message>
- <message>
- <location line="+16"/>
- <source>Missing namespace in QtHelpProject.</source>
- <translation>Brak przestrzeni nazw w QtHelpProject.</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Missing virtual folder in QtHelpProject</source>
- <translation>Brak wirtualnego katalogu QtHelpProject</translation>
- </message>
- <message>
- <location line="+88"/>
- <source>Missing attribute in keyword at line %1.</source>
- <translation>Brak atrybutu w słowie kluczowym w linii %1.</translation>
- </message>
- <message>
- <location line="+123"/>
- <source>The input file %1 could not be opened!</source>
- <translation>Nie można otworzyć pliku wejściowego %1!</translation>
- </message>
-</context>
</TS>
diff --git a/translations/qt_pl.ts b/translations/qt_pl.ts
index a089cb6..b366a72 100644
--- a/translations/qt_pl.ts
+++ b/translations/qt_pl.ts
@@ -4,7 +4,7 @@
<context>
<name>CloseButton</name>
<message>
- <location filename="../src/gui/widgets/qtabbar.cpp" line="+2274"/>
+ <location filename="../src/gui/widgets/qtabbar.cpp" line="+2313"/>
<source>Close Tab</source>
<translation>Zamknij kartę</translation>
</message>
@@ -12,7 +12,7 @@
<context>
<name>FakeReply</name>
<message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp" line="+2217"/>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp" line="+2273"/>
<source>Fake error !</source>
<translation>Fałszywy błąd!</translation>
</message>
@@ -25,7 +25,7 @@
<context>
<name>MAC_APPLICATION_MENU</name>
<message>
- <location filename="../src/gui/kernel/qapplication.cpp" line="+2316"/>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2320"/>
<source>Services</source>
<translation>Usługi</translation>
</message>
@@ -1281,7 +1281,7 @@ na
<translation>Gniazdo nie jest podłączone</translation>
</message>
<message>
- <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+614"/>
+ <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+625"/>
<location filename="../src/network/socket/qabstractsocket.cpp" line="-380"/>
<source>Socket operation timed out</source>
<translation>Przekroczony czas operacji gniazda</translation>
@@ -1598,7 +1598,7 @@ na
<context>
<name>QDeclarativeAbstractAnimation</name>
<message>
- <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+165"/>
+ <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+166"/>
<source>Cannot animate non-existent property &quot;%1&quot;</source>
<translation>Nie można animować nieistniejącej właściwości &quot;%1&quot;</translation>
</message>
@@ -1616,7 +1616,7 @@ na
<context>
<name>QDeclarativeAnchorAnimation</name>
<message>
- <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+2542"/>
+ <location filename="../src/declarative/util/qdeclarativeanimation.cpp" line="+2551"/>
<source>Cannot set a duration of &lt; 0</source>
<translation>Nie można ustawić ujemnego czasu trwania</translation>
</message>
@@ -1624,7 +1624,7 @@ na
<context>
<name>QDeclarativeAnchors</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativeanchors.cpp" line="+181"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeanchors.cpp" line="+180"/>
<source>Possible anchor loop detected on fill.</source>
<translation>Wykryto możliwe zapętlenie dla kotwicy &quot;fill&quot;.</translation>
</message>
@@ -1700,7 +1700,7 @@ na
<context>
<name>QDeclarativeBehavior</name>
<message>
- <location filename="../src/declarative/util/qdeclarativebehavior.cpp" line="+124"/>
+ <location filename="../src/declarative/util/qdeclarativebehavior.cpp" line="+127"/>
<source>Cannot change the animation assigned to a Behavior.</source>
<translation>Nie można zmienić animacji przypisanej do &quot;Zachowania&quot;.</translation>
</message>
@@ -1708,7 +1708,7 @@ na
<context>
<name>QDeclarativeBinding</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativebinding.cpp" line="+225"/>
+ <location filename="../src/declarative/qml/qdeclarativebinding.cpp" line="+236"/>
<source>Binding loop detected for property &quot;%1&quot;</source>
<translation>Zapętlenie powiązania dla właściwości &quot;%1&quot;</translation>
</message>
@@ -1725,16 +1725,16 @@ na
<name>QDeclarativeCompiler</name>
<message>
<location filename="../src/declarative/qml/qdeclarativecompiler.cpp" line="+186"/>
- <location line="+1561"/>
- <location line="+187"/>
- <location line="+82"/>
+ <location line="+1572"/>
+ <location line="+186"/>
+ <location line="+81"/>
<location line="+75"/>
- <location line="+488"/>
+ <location line="+487"/>
<source>Invalid property assignment: &quot;%1&quot; is a read-only property</source>
<translation>Niepoprawne przypisanie wartości: &quot;%1&quot; jest właściwością tylko do odczytu</translation>
</message>
<message>
- <location line="-2384"/>
+ <location line="-2392"/>
<source>Invalid property assignment: unknown enumeration</source>
<translation>Niepoprawne przypisanie wartości: nieznana wartość wyliczeniowa</translation>
</message>
@@ -1819,12 +1819,12 @@ na
<translation>Niepoprawne przypisanie wartości: nieobsługiwany typ &quot;%1&quot;</translation>
</message>
<message>
- <location line="+271"/>
+ <location line="+275"/>
<source>Element is not creatable.</source>
<translation>Nie można utworzyć elementu (&quot;creatable&quot; wyłączone).</translation>
</message>
<message>
- <location line="+592"/>
+ <location line="+601"/>
<source>Component elements may not contain properties other than id</source>
<translation>Elementy komponentu nie mogą posiadać właściwości innych niż &quot;id&quot;</translation>
</message>
@@ -1835,12 +1835,12 @@ na
</message>
<message>
<location line="+6"/>
- <location line="+477"/>
+ <location line="+475"/>
<source>id is not unique</source>
<translation>Wartość &quot;id&quot; nie jest unikatowa</translation>
</message>
<message>
- <location line="-467"/>
+ <location line="-465"/>
<source>Invalid component body specification</source>
<translation>Niepoprawna specyfikacja &quot;body&quot; komponentu</translation>
</message>
@@ -1886,29 +1886,29 @@ na
</message>
<message>
<location line="+15"/>
- <location line="+104"/>
+ <location line="+102"/>
<source>Non-existent attached object</source>
<translation>Nieistniejący dołączony obiekt</translation>
</message>
<message>
- <location line="-100"/>
- <location line="+103"/>
+ <location line="-98"/>
+ <location line="+101"/>
<source>Invalid attached object assignment</source>
<translation>Niepoprawne przypisanie dołączonego obiektu</translation>
</message>
<message>
- <location line="-50"/>
+ <location line="-48"/>
<source>Cannot assign to non-existent default property</source>
<translation>Nie można przypisać wartości do nieistniejącej domyślnej właściwości</translation>
</message>
<message>
<location line="+2"/>
- <location line="+355"/>
+ <location line="+352"/>
<source>Cannot assign to non-existent property &quot;%1&quot;</source>
<translation>Nie można przypisać wartości do nieistniejącej właściwości &quot;%1&quot;</translation>
</message>
<message>
- <location line="-324"/>
+ <location line="-322"/>
<source>Invalid use of namespace</source>
<translation>Niepoprawne użycie przestrzeni nazw</translation>
</message>
@@ -1918,7 +1918,7 @@ na
<translation>Nie jest to nazwa dołączonej właściwości</translation>
</message>
<message>
- <location line="+183"/>
+ <location line="+182"/>
<source>Invalid use of id property</source>
<translation>Niepoprawne użycie właściwości &quot;id&quot;</translation>
</message>
@@ -1930,7 +1930,7 @@ na
</message>
<message>
<location line="+12"/>
- <location line="+8"/>
+ <location line="+7"/>
<source>Invalid grouped property access</source>
<translation>Błędny dostęp do zgrupowanej właściwości</translation>
</message>
@@ -1985,7 +1985,7 @@ na
<translation>Niepoprawne przypisanie wartości: oczekiwano skryptu</translation>
</message>
<message>
- <location line="+106"/>
+ <location line="+105"/>
<source>Cannot assign object to property</source>
<translation>Nie można przypisać obiektu dla właściwości</translation>
</message>
@@ -2045,7 +2045,7 @@ na
<translation>Nie można nadpisać właściwości &quot;FINAL&quot;</translation>
</message>
<message>
- <location line="+25"/>
+ <location line="+24"/>
<source>Invalid property type</source>
<translation>Niepoprawny typ właściwości</translation>
</message>
@@ -2084,23 +2084,23 @@ na
<location line="-4"/>
<location line="+25"/>
<source>Invalid alias location</source>
- <translation type="unfinished"></translation>
+ <translation>Niepoprawne położenie aliasu</translation>
</message>
<message>
<location line="-16"/>
<source>Invalid alias reference. An alias reference must be specified as &lt;id&gt; or &lt;id&gt;.&lt;property&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>Niepoprawna referencja aliasu. Referencja aliasu musi być podana jako &lt;id&gt; lub &lt;id&gt; &lt;property&gt;</translation>
</message>
<message>
<location line="+3"/>
<source>Invalid alias reference. Unable to find id &quot;%1&quot;</source>
- <translation type="unfinished"></translation>
+ <translation>Niepoprawna referencja aliasu. Nie można odnaleźć identyfikatora &quot;%1&quot;</translation>
</message>
</context>
<context>
<name>QDeclarativeComponent</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativecomponent.cpp" line="+508"/>
+ <location filename="../src/declarative/qml/qdeclarativecomponent.cpp" line="+458"/>
<source>Invalid empty URL</source>
<translation>Niepoprawny pusty URL</translation>
</message>
@@ -2108,13 +2108,13 @@ na
<context>
<name>QDeclarativeCompositeTypeManager</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativecompositetypemanager.cpp" line="+482"/>
- <location line="+270"/>
+ <location filename="../src/declarative/qml/qdeclarativecompositetypemanager.cpp" line="+487"/>
+ <location line="+266"/>
<source>Resource %1 unavailable</source>
<translation>Zasób %1 nie jest dostępny</translation>
</message>
<message>
- <location line="-120"/>
+ <location line="-122"/>
<source>Namespace %1 cannot be used as a type</source>
<translation>Przestrzeń nazw %1 nie może być użyta jako typ</translation>
</message>
@@ -2132,14 +2132,13 @@ na
<context>
<name>QDeclarativeConnections</name>
<message>
- <location filename="../src/declarative/util/qdeclarativeconnections.cpp" line="+180"/>
- <location line="+54"/>
- <location line="+7"/>
+ <location filename="../src/declarative/util/qdeclarativeconnections.cpp" line="+209"/>
+ <location line="+60"/>
<source>Cannot assign to non-existent property &quot;%1&quot;</source>
<translation>Nie można przypisać wartości do nieistniejącej właściwości &quot;%1&quot;</translation>
</message>
<message>
- <location line="-51"/>
+ <location line="-50"/>
<source>Connections: nested objects not allowed</source>
<translation>Połączenia: zagnieżdżone obiekty nie są dozwolone</translation>
</message>
@@ -2157,38 +2156,59 @@ na
<context>
<name>QDeclarativeEngine</name>
<message>
- <location filename="../src/declarative/qml/qdeclarativeengine.cpp" line="+1636"/>
- <location line="+4"/>
- <source>local directory</source>
- <translation>lokalny katalog</translation>
+ <location filename="../src/declarative/qml/qdeclarativesqldatabase.cpp" line="+204"/>
+ <source>executeSql called outside transaction()</source>
+ <translation>&quot;executeSql&quot; zawołane na zewnątrz &quot;transation()&quot;</translation>
</message>
<message>
- <location line="+6"/>
- <source>is ambiguous. Found in %1 and in %2</source>
- <translation>jest niejednoznaczny. Znaleziono w %1 i w %2</translation>
+ <location line="+58"/>
+ <source>Read-only Transaction</source>
+ <translation>Transakcja tylko do odczytu</translation>
</message>
<message>
- <location line="+4"/>
- <source>is ambiguous. Found in %1 in version %2.%3 and %4.%5</source>
- <translation>jest niejednoznaczny. Znaleziono w %1 w wersji %2.%3 i %4.%5</translation>
+ <location line="+20"/>
+ <source>Version mismatch: expected %1, found %2</source>
+ <translation>Niezgodność wersji: oczekiwano %1, znaleziono %2</translation>
</message>
<message>
<location line="+14"/>
- <source>is instantiated recursively</source>
- <translation>jest zinstancjonowany rekurencyjnie</translation>
+ <source>SQL transaction failed</source>
+ <translation>Transakcja SQL zakończona błędem</translation>
</message>
<message>
- <location line="+2"/>
- <source>is not a type</source>
- <translation>nie jest typem</translation>
+ <location line="+21"/>
+ <source>transaction: missing callback</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="+34"/>
+ <location line="+57"/>
+ <location line="+16"/>
+ <source>SQL: database version mismatch</source>
+ <translation>SQL: niezgodność wersji bazy danych</translation>
+ </message>
+</context>
+<context>
+ <name>QDeclarativeFlipable</name>
+ <message>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeflipable.cpp" line="+127"/>
+ <source>front is a write-once property</source>
+ <translation>&quot;front&quot; jest właściwością tylko do odczytu</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>back is a write-once property</source>
+ <translation>&quot;back&quot; jest właściwością tylko do odczytu</translation>
+ </message>
+</context>
+<context>
+ <name>QDeclarativeImportDatabase</name>
+ <message>
+ <location filename="../src/declarative/qml/qdeclarativeimport.cpp" line="+303"/>
<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>
<message>
- <location line="+23"/>
+ <location line="+20"/>
<source>plugin cannot be loaded for module &quot;%1&quot;: %2</source>
<translation>wtyczka nie może zostać załadowana dla modułu &quot;%1&quot;: %2</translation>
</message>
@@ -2198,7 +2218,7 @@ na
<translation>wtyczka &quot;%2&quot; modułu &quot;%1&quot; nie została odnaleziona</translation>
</message>
<message>
- <location line="+82"/>
+ <location line="+79"/>
<location line="+55"/>
<source>module &quot;%1&quot; version %2.%3 is not installed</source>
<translation>wersja %2.%3 modułu %1 nie jest zainstalowana</translation>
@@ -2230,54 +2250,36 @@ na
<translation>- zagnieżdżone przestrzenie nazw nie są dozwolone</translation>
</message>
<message>
- <location filename="../src/declarative/qml/qdeclarativesqldatabase.cpp" line="+204"/>
- <source>executeSql called outside transaction()</source>
- <translation>&quot;executeSql&quot; zawołane na zewnątrz &quot;transation()&quot;</translation>
+ <location line="+47"/>
+ <location line="+4"/>
+ <source>local directory</source>
+ <translation>lokalny katalog</translation>
</message>
<message>
- <location line="+58"/>
- <source>Read-only Transaction</source>
- <translation>Transakcja tylko do odczytu</translation>
+ <location line="+6"/>
+ <source>is ambiguous. Found in %1 and in %2</source>
+ <translation>jest niejednoznaczny. Znaleziono w %1 i w %2</translation>
</message>
<message>
- <location line="+20"/>
- <source>Version mismatch: expected %1, found %2</source>
- <translation>Niezgodność wersji: oczekiwano %1, znaleziono %2</translation>
+ <location line="+4"/>
+ <source>is ambiguous. Found in %1 in version %2.%3 and %4.%5</source>
+ <translation>jest niejednoznaczny. Znaleziono w %1 w wersji %2.%3 i %4.%5</translation>
</message>
<message>
<location line="+14"/>
- <source>SQL transaction failed</source>
- <translation>Transakcja SQL zakończona błędem</translation>
- </message>
- <message>
- <location line="+21"/>
- <source>transaction: missing callback</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+57"/>
- <location line="+16"/>
- <source>SQL: database version mismatch</source>
- <translation>SQL: niezgodność wersji bazy danych</translation>
- </message>
-</context>
-<context>
- <name>QDeclarativeFlipable</name>
- <message>
- <location filename="../src/declarative/graphicsitems/qdeclarativeflipable.cpp" line="+129"/>
- <source>front is a write-once property</source>
- <translation>&quot;front&quot; jest właściwością tylko do odczytu</translation>
+ <source>is instantiated recursively</source>
+ <translation>jest zinstancjonowany rekurencyjnie</translation>
</message>
<message>
- <location line="+19"/>
- <source>back is a write-once property</source>
- <translation>&quot;back&quot; jest właściwością tylko do odczytu</translation>
+ <location line="+2"/>
+ <source>is not a type</source>
+ <translation>nie jest typem</translation>
</message>
</context>
<context>
<name>QDeclarativeKeyNavigationAttached</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp" line="+62"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp" line="+64"/>
<source>KeyNavigation is only available via attached properties</source>
<translation>&quot;KeyNavigation&quot; jest dostępny jedynie poprzez dołączone właściwości</translation>
</message>
@@ -2318,12 +2320,7 @@ na
<translation>append: wartość nie jest obiektem</translation>
</message>
<message>
- <location line="+34"/>
- <source>get: index %1 out of range</source>
- <translation>get: indeks %1 poza zakresem</translation>
- </message>
- <message>
- <location line="+25"/>
+ <location line="+55"/>
<source>set: value is not an object</source>
<translation>set: wartość nie jest obiektem</translation>
</message>
@@ -2358,7 +2355,7 @@ na
<context>
<name>QDeclarativeLoader</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativeloader.cpp" line="+317"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativeloader.cpp" line="+309"/>
<source>Loader does not support loading non-visual elements.</source>
<translation>Ładowanie elementów niewizualnych nie jest obsługiwane.</translation>
</message>
@@ -2479,19 +2476,19 @@ na
<translation>Oczekiwany znak &quot;%1&quot;</translation>
</message>
<message>
- <location filename="../src/declarative/qml/qdeclarativescriptparser.cpp" line="+264"/>
- <location line="+464"/>
+ <location filename="../src/declarative/qml/qdeclarativescriptparser.cpp" line="+260"/>
+ <location line="+431"/>
<location line="+59"/>
<source>Property value set multiple times</source>
<translation>Wartość właściwości ustawiona wielokrotnie</translation>
</message>
<message>
- <location line="-512"/>
+ <location line="-479"/>
<source>Expected type name</source>
<translation>Oczekiwana nazwa typu</translation>
</message>
<message>
- <location line="+171"/>
+ <location line="+136"/>
<source>Invalid import qualifier ID</source>
<translation type="unfinished"></translation>
</message>
@@ -2541,7 +2538,7 @@ na
<translation>&quot;Tylko do odczytu&quot; nie jest jeszcze obsługiwane</translation>
</message>
<message>
- <location line="+213"/>
+ <location line="+215"/>
<source>JavaScript declaration outside Script element</source>
<translation>Deklaracja &quot;JavaScript&quot; na zewnątrz elementu &quot;Script&quot;</translation>
</message>
@@ -2557,7 +2554,7 @@ na
<context>
<name>QDeclarativePixmapCache</name>
<message>
- <location filename="../src/declarative/util/qdeclarativepixmapcache.cpp" line="+197"/>
+ <location filename="../src/declarative/util/qdeclarativepixmapcache.cpp" line="+198"/>
<source>Error decoding: %1: %2</source>
<translation>Błąd dekodowania: %1: %2</translation>
</message>
@@ -2568,7 +2565,7 @@ na
</message>
<message>
<location line="+19"/>
- <location line="+342"/>
+ <location line="+345"/>
<source>Cannot open: %1</source>
<translation>Nie można otworzyć: %1</translation>
</message>
@@ -2589,12 +2586,12 @@ na
<context>
<name>QDeclarativePropertyChanges</name>
<message>
- <location filename="../src/declarative/util/qdeclarativepropertychanges.cpp" line="+232"/>
+ <location filename="../src/declarative/util/qdeclarativepropertychanges.cpp" line="+252"/>
<source>PropertyChanges does not support creating state-specific objects.</source>
<translation>&quot;PropertyChanges&quot; nie obsługuje tworzenia obiektów charakterystycznych dla stanów.</translation>
</message>
<message>
- <location line="+151"/>
+ <location line="+157"/>
<source>Cannot assign to non-existent property &quot;%1&quot;</source>
<translation>Nie można przypisać wartości do nieistniejącej właściwości &quot;%1&quot;</translation>
</message>
@@ -2607,7 +2604,7 @@ na
<context>
<name>QDeclarativeTextInput</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativetextinput.cpp" line="+793"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativetextinput.cpp" line="+797"/>
<location line="+8"/>
<source>Could not load cursor delegate</source>
<translation type="unfinished"></translation>
@@ -2626,7 +2623,7 @@ na
<translation>Nie można utworzyć obiektu typu %1</translation>
</message>
<message>
- <location line="+380"/>
+ <location line="+390"/>
<source>Cannot assign value %1 to property %2</source>
<translation>Nie można przypisać wartości %1 do właściwości %2</translation>
</message>
@@ -2669,7 +2666,7 @@ na
<context>
<name>QDeclarativeVisualDataModel</name>
<message>
- <location filename="../src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp" line="+1070"/>
+ <location filename="../src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp" line="+1091"/>
<source>Delegate component must be Item type.</source>
<translation type="unfinished"></translation>
</message>
@@ -2694,7 +2691,7 @@ na
<context>
<name>QDeclarativeXmlRoleList</name>
<message>
- <location filename="../src/declarative/util/qdeclarativexmllistmodel.cpp" line="+642"/>
+ <location filename="../src/declarative/util/qdeclarativexmllistmodel.cpp" line="+673"/>
<source>An XmlListModel query must start with &apos;/&apos; or &quot;//&quot;</source>
<translation>Zapytanie XmlListModel nie może rozpoczynać się od &quot;/&quot; ani od &quot;//&quot;</translation>
</message>
@@ -2727,7 +2724,7 @@ na
<message>
<location line="-122"/>
<source>Done</source>
- <translation>Wykonano</translation>
+ <translation>Zrobione</translation>
</message>
</context>
<context>
@@ -3757,15 +3754,6 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
</message>
</context>
<context>
- <name>QGstreamerPlayerSession</name>
- <message>
- <location filename="../src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayersession.cpp" line="+423"/>
- <location line="+16"/>
- <source>Unable to play %1</source>
- <translation>Nie można odtworzyć %1</translation>
- </message>
-</context>
-<context>
<name>QHostInfo</name>
<message>
<location filename="../src/network/kernel/qhostinfo_p.h" line="+103"/>
@@ -4134,7 +4122,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QIODevice</name>
<message>
- <location filename="../src/corelib/global/qglobal.cpp" line="+2108"/>
+ <location filename="../src/corelib/global/qglobal.cpp" line="+2129"/>
<source>No space left on device</source>
<translation>Brak wolnego miejsca na urządzeniu</translation>
</message>
@@ -4154,7 +4142,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Zbyt wiele otwartych plików</translation>
</message>
<message>
- <location filename="../src/corelib/io/qiodevice.cpp" line="+1596"/>
+ <location filename="../src/corelib/io/qiodevice.cpp" line="+1598"/>
<source>Unknown error</source>
<translation>Nieznany błąd</translation>
</message>
@@ -4271,7 +4259,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QLineEdit</name>
<message>
- <location filename="../src/gui/widgets/qlineedit.cpp" line="+2089"/>
+ <location filename="../src/gui/widgets/qlineedit.cpp" line="+2095"/>
<source>&amp;Copy</source>
<translation>S&amp;kopiuj</translation>
</message>
@@ -4592,39 +4580,6 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
</message>
</context>
<context>
- <name>QMediaPlayer</name>
- <message>
- <location filename="../src/multimedia/mediaservices/playback/qmediaplayer.cpp" line="+496"/>
- <source>The QMediaPlayer object does not have a valid service</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>QMediaPlaylist</name>
- <message>
- <location filename="../src/multimedia/mediaservices/base/qmediaplaylist.cpp" line="+455"/>
- <location line="+46"/>
- <source>Could not add items to read only playlist.</source>
- <translation>Nie można dodać elementów do listy odtwarzania (tylko do odczytu).</translation>
- </message>
- <message>
- <location line="-27"/>
- <location line="+46"/>
- <source>Playlist format is not supported</source>
- <translation>Format listy odtwarzania nie jest obsługiwany</translation>
- </message>
- <message>
- <location line="+26"/>
- <source>The file could not be accessed.</source>
- <translation>Brak dostępu do pliku.</translation>
- </message>
- <message>
- <location line="+35"/>
- <source>Playlist format is not supported.</source>
- <translation>Format listy odtwarzania nie jest obsługiwany.</translation>
- </message>
-</context>
-<context>
<name>QMenu</name>
<message>
<location filename="../src/plugins/accessible/widgets/qaccessiblemenu.cpp" line="+157"/>
@@ -4649,7 +4604,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QMenuBar</name>
<message>
- <location filename="../src/gui/widgets/qmenu_symbian.cpp" line="+452"/>
+ <location filename="../src/gui/widgets/qmenu_symbian.cpp" line="+456"/>
<source>Actions</source>
<translation>Akcje</translation>
</message>
@@ -4950,7 +4905,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QNetworkAccessHttpBackend</name>
<message>
- <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+645"/>
+ <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+652"/>
<source>No suitable proxy found</source>
<translation>Nie odnaleziono odpowiedniego pośrednika</translation>
</message>
@@ -4958,7 +4913,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QNetworkAccessManager</name>
<message>
- <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="+910"/>
+ <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="+942"/>
<source>Network access is disabled.</source>
<translation>Dostęp do sieci wyłączony.</translation>
</message>
@@ -4966,12 +4921,12 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QNetworkReply</name>
<message>
- <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+101"/>
+ <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+100"/>
<source>Error downloading %1 - server replied: %2</source>
<translation>Błąd podczas pobierania %1 - odpowiedź serwera: %2</translation>
</message>
<message>
- <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="-828"/>
+ <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="-860"/>
<source>Protocol &quot;%1&quot; is unknown</source>
<translation>Protokół &quot;%1&quot; nie jest znany</translation>
</message>
@@ -4981,7 +4936,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation>Błąd sesji sieciowej.</translation>
</message>
<message>
- <location line="+329"/>
+ <location line="+352"/>
<source>Temporary network failure.</source>
<translation>Chwilowy błąd w sieci.</translation>
</message>
@@ -4989,7 +4944,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<context>
<name>QNetworkReplyImpl</name>
<message>
- <location line="+111"/>
+ <location line="+120"/>
<location line="+28"/>
<source>Operation canceled</source>
<translation>Operacja anulowana</translation>
@@ -5022,7 +4977,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
</message>
<message>
<location filename="../src/plugins/bearer/qnetworksession_impl.cpp" line="+272"/>
- <location filename="../src/plugins/bearer/symbian/qnetworksession_impl.cpp" line="+227"/>
+ <location filename="../src/plugins/bearer/symbian/qnetworksession_impl.cpp" line="+280"/>
<source>Unknown session error.</source>
<translation>Nieznany błąd sesji.</translation>
</message>
@@ -5219,7 +5174,7 @@ Proszę o sprawdzenie podanej nazwy pliku.</translation>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../src/declarative/util/qdeclarativexmllistmodel.cpp" line="-196"/>
+ <location filename="../src/declarative/util/qdeclarativexmllistmodel.cpp" line="-227"/>
<source>&quot;%1&quot; duplicates a previous role name and will be disabled.</source>
<translation type="unfinished"></translation>
</message>
@@ -6295,7 +6250,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QSQLiteDriver</name>
<message>
- <location filename="../src/sql/drivers/sqlite/qsql_sqlite.cpp" line="+549"/>
+ <location filename="../src/sql/drivers/sqlite/qsql_sqlite.cpp" line="+550"/>
<source>Error closing database</source>
<translation>Błąd zamykania bazy danych</translation>
</message>
@@ -6338,8 +6293,8 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Nie można wykonać polecenia</translation>
</message>
<message>
- <location line="-129"/>
- <location line="+62"/>
+ <location line="-130"/>
+ <location line="+63"/>
<location line="+8"/>
<source>Unable to fetch row</source>
<translation>Nie można pobrać wiersza danych</translation>
@@ -6350,7 +6305,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Nie można skasować polecenia</translation>
</message>
<message>
- <location line="-148"/>
+ <location line="-149"/>
<source>No query</source>
<translation>Brak zapytania</translation>
</message>
@@ -8083,7 +8038,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Anuluj</translation>
</message>
<message>
- <location filename="../src/gui/kernel/qsoftkeymanager_s60.cpp" line="+319"/>
+ <location filename="../src/gui/kernel/qsoftkeymanager_s60.cpp" line="+321"/>
<source>Exit</source>
<translation>Wyjście</translation>
</message>
@@ -8427,7 +8382,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QTextControl</name>
<message>
- <location filename="../src/gui/text/qtextcontrol.cpp" line="+2047"/>
+ <location filename="../src/gui/text/qtextcontrol.cpp" line="+2049"/>
<source>&amp;Copy</source>
<translation>S&amp;kopiuj</translation>
</message>
@@ -9128,12 +9083,17 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Nieznany</translation>
</message>
<message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp" line="+236"/>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp" line="+248"/>
<source>Web Inspector - %2</source>
<translation>Wizytator sieciowy - %2</translation>
</message>
<message>
- <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+456"/>
+ <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+347"/>
+ <source>Redirection limit reached</source>
+ <translation>Osiągnięto limit przekierowań</translation>
+ </message>
+ <message>
+ <location line="+121"/>
<source>Bad HTTP request</source>
<translation>Niepoprawna komenda HTTP</translation>
</message>
@@ -9237,7 +9197,7 @@ Proszę wybrać inną nazwę pliku.</translation>
</translation>
</message>
<message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp" line="+1959"/>
+ <location filename="../src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp" line="+1979"/>
<source>JavaScript Alert - %1</source>
<translation>Ostrzeżenie JavaScript - %1</translation>
</message>
@@ -9262,7 +9222,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>Skrypt na tej stronie nie działa poprawnie. Czy chcesz przerwać ten skrypt?</translation>
</message>
<message>
- <location line="+374"/>
+ <location line="+376"/>
<source>Move the cursor to the next character</source>
<translation>Przesuń kursor do następnego znaku</translation>
</message>
@@ -9483,7 +9443,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<context>
<name>QWidget</name>
<message>
- <location filename="../src/gui/kernel/qwidget.cpp" line="+5814"/>
+ <location filename="../src/gui/kernel/qwidget.cpp" line="+5793"/>
<source>*</source>
<translation>*</translation>
</message>
@@ -9508,7 +9468,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+2"/>
<source>Done</source>
- <translation>Wykonano</translation>
+ <translation>Zrobione</translation>
</message>
<message>
<location line="+4"/>
@@ -10617,7 +10577,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<message>
<location line="+49"/>
<source>The focus is undefined.</source>
- <translation>Focus jest niezdefiniowany.</translation>
+ <translation>Fokus jest niezdefiniowany.</translation>
</message>
<message>
<location filename="../src/xmlpatterns/utils/qoutputvalidator.cpp" line="+86"/>
@@ -11390,13 +11350,13 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
<message>
<location line="+28"/>
- <location line="+408"/>
+ <location line="+415"/>
<location line="+30"/>
<source>Type %1 of %2 element cannot be resolved.</source>
<translation>Nie można rozwiązać typu %1 elementu %2.</translation>
</message>
<message>
- <location line="-416"/>
+ <location line="-423"/>
<source>Base type %1 of complex type cannot be resolved.</source>
<translation>Nie można rozwiązać typu podstawowego %1 dla typu złożonego.</translation>
</message>
@@ -11406,7 +11366,7 @@ Proszę wybrać inną nazwę pliku.</translation>
<translation>%1 nie może mieć złożonego typu podstawowego który ma %2.</translation>
</message>
<message>
- <location line="+279"/>
+ <location line="+286"/>
<source>Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type.</source>
<translation>Model zawartości typu złożonego %1 posiada element %2 więc nie może być on wywiedziony poprzez rozszerzenie niepustego typu.</translation>
</message>
@@ -12318,11 +12278,11 @@ Proszę wybrać inną nazwę pliku.</translation>
</message>
</context>
<context>
- <name>Widget</name>
+ <name>S60MediaPlayerControl</name>
<message>
- <location filename="../src/3rdparty/webkit/WebKit/qt/tests/hybridPixmap/widget.ui"/>
- <source>about:blank</source>
- <translation>o:puste</translation>
+ <location filename="../src/plugins/mediaservices/symbian/mediaplayer/s60mediaplayercontrol.cpp" line="+231"/>
+ <source>Media couldn&apos;t be resolved</source>
+ <translation type="unfinished"></translation>
</message>
</context>
</TS>
diff --git a/translations/qtconfig_pl.ts b/translations/qtconfig_pl.ts
index 604c998..6cea251 100644
--- a/translations/qtconfig_pl.ts
+++ b/translations/qtconfig_pl.ts
@@ -4,20 +4,20 @@
<context>
<name>MainWindow</name>
<message>
- <location filename="../tools/qtconfig/mainwindow.cpp" line="+351"/>
+ <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="+38"/>
+ <location line="+40"/>
<location line="+1"/>
<source>Auto (default)</source>
<translation>Automatyczny (domyślnie)</translation>
</message>
<message>
- <location line="-38"/>
+ <location line="-40"/>
<source>Choose audio output automatically.</source>
<translation>Wybierz automatycznie wyjście dźwiękowe.</translation>
</message>
@@ -33,7 +33,7 @@
<translation>Eksperymentalna obsługa aRts dla GStreamer.</translation>
</message>
<message>
- <location line="+31"/>
+ <location line="+33"/>
<source>Phonon GStreamer backend not available.</source>
<translation>Końcówka Phonon GStreamer nie jest dostępna.</translation>
</message>
@@ -60,11 +60,6 @@
<translation>OpenGL</translation>
</message>
<message>
- <location line="+0"/>
- <source>Use OpenGL if avaiable</source>
- <translation>Użyj OpenGL jeśli dostępne</translation>
- </message>
- <message>
<location line="+2"/>
<location line="+1"/>
<source>Software</source>
@@ -138,7 +133,7 @@
<translation>Brak zmian do zapisania.</translation>
</message>
<message>
- <location line="-259"/>
+ <location line="-261"/>
<source>Desktop Settings (Default)</source>
<translation>Ustawienia pulpitu (domyślne)</translation>
</message>
@@ -148,7 +143,12 @@
<translation>Wybierz styl i paletę na podstawie ustawień Twojego pulpitu.</translation>
</message>
<message>
- <location line="+258"/>
+ <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>
diff --git a/translations/translations.pri b/translations/translations.pri
index 34da6b1..2edc89a 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -8,16 +8,12 @@ defineReplace(prependAll) {
return ($$result)
}
-LUPDATE = $$QT_BUILD_TREE/bin/lupdate
-win32 {
- LUPDATE ~= s,/,$$QMAKE_DIR_SEP,
- LUPDATE = $${LUPDATE}.exe
-}
+qtPrepareTool(LUPDATE, lupdate)
LUPDATE += -locations relative -no-ui-lines
###### Qt Libraries
-QT_TS = ar cs da de es fr hu iw ja_JP pl pt ru sk sl sv uk zh_CN zh_TW
+QT_TS = ar cs da de es fr he hu ja_JP pl pt ru sk sl sv uk zh_CN zh_TW
ts-qt.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
-I../include -I../include/Qt \
diff --git a/translations/translations.pro b/translations/translations.pro
index ca83d07..cdaf04a 100644
--- a/translations/translations.pro
+++ b/translations/translations.pro
@@ -1,10 +1,6 @@
TRANSLATIONS = $$files(*.ts)
-LRELEASE = $$QT_BUILD_TREE/bin/lrelease
-win32 {
- LRELEASE ~= s,/,$$QMAKE_DIR_SEP,
- LRELEASE = $${LRELEASE}.exe
-}
+qtPrepareTool(LRELEASE, lrelease)
contains(TEMPLATE_PREFIX, vc):vcproj = 1
diff --git a/util/local_database/cldr2qlocalexml.py b/util/local_database/cldr2qlocalexml.py
index fa9ab47..20a7d34 100755
--- a/util/local_database/cldr2qlocalexml.py
+++ b/util/local_database/cldr2qlocalexml.py
@@ -459,6 +459,14 @@ print \
<language>Persian</language>\n\
<country>Iran</country>\n\
</defaultCountry>\n\
+ <defaultCountry>\n\
+ <language>Mongolian</language>\n\
+ <country>Mongolia</country>\n\
+ </defaultCountry>\n\
+ <defaultCountry>\n\
+ <language>Nepali</language>\n\
+ <country>Nepal</country>\n\
+ </defaultCountry>\n\
</defaultCountryList>"
print " <localeList>"
diff --git a/util/local_database/enumdata.py b/util/local_database/enumdata.py
index b742272..f6b145d 100644
--- a/util/local_database/enumdata.py
+++ b/util/local_database/enumdata.py
@@ -507,7 +507,8 @@ country_list = {
242 : [ "Montenegro", "ME" ],
243 : [ "Serbia", "RS" ],
244 : [ "Saint Barthelemy", "BL" ],
- 245 : [ "Saint Martin", "MF" ]
+ 245 : [ "Saint Martin", "MF" ],
+ 246 : [ "LatinAmericaAndTheCaribbean", "419" ]
}
def countryCodeToId(code):
diff --git a/util/local_database/qlocalexml2cpp.py b/util/local_database/qlocalexml2cpp.py
index da2da32..b6523af 100755
--- a/util/local_database/qlocalexml2cpp.py
+++ b/util/local_database/qlocalexml2cpp.py
@@ -549,7 +549,10 @@ def main():
# Country code list
print "static const unsigned char country_code_list[] ="
for key in country_map.keys():
- print "\"%2s\" // %s" % (country_map[key][1], country_map[key][0])
+ code = country_map[key][1]
+ if len(code) == 2:
+ code += "\\0"
+ print "\"%2s\" // %s" % (code, country_map[key][0])
print ";"
diff --git a/util/s60pixelmetrics/pixel_metrics.cpp b/util/s60pixelmetrics/pixel_metrics.cpp
index 0fd650e..42ae850 100644
--- a/util/s60pixelmetrics/pixel_metrics.cpp
+++ b/util/s60pixelmetrics/pixel_metrics.cpp
@@ -50,7 +50,7 @@
// so that we can keep dynamic and static values inline.
// Please adjust version data if correcting dynamic PM calculations.
const TInt KPMMajorVersion = 1;
-const TInt KPMMinorVersion = 18;
+const TInt KPMMinorVersion = 19;
TPixelMetricsVersion PixelMetrics::Version()
{
@@ -468,7 +468,7 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric)
TAknLayoutRect sliderSettingRect;
sliderSettingRect.LayoutRect( sliderRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_cp() );
TAknLayoutRect sliderGraph2Rect;
- sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g2() );
+ sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g6() );
value = sliderGraph2Rect.Rect().Width();
}
break;
@@ -483,7 +483,8 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric)
TAknLayoutRect sliderSettingRect;
sliderSettingRect.LayoutRect( sliderRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_cp() );
TAknLayoutRect sliderGraph2Rect;
- sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g2() );
+ sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g6() );
+ //todo: make a proper calculation for tick marks
value = (TInt)(sliderGraph2Rect.Rect().Height()*1.5); // add assumed tickmark height
}
break;
@@ -498,7 +499,8 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric)
TAknLayoutRect sliderSettingRect;
sliderSettingRect.LayoutRect( sliderRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_cp() );
TAknLayoutRect sliderGraph2Rect;
- sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g2() );
+ sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g6() );
+ //todo: make a proper calculation for tick marks
value = (TInt)(sliderGraph2Rect.Rect().Height()*0.5); // no tickmarks in S60, lets assume they are half the size of slider indicator
}
break;
@@ -513,7 +515,7 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric)
TAknLayoutRect sliderSettingRect;
sliderSettingRect.LayoutRect( sliderRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_cp() );
TAknLayoutRect sliderGraph2Rect;
- sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g2() );
+ sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g6() );
value = sliderGraph2Rect.Rect().Height();
}
break;