diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2011-10-14 10:51:42 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-21 11:53:26 +0200 |
commit | bfb3c424abc7c839dc44de0e36024ede99ece736 (patch) | |
tree | b6814d0238bead8518b23c078beb818432de6ce4 | |
parent | 2d119a137f1bc0c8b1113cd6c58413a1b89a4c1c (diff) |
Rename Qt Quick-specific classes to QQuick*
The QSG (SceneGraph) prefix is too generic for
Qt Quick(2)-specific classes.
All the classes and files in the declarative/items
directory have been renamed.
In particular, for classes that are currently public,
the renaming is as follows:
QSGView --> QQuickView
QSGCanvas --> QQuickCanvas
QSGItem --> QQuickItem
QSGPaintedItem --> QQuickPaintedItem
The header files have been renamed accordingly
(e.g. qsgview.h --> qquickview.h).
Change-Id: Iac937fff81db20bb639486a793c3aeb5230b038c
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
-rw-r--r-- | doc/src/declarative/example-textballoons.qdoc | 14 | ||||
-rw-r--r-- | doc/src/declarative/qmltest.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/whatsnew.qdoc | 8 | ||||
-rw-r--r-- | doc/src/qtquick1/example-textballoons.qdoc | 14 | ||||
-rw-r--r-- | doc/src/qtquick1/qmltest.qdoc | 2 | ||||
-rw-r--r-- | examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp | 4 | ||||
-rw-r--r-- | examples/declarative/minehunt/main.cpp | 6 | ||||
-rw-r--r-- | examples/declarative/modelviews/abstractitemmodel/main.cpp | 8 | ||||
-rw-r--r-- | examples/declarative/modelviews/objectlistmodel/main.cpp | 8 | ||||
-rw-r--r-- | examples/declarative/modelviews/stringlistmodel/main.cpp | 6 | ||||
-rw-r--r-- | examples/declarative/painteditem/smile/main.cpp | 12 | ||||
-rw-r--r-- | examples/declarative/painteditem/textballoons/textballoon.cpp | 4 | ||||
-rw-r--r-- | examples/declarative/painteditem/textballoons/textballoon.h | 4 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter1-basics/main.cpp | 6 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp | 4 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter1-basics/piechart.h | 6 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter2-methods/main.cpp | 6 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp | 4 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter2-methods/piechart.h | 6 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter3-bindings/main.cpp | 6 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp | 4 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter3-bindings/piechart.h | 6 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp | 6 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp | 4 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h | 6 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp | 4 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h | 6 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp | 6 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp | 4 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h | 6 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp | 4 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h | 6 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp | 4 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter6-plugins/piechart.h | 6 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp | 4 | ||||
-rw-r--r-- | examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h | 6 | ||||
-rw-r--r-- | src/declarative/designer/designersupport.cpp | 148 | ||||
-rw-r--r-- | src/declarative/designer/designersupport.h | 50 | ||||
-rw-r--r-- | src/declarative/items/context2d/context2d.pri | 24 | ||||
-rw-r--r-- | src/declarative/items/context2d/qquickcanvasitem.cpp (renamed from src/declarative/items/context2d/qsgcanvasitem.cpp) | 176 | ||||
-rw-r--r-- | src/declarative/items/context2d/qquickcanvasitem_p.h (renamed from src/declarative/items/context2d/qsgcanvasitem_p.h) | 28 | ||||
-rw-r--r-- | src/declarative/items/context2d/qquickcontext2d.cpp (renamed from src/declarative/items/context2d/qsgcontext2d.cpp) | 192 | ||||
-rw-r--r-- | src/declarative/items/context2d/qquickcontext2d_p.h (renamed from src/declarative/items/context2d/qsgcontext2d_p.h) | 36 | ||||
-rw-r--r-- | src/declarative/items/context2d/qquickcontext2dcommandbuffer.cpp (renamed from src/declarative/items/context2d/qsgcontext2dcommandbuffer.cpp) | 64 | ||||
-rw-r--r-- | src/declarative/items/context2d/qquickcontext2dcommandbuffer_p.h (renamed from src/declarative/items/context2d/qsgcontext2dcommandbuffer_p.h) | 66 | ||||
-rw-r--r-- | src/declarative/items/context2d/qquickcontext2dnode.cpp (renamed from src/declarative/items/context2d/qsgcontext2dnode.cpp) | 18 | ||||
-rw-r--r-- | src/declarative/items/context2d/qquickcontext2dnode_p.h (renamed from src/declarative/items/context2d/qsgcontext2dnode_p.h) | 24 | ||||
-rw-r--r-- | src/declarative/items/context2d/qquickcontext2dtexture.cpp (renamed from src/declarative/items/context2d/qsgcontext2dtexture.cpp) | 148 | ||||
-rw-r--r-- | src/declarative/items/context2d/qquickcontext2dtexture_p.h (renamed from src/declarative/items/context2d/qsgcontext2dtexture_p.h) | 60 | ||||
-rw-r--r-- | src/declarative/items/context2d/qquickcontext2dtile.cpp (renamed from src/declarative/items/context2d/qsgcontext2dtile.cpp) | 32 | ||||
-rw-r--r-- | src/declarative/items/context2d/qquickcontext2dtile_p.h (renamed from src/declarative/items/context2d/qsgcontext2dtile_p.h) | 30 | ||||
-rw-r--r-- | src/declarative/items/items.pri | 236 | ||||
-rw-r--r-- | src/declarative/items/qquickanchors.cpp (renamed from src/declarative/items/qsganchors.cpp) | 436 | ||||
-rw-r--r-- | src/declarative/items/qquickanchors_p.h (renamed from src/declarative/items/qsganchors_p.h) | 82 | ||||
-rw-r--r-- | src/declarative/items/qquickanchors_p_p.h (renamed from src/declarative/items/qsganchors_p_p.h) | 68 | ||||
-rw-r--r-- | src/declarative/items/qquickanimatedimage.cpp (renamed from src/declarative/items/qsganimatedimage.cpp) | 70 | ||||
-rw-r--r-- | src/declarative/items/qquickanimatedimage_p.h (renamed from src/declarative/items/qsganimatedimage_p.h) | 24 | ||||
-rw-r--r-- | src/declarative/items/qquickanimatedimage_p_p.h (renamed from src/declarative/items/qsganimatedimage_p_p.h) | 14 | ||||
-rw-r--r-- | src/declarative/items/qquickanimation.cpp (renamed from src/declarative/items/qsganimation.cpp) | 256 | ||||
-rw-r--r-- | src/declarative/items/qquickanimation_p.h (renamed from src/declarative/items/qsganimation_p.h) | 74 | ||||
-rw-r--r-- | src/declarative/items/qquickanimation_p_p.h (renamed from src/declarative/items/qsganimation_p_p.h) | 54 | ||||
-rw-r--r-- | src/declarative/items/qquickborderimage.cpp (renamed from src/declarative/items/qsgborderimage.cpp) | 82 | ||||
-rw-r--r-- | src/declarative/items/qquickborderimage_p.h (renamed from src/declarative/items/qsgborderimage_p.h) | 32 | ||||
-rw-r--r-- | src/declarative/items/qquickborderimage_p_p.h (renamed from src/declarative/items/qsgborderimage_p_p.h) | 34 | ||||
-rw-r--r-- | src/declarative/items/qquickcanvas.cpp (renamed from src/declarative/items/qsgcanvas.cpp) | 572 | ||||
-rw-r--r-- | src/declarative/items/qquickcanvas.h (renamed from src/declarative/items/qsgcanvas.h) | 36 | ||||
-rw-r--r-- | src/declarative/items/qquickcanvas_p.h (renamed from src/declarative/items/qsgcanvas_p.h) | 106 | ||||
-rw-r--r-- | src/declarative/items/qquickclipnode.cpp (renamed from src/declarative/items/qsgclipnode.cpp) | 12 | ||||
-rw-r--r-- | src/declarative/items/qquickclipnode_p.h (renamed from src/declarative/items/qsgclipnode_p.h) | 10 | ||||
-rw-r--r-- | src/declarative/items/qquickdrag.cpp (renamed from src/declarative/items/qsgdrag.cpp) | 144 | ||||
-rw-r--r-- | src/declarative/items/qquickdrag_p.h (renamed from src/declarative/items/qsgdrag_p.h) | 50 | ||||
-rw-r--r-- | src/declarative/items/qquickdroparea.cpp (renamed from src/declarative/items/qsgdroparea.cpp) | 98 | ||||
-rw-r--r-- | src/declarative/items/qquickdroparea_p.h (renamed from src/declarative/items/qsgdroparea_p.h) | 54 | ||||
-rw-r--r-- | src/declarative/items/qquickevents.cpp (renamed from src/declarative/items/qsgevents.cpp) | 8 | ||||
-rw-r--r-- | src/declarative/items/qquickevents_p_p.h (renamed from src/declarative/items/qsgevents_p_p.h) | 20 | ||||
-rw-r--r-- | src/declarative/items/qquickflickable.cpp (renamed from src/declarative/items/qsgflickable.cpp) | 560 | ||||
-rw-r--r-- | src/declarative/items/qquickflickable_p.h (renamed from src/declarative/items/qsgflickable_p.h) | 42 | ||||
-rw-r--r-- | src/declarative/items/qquickflickable_p_p.h (renamed from src/declarative/items/qsgflickable_p_p.h) | 52 | ||||
-rw-r--r-- | src/declarative/items/qquickflipable.cpp (renamed from src/declarative/items/qsgflipable.cpp) | 90 | ||||
-rw-r--r-- | src/declarative/items/qquickflipable_p.h (renamed from src/declarative/items/qsgflipable_p.h) | 34 | ||||
-rw-r--r-- | src/declarative/items/qquickfocusscope.cpp (renamed from src/declarative/items/qsgfocusscope.cpp) | 10 | ||||
-rw-r--r-- | src/declarative/items/qquickfocusscope_p.h (renamed from src/declarative/items/qsgfocusscope_p.h) | 16 | ||||
-rw-r--r-- | src/declarative/items/qquickgridview.cpp (renamed from src/declarative/items/qsggridview.cpp) | 352 | ||||
-rw-r--r-- | src/declarative/items/qquickgridview_p.h (renamed from src/declarative/items/qsggridview_p.h) | 44 | ||||
-rw-r--r-- | src/declarative/items/qquickimage.cpp (renamed from src/declarative/items/qsgimage.cpp) | 122 | ||||
-rw-r--r-- | src/declarative/items/qquickimage_p.h (renamed from src/declarative/items/qsgimage_p.h) | 24 | ||||
-rw-r--r-- | src/declarative/items/qquickimage_p_p.h (renamed from src/declarative/items/qsgimage_p_p.h) | 26 | ||||
-rw-r--r-- | src/declarative/items/qquickimagebase.cpp (renamed from src/declarative/items/qsgimagebase.cpp) | 98 | ||||
-rw-r--r-- | src/declarative/items/qquickimagebase_p.h (renamed from src/declarative/items/qsgimagebase_p.h) | 24 | ||||
-rw-r--r-- | src/declarative/items/qquickimagebase_p_p.h (renamed from src/declarative/items/qsgimagebase_p_p.h) | 20 | ||||
-rw-r--r-- | src/declarative/items/qquickimplicitsizeitem.cpp (renamed from src/declarative/items/qsgimplicitsizeitem.cpp) | 36 | ||||
-rw-r--r-- | src/declarative/items/qquickimplicitsizeitem_p.h (renamed from src/declarative/items/qsgimplicitsizeitem_p.h) | 32 | ||||
-rw-r--r-- | src/declarative/items/qquickimplicitsizeitem_p_p.h (renamed from src/declarative/items/qsgimplicitsizeitem_p_p.h) | 24 | ||||
-rw-r--r-- | src/declarative/items/qquickitem.cpp (renamed from src/declarative/items/qsgitem.cpp) | 1498 | ||||
-rw-r--r-- | src/declarative/items/qquickitem.h (renamed from src/declarative/items/qsgitem.h) | 133 | ||||
-rw-r--r-- | src/declarative/items/qquickitem_p.h (renamed from src/declarative/items/qsgitem_p.h) | 396 | ||||
-rw-r--r-- | src/declarative/items/qquickitemchangelistener_p.h (renamed from src/declarative/items/qsgitemchangelistener_p.h) | 32 | ||||
-rw-r--r-- | src/declarative/items/qquickitemsmodule.cpp | 228 | ||||
-rw-r--r-- | src/declarative/items/qquickitemsmodule_p.h (renamed from src/declarative/items/qsgitemsmodule_p.h) | 8 | ||||
-rw-r--r-- | src/declarative/items/qquickitemview.cpp (renamed from src/declarative/items/qsgitemview.cpp) | 488 | ||||
-rw-r--r-- | src/declarative/items/qquickitemview_p.h (renamed from src/declarative/items/qsgitemview_p.h) | 44 | ||||
-rw-r--r-- | src/declarative/items/qquickitemview_p_p.h (renamed from src/declarative/items/qsgitemview_p_p.h) | 44 | ||||
-rw-r--r-- | src/declarative/items/qquicklistview.cpp (renamed from src/declarative/items/qsglistview.cpp) | 496 | ||||
-rw-r--r-- | src/declarative/items/qquicklistview_p.h (renamed from src/declarative/items/qsglistview_p.h) | 58 | ||||
-rw-r--r-- | src/declarative/items/qquickloader.cpp (renamed from src/declarative/items/qsgloader.cpp) | 152 | ||||
-rw-r--r-- | src/declarative/items/qquickloader_p.h (renamed from src/declarative/items/qsgloader_p.h) | 26 | ||||
-rw-r--r-- | src/declarative/items/qquickloader_p_p.h (renamed from src/declarative/items/qsgloader_p_p.h) | 34 | ||||
-rw-r--r-- | src/declarative/items/qquickmousearea.cpp (renamed from src/declarative/items/qsgmousearea.cpp) | 276 | ||||
-rw-r--r-- | src/declarative/items/qquickmousearea_p.h (renamed from src/declarative/items/qsgmousearea_p.h) | 70 | ||||
-rw-r--r-- | src/declarative/items/qquickmousearea_p_p.h (renamed from src/declarative/items/qsgmousearea_p_p.h) | 26 | ||||
-rw-r--r-- | src/declarative/items/qquickninepatchnode.cpp (renamed from src/declarative/items/qsgninepatchnode.cpp) | 46 | ||||
-rw-r--r-- | src/declarative/items/qquickninepatchnode_p.h (renamed from src/declarative/items/qsgninepatchnode_p.h) | 24 | ||||
-rw-r--r-- | src/declarative/items/qquickpainteditem.cpp (renamed from src/declarative/items/qsgpainteditem.cpp) | 159 | ||||
-rw-r--r-- | src/declarative/items/qquickpainteditem.h (renamed from src/declarative/items/qsgpainteditem.h) | 24 | ||||
-rw-r--r-- | src/declarative/items/qquickpainteditem_p.h (renamed from src/declarative/items/qsgpainteditem_p.h) | 16 | ||||
-rw-r--r-- | src/declarative/items/qquickpathview.cpp (renamed from src/declarative/items/qsgpathview.cpp) | 448 | ||||
-rw-r--r-- | src/declarative/items/qquickpathview_p.h (renamed from src/declarative/items/qsgpathview_p.h) | 60 | ||||
-rw-r--r-- | src/declarative/items/qquickpathview_p_p.h (renamed from src/declarative/items/qsgpathview_p_p.h) | 54 | ||||
-rw-r--r-- | src/declarative/items/qquickpincharea.cpp (renamed from src/declarative/items/qsgpincharea.cpp) | 106 | ||||
-rw-r--r-- | src/declarative/items/qquickpincharea_p.h (renamed from src/declarative/items/qsgpincharea_p.h) | 56 | ||||
-rw-r--r-- | src/declarative/items/qquickpincharea_p_p.h (renamed from src/declarative/items/qsgpincharea_p_p.h) | 24 | ||||
-rw-r--r-- | src/declarative/items/qquickpositioners.cpp (renamed from src/declarative/items/qsgpositioners.cpp) | 294 | ||||
-rw-r--r-- | src/declarative/items/qquickpositioners_p.h (renamed from src/declarative/items/qsgpositioners_p.h) | 76 | ||||
-rw-r--r-- | src/declarative/items/qquickpositioners_p_p.h (renamed from src/declarative/items/qsgpositioners_p_p.h) | 48 | ||||
-rw-r--r-- | src/declarative/items/qquickrectangle.cpp (renamed from src/declarative/items/qsgrectangle.cpp) | 112 | ||||
-rw-r--r-- | src/declarative/items/qquickrectangle_p.h (renamed from src/declarative/items/qsgrectangle_p.h) | 60 | ||||
-rw-r--r-- | src/declarative/items/qquickrectangle_p_p.h (renamed from src/declarative/items/qsgrectangle_p_p.h) | 34 | ||||
-rw-r--r-- | src/declarative/items/qquickrepeater.cpp (renamed from src/declarative/items/qsgrepeater.cpp) | 106 | ||||
-rw-r--r-- | src/declarative/items/qquickrepeater_p.h (renamed from src/declarative/items/qsgrepeater_p.h) | 28 | ||||
-rw-r--r-- | src/declarative/items/qquickrepeater_p_p.h (renamed from src/declarative/items/qsgrepeater_p_p.h) | 24 | ||||
-rw-r--r-- | src/declarative/items/qquickscalegrid.cpp (renamed from src/declarative/items/qsgscalegrid.cpp) | 56 | ||||
-rw-r--r-- | src/declarative/items/qquickscalegrid_p_p.h (renamed from src/declarative/items/qsgscalegrid_p_p.h) | 36 | ||||
-rw-r--r-- | src/declarative/items/qquickshadereffect.cpp (renamed from src/declarative/items/qsgshadereffect.cpp) | 102 | ||||
-rw-r--r-- | src/declarative/items/qquickshadereffect_p.h (renamed from src/declarative/items/qsgshadereffect_p.h) | 42 | ||||
-rw-r--r-- | src/declarative/items/qquickshadereffectmesh.cpp (renamed from src/declarative/items/qsgshadereffectmesh.cpp) | 26 | ||||
-rw-r--r-- | src/declarative/items/qquickshadereffectmesh_p.h (renamed from src/declarative/items/qsgshadereffectmesh_p.h) | 14 | ||||
-rw-r--r-- | src/declarative/items/qquickshadereffectnode.cpp (renamed from src/declarative/items/qsgshadereffectnode.cpp) | 76 | ||||
-rw-r--r-- | src/declarative/items/qquickshadereffectnode_p.h (renamed from src/declarative/items/qsgshadereffectnode_p.h) | 47 | ||||
-rw-r--r-- | src/declarative/items/qquickshadereffectsource.cpp (renamed from src/declarative/items/qsgshadereffectsource.cpp) | 162 | ||||
-rw-r--r-- | src/declarative/items/qquickshadereffectsource_p.h (renamed from src/declarative/items/qsgshadereffectsource_p.h) | 40 | ||||
-rw-r--r-- | src/declarative/items/qquicksprite.cpp (renamed from src/declarative/items/qsgsprite.cpp) | 8 | ||||
-rw-r--r-- | src/declarative/items/qquicksprite_p.h (renamed from src/declarative/items/qsgsprite_p.h) | 16 | ||||
-rw-r--r-- | src/declarative/items/qquickspriteengine.cpp (renamed from src/declarative/items/qsgspriteengine.cpp) | 72 | ||||
-rw-r--r-- | src/declarative/items/qquickspriteengine_p.h (renamed from src/declarative/items/qsgspriteengine_p.h) | 66 | ||||
-rw-r--r-- | src/declarative/items/qquickspriteimage.cpp (renamed from src/declarative/items/qsgspriteimage.cpp) | 46 | ||||
-rw-r--r-- | src/declarative/items/qquickspriteimage_p.h (renamed from src/declarative/items/qsgspriteimage_p.h) | 28 | ||||
-rw-r--r-- | src/declarative/items/qquickstateoperations.cpp (renamed from src/declarative/items/qsgstateoperations.cpp) | 558 | ||||
-rw-r--r-- | src/declarative/items/qquickstateoperations_p.h (renamed from src/declarative/items/qsgstateoperations_p.h) | 90 | ||||
-rw-r--r-- | src/declarative/items/qquicktext.cpp (renamed from src/declarative/items/qsgtext.cpp) | 424 | ||||
-rw-r--r-- | src/declarative/items/qquicktext_p.h (renamed from src/declarative/items/qsgtext_p.h) | 32 | ||||
-rw-r--r-- | src/declarative/items/qquicktext_p_p.h (renamed from src/declarative/items/qsgtext_p_p.h) | 42 | ||||
-rw-r--r-- | src/declarative/items/qquicktextedit.cpp (renamed from src/declarative/items/qsgtextedit.cpp) | 480 | ||||
-rw-r--r-- | src/declarative/items/qquicktextedit_p.h (renamed from src/declarative/items/qsgtextedit_p.h) | 20 | ||||
-rw-r--r-- | src/declarative/items/qquicktextedit_p_p.h (renamed from src/declarative/items/qsgtextedit_p_p.h) | 36 | ||||
-rw-r--r-- | src/declarative/items/qquicktextinput.cpp (renamed from src/declarative/items/qsgtextinput.cpp) | 458 | ||||
-rw-r--r-- | src/declarative/items/qquicktextinput_p.h (renamed from src/declarative/items/qsgtextinput_p.h) | 20 | ||||
-rw-r--r-- | src/declarative/items/qquicktextinput_p_p.h (renamed from src/declarative/items/qsgtextinput_p_p.h) | 44 | ||||
-rw-r--r-- | src/declarative/items/qquicktextnode.cpp (renamed from src/declarative/items/qsgtextnode.cpp) | 82 | ||||
-rw-r--r-- | src/declarative/items/qquicktextnode_p.h (renamed from src/declarative/items/qsgtextnode_p.h) | 20 | ||||
-rw-r--r-- | src/declarative/items/qquicktranslate.cpp (renamed from src/declarative/items/qsgtranslate.cpp) | 126 | ||||
-rw-r--r-- | src/declarative/items/qquicktranslate_p.h (renamed from src/declarative/items/qsgtranslate_p.h) | 40 | ||||
-rw-r--r-- | src/declarative/items/qquickview.cpp (renamed from src/declarative/items/qsgview.cpp) | 160 | ||||
-rw-r--r-- | src/declarative/items/qquickview.h (renamed from src/declarative/items/qsgview.h) | 28 | ||||
-rw-r--r-- | src/declarative/items/qquickview_p.h (renamed from src/declarative/items/qsgview_p.h) | 34 | ||||
-rw-r--r-- | src/declarative/items/qquickvisualadaptormodel.cpp (renamed from src/declarative/items/qsgvisualadaptormodel.cpp) | 280 | ||||
-rw-r--r-- | src/declarative/items/qquickvisualadaptormodel_p.h (renamed from src/declarative/items/qsgvisualadaptormodel_p.h) | 22 | ||||
-rw-r--r-- | src/declarative/items/qquickvisualdatamodel.cpp (renamed from src/declarative/items/qsgvisualdatamodel.cpp) | 756 | ||||
-rw-r--r-- | src/declarative/items/qquickvisualdatamodel_p.h (renamed from src/declarative/items/qsgvisualdatamodel_p.h) | 90 | ||||
-rw-r--r-- | src/declarative/items/qquickvisualitemmodel.cpp (renamed from src/declarative/items/qsgvisualitemmodel.cpp) | 84 | ||||
-rw-r--r-- | src/declarative/items/qquickvisualitemmodel_p.h (renamed from src/declarative/items/qsgvisualitemmodel_p.h) | 72 | ||||
-rw-r--r-- | src/declarative/items/qsgitemsmodule.cpp | 228 | ||||
-rw-r--r-- | src/declarative/particles/qsgage.cpp | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgage_p.h | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgcustomaffector.cpp | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgcustomaffector_p.h | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgcustomparticle.cpp | 24 | ||||
-rw-r--r-- | src/declarative/particles/qsgcustomparticle_p.h | 14 | ||||
-rw-r--r-- | src/declarative/particles/qsgfriction.cpp | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgfriction_p.h | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsggravity.cpp | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsggravity_p.h | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsggroupgoal.cpp | 8 | ||||
-rw-r--r-- | src/declarative/particles/qsggroupgoal_p.h | 4 | ||||
-rw-r--r-- | src/declarative/particles/qsgimageparticle.cpp | 12 | ||||
-rw-r--r-- | src/declarative/particles/qsgimageparticle_p.h | 16 | ||||
-rw-r--r-- | src/declarative/particles/qsgitemparticle.cpp | 46 | ||||
-rw-r--r-- | src/declarative/particles/qsgitemparticle_p.h | 38 | ||||
-rw-r--r-- | src/declarative/particles/qsgmove.cpp | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgmove_p.h | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgparticleaffector.cpp | 6 | ||||
-rw-r--r-- | src/declarative/particles/qsgparticleaffector_p.h | 4 | ||||
-rw-r--r-- | src/declarative/particles/qsgparticleemitter.cpp | 6 | ||||
-rw-r--r-- | src/declarative/particles/qsgparticleemitter_p.h | 6 | ||||
-rw-r--r-- | src/declarative/particles/qsgparticlegroup.cpp | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgparticlegroup_p.h | 4 | ||||
-rw-r--r-- | src/declarative/particles/qsgparticlepainter.cpp | 6 | ||||
-rw-r--r-- | src/declarative/particles/qsgparticlepainter_p.h | 4 | ||||
-rw-r--r-- | src/declarative/particles/qsgparticlesmodule.cpp | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgparticlesystem.cpp | 16 | ||||
-rw-r--r-- | src/declarative/particles/qsgparticlesystem_p.h | 16 | ||||
-rw-r--r-- | src/declarative/particles/qsgpointattractor.cpp | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgpointattractor_p.h | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgspritegoal.cpp | 10 | ||||
-rw-r--r-- | src/declarative/particles/qsgspritegoal_p.h | 8 | ||||
-rw-r--r-- | src/declarative/particles/qsgtargetaffector.cpp | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgtargetaffector_p.h | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgtargetdirection_p.h | 12 | ||||
-rw-r--r-- | src/declarative/particles/qsgtrailemitter.cpp | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgtrailemitter_p.h | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgturbulence.cpp | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgturbulence_p.h | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgv8particledata.cpp | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgwander.cpp | 2 | ||||
-rw-r--r-- | src/declarative/particles/qsgwander_p.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeengine.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/v4/qv4bindings.cpp | 12 | ||||
-rw-r--r-- | src/declarative/qml/v4/qv4compiler.cpp | 6 | ||||
-rw-r--r-- | src/declarative/qml/v4/qv4irbuilder.cpp | 4 | ||||
-rw-r--r-- | src/declarative/scenegraph/qsgadaptationlayer_p.h | 6 | ||||
-rw-r--r-- | src/declarative/scenegraph/qsgcontext.cpp | 2 | ||||
-rw-r--r-- | src/declarative/scenegraph/qsgdefaultglyphnode_p.h | 2 | ||||
-rw-r--r-- | src/declarative/scenegraph/qsgdistancefieldglyphnode.cpp | 10 | ||||
-rw-r--r-- | src/declarative/scenegraph/qsgdistancefieldglyphnode_p.h | 7 | ||||
-rw-r--r-- | src/declarative/scenegraph/util/qsgpainternode.cpp | 36 | ||||
-rw-r--r-- | src/declarative/scenegraph/util/qsgpainternode_p.h | 13 | ||||
-rw-r--r-- | src/declarative/scenegraph/util/qsgtextureprovider.cpp | 3 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativepath_p.h | 2 | ||||
-rw-r--r-- | src/imports/testlib/main.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.h | 2 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_inspector/qdeclarativeinspectorplugin.cpp | 4 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_inspector/sghighlight.cpp | 8 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_inspector/sghighlight.h | 16 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_inspector/sgselectiontool.cpp | 24 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_inspector/sgselectiontool.h | 4 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_inspector/sgviewinspector.cpp | 78 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_inspector/sgviewinspector.h | 30 | ||||
-rw-r--r-- | src/qmltest/quicktest.cpp | 6 | ||||
-rw-r--r-- | src/qmltest/quicktestevent.cpp | 10 | ||||
-rw-r--r-- | tests/auto/declarative/debugger/qdeclarativeenginedebug/tst_qdeclarativeenginedebug.cpp | 10 | ||||
-rw-r--r-- | tests/auto/declarative/declarative.pro | 54 | ||||
-rw-r--r-- | tests/auto/declarative/examples/tst_examples.cpp | 10 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp | 194 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp | 18 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp | 122 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp | 16 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp | 14 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp | 34 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp | 44 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp | 30 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp | 12 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp | 376 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qmlmin/tst_qmlmin.cpp | 3 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/colors.gif (renamed from tests/auto/declarative/qsganimatedimage/data/colors.gif) | bin | 505 -> 505 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/colors.qml (renamed from tests/auto/declarative/qsganimatedimage/data/colors.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/hearts.gif (renamed from tests/auto/declarative/qsganimatedimage/data/hearts.gif) | bin | 6524 -> 6524 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/hearts.qml (renamed from tests/auto/declarative/qsganimatedimage/data/hearts.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/qmldir (renamed from tests/auto/declarative/qsganimatedimage/data/qmldir) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/qtbug-16520.qml (renamed from tests/auto/declarative/qsganimatedimage/data/qtbug-16520.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/stickman.gif (renamed from tests/auto/declarative/qsganimatedimage/data/stickman.gif) | bin | 164923 -> 164923 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/stickman.qml (renamed from tests/auto/declarative/qsganimatedimage/data/stickman.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/stickmanerror1.qml (renamed from tests/auto/declarative/qsganimatedimage/data/stickmanerror1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/stickmanpause.qml (renamed from tests/auto/declarative/qsganimatedimage/data/stickmanpause.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/stickmanscaled.qml (renamed from tests/auto/declarative/qsganimatedimage/data/stickmanscaled.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/data/stickmanstopped.qml (renamed from tests/auto/declarative/qsganimatedimage/data/stickmanstopped.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/qquickanimatedimage.pro (renamed from tests/auto/declarative/qsganimatedimage/qsganimatedimage.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickanimatedimage/tst_qquickanimatedimage.cpp (renamed from tests/auto/declarative/qsganimatedimage/tst_qsganimatedimage.cpp) | 90 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/colors-mirror.png (renamed from tests/auto/declarative/qsgborderimage/data/colors-mirror.png) | bin | 5554 -> 5554 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/colors-round-quotes.sci (renamed from tests/auto/declarative/qsgborderimage/data/colors-round-quotes.sci) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/colors-round-remote.sci (renamed from tests/auto/declarative/qsgborderimage/data/colors-round-remote.sci) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/colors-round.sci (renamed from tests/auto/declarative/qsgborderimage/data/colors-round.sci) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/colors.png (renamed from tests/auto/declarative/qsgborderimage/data/colors.png) | bin | 1655 -> 1655 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/heart200.png (renamed from tests/auto/declarative/qsgborderimage/data/heart200.png) | bin | 7943 -> 7943 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/invalid.sci (renamed from tests/auto/declarative/qsgborderimage/data/invalid.sci) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/data/mirror.qml (renamed from tests/auto/declarative/qsgborderimage/data/mirror.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/qquickborderimage.pro (renamed from tests/auto/declarative/qsgborderimage/qsgborderimage.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickborderimage/tst_qquickborderimage.cpp (renamed from tests/auto/declarative/qsgborderimage/tst_qsgborderimage.cpp) | 126 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvas/qquickcanvas.pro (renamed from tests/auto/declarative/qsgcanvas/qsgcanvas.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvas/tst_qquickcanvas.cpp (renamed from tests/auto/declarative/qsgcanvas/tst_qsgcanvas.cpp) | 58 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/anim-gr.gif (renamed from tests/auto/declarative/qsgcanvasitem/data/anim-gr.gif) | bin | 241 -> 241 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/anim-gr.png (renamed from tests/auto/declarative/qsgcanvasitem/data/anim-gr.png) | bin | 460 -> 460 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/anim-poster-gr.png (renamed from tests/auto/declarative/qsgcanvasitem/data/anim-poster-gr.png) | bin | 422 -> 422 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/background.png (renamed from tests/auto/declarative/qsgcanvasitem/data/background.png) | bin | 86 -> 86 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/broken.png (renamed from tests/auto/declarative/qsgcanvasitem/data/broken.png) | bin | 87 -> 87 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/ggrr-256x256.png (renamed from tests/auto/declarative/qsgcanvasitem/data/ggrr-256x256.png) | bin | 120 -> 120 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/green-16x16.png (renamed from tests/auto/declarative/qsgcanvasitem/data/green-16x16.png) | bin | 92 -> 92 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/green-1x1.png (renamed from tests/auto/declarative/qsgcanvasitem/data/green-1x1.png) | bin | 82 -> 82 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/green-256x256.png (renamed from tests/auto/declarative/qsgcanvasitem/data/green-256x256.png) | bin | 103 -> 103 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/green-2x2.png (renamed from tests/auto/declarative/qsgcanvasitem/data/green-2x2.png) | bin | 118 -> 118 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/green.png (renamed from tests/auto/declarative/qsgcanvasitem/data/green.png) | bin | 87 -> 87 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/grgr-256x256.png (renamed from tests/auto/declarative/qsgcanvasitem/data/grgr-256x256.png) | bin | 130 -> 130 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/red-16x16.png (renamed from tests/auto/declarative/qsgcanvasitem/data/red-16x16.png) | bin | 130 -> 130 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/red.png (renamed from tests/auto/declarative/qsgcanvasitem/data/red.png) | bin | 87 -> 87 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/redtransparent.png (renamed from tests/auto/declarative/qsgcanvasitem/data/redtransparent.png) | bin | 109 -> 109 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/rgrg-256x256.png (renamed from tests/auto/declarative/qsgcanvasitem/data/rgrg-256x256.png) | bin | 131 -> 131 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/rrgg-256x256.png (renamed from tests/auto/declarative/qsgcanvasitem/data/rrgg-256x256.png) | bin | 120 -> 120 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/testhelper.js (renamed from tests/auto/declarative/qsgcanvasitem/data/testhelper.js) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/transparent.png (renamed from tests/auto/declarative/qsgcanvasitem/data/transparent.png) | bin | 100 -> 100 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/transparent50.png (renamed from tests/auto/declarative/qsgcanvasitem/data/transparent50.png) | bin | 155 -> 155 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_arc.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_arc.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_arcto.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_arcto.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_canvas.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_canvas.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_composite.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_composite.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_drawimage.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_drawimage.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_fillStyle.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_fillStyle.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_fillrect.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_fillrect.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_gradient.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_gradient.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_line.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_line.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_path.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_path.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_pattern.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_pattern.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_pixel.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_pixel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_shadow.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_shadow.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_state.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_state.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_strokeStyle.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_strokeStyle.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_text.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_text.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/tst_transform.qml (renamed from tests/auto/declarative/qsgcanvasitem/data/tst_transform.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/yellow.png (renamed from tests/auto/declarative/qsgcanvasitem/data/yellow.png) | bin | 95 -> 95 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/data/yellow75.png (renamed from tests/auto/declarative/qsgcanvasitem/data/yellow75.png) | bin | 150 -> 150 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/qquickcanvasitem.pro (renamed from tests/auto/declarative/qsgcanvasitem/qsgcanvasitem.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickcanvasitem/tst_qquickcanvasitem.cpp (renamed from tests/auto/declarative/qsgcanvasitem/tst_qsgcanvasitem.cpp) | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qquickdrag/qquickdrag.pro (renamed from tests/auto/declarative/qsgdrag/qsgdrag.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickdrag/tst_qquickdrag.cpp (renamed from tests/auto/declarative/qsgdrag/tst_qsgdrag.cpp) | 86 | ||||
-rw-r--r-- | tests/auto/declarative/qquickdroparea/qquickdroparea.pro (renamed from tests/auto/declarative/qsgdroparea/qsgdroparea.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickdroparea/tst_qquickdroparea.cpp (renamed from tests/auto/declarative/qsgdroparea/tst_qsgdroparea.cpp) | 103 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/disabled.qml (renamed from tests/auto/declarative/qsgflickable/data/disabled.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/flickable01.qml (renamed from tests/auto/declarative/qsgflickable/data/flickable01.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/flickable02.qml (renamed from tests/auto/declarative/qsgflickable/data/flickable02.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/flickable03.qml (renamed from tests/auto/declarative/qsgflickable/data/flickable03.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/flickable04.qml (renamed from tests/auto/declarative/qsgflickable/data/flickable04.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/flickableqgraphicswidget.qml (renamed from tests/auto/declarative/qsgflickable/data/flickableqgraphicswidget.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/margins.qml (renamed from tests/auto/declarative/qsgflickable/data/margins.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/nestedPressDelay.qml (renamed from tests/auto/declarative/qsgflickable/data/nestedPressDelay.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/resize.qml (renamed from tests/auto/declarative/qsgflickable/data/resize.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/data/wheel.qml (renamed from tests/auto/declarative/qsgflickable/data/wheel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/qquickflickable.pro (renamed from tests/auto/declarative/qsgflickable/qsgflickable.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflickable/tst_qquickflickable.cpp (renamed from tests/auto/declarative/qsgflickable/tst_qsgflickable.cpp) | 156 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflipable/data/crash.qml (renamed from tests/auto/declarative/qsgflipable/data/crash.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflipable/data/flipable-abort.qml (renamed from tests/auto/declarative/qsgflipable/data/flipable-abort.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflipable/data/test-flipable.qml (renamed from tests/auto/declarative/qsgflipable/data/test-flipable.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflipable/qquickflipable.pro (renamed from tests/auto/declarative/qsgflipable/qsgflipable.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickflipable/tst_qquickflipable.cpp (renamed from tests/auto/declarative/qsgflipable/tst_qsgflipable.cpp) | 48 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/canvasFocus.qml (renamed from tests/auto/declarative/qsgfocusscope/data/canvasFocus.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/chain.qml (renamed from tests/auto/declarative/qsgfocusscope/data/chain.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/forceActiveFocus.qml (renamed from tests/auto/declarative/qsgfocusscope/data/forceActiveFocus.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/forcefocus.qml (renamed from tests/auto/declarative/qsgfocusscope/data/forcefocus.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/qtBug13380.qml (renamed from tests/auto/declarative/qsgfocusscope/data/qtBug13380.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/signalEmission.qml (renamed from tests/auto/declarative/qsgfocusscope/data/signalEmission.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/test.qml (renamed from tests/auto/declarative/qsgfocusscope/data/test.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/test2.qml (renamed from tests/auto/declarative/qsgfocusscope/data/test2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/test3.qml (renamed from tests/auto/declarative/qsgfocusscope/data/test3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/test4.qml (renamed from tests/auto/declarative/qsgfocusscope/data/test4.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/data/test5.qml (renamed from tests/auto/declarative/qsgfocusscope/data/test5.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/qquickfocusscope.pro (renamed from tests/auto/declarative/qsgfocusscope/qsgfocusscope.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickfocusscope/tst_qquickfocusscope.cpp (renamed from tests/auto/declarative/qsgfocusscope/tst_qsgfocusscope.cpp) | 152 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/ComponentView.qml (renamed from tests/auto/declarative/qsggridview/data/ComponentView.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/attachedSignals.qml (renamed from tests/auto/declarative/qsggridview/data/attachedSignals.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/creationContext.qml (renamed from tests/auto/declarative/qsggridview/data/creationContext.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/displaygrid.qml (renamed from tests/auto/declarative/qsggridview/data/displaygrid.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/footer.qml (renamed from tests/auto/declarative/qsggridview/data/footer.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview-enforcerange.qml (renamed from tests/auto/declarative/qsggridview/data/gridview-enforcerange.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview-initCurrent.qml (renamed from tests/auto/declarative/qsggridview/data/gridview-initCurrent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview-noCurrent.qml (renamed from tests/auto/declarative/qsggridview/data/gridview-noCurrent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview1.qml (renamed from tests/auto/declarative/qsggridview/data/gridview1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview2.qml (renamed from tests/auto/declarative/qsggridview/data/gridview2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview3.qml (renamed from tests/auto/declarative/qsggridview/data/gridview3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/gridview4.qml (renamed from tests/auto/declarative/qsggridview/data/gridview4.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/header.qml (renamed from tests/auto/declarative/qsggridview/data/header.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/manual-highlight.qml (renamed from tests/auto/declarative/qsggridview/data/manual-highlight.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/margins.qml (renamed from tests/auto/declarative/qsggridview/data/margins.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/mirroring.qml (renamed from tests/auto/declarative/qsggridview/data/mirroring.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/propertychangestest.qml (renamed from tests/auto/declarative/qsggridview/data/propertychangestest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/resizeview.qml (renamed from tests/auto/declarative/qsggridview/data/resizeview.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/setindex.qml (renamed from tests/auto/declarative/qsggridview/data/setindex.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/data/snapToRow.qml (renamed from tests/auto/declarative/qsggridview/data/snapToRow.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/qquickgridview.pro (renamed from tests/auto/declarative/qsggridview/qsggridview.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickgridview/tst_qquickgridview.cpp (renamed from tests/auto/declarative/qsggridview/tst_qsggridview.cpp) | 758 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/aspectratio.qml (renamed from tests/auto/declarative/qsgimage/data/aspectratio.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/big.jpeg (renamed from tests/auto/declarative/qsgimage/data/big.jpeg) | bin | 1700081 -> 1700081 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/big256.png (renamed from tests/auto/declarative/qsgimage/data/big256.png) | bin | 3566 -> 3566 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/colors.png (renamed from tests/auto/declarative/qsgimage/data/colors.png) | bin | 1655 -> 1655 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/colors1.png (renamed from tests/auto/declarative/qsgimage/data/colors1.png) | bin | 1655 -> 1655 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/green.png (renamed from tests/auto/declarative/qsgimage/data/green.png) | bin | 314 -> 314 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/heart-win32.png (renamed from tests/auto/declarative/qsgimage/data/heart-win32.png) | bin | 12621 -> 12621 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/heart.png (renamed from tests/auto/declarative/qsgimage/data/heart.png) | bin | 12577 -> 12577 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/heart.svg (renamed from tests/auto/declarative/qsgimage/data/heart.svg) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/heart200-win32.png (renamed from tests/auto/declarative/qsgimage/data/heart200-win32.png) | bin | 8062 -> 8062 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/heart200.png (renamed from tests/auto/declarative/qsgimage/data/heart200.png) | bin | 8063 -> 8063 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/htiling.qml (renamed from tests/auto/declarative/qsgimage/data/htiling.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/mirror.qml (renamed from tests/auto/declarative/qsgimage/data/mirror.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/nullpixmap.qml (renamed from tests/auto/declarative/qsgimage/data/nullpixmap.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/pattern.png (renamed from tests/auto/declarative/qsgimage/data/pattern.png) | bin | 1371 -> 1371 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/qtbug_16389.qml (renamed from tests/auto/declarative/qsgimage/data/qtbug_16389.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/rect.png (renamed from tests/auto/declarative/qsgimage/data/rect.png) | bin | 171 -> 171 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquickimage/data/vtiling.qml (renamed from tests/auto/declarative/qsgimage/data/vtiling.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/qquickimage.pro (renamed from tests/auto/declarative/qsgimage/qsgimage.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickimage/tst_qquickimage.cpp (renamed from tests/auto/declarative/qsgimage/tst_qsgimage.cpp) | 168 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem/qquickitem.pro (renamed from tests/auto/declarative/qsgitem/qsgitem.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem/tst_qquickitem.cpp (renamed from tests/auto/declarative/qsgitem/tst_qsgitem.cpp) | 244 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/childrenProperty.qml (renamed from tests/auto/declarative/qsgitem2/data/childrenProperty.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/childrenRect.qml (renamed from tests/auto/declarative/qsgitem2/data/childrenRect.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/childrenRectBug.qml (renamed from tests/auto/declarative/qsgitem2/data/childrenRectBug.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/childrenRectBug2.qml (renamed from tests/auto/declarative/qsgitem2/data/childrenRectBug2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/childrenRectBug3.qml (renamed from tests/auto/declarative/qsgitem2/data/childrenRectBug3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/implicitsize.qml (renamed from tests/auto/declarative/qsgitem2/data/implicitsize.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/keynavigationtest.qml (renamed from tests/auto/declarative/qsgitem2/data/keynavigationtest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/keynavigationtest_implicit.qml (renamed from tests/auto/declarative/qsgitem2/data/keynavigationtest_implicit.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/keyspriority.qml (renamed from tests/auto/declarative/qsgitem2/data/keyspriority.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/keystest.qml (renamed from tests/auto/declarative/qsgitem2/data/keystest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/layoutmirroring.qml (renamed from tests/auto/declarative/qsgitem2/data/layoutmirroring.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/mapCoordinates.qml (renamed from tests/auto/declarative/qsgitem2/data/mapCoordinates.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/propertychanges.qml (renamed from tests/auto/declarative/qsgitem2/data/propertychanges.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/qtbug_16871.qml (renamed from tests/auto/declarative/qsgitem2/data/qtbug_16871.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/resourcesProperty.qml (renamed from tests/auto/declarative/qsgitem2/data/resourcesProperty.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/data/transformCrash.qml (renamed from tests/auto/declarative/qsgitem2/data/transformCrash.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/qquickitem2.pro (renamed from tests/auto/declarative/qsgitem2/qsgitem2.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickitem2/tst_qquickitem.cpp (renamed from tests/auto/declarative/qsgitem2/tst_qsgitem.cpp) | 270 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/ComponentView.qml (renamed from tests/auto/declarative/qsglistview/data/ComponentView.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/attachedSignals.qml (renamed from tests/auto/declarative/qsglistview/data/attachedSignals.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/creationContext.qml (renamed from tests/auto/declarative/qsglistview/data/creationContext.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/displaylist.qml (renamed from tests/auto/declarative/qsglistview/data/displaylist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/fillModelOnComponentCompleted.qml (renamed from tests/auto/declarative/qsglistview/data/fillModelOnComponentCompleted.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/footer.qml (renamed from tests/auto/declarative/qsglistview/data/footer.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/header.qml (renamed from tests/auto/declarative/qsglistview/data/header.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/headerfooter.qml (renamed from tests/auto/declarative/qsglistview/data/headerfooter.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/itemlist.qml (renamed from tests/auto/declarative/qsglistview/data/itemlist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listview-enforcerange-nohighlight.qml (renamed from tests/auto/declarative/qsglistview/data/listview-enforcerange-nohighlight.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listview-enforcerange.qml (renamed from tests/auto/declarative/qsglistview/data/listview-enforcerange.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listview-initCurrent.qml (renamed from tests/auto/declarative/qsglistview/data/listview-initCurrent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listview-noCurrent.qml (renamed from tests/auto/declarative/qsglistview/data/listview-noCurrent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listview-sections.qml (renamed from tests/auto/declarative/qsglistview/data/listview-sections.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listview-sections_delegate.qml (renamed from tests/auto/declarative/qsglistview/data/listview-sections_delegate.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/listviewtest.qml (renamed from tests/auto/declarative/qsglistview/data/listviewtest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/manual-highlight.qml (renamed from tests/auto/declarative/qsglistview/data/manual-highlight.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/margins.qml (renamed from tests/auto/declarative/qsglistview/data/margins.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/propertychangestest.qml (renamed from tests/auto/declarative/qsglistview/data/propertychangestest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/qtbug-21742.qml (renamed from tests/auto/declarative/qsglistview/data/qtbug-21742.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/qtbug14821.qml (renamed from tests/auto/declarative/qsglistview/data/qtbug14821.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/qtbug16037.qml (renamed from tests/auto/declarative/qsglistview/data/qtbug16037.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/resizeview.qml (renamed from tests/auto/declarative/qsglistview/data/resizeview.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/rightToLeft.qml (renamed from tests/auto/declarative/qsglistview/data/rightToLeft.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/sizelessthan1.qml (renamed from tests/auto/declarative/qsglistview/data/sizelessthan1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/snapToItem.qml (renamed from tests/auto/declarative/qsglistview/data/snapToItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/data/strictlyenforcerange.qml (renamed from tests/auto/declarative/qsglistview/data/strictlyenforcerange.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/incrementalmodel.cpp (renamed from tests/auto/declarative/qsglistview/incrementalmodel.cpp) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/incrementalmodel.h (renamed from tests/auto/declarative/qsglistview/incrementalmodel.h) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/qquicklistview.pro (renamed from tests/auto/declarative/qsglistview/qsglistview.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquicklistview/tst_qquicklistview.cpp (renamed from tests/auto/declarative/qsglistview/tst_qsglistview.cpp) | 972 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/ActiveComponent.qml (renamed from tests/auto/declarative/qsgloader/data/ActiveComponent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/AnchoredLoader.qml (renamed from tests/auto/declarative/qsgloader/data/AnchoredLoader.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/BigComponent.qml (renamed from tests/auto/declarative/qsgloader/data/BigComponent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/BlueRect.qml (renamed from tests/auto/declarative/qsgloader/data/BlueRect.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/CreationContextLoader.qml (renamed from tests/auto/declarative/qsgloader/data/CreationContextLoader.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/GraphicsWidget250x250.qml (renamed from tests/auto/declarative/qsgloader/data/GraphicsWidget250x250.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/GreenRect.qml (renamed from tests/auto/declarative/qsgloader/data/GreenRect.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/InitialPropertyValuesComponent.qml (renamed from tests/auto/declarative/qsgloader/data/InitialPropertyValuesComponent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/InvalidSourceComponent.qml (renamed from tests/auto/declarative/qsgloader/data/InvalidSourceComponent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/NoResize.qml (renamed from tests/auto/declarative/qsgloader/data/NoResize.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/NoResizeGraphicsWidget.qml (renamed from tests/auto/declarative/qsgloader/data/NoResizeGraphicsWidget.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/QTBUG_16928.qml (renamed from tests/auto/declarative/qsgloader/data/QTBUG_16928.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/QTBUG_17114.qml (renamed from tests/auto/declarative/qsgloader/data/QTBUG_17114.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/Rect120x60.qml (renamed from tests/auto/declarative/qsgloader/data/Rect120x60.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/SetSourceComponent.qml (renamed from tests/auto/declarative/qsgloader/data/SetSourceComponent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/SizeGraphicsWidgetToLoader.qml (renamed from tests/auto/declarative/qsgloader/data/SizeGraphicsWidgetToLoader.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/SizeLoaderToGraphicsWidget.qml (renamed from tests/auto/declarative/qsgloader/data/SizeLoaderToGraphicsWidget.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/SizeToItem.qml (renamed from tests/auto/declarative/qsgloader/data/SizeToItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/SizeToLoader.qml (renamed from tests/auto/declarative/qsgloader/data/SizeToLoader.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/VmeError.qml (renamed from tests/auto/declarative/qsgloader/data/VmeError.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.1.qml (renamed from tests/auto/declarative/qsgloader/data/active.1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.2.qml (renamed from tests/auto/declarative/qsgloader/data/active.2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.3.qml (renamed from tests/auto/declarative/qsgloader/data/active.3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.4.qml (renamed from tests/auto/declarative/qsgloader/data/active.4.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.5.qml (renamed from tests/auto/declarative/qsgloader/data/active.5.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.6.qml (renamed from tests/auto/declarative/qsgloader/data/active.6.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.7.qml (renamed from tests/auto/declarative/qsgloader/data/active.7.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/active.8.qml (renamed from tests/auto/declarative/qsgloader/data/active.8.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/asynchronous.qml (renamed from tests/auto/declarative/qsgloader/data/asynchronous.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/crash.qml (renamed from tests/auto/declarative/qsgloader/data/crash.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/creationContext.qml (renamed from tests/auto/declarative/qsgloader/data/creationContext.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/differentorigin.qml (renamed from tests/auto/declarative/qsgloader/data/differentorigin.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/implicitSize.qml (renamed from tests/auto/declarative/qsgloader/data/implicitSize.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.1.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.2.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.3.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.4.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.4.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.5.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.5.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.6.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.6.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.7.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.7.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.8.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.8.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.binding.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.binding.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.error.1.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.error.1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.error.2.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.error.2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.error.3.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.error.3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/initialPropertyValues.error.4.qml (renamed from tests/auto/declarative/qsgloader/data/initialPropertyValues.error.4.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/nonItem.qml (renamed from tests/auto/declarative/qsgloader/data/nonItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/qmldir (renamed from tests/auto/declarative/qsgloader/data/qmldir) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/sameorigin-load.qml (renamed from tests/auto/declarative/qsgloader/data/sameorigin-load.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/sameorigin.qml (renamed from tests/auto/declarative/qsgloader/data/sameorigin.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/data/vmeErrors.qml (renamed from tests/auto/declarative/qsgloader/data/vmeErrors.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/qquickloader.pro (renamed from tests/auto/declarative/qsgloader/qsgloader.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickloader/tst_qquickloader.cpp (renamed from tests/auto/declarative/qsgloader/tst_qsgloader.cpp) | 214 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/clickThrough.qml (renamed from tests/auto/declarative/qsgmousearea/data/clickThrough.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/clickThrough2.qml (renamed from tests/auto/declarative/qsgmousearea/data/clickThrough2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/clickandhold.qml (renamed from tests/auto/declarative/qsgmousearea/data/clickandhold.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/clicktwice.qml (renamed from tests/auto/declarative/qsgmousearea/data/clicktwice.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/doubleclick.qml (renamed from tests/auto/declarative/qsgmousearea/data/doubleclick.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/dragging.qml (renamed from tests/auto/declarative/qsgmousearea/data/dragging.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/dragproperties.qml (renamed from tests/auto/declarative/qsgmousearea/data/dragproperties.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/dragreset.qml (renamed from tests/auto/declarative/qsgmousearea/data/dragreset.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/hoverPosition.qml (renamed from tests/auto/declarative/qsgmousearea/data/hoverPosition.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/hoverPropagation.qml (renamed from tests/auto/declarative/qsgmousearea/data/hoverPropagation.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/noclickandhold.qml (renamed from tests/auto/declarative/qsgmousearea/data/noclickandhold.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/pressedCanceled.qml (renamed from tests/auto/declarative/qsgmousearea/data/pressedCanceled.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/pressedOrdering.qml (renamed from tests/auto/declarative/qsgmousearea/data/pressedOrdering.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/preventstealing.qml (renamed from tests/auto/declarative/qsgmousearea/data/preventstealing.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/rejectEvent.qml (renamed from tests/auto/declarative/qsgmousearea/data/rejectEvent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/updateMousePosOnClick.qml (renamed from tests/auto/declarative/qsgmousearea/data/updateMousePosOnClick.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/data/updateMousePosOnResize.qml (renamed from tests/auto/declarative/qsgmousearea/data/updateMousePosOnResize.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/qquickmousearea.pro (renamed from tests/auto/declarative/qsgmousearea/qsgmousearea.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickmousearea/tst_qquickmousearea.cpp (renamed from tests/auto/declarative/qsgmousearea/tst_qsgmousearea.cpp) | 138 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/ComponentView.qml (renamed from tests/auto/declarative/qsgpathview/data/ComponentView.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/closedPath.qml (renamed from tests/auto/declarative/qsgpathview/data/closedPath.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/creationContext.qml (renamed from tests/auto/declarative/qsgpathview/data/creationContext.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/datamodel.qml (renamed from tests/auto/declarative/qsgpathview/data/datamodel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/displaypath.qml (renamed from tests/auto/declarative/qsgpathview/data/displaypath.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/dragpath.qml (renamed from tests/auto/declarative/qsgpathview/data/dragpath.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/emptymodel.qml (renamed from tests/auto/declarative/qsgpathview/data/emptymodel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/missingPercent.qml (renamed from tests/auto/declarative/qsgpathview/data/missingPercent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/openPath.qml (renamed from tests/auto/declarative/qsgpathview/data/openPath.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathUpdate.qml (renamed from tests/auto/declarative/qsgpathview/data/pathUpdate.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathUpdateOnStartChanged.qml (renamed from tests/auto/declarative/qsgpathview/data/pathUpdateOnStartChanged.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathtest.qml (renamed from tests/auto/declarative/qsgpathview/data/pathtest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathview0.qml (renamed from tests/auto/declarative/qsgpathview/data/pathview0.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathview1.qml (renamed from tests/auto/declarative/qsgpathview/data/pathview1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathview2.qml (renamed from tests/auto/declarative/qsgpathview/data/pathview2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathview3.qml (renamed from tests/auto/declarative/qsgpathview/data/pathview3.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/pathview_package.qml (renamed from tests/auto/declarative/qsgpathview/data/pathview_package.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/propertychanges.qml (renamed from tests/auto/declarative/qsgpathview/data/propertychanges.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/treemodel.qml (renamed from tests/auto/declarative/qsgpathview/data/treemodel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/undefinedpath.qml (renamed from tests/auto/declarative/qsgpathview/data/undefinedpath.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/data/vdm.qml (renamed from tests/auto/declarative/qsgpathview/data/vdm.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/qquickpathview.pro (renamed from tests/auto/declarative/qsgpathview/qsgpathview.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpathview/tst_qquickpathview.cpp (renamed from tests/auto/declarative/qsgpathview/tst_qsgpathview.cpp) | 272 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpincharea/data/pinchproperties.qml (renamed from tests/auto/declarative/qsgpincharea/data/pinchproperties.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpincharea/qquickpincharea.pro (renamed from tests/auto/declarative/qsgpincharea/qsgpincharea.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpincharea/tst_qquickpincharea.cpp (renamed from tests/auto/declarative/qsgpincharea/tst_qsgpincharea.cpp) | 84 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/allInvisible.qml (renamed from tests/auto/declarative/qsgpositioners/data/allInvisible.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/attachedproperties-column.qml (renamed from tests/auto/declarative/qsgpositioners/data/attachedproperties-column.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/attachedproperties-dynamic.qml (renamed from tests/auto/declarative/qsgpositioners/data/attachedproperties-dynamic.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/attachedproperties-flow.qml (renamed from tests/auto/declarative/qsgpositioners/data/attachedproperties-flow.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/attachedproperties-grid.qml (renamed from tests/auto/declarative/qsgpositioners/data/attachedproperties-grid.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/attachedproperties-row.qml (renamed from tests/auto/declarative/qsgpositioners/data/attachedproperties-row.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/flow-testimplicitsize.qml (renamed from tests/auto/declarative/qsgpositioners/data/flow-testimplicitsize.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/flowtest-toptobottom.qml (renamed from tests/auto/declarative/qsgpositioners/data/flowtest-toptobottom.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/flowtest.qml (renamed from tests/auto/declarative/qsgpositioners/data/flowtest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/grid-animated.qml (renamed from tests/auto/declarative/qsgpositioners/data/grid-animated.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/grid-row-column-spacing.qml (renamed from tests/auto/declarative/qsgpositioners/data/grid-row-column-spacing.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/grid-spacing.qml (renamed from tests/auto/declarative/qsgpositioners/data/grid-spacing.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/grid-toptobottom.qml (renamed from tests/auto/declarative/qsgpositioners/data/grid-toptobottom.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/gridtest.qml (renamed from tests/auto/declarative/qsgpositioners/data/gridtest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/gridzerocolumns.qml (renamed from tests/auto/declarative/qsgpositioners/data/gridzerocolumns.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/horizontal-animated-disabled.qml (renamed from tests/auto/declarative/qsgpositioners/data/horizontal-animated-disabled.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/horizontal-animated.qml (renamed from tests/auto/declarative/qsgpositioners/data/horizontal-animated.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/horizontal-spacing.qml (renamed from tests/auto/declarative/qsgpositioners/data/horizontal-spacing.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/horizontal.qml (renamed from tests/auto/declarative/qsgpositioners/data/horizontal.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/propertychangestest.qml (renamed from tests/auto/declarative/qsgpositioners/data/propertychangestest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/rectangleComponent.qml (renamed from tests/auto/declarative/qsgpositioners/data/rectangleComponent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/repeatertest.qml (renamed from tests/auto/declarative/qsgpositioners/data/repeatertest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/vertical-animated.qml (renamed from tests/auto/declarative/qsgpositioners/data/vertical-animated.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/vertical-spacing.qml (renamed from tests/auto/declarative/qsgpositioners/data/vertical-spacing.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/data/vertical.qml (renamed from tests/auto/declarative/qsgpositioners/data/vertical.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/qquickpositioners.pro (renamed from tests/auto/declarative/qsgpositioners/qsgpositioners.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickpositioners/tst_qquickpositioners.cpp (renamed from tests/auto/declarative/qsgpositioners/tst_qsgpositioners.cpp) | 468 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/intmodel.qml (renamed from tests/auto/declarative/qsgrepeater/data/intmodel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/itemlist.qml (renamed from tests/auto/declarative/qsgrepeater/data/itemlist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/modelChanged.qml (renamed from tests/auto/declarative/qsgrepeater/data/modelChanged.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/objlist.qml (renamed from tests/auto/declarative/qsgrepeater/data/objlist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/properties.qml (renamed from tests/auto/declarative/qsgrepeater/data/properties.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/repeater1.qml (renamed from tests/auto/declarative/qsgrepeater/data/repeater1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/data/repeater2.qml (renamed from tests/auto/declarative/qsgrepeater/data/repeater2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/qquickrepeater.pro (renamed from tests/auto/declarative/qsgrepeater/qsgrepeater.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickrepeater/tst_qquickrepeater.cpp (renamed from tests/auto/declarative/qsgrepeater/tst_qsgrepeater.cpp) | 150 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments.qml (renamed from tests/auto/declarative/qsgtext/data/alignments.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_cb.png (renamed from tests/auto/declarative/qsgtext/data/alignments_cb.png) | bin | 496 -> 496 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_cc.png (renamed from tests/auto/declarative/qsgtext/data/alignments_cc.png) | bin | 556 -> 556 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_ct.png (renamed from tests/auto/declarative/qsgtext/data/alignments_ct.png) | bin | 533 -> 533 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_lb.png (renamed from tests/auto/declarative/qsgtext/data/alignments_lb.png) | bin | 496 -> 496 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_lc.png (renamed from tests/auto/declarative/qsgtext/data/alignments_lc.png) | bin | 535 -> 535 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_lt.png (renamed from tests/auto/declarative/qsgtext/data/alignments_lt.png) | bin | 514 -> 514 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_rb.png (renamed from tests/auto/declarative/qsgtext/data/alignments_rb.png) | bin | 505 -> 505 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_rc.png (renamed from tests/auto/declarative/qsgtext/data/alignments_rc.png) | bin | 559 -> 559 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/alignments_rt.png (renamed from tests/auto/declarative/qsgtext/data/alignments_rt.png) | bin | 539 -> 539 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/embeddedImagesLocal.qml (renamed from tests/auto/declarative/qsgtext/data/embeddedImagesLocal.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/embeddedImagesLocalError.qml (renamed from tests/auto/declarative/qsgtext/data/embeddedImagesLocalError.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/embeddedImagesRemote.qml (renamed from tests/auto/declarative/qsgtext/data/embeddedImagesRemote.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/embeddedImagesRemoteError.qml (renamed from tests/auto/declarative/qsgtext/data/embeddedImagesRemoteError.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/horizontalAlignment_RightToLeft.qml (renamed from tests/auto/declarative/qsgtext/data/horizontalAlignment_RightToLeft.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/http/exists.png (renamed from tests/auto/declarative/qsgtext/data/http/exists.png) | bin | 2738 -> 2738 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/lineCount.qml (renamed from tests/auto/declarative/qsgtext/data/lineCount.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/lineHeight.qml (renamed from tests/auto/declarative/qsgtext/data/lineHeight.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/lineLayout.qml (renamed from tests/auto/declarative/qsgtext/data/lineLayout.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/qtbug_14734.qml (renamed from tests/auto/declarative/qsgtext/data/qtbug_14734.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/data/rotated.qml (renamed from tests/auto/declarative/qsgtext/data/rotated.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/qquicktext.pro (renamed from tests/auto/declarative/qsgtext/qsgtext.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktext/tst_qquicktext.cpp (renamed from tests/auto/declarative/qsgtext/tst_qsgtext.cpp) | 332 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/CursorRect.qml (renamed from tests/auto/declarative/qsgtextedit/data/CursorRect.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments.qml (renamed from tests/auto/declarative/qsgtextedit/data/alignments.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_cb.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_cb.png) | bin | 496 -> 496 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_cc.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_cc.png) | bin | 556 -> 556 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_ct.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_ct.png) | bin | 533 -> 533 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_lb.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_lb.png) | bin | 496 -> 496 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_lc.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_lc.png) | bin | 535 -> 535 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_lt.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_lt.png) | bin | 514 -> 514 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_rb.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_rb.png) | bin | 505 -> 505 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_rc.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_rc.png) | bin | 559 -> 559 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/alignments_rt.png (renamed from tests/auto/declarative/qsgtextedit/data/alignments_rt.png) | bin | 539 -> 539 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/cursorTest.qml (renamed from tests/auto/declarative/qsgtextedit/data/cursorTest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/cursorVisible.qml (renamed from tests/auto/declarative/qsgtextedit/data/cursorVisible.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/geometrySignals.qml (renamed from tests/auto/declarative/qsgtextedit/data/geometrySignals.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/horizontalAlignment_RightToLeft.qml (renamed from tests/auto/declarative/qsgtextedit/data/horizontalAlignment_RightToLeft.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/ErrItem.qml (renamed from tests/auto/declarative/qsgtextedit/data/http/ErrItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/NormItem.qml (renamed from tests/auto/declarative/qsgtextedit/data/http/NormItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/cursorHttpTest.qml (renamed from tests/auto/declarative/qsgtextedit/data/http/cursorHttpTest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/cursorHttpTestFail1.qml (renamed from tests/auto/declarative/qsgtextedit/data/http/cursorHttpTestFail1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/cursorHttpTestFail2.qml (renamed from tests/auto/declarative/qsgtextedit/data/http/cursorHttpTestFail2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/cursorHttpTestPass.qml (renamed from tests/auto/declarative/qsgtextedit/data/http/cursorHttpTestPass.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/http/qmldir (renamed from tests/auto/declarative/qsgtextedit/data/http/qmldir) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/httpfail/FailItem.qml (renamed from tests/auto/declarative/qsgtextedit/data/httpfail/FailItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/httpslow/WaitItem.qml (renamed from tests/auto/declarative/qsgtextedit/data/httpslow/WaitItem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/inputContext.qml (renamed from tests/auto/declarative/qsgtextedit/data/inputContext.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/inputMethodEvent.qml (renamed from tests/auto/declarative/qsgtextedit/data/inputMethodEvent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/inputmethodhints.qml (renamed from tests/auto/declarative/qsgtextedit/data/inputmethodhints.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselection_default.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselection_default.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselection_false.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselection_false.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselection_false_words.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselection_false_words.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselection_true.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselection_true.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselection_true_words.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselection_true_words.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselectionmode_characters.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselectionmode_characters.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselectionmode_default.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselectionmode_default.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/mouseselectionmode_words.qml (renamed from tests/auto/declarative/qsgtextedit/data/mouseselectionmode_words.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/navigation.qml (renamed from tests/auto/declarative/qsgtextedit/data/navigation.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/openInputPanel.qml (renamed from tests/auto/declarative/qsgtextedit/data/openInputPanel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/positionAt.qml (renamed from tests/auto/declarative/qsgtextedit/data/positionAt.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/qtbug-22058.qml (renamed from tests/auto/declarative/qsgtextedit/data/qtbug-22058.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/data/readOnly.qml (renamed from tests/auto/declarative/qsgtextedit/data/readOnly.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/qquicktextedit.pro (renamed from tests/auto/declarative/qsgtextedit/qsgtextedit.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextedit/tst_qquicktextedit.cpp (renamed from tests/auto/declarative/qsgtextedit/tst_qsgtextedit.cpp) | 528 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/cursorTest.qml (renamed from tests/auto/declarative/qsgtextinput/data/cursorTest.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/cursorVisible.qml (renamed from tests/auto/declarative/qsgtextinput/data/cursorVisible.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/echoMode.qml (renamed from tests/auto/declarative/qsgtextinput/data/echoMode.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/geometrySignals.qml (renamed from tests/auto/declarative/qsgtextinput/data/geometrySignals.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/halign_center.png (renamed from tests/auto/declarative/qsgtextinput/data/halign_center.png) | bin | 293 -> 293 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/halign_left.png (renamed from tests/auto/declarative/qsgtextinput/data/halign_left.png) | bin | 291 -> 291 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/halign_right.png (renamed from tests/auto/declarative/qsgtextinput/data/halign_right.png) | bin | 292 -> 292 bytes | |||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/horizontalAlignment.qml (renamed from tests/auto/declarative/qsgtextinput/data/horizontalAlignment.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/horizontalAlignment_RightToLeft.qml (renamed from tests/auto/declarative/qsgtextinput/data/horizontalAlignment_RightToLeft.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/inputContext.qml (renamed from tests/auto/declarative/qsgtextinput/data/inputContext.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/inputMethodEvent.qml (renamed from tests/auto/declarative/qsgtextinput/data/inputMethodEvent.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/inputmethods.qml (renamed from tests/auto/declarative/qsgtextinput/data/inputmethods.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/masks.qml (renamed from tests/auto/declarative/qsgtextinput/data/masks.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/maxLength.qml (renamed from tests/auto/declarative/qsgtextinput/data/maxLength.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/mouseselection_true.qml (renamed from tests/auto/declarative/qsgtextinput/data/mouseselection_true.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/mouseselectionmode_characters.qml (renamed from tests/auto/declarative/qsgtextinput/data/mouseselectionmode_characters.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/mouseselectionmode_default.qml (renamed from tests/auto/declarative/qsgtextinput/data/mouseselectionmode_default.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/mouseselectionmode_words.qml (renamed from tests/auto/declarative/qsgtextinput/data/mouseselectionmode_words.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/navigation.qml (renamed from tests/auto/declarative/qsgtextinput/data/navigation.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/openInputPanel.qml (renamed from tests/auto/declarative/qsgtextinput/data/openInputPanel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/positionAt.qml (renamed from tests/auto/declarative/qsgtextinput/data/positionAt.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/preeditAutoScroll.qml (renamed from tests/auto/declarative/qsgtextinput/data/preeditAutoScroll.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/qtbug-19956double.qml (renamed from tests/auto/declarative/qsgtextinput/data/qtbug-19956double.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/qtbug-19956int.qml (renamed from tests/auto/declarative/qsgtextinput/data/qtbug-19956int.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/qtbug-19956regexp.qml (renamed from tests/auto/declarative/qsgtextinput/data/qtbug-19956regexp.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/readOnly.qml (renamed from tests/auto/declarative/qsgtextinput/data/readOnly.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/data/validators.qml (renamed from tests/auto/declarative/qsgtextinput/data/validators.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/qquicktextinput.pro (renamed from tests/auto/declarative/qsgtextinput/qsgtextinput.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquicktextinput/tst_qquicktextinput.cpp (renamed from tests/auto/declarative/qsgtextinput/tst_qsgtextinput.cpp) | 530 | ||||
-rw-r--r-- | tests/auto/declarative/qquickview/data/error1.qml (renamed from tests/auto/declarative/qsgview/data/error1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickview/data/resizemodeitem.qml (renamed from tests/auto/declarative/qsgview/data/resizemodeitem.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickview/qquickview.pro (renamed from tests/auto/declarative/qsgview/qsgview.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickview/tst_qquickview.cpp (renamed from tests/auto/declarative/qsgview/tst_qsgview.cpp) | 44 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/create.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/create.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/datalist.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/datalist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/groups.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/groups.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/modelproperties.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/modelproperties.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/modelproperties2.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/modelproperties2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/objectlist.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/objectlist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/singlerole1.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/singlerole1.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/singlerole2.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/singlerole2.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/data/visualdatamodel.qml (renamed from tests/auto/declarative/qsgvisualdatamodel/data/visualdatamodel.qml) | 0 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/qquickvisualdatamodel.pro (renamed from tests/auto/declarative/qsgvisualdatamodel/qsgvisualdatamodel.pro) | 4 | ||||
-rw-r--r-- | tests/auto/declarative/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp (renamed from tests/auto/declarative/qsgvisualdatamodel/tst_qsgvisualdatamodel.cpp) | 284 | ||||
-rw-r--r-- | tests/auto/particles/qsgage/tst_qsgage.cpp | 8 | ||||
-rw-r--r-- | tests/auto/particles/qsgangleddirection/tst_qsgangleddirection.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgcumulativedirection/tst_qsgcumulativedirection.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgcustomaffector/tst_qsgcustomaffector.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgcustomparticle/tst_qsgcustomparticle.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgellipseextruder/tst_qsgellipseextruder.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgfriction/tst_qsgfriction.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsggravity/tst_qsggravity.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgimageparticle/tst_qsgimageparticle.cpp | 10 | ||||
-rw-r--r-- | tests/auto/particles/qsgitemparticle/tst_qsgitemparticle.cpp | 6 | ||||
-rw-r--r-- | tests/auto/particles/qsglineextruder/tst_qsglineextruder.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgmaskextruder/tst_qsgmaskextruder.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgparticlegroup/tst_qsgparticlegroup.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgparticlesystem/tst_qsgparticlesystem.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgpointattractor/tst_qsgpointattractor.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgpointdirection/tst_qsgpointdirection.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgrectangleextruder/tst_qsgrectangleextruder.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgtargetdirection/tst_qsgtargetdirection.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgtrailemitter/tst_qsgtrailemitter.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgturbulence/tst_qsgturbulence.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/qsgwander/tst_qsgwander.cpp | 2 | ||||
-rw-r--r-- | tests/auto/particles/shared/particlestestsshared.h | 8 | ||||
-rw-r--r-- | tests/auto/qmltest/borderimage/tst_borderimage.qml | 4 | ||||
-rw-r--r-- | tests/benchmarks/particles/affectors/tst_affectors.cpp | 4 | ||||
-rw-r--r-- | tests/benchmarks/particles/emission/tst_emission.cpp | 2 | ||||
-rw-r--r-- | tools/qmlplugindump/main.cpp | 8 | ||||
-rw-r--r-- | tools/qmlscene/main.cpp | 12 |
721 files changed, 12195 insertions, 12191 deletions
diff --git a/doc/src/declarative/example-textballoons.qdoc b/doc/src/declarative/example-textballoons.qdoc index a8bed3a38c..489d8ac6e2 100644 --- a/doc/src/declarative/example-textballoons.qdoc +++ b/doc/src/declarative/example-textballoons.qdoc @@ -34,12 +34,12 @@ \image declarative-textballoons_example.png - The QSGPaintedItem class is a class derived from QSGItem for implementing + The QQuickPaintedItem class is a class derived from QQuickItem for implementing custom QML Scene Graph items using the QPainter interfaces. The example consists of an item class, a plugin class and a QML file to use this plugin. The \c TextBalloon class represents the individual - text balloons extending QSGPaintedItem, the \c TextBalloonPlugin class + text balloons extending QQuickPaintedItem, the \c TextBalloonPlugin class represents the skeleton code for a QtQuick plugin and the \c textballoons.qml file is used to load the plugin and display the text balloons. @@ -51,14 +51,14 @@ \section1 TextBalloon Class Declaration - The \c TextBalloon class inherits from QSGPaintedItem. QSGPaintedItem + The \c TextBalloon class inherits from QQuickPaintedItem. QQuickPaintedItem is the base class for all QPainter based items in the QML Scene Graph framework. \snippet examples/declarative/painteditem/textballoons/textballoon.h 0 - To implement a QSGPaintedItem you must implement QSGPaintedIem's pure - virtual function \l {QSGPaintedItem::}{paint()} which implements the + To implement a QQuickPaintedItem you must implement QQuickPaintedIem's pure + virtual function \l {QQuickPaintedItem::}{paint()} which implements the painting of the element. \section1 TextBalloon Class Definition @@ -75,9 +75,9 @@ \snippet examples/declarative/painteditem/textballoons/textballoon.cpp 1 We start with setting the pen and brush on the item to define the look of - the item. After that we start drawing. Note that the \l {QSGPaintedItem::}{boundingRect()} + the item. After that we start drawing. Note that the \l {QQuickPaintedItem::}{boundingRect()} item is called to draw depending on the size of the item. The rectangle - returned by the \l {QSGPaintedItem::}{boundingRect()} function is the size + returned by the \l {QQuickPaintedItem::}{boundingRect()} function is the size of the item as defined in the QML file. \section1 textballoons.qml file diff --git a/doc/src/declarative/qmltest.qdoc b/doc/src/declarative/qmltest.qdoc index 3421c16fae..102118d3c5 100644 --- a/doc/src/declarative/qmltest.qdoc +++ b/doc/src/declarative/qmltest.qdoc @@ -107,7 +107,7 @@ \section1 Running tests with QtQuick 1 The \c{-qtquick1} option can be passed to a test binary to run - the tests using QDeclarativeView (QtQuick 1) rather than QSGView (QtQuick 2): + the tests using QDeclarativeView (QtQuick 1) rather than QQuickView (QtQuick 2): \code tst_example -qtquick1 diff --git a/doc/src/declarative/whatsnew.qdoc b/doc/src/declarative/whatsnew.qdoc index 4c44166472..749392a143 100644 --- a/doc/src/declarative/whatsnew.qdoc +++ b/doc/src/declarative/whatsnew.qdoc @@ -39,10 +39,10 @@ QtQuick 2 is based on an OpenGL scenegraph. The following classes replace their equivalents in QtQuick 1: \list -\o QSGView -\o QSGCanvas -\o QSGItem -\o QSGPaintedItem +\o QQuickView +\o QQuickCanvas +\o QQuickItem +\o QQuickPaintedItem \endlist \section2 QML Engine/Language Improvements diff --git a/doc/src/qtquick1/example-textballoons.qdoc b/doc/src/qtquick1/example-textballoons.qdoc index a8bed3a38c..489d8ac6e2 100644 --- a/doc/src/qtquick1/example-textballoons.qdoc +++ b/doc/src/qtquick1/example-textballoons.qdoc @@ -34,12 +34,12 @@ \image declarative-textballoons_example.png - The QSGPaintedItem class is a class derived from QSGItem for implementing + The QQuickPaintedItem class is a class derived from QQuickItem for implementing custom QML Scene Graph items using the QPainter interfaces. The example consists of an item class, a plugin class and a QML file to use this plugin. The \c TextBalloon class represents the individual - text balloons extending QSGPaintedItem, the \c TextBalloonPlugin class + text balloons extending QQuickPaintedItem, the \c TextBalloonPlugin class represents the skeleton code for a QtQuick plugin and the \c textballoons.qml file is used to load the plugin and display the text balloons. @@ -51,14 +51,14 @@ \section1 TextBalloon Class Declaration - The \c TextBalloon class inherits from QSGPaintedItem. QSGPaintedItem + The \c TextBalloon class inherits from QQuickPaintedItem. QQuickPaintedItem is the base class for all QPainter based items in the QML Scene Graph framework. \snippet examples/declarative/painteditem/textballoons/textballoon.h 0 - To implement a QSGPaintedItem you must implement QSGPaintedIem's pure - virtual function \l {QSGPaintedItem::}{paint()} which implements the + To implement a QQuickPaintedItem you must implement QQuickPaintedIem's pure + virtual function \l {QQuickPaintedItem::}{paint()} which implements the painting of the element. \section1 TextBalloon Class Definition @@ -75,9 +75,9 @@ \snippet examples/declarative/painteditem/textballoons/textballoon.cpp 1 We start with setting the pen and brush on the item to define the look of - the item. After that we start drawing. Note that the \l {QSGPaintedItem::}{boundingRect()} + the item. After that we start drawing. Note that the \l {QQuickPaintedItem::}{boundingRect()} item is called to draw depending on the size of the item. The rectangle - returned by the \l {QSGPaintedItem::}{boundingRect()} function is the size + returned by the \l {QQuickPaintedItem::}{boundingRect()} function is the size of the item as defined in the QML file. \section1 textballoons.qml file diff --git a/doc/src/qtquick1/qmltest.qdoc b/doc/src/qtquick1/qmltest.qdoc index 3421c16fae..102118d3c5 100644 --- a/doc/src/qtquick1/qmltest.qdoc +++ b/doc/src/qtquick1/qmltest.qdoc @@ -107,7 +107,7 @@ \section1 Running tests with QtQuick 1 The \c{-qtquick1} option can be passed to a test binary to run - the tests using QDeclarativeView (QtQuick 1) rather than QSGView (QtQuick 2): + the tests using QDeclarativeView (QtQuick 1) rather than QQuickView (QtQuick 2): \code tst_example -qtquick1 diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp index 7caeaf9471..e8ccdb7e36 100644 --- a/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp @@ -44,7 +44,7 @@ #include <QDeclarativeEngine> #include <QDeclarativeNetworkAccessManagerFactory> -#include <QSGView> +#include <QQuickView> /* @@ -97,7 +97,7 @@ int main(int argc, char ** argv) } } - QSGView view; + QQuickView view; view.engine()->setNetworkAccessManagerFactory(new MyNetworkAccessManagerFactory); view.setSource(source); diff --git a/examples/declarative/minehunt/main.cpp b/examples/declarative/minehunt/main.cpp index 2ae2cc0558..205835a9c0 100644 --- a/examples/declarative/minehunt/main.cpp +++ b/examples/declarative/minehunt/main.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include <QtGui/QGuiApplication> -#include <qsgview.h> +#include <qquickview.h> #include <QtDeclarative/QDeclarativeContext> #include <QtDeclarative/QDeclarativeEngine> @@ -49,12 +49,12 @@ int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); - QSGView canvas; + QQuickView canvas; qmlRegisterType<TileData>(); MinehuntGame* game = new MinehuntGame(); - canvas.setResizeMode(QSGView::SizeRootObjectToView); + canvas.setResizeMode(QQuickView::SizeRootObjectToView); canvas.engine()->rootContext()->setContextObject(game); canvas.setSource(QString("qrc:minehunt.qml")); QObject::connect(canvas.engine(), SIGNAL(quit()), &app, SLOT(quit())); diff --git a/examples/declarative/modelviews/abstractitemmodel/main.cpp b/examples/declarative/modelviews/abstractitemmodel/main.cpp index 3c78608295..dd726611a1 100644 --- a/examples/declarative/modelviews/abstractitemmodel/main.cpp +++ b/examples/declarative/modelviews/abstractitemmodel/main.cpp @@ -43,8 +43,8 @@ #include <qdeclarativeengine.h> #include <qdeclarativecontext.h> #include <qdeclarative.h> -#include <qsgitem.h> -#include <qsgview.h> +#include <qquickitem.h> +#include <qquickview.h> //![0] int main(int argc, char ** argv) @@ -56,8 +56,8 @@ int main(int argc, char ** argv) model.addAnimal(Animal("Polar bear", "Large")); model.addAnimal(Animal("Quoll", "Small")); - QSGView view; - view.setResizeMode(QSGView::SizeRootObjectToView); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); QDeclarativeContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", &model); //![0] diff --git a/examples/declarative/modelviews/objectlistmodel/main.cpp b/examples/declarative/modelviews/objectlistmodel/main.cpp index ba37e17d18..67ffb946c0 100644 --- a/examples/declarative/modelviews/objectlistmodel/main.cpp +++ b/examples/declarative/modelviews/objectlistmodel/main.cpp @@ -43,8 +43,8 @@ #include <qdeclarativeengine.h> #include <qdeclarativecontext.h> #include <qdeclarative.h> -#include <qsgitem.h> -#include <qsgview.h> +#include <qquickitem.h> +#include <qquickview.h> #include "dataobject.h" @@ -64,8 +64,8 @@ int main(int argc, char ** argv) dataList.append(new DataObject("Item 3", "blue")); dataList.append(new DataObject("Item 4", "yellow")); - QSGView view; - view.setResizeMode(QSGView::SizeRootObjectToView); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); QDeclarativeContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); //![0] diff --git a/examples/declarative/modelviews/stringlistmodel/main.cpp b/examples/declarative/modelviews/stringlistmodel/main.cpp index 5d01c6fae8..ebd3c59307 100644 --- a/examples/declarative/modelviews/stringlistmodel/main.cpp +++ b/examples/declarative/modelviews/stringlistmodel/main.cpp @@ -44,8 +44,8 @@ #include <qdeclarativeengine.h> #include <qdeclarativecontext.h> #include <qdeclarative.h> -#include <qsgitem.h> -#include <qsgview.h> +#include <qquickitem.h> +#include <qquickview.h> /* @@ -64,7 +64,7 @@ int main(int argc, char ** argv) dataList.append("Item 3"); dataList.append("Item 4"); - QSGView view; + QQuickView view; QDeclarativeContext *ctxt = view.rootContext(); ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); //![0] diff --git a/examples/declarative/painteditem/smile/main.cpp b/examples/declarative/painteditem/smile/main.cpp index 423ff295c9..1f0b3a3cb8 100644 --- a/examples/declarative/painteditem/smile/main.cpp +++ b/examples/declarative/painteditem/smile/main.cpp @@ -41,14 +41,14 @@ #include <QGuiApplication> #include <QPainter> #include <QtDeclarative/qdeclarative.h> -#include <QtDeclarative/qsgview.h> -#include <QtDeclarative/qsgpainteditem.h> +#include <QtDeclarative/qquickview.h> +#include <QtDeclarative/qquickpainteditem.h> -class MyPaintItem : public QSGPaintedItem +class MyPaintItem : public QQuickPaintedItem { Q_OBJECT public: - MyPaintItem() : QSGPaintedItem() + MyPaintItem() : QQuickPaintedItem() { setAntialiasing(true); } @@ -72,8 +72,8 @@ int main(int argc, char ** argv) qmlRegisterType<MyPaintItem>("MyModule", 1, 0, "MyPaintItem"); - QSGView view; - view.setResizeMode(QSGView::SizeRootObjectToView); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl::fromLocalFile("smile.qml")); view.show(); view.raise(); diff --git a/examples/declarative/painteditem/textballoons/textballoon.cpp b/examples/declarative/painteditem/textballoons/textballoon.cpp index 185cea71fb..c90118ca65 100644 --- a/examples/declarative/painteditem/textballoons/textballoon.cpp +++ b/examples/declarative/painteditem/textballoons/textballoon.cpp @@ -42,8 +42,8 @@ #include "textballoon.h" //! [0] -TextBalloon::TextBalloon(QSGItem *parent) - : QSGPaintedItem(parent) +TextBalloon::TextBalloon(QQuickItem *parent) + : QQuickPaintedItem(parent) , rightAligned(false) { } diff --git a/examples/declarative/painteditem/textballoons/textballoon.h b/examples/declarative/painteditem/textballoons/textballoon.h index 272e5f51c1..064d20bd7e 100644 --- a/examples/declarative/painteditem/textballoons/textballoon.h +++ b/examples/declarative/painteditem/textballoons/textballoon.h @@ -45,13 +45,13 @@ #include <QtDeclarative> //! [0] -class TextBalloon : public QSGPaintedItem +class TextBalloon : public QQuickPaintedItem { Q_OBJECT Q_PROPERTY(bool rightAligned READ isRightAligned WRITE setRightAligned NOTIFY rightAlignedChanged) public: - TextBalloon(QSGItem *parent = 0); + TextBalloon(QQuickItem *parent = 0); void paint(QPainter *painter); bool isRightAligned(); diff --git a/examples/declarative/tutorials/extending/chapter1-basics/main.cpp b/examples/declarative/tutorials/extending/chapter1-basics/main.cpp index ca6a97e0c7..2670871e61 100644 --- a/examples/declarative/tutorials/extending/chapter1-basics/main.cpp +++ b/examples/declarative/tutorials/extending/chapter1-basics/main.cpp @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] #include "piechart.h" -#include <QSGView> +#include <QQuickView> #include <QGuiApplication> int main(int argc, char *argv[]) @@ -48,8 +48,8 @@ int main(int argc, char *argv[]) qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart"); - QSGView view; - view.setResizeMode(QSGView::SizeRootObjectToView); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl::fromLocalFile("app.qml")); view.show(); return app.exec(); diff --git a/examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp b/examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp index 5820c5626c..06d9892d6b 100644 --- a/examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp +++ b/examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp @@ -41,8 +41,8 @@ #include <QPainter> //![0] -PieChart::PieChart(QSGItem *parent) - : QSGPaintedItem(parent) +PieChart::PieChart(QQuickItem *parent) + : QQuickPaintedItem(parent) { } //![0] diff --git a/examples/declarative/tutorials/extending/chapter1-basics/piechart.h b/examples/declarative/tutorials/extending/chapter1-basics/piechart.h index a5afec5252..d1beb71545 100644 --- a/examples/declarative/tutorials/extending/chapter1-basics/piechart.h +++ b/examples/declarative/tutorials/extending/chapter1-basics/piechart.h @@ -41,17 +41,17 @@ #define PIECHART_H //![0] -#include <QtDeclarative/QSGPaintedItem> +#include <QtDeclarative/QQuickPaintedItem> #include <QColor> -class PieChart : public QSGPaintedItem +class PieChart : public QQuickPaintedItem { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName) Q_PROPERTY(QColor color READ color WRITE setColor) public: - PieChart(QSGItem *parent = 0); + PieChart(QQuickItem *parent = 0); QString name() const; void setName(const QString &name); diff --git a/examples/declarative/tutorials/extending/chapter2-methods/main.cpp b/examples/declarative/tutorials/extending/chapter2-methods/main.cpp index ca6a97e0c7..2670871e61 100644 --- a/examples/declarative/tutorials/extending/chapter2-methods/main.cpp +++ b/examples/declarative/tutorials/extending/chapter2-methods/main.cpp @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] #include "piechart.h" -#include <QSGView> +#include <QQuickView> #include <QGuiApplication> int main(int argc, char *argv[]) @@ -48,8 +48,8 @@ int main(int argc, char *argv[]) qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart"); - QSGView view; - view.setResizeMode(QSGView::SizeRootObjectToView); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl::fromLocalFile("app.qml")); view.show(); return app.exec(); diff --git a/examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp b/examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp index 86407f1f17..ca25474aee 100644 --- a/examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp +++ b/examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp @@ -40,8 +40,8 @@ #include "piechart.h" #include <QPainter> -PieChart::PieChart(QSGItem *parent) - : QSGPaintedItem(parent) +PieChart::PieChart(QQuickItem *parent) + : QQuickPaintedItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter2-methods/piechart.h b/examples/declarative/tutorials/extending/chapter2-methods/piechart.h index 38f5c0553f..5205151a0a 100644 --- a/examples/declarative/tutorials/extending/chapter2-methods/piechart.h +++ b/examples/declarative/tutorials/extending/chapter2-methods/piechart.h @@ -40,11 +40,11 @@ #ifndef PIECHART_H #define PIECHART_H -#include <QtDeclarative/QSGPaintedItem> +#include <QtDeclarative/QQuickPaintedItem> #include <QColor> //![0] -class PieChart : public QSGPaintedItem +class PieChart : public QQuickPaintedItem { //![0] Q_OBJECT @@ -55,7 +55,7 @@ class PieChart : public QSGPaintedItem public: //![1] - PieChart(QSGItem *parent = 0); + PieChart(QQuickItem *parent = 0); QString name() const; void setName(const QString &name); diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp b/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp index ca6a97e0c7..2670871e61 100644 --- a/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp +++ b/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] #include "piechart.h" -#include <QSGView> +#include <QQuickView> #include <QGuiApplication> int main(int argc, char *argv[]) @@ -48,8 +48,8 @@ int main(int argc, char *argv[]) qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart"); - QSGView view; - view.setResizeMode(QSGView::SizeRootObjectToView); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl::fromLocalFile("app.qml")); view.show(); return app.exec(); diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp b/examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp index 86ad6a7fe0..5819088962 100644 --- a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp +++ b/examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp @@ -40,8 +40,8 @@ #include "piechart.h" #include <QPainter> -PieChart::PieChart(QSGItem *parent) - : QSGPaintedItem(parent) +PieChart::PieChart(QQuickItem *parent) + : QQuickPaintedItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.h b/examples/declarative/tutorials/extending/chapter3-bindings/piechart.h index 5208f81d27..55be2a493f 100644 --- a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.h +++ b/examples/declarative/tutorials/extending/chapter3-bindings/piechart.h @@ -41,10 +41,10 @@ #define PIECHART_H #include <QColor> -#include <QtDeclarative/QSGPaintedItem> +#include <QtDeclarative/QQuickPaintedItem> //![0] -class PieChart : public QSGPaintedItem +class PieChart : public QQuickPaintedItem { //![0] Q_OBJECT @@ -55,7 +55,7 @@ class PieChart : public QSGPaintedItem public: //![1] - PieChart(QSGItem *parent = 0); + PieChart(QQuickItem *parent = 0); QString name() const; void setName(const QString &name); diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp index d2812767cf..c9b9a0b5aa 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp @@ -40,7 +40,7 @@ #include "piechart.h" #include "pieslice.h" -#include <QSGView> +#include <QQuickView> #include <QGuiApplication> //![0] @@ -55,8 +55,8 @@ int main(int argc, char *argv[]) qmlRegisterType<PieSlice>("Charts", 1, 0, "PieSlice"); //![1] - QSGView view; - view.setResizeMode(QSGView::SizeRootObjectToView); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl::fromLocalFile("app.qml")); view.show(); return app.exec(); diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp index 5911f4dd49..f032887ce8 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp @@ -40,8 +40,8 @@ #include "piechart.h" #include "pieslice.h" -PieChart::PieChart(QSGItem *parent) - : QSGItem(parent) +PieChart::PieChart(QQuickItem *parent) + : QQuickItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h index 9e8139846b..c1cdf30805 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h @@ -40,12 +40,12 @@ #ifndef PIECHART_H #define PIECHART_H -#include <QtDeclarative/QSGItem> +#include <QtDeclarative/QQuickItem> class PieSlice; //![0] -class PieChart : public QSGItem +class PieChart : public QQuickItem { Q_OBJECT Q_PROPERTY(PieSlice* pieSlice READ pieSlice WRITE setPieSlice) @@ -56,7 +56,7 @@ class PieChart : public QSGItem public: //![1] - PieChart(QSGItem *parent = 0); + PieChart(QQuickItem *parent = 0); QString name() const; void setName(const QString &name); diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp index 764ef23944..176ca1eac4 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp @@ -41,8 +41,8 @@ #include <QPainter> -PieSlice::PieSlice(QSGItem *parent) - : QSGPaintedItem(parent) +PieSlice::PieSlice(QQuickItem *parent) + : QQuickPaintedItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h index 7163864fac..59606486a4 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h @@ -40,17 +40,17 @@ #ifndef PIESLICE_H #define PIESLICE_H -#include <QtDeclarative/QSGPaintedItem> +#include <QtDeclarative/QQuickPaintedItem> #include <QColor> //![0] -class PieSlice : public QSGPaintedItem +class PieSlice : public QQuickPaintedItem { Q_OBJECT Q_PROPERTY(QColor color READ color WRITE setColor) public: - PieSlice(QSGItem *parent = 0); + PieSlice(QQuickItem *parent = 0); QColor color() const; void setColor(const QColor &color); diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp b/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp index 64c18f74bc..78f6f25485 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp @@ -40,7 +40,7 @@ #include "piechart.h" #include "pieslice.h" -#include <QSGView> +#include <QQuickView> #include <QGuiApplication> int main(int argc, char *argv[]) @@ -50,8 +50,8 @@ int main(int argc, char *argv[]) qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart"); qmlRegisterType<PieSlice>("Charts", 1, 0, "PieSlice"); - QSGView view; - view.setResizeMode(QSGView::SizeRootObjectToView); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); view.setSource(QUrl::fromLocalFile("app.qml")); view.show(); return app.exec(); diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp index 248f4a2096..876ef54026 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp @@ -40,8 +40,8 @@ #include "piechart.h" #include "pieslice.h" -PieChart::PieChart(QSGItem *parent) - : QSGItem(parent) +PieChart::PieChart(QQuickItem *parent) + : QQuickItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h index e95b02f38c..feea3d2789 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h @@ -40,12 +40,12 @@ #ifndef PIECHART_H #define PIECHART_H -#include <QSGItem> +#include <QQuickItem> class PieSlice; //![0] -class PieChart : public QSGItem +class PieChart : public QQuickItem { Q_OBJECT Q_PROPERTY(QDeclarativeListProperty<PieSlice> slices READ slices) @@ -55,7 +55,7 @@ class PieChart : public QSGItem //![1] public: //![1] - PieChart(QSGItem *parent = 0); + PieChart(QQuickItem *parent = 0); QString name() const; void setName(const QString &name); diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp b/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp index 70338f08a0..839d153926 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp @@ -41,8 +41,8 @@ #include <QPainter> -PieSlice::PieSlice(QSGItem *parent) - : QSGPaintedItem(parent) +PieSlice::PieSlice(QQuickItem *parent) + : QQuickPaintedItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h b/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h index 1204f9adf2..157e9cda77 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h @@ -40,11 +40,11 @@ #ifndef PIESLICE_H #define PIESLICE_H -#include <QtDeclarative/QSGPaintedItem> +#include <QtDeclarative/QQuickPaintedItem> #include <QColor> //![0] -class PieSlice : public QSGPaintedItem +class PieSlice : public QQuickPaintedItem { Q_OBJECT Q_PROPERTY(QColor color READ color WRITE setColor) @@ -53,7 +53,7 @@ class PieSlice : public QSGPaintedItem //![0] public: - PieSlice(QSGItem *parent = 0); + PieSlice(QQuickItem *parent = 0); QColor color() const; void setColor(const QColor &color); diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp index 5aa4a78035..b9a6442acd 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp +++ b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp @@ -40,8 +40,8 @@ #include "piechart.h" #include "pieslice.h" -PieChart::PieChart(QSGItem *parent) - : QSGItem(parent) +PieChart::PieChart(QQuickItem *parent) + : QQuickItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.h b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.h index 1e4f1226dc..2d58360245 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.h +++ b/examples/declarative/tutorials/extending/chapter6-plugins/piechart.h @@ -40,18 +40,18 @@ #ifndef PIECHART_H #define PIECHART_H -#include <QSGItem> +#include <QQuickItem> class PieSlice; -class PieChart : public QSGItem +class PieChart : public QQuickItem { Q_OBJECT Q_PROPERTY(QDeclarativeListProperty<PieSlice> slices READ slices) Q_PROPERTY(QString name READ name WRITE setName) public: - PieChart(QSGItem *parent = 0); + PieChart(QQuickItem *parent = 0); QString name() const; void setName(const QString &name); diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp b/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp index 70338f08a0..839d153926 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp +++ b/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp @@ -41,8 +41,8 @@ #include <QPainter> -PieSlice::PieSlice(QSGItem *parent) - : QSGPaintedItem(parent) +PieSlice::PieSlice(QQuickItem *parent) + : QQuickPaintedItem(parent) { } diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h b/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h index 3096ee6570..4251e49396 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h +++ b/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h @@ -40,10 +40,10 @@ #ifndef PIESLICE_H #define PIESLICE_H -#include <QtDeclarative/QSGPaintedItem> +#include <QtDeclarative/QQuickPaintedItem> #include <QColor> -class PieSlice : public QSGPaintedItem +class PieSlice : public QQuickPaintedItem { Q_OBJECT Q_PROPERTY(QColor color READ color WRITE setColor) @@ -51,7 +51,7 @@ class PieSlice : public QSGPaintedItem Q_PROPERTY(int angleSpan READ angleSpan WRITE setAngleSpan) public: - PieSlice(QSGItem *parent = 0); + PieSlice(QQuickItem *parent = 0); QColor color() const; void setColor(const QColor &color); diff --git a/src/declarative/designer/designersupport.cpp b/src/declarative/designer/designersupport.cpp index d582ed1fe0..9c565c138c 100644 --- a/src/declarative/designer/designersupport.cpp +++ b/src/declarative/designer/designersupport.cpp @@ -40,12 +40,12 @@ ****************************************************************************/ #include "designersupport.h" -#include <private/qsgitem_p.h> +#include <private/qquickitem_p.h> -#include <private/qsgshadereffectsource_p.h> -#include <private/qsgrectangle_p.h> +#include <private/qquickshadereffectsource_p.h> +#include <private/qquickrectangle_p.h> #include <private/qdeclarativeengine_p.h> -#include <private/qsgview_p.h> +#include <private/qquickview_p.h> #include <private/qdeclarativestategroup_p.h> #include <QtGui/QImage> @@ -57,31 +57,31 @@ DesignerSupport::DesignerSupport() DesignerSupport::~DesignerSupport() { - QHash<QSGItem*, QSGShaderEffectTexture*>::iterator iterator; + QHash<QQuickItem*, QQuickShaderEffectTexture*>::iterator iterator; for (iterator = m_itemTextureHash.begin(); iterator != m_itemTextureHash.end(); ++iterator) { - QSGShaderEffectTexture *texture = iterator.value(); - QSGItem *item = iterator.key(); - QSGItemPrivate::get(item)->derefFromEffectItem(true); + QQuickShaderEffectTexture *texture = iterator.value(); + QQuickItem *item = iterator.key(); + QQuickItemPrivate::get(item)->derefFromEffectItem(true); delete texture; } } -void DesignerSupport::refFromEffectItem(QSGItem *referencedItem, bool hide) +void DesignerSupport::refFromEffectItem(QQuickItem *referencedItem, bool hide) { if (referencedItem == 0) return; - QSGItemPrivate::get(referencedItem)->refFromEffectItem(hide); - QSGCanvasPrivate::get(referencedItem->canvas())->updateDirtyNode(referencedItem); + QQuickItemPrivate::get(referencedItem)->refFromEffectItem(hide); + QQuickCanvasPrivate::get(referencedItem->canvas())->updateDirtyNode(referencedItem); - Q_ASSERT(QSGItemPrivate::get(referencedItem)->rootNode); + Q_ASSERT(QQuickItemPrivate::get(referencedItem)->rootNode); if (!m_itemTextureHash.contains(referencedItem)) { - QSGShaderEffectTexture *texture = new QSGShaderEffectTexture(referencedItem); + QQuickShaderEffectTexture *texture = new QQuickShaderEffectTexture(referencedItem); texture->setLive(true); - texture->setItem(QSGItemPrivate::get(referencedItem)->rootNode); + texture->setItem(QQuickItemPrivate::get(referencedItem)->rootNode); texture->setRect(referencedItem->boundingRect()); texture->setSize(referencedItem->boundingRect().size().toSize()); texture->setRecursive(true); @@ -96,23 +96,23 @@ void DesignerSupport::refFromEffectItem(QSGItem *referencedItem, bool hide) } } -void DesignerSupport::derefFromEffectItem(QSGItem *referencedItem, bool unhide) +void DesignerSupport::derefFromEffectItem(QQuickItem *referencedItem, bool unhide) { if (referencedItem == 0) return; delete m_itemTextureHash.take(referencedItem); - QSGItemPrivate::get(referencedItem)->derefFromEffectItem(unhide); + QQuickItemPrivate::get(referencedItem)->derefFromEffectItem(unhide); } -QImage DesignerSupport::renderImageForItem(QSGItem *referencedItem, const QRectF &boundingRect, const QSize &imageSize) +QImage DesignerSupport::renderImageForItem(QQuickItem *referencedItem, const QRectF &boundingRect, const QSize &imageSize) { if (referencedItem == 0 || referencedItem->parentItem() == 0) { qDebug() << __FILE__ << __LINE__ << "Warning: Item can be rendered."; return QImage(); } - QSGShaderEffectTexture *renderTexture = m_itemTextureHash.value(referencedItem); + QQuickShaderEffectTexture *renderTexture = m_itemTextureHash.value(referencedItem); Q_ASSERT(renderTexture); if (renderTexture == 0) @@ -130,54 +130,54 @@ QImage DesignerSupport::renderImageForItem(QSGItem *referencedItem, const QRectF return renderImage; } -bool DesignerSupport::isDirty(QSGItem *referencedItem, DirtyType dirtyType) +bool DesignerSupport::isDirty(QQuickItem *referencedItem, DirtyType dirtyType) { if (referencedItem == 0) return false; - return QSGItemPrivate::get(referencedItem)->dirtyAttributes & dirtyType; + return QQuickItemPrivate::get(referencedItem)->dirtyAttributes & dirtyType; } -void DesignerSupport::resetDirty(QSGItem *referencedItem) +void DesignerSupport::resetDirty(QQuickItem *referencedItem) { if (referencedItem == 0) return; - QSGItemPrivate::get(referencedItem)->dirtyAttributes = 0x0; - QSGItemPrivate::get(referencedItem)->removeFromDirtyList(); + QQuickItemPrivate::get(referencedItem)->dirtyAttributes = 0x0; + QQuickItemPrivate::get(referencedItem)->removeFromDirtyList(); } -QTransform DesignerSupport::canvasTransform(QSGItem *referencedItem) +QTransform DesignerSupport::canvasTransform(QQuickItem *referencedItem) { if (referencedItem == 0) return QTransform(); - return QSGItemPrivate::get(referencedItem)->itemToCanvasTransform(); + return QQuickItemPrivate::get(referencedItem)->itemToCanvasTransform(); } -QTransform DesignerSupport::parentTransform(QSGItem *referencedItem) +QTransform DesignerSupport::parentTransform(QQuickItem *referencedItem) { if (referencedItem == 0) return QTransform(); QTransform parentTransform; - QSGItemPrivate::get(referencedItem)->itemToParentTransform(parentTransform); + QQuickItemPrivate::get(referencedItem)->itemToParentTransform(parentTransform); return parentTransform; } -QString propertyNameForAnchorLine(const QSGAnchorLine::AnchorLine &anchorLine) +QString propertyNameForAnchorLine(const QQuickAnchorLine::AnchorLine &anchorLine) { switch (anchorLine) { - case QSGAnchorLine::Left: return QLatin1String("left"); - case QSGAnchorLine::Right: return QLatin1String("right"); - case QSGAnchorLine::Top: return QLatin1String("top"); - case QSGAnchorLine::Bottom: return QLatin1String("bottom"); - case QSGAnchorLine::HCenter: return QLatin1String("horizontalCenter"); - case QSGAnchorLine::VCenter: return QLatin1String("verticalCenter"); - case QSGAnchorLine::Baseline: return QLatin1String("baseline"); - case QSGAnchorLine::Invalid: + case QQuickAnchorLine::Left: return QLatin1String("left"); + case QQuickAnchorLine::Right: return QLatin1String("right"); + case QQuickAnchorLine::Top: return QLatin1String("top"); + case QQuickAnchorLine::Bottom: return QLatin1String("bottom"); + case QQuickAnchorLine::HCenter: return QLatin1String("horizontalCenter"); + case QQuickAnchorLine::VCenter: return QLatin1String("verticalCenter"); + case QQuickAnchorLine::Baseline: return QLatin1String("baseline"); + case QQuickAnchorLine::Invalid: default: return QString(); } } @@ -197,11 +197,11 @@ bool isValidAnchorName(const QString &name) return anchorNameList.contains(name); } -bool DesignerSupport::isAnchoredTo(QSGItem *fromItem, QSGItem *toItem) +bool DesignerSupport::isAnchoredTo(QQuickItem *fromItem, QQuickItem *toItem) { - Q_ASSERT(dynamic_cast<QSGItemPrivate*>(QSGItemPrivate::get(fromItem))); - QSGItemPrivate *fromItemPrivate = static_cast<QSGItemPrivate*>(QSGItemPrivate::get(fromItem)); - QSGAnchors *anchors = fromItemPrivate->anchors(); + Q_ASSERT(dynamic_cast<QQuickItemPrivate*>(QQuickItemPrivate::get(fromItem))); + QQuickItemPrivate *fromItemPrivate = static_cast<QQuickItemPrivate*>(QQuickItemPrivate::get(fromItem)); + QQuickAnchors *anchors = fromItemPrivate->anchors(); return anchors->fill() == toItem || anchors->centerIn() == toItem || anchors->bottom().item == toItem @@ -213,9 +213,9 @@ bool DesignerSupport::isAnchoredTo(QSGItem *fromItem, QSGItem *toItem) || anchors->baseline().item == toItem; } -bool DesignerSupport::areChildrenAnchoredTo(QSGItem *fromItem, QSGItem *toItem) +bool DesignerSupport::areChildrenAnchoredTo(QQuickItem *fromItem, QQuickItem *toItem) { - foreach (QSGItem *childItem, fromItem->childItems()) { + foreach (QQuickItem *childItem, fromItem->childItems()) { if (childItem) { if (isAnchoredTo(childItem, toItem)) return true; @@ -228,41 +228,41 @@ bool DesignerSupport::areChildrenAnchoredTo(QSGItem *fromItem, QSGItem *toItem) return false; } -QSGAnchors *anchors(QSGItem *item) +QQuickAnchors *anchors(QQuickItem *item) { - QSGItemPrivate *itemPrivate = static_cast<QSGItemPrivate*>(QSGItemPrivate::get(item)); + QQuickItemPrivate *itemPrivate = static_cast<QQuickItemPrivate*>(QQuickItemPrivate::get(item)); return itemPrivate->anchors(); } -QSGAnchors::Anchor anchorLineFlagForName(const QString &name) +QQuickAnchors::Anchor anchorLineFlagForName(const QString &name) { if (name == QLatin1String("anchors.top")) - return QSGAnchors::TopAnchor; + return QQuickAnchors::TopAnchor; if (name == QLatin1String("anchors.left")) - return QSGAnchors::LeftAnchor; + return QQuickAnchors::LeftAnchor; if (name == QLatin1String("anchors.bottom")) - return QSGAnchors::BottomAnchor; + return QQuickAnchors::BottomAnchor; if (name == QLatin1String("anchors.right")) - return QSGAnchors::RightAnchor; + return QQuickAnchors::RightAnchor; if (name == QLatin1String("anchors.horizontalCenter")) - return QSGAnchors::HCenterAnchor; + return QQuickAnchors::HCenterAnchor; if (name == QLatin1String("anchors.verticalCenter")) - return QSGAnchors::VCenterAnchor; + return QQuickAnchors::VCenterAnchor; if (name == QLatin1String("anchors.baseline")) - return QSGAnchors::BaselineAnchor; + return QQuickAnchors::BaselineAnchor; Q_ASSERT_X(false, Q_FUNC_INFO, "wrong anchor name - this should never happen"); - return QSGAnchors::LeftAnchor; + return QQuickAnchors::LeftAnchor; } -bool DesignerSupport::hasAnchor(QSGItem *item, const QString &name) +bool DesignerSupport::hasAnchor(QQuickItem *item, const QString &name) { if (!isValidAnchorName(name)) return false; @@ -297,19 +297,19 @@ bool DesignerSupport::hasAnchor(QSGItem *item, const QString &name) return anchors(item)->usedAnchors().testFlag(anchorLineFlagForName(name)); } -QSGItem *DesignerSupport::anchorFillTargetItem(QSGItem *item) +QQuickItem *DesignerSupport::anchorFillTargetItem(QQuickItem *item) { return anchors(item)->fill(); } -QSGItem *DesignerSupport::anchorCenterInTargetItem(QSGItem *item) +QQuickItem *DesignerSupport::anchorCenterInTargetItem(QQuickItem *item) { return anchors(item)->centerIn(); } -QPair<QString, QObject*> DesignerSupport::anchorLineTarget(QSGItem *item, const QString &name, QDeclarativeContext *context) +QPair<QString, QObject*> DesignerSupport::anchorLineTarget(QQuickItem *item, const QString &name, QDeclarativeContext *context) { QObject *targetObject = 0; QString targetName; @@ -323,8 +323,8 @@ QPair<QString, QObject*> DesignerSupport::anchorLineTarget(QSGItem *item, const if (!metaProperty.isValid()) return QPair<QString, QObject*>(); - QSGAnchorLine anchorLine = metaProperty.read().value<QSGAnchorLine>(); - if (anchorLine.anchorLine != QSGAnchorLine::Invalid) { + QQuickAnchorLine anchorLine = metaProperty.read().value<QQuickAnchorLine>(); + if (anchorLine.anchorLine != QQuickAnchorLine::Invalid) { targetObject = anchorLine.item; targetName = propertyNameForAnchorLine(anchorLine.anchorLine); } @@ -334,7 +334,7 @@ QPair<QString, QObject*> DesignerSupport::anchorLineTarget(QSGItem *item, const return QPair<QString, QObject*>(targetName, targetObject); } -void DesignerSupport::resetAnchor(QSGItem *item, const QString &name) +void DesignerSupport::resetAnchor(QQuickItem *item, const QString &name) { if (name == QLatin1String("anchors.fill")) { anchors(item)->resetFill(); @@ -357,23 +357,23 @@ void DesignerSupport::resetAnchor(QSGItem *item, const QString &name) } } -QList<QObject*> DesignerSupport::statesForItem(QSGItem *item) +QList<QObject*> DesignerSupport::statesForItem(QQuickItem *item) { QList<QObject*> objectList; - QList<QDeclarativeState *> stateList = QSGItemPrivate::get(item)->_states()->states(); + QList<QDeclarativeState *> stateList = QQuickItemPrivate::get(item)->_states()->states(); qCopy(stateList.begin(), stateList.end(), objectList.begin()); return objectList; } -bool DesignerSupport::isComponentComplete(QSGItem *item) +bool DesignerSupport::isComponentComplete(QQuickItem *item) { - return static_cast<QSGItemPrivate*>(QSGItemPrivate::get(item))->componentComplete; + return static_cast<QQuickItemPrivate*>(QQuickItemPrivate::get(item))->componentComplete; } -int DesignerSupport::borderWidth(QSGItem *item) +int DesignerSupport::borderWidth(QQuickItem *item) { - QSGRectangle *rectangle = qobject_cast<QSGRectangle*>(item); + QQuickRectangle *rectangle = qobject_cast<QQuickRectangle*>(item); if (rectangle) return rectangle->border()->width(); @@ -385,24 +385,24 @@ void DesignerSupport::refreshExpressions(QDeclarativeContext *context) QDeclarativeContextPrivate::get(context)->data->refreshExpressions(); } -void DesignerSupport::setRootItem(QSGView *view, QSGItem *item) +void DesignerSupport::setRootItem(QQuickView *view, QQuickItem *item) { - QSGViewPrivate::get(view)->setRootObject(item); + QQuickViewPrivate::get(view)->setRootObject(item); } -bool DesignerSupport::isValidWidth(QSGItem *item) +bool DesignerSupport::isValidWidth(QQuickItem *item) { - return QSGItemPrivate::get(item)->heightValid; + return QQuickItemPrivate::get(item)->heightValid; } -bool DesignerSupport::isValidHeight(QSGItem *item) +bool DesignerSupport::isValidHeight(QQuickItem *item) { - return QSGItemPrivate::get(item)->widthValid; + return QQuickItemPrivate::get(item)->widthValid; } -void DesignerSupport::updateDirtyNode(QSGItem *item) +void DesignerSupport::updateDirtyNode(QQuickItem *item) { - QSGCanvasPrivate::get(item->canvas())->updateDirtyNode(item); + QQuickCanvasPrivate::get(item->canvas())->updateDirtyNode(item); } QT_END_NAMESPACE diff --git a/src/declarative/designer/designersupport.h b/src/declarative/designer/designersupport.h index b52a4a23d3..8b9df689d0 100644 --- a/src/declarative/designer/designersupport.h +++ b/src/declarative/designer/designersupport.h @@ -62,12 +62,12 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGItem; -class QSGShaderEffectTexture; +class QQuickItem; +class QQuickShaderEffectTexture; class QImage; class QTransform; class QDeclarativeContext; -class QSGView; +class QQuickView; class Q_DECLARATIVE_EXPORT DesignerSupport @@ -105,43 +105,43 @@ public: DesignerSupport(); ~DesignerSupport(); - void refFromEffectItem(QSGItem *referencedItem, bool hide = true); - void derefFromEffectItem(QSGItem *referencedItem, bool unhide = true); + void refFromEffectItem(QQuickItem *referencedItem, bool hide = true); + void derefFromEffectItem(QQuickItem *referencedItem, bool unhide = true); - QImage renderImageForItem(QSGItem *referencedItem, const QRectF &boundingRect, const QSize &imageSize); + QImage renderImageForItem(QQuickItem *referencedItem, const QRectF &boundingRect, const QSize &imageSize); - static bool isDirty(QSGItem *referencedItem, DirtyType dirtyType); - static void resetDirty(QSGItem *referencedItem); + static bool isDirty(QQuickItem *referencedItem, DirtyType dirtyType); + static void resetDirty(QQuickItem *referencedItem); - static QTransform canvasTransform(QSGItem *referencedItem); - static QTransform parentTransform(QSGItem *referencedItem); + static QTransform canvasTransform(QQuickItem *referencedItem); + static QTransform parentTransform(QQuickItem *referencedItem); - static bool isAnchoredTo(QSGItem *fromItem, QSGItem *toItem); - static bool areChildrenAnchoredTo(QSGItem *fromItem, QSGItem *toItem); - static bool hasAnchor(QSGItem *item, const QString &name); - static QSGItem *anchorFillTargetItem(QSGItem *item); - static QSGItem *anchorCenterInTargetItem(QSGItem *item); - static QPair<QString, QObject*> anchorLineTarget(QSGItem *item, const QString &name, QDeclarativeContext *context); - static void resetAnchor(QSGItem *item, const QString &name); + static bool isAnchoredTo(QQuickItem *fromItem, QQuickItem *toItem); + static bool areChildrenAnchoredTo(QQuickItem *fromItem, QQuickItem *toItem); + static bool hasAnchor(QQuickItem *item, const QString &name); + static QQuickItem *anchorFillTargetItem(QQuickItem *item); + static QQuickItem *anchorCenterInTargetItem(QQuickItem *item); + static QPair<QString, QObject*> anchorLineTarget(QQuickItem *item, const QString &name, QDeclarativeContext *context); + static void resetAnchor(QQuickItem *item, const QString &name); - static QList<QObject*> statesForItem(QSGItem *item); + static QList<QObject*> statesForItem(QQuickItem *item); - static bool isComponentComplete(QSGItem *item); + static bool isComponentComplete(QQuickItem *item); - static int borderWidth(QSGItem *item); + static int borderWidth(QQuickItem *item); static void refreshExpressions(QDeclarativeContext *context); - static void setRootItem(QSGView *view, QSGItem *item); + static void setRootItem(QQuickView *view, QQuickItem *item); - static bool isValidWidth(QSGItem *item); - static bool isValidHeight(QSGItem *item); + static bool isValidWidth(QQuickItem *item); + static bool isValidHeight(QQuickItem *item); - static void updateDirtyNode(QSGItem *item); + static void updateDirtyNode(QQuickItem *item); private: - QHash<QSGItem*, QSGShaderEffectTexture*> m_itemTextureHash; + QHash<QQuickItem*, QQuickShaderEffectTexture*> m_itemTextureHash; }; QT_END_NAMESPACE diff --git a/src/declarative/items/context2d/context2d.pri b/src/declarative/items/context2d/context2d.pri index 31ed75d82a..60b3e4b0c1 100644 --- a/src/declarative/items/context2d/context2d.pri +++ b/src/declarative/items/context2d/context2d.pri @@ -1,16 +1,16 @@ SOURCES += \ - $$PWD/qsgcanvasitem.cpp \ - $$PWD/qsgcontext2d.cpp \ - $$PWD/qsgcontext2dnode.cpp \ - $$PWD/qsgcontext2dtile.cpp \ - $$PWD/qsgcontext2dtexture.cpp \ - $$PWD/qsgcontext2dcommandbuffer.cpp \ + $$PWD/qquickcanvasitem.cpp \ + $$PWD/qquickcontext2d.cpp \ + $$PWD/qquickcontext2dnode.cpp \ + $$PWD/qquickcontext2dtile.cpp \ + $$PWD/qquickcontext2dtexture.cpp \ + $$PWD/qquickcontext2dcommandbuffer.cpp \ HEADERS += \ - $$PWD/qsgcanvasitem_p.h \ - $$PWD/qsgcontext2d_p.h \ - $$PWD/qsgcontext2dnode_p.h \ - $$PWD/qsgcontext2dtile_p.h \ - $$PWD/qsgcontext2dtexture_p.h \ - $$PWD/qsgcontext2dcommandbuffer_p.h \ + $$PWD/qquickcanvasitem_p.h \ + $$PWD/qquickcontext2d_p.h \ + $$PWD/qquickcontext2dnode_p.h \ + $$PWD/qquickcontext2dtile_p.h \ + $$PWD/qquickcontext2dtexture_p.h \ + $$PWD/qquickcontext2dcommandbuffer_p.h \ diff --git a/src/declarative/items/context2d/qsgcanvasitem.cpp b/src/declarative/items/context2d/qquickcanvasitem.cpp index b3b4eab30d..86db5e616c 100644 --- a/src/declarative/items/context2d/qsgcanvasitem.cpp +++ b/src/declarative/items/context2d/qquickcanvasitem.cpp @@ -40,11 +40,11 @@ ****************************************************************************/ #include <private/qsgadaptationlayer_p.h> -#include "qsgcanvasitem_p.h" -#include <private/qsgitem_p.h> -#include "qsgcontext2d_p.h" -#include "qsgcontext2dnode_p.h" -#include "qsgcontext2dtexture_p.h" +#include "qquickcanvasitem_p.h" +#include <private/qquickitem_p.h> +#include "qquickcontext2d_p.h" +#include "qquickcontext2dnode_p.h" +#include "qquickcontext2dtexture_p.h" #include <private/qdeclarativepixmapcache_p.h> #include <qdeclarativeinfo.h> @@ -53,13 +53,13 @@ QT_BEGIN_NAMESPACE -class QSGCanvasItemPrivate : public QSGItemPrivate +class QQuickCanvasItemPrivate : public QQuickItemPrivate { public: - QSGCanvasItemPrivate(); - ~QSGCanvasItemPrivate(); - QSGContext2D* context; - QSGContext2DTexture* texture; + QQuickCanvasItemPrivate(); + ~QQuickCanvasItemPrivate(); + QQuickContext2D* context; + QQuickContext2DTexture* texture; QSizeF canvasSize; QSize tileSize; QRectF canvasWindow; @@ -69,13 +69,13 @@ public: uint hasTileSize :1; uint hasCanvasWindow :1; uint componentCompleted :1; - QSGCanvasItem::RenderTarget renderTarget; + QQuickCanvasItem::RenderTarget renderTarget; QHash<QUrl, QDeclarativePixmap*> images; QUrl baseUrl; }; -QSGCanvasItemPrivate::QSGCanvasItemPrivate() - : QSGItemPrivate() +QQuickCanvasItemPrivate::QQuickCanvasItemPrivate() + : QQuickItemPrivate() , context(0) , texture(0) , canvasSize(1, 1) @@ -85,17 +85,17 @@ QSGCanvasItemPrivate::QSGCanvasItemPrivate() , hasTileSize(false) , hasCanvasWindow(false) , componentCompleted(false) - , renderTarget(QSGCanvasItem::FramebufferObject) + , renderTarget(QQuickCanvasItem::FramebufferObject) { } -QSGCanvasItemPrivate::~QSGCanvasItemPrivate() +QQuickCanvasItemPrivate::~QQuickCanvasItemPrivate() { qDeleteAll(images); } /*! - \qmlclass Canvas QSGCanvasItem + \qmlclass Canvas QQuickCanvasItem \inqmlmodule QtQuick 2 \since QtQuick 2.0 \brief The Canvas item provides HTML5 like canvas element which enables you to @@ -175,15 +175,15 @@ QSGCanvasItemPrivate::~QSGCanvasItemPrivate() \sa QtQuick2::Context2D */ -QSGCanvasItem::QSGCanvasItem(QSGItem *parent) - : QSGItem(*(new QSGCanvasItemPrivate), parent) +QQuickCanvasItem::QQuickCanvasItem(QQuickItem *parent) + : QQuickItem(*(new QQuickCanvasItemPrivate), parent) { setFlag(ItemHasContents); } -QSGCanvasItem::~QSGCanvasItem() +QQuickCanvasItem::~QQuickCanvasItem() { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); delete d->context; } @@ -198,15 +198,15 @@ QSGCanvasItem::~QSGCanvasItem() the Canvas render engine. \sa QtQuick2::Canvas::tileSize QtQuick2::Canvas::canvasWindow */ -QSizeF QSGCanvasItem::canvasSize() const +QSizeF QQuickCanvasItem::canvasSize() const { - Q_D(const QSGCanvasItem); + Q_D(const QQuickCanvasItem); return d->canvasSize; } -void QSGCanvasItem::setCanvasSize(const QSizeF & size) +void QQuickCanvasItem::setCanvasSize(const QSizeF & size) { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); if (d->canvasSize != size) { d->hasCanvasSize = true; d->canvasSize = size; @@ -231,15 +231,15 @@ void QSGCanvasItem::setCanvasSize(const QSizeF & size) By default, the tile size is the same with the canvas size. \sa QtQuick2::Canvas::canvaasSize QtQuick2::Canvas::canvasWindow */ -QSize QSGCanvasItem::tileSize() const +QSize QQuickCanvasItem::tileSize() const { - Q_D(const QSGCanvasItem); + Q_D(const QQuickCanvasItem); return d->tileSize; } -void QSGCanvasItem::setTileSize(const QSize & size) +void QQuickCanvasItem::setTileSize(const QSize & size) { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); if (d->tileSize != size) { d->hasTileSize = true; d->tileSize = size; @@ -262,15 +262,15 @@ void QSGCanvasItem::setTileSize(const QSize & size) and/or position. \sa QtQuick2::Canvas::canvasSize QtQuick2::Canvas::tileSize */ -QRectF QSGCanvasItem::canvasWindow() const +QRectF QQuickCanvasItem::canvasWindow() const { - Q_D(const QSGCanvasItem); + Q_D(const QQuickCanvasItem); return d->canvasWindow; } -void QSGCanvasItem::setCanvasWindow(const QRectF& rect) +void QQuickCanvasItem::setCanvasWindow(const QRectF& rect) { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); if (d->canvasWindow != rect) { d->canvasWindow = rect; @@ -282,9 +282,9 @@ void QSGCanvasItem::setCanvasWindow(const QRectF& rect) } -QSGContext2D* QSGCanvasItem::context() const +QQuickContext2D* QQuickCanvasItem::context() const { - Q_D(const QSGCanvasItem); + Q_D(const QQuickCanvasItem); return d->context; } /*! @@ -302,9 +302,9 @@ QSGContext2D* QSGCanvasItem::context() const The default value is false. \sa QtQuick2::Canvas::renderTarget */ -bool QSGCanvasItem::renderInThread() const +bool QQuickCanvasItem::renderInThread() const { - Q_D(const QSGCanvasItem); + Q_D(const QQuickCanvasItem); return d->renderInThread; } /*! @@ -325,15 +325,15 @@ bool QSGCanvasItem::renderInThread() const The default render target is \c Canvas.Image. \sa QtQuick2::Canvas::renderInThread */ -QSGCanvasItem::RenderTarget QSGCanvasItem::renderTarget() const +QQuickCanvasItem::RenderTarget QQuickCanvasItem::renderTarget() const { - Q_D(const QSGCanvasItem); + Q_D(const QQuickCanvasItem); return d->renderTarget; } -void QSGCanvasItem::setRenderTarget(RenderTarget target) +void QQuickCanvasItem::setRenderTarget(RenderTarget target) { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); if (d->renderTarget != target) { d->renderTarget = target; @@ -343,11 +343,11 @@ void QSGCanvasItem::setRenderTarget(RenderTarget target) } } -void QSGCanvasItem::_doPainting(const QRectF& region) +void QQuickCanvasItem::_doPainting(const QRectF& region) { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); emit paint(QDeclarativeV8Handle::fromHandle(d->context->v8value()) - , QSGContext2DTexture::tiledRect(region, d->tileSize)); + , QQuickContext2DTexture::tiledRect(region, d->tileSize)); if (d->texture) d->texture->wake(); } @@ -362,9 +362,9 @@ void QSGCanvasItem::_doPainting(const QRectF& region) The default renderInThread value is false. */ -void QSGCanvasItem::setRenderInThread(bool renderInThread) +void QQuickCanvasItem::setRenderInThread(bool renderInThread) { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); if (d->renderInThread != renderInThread) { d->renderInThread = renderInThread; @@ -381,11 +381,11 @@ void QSGCanvasItem::setRenderInThread(bool renderInThread) } } -void QSGCanvasItem::geometryChanged(const QRectF &newGeometry, +void QQuickCanvasItem::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { - Q_D(QSGCanvasItem); - QSGItem::geometryChanged(newGeometry, oldGeometry); + Q_D(QQuickCanvasItem); + QQuickItem::geometryChanged(newGeometry, oldGeometry); const qreal w = newGeometry.width(); const qreal h = newGeometry.height(); @@ -409,10 +409,10 @@ void QSGCanvasItem::geometryChanged(const QRectF &newGeometry, update(); } -void QSGCanvasItem::componentComplete() +void QQuickCanvasItem::componentComplete() { - Q_D(QSGCanvasItem); - QSGItem::componentComplete(); + Q_D(QQuickCanvasItem); + QQuickItem::componentComplete(); if (!d->context) createContext(); @@ -425,10 +425,10 @@ void QSGCanvasItem::componentComplete() d->componentCompleted = true; } -void QSGCanvasItem::updatePolish() +void QQuickCanvasItem::updatePolish() { - Q_D(QSGCanvasItem); - QSGItem::updatePolish(); + Q_D(QQuickCanvasItem); + QQuickItem::updatePolish(); if (d->texture) { if (!d->renderInThread && d->dirtyRect.isValid()) _doPainting(d->dirtyRect); @@ -442,12 +442,12 @@ void QSGCanvasItem::updatePolish() } } -QSGNode *QSGCanvasItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) +QSGNode *QQuickCanvasItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) { - Q_D(QSGCanvasItem); - QSGContext2DNode *node = static_cast<QSGContext2DNode *>(oldNode); + Q_D(QQuickCanvasItem); + QQuickContext2DNode *node = static_cast<QQuickContext2DNode *>(oldNode); if (!node) - node = new QSGContext2DNode(this); + node = new QQuickContext2DNode(this); node->setTexture(d->texture); node->setSize(d->canvasWindow.size()); @@ -455,9 +455,9 @@ QSGNode *QSGCanvasItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) return node; } -void QSGCanvasItem::createTexture() +void QQuickCanvasItem::createTexture() { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); if (!d->texture || d->texture->threadRendering() != d->renderInThread @@ -467,10 +467,10 @@ void QSGCanvasItem::createTexture() d->texture = 0; } - if (d->renderTarget == QSGCanvasItem::Image) { - d->texture = new QSGContext2DImageTexture(d->renderInThread); - } else if (d->renderTarget == QSGCanvasItem::FramebufferObject) { - d->texture = new QSGContext2DFBOTexture(); + if (d->renderTarget == QQuickCanvasItem::Image) { + d->texture = new QQuickContext2DImageTexture(d->renderInThread); + } else if (d->renderTarget == QQuickCanvasItem::FramebufferObject) { + d->texture = new QQuickContext2DFBOTexture(); } if (d->renderInThread && !d->texture->supportThreadRendering()) { @@ -486,13 +486,13 @@ void QSGCanvasItem::createTexture() } } -void QSGCanvasItem::createContext() +void QQuickCanvasItem::createContext() { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); delete d->context; - d->context = new QSGContext2D(this); + d->context = new QQuickContext2D(this); QV8Engine *e = QDeclarativeEnginePrivate::getV8Engine(qmlEngine(this)); d->context->setV8Engine(e); @@ -505,9 +505,9 @@ void QSGCanvasItem::createContext() parameter isn't provided or is "2d", then the QtQuick2::Context2D object is returned, otherwise returns an invalid value. */ -QDeclarativeV8Handle QSGCanvasItem::getContext(const QString &contextId) +QDeclarativeV8Handle QQuickCanvasItem::getContext(const QString &contextId) { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); if (contextId.toLower() != QLatin1String("2d")) return QDeclarativeV8Handle::fromHandle(v8::Undefined()); @@ -527,9 +527,9 @@ QDeclarativeV8Handle QSGCanvasItem::getContext(const QString &contextId) \sa QtQuick2::Canvas::paint QtQuick2::Canvas::requestPaint */ -void QSGCanvasItem::markDirty(const QRectF& region) +void QQuickCanvasItem::markDirty(const QRectF& region) { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); d->dirtyRect |= region; if (d->componentCompleted) polish(); @@ -549,16 +549,16 @@ void QSGCanvasItem::markDirty(const QRectF& region) \sa canvasWindow canvasSize toDataURL */ -bool QSGCanvasItem::save(const QString &filename) const +bool QQuickCanvasItem::save(const QString &filename) const { - Q_D(const QSGCanvasItem); + Q_D(const QQuickCanvasItem); QUrl url = d->baseUrl.resolved(QUrl::fromLocalFile(filename)); return toImage().save(url.toLocalFile()); } -QImage QSGCanvasItem::loadedImage(const QUrl& url) +QImage QQuickCanvasItem::loadedImage(const QUrl& url) { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); QUrl fullPathUrl = d->baseUrl.resolved(url); if (!d->images.contains(fullPathUrl)) { loadImage(url); @@ -580,9 +580,9 @@ QImage QSGCanvasItem::loadedImage(const QUrl& url) \sa QtQuick2::Canvas::unloadImage QtQuick2::Canvas::imageLoaded QtQuick2::Canvas::isImageLoaded \sa QtQuick2::Context2D::createImageData QtQuick2::Context2D::drawImage */ -void QSGCanvasItem::loadImage(const QUrl& url) +void QQuickCanvasItem::loadImage(const QUrl& url) { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); QUrl fullPathUrl = d->baseUrl.resolved(url); if (!d->images.contains(fullPathUrl)) { QDeclarativePixmap* pix = new QDeclarativePixmap(); @@ -604,9 +604,9 @@ void QSGCanvasItem::loadImage(const QUrl& url) \sa QtQuick2::Canvas::loadImage QtQuick2::Canvas::imageLoaded QtQuick2::Canvas::isImageLoaded \sa QtQuick2::Context2D::createImageData QtQuick2::Context2D::drawImage */ -void QSGCanvasItem::unloadImage(const QUrl& url) +void QQuickCanvasItem::unloadImage(const QUrl& url) { - Q_D(QSGCanvasItem); + Q_D(QQuickCanvasItem); QUrl removeThis = d->baseUrl.resolved(url); if (d->images.contains(removeThis)) { delete d->images.value(removeThis); @@ -620,9 +620,9 @@ void QSGCanvasItem::unloadImage(const QUrl& url) \sa QtQuick2::Canvas::loadImage */ -bool QSGCanvasItem::isImageError(const QUrl& url) const +bool QQuickCanvasItem::isImageError(const QUrl& url) const { - Q_D(const QSGCanvasItem); + Q_D(const QQuickCanvasItem); QUrl fullPathUrl = d->baseUrl.resolved(url); return d->images.contains(fullPathUrl) && d->images.value(fullPathUrl)->isError(); @@ -634,9 +634,9 @@ bool QSGCanvasItem::isImageError(const QUrl& url) const \sa QtQuick2::Canvas::loadImage */ -bool QSGCanvasItem::isImageLoading(const QUrl& url) const +bool QQuickCanvasItem::isImageLoading(const QUrl& url) const { - Q_D(const QSGCanvasItem); + Q_D(const QQuickCanvasItem); QUrl fullPathUrl = d->baseUrl.resolved(url); return d->images.contains(fullPathUrl) && d->images.value(fullPathUrl)->isLoading(); @@ -647,17 +647,17 @@ bool QSGCanvasItem::isImageLoading(const QUrl& url) const \sa QtQuick2::Canvas::loadImage */ -bool QSGCanvasItem::isImageLoaded(const QUrl& url) const +bool QQuickCanvasItem::isImageLoaded(const QUrl& url) const { - Q_D(const QSGCanvasItem); + Q_D(const QQuickCanvasItem); QUrl fullPathUrl = d->baseUrl.resolved(url); return d->images.contains(fullPathUrl) && d->images.value(fullPathUrl)->isReady(); } -QImage QSGCanvasItem::toImage(const QRectF& region) const +QImage QQuickCanvasItem::toImage(const QRectF& region) const { - Q_D(const QSGCanvasItem); + Q_D(const QQuickCanvasItem); if (d->texture) { if (region.isEmpty()) return d->texture->toImage(canvasWindow()); @@ -676,7 +676,7 @@ QImage QSGCanvasItem::toImage(const QRectF& region) const \sa QtQuick2::Canvas::save */ -QString QSGCanvasItem::toDataURL(const QString& mimeType) const +QString QQuickCanvasItem::toDataURL(const QString& mimeType) const { QImage image = toImage(); diff --git a/src/declarative/items/context2d/qsgcanvasitem_p.h b/src/declarative/items/context2d/qquickcanvasitem_p.h index 131a3f5fff..e0261192ed 100644 --- a/src/declarative/items/context2d/qsgcanvasitem_p.h +++ b/src/declarative/items/context2d/qquickcanvasitem_p.h @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QSGCANVASITEM_P_H -#define QSGCANVASITEM_P_H +#ifndef QQUICKCANVASITEM_P_H +#define QQUICKCANVASITEM_P_H -#include <qsgitem.h> +#include <qquickitem.h> #include <private/qv8engine_p.h> QT_BEGIN_HEADER @@ -50,9 +50,9 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGContext2D; -class QSGCanvasItemPrivate; -class Q_DECLARATIVE_EXPORT QSGCanvasItem : public QSGItem +class QQuickContext2D; +class QQuickCanvasItemPrivate; +class Q_DECLARATIVE_EXPORT QQuickCanvasItem : public QQuickItem { Q_OBJECT Q_ENUMS(RenderTarget) @@ -80,8 +80,8 @@ public: Convolute }; - QSGCanvasItem(QSGItem *parent = 0); - ~QSGCanvasItem(); + QQuickCanvasItem(QQuickItem *parent = 0); + ~QQuickCanvasItem(); QSizeF canvasSize() const; void setCanvasSize(const QSizeF &); @@ -98,7 +98,7 @@ public: RenderTarget renderTarget() const; void setRenderTarget(RenderTarget target); - QSGContext2D* context() const; + QQuickContext2D* context() const; QImage toImage(const QRectF& region = QRectF()) const; QImage loadedImage(const QUrl& url); @@ -135,14 +135,14 @@ protected: private: void createContext(); void createTexture(); - Q_DECLARE_PRIVATE(QSGCanvasItem) - friend class QSGContext2D; - friend class QSGContext2DTexture; + Q_DECLARE_PRIVATE(QQuickCanvasItem) + friend class QQuickContext2D; + friend class QQuickContext2DTexture; }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QSGCanvasItem) +QML_DECLARE_TYPE(QQuickCanvasItem) QT_END_HEADER -#endif //QSGCANVASITEM_P_H +#endif //QQUICKCANVASITEM_P_H diff --git a/src/declarative/items/context2d/qsgcontext2d.cpp b/src/declarative/items/context2d/qquickcontext2d.cpp index 5944a02658..0c0865b3b3 100644 --- a/src/declarative/items/context2d/qsgcontext2d.cpp +++ b/src/declarative/items/context2d/qquickcontext2d.cpp @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#include "qsgcontext2d_p.h" -#include "qsgcontext2dcommandbuffer_p.h" -#include "qsgcanvasitem_p.h" -#include <private/qsgitem_p.h> -#include <private/qsgshadereffectsource_p.h> +#include "qquickcontext2d_p.h" +#include "qquickcontext2dcommandbuffer_p.h" +#include "qquickcanvasitem_p.h" +#include <private/qquickitem_p.h> +#include <private/qquickshadereffectsource_p.h> #include <QtGui/qopenglframebufferobject.h> #include <QtCore/qdebug.h> @@ -51,7 +51,7 @@ #include <private/qdeclarativesvgparser_p.h> #include <private/qdeclarativepath_p.h> -#include <private/qsgimage_p_p.h> +#include <private/qquickimage_p_p.h> #include <QtGui/qguiapplication.h> #include <qdeclarativeinfo.h> @@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE /*! - \qmlclass Context2D QSGContext2D + \qmlclass Context2D QQuickContext2D \inqmlmodule QtQuick 2 \since QtQuick 2.0 \brief The Context2D API allows you to draw 2d graphic shapes on the \c Canvas item. @@ -200,11 +200,11 @@ QFont qt_font_from_string(const QString& fontString) { -class QSGContext2DEngineData : public QV8Engine::Deletable +class QQuickContext2DEngineData : public QV8Engine::Deletable { public: - QSGContext2DEngineData(QV8Engine *engine); - ~QSGContext2DEngineData(); + QQuickContext2DEngineData(QV8Engine *engine); + ~QQuickContext2DEngineData(); v8::Persistent<v8::Function> constructorContext; v8::Persistent<v8::Function> constructorGradient; @@ -213,14 +213,14 @@ public: v8::Persistent<v8::Function> constructorImageData; }; -V8_DEFINE_EXTENSION(QSGContext2DEngineData, engineData) +V8_DEFINE_EXTENSION(QQuickContext2DEngineData, engineData) class QV8Context2DResource : public QV8ObjectResource { V8_RESOURCE_TYPE(Context2DType) public: QV8Context2DResource(QV8Engine *e) : QV8ObjectResource(e) {} - QSGContext2D* context; + QQuickContext2D* context; }; class QV8Context2DStyleResource : public QV8ObjectResource @@ -408,7 +408,7 @@ static QString qt_composite_mode_to_string(QPainter::CompositionMode op) static v8::Local<v8::Object> qt_create_image_data(qreal w, qreal h, QV8Engine* engine, const QImage& image) { - QSGContext2DEngineData *ed = engineData(engine); + QQuickContext2DEngineData *ed = engineData(engine); v8::Local<v8::Object> imageData = ed->constructorImageData->NewInstance(); QV8Context2DPixelArrayResource *r = new QV8Context2DPixelArrayResource(engine); if (image.isNull()) { @@ -1049,7 +1049,7 @@ static v8::Handle<v8::Value> ctx2d_createLinearGradient(const v8::Arguments &arg QV8Engine *engine = V8ENGINE(); if (args.Length() == 4) { - QSGContext2DEngineData *ed = engineData(engine); + QQuickContext2DEngineData *ed = engineData(engine); v8::Local<v8::Object> gradient = ed->constructorGradient->NewInstance(); QV8Context2DStyleResource *r = new QV8Context2DStyleResource(engine); qreal x0 = args[0]->NumberValue(); @@ -1093,7 +1093,7 @@ static v8::Handle<v8::Value> ctx2d_createRadialGradient(const v8::Arguments &arg QV8Engine *engine = V8ENGINE(); if (args.Length() == 6) { - QSGContext2DEngineData *ed = engineData(engine); + QQuickContext2DEngineData *ed = engineData(engine); v8::Local<v8::Object> gradient = ed->constructorGradient->NewInstance(); QV8Context2DStyleResource *r = new QV8Context2DStyleResource(engine); @@ -1146,7 +1146,7 @@ static v8::Handle<v8::Value> ctx2d_createConicalGradient(const v8::Arguments &ar QV8Engine *engine = V8ENGINE(); if (args.Length() == 6) { - QSGContext2DEngineData *ed = engineData(engine); + QQuickContext2DEngineData *ed = engineData(engine); v8::Local<v8::Object> gradient = ed->constructorGradient->NewInstance(); QV8Context2DStyleResource *r = new QV8Context2DStyleResource(engine); @@ -1218,7 +1218,7 @@ static v8::Handle<v8::Value> ctx2d_createPattern(const v8::Arguments &args) QV8Engine *engine = V8ENGINE(); if (args.Length() == 2) { - QSGContext2DEngineData *ed = engineData(engine); + QQuickContext2DEngineData *ed = engineData(engine); QV8Context2DStyleResource *styleResouce = new QV8Context2DStyleResource(engine); QColor color = engine->toVariant(args[0], qMetaTypeId<QColor>()).value<QColor>(); @@ -2171,15 +2171,15 @@ v8::Handle<v8::Value> ctx2d_textAlign(v8::Local<v8::String>, const v8::AccessorI CHECK_CONTEXT(r) QV8Engine *engine = V8ENGINE_ACCESSOR(); switch (r->context->state.textAlign) { - case QSGContext2D::Start: + case QQuickContext2D::Start: return engine->toString(QLatin1String("start")); - case QSGContext2D::End: + case QQuickContext2D::End: return engine->toString(QLatin1String("end")); - case QSGContext2D::Left: + case QQuickContext2D::Left: return engine->toString(QLatin1String("left")); - case QSGContext2D::Right: + case QQuickContext2D::Right: return engine->toString(QLatin1String("right")); - case QSGContext2D::Center: + case QQuickContext2D::Center: return engine->toString(QLatin1String("center")); default: break; @@ -2195,17 +2195,17 @@ static void ctx2d_textAlign_set(v8::Local<v8::String>, v8::Local<v8::Value> valu QString textAlign = engine->toString(value); - QSGContext2D::TextAlignType ta; + QQuickContext2D::TextAlignType ta; if (textAlign == QLatin1String("start")) - ta = QSGContext2D::Start; + ta = QQuickContext2D::Start; else if (textAlign == QLatin1String("end")) - ta = QSGContext2D::End; + ta = QQuickContext2D::End; else if (textAlign == QLatin1String("left")) - ta = QSGContext2D::Left; + ta = QQuickContext2D::Left; else if (textAlign == QLatin1String("right")) - ta = QSGContext2D::Right; + ta = QQuickContext2D::Right; else if (textAlign == QLatin1String("center")) - ta = QSGContext2D::Center; + ta = QQuickContext2D::Center; else return; @@ -2236,15 +2236,15 @@ v8::Handle<v8::Value> ctx2d_textBaseline(v8::Local<v8::String>, const v8::Access QV8Engine *engine = V8ENGINE_ACCESSOR(); switch (r->context->state.textBaseline) { - case QSGContext2D::Alphabetic: + case QQuickContext2D::Alphabetic: return engine->toString(QLatin1String("alphabetic")); - case QSGContext2D::Hanging: + case QQuickContext2D::Hanging: return engine->toString(QLatin1String("hanging")); - case QSGContext2D::Top: + case QQuickContext2D::Top: return engine->toString(QLatin1String("top")); - case QSGContext2D::Bottom: + case QQuickContext2D::Bottom: return engine->toString(QLatin1String("bottom")); - case QSGContext2D::Middle: + case QQuickContext2D::Middle: return engine->toString(QLatin1String("middle")); default: break; @@ -2259,17 +2259,17 @@ static void ctx2d_textBaseline_set(v8::Local<v8::String>, v8::Local<v8::Value> v QV8Engine *engine = V8ENGINE_ACCESSOR(); QString textBaseline = engine->toString(value); - QSGContext2D::TextBaseLineType tb; + QQuickContext2D::TextBaseLineType tb; if (textBaseline == QLatin1String("alphabetic")) - tb = QSGContext2D::Alphabetic; + tb = QQuickContext2D::Alphabetic; else if (textBaseline == QLatin1String("hanging")) - tb = QSGContext2D::Hanging; + tb = QQuickContext2D::Hanging; else if (textBaseline == QLatin1String("top")) - tb = QSGContext2D::Top; + tb = QQuickContext2D::Top; else if (textBaseline == QLatin1String("bottom")) - tb = QSGContext2D::Bottom; + tb = QQuickContext2D::Bottom; else if (textBaseline == QLatin1String("middle")) - tb = QSGContext2D::Middle; + tb = QQuickContext2D::Middle; else return; @@ -2443,8 +2443,8 @@ static v8::Handle<v8::Value> ctx2d_drawImage(const v8::Arguments &args) image = r->context->createImage(url); } else if (args[0]->IsObject()) { - QSGImage *imageItem = qobject_cast<QSGImage*>(engine->toQObject(args[0]->ToObject())); - QSGCanvasItem *canvas = qobject_cast<QSGCanvasItem*>(engine->toQObject(args[0]->ToObject())); + QQuickImage *imageItem = qobject_cast<QQuickImage*>(engine->toQObject(args[0]->ToObject())); + QQuickCanvasItem *canvas = qobject_cast<QQuickCanvasItem*>(engine->toQObject(args[0]->ToObject())); QV8Context2DPixelArrayResource *pix = v8_resource_cast<QV8Context2DPixelArrayResource>(args[0]->ToObject()->GetInternalField(0)->ToObject()); if (pix) { @@ -2627,12 +2627,12 @@ static v8::Handle<v8::Value> ctx2d_imageData_filter(const v8::Arguments &args) if (args.Length() >= 1) { int filterFlag = args[0]->IntegerValue(); switch (filterFlag) { - case QSGCanvasItem::Mono : + case QQuickCanvasItem::Mono : { r->image = r->image.convertToFormat(QImage::Format_Mono).convertToFormat(QImage::Format_ARGB32_Premultiplied); } break; - case QSGCanvasItem::GrayScale : + case QQuickCanvasItem::GrayScale : { for (int y = 0; y < r->image.height(); ++y) { QRgb *row = (QRgb*)r->image.scanLine(y); @@ -2643,7 +2643,7 @@ static v8::Handle<v8::Value> ctx2d_imageData_filter(const v8::Arguments &args) } } break; - case QSGCanvasItem::Threshold : + case QQuickCanvasItem::Threshold : { qreal threshold = 0.5; if (args.Length() > 1) @@ -2659,7 +2659,7 @@ static v8::Handle<v8::Value> ctx2d_imageData_filter(const v8::Arguments &args) } } break; - case QSGCanvasItem::Brightness : + case QQuickCanvasItem::Brightness : { int adjustment = 1; if (args.Length() > 1) @@ -2675,12 +2675,12 @@ static v8::Handle<v8::Value> ctx2d_imageData_filter(const v8::Arguments &args) } } break; - case QSGCanvasItem::Invert : + case QQuickCanvasItem::Invert : { r->image.invertPixels(); } break; - case QSGCanvasItem::Blur : + case QQuickCanvasItem::Blur : { int radius = 3; bool quality = false; @@ -2693,7 +2693,7 @@ static v8::Handle<v8::Value> ctx2d_imageData_filter(const v8::Arguments &args) qt_image_boxblur(r->image, radius, quality); } break; - case QSGCanvasItem::Opaque : + case QQuickCanvasItem::Opaque : { for (int y = 0; y < r->image.height(); ++y) { QRgb *row = (QRgb*)r->image.scanLine(y); @@ -2703,7 +2703,7 @@ static v8::Handle<v8::Value> ctx2d_imageData_filter(const v8::Arguments &args) } } break; - case QSGCanvasItem::Convolute : + case QQuickCanvasItem::Convolute : { if (args.Length() > 1 && args[1]->IsArray()) { v8::Local<v8::Array> array = v8::Local<v8::Array>::Cast(args[1]); @@ -3014,13 +3014,13 @@ static v8::Handle<v8::Value> ctx2d_gradient_addColorStop(const v8::Arguments &ar } -void QSGContext2D::beginPath() +void QQuickContext2D::beginPath() { m_path = QPainterPath(); m_path.setFillRule(state.fillRule); } -void QSGContext2D::closePath() +void QQuickContext2D::closePath() { if (m_path.isEmpty()) return; @@ -3032,25 +3032,25 @@ void QSGContext2D::closePath() //should be the first point of the previous subpath } -void QSGContext2D::moveTo( qreal x, qreal y) +void QQuickContext2D::moveTo( qreal x, qreal y) { //FIXME: moveTo should not close the previous subpath m_path.moveTo(state.matrix.map(QPointF(x, y))); } -void QSGContext2D::lineTo( qreal x, qreal y) +void QQuickContext2D::lineTo( qreal x, qreal y) { m_path.lineTo(state.matrix.map(QPointF(x, y))); } -void QSGContext2D::quadraticCurveTo(qreal cpx, qreal cpy, +void QQuickContext2D::quadraticCurveTo(qreal cpx, qreal cpy, qreal x, qreal y) { m_path.quadTo(state.matrix.map(QPointF(cpx, cpy)), state.matrix.map(QPointF(x, y))); } -void QSGContext2D::bezierCurveTo(qreal cp1x, qreal cp1y, +void QQuickContext2D::bezierCurveTo(qreal cp1x, qreal cp1y, qreal cp2x, qreal cp2y, qreal x, qreal y) { @@ -3059,7 +3059,7 @@ void QSGContext2D::bezierCurveTo(qreal cp1x, qreal cp1y, state.matrix.map(QPointF(x, y))); } -void QSGContext2D::addArcTo(const QPointF& p1, const QPointF& p2, float radius) +void QQuickContext2D::addArcTo(const QPointF& p1, const QPointF& p2, float radius) { QPointF p0(m_path.currentPosition()); @@ -3117,7 +3117,7 @@ void QSGContext2D::addArcTo(const QPointF& p1, const QPointF& p2, float radius) arc(p.x(), p.y(), radius, sa, ea, anticlockwise, false); } -void QSGContext2D::arcTo(qreal x1, qreal y1, +void QQuickContext2D::arcTo(qreal x1, qreal y1, qreal x2, qreal y2, qreal radius) { @@ -3133,13 +3133,13 @@ void QSGContext2D::arcTo(qreal x1, qreal y1, } } -void QSGContext2D::rect(qreal x, qreal y, +void QQuickContext2D::rect(qreal x, qreal y, qreal w, qreal h) { m_path.addPolygon(state.matrix.map(QRectF(x, y, w, h))); } -void QSGContext2D::roundedRect(qreal x, qreal y, +void QQuickContext2D::roundedRect(qreal x, qreal y, qreal w, qreal h, qreal xr, qreal yr) { @@ -3148,7 +3148,7 @@ void QSGContext2D::roundedRect(qreal x, qreal y, m_path.addPath(state.matrix.map(path)); } -void QSGContext2D::ellipse(qreal x, qreal y, +void QQuickContext2D::ellipse(qreal x, qreal y, qreal w, qreal h) { QPainterPath path; @@ -3156,14 +3156,14 @@ void QSGContext2D::ellipse(qreal x, qreal y, m_path.addPath(state.matrix.map(path)); } -void QSGContext2D::text(const QString& str, qreal x, qreal y) +void QQuickContext2D::text(const QString& str, qreal x, qreal y) { QPainterPath path; path.addText(x, y, state.font, str); m_path.addPath(state.matrix.map(path)); } -void QSGContext2D::arc(qreal xc, +void QQuickContext2D::arc(qreal xc, qreal yc, qreal radius, qreal sar, @@ -3229,38 +3229,38 @@ void QSGContext2D::arc(qreal xc, m_path.arcTo(xs, ys, width, height, sa, span); } -int baseLineOffset(QSGContext2D::TextBaseLineType value, const QFontMetrics &metrics) +int baseLineOffset(QQuickContext2D::TextBaseLineType value, const QFontMetrics &metrics) { int offset = 0; switch (value) { - case QSGContext2D::Top: + case QQuickContext2D::Top: break; - case QSGContext2D::Alphabetic: - case QSGContext2D::Middle: - case QSGContext2D::Hanging: + case QQuickContext2D::Alphabetic: + case QQuickContext2D::Middle: + case QQuickContext2D::Hanging: offset = metrics.ascent(); break; - case QSGContext2D::Bottom: + case QQuickContext2D::Bottom: offset = metrics.height(); break; } return offset; } -static int textAlignOffset(QSGContext2D::TextAlignType value, const QFontMetrics &metrics, const QString &text) +static int textAlignOffset(QQuickContext2D::TextAlignType value, const QFontMetrics &metrics, const QString &text) { int offset = 0; - if (value == QSGContext2D::Start) - value = QGuiApplication::layoutDirection() == Qt::LeftToRight ? QSGContext2D::Left : QSGContext2D::Right; - else if (value == QSGContext2D::End) - value = QGuiApplication::layoutDirection() == Qt::LeftToRight ? QSGContext2D::Right: QSGContext2D::Left; + if (value == QQuickContext2D::Start) + value = QGuiApplication::layoutDirection() == Qt::LeftToRight ? QQuickContext2D::Left : QQuickContext2D::Right; + else if (value == QQuickContext2D::End) + value = QGuiApplication::layoutDirection() == Qt::LeftToRight ? QQuickContext2D::Right: QQuickContext2D::Left; switch (value) { - case QSGContext2D::Center: + case QQuickContext2D::Center: offset = metrics.width(text)/2; break; - case QSGContext2D::Right: + case QQuickContext2D::Right: offset = metrics.width(text); - case QSGContext2D::Left: + case QQuickContext2D::Left: default: break; } @@ -3268,16 +3268,16 @@ static int textAlignOffset(QSGContext2D::TextAlignType value, const QFontMetrics } -QImage QSGContext2D::createImage(const QUrl& url) +QImage QQuickContext2D::createImage(const QUrl& url) { return m_canvas->loadedImage(url); } -QPainterPath QSGContext2D::createTextGlyphs(qreal x, qreal y, const QString& text) +QPainterPath QQuickContext2D::createTextGlyphs(qreal x, qreal y, const QString& text) { const QFontMetrics metrics(state.font); - int yoffset = baseLineOffset(static_cast<QSGContext2D::TextBaseLineType>(state.textBaseline), metrics); - int xoffset = textAlignOffset(static_cast<QSGContext2D::TextAlignType>(state.textAlign), metrics, text); + int yoffset = baseLineOffset(static_cast<QQuickContext2D::TextBaseLineType>(state.textBaseline), metrics); + int xoffset = textAlignOffset(static_cast<QQuickContext2D::TextAlignType>(state.textAlign), metrics, text); QPainterPath textPath; @@ -3287,29 +3287,29 @@ QPainterPath QSGContext2D::createTextGlyphs(qreal x, qreal y, const QString& tex } -bool QSGContext2D::isPointInPath(qreal x, qreal y) const +bool QQuickContext2D::isPointInPath(qreal x, qreal y) const { return m_path.contains(QPointF(x, y)); } -QSGContext2D::QSGContext2D(QSGCanvasItem* item) +QQuickContext2D::QQuickContext2D(QQuickCanvasItem* item) : m_canvas(item) - , m_buffer(new QSGContext2DCommandBuffer) + , m_buffer(new QQuickContext2DCommandBuffer) , m_v8engine(0) { reset(); } -QSGContext2D::~QSGContext2D() +QQuickContext2D::~QQuickContext2D() { } -v8::Handle<v8::Object> QSGContext2D::v8value() const +v8::Handle<v8::Object> QQuickContext2D::v8value() const { return m_v8value; } -QSGContext2DEngineData::QSGContext2DEngineData(QV8Engine *engine) +QQuickContext2DEngineData::QQuickContext2DEngineData(QV8Engine *engine) { v8::HandleScope handle_scope; v8::Context::Scope scope(engine->context()); @@ -3405,7 +3405,7 @@ QSGContext2DEngineData::QSGContext2DEngineData(QV8Engine *engine) constructorImageData = qPersistentNew(ftImageData->GetFunction()); } -QSGContext2DEngineData::~QSGContext2DEngineData() +QQuickContext2DEngineData::~QQuickContext2DEngineData() { qPersistentDispose(constructorContext); qPersistentDispose(constructorGradient); @@ -3414,12 +3414,12 @@ QSGContext2DEngineData::~QSGContext2DEngineData() qPersistentDispose(constructorPixelArray); } -void QSGContext2D::popState() +void QQuickContext2D::popState() { if (m_stateStack.isEmpty()) return; - QSGContext2D::State newState = m_stateStack.pop(); + QQuickContext2D::State newState = m_stateStack.pop(); if (state.matrix != newState.matrix) buffer()->updateMatrix(newState.matrix); @@ -3465,14 +3465,14 @@ void QSGContext2D::popState() buffer()->setShadowOffsetY(newState.shadowOffsetY); state = newState; } -void QSGContext2D::pushState() +void QQuickContext2D::pushState() { m_stateStack.push(state); } -void QSGContext2D::reset() +void QQuickContext2D::reset() { - QSGContext2D::State newState; + QQuickContext2D::State newState; newState.matrix = QTransform(); QPainterPath defaultClipPath; @@ -3501,8 +3501,8 @@ void QSGContext2D::reset() newState.shadowColor = qRgba(0, 0, 0, 0); newState.globalCompositeOperation = QPainter::CompositionMode_SourceOver; newState.font = QFont(QLatin1String("sans-serif"), 10); - newState.textAlign = QSGContext2D::Start; - newState.textBaseline = QSGContext2D::Alphabetic; + newState.textAlign = QQuickContext2D::Start; + newState.textBaseline = QQuickContext2D::Alphabetic; m_stateStack.clear(); m_stateStack.push(newState); @@ -3510,7 +3510,7 @@ void QSGContext2D::reset() m_buffer->clearRect(0, 0, m_canvas->width(), m_canvas->height()); } -void QSGContext2D::setV8Engine(QV8Engine *engine) +void QQuickContext2D::setV8Engine(QV8Engine *engine) { v8::HandleScope handle_scope; v8::Context::Scope scope(engine->context()); @@ -3523,7 +3523,7 @@ void QSGContext2D::setV8Engine(QV8Engine *engine) if (m_v8engine == 0) return; - QSGContext2DEngineData *ed = engineData(engine); + QQuickContext2DEngineData *ed = engineData(engine); m_v8value = qPersistentNew(ed->constructorContext->NewInstance()); QV8Context2DResource *r = new QV8Context2DResource(engine); r->context = this; diff --git a/src/declarative/items/context2d/qsgcontext2d_p.h b/src/declarative/items/context2d/qquickcontext2d_p.h index 10c1e331f9..3c5e89c335 100644 --- a/src/declarative/items/context2d/qsgcontext2d_p.h +++ b/src/declarative/items/context2d/qquickcontext2d_p.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QSGCONTEXT2D_P_H -#define QSGCONTEXT2D_P_H +#ifndef QQUICKCONTEXT2D_P_H +#define QQUICKCONTEXT2D_P_H #include <QtDeclarative/qdeclarative.h> #include <QtDeclarative/qdeclarativecomponent.h> @@ -53,9 +53,9 @@ -#define QSGCONTEXT2D_DEBUG //enable this for just DEBUG purpose! +#define QQUICKCONTEXT2D_DEBUG //enable this for just DEBUG purpose! -#ifdef QSGCONTEXT2D_DEBUG +#ifdef QQUICKCONTEXT2D_DEBUG #include <QElapsedTimer> #endif @@ -65,11 +65,11 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGCanvasItem; -class QSGContext2DCommandBuffer; +class QQuickCanvasItem; +class QQuickContext2DCommandBuffer; class QDeclarativePixmap; -class Q_DECLARATIVE_EXPORT QSGContext2D +class Q_DECLARATIVE_EXPORT QQuickContext2D { public: enum TextBaseLineType { Alphabetic=0, Top, Middle, Bottom, Hanging}; @@ -127,15 +127,15 @@ public: QColor shadowColor; QPainter::CompositionMode globalCompositeOperation; QFont font; - QSGContext2D::TextAlignType textAlign; - QSGContext2D::TextBaseLineType textBaseline; + QQuickContext2D::TextAlignType textAlign; + QQuickContext2D::TextBaseLineType textBaseline; }; - QSGContext2D(QSGCanvasItem* item); - ~QSGContext2D(); + QQuickContext2D(QQuickCanvasItem* item); + ~QQuickContext2D(); - inline QSGCanvasItem* canvas() const {return m_canvas;} - inline QSGContext2DCommandBuffer* buffer() const {return m_buffer;} + inline QQuickCanvasItem* canvas() const {return m_canvas;} + inline QQuickContext2DCommandBuffer* buffer() const {return m_buffer;} v8::Handle<v8::Object> v8value() const; void setV8Engine(QV8Engine *eng); @@ -167,9 +167,9 @@ public: QImage createImage(const QUrl& url); State state; - QStack<QSGContext2D::State> m_stateStack; - QSGCanvasItem* m_canvas; - QSGContext2DCommandBuffer* m_buffer; + QStack<QQuickContext2D::State> m_stateStack; + QQuickCanvasItem* m_canvas; + QQuickContext2DCommandBuffer* m_buffer; QPainterPath m_path; v8::Local<v8::Value> m_fillStyle; v8::Local<v8::Value> m_strokeStyle; @@ -180,8 +180,8 @@ public: QT_END_NAMESPACE -QML_DECLARE_TYPE(QSGContext2D) +QML_DECLARE_TYPE(QQuickContext2D) QT_END_HEADER -#endif // QSGCONTEXT2D_P_H +#endif // QQUICKCONTEXT2D_P_H diff --git a/src/declarative/items/context2d/qsgcontext2dcommandbuffer.cpp b/src/declarative/items/context2d/qquickcontext2dcommandbuffer.cpp index 29ed5fbc12..e91a21c8b0 100644 --- a/src/declarative/items/context2d/qsgcontext2dcommandbuffer.cpp +++ b/src/declarative/items/context2d/qquickcontext2dcommandbuffer.cpp @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#include "qsgcontext2dcommandbuffer_p.h" -#include "qsgcanvasitem_p.h" +#include "qquickcontext2dcommandbuffer_p.h" +#include "qquickcanvasitem_p.h" #include <qdeclarative.h> #include <QtCore/QMutex> @@ -197,7 +197,7 @@ static inline void drawRepeatPattern(QPainter* p, const QImage& image, const QRe } } -QPen QSGContext2DCommandBuffer::makePen(QSGContext2D::State state) +QPen QQuickContext2DCommandBuffer::makePen(QQuickContext2D::State state) { QPen pen; pen.setWidthF(state.lineWidth); @@ -208,7 +208,7 @@ QPen QSGContext2DCommandBuffer::makePen(QSGContext2D::State state) return pen; } -void QSGContext2DCommandBuffer::setPainterState(QPainter* p, QSGContext2D::State state, const QPen& pen) +void QQuickContext2DCommandBuffer::setPainterState(QPainter* p, QQuickContext2D::State state, const QPen& pen) { p->setTransform(state.matrix * p->transform()); @@ -229,7 +229,7 @@ void QSGContext2DCommandBuffer::setPainterState(QPainter* p, QSGContext2D::State p->setCompositionMode(state.globalCompositeOperation); } -QSGContext2D::State QSGContext2DCommandBuffer::replay(QPainter* p, QSGContext2D::State state) +QQuickContext2D::State QQuickContext2DCommandBuffer::replay(QPainter* p, QQuickContext2D::State state) { if (!p) return state; @@ -242,15 +242,15 @@ QSGContext2D::State QSGContext2DCommandBuffer::replay(QPainter* p, QSGContext2D: setPainterState(p, state, pen); while (hasNext()) { - QSGContext2D::PaintCommand cmd = takeNextCommand(); + QQuickContext2D::PaintCommand cmd = takeNextCommand(); switch (cmd) { - case QSGContext2D::UpdateMatrix: + case QQuickContext2D::UpdateMatrix: { state.matrix = takeMatrix(); p->setTransform(state.matrix * originMatrix); break; } - case QSGContext2D::ClearRect: + case QQuickContext2D::ClearRect: { QPainter::CompositionMode cm = p->compositionMode(); qreal alpha = p->opacity(); @@ -261,7 +261,7 @@ QSGContext2D::State QSGContext2DCommandBuffer::replay(QPainter* p, QSGContext2D: p->setOpacity(alpha); break; } - case QSGContext2D::FillRect: + case QQuickContext2D::FillRect: { QRectF r = takeRect(); if (HAS_SHADOW(state.shadowOffsetX, state.shadowOffsetY, state.shadowBlur, state.shadowColor)) @@ -270,27 +270,27 @@ QSGContext2D::State QSGContext2DCommandBuffer::replay(QPainter* p, QSGContext2D: p->fillRect(r, p->brush()); break; } - case QSGContext2D::ShadowColor: + case QQuickContext2D::ShadowColor: { state.shadowColor = takeColor(); break; } - case QSGContext2D::ShadowBlur: + case QQuickContext2D::ShadowBlur: { state.shadowBlur = takeShadowBlur(); break; } - case QSGContext2D::ShadowOffsetX: + case QQuickContext2D::ShadowOffsetX: { state.shadowOffsetX = takeShadowOffsetX(); break; } - case QSGContext2D::ShadowOffsetY: + case QQuickContext2D::ShadowOffsetY: { state.shadowOffsetY = takeShadowOffsetY(); break; } - case QSGContext2D::FillStyle: + case QQuickContext2D::FillStyle: { state.fillStyle = takeFillStyle(); state.fillPatternRepeatX = takeBool(); @@ -298,7 +298,7 @@ QSGContext2D::State QSGContext2DCommandBuffer::replay(QPainter* p, QSGContext2D: p->setBrush(state.fillStyle); break; } - case QSGContext2D::StrokeStyle: + case QQuickContext2D::StrokeStyle: { state.strokeStyle = takeStrokeStyle(); state.strokePatternRepeatX = takeBool(); @@ -307,38 +307,38 @@ QSGContext2D::State QSGContext2DCommandBuffer::replay(QPainter* p, QSGContext2D: p->setPen(pen); break; } - case QSGContext2D::LineWidth: + case QQuickContext2D::LineWidth: { state.lineWidth = takeLineWidth(); pen.setWidth(state.lineWidth); p->setPen(pen); break; } - case QSGContext2D::LineCap: + case QQuickContext2D::LineCap: { state.lineCap = takeLineCap(); pen.setCapStyle(state.lineCap); p->setPen(pen); break; } - case QSGContext2D::LineJoin: + case QQuickContext2D::LineJoin: { state.lineJoin = takeLineJoin(); pen.setJoinStyle(state.lineJoin); p->setPen(pen); break; } - case QSGContext2D::MiterLimit: + case QQuickContext2D::MiterLimit: { state.miterLimit = takeMiterLimit(); pen.setMiterLimit(state.miterLimit); p->setPen(pen); break; } - case QSGContext2D::TextAlign: - case QSGContext2D::TextBaseline: + case QQuickContext2D::TextAlign: + case QQuickContext2D::TextBaseline: break; - case QSGContext2D::Fill: + case QQuickContext2D::Fill: { QPainterPath path = takePath(); path.closeSubpath(); @@ -348,7 +348,7 @@ QSGContext2D::State QSGContext2DCommandBuffer::replay(QPainter* p, QSGContext2D: p->fillPath(path, p->brush()); break; } - case QSGContext2D::Stroke: + case QQuickContext2D::Stroke: { if (HAS_SHADOW(state.shadowOffsetX, state.shadowOffsetY, state.shadowBlur, state.shadowColor)) strokeShadowPath(p,takePath(), state.shadowOffsetX, state.shadowOffsetY, state.shadowBlur, state.shadowColor); @@ -356,26 +356,26 @@ QSGContext2D::State QSGContext2DCommandBuffer::replay(QPainter* p, QSGContext2D: p->strokePath(takePath(), p->pen()); break; } - case QSGContext2D::Clip: + case QQuickContext2D::Clip: { state.clipPath = takePath(); p->setClipping(true); p->setClipPath(state.clipPath); break; } - case QSGContext2D::GlobalAlpha: + case QQuickContext2D::GlobalAlpha: { state.globalAlpha = takeGlobalAlpha(); p->setOpacity(state.globalAlpha); break; } - case QSGContext2D::GlobalCompositeOperation: + case QQuickContext2D::GlobalCompositeOperation: { state.globalCompositeOperation = takeGlobalCompositeOperation(); p->setCompositionMode(state.globalCompositeOperation); break; } - case QSGContext2D::DrawImage: + case QQuickContext2D::DrawImage: { qreal sx = takeReal(); qreal sy = takeReal(); @@ -407,7 +407,7 @@ QSGContext2D::State QSGContext2DCommandBuffer::replay(QPainter* p, QSGContext2D: } break; } - case QSGContext2D::GetImageData: + case QQuickContext2D::GetImageData: { //TODO: break; @@ -421,7 +421,7 @@ QSGContext2D::State QSGContext2DCommandBuffer::replay(QPainter* p, QSGContext2D: return state; } -QSGContext2DCommandBuffer::QSGContext2DCommandBuffer() +QQuickContext2DCommandBuffer::QQuickContext2DCommandBuffer() : cmdIdx(0) , intIdx(0) , boolIdx(0) @@ -435,11 +435,11 @@ QSGContext2DCommandBuffer::QSGContext2DCommandBuffer() } -QSGContext2DCommandBuffer::~QSGContext2DCommandBuffer() +QQuickContext2DCommandBuffer::~QQuickContext2DCommandBuffer() { } -void QSGContext2DCommandBuffer::clear() +void QQuickContext2DCommandBuffer::clear() { commands.clear(); ints.clear(); @@ -453,7 +453,7 @@ void QSGContext2DCommandBuffer::clear() reset(); } -void QSGContext2DCommandBuffer::reset() +void QQuickContext2DCommandBuffer::reset() { cmdIdx = 0; intIdx = 0; diff --git a/src/declarative/items/context2d/qsgcontext2dcommandbuffer_p.h b/src/declarative/items/context2d/qquickcontext2dcommandbuffer_p.h index cab82e2f67..46964d3411 100644 --- a/src/declarative/items/context2d/qsgcontext2dcommandbuffer_p.h +++ b/src/declarative/items/context2d/qquickcontext2dcommandbuffer_p.h @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QSGCONTEXT2DCOMMANDBUFFER_P_H -#define QSGCONTEXT2DCOMMANDBUFFER_P_H +#ifndef QQUICKCONTEXT2DCOMMANDBUFFER_P_H +#define QQUICKCONTEXT2DCOMMANDBUFFER_P_H -#include "qsgcontext2d_p.h" +#include "qquickcontext2d_p.h" #include <private/qdeclarativepixmapcache_p.h> @@ -52,20 +52,20 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGCanvasItem; +class QQuickCanvasItem; class QMutex; -class QSGContext2DCommandBuffer +class QQuickContext2DCommandBuffer { public: - QSGContext2DCommandBuffer(); - ~QSGContext2DCommandBuffer(); + QQuickContext2DCommandBuffer(); + ~QQuickContext2DCommandBuffer(); void reset(); void clear(); inline int size() {return commands.size();} inline bool isEmpty() const {return commands.isEmpty(); } inline bool hasNext() const {return cmdIdx < commands.size(); } - inline QSGContext2D::PaintCommand takeNextCommand() { return commands[cmdIdx++]; } + inline QQuickContext2D::PaintCommand takeNextCommand() { return commands[cmdIdx++]; } inline qreal takeGlobalAlpha() { return takeReal(); } inline QPainter::CompositionMode takeGlobalCompositeOperation(){ return static_cast<QPainter::CompositionMode>(takeInt()); } @@ -79,26 +79,26 @@ public: inline void setGlobalAlpha( qreal alpha) { - commands << QSGContext2D::GlobalAlpha; + commands << QQuickContext2D::GlobalAlpha; reals << alpha; } inline void setGlobalCompositeOperation(QPainter::CompositionMode cm) { - commands << QSGContext2D::GlobalCompositeOperation; + commands << QQuickContext2D::GlobalCompositeOperation; ints << cm; } inline void setStrokeStyle(const QBrush &style, bool repeatX = false, bool repeatY = false) { - commands << QSGContext2D::StrokeStyle; + commands << QQuickContext2D::StrokeStyle; brushes << style; bools << repeatX << repeatY; } inline void drawImage(const QImage& image, qreal sx, qreal sy, qreal sw, qreal sh, qreal dx, qreal dy, qreal dw, qreal dh) { - commands << QSGContext2D::DrawImage; + commands << QQuickContext2D::DrawImage; images << image; reals << sx << sy << sw << sh << dx << dy << dw << dh; } @@ -111,19 +111,19 @@ public: inline void updateMatrix(const QTransform& matrix) { - commands << QSGContext2D::UpdateMatrix; + commands << QQuickContext2D::UpdateMatrix; matrixes << matrix; } inline void clearRect(qreal x, qreal y, qreal w, qreal h) { - commands << QSGContext2D::ClearRect; + commands << QQuickContext2D::ClearRect; reals << x << y << w << h; } inline void fillRect(qreal x, qreal y, qreal w, qreal h) { - commands << QSGContext2D::FillRect; + commands << QQuickContext2D::FillRect; reals << x << y << w << h; } @@ -132,27 +132,27 @@ public: QPainterPath p; p.addRect(x, y, w, h); - commands << QSGContext2D::Stroke; + commands << QQuickContext2D::Stroke; pathes << p; } inline void fill(const QPainterPath& path) { - commands << QSGContext2D::Fill; + commands << QQuickContext2D::Fill; pathes << path; } inline void stroke(const QPainterPath& path) { - commands << QSGContext2D::Stroke; + commands << QQuickContext2D::Stroke; pathes << path; } inline void clip(const QPainterPath& path) { - commands << QSGContext2D::Clip; + commands << QQuickContext2D::Clip; pathes << path; } @@ -160,7 +160,7 @@ public: inline void setFillStyle(const QBrush &style, bool repeatX = false, bool repeatY = false) { - commands << QSGContext2D::FillStyle; + commands << QQuickContext2D::FillStyle; brushes << style; bools << repeatX << repeatY; } @@ -168,49 +168,49 @@ public: inline void setLineWidth( qreal w) { - commands << QSGContext2D::LineWidth; + commands << QQuickContext2D::LineWidth; reals << w; } inline void setLineCap(Qt::PenCapStyle cap) { - commands << QSGContext2D::LineCap; + commands << QQuickContext2D::LineCap; ints << cap; } inline void setLineJoin(Qt::PenJoinStyle join) { - commands << QSGContext2D::LineJoin; + commands << QQuickContext2D::LineJoin; ints << join; } inline void setMiterLimit( qreal limit) { - commands << QSGContext2D::MiterLimit; + commands << QQuickContext2D::MiterLimit; reals << limit; } inline void setShadowOffsetX( qreal x) { - commands << QSGContext2D::ShadowOffsetX; + commands << QQuickContext2D::ShadowOffsetX; reals << x; } inline void setShadowOffsetY( qreal y) { - commands << QSGContext2D::ShadowOffsetY; + commands << QQuickContext2D::ShadowOffsetY; reals << y; } inline void setShadowBlur( qreal b) { - commands << QSGContext2D::ShadowBlur; + commands << QQuickContext2D::ShadowBlur; reals << b; } inline void setShadowColor(const QColor &color) { - commands << QSGContext2D::ShadowColor; + commands << QQuickContext2D::ShadowColor; colors << color; } @@ -236,10 +236,10 @@ public: inline QColor takeColor() { return colors[colorIdx++]; } inline QBrush takeBrush() { return brushes[brushIdx++]; } - QSGContext2D::State replay(QPainter* painter, QSGContext2D::State state); + QQuickContext2D::State replay(QPainter* painter, QQuickContext2D::State state); private: - QPen makePen(QSGContext2D::State state); - void setPainterState(QPainter* painter, QSGContext2D::State state, const QPen& pen); + QPen makePen(QQuickContext2D::State state); + void setPainterState(QPainter* painter, QQuickContext2D::State state, const QPen& pen); int cmdIdx; int intIdx; int boolIdx; @@ -249,7 +249,7 @@ private: int brushIdx; int pathIdx; int imageIdx; - QVector<QSGContext2D::PaintCommand> commands; + QVector<QQuickContext2D::PaintCommand> commands; QVector<int> ints; QVector<bool> bools; @@ -265,4 +265,4 @@ QT_END_HEADER QT_END_NAMESPACE -#endif // QSGCONTEXT2DCOMMANDBUFFER_P_H +#endif // QQUICKCONTEXT2DCOMMANDBUFFER_P_H diff --git a/src/declarative/items/context2d/qsgcontext2dnode.cpp b/src/declarative/items/context2d/qquickcontext2dnode.cpp index 87de8cf157..76b50d9747 100644 --- a/src/declarative/items/context2d/qsgcontext2dnode.cpp +++ b/src/declarative/items/context2d/qquickcontext2dnode.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qsgcontext2dnode_p.h" +#include "qquickcontext2dnode_p.h" #include <private/qsgcontext_p.h> #include <QtCore/qmath.h> @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE -QSGContext2DNode::QSGContext2DNode(QSGCanvasItem* item) +QQuickContext2DNode::QQuickContext2DNode(QQuickCanvasItem* item) : QSGGeometryNode() , m_item(item) , m_geometry(QSGGeometry::defaultAttributes_TexturedPoint2D(), 4) @@ -62,12 +62,12 @@ QSGContext2DNode::QSGContext2DNode(QSGCanvasItem* item) setFlag(UsePreprocess, true); } -QSGContext2DNode::~QSGContext2DNode() +QQuickContext2DNode::~QQuickContext2DNode() { delete m_texture; } -void QSGContext2DNode::setSize(const QSizeF& size) +void QQuickContext2DNode::setSize(const QSizeF& size) { if (m_size != size) { m_dirtyGeometry = true; @@ -75,7 +75,7 @@ void QSGContext2DNode::setSize(const QSizeF& size) } } -void QSGContext2DNode::preprocess() +void QQuickContext2DNode::preprocess() { bool doDirty = false; QSGDynamicTexture *t = qobject_cast<QSGDynamicTexture *>(m_material.texture()); @@ -87,7 +87,7 @@ void QSGContext2DNode::preprocess() markDirty(DirtyMaterial); } } -void QSGContext2DNode::setTexture(QSGContext2DTexture* texture) +void QQuickContext2DNode::setTexture(QQuickContext2DTexture* texture) { if (texture != m_texture) { m_dirtyTexture = true; @@ -95,7 +95,7 @@ void QSGContext2DNode::setTexture(QSGContext2DTexture* texture) } } -void QSGContext2DNode::update() +void QQuickContext2DNode::update() { if (m_dirtyGeometry) updateGeometry(); @@ -106,14 +106,14 @@ void QSGContext2DNode::update() m_dirtyTexture = false; } -void QSGContext2DNode::updateTexture() +void QQuickContext2DNode::updateTexture() { m_material.setTexture(m_texture); m_materialO.setTexture(m_texture); markDirty(DirtyMaterial); } -void QSGContext2DNode::updateGeometry() +void QQuickContext2DNode::updateGeometry() { QRectF source = m_texture->textureSubRect(); QSGGeometry::updateTexturedRectGeometry(&m_geometry, diff --git a/src/declarative/items/context2d/qsgcontext2dnode_p.h b/src/declarative/items/context2d/qquickcontext2dnode_p.h index 88c3619095..7403acaf07 100644 --- a/src/declarative/items/context2d/qsgcontext2dnode_p.h +++ b/src/declarative/items/context2d/qquickcontext2dnode_p.h @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#ifndef QSGCONTEXT2DNODE_P_H -#define QSGCONTEXT2DNODE_P_H +#ifndef QQUICKCONTEXT2DNODE_P_H +#define QQUICKCONTEXT2DNODE_P_H #include <qsgnode.h> #include <qsgtexturematerial.h> -#include "qsgcanvasitem_p.h" -#include "qsgcontext2dtexture_p.h" -#include "qsgcontext2d_p.h" +#include "qquickcanvasitem_p.h" +#include "qquickcontext2dtexture_p.h" +#include "qquickcontext2d_p.h" QT_BEGIN_HEADER @@ -55,12 +55,12 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGContext2DNode : public QSGGeometryNode +class QQuickContext2DNode : public QSGGeometryNode { public: - QSGContext2DNode(QSGCanvasItem* item); - virtual ~QSGContext2DNode(); - void setTexture(QSGContext2DTexture* texture); + QQuickContext2DNode(QQuickCanvasItem* item); + virtual ~QQuickContext2DNode(); + void setTexture(QQuickContext2DTexture* texture); void update(); void preprocess(); void setSize(const QSizeF& size); @@ -68,11 +68,11 @@ private: void updateTexture(); void updateGeometry(); - QSGCanvasItem* m_item; + QQuickCanvasItem* m_item; QSGOpaqueTextureMaterial m_material; QSGTextureMaterial m_materialO; QSGGeometry m_geometry; - QSGContext2DTexture* m_texture; + QQuickContext2DTexture* m_texture; QSizeF m_size; bool m_dirtyGeometry; @@ -83,4 +83,4 @@ QT_END_HEADER QT_END_NAMESPACE -#endif // QSGCONTEXT2DNODE_P_H +#endif // QQUICKCONTEXT2DNODE_P_H diff --git a/src/declarative/items/context2d/qsgcontext2dtexture.cpp b/src/declarative/items/context2d/qquickcontext2dtexture.cpp index 721f847978..9518f91d45 100644 --- a/src/declarative/items/context2d/qsgcontext2dtexture.cpp +++ b/src/declarative/items/context2d/qquickcontext2dtexture.cpp @@ -39,12 +39,12 @@ ** ****************************************************************************/ -#include "qsgcontext2dtexture_p.h" -#include "qsgcontext2dtile_p.h" -#include "qsgcanvasitem_p.h" -#include <private/qsgitem_p.h> +#include "qquickcontext2dtexture_p.h" +#include "qquickcontext2dtile_p.h" +#include "qquickcanvasitem_p.h" +#include <private/qquickitem_p.h> #include <private/qsgtexture_p.h> -#include "qsgcontext2dcommandbuffer_p.h" +#include "qquickcontext2dcommandbuffer_p.h" #include <QOpenGLPaintDevice> #include <QOpenGLFramebufferObject> @@ -69,7 +69,7 @@ static inline int qt_next_power_of_two(int v) Q_GLOBAL_STATIC(QThread, globalCanvasThreadRenderInstance) -QSGContext2DTexture::QSGContext2DTexture() +QQuickContext2DTexture::QQuickContext2DTexture() : QSGDynamicTexture() , m_context(0) , m_canvasSize(QSize(1, 1)) @@ -85,17 +85,17 @@ QSGContext2DTexture::QSGContext2DTexture() { } -QSGContext2DTexture::~QSGContext2DTexture() +QQuickContext2DTexture::~QQuickContext2DTexture() { clearTiles(); } -QSize QSGContext2DTexture::textureSize() const +QSize QQuickContext2DTexture::textureSize() const { return m_canvasWindow.size(); } -void QSGContext2DTexture::markDirtyTexture() +void QQuickContext2DTexture::markDirtyTexture() { lock(); m_dirtyTexture = true; @@ -103,7 +103,7 @@ void QSGContext2DTexture::markDirtyTexture() emit textureChanged(); } -bool QSGContext2DTexture::setCanvasSize(const QSize &size) +bool QQuickContext2DTexture::setCanvasSize(const QSize &size) { if (m_canvasSize != size) { m_canvasSize = size; @@ -113,7 +113,7 @@ bool QSGContext2DTexture::setCanvasSize(const QSize &size) return false; } -bool QSGContext2DTexture::setTileSize(const QSize &size) +bool QQuickContext2DTexture::setTileSize(const QSize &size) { if (m_tileSize != size) { m_tileSize = size; @@ -123,12 +123,12 @@ bool QSGContext2DTexture::setTileSize(const QSize &size) return false; } -void QSGContext2DTexture::setSmooth(bool smooth) +void QQuickContext2DTexture::setSmooth(bool smooth) { m_smooth = smooth; } -void QSGContext2DTexture::setItem(QSGCanvasItem* item) +void QQuickContext2DTexture::setItem(QQuickCanvasItem* item) { if (!item) { lock(); @@ -146,7 +146,7 @@ void QSGContext2DTexture::setItem(QSGCanvasItem* item) } } -bool QSGContext2DTexture::setCanvasWindow(const QRect& r) +bool QQuickContext2DTexture::setCanvasWindow(const QRect& r) { if (m_canvasWindow != r) { m_canvasWindow = r; @@ -155,11 +155,11 @@ bool QSGContext2DTexture::setCanvasWindow(const QRect& r) return false; } -bool QSGContext2DTexture::setDirtyRect(const QRect &r) +bool QQuickContext2DTexture::setDirtyRect(const QRect &r) { bool doDirty = false; if (m_tiledCanvas) { - foreach (QSGContext2DTile* t, m_tiles) { + foreach (QQuickContext2DTile* t, m_tiles) { bool dirty = t->rect().intersected(r).isValid(); t->markDirty(dirty); if (dirty) @@ -171,7 +171,7 @@ bool QSGContext2DTexture::setDirtyRect(const QRect &r) return doDirty; } -void QSGContext2DTexture::canvasChanged(const QSize& canvasSize, const QSize& tileSize, const QRect& canvasWindow, const QRect& dirtyRect, bool smooth) +void QQuickContext2DTexture::canvasChanged(const QSize& canvasSize, const QSize& tileSize, const QRect& canvasWindow, const QRect& dirtyRect, bool smooth) { lock(); @@ -209,9 +209,9 @@ void QSGContext2DTexture::canvasChanged(const QSize& canvasSize, const QSize& ti unlock(); } -void QSGContext2DTexture::paintWithoutTiles() +void QQuickContext2DTexture::paintWithoutTiles() { - QSGContext2DCommandBuffer* ccb = m_context->buffer(); + QQuickContext2DCommandBuffer* ccb = m_context->buffer(); if (ccb->isEmpty() && m_threadRendering && !m_doGrabImage) { lock(); @@ -246,7 +246,7 @@ void QSGContext2DTexture::paintWithoutTiles() endPainting(); } -bool QSGContext2DTexture::canvasDestroyed() +bool QQuickContext2DTexture::canvasDestroyed() { bool noCanvas = false; lock(); @@ -255,7 +255,7 @@ bool QSGContext2DTexture::canvasDestroyed() return noCanvas; } -void QSGContext2DTexture::paint() +void QQuickContext2DTexture::paint() { if (canvasDestroyed()) return; @@ -263,8 +263,8 @@ void QSGContext2DTexture::paint() if (!m_tiledCanvas) { paintWithoutTiles(); } else { - QSGContext2D::State oldState = m_state; - QSGContext2DCommandBuffer* ccb = m_context->buffer(); + QQuickContext2D::State oldState = m_state; + QQuickContext2DCommandBuffer* ccb = m_context->buffer(); lock(); QRect tiledRegion = createTiles(m_canvasWindow.intersected(QRect(QPoint(0, 0), m_canvasSize))); @@ -275,7 +275,7 @@ void QSGContext2DTexture::paint() QRect dirtyRect; lock(); - foreach (QSGContext2DTile* tile, m_tiles) { + foreach (QQuickContext2DTile* tile, m_tiles) { if (tile->dirty()) { if (dirtyRect.isEmpty()) dirtyRect = tile->rect(); @@ -295,7 +295,7 @@ void QSGContext2DTexture::paint() } if (beginPainting()) { - foreach (QSGContext2DTile* tile, m_tiles) { + foreach (QQuickContext2DTile* tile, m_tiles) { bool dirtyTile = false, dirtyCanvas = false, smooth = false; lock(); @@ -328,7 +328,7 @@ void QSGContext2DTexture::paint() } } -QRect QSGContext2DTexture::tiledRect(const QRectF& window, const QSize& tileSize) +QRect QQuickContext2DTexture::tiledRect(const QRectF& window, const QSize& tileSize) { if (window.isEmpty()) return QRect(); @@ -344,9 +344,9 @@ QRect QSGContext2DTexture::tiledRect(const QRectF& window, const QSize& tileSize return QRect(h1 * tw, v1 * th, htiles * tw, vtiles * th); } -QRect QSGContext2DTexture::createTiles(const QRect& window) +QRect QQuickContext2DTexture::createTiles(const QRect& window) { - QList<QSGContext2DTile*> oldTiles = m_tiles; + QList<QQuickContext2DTile*> oldTiles = m_tiles; m_tiles.clear(); if (window.isEmpty()) { @@ -370,7 +370,7 @@ QRect QSGContext2DTexture::createTiles(const QRect& window) int ht = xx + h1; int vt = yy + v1; - QSGContext2DTile* tile = 0; + QQuickContext2DTile* tile = 0; QPoint pos(ht * tw, vt * th); QRect rect(pos, m_tileSize); @@ -396,14 +396,14 @@ QRect QSGContext2DTexture::createTiles(const QRect& window) return r; } -void QSGContext2DTexture::clearTiles() +void QQuickContext2DTexture::clearTiles() { qDeleteAll(m_tiles); m_tiles.clear(); } -QSGContext2DFBOTexture::QSGContext2DFBOTexture() - : QSGContext2DTexture() +QQuickContext2DFBOTexture::QQuickContext2DFBOTexture() + : QQuickContext2DTexture() , m_fbo(0) , m_multisampledFbo(0) , m_paint_device(0) @@ -411,14 +411,14 @@ QSGContext2DFBOTexture::QSGContext2DFBOTexture() m_threadRendering = false; } -QSGContext2DFBOTexture::~QSGContext2DFBOTexture() +QQuickContext2DFBOTexture::~QQuickContext2DFBOTexture() { delete m_fbo; delete m_multisampledFbo; delete m_paint_device; } -bool QSGContext2DFBOTexture::setCanvasSize(const QSize &size) +bool QQuickContext2DFBOTexture::setCanvasSize(const QSize &size) { QSize s = QSize(qMax(QT_MINIMUM_FBO_SIZE, qt_next_power_of_two(size.width())) , qMax(QT_MINIMUM_FBO_SIZE, qt_next_power_of_two(size.height()))); @@ -431,7 +431,7 @@ bool QSGContext2DFBOTexture::setCanvasSize(const QSize &size) return false; } -bool QSGContext2DFBOTexture::setTileSize(const QSize &size) +bool QQuickContext2DFBOTexture::setTileSize(const QSize &size) { QSize s = QSize(qMax(QT_MINIMUM_FBO_SIZE, qt_next_power_of_two(size.width())) , qMax(QT_MINIMUM_FBO_SIZE, qt_next_power_of_two(size.height()))); @@ -443,7 +443,7 @@ bool QSGContext2DFBOTexture::setTileSize(const QSize &size) return false; } -bool QSGContext2DFBOTexture::setCanvasWindow(const QRect& canvasWindow) +bool QQuickContext2DFBOTexture::setCanvasWindow(const QRect& canvasWindow) { QSize s = QSize(qMax(QT_MINIMUM_FBO_SIZE, qt_next_power_of_two(canvasWindow.size().width())) , qMax(QT_MINIMUM_FBO_SIZE, qt_next_power_of_two(canvasWindow.size().height()))); @@ -461,13 +461,13 @@ bool QSGContext2DFBOTexture::setCanvasWindow(const QRect& canvasWindow) return doChanged; } -void QSGContext2DFBOTexture::bind() +void QQuickContext2DFBOTexture::bind() { glBindTexture(GL_TEXTURE_2D, textureId()); updateBindOptions(); } -QRectF QSGContext2DFBOTexture::textureSubRect() const +QRectF QQuickContext2DFBOTexture::textureSubRect() const { return QRectF(0 , 0 @@ -476,13 +476,13 @@ QRectF QSGContext2DFBOTexture::textureSubRect() const } -int QSGContext2DFBOTexture::textureId() const +int QQuickContext2DFBOTexture::textureId() const { return m_fbo? m_fbo->texture() : 0; } -bool QSGContext2DFBOTexture::updateTexture() +bool QQuickContext2DFBOTexture::updateTexture() { if (!m_context->buffer()->isEmpty()) { paint(); @@ -500,19 +500,19 @@ bool QSGContext2DFBOTexture::updateTexture() return textureUpdated; } -QSGContext2DTile* QSGContext2DFBOTexture::createTile() const +QQuickContext2DTile* QQuickContext2DFBOTexture::createTile() const { - return new QSGContext2DFBOTile(); + return new QQuickContext2DFBOTile(); } -void QSGContext2DFBOTexture::grabImage() +void QQuickContext2DFBOTexture::grabImage() { if (m_fbo) { m_grabedImage = m_fbo->toImage(); } } -bool QSGContext2DFBOTexture::doMultisampling() const +bool QQuickContext2DFBOTexture::doMultisampling() const { static bool extensionsChecked = false; static bool multisamplingSupported = false; @@ -527,7 +527,7 @@ bool QSGContext2DFBOTexture::doMultisampling() const return multisamplingSupported && m_smooth; } -QImage QSGContext2DFBOTexture::toImage(const QRectF& region) +QImage QQuickContext2DFBOTexture::toImage(const QRectF& region) { #define QML_CONTEXT2D_WAIT_MAX 5000 @@ -550,9 +550,9 @@ QImage QSGContext2DFBOTexture::toImage(const QRectF& region) return grabbed; } -void QSGContext2DFBOTexture::compositeTile(QSGContext2DTile* tile) +void QQuickContext2DFBOTexture::compositeTile(QQuickContext2DTile* tile) { - QSGContext2DFBOTile* t = static_cast<QSGContext2DFBOTile*>(tile); + QQuickContext2DFBOTile* t = static_cast<QQuickContext2DFBOTile*>(tile); QRect target = t->rect().intersect(m_canvasWindow); if (target.isValid()) { QRect source = target; @@ -563,13 +563,13 @@ void QSGContext2DFBOTexture::compositeTile(QSGContext2DTile* tile) QOpenGLFramebufferObject::blitFramebuffer(m_fbo, target, t->fbo(), source); } } -QSGCanvasItem::RenderTarget QSGContext2DFBOTexture::renderTarget() const +QQuickCanvasItem::RenderTarget QQuickContext2DFBOTexture::renderTarget() const { - return QSGCanvasItem::FramebufferObject; + return QQuickCanvasItem::FramebufferObject; } -QPaintDevice* QSGContext2DFBOTexture::beginPainting() +QPaintDevice* QQuickContext2DFBOTexture::beginPainting() { - QSGContext2DTexture::beginPainting(); + QQuickContext2DTexture::beginPainting(); if (m_canvasWindow.size().isEmpty() && !m_threadRendering) { delete m_fbo; @@ -615,9 +615,9 @@ QPaintDevice* QSGContext2DFBOTexture::beginPainting() return m_paint_device; } -void QSGContext2DFBOTexture::endPainting() +void QQuickContext2DFBOTexture::endPainting() { - QSGContext2DTexture::endPainting(); + QQuickContext2DTexture::endPainting(); if (m_multisampledFbo) { QOpenGLFramebufferObject::blitFramebuffer(m_fbo, m_multisampledFbo); m_multisampledFbo->release(); @@ -634,8 +634,8 @@ void qt_quit_context2d_render_thread() } } -QSGContext2DImageTexture::QSGContext2DImageTexture(bool threadRendering) - : QSGContext2DTexture() +QQuickContext2DImageTexture::QQuickContext2DImageTexture(bool threadRendering) + : QQuickContext2DTexture() , m_texture(new QSGPlainTexture()) { m_texture->setOwnsTexture(true); @@ -654,55 +654,55 @@ QSGContext2DImageTexture::QSGContext2DImageTexture(bool threadRendering) } } -QSGContext2DImageTexture::~QSGContext2DImageTexture() +QQuickContext2DImageTexture::~QQuickContext2DImageTexture() { delete m_texture; } -int QSGContext2DImageTexture::textureId() const +int QQuickContext2DImageTexture::textureId() const { return m_texture->textureId(); } -void QSGContext2DImageTexture::lock() +void QQuickContext2DImageTexture::lock() { if (m_threadRendering) m_mutex.lock(); } -void QSGContext2DImageTexture::unlock() +void QQuickContext2DImageTexture::unlock() { if (m_threadRendering) m_mutex.unlock(); } -void QSGContext2DImageTexture::wait() +void QQuickContext2DImageTexture::wait() { if (m_threadRendering) m_waitCondition.wait(&m_mutex); } -void QSGContext2DImageTexture::wake() +void QQuickContext2DImageTexture::wake() { if (m_threadRendering) m_waitCondition.wakeOne(); } -bool QSGContext2DImageTexture::supportDirectRendering() const +bool QQuickContext2DImageTexture::supportDirectRendering() const { return !m_threadRendering; } -QSGCanvasItem::RenderTarget QSGContext2DImageTexture::renderTarget() const +QQuickCanvasItem::RenderTarget QQuickContext2DImageTexture::renderTarget() const { - return QSGCanvasItem::Image; + return QQuickCanvasItem::Image; } -void QSGContext2DImageTexture::bind() +void QQuickContext2DImageTexture::bind() { m_texture->bind(); } -bool QSGContext2DImageTexture::updateTexture() +bool QQuickContext2DImageTexture::updateTexture() { lock(); bool textureUpdated = m_dirtyTexture; @@ -714,12 +714,12 @@ bool QSGContext2DImageTexture::updateTexture() return textureUpdated; } -QSGContext2DTile* QSGContext2DImageTexture::createTile() const +QQuickContext2DTile* QQuickContext2DImageTexture::createTile() const { - return new QSGContext2DImageTile(); + return new QQuickContext2DImageTile(); } -void QSGContext2DImageTexture::grabImage(const QRect& r) +void QQuickContext2DImageTexture::grabImage(const QRect& r) { m_doGrabImage = true; paint(); @@ -727,7 +727,7 @@ void QSGContext2DImageTexture::grabImage(const QRect& r) m_grabedImage = m_image.copy(r); } -QImage QSGContext2DImageTexture::toImage(const QRectF& region) +QImage QQuickContext2DImageTexture::toImage(const QRectF& region) { QRect r = region.isValid() ? region.toRect() : QRect(QPoint(0, 0), m_canvasWindow.size()); if (threadRendering()) { @@ -741,9 +741,9 @@ QImage QSGContext2DImageTexture::toImage(const QRectF& region) return image; } -QPaintDevice* QSGContext2DImageTexture::beginPainting() +QPaintDevice* QQuickContext2DImageTexture::beginPainting() { - QSGContext2DTexture::beginPainting(); + QQuickContext2DTexture::beginPainting(); if (m_canvasWindow.size().isEmpty()) return 0; @@ -757,10 +757,10 @@ QPaintDevice* QSGContext2DImageTexture::beginPainting() return &m_image; } -void QSGContext2DImageTexture::compositeTile(QSGContext2DTile* tile) +void QQuickContext2DImageTexture::compositeTile(QQuickContext2DTile* tile) { Q_ASSERT(!tile->dirty()); - QSGContext2DImageTile* t = static_cast<QSGContext2DImageTile*>(tile); + QQuickContext2DImageTile* t = static_cast<QQuickContext2DImageTile*>(tile); QRect target = t->rect().intersect(m_canvasWindow); if (target.isValid()) { QRect source = target; diff --git a/src/declarative/items/context2d/qsgcontext2dtexture_p.h b/src/declarative/items/context2d/qquickcontext2dtexture_p.h index dbc383d7fc..ed45a09f7c 100644 --- a/src/declarative/items/context2d/qsgcontext2dtexture_p.h +++ b/src/declarative/items/context2d/qquickcontext2dtexture_p.h @@ -39,12 +39,12 @@ ** ****************************************************************************/ -#ifndef QSGCONTEXT2DTEXTURE_P_H -#define QSGCONTEXT2DTEXTURE_P_H +#ifndef QQUICKCONTEXT2DTEXTURE_P_H +#define QQUICKCONTEXT2DTEXTURE_P_H #include <qsgtexture.h> -#include "qsgcanvasitem_p.h" -#include "qsgcontext2d_p.h" +#include "qquickcanvasitem_p.h" +#include "qquickcontext2d_p.h" #include <QOpenGLContext> #include <QOpenGLFramebufferObject> @@ -59,15 +59,15 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGContext2DTile; -class QSGContext2DCommandBuffer; +class QQuickContext2DTile; +class QQuickContext2DCommandBuffer; -class QSGContext2DTexture : public QSGDynamicTexture +class QQuickContext2DTexture : public QSGDynamicTexture { Q_OBJECT public: - QSGContext2DTexture(); - ~QSGContext2DTexture(); + QQuickContext2DTexture(); + ~QQuickContext2DTexture(); virtual bool hasAlphaChannel() const {return true;} virtual bool hasMipmaps() const {return false;} @@ -79,7 +79,7 @@ public: bool threadRendering() const {return m_threadRendering;} virtual bool supportThreadRendering() const = 0; virtual bool supportDirectRendering() const = 0; - virtual QSGCanvasItem::RenderTarget renderTarget() const = 0; + virtual QQuickCanvasItem::RenderTarget renderTarget() const = 0; virtual QImage toImage(const QRectF& region = QRectF()) = 0; static QRect tiledRect(const QRectF& window, const QSize& tileSize); @@ -95,25 +95,25 @@ Q_SIGNALS: public Q_SLOTS: void markDirtyTexture(); - void setItem(QSGCanvasItem* item); + void setItem(QQuickCanvasItem* item); void paint(); protected: void paintWithoutTiles(); virtual QPaintDevice* beginPainting() {m_painting = true; return 0; } virtual void endPainting() {m_painting = false;} - virtual QSGContext2DTile* createTile() const = 0; - virtual void compositeTile(QSGContext2DTile* tile) = 0; + virtual QQuickContext2DTile* createTile() const = 0; + virtual void compositeTile(QQuickContext2DTile* tile) = 0; void clearTiles(); QRect createTiles(const QRect& window); - QList<QSGContext2DTile*> m_tiles; - QSGContext2D* m_context; + QList<QQuickContext2DTile*> m_tiles; + QQuickContext2D* m_context; - QSGContext2D::State m_state; + QQuickContext2D::State m_state; - QSGCanvasItem* m_item; + QQuickCanvasItem* m_item; QSize m_canvasSize; QSize m_tileSize; QRect m_canvasWindow; @@ -127,24 +127,24 @@ protected: uint m_painting : 1; }; -class QSGContext2DFBOTexture : public QSGContext2DTexture +class QQuickContext2DFBOTexture : public QQuickContext2DTexture { Q_OBJECT public: - QSGContext2DFBOTexture(); - ~QSGContext2DFBOTexture(); + QQuickContext2DFBOTexture(); + ~QQuickContext2DFBOTexture(); virtual int textureId() const; virtual bool updateTexture(); - virtual QSGContext2DTile* createTile() const; + virtual QQuickContext2DTile* createTile() const; virtual QImage toImage(const QRectF& region = QRectF()); virtual QPaintDevice* beginPainting(); virtual void endPainting(); QRectF textureSubRect() const; virtual bool supportThreadRendering() const {return false;} virtual bool supportDirectRendering() const {return false;} - virtual QSGCanvasItem::RenderTarget renderTarget() const; - virtual void compositeTile(QSGContext2DTile* tile); + virtual QQuickCanvasItem::RenderTarget renderTarget() const; + virtual void compositeTile(QQuickContext2DTile* tile); virtual void bind(); virtual bool setCanvasSize(const QSize &size); virtual bool setTileSize(const QSize &size); @@ -164,28 +164,28 @@ private: }; class QSGPlainTexture; -class QSGContext2DImageTexture : public QSGContext2DTexture +class QQuickContext2DImageTexture : public QQuickContext2DTexture { Q_OBJECT public: - QSGContext2DImageTexture(bool threadRendering = true); - ~QSGContext2DImageTexture(); + QQuickContext2DImageTexture(bool threadRendering = true); + ~QQuickContext2DImageTexture(); virtual int textureId() const; virtual void bind(); virtual bool supportThreadRendering() const {return true;} virtual bool supportDirectRendering() const; - virtual QSGCanvasItem::RenderTarget renderTarget() const; + virtual QQuickCanvasItem::RenderTarget renderTarget() const; virtual void lock(); virtual void unlock(); virtual void wait(); virtual void wake(); virtual bool updateTexture(); - virtual QSGContext2DTile* createTile() const; + virtual QQuickContext2DTile* createTile() const; virtual QImage toImage(const QRectF& region = QRectF()); virtual QPaintDevice* beginPainting(); - virtual void compositeTile(QSGContext2DTile* tile); + virtual void compositeTile(QQuickContext2DTile* tile); private Q_SLOTS: void grabImage(const QRect& r); @@ -202,4 +202,4 @@ QT_END_HEADER QT_END_NAMESPACE -#endif // QSGCONTEXT2DTEXTURE_P_H +#endif // QQUICKCONTEXT2DTEXTURE_P_H diff --git a/src/declarative/items/context2d/qsgcontext2dtile.cpp b/src/declarative/items/context2d/qquickcontext2dtile.cpp index 8c8ef836b0..6217c66094 100644 --- a/src/declarative/items/context2d/qsgcontext2dtile.cpp +++ b/src/declarative/items/context2d/qquickcontext2dtile.cpp @@ -39,26 +39,26 @@ ** ****************************************************************************/ -#include "qsgcontext2dtile_p.h" +#include "qquickcontext2dtile_p.h" #include <QOpenGLFramebufferObject> #include <QOpenGLFramebufferObjectFormat> #include <QOpenGLPaintDevice> -QSGContext2DTile::QSGContext2DTile() +QQuickContext2DTile::QQuickContext2DTile() : m_dirty(true) , m_rect(QRect(0, 0, 1, 1)) , m_device(0) { } -QSGContext2DTile::~QSGContext2DTile() +QQuickContext2DTile::~QQuickContext2DTile() { if (m_painter.isActive()) m_painter.end(); } -QPainter* QSGContext2DTile::createPainter(bool smooth) +QPainter* QQuickContext2DTile::createPainter(bool smooth) { if (m_painter.isActive()) m_painter.end(); @@ -69,7 +69,7 @@ QPainter* QSGContext2DTile::createPainter(bool smooth) m_painter.resetTransform(); m_painter.setCompositionMode(QPainter::CompositionMode_Source); -#ifdef QSGCONTEXT2D_DEBUG +#ifdef QQUICKCONTEXT2D_DEBUG int v = 100; int gray = (m_rect.x() / m_rect.width() + m_rect.y() / m_rect.height()) % 2; if (gray) @@ -93,19 +93,19 @@ QPainter* QSGContext2DTile::createPainter(bool smooth) return 0; } -QSGContext2DFBOTile::QSGContext2DFBOTile() - : QSGContext2DTile() +QQuickContext2DFBOTile::QQuickContext2DFBOTile() + : QQuickContext2DTile() , m_fbo(0) { } -QSGContext2DFBOTile::~QSGContext2DFBOTile() +QQuickContext2DFBOTile::~QQuickContext2DFBOTile() { delete m_fbo; } -void QSGContext2DFBOTile::aboutToDraw() +void QQuickContext2DFBOTile::aboutToDraw() { m_fbo->bind(); if (!m_device) { @@ -117,12 +117,12 @@ void QSGContext2DFBOTile::aboutToDraw() } } -void QSGContext2DFBOTile::drawFinished() +void QQuickContext2DFBOTile::drawFinished() { m_fbo->release(); } -void QSGContext2DFBOTile::setRect(const QRect& r) +void QQuickContext2DFBOTile::setRect(const QRect& r) { if (m_rect == r) return; @@ -143,16 +143,16 @@ void QSGContext2DFBOTile::setRect(const QRect& r) } -QSGContext2DImageTile::QSGContext2DImageTile() - : QSGContext2DTile() +QQuickContext2DImageTile::QQuickContext2DImageTile() + : QQuickContext2DTile() { } -QSGContext2DImageTile::~QSGContext2DImageTile() +QQuickContext2DImageTile::~QQuickContext2DImageTile() { } -void QSGContext2DImageTile::setRect(const QRect& r) +void QQuickContext2DImageTile::setRect(const QRect& r) { if (m_rect == r) return; @@ -162,4 +162,4 @@ void QSGContext2DImageTile::setRect(const QRect& r) m_image = QImage(r.size(), QImage::Format_ARGB32_Premultiplied); } m_device = &m_image; -}
\ No newline at end of file +} diff --git a/src/declarative/items/context2d/qsgcontext2dtile_p.h b/src/declarative/items/context2d/qquickcontext2dtile_p.h index 57b68ef67d..92c59efbcf 100644 --- a/src/declarative/items/context2d/qsgcontext2dtile_p.h +++ b/src/declarative/items/context2d/qquickcontext2dtile_p.h @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QSGCONTEXT2DTILE_P_H -#define QSGCONTEXT2DTILE_P_H +#ifndef QQUICKCONTEXT2DTILE_P_H +#define QQUICKCONTEXT2DTILE_P_H -#include "qsgcontext2d_p.h" +#include "qquickcontext2d_p.h" #include <QOpenGLFramebufferObject> QT_BEGIN_HEADER @@ -51,14 +51,14 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGContext2DTexture; -class QSGContext2DCommandBuffer; +class QQuickContext2DTexture; +class QQuickContext2DCommandBuffer; -class QSGContext2DTile +class QQuickContext2DTile { public: - QSGContext2DTile(); - ~QSGContext2DTile(); + QQuickContext2DTile(); + ~QQuickContext2DTile(); bool dirty() const {return m_dirty;} void markDirty(bool dirty) {m_dirty = dirty;} @@ -78,11 +78,11 @@ protected: }; -class QSGContext2DFBOTile : public QSGContext2DTile +class QQuickContext2DFBOTile : public QQuickContext2DTile { public: - QSGContext2DFBOTile(); - ~QSGContext2DFBOTile(); + QQuickContext2DFBOTile(); + ~QQuickContext2DFBOTile(); virtual void setRect(const QRect& r); QOpenGLFramebufferObject* fbo() const {return m_fbo;} void drawFinished(); @@ -95,11 +95,11 @@ private: QOpenGLFramebufferObject *m_fbo; }; -class QSGContext2DImageTile : public QSGContext2DTile +class QQuickContext2DImageTile : public QQuickContext2DTile { public: - QSGContext2DImageTile(); - ~QSGContext2DImageTile(); + QQuickContext2DImageTile(); + ~QQuickContext2DImageTile(); void setRect(const QRect& r); const QImage& image() const {return m_image;} private: @@ -109,4 +109,4 @@ QT_END_HEADER QT_END_NAMESPACE -#endif // QSGCONTEXT2DTILE_P_H +#endif // QQUICKCONTEXT2DTILE_P_H diff --git a/src/declarative/items/items.pri b/src/declarative/items/items.pri index 025f67ab90..c3d6a2ab73 100644 --- a/src/declarative/items/items.pri +++ b/src/declarative/items/items.pri @@ -1,127 +1,127 @@ HEADERS += \ - $$PWD/qsgevents_p_p.h \ - $$PWD/qsgitemchangelistener_p.h \ - $$PWD/qsganchors_p.h \ - $$PWD/qsganchors_p_p.h \ - $$PWD/qsgitem.h \ - $$PWD/qsgitem_p.h \ - $$PWD/qsgrectangle_p.h \ - $$PWD/qsgrectangle_p_p.h \ - $$PWD/qsgcanvas.h \ - $$PWD/qsgcanvas_p.h \ - $$PWD/qsgfocusscope_p.h \ - $$PWD/qsgitemsmodule_p.h \ - $$PWD/qsgpainteditem.h \ - $$PWD/qsgpainteditem_p.h \ - $$PWD/qsgtext_p.h \ - $$PWD/qsgtext_p_p.h \ - $$PWD/qsgtextnode_p.h \ - $$PWD/qsgtextinput_p.h \ - $$PWD/qsgtextinput_p_p.h \ - $$PWD/qsgtextedit_p.h \ - $$PWD/qsgtextedit_p_p.h \ - $$PWD/qsgimagebase_p.h \ - $$PWD/qsgimagebase_p_p.h \ - $$PWD/qsgimage_p.h \ - $$PWD/qsgimage_p_p.h \ - $$PWD/qsgborderimage_p.h \ - $$PWD/qsgborderimage_p_p.h \ - $$PWD/qsgninepatchnode_p.h \ - $$PWD/qsgscalegrid_p_p.h \ - $$PWD/qsgmousearea_p.h \ - $$PWD/qsgmousearea_p_p.h \ - $$PWD/qsgpincharea_p.h \ - $$PWD/qsgpincharea_p_p.h \ - $$PWD/qsgflickable_p.h \ - $$PWD/qsgflickable_p_p.h \ - $$PWD/qsglistview_p.h \ - $$PWD/qsgvisualadaptormodel_p.h \ - $$PWD/qsgvisualdatamodel_p.h \ - $$PWD/qsgvisualitemmodel_p.h \ - $$PWD/qsgrepeater_p.h \ - $$PWD/qsgrepeater_p_p.h \ - $$PWD/qsggridview_p.h \ - $$PWD/qsgpathview_p.h \ - $$PWD/qsgpathview_p_p.h \ - $$PWD/qsgpositioners_p.h \ - $$PWD/qsgpositioners_p_p.h \ - $$PWD/qsgloader_p.h \ - $$PWD/qsgloader_p_p.h \ - $$PWD/qsganimatedimage_p.h \ - $$PWD/qsganimatedimage_p_p.h \ - $$PWD/qsgflipable_p.h \ - $$PWD/qsgtranslate_p.h \ - $$PWD/qsgclipnode_p.h \ - $$PWD/qsgview.h \ - $$PWD/qsgview_p.h \ - $$PWD/qsganimation_p.h \ - $$PWD/qsganimation_p_p.h \ - $$PWD/qsgstateoperations_p.h \ - $$PWD/qsgimplicitsizeitem_p.h \ - $$PWD/qsgimplicitsizeitem_p_p.h \ - $$PWD/qsgspriteengine_p.h \ - $$PWD/qsgsprite_p.h \ - $$PWD/qsgspriteimage_p.h \ - $$PWD/qsgdrag_p.h \ - $$PWD/qsgdroparea_p.h \ - $$PWD/qsgitemview_p.h \ - $$PWD/qsgitemview_p_p.h + $$PWD/qquickevents_p_p.h \ + $$PWD/qquickitemchangelistener_p.h \ + $$PWD/qquickanchors_p.h \ + $$PWD/qquickanchors_p_p.h \ + $$PWD/qquickitem.h \ + $$PWD/qquickitem_p.h \ + $$PWD/qquickrectangle_p.h \ + $$PWD/qquickrectangle_p_p.h \ + $$PWD/qquickcanvas.h \ + $$PWD/qquickcanvas_p.h \ + $$PWD/qquickfocusscope_p.h \ + $$PWD/qquickitemsmodule_p.h \ + $$PWD/qquickpainteditem.h \ + $$PWD/qquickpainteditem_p.h \ + $$PWD/qquicktext_p.h \ + $$PWD/qquicktext_p_p.h \ + $$PWD/qquicktextnode_p.h \ + $$PWD/qquicktextinput_p.h \ + $$PWD/qquicktextinput_p_p.h \ + $$PWD/qquicktextedit_p.h \ + $$PWD/qquicktextedit_p_p.h \ + $$PWD/qquickimagebase_p.h \ + $$PWD/qquickimagebase_p_p.h \ + $$PWD/qquickimage_p.h \ + $$PWD/qquickimage_p_p.h \ + $$PWD/qquickborderimage_p.h \ + $$PWD/qquickborderimage_p_p.h \ + $$PWD/qquickninepatchnode_p.h \ + $$PWD/qquickscalegrid_p_p.h \ + $$PWD/qquickmousearea_p.h \ + $$PWD/qquickmousearea_p_p.h \ + $$PWD/qquickpincharea_p.h \ + $$PWD/qquickpincharea_p_p.h \ + $$PWD/qquickflickable_p.h \ + $$PWD/qquickflickable_p_p.h \ + $$PWD/qquicklistview_p.h \ + $$PWD/qquickvisualadaptormodel_p.h \ + $$PWD/qquickvisualdatamodel_p.h \ + $$PWD/qquickvisualitemmodel_p.h \ + $$PWD/qquickrepeater_p.h \ + $$PWD/qquickrepeater_p_p.h \ + $$PWD/qquickgridview_p.h \ + $$PWD/qquickpathview_p.h \ + $$PWD/qquickpathview_p_p.h \ + $$PWD/qquickpositioners_p.h \ + $$PWD/qquickpositioners_p_p.h \ + $$PWD/qquickloader_p.h \ + $$PWD/qquickloader_p_p.h \ + $$PWD/qquickanimatedimage_p.h \ + $$PWD/qquickanimatedimage_p_p.h \ + $$PWD/qquickflipable_p.h \ + $$PWD/qquicktranslate_p.h \ + $$PWD/qquickclipnode_p.h \ + $$PWD/qquickview.h \ + $$PWD/qquickview_p.h \ + $$PWD/qquickanimation_p.h \ + $$PWD/qquickanimation_p_p.h \ + $$PWD/qquickstateoperations_p.h \ + $$PWD/qquickimplicitsizeitem_p.h \ + $$PWD/qquickimplicitsizeitem_p_p.h \ + $$PWD/qquickspriteengine_p.h \ + $$PWD/qquicksprite_p.h \ + $$PWD/qquickspriteimage_p.h \ + $$PWD/qquickdrag_p.h \ + $$PWD/qquickdroparea_p.h \ + $$PWD/qquickitemview_p.h \ + $$PWD/qquickitemview_p_p.h SOURCES += \ - $$PWD/qsgevents.cpp \ - $$PWD/qsganchors.cpp \ - $$PWD/qsgitem.cpp \ - $$PWD/qsgrectangle.cpp \ - $$PWD/qsgcanvas.cpp \ - $$PWD/qsgfocusscope.cpp \ - $$PWD/qsgitemsmodule.cpp \ - $$PWD/qsgpainteditem.cpp \ - $$PWD/qsgtext.cpp \ - $$PWD/qsgtextnode.cpp \ - $$PWD/qsgtextinput.cpp \ - $$PWD/qsgtextedit.cpp \ - $$PWD/qsgimagebase.cpp \ - $$PWD/qsgimage.cpp \ - $$PWD/qsgborderimage.cpp \ - $$PWD/qsgninepatchnode.cpp \ - $$PWD/qsgscalegrid.cpp \ - $$PWD/qsgmousearea.cpp \ - $$PWD/qsgpincharea.cpp \ - $$PWD/qsgflickable.cpp \ - $$PWD/qsglistview.cpp \ - $$PWD/qsgvisualadaptormodel.cpp \ - $$PWD/qsgvisualdatamodel.cpp \ - $$PWD/qsgvisualitemmodel.cpp \ - $$PWD/qsgrepeater.cpp \ - $$PWD/qsggridview.cpp \ - $$PWD/qsgpathview.cpp \ - $$PWD/qsgpositioners.cpp \ - $$PWD/qsgloader.cpp \ - $$PWD/qsganimatedimage.cpp \ - $$PWD/qsgflipable.cpp \ - $$PWD/qsgtranslate.cpp \ - $$PWD/qsgclipnode.cpp \ - $$PWD/qsgview.cpp \ - $$PWD/qsganimation.cpp \ - $$PWD/qsgstateoperations.cpp \ - $$PWD/qsgimplicitsizeitem.cpp \ - $$PWD/qsgspriteengine.cpp \ - $$PWD/qsgsprite.cpp \ - $$PWD/qsgspriteimage.cpp \ - $$PWD/qsgdrag.cpp \ - $$PWD/qsgdroparea.cpp \ - $$PWD/qsgitemview.cpp + $$PWD/qquickevents.cpp \ + $$PWD/qquickanchors.cpp \ + $$PWD/qquickitem.cpp \ + $$PWD/qquickrectangle.cpp \ + $$PWD/qquickcanvas.cpp \ + $$PWD/qquickfocusscope.cpp \ + $$PWD/qquickitemsmodule.cpp \ + $$PWD/qquickpainteditem.cpp \ + $$PWD/qquicktext.cpp \ + $$PWD/qquicktextnode.cpp \ + $$PWD/qquicktextinput.cpp \ + $$PWD/qquicktextedit.cpp \ + $$PWD/qquickimagebase.cpp \ + $$PWD/qquickimage.cpp \ + $$PWD/qquickborderimage.cpp \ + $$PWD/qquickninepatchnode.cpp \ + $$PWD/qquickscalegrid.cpp \ + $$PWD/qquickmousearea.cpp \ + $$PWD/qquickpincharea.cpp \ + $$PWD/qquickflickable.cpp \ + $$PWD/qquicklistview.cpp \ + $$PWD/qquickvisualadaptormodel.cpp \ + $$PWD/qquickvisualdatamodel.cpp \ + $$PWD/qquickvisualitemmodel.cpp \ + $$PWD/qquickrepeater.cpp \ + $$PWD/qquickgridview.cpp \ + $$PWD/qquickpathview.cpp \ + $$PWD/qquickpositioners.cpp \ + $$PWD/qquickloader.cpp \ + $$PWD/qquickanimatedimage.cpp \ + $$PWD/qquickflipable.cpp \ + $$PWD/qquicktranslate.cpp \ + $$PWD/qquickclipnode.cpp \ + $$PWD/qquickview.cpp \ + $$PWD/qquickanimation.cpp \ + $$PWD/qquickstateoperations.cpp \ + $$PWD/qquickimplicitsizeitem.cpp \ + $$PWD/qquickspriteengine.cpp \ + $$PWD/qquicksprite.cpp \ + $$PWD/qquickspriteimage.cpp \ + $$PWD/qquickdrag.cpp \ + $$PWD/qquickdroparea.cpp \ + $$PWD/qquickitemview.cpp SOURCES += \ - $$PWD/qsgshadereffect.cpp \ - $$PWD/qsgshadereffectmesh.cpp \ - $$PWD/qsgshadereffectnode.cpp \ - $$PWD/qsgshadereffectsource.cpp \ + $$PWD/qquickshadereffect.cpp \ + $$PWD/qquickshadereffectmesh.cpp \ + $$PWD/qquickshadereffectnode.cpp \ + $$PWD/qquickshadereffectsource.cpp \ HEADERS += \ - $$PWD/qsgshadereffect_p.h \ - $$PWD/qsgshadereffectmesh_p.h \ - $$PWD/qsgshadereffectnode_p.h \ - $$PWD/qsgshadereffectsource_p.h \ + $$PWD/qquickshadereffect_p.h \ + $$PWD/qquickshadereffectmesh_p.h \ + $$PWD/qquickshadereffectnode_p.h \ + $$PWD/qquickshadereffectsource_p.h \ include(context2d/context2d.pri) diff --git a/src/declarative/items/qsganchors.cpp b/src/declarative/items/qquickanchors.cpp index 67ca0317c4..678347cc73 100644 --- a/src/declarative/items/qsganchors.cpp +++ b/src/declarative/items/qquickanchors.cpp @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#include "qsganchors_p_p.h" +#include "qquickanchors_p_p.h" -#include "qsgitem.h" -#include "qsgitem_p.h" +#include "qquickitem.h" +#include "qquickitem_p.h" #include <qdeclarativeinfo.h> @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE //TODO: should we cache relationships, so we don't have to check each time (parent-child or sibling)? //TODO: support non-parent, non-sibling (need to find lowest common ancestor) -static qreal hcenter(QSGItem *item) +static qreal hcenter(QQuickItem *item) { qreal width = item->width(); int iw = width; @@ -61,7 +61,7 @@ static qreal hcenter(QSGItem *item) return width / 2; } -static qreal vcenter(QSGItem *item) +static qreal vcenter(QQuickItem *item) { qreal height = item->height(); int ih = height; @@ -73,29 +73,29 @@ static qreal vcenter(QSGItem *item) //### const item? //local position -static qreal position(QSGItem *item, QSGAnchorLine::AnchorLine anchorLine) +static qreal position(QQuickItem *item, QQuickAnchorLine::AnchorLine anchorLine) { qreal ret = 0.0; switch (anchorLine) { - case QSGAnchorLine::Left: + case QQuickAnchorLine::Left: ret = item->x(); break; - case QSGAnchorLine::Right: + case QQuickAnchorLine::Right: ret = item->x() + item->width(); break; - case QSGAnchorLine::Top: + case QQuickAnchorLine::Top: ret = item->y(); break; - case QSGAnchorLine::Bottom: + case QQuickAnchorLine::Bottom: ret = item->y() + item->height(); break; - case QSGAnchorLine::HCenter: + case QQuickAnchorLine::HCenter: ret = item->x() + hcenter(item); break; - case QSGAnchorLine::VCenter: + case QQuickAnchorLine::VCenter: ret = item->y() + vcenter(item); break; - case QSGAnchorLine::Baseline: + case QQuickAnchorLine::Baseline: ret = item->y() + item->baselineOffset(); break; default: @@ -106,29 +106,29 @@ static qreal position(QSGItem *item, QSGAnchorLine::AnchorLine anchorLine) } //position when origin is 0,0 -static qreal adjustedPosition(QSGItem *item, QSGAnchorLine::AnchorLine anchorLine) +static qreal adjustedPosition(QQuickItem *item, QQuickAnchorLine::AnchorLine anchorLine) { qreal ret = 0.0; switch (anchorLine) { - case QSGAnchorLine::Left: + case QQuickAnchorLine::Left: ret = 0.0; break; - case QSGAnchorLine::Right: + case QQuickAnchorLine::Right: ret = item->width(); break; - case QSGAnchorLine::Top: + case QQuickAnchorLine::Top: ret = 0.0; break; - case QSGAnchorLine::Bottom: + case QQuickAnchorLine::Bottom: ret = item->height(); break; - case QSGAnchorLine::HCenter: + case QQuickAnchorLine::HCenter: ret = hcenter(item); break; - case QSGAnchorLine::VCenter: + case QQuickAnchorLine::VCenter: ret = vcenter(item); break; - case QSGAnchorLine::Baseline: + case QQuickAnchorLine::Baseline: ret = item->baselineOffset(); break; default: @@ -138,14 +138,14 @@ static qreal adjustedPosition(QSGItem *item, QSGAnchorLine::AnchorLine anchorLin return ret; } -QSGAnchors::QSGAnchors(QSGItem *item, QObject *parent) -: QObject(*new QSGAnchorsPrivate(item), parent) +QQuickAnchors::QQuickAnchors(QQuickItem *item, QObject *parent) +: QObject(*new QQuickAnchorsPrivate(item), parent) { } -QSGAnchors::~QSGAnchors() +QQuickAnchors::~QQuickAnchors() { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); d->remDepend(d->fill); d->remDepend(d->centerIn); d->remDepend(d->left.item); @@ -157,9 +157,9 @@ QSGAnchors::~QSGAnchors() d->remDepend(d->baseline.item); } -void QSGAnchorsPrivate::fillChanged() +void QQuickAnchorsPrivate::fillChanged() { - Q_Q(QSGAnchors); + Q_Q(QQuickAnchors); if (!fill || !isItemComplete()) return; @@ -178,14 +178,14 @@ void QSGAnchorsPrivate::fillChanged() --updatingFill; } else { // ### Make this certain :) - qmlInfo(item) << QSGAnchors::tr("Possible anchor loop detected on fill."); + qmlInfo(item) << QQuickAnchors::tr("Possible anchor loop detected on fill."); } } -void QSGAnchorsPrivate::centerInChanged() +void QQuickAnchorsPrivate::centerInChanged() { - Q_Q(QSGAnchors); + Q_Q(QQuickAnchors); if (!centerIn || fill || !isItemComplete()) return; @@ -207,11 +207,11 @@ void QSGAnchorsPrivate::centerInChanged() --updatingCenterIn; } else { // ### Make this certain :) - qmlInfo(item) << QSGAnchors::tr("Possible anchor loop detected on centerIn."); + qmlInfo(item) << QQuickAnchors::tr("Possible anchor loop detected on centerIn."); } } -void QSGAnchorsPrivate::clearItem(QSGItem *item) +void QQuickAnchorsPrivate::clearItem(QQuickItem *item) { if (!item) return; @@ -221,118 +221,118 @@ void QSGAnchorsPrivate::clearItem(QSGItem *item) centerIn = 0; if (left.item == item) { left.item = 0; - usedAnchors &= ~QSGAnchors::LeftAnchor; + usedAnchors &= ~QQuickAnchors::LeftAnchor; } if (right.item == item) { right.item = 0; - usedAnchors &= ~QSGAnchors::RightAnchor; + usedAnchors &= ~QQuickAnchors::RightAnchor; } if (top.item == item) { top.item = 0; - usedAnchors &= ~QSGAnchors::TopAnchor; + usedAnchors &= ~QQuickAnchors::TopAnchor; } if (bottom.item == item) { bottom.item = 0; - usedAnchors &= ~QSGAnchors::BottomAnchor; + usedAnchors &= ~QQuickAnchors::BottomAnchor; } if (vCenter.item == item) { vCenter.item = 0; - usedAnchors &= ~QSGAnchors::VCenterAnchor; + usedAnchors &= ~QQuickAnchors::VCenterAnchor; } if (hCenter.item == item) { hCenter.item = 0; - usedAnchors &= ~QSGAnchors::HCenterAnchor; + usedAnchors &= ~QQuickAnchors::HCenterAnchor; } if (baseline.item == item) { baseline.item = 0; - usedAnchors &= ~QSGAnchors::BaselineAnchor; + usedAnchors &= ~QQuickAnchors::BaselineAnchor; } } -void QSGAnchorsPrivate::addDepend(QSGItem *item) +void QQuickAnchorsPrivate::addDepend(QQuickItem *item) { if (!item) return; - QSGItemPrivate *p = QSGItemPrivate::get(item); - p->addItemChangeListener(this, QSGItemPrivate::Geometry); + QQuickItemPrivate *p = QQuickItemPrivate::get(item); + p->addItemChangeListener(this, QQuickItemPrivate::Geometry); } -void QSGAnchorsPrivate::remDepend(QSGItem *item) +void QQuickAnchorsPrivate::remDepend(QQuickItem *item) { if (!item) return; - QSGItemPrivate *p = QSGItemPrivate::get(item); - p->removeItemChangeListener(this, QSGItemPrivate::Geometry); + QQuickItemPrivate *p = QQuickItemPrivate::get(item); + p->removeItemChangeListener(this, QQuickItemPrivate::Geometry); } -bool QSGAnchors::mirrored() +bool QQuickAnchors::mirrored() { - Q_D(QSGAnchors); - return QSGItemPrivate::get(d->item)->effectiveLayoutMirror; + Q_D(QQuickAnchors); + return QQuickItemPrivate::get(d->item)->effectiveLayoutMirror; } -bool QSGAnchorsPrivate::isItemComplete() const +bool QQuickAnchorsPrivate::isItemComplete() const { return componentComplete; } -void QSGAnchors::classBegin() +void QQuickAnchors::classBegin() { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); d->componentComplete = false; } -void QSGAnchors::componentComplete() +void QQuickAnchors::componentComplete() { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); d->componentComplete = true; } -void QSGAnchorsPrivate::setItemHeight(qreal v) +void QQuickAnchorsPrivate::setItemHeight(qreal v) { updatingMe = true; item->setHeight(v); updatingMe = false; } -void QSGAnchorsPrivate::setItemWidth(qreal v) +void QQuickAnchorsPrivate::setItemWidth(qreal v) { updatingMe = true; item->setWidth(v); updatingMe = false; } -void QSGAnchorsPrivate::setItemX(qreal v) +void QQuickAnchorsPrivate::setItemX(qreal v) { updatingMe = true; item->setX(v); updatingMe = false; } -void QSGAnchorsPrivate::setItemY(qreal v) +void QQuickAnchorsPrivate::setItemY(qreal v) { updatingMe = true; item->setY(v); updatingMe = false; } -void QSGAnchorsPrivate::setItemPos(const QPointF &v) +void QQuickAnchorsPrivate::setItemPos(const QPointF &v) { updatingMe = true; item->setPos(v); updatingMe = false; } -void QSGAnchorsPrivate::setItemSize(const QSizeF &v) +void QQuickAnchorsPrivate::setItemSize(const QSizeF &v) { updatingMe = true; item->setSize(v); updatingMe = false; } -void QSGAnchorsPrivate::updateMe() +void QQuickAnchorsPrivate::updateMe() { if (updatingMe) { updatingMe = false; @@ -345,7 +345,7 @@ void QSGAnchorsPrivate::updateMe() updateVerticalAnchors(); } -void QSGAnchorsPrivate::updateOnComplete() +void QQuickAnchorsPrivate::updateOnComplete() { fillChanged(); centerInChanged(); @@ -353,7 +353,7 @@ void QSGAnchorsPrivate::updateOnComplete() updateVerticalAnchors(); } -void QSGAnchorsPrivate::itemGeometryChanged(QSGItem *, const QRectF &newG, const QRectF &oldG) +void QQuickAnchorsPrivate::itemGeometryChanged(QQuickItem *, const QRectF &newG, const QRectF &oldG) { fillChanged(); centerInChanged(); @@ -363,15 +363,15 @@ void QSGAnchorsPrivate::itemGeometryChanged(QSGItem *, const QRectF &newG, const updateVerticalAnchors(); } -QSGItem *QSGAnchors::fill() const +QQuickItem *QQuickAnchors::fill() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->fill; } -void QSGAnchors::setFill(QSGItem *f) +void QQuickAnchors::setFill(QQuickItem *f) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (d->fill == f) return; @@ -392,20 +392,20 @@ void QSGAnchors::setFill(QSGItem *f) d->fillChanged(); } -void QSGAnchors::resetFill() +void QQuickAnchors::resetFill() { setFill(0); } -QSGItem *QSGAnchors::centerIn() const +QQuickItem *QQuickAnchors::centerIn() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->centerIn; } -void QSGAnchors::setCenterIn(QSGItem* c) +void QQuickAnchors::setCenterIn(QQuickItem* c) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (d->centerIn == c) return; @@ -427,16 +427,16 @@ void QSGAnchors::setCenterIn(QSGItem* c) d->centerInChanged(); } -void QSGAnchors::resetCenterIn() +void QQuickAnchors::resetCenterIn() { setCenterIn(0); } -bool QSGAnchorsPrivate::calcStretch(const QSGAnchorLine &edge1, - const QSGAnchorLine &edge2, +bool QQuickAnchorsPrivate::calcStretch(const QQuickAnchorLine &edge1, + const QQuickAnchorLine &edge2, qreal offset1, qreal offset2, - QSGAnchorLine::AnchorLine line, + QQuickAnchorLine::AnchorLine line, qreal &stretch) { bool edge1IsParent = (edge1.item == item->parentItem()); @@ -461,21 +461,21 @@ bool QSGAnchorsPrivate::calcStretch(const QSGAnchorLine &edge1, return invalid; } -void QSGAnchorsPrivate::updateVerticalAnchors() +void QQuickAnchorsPrivate::updateVerticalAnchors() { if (fill || centerIn || !isItemComplete()) return; if (updatingVerticalAnchor < 2) { ++updatingVerticalAnchor; - if (usedAnchors & QSGAnchors::TopAnchor) { + if (usedAnchors & QQuickAnchors::TopAnchor) { //Handle stretching bool invalid = true; qreal height = 0.0; - if (usedAnchors & QSGAnchors::BottomAnchor) { - invalid = calcStretch(top, bottom, topMargin, -bottomMargin, QSGAnchorLine::Top, height); - } else if (usedAnchors & QSGAnchors::VCenterAnchor) { - invalid = calcStretch(top, vCenter, topMargin, vCenterOffset, QSGAnchorLine::Top, height); + if (usedAnchors & QQuickAnchors::BottomAnchor) { + invalid = calcStretch(top, bottom, topMargin, -bottomMargin, QQuickAnchorLine::Top, height); + } else if (usedAnchors & QQuickAnchors::VCenterAnchor) { + invalid = calcStretch(top, vCenter, topMargin, vCenterOffset, QQuickAnchorLine::Top, height); height *= 2; } if (!invalid) @@ -487,12 +487,12 @@ void QSGAnchorsPrivate::updateVerticalAnchors() } else if (top.item->parentItem() == item->parentItem()) { setItemY(position(top.item, top.anchorLine) + topMargin); } - } else if (usedAnchors & QSGAnchors::BottomAnchor) { + } else if (usedAnchors & QQuickAnchors::BottomAnchor) { //Handle stretching (top + bottom case is handled above) - if (usedAnchors & QSGAnchors::VCenterAnchor) { + if (usedAnchors & QQuickAnchors::VCenterAnchor) { qreal height = 0.0; bool invalid = calcStretch(vCenter, bottom, vCenterOffset, -bottomMargin, - QSGAnchorLine::Top, height); + QQuickAnchorLine::Top, height); if (!invalid) setItemHeight(height*2); } @@ -503,7 +503,7 @@ void QSGAnchorsPrivate::updateVerticalAnchors() } else if (bottom.item->parentItem() == item->parentItem()) { setItemY(position(bottom.item, bottom.anchorLine) - item->height() - bottomMargin); } - } else if (usedAnchors & QSGAnchors::VCenterAnchor) { + } else if (usedAnchors & QQuickAnchors::VCenterAnchor) { //(stetching handled above) //Handle vCenter @@ -513,7 +513,7 @@ void QSGAnchorsPrivate::updateVerticalAnchors() } else if (vCenter.item->parentItem() == item->parentItem()) { setItemY(position(vCenter.item, vCenter.anchorLine) - vcenter(item) + vCenterOffset); } - } else if (usedAnchors & QSGAnchors::BaselineAnchor) { + } else if (usedAnchors & QQuickAnchors::BaselineAnchor) { //Handle baseline if (baseline.item == item->parentItem()) { setItemY(adjustedPosition(baseline.item, baseline.anchorLine) - item->baselineOffset() + baselineOffset); @@ -524,35 +524,35 @@ void QSGAnchorsPrivate::updateVerticalAnchors() --updatingVerticalAnchor; } else { // ### Make this certain :) - qmlInfo(item) << QSGAnchors::tr("Possible anchor loop detected on vertical anchor."); + qmlInfo(item) << QQuickAnchors::tr("Possible anchor loop detected on vertical anchor."); } } -inline QSGAnchorLine::AnchorLine reverseAnchorLine(QSGAnchorLine::AnchorLine anchorLine) +inline QQuickAnchorLine::AnchorLine reverseAnchorLine(QQuickAnchorLine::AnchorLine anchorLine) { - if (anchorLine == QSGAnchorLine::Left) { - return QSGAnchorLine::Right; - } else if (anchorLine == QSGAnchorLine::Right) { - return QSGAnchorLine::Left; + if (anchorLine == QQuickAnchorLine::Left) { + return QQuickAnchorLine::Right; + } else if (anchorLine == QQuickAnchorLine::Right) { + return QQuickAnchorLine::Left; } else { return anchorLine; } } -void QSGAnchorsPrivate::updateHorizontalAnchors() +void QQuickAnchorsPrivate::updateHorizontalAnchors() { - Q_Q(QSGAnchors); + Q_Q(QQuickAnchors); if (fill || centerIn || !isItemComplete()) return; if (updatingHorizontalAnchor < 3) { ++updatingHorizontalAnchor; qreal effectiveRightMargin, effectiveLeftMargin, effectiveHorizontalCenterOffset; - QSGAnchorLine effectiveLeft, effectiveRight, effectiveHorizontalCenter; - QSGAnchors::Anchor effectiveLeftAnchor, effectiveRightAnchor; + QQuickAnchorLine effectiveLeft, effectiveRight, effectiveHorizontalCenter; + QQuickAnchors::Anchor effectiveLeftAnchor, effectiveRightAnchor; if (q->mirrored()) { - effectiveLeftAnchor = QSGAnchors::RightAnchor; - effectiveRightAnchor = QSGAnchors::LeftAnchor; + effectiveLeftAnchor = QQuickAnchors::RightAnchor; + effectiveRightAnchor = QQuickAnchors::LeftAnchor; effectiveLeft.item = right.item; effectiveLeft.anchorLine = reverseAnchorLine(right.anchorLine); effectiveRight.item = left.item; @@ -563,8 +563,8 @@ void QSGAnchorsPrivate::updateHorizontalAnchors() effectiveRightMargin = leftMargin; effectiveHorizontalCenterOffset = -hCenterOffset; } else { - effectiveLeftAnchor = QSGAnchors::LeftAnchor; - effectiveRightAnchor = QSGAnchors::RightAnchor; + effectiveLeftAnchor = QQuickAnchors::LeftAnchor; + effectiveRightAnchor = QQuickAnchors::RightAnchor; effectiveLeft = left; effectiveRight = right; effectiveHorizontalCenter = hCenter; @@ -578,9 +578,9 @@ void QSGAnchorsPrivate::updateHorizontalAnchors() bool invalid = true; qreal width = 0.0; if (usedAnchors & effectiveRightAnchor) { - invalid = calcStretch(effectiveLeft, effectiveRight, effectiveLeftMargin, -effectiveRightMargin, QSGAnchorLine::Left, width); - } else if (usedAnchors & QSGAnchors::HCenterAnchor) { - invalid = calcStretch(effectiveLeft, effectiveHorizontalCenter, effectiveLeftMargin, effectiveHorizontalCenterOffset, QSGAnchorLine::Left, width); + invalid = calcStretch(effectiveLeft, effectiveRight, effectiveLeftMargin, -effectiveRightMargin, QQuickAnchorLine::Left, width); + } else if (usedAnchors & QQuickAnchors::HCenterAnchor) { + invalid = calcStretch(effectiveLeft, effectiveHorizontalCenter, effectiveLeftMargin, effectiveHorizontalCenterOffset, QQuickAnchorLine::Left, width); width *= 2; } if (!invalid) @@ -594,10 +594,10 @@ void QSGAnchorsPrivate::updateHorizontalAnchors() } } else if (usedAnchors & effectiveRightAnchor) { //Handle stretching (left + right case is handled in updateLeftAnchor) - if (usedAnchors & QSGAnchors::HCenterAnchor) { + if (usedAnchors & QQuickAnchors::HCenterAnchor) { qreal width = 0.0; bool invalid = calcStretch(effectiveHorizontalCenter, effectiveRight, effectiveHorizontalCenterOffset, -effectiveRightMargin, - QSGAnchorLine::Left, width); + QQuickAnchorLine::Left, width); if (!invalid) setItemWidth(width*2); } @@ -608,7 +608,7 @@ void QSGAnchorsPrivate::updateHorizontalAnchors() } else if (effectiveRight.item->parentItem() == item->parentItem()) { setItemX(position(effectiveRight.item, effectiveRight.anchorLine) - item->width() - effectiveRightMargin); } - } else if (usedAnchors & QSGAnchors::HCenterAnchor) { + } else if (usedAnchors & QQuickAnchors::HCenterAnchor) { //Handle hCenter if (effectiveHorizontalCenter.item == item->parentItem()) { setItemX(adjustedPosition(effectiveHorizontalCenter.item, effectiveHorizontalCenter.anchorLine) - hcenter(item) + effectiveHorizontalCenterOffset); @@ -619,19 +619,19 @@ void QSGAnchorsPrivate::updateHorizontalAnchors() --updatingHorizontalAnchor; } else { // ### Make this certain :) - qmlInfo(item) << QSGAnchors::tr("Possible anchor loop detected on horizontal anchor."); + qmlInfo(item) << QQuickAnchors::tr("Possible anchor loop detected on horizontal anchor."); } } -QSGAnchorLine QSGAnchors::top() const +QQuickAnchorLine QQuickAnchors::top() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->top; } -void QSGAnchors::setTop(const QSGAnchorLine &edge) +void QQuickAnchors::setTop(const QQuickAnchorLine &edge) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (!d->checkVAnchorValid(edge) || d->top == edge) return; @@ -649,25 +649,25 @@ void QSGAnchors::setTop(const QSGAnchorLine &edge) d->updateVerticalAnchors(); } -void QSGAnchors::resetTop() +void QQuickAnchors::resetTop() { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); d->usedAnchors &= ~TopAnchor; d->remDepend(d->top.item); - d->top = QSGAnchorLine(); + d->top = QQuickAnchorLine(); emit topChanged(); d->updateVerticalAnchors(); } -QSGAnchorLine QSGAnchors::bottom() const +QQuickAnchorLine QQuickAnchors::bottom() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->bottom; } -void QSGAnchors::setBottom(const QSGAnchorLine &edge) +void QQuickAnchors::setBottom(const QQuickAnchorLine &edge) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (!d->checkVAnchorValid(edge) || d->bottom == edge) return; @@ -685,25 +685,25 @@ void QSGAnchors::setBottom(const QSGAnchorLine &edge) d->updateVerticalAnchors(); } -void QSGAnchors::resetBottom() +void QQuickAnchors::resetBottom() { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); d->usedAnchors &= ~BottomAnchor; d->remDepend(d->bottom.item); - d->bottom = QSGAnchorLine(); + d->bottom = QQuickAnchorLine(); emit bottomChanged(); d->updateVerticalAnchors(); } -QSGAnchorLine QSGAnchors::verticalCenter() const +QQuickAnchorLine QQuickAnchors::verticalCenter() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->vCenter; } -void QSGAnchors::setVerticalCenter(const QSGAnchorLine &edge) +void QQuickAnchors::setVerticalCenter(const QQuickAnchorLine &edge) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (!d->checkVAnchorValid(edge) || d->vCenter == edge) return; @@ -721,25 +721,25 @@ void QSGAnchors::setVerticalCenter(const QSGAnchorLine &edge) d->updateVerticalAnchors(); } -void QSGAnchors::resetVerticalCenter() +void QQuickAnchors::resetVerticalCenter() { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); d->usedAnchors &= ~VCenterAnchor; d->remDepend(d->vCenter.item); - d->vCenter = QSGAnchorLine(); + d->vCenter = QQuickAnchorLine(); emit verticalCenterChanged(); d->updateVerticalAnchors(); } -QSGAnchorLine QSGAnchors::baseline() const +QQuickAnchorLine QQuickAnchors::baseline() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->baseline; } -void QSGAnchors::setBaseline(const QSGAnchorLine &edge) +void QQuickAnchors::setBaseline(const QQuickAnchorLine &edge) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (!d->checkVAnchorValid(edge) || d->baseline == edge) return; @@ -757,25 +757,25 @@ void QSGAnchors::setBaseline(const QSGAnchorLine &edge) d->updateVerticalAnchors(); } -void QSGAnchors::resetBaseline() +void QQuickAnchors::resetBaseline() { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); d->usedAnchors &= ~BaselineAnchor; d->remDepend(d->baseline.item); - d->baseline = QSGAnchorLine(); + d->baseline = QQuickAnchorLine(); emit baselineChanged(); d->updateVerticalAnchors(); } -QSGAnchorLine QSGAnchors::left() const +QQuickAnchorLine QQuickAnchors::left() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->left; } -void QSGAnchors::setLeft(const QSGAnchorLine &edge) +void QQuickAnchors::setLeft(const QQuickAnchorLine &edge) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (!d->checkHAnchorValid(edge) || d->left == edge) return; @@ -793,25 +793,25 @@ void QSGAnchors::setLeft(const QSGAnchorLine &edge) d->updateHorizontalAnchors(); } -void QSGAnchors::resetLeft() +void QQuickAnchors::resetLeft() { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); d->usedAnchors &= ~LeftAnchor; d->remDepend(d->left.item); - d->left = QSGAnchorLine(); + d->left = QQuickAnchorLine(); emit leftChanged(); d->updateHorizontalAnchors(); } -QSGAnchorLine QSGAnchors::right() const +QQuickAnchorLine QQuickAnchors::right() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->right; } -void QSGAnchors::setRight(const QSGAnchorLine &edge) +void QQuickAnchors::setRight(const QQuickAnchorLine &edge) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (!d->checkHAnchorValid(edge) || d->right == edge) return; @@ -829,25 +829,25 @@ void QSGAnchors::setRight(const QSGAnchorLine &edge) d->updateHorizontalAnchors(); } -void QSGAnchors::resetRight() +void QQuickAnchors::resetRight() { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); d->usedAnchors &= ~RightAnchor; d->remDepend(d->right.item); - d->right = QSGAnchorLine(); + d->right = QQuickAnchorLine(); emit rightChanged(); d->updateHorizontalAnchors(); } -QSGAnchorLine QSGAnchors::horizontalCenter() const +QQuickAnchorLine QQuickAnchors::horizontalCenter() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->hCenter; } -void QSGAnchors::setHorizontalCenter(const QSGAnchorLine &edge) +void QQuickAnchors::setHorizontalCenter(const QQuickAnchorLine &edge) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (!d->checkHAnchorValid(edge) || d->hCenter == edge) return; @@ -865,25 +865,25 @@ void QSGAnchors::setHorizontalCenter(const QSGAnchorLine &edge) d->updateHorizontalAnchors(); } -void QSGAnchors::resetHorizontalCenter() +void QQuickAnchors::resetHorizontalCenter() { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); d->usedAnchors &= ~HCenterAnchor; d->remDepend(d->hCenter.item); - d->hCenter = QSGAnchorLine(); + d->hCenter = QQuickAnchorLine(); emit horizontalCenterChanged(); d->updateHorizontalAnchors(); } -qreal QSGAnchors::leftMargin() const +qreal QQuickAnchors::leftMargin() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->leftMargin; } -void QSGAnchors::setLeftMargin(qreal offset) +void QQuickAnchors::setLeftMargin(qreal offset) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (d->leftMargin == offset) return; d->leftMargin = offset; @@ -894,15 +894,15 @@ void QSGAnchors::setLeftMargin(qreal offset) emit leftMarginChanged(); } -qreal QSGAnchors::rightMargin() const +qreal QQuickAnchors::rightMargin() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->rightMargin; } -void QSGAnchors::setRightMargin(qreal offset) +void QQuickAnchors::setRightMargin(qreal offset) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (d->rightMargin == offset) return; d->rightMargin = offset; @@ -913,15 +913,15 @@ void QSGAnchors::setRightMargin(qreal offset) emit rightMarginChanged(); } -qreal QSGAnchors::margins() const +qreal QQuickAnchors::margins() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->margins; } -void QSGAnchors::setMargins(qreal offset) +void QQuickAnchors::setMargins(qreal offset) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (d->margins == offset) return; //###Is it significantly faster to set them directly so we can call fillChanged only once? @@ -938,15 +938,15 @@ void QSGAnchors::setMargins(qreal offset) } -qreal QSGAnchors::horizontalCenterOffset() const +qreal QQuickAnchors::horizontalCenterOffset() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->hCenterOffset; } -void QSGAnchors::setHorizontalCenterOffset(qreal offset) +void QQuickAnchors::setHorizontalCenterOffset(qreal offset) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (d->hCenterOffset == offset) return; d->hCenterOffset = offset; @@ -957,15 +957,15 @@ void QSGAnchors::setHorizontalCenterOffset(qreal offset) emit horizontalCenterOffsetChanged(); } -qreal QSGAnchors::topMargin() const +qreal QQuickAnchors::topMargin() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->topMargin; } -void QSGAnchors::setTopMargin(qreal offset) +void QQuickAnchors::setTopMargin(qreal offset) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (d->topMargin == offset) return; d->topMargin = offset; @@ -976,15 +976,15 @@ void QSGAnchors::setTopMargin(qreal offset) emit topMarginChanged(); } -qreal QSGAnchors::bottomMargin() const +qreal QQuickAnchors::bottomMargin() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->bottomMargin; } -void QSGAnchors::setBottomMargin(qreal offset) +void QQuickAnchors::setBottomMargin(qreal offset) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (d->bottomMargin == offset) return; d->bottomMargin = offset; @@ -995,15 +995,15 @@ void QSGAnchors::setBottomMargin(qreal offset) emit bottomMarginChanged(); } -qreal QSGAnchors::verticalCenterOffset() const +qreal QQuickAnchors::verticalCenterOffset() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->vCenterOffset; } -void QSGAnchors::setVerticalCenterOffset(qreal offset) +void QQuickAnchors::setVerticalCenterOffset(qreal offset) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (d->vCenterOffset == offset) return; d->vCenterOffset = offset; @@ -1014,15 +1014,15 @@ void QSGAnchors::setVerticalCenterOffset(qreal offset) emit verticalCenterOffsetChanged(); } -qreal QSGAnchors::baselineOffset() const +qreal QQuickAnchors::baselineOffset() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->baselineOffset; } -void QSGAnchors::setBaselineOffset(qreal offset) +void QQuickAnchors::setBaselineOffset(qreal offset) { - Q_D(QSGAnchors); + Q_D(QQuickAnchors); if (d->baselineOffset == offset) return; d->baselineOffset = offset; @@ -1030,74 +1030,74 @@ void QSGAnchors::setBaselineOffset(qreal offset) emit baselineOffsetChanged(); } -QSGAnchors::Anchors QSGAnchors::usedAnchors() const +QQuickAnchors::Anchors QQuickAnchors::usedAnchors() const { - Q_D(const QSGAnchors); + Q_D(const QQuickAnchors); return d->usedAnchors; } -bool QSGAnchorsPrivate::checkHValid() const +bool QQuickAnchorsPrivate::checkHValid() const { - if (usedAnchors & QSGAnchors::LeftAnchor && - usedAnchors & QSGAnchors::RightAnchor && - usedAnchors & QSGAnchors::HCenterAnchor) { - qmlInfo(item) << QSGAnchors::tr("Cannot specify left, right, and hcenter anchors."); + if (usedAnchors & QQuickAnchors::LeftAnchor && + usedAnchors & QQuickAnchors::RightAnchor && + usedAnchors & QQuickAnchors::HCenterAnchor) { + qmlInfo(item) << QQuickAnchors::tr("Cannot specify left, right, and hcenter anchors."); return false; } return true; } -bool QSGAnchorsPrivate::checkHAnchorValid(QSGAnchorLine anchor) const +bool QQuickAnchorsPrivate::checkHAnchorValid(QQuickAnchorLine anchor) const { if (!anchor.item) { - qmlInfo(item) << QSGAnchors::tr("Cannot anchor to a null item."); + qmlInfo(item) << QQuickAnchors::tr("Cannot anchor to a null item."); return false; - } else if (anchor.anchorLine & QSGAnchorLine::Vertical_Mask) { - qmlInfo(item) << QSGAnchors::tr("Cannot anchor a horizontal edge to a vertical edge."); + } else if (anchor.anchorLine & QQuickAnchorLine::Vertical_Mask) { + qmlInfo(item) << QQuickAnchors::tr("Cannot anchor a horizontal edge to a vertical edge."); return false; } else if (anchor.item != item->parentItem() && anchor.item->parentItem() != item->parentItem()){ - qmlInfo(item) << QSGAnchors::tr("Cannot anchor to an item that isn't a parent or sibling."); + qmlInfo(item) << QQuickAnchors::tr("Cannot anchor to an item that isn't a parent or sibling."); return false; } else if (anchor.item == item) { - qmlInfo(item) << QSGAnchors::tr("Cannot anchor item to self."); + qmlInfo(item) << QQuickAnchors::tr("Cannot anchor item to self."); return false; } return true; } -bool QSGAnchorsPrivate::checkVValid() const +bool QQuickAnchorsPrivate::checkVValid() const { - if (usedAnchors & QSGAnchors::TopAnchor && - usedAnchors & QSGAnchors::BottomAnchor && - usedAnchors & QSGAnchors::VCenterAnchor) { - qmlInfo(item) << QSGAnchors::tr("Cannot specify top, bottom, and vcenter anchors."); + if (usedAnchors & QQuickAnchors::TopAnchor && + usedAnchors & QQuickAnchors::BottomAnchor && + usedAnchors & QQuickAnchors::VCenterAnchor) { + qmlInfo(item) << QQuickAnchors::tr("Cannot specify top, bottom, and vcenter anchors."); return false; - } else if (usedAnchors & QSGAnchors::BaselineAnchor && - (usedAnchors & QSGAnchors::TopAnchor || - usedAnchors & QSGAnchors::BottomAnchor || - usedAnchors & QSGAnchors::VCenterAnchor)) { - qmlInfo(item) << QSGAnchors::tr("Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors."); + } else if (usedAnchors & QQuickAnchors::BaselineAnchor && + (usedAnchors & QQuickAnchors::TopAnchor || + usedAnchors & QQuickAnchors::BottomAnchor || + usedAnchors & QQuickAnchors::VCenterAnchor)) { + qmlInfo(item) << QQuickAnchors::tr("Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors."); return false; } return true; } -bool QSGAnchorsPrivate::checkVAnchorValid(QSGAnchorLine anchor) const +bool QQuickAnchorsPrivate::checkVAnchorValid(QQuickAnchorLine anchor) const { if (!anchor.item) { - qmlInfo(item) << QSGAnchors::tr("Cannot anchor to a null item."); + qmlInfo(item) << QQuickAnchors::tr("Cannot anchor to a null item."); return false; - } else if (anchor.anchorLine & QSGAnchorLine::Horizontal_Mask) { - qmlInfo(item) << QSGAnchors::tr("Cannot anchor a vertical edge to a horizontal edge."); + } else if (anchor.anchorLine & QQuickAnchorLine::Horizontal_Mask) { + qmlInfo(item) << QQuickAnchors::tr("Cannot anchor a vertical edge to a horizontal edge."); return false; } else if (anchor.item != item->parentItem() && anchor.item->parentItem() != item->parentItem()){ - qmlInfo(item) << QSGAnchors::tr("Cannot anchor to an item that isn't a parent or sibling."); + qmlInfo(item) << QQuickAnchors::tr("Cannot anchor to an item that isn't a parent or sibling."); return false; } else if (anchor.item == item){ - qmlInfo(item) << QSGAnchors::tr("Cannot anchor item to self."); + qmlInfo(item) << QQuickAnchors::tr("Cannot anchor item to self."); return false; } @@ -1106,5 +1106,5 @@ bool QSGAnchorsPrivate::checkVAnchorValid(QSGAnchorLine anchor) const QT_END_NAMESPACE -#include <moc_qsganchors_p.cpp> +#include <moc_qquickanchors_p.cpp> diff --git a/src/declarative/items/qsganchors_p.h b/src/declarative/items/qquickanchors_p.h index a80c279d90..5c66c2e17d 100644 --- a/src/declarative/items/qsganchors_p.h +++ b/src/declarative/items/qquickanchors_p.h @@ -40,8 +40,8 @@ ** ****************************************************************************/ -#ifndef QSGANCHORS_P_H -#define QSGANCHORS_P_H +#ifndef QQUICKANCHORS_P_H +#define QQUICKANCHORS_P_H #include <qdeclarative.h> @@ -55,20 +55,20 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGItem; -class QSGAnchorsPrivate; -class QSGAnchorLine; -class Q_DECLARATIVE_PRIVATE_EXPORT QSGAnchors : public QObject +class QQuickItem; +class QQuickAnchorsPrivate; +class QQuickAnchorLine; +class Q_DECLARATIVE_PRIVATE_EXPORT QQuickAnchors : public QObject { Q_OBJECT - Q_PROPERTY(QSGAnchorLine left READ left WRITE setLeft RESET resetLeft NOTIFY leftChanged) - Q_PROPERTY(QSGAnchorLine right READ right WRITE setRight RESET resetRight NOTIFY rightChanged) - Q_PROPERTY(QSGAnchorLine horizontalCenter READ horizontalCenter WRITE setHorizontalCenter RESET resetHorizontalCenter NOTIFY horizontalCenterChanged) - Q_PROPERTY(QSGAnchorLine top READ top WRITE setTop RESET resetTop NOTIFY topChanged) - Q_PROPERTY(QSGAnchorLine bottom READ bottom WRITE setBottom RESET resetBottom NOTIFY bottomChanged) - Q_PROPERTY(QSGAnchorLine verticalCenter READ verticalCenter WRITE setVerticalCenter RESET resetVerticalCenter NOTIFY verticalCenterChanged) - Q_PROPERTY(QSGAnchorLine baseline READ baseline WRITE setBaseline RESET resetBaseline NOTIFY baselineChanged) + Q_PROPERTY(QQuickAnchorLine left READ left WRITE setLeft RESET resetLeft NOTIFY leftChanged) + Q_PROPERTY(QQuickAnchorLine right READ right WRITE setRight RESET resetRight NOTIFY rightChanged) + Q_PROPERTY(QQuickAnchorLine horizontalCenter READ horizontalCenter WRITE setHorizontalCenter RESET resetHorizontalCenter NOTIFY horizontalCenterChanged) + Q_PROPERTY(QQuickAnchorLine top READ top WRITE setTop RESET resetTop NOTIFY topChanged) + Q_PROPERTY(QQuickAnchorLine bottom READ bottom WRITE setBottom RESET resetBottom NOTIFY bottomChanged) + Q_PROPERTY(QQuickAnchorLine verticalCenter READ verticalCenter WRITE setVerticalCenter RESET resetVerticalCenter NOTIFY verticalCenterChanged) + Q_PROPERTY(QQuickAnchorLine baseline READ baseline WRITE setBaseline RESET resetBaseline NOTIFY baselineChanged) Q_PROPERTY(qreal margins READ margins WRITE setMargins NOTIFY marginsChanged) Q_PROPERTY(qreal leftMargin READ leftMargin WRITE setLeftMargin NOTIFY leftMarginChanged) Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin NOTIFY rightMarginChanged) @@ -77,13 +77,13 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QSGAnchors : public QObject Q_PROPERTY(qreal bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY bottomMarginChanged) Q_PROPERTY(qreal verticalCenterOffset READ verticalCenterOffset WRITE setVerticalCenterOffset NOTIFY verticalCenterOffsetChanged) Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged) - Q_PROPERTY(QSGItem *fill READ fill WRITE setFill RESET resetFill NOTIFY fillChanged) - Q_PROPERTY(QSGItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged) + Q_PROPERTY(QQuickItem *fill READ fill WRITE setFill RESET resetFill NOTIFY fillChanged) + Q_PROPERTY(QQuickItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged) Q_PROPERTY(bool mirrored READ mirrored NOTIFY mirroredChanged) public: - QSGAnchors(QSGItem *item, QObject *parent=0); - virtual ~QSGAnchors(); + QQuickAnchors(QQuickItem *item, QObject *parent=0); + virtual ~QQuickAnchors(); enum Anchor { LeftAnchor = 0x01, @@ -98,32 +98,32 @@ public: }; Q_DECLARE_FLAGS(Anchors, Anchor) - QSGAnchorLine left() const; - void setLeft(const QSGAnchorLine &edge); + QQuickAnchorLine left() const; + void setLeft(const QQuickAnchorLine &edge); void resetLeft(); - QSGAnchorLine right() const; - void setRight(const QSGAnchorLine &edge); + QQuickAnchorLine right() const; + void setRight(const QQuickAnchorLine &edge); void resetRight(); - QSGAnchorLine horizontalCenter() const; - void setHorizontalCenter(const QSGAnchorLine &edge); + QQuickAnchorLine horizontalCenter() const; + void setHorizontalCenter(const QQuickAnchorLine &edge); void resetHorizontalCenter(); - QSGAnchorLine top() const; - void setTop(const QSGAnchorLine &edge); + QQuickAnchorLine top() const; + void setTop(const QQuickAnchorLine &edge); void resetTop(); - QSGAnchorLine bottom() const; - void setBottom(const QSGAnchorLine &edge); + QQuickAnchorLine bottom() const; + void setBottom(const QQuickAnchorLine &edge); void resetBottom(); - QSGAnchorLine verticalCenter() const; - void setVerticalCenter(const QSGAnchorLine &edge); + QQuickAnchorLine verticalCenter() const; + void setVerticalCenter(const QQuickAnchorLine &edge); void resetVerticalCenter(); - QSGAnchorLine baseline() const; - void setBaseline(const QSGAnchorLine &edge); + QQuickAnchorLine baseline() const; + void setBaseline(const QQuickAnchorLine &edge); void resetBaseline(); qreal leftMargin() const; @@ -150,12 +150,12 @@ public: qreal baselineOffset() const; void setBaselineOffset(qreal); - QSGItem *fill() const; - void setFill(QSGItem *); + QQuickItem *fill() const; + void setFill(QQuickItem *); void resetFill(); - QSGItem *centerIn() const; - void setCenterIn(QSGItem *); + QQuickItem *centerIn() const; + void setCenterIn(QQuickItem *); void resetCenterIn(); Anchors usedAnchors() const; @@ -186,16 +186,16 @@ Q_SIGNALS: void mirroredChanged(); private: - friend class QSGItemPrivate; - Q_DISABLE_COPY(QSGAnchors) - Q_DECLARE_PRIVATE(QSGAnchors) + friend class QQuickItemPrivate; + Q_DISABLE_COPY(QQuickAnchors) + Q_DECLARE_PRIVATE(QQuickAnchors) }; -Q_DECLARE_OPERATORS_FOR_FLAGS(QSGAnchors::Anchors) +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickAnchors::Anchors) QT_END_NAMESPACE -QML_DECLARE_TYPE(QSGAnchors) +QML_DECLARE_TYPE(QQuickAnchors) QT_END_HEADER -#endif // QSGANCHORS_P_H +#endif // QQUICKANCHORS_P_H diff --git a/src/declarative/items/qsganchors_p_p.h b/src/declarative/items/qquickanchors_p_p.h index 0417761314..eae7981617 100644 --- a/src/declarative/items/qsganchors_p_p.h +++ b/src/declarative/items/qquickanchors_p_p.h @@ -40,8 +40,8 @@ ** ****************************************************************************/ -#ifndef QSGANCHORS_P_P_H -#define QSGANCHORS_P_P_H +#ifndef QQUICKANCHORS_P_P_H +#define QQUICKANCHORS_P_P_H // // W A R N I N G @@ -54,16 +54,16 @@ // We mean it. // -#include "qsganchors_p.h" -#include "qsgitemchangelistener_p.h" +#include "qquickanchors_p.h" +#include "qquickitemchangelistener_p.h" #include <private/qobject_p.h> QT_BEGIN_NAMESPACE -class QSGAnchorLine +class QQuickAnchorLine { public: - QSGAnchorLine() : item(0), anchorLine(Invalid) {} + QQuickAnchorLine() : item(0), anchorLine(Invalid) {} enum AnchorLine { Invalid = 0x0, @@ -78,20 +78,20 @@ public: Vertical_Mask = Top | Bottom | VCenter | Baseline }; - QSGItem *item; + QQuickItem *item; AnchorLine anchorLine; }; -inline bool operator==(const QSGAnchorLine& a, const QSGAnchorLine& b) +inline bool operator==(const QQuickAnchorLine& a, const QQuickAnchorLine& b) { return a.item == b.item && a.anchorLine == b.anchorLine; } -class QSGAnchorsPrivate : public QObjectPrivate, public QSGItemChangeListener +class QQuickAnchorsPrivate : public QObjectPrivate, public QQuickItemChangeListener { - Q_DECLARE_PUBLIC(QSGAnchors) + Q_DECLARE_PUBLIC(QQuickAnchors) public: - QSGAnchorsPrivate(QSGItem *i) + QQuickAnchorsPrivate(QQuickItem *i) : componentComplete(true), updatingMe(false), updatingHorizontalAnchor(0), updatingVerticalAnchor(0), updatingFill(0), updatingCenterIn(0), item(i), usedAnchors(0), fill(0), centerIn(0), leftMargin(0), rightMargin(0), topMargin(0), bottomMargin(0), @@ -99,10 +99,10 @@ public: { } - void clearItem(QSGItem *); + void clearItem(QQuickItem *); - void addDepend(QSGItem *); - void remDepend(QSGItem *); + void addDepend(QQuickItem *); + void remDepend(QQuickItem *); bool isItemComplete() const; bool componentComplete:1; @@ -122,15 +122,15 @@ public: void updateOnComplete(); void updateMe(); - // QSGItemGeometryListener interface - void itemGeometryChanged(QSGItem *, const QRectF &, const QRectF &); - QSGAnchorsPrivate *anchorPrivate() { return this; } + // QQuickItemGeometryListener interface + void itemGeometryChanged(QQuickItem *, const QRectF &, const QRectF &); + QQuickAnchorsPrivate *anchorPrivate() { return this; } bool checkHValid() const; bool checkVValid() const; - bool checkHAnchorValid(QSGAnchorLine anchor) const; - bool checkVAnchorValid(QSGAnchorLine anchor) const; - bool calcStretch(const QSGAnchorLine &edge1, const QSGAnchorLine &edge2, qreal offset1, qreal offset2, QSGAnchorLine::AnchorLine line, qreal &stretch); + bool checkHAnchorValid(QQuickAnchorLine anchor) const; + bool checkVAnchorValid(QQuickAnchorLine anchor) const; + bool calcStretch(const QQuickAnchorLine &edge1, const QQuickAnchorLine &edge2, qreal offset1, qreal offset2, QQuickAnchorLine::AnchorLine line, qreal &stretch); bool isMirrored() const; void updateHorizontalAnchors(); @@ -138,19 +138,19 @@ public: void fillChanged(); void centerInChanged(); - QSGItem *item; - QSGAnchors::Anchors usedAnchors; + QQuickItem *item; + QQuickAnchors::Anchors usedAnchors; - QSGItem *fill; - QSGItem *centerIn; + QQuickItem *fill; + QQuickItem *centerIn; - QSGAnchorLine left; - QSGAnchorLine right; - QSGAnchorLine top; - QSGAnchorLine bottom; - QSGAnchorLine vCenter; - QSGAnchorLine hCenter; - QSGAnchorLine baseline; + QQuickAnchorLine left; + QQuickAnchorLine right; + QQuickAnchorLine top; + QQuickAnchorLine bottom; + QQuickAnchorLine vCenter; + QQuickAnchorLine hCenter; + QQuickAnchorLine baseline; qreal leftMargin; qreal rightMargin; @@ -161,13 +161,13 @@ public: qreal hCenterOffset; qreal baselineOffset; - static inline QSGAnchorsPrivate *get(QSGAnchors *o) { - return static_cast<QSGAnchorsPrivate *>(QObjectPrivate::get(o)); + static inline QQuickAnchorsPrivate *get(QQuickAnchors *o) { + return static_cast<QQuickAnchorsPrivate *>(QObjectPrivate::get(o)); } }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QSGAnchorLine) +Q_DECLARE_METATYPE(QQuickAnchorLine) #endif diff --git a/src/declarative/items/qsganimatedimage.cpp b/src/declarative/items/qquickanimatedimage.cpp index 93e0284417..d4b08dd4f4 100644 --- a/src/declarative/items/qsganimatedimage.cpp +++ b/src/declarative/items/qquickanimatedimage.cpp @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#include "qsganimatedimage_p.h" -#include "qsganimatedimage_p_p.h" +#include "qquickanimatedimage_p.h" +#include "qquickanimatedimage_p_p.h" #ifndef QT_NO_MOVIE @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE /*! - \qmlclass AnimatedImage QSGAnimatedImage + \qmlclass AnimatedImage QQuickAnimatedImage \inqmlmodule QtQuick 2 \inherits Image \ingroup basic-visual-elements @@ -122,14 +122,14 @@ QT_BEGIN_NAMESPACE The default value is false. */ -QSGAnimatedImage::QSGAnimatedImage(QSGItem *parent) - : QSGImage(*(new QSGAnimatedImagePrivate), parent) +QQuickAnimatedImage::QQuickAnimatedImage(QQuickItem *parent) + : QQuickImage(*(new QQuickAnimatedImagePrivate), parent) { } -QSGAnimatedImage::~QSGAnimatedImage() +QQuickAnimatedImage::~QQuickAnimatedImage() { - Q_D(QSGAnimatedImage); + Q_D(QQuickAnimatedImage); delete d->_movie; } @@ -141,17 +141,17 @@ QSGAnimatedImage::~QSGAnimatedImage() the animation. */ -bool QSGAnimatedImage::isPaused() const +bool QQuickAnimatedImage::isPaused() const { - Q_D(const QSGAnimatedImage); + Q_D(const QQuickAnimatedImage); if (!d->_movie) return false; return d->_movie->state()==QMovie::Paused; } -void QSGAnimatedImage::setPaused(bool pause) +void QQuickAnimatedImage::setPaused(bool pause) { - Q_D(QSGAnimatedImage); + Q_D(QQuickAnimatedImage); if (pause == d->paused) return; d->paused = pause; @@ -168,17 +168,17 @@ void QSGAnimatedImage::setPaused(bool pause) will start playing immediately. */ -bool QSGAnimatedImage::isPlaying() const +bool QQuickAnimatedImage::isPlaying() const { - Q_D(const QSGAnimatedImage); + Q_D(const QQuickAnimatedImage); if (!d->_movie) return false; return d->_movie->state()!=QMovie::NotRunning; } -void QSGAnimatedImage::setPlaying(bool play) +void QQuickAnimatedImage::setPlaying(bool play) { - Q_D(QSGAnimatedImage); + Q_D(QQuickAnimatedImage); if (play == d->playing) return; d->playing = play; @@ -200,17 +200,17 @@ void QSGAnimatedImage::setPlaying(bool play) frameCount is the number of frames in the animation. For some animation formats, frameCount is unknown and has a value of zero. */ -int QSGAnimatedImage::currentFrame() const +int QQuickAnimatedImage::currentFrame() const { - Q_D(const QSGAnimatedImage); + Q_D(const QQuickAnimatedImage); if (!d->_movie) return d->preset_currentframe; return d->_movie->currentFrameNumber(); } -void QSGAnimatedImage::setCurrentFrame(int frame) +void QQuickAnimatedImage::setCurrentFrame(int frame) { - Q_D(QSGAnimatedImage); + Q_D(QQuickAnimatedImage); if (!d->_movie) { d->preset_currentframe = frame; return; @@ -218,17 +218,17 @@ void QSGAnimatedImage::setCurrentFrame(int frame) d->_movie->jumpToFrame(frame); } -int QSGAnimatedImage::frameCount() const +int QQuickAnimatedImage::frameCount() const { - Q_D(const QSGAnimatedImage); + Q_D(const QQuickAnimatedImage); if (!d->_movie) return 0; return d->_movie->frameCount(); } -void QSGAnimatedImage::setSource(const QUrl &url) +void QQuickAnimatedImage::setSource(const QUrl &url) { - Q_D(QSGAnimatedImage); + Q_D(QQuickAnimatedImage); if (url == d->url) return; @@ -247,11 +247,11 @@ void QSGAnimatedImage::setSource(const QUrl &url) load(); } -void QSGAnimatedImage::load() +void QQuickAnimatedImage::load() { - Q_D(QSGAnimatedImage); + Q_D(QQuickAnimatedImage); - QSGImageBase::Status oldStatus = d->status; + QQuickImageBase::Status oldStatus = d->status; qreal oldProgress = d->progress; if (d->url.isEmpty()) { @@ -314,9 +314,9 @@ void QSGAnimatedImage::load() #define ANIMATEDIMAGE_MAXIMUM_REDIRECT_RECURSION 16 -void QSGAnimatedImage::movieRequestFinished() +void QQuickAnimatedImage::movieRequestFinished() { - Q_D(QSGAnimatedImage); + Q_D(QQuickAnimatedImage); d->redirectCount++; if (d->redirectCount < ANIMATEDIMAGE_MAXIMUM_REDIRECT_RECURSION) { @@ -360,16 +360,16 @@ void QSGAnimatedImage::movieRequestFinished() emit statusChanged(d->status); } -void QSGAnimatedImage::movieUpdate() +void QQuickAnimatedImage::movieUpdate() { - Q_D(QSGAnimatedImage); + Q_D(QQuickAnimatedImage); d->setPixmap(d->_movie->currentPixmap()); emit frameChanged(); } -void QSGAnimatedImage::playingStatusChanged() +void QQuickAnimatedImage::playingStatusChanged() { - Q_D(QSGAnimatedImage); + Q_D(QQuickAnimatedImage); if ((d->_movie->state() != QMovie::NotRunning) != d->playing) { d->playing = (d->_movie->state() != QMovie::NotRunning); emit playingChanged(); @@ -380,10 +380,10 @@ void QSGAnimatedImage::playingStatusChanged() } } -void QSGAnimatedImage::componentComplete() +void QQuickAnimatedImage::componentComplete() { - Q_D(QSGAnimatedImage); - QSGItem::componentComplete(); // NOT QSGImage + Q_D(QQuickAnimatedImage); + QQuickItem::componentComplete(); // NOT QQuickImage if (d->url.isValid()) load(); if (!d->reply) { diff --git a/src/declarative/items/qsganimatedimage_p.h b/src/declarative/items/qquickanimatedimage_p.h index efbe01d802..ae96e4cc15 100644 --- a/src/declarative/items/qsganimatedimage_p.h +++ b/src/declarative/items/qquickanimatedimage_p.h @@ -40,10 +40,10 @@ ** ****************************************************************************/ -#ifndef QSGANIMATEDIMAGE_P_H -#define QSGANIMATEDIMAGE_P_H +#ifndef QQUICKANIMATEDIMAGE_P_H +#define QQUICKANIMATEDIMAGE_P_H -#include "qsgimage_p.h" +#include "qquickimage_p.h" #ifndef QT_NO_MOVIE @@ -54,9 +54,9 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QMovie; -class QSGAnimatedImagePrivate; +class QQuickAnimatedImagePrivate; -class Q_AUTOTEST_EXPORT QSGAnimatedImage : public QSGImage +class Q_AUTOTEST_EXPORT QQuickAnimatedImage : public QQuickImage { Q_OBJECT @@ -69,8 +69,8 @@ class Q_AUTOTEST_EXPORT QSGAnimatedImage : public QSGImage Q_PROPERTY(QSize sourceSize READ sourceSize NOTIFY sourceSizeChanged) public: - QSGAnimatedImage(QSGItem *parent=0); - ~QSGAnimatedImage(); + QQuickAnimatedImage(QQuickItem *parent=0); + ~QQuickAnimatedImage(); bool isPlaying() const; void setPlaying(bool play); @@ -83,7 +83,7 @@ public: int frameCount() const; - // Extends QSGImage's src property*/ + // Extends QQuickImage's src property*/ virtual void setSource(const QUrl&); Q_SIGNALS: @@ -102,16 +102,16 @@ protected: void componentComplete(); private: - Q_DISABLE_COPY(QSGAnimatedImage) - Q_DECLARE_PRIVATE(QSGAnimatedImage) + Q_DISABLE_COPY(QQuickAnimatedImage) + Q_DECLARE_PRIVATE(QQuickAnimatedImage) }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QSGAnimatedImage) +QML_DECLARE_TYPE(QQuickAnimatedImage) QT_END_HEADER #endif // QT_NO_MOVIE -#endif // QSGANIMATEDIMAGE_P_H +#endif // QQUICKANIMATEDIMAGE_P_H diff --git a/src/declarative/items/qsganimatedimage_p_p.h b/src/declarative/items/qquickanimatedimage_p_p.h index f216df2502..0d5dd4a3b7 100644 --- a/src/declarative/items/qsganimatedimage_p_p.h +++ b/src/declarative/items/qquickanimatedimage_p_p.h @@ -40,8 +40,8 @@ ** ****************************************************************************/ -#ifndef QSGANIMATEDIMAGE_P_P_H -#define QSGANIMATEDIMAGE_P_P_H +#ifndef QQUICKANIMATEDIMAGE_P_P_H +#define QQUICKANIMATEDIMAGE_P_P_H // // W A R N I N G @@ -54,7 +54,7 @@ // We mean it. // -#include "qsgimage_p_p.h" +#include "qquickimage_p_p.h" #ifndef QT_NO_MOVIE @@ -63,12 +63,12 @@ QT_BEGIN_NAMESPACE class QMovie; class QNetworkReply; -class QSGAnimatedImagePrivate : public QSGImagePrivate +class QQuickAnimatedImagePrivate : public QQuickImagePrivate { - Q_DECLARE_PUBLIC(QSGAnimatedImage) + Q_DECLARE_PUBLIC(QQuickAnimatedImage) public: - QSGAnimatedImagePrivate() + QQuickAnimatedImagePrivate() : playing(true), paused(false), preset_currentframe(0), _movie(0), reply(0), redirectCount(0) { } @@ -85,4 +85,4 @@ QT_END_NAMESPACE #endif // QT_NO_MOVIE -#endif // QSGANIMATEDIMAGE_P_P_H +#endif // QQUICKANIMATEDIMAGE_P_P_H diff --git a/src/declarative/items/qsganimation.cpp b/src/declarative/items/qquickanimation.cpp index 81c83913c1..55eb4e2e13 100644 --- a/src/declarative/items/qsganimation.cpp +++ b/src/declarative/items/qquickanimation.cpp @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include "qsganimation_p.h" -#include "qsganimation_p_p.h" -#include "qsgstateoperations_p.h" +#include "qquickanimation_p.h" +#include "qquickanimation_p_p.h" +#include "qquickstateoperations_p.h" #include <private/qdeclarativeproperty_p.h> #include <private/qdeclarativepath_p.h> @@ -54,10 +54,10 @@ QT_BEGIN_NAMESPACE -QSGParentAnimation::QSGParentAnimation(QObject *parent) - : QDeclarativeAnimationGroup(*(new QSGParentAnimationPrivate), parent) +QQuickParentAnimation::QQuickParentAnimation(QObject *parent) + : QDeclarativeAnimationGroup(*(new QQuickParentAnimationPrivate), parent) { - Q_D(QSGParentAnimation); + Q_D(QQuickParentAnimation); d->topLevelGroup = new QSequentialAnimationGroup; QDeclarative_setParent_noEvent(d->topLevelGroup, this); @@ -74,19 +74,19 @@ QSGParentAnimation::QSGParentAnimation(QObject *parent) d->topLevelGroup->addAnimation(d->endAction); } -QSGParentAnimation::~QSGParentAnimation() +QQuickParentAnimation::~QQuickParentAnimation() { } -QSGItem *QSGParentAnimation::target() const +QQuickItem *QQuickParentAnimation::target() const { - Q_D(const QSGParentAnimation); + Q_D(const QQuickParentAnimation); return d->target; } -void QSGParentAnimation::setTarget(QSGItem *target) +void QQuickParentAnimation::setTarget(QQuickItem *target) { - Q_D(QSGParentAnimation); + Q_D(QQuickParentAnimation); if (target == d->target) return; @@ -94,15 +94,15 @@ void QSGParentAnimation::setTarget(QSGItem *target) emit targetChanged(); } -QSGItem *QSGParentAnimation::newParent() const +QQuickItem *QQuickParentAnimation::newParent() const { - Q_D(const QSGParentAnimation); + Q_D(const QQuickParentAnimation); return d->newParent; } -void QSGParentAnimation::setNewParent(QSGItem *newParent) +void QQuickParentAnimation::setNewParent(QQuickItem *newParent) { - Q_D(QSGParentAnimation); + Q_D(QQuickParentAnimation); if (newParent == d->newParent) return; @@ -110,15 +110,15 @@ void QSGParentAnimation::setNewParent(QSGItem *newParent) emit newParentChanged(); } -QSGItem *QSGParentAnimation::via() const +QQuickItem *QQuickParentAnimation::via() const { - Q_D(const QSGParentAnimation); + Q_D(const QQuickParentAnimation); return d->via; } -void QSGParentAnimation::setVia(QSGItem *via) +void QQuickParentAnimation::setVia(QQuickItem *via) { - Q_D(QSGParentAnimation); + Q_D(QQuickParentAnimation); if (via == d->via) return; @@ -126,47 +126,47 @@ void QSGParentAnimation::setVia(QSGItem *via) emit viaChanged(); } -//### mirrors same-named function in QSGItem -QPointF QSGParentAnimationPrivate::computeTransformOrigin(QSGItem::TransformOrigin origin, qreal width, qreal height) const +//### mirrors same-named function in QQuickItem +QPointF QQuickParentAnimationPrivate::computeTransformOrigin(QQuickItem::TransformOrigin origin, qreal width, qreal height) const { switch (origin) { default: - case QSGItem::TopLeft: + case QQuickItem::TopLeft: return QPointF(0, 0); - case QSGItem::Top: + case QQuickItem::Top: return QPointF(width / 2., 0); - case QSGItem::TopRight: + case QQuickItem::TopRight: return QPointF(width, 0); - case QSGItem::Left: + case QQuickItem::Left: return QPointF(0, height / 2.); - case QSGItem::Center: + case QQuickItem::Center: return QPointF(width / 2., height / 2.); - case QSGItem::Right: + case QQuickItem::Right: return QPointF(width, height / 2.); - case QSGItem::BottomLeft: + case QQuickItem::BottomLeft: return QPointF(0, height); - case QSGItem::Bottom: + case QQuickItem::Bottom: return QPointF(width / 2., height); - case QSGItem::BottomRight: + case QQuickItem::BottomRight: return QPointF(width, height); } } -void QSGParentAnimation::transition(QDeclarativeStateActions &actions, +void QQuickParentAnimation::transition(QDeclarativeStateActions &actions, QDeclarativeProperties &modified, TransitionDirection direction) { - Q_D(QSGParentAnimation); + Q_D(QQuickParentAnimation); - struct QSGParentAnimationData : public QAbstractAnimationAction + struct QQuickParentAnimationData : public QAbstractAnimationAction { - QSGParentAnimationData() {} - ~QSGParentAnimationData() { qDeleteAll(pc); } + QQuickParentAnimationData() {} + ~QQuickParentAnimationData() { qDeleteAll(pc); } QDeclarativeStateActions actions; //### reverse should probably apply on a per-action basis bool reverse; - QList<QSGParentChange *> pc; + QList<QQuickParentChange *> pc; virtual void doAction() { for (int ii = 0; ii < actions.count(); ++ii) { @@ -179,14 +179,14 @@ void QSGParentAnimation::transition(QDeclarativeStateActions &actions, } }; - QSGParentAnimationData *data = new QSGParentAnimationData; - QSGParentAnimationData *viaData = new QSGParentAnimationData; + QQuickParentAnimationData *data = new QQuickParentAnimationData; + QQuickParentAnimationData *viaData = new QQuickParentAnimationData; bool hasExplicit = false; if (d->target && d->newParent) { data->reverse = false; QDeclarativeAction myAction; - QSGParentChange *pc = new QSGParentChange; + QQuickParentChange *pc = new QQuickParentChange; pc->setObject(d->target); pc->setParent(d->newParent); myAction.event = pc; @@ -196,7 +196,7 @@ void QSGParentAnimation::transition(QDeclarativeStateActions &actions, if (d->via) { viaData->reverse = false; QDeclarativeAction myVAction; - QSGParentChange *vpc = new QSGParentChange; + QQuickParentChange *vpc = new QQuickParentChange; vpc->setObject(d->target); vpc->setParent(d->via); myVAction.event = vpc; @@ -211,17 +211,17 @@ void QSGParentAnimation::transition(QDeclarativeStateActions &actions, for (int i = 0; i < actions.size(); ++i) { QDeclarativeAction &action = actions[i]; if (action.event && action.event->typeName() == QLatin1String("ParentChange") - && (!d->target || static_cast<QSGParentChange*>(action.event)->object() == d->target)) { + && (!d->target || static_cast<QQuickParentChange*>(action.event)->object() == d->target)) { - QSGParentChange *pc = static_cast<QSGParentChange*>(action.event); + QQuickParentChange *pc = static_cast<QQuickParentChange*>(action.event); QDeclarativeAction myAction = action; data->reverse = action.reverseEvent; //### this logic differs from PropertyAnimation // (probably a result of modified vs. done) if (d->newParent) { - QSGParentChange *epc = new QSGParentChange; - epc->setObject(static_cast<QSGParentChange*>(action.event)->object()); + QQuickParentChange *epc = new QQuickParentChange; + epc->setObject(static_cast<QQuickParentChange*>(action.event)->object()); epc->setParent(d->newParent); myAction.event = epc; data->pc << epc; @@ -235,7 +235,7 @@ void QSGParentAnimation::transition(QDeclarativeStateActions &actions, if (d->via) { viaData->reverse = false; QDeclarativeAction myAction; - QSGParentChange *vpc = new QSGParentChange; + QQuickParentChange *vpc = new QQuickParentChange; vpc->setObject(pc->object()); vpc->setParent(d->via); myAction.event = vpc; @@ -246,14 +246,14 @@ void QSGParentAnimation::transition(QDeclarativeStateActions &actions, 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; - QSGItem *target = pc->object(); - QSGItem *targetParent = action.reverseEvent ? pc->originalParent() : pc->parent(); + QQuickItem *target = pc->object(); + QQuickItem *targetParent = action.reverseEvent ? pc->originalParent() : pc->parent(); - //### this mirrors the logic in QSGParentChange. + //### this mirrors the logic in QQuickParentChange. bool ok; const QTransform &transform = targetParent->itemTransform(d->via, &ok); if (transform.type() >= QTransform::TxShear || !ok) { - qmlInfo(this) << QSGParentAnimation::tr("Unable to preserve appearance under complex transform"); + qmlInfo(this) << QQuickParentAnimation::tr("Unable to preserve appearance under complex transform"); ok = false; } @@ -264,21 +264,21 @@ void QSGParentAnimation::transition(QDeclarativeStateActions &actions, if (transform.m11() == transform.m22()) scale = transform.m11(); else { - qmlInfo(this) << QSGParentAnimation::tr("Unable to preserve appearance under non-uniform scale"); + qmlInfo(this) << QQuickParentAnimation::tr("Unable to preserve appearance under non-uniform scale"); ok = false; } } else if (ok && isRotate) { if (transform.m11() == transform.m22()) scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12()); else { - qmlInfo(this) << QSGParentAnimation::tr("Unable to preserve appearance under non-uniform scale"); + qmlInfo(this) << QQuickParentAnimation::tr("Unable to preserve appearance under non-uniform scale"); ok = false; } if (scale != 0) rotation = atan2(transform.m12()/scale, transform.m11()/scale) * 180/M_PI; else { - qmlInfo(this) << QSGParentAnimation::tr("Unable to preserve appearance under scale of 0"); + qmlInfo(this) << QQuickParentAnimation::tr("Unable to preserve appearance under scale of 0"); ok = false; } } @@ -286,7 +286,7 @@ void QSGParentAnimation::transition(QDeclarativeStateActions &actions, const QPointF &point = transform.map(QPointF(xAction.toValue.toReal(),yAction.toValue.toReal())); qreal x = point.x(); qreal y = point.y(); - if (ok && target->transformOrigin() != QSGItem::TopLeft) { + if (ok && target->transformOrigin() != QQuickItem::TopLeft) { qreal w = target->width(); qreal h = target->height(); if (pc->widthIsSet() && i < actions.size() - 1) @@ -341,65 +341,65 @@ void QSGParentAnimation::transition(QDeclarativeStateActions &actions, } -QAbstractAnimation *QSGParentAnimation::qtAnimation() +QAbstractAnimation *QQuickParentAnimation::qtAnimation() { - Q_D(QSGParentAnimation); + Q_D(QQuickParentAnimation); return d->topLevelGroup; } -QSGAnchorAnimation::QSGAnchorAnimation(QObject *parent) -: QDeclarativeAbstractAnimation(*(new QSGAnchorAnimationPrivate), parent) +QQuickAnchorAnimation::QQuickAnchorAnimation(QObject *parent) +: QDeclarativeAbstractAnimation(*(new QQuickAnchorAnimationPrivate), parent) { - Q_D(QSGAnchorAnimation); + Q_D(QQuickAnchorAnimation); d->va = new QDeclarativeBulkValueAnimator; QDeclarative_setParent_noEvent(d->va, this); } -QSGAnchorAnimation::~QSGAnchorAnimation() +QQuickAnchorAnimation::~QQuickAnchorAnimation() { } -QAbstractAnimation *QSGAnchorAnimation::qtAnimation() +QAbstractAnimation *QQuickAnchorAnimation::qtAnimation() { - Q_D(QSGAnchorAnimation); + Q_D(QQuickAnchorAnimation); return d->va; } -QDeclarativeListProperty<QSGItem> QSGAnchorAnimation::targets() +QDeclarativeListProperty<QQuickItem> QQuickAnchorAnimation::targets() { - Q_D(QSGAnchorAnimation); - return QDeclarativeListProperty<QSGItem>(this, d->targets); + Q_D(QQuickAnchorAnimation); + return QDeclarativeListProperty<QQuickItem>(this, d->targets); } -int QSGAnchorAnimation::duration() const +int QQuickAnchorAnimation::duration() const { - Q_D(const QSGAnchorAnimation); + Q_D(const QQuickAnchorAnimation); return d->va->duration(); } -void QSGAnchorAnimation::setDuration(int duration) +void QQuickAnchorAnimation::setDuration(int duration) { if (duration < 0) { qmlInfo(this) << tr("Cannot set a duration of < 0"); return; } - Q_D(QSGAnchorAnimation); + Q_D(QQuickAnchorAnimation); if (d->va->duration() == duration) return; d->va->setDuration(duration); emit durationChanged(duration); } -QEasingCurve QSGAnchorAnimation::easing() const +QEasingCurve QQuickAnchorAnimation::easing() const { - Q_D(const QSGAnchorAnimation); + Q_D(const QQuickAnchorAnimation); return d->va->easingCurve(); } -void QSGAnchorAnimation::setEasing(const QEasingCurve &e) +void QQuickAnchorAnimation::setEasing(const QEasingCurve &e) { - Q_D(QSGAnchorAnimation); + Q_D(QQuickAnchorAnimation); if (d->va->easingCurve() == e) return; @@ -407,12 +407,12 @@ void QSGAnchorAnimation::setEasing(const QEasingCurve &e) emit easingChanged(e); } -void QSGAnchorAnimation::transition(QDeclarativeStateActions &actions, +void QQuickAnchorAnimation::transition(QDeclarativeStateActions &actions, QDeclarativeProperties &modified, TransitionDirection direction) { Q_UNUSED(modified); - Q_D(QSGAnchorAnimation); + Q_D(QQuickAnchorAnimation); QDeclarativeAnimationPropertyUpdater *data = new QDeclarativeAnimationPropertyUpdater; data->interpolatorType = QMetaType::QReal; data->interpolator = d->interpolator; @@ -424,8 +424,8 @@ void QSGAnchorAnimation::transition(QDeclarativeStateActions &actions, for (int ii = 0; ii < actions.count(); ++ii) { QDeclarativeAction &action = actions[ii]; if (action.event && action.event->typeName() == QLatin1String("AnchorChanges") - && (d->targets.isEmpty() || d->targets.contains(static_cast<QSGAnchorChanges*>(action.event)->object()))) { - data->actions << static_cast<QSGAnchorChanges*>(action.event)->additionalActions(); + && (d->targets.isEmpty() || d->targets.contains(static_cast<QQuickAnchorChanges*>(action.event)->object()))) { + data->actions << static_cast<QQuickAnchorChanges*>(action.event)->additionalActions(); } } @@ -442,47 +442,47 @@ void QSGAnchorAnimation::transition(QDeclarativeStateActions &actions, } } -QSGPathAnimation::QSGPathAnimation(QObject *parent) -: QDeclarativeAbstractAnimation(*(new QSGPathAnimationPrivate), parent) +QQuickPathAnimation::QQuickPathAnimation(QObject *parent) +: QDeclarativeAbstractAnimation(*(new QQuickPathAnimationPrivate), parent) { - Q_D(QSGPathAnimation); + Q_D(QQuickPathAnimation); d->pa = new QDeclarativeBulkValueAnimator; QDeclarative_setParent_noEvent(d->pa, this); } -QSGPathAnimation::~QSGPathAnimation() +QQuickPathAnimation::~QQuickPathAnimation() { } -int QSGPathAnimation::duration() const +int QQuickPathAnimation::duration() const { - Q_D(const QSGPathAnimation); + Q_D(const QQuickPathAnimation); return d->pa->duration(); } -void QSGPathAnimation::setDuration(int duration) +void QQuickPathAnimation::setDuration(int duration) { if (duration < 0) { qmlInfo(this) << tr("Cannot set a duration of < 0"); return; } - Q_D(QSGPathAnimation); + Q_D(QQuickPathAnimation); if (d->pa->duration() == duration) return; d->pa->setDuration(duration); emit durationChanged(duration); } -QEasingCurve QSGPathAnimation::easing() const +QEasingCurve QQuickPathAnimation::easing() const { - Q_D(const QSGPathAnimation); + Q_D(const QQuickPathAnimation); return d->pa->easingCurve(); } -void QSGPathAnimation::setEasing(const QEasingCurve &e) +void QQuickPathAnimation::setEasing(const QEasingCurve &e) { - Q_D(QSGPathAnimation); + Q_D(QQuickPathAnimation); if (d->pa->easingCurve() == e) return; @@ -490,15 +490,15 @@ void QSGPathAnimation::setEasing(const QEasingCurve &e) emit easingChanged(e); } -QDeclarativePath *QSGPathAnimation::path() const +QDeclarativePath *QQuickPathAnimation::path() const { - Q_D(const QSGPathAnimation); + Q_D(const QQuickPathAnimation); return d->path; } -void QSGPathAnimation::setPath(QDeclarativePath *path) +void QQuickPathAnimation::setPath(QDeclarativePath *path) { - Q_D(QSGPathAnimation); + Q_D(QQuickPathAnimation); if (d->path == path) return; @@ -506,15 +506,15 @@ void QSGPathAnimation::setPath(QDeclarativePath *path) emit pathChanged(); } -QSGItem *QSGPathAnimation::target() const +QQuickItem *QQuickPathAnimation::target() const { - Q_D(const QSGPathAnimation); + Q_D(const QQuickPathAnimation); return d->target; } -void QSGPathAnimation::setTarget(QSGItem *target) +void QQuickPathAnimation::setTarget(QQuickItem *target) { - Q_D(QSGPathAnimation); + Q_D(QQuickPathAnimation); if (d->target == target) return; @@ -522,15 +522,15 @@ void QSGPathAnimation::setTarget(QSGItem *target) emit targetChanged(); } -QSGPathAnimation::Orientation QSGPathAnimation::orientation() const +QQuickPathAnimation::Orientation QQuickPathAnimation::orientation() const { - Q_D(const QSGPathAnimation); + Q_D(const QQuickPathAnimation); return d->orientation; } -void QSGPathAnimation::setOrientation(Orientation orientation) +void QQuickPathAnimation::setOrientation(Orientation orientation) { - Q_D(QSGPathAnimation); + Q_D(QQuickPathAnimation); if (d->orientation == orientation) return; @@ -538,15 +538,15 @@ void QSGPathAnimation::setOrientation(Orientation orientation) emit orientationChanged(d->orientation); } -QPointF QSGPathAnimation::anchorPoint() const +QPointF QQuickPathAnimation::anchorPoint() const { - Q_D(const QSGPathAnimation); + Q_D(const QQuickPathAnimation); return d->anchorPoint; } -void QSGPathAnimation::setAnchorPoint(const QPointF &point) +void QQuickPathAnimation::setAnchorPoint(const QPointF &point) { - Q_D(QSGPathAnimation); + Q_D(QQuickPathAnimation); if (d->anchorPoint == point) return; @@ -554,45 +554,45 @@ void QSGPathAnimation::setAnchorPoint(const QPointF &point) emit anchorPointChanged(point); } -qreal QSGPathAnimation::orientationEntryInterval() const +qreal QQuickPathAnimation::orientationEntryInterval() const { - Q_D(const QSGPathAnimation); + Q_D(const QQuickPathAnimation); return d->entryInterval; } -void QSGPathAnimation::setOrientationEntryInterval(qreal interval) +void QQuickPathAnimation::setOrientationEntryInterval(qreal interval) { - Q_D(QSGPathAnimation); + Q_D(QQuickPathAnimation); if (d->entryInterval == interval) return; d->entryInterval = interval; emit orientationEntryIntervalChanged(interval); } -qreal QSGPathAnimation::orientationExitInterval() const +qreal QQuickPathAnimation::orientationExitInterval() const { - Q_D(const QSGPathAnimation); + Q_D(const QQuickPathAnimation); return d->exitInterval; } -void QSGPathAnimation::setOrientationExitInterval(qreal interval) +void QQuickPathAnimation::setOrientationExitInterval(qreal interval) { - Q_D(QSGPathAnimation); + Q_D(QQuickPathAnimation); if (d->exitInterval == interval) return; d->exitInterval = interval; emit orientationExitIntervalChanged(interval); } -qreal QSGPathAnimation::endRotation() const +qreal QQuickPathAnimation::endRotation() const { - Q_D(const QSGPathAnimation); + Q_D(const QQuickPathAnimation); return d->endRotation.isNull ? qreal(0) : d->endRotation.value; } -void QSGPathAnimation::setEndRotation(qreal rotation) +void QQuickPathAnimation::setEndRotation(qreal rotation) { - Q_D(QSGPathAnimation); + Q_D(QQuickPathAnimation); if (!d->endRotation.isNull && d->endRotation == rotation) return; @@ -601,18 +601,18 @@ void QSGPathAnimation::setEndRotation(qreal rotation) } -QAbstractAnimation *QSGPathAnimation::qtAnimation() +QAbstractAnimation *QQuickPathAnimation::qtAnimation() { - Q_D(QSGPathAnimation); + Q_D(QQuickPathAnimation); return d->pa; } -void QSGPathAnimation::transition(QDeclarativeStateActions &actions, +void QQuickPathAnimation::transition(QDeclarativeStateActions &actions, QDeclarativeProperties &modified, TransitionDirection direction) { - Q_D(QSGPathAnimation); - QSGPathAnimationUpdater *data = new QSGPathAnimationUpdater; + Q_D(QQuickPathAnimation); + QQuickPathAnimationUpdater *data = new QQuickPathAnimationUpdater; data->orientation = d->orientation; data->anchorPoint = d->anchorPoint; @@ -655,7 +655,7 @@ void QSGPathAnimation::transition(QDeclarativeStateActions &actions, yet been deleted, and has the same target, etc, which may be a bit fragile. */ if (d->pa->getAnimValue()) { - QSGPathAnimationUpdater *prevData = static_cast<QSGPathAnimationUpdater*>(d->pa->getAnimValue()); + QQuickPathAnimationUpdater *prevData = static_cast<QQuickPathAnimationUpdater*>(d->pa->getAnimValue()); // get the original start angle that was used (so we can exactly reverse). data->startRotation = prevData->startRotation; @@ -687,7 +687,7 @@ void QSGPathAnimation::transition(QDeclarativeStateActions &actions, } } -void QSGPathAnimationUpdater::setValue(qreal v) +void QQuickPathAnimationUpdater::setValue(qreal v) { if (interruptStart.isValid()) { if (reverse) @@ -709,7 +709,7 @@ void QSGPathAnimationUpdater::setValue(qreal v) } qreal angle; - bool fixed = orientation == QSGPathAnimation::Fixed; + bool fixed = orientation == QQuickPathAnimation::Fixed; QPointF currentPos = !painterPath.isEmpty() ? path->sequentialPointAt(painterPath, pathLength, attributePoints, prevBez, v, fixed ? 0 : &angle) : path->sequentialPointAt(v, fixed ? 0 : &angle); //adjust position according to anchor point @@ -728,16 +728,16 @@ void QSGPathAnimationUpdater::setValue(qreal v) //adjust angle according to orientation if (!fixed) { switch (orientation) { - case QSGPathAnimation::RightFirst: + case QQuickPathAnimation::RightFirst: angle = -angle; break; - case QSGPathAnimation::TopFirst: + case QQuickPathAnimation::TopFirst: angle = -angle + 90; break; - case QSGPathAnimation::LeftFirst: + case QQuickPathAnimation::LeftFirst: angle = -angle + 180; break; - case QSGPathAnimation::BottomFirst: + case QQuickPathAnimation::BottomFirst: angle = -angle + 270; break; default: diff --git a/src/declarative/items/qsganimation_p.h b/src/declarative/items/qquickanimation_p.h index af6279aad0..2ce72249e2 100644 --- a/src/declarative/items/qsganimation_p.h +++ b/src/declarative/items/qquickanimation_p.h @@ -40,10 +40,10 @@ ** ****************************************************************************/ -#ifndef QSGANIMATION_H -#define QSGANIMATION_H +#ifndef QQUICKANIMATION_H +#define QQUICKANIMATION_H -#include "qsgitem.h" +#include "qquickitem.h" #include <private/qdeclarativeanimation_p.h> @@ -55,28 +55,28 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGParentAnimationPrivate; -class QSGParentAnimation : public QDeclarativeAnimationGroup +class QQuickParentAnimationPrivate; +class QQuickParentAnimation : public QDeclarativeAnimationGroup { Q_OBJECT - Q_DECLARE_PRIVATE(QSGParentAnimation) + Q_DECLARE_PRIVATE(QQuickParentAnimation) - Q_PROPERTY(QSGItem *target READ target WRITE setTarget NOTIFY targetChanged) - Q_PROPERTY(QSGItem *newParent READ newParent WRITE setNewParent NOTIFY newParentChanged) - Q_PROPERTY(QSGItem *via READ via WRITE setVia NOTIFY viaChanged) + Q_PROPERTY(QQuickItem *target READ target WRITE setTarget NOTIFY targetChanged) + Q_PROPERTY(QQuickItem *newParent READ newParent WRITE setNewParent NOTIFY newParentChanged) + Q_PROPERTY(QQuickItem *via READ via WRITE setVia NOTIFY viaChanged) public: - QSGParentAnimation(QObject *parent=0); - virtual ~QSGParentAnimation(); + QQuickParentAnimation(QObject *parent=0); + virtual ~QQuickParentAnimation(); - QSGItem *target() const; - void setTarget(QSGItem *); + QQuickItem *target() const; + void setTarget(QQuickItem *); - QSGItem *newParent() const; - void setNewParent(QSGItem *); + QQuickItem *newParent() const; + void setNewParent(QQuickItem *); - QSGItem *via() const; - void setVia(QSGItem *); + QQuickItem *via() const; + void setVia(QQuickItem *); Q_SIGNALS: void targetChanged(); @@ -90,20 +90,20 @@ protected: virtual QAbstractAnimation *qtAnimation(); }; -class QSGAnchorAnimationPrivate; -class QSGAnchorAnimation : public QDeclarativeAbstractAnimation +class QQuickAnchorAnimationPrivate; +class QQuickAnchorAnimation : public QDeclarativeAbstractAnimation { Q_OBJECT - Q_DECLARE_PRIVATE(QSGAnchorAnimation) - Q_PROPERTY(QDeclarativeListProperty<QSGItem> targets READ targets) + Q_DECLARE_PRIVATE(QQuickAnchorAnimation) + Q_PROPERTY(QDeclarativeListProperty<QQuickItem> targets READ targets) Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged) public: - QSGAnchorAnimation(QObject *parent=0); - virtual ~QSGAnchorAnimation(); + QQuickAnchorAnimation(QObject *parent=0); + virtual ~QQuickAnchorAnimation(); - QDeclarativeListProperty<QSGItem> targets(); + QDeclarativeListProperty<QQuickItem> targets(); int duration() const; void setDuration(int); @@ -122,18 +122,18 @@ protected: virtual QAbstractAnimation *qtAnimation(); }; -class QSGItem; +class QQuickItem; class QDeclarativePath; -class QSGPathAnimationPrivate; -class Q_AUTOTEST_EXPORT QSGPathAnimation : public QDeclarativeAbstractAnimation +class QQuickPathAnimationPrivate; +class Q_AUTOTEST_EXPORT QQuickPathAnimation : public QDeclarativeAbstractAnimation { Q_OBJECT - Q_DECLARE_PRIVATE(QSGPathAnimation) + Q_DECLARE_PRIVATE(QQuickPathAnimation) Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged) Q_PROPERTY(QDeclarativePath *path READ path WRITE setPath NOTIFY pathChanged) - Q_PROPERTY(QSGItem *target READ target WRITE setTarget NOTIFY targetChanged) + Q_PROPERTY(QQuickItem *target READ target WRITE setTarget NOTIFY targetChanged) Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged) Q_PROPERTY(QPointF anchorPoint READ anchorPoint WRITE setAnchorPoint NOTIFY anchorPointChanged) Q_PROPERTY(qreal orientationEntryInterval READ orientationEntryInterval WRITE setOrientationEntryInterval NOTIFY orientationEntryIntervalChanged) @@ -141,8 +141,8 @@ class Q_AUTOTEST_EXPORT QSGPathAnimation : public QDeclarativeAbstractAnimation Q_PROPERTY(qreal endRotation READ endRotation WRITE setEndRotation NOTIFY endRotationChanged) public: - QSGPathAnimation(QObject *parent=0); - virtual ~QSGPathAnimation(); + QQuickPathAnimation(QObject *parent=0); + virtual ~QQuickPathAnimation(); enum Orientation { Fixed, @@ -162,8 +162,8 @@ public: QDeclarativePath *path() const; void setPath(QDeclarativePath *); - QSGItem *target() const; - void setTarget(QSGItem *); + QQuickItem *target() const; + void setTarget(QQuickItem *); Orientation orientation() const; void setOrientation(Orientation orientation); @@ -200,10 +200,10 @@ Q_SIGNALS: QT_END_NAMESPACE -QML_DECLARE_TYPE(QSGParentAnimation) -QML_DECLARE_TYPE(QSGAnchorAnimation) -QML_DECLARE_TYPE(QSGPathAnimation) +QML_DECLARE_TYPE(QQuickParentAnimation) +QML_DECLARE_TYPE(QQuickAnchorAnimation) +QML_DECLARE_TYPE(QQuickPathAnimation) QT_END_HEADER -#endif // QSGANIMATION_H +#endif // QQUICKANIMATION_H diff --git a/src/declarative/items/qsganimation_p_p.h b/src/declarative/items/qquickanimation_p_p.h index 276efc5eb4..de2b6d42f9 100644 --- a/src/declarative/items/qsganimation_p_p.h +++ b/src/declarative/items/qquickanimation_p_p.h @@ -40,8 +40,8 @@ ** ****************************************************************************/ -#ifndef QSGANIMATION_P_H -#define QSGANIMATION_P_H +#ifndef QQUICKANIMATION_P_H +#define QQUICKANIMATION_P_H // // W A R N I N G @@ -54,53 +54,53 @@ // We mean it. // -#include "qsganimation_p.h" +#include "qquickanimation_p.h" #include <private/qdeclarativepath_p.h> #include <private/qdeclarativeanimation_p_p.h> QT_BEGIN_NAMESPACE -class QSGParentAnimationPrivate : public QDeclarativeAnimationGroupPrivate +class QQuickParentAnimationPrivate : public QDeclarativeAnimationGroupPrivate { - Q_DECLARE_PUBLIC(QSGParentAnimation) + Q_DECLARE_PUBLIC(QQuickParentAnimation) public: - QSGParentAnimationPrivate() + QQuickParentAnimationPrivate() : QDeclarativeAnimationGroupPrivate(), target(0), newParent(0), via(0), topLevelGroup(0), startAction(0), endAction(0) {} - QSGItem *target; - QSGItem *newParent; - QSGItem *via; + QQuickItem *target; + QQuickItem *newParent; + QQuickItem *via; QSequentialAnimationGroup *topLevelGroup; QActionAnimation *startAction; QActionAnimation *endAction; - QPointF computeTransformOrigin(QSGItem::TransformOrigin origin, qreal width, qreal height) const; + QPointF computeTransformOrigin(QQuickItem::TransformOrigin origin, qreal width, qreal height) const; }; -class QSGAnchorAnimationPrivate : public QDeclarativeAbstractAnimationPrivate +class QQuickAnchorAnimationPrivate : public QDeclarativeAbstractAnimationPrivate { - Q_DECLARE_PUBLIC(QSGAnchorAnimation) + Q_DECLARE_PUBLIC(QQuickAnchorAnimation) public: - QSGAnchorAnimationPrivate() : rangeIsSet(false), va(0), + QQuickAnchorAnimationPrivate() : rangeIsSet(false), va(0), interpolator(QVariantAnimationPrivate::getInterpolator(QMetaType::QReal)) {} bool rangeIsSet; QDeclarativeBulkValueAnimator *va; QVariantAnimation::Interpolator interpolator; - QList<QSGItem*> targets; + QList<QQuickItem*> targets; }; -class QSGPathAnimationUpdater : public QDeclarativeBulkValueUpdater +class QQuickPathAnimationUpdater : public QDeclarativeBulkValueUpdater { public: - QSGPathAnimationUpdater() : path(0), target(0), reverse(false), + QQuickPathAnimationUpdater() : path(0), target(0), reverse(false), fromSourced(false), fromDefined(false), toDefined(false), - toX(0), toY(0), currentV(0), orientation(QSGPathAnimation::Fixed), + toX(0), toY(0), currentV(0), orientation(QQuickPathAnimation::Fixed), entryInterval(0), exitInterval(0) {} - ~QSGPathAnimationUpdater() {} + ~QQuickPathAnimationUpdater() {} void setValue(qreal v); @@ -111,7 +111,7 @@ public: qreal pathLength; QList<QDeclarativePath::AttributePoint> attributePoints; - QSGItem *target; + QQuickItem *target; bool reverse; bool fromSourced; bool fromDefined; @@ -121,7 +121,7 @@ public: qreal currentV; QDeclarativeNullableValue<qreal> interruptStart; //TODO: bundle below into common struct - QSGPathAnimation::Orientation orientation; + QQuickPathAnimation::Orientation orientation; QPointF anchorPoint; qreal entryInterval; qreal exitInterval; @@ -129,17 +129,17 @@ public: QDeclarativeNullableValue<qreal> startRotation; }; -class QSGPathAnimationPrivate : public QDeclarativeAbstractAnimationPrivate +class QQuickPathAnimationPrivate : public QDeclarativeAbstractAnimationPrivate { - Q_DECLARE_PUBLIC(QSGPathAnimation) + Q_DECLARE_PUBLIC(QQuickPathAnimation) public: - QSGPathAnimationPrivate() : path(0), target(0), - rangeIsSet(false), orientation(QSGPathAnimation::Fixed), entryInterval(0), exitInterval(0), pa(0) {} + QQuickPathAnimationPrivate() : path(0), target(0), + rangeIsSet(false), orientation(QQuickPathAnimation::Fixed), entryInterval(0), exitInterval(0), pa(0) {} QDeclarativePath *path; - QSGItem *target; + QQuickItem *target; bool rangeIsSet; - QSGPathAnimation::Orientation orientation; + QQuickPathAnimation::Orientation orientation; QPointF anchorPoint; qreal entryInterval; qreal exitInterval; @@ -150,4 +150,4 @@ public: QT_END_NAMESPACE -#endif // QSGANIMATION_P_H +#endif // QQUICKANIMATION_P_H diff --git a/src/declarative/items/qsgborderimage.cpp b/src/declarative/items/qquickborderimage.cpp index fb407d7e2c..92c1c6d115 100644 --- a/src/declarative/items/qsgborderimage.cpp +++ b/src/declarative/items/qquickborderimage.cpp @@ -39,9 +39,9 @@ ** ****************************************************************************/ -#include "qsgborderimage_p.h" -#include "qsgborderimage_p_p.h" -#include "qsgninepatchnode_p.h" +#include "qquickborderimage_p.h" +#include "qquickborderimage_p_p.h" +#include "qquickninepatchnode_p.h" #include <QtDeclarative/qdeclarativeinfo.h> #include <QtCore/qfile.h> @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE /*! - \qmlclass BorderImage QSGBorderImage + \qmlclass BorderImage QQuickBorderImage \inqmlmodule QtQuick 2 \brief The BorderImage element provides an image that can be used as a border. \inherits Item @@ -163,14 +163,14 @@ QT_BEGIN_NAMESPACE local filesystem. Images loaded via a network resource (e.g. HTTP) are always loaded asynchonously. */ -QSGBorderImage::QSGBorderImage(QSGItem *parent) -: QSGImageBase(*(new QSGBorderImagePrivate), parent) +QQuickBorderImage::QQuickBorderImage(QQuickItem *parent) +: QQuickImageBase(*(new QQuickBorderImagePrivate), parent) { } -QSGBorderImage::~QSGBorderImage() +QQuickBorderImage::~QQuickBorderImage() { - Q_D(QSGBorderImage); + Q_D(QQuickBorderImage); if (d->sciReply) d->sciReply->deleteLater(); } @@ -268,9 +268,9 @@ QSGBorderImage::~QSGBorderImage() \sa Image::sourceSize */ -void QSGBorderImage::setSource(const QUrl &url) +void QQuickBorderImage::setSource(const QUrl &url) { - Q_D(QSGBorderImage); + Q_D(QQuickBorderImage); //equality is fairly expensive, so we bypass for simple, common case if ((d->url.isEmpty() == url.isEmpty()) && url == d->url) return; @@ -288,9 +288,9 @@ void QSGBorderImage::setSource(const QUrl &url) load(); } -void QSGBorderImage::load() +void QQuickBorderImage::load() { - Q_D(QSGBorderImage); + Q_D(QQuickBorderImage); if (d->progress != 0.0) { d->progress = 0.0; emit progressChanged(d->progress); @@ -310,7 +310,7 @@ void QSGBorderImage::load() if (!lf.isEmpty()) { QFile file(lf); file.open(QIODevice::ReadOnly); - setGridScaledImage(QSGGridScaledImage(&file)); + setGridScaledImage(QQuickGridScaledImage(&file)); } else { QNetworkRequest req(d->url); d->sciReply = qmlEngine(this)->networkAccessManager()->get(req); @@ -381,9 +381,9 @@ void QSGBorderImage::load() \l {BorderImage::source}{.sci file}. */ -QSGScaleGrid *QSGBorderImage::border() +QQuickScaleGrid *QQuickBorderImage::border() { - Q_D(QSGBorderImage); + Q_D(QQuickBorderImage); return d->getScaleGrid(); } @@ -401,15 +401,15 @@ QSGScaleGrid *QSGBorderImage::border() The default tile mode for each property is BorderImage.Stretch. */ -QSGBorderImage::TileMode QSGBorderImage::horizontalTileMode() const +QQuickBorderImage::TileMode QQuickBorderImage::horizontalTileMode() const { - Q_D(const QSGBorderImage); + Q_D(const QQuickBorderImage); return d->horizontalTileMode; } -void QSGBorderImage::setHorizontalTileMode(TileMode t) +void QQuickBorderImage::setHorizontalTileMode(TileMode t) { - Q_D(QSGBorderImage); + Q_D(QQuickBorderImage); if (t != d->horizontalTileMode) { d->horizontalTileMode = t; emit horizontalTileModeChanged(); @@ -417,15 +417,15 @@ void QSGBorderImage::setHorizontalTileMode(TileMode t) } } -QSGBorderImage::TileMode QSGBorderImage::verticalTileMode() const +QQuickBorderImage::TileMode QQuickBorderImage::verticalTileMode() const { - Q_D(const QSGBorderImage); + Q_D(const QQuickBorderImage); return d->verticalTileMode; } -void QSGBorderImage::setVerticalTileMode(TileMode t) +void QQuickBorderImage::setVerticalTileMode(TileMode t) { - Q_D(QSGBorderImage); + Q_D(QQuickBorderImage); if (t != d->verticalTileMode) { d->verticalTileMode = t; emit verticalTileModeChanged(); @@ -433,14 +433,14 @@ void QSGBorderImage::setVerticalTileMode(TileMode t) } } -void QSGBorderImage::setGridScaledImage(const QSGGridScaledImage& sci) +void QQuickBorderImage::setGridScaledImage(const QQuickGridScaledImage& sci) { - Q_D(QSGBorderImage); + Q_D(QQuickBorderImage); if (!sci.isValid()) { d->status = Error; emit statusChanged(d->status); } else { - QSGScaleGrid *sg = border(); + QQuickScaleGrid *sg = border(); sg->setTop(sci.gridTop()); sg->setBottom(sci.gridBottom()); sg->setLeft(sci.gridLeft()); @@ -463,9 +463,9 @@ void QSGBorderImage::setGridScaledImage(const QSGGridScaledImage& sci) static int thisRequestFinished = -1; if (thisRequestProgress == -1) { thisRequestProgress = - QSGBorderImage::staticMetaObject.indexOfSlot("requestProgress(qint64,qint64)"); + QQuickBorderImage::staticMetaObject.indexOfSlot("requestProgress(qint64,qint64)"); thisRequestFinished = - QSGBorderImage::staticMetaObject.indexOfSlot("requestFinished()"); + QQuickBorderImage::staticMetaObject.indexOfSlot("requestFinished()"); } d->pix.connectFinished(this, thisRequestFinished); @@ -493,9 +493,9 @@ void QSGBorderImage::setGridScaledImage(const QSGGridScaledImage& sci) } } -void QSGBorderImage::requestFinished() +void QQuickBorderImage::requestFinished() { - Q_D(QSGBorderImage); + Q_D(QQuickBorderImage); QSize impsize = d->pix.implicitSize(); if (d->pix.isError()) { @@ -519,9 +519,9 @@ void QSGBorderImage::requestFinished() #define BORDERIMAGE_MAX_REDIRECT 16 -void QSGBorderImage::sciRequestFinished() +void QQuickBorderImage::sciRequestFinished() { - Q_D(QSGBorderImage); + Q_D(QQuickBorderImage); d->redirectCount++; if (d->redirectCount < BORDERIMAGE_MAX_REDIRECT) { @@ -540,21 +540,21 @@ void QSGBorderImage::sciRequestFinished() d->sciReply = 0; emit statusChanged(d->status); } else { - QSGGridScaledImage sci(d->sciReply); + QQuickGridScaledImage sci(d->sciReply); d->sciReply->deleteLater(); d->sciReply = 0; setGridScaledImage(sci); } } -void QSGBorderImage::doUpdate() +void QQuickBorderImage::doUpdate() { update(); } -QSGNode *QSGBorderImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) +QSGNode *QQuickBorderImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) { - Q_D(QSGBorderImage); + Q_D(QQuickBorderImage); QSGTexture *texture = d->pix.texture(d->sceneGraphContext()); @@ -563,17 +563,17 @@ QSGNode *QSGBorderImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData * return 0; } - QSGNinePatchNode *node = static_cast<QSGNinePatchNode *>(oldNode); + QQuickNinePatchNode *node = static_cast<QQuickNinePatchNode *>(oldNode); if (!node) { - node = new QSGNinePatchNode(); + node = new QQuickNinePatchNode(); } node->setTexture(texture); // Don't implicitly create the scalegrid in the rendering thread... if (d->border) { - const QSGScaleGrid *border = d->getScaleGrid(); + const QQuickScaleGrid *border = d->getScaleGrid(); node->setInnerRect(QRectF(border->left(), border->top(), qMax(1, d->pix.width() - border->right() - border->left()), @@ -591,9 +591,9 @@ QSGNode *QSGBorderImage::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData * return node; } -void QSGBorderImage::pixmapChange() +void QQuickBorderImage::pixmapChange() { - Q_D(QSGBorderImage); + Q_D(QQuickBorderImage); d->pixmapChanged = true; } diff --git a/src/declarative/items/qsgborderimage_p.h b/src/declarative/items/qquickborderimage_p.h index c88a61bfd4..0af6fca55d 100644 --- a/src/declarative/items/qsgborderimage_p.h +++ b/src/declarative/items/qquickborderimage_p.h @@ -40,35 +40,35 @@ ** ****************************************************************************/ -#ifndef QSGBORDERIMAGE_P_H -#define QSGBORDERIMAGE_P_H +#ifndef QQUICKBORDERIMAGE_P_H +#define QQUICKBORDERIMAGE_P_H -#include "qsgimagebase_p.h" +#include "qquickimagebase_p.h" QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGScaleGrid; -class QSGGridScaledImage; -class QSGBorderImagePrivate; -class Q_AUTOTEST_EXPORT QSGBorderImage : public QSGImageBase +class QQuickScaleGrid; +class QQuickGridScaledImage; +class QQuickBorderImagePrivate; +class Q_AUTOTEST_EXPORT QQuickBorderImage : public QQuickImageBase { Q_OBJECT Q_ENUMS(TileMode) - Q_PROPERTY(QSGScaleGrid *border READ border CONSTANT) + Q_PROPERTY(QQuickScaleGrid *border READ border CONSTANT) Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged) Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged) // read-only for BorderImage Q_PROPERTY(QSize sourceSize READ sourceSize NOTIFY sourceSizeChanged) public: - QSGBorderImage(QSGItem *parent=0); - ~QSGBorderImage(); + QQuickBorderImage(QQuickItem *parent=0); + ~QQuickBorderImage(); - QSGScaleGrid *border(); + QQuickScaleGrid *border(); enum TileMode { Stretch = Qt::StretchTile, Repeat = Qt::RepeatTile, Round = Qt::RoundTile }; @@ -91,7 +91,7 @@ protected: virtual QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *); private: - void setGridScaledImage(const QSGGridScaledImage& sci); + void setGridScaledImage(const QQuickGridScaledImage& sci); private Q_SLOTS: void doUpdate(); @@ -99,12 +99,12 @@ private Q_SLOTS: void sciRequestFinished(); private: - Q_DISABLE_COPY(QSGBorderImage) - Q_DECLARE_PRIVATE(QSGBorderImage) + Q_DISABLE_COPY(QQuickBorderImage) + Q_DECLARE_PRIVATE(QQuickBorderImage) }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QSGBorderImage) +QML_DECLARE_TYPE(QQuickBorderImage) QT_END_HEADER -#endif // QSGBORDERIMAGE_P_H +#endif // QQUICKBORDERIMAGE_P_H diff --git a/src/declarative/items/qsgborderimage_p_p.h b/src/declarative/items/qquickborderimage_p_p.h index 27816697f4..1875dc082a 100644 --- a/src/declarative/items/qsgborderimage_p_p.h +++ b/src/declarative/items/qquickborderimage_p_p.h @@ -40,8 +40,8 @@ ** ****************************************************************************/ -#ifndef QSGBORDERIMAGE_P_P_H -#define QSGBORDERIMAGE_P_P_H +#ifndef QQUICKBORDERIMAGE_P_P_H +#define QQUICKBORDERIMAGE_P_P_H // // W A R N I N G @@ -54,45 +54,45 @@ // We mean it. // -#include "qsgimagebase_p_p.h" -#include "qsgscalegrid_p_p.h" +#include "qquickimagebase_p_p.h" +#include "qquickscalegrid_p_p.h" QT_BEGIN_NAMESPACE class QNetworkReply; -class QSGBorderImagePrivate : public QSGImageBasePrivate +class QQuickBorderImagePrivate : public QQuickImageBasePrivate { - Q_DECLARE_PUBLIC(QSGBorderImage) + Q_DECLARE_PUBLIC(QQuickBorderImage) public: - QSGBorderImagePrivate() + QQuickBorderImagePrivate() : border(0), sciReply(0), - horizontalTileMode(QSGBorderImage::Stretch), - verticalTileMode(QSGBorderImage::Stretch), + horizontalTileMode(QQuickBorderImage::Stretch), + verticalTileMode(QQuickBorderImage::Stretch), redirectCount(0), pixmapChanged(false) { } - ~QSGBorderImagePrivate() + ~QQuickBorderImagePrivate() { } - QSGScaleGrid *getScaleGrid() + QQuickScaleGrid *getScaleGrid() { - Q_Q(QSGBorderImage); + Q_Q(QQuickBorderImage); if (!border) { - border = new QSGScaleGrid(q); + border = new QQuickScaleGrid(q); FAST_CONNECT(border, SIGNAL(borderChanged()), q, SLOT(doUpdate())) } return border; } - QSGScaleGrid *border; + QQuickScaleGrid *border; QUrl sciurl; QNetworkReply *sciReply; - QSGBorderImage::TileMode horizontalTileMode; - QSGBorderImage::TileMode verticalTileMode; + QQuickBorderImage::TileMode horizontalTileMode; + QQuickBorderImage::TileMode verticalTileMode; int redirectCount; bool pixmapChanged : 1; @@ -100,4 +100,4 @@ public: QT_END_NAMESPACE -#endif // QSGBORDERIMAGE_P_P_H +#endif // QQUICKBORDERIMAGE_P_P_H diff --git a/src/declarative/items/qsgcanvas.cpp b/src/declarative/items/qquickcanvas.cpp index 1e3562775f..8f87ce7a9c 100644 --- a/src/declarative/items/qsgcanvas.cpp +++ b/src/declarative/items/qquickcanvas.cpp @@ -39,11 +39,11 @@ ** ****************************************************************************/ -#include "qsgcanvas.h" -#include "qsgcanvas_p.h" +#include "qquickcanvas.h" +#include "qquickcanvas_p.h" -#include "qsgitem.h" -#include "qsgitem_p.h" +#include "qquickitem.h" +#include "qquickitem_p.h" #include <private/qsgrenderer_p.h> #include <private/qsgflashnode_p.h> @@ -64,9 +64,9 @@ QT_BEGIN_NAMESPACE -#define QSG_CANVAS_TIMING -#ifdef QSG_CANVAS_TIMING -static bool qsg_canvas_timing = !qgetenv("QML_CANVAS_TIMING").isEmpty(); +#define QQUICK_CANVAS_TIMING +#ifdef QQUICK_CANVAS_TIMING +static bool qquick_canvas_timing = !qgetenv("QML_CANVAS_TIMING").isEmpty(); static QTime threadTimer; static int syncTime; static int renderTime; @@ -78,18 +78,18 @@ DEFINE_BOOL_CONFIG_OPTION(qmlNoThreadedRenderer, QML_BAD_GUI_RENDER_LOOP) extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha); -void QSGCanvasPrivate::updateFocusItemTransform() +void QQuickCanvasPrivate::updateFocusItemTransform() { - Q_Q(QSGCanvas); - QSGItem *focus = q->activeFocusItem(); + Q_Q(QQuickCanvas); + QQuickItem *focus = q->activeFocusItem(); if (focus && qApp->inputPanel()->inputItem() == focus) - qApp->inputPanel()->setInputItemTransform(QSGItemPrivate::get(focus)->itemToCanvasTransform()); + qApp->inputPanel()->setInputItemTransform(QQuickItemPrivate::get(focus)->itemToCanvasTransform()); } -class QSGCanvasIncubationController : public QObject, public QDeclarativeIncubationController +class QQuickCanvasIncubationController : public QObject, public QDeclarativeIncubationController { public: - QSGCanvasIncubationController(QSGCanvasPrivate *canvas) + QQuickCanvasIncubationController(QQuickCanvasPrivate *canvas) : m_canvas(canvas), m_eventSent(false) {} protected: @@ -121,19 +121,19 @@ protected: } private: - QSGCanvasPrivate *m_canvas; + QQuickCanvasPrivate *m_canvas; bool m_eventSent; }; -class QSGCanvasPlainRenderLoop : public QObject, public QSGCanvasRenderLoop +class QQuickCanvasPlainRenderLoop : public QObject, public QQuickCanvasRenderLoop { public: - QSGCanvasPlainRenderLoop() + QQuickCanvasPlainRenderLoop() : updatePending(false) , animationRunning(false) { - qWarning("QSGCanvas: using non-threaded render loop. Be very sure to not access scene graph " - "objects outside the QSGItem::updatePaintNode() call. Failing to do so will cause " + qWarning("QQuickCanvas: using non-threaded render loop. Be very sure to not access scene graph " + "objects outside the QQuickItem::updatePaintNode() call. Failing to do so will cause " "your code to crash on other platforms!"); } @@ -293,40 +293,40 @@ int sceneGraphRenderTime; int readbackTime; #endif -QSGItem::UpdatePaintNodeData::UpdatePaintNodeData() +QQuickItem::UpdatePaintNodeData::UpdatePaintNodeData() : transformNode(0) { } -QSGRootItem::QSGRootItem() +QQuickRootItem::QQuickRootItem() { } -void QSGCanvas::exposeEvent(QExposeEvent *) +void QQuickCanvas::exposeEvent(QExposeEvent *) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); d->thread->paint(); } -void QSGCanvas::resizeEvent(QResizeEvent *) +void QQuickCanvas::resizeEvent(QResizeEvent *) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); d->thread->resize(size()); } -void QSGCanvas::animationStarted() +void QQuickCanvas::animationStarted() { d_func()->thread->animationStarted(); } -void QSGCanvas::animationStopped() +void QQuickCanvas::animationStopped() { d_func()->thread->animationStopped(); } -void QSGCanvas::showEvent(QShowEvent *) +void QQuickCanvas::showEvent(QShowEvent *) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); if (d->vsyncAnimations) { if (!d->animationDriver) { d->animationDriver = d->context->createAnimationDriver(this); @@ -342,9 +342,9 @@ void QSGCanvas::showEvent(QShowEvent *) } } -void QSGCanvas::hideEvent(QHideEvent *) +void QQuickCanvas::hideEvent(QHideEvent *) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); d->thread->stopRendering(); } @@ -353,21 +353,21 @@ void QSGCanvas::hideEvent(QHideEvent *) /*! Sets weither this canvas should use vsync driven animations. - This option can only be set on one single QSGCanvas, and that it's + This option can only be set on one single QQuickCanvas, and that it's vsync signal will then be used to drive all animations in the process. - This feature is primarily useful for single QSGCanvas, QML-only + This feature is primarily useful for single QQuickCanvas, QML-only applications. - \warning Enabling vsync on multiple QSGCanvas instances has + \warning Enabling vsync on multiple QQuickCanvas instances has undefined behavior. */ -void QSGCanvas::setVSyncAnimations(bool enabled) +void QQuickCanvas::setVSyncAnimations(bool enabled) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); if (visible()) { - qWarning("QSGCanvas::setVSyncAnimations: Cannot be changed when widget is shown"); + qWarning("QQuickCanvas::setVSyncAnimations: Cannot be changed when widget is shown"); return; } d->vsyncAnimations = enabled; @@ -379,13 +379,13 @@ void QSGCanvas::setVSyncAnimations(bool enabled) Returns true if this canvas should use vsync driven animations; otherwise returns false. */ -bool QSGCanvas::vsyncAnimations() const +bool QQuickCanvas::vsyncAnimations() const { - Q_D(const QSGCanvas); + Q_D(const QQuickCanvas); return d->vsyncAnimations; } -void QSGCanvasPrivate::initializeSceneGraph() +void QQuickCanvasPrivate::initializeSceneGraph() { if (!context) context = QSGContext::createDefaultContext(); @@ -396,37 +396,37 @@ void QSGCanvasPrivate::initializeSceneGraph() QOpenGLContext *glctx = const_cast<QOpenGLContext *>(QOpenGLContext::currentContext()); context->initialize(glctx); - Q_Q(QSGCanvas); + Q_Q(QQuickCanvas); QObject::connect(context->renderer(), SIGNAL(sceneGraphChanged()), q, SLOT(maybeUpdate()), Qt::DirectConnection); - if (!QSGItemPrivate::get(rootItem)->itemNode()->parent()) { - context->rootNode()->appendChildNode(QSGItemPrivate::get(rootItem)->itemNode()); + if (!QQuickItemPrivate::get(rootItem)->itemNode()->parent()) { + context->rootNode()->appendChildNode(QQuickItemPrivate::get(rootItem)->itemNode()); } emit q_func()->sceneGraphInitialized(); } -void QSGCanvasPrivate::polishItems() +void QQuickCanvasPrivate::polishItems() { while (!itemsToPolish.isEmpty()) { - QSet<QSGItem *>::Iterator iter = itemsToPolish.begin(); - QSGItem *item = *iter; + QSet<QQuickItem *>::Iterator iter = itemsToPolish.begin(); + QQuickItem *item = *iter; itemsToPolish.erase(iter); - QSGItemPrivate::get(item)->polishScheduled = false; + QQuickItemPrivate::get(item)->polishScheduled = false; item->updatePolish(); } updateFocusItemTransform(); } -void QSGCanvasPrivate::syncSceneGraph() +void QQuickCanvasPrivate::syncSceneGraph() { updateDirtyNodes(); } -void QSGCanvasPrivate::renderSceneGraph(const QSize &size) +void QQuickCanvasPrivate::renderSceneGraph(const QSize &size) { context->renderer()->setDeviceRect(QRect(QPoint(0, 0), size)); context->renderer()->setViewportRect(QRect(QPoint(0, 0), renderTarget ? renderTarget->size() : size)); @@ -447,13 +447,13 @@ void QSGCanvasPrivate::renderSceneGraph(const QSize &size) // ### Do we need this? -void QSGCanvas::sceneGraphChanged() +void QQuickCanvas::sceneGraphChanged() { -// Q_D(QSGCanvas); +// Q_D(QQuickCanvas); // d->needsRepaint = true; } -QSGCanvasPrivate::QSGCanvasPrivate() +QQuickCanvasPrivate::QQuickCanvasPrivate() : rootItem(0) , activeFocusItem(0) , mouseGrabberItem(0) @@ -467,22 +467,22 @@ QSGCanvasPrivate::QSGCanvasPrivate() { } -QSGCanvasPrivate::~QSGCanvasPrivate() +QQuickCanvasPrivate::~QQuickCanvasPrivate() { } -void QSGCanvasPrivate::init(QSGCanvas *c) +void QQuickCanvasPrivate::init(QQuickCanvas *c) { QUnifiedTimer::instance(true)->setConsistentTiming(qmlFixedAnimationStep()); q_ptr = c; - Q_Q(QSGCanvas); + Q_Q(QQuickCanvas); - rootItem = new QSGRootItem; - QSGItemPrivate *rootItemPrivate = QSGItemPrivate::get(rootItem); + rootItem = new QQuickRootItem; + QQuickItemPrivate *rootItemPrivate = QQuickItemPrivate::get(rootItem); rootItemPrivate->canvas = q; - rootItemPrivate->flags |= QSGItem::ItemIsFocusScope; + rootItemPrivate->flags |= QQuickItem::ItemIsFocusScope; // QML always has focus. It is important that this call happens after the rootItem // has a canvas.. @@ -491,14 +491,14 @@ void QSGCanvasPrivate::init(QSGCanvas *c) bool threaded = !qmlNoThreadedRenderer(); if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL)) { - qWarning("QSGCanvas: platform does not support threaded rendering!"); + qWarning("QQuickCanvas: platform does not support threaded rendering!"); threaded = false; } if (threaded) - thread = new QSGCanvasRenderThread(); + thread = new QQuickCanvasRenderThread(); else - thread = new QSGCanvasPlainRenderLoop(); + thread = new QQuickCanvasPlainRenderLoop(); thread->renderer = q; thread->d = this; @@ -510,7 +510,7 @@ void QSGCanvasPrivate::init(QSGCanvas *c) q->setFormat(context->defaultSurfaceFormat()); } -void QSGCanvasPrivate::transformTouchPoints(QList<QTouchEvent::TouchPoint> &touchPoints, const QTransform &transform) +void QQuickCanvasPrivate::transformTouchPoints(QList<QTouchEvent::TouchPoint> &touchPoints, const QTransform &transform) { for (int i=0; i<touchPoints.count(); i++) { QTouchEvent::TouchPoint &touchPoint = touchPoints[i]; @@ -525,9 +525,9 @@ void QSGCanvasPrivate::transformTouchPoints(QList<QTouchEvent::TouchPoint> &touc Translates the data in \a touchEvent to this canvas. This method leaves the item local positions in \a touchEvent untouched (these are filled in later). */ -void QSGCanvasPrivate::translateTouchEvent(QTouchEvent *touchEvent) +void QQuickCanvasPrivate::translateTouchEvent(QTouchEvent *touchEvent) { -// Q_Q(QSGCanvas); +// Q_Q(QQuickCanvas); // touchEvent->setWidget(q); // ### refactor... @@ -549,29 +549,29 @@ void QSGCanvasPrivate::translateTouchEvent(QTouchEvent *touchEvent) touchEvent->setTouchPoints(touchPoints); } -void QSGCanvasPrivate::setFocusInScope(QSGItem *scope, QSGItem *item, FocusOptions options) +void QQuickCanvasPrivate::setFocusInScope(QQuickItem *scope, QQuickItem *item, FocusOptions options) { - Q_Q(QSGCanvas); + Q_Q(QQuickCanvas); Q_ASSERT(item); Q_ASSERT(scope || item == rootItem); #ifdef FOCUS_DEBUG - qWarning() << "QSGCanvasPrivate::setFocusInScope():"; + qWarning() << "QQuickCanvasPrivate::setFocusInScope():"; qWarning() << " scope:" << (QObject *)scope; if (scope) - qWarning() << " scopeSubFocusItem:" << (QObject *)QSGItemPrivate::get(scope)->subFocusItem; + qWarning() << " scopeSubFocusItem:" << (QObject *)QQuickItemPrivate::get(scope)->subFocusItem; qWarning() << " item:" << (QObject *)item; qWarning() << " activeFocusItem:" << (QObject *)activeFocusItem; #endif - QSGItemPrivate *scopePrivate = scope ? QSGItemPrivate::get(scope) : 0; - QSGItemPrivate *itemPrivate = QSGItemPrivate::get(item); + QQuickItemPrivate *scopePrivate = scope ? QQuickItemPrivate::get(scope) : 0; + QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); - QSGItem *oldActiveFocusItem = 0; - QSGItem *newActiveFocusItem = 0; + QQuickItem *oldActiveFocusItem = 0; + QQuickItem *newActiveFocusItem = 0; - QVarLengthArray<QSGItem *, 20> changed; + QVarLengthArray<QQuickItem *, 20> changed; // Does this change the active focus? if (item == rootItem || scopePrivate->activeFocus) { @@ -589,10 +589,10 @@ void QSGCanvasPrivate::setFocusInScope(QSGItem *scope, QSGItem *item, FocusOptio QFocusEvent event(QEvent::FocusOut, Qt::OtherFocusReason); q->sendEvent(oldActiveFocusItem, &event); - QSGItem *afi = oldActiveFocusItem; + QQuickItem *afi = oldActiveFocusItem; while (afi != scope) { - if (QSGItemPrivate::get(afi)->activeFocus) { - QSGItemPrivate::get(afi)->activeFocus = false; + if (QQuickItemPrivate::get(afi)->activeFocus) { + QQuickItemPrivate::get(afi)->activeFocus = false; changed << afi; } afi = afi->parentItem(); @@ -601,26 +601,26 @@ void QSGCanvasPrivate::setFocusInScope(QSGItem *scope, QSGItem *item, FocusOptio } if (item != rootItem) { - QSGItem *oldSubFocusItem = scopePrivate->subFocusItem; + QQuickItem *oldSubFocusItem = scopePrivate->subFocusItem; // Correct focus chain in scope if (oldSubFocusItem) { - QSGItem *sfi = scopePrivate->subFocusItem->parentItem(); + QQuickItem *sfi = scopePrivate->subFocusItem->parentItem(); while (sfi != scope) { - QSGItemPrivate::get(sfi)->subFocusItem = 0; + QQuickItemPrivate::get(sfi)->subFocusItem = 0; sfi = sfi->parentItem(); } } { scopePrivate->subFocusItem = item; - QSGItem *sfi = scopePrivate->subFocusItem->parentItem(); + QQuickItem *sfi = scopePrivate->subFocusItem->parentItem(); while (sfi != scope) { - QSGItemPrivate::get(sfi)->subFocusItem = item; + QQuickItemPrivate::get(sfi)->subFocusItem = item; sfi = sfi->parentItem(); } } if (oldSubFocusItem) { - QSGItemPrivate::get(oldSubFocusItem)->focus = false; + QQuickItemPrivate::get(oldSubFocusItem)->focus = false; changed << oldSubFocusItem; } } @@ -635,13 +635,13 @@ void QSGCanvasPrivate::setFocusInScope(QSGItem *scope, QSGItem *item, FocusOptio if (newActiveFocusItem) { // ### refactor: && q->hasFocus()) { activeFocusItem = newActiveFocusItem; - QSGItemPrivate::get(newActiveFocusItem)->activeFocus = true; + QQuickItemPrivate::get(newActiveFocusItem)->activeFocus = true; changed << newActiveFocusItem; - QSGItem *afi = newActiveFocusItem->parentItem(); + QQuickItem *afi = newActiveFocusItem->parentItem(); while (afi && afi != scope) { if (afi->isFocusScope()) { - QSGItemPrivate::get(afi)->activeFocus = true; + QQuickItemPrivate::get(afi)->activeFocus = true; changed << afi; } afi = afi->parentItem(); @@ -659,27 +659,27 @@ void QSGCanvasPrivate::setFocusInScope(QSGItem *scope, QSGItem *item, FocusOptio notifyFocusChangesRecur(changed.data(), changed.count() - 1); } -void QSGCanvasPrivate::clearFocusInScope(QSGItem *scope, QSGItem *item, FocusOptions options) +void QQuickCanvasPrivate::clearFocusInScope(QQuickItem *scope, QQuickItem *item, FocusOptions options) { - Q_Q(QSGCanvas); + Q_Q(QQuickCanvas); Q_UNUSED(item); Q_ASSERT(item); Q_ASSERT(scope || item == rootItem); #ifdef FOCUS_DEBUG - qWarning() << "QSGCanvasPrivate::clearFocusInScope():"; + qWarning() << "QQuickCanvasPrivate::clearFocusInScope():"; qWarning() << " scope:" << (QObject *)scope; qWarning() << " item:" << (QObject *)item; qWarning() << " activeFocusItem:" << (QObject *)activeFocusItem; #endif - QSGItemPrivate *scopePrivate = scope ? QSGItemPrivate::get(scope) : 0; + QQuickItemPrivate *scopePrivate = scope ? QQuickItemPrivate::get(scope) : 0; - QSGItem *oldActiveFocusItem = 0; - QSGItem *newActiveFocusItem = 0; + QQuickItem *oldActiveFocusItem = 0; + QQuickItem *newActiveFocusItem = 0; - QVarLengthArray<QSGItem *, 20> changed; + QVarLengthArray<QQuickItem *, 20> changed; Q_ASSERT(item == rootItem || item == scopePrivate->subFocusItem); @@ -698,10 +698,10 @@ void QSGCanvasPrivate::clearFocusInScope(QSGItem *scope, QSGItem *item, FocusOpt QFocusEvent event(QEvent::FocusOut, Qt::OtherFocusReason); q->sendEvent(oldActiveFocusItem, &event); - QSGItem *afi = oldActiveFocusItem; + QQuickItem *afi = oldActiveFocusItem; while (afi != scope) { - if (QSGItemPrivate::get(afi)->activeFocus) { - QSGItemPrivate::get(afi)->activeFocus = false; + if (QQuickItemPrivate::get(afi)->activeFocus) { + QQuickItemPrivate::get(afi)->activeFocus = false; changed << afi; } afi = afi->parentItem(); @@ -709,23 +709,23 @@ void QSGCanvasPrivate::clearFocusInScope(QSGItem *scope, QSGItem *item, FocusOpt } if (item != rootItem) { - QSGItem *oldSubFocusItem = scopePrivate->subFocusItem; + QQuickItem *oldSubFocusItem = scopePrivate->subFocusItem; // Correct focus chain in scope if (oldSubFocusItem) { - QSGItem *sfi = scopePrivate->subFocusItem->parentItem(); + QQuickItem *sfi = scopePrivate->subFocusItem->parentItem(); while (sfi != scope) { - QSGItemPrivate::get(sfi)->subFocusItem = 0; + QQuickItemPrivate::get(sfi)->subFocusItem = 0; sfi = sfi->parentItem(); } } scopePrivate->subFocusItem = 0; if (oldSubFocusItem && !(options & DontChangeFocusProperty)) { - QSGItemPrivate::get(oldSubFocusItem)->focus = false; + QQuickItemPrivate::get(oldSubFocusItem)->focus = false; changed << oldSubFocusItem; } } else if (!(options & DontChangeFocusProperty)) { - QSGItemPrivate::get(item)->focus = false; + QQuickItemPrivate::get(item)->focus = false; changed << item; } @@ -745,15 +745,15 @@ void QSGCanvasPrivate::clearFocusInScope(QSGItem *scope, QSGItem *item, FocusOpt notifyFocusChangesRecur(changed.data(), changed.count() - 1); } -void QSGCanvasPrivate::notifyFocusChangesRecur(QSGItem **items, int remaining) +void QQuickCanvasPrivate::notifyFocusChangesRecur(QQuickItem **items, int remaining) { - QDeclarativeGuard<QSGItem> item(*items); + QDeclarativeGuard<QQuickItem> item(*items); if (remaining) notifyFocusChangesRecur(items + 1, remaining - 1); if (item) { - QSGItemPrivate *itemPrivate = QSGItemPrivate::get(item); + QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); if (itemPrivate->notifiedFocus != itemPrivate->focus) { itemPrivate->notifiedFocus = itemPrivate->focus; @@ -762,48 +762,48 @@ void QSGCanvasPrivate::notifyFocusChangesRecur(QSGItem **items, int remaining) if (item && itemPrivate->notifiedActiveFocus != itemPrivate->activeFocus) { itemPrivate->notifiedActiveFocus = itemPrivate->activeFocus; - itemPrivate->itemChange(QSGItem::ItemActiveFocusHasChanged, itemPrivate->activeFocus); + itemPrivate->itemChange(QQuickItem::ItemActiveFocusHasChanged, itemPrivate->activeFocus); emit item->activeFocusChanged(itemPrivate->activeFocus); } } } -void QSGCanvasPrivate::updateInputMethodData() +void QQuickCanvasPrivate::updateInputMethodData() { - QSGItem *inputItem = 0; - if (activeFocusItem && activeFocusItem->flags() & QSGItem::ItemAcceptsInputMethod) + QQuickItem *inputItem = 0; + if (activeFocusItem && activeFocusItem->flags() & QQuickItem::ItemAcceptsInputMethod) inputItem = activeFocusItem; qApp->inputPanel()->setInputItem(inputItem); } -QVariant QSGCanvas::inputMethodQuery(Qt::InputMethodQuery query) const +QVariant QQuickCanvas::inputMethodQuery(Qt::InputMethodQuery query) const { - Q_D(const QSGCanvas); - if (!d->activeFocusItem || !(QSGItemPrivate::get(d->activeFocusItem)->flags & QSGItem::ItemAcceptsInputMethod)) + Q_D(const QQuickCanvas); + if (!d->activeFocusItem || !(QQuickItemPrivate::get(d->activeFocusItem)->flags & QQuickItem::ItemAcceptsInputMethod)) return QVariant(); QVariant value = d->activeFocusItem->inputMethodQuery(query); //map geometry types QVariant::Type type = value.type(); if (type == QVariant::RectF || type == QVariant::Rect) { - const QTransform transform = QSGItemPrivate::get(d->activeFocusItem)->itemToCanvasTransform(); + const QTransform transform = QQuickItemPrivate::get(d->activeFocusItem)->itemToCanvasTransform(); value = transform.mapRect(value.toRectF()); } else if (type == QVariant::PointF || type == QVariant::Point) { - const QTransform transform = QSGItemPrivate::get(d->activeFocusItem)->itemToCanvasTransform(); + const QTransform transform = QQuickItemPrivate::get(d->activeFocusItem)->itemToCanvasTransform(); value = transform.map(value.toPointF()); } return value; } -void QSGCanvasPrivate::dirtyItem(QSGItem *) +void QQuickCanvasPrivate::dirtyItem(QQuickItem *) { - Q_Q(QSGCanvas); + Q_Q(QQuickCanvas); q->maybeUpdate(); } -void QSGCanvasPrivate::cleanup(QSGNode *n) +void QQuickCanvasPrivate::cleanup(QSGNode *n) { - Q_Q(QSGCanvas); + Q_Q(QQuickCanvas); Q_ASSERT(!cleanupNodeList.contains(n)); cleanupNodeList.append(n); @@ -811,23 +811,23 @@ void QSGCanvasPrivate::cleanup(QSGNode *n) } -QSGCanvas::QSGCanvas(QWindow *parent) - : QWindow(*(new QSGCanvasPrivate), parent) +QQuickCanvas::QQuickCanvas(QWindow *parent) + : QWindow(*(new QQuickCanvasPrivate), parent) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); d->init(this); } -QSGCanvas::QSGCanvas(QSGCanvasPrivate &dd, QWindow *parent) +QQuickCanvas::QQuickCanvas(QQuickCanvasPrivate &dd, QWindow *parent) : QWindow(dd, parent) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); d->init(this); } -QSGCanvas::~QSGCanvas() +QQuickCanvas::~QQuickCanvas() { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); if (d->thread->isRunning()) { d->thread->stopRendering(); @@ -835,9 +835,9 @@ QSGCanvas::~QSGCanvas() d->thread = 0; } - // ### should we change ~QSGItem to handle this better? + // ### should we change ~QQuickItem to handle this better? // manually cleanup for the root item (item destructor only handles these when an item is parented) - QSGItemPrivate *rootItemPrivate = QSGItemPrivate::get(d->rootItem); + QQuickItemPrivate *rootItemPrivate = QQuickItemPrivate::get(d->rootItem); rootItemPrivate->removeFromDirtyList(); delete d->incubationController; d->incubationController = 0; @@ -846,29 +846,29 @@ QSGCanvas::~QSGCanvas() d->cleanupNodes(); } -QSGItem *QSGCanvas::rootItem() const +QQuickItem *QQuickCanvas::rootItem() const { - Q_D(const QSGCanvas); + Q_D(const QQuickCanvas); return d->rootItem; } -QSGItem *QSGCanvas::activeFocusItem() const +QQuickItem *QQuickCanvas::activeFocusItem() const { - Q_D(const QSGCanvas); + Q_D(const QQuickCanvas); return d->activeFocusItem; } -QSGItem *QSGCanvas::mouseGrabberItem() const +QQuickItem *QQuickCanvas::mouseGrabberItem() const { - Q_D(const QSGCanvas); + Q_D(const QQuickCanvas); return d->mouseGrabberItem; } -bool QSGCanvasPrivate::clearHover() +bool QQuickCanvasPrivate::clearHover() { if (hoverItems.isEmpty()) return false; @@ -876,16 +876,16 @@ bool QSGCanvasPrivate::clearHover() QPointF pos = QCursor::pos(); // ### refactor: q->mapFromGlobal(QCursor::pos()); bool accepted = false; - foreach (QSGItem* item, hoverItems) + foreach (QQuickItem* item, hoverItems) accepted = sendHoverEvent(QEvent::HoverLeave, item, pos, pos, QGuiApplication::keyboardModifiers(), true) || accepted; hoverItems.clear(); return accepted; } -bool QSGCanvas::event(QEvent *e) +bool QQuickCanvas::event(QEvent *e) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); switch (e->type()) { @@ -920,47 +920,47 @@ bool QSGCanvas::event(QEvent *e) return QWindow::event(e); } -void QSGCanvas::keyPressEvent(QKeyEvent *e) +void QQuickCanvas::keyPressEvent(QKeyEvent *e) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); if (d->activeFocusItem) sendEvent(d->activeFocusItem, e); } -void QSGCanvas::keyReleaseEvent(QKeyEvent *e) +void QQuickCanvas::keyReleaseEvent(QKeyEvent *e) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); if (d->activeFocusItem) sendEvent(d->activeFocusItem, e); } -void QSGCanvas::inputMethodEvent(QInputMethodEvent *e) +void QQuickCanvas::inputMethodEvent(QInputMethodEvent *e) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); if (d->activeFocusItem) sendEvent(d->activeFocusItem, e); } -bool QSGCanvasPrivate::deliverInitialMousePressEvent(QSGItem *item, QMouseEvent *event) +bool QQuickCanvasPrivate::deliverInitialMousePressEvent(QQuickItem *item, QMouseEvent *event) { - Q_Q(QSGCanvas); + Q_Q(QQuickCanvas); - QSGItemPrivate *itemPrivate = QSGItemPrivate::get(item); + QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); if (itemPrivate->opacity == 0.0) return false; - if (itemPrivate->flags & QSGItem::ItemClipsChildrenToShape) { + if (itemPrivate->flags & QQuickItem::ItemClipsChildrenToShape) { QPointF p = item->mapFromScene(event->windowPos()); if (!QRectF(0, 0, item->width(), item->height()).contains(p)) return false; } - QList<QSGItem *> children = itemPrivate->paintOrderChildItems(); + QList<QQuickItem *> children = itemPrivate->paintOrderChildItems(); for (int ii = children.count() - 1; ii >= 0; --ii) { - QSGItem *child = children.at(ii); + QQuickItem *child = children.at(ii); if (!child->isVisible() || !child->isEnabled()) continue; if (deliverInitialMousePressEvent(child, event)) @@ -986,9 +986,9 @@ bool QSGCanvasPrivate::deliverInitialMousePressEvent(QSGItem *item, QMouseEvent return false; } -bool QSGCanvasPrivate::deliverMouseEvent(QMouseEvent *event) +bool QQuickCanvasPrivate::deliverMouseEvent(QMouseEvent *event) { - Q_Q(QSGCanvas); + Q_Q(QQuickCanvas); lastMousePosition = event->windowPos(); @@ -999,7 +999,7 @@ bool QSGCanvasPrivate::deliverMouseEvent(QMouseEvent *event) } if (mouseGrabberItem) { - QSGItemPrivate *mgPrivate = QSGItemPrivate::get(mouseGrabberItem); + QQuickItemPrivate *mgPrivate = QQuickItemPrivate::get(mouseGrabberItem); const QTransform &transform = mgPrivate->canvasToItemTransform(); QMouseEvent me(event->type(), transform.map(event->windowPos()), event->windowPos(), event->screenPos(), event->button(), event->buttons(), event->modifiers()); @@ -1013,23 +1013,23 @@ bool QSGCanvasPrivate::deliverMouseEvent(QMouseEvent *event) return false; } -void QSGCanvas::mousePressEvent(QMouseEvent *event) +void QQuickCanvas::mousePressEvent(QMouseEvent *event) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); #ifdef MOUSE_DEBUG - qWarning() << "QSGCanvas::mousePressEvent()" << event->pos() << event->button() << event->buttons(); + qWarning() << "QQuickCanvas::mousePressEvent()" << event->pos() << event->button() << event->buttons(); #endif d->deliverMouseEvent(event); } -void QSGCanvas::mouseReleaseEvent(QMouseEvent *event) +void QQuickCanvas::mouseReleaseEvent(QMouseEvent *event) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); #ifdef MOUSE_DEBUG - qWarning() << "QSGCanvas::mouseReleaseEvent()" << event->pos() << event->button() << event->buttons(); + qWarning() << "QQuickCanvas::mouseReleaseEvent()" << event->pos() << event->button() << event->buttons(); #endif if (!d->mouseGrabberItem) { @@ -1041,12 +1041,12 @@ void QSGCanvas::mouseReleaseEvent(QMouseEvent *event) d->mouseGrabberItem = 0; } -void QSGCanvas::mouseDoubleClickEvent(QMouseEvent *event) +void QQuickCanvas::mouseDoubleClickEvent(QMouseEvent *event) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); #ifdef MOUSE_DEBUG - qWarning() << "QSGCanvas::mouseDoubleClickEvent()" << event->pos() << event->button() << event->buttons(); + qWarning() << "QQuickCanvas::mouseDoubleClickEvent()" << event->pos() << event->button() << event->buttons(); #endif if (!d->mouseGrabberItem && (event->button() & event->buttons()) == event->buttons()) { @@ -1060,12 +1060,12 @@ void QSGCanvas::mouseDoubleClickEvent(QMouseEvent *event) d->deliverMouseEvent(event); } -bool QSGCanvasPrivate::sendHoverEvent(QEvent::Type type, QSGItem *item, +bool QQuickCanvasPrivate::sendHoverEvent(QEvent::Type type, QQuickItem *item, const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, bool accepted) { - Q_Q(QSGCanvas); - const QTransform transform = QSGItemPrivate::get(item)->canvasToItemTransform(); + Q_Q(QQuickCanvas); + const QTransform transform = QQuickItemPrivate::get(item)->canvasToItemTransform(); //create copy of event QHoverEvent hoverEvent(type, transform.map(scenePos), transform.map(lastScenePos), modifiers); @@ -1076,12 +1076,12 @@ bool QSGCanvasPrivate::sendHoverEvent(QEvent::Type type, QSGItem *item, return hoverEvent.isAccepted(); } -void QSGCanvas::mouseMoveEvent(QMouseEvent *event) +void QQuickCanvas::mouseMoveEvent(QMouseEvent *event) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); #ifdef MOUSE_DEBUG - qWarning() << "QSGCanvas::mouseMoveEvent()" << event->pos() << event->button() << event->buttons(); + qWarning() << "QQuickCanvas::mouseMoveEvent()" << event->pos() << event->button() << event->buttons(); #endif if (!d->mouseGrabberItem) { @@ -1103,22 +1103,22 @@ void QSGCanvas::mouseMoveEvent(QMouseEvent *event) d->deliverMouseEvent(event); } -bool QSGCanvasPrivate::deliverHoverEvent(QSGItem *item, const QPointF &scenePos, const QPointF &lastScenePos, +bool QQuickCanvasPrivate::deliverHoverEvent(QQuickItem *item, const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, bool &accepted) { - QSGItemPrivate *itemPrivate = QSGItemPrivate::get(item); + QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); if (itemPrivate->opacity == 0.0) return false; - if (itemPrivate->flags & QSGItem::ItemClipsChildrenToShape) { + if (itemPrivate->flags & QQuickItem::ItemClipsChildrenToShape) { QPointF p = item->mapFromScene(scenePos); if (!QRectF(0, 0, item->width(), item->height()).contains(p)) return false; } - QList<QSGItem *> children = itemPrivate->paintOrderChildItems(); + QList<QQuickItem *> children = itemPrivate->paintOrderChildItems(); for (int ii = children.count() - 1; ii >= 0; --ii) { - QSGItem *child = children.at(ii); + QQuickItem *child = children.at(ii); if (!child->isVisible() || !child->isEnabled()) continue; if (deliverHoverEvent(child, scenePos, lastScenePos, modifiers, accepted)) @@ -1132,8 +1132,8 @@ bool QSGCanvasPrivate::deliverHoverEvent(QSGItem *item, const QPointF &scenePos, //move accepted = sendHoverEvent(QEvent::HoverMove, item, scenePos, lastScenePos, modifiers, accepted); } else { - QList<QSGItem *> itemsToHover; - QSGItem* parent = item; + QList<QQuickItem *> itemsToHover; + QQuickItem* parent = item; itemsToHover << item; while ((parent = parent->parentItem())) itemsToHover << parent; @@ -1156,8 +1156,8 @@ bool QSGCanvasPrivate::deliverHoverEvent(QSGItem *item, const QPointF &scenePos, startIdx = itemsToHover.count() - 1; for (int i = startIdx; i >= 0; i--) { - QSGItem *itemToHover = itemsToHover[i]; - if (QSGItemPrivate::get(itemToHover)->hoverEnabled) { + QQuickItem *itemToHover = itemsToHover[i]; + if (QQuickItemPrivate::get(itemToHover)->hoverEnabled) { hoverItems.prepend(itemToHover); sendHoverEvent(QEvent::HoverEnter, itemToHover, scenePos, lastScenePos, modifiers, accepted); } @@ -1171,22 +1171,22 @@ bool QSGCanvasPrivate::deliverHoverEvent(QSGItem *item, const QPointF &scenePos, return false; } -bool QSGCanvasPrivate::deliverWheelEvent(QSGItem *item, QWheelEvent *event) +bool QQuickCanvasPrivate::deliverWheelEvent(QQuickItem *item, QWheelEvent *event) { - Q_Q(QSGCanvas); - QSGItemPrivate *itemPrivate = QSGItemPrivate::get(item); + Q_Q(QQuickCanvas); + QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); if (itemPrivate->opacity == 0.0) return false; - if (itemPrivate->flags & QSGItem::ItemClipsChildrenToShape) { + if (itemPrivate->flags & QQuickItem::ItemClipsChildrenToShape) { QPointF p = item->mapFromScene(event->posF()); if (!QRectF(0, 0, item->width(), item->height()).contains(p)) return false; } - QList<QSGItem *> children = itemPrivate->paintOrderChildItems(); + QList<QQuickItem *> children = itemPrivate->paintOrderChildItems(); for (int ii = children.count() - 1; ii >= 0; --ii) { - QSGItem *child = children.at(ii); + QQuickItem *child = children.at(ii); if (!child->isVisible() || !child->isEnabled()) continue; if (deliverWheelEvent(child, event)) @@ -1208,18 +1208,18 @@ bool QSGCanvasPrivate::deliverWheelEvent(QSGItem *item, QWheelEvent *event) } #ifndef QT_NO_WHEELEVENT -void QSGCanvas::wheelEvent(QWheelEvent *event) +void QQuickCanvas::wheelEvent(QWheelEvent *event) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); #ifdef MOUSE_DEBUG - qWarning() << "QSGCanvas::wheelEvent()" << event->pos() << event->delta() << event->orientation(); + qWarning() << "QQuickCanvas::wheelEvent()" << event->pos() << event->delta() << event->orientation(); #endif event->ignore(); d->deliverWheelEvent(d->rootItem, event); } #endif // QT_NO_WHEELEVENT -bool QSGCanvasPrivate::deliverTouchEvent(QTouchEvent *event) +bool QQuickCanvasPrivate::deliverTouchEvent(QTouchEvent *event) { #ifdef TOUCH_DEBUG if (event->type() == QEvent::TouchBegin) @@ -1230,7 +1230,7 @@ bool QSGCanvasPrivate::deliverTouchEvent(QTouchEvent *event) qWarning("touchEndEvent"); #endif - QHash<QSGItem *, QList<QTouchEvent::TouchPoint> > updatedPoints; + QHash<QQuickItem *, QList<QTouchEvent::TouchPoint> > updatedPoints; if (event->type() == QTouchEvent::TouchBegin) { // all points are new touch points QSet<int> acceptedNewPoints; @@ -1242,7 +1242,7 @@ bool QSGCanvasPrivate::deliverTouchEvent(QTouchEvent *event) const QList<QTouchEvent::TouchPoint> &touchPoints = event->touchPoints(); QList<QTouchEvent::TouchPoint> newPoints; - QSGItem *item = 0; + QQuickItem *item = 0; for (int i=0; i<touchPoints.count(); i++) { const QTouchEvent::TouchPoint &touchPoint = touchPoints[i]; switch (touchPoint.state()) { @@ -1281,15 +1281,15 @@ bool QSGCanvasPrivate::deliverTouchEvent(QTouchEvent *event) return event->isAccepted(); } -bool QSGCanvasPrivate::deliverTouchPoints(QSGItem *item, QTouchEvent *event, const QList<QTouchEvent::TouchPoint> &newPoints, QSet<int> *acceptedNewPoints, QHash<QSGItem *, QList<QTouchEvent::TouchPoint> > *updatedPoints) +bool QQuickCanvasPrivate::deliverTouchPoints(QQuickItem *item, QTouchEvent *event, const QList<QTouchEvent::TouchPoint> &newPoints, QSet<int> *acceptedNewPoints, QHash<QQuickItem *, QList<QTouchEvent::TouchPoint> > *updatedPoints) { - Q_Q(QSGCanvas); - QSGItemPrivate *itemPrivate = QSGItemPrivate::get(item); + Q_Q(QQuickCanvas); + QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); if (itemPrivate->opacity == 0.0) return false; - if (itemPrivate->flags & QSGItem::ItemClipsChildrenToShape) { + if (itemPrivate->flags & QQuickItem::ItemClipsChildrenToShape) { QRectF bounds(0, 0, item->width(), item->height()); for (int i=0; i<newPoints.count(); i++) { QPointF p = item->mapFromScene(newPoints[i].scenePos()); @@ -1298,9 +1298,9 @@ bool QSGCanvasPrivate::deliverTouchPoints(QSGItem *item, QTouchEvent *event, con } } - QList<QSGItem *> children = itemPrivate->paintOrderChildItems(); + QList<QQuickItem *> children = itemPrivate->paintOrderChildItems(); for (int ii = children.count() - 1; ii >= 0; --ii) { - QSGItem *child = children.at(ii); + QQuickItem *child = children.at(ii); if (!child->isEnabled()) continue; if (deliverTouchPoints(child, event, newPoints, acceptedNewPoints, updatedPoints)) @@ -1369,11 +1369,11 @@ bool QSGCanvasPrivate::deliverTouchPoints(QSGItem *item, QTouchEvent *event, con return false; } -void QSGCanvasPrivate::deliverDragEvent(QSGDragGrabber *grabber, QEvent *event) +void QQuickCanvasPrivate::deliverDragEvent(QQuickDragGrabber *grabber, QEvent *event) { - Q_Q(QSGCanvas); + Q_Q(QQuickCanvas); grabber->resetTarget(); - QSGDragGrabber::iterator grabItem = grabber->begin(); + QQuickDragGrabber::iterator grabItem = grabber->begin(); if (grabItem != grabber->end()) { Q_ASSERT(event->type() != QEvent::DragEnter); if (event->type() == QEvent::Drop) { @@ -1386,7 +1386,7 @@ void QSGCanvasPrivate::deliverDragEvent(QSGDragGrabber *grabber, QEvent *event) e->mimeData(), e->mouseButtons(), e->keyboardModifiers()); - QSGDropEventEx::copyActions(&translatedEvent, *e); + QQuickDropEventEx::copyActions(&translatedEvent, *e); q->sendEvent(**grabItem, &translatedEvent); e->setAccepted(translatedEvent.isAccepted()); e->setDropAction(translatedEvent.dropAction()); @@ -1411,7 +1411,7 @@ void QSGCanvasPrivate::deliverDragEvent(QSGDragGrabber *grabber, QEvent *event) moveEvent->mimeData(), moveEvent->mouseButtons(), moveEvent->keyboardModifiers()); - QSGDropEventEx::copyActions(&translatedEvent, *moveEvent); + QQuickDropEventEx::copyActions(&translatedEvent, *moveEvent); q->sendEvent(**grabItem, &translatedEvent); ++grabItem; } else { @@ -1435,22 +1435,22 @@ void QSGCanvasPrivate::deliverDragEvent(QSGDragGrabber *grabber, QEvent *event) e->mimeData(), e->mouseButtons(), e->keyboardModifiers()); - QSGDropEventEx::copyActions(&enterEvent, *e); + QQuickDropEventEx::copyActions(&enterEvent, *e); event->setAccepted(deliverDragEvent(grabber, rootItem, &enterEvent)); } } -bool QSGCanvasPrivate::deliverDragEvent(QSGDragGrabber *grabber, QSGItem *item, QDragMoveEvent *event) +bool QQuickCanvasPrivate::deliverDragEvent(QQuickDragGrabber *grabber, QQuickItem *item, QDragMoveEvent *event) { - Q_Q(QSGCanvas); + Q_Q(QQuickCanvas); bool accepted = false; - QSGItemPrivate *itemPrivate = QSGItemPrivate::get(item); + QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); if (itemPrivate->opacity == 0.0 || !item->isVisible() || !item->isEnabled()) return false; QPointF p = item->mapFromScene(event->pos()); if (QRectF(0, 0, item->width(), item->height()).contains(p)) { - if (event->type() == QEvent::DragMove || itemPrivate->flags & QSGItem::ItemAcceptsDrops) { + if (event->type() == QEvent::DragMove || itemPrivate->flags & QQuickItem::ItemAcceptsDrops) { QDragMoveEvent translatedEvent( p.toPoint(), event->possibleActions(), @@ -1458,7 +1458,7 @@ bool QSGCanvasPrivate::deliverDragEvent(QSGDragGrabber *grabber, QSGItem *item, event->mouseButtons(), event->keyboardModifiers(), event->type()); - QSGDropEventEx::copyActions(&translatedEvent, *event); + QQuickDropEventEx::copyActions(&translatedEvent, *event); q->sendEvent(item, &translatedEvent); if (event->type() == QEvent::DragEnter) { if (translatedEvent.isAccepted()) { @@ -1469,7 +1469,7 @@ bool QSGCanvasPrivate::deliverDragEvent(QSGDragGrabber *grabber, QSGItem *item, accepted = true; } } - } else if (itemPrivate->flags & QSGItem::ItemClipsChildrenToShape) { + } else if (itemPrivate->flags & QQuickItem::ItemClipsChildrenToShape) { return false; } @@ -1479,8 +1479,8 @@ bool QSGCanvasPrivate::deliverDragEvent(QSGDragGrabber *grabber, QSGItem *item, event->mimeData(), event->mouseButtons(), event->keyboardModifiers()); - QSGDropEventEx::copyActions(&enterEvent, *event); - QList<QSGItem *> children = itemPrivate->paintOrderChildItems(); + QQuickDropEventEx::copyActions(&enterEvent, *event); + QList<QQuickItem *> children = itemPrivate->paintOrderChildItems(); for (int ii = children.count() - 1; ii >= 0; --ii) { if (deliverDragEvent(grabber, children.at(ii), &enterEvent)) return true; @@ -1489,12 +1489,12 @@ bool QSGCanvasPrivate::deliverDragEvent(QSGDragGrabber *grabber, QSGItem *item, return accepted; } -bool QSGCanvasPrivate::sendFilteredMouseEvent(QSGItem *target, QSGItem *item, QMouseEvent *event) +bool QQuickCanvasPrivate::sendFilteredMouseEvent(QQuickItem *target, QQuickItem *item, QMouseEvent *event) { if (!target) return false; - QSGItemPrivate *targetPrivate = QSGItemPrivate::get(target); + QQuickItemPrivate *targetPrivate = QQuickItemPrivate::get(target); if (targetPrivate->filtersChildMouseEvents) if (target->childMouseEventFilter(item, event)) return true; @@ -1505,12 +1505,12 @@ bool QSGCanvasPrivate::sendFilteredMouseEvent(QSGItem *target, QSGItem *item, QM return false; } -bool QSGCanvas::sendEvent(QSGItem *item, QEvent *e) +bool QQuickCanvas::sendEvent(QQuickItem *item, QEvent *e) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); if (!item) { - qWarning("QSGCanvas::sendEvent: Cannot send event to a null item"); + qWarning("QQuickCanvas::sendEvent: Cannot send event to a null item"); return false; } @@ -1520,23 +1520,23 @@ bool QSGCanvas::sendEvent(QSGItem *item, QEvent *e) case QEvent::KeyPress: case QEvent::KeyRelease: e->accept(); - QSGItemPrivate::get(item)->deliverKeyEvent(static_cast<QKeyEvent *>(e)); + QQuickItemPrivate::get(item)->deliverKeyEvent(static_cast<QKeyEvent *>(e)); while (!e->isAccepted() && (item = item->parentItem())) { e->accept(); - QSGItemPrivate::get(item)->deliverKeyEvent(static_cast<QKeyEvent *>(e)); + QQuickItemPrivate::get(item)->deliverKeyEvent(static_cast<QKeyEvent *>(e)); } break; case QEvent::InputMethod: e->accept(); - QSGItemPrivate::get(item)->deliverInputMethodEvent(static_cast<QInputMethodEvent *>(e)); + QQuickItemPrivate::get(item)->deliverInputMethodEvent(static_cast<QInputMethodEvent *>(e)); while (!e->isAccepted() && (item = item->parentItem())) { e->accept(); - QSGItemPrivate::get(item)->deliverInputMethodEvent(static_cast<QInputMethodEvent *>(e)); + QQuickItemPrivate::get(item)->deliverInputMethodEvent(static_cast<QInputMethodEvent *>(e)); } break; case QEvent::FocusIn: case QEvent::FocusOut: - QSGItemPrivate::get(item)->deliverFocusEvent(static_cast<QFocusEvent *>(e)); + QQuickItemPrivate::get(item)->deliverFocusEvent(static_cast<QFocusEvent *>(e)); break; case QEvent::MouseButtonPress: case QEvent::MouseButtonRelease: @@ -1547,28 +1547,28 @@ bool QSGCanvas::sendEvent(QSGItem *item, QEvent *e) QMouseEvent *se = static_cast<QMouseEvent *>(e); if (!d->sendFilteredMouseEvent(item->parentItem(), item, se)) { se->accept(); - QSGItemPrivate::get(item)->deliverMouseEvent(se); + QQuickItemPrivate::get(item)->deliverMouseEvent(se); } } break; case QEvent::Wheel: - QSGItemPrivate::get(item)->deliverWheelEvent(static_cast<QWheelEvent *>(e)); + QQuickItemPrivate::get(item)->deliverWheelEvent(static_cast<QWheelEvent *>(e)); break; case QEvent::HoverEnter: case QEvent::HoverLeave: case QEvent::HoverMove: - QSGItemPrivate::get(item)->deliverHoverEvent(static_cast<QHoverEvent *>(e)); + QQuickItemPrivate::get(item)->deliverHoverEvent(static_cast<QHoverEvent *>(e)); break; case QEvent::TouchBegin: case QEvent::TouchUpdate: case QEvent::TouchEnd: - QSGItemPrivate::get(item)->deliverTouchEvent(static_cast<QTouchEvent *>(e)); + QQuickItemPrivate::get(item)->deliverTouchEvent(static_cast<QTouchEvent *>(e)); break; case QEvent::DragEnter: case QEvent::DragMove: case QEvent::DragLeave: case QEvent::Drop: - QSGItemPrivate::get(item)->deliverDragEvent(e); + QQuickItemPrivate::get(item)->deliverDragEvent(e); break; default: break; @@ -1577,28 +1577,28 @@ bool QSGCanvas::sendEvent(QSGItem *item, QEvent *e) return false; } -void QSGCanvasPrivate::cleanupNodes() +void QQuickCanvasPrivate::cleanupNodes() { for (int ii = 0; ii < cleanupNodeList.count(); ++ii) delete cleanupNodeList.at(ii); cleanupNodeList.clear(); } -void QSGCanvasPrivate::updateDirtyNodes() +void QQuickCanvasPrivate::updateDirtyNodes() { #ifdef DIRTY_DEBUG - qWarning() << "QSGCanvasPrivate::updateDirtyNodes():"; + qWarning() << "QQuickCanvasPrivate::updateDirtyNodes():"; #endif cleanupNodes(); - QSGItem *updateList = dirtyItemList; + QQuickItem *updateList = dirtyItemList; dirtyItemList = 0; - if (updateList) QSGItemPrivate::get(updateList)->prevDirtyItem = &updateList; + if (updateList) QQuickItemPrivate::get(updateList)->prevDirtyItem = &updateList; while (updateList) { - QSGItem *item = updateList; - QSGItemPrivate *itemPriv = QSGItemPrivate::get(item); + QQuickItem *item = updateList; + QQuickItemPrivate *itemPriv = QQuickItemPrivate::get(item); itemPriv->removeFromDirtyList(); #ifdef DIRTY_DEBUG @@ -1608,18 +1608,18 @@ void QSGCanvasPrivate::updateDirtyNodes() } } -void QSGCanvasPrivate::updateDirtyNode(QSGItem *item) +void QQuickCanvasPrivate::updateDirtyNode(QQuickItem *item) { #ifdef QML_RUNTIME_TESTING bool didFlash = false; #endif - QSGItemPrivate *itemPriv = QSGItemPrivate::get(item); + QQuickItemPrivate *itemPriv = QQuickItemPrivate::get(item); quint32 dirty = itemPriv->dirtyAttributes; itemPriv->dirtyAttributes = 0; - if ((dirty & QSGItemPrivate::TransformUpdateMask) || - (dirty & QSGItemPrivate::Size && itemPriv->origin != QSGItem::TopLeft && + if ((dirty & QQuickItemPrivate::TransformUpdateMask) || + (dirty & QQuickItemPrivate::Size && itemPriv->origin != QQuickItem::TopLeft && (itemPriv->scale != 1. || itemPriv->rotation != 0.))) { QMatrix4x4 matrix; @@ -1643,9 +1643,9 @@ void QSGCanvasPrivate::updateDirtyNode(QSGItem *item) itemPriv->itemNode()->setMatrix(matrix); } - bool clipEffectivelyChanged = dirty & QSGItemPrivate::Clip && + bool clipEffectivelyChanged = dirty & QQuickItemPrivate::Clip && ((item->clip() == false) != (itemPriv->clipNode == 0)); - bool effectRefEffectivelyChanged = dirty & QSGItemPrivate::EffectReference && + bool effectRefEffectivelyChanged = dirty & QQuickItemPrivate::EffectReference && ((itemPriv->effectRefCount == 0) != (itemPriv->rootNode == 0)); if (clipEffectivelyChanged) { @@ -1654,7 +1654,7 @@ void QSGCanvasPrivate::updateDirtyNode(QSGItem *item) if (item->clip()) { Q_ASSERT(itemPriv->clipNode == 0); - itemPriv->clipNode = new QSGDefaultClipNode(item->boundingRect()); + itemPriv->clipNode = new QQuickDefaultClipNode(item->boundingRect()); itemPriv->clipNode->update(); if (child) @@ -1675,7 +1675,7 @@ void QSGCanvasPrivate::updateDirtyNode(QSGItem *item) } } - if (dirty & QSGItemPrivate::ChildrenUpdateMask) + if (dirty & QQuickItemPrivate::ChildrenUpdateMask) itemPriv->childContainerNode()->removeAllChildNodes(); if (effectRefEffectivelyChanged) { @@ -1707,16 +1707,16 @@ void QSGCanvasPrivate::updateDirtyNode(QSGItem *item) } } - if (dirty & QSGItemPrivate::ChildrenUpdateMask) { + if (dirty & QQuickItemPrivate::ChildrenUpdateMask) { QSGNode *groupNode = itemPriv->groupNode; if (groupNode) groupNode->removeAllChildNodes(); - QList<QSGItem *> orderedChildren = itemPriv->paintOrderChildItems(); + QList<QQuickItem *> orderedChildren = itemPriv->paintOrderChildItems(); int ii = 0; for (; ii < orderedChildren.count() && orderedChildren.at(ii)->z() < 0; ++ii) { - QSGItemPrivate *childPrivate = QSGItemPrivate::get(orderedChildren.at(ii)); + QQuickItemPrivate *childPrivate = QQuickItemPrivate::get(orderedChildren.at(ii)); if (!childPrivate->explicitVisible && !childPrivate->effectRefCount) continue; if (childPrivate->itemNode()->parent()) @@ -1730,7 +1730,7 @@ void QSGCanvasPrivate::updateDirtyNode(QSGItem *item) itemPriv->childContainerNode()->appendChildNode(itemPriv->paintNode); for (; ii < orderedChildren.count(); ++ii) { - QSGItemPrivate *childPrivate = QSGItemPrivate::get(orderedChildren.at(ii)); + QQuickItemPrivate *childPrivate = QQuickItemPrivate::get(orderedChildren.at(ii)); if (!childPrivate->explicitVisible && !childPrivate->effectRefCount) continue; if (childPrivate->itemNode()->parent()) @@ -1740,12 +1740,12 @@ void QSGCanvasPrivate::updateDirtyNode(QSGItem *item) } } - if ((dirty & QSGItemPrivate::Size) && itemPriv->clipNode) { + if ((dirty & QQuickItemPrivate::Size) && itemPriv->clipNode) { itemPriv->clipNode->setRect(item->boundingRect()); itemPriv->clipNode->update(); } - if (dirty & (QSGItemPrivate::OpacityValue | QSGItemPrivate::Visible | QSGItemPrivate::HideReference)) { + if (dirty & (QQuickItemPrivate::OpacityValue | QQuickItemPrivate::Visible | QQuickItemPrivate::HideReference)) { qreal opacity = itemPriv->explicitVisible && itemPriv->hideRefCount == 0 ? itemPriv->opacity : qreal(0); @@ -1769,9 +1769,9 @@ void QSGCanvasPrivate::updateDirtyNode(QSGItem *item) itemPriv->opacityNode->setOpacity(opacity); } - if (dirty & QSGItemPrivate::ContentUpdateMask) { + if (dirty & QQuickItemPrivate::ContentUpdateMask) { - if (itemPriv->flags & QSGItem::ItemHasContents) { + if (itemPriv->flags & QQuickItem::ItemHasContents) { updatePaintNodeData.transformNode = itemPriv->itemNode(); itemPriv->paintNode = item->updatePaintNode(itemPriv->paintNode, &updatePaintNodeData); @@ -1834,7 +1834,7 @@ void QSGCanvasPrivate::updateDirtyNode(QSGItem *item) itemPriv->childContainerNode()->appendChildNode(flash); didFlash = true; } - Q_Q(QSGCanvas); + Q_Q(QQuickCanvas); if (didFlash) { q->maybeUpdate(); } @@ -1842,9 +1842,9 @@ void QSGCanvasPrivate::updateDirtyNode(QSGItem *item) } -void QSGCanvas::maybeUpdate() +void QQuickCanvas::maybeUpdate() { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); if (d->thread && d->thread->isRunning()) d->thread->maybeUpdate(); @@ -1866,9 +1866,9 @@ void QSGCanvas::maybeUpdate() notification about this. */ -QSGEngine *QSGCanvas::sceneGraphEngine() const +QSGEngine *QQuickCanvas::sceneGraphEngine() const { - Q_D(const QSGCanvas); + Q_D(const QQuickCanvas); if (d->context && d->context->isReady()) return d->context->engine(); return 0; @@ -1887,11 +1887,11 @@ QSGEngine *QSGCanvas::sceneGraphEngine() const the rendering. */ -void QSGCanvas::setRenderTarget(QOpenGLFramebufferObject *fbo) +void QQuickCanvas::setRenderTarget(QOpenGLFramebufferObject *fbo) { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); if (d->context && d->context && QThread::currentThread() != d->context->thread()) { - qWarning("QSGCanvas::setRenderThread: Cannot set render target from outside the rendering thread"); + qWarning("QQuickCanvas::setRenderThread: Cannot set render target from outside the rendering thread"); return; } @@ -1906,9 +1906,9 @@ void QSGCanvas::setRenderTarget(QOpenGLFramebufferObject *fbo) The default is to render to the surface of the canvas, in which case the render target is 0. */ -QOpenGLFramebufferObject *QSGCanvas::renderTarget() const +QOpenGLFramebufferObject *QQuickCanvas::renderTarget() const { - Q_D(const QSGCanvas); + Q_D(const QQuickCanvas); return d->renderTarget; } @@ -1922,37 +1922,37 @@ QOpenGLFramebufferObject *QSGCanvas::renderTarget() const \warning This function can only be called from the GUI thread. */ -QImage QSGCanvas::grabFrameBuffer() +QImage QQuickCanvas::grabFrameBuffer() { - Q_D(QSGCanvas); + Q_D(QQuickCanvas); return d->thread ? d->thread->grab() : QImage(); } /*! Returns an incubation controller that splices incubation between frames - for this canvas. QSGView automatically installs this controller for you. + for this canvas. QQuickView automatically installs this controller for you. The controller is owned by the canvas and will be destroyed when the canvas is deleted. */ -QDeclarativeIncubationController *QSGCanvas::incubationController() const +QDeclarativeIncubationController *QQuickCanvas::incubationController() const { - Q_D(const QSGCanvas); + Q_D(const QQuickCanvas); if (!d->incubationController) - d->incubationController = new QSGCanvasIncubationController(const_cast<QSGCanvasPrivate *>(d)); + d->incubationController = new QQuickCanvasIncubationController(const_cast<QQuickCanvasPrivate *>(d)); return d->incubationController; } -void QSGCanvasRenderLoop::createGLContext() +void QQuickCanvasRenderLoop::createGLContext() { gl = new QOpenGLContext(); gl->setFormat(renderer->requestedFormat()); gl->create(); } -void QSGCanvasRenderThread::run() +void QQuickCanvasRenderThread::run() { #ifdef THREAD_DEBUG qDebug("QML Rendering Thread Started"); @@ -2003,8 +2003,8 @@ void QSGCanvasRenderThread::run() #ifdef THREAD_DEBUG printf(" RenderThread: Doing locked sync\n"); #endif -#ifdef QSG_CANVAS_TIMING - if (qsg_canvas_timing) +#ifdef QQUICK_CANVAS_TIMING + if (qquick_canvas_timing) threadTimer.start(); #endif inSync = true; @@ -2018,8 +2018,8 @@ void QSGCanvasRenderThread::run() #ifdef THREAD_DEBUG printf(" RenderThread: sync done\n"); #endif -#ifdef QSG_CANVAS_TIMING - if (qsg_canvas_timing) +#ifdef QQUICK_CANVAS_TIMING + if (qquick_canvas_timing) syncTime = threadTimer.elapsed(); #endif @@ -2028,8 +2028,8 @@ void QSGCanvasRenderThread::run() #endif renderSceneGraph(windowSize); -#ifdef QSG_CANVAS_TIMING - if (qsg_canvas_timing) +#ifdef QQUICK_CANVAS_TIMING + if (qquick_canvas_timing) renderTime = threadTimer.elapsed() - syncTime; #endif @@ -2051,8 +2051,8 @@ void QSGCanvasRenderThread::run() #ifdef THREAD_DEBUG printf(" RenderThread: swap complete...\n"); #endif -#ifdef QSG_CANVAS_TIMING - if (qsg_canvas_timing) { +#ifdef QQUICK_CANVAS_TIMING + if (qquick_canvas_timing) { swapTime = threadTimer.elapsed() - renderTime; qDebug() << "- Breakdown of frame time: sync:" << syncTime << "ms render:" << renderTime << "ms swap:" << swapTime @@ -2107,7 +2107,7 @@ void QSGCanvasRenderThread::run() -bool QSGCanvasRenderThread::event(QEvent *e) +bool QQuickCanvasRenderThread::event(QEvent *e) { Q_ASSERT(QThread::currentThread() == qApp->thread()); @@ -2137,7 +2137,7 @@ bool QSGCanvasRenderThread::event(QEvent *e) -void QSGCanvasRenderThread::exhaustSyncEvent() +void QQuickCanvasRenderThread::exhaustSyncEvent() { if (isGuiBlockPending) { sync(true); @@ -2147,7 +2147,7 @@ void QSGCanvasRenderThread::exhaustSyncEvent() -void QSGCanvasRenderThread::sync(bool guiAlreadyLocked) +void QQuickCanvasRenderThread::sync(bool guiAlreadyLocked) { #ifdef THREAD_DEBUG printf("GUI: sync - %s\n", guiAlreadyLocked ? "outside event" : "inside event"); @@ -2176,7 +2176,7 @@ void QSGCanvasRenderThread::sync(bool guiAlreadyLocked) ourselves. */ -void QSGCanvasRenderThread::lockInGui() +void QQuickCanvasRenderThread::lockInGui() { // We must avoid recursive locking in the GUI thread, hence we // only lock when we are the first one to try to block. @@ -2192,7 +2192,7 @@ void QSGCanvasRenderThread::lockInGui() -void QSGCanvasRenderThread::unlockInGui() +void QQuickCanvasRenderThread::unlockInGui() { #ifdef THREAD_DEBUG printf("GUI: releasing lock... %d\n", isGuiBlocked); @@ -2205,7 +2205,7 @@ void QSGCanvasRenderThread::unlockInGui() -void QSGCanvasRenderThread::animationStarted() +void QQuickCanvasRenderThread::animationStarted() { #ifdef THREAD_DEBUG printf("GUI: animationStarted()\n"); @@ -2223,7 +2223,7 @@ void QSGCanvasRenderThread::animationStarted() -void QSGCanvasRenderThread::animationStopped() +void QQuickCanvasRenderThread::animationStopped() { #ifdef THREAD_DEBUG printf("GUI: animationStopped()...\n"); @@ -2235,7 +2235,7 @@ void QSGCanvasRenderThread::animationStopped() } -void QSGCanvasRenderThread::paint() +void QQuickCanvasRenderThread::paint() { #ifdef THREAD_DEBUG printf("GUI: paint called..\n"); @@ -2255,7 +2255,7 @@ void QSGCanvasRenderThread::paint() -void QSGCanvasRenderThread::resize(const QSize &size) +void QQuickCanvasRenderThread::resize(const QSize &size) { #ifdef THREAD_DEBUG printf("GUI: Resize Event: %dx%d\n", size.width(), size.height()); @@ -2281,7 +2281,7 @@ void QSGCanvasRenderThread::resize(const QSize &size) -void QSGCanvasRenderThread::startRendering() +void QQuickCanvasRenderThread::startRendering() { #ifdef THREAD_DEBUG printf("GUI: Starting Render Thread\n"); @@ -2295,7 +2295,7 @@ void QSGCanvasRenderThread::startRendering() -void QSGCanvasRenderThread::stopRendering() +void QQuickCanvasRenderThread::stopRendering() { #ifdef THREAD_DEBUG printf("GUI: stopping render thread\n"); @@ -2336,13 +2336,13 @@ void QSGCanvasRenderThread::stopRendering() -QImage QSGCanvasRenderThread::grab() +QImage QQuickCanvasRenderThread::grab() { if (!isRunning()) return QImage(); if (QThread::currentThread() != qApp->thread()) { - qWarning("QSGCanvas::grabFrameBuffer: can only be called from the GUI thread"); + qWarning("QQuickCanvas::grabFrameBuffer: can only be called from the GUI thread"); return QImage(); } @@ -2371,11 +2371,11 @@ QImage QSGCanvasRenderThread::grab() -void QSGCanvasRenderThread::maybeUpdate() +void QQuickCanvasRenderThread::maybeUpdate() { Q_ASSERT_X(QThread::currentThread() == QCoreApplication::instance()->thread() || inSync, - "QSGCanvas::update", - "Function can only be called from GUI thread or during QSGItem::updatePaintNode()"); + "QQuickCanvas::update", + "Function can only be called from GUI thread or during QQuickItem::updatePaintNode()"); if (inSync) { isExternalUpdatePending = true; @@ -2394,6 +2394,6 @@ void QSGCanvasRenderThread::maybeUpdate() } -#include "moc_qsgcanvas.cpp" +#include "moc_qquickcanvas.cpp" QT_END_NAMESPACE diff --git a/src/declarative/items/qsgcanvas.h b/src/declarative/items/qquickcanvas.h index 094fe40553..8b69744161 100644 --- a/src/declarative/items/qsgcanvas.h +++ b/src/declarative/items/qquickcanvas.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QSGCANVAS_H -#define QSGCANVAS_H +#ifndef QQUICKCANVAS_H +#define QQUICKCANVAS_H #include <QtCore/qmetatype.h> #include <QtGui/qopengl.h> @@ -52,27 +52,27 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGItem; +class QQuickItem; class QSGEngine; -class QSGCanvasPrivate; +class QQuickCanvasPrivate; class QOpenGLFramebufferObject; class QDeclarativeIncubationController; -class Q_DECLARATIVE_EXPORT QSGCanvas : public QWindow +class Q_DECLARATIVE_EXPORT QQuickCanvas : public QWindow { Q_OBJECT -Q_DECLARE_PRIVATE(QSGCanvas) +Q_DECLARE_PRIVATE(QQuickCanvas) public: - QSGCanvas(QWindow *parent = 0); + QQuickCanvas(QWindow *parent = 0); - virtual ~QSGCanvas(); + virtual ~QQuickCanvas(); - QSGItem *rootItem() const; - QSGItem *activeFocusItem() const; + QQuickItem *rootItem() const; + QQuickItem *activeFocusItem() const; - QSGItem *mouseGrabberItem() const; + QQuickItem *mouseGrabberItem() const; - bool sendEvent(QSGItem *, QEvent *); + bool sendEvent(QQuickItem *, QEvent *); QVariant inputMethodQuery(Qt::InputMethodQuery query) const; @@ -93,7 +93,7 @@ Q_SIGNALS: void sceneGraphInitialized(); protected: - QSGCanvas(QSGCanvasPrivate &dd, QWindow *parent = 0); + QQuickCanvas(QQuickCanvasPrivate &dd, QWindow *parent = 0); virtual void exposeEvent(QExposeEvent *); virtual void resizeEvent(QResizeEvent *); @@ -120,16 +120,16 @@ private Q_SLOTS: void animationStopped(); private: - friend class QSGItem; - friend class QSGCanvasRenderLoop; - Q_DISABLE_COPY(QSGCanvas) + friend class QQuickItem; + friend class QQuickCanvasRenderLoop; + Q_DISABLE_COPY(QQuickCanvas) }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QSGCanvas *) +Q_DECLARE_METATYPE(QQuickCanvas *) QT_END_HEADER -#endif // QSGCANVAS_H +#endif // QQUICKCANVAS_H diff --git a/src/declarative/items/qsgcanvas_p.h b/src/declarative/items/qquickcanvas_p.h index e2ec7a1963..5c68442f29 100644 --- a/src/declarative/items/qsgcanvas_p.h +++ b/src/declarative/items/qquickcanvas_p.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef QSGCANVAS_P_H -#define QSGCANVAS_P_H +#ifndef QQUICKCANVAS_P_H +#define QQUICKCANVAS_P_H // // W A R N I N G @@ -53,12 +53,12 @@ // We mean it. // -#include "qsgitem.h" -#include "qsgcanvas.h" +#include "qquickitem.h" +#include "qquickcanvas.h" #include <private/qdeclarativeguard_p.h> #include <private/qsgcontext_p.h> -#include <private/qsgdrag_p.h> +#include <private/qquickdrag_p.h> #include <QtCore/qthread.h> #include <QtCore/qmutex.h> @@ -73,69 +73,69 @@ QT_BEGIN_NAMESPACE //Make it easy to identify and customize the root item if needed -class QSGRootItem : public QSGItem +class QQuickRootItem : public QQuickItem { Q_OBJECT public: - QSGRootItem(); + QQuickRootItem(); }; -class QSGCanvasPrivate; +class QQuickCanvasPrivate; class QTouchEvent; -class QSGCanvasRenderLoop; -class QSGCanvasIncubationController; +class QQuickCanvasRenderLoop; +class QQuickCanvasIncubationController; -class QSGCanvasPrivate : public QWindowPrivate +class QQuickCanvasPrivate : public QWindowPrivate { public: - Q_DECLARE_PUBLIC(QSGCanvas) + Q_DECLARE_PUBLIC(QQuickCanvas) - static inline QSGCanvasPrivate *get(QSGCanvas *c) { return c->d_func(); } + static inline QQuickCanvasPrivate *get(QQuickCanvas *c) { return c->d_func(); } - QSGCanvasPrivate(); - virtual ~QSGCanvasPrivate(); + QQuickCanvasPrivate(); + virtual ~QQuickCanvasPrivate(); - void init(QSGCanvas *); + void init(QQuickCanvas *); - QSGRootItem *rootItem; + QQuickRootItem *rootItem; - QSGItem *activeFocusItem; - QSGItem *mouseGrabberItem; - QSGDragGrabber dragGrabber; + QQuickItem *activeFocusItem; + QQuickItem *mouseGrabberItem; + QQuickDragGrabber dragGrabber; // Mouse positions are saved in widget coordinates QPointF lastMousePosition; void translateTouchEvent(QTouchEvent *touchEvent); static void transformTouchPoints(QList<QTouchEvent::TouchPoint> &touchPoints, const QTransform &transform); - bool deliverInitialMousePressEvent(QSGItem *, QMouseEvent *); + bool deliverInitialMousePressEvent(QQuickItem *, QMouseEvent *); bool deliverMouseEvent(QMouseEvent *); - bool sendFilteredMouseEvent(QSGItem *, QSGItem *, QMouseEvent *); - bool deliverWheelEvent(QSGItem *, QWheelEvent *); - bool deliverTouchPoints(QSGItem *, QTouchEvent *, const QList<QTouchEvent::TouchPoint> &, QSet<int> *, - QHash<QSGItem *, QList<QTouchEvent::TouchPoint> > *); + bool sendFilteredMouseEvent(QQuickItem *, QQuickItem *, QMouseEvent *); + bool deliverWheelEvent(QQuickItem *, QWheelEvent *); + bool deliverTouchPoints(QQuickItem *, QTouchEvent *, const QList<QTouchEvent::TouchPoint> &, QSet<int> *, + QHash<QQuickItem *, QList<QTouchEvent::TouchPoint> > *); bool deliverTouchEvent(QTouchEvent *); - bool deliverHoverEvent(QSGItem *, const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, bool &accepted); - bool sendHoverEvent(QEvent::Type, QSGItem *, const QPointF &scenePos, const QPointF &lastScenePos, + bool deliverHoverEvent(QQuickItem *, const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, bool &accepted); + bool sendHoverEvent(QEvent::Type, QQuickItem *, const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, bool accepted); bool clearHover(); - void deliverDragEvent(QSGDragGrabber *, QEvent *); - bool deliverDragEvent(QSGDragGrabber *, QSGItem *, QDragMoveEvent *); + void deliverDragEvent(QQuickDragGrabber *, QEvent *); + bool deliverDragEvent(QQuickDragGrabber *, QQuickItem *, QDragMoveEvent *); - QList<QSGItem*> hoverItems; + QList<QQuickItem*> hoverItems; enum FocusOption { DontChangeFocusProperty = 0x01, }; Q_DECLARE_FLAGS(FocusOptions, FocusOption) - void setFocusInScope(QSGItem *scope, QSGItem *item, FocusOptions = 0); - void clearFocusInScope(QSGItem *scope, QSGItem *item, FocusOptions = 0); - void notifyFocusChangesRecur(QSGItem **item, int remaining); + void setFocusInScope(QQuickItem *scope, QQuickItem *item, FocusOptions = 0); + void clearFocusInScope(QQuickItem *scope, QQuickItem *item, FocusOptions = 0); + void notifyFocusChangesRecur(QQuickItem **item, int remaining); void updateInputMethodData(); void updateFocusItemTransform(); - void dirtyItem(QSGItem *); + void dirtyItem(QQuickItem *); void cleanup(QSGNode *); void initializeSceneGraph(); @@ -143,24 +143,24 @@ public: void syncSceneGraph(); void renderSceneGraph(const QSize &size); - QSGItem::UpdatePaintNodeData updatePaintNodeData; + QQuickItem::UpdatePaintNodeData updatePaintNodeData; - QSGItem *dirtyItemList; + QQuickItem *dirtyItemList; QList<QSGNode *> cleanupNodeList; - QSet<QSGItem *> itemsToPolish; + QSet<QQuickItem *> itemsToPolish; void updateDirtyNodes(); void cleanupNodes(); - bool updateEffectiveOpacity(QSGItem *); - void updateEffectiveOpacityRoot(QSGItem *, qreal); - void updateDirtyNode(QSGItem *); + bool updateEffectiveOpacity(QQuickItem *); + void updateEffectiveOpacityRoot(QQuickItem *, qreal); + void updateDirtyNode(QQuickItem *); QSGContext *context; uint vsyncAnimations : 1; - QSGCanvasRenderLoop *thread; + QQuickCanvasRenderLoop *thread; QSize widgetSize; QSize viewportSize; @@ -168,26 +168,26 @@ public: QOpenGLFramebufferObject *renderTarget; - QHash<int, QSGItem *> itemForTouchPointId; + QHash<int, QQuickItem *> itemForTouchPointId; - mutable QSGCanvasIncubationController *incubationController; + mutable QQuickCanvasIncubationController *incubationController; }; -class QSGCanvasRenderLoop +class QQuickCanvasRenderLoop { public: - QSGCanvasRenderLoop() + QQuickCanvasRenderLoop() : d(0) , renderer(0) , gl(0) { } - virtual ~QSGCanvasRenderLoop() + virtual ~QQuickCanvasRenderLoop() { delete gl; } - friend class QSGCanvasPrivate; + friend class QQuickCanvasPrivate; virtual void paint() = 0; virtual void resize(const QSize &size) = 0; @@ -219,17 +219,17 @@ protected: } private: - QSGCanvasPrivate *d; - QSGCanvas *renderer; + QQuickCanvasPrivate *d; + QQuickCanvas *renderer; QOpenGLContext *gl; }; -class QSGCanvasRenderThread : public QThread, public QSGCanvasRenderLoop +class QQuickCanvasRenderThread : public QThread, public QQuickCanvasRenderLoop { Q_OBJECT public: - QSGCanvasRenderThread() + QQuickCanvasRenderThread() : mutex(QMutex::NonRecursive) , allowMainThreadProcessingFlag(true) , animationRunning(false) @@ -301,8 +301,8 @@ public: void run(); }; -Q_DECLARE_OPERATORS_FOR_FLAGS(QSGCanvasPrivate::FocusOptions) +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickCanvasPrivate::FocusOptions) QT_END_NAMESPACE -#endif // QSGCANVAS_P_H +#endif // QQUICKCANVAS_P_H diff --git a/src/declarative/items/qsgclipnode.cpp b/src/declarative/items/qquickclipnode.cpp index 1147636a17..4aeb2dcf69 100644 --- a/src/declarative/items/qsgclipnode.cpp +++ b/src/declarative/items/qquickclipnode.cpp @@ -40,12 +40,12 @@ ****************************************************************************/ -#include "qsgclipnode_p.h" +#include "qquickclipnode_p.h" #include <QtGui/qvector2d.h> #include <QtCore/qmath.h> -QSGDefaultClipNode::QSGDefaultClipNode(const QRectF &rect) +QQuickDefaultClipNode::QQuickDefaultClipNode(const QRectF &rect) : m_rect(rect) , m_radius(0) , m_dirty_geometry(true) @@ -55,20 +55,20 @@ QSGDefaultClipNode::QSGDefaultClipNode(const QRectF &rect) setIsRectangular(true); } -void QSGDefaultClipNode::setRect(const QRectF &rect) +void QQuickDefaultClipNode::setRect(const QRectF &rect) { m_rect = rect; m_dirty_geometry = true; } -void QSGDefaultClipNode::setRadius(qreal radius) +void QQuickDefaultClipNode::setRadius(qreal radius) { m_radius = radius; m_dirty_geometry = true; setIsRectangular(radius == 0); } -void QSGDefaultClipNode::update() +void QQuickDefaultClipNode::update() { if (m_dirty_geometry) { updateGeometry(); @@ -76,7 +76,7 @@ void QSGDefaultClipNode::update() } } -void QSGDefaultClipNode::updateGeometry() +void QQuickDefaultClipNode::updateGeometry() { QSGGeometry *g = geometry(); diff --git a/src/declarative/items/qsgclipnode_p.h b/src/declarative/items/qquickclipnode_p.h index 0e6d057204..0323c9a24a 100644 --- a/src/declarative/items/qsgclipnode_p.h +++ b/src/declarative/items/qquickclipnode_p.h @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#ifndef QSGCLIPNODE_P_H -#define QSGCLIPNODE_P_H +#ifndef QQUICKCLIPNODE_P_H +#define QQUICKCLIPNODE_P_H #include <qsgnode.h> -class QSGDefaultClipNode : public QSGClipNode +class QQuickDefaultClipNode : public QSGClipNode { public: - QSGDefaultClipNode(const QRectF &); + QQuickDefaultClipNode(const QRectF &); void setRect(const QRectF &); QRectF rect() const { return m_rect; } @@ -68,4 +68,4 @@ private: QSGGeometry m_geometry; }; -#endif // QSGCLIPNODE_P_H +#endif // QQUICKCLIPNODE_P_H diff --git a/src/declarative/items/qsgdrag.cpp b/src/declarative/items/qquickdrag.cpp index b95e495477..d3439b08bf 100644 --- a/src/declarative/items/qsgdrag.cpp +++ b/src/declarative/items/qquickdrag.cpp @@ -39,25 +39,25 @@ ** ****************************************************************************/ -#include "qsgdrag_p.h" +#include "qquickdrag_p.h" -#include <private/qsgitem_p.h> -#include <private/qsgevents_p_p.h> -#include <private/qsgitemchangelistener_p.h> +#include <private/qquickitem_p.h> +#include <private/qquickevents_p_p.h> +#include <private/qquickitemchangelistener_p.h> #include <private/qv8engine_p.h> #include <QtGui/qevent.h> QT_BEGIN_NAMESPACE -class QSGDragAttachedPrivate : public QObjectPrivate, public QSGItemChangeListener +class QQuickDragAttachedPrivate : public QObjectPrivate, public QQuickItemChangeListener { - Q_DECLARE_PUBLIC(QSGDragAttached) + Q_DECLARE_PUBLIC(QQuickDragAttached) public: - static QSGDragAttachedPrivate *get(QSGDragAttached *attached) { - return static_cast<QSGDragAttachedPrivate *>(QObjectPrivate::get(attached)); } + static QQuickDragAttachedPrivate *get(QQuickDragAttached *attached) { + return static_cast<QQuickDragAttachedPrivate *>(QObjectPrivate::get(attached)); } - QSGDragAttachedPrivate() + QQuickDragAttachedPrivate() : attachedItem(0) , mimeData(0) , proposedAction(Qt::MoveAction) @@ -67,17 +67,17 @@ public: { } - void itemGeometryChanged(QSGItem *, const QRectF &, const QRectF &); + void itemGeometryChanged(QQuickItem *, const QRectF &, const QRectF &); void start() { start(supportedActions); } void start(Qt::DropActions supportedActions); - void setTarget(QSGItem *item); + void setTarget(QQuickItem *item); - QSGDragGrabber dragGrabber; + QQuickDragGrabber dragGrabber; QDeclarativeGuard<QObject> source; QDeclarativeGuard<QObject> target; - QSGItem *attachedItem; - QSGDragMimeData *mimeData; + QQuickItem *attachedItem; + QQuickDragMimeData *mimeData; Qt::DropAction proposedAction; Qt::DropActions supportedActions; bool active : 1; @@ -87,7 +87,7 @@ public: }; /*! - \qmlclass Drag QSGDrag + \qmlclass Drag QQuickDrag \inqmlmodule QtQuick 2 \brief The Drag attached property provides drag and drop events for moved Items. @@ -113,17 +113,17 @@ public: */ -void QSGDragAttachedPrivate::itemGeometryChanged(QSGItem *, const QRectF &newGeometry, const QRectF &oldGeometry) +void QQuickDragAttachedPrivate::itemGeometryChanged(QQuickItem *, const QRectF &newGeometry, const QRectF &oldGeometry) { - Q_Q(QSGDragAttached); + Q_Q(QQuickDragAttached); if (newGeometry.topLeft() == oldGeometry.topLeft() || !active) return; - if (QSGCanvas *canvas = attachedItem->canvas()) { + if (QQuickCanvas *canvas = attachedItem->canvas()) { QPoint scenePos = attachedItem->mapToScene(hotSpot).toPoint(); QDragMoveEvent event(scenePos, mimeData->m_supportedActions, mimeData, Qt::NoButton, Qt::NoModifier); - QSGDropEventEx::setProposedAction(&event, proposedAction); - QSGCanvasPrivate::get(canvas)->deliverDragEvent(&dragGrabber, &event); + QQuickDropEventEx::setProposedAction(&event, proposedAction); + QQuickCanvasPrivate::get(canvas)->deliverDragEvent(&dragGrabber, &event); if (target != dragGrabber.target()) { target = dragGrabber.target(); emit q->targetChanged(); @@ -131,17 +131,17 @@ void QSGDragAttachedPrivate::itemGeometryChanged(QSGItem *, const QRectF &newGeo } } -QSGDragAttached::QSGDragAttached(QObject *parent) - : QObject(*new QSGDragAttachedPrivate, parent) +QQuickDragAttached::QQuickDragAttached(QObject *parent) + : QObject(*new QQuickDragAttachedPrivate, parent) { - Q_D(QSGDragAttached); - d->attachedItem = qobject_cast<QSGItem *>(parent); + Q_D(QQuickDragAttached); + d->attachedItem = qobject_cast<QQuickItem *>(parent); d->source = d->attachedItem; } -QSGDragAttached::~QSGDragAttached() +QQuickDragAttached::~QQuickDragAttached() { - Q_D(QSGDragAttached); + Q_D(QQuickDragAttached); delete d->mimeData; } @@ -158,15 +158,15 @@ QSGDragAttached::~QSGDragAttached() event with item's new position to the scene. */ -bool QSGDragAttached::isActive() const +bool QQuickDragAttached::isActive() const { - Q_D(const QSGDragAttached); + Q_D(const QQuickDragAttached); return d->active; } -void QSGDragAttached::setActive(bool active) +void QQuickDragAttached::setActive(bool active) { - Q_D(QSGDragAttached); + Q_D(QQuickDragAttached); if (d->active != active) { if (active) d->start(d->supportedActions); @@ -184,24 +184,24 @@ void QSGDragAttached::setActive(bool active) Changes to source while a Drag is active don't take effect until a new drag is started. */ -QObject *QSGDragAttached::source() const +QObject *QQuickDragAttached::source() const { - Q_D(const QSGDragAttached); + Q_D(const QQuickDragAttached); return d->source; } -void QSGDragAttached::setSource(QObject *item) +void QQuickDragAttached::setSource(QObject *item) { - Q_D(QSGDragAttached); + Q_D(QQuickDragAttached); if (d->source != item) { d->source = item; emit sourceChanged(); } } -void QSGDragAttached::resetSource() +void QQuickDragAttached::resetSource() { - Q_D(QSGDragAttached); + Q_D(QQuickDragAttached); if (d->source != d->attachedItem) { d->source = d->attachedItem; emit sourceChanged(); @@ -220,9 +220,9 @@ void QSGDragAttached::resetSource() the drag was cancelled the target will then be null. */ -QObject *QSGDragAttached::target() const +QObject *QQuickDragAttached::target() const { - Q_D(const QSGDragAttached); + Q_D(const QQuickDragAttached); return d->target; } @@ -236,15 +236,15 @@ QObject *QSGDragAttached::target() const Changes to hotSpot will take effect when the next event is sent. */ -QPointF QSGDragAttached::hotSpot() const +QPointF QQuickDragAttached::hotSpot() const { - Q_D(const QSGDragAttached); + Q_D(const QQuickDragAttached); return d->hotSpot; } -void QSGDragAttached::setHotSpot(const QPointF &hotSpot) +void QQuickDragAttached::setHotSpot(const QPointF &hotSpot) { - Q_D(QSGDragAttached); + Q_D(QQuickDragAttached); if (d->hotSpot != hotSpot) { d->hotSpot = hotSpot; emit hotSpotChanged(); @@ -260,15 +260,15 @@ void QSGDragAttached::setHotSpot(const QPointF &hotSpot) Changes to keys while a Drag is active don't take effect until a new drag is started. */ -QStringList QSGDragAttached::keys() const +QStringList QQuickDragAttached::keys() const { - Q_D(const QSGDragAttached); + Q_D(const QQuickDragAttached); return d->keys; } -void QSGDragAttached::setKeys(const QStringList &keys) +void QQuickDragAttached::setKeys(const QStringList &keys) { - Q_D(QSGDragAttached); + Q_D(QQuickDragAttached); if (d->keys != keys) { d->keys = keys; emit keysChanged(); @@ -284,15 +284,15 @@ void QSGDragAttached::setKeys(const QStringList &keys) until a new drag is started. */ -Qt::DropActions QSGDragAttached::supportedActions() const +Qt::DropActions QQuickDragAttached::supportedActions() const { - Q_D(const QSGDragAttached); + Q_D(const QQuickDragAttached); return d->supportedActions; } -void QSGDragAttached::setSupportedActions(Qt::DropActions actions) +void QQuickDragAttached::setSupportedActions(Qt::DropActions actions) { - Q_D(QSGDragAttached); + Q_D(QQuickDragAttached); if (d->supportedActions != actions) { d->supportedActions = actions; emit supportedActionsChanged(); @@ -308,15 +308,15 @@ void QSGDragAttached::setSupportedActions(Qt::DropActions actions) Changes to proposedAction will take effect when the next event is sent. */ -Qt::DropAction QSGDragAttached::proposedAction() const +Qt::DropAction QQuickDragAttached::proposedAction() const { - Q_D(const QSGDragAttached); + Q_D(const QQuickDragAttached); return d->proposedAction; } -void QSGDragAttached::setProposedAction(Qt::DropAction action) +void QQuickDragAttached::setProposedAction(Qt::DropAction action) { - Q_D(QSGDragAttached); + Q_D(QQuickDragAttached); if (d->proposedAction != action) { d->proposedAction = action; emit proposedActionChanged(); @@ -324,16 +324,16 @@ void QSGDragAttached::setProposedAction(Qt::DropAction action) } } -void QSGDragAttachedPrivate::start(Qt::DropActions supportedActions) +void QQuickDragAttachedPrivate::start(Qt::DropActions supportedActions) { - Q_Q(QSGDragAttached); + Q_Q(QQuickDragAttached); Q_ASSERT(!active); - if (QSGCanvas *canvas = attachedItem ? attachedItem->canvas() : 0) { + if (QQuickCanvas *canvas = attachedItem ? attachedItem->canvas() : 0) { if (!mimeData) - mimeData = new QSGDragMimeData; + mimeData = new QQuickDragMimeData; if (!listening) { - QSGItemPrivate::get(attachedItem)->addItemChangeListener(this, QSGItemPrivate::Geometry); + QQuickItemPrivate::get(attachedItem)->addItemChangeListener(this, QQuickItemPrivate::Geometry); listening = true; } @@ -344,8 +344,8 @@ void QSGDragAttachedPrivate::start(Qt::DropActions supportedActions) QPoint scenePos = attachedItem->mapToScene(hotSpot).toPoint(); QDragEnterEvent event(scenePos, supportedActions, mimeData, Qt::NoButton, Qt::NoModifier); - QSGDropEventEx::setProposedAction(&event, proposedAction); - QSGCanvasPrivate::get(canvas)->deliverDragEvent(&dragGrabber, &event); + QQuickDropEventEx::setProposedAction(&event, proposedAction); + QQuickCanvasPrivate::get(canvas)->deliverDragEvent(&dragGrabber, &event); emit q->activeChanged(); if (target != dragGrabber.target()) { @@ -364,9 +364,9 @@ void QSGDragAttachedPrivate::start(Qt::DropActions supportedActions) property for the started sequence. */ -void QSGDragAttached::start(QDeclarativeV8Function *args) +void QQuickDragAttached::start(QDeclarativeV8Function *args) { - Q_D(QSGDragAttached); + Q_D(QQuickDragAttached); if (d->active) cancel(); @@ -400,9 +400,9 @@ void QSGDragAttached::start(QDeclarativeV8Function *args) */ -int QSGDragAttached::drop() +int QQuickDragAttached::drop() { - Q_D(QSGDragAttached); + Q_D(QQuickDragAttached); Qt::DropAction acceptedAction = Qt::IgnoreAction; if (!d->active) @@ -410,13 +410,13 @@ int QSGDragAttached::drop() QObject *target = 0; - if (QSGCanvas *canvas = d->attachedItem->canvas()) { + if (QQuickCanvas *canvas = d->attachedItem->canvas()) { QPoint scenePos = d->attachedItem->mapToScene(d->hotSpot).toPoint(); QDropEvent event( scenePos, d->mimeData->m_supportedActions, d->mimeData, Qt::NoButton, Qt::NoModifier); - QSGDropEventEx::setProposedAction(&event, d->proposedAction); - QSGCanvasPrivate::get(canvas)->deliverDragEvent(&d->dragGrabber, &event); + QQuickDropEventEx::setProposedAction(&event, d->proposedAction); + QQuickCanvasPrivate::get(canvas)->deliverDragEvent(&d->dragGrabber, &event); if (event.isAccepted()) { acceptedAction = event.dropAction(); @@ -440,15 +440,15 @@ int QSGDragAttached::drop() Ends a drag sequence. */ -void QSGDragAttached::cancel() +void QQuickDragAttached::cancel() { - Q_D(QSGDragAttached); + Q_D(QQuickDragAttached); if (!d->active) return; - if (QSGCanvas *canvas = d->attachedItem->canvas()) { + if (QQuickCanvas *canvas = d->attachedItem->canvas()) { QDragLeaveEvent event; - QSGCanvasPrivate::get(canvas)->deliverDragEvent(&d->dragGrabber, &event); + QQuickCanvasPrivate::get(canvas)->deliverDragEvent(&d->dragGrabber, &event); } d->active = false; diff --git a/src/declarative/items/qsgdrag_p.h b/src/declarative/items/qquickdrag_p.h index 246c6e6beb..1d950299d7 100644 --- a/src/declarative/items/qsgdrag_p.h +++ b/src/declarative/items/qquickdrag_p.h @@ -40,10 +40,10 @@ ** ****************************************************************************/ -#ifndef QSGDRAG_P_H -#define QSGDRAG_P_H +#ifndef QQUICKDRAG_P_H +#define QQUICKDRAG_P_H -#include <qsgitem.h> +#include <qquickitem.h> #include <private/qv8engine_p.h> @@ -57,27 +57,27 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGItem; -class QSGDrag; -class QSGDragPrivate; +class QQuickItem; +class QQuickDrag; +class QQuickDragPrivate; -class QSGDragGrabber +class QQuickDragGrabber { - class Item : public QDeclarativeGuard<QSGItem> + class Item : public QDeclarativeGuard<QQuickItem> { public: - Item(QSGItem *item) : QDeclarativeGuard<QSGItem>(item) {} + Item(QQuickItem *item) : QDeclarativeGuard<QQuickItem>(item) {} QIntrusiveListNode node; protected: - void objectDestroyed(QSGItem *) { delete this; } + void objectDestroyed(QQuickItem *) { delete this; } }; typedef QIntrusiveList<Item, &Item::node> ItemList; public: - QSGDragGrabber() : m_target(0) {} - ~QSGDragGrabber() { while (!m_items.isEmpty()) delete m_items.first(); } + QQuickDragGrabber() : m_target(0) {} + ~QQuickDragGrabber() { while (!m_items.isEmpty()) delete m_items.first(); } QObject *target() const @@ -96,7 +96,7 @@ public: iterator begin() { return m_items.begin(); } iterator end() { return m_items.end(); } - void grab(QSGItem *item) { m_items.insert(new Item(item)); } + void grab(QQuickItem *item) { m_items.insert(new Item(item)); } iterator release(iterator at) { Item *item = *at; at = at.erase(); delete item; return at; } private: @@ -105,28 +105,28 @@ private: QObject *m_target; }; -class QSGDropEventEx : public QDropEvent +class QQuickDropEventEx : public QDropEvent { public: void setProposedAction(Qt::DropAction action) { default_action = action; drop_action = action; } static void setProposedAction(QDropEvent *event, Qt::DropAction action) { - static_cast<QSGDropEventEx *>(event)->setProposedAction(action); + static_cast<QQuickDropEventEx *>(event)->setProposedAction(action); } void copyActions(const QDropEvent &from) { default_action = from.proposedAction(); drop_action = from.dropAction(); } static void copyActions(QDropEvent *to, const QDropEvent &from) { - static_cast<QSGDropEventEx *>(to)->copyActions(from); + static_cast<QQuickDropEventEx *>(to)->copyActions(from); } }; -class QSGDragMimeData : public QMimeData +class QQuickDragMimeData : public QMimeData { Q_OBJECT public: - QSGDragMimeData() + QQuickDragMimeData() : m_source(0) { } @@ -139,14 +139,14 @@ private: Qt::DropActions m_supportedActions; QStringList m_keys; - friend class QSGDragAttached; - friend class QSGDragAttachedPrivate; + friend class QQuickDragAttached; + friend class QQuickDragAttachedPrivate; }; class QDeclarativeV8Function; -class QSGDragAttachedPrivate; -class QSGDragAttached : public QObject +class QQuickDragAttachedPrivate; +class QQuickDragAttached : public QObject { Q_OBJECT Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged) @@ -157,8 +157,8 @@ class QSGDragAttached : public QObject Q_PROPERTY(Qt::DropActions supportedActions READ supportedActions WRITE setSupportedActions NOTIFY supportedActionsChanged) Q_PROPERTY(Qt::DropAction proposedAction READ proposedAction WRITE setProposedAction NOTIFY proposedActionChanged) public: - QSGDragAttached(QObject *parent); - ~QSGDragAttached(); + QQuickDragAttached(QObject *parent); + ~QQuickDragAttached(); bool isActive() const; void setActive(bool active); @@ -197,7 +197,7 @@ Q_SIGNALS: void proposedActionChanged(); private: - Q_DECLARE_PRIVATE(QSGDragAttached) + Q_DECLARE_PRIVATE(QQuickDragAttached) }; diff --git a/src/declarative/items/qsgdroparea.cpp b/src/declarative/items/qquickdroparea.cpp index a1b81be1ae..b9b93085e6 100644 --- a/src/declarative/items/qsgdroparea.cpp +++ b/src/declarative/items/qquickdroparea.cpp @@ -39,30 +39,30 @@ ** ****************************************************************************/ -#include "qsgdroparea_p.h" -#include "qsgdrag_p.h" -#include "qsgitem_p.h" -#include "qsgcanvas.h" +#include "qquickdroparea_p.h" +#include "qquickdrag_p.h" +#include "qquickitem_p.h" +#include "qquickcanvas.h" #include <private/qdeclarativeengine_p.h> -QSGDropAreaDrag::QSGDropAreaDrag(QSGDropAreaPrivate *d, QObject *parent) +QQuickDropAreaDrag::QQuickDropAreaDrag(QQuickDropAreaPrivate *d, QObject *parent) : QObject(parent) , d(d) { } -QSGDropAreaDrag::~QSGDropAreaDrag() +QQuickDropAreaDrag::~QQuickDropAreaDrag() { } -class QSGDropAreaPrivate : public QSGItemPrivate +class QQuickDropAreaPrivate : public QQuickItemPrivate { - Q_DECLARE_PUBLIC(QSGDropArea) + Q_DECLARE_PUBLIC(QQuickDropArea) public: - QSGDropAreaPrivate(); - ~QSGDropAreaPrivate(); + QQuickDropAreaPrivate(); + ~QQuickDropAreaPrivate(); bool hasMatchingKey(const QStringList &keys) const; @@ -71,23 +71,23 @@ public: QStringList keys; QRegExp keyRegExp; QPointF dragPosition; - QSGDropAreaDrag *drag; + QQuickDropAreaDrag *drag; QDeclarativeGuard<QObject> source; QDeclarativeGuard<QMimeData> mimeData; }; -QSGDropAreaPrivate::QSGDropAreaPrivate() +QQuickDropAreaPrivate::QQuickDropAreaPrivate() : drag(0) { } -QSGDropAreaPrivate::~QSGDropAreaPrivate() +QQuickDropAreaPrivate::~QQuickDropAreaPrivate() { delete drag; } /*! - \qmlclass DropArea QSGDropArea + \qmlclass DropArea QQuickDropArea \inqmlmodule QtQuick 2 \brief The DropArea item provides drag and drop handling. @@ -107,13 +107,13 @@ QSGDropAreaPrivate::~QSGDropAreaPrivate() instantiated for each active drag over a drag target. */ -QSGDropArea::QSGDropArea(QSGItem *parent) - : QSGItem(*new QSGDropAreaPrivate, parent) +QQuickDropArea::QQuickDropArea(QQuickItem *parent) + : QQuickItem(*new QQuickDropAreaPrivate, parent) { setFlags(ItemAcceptsDrops); } -QSGDropArea::~QSGDropArea() +QQuickDropArea::~QQuickDropArea() { } @@ -124,9 +124,9 @@ QSGDropArea::~QSGDropArea() dragged items. */ -bool QSGDropArea::containsDrag() const +bool QQuickDropArea::containsDrag() const { - Q_D(const QSGDropArea); + Q_D(const QQuickDropArea); return d->mimeData; } @@ -141,15 +141,15 @@ bool QSGDropArea::containsDrag() const \sa QtQuick2::Drag::keys */ -QStringList QSGDropArea::keys() const +QStringList QQuickDropArea::keys() const { - Q_D(const QSGDropArea); + Q_D(const QQuickDropArea); return d->keys; } -void QSGDropArea::setKeys(const QStringList &keys) +void QQuickDropArea::setKeys(const QStringList &keys) { - Q_D(QSGDropArea); + Q_D(QQuickDropArea); if (d->keys != keys) { d->keys = keys; @@ -166,11 +166,11 @@ void QSGDropArea::setKeys(const QStringList &keys) } } -QSGDropAreaDrag *QSGDropArea::drag() +QQuickDropAreaDrag *QQuickDropArea::drag() { - Q_D(QSGDropArea); + Q_D(QQuickDropArea); if (!d->drag) - d->drag = new QSGDropAreaDrag(d); + d->drag = new QQuickDropAreaDrag(d); return d->drag; } @@ -180,7 +180,7 @@ QSGDropAreaDrag *QSGDropArea::drag() This property holds the source of a drag. */ -QObject *QSGDropAreaDrag::source() const +QObject *QQuickDropAreaDrag::source() const { return d->source; } @@ -192,12 +192,12 @@ QObject *QSGDropAreaDrag::source() const These properties hold the coordinates of the last drag event. */ -qreal QSGDropAreaDrag::x() const +qreal QQuickDropAreaDrag::x() const { return d->dragPosition.x(); } -qreal QSGDropAreaDrag::y() const +qreal QQuickDropAreaDrag::y() const { return d->dragPosition.y(); } @@ -208,9 +208,9 @@ qreal QSGDropAreaDrag::y() const This handler is called when the position of a drag has changed. */ -void QSGDropArea::dragMoveEvent(QDragMoveEvent *event) +void QQuickDropArea::dragMoveEvent(QDragMoveEvent *event) { - Q_D(QSGDropArea); + Q_D(QQuickDropArea); if (!d->mimeData) return; @@ -219,11 +219,11 @@ void QSGDropArea::dragMoveEvent(QDragMoveEvent *event) emit d->drag->positionChanged(); event->accept(); - QSGDropEvent dragTargetEvent(d, event); + QQuickDropEvent dragTargetEvent(d, event); emit positionChanged(&dragTargetEvent); } -bool QSGDropAreaPrivate::hasMatchingKey(const QStringList &keys) const +bool QQuickDropAreaPrivate::hasMatchingKey(const QStringList &keys) const { if (keyRegExp.isEmpty()) return true; @@ -235,9 +235,9 @@ bool QSGDropAreaPrivate::hasMatchingKey(const QStringList &keys) const return false; } -QStringList QSGDropAreaPrivate::getKeys(const QMimeData *mimeData) const +QStringList QQuickDropAreaPrivate::getKeys(const QMimeData *mimeData) const { - if (const QSGDragMimeData *dragMime = qobject_cast<const QSGDragMimeData *>(mimeData)) + if (const QQuickDragMimeData *dragMime = qobject_cast<const QQuickDragMimeData *>(mimeData)) return dragMime->keys(); return mimeData->formats(); } @@ -248,9 +248,9 @@ QStringList QSGDropAreaPrivate::getKeys(const QMimeData *mimeData) const This handler is called when a \a drag enters the bounds of a DropArea. */ -void QSGDropArea::dragEnterEvent(QDragEnterEvent *event) +void QQuickDropArea::dragEnterEvent(QDragEnterEvent *event) { - Q_D(QSGDropArea); + Q_D(QQuickDropArea); const QMimeData *mimeData = event->mimeData(); if (!d->effectiveEnable || d->mimeData || !mimeData || !d->hasMatchingKey(d->getKeys(mimeData))) return; @@ -258,12 +258,12 @@ void QSGDropArea::dragEnterEvent(QDragEnterEvent *event) d->dragPosition = event->pos(); event->accept(); - QSGDropEvent dragTargetEvent(d, event); + QQuickDropEvent dragTargetEvent(d, event); emit entered(&dragTargetEvent); if (event->isAccepted()) { d->mimeData = const_cast<QMimeData *>(mimeData); - if (QSGDragMimeData *dragMime = qobject_cast<QSGDragMimeData *>(d->mimeData)) + if (QQuickDragMimeData *dragMime = qobject_cast<QQuickDragMimeData *>(d->mimeData)) d->source = dragMime->source(); else d->source = event->source(); @@ -282,9 +282,9 @@ void QSGDropArea::dragEnterEvent(QDragEnterEvent *event) This handler is called when a drag exits the bounds of a DropArea. */ -void QSGDropArea::dragLeaveEvent(QDragLeaveEvent *) +void QQuickDropArea::dragLeaveEvent(QDragLeaveEvent *) { - Q_D(QSGDropArea); + Q_D(QQuickDropArea); if (!d->mimeData) return; @@ -304,13 +304,13 @@ void QSGDropArea::dragLeaveEvent(QDragLeaveEvent *) a DropArea. */ -void QSGDropArea::dropEvent(QDropEvent *event) +void QQuickDropArea::dropEvent(QDropEvent *event) { - Q_D(QSGDropArea); + Q_D(QQuickDropArea); if (!d->mimeData) return; - QSGDropEvent dragTargetEvent(d, event); + QQuickDropEvent dragTargetEvent(d, event); emit dropped(&dragTargetEvent); d->mimeData = 0; @@ -321,7 +321,7 @@ void QSGDropArea::dropEvent(QDropEvent *event) } /*! - \qmlclass DragEvent QSGDragEvent + \qmlclass DragEvent QQuickDragEvent \inqmlmodule QtQuick 2 \brief The DragEvent object provides information about a drag event. @@ -348,9 +348,9 @@ void QSGDropArea::dropEvent(QDropEvent *event) This property holds the source of a drag event. */ -QObject *QSGDropEvent::source() +QObject *QQuickDropEvent::source() { - if (const QSGDragMimeData *dragMime = qobject_cast<const QSGDragMimeData *>(event->mimeData())) + if (const QQuickDragMimeData *dragMime = qobject_cast<const QQuickDragMimeData *>(event->mimeData())) return dragMime->source(); else return event->source(); @@ -363,7 +363,7 @@ QObject *QSGDropEvent::source() drag event. */ -QStringList QSGDropEvent::keys() const +QStringList QQuickDropEvent::keys() const { return d->getKeys(event->mimeData()); } @@ -407,7 +407,7 @@ QStringList QSGDropEvent::keys() const If an \a action is specified it will overwrite the value of the \l action property. */ -void QSGDropEvent::accept(QDeclarativeV8Function *args) +void QQuickDropEvent::accept(QDeclarativeV8Function *args) { Qt::DropAction action = event->dropAction(); diff --git a/src/declarative/items/qsgdroparea_p.h b/src/declarative/items/qquickdroparea_p.h index cd51f57e0b..31e2bd7813 100644 --- a/src/declarative/items/qsgdroparea_p.h +++ b/src/declarative/items/qquickdroparea_p.h @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#ifndef QSGDROPAREA_P_H -#define QSGDROPAREA_P_H +#ifndef QQUICKDROPAREA_P_H +#define QQUICKDROPAREA_P_H -#include "qsgitem.h" +#include "qquickitem.h" #include <private/qdeclarativeguard_p.h> #include <private/qv8engine_p.h> @@ -55,8 +55,8 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QSGDropAreaPrivate; -class QSGDropEvent : public QObject +class QQuickDropAreaPrivate; +class QQuickDropEvent : public QObject { Q_OBJECT Q_PROPERTY(qreal x READ x) @@ -67,7 +67,7 @@ class QSGDropEvent : public QObject Q_PROPERTY(Qt::DropAction action READ action WRITE setAction RESET resetAction) Q_PROPERTY(bool accepted READ accepted WRITE setAccepted) public: - QSGDropEvent(QSGDropAreaPrivate *d, QDropEvent *event) : d(d), event(event) {} + QQuickDropEvent(QQuickDropAreaPrivate *d, QDropEvent *event) : d(d), event(event) {} qreal x() const { return event->pos().x(); } qreal y() const { return event->pos().y(); } @@ -87,19 +87,19 @@ public: Q_INVOKABLE void accept(QDeclarativeV8Function *); private: - QSGDropAreaPrivate *d; + QQuickDropAreaPrivate *d; QDropEvent *event; }; -class QSGDropAreaDrag : public QObject +class QQuickDropAreaDrag : public QObject { Q_OBJECT Q_PROPERTY(qreal x READ x NOTIFY positionChanged) Q_PROPERTY(qreal y READ y NOTIFY positionChanged) Q_PROPERTY(QObject *source READ source NOTIFY sourceChanged) public: - QSGDropAreaDrag(QSGDropAreaPrivate *d, QObject *parent = 0); - ~QSGDropAreaDrag(); + QQuickDropAreaDrag(QQuickDropAreaPrivate *d, QObject *parent = 0); + ~QQuickDropAreaDrag(); qreal x() const; qreal y() const; @@ -110,23 +110,23 @@ Q_SIGNALS: void sourceChanged(); private: - QSGDropAreaPrivate *d; + QQuickDropAreaPrivate *d; - friend class QSGDropArea; - friend class QSGDropAreaPrivate; + friend class QQuickDropArea; + friend class QQuickDropAreaPrivate; }; -class QSGDropAreaPrivate; -class Q_AUTOTEST_EXPORT QSGDropArea : public QSGItem +class QQuickDropAreaPrivate; +class Q_AUTOTEST_EXPORT QQuickDropArea : public QQuickItem { Q_OBJECT Q_PROPERTY(bool containsDrag READ containsDrag NOTIFY containsDragChanged) Q_PROPERTY(QStringList keys READ keys WRITE setKeys NOTIFY keysChanged) - Q_PROPERTY(QSGDropAreaDrag *drag READ drag CONSTANT) + Q_PROPERTY(QQuickDropAreaDrag *drag READ drag CONSTANT) public: - QSGDropArea(QSGItem *parent=0); - ~QSGDropArea(); + QQuickDropArea(QQuickItem *parent=0); + ~QQuickDropArea(); bool containsDrag() const; void setContainsDrag(bool drag); @@ -134,17 +134,17 @@ public: QStringList keys() const; void setKeys(const QStringList &keys); - QSGDropAreaDrag *drag(); + QQuickDropAreaDrag *drag(); Q_SIGNALS: void containsDragChanged(); void keysChanged(); void sourceChanged(); - void entered(QSGDropEvent *drag); + void entered(QQuickDropEvent *drag); void exited(); - void positionChanged(QSGDropEvent *drag); - void dropped(QSGDropEvent *drop); + void positionChanged(QQuickDropEvent *drag); + void dropped(QQuickDropEvent *drop); protected: void dragMoveEvent(QDragMoveEvent *event); @@ -153,15 +153,15 @@ protected: void dropEvent(QDropEvent *event); private: - Q_DISABLE_COPY(QSGDropArea) - Q_DECLARE_PRIVATE(QSGDropArea) + Q_DISABLE_COPY(QQuickDropArea) + Q_DECLARE_PRIVATE(QQuickDropArea) }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QSGDropEvent) -QML_DECLARE_TYPE(QSGDropArea) +QML_DECLARE_TYPE(QQuickDropEvent) +QML_DECLARE_TYPE(QQuickDropArea) QT_END_HEADER -#endif // QSGDRAGTARGET_P_H +#endif // QQUICKDROPAREA_P_H diff --git a/src/declarative/items/qsgevents.cpp b/src/declarative/items/qquickevents.cpp index 2173b4a21f..c546dd305a 100644 --- a/src/declarative/items/qsgevents.cpp +++ b/src/declarative/items/qquickevents.cpp @@ -39,12 +39,12 @@ ** ****************************************************************************/ -#include "qsgevents_p_p.h" +#include "qquickevents_p_p.h" QT_BEGIN_NAMESPACE /*! - \qmlclass KeyEvent QSGKeyEvent + \qmlclass KeyEvent QQuickKeyEvent \inqmlmodule QtQuick 2 \ingroup qml-event-elements @@ -139,7 +139,7 @@ Item { /*! - \qmlclass MouseEvent QSGMouseEvent + \qmlclass MouseEvent QQuickMouseEvent \inqmlmodule QtQuick 2 \ingroup qml-event-elements @@ -153,7 +153,7 @@ Item { /*! \internal - \class QSGMouseEvent + \class QQuickMouseEvent */ /*! diff --git a/src/declarative/items/qsgevents_p_p.h b/src/declarative/items/qquickevents_p_p.h index 1d2b6a9dec..cbe75ab9bf 100644 --- a/src/declarative/items/qsgevents_p_p.h +++ b/src/declarative/items/qquickevents_p_p.h @@ -40,8 +40,8 @@ ** ****************************************************************************/ -#ifndef QSGEVENTS_P_P_H -#define QSGEVENTS_P_P_H +#ifndef QQUICKEVENTS_P_P_H +#define QQUICKEVENTS_P_P_H // // W A R N I N G @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE -class QSGKeyEvent : public QObject +class QQuickKeyEvent : public QObject { Q_OBJECT Q_PROPERTY(int key READ key) @@ -72,9 +72,9 @@ class QSGKeyEvent : public QObject Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted) public: - QSGKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString &text=QString(), bool autorep=false, ushort count=1) + QQuickKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString &text=QString(), bool autorep=false, ushort count=1) : event(type, key, modifiers, text, autorep, count) { event.setAccepted(false); } - QSGKeyEvent(const QKeyEvent &ke) + QQuickKeyEvent(const QKeyEvent &ke) : event(ke) { event.setAccepted(false); } int key() const { return event.key(); } @@ -91,7 +91,7 @@ private: }; // used in QtLocation -class Q_DECLARATIVE_EXPORT QSGMouseEvent : public QObject +class Q_DECLARATIVE_EXPORT QQuickMouseEvent : public QObject { Q_OBJECT Q_PROPERTY(int x READ x) @@ -104,7 +104,7 @@ class Q_DECLARATIVE_EXPORT QSGMouseEvent : public QObject Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted) public: - QSGMouseEvent(int x, int y, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers + QQuickMouseEvent(int x, int y, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers , bool isClick=false, bool wasHeld=false) : _x(x), _y(y), _button(button), _buttons(buttons), _modifiers(modifiers) , _wasHeld(wasHeld), _isClick(isClick), _accepted(true) {} @@ -138,7 +138,7 @@ private: QT_END_NAMESPACE -QML_DECLARE_TYPE(QSGKeyEvent) -QML_DECLARE_TYPE(QSGMouseEvent) +QML_DECLARE_TYPE(QQuickKeyEvent) +QML_DECLARE_TYPE(QQuickMouseEvent) -#endif // QSGEVENTS_P_P_H +#endif // QQUICKEVENTS_P_P_H diff --git a/src/declarative/items/qsgflickable.cpp b/src/declarative/items/qquickflickable.cpp index 4871a43e8d..655472004d 100644 --- a/src/declarative/items/qsgflickable.cpp +++ b/src/declarative/items/qquickflickable.cpp @@ -39,10 +39,10 @@ ** ****************************************************************************/ -#include "qsgflickable_p.h" -#include "qsgflickable_p_p.h" -#include "qsgcanvas.h" -#include "qsgcanvas_p.h" +#include "qquickflickable_p.h" +#include "qquickflickable_p_p.h" +#include "qquickcanvas.h" +#include "qquickcanvas_p.h" #include <QtDeclarative/qdeclarativeinfo.h> #include <QtGui/qevent.h> @@ -91,35 +91,35 @@ static const int FlickThreshold = 20; // will ensure the Flickable retains the grab on consecutive flicks. static const int RetainGrabVelocity = 15; -QSGFlickableVisibleArea::QSGFlickableVisibleArea(QSGFlickable *parent) +QQuickFlickableVisibleArea::QQuickFlickableVisibleArea(QQuickFlickable *parent) : QObject(parent), flickable(parent), m_xPosition(0.), m_widthRatio(0.) , m_yPosition(0.), m_heightRatio(0.) { } -qreal QSGFlickableVisibleArea::widthRatio() const +qreal QQuickFlickableVisibleArea::widthRatio() const { return m_widthRatio; } -qreal QSGFlickableVisibleArea::xPosition() const +qreal QQuickFlickableVisibleArea::xPosition() const { return m_xPosition; } -qreal QSGFlickableVisibleArea::heightRatio() const +qreal QQuickFlickableVisibleArea::heightRatio() const { return m_heightRatio; } -qreal QSGFlickableVisibleArea::yPosition() const +qreal QQuickFlickableVisibleArea::yPosition() const { return m_yPosition; } -void QSGFlickableVisibleArea::updateVisible() +void QQuickFlickableVisibleArea::updateVisible() { - QSGFlickablePrivate *p = QSGFlickablePrivate::get(flickable); + QQuickFlickablePrivate *p = QQuickFlickablePrivate::get(flickable); bool changeX = false; bool changeY = false; @@ -167,10 +167,10 @@ void QSGFlickableVisibleArea::updateVisible() } -QSGFlickablePrivate::QSGFlickablePrivate() - : contentItem(new QSGItem) - , hData(this, &QSGFlickablePrivate::setViewportX) - , vData(this, &QSGFlickablePrivate::setViewportY) +QQuickFlickablePrivate::QQuickFlickablePrivate() + : contentItem(new QQuickItem) + , hData(this, &QQuickFlickablePrivate::setViewportX) + , vData(this, &QQuickFlickablePrivate::setViewportY) , hMoved(false), vMoved(false) , stealMouse(false), pressed(false), interactive(true), calcVelocity(false) , pixelAligned(false) @@ -178,22 +178,22 @@ QSGFlickablePrivate::QSGFlickablePrivate() , maxVelocity(QML_FLICK_DEFAULTMAXVELOCITY), reportedVelocitySmoothing(100) , delayedPressEvent(0), delayedPressTarget(0), pressDelay(0), fixupDuration(400) , fixupMode(Normal), vTime(0), visibleArea(0) - , flickableDirection(QSGFlickable::AutoFlickDirection) - , boundsBehavior(QSGFlickable::DragAndOvershootBounds) + , flickableDirection(QQuickFlickable::AutoFlickDirection) + , boundsBehavior(QQuickFlickable::DragAndOvershootBounds) { } -void QSGFlickablePrivate::init() +void QQuickFlickablePrivate::init() { - Q_Q(QSGFlickable); + Q_Q(QQuickFlickable); QDeclarative_setParent_noEvent(contentItem, q); contentItem->setParentItem(q); FAST_CONNECT(&timeline, SIGNAL(updated()), q, SLOT(ticked())) FAST_CONNECT(&timeline, SIGNAL(completed()), q, SLOT(movementEnding())) q->setAcceptedMouseButtons(Qt::LeftButton); q->setFiltersChildMouseEvents(true); - QSGItemPrivate *viewportPrivate = QSGItemPrivate::get(contentItem); - viewportPrivate->addItemChangeListener(this, QSGItemPrivate::Geometry); + QQuickItemPrivate *viewportPrivate = QQuickItemPrivate::get(contentItem); + viewportPrivate->addItemChangeListener(this, QQuickItemPrivate::Geometry); lastPosTime.invalidate(); } @@ -201,7 +201,7 @@ void QSGFlickablePrivate::init() Returns the amount to overshoot by given a velocity. Will be roughly in range 0 - size/4 */ -qreal QSGFlickablePrivate::overShootDistance(qreal size) +qreal QQuickFlickablePrivate::overShootDistance(qreal size) { if (maxVelocity <= 0) return 0.0; @@ -209,7 +209,7 @@ qreal QSGFlickablePrivate::overShootDistance(qreal size) return qMin(qreal(QML_FLICK_OVERSHOOT), size/3); } -void QSGFlickablePrivate::AxisData::addVelocitySample(qreal v, qreal maxVelocity) +void QQuickFlickablePrivate::AxisData::addVelocitySample(qreal v, qreal maxVelocity) { if (v > maxVelocity) v = maxVelocity; @@ -220,7 +220,7 @@ void QSGFlickablePrivate::AxisData::addVelocitySample(qreal v, qreal maxVelocity velocityBuffer.remove(0); } -void QSGFlickablePrivate::AxisData::updateVelocity() +void QQuickFlickablePrivate::AxisData::updateVelocity() { velocity = 0; if (velocityBuffer.count() > QML_FLICK_DISCARDSAMPLES) { @@ -233,9 +233,9 @@ void QSGFlickablePrivate::AxisData::updateVelocity() } } -void QSGFlickablePrivate::itemGeometryChanged(QSGItem *item, const QRectF &newGeom, const QRectF &oldGeom) +void QQuickFlickablePrivate::itemGeometryChanged(QQuickItem *item, const QRectF &newGeom, const QRectF &oldGeom) { - Q_Q(QSGFlickable); + Q_Q(QQuickFlickable); if (item == contentItem) { if (newGeom.x() != oldGeom.x()) emit q->contentXChanged(); @@ -244,22 +244,22 @@ void QSGFlickablePrivate::itemGeometryChanged(QSGItem *item, const QRectF &newGe } } -void QSGFlickablePrivate::flickX(qreal velocity) +void QQuickFlickablePrivate::flickX(qreal velocity) { - Q_Q(QSGFlickable); + Q_Q(QQuickFlickable); flick(hData, q->minXExtent(), q->maxXExtent(), q->width(), fixupX_callback, velocity); } -void QSGFlickablePrivate::flickY(qreal velocity) +void QQuickFlickablePrivate::flickY(qreal velocity) { - Q_Q(QSGFlickable); + Q_Q(QQuickFlickable); flick(vData, q->minYExtent(), q->maxYExtent(), q->height(), fixupY_callback, velocity); } -void QSGFlickablePrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal, +void QQuickFlickablePrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal, QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity) { - Q_Q(QSGFlickable); + Q_Q(QQuickFlickable); qreal maxDistance = -1; data.fixingUp = false; // -ve velocity means list is moving up @@ -279,7 +279,7 @@ void QSGFlickablePrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent v = maxVelocity; } timeline.reset(data.move); - if (boundsBehavior == QSGFlickable::DragAndOvershootBounds) + if (boundsBehavior == QQuickFlickable::DragAndOvershootBounds) timeline.accel(data.move, v, deceleration); else timeline.accel(data.move, v, deceleration, maxDistance); @@ -304,29 +304,29 @@ void QSGFlickablePrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent } } -void QSGFlickablePrivate::fixupY_callback(void *data) +void QQuickFlickablePrivate::fixupY_callback(void *data) { - ((QSGFlickablePrivate *)data)->fixupY(); + ((QQuickFlickablePrivate *)data)->fixupY(); } -void QSGFlickablePrivate::fixupX_callback(void *data) +void QQuickFlickablePrivate::fixupX_callback(void *data) { - ((QSGFlickablePrivate *)data)->fixupX(); + ((QQuickFlickablePrivate *)data)->fixupX(); } -void QSGFlickablePrivate::fixupX() +void QQuickFlickablePrivate::fixupX() { - Q_Q(QSGFlickable); + Q_Q(QQuickFlickable); fixup(hData, q->minXExtent(), q->maxXExtent()); } -void QSGFlickablePrivate::fixupY() +void QQuickFlickablePrivate::fixupY() { - Q_Q(QSGFlickable); + Q_Q(QQuickFlickable); fixup(vData, q->minYExtent(), q->maxYExtent()); } -void QSGFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent) +void QQuickFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent) { if (data.move.value() > minExtent || maxExtent > minExtent) { timeline.reset(data.move); @@ -374,9 +374,9 @@ void QSGFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent vTime = timeline.time(); } -void QSGFlickablePrivate::updateBeginningEnd() +void QQuickFlickablePrivate::updateBeginningEnd() { - Q_Q(QSGFlickable); + Q_Q(QQuickFlickable); bool atBoundaryChange = false; // Vertical @@ -455,7 +455,7 @@ is finished. */ /*! - \qmlclass Flickable QSGFlickable + \qmlclass Flickable QQuickFlickable \inqmlmodule QtQuick 2 \ingroup qml-basic-interaction-elements @@ -555,21 +555,21 @@ is finished. \sa {declarative/ui-components/scrollbar}{scrollbar example} */ -QSGFlickable::QSGFlickable(QSGItem *parent) - : QSGItem(*(new QSGFlickablePrivate), parent) +QQuickFlickable::QQuickFlickable(QQuickItem *parent) + : QQuickItem(*(new QQuickFlickablePrivate), parent) { - Q_D(QSGFlickable); + Q_D(QQuickFlickable); d->init(); } -QSGFlickable::QSGFlickable(QSGFlickablePrivate &dd, QSGItem *parent) - : QSGItem(dd, parent) +QQuickFlickable::QQuickFlickable(QQuickFlickablePrivate &dd, QQuickItem *parent) + : QQuickItem(dd, parent) { - Q_D(QSGFlickable); + Q_D(QQuickFlickable); d->init(); } -QSGFlickable::~QSGFlickable() +QQuickFlickable::~QQuickFlickable() { } @@ -581,15 +581,15 @@ QSGFlickable::~QSGFlickable() corner of the Flickable. For example, if you flick an image up 100 pixels, \c contentY will be 100. */ -qreal QSGFlickable::contentX() const +qreal QQuickFlickable::contentX() const { - Q_D(const QSGFlickable); + Q_D(const QQuickFlickable); return -d->contentItem->x(); } -void QSGFlickable::setContentX(qreal pos) +void QQuickFlickable::setContentX(qreal pos) { - Q_D(QSGFlickable); + Q_D(QQuickFlickable); d->hData.explicitValue = true; d->timeline.reset(d->hData.move); d->vTime = d->timeline.time(); @@ -600,15 +600,15 @@ void QSGFlickable::setContentX(qreal pos) } } -qreal QSGFlickable::contentY() const +qreal QQuickFlickable::contentY() const { - Q_D(const QSGFlickable); + Q_D(const QQuickFlickable); return -d->contentItem->y(); } -void QSGFlickable::setContentY(qreal pos) +void QQuickFlickable::setContentY(qreal pos) { - Q_D(QSGFlickable); + Q_D(QQuickFlickable); d->vData.explicitValue = true; d->timeline.reset(d->vData.move); d->vTime = d->timeline.time(); @@ -632,15 +632,15 @@ void QSGFlickable::setContentY(qreal pos) to freeze a flickable map while scrolling through a pop-up dialog that is a child of the Flickable. */ -bool QSGFlickable::isInteractive() const +bool QQuickFlickable::isInteractive() const { - Q_D(const QSGFlickable); + Q_D(const QQuickFlickable); return d->interactive; } -void QSGFlickable::setInteractive(bool interactive) +void QQuickFlickable::setInteractive(bool interactive) { - Q_D(QSGFlickable); + Q_D(QQuickFlickable); if (interactive != d->interactive) { d->interactive = interactive; if (!interactive && (d->hData.flicking || d->vData.flicking)) { @@ -665,15 +665,15 @@ void QSGFlickable::setInteractive(bool interactive) The reported velocity is smoothed to avoid erratic output. */ -qreal QSGFlickable::horizontalVelocity() const +qreal QQuickFlickable::horizontalVelocity() const { - Q_D(const QSGFlickable); + Q_D(const QQuickFlickable); return d->hData.smoothVelocity.value(); } -qreal QSGFlickable::verticalVelocity() const +qreal QQuickFlickable::verticalVelocity() const { - Q_D(const QSGFlickable); + Q_D(const QQuickFlickable); return d->vData.smoothVelocity.value(); } @@ -686,31 +686,31 @@ qreal QSGFlickable::verticalVelocity() const These properties are true if the flickable view is positioned at the beginning, or end respecively. */ -bool QSGFlickable::isAtXEnd() const +bool QQuickFlickable::isAtXEnd() const { - Q_D(const QSGFlickable); + Q_D(const QQuickFlickable); return d->hData.atEnd; } -bool QSGFlickable::isAtXBeginning() const +bool QQuickFlickable::isAtXBeginning() const { - Q_D(const QSGFlickable); + Q_D(const QQuickFlickable); return d->hData.atBeginning; } -bool QSGFlickable::isAtYEnd() const +bool QQuickFlickable::isAtYEnd() const { - Q_D(const QSGFlickable); + Q_D(const QQuickFlickable); return d->vData.atEnd; } -bool QSGFlickable::isAtYBeginning() const +bool QQuickFlickable::isAtYBeginning() const { - Q_D(const QSGFlickable); + Q_D(const QQuickFlickable); return d->vData.atBeginning; } -void QSGFlickable::ticked() +void QQuickFlickable::ticked() { viewportMoved(); } @@ -733,17 +733,17 @@ void QSGFlickable::ticked() } \endcode */ -QSGItem *QSGFlickable::contentItem() +QQuickItem *QQuickFlickable::contentItem() { - Q_D(QSGFlickable); + Q_D(QQuickFlickable); return d->contentItem; } -QSGFlickableVisibleArea *QSGFlickable::visibleArea() +QQuickFlickableVisibleArea *QQuickFlickable::visibleArea() { - Q_D(QSGFlickable); + Q_D(QQuickFlickable); if (!d->visibleArea) - d->visibleArea = new QSGFlickableVisibleArea(this); + d->visibleArea = new QQuickFlickableVisibleArea(this); return d->visibleArea; } @@ -762,39 +762,39 @@ QSGFlickableVisibleArea *QSGFlickable::visibleArea() \o Flickable.HorizontalAndVerticalFlick - allows flicking in both directions. \endlist */ -QSGFlickable::FlickableDirection QSGFlickable::flickableDirection() const +QQuickFlickable::FlickableDirection QQuickFlickable::flickableDirection() const { - Q_D(const QSGFlickable); + Q_D(const QQuickFlickable); return d->flickableDirection; } -void QSGFlickable::setFlickableDirection(FlickableDirection direction) +void QQuickFlickable::setFlickableDirection(FlickableDirection direction) { - Q_D(QSGFlickable); + Q_D(QQuickFlickable); if (direction != d->flickableDirection) { d->flickableDirection = direction; emit flickableDirectionChanged(); } } -bool QSGFlickable::pixelAligned() const +bool QQuickFlickable::pixelAligned() const { - Q_D(const QSGFlickable); + Q_D(const QQuickFlickable); return d->pixelAligned; } -void QSGFlickable::setPixelAligned(bool align) +void QQuickFlickable::setPixelAligned(bool align) { - Q_D(QSGFlickable); + Q_D(QQuickFlickable); if (align != d->pixelAligned) { d->pixelAligned = align; emit pixelAlignedChanged(); } } -void QSGFlickablePrivate::handleMousePressEvent(QMouseEvent *event) +void QQuickFlickablePrivate::handleMousePressEvent(QMouseEvent *event) { - Q_Q(QSGFlickable); + Q_Q(QQuickFlickable); if (interactive && timeline.isActive() && (qAbs(hData.smoothVelocity.value()) > RetainGrabVelocity || qAbs(vData.smoothVelocity.value()) > RetainGrabVelocity)) { @@ -813,19 +813,19 @@ void QSGFlickablePrivate::handleMousePressEvent(QMouseEvent *event) vData.dragMaxBound = q->maxYExtent(); fixupMode = Normal; lastPos = QPoint(); - QSGItemPrivate::start(lastPosTime); + QQuickItemPrivate::start(lastPosTime); pressPos = event->localPos(); hData.pressPos = hData.move.value(); vData.pressPos = vData.move.value(); hData.flicking = false; vData.flicking = false; - QSGItemPrivate::start(pressTime); - QSGItemPrivate::start(velocityTime); + QQuickItemPrivate::start(pressTime); + QQuickItemPrivate::start(velocityTime); } -void QSGFlickablePrivate::handleMouseMoveEvent(QMouseEvent *event) +void QQuickFlickablePrivate::handleMouseMoveEvent(QMouseEvent *event) { - Q_Q(QSGFlickable); + Q_Q(QQuickFlickable); if (!interactive || !lastPosTime.isValid()) return; bool rejectY = false; @@ -836,7 +836,7 @@ void QSGFlickablePrivate::handleMouseMoveEvent(QMouseEvent *event) if (q->yflick()) { int dy = int(event->localPos().y() - pressPos.y()); - if (qAbs(dy) > qApp->styleHints()->startDragDistance() || QSGItemPrivate::elapsed(pressTime) > 200) { + if (qAbs(dy) > qApp->styleHints()->startDragDistance() || QQuickItemPrivate::elapsed(pressTime) > 200) { if (!vMoved) vData.dragStartOffset = dy; qreal newY = dy + vData.pressPos - vData.dragStartOffset; @@ -846,7 +846,7 @@ void QSGFlickablePrivate::handleMouseMoveEvent(QMouseEvent *event) newY = minY + (newY - minY) / 2; if (newY < maxY && maxY - minY <= 0) newY = maxY + (newY - maxY) / 2; - if (boundsBehavior == QSGFlickable::StopAtBounds && (newY > minY || newY < maxY)) { + if (bound |