summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/3rdparty/3rdparty.pri2
-rw-r--r--src/declarative/3rdparty/qlistmodelinterface.cpp6
-rw-r--r--src/declarative/3rdparty/qlistmodelinterface_p.h (renamed from src/declarative/3rdparty/qlistmodelinterface.h)1
-rw-r--r--src/declarative/debugger/debugger.pri10
-rw-r--r--src/declarative/debugger/qmldebug.cpp44
-rw-r--r--src/declarative/debugger/qmldebug_p.h (renamed from src/declarative/debugger/qmldebug.h)54
-rw-r--r--src/declarative/debugger/qmldebugclient.cpp36
-rw-r--r--src/declarative/debugger/qmldebugclient_p.h (renamed from src/declarative/debugger/qmldebugclient.h)32
-rw-r--r--src/declarative/debugger/qmldebuggerstatus.cpp34
-rw-r--r--src/declarative/debugger/qmldebuggerstatus_p.h (renamed from src/declarative/debugger/qmldebuggerstatus.h)32
-rw-r--r--src/declarative/debugger/qmldebugservice.cpp36
-rw-r--r--src/declarative/debugger/qmldebugservice_p.h (renamed from src/declarative/debugger/qmldebugservice.h)34
-rw-r--r--src/declarative/debugger/qpacketprotocol.cpp34
-rw-r--r--src/declarative/debugger/qpacketprotocol_p.h (renamed from src/declarative/debugger/qpacketprotocol.h)34
-rw-r--r--src/declarative/declarative.pro2
-rw-r--r--src/declarative/extra/extra.pri34
-rw-r--r--src/declarative/extra/qmlbehavior.cpp38
-rw-r--r--src/declarative/extra/qmlbehavior_p.h (renamed from src/declarative/extra/qmlbehavior.h)34
-rw-r--r--src/declarative/extra/qmldatetimeformatter.cpp34
-rw-r--r--src/declarative/extra/qmldatetimeformatter_p.h (renamed from src/declarative/extra/qmldatetimeformatter.h)32
-rw-r--r--src/declarative/extra/qmlfontloader.cpp34
-rw-r--r--src/declarative/extra/qmlfontloader_p.h (renamed from src/declarative/extra/qmlfontloader.h)32
-rw-r--r--src/declarative/extra/qmlgraphicsanimatedimageitem.cpp (renamed from src/declarative/extra/qfxanimatedimageitem.cpp)98
-rw-r--r--src/declarative/extra/qmlgraphicsanimatedimageitem_p.h (renamed from src/declarative/extra/qfxanimatedimageitem.h)56
-rw-r--r--src/declarative/extra/qmlgraphicsanimatedimageitem_p_p.h (renamed from src/declarative/extra/qfxanimatedimageitem_p.h)46
-rw-r--r--src/declarative/extra/qmlgraphicsintegermodel.cpp (renamed from src/declarative/extra/qfxintegermodel.cpp)62
-rw-r--r--src/declarative/extra/qmlgraphicsintegermodel_p.h (renamed from src/declarative/extra/qfxintegermodel.h)50
-rw-r--r--src/declarative/extra/qmlgraphicsparticles.cpp (renamed from src/declarative/extra/qfxparticles.cpp)368
-rw-r--r--src/declarative/extra/qmlgraphicsparticles_p.h (renamed from src/declarative/extra/qfxparticles.h)112
-rw-r--r--src/declarative/extra/qmlnumberformatter.cpp34
-rw-r--r--src/declarative/extra/qmlnumberformatter_p.h (renamed from src/declarative/extra/qmlnumberformatter.h)34
-rw-r--r--src/declarative/extra/qmlsqlconnection.cpp429
-rw-r--r--src/declarative/extra/qmlsqlconnection.h116
-rw-r--r--src/declarative/extra/qmlsqlquery.cpp788
-rw-r--r--src/declarative/extra/qmlsqlquery.h143
-rw-r--r--src/declarative/extra/qmlxmllistmodel.cpp38
-rw-r--r--src/declarative/extra/qmlxmllistmodel_p.h (renamed from src/declarative/extra/qmlxmllistmodel.h)36
-rw-r--r--src/declarative/extra/qnumberformat.cpp34
-rw-r--r--src/declarative/extra/qnumberformat_p.h (renamed from src/declarative/extra/qnumberformat.h)32
-rw-r--r--src/declarative/fx/fx.pri84
-rw-r--r--src/declarative/fx/qfxborderimage_p.h97
-rw-r--r--src/declarative/fx/qfxflipable.h94
-rw-r--r--src/declarative/fx/qfxfocusscope.h68
-rw-r--r--src/declarative/graphicsitems/graphicsitems.pri84
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanchors.cpp (renamed from src/declarative/fx/qfxanchors.cpp)434
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanchors_p.h (renamed from src/declarative/fx/qfxanchors.h)115
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h (renamed from src/declarative/fx/qfxanchors_p.h)88
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsborderimage.cpp (renamed from src/declarative/fx/qfxborderimage.cpp)116
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsborderimage_p.h (renamed from src/declarative/fx/qfxborderimage.h)66
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsborderimage_p_p.h97
-rw-r--r--src/declarative/graphicsitems/qmlgraphicseffects.cpp (renamed from src/declarative/fx/qfxeffects.cpp)55
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsevents.cpp (renamed from src/declarative/fx/qfxevents.cpp)46
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsevents_p_p.h (renamed from src/declarative/fx/qfxevents_p.h)53
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflickable.cpp (renamed from src/declarative/fx/qfxflickable.cpp)397
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflickable_p.h (renamed from src/declarative/fx/qfxflickable.h)69
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflickable_p_p.h (renamed from src/declarative/fx/qfxflickable_p.h)68
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflipable.cpp (renamed from src/declarative/fx/qfxflipable.cpp)106
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflipable_p.h94
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp (renamed from src/declarative/fx/qfxfocuspanel.cpp)50
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsfocuspanel_p.h (renamed from src/declarative/fx/qfxfocuspanel.h)50
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp (renamed from src/declarative/fx/qfxfocusscope.cpp)46
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsfocusscope_p.h68
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp (renamed from src/declarative/fx/qfxgraphicsobjectcontainer.cpp)92
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer_p.h (renamed from src/declarative/fx/qfxgraphicsobjectcontainer.h)52
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsgridview.cpp (renamed from src/declarative/fx/qfxgridview.cpp)428
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsgridview_p.h (renamed from src/declarative/fx/qfxgridview.h)66
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsimage.cpp (renamed from src/declarative/fx/qfximage.cpp)76
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsimage_p.h (renamed from src/declarative/fx/qfximage.h)56
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsimage_p_p.h (renamed from src/declarative/fx/qfximage_p.h)52
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsimagebase.cpp (renamed from src/declarative/fx/qfximagebase.cpp)82
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsimagebase_p.h (renamed from src/declarative/fx/qfximagebase.h)56
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsimagebase_p_p.h (renamed from src/declarative/fx/qfximagebase_p.h)48
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.cpp (renamed from src/declarative/fx/qfxitem.cpp)1040
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.h (renamed from src/declarative/fx/qfxitem.h)109
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem_p.h (renamed from src/declarative/fx/qfxitem_p.h)124
-rw-r--r--src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp (renamed from src/declarative/fx/qfxlayoutitem.cpp)50
-rw-r--r--src/declarative/graphicsitems/qmlgraphicslayoutitem_p.h (renamed from src/declarative/fx/qfxlayoutitem.h)44
-rw-r--r--src/declarative/graphicsitems/qmlgraphicslistview.cpp (renamed from src/declarative/fx/qfxlistview.cpp)584
-rw-r--r--src/declarative/graphicsitems/qmlgraphicslistview_p.h (renamed from src/declarative/fx/qfxlistview.h)66
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsloader.cpp (renamed from src/declarative/fx/qfxloader.cpp)120
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsloader_p.h (renamed from src/declarative/fx/qfxloader.h)58
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsloader_p_p.h (renamed from src/declarative/fx/qfxloader_p.h)54
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp (renamed from src/declarative/fx/qfxmouseregion.cpp)208
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsmouseregion_p.h (renamed from src/declarative/fx/qfxmouseregion.h)92
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsmouseregion_p_p.h (renamed from src/declarative/fx/qfxmouseregion_p.h)52
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspainteditem.cpp (renamed from src/declarative/fx/qfxpainteditem.cpp)114
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspainteditem_p.h (renamed from src/declarative/fx/qfxpainteditem.h)55
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspainteditem_p_p.h (renamed from src/declarative/fx/qfxpainteditem_p.h)44
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspath.cpp (renamed from src/declarative/fx/qfxpath.cpp)244
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspath_p.h (renamed from src/declarative/fx/qfxpath.h)102
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspath_p_p.h (renamed from src/declarative/fx/qfxpath_p.h)48
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspathview.cpp (renamed from src/declarative/fx/qfxpathview.cpp)278
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspathview_p.h (renamed from src/declarative/fx/qfxpathview.h)72
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspathview_p_p.h (renamed from src/declarative/fx/qfxpathview_p.h)78
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspixmapcache.cpp (renamed from src/declarative/fx/qfxpixmapcache.cpp)64
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspixmapcache_p.h (renamed from src/declarative/fx/qfxpixmapcache.h)43
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspositioners.cpp (renamed from src/declarative/fx/qfxpositioners.cpp)216
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspositioners_p.h (renamed from src/declarative/fx/qfxpositioners.h)92
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspositioners_p_p.h (renamed from src/declarative/fx/qfxpositioners_p.h)70
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrect.cpp (renamed from src/declarative/fx/qfxrect.cpp)136
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrect_p.h (renamed from src/declarative/fx/qfxrect.h)92
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrect_p_p.h (renamed from src/declarative/fx/qfxrect_p.h)32
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrepeater.cpp (renamed from src/declarative/fx/qfxrepeater.cpp)132
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrepeater_p.h (renamed from src/declarative/fx/qfxrepeater.h)56
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrepeater_p_p.h (renamed from src/declarative/fx/qfxrepeater_p.h)56
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsscalegrid.cpp (renamed from src/declarative/fx/qfxscalegrid.cpp)88
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsscalegrid_p_p.h (renamed from src/declarative/fx/qfxscalegrid_p.h)71
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstext.cpp (renamed from src/declarative/fx/qfxtext.cpp)216
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstext_p.h (renamed from src/declarative/fx/qfxtext.h)54
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstext_p_p.h (renamed from src/declarative/fx/qfxtext_p.h)62
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstextedit.cpp (renamed from src/declarative/fx/qfxtextedit.cpp)356
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstextedit_p.h (renamed from src/declarative/fx/qfxtextedit.h)54
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstextedit_p_p.h (renamed from src/declarative/fx/qfxtextedit_p.h)58
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstextinput.cpp (renamed from src/declarative/fx/qfxtextinput.cpp)284
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstextinput_p.h (renamed from src/declarative/fx/qfxtextinput.h)56
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstextinput_p_p.h (renamed from src/declarative/fx/qfxtextinput_p.h)58
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp (renamed from src/declarative/fx/qfxvisualitemmodel.cpp)385
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h (renamed from src/declarative/fx/qfxvisualitemmodel.h)118
-rw-r--r--src/declarative/graphicsitems/qmlgraphicswebview.cpp (renamed from src/declarative/fx/qfxwebview.cpp)372
-rw-r--r--src/declarative/graphicsitems/qmlgraphicswebview_p.h (renamed from src/declarative/fx/qfxwebview.h)87
-rw-r--r--src/declarative/qml/parser/qmljs.g6
-rw-r--r--src/declarative/qml/parser/qmljsast.cpp34
-rw-r--r--src/declarative/qml/parser/qmljsast_p.h32
-rw-r--r--src/declarative/qml/parser/qmljsastfwd_p.h34
-rw-r--r--src/declarative/qml/parser/qmljsastvisitor.cpp34
-rw-r--r--src/declarative/qml/parser/qmljsastvisitor_p.h34
-rw-r--r--src/declarative/qml/parser/qmljsengine_p.cpp32
-rw-r--r--src/declarative/qml/parser/qmljsengine_p.h32
-rw-r--r--src/declarative/qml/parser/qmljsglobal_p.h40
-rw-r--r--src/declarative/qml/parser/qmljsgrammar.cpp34
-rw-r--r--src/declarative/qml/parser/qmljsgrammar_p.h34
-rw-r--r--src/declarative/qml/parser/qmljslexer.cpp32
-rw-r--r--src/declarative/qml/parser/qmljslexer_p.h34
-rw-r--r--src/declarative/qml/parser/qmljsmemorypool_p.h32
-rw-r--r--src/declarative/qml/parser/qmljsnodepool_p.h32
-rw-r--r--src/declarative/qml/parser/qmljsparser.cpp36
-rw-r--r--src/declarative/qml/parser/qmljsparser_p.h34
-rw-r--r--src/declarative/qml/qbitfield_p.h32
-rw-r--r--src/declarative/qml/qmetaobjectbuilder.cpp32
-rw-r--r--src/declarative/qml/qmetaobjectbuilder_p.h32
-rw-r--r--src/declarative/qml/qml.h33
-rw-r--r--src/declarative/qml/qml.pri6
-rw-r--r--src/declarative/qml/qmlbasicscript.cpp35
-rw-r--r--src/declarative/qml/qmlbasicscript_p.h32
-rw-r--r--src/declarative/qml/qmlbinding.cpp42
-rw-r--r--src/declarative/qml/qmlbinding.h33
-rw-r--r--src/declarative/qml/qmlbinding_p.h32
-rw-r--r--src/declarative/qml/qmlbindingoptimizations.cpp32
-rw-r--r--src/declarative/qml/qmlbindingoptimizations_p.h32
-rw-r--r--src/declarative/qml/qmlboundsignal.cpp40
-rw-r--r--src/declarative/qml/qmlboundsignal_p.h32
-rw-r--r--src/declarative/qml/qmlclassfactory.cpp32
-rw-r--r--src/declarative/qml/qmlclassfactory_p.h32
-rw-r--r--src/declarative/qml/qmlcleanup.cpp32
-rw-r--r--src/declarative/qml/qmlcleanup_p.h32
-rw-r--r--src/declarative/qml/qmlcompileddata.cpp32
-rw-r--r--src/declarative/qml/qmlcompiler.cpp68
-rw-r--r--src/declarative/qml/qmlcompiler_p.h50
-rw-r--r--src/declarative/qml/qmlcomponent.cpp87
-rw-r--r--src/declarative/qml/qmlcomponent.h41
-rw-r--r--src/declarative/qml/qmlcomponent_p.h37
-rw-r--r--src/declarative/qml/qmlcomponentjs.cpp131
-rw-r--r--src/declarative/qml/qmlcomponentjs_p.h98
-rw-r--r--src/declarative/qml/qmlcomponentjs_p_p.h77
-rw-r--r--src/declarative/qml/qmlcompositetypedata_p.h32
-rw-r--r--src/declarative/qml/qmlcompositetypemanager.cpp32
-rw-r--r--src/declarative/qml/qmlcompositetypemanager_p.h32
-rw-r--r--src/declarative/qml/qmlcontext.cpp32
-rw-r--r--src/declarative/qml/qmlcontext.h32
-rw-r--r--src/declarative/qml/qmlcontext_p.h32
-rw-r--r--src/declarative/qml/qmlcontextscriptclass.cpp32
-rw-r--r--src/declarative/qml/qmlcontextscriptclass_p.h32
-rw-r--r--src/declarative/qml/qmlcustomparser.cpp32
-rw-r--r--src/declarative/qml/qmlcustomparser_p.h33
-rw-r--r--src/declarative/qml/qmlcustomparser_p_p.h32
-rw-r--r--src/declarative/qml/qmldeclarativedata_p.h32
-rw-r--r--src/declarative/qml/qmldom.cpp35
-rw-r--r--src/declarative/qml/qmldom.h32
-rw-r--r--src/declarative/qml/qmldom_p.h32
-rw-r--r--src/declarative/qml/qmlengine.cpp194
-rw-r--r--src/declarative/qml/qmlengine.h32
-rw-r--r--src/declarative/qml/qmlengine_p.h34
-rw-r--r--src/declarative/qml/qmlenginedebug.cpp32
-rw-r--r--src/declarative/qml/qmlenginedebug_p.h34
-rw-r--r--src/declarative/qml/qmlerror.cpp32
-rw-r--r--src/declarative/qml/qmlerror.h32
-rw-r--r--src/declarative/qml/qmlexpression.cpp54
-rw-r--r--src/declarative/qml/qmlexpression.h32
-rw-r--r--src/declarative/qml/qmlexpression_p.h34
-rw-r--r--src/declarative/qml/qmlglobal_p.h (renamed from src/declarative/util/qfxglobal.h)47
-rw-r--r--src/declarative/qml/qmlglobalscriptclass.cpp32
-rw-r--r--src/declarative/qml/qmlglobalscriptclass_p.h32
-rw-r--r--src/declarative/qml/qmlinfo.cpp32
-rw-r--r--src/declarative/qml/qmlinfo.h32
-rw-r--r--src/declarative/qml/qmlinstruction.cpp32
-rw-r--r--src/declarative/qml/qmlinstruction_p.h34
-rw-r--r--src/declarative/qml/qmlintegercache.cpp32
-rw-r--r--src/declarative/qml/qmlintegercache_p.h32
-rw-r--r--src/declarative/qml/qmllist.h32
-rw-r--r--src/declarative/qml/qmllistscriptclass.cpp32
-rw-r--r--src/declarative/qml/qmllistscriptclass_p.h32
-rw-r--r--src/declarative/qml/qmlmetaproperty.cpp34
-rw-r--r--src/declarative/qml/qmlmetaproperty.h35
-rw-r--r--src/declarative/qml/qmlmetaproperty_p.h32
-rw-r--r--src/declarative/qml/qmlmetatype.cpp32
-rw-r--r--src/declarative/qml/qmlmetatype.h32
-rw-r--r--src/declarative/qml/qmlobjectscriptclass.cpp32
-rw-r--r--src/declarative/qml/qmlobjectscriptclass_p.h32
-rw-r--r--src/declarative/qml/qmlparser.cpp34
-rw-r--r--src/declarative/qml/qmlparser_p.h32
-rw-r--r--src/declarative/qml/qmlparserstatus.cpp32
-rw-r--r--src/declarative/qml/qmlparserstatus.h32
-rw-r--r--src/declarative/qml/qmlprivate.cpp32
-rw-r--r--src/declarative/qml/qmlprivate.h64
-rw-r--r--src/declarative/qml/qmlpropertycache.cpp32
-rw-r--r--src/declarative/qml/qmlpropertycache_p.h32
-rw-r--r--src/declarative/qml/qmlpropertyvalueinterceptor.cpp32
-rw-r--r--src/declarative/qml/qmlpropertyvalueinterceptor.h32
-rw-r--r--src/declarative/qml/qmlpropertyvaluesource.cpp32
-rw-r--r--src/declarative/qml/qmlpropertyvaluesource.h32
-rw-r--r--src/declarative/qml/qmlproxymetaobject.cpp32
-rw-r--r--src/declarative/qml/qmlproxymetaobject_p.h32
-rw-r--r--src/declarative/qml/qmlrefcount.cpp32
-rw-r--r--src/declarative/qml/qmlrefcount_p.h32
-rw-r--r--src/declarative/qml/qmlrewrite.cpp34
-rw-r--r--src/declarative/qml/qmlrewrite_p.h32
-rw-r--r--src/declarative/qml/qmlscript.cpp32
-rw-r--r--src/declarative/qml/qmlscriptparser.cpp36
-rw-r--r--src/declarative/qml/qmlscriptparser_p.h32
-rw-r--r--src/declarative/qml/qmlscriptstring.cpp32
-rw-r--r--src/declarative/qml/qmlscriptstring.h32
-rw-r--r--src/declarative/qml/qmlsqldatabase.cpp32
-rw-r--r--src/declarative/qml/qmlsqldatabase_p.h32
-rw-r--r--src/declarative/qml/qmlstringconverters.cpp32
-rw-r--r--src/declarative/qml/qmlstringconverters_p.h32
-rw-r--r--src/declarative/qml/qmltypenamecache.cpp32
-rw-r--r--src/declarative/qml/qmltypenamecache_p.h32
-rw-r--r--src/declarative/qml/qmltypenamescriptclass.cpp32
-rw-r--r--src/declarative/qml/qmltypenamescriptclass_p.h32
-rw-r--r--src/declarative/qml/qmlvaluetype.cpp32
-rw-r--r--src/declarative/qml/qmlvaluetype_p.h32
-rw-r--r--src/declarative/qml/qmlvaluetypescriptclass.cpp32
-rw-r--r--src/declarative/qml/qmlvaluetypescriptclass_p.h32
-rw-r--r--src/declarative/qml/qmlvme.cpp34
-rw-r--r--src/declarative/qml/qmlvme_p.h32
-rw-r--r--src/declarative/qml/qmlvmemetaobject.cpp32
-rw-r--r--src/declarative/qml/qmlvmemetaobject_p.h32
-rw-r--r--src/declarative/qml/qmlwatcher.cpp34
-rw-r--r--src/declarative/qml/qmlwatcher_p.h32
-rw-r--r--src/declarative/qml/qmlxmlhttprequest.cpp32
-rw-r--r--src/declarative/qml/qmlxmlhttprequest_p.h32
-rw-r--r--src/declarative/qml/qpodvector_p.h32
-rw-r--r--src/declarative/qml/rewriter/rewriter.cpp32
-rw-r--r--src/declarative/qml/rewriter/rewriter_p.h32
-rw-r--r--src/declarative/qml/rewriter/textwriter.cpp32
-rw-r--r--src/declarative/qml/rewriter/textwriter_p.h32
-rw-r--r--src/declarative/util/qfxperf.cpp50
-rw-r--r--src/declarative/util/qfxperf_p_p.h (renamed from src/declarative/util/qfxperf_p.h)40
-rw-r--r--src/declarative/util/qmlanimation.cpp61
-rw-r--r--src/declarative/util/qmlanimation.h407
-rw-r--r--src/declarative/util/qmlanimation_p.h571
-rw-r--r--src/declarative/util/qmlanimation_p_p.h362
-rw-r--r--src/declarative/util/qmlbind.cpp36
-rw-r--r--src/declarative/util/qmlbind_p.h (renamed from src/declarative/util/qmlbind.h)33
-rw-r--r--src/declarative/util/qmlconnection.cpp34
-rw-r--r--src/declarative/util/qmlconnection_p.h (renamed from src/declarative/util/qmlconnection.h)32
-rw-r--r--src/declarative/util/qmleasefollow.cpp36
-rw-r--r--src/declarative/util/qmleasefollow_p.h (renamed from src/declarative/util/qmleasefollow.h)34
-rw-r--r--src/declarative/util/qmllistaccessor.cpp34
-rw-r--r--src/declarative/util/qmllistaccessor_p.h (renamed from src/declarative/util/qmllistaccessor.h)32
-rw-r--r--src/declarative/util/qmllistmodel.cpp38
-rw-r--r--src/declarative/util/qmllistmodel_p.h (renamed from src/declarative/util/qmllistmodel.h)35
-rw-r--r--src/declarative/util/qmlnullablevalue_p_p.h (renamed from src/declarative/util/qmlnullablevalue_p.h)32
-rw-r--r--src/declarative/util/qmlopenmetaobject.cpp34
-rw-r--r--src/declarative/util/qmlopenmetaobject_p.h (renamed from src/declarative/util/qmlopenmetaobject.h)32
-rw-r--r--src/declarative/util/qmlpackage.cpp34
-rw-r--r--src/declarative/util/qmlpackage_p.h (renamed from src/declarative/util/qmlpackage.h)32
-rw-r--r--src/declarative/util/qmlpropertychanges.cpp45
-rw-r--r--src/declarative/util/qmlpropertychanges_p.h (renamed from src/declarative/util/qmlpropertychanges.h)34
-rw-r--r--src/declarative/util/qmlpropertymap.cpp36
-rw-r--r--src/declarative/util/qmlpropertymap_p.h (renamed from src/declarative/util/qmlpropertymap.h)33
-rw-r--r--src/declarative/util/qmlspringfollow.cpp47
-rw-r--r--src/declarative/util/qmlspringfollow_p.h (renamed from src/declarative/util/qmlspringfollow.h)38
-rw-r--r--src/declarative/util/qmlstate.cpp47
-rw-r--r--src/declarative/util/qmlstate.h174
-rw-r--r--src/declarative/util/qmlstate_p.h198
-rw-r--r--src/declarative/util/qmlstate_p_p.h121
-rw-r--r--src/declarative/util/qmlstategroup.cpp39
-rw-r--r--src/declarative/util/qmlstategroup_p.h (renamed from src/declarative/util/qmlstategroup.h)34
-rw-r--r--src/declarative/util/qmlstateoperations.cpp212
-rw-r--r--src/declarative/util/qmlstateoperations_p.h (renamed from src/declarative/util/qmlstateoperations.h)98
-rw-r--r--src/declarative/util/qmlsystempalette.cpp34
-rw-r--r--src/declarative/util/qmlsystempalette_p.h (renamed from src/declarative/util/qmlsystempalette.h)32
-rw-r--r--src/declarative/util/qmltimeline.cpp34
-rw-r--r--src/declarative/util/qmltimeline_p_p.h (renamed from src/declarative/util/qmltimeline_p.h)33
-rw-r--r--src/declarative/util/qmltimer.cpp36
-rw-r--r--src/declarative/util/qmltimer_p.h (renamed from src/declarative/util/qmltimer.h)33
-rw-r--r--src/declarative/util/qmltransition.cpp42
-rw-r--r--src/declarative/util/qmltransition_p.h (renamed from src/declarative/util/qmltransition.h)35
-rw-r--r--src/declarative/util/qmltransitionmanager.cpp36
-rw-r--r--src/declarative/util/qmltransitionmanager_p_p.h (renamed from src/declarative/util/qmltransitionmanager_p.h)34
-rw-r--r--src/declarative/util/qmlview.cpp65
-rw-r--r--src/declarative/util/qmlview.h39
-rw-r--r--src/declarative/util/qperformancelog.cpp34
-rw-r--r--src/declarative/util/qperformancelog_p_p.h (renamed from src/declarative/util/qperformancelog_p.h)32
-rw-r--r--src/declarative/util/util.pri45
-rw-r--r--src/declarative/widgets/graphicslayouts.cpp34
-rw-r--r--src/declarative/widgets/graphicslayouts_p.h (renamed from src/declarative/widgets/graphicslayouts.h)34
-rw-r--r--src/declarative/widgets/graphicswidgets.cpp34
-rw-r--r--src/declarative/widgets/graphicswidgets_p.h (renamed from src/declarative/widgets/graphicswidgets.h)36
-rw-r--r--src/declarative/widgets/widgets.pri4
311 files changed, 10338 insertions, 11969 deletions
diff --git a/src/declarative/3rdparty/3rdparty.pri b/src/declarative/3rdparty/3rdparty.pri
index fc78cb2..09cf0bb 100644
--- a/src/declarative/3rdparty/3rdparty.pri
+++ b/src/declarative/3rdparty/3rdparty.pri
@@ -1,5 +1,5 @@
HEADERS += \
- 3rdparty/qlistmodelinterface.h\
+ 3rdparty/qlistmodelinterface_p.h\
SOURCES += \
3rdparty/qlistmodelinterface.cpp \
diff --git a/src/declarative/3rdparty/qlistmodelinterface.cpp b/src/declarative/3rdparty/qlistmodelinterface.cpp
index 4213ff2..cfd4cff 100644
--- a/src/declarative/3rdparty/qlistmodelinterface.cpp
+++ b/src/declarative/3rdparty/qlistmodelinterface.cpp
@@ -39,18 +39,18 @@
**
****************************************************************************/
-#include "qlistmodelinterface.h"
+#include "qlistmodelinterface_p.h"
QT_BEGIN_NAMESPACE
/*!
\internal
\class QListModelInterface
- \brief The QListModelInterface class can be subclassed to provide C++ models to QFx Views
+ \brief The QListModelInterface class can be subclassed to provide C++ models to QmlGraphics Views
This class is comprised primarily of pure virtual functions which
you must implement in a subclass. You can then use the subclass
- as a model for a QFx view, such as a QFxListView.
+ as a model for a QmlGraphics view, such as a QmlGraphicsListView.
*/
/*! \fn QListModelInterface::QListModelInterface(QObject *parent)
diff --git a/src/declarative/3rdparty/qlistmodelinterface.h b/src/declarative/3rdparty/qlistmodelinterface_p.h
index 44c4a24..738378e 100644
--- a/src/declarative/3rdparty/qlistmodelinterface.h
+++ b/src/declarative/3rdparty/qlistmodelinterface_p.h
@@ -44,7 +44,6 @@
#include <QtCore/QHash>
#include <QtCore/QVariant>
-#include <QtDeclarative/qfxglobal.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri
index 82746fc..6cffb28 100644
--- a/src/declarative/debugger/debugger.pri
+++ b/src/declarative/debugger/debugger.pri
@@ -4,8 +4,8 @@ SOURCES += debugger/qmldebuggerstatus.cpp \
debugger/qmldebugclient.cpp \
debugger/qmldebug.cpp
-HEADERS += debugger/qmldebuggerstatus.h \
- debugger/qpacketprotocol.h \
- debugger/qmldebugservice.h \
- debugger/qmldebugclient.h \
- debugger/qmldebug.h
+HEADERS += debugger/qmldebuggerstatus_p.h \
+ debugger/qpacketprotocol_p.h \
+ debugger/qmldebugservice_p.h \
+ debugger/qmldebugclient_p.h \
+ debugger/qmldebug_p.h
diff --git a/src/declarative/debugger/qmldebug.cpp b/src/declarative/debugger/qmldebug.cpp
index 08d3d75..b06a250 100644
--- a/src/declarative/debugger/qmldebug.cpp
+++ b/src/declarative/debugger/qmldebug.cpp
@@ -1,5 +1,45 @@
-#include "qmldebug.h"
-#include "qmldebugclient.h"
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "qmldebug_p.h"
+#include "qmldebugclient_p.h"
#include <private/qobject_p.h>
#include <private/qmlenginedebug_p.h>
diff --git a/src/declarative/debugger/qmldebug.h b/src/declarative/debugger/qmldebug_p.h
index bd076ff..d7e4f5a 100644
--- a/src/declarative/debugger/qmldebug.h
+++ b/src/declarative/debugger/qmldebug_p.h
@@ -1,3 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
#ifndef QMLDEBUG_H
#define QMLDEBUG_H
@@ -5,6 +45,12 @@
#include <QtCore/qurl.h>
#include <QtCore/qvariant.h>
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
class QmlDebugConnection;
class QmlDebugWatch;
class QmlDebugPropertyWatch;
@@ -65,7 +111,7 @@ public:
int objectDebugId() const;
State state() const;
-signals:
+Q_SIGNALS:
void stateChanged(State);
//void objectChanged(int, const QmlDebugObjectReference &);
//void valueChanged(int, const QVariant &);
@@ -121,7 +167,7 @@ public:
// bool waitUntilCompleted();
-signals:
+Q_SIGNALS:
void stateChanged(State);
protected:
@@ -311,4 +357,8 @@ private:
};
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
#endif // QMLDEBUG_H
diff --git a/src/declarative/debugger/qmldebugclient.cpp b/src/declarative/debugger/qmldebugclient.cpp
index 3171808..4888758 100644
--- a/src/declarative/debugger/qmldebugclient.cpp
+++ b/src/declarative/debugger/qmldebugclient.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,28 +21,27 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmldebugclient.h"
+#include "qmldebugclient_p.h"
#include <private/qobject_p.h>
-#include <QtDeclarative/qpacketprotocol.h>
+#include <private/qpacketprotocol_p.h>
#include <QtCore/qdebug.h>
#include <QtCore/qstringlist.h>
diff --git a/src/declarative/debugger/qmldebugclient.h b/src/declarative/debugger/qmldebugclient_p.h
index 6397670..d64541b 100644
--- a/src/declarative/debugger/qmldebugclient.h
+++ b/src/declarative/debugger/qmldebugclient_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/debugger/qmldebuggerstatus.cpp b/src/declarative/debugger/qmldebuggerstatus.cpp
index d46a21d..dc1cfb0 100644
--- a/src/declarative/debugger/qmldebuggerstatus.cpp
+++ b/src/declarative/debugger/qmldebuggerstatus.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmldebuggerstatus.h"
+#include "qmldebuggerstatus_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/debugger/qmldebuggerstatus.h b/src/declarative/debugger/qmldebuggerstatus_p.h
index a8480f4..7c8070b 100644
--- a/src/declarative/debugger/qmldebuggerstatus.h
+++ b/src/declarative/debugger/qmldebuggerstatus_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/debugger/qmldebugservice.cpp b/src/declarative/debugger/qmldebugservice.cpp
index 6913def..b54ad63 100644
--- a/src/declarative/debugger/qmldebugservice.cpp
+++ b/src/declarative/debugger/qmldebugservice.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,31 +21,30 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmldebugservice.h"
+#include "qmldebugservice_p.h"
#include <QtCore/qdebug.h>
#include <QtNetwork/qtcpserver.h>
#include <QtNetwork/qtcpsocket.h>
#include <private/qobject_p.h>
-#include <QtDeclarative/qpacketprotocol.h>
+#include <private/qpacketprotocol_p.h>
#include <QtCore/qstringlist.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/debugger/qmldebugservice.h b/src/declarative/debugger/qmldebugservice_p.h
index 5d20ba0..b406a3c 100644
--- a/src/declarative/debugger/qmldebugservice.h
+++ b/src/declarative/debugger/qmldebugservice_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +48,8 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Declarative)
+
class QmlDebugServicePrivate;
class Q_DECLARATIVE_EXPORT QmlDebugService : public QObject
{
diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp
index 84882dd..6698472 100644
--- a/src/declarative/debugger/qpacketprotocol.cpp
+++ b/src/declarative/debugger/qpacketprotocol.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qpacketprotocol.h"
+#include "qpacketprotocol_p.h"
#include <QBuffer>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/debugger/qpacketprotocol.h b/src/declarative/debugger/qpacketprotocol_p.h
index f3fb44b..265af81 100644
--- a/src/declarative/debugger/qpacketprotocol.h
+++ b/src/declarative/debugger/qpacketprotocol_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -77,7 +77,7 @@ public:
QIODevice * device();
-signals:
+Q_SIGNALS:
void readyRead();
void invalidPacket();
void packetWritten();
diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro
index 942b74e..41fee96 100644
--- a/src/declarative/declarative.pro
+++ b/src/declarative/declarative.pro
@@ -17,7 +17,7 @@ include(../qbase.pri)
#modules
include(3rdparty/3rdparty.pri)
include(util/util.pri)
-include(fx/fx.pri)
+include(graphicsitems/graphicsitems.pri)
include(qml/qml.pri)
include(extra/extra.pri)
include(widgets/widgets.pri)
diff --git a/src/declarative/extra/extra.pri b/src/declarative/extra/extra.pri
index 502504a..9d0e760 100644
--- a/src/declarative/extra/extra.pri
+++ b/src/declarative/extra/extra.pri
@@ -2,34 +2,26 @@ SOURCES += \
extra/qnumberformat.cpp \
extra/qmlnumberformatter.cpp \
extra/qmldatetimeformatter.cpp \
- extra/qfxintegermodel.cpp \
- extra/qfxanimatedimageitem.cpp \
- extra/qfxparticles.cpp \
+ extra/qmlgraphicsintegermodel.cpp \
+ extra/qmlgraphicsanimatedimageitem.cpp \
+ extra/qmlgraphicsparticles.cpp \
extra/qmlbehavior.cpp \
extra/qmlfontloader.cpp
HEADERS += \
- extra/qnumberformat.h \
- extra/qmlnumberformatter.h \
- extra/qmldatetimeformatter.h \
- extra/qfxintegermodel.h \
- extra/qfxanimatedimageitem.h \
- extra/qfxanimatedimageitem_p.h \
- extra/qfxparticles.h \
- extra/qmlbehavior.h \
- extra/qmlfontloader.h
+ extra/qnumberformat_p.h \
+ extra/qmlnumberformatter_p.h \
+ extra/qmldatetimeformatter_p.h \
+ extra/qmlgraphicsintegermodel_p.h \
+ extra/qmlgraphicsanimatedimageitem_p.h \
+ extra/qmlgraphicsanimatedimageitem_p_p.h \
+ extra/qmlgraphicsparticles_p.h \
+ extra/qmlbehavior_p.h \
+ extra/qmlfontloader_p.h
contains(QT_CONFIG, xmlpatterns) {
QT+=xmlpatterns
SOURCES += extra/qmlxmllistmodel.cpp
- HEADERS += extra/qmlxmllistmodel.h
+ HEADERS += extra/qmlxmllistmodel_p.h
}
-# SQL is permanently enabled :-/
-#contains(QT_CONFIG, sql) {
- QT+= sql
- SOURCES += extra/qmlsqlquery.cpp \
- extra/qmlsqlconnection.cpp
- HEADERS += extra/qmlsqlquery.h \
- extra/qmlsqlconnection.h
-#}
diff --git a/src/declarative/extra/qmlbehavior.cpp b/src/declarative/extra/qmlbehavior.cpp
index 654cb4e..d6f4b42 100644
--- a/src/declarative/extra/qmlbehavior.cpp
+++ b/src/declarative/extra/qmlbehavior.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,29 +21,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include <private/qobject_p.h>
-#include "qmlanimation.h"
-#include "qmltransition.h"
-#include "qmlbehavior.h"
+#include <private/qmlanimation_p.h>
+#include <private/qmltransition_p.h>
+#include "qmlbehavior_p.h"
#include <QtDeclarative/qmlcontext.h>
#include <QtDeclarative/qmlinfo.h>
#include <QtCore/qparallelanimationgroup.h>
diff --git a/src/declarative/extra/qmlbehavior.h b/src/declarative/extra/qmlbehavior_p.h
index 6508455..9f85f84 100644
--- a/src/declarative/extra/qmlbehavior.h
+++ b/src/declarative/extra/qmlbehavior_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -45,7 +45,7 @@
#include <QtDeclarative/qmlpropertyvaluesource.h>
#include <QtDeclarative/qmlpropertyvalueinterceptor.h>
#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qmlstate.h>
+#include <private/qmlstate_p.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/extra/qmldatetimeformatter.cpp b/src/declarative/extra/qmldatetimeformatter.cpp
index 9b3d37a..4441850 100644
--- a/src/declarative/extra/qmldatetimeformatter.cpp
+++ b/src/declarative/extra/qmldatetimeformatter.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmldatetimeformatter.h"
+#include "qmldatetimeformatter_p.h"
#include "private/qobject_p.h"
#include <QtCore/qlocale.h>
diff --git a/src/declarative/extra/qmldatetimeformatter.h b/src/declarative/extra/qmldatetimeformatter_p.h
index be0ae02..e350f96 100644
--- a/src/declarative/extra/qmldatetimeformatter.h
+++ b/src/declarative/extra/qmldatetimeformatter_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/extra/qmlfontloader.cpp b/src/declarative/extra/qmlfontloader.cpp
index f9857f6..8c17d0f 100644
--- a/src/declarative/extra/qmlfontloader.cpp
+++ b/src/declarative/extra/qmlfontloader.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "private/qobject_p.h"
-#include "qmlfontloader.h"
+#include "qmlfontloader_p.h"
#include <QUrl>
#include <QDebug>
#include <QNetworkRequest>
diff --git a/src/declarative/extra/qmlfontloader.h b/src/declarative/extra/qmlfontloader_p.h
index c2c7a16..d02a181 100644
--- a/src/declarative/extra/qmlfontloader.h
+++ b/src/declarative/extra/qmlfontloader_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/extra/qfxanimatedimageitem.cpp b/src/declarative/extra/qmlgraphicsanimatedimageitem.cpp
index 5a491e0..5dbffc0 100644
--- a/src/declarative/extra/qfxanimatedimageitem.cpp
+++ b/src/declarative/extra/qmlgraphicsanimatedimageitem.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,20 +42,20 @@
#include <QMovie>
#include <QtDeclarative/qmlcontext.h>
#include <QtDeclarative/qmlengine.h>
-#include "qfxanimatedimageitem.h"
-#include "qfxanimatedimageitem_p.h"
+#include "qmlgraphicsanimatedimageitem_p.h"
+#include "qmlgraphicsanimatedimageitem_p_p.h"
#include <QNetworkRequest>
#include <QNetworkReply>
QT_BEGIN_NAMESPACE
/*!
- \class QFxAnimatedImageItem
+ \class QmlGraphicsAnimatedImageItem
\internal
*/
/*!
- \qmlclass AnimatedImage
+ \qmlclass AnimatedImage QFxAnimatedImageItem
\inherits Image
This item provides for playing animations stored as images containing a series of frames,
@@ -77,21 +77,21 @@ Item {
\endqml
\endtable
*/
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,AnimatedImage,QFxAnimatedImageItem)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,AnimatedImage,QmlGraphicsAnimatedImageItem)
-QFxAnimatedImageItem::QFxAnimatedImageItem(QFxItem *parent)
- : QFxImage(*(new QFxAnimatedImageItemPrivate), parent)
+QmlGraphicsAnimatedImageItem::QmlGraphicsAnimatedImageItem(QmlGraphicsItem *parent)
+ : QmlGraphicsImage(*(new QmlGraphicsAnimatedImageItemPrivate), parent)
{
}
-QFxAnimatedImageItem::QFxAnimatedImageItem(QFxAnimatedImageItemPrivate &dd, QFxItem *parent)
- : QFxImage(dd, parent)
+QmlGraphicsAnimatedImageItem::QmlGraphicsAnimatedImageItem(QmlGraphicsAnimatedImageItemPrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsImage(dd, parent)
{
}
-QFxAnimatedImageItem::~QFxAnimatedImageItem()
+QmlGraphicsAnimatedImageItem::~QmlGraphicsAnimatedImageItem()
{
- Q_D(QFxAnimatedImageItem);
+ Q_D(QmlGraphicsAnimatedImageItem);
delete d->_movie;
}
@@ -101,17 +101,17 @@ QFxAnimatedImageItem::~QFxAnimatedImageItem()
Defaults to false, and can be set to true when you want to pause.
*/
-bool QFxAnimatedImageItem::isPaused() const
+bool QmlGraphicsAnimatedImageItem::isPaused() const
{
- Q_D(const QFxAnimatedImageItem);
+ Q_D(const QmlGraphicsAnimatedImageItem);
if(!d->_movie)
return false;
return d->_movie->state()==QMovie::Paused;
}
-void QFxAnimatedImageItem::setPaused(bool pause)
+void QmlGraphicsAnimatedImageItem::setPaused(bool pause)
{
- Q_D(QFxAnimatedImageItem);
+ Q_D(QmlGraphicsAnimatedImageItem);
if(pause == d->paused)
return;
d->paused = pause;
@@ -125,17 +125,17 @@ void QFxAnimatedImageItem::setPaused(bool pause)
Defaults to true, so as to start playing immediately.
*/
-bool QFxAnimatedImageItem::isPlaying() const
+bool QmlGraphicsAnimatedImageItem::isPlaying() const
{
- Q_D(const QFxAnimatedImageItem);
+ Q_D(const QmlGraphicsAnimatedImageItem);
if (!d->_movie)
return false;
return d->_movie->state()!=QMovie::NotRunning;
}
-void QFxAnimatedImageItem::setPlaying(bool play)
+void QmlGraphicsAnimatedImageItem::setPlaying(bool play)
{
- Q_D(QFxAnimatedImageItem);
+ Q_D(QmlGraphicsAnimatedImageItem);
if(play == d->playing)
return;
d->playing = play;
@@ -155,33 +155,33 @@ void QFxAnimatedImageItem::setPlaying(bool play)
allow other things to animate at the same time as the image. frameCount is the number
of frames in the animation. For some animation formats, frameCount is unknown and set to zero.
*/
-int QFxAnimatedImageItem::currentFrame() const
+int QmlGraphicsAnimatedImageItem::currentFrame() const
{
- Q_D(const QFxAnimatedImageItem);
+ Q_D(const QmlGraphicsAnimatedImageItem);
if (!d->_movie)
return -1;
return d->_movie->currentFrameNumber();
}
-void QFxAnimatedImageItem::setCurrentFrame(int frame)
+void QmlGraphicsAnimatedImageItem::setCurrentFrame(int frame)
{
- Q_D(QFxAnimatedImageItem);
+ Q_D(QmlGraphicsAnimatedImageItem);
if (!d->_movie)
return;
d->_movie->jumpToFrame(frame);
}
-int QFxAnimatedImageItem::frameCount() const
+int QmlGraphicsAnimatedImageItem::frameCount() const
{
- Q_D(const QFxAnimatedImageItem);
+ Q_D(const QmlGraphicsAnimatedImageItem);
if (!d->_movie)
return 0;
return d->_movie->frameCount();
}
-void QFxAnimatedImageItem::setSource(const QUrl &url)
+void QmlGraphicsAnimatedImageItem::setSource(const QUrl &url)
{
- Q_D(QFxAnimatedImageItem);
+ Q_D(QmlGraphicsAnimatedImageItem);
if (url == d->url)
return;
@@ -209,9 +209,9 @@ void QFxAnimatedImageItem::setSource(const QUrl &url)
emit statusChanged(d->status);
}
-void QFxAnimatedImageItem::movieRequestFinished()
+void QmlGraphicsAnimatedImageItem::movieRequestFinished()
{
- Q_D(QFxAnimatedImageItem);
+ Q_D(QmlGraphicsAnimatedImageItem);
d->_movie = new QMovie(d->reply);
if (!d->_movie->isValid()){
qWarning() << "Error Reading Animated Image File " << d->url;
@@ -233,16 +233,16 @@ void QFxAnimatedImageItem::movieRequestFinished()
setPixmap(d->_movie->currentPixmap());
}
-void QFxAnimatedImageItem::movieUpdate()
+void QmlGraphicsAnimatedImageItem::movieUpdate()
{
- Q_D(QFxAnimatedImageItem);
+ Q_D(QmlGraphicsAnimatedImageItem);
setPixmap(d->_movie->currentPixmap());
emit frameChanged();
}
-void QFxAnimatedImageItem::playingStatusChanged()
+void QmlGraphicsAnimatedImageItem::playingStatusChanged()
{
- Q_D(QFxAnimatedImageItem);
+ Q_D(QmlGraphicsAnimatedImageItem);
if((d->_movie->state() != QMovie::NotRunning) != d->playing){
d->playing = (d->_movie->state() != QMovie::NotRunning);
emit playingChanged();
diff --git a/src/declarative/extra/qfxanimatedimageitem.h b/src/declarative/extra/qmlgraphicsanimatedimageitem_p.h
index 4002a3f..097aecd 100644
--- a/src/declarative/extra/qfxanimatedimageitem.h
+++ b/src/declarative/extra/qmlgraphicsanimatedimageitem_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,29 +21,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXANIMATEDIMAGEITEM_H
-#define QFXANIMATEDIMAGEITEM_H
+#ifndef QMLGRAPHICSANIMATEDIMAGEITEM_H
+#define QMLGRAPHICSANIMATEDIMAGEITEM_H
-#include <QtDeclarative/qfximage.h>
+#include <private/qmlgraphicsimage_p.h>
QT_BEGIN_HEADER
@@ -51,9 +51,9 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QMovie;
-class QFxAnimatedImageItemPrivate;
+class QmlGraphicsAnimatedImageItemPrivate;
-class Q_DECLARATIVE_EXPORT QFxAnimatedImageItem : public QFxImage
+class Q_DECLARATIVE_EXPORT QmlGraphicsAnimatedImageItem : public QmlGraphicsImage
{
Q_OBJECT
@@ -62,8 +62,8 @@ class Q_DECLARATIVE_EXPORT QFxAnimatedImageItem : public QFxImage
Q_PROPERTY(int currentFrame READ currentFrame WRITE setCurrentFrame NOTIFY frameChanged)
Q_PROPERTY(int frameCount READ frameCount)
public:
- QFxAnimatedImageItem(QFxItem *parent=0);
- ~QFxAnimatedImageItem();
+ QmlGraphicsAnimatedImageItem(QmlGraphicsItem *parent=0);
+ ~QmlGraphicsAnimatedImageItem();
bool isPlaying() const;
void setPlaying(bool play);
@@ -76,7 +76,7 @@ public:
int frameCount() const;
- // Extends QFxImage's src property*/
+ // Extends QmlGraphicsImage's src property*/
virtual void setSource(const QUrl&);
Q_SIGNALS:
@@ -90,16 +90,16 @@ private Q_SLOTS:
void playingStatusChanged();
protected:
- QFxAnimatedImageItem(QFxAnimatedImageItemPrivate &dd, QFxItem *parent);
+ QmlGraphicsAnimatedImageItem(QmlGraphicsAnimatedImageItemPrivate &dd, QmlGraphicsItem *parent);
private:
- Q_DISABLE_COPY(QFxAnimatedImageItem)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxAnimatedImageItem)
+ Q_DISABLE_COPY(QmlGraphicsAnimatedImageItem)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsAnimatedImageItem)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxAnimatedImageItem)
+QML_DECLARE_TYPE(QmlGraphicsAnimatedImageItem)
QT_END_HEADER
diff --git a/src/declarative/extra/qfxanimatedimageitem_p.h b/src/declarative/extra/qmlgraphicsanimatedimageitem_p_p.h
index 56252ca..0b12d2f 100644
--- a/src/declarative/extra/qfxanimatedimageitem_p.h
+++ b/src/declarative/extra/qmlgraphicsanimatedimageitem_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXANIMATEDIMAGE_P_H
-#define QFXANIMATEDIMAGE_P_H
+#ifndef QMLGRAPHICSANIMATEDIMAGE_P_H
+#define QMLGRAPHICSANIMATEDIMAGE_P_H
//
// W A R N I N G
@@ -53,19 +53,19 @@
// We mean it.
//
-#include <private/qfximage_p.h>
+#include <private/qmlgraphicsimage_p_p.h>
QT_BEGIN_NAMESPACE
class QMovie;
class QNetworkReply;
-class QFxAnimatedImageItemPrivate : public QFxImagePrivate
+class QmlGraphicsAnimatedImageItemPrivate : public QmlGraphicsImagePrivate
{
- Q_DECLARE_PUBLIC(QFxAnimatedImageItem)
+ Q_DECLARE_PUBLIC(QmlGraphicsAnimatedImageItem)
public:
- QFxAnimatedImageItemPrivate()
+ QmlGraphicsAnimatedImageItemPrivate()
: playing(true), paused(false), _movie(0), reply(0)
{
}
@@ -78,4 +78,4 @@ public:
QT_END_NAMESPACE
-#endif // QFXANIMATEDIMAGE_P_H
+#endif // QMLGRAPHICSANIMATEDIMAGE_P_H
diff --git a/src/declarative/extra/qfxintegermodel.cpp b/src/declarative/extra/qmlgraphicsintegermodel.cpp
index 3cd46d7..bcd00e6 100644
--- a/src/declarative/extra/qfxintegermodel.cpp
+++ b/src/declarative/extra/qmlgraphicsintegermodel.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,76 +21,75 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxintegermodel.h"
+#include "qmlgraphicsintegermodel_p.h"
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,IntegerModel,QFxIntegerModel)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,IntegerModel,QmlGraphicsIntegerModel)
-class QFxIntegerModelPrivate
+class QmlGraphicsIntegerModelPrivate
{
public:
- QFxIntegerModelPrivate() : minimum(0), maximum(0) {}
+ QmlGraphicsIntegerModelPrivate() : minimum(0), maximum(0) {}
int minimum;
int maximum;
};
-QFxIntegerModel::QFxIntegerModel(QObject *parent)
+QmlGraphicsIntegerModel::QmlGraphicsIntegerModel(QObject *parent)
: QListModelInterface(parent)
{
- d = new QFxIntegerModelPrivate;
+ d = new QmlGraphicsIntegerModelPrivate;
}
-QFxIntegerModel::~QFxIntegerModel()
+QmlGraphicsIntegerModel::~QmlGraphicsIntegerModel()
{
delete d;
}
-int QFxIntegerModel::minimum() const
+int QmlGraphicsIntegerModel::minimum() const
{
return d->minimum;
}
-void QFxIntegerModel::setMinimum(int minimum)
+void QmlGraphicsIntegerModel::setMinimum(int minimum)
{
d->minimum = minimum;
}
-int QFxIntegerModel::maximum() const
+int QmlGraphicsIntegerModel::maximum() const
{
return d->maximum;
}
-void QFxIntegerModel::setMaximum(int maximum)
+void QmlGraphicsIntegerModel::setMaximum(int maximum)
{
d->maximum = maximum;
}
-int QFxIntegerModel::count() const
+int QmlGraphicsIntegerModel::count() const
{
return qMax(0, d->maximum - d->minimum + 1);
}
-QHash<int,QVariant> QFxIntegerModel::data(int index, const QList<int> &roles) const
+QHash<int,QVariant> QmlGraphicsIntegerModel::data(int index, const QList<int> &roles) const
{
QHash<int,QVariant> returnHash;
@@ -108,7 +108,7 @@ QHash<int,QVariant> QFxIntegerModel::data(int index, const QList<int> &roles) co
return returnHash;
}
-QString QFxIntegerModel::toString(int role) const
+QString QmlGraphicsIntegerModel::toString(int role) const
{
switch(role) {
case Qt::DisplayRole:
@@ -118,7 +118,7 @@ QString QFxIntegerModel::toString(int role) const
}
}
-QList<int> QFxIntegerModel::roles() const
+QList<int> QmlGraphicsIntegerModel::roles() const
{
return QList<int>() << Qt::DisplayRole;
}
diff --git a/src/declarative/extra/qfxintegermodel.h b/src/declarative/extra/qmlgraphicsintegermodel_p.h
index 7fced2c..4055e01 100644
--- a/src/declarative/extra/qfxintegermodel.h
+++ b/src/declarative/extra/qmlgraphicsintegermodel_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,31 +21,30 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXINTMODEL_H
-#define QFXINTMODEL_H
+#ifndef QMLGRAPHICSINTMODEL_H
+#define QMLGRAPHICSINTMODEL_H
#include <QtCore/QObject>
#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qlistmodelinterface.h>
+#include <private/qlistmodelinterface_p.h>
QT_BEGIN_HEADER
@@ -52,13 +52,13 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxIntegerModelPrivate;
-class Q_DECLARATIVE_EXPORT QFxIntegerModel : public QListModelInterface
+class QmlGraphicsIntegerModelPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsIntegerModel : public QListModelInterface
{
Q_OBJECT
public:
- QFxIntegerModel(QObject *parent=0);
- ~QFxIntegerModel();
+ QmlGraphicsIntegerModel(QObject *parent=0);
+ ~QmlGraphicsIntegerModel();
Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
int minimum() const;
@@ -74,12 +74,12 @@ public:
QString toString(int role) const;
private:
- QFxIntegerModelPrivate *d;
+ QmlGraphicsIntegerModelPrivate *d;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxIntegerModel)
+QML_DECLARE_TYPE(QmlGraphicsIntegerModel)
QT_END_HEADER
diff --git a/src/declarative/extra/qfxparticles.cpp b/src/declarative/extra/qmlgraphicsparticles.cpp
index 8e77c34..aba7e27 100644
--- a/src/declarative/extra/qfxparticles.cpp
+++ b/src/declarative/extra/qmlgraphicsparticles.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "private/qfxitem_p.h"
+#include "private/qmlgraphicsitem_p.h"
#include <stdlib.h>
#include <math.h>
@@ -50,12 +50,12 @@
#ifndef INT_MAX
#define INT_MAX 2147483647
#endif
-#include <qfxpixmapcache.h>
-#include <private/qfxperf_p.h>
-#include <private/qmlanimation_p.h>
+#include <private/qmlgraphicspixmapcache_p.h>
+#include <private/qfxperf_p_p.h>
+#include <private/qmlanimation_p_p.h>
#include <QNetworkReply>
-#include "qfxparticles.h"
+#include "qmlgraphicsparticles_p.h"
#include <QPainter>
#include <QtGui/qdrawutil.h>
#include <QVarLengthArray>
@@ -81,10 +81,10 @@ inline qreal fastCos(qreal theta)
return fastSin(theta);
}
-class QFxParticle
+class QmlGraphicsParticle
{
public:
- QFxParticle(int time) : lifeSpan(1000), fadeOutAge(800)
+ QmlGraphicsParticle(int time) : lifeSpan(1000), fadeOutAge(800)
, opacity(0), birthTime(time), x_velocity(0), y_velocity(0)
, state(FadeIn), data(0)
{
@@ -105,21 +105,21 @@ public:
//---------------------------------------------------------------------------
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParticleMotion,QFxParticleMotion)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParticleMotion,QmlGraphicsParticleMotion)
/*!
- \class QFxParticleMotion
+ \class QmlGraphicsParticleMotion
\ingroup group_effects
- \brief The QFxParticleMotion class is the base class for particle motion.
+ \brief The QmlGraphicsParticleMotion class is the base class for particle motion.
\internal
This class causes the particles to remain static.
*/
/*!
- Constructs a QFxParticleMotion with parent object \a parent.
+ Constructs a QmlGraphicsParticleMotion with parent object \a parent.
*/
-QFxParticleMotion::QFxParticleMotion(QObject *parent) :
+QmlGraphicsParticleMotion::QmlGraphicsParticleMotion(QObject *parent) :
QObject(parent)
{
}
@@ -128,7 +128,7 @@ QFxParticleMotion::QFxParticleMotion(QObject *parent) :
Move the \a particle to its new position. \a interval is the number of
milliseconds elapsed since it was last moved.
*/
-void QFxParticleMotion::advance(QFxParticle &particle, int interval)
+void QmlGraphicsParticleMotion::advance(QmlGraphicsParticle &particle, int interval)
{
Q_UNUSED(particle);
Q_UNUSED(interval);
@@ -138,7 +138,7 @@ void QFxParticleMotion::advance(QFxParticle &particle, int interval)
The \a particle has just been created. Some motion strategies require
additional state information. This can be allocated by this function.
*/
-void QFxParticleMotion::created(QFxParticle &particle)
+void QmlGraphicsParticleMotion::created(QmlGraphicsParticle &particle)
{
Q_UNUSED(particle);
}
@@ -147,7 +147,7 @@ void QFxParticleMotion::created(QFxParticle &particle)
The \a particle is about to be destroyed. Any additional memory
that has been allocated for the particle should be freed.
*/
-void QFxParticleMotion::destroy(QFxParticle &particle)
+void QmlGraphicsParticleMotion::destroy(QmlGraphicsParticle &particle)
{
Q_UNUSED(particle);
}
@@ -161,14 +161,14 @@ void QFxParticleMotion::destroy(QFxParticle &particle)
/*!
\internal
- \class QFxParticleMotionLinear
+ \class QmlGraphicsParticleMotionLinear
\ingroup group_effects
- \brief The QFxParticleMotionLinear class moves the particles linearly.
+ \brief The QmlGraphicsParticleMotionLinear class moves the particles linearly.
*/
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParticleMotionLinear,QFxParticleMotionLinear)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParticleMotionLinear,QmlGraphicsParticleMotionLinear)
-void QFxParticleMotionLinear::advance(QFxParticle &p, int interval)
+void QmlGraphicsParticleMotionLinear::advance(QmlGraphicsParticle &p, int interval)
{
p.x += interval * p.x_velocity;
p.y += interval * p.y_velocity;
@@ -183,12 +183,12 @@ void QFxParticleMotionLinear::advance(QFxParticle &p, int interval)
/*!
\internal
- \class QFxParticleMotionGravity
+ \class QmlGraphicsParticleMotionGravity
\ingroup group_effects
- \brief The QFxParticleMotionGravity class moves the particles towards a point.
+ \brief The QmlGraphicsParticleMotionGravity class moves the particles towards a point.
*/
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParticleMotionGravity,QFxParticleMotionGravity)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParticleMotionGravity,QmlGraphicsParticleMotionGravity)
/*!
\qmlproperty int ParticleMotionGravity::xattractor
@@ -202,21 +202,21 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParticleMotionGravity,QFxParticl
*/
/*!
- \property QFxParticleMotionGravity::xattractor
+ \property QmlGraphicsParticleMotionGravity::xattractor
\brief the x coordinate of the point attracting the particles.
*/
/*!
- \property QFxParticleMotionGravity::yattractor
+ \property QmlGraphicsParticleMotionGravity::yattractor
\brief the y coordinate of the point attracting the particles.
*/
/*!
- \property QFxParticleMotionGravity::acceleration
+ \property QmlGraphicsParticleMotionGravity::acceleration
\brief the acceleration to apply to the particles.
*/
-void QFxParticleMotionGravity::advance(QFxParticle &p, int interval)
+void QmlGraphicsParticleMotionGravity::advance(QmlGraphicsParticle &p, int interval)
{
qreal xdiff = p.x - _xAttr;
qreal ydiff = p.y - _yAttr;
@@ -270,32 +270,32 @@ Rectangle {
/*!
\internal
- \class QFxParticleMotionWander
+ \class QmlGraphicsParticleMotionWander
\ingroup group_effects
- \brief The QFxParticleMotionWander class moves particles in a somewhat random fashion.
+ \brief The QmlGraphicsParticleMotionWander class moves particles in a somewhat random fashion.
The particles will continue roughly in the original direction, however will randomly
drift to each side.
*/
/*!
- \qmlproperty int QFxParticleMotionWander::xvariance
- \qmlproperty int QFxParticleMotionWander::yvariance
+ \qmlproperty int QmlGraphicsParticleMotionWander::xvariance
+ \qmlproperty int QmlGraphicsParticleMotionWander::yvariance
These properties set the amount to wander in the x and y directions.
*/
/*!
- \qmlproperty int QFxParticleMotionWander::pace
+ \qmlproperty int QmlGraphicsParticleMotionWander::pace
This property holds how quickly the paricles will move from side to side.
*/
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParticleMotionWander,QFxParticleMotionWander)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ParticleMotionWander,QmlGraphicsParticleMotionWander)
-void QFxParticleMotionWander::advance(QFxParticle &p, int interval)
+void QmlGraphicsParticleMotionWander::advance(QmlGraphicsParticle &p, int interval)
{
if (!particles)
- particles = qobject_cast<QFxParticles*>(parent());
+ particles = qobject_cast<QmlGraphicsParticles*>(parent());
if (particles) {
Data *d = (Data*)p.data;
if (_xvariance != 0.) {
@@ -320,7 +320,7 @@ void QFxParticleMotionWander::advance(QFxParticle &p, int interval)
}
}
-void QFxParticleMotionWander::created(QFxParticle &p)
+void QmlGraphicsParticleMotionWander::created(QmlGraphicsParticle &p)
{
if (!p.data) {
Data *d = new Data;
@@ -334,18 +334,18 @@ void QFxParticleMotionWander::created(QFxParticle &p)
}
}
-void QFxParticleMotionWander::destroy(QFxParticle &p)
+void QmlGraphicsParticleMotionWander::destroy(QmlGraphicsParticle &p)
{
if (p.data)
delete (Data*)p.data;
}
//---------------------------------------------------------------------------
-class QFxParticlesPainter : public QFxItem
+class QmlGraphicsParticlesPainter : public QmlGraphicsItem
{
public:
- QFxParticlesPainter(QFxParticlesPrivate *p, QFxItem* parent)
- : QFxItem(parent), d(p)
+ QmlGraphicsParticlesPainter(QmlGraphicsParticlesPrivate *p, QmlGraphicsItem* parent)
+ : QmlGraphicsItem(parent), d(p)
{
setFlag(QGraphicsItem::ItemHasNoContents, false);
maxX = minX = maxY = minY = 0;
@@ -359,16 +359,15 @@ public:
qreal minX;
qreal maxY;
qreal minY;
- QVarLengthArray<QDrawPixmaps::Data, 50> pixmapData;
- QFxParticlesPrivate* d;
+ QmlGraphicsParticlesPrivate* d;
};
//---------------------------------------------------------------------------
-class QFxParticlesPrivate : public QFxItemPrivate
+class QmlGraphicsParticlesPrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxParticles)
+ Q_DECLARE_PUBLIC(QmlGraphicsParticles)
public:
- QFxParticlesPrivate()
+ QmlGraphicsParticlesPrivate()
: count(1), lifeSpan(1000), lifeSpanDev(1000), fadeInDur(200), fadeOutDur(300)
, angle(0), angleDev(0), velocity(0), velocityDev(0)
, addParticleTime(0), addParticleCount(0), lastAdvTime(0), stream(false), streamDelay(0)
@@ -376,20 +375,19 @@ public:
{
}
- ~QFxParticlesPrivate()
+ ~QmlGraphicsParticlesPrivate()
{
}
void init()
{
- Q_Q(QFxParticles);
- paintItem = new QFxParticlesPainter(this, q);
- paintItem->pixmapData.resize(count);
+ Q_Q(QmlGraphicsParticles);
+ paintItem = new QmlGraphicsParticlesPainter(this, q);
}
void tick(int time);
void createParticle(int time);
- void updateOpacity(QFxParticle &p, int age);
+ void updateOpacity(QmlGraphicsParticle &p, int age);
QUrl url;
QPixmap image;
@@ -408,30 +406,30 @@ public:
bool stream;
int streamDelay;
bool emitting;
- QFxParticleMotion *motion;
- QFxParticlesPainter *paintItem;
+ QmlGraphicsParticleMotion *motion;
+ QmlGraphicsParticlesPainter *paintItem;
bool pendingPixmapCache;
- QList<QFxParticle> particles;
- QTickAnimationProxy<QFxParticlesPrivate, &QFxParticlesPrivate::tick> clock;
+ QList<QmlGraphicsParticle> particles;
+ QTickAnimationProxy<QmlGraphicsParticlesPrivate, &QmlGraphicsParticlesPrivate::tick> clock;
};
-void QFxParticlesPrivate::tick(int time)
+void QmlGraphicsParticlesPrivate::tick(int time)
{
- Q_Q(QFxParticles);
+ Q_Q(QmlGraphicsParticles);
if (!motion)
- motion = new QFxParticleMotionLinear(q);
+ motion = new QmlGraphicsParticleMotionLinear(q);
int oldCount = particles.count();
int removed = 0;
int interval = time - lastAdvTime;
for (int i = 0; i < particles.count(); ) {
- QFxParticle &particle = particles[i];
+ QmlGraphicsParticle &particle = particles[i];
int age = time - particle.birthTime;
if (age >= particle.lifeSpan) {
- QFxParticle part = particles.takeAt(i);
+ QmlGraphicsParticle part = particles.takeAt(i);
motion->destroy(part);
++removed;
} else {
@@ -480,13 +478,13 @@ void QFxParticlesPrivate::tick(int time)
}
}
-void QFxParticlesPrivate::createParticle(int time)
+void QmlGraphicsParticlesPrivate::createParticle(int time)
{
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::CreateParticle> x;
+ QmlPerfTimer<QmlPerf::CreateParticle> x;
#endif
- Q_Q(QFxParticles);
- QFxParticle p(time);
+ Q_Q(QmlGraphicsParticles);
+ QmlGraphicsParticle p(time);
p.x = q->x() + q->width() * qreal(rand()) / RAND_MAX - image.width()/2.0;
p.y = q->y() + q->height() * qreal(rand()) / RAND_MAX - image.height()/2.0;
p.lifeSpan = lifeSpan;
@@ -494,7 +492,7 @@ void QFxParticlesPrivate::createParticle(int time)
p.lifeSpan += int(lifeSpanDev/2 - lifeSpanDev * qreal(rand()) / RAND_MAX);
p.fadeOutAge = p.lifeSpan - fadeOutDur;
if (fadeInDur == 0.) {
- p.state= QFxParticle::Solid;
+ p.state= QmlGraphicsParticle::Solid;
p.opacity = 1.0;
}
qreal a = angle;
@@ -511,32 +509,32 @@ void QFxParticlesPrivate::createParticle(int time)
motion->created(particles.last());
}
-void QFxParticlesPrivate::updateOpacity(QFxParticle &p, int age)
+void QmlGraphicsParticlesPrivate::updateOpacity(QmlGraphicsParticle &p, int age)
{
switch (p.state) {
- case QFxParticle::FadeIn:
+ case QmlGraphicsParticle::FadeIn:
if (age <= fadeInDur) {
p.opacity = qreal(age) / fadeInDur;
break;
} else {
p.opacity = 1.0;
- p.state = QFxParticle::Solid;
+ p.state = QmlGraphicsParticle::Solid;
// Fall through
}
- case QFxParticle::Solid:
+ case QmlGraphicsParticle::Solid:
if (age <= p.fadeOutAge) {
break;
} else {
- p.state = QFxParticle::FadeOut;
+ p.state = QmlGraphicsParticle::FadeOut;
// Fall through
}
- case QFxParticle::FadeOut:
+ case QmlGraphicsParticle::FadeOut:
p.opacity = qreal(p.lifeSpan - age) / fadeOutDur;
break;
}
}
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Particles,QFxParticles)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Particles,QmlGraphicsParticles)
/*!
\qmlclass Particles
@@ -598,30 +596,30 @@ Rectangle {
/*!
\internal
- \class QFxParticles
+ \class QmlGraphicsParticles
\ingroup group_effects
- \brief The QFxParticles class generates and moves particles.
+ \brief The QmlGraphicsParticles class generates and moves particles.
*/
-QFxParticles::QFxParticles(QFxItem *parent)
- : QFxItem(*(new QFxParticlesPrivate), parent)
+QmlGraphicsParticles::QmlGraphicsParticles(QmlGraphicsItem *parent)
+ : QmlGraphicsItem(*(new QmlGraphicsParticlesPrivate), parent)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
d->init();
}
-QFxParticles::QFxParticles(QFxParticlesPrivate &dd, QFxItem *parent)
- : QFxItem(dd, parent)
+QmlGraphicsParticles::QmlGraphicsParticles(QmlGraphicsParticlesPrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsItem(dd, parent)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
d->init();
}
-QFxParticles::~QFxParticles()
+QmlGraphicsParticles::~QmlGraphicsParticles()
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
if (d->pendingPixmapCache)
- QFxPixmapCache::cancelGet(d->url, this);
+ QmlGraphicsPixmapCache::cancelGet(d->url, this);
}
/*!
@@ -630,33 +628,33 @@ QFxParticles::~QFxParticles()
*/
/*!
- \property QFxParticles::source
+ \property QmlGraphicsParticles::source
\brief the URL of the particle image.
*/
-QUrl QFxParticles::source() const
+QUrl QmlGraphicsParticles::source() const
{
- Q_D(const QFxParticles);
+ Q_D(const QmlGraphicsParticles);
return d->url;
}
-void QFxParticles::imageLoaded()
+void QmlGraphicsParticles::imageLoaded()
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
d->pendingPixmapCache = false;
- QFxPixmapCache::find(d->url, &d->image);
+ QmlGraphicsPixmapCache::find(d->url, &d->image);
d->paintItem->updateSize();
d->paintItem->update();
}
-void QFxParticles::setSource(const QUrl &name)
+void QmlGraphicsParticles::setSource(const QUrl &name)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
if ((d->url.isEmpty() == name.isEmpty()) && name == d->url)
return;
if (d->pendingPixmapCache) {
- QFxPixmapCache::cancelGet(d->url, this);
+ QmlGraphicsPixmapCache::cancelGet(d->url, this);
d->pendingPixmapCache = false;
}
if (name.isEmpty()) {
@@ -667,7 +665,7 @@ void QFxParticles::setSource(const QUrl &name)
} else {
d->url = name;
Q_ASSERT(!name.isRelative());
- QNetworkReply *reply = QFxPixmapCache::get(qmlEngine(this), d->url, &d->image);
+ QNetworkReply *reply = QmlGraphicsPixmapCache::get(qmlEngine(this), d->url, &d->image);
if (reply) {
connect(reply, SIGNAL(finished()), this, SLOT(imageLoaded()));
d->pendingPixmapCache = true;
@@ -685,25 +683,23 @@ void QFxParticles::setSource(const QUrl &name)
*/
/*!
- \property QFxParticles::count
+ \property QmlGraphicsParticles::count
\brief the target number of particles
*/
-int QFxParticles::count() const
+int QmlGraphicsParticles::count() const
{
- Q_D(const QFxParticles);
+ Q_D(const QmlGraphicsParticles);
return d->count;
}
-void QFxParticles::setCount(int cnt)
+void QmlGraphicsParticles::setCount(int cnt)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
if (cnt == d->count)
return;
int oldCount = d->count;
d->count = cnt;
- if (cnt > oldCount)
- d->paintItem->pixmapData.resize(d->count);
d->addParticleTime = 0;
d->addParticleCount = d->particles.count();
if (!oldCount && d->clock.state() != QAbstractAnimation::Running && d->count) {
@@ -735,27 +731,27 @@ Particles {
*/
/*!
- \property QFxParticles::lifeSpan
+ \property QmlGraphicsParticles::lifeSpan
\brief the life span of each particle.
Default value is 1000ms.
- \sa QFxParticles::lifeSpanDeviation
+ \sa QmlGraphicsParticles::lifeSpanDeviation
*/
-int QFxParticles::lifeSpan() const
+int QmlGraphicsParticles::lifeSpan() const
{
- Q_D(const QFxParticles);
+ Q_D(const QmlGraphicsParticles);
return d->lifeSpan;
}
-void QFxParticles::setLifeSpan(int ls)
+void QmlGraphicsParticles::setLifeSpan(int ls)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
d->lifeSpan = ls;
}
/*!
- \property QFxParticles::lifeSpanDeviation
+ \property QmlGraphicsParticles::lifeSpanDeviation
\brief the maximum possible deviation from the set lifeSpan.
Randomly varies the lifeSpan up to the specified variation. For
@@ -770,17 +766,17 @@ Particles {
}
\endqml
- \sa QFxParticles::lifeSpan
+ \sa QmlGraphicsParticles::lifeSpan
*/
-int QFxParticles::lifeSpanDeviation() const
+int QmlGraphicsParticles::lifeSpanDeviation() const
{
- Q_D(const QFxParticles);
+ Q_D(const QmlGraphicsParticles);
return d->lifeSpanDev;
}
-void QFxParticles::setLifeSpanDeviation(int dev)
+void QmlGraphicsParticles::setLifeSpanDeviation(int dev)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
d->lifeSpanDev = dev;
}
@@ -793,39 +789,39 @@ void QFxParticles::setLifeSpanDeviation(int dev)
*/
/*!
- \property QFxParticles::fadeInDuration
+ \property QmlGraphicsParticles::fadeInDuration
\brief the time taken to fade in the particles.
Default value is 200ms.
*/
-int QFxParticles::fadeInDuration() const
+int QmlGraphicsParticles::fadeInDuration() const
{
- Q_D(const QFxParticles);
+ Q_D(const QmlGraphicsParticles);
return d->fadeInDur;
}
-void QFxParticles::setFadeInDuration(int dur)
+void QmlGraphicsParticles::setFadeInDuration(int dur)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
if (dur >= 0.0)
d->fadeInDur = dur;
}
/*!
- \property QFxParticles::fadeOutDuration
+ \property QmlGraphicsParticles::fadeOutDuration
\brief the time taken to fade out the particles.
Default value is 300ms.
*/
-int QFxParticles::fadeOutDuration() const
+int QmlGraphicsParticles::fadeOutDuration() const
{
- Q_D(const QFxParticles);
+ Q_D(const QmlGraphicsParticles);
return d->fadeOutDur;
}
-void QFxParticles::setFadeOutDuration(int dur)
+void QmlGraphicsParticles::setFadeOutDuration(int dur)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
if (dur >= 0.0)
d->fadeOutDur = dur;
}
@@ -850,25 +846,25 @@ Particles {
*/
/*!
- \property QFxParticles::angle
+ \property QmlGraphicsParticles::angle
\brief the initial angle of direction.
- \sa QFxParticles::angleDeviation
+ \sa QmlGraphicsParticles::angleDeviation
*/
-qreal QFxParticles::angle() const
+qreal QmlGraphicsParticles::angle() const
{
- Q_D(const QFxParticles);
+ Q_D(const QmlGraphicsParticles);
return d->angle * 180.0 / M_PI;
}
-void QFxParticles::setAngle(qreal angle)
+void QmlGraphicsParticles::setAngle(qreal angle)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
d->angle = angle * M_PI / 180.0;
}
/*!
- \property QFxParticles::angleDeviation
+ \property QmlGraphicsParticles::angleDeviation
\brief the maximum possible deviation from the set angle.
Randomly varies the direction up to the specified variation. For
@@ -883,17 +879,17 @@ Particles {
}
\endqml
- \sa QFxParticles::angle
+ \sa QmlGraphicsParticles::angle
*/
-qreal QFxParticles::angleDeviation() const
+qreal QmlGraphicsParticles::angleDeviation() const
{
- Q_D(const QFxParticles);
+ Q_D(const QmlGraphicsParticles);
return d->angleDev * 180.0 / M_PI;
}
-void QFxParticles::setAngleDeviation(qreal dev)
+void QmlGraphicsParticles::setAngleDeviation(qreal dev)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
d->angleDev = dev * M_PI / 180.0;;
}
@@ -917,25 +913,25 @@ Particles {
*/
/*!
- \property QFxParticles::velocity
+ \property QmlGraphicsParticles::velocity
\brief the initial velocity of the particles.
- \sa QFxParticles::velocityDeviation
+ \sa QmlGraphicsParticles::velocityDeviation
*/
-qreal QFxParticles::velocity() const
+qreal QmlGraphicsParticles::velocity() const
{
- Q_D(const QFxParticles);
+ Q_D(const QmlGraphicsParticles);
return d->velocity * 1000.0;
}
-void QFxParticles::setVelocity(qreal velocity)
+void QmlGraphicsParticles::setVelocity(qreal velocity)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
d->velocity = velocity / 1000.0;
}
/*!
- \property QFxParticles::velocityDeviation
+ \property QmlGraphicsParticles::velocityDeviation
\brief the maximum possible deviation from the set velocity.
Randomly varies the velocity up to the specified variation. For
@@ -950,17 +946,17 @@ Particles {
}
\endqml
- \sa QFxParticles::velocity
+ \sa QmlGraphicsParticles::velocity
*/
-qreal QFxParticles::velocityDeviation() const
+qreal QmlGraphicsParticles::velocityDeviation() const
{
- Q_D(const QFxParticles);
+ Q_D(const QmlGraphicsParticles);
return d->velocityDev * 1000.0;
}
-void QFxParticles::setVelocityDeviation(qreal velocity)
+void QmlGraphicsParticles::setVelocityDeviation(qreal velocity)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
d->velocityDev = velocity / 1000.0;
}
@@ -974,7 +970,7 @@ void QFxParticles::setVelocityDeviation(qreal velocity)
particles to unclump over time.
*/
/*!
- \property QFxParticles::streamIn
+ \property QmlGraphicsParticles::streamIn
\brief determines whether the particles stream in at a constant rate
When stream is set to true the particles will stream in at a constant rate.
@@ -983,15 +979,15 @@ void QFxParticles::setVelocityDeviation(qreal velocity)
*/
//The name may need a rethink
-bool QFxParticles::streamIn() const
+bool QmlGraphicsParticles::streamIn() const
{
- Q_D(const QFxParticles);
+ Q_D(const QmlGraphicsParticles);
return d->stream;
}
-void QFxParticles::setStreamIn(bool b)
+void QmlGraphicsParticles::setStreamIn(bool b)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
d->stream = b;
}
@@ -1007,7 +1003,7 @@ void QFxParticles::setStreamIn(bool b)
will be produced until it is set to true.
*/
/*!
- \property QFxParticles::emitting
+ \property QmlGraphicsParticles::emitting
If emitting is set to false no new particles will be created. This means that
when a particle reaches the end of its lifespan it is not replaced. This
property can be used to turn particles on and off with a more natural look.
@@ -1015,15 +1011,15 @@ void QFxParticles::setStreamIn(bool b)
The default setting is true. Note that if it initialized to false no particles
will be produced until it is set to true.
*/
-bool QFxParticles::emitting() const
+bool QmlGraphicsParticles::emitting() const
{
- Q_D(const QFxParticles);
+ Q_D(const QmlGraphicsParticles);
return d->emitting;
}
-void QFxParticles::setEmitting(bool r)
+void QmlGraphicsParticles::setEmitting(bool r)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
d->emitting = r;
if (d->count && r)
d->clock.start();
@@ -1040,28 +1036,28 @@ void QFxParticles::setEmitting(bool r)
*/
/*!
- \property QFxParticles::motion
+ \property QmlGraphicsParticles::motion
\brief sets the type of motion to apply to the particles.
When a particle is created it will have an initial direction and velocity.
The motion of the particle during its lifeSpan is then influenced by the
motion property.
- Default motion is QFxParticleMotionLinear.
+ Default motion is QmlGraphicsParticleMotionLinear.
*/
-QFxParticleMotion *QFxParticles::motion() const
+QmlGraphicsParticleMotion *QmlGraphicsParticles::motion() const
{
- Q_D(const QFxParticles);
+ Q_D(const QmlGraphicsParticles);
return d->motion;
}
-void QFxParticles::setMotion(QFxParticleMotion *motion)
+void QmlGraphicsParticles::setMotion(QmlGraphicsParticleMotion *motion)
{
- Q_D(QFxParticles);
+ Q_D(QmlGraphicsParticles);
d->motion = motion;
}
-void QFxParticlesPainter::updateSize()
+void QmlGraphicsParticlesPainter::updateSize()
{
if (!isComponentComplete())
return;
@@ -1069,7 +1065,7 @@ void QFxParticlesPainter::updateSize()
const int parentX = parentItem()->x();
const int parentY = parentItem()->y();
for (int i = 0; i < d->particles.count(); ++i) {
- const QFxParticle &particle = d->particles.at(i);
+ const QmlGraphicsParticle &particle = d->particles.at(i);
if(particle.x > maxX)
maxX = particle.x;
if(particle.x < minX)
@@ -1090,13 +1086,13 @@ void QFxParticlesPainter::updateSize()
setY(myY);
}
-void QFxParticles::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+void QmlGraphicsParticles::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
Q_UNUSED(p);
//painting is done by the ParticlesPainter, so it can have the right size
}
-void QFxParticlesPainter::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+void QmlGraphicsParticlesPainter::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
if (d->image.isNull() || d->particles.isEmpty())
return;
@@ -1104,9 +1100,13 @@ void QFxParticlesPainter::paint(QPainter *p, const QStyleOptionGraphicsItem *, Q
const int myX = x() + parentItem()->x();
const int myY = y() + parentItem()->y();
+ static QVarLengthArray<QDrawPixmaps::Data, 256> pixmapData;
+ if (pixmapData.count() < d->particles.count())
+ pixmapData.resize(d->particles.count());
+
const QRectF sourceRect = d->image.rect();
for (int i = 0; i < d->particles.count(); ++i) {
- const QFxParticle &particle = d->particles.at(i);
+ const QmlGraphicsParticle &particle = d->particles.at(i);
pixmapData[i].point = QPointF(particle.x - myX, particle.y - myY);
pixmapData[i].opacity = particle.opacity;
@@ -1119,10 +1119,10 @@ void QFxParticlesPainter::paint(QPainter *p, const QStyleOptionGraphicsItem *, Q
qDrawPixmaps(p, pixmapData.data(), d->particles.count(), d->image);
}
-void QFxParticles::componentComplete()
+void QmlGraphicsParticles::componentComplete()
{
- Q_D(QFxParticles);
- QFxItem::componentComplete();
+ Q_D(QmlGraphicsParticles);
+ QmlGraphicsItem::componentComplete();
if (d->count) {
d->paintItem->updateSize();
d->clock.start();
diff --git a/src/declarative/extra/qfxparticles.h b/src/declarative/extra/qmlgraphicsparticles_p.h
index 959c518..9eca762 100644
--- a/src/declarative/extra/qfxparticles.h
+++ b/src/declarative/extra/qmlgraphicsparticles_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,29 +21,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXPARTICLES_H
-#define QFXPARTICLES_H
+#ifndef QMLGRAPHICSPARTICLES_H
+#define QMLGRAPHICSPARTICLES_H
-#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
QT_BEGIN_HEADER
@@ -50,30 +50,30 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxParticle;
-class QFxParticles;
-class Q_DECLARATIVE_EXPORT QFxParticleMotion : public QObject
+class QmlGraphicsParticle;
+class QmlGraphicsParticles;
+class Q_DECLARATIVE_EXPORT QmlGraphicsParticleMotion : public QObject
{
Q_OBJECT
public:
- QFxParticleMotion(QObject *parent=0);
+ QmlGraphicsParticleMotion(QObject *parent=0);
- virtual void advance(QFxParticle &, int interval);
- virtual void created(QFxParticle &);
- virtual void destroy(QFxParticle &);
+ virtual void advance(QmlGraphicsParticle &, int interval);
+ virtual void created(QmlGraphicsParticle &);
+ virtual void destroy(QmlGraphicsParticle &);
};
-class Q_DECLARATIVE_EXPORT QFxParticleMotionLinear : public QFxParticleMotion
+class Q_DECLARATIVE_EXPORT QmlGraphicsParticleMotionLinear : public QmlGraphicsParticleMotion
{
Q_OBJECT
public:
- QFxParticleMotionLinear(QObject *parent=0)
- : QFxParticleMotion(parent) {}
+ QmlGraphicsParticleMotionLinear(QObject *parent=0)
+ : QmlGraphicsParticleMotion(parent) {}
- virtual void advance(QFxParticle &, int interval);
+ virtual void advance(QmlGraphicsParticle &, int interval);
};
-class Q_DECLARATIVE_EXPORT QFxParticleMotionGravity : public QFxParticleMotion
+class Q_DECLARATIVE_EXPORT QmlGraphicsParticleMotionGravity : public QmlGraphicsParticleMotion
{
Q_OBJECT
@@ -81,8 +81,8 @@ class Q_DECLARATIVE_EXPORT QFxParticleMotionGravity : public QFxParticleMotion
Q_PROPERTY(int yattractor READ yAttractor WRITE setYAttractor)
Q_PROPERTY(int acceleration READ acceleration WRITE setAcceleration)
public:
- QFxParticleMotionGravity(QObject *parent=0)
- : QFxParticleMotion(parent), _xAttr(0), _yAttr(0), _accel(0.00005) {}
+ QmlGraphicsParticleMotionGravity(QObject *parent=0)
+ : QmlGraphicsParticleMotion(parent), _xAttr(0), _yAttr(0), _accel(0.00005) {}
int xAttractor() const { return _xAttr; }
void setXAttractor(int x) { _xAttr = x; }
@@ -93,7 +93,7 @@ public:
int acceleration() const { return int(_accel * 1000000); }
void setAcceleration(int accel) { _accel = qreal(accel)/1000000.0; }
- virtual void advance(QFxParticle &, int interval);
+ virtual void advance(QmlGraphicsParticle &, int interval);
private:
int _xAttr;
@@ -101,16 +101,16 @@ private:
qreal _accel;
};
-class Q_DECLARATIVE_EXPORT QFxParticleMotionWander : public QFxParticleMotion
+class Q_DECLARATIVE_EXPORT QmlGraphicsParticleMotionWander : public QmlGraphicsParticleMotion
{
Q_OBJECT
public:
- QFxParticleMotionWander()
- : QFxParticleMotion(), particles(0), _xvariance(0), _yvariance(0) {}
+ QmlGraphicsParticleMotionWander()
+ : QmlGraphicsParticleMotion(), particles(0), _xvariance(0), _yvariance(0) {}
- virtual void advance(QFxParticle &, int interval);
- virtual void created(QFxParticle &);
- virtual void destroy(QFxParticle &);
+ virtual void advance(QmlGraphicsParticle &, int interval);
+ virtual void created(QmlGraphicsParticle &);
+ virtual void destroy(QmlGraphicsParticle &);
struct Data {
qreal x_targetV;
@@ -134,14 +134,14 @@ public:
void setPace(int pace) { _pace = pace / 1000.0; }
private:
- QFxParticles *particles;
+ QmlGraphicsParticles *particles;
qreal _xvariance;
qreal _yvariance;
qreal _pace;
};
-class QFxParticlesPrivate;
-class Q_DECLARATIVE_EXPORT QFxParticles : public QFxItem
+class QmlGraphicsParticlesPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsParticles : public QmlGraphicsItem
{
Q_OBJECT
@@ -157,12 +157,12 @@ class Q_DECLARATIVE_EXPORT QFxParticles : public QFxItem
Q_PROPERTY(qreal velocityDeviation READ velocityDeviation WRITE setVelocityDeviation)
Q_PROPERTY(bool streamIn READ streamIn WRITE setStreamIn)
Q_PROPERTY(bool emitting READ emitting WRITE setEmitting)
- Q_PROPERTY(QFxParticleMotion *motion READ motion WRITE setMotion)
+ Q_PROPERTY(QmlGraphicsParticleMotion *motion READ motion WRITE setMotion)
Q_CLASSINFO("DefaultProperty", "motion")
public:
- QFxParticles(QFxItem *parent=0);
- ~QFxParticles();
+ QmlGraphicsParticles(QmlGraphicsItem *parent=0);
+ ~QmlGraphicsParticles();
QUrl source() const;
void setSource(const QUrl &);
@@ -200,30 +200,30 @@ public:
bool emitting() const;
void setEmitting(bool);
- QFxParticleMotion *motion() const;
- void setMotion(QFxParticleMotion *);
+ QmlGraphicsParticleMotion *motion() const;
+ void setMotion(QmlGraphicsParticleMotion *);
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
protected:
virtual void componentComplete();
- QFxParticles(QFxParticlesPrivate &dd, QFxItem *parent);
+ QmlGraphicsParticles(QmlGraphicsParticlesPrivate &dd, QmlGraphicsItem *parent);
private Q_SLOTS:
void imageLoaded();
private:
- Q_DISABLE_COPY(QFxParticles)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxParticles)
+ Q_DISABLE_COPY(QmlGraphicsParticles)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsParticles)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxParticleMotion)
-QML_DECLARE_TYPE(QFxParticleMotionLinear)
-QML_DECLARE_TYPE(QFxParticleMotionGravity)
-QML_DECLARE_TYPE(QFxParticleMotionWander)
-QML_DECLARE_TYPE(QFxParticles)
+QML_DECLARE_TYPE(QmlGraphicsParticleMotion)
+QML_DECLARE_TYPE(QmlGraphicsParticleMotionLinear)
+QML_DECLARE_TYPE(QmlGraphicsParticleMotionGravity)
+QML_DECLARE_TYPE(QmlGraphicsParticleMotionWander)
+QML_DECLARE_TYPE(QmlGraphicsParticles)
QT_END_HEADER
diff --git a/src/declarative/extra/qmlnumberformatter.cpp b/src/declarative/extra/qmlnumberformatter.cpp
index 5b76e45..9e599c7 100644
--- a/src/declarative/extra/qmlnumberformatter.cpp
+++ b/src/declarative/extra/qmlnumberformatter.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmlnumberformatter.h"
+#include "qmlnumberformatter_p.h"
#include "private/qobject_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/extra/qmlnumberformatter.h b/src/declarative/extra/qmlnumberformatter_p.h
index d9abee7..0036cb9 100644
--- a/src/declarative/extra/qmlnumberformatter.h
+++ b/src/declarative/extra/qmlnumberformatter_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,7 +43,7 @@
#define QMLNUMBERFORMATTER_H
#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qnumberformat.h>
+#include <private/qnumberformat_p.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/extra/qmlsqlconnection.cpp b/src/declarative/extra/qmlsqlconnection.cpp
deleted file mode 100644
index bed92ef..0000000
--- a/src/declarative/extra/qmlsqlconnection.cpp
+++ /dev/null
@@ -1,429 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qmlsqlconnection.h"
-#include "private/qobject_p.h"
-
-#include <QSqlError>
-#include <QSqlDriver>
-#include <QDebug>
-
-#include <qml.h>
-#include <qmlcontext.h>
-
-QT_BEGIN_NAMESPACE
-
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,SqlConnection,QmlSqlConnection)
-
-class QmlSqlConnectionPrivate: public QObjectPrivate
-{
- Q_DECLARE_PUBLIC(QmlSqlConnection)
-public:
- QmlSqlConnectionPrivate() : port(0) {}
-
- int port;
- QString name, databaseName, connectionOptions;
- QString hostName, userName, password, driver;
-};
-
-/*!
- \qmlclass SqlConnection QmlSqlConnection
- \brief The SqlConnection element describes a connection to an SQL database.
-
- The SqlConnection element works in a similar way to
- QSqlDatabase::addDatabase(). It allows setting the database properties
- such that the connection does not need to be set up in C++ code.
- It differs from QSqlDatabase::addDatabase() in that it will automatically
- open the database.
-
- The database can then either be used from an SqlQuery element using its id
- as a bind, or using its name. If the database is set up externally to
- Qml the query should connect using its name.
-
- \qml
- SqlConnection {
- id: myConnection
- name: "qmlConnection"
- driver: "QSQLITE"
- databaseName: "mydb.sqlite"
- }
- SqlQuery { id: listmodel; connection: myConnection; query: "SELECT * FROM mytable" }
- SqlQuery { id: othermodel; connection: "qmlConnection"; query: "SELECT * FROM myothertable" }
- \endqml
-*/
-
-/*!
- \qmlproperty QString SqlConnection::name
-
- Defines the connection's name. The name allows the connection to be
- retrieved using the connection property of SqlQuery or when
- QSqlDatabase::database()
-*/
-
-/*!
- \qmlproperty list<string> SqlConnection::tables
-
- Defines the set of tables that exist in the database for the connection.
-*/
-
-/*!
- \qmlproperty string SqlConnection::databaseName
-
- Defines the connection's database name. This is used when opening the
- connection to the database.
-*/
-
-/*!
- \qmlproperty string SqlConnection::driver
-
- Defines the driver type of the connection. This is used when opening the
- connection to the database.
-*/
-
-/*!
- \qmlproperty string SqlConnection::connectOptions
-
- Defines the options used when connecting to the database. These are used
- when opening the connection to the database.
-*/
-
-/*!
- \qmlproperty string SqlConnection::hostName
-
- Defines the connection's host name. This is used when opening the
- connection to the database.
-*/
-
-/*!
- \qmlproperty int SqlConnection::port
-
- Defines the connection's port number. This is used when opening the
- connection to the database.
-*/
-
-/*!
- \qmlproperty string SqlConnection::userName
-
- Defines the connection's user name. This is used when opening the
- connection to the database.
-*/
-
-/*!
- \qmlproperty string SqlConnection::password
-
- Defines the connection's password. This is used when opening the
- connection to the database.
-*/
-
-/*!
- \qmlproperty string SqlConnection::lastError
-
- Defines the last error, if one occurred, when working with the database.
- If the error occurred in conjunction with an SQL query the error will be
- defined by SqlQuery::lastError.
-*/
-
-/*!
- \internal
- \class QmlSqlConnection
- \brief The QmlSqlConnection class manages a connection to an SQL database.
-*/
-
-/*!
- Constructs a QmlSqlConnection with the given \a parent.
-*/
-QmlSqlConnection::QmlSqlConnection(QObject *parent)
-: QObject(*(new QmlSqlConnectionPrivate), parent)
-{
-}
-
-/*!
- Destroys the QmlSqlConnection.
-*/
-QmlSqlConnection::~QmlSqlConnection()
-{
- QSqlDatabase db = database();
- if (db.isOpen())
- db.close();
-}
-
-/*!
- Returns the connection's name.
- This is equivalent to QSqlDatabase::connectionName().
- \sa setName()
-*/
-QString QmlSqlConnection::name() const
-{
- Q_D(const QmlSqlConnection);
- return d->name;
-}
-
-/*!
- Returns the connection's database name.
- This is equivalent to QSqlDatabase::databaseName().
- \sa setDatabaseName()
-*/
-QString QmlSqlConnection::databaseName() const
-{
- Q_D(const QmlSqlConnection);
- return d->databaseName;
-}
-
-/*!
- Returns the connect options string used for this connection.
-
- \sa setConnectOptions()
-*/
-QString QmlSqlConnection::connectOptions() const
-{
- Q_D(const QmlSqlConnection);
- return d->connectionOptions;
-}
-
-/*!
- Returns the connection's host name.
- \sa setHostName()
-*/
-QString QmlSqlConnection::hostName() const
-{
- Q_D(const QmlSqlConnection);
- return d->hostName;
-}
-
-/*!
- Returns the connection's port number. The value is undefined if the port
- number has not been set.
-
- \sa setPort()
-*/
-int QmlSqlConnection::port() const
-{
- Q_D(const QmlSqlConnection);
- return d->port;
-}
-
-/*!
- Returns the connection's user name.
-
- \sa setUserName()
-*/
-QString QmlSqlConnection::userName() const
-{
- Q_D(const QmlSqlConnection);
- return d->userName;
-}
-
-/*!
- Returns the connection's password.
-
- \sa setPassword)()
-*/
-QString QmlSqlConnection::password() const
-{
- Q_D(const QmlSqlConnection);
- return d->password;
-}
-
-/*!
- Returns the connection's driver name.
-
- \sa setDriver()
-*/
-QString QmlSqlConnection::driver() const
-{
- Q_D(const QmlSqlConnection);
- return d->driver;
-}
-
-/*!
- Returns a list of the database's tables.
-*/
-QStringList QmlSqlConnection::tables() const
-{
- return database().tables();
-}
-
-/*!
- Sets the connection's name to the given \a name.
-
- \sa name()
-*/
-void QmlSqlConnection::setName(const QString &name)
-{
- Q_D(QmlSqlConnection);
- d->name = name;
-}
-
-/*!
- Set's the connection's database name to the given \a name.
-
- \sa databaseName()
-*/
-void QmlSqlConnection::setDatabaseName(const QString &name)
-{
- Q_D(QmlSqlConnection);
- d->databaseName = name;
-}
-
-/*!
- Sets the connection's options to the given \a options.
-
- \sa connectOptions(), QSqlDatabase::setConnectOptions()
-*/
-void QmlSqlConnection::setConnectOptions(const QString &options)
-{
- Q_D(QmlSqlConnection);
- d->connectionOptions = options;
-}
-
-/*!
- Sets the connection's host name to the given \a name.
-
- \sa hostName()
-*/
-void QmlSqlConnection::setHostName(const QString &name)
-{
- Q_D(QmlSqlConnection);
- d->hostName = name;
-}
-
-/*!
- Sets the connection's port number to the given \a port.
-
- \sa port()
-*/
-void QmlSqlConnection::setPort(int port)
-{
- Q_D(QmlSqlConnection);
- d->port = port;
-}
-
-/*!
- Sets the connection's user name to the given \a name.
-
- \sa userName()
-*/
-void QmlSqlConnection::setUserName(const QString &name)
-{
- Q_D(QmlSqlConnection);
- d->userName = name;
-}
-
-/*!
- Sets the connection's password to the given \a password.
-
- \sa password()
-*/
-void QmlSqlConnection::setPassword(const QString &password)
-{
- Q_D(QmlSqlConnection);
- d->password = password;
-}
-
-/*!
- Returns information about the last error that occurred on the database.
-
- Failures that occur in conjunction with an individual query are
- reported by QmlSqlQuery::lastError()
-*/
-QString QmlSqlConnection::lastError() const
-{
- return database().lastError().text();
-}
-
-/*!
- Sets the connection's driver to the specified driver \a type.
-
- \sa driver(), QSqlDatabase::addDatabase()
-*/
-void QmlSqlConnection::setDriver(const QString &type)
-{
- Q_D(QmlSqlConnection);
- d->driver = type;
-}
-
-/*!
- Returns the database object associated with this connection.
- If the database is not yet open, it will open the database
- passed on the settings specified for the SQL connection.
-*/
-QSqlDatabase QmlSqlConnection::database() const
-{
- Q_D(const QmlSqlConnection);
-
- QSqlDatabase db;
- if (QSqlDatabase::connectionNames().contains(d->name)) {
- db = QSqlDatabase::database(d->name);
- } else {
- db = QSqlDatabase::addDatabase(
- d->driver.isEmpty()
- ? QLatin1String("QSQLITE")
- : d->driver,
- d->name.isEmpty()
- ? QLatin1String(QSqlDatabase::defaultConnection)
- : d->name);
- }
- if (db.isOpen())
- return db;
- if ((d->driver.isEmpty() || d->driver == QLatin1String("QSQLITE")) &&
- qmlContext(this)) {
- // SQLITE uses files for databases, hence use relative pathing
- // if possible.
- QUrl url = qmlContext(this)->resolvedUrl(QUrl(d->databaseName));
- if (url.isRelative() || url.scheme() == QLatin1String("file"))
- db.setDatabaseName(url.toLocalFile());
- else
- db.setDatabaseName(d->databaseName);
- } else {
- db.setDatabaseName(d->databaseName);
- }
- db.setConnectOptions(d->connectionOptions);
- db.setHostName(d->hostName);
- db.setPassword(d->password);
- db.setPort(d->port);
- db.setUserName(d->userName);
- if (!db.open())
- qWarning() << "Failed to open database" << lastError();
-
- return db;
-}
-
-QT_END_NAMESPACE
diff --git a/src/declarative/extra/qmlsqlconnection.h b/src/declarative/extra/qmlsqlconnection.h
deleted file mode 100644
index 740bbc2..0000000
--- a/src/declarative/extra/qmlsqlconnection.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLSQLCONNECTION_H
-#define QMLSQLCONNECTION_H
-
-#include <QtDeclarative/qml.h>
-#include <QtSql/QSqlDatabase>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-
-class QSqlDatabase;
-class QmlSqlConnectionPrivate;
-class Q_DECLARATIVE_EXPORT QmlSqlConnection : public QObject, public QmlParserStatus
-{
- Q_OBJECT
- Q_INTERFACES(QmlParserStatus)
-
- Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(QStringList tables READ tables)
- Q_PROPERTY(QString databaseName READ databaseName WRITE setDatabaseName)
- Q_PROPERTY(QString driver READ driver WRITE setDriver)
- Q_PROPERTY(QString connectOptions READ connectOptions WRITE setConnectOptions)
- Q_PROPERTY(QString hostName READ hostName WRITE setHostName)
- Q_PROPERTY(int port READ port WRITE setPort)
- Q_PROPERTY(QString userName READ userName WRITE setUserName)
- Q_PROPERTY(QString password READ password WRITE setPassword)
- Q_PROPERTY(QString lastError READ lastError)
-public:
- QmlSqlConnection(QObject *parent = 0);
- ~QmlSqlConnection();
-
- QString name() const;
- void setName(const QString &);
-
- QStringList tables() const;
-
- QString databaseName() const;
- void setDatabaseName(const QString &);
-
- QString connectOptions() const;
- void setConnectOptions(const QString &);
-
- QString hostName() const;
- void setHostName(const QString &);
-
- int port() const;
- void setPort(int);
-
- QString userName() const;
- void setUserName(const QString &);
-
- QString password() const;
- void setPassword(const QString &);
-
- QString driver() const;
- void setDriver(const QString &);
-
- QString lastError() const;
-
- QSqlDatabase database() const;
-private:
- Q_DISABLE_COPY(QmlSqlConnection)
- Q_DECLARE_PRIVATE(QmlSqlConnection)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QmlSqlConnection)
-
-QT_END_HEADER
-
-#endif // QMLXMLLISTMODEL_H
-
diff --git a/src/declarative/extra/qmlsqlquery.cpp b/src/declarative/extra/qmlsqlquery.cpp
deleted file mode 100644
index fe6e220..0000000
--- a/src/declarative/extra/qmlsqlquery.cpp
+++ /dev/null
@@ -1,788 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qmlsqlquery.h"
-#include "qmlsqlconnection.h"
-#include "private/qobject_p.h"
-
-#include <QDebug>
-#include <QSqlQuery>
-#include <QSqlError>
-#include <QSqlField>
-#include <QSqlRecord>
-#include <QSqlDatabase>
-#include <QSqlDriver>
-
-#include <QContiguousCache>
-#include <QTimerEvent>
-
-QT_BEGIN_NAMESPACE
-
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,SqlBind,QmlSqlBind)
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,SqlQuery,QmlSqlQuery)
-
-class QmlSqlBindPrivate : public QObjectPrivate
-{
- Q_DECLARE_PUBLIC(QmlSqlBind)
-public:
- QmlSqlBindPrivate() {}
-
- QString name;
- QVariant value;
-};
-
-/*!
- \qmlclass SqlBind QmlSqlBind
- \brief The SqlBind element specifies a value binding for an SqlQuery element.
-
- By using bindings its possible to cause a SqlQuery to update itself
- when values bound through the SqlBind change. Hence in the example
- below the results for the SqlQuery will change as searchText changes.
-
- If the query is not a SELECT statement, the effects of the bound
- values will only apply when the SqlQuery exec() slot is called.
-
- \qml
- SqlQuery {
- query: "SELECT * FROM mytable WHERE name LIKE :value"
- bindings: SqlBind {
- name: ":value"
- value: searchText + '%'
- }
- }
- SqlQuery {
- query: "SELECT * FROM mytable WHERE type = ?"
- bindings: SqlBind {
- value: "simple"
- }
- }
- \endqml
-*/
-
-/*!
- \internal
- \class QmlSqlBind
- \brief The QmlSqlBind class specifies a value binding for a QmlSqlQuery.
-*/
-
-/*!
- \fn void QmlSqlBind::valueChanged()
-
- This signal is emitted when the value property of the SqlBind changes.
-*/
-
-/*!
- \qmlproperty QString SqlBind::name
-
- Defines the placeholder name of the bind. If no name is specified the
- bind will use its position within the SqlQuery's bindings to bind
- into the query.
-*/
-
-/*!
- \qmlproperty QVariant SqlBind::value
-
- Defines the value to bind into the query.
-*/
-
-/*!
- Constructs a QmlSqlVind with the given \a parent
-*/
-QmlSqlBind::QmlSqlBind(QObject *parent)
-: QObject(*(new QmlSqlBindPrivate()), parent)
-{
-}
-
-/*!
- Destroys the QmlSqlBind.
-*/
-QmlSqlBind::~QmlSqlBind()
-{
-}
-
-/*!
- Returns the binding's name.
-
- \sa setName()
-*/
-QString QmlSqlBind::name() const
-{
- Q_D(const QmlSqlBind);
- return d->name;
-}
-
-/*!
- Returns the binding's value.
-
- \sa setValue()
-*/
-QVariant QmlSqlBind::value() const
-{
- Q_D(const QmlSqlBind);
- return d->value;
-}
-
-/*!
- Sets the binding's name to the given \a name.
-
- \sa name()
-*/
-void QmlSqlBind::setName(const QString &name)
-{
- Q_D(QmlSqlBind);
- d->name = name;
-}
-
-/*!
- Sets the binding's value to the given \a value.
-
- \sa value()
-*/
-void QmlSqlBind::setValue(const QVariant &value)
-{
- Q_D(QmlSqlBind);
- if (d->value != value) {
- d->value = value;
- emit valueChanged();
- }
-}
-
-class QmlSqlQueryPrivate : public QObjectPrivate
-{
- Q_DECLARE_PUBLIC(QmlSqlQuery)
-public:
- QmlSqlQueryPrivate(QmlSqlQuery *owner)
- : isSel(false), query(NULL), requireCache(false), count(-1),
- cacheNear(100), cacheRetain(100), cacheSize(1000),
- cacheInterval(250), scheduledRow(-1), cacheTimer(-1),
- binds(owner) {}
- void prepareQuery() const;
- void bindQuery() const;
- void grabRoles() const;
-
- void clearCache();
- void initCache() const;
- void hitCache(int row) const;
-
- void enactShift(int row) const;
-
- QString queryText;
- bool isSel;
- QVariant connectionVariant;
- mutable QSqlQuery *query;
- mutable bool requireCache;
- mutable int count;
- mutable QList<int> roles;
- mutable QStringList roleNames;
-
- typedef QContiguousCache<QVariant> Column;
- mutable QVector< Column * > cache;
-
- int cacheNear, cacheRetain, cacheSize, cacheInterval;
-
- mutable int scheduledRow;
- mutable int cacheTimer;
-
- class QmlSqlBindList : public QmlList<QmlSqlBind *>
- {
- public:
- QmlSqlBindList(QmlSqlQuery *owner)
- : q(owner){}
-
- void append(QmlSqlBind *o) {
- m_contents.append(o);
- QObject::connect(o, SIGNAL(valueChanged()), q, SLOT(resetBinds()));
- }
- void clear() { m_contents.clear(); }
- int count() const { return m_contents.count(); }
- void removeAt(int pos) { return m_contents.removeAt(pos); }
- QmlSqlBind *at(int pos) const { return m_contents.at(pos); }
- void insert(int pos, QmlSqlBind *o) { m_contents.insert(pos, o); }
- private:
- QList<QmlSqlBind *> m_contents;
- QmlSqlQuery *q;
- };
-
- QmlSqlBindList binds;
-};
-
-/*!
- \qmlclass SqlQuery QmlSqlQuery
- \brief The SqlQuery element describes a query into an SQL database.
-
- The SqlQuery element has three parts. The first is the query itself,
- which can either be specified using the query property or by the
- default text for the element. The second specifies the connection
- to the database. This can either be a bound id from an SqlConnection
- or the connections name. If the connection is specified in a QML
- SqlConnection it is recommend to bind to the id to help ensure the
- database is complete before attempting to attach to it. If no
- connectoin is specified the default connection is used.
-
- It is also possible to bind values into the query using the bindings
- property. See SqlBind for more information on how to bind values into
- the query.
-
- If the query is a select statement it can be used as a model for a ListView.
- The roles will be the columns of the result set. Use the SQL AS keyword
- in the query if you want to override the column names from that of the
- table selected. You should also use the AS keyword if there is no
- appropriate table column name for the result column.
-
- \qml
- SqlQuery { connection: qmlConnectionId; query: "DELETE FROM mytable" }
- SqlQuery {
- connection: "connectionName"
- query: "SELECT * FROM mytable"
- }
- SqlQuery { query: "SELECT id AS recordId, (firstName || ' ' || lastName) AS fullName FROM mytable" }
- \endqml
-*/
-
-/*
- \class QmlSqlQuery
- \brief the QmlSqlQuery class manages a query into an SQL database.
-*/
-
-/*!
- \qmlproperty QString SqlQuery::query
-
- Defines the query text.
-*/
-
-/*!
- \qmlproperty QVariant SqlQuery::connection
-
- Defines the connection to an SQL database used by the query.
-*/
-
-/*!
- \qmlproperty QString SqlQuery::lastError
-
- Defines the last error, if one occurred, when working with the query.
-*/
-
-/*!
- \qmlproperty list<SqlBind> SqlQuery::bindings
-
- The bindings property contains the list of values to bind into the
- query. See SqlBind for more information.
-*/
-
-/*!
- Constructs a QmlSqlQuery with the given \a parent.
-*/
-QmlSqlQuery::QmlSqlQuery(QObject *parent)
-: QListModelInterface(*(new QmlSqlQueryPrivate(this)), parent)
-{
-}
-
-/*!
- Destroys the QmlSqlQuery.
-*/
-QmlSqlQuery::~QmlSqlQuery()
-{
- Q_D(QmlSqlQuery);
- if (d->query)
- delete d->query;
-}
-
-/*!
- Returns the query's bound variables.
-*/
-QmlList<QmlSqlBind *> *QmlSqlQuery::bindings()
-{
- Q_D(QmlSqlQuery);
- return &d->binds;
-}
-
-/*!
- Returns the query's bound variables.
-*/
-const QmlList<QmlSqlBind *> *QmlSqlQuery::bindings() const
-{
- Q_D(const QmlSqlQuery);
- return &d->binds;
-}
-
-/*!
- Returns the query text.
-
- \sa setQuery()
-*/
-QString QmlSqlQuery::query() const
-{
- Q_D(const QmlSqlQuery);
- return d->queryText;
-}
-
-/*!
- Sets the query text to the given \a text.
-*/
-void QmlSqlQuery::setQuery(const QString &text)
-{
- Q_D(QmlSqlQuery);
- if (text != d->queryText) {
- d->queryText = text;
-
- static const QLatin1String select("select");
- d-> isSel = text.trimmed().indexOf(select, 0, Qt::CaseInsensitive) == 0;
-
- if (d->query)
- resetQuery();
- }
-}
-
-/*!
- Returns the query's connection specifier.
-
- \sa setConnection()
-*/
-QVariant QmlSqlQuery::connection() const
-{
- Q_D(const QmlSqlQuery);
- return d->connectionVariant;
-}
-
-/*!
- Sets the query's connection specifier.
-
- \sa connection()
-*/
-void QmlSqlQuery::setConnection(const QVariant &connection)
-{
- Q_D(QmlSqlQuery);
- if (connection != d->connectionVariant) {
- d->connectionVariant = connection;
- if (d->query)
- resetQuery();
- else if (d->count == 0) // data has been requested
- d->prepareQuery();
- }
-}
-
-/*!
- Returns the set of values for a given set of requested \a roles for the
- specified \a row of the query result set. Returns an empty hash if the
- query is not a select statement.
-
- \sa count(), roles(), toString()
-*/
-QHash<int,QVariant> QmlSqlQuery::data(int row, const QList<int> &roles) const
-{
- Q_D(const QmlSqlQuery);
- if (!d->query)
- d->prepareQuery();
- QHash<int, QVariant> result;
-
- if (!d->isSel)
- return result;
-
- Q_ASSERT(row >= 0 && row <= d->count);
-
- if (!d->requireCache)
- d->query->seek(row);
- else
- d->hitCache(row);
-
- for (int i = 0; i < roles.count(); ++i) {
- int column = roles[i];
- if (d->requireCache)
- result.insert(column, d->cache[column]->at(row));
- else
- result.insert(column, d->query->value(column));
- }
- return result;
-}
-
-/*!
- Returns the number of rows in the query result set. Returns 0 if
- the query is not a select statement.
-
- \sa data(), roles(), toString()
-*/
-int QmlSqlQuery::count() const
-{
- Q_D(const QmlSqlQuery);
- if (!d->query)
- d->prepareQuery();
- return d->count;
-}
-
-/*!
- Returns the list of role integer identifiers for the query result set.
- Returns and empty list if the query is not a select statement.
-
- \sa data(), count(), toString()
-*/
-QList<int> QmlSqlQuery::roles() const
-{
- Q_D(const QmlSqlQuery);
- if (!d->query)
- d->prepareQuery();
-
- if (!d->isSel)
- return QList<int>();
-
- if (d->roleNames.isEmpty() && !d->requireCache) {
- d->query->seek(0);
- d->grabRoles();
- }
-
- return d->roles;
-}
-
-/*!
- Returns the corresponding role name for the given \a role identifier.
-
- \sa data(), roles(), toString()
-*/
-QString QmlSqlQuery::toString(int role) const
-{
- Q_D(const QmlSqlQuery);
- if (!d->query)
- d->prepareQuery();
-
- if (d->roleNames.isEmpty() && !d->requireCache) {
- d->query->seek(0);
- d->grabRoles();
- }
-
- return d->roleNames[role];
-}
-
-/*!
- Returns information about the last error that occurred on the query.
-*/
-QString QmlSqlQuery::lastError() const
-{
- Q_D(const QmlSqlQuery);
- if (d->query)
- return d->query->lastError().text();
- return QString();
-}
-
-/*!
- \reimp
-*/
-void QmlSqlQuery::componentComplete()
-{
- Q_D(QmlSqlQuery);
- if (!d->query)
- d->prepareQuery();
-}
-
-/*!
- \internal
- Rebinds the query, and if needed, emits rows inserted or rows
- added so any attached ListView elements will correctly.
-
- This slot is called automatically when the SqlBind elements in
- the bindings property of the query change.
-*/
-void QmlSqlQuery::resetBinds()
-{
- Q_D(QmlSqlQuery);
- if (!d->query)
- return;
- int oldcount = d->count;
- d->clearCache();
- d->roles.clear();
- d->roleNames.clear();
- d->bindQuery();
- if (d->isSel) {
- if (!d->query->isActive()) {
- if (!d->query->exec())
- qWarning() << "failed to execute query" << d->query->lastQuery() << d->query->boundValues() << d->query->lastError().text();
- }
- d->initCache(); // may finish query
- emitChanges(oldcount);
- }
-}
-
-/*!
- Executes the query. For SELECT statements this is normally only required
- if the database changes outside of the SQL query element. Statements that
- modify the database, such as UPDATE and INSERT, will not be applied until
- this function is called.
-*/
-void QmlSqlQuery::exec()
-{
- Q_D(QmlSqlQuery);
- if (!d->query)
- d->prepareQuery();
- Q_ASSERT(d->query);
-
- if (d->isSel) {
- int oldcount = d->count;
- d->clearCache();
- d->roles.clear();
- d->roleNames.clear();
- if (!d->query->exec())
- qWarning() << "failed to execute query" << d->query->lastQuery() << d->query->boundValues() << d->query->lastError().text();
- d->initCache(); // may finish query
- emitChanges(oldcount);
- } else {
- if (!d->query->exec())
- qWarning() << "failed to execute query" << d->query->lastQuery() << d->query->boundValues() << d->query->lastError().text();
- d->query->finish();
- }
-}
-
-/*!
- \internal
-
- Resets the query and query cache.
-*/
-void QmlSqlQuery::resetQuery()
-{
- Q_D(QmlSqlQuery);
- Q_ASSERT(d->query != 0);
- delete d->query;
- d->query = 0;
- d->clearCache();
- d->roles.clear();
- d->roleNames.clear();
- int oldcount = d->count;
- d->prepareQuery();
- emitChanges(oldcount);
-}
-
-/*!
- \internal
-
- emits row number changes based of differences between the given
- \a oldcount and the current count of the query result set.
-*/
-void QmlSqlQuery::emitChanges(int oldcount)
-{
- Q_D(QmlSqlQuery);
- if (d->count > oldcount)
- emit itemsInserted(oldcount, d->count-oldcount);
- else if (d->count < oldcount)
- emit itemsRemoved(d->count, oldcount-d->count);
- if (d->count > 0 && oldcount > 0)
- emit itemsChanged(0, qMin(d->count, oldcount), roles());
-}
-
-/*
- \internal
-
- Handles delayed caching of the query.
-*/
-void QmlSqlQuery::timerEvent(QTimerEvent *event)
-{
- Q_D(QmlSqlQuery);
- if (event->timerId() == d->cacheTimer) {
- killTimer(d->cacheTimer);
- d->cacheTimer = -1;
- d->enactShift(d->scheduledRow);
- d->scheduledRow = -1;
- }
-}
-
-/*
- Prepares the query. If the query starts with SELECT it is assumed to
- be a SELECT statement and the query is also executed.
-*/
-void QmlSqlQueryPrivate::prepareQuery() const
-{
- QObject *object = qvariant_cast<QObject*>(connectionVariant);
- QmlSqlConnection *connection = qobject_cast<QmlSqlConnection *>(object);
- QString connectionString = qvariant_cast<QString>(connectionVariant);
-
- Q_ASSERT(query == 0);
- QSqlDatabase db = connection ? connection->database()
- : QSqlDatabase::database(connectionString.isEmpty()
- ? QLatin1String(QSqlDatabase::defaultConnection)
- : connectionString, false);
-
- if (!db.isOpen()) {
- count = 0;
- return;
- }
-
- query = new QSqlQuery(db);
-
- requireCache =
- query->driver()->hasFeature(QSqlDriver::SimpleLocking)
- || !query->driver()->hasFeature(QSqlDriver::QuerySize);
-
- if (requireCache)
- query->setForwardOnly(true);
- if (!query->prepare(queryText))
- qWarning() << "failed to prepare query" << query->lastQuery() << query->lastError().text();
- bindQuery();
- if (isSel) {
- if (!query->exec())
- qWarning() << "failed to execute query" << query->lastQuery() << query->boundValues() << query->lastError().text();
- initCache();
- }
-}
-
-/*
- Binds values into the prepared query using the bindings property of the SqlQuery element.
-*/
-void QmlSqlQueryPrivate::bindQuery() const
-{
- for (int i = 0; i < binds.count(); ++i) {
- QmlSqlBind *bind = binds.at(i);
- if (bind->name().isEmpty()) {
- query->bindValue(i, bind->value());
- } else {
- query->bindValue(bind->name(), bind->value());
- }
- }
-}
-
-/*
- Clears cached query results
-*/
-void QmlSqlQueryPrivate::clearCache()
-{
- for (int i = 0; i < cache.size(); ++i)
- delete cache[i];
- cache.resize(0);
-}
-
-/*
- If caching is required, initializes the cache with
- column definitions and initial rows.
-
- Otherwise caches the count for the query.
-*/
-void QmlSqlQueryPrivate::initCache() const
-{
- if (requireCache) {
- int row = 0;
- if (query->next()) {
- if (roleNames.isEmpty()) {
- grabRoles();
- cache.resize(roleNames.count());
- for (int i = 0; i < cache.size(); ++i)
- cache[i] = new Column(cacheSize);
- }
- Q_ASSERT(cache.size() > 0);
- do {
- for (int i = 0; i < cache.size(); ++i)
- cache[i]->insert(row, query->value(i));
- row++;
- } while (!cache[0]->isFull() && query->next());
- while(query->next()) row++;
- }
- count = row;
- query->finish();
- } else {
- count = query->size();
- }
-}
-
-/*
- Schedules future background cache loading based of
- the given row.
-
- Should only be called if caching is active.
-*/
-void QmlSqlQueryPrivate::hitCache(int row) const
-{
- Q_Q(const QmlSqlQuery);
-
- Q_ASSERT(cache.size() > 0 && requireCache);
- if (cache[0]->containsIndex(row)) {
- int fi = cache[0]->firstIndex();
- int li = cache[0]->lastIndex();
- if (fi > 0 && row < fi + cacheNear)
- scheduledRow = qMax(0, row + cacheRetain - cacheSize);
- else if (li < count-1 && row > li - cacheNear)
- scheduledRow = qMax(0, row - cacheRetain);
-
- if (scheduledRow != -1 && cacheTimer == -1)
- cacheTimer = ((QmlSqlQuery *)q)->startTimer(cacheInterval);
- } else {
- if (cacheTimer != -1) {
- ((QmlSqlQuery *)q)->killTimer(cacheTimer);
- cacheTimer = -1;
- }
- scheduledRow = -1;
- qDebug() << "cache miss for row:" << row << "count:" << count;
- enactShift(row);
- }
-}
-
-/*
- Load items from sql centered around row.
-*/
-void QmlSqlQueryPrivate::enactShift(int targetRow) const
-{
- Q_ASSERT(query && cache.size());
- query->exec();
- int row = targetRow < cache[0]->firstIndex() ? targetRow : qMax(targetRow, cache[0]->lastIndex()+1);
-
- if (query->seek(row)) {
- do {
- for (int i = 0; i < cache.size(); ++i) {
- cache[i]->insert(row, query->value(i));
- }
- row++;
- } while(row < targetRow + cacheSize && query->next());
- }
-}
-
-/*
- Gets the column names for the roles of the SqlQuery element.
-
- The query must be active and on a valid row.
-*/
-void QmlSqlQueryPrivate::grabRoles() const
-{
- Q_ASSERT(query);
- Q_ASSERT(query->isValid());
- Q_ASSERT(roleNames.isEmpty());
- Q_ASSERT(roles.isEmpty());
-
- QSqlRecord record = query->record();
- for (int i = 0; i < record.count(); ++i) {
- roleNames.append(record.fieldName(i));
- roles.append(i);
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/declarative/extra/qmlsqlquery.h b/src/declarative/extra/qmlsqlquery.h
deleted file mode 100644
index 0f27709..0000000
--- a/src/declarative/extra/qmlsqlquery.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLSQLQUERYMODEL_H
-#define QMLSQLQUERYMODEL_H
-
-#include <QtDeclarative/qml.h>
-#include <QtDeclarative/QListModelInterface>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-
-class QmlSqlBindPrivate;
-class Q_DECLARATIVE_EXPORT QmlSqlBind : public QObject, public QmlParserStatus
-{
- Q_OBJECT
- Q_INTERFACES(QmlParserStatus)
-
- Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(QVariant value READ value WRITE setValue)
-
- Q_CLASSINFO("DefaultValue", "value")
-
-public:
- QmlSqlBind(QObject *parent = 0);
- ~QmlSqlBind();
-
- QString name() const;
- QVariant value() const;
-
- void setName(const QString &name);
- void setValue(const QVariant &);
-
-Q_SIGNALS:
- void valueChanged();
-
-private:
- Q_DISABLE_COPY(QmlSqlBind)
- Q_DECLARE_PRIVATE(QmlSqlBind)
-};
-
-class QSqlQuery;
-class QmlSqlQueryPrivate;
-class Q_DECLARATIVE_EXPORT QmlSqlQuery : public QListModelInterface, public QmlParserStatus
-{
- Q_OBJECT
- Q_INTERFACES(QmlParserStatus)
-
- Q_PROPERTY(QString query READ query WRITE setQuery)
- Q_PROPERTY(QVariant connection READ connection WRITE setConnection)
- Q_PROPERTY(QString lastError READ lastError)
-
- Q_PROPERTY(QmlList<QmlSqlBind *> *bindings READ bindings)
-public:
- QmlSqlQuery(QObject *parent = 0);
- ~QmlSqlQuery();
-
- QString query() const;
- void setQuery(const QString &);
-
- QVariant connection() const;
- void setConnection(const QVariant &);
-
- virtual QHash<int,QVariant> data(int index, const QList<int> &roles = (QList<int>())) const;
- virtual int count() const;
- virtual QList<int> roles() const;
- virtual QString toString(int role) const;
-
- QString lastError() const;
-
- //### missing classBegin
- virtual void componentComplete();
-
- QmlList<QmlSqlBind *> *bindings();
- const QmlList<QmlSqlBind *> *bindings() const;
-
-public Q_SLOTS:
- void exec();
-
-protected:
- void timerEvent(QTimerEvent *);
-
-private Q_SLOTS:
- void resetBinds();
- void resetQuery();
-
-private:
- void emitChanges(int oldcount);
-
- Q_DISABLE_COPY(QmlSqlQuery)
- Q_DECLARE_PRIVATE(QmlSqlQuery)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QmlSqlBind)
-QML_DECLARE_TYPE(QmlSqlQuery)
-
-QT_END_HEADER
-
-#endif
-
diff --git a/src/declarative/extra/qmlxmllistmodel.cpp b/src/declarative/extra/qmlxmllistmodel.cpp
index a3c96fd..43d7fb2 100644
--- a/src/declarative/extra/qmlxmllistmodel.cpp
+++ b/src/declarative/extra/qmlxmllistmodel.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmlxmllistmodel.h"
+#include "qmlxmllistmodel_p.h"
#include "private/qobject_p.h"
#include <QtDeclarative/qmlcontext.h>
@@ -62,7 +62,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,XmlRole,QmlXmlListModelRole)
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,XmlListModel,QmlXmlListModel)
/*!
- \qmlclass XmlRole
+ \qmlclass XmlRole QmlXmlListModelRole
\brief The XmlRole element allows you to specify a role for an XmlListModel.
*/
@@ -411,7 +411,7 @@ void QmlXmlRoleList::insert(int i, QmlXmlListModelRole *role)
*/
/*!
- \qmlclass XmlListModel
+ \qmlclass XmlListModel QmlXmlListModel
\brief The XmlListModel element allows you to specify a model using XPath expressions.
XmlListModel allows you to construct a model from XML data that can then be used as a data source
diff --git a/src/declarative/extra/qmlxmllistmodel.h b/src/declarative/extra/qmlxmllistmodel_p.h
index 1bcc008..18bf9d2 100644
--- a/src/declarative/extra/qmlxmllistmodel.h
+++ b/src/declarative/extra/qmlxmllistmodel_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,7 +43,7 @@
#define QMLXMLLISTMODEL_H
#include <QtDeclarative/qml.h>
-#include <QtDeclarative/QListModelInterface>
+#include <private/qlistmodelinterface_p.h>
#include <QtDeclarative/qmlinfo.h>
QT_BEGIN_HEADER
@@ -103,7 +103,7 @@ public:
virtual void classBegin();
virtual void componentComplete();
-signals:
+Q_SIGNALS:
void statusChanged(Status);
void progressChanged(qreal progress);
void countChanged();
diff --git a/src/declarative/extra/qnumberformat.cpp b/src/declarative/extra/qnumberformat.cpp
index cde2fb0..c6a03e9 100644
--- a/src/declarative/extra/qnumberformat.cpp
+++ b/src/declarative/extra/qnumberformat.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qnumberformat.h"
+#include "qnumberformat_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/extra/qnumberformat.h b/src/declarative/extra/qnumberformat_p.h
index 830cf79..1a7b8e4 100644
--- a/src/declarative/extra/qnumberformat.h
+++ b/src/declarative/extra/qnumberformat_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/fx/fx.pri b/src/declarative/fx/fx.pri
deleted file mode 100644
index fc4e640..0000000
--- a/src/declarative/fx/fx.pri
+++ /dev/null
@@ -1,84 +0,0 @@
-HEADERS += \
- fx/qfxanchors.h \
- fx/qfxanchors_p.h \
- fx/qfxevents_p.h \
- fx/qfxflickable.h \
- fx/qfxflickable_p.h \
- fx/qfxflipable.h \
- fx/qfxgridview.h \
- fx/qfximage.h \
- fx/qfximagebase.h \
- fx/qfxborderimage.h \
- fx/qfxpainteditem.h \
- fx/qfxpainteditem_p.h \
- fx/qfximage_p.h \
- fx/qfxborderimage_p.h \
- fx/qfximagebase_p.h \
- fx/qfxitem.h \
- fx/qfxitem_p.h \
- fx/qfxfocuspanel.h \
- fx/qfxfocusscope.h \
- fx/qfxpositioners.h \
- fx/qfxpositioners_p.h \
- fx/qfxloader.h \
- fx/qfxloader_p.h \
- fx/qfxmouseregion.h \
- fx/qfxmouseregion_p.h \
- fx/qfxpath.h \
- fx/qfxpath_p.h \
- fx/qfxpathview.h \
- fx/qfxpathview_p.h \
- fx/qfxrect.h \
- fx/qfxrect_p.h \
- fx/qfxrepeater.h \
- fx/qfxrepeater_p.h \
- fx/qfxscalegrid_p.h \
- fx/qfxtextinput.h \
- fx/qfxtextinput_p.h \
- fx/qfxtextedit.h \
- fx/qfxtextedit_p.h \
- fx/qfxtext.h \
- fx/qfxtext_p.h \
- fx/qfxpixmapcache.h \
- fx/qfxvisualitemmodel.h \
- fx/qfxlistview.h \
- fx/qfxgraphicsobjectcontainer.h \
- fx/qfxlayoutitem.h \
- fx/qfxeffects.cpp
-
-SOURCES += \
- fx/qfxanchors.cpp \
- fx/qfxevents.cpp \
- fx/qfxflickable.cpp \
- fx/qfxflipable.cpp \
- fx/qfxgridview.cpp \
- fx/qfximage.cpp \
- fx/qfxborderimage.cpp \
- fx/qfximagebase.cpp \
- fx/qfxpainteditem.cpp \
- fx/qfxitem.cpp \
- fx/qfxfocuspanel.cpp \
- fx/qfxfocusscope.cpp \
- fx/qfxpositioners.cpp \
- fx/qfxloader.cpp \
- fx/qfxmouseregion.cpp \
- fx/qfxpath.cpp \
- fx/qfxpathview.cpp \
- fx/qfxrect.cpp \
- fx/qfxrepeater.cpp \
- fx/qfxscalegrid.cpp \
- fx/qfxtextinput.cpp \
- fx/qfxtext.cpp \
- fx/qfxtextedit.cpp \
- fx/qfxpixmapcache.cpp \
- fx/qfxvisualitemmodel.cpp \
- fx/qfxlistview.cpp \
- fx/qfxgraphicsobjectcontainer.cpp \
- fx/qfxlayoutitem.cpp \
-
-contains(QT_CONFIG, webkit) {
- QT+=webkit
- SOURCES += fx/qfxwebview.cpp
- HEADERS += fx/qfxwebview.h
-}
-
diff --git a/src/declarative/fx/qfxborderimage_p.h b/src/declarative/fx/qfxborderimage_p.h
deleted file mode 100644
index aebe13f..0000000
--- a/src/declarative/fx/qfxborderimage_p.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QFXBORDERIMAGE_P_H
-#define QFXBORDERIMAGE_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qfximagebase_p.h"
-#include "qfxscalegrid_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QNetworkReply;
-class QFxBorderImagePrivate : public QFxImageBasePrivate
-{
- Q_DECLARE_PUBLIC(QFxBorderImage)
-
-public:
- QFxBorderImagePrivate()
- : border(0), sciReply(0),
- sciPendingPixmapCache(false),
- horizontalTileMode(QFxBorderImage::Stretch),
- verticalTileMode(QFxBorderImage::Stretch)
- {
- }
-
- ~QFxBorderImagePrivate()
- {
- }
-
- QFxScaleGrid *getScaleGrid()
- {
- Q_Q(QFxBorderImage);
- if (!border)
- border = new QFxScaleGrid(q);
- return border;
- }
-
- QFxScaleGrid *border;
- QUrl sciurl;
- QNetworkReply *sciReply;
- bool sciPendingPixmapCache;
- QFxBorderImage::TileMode horizontalTileMode;
- QFxBorderImage::TileMode verticalTileMode;
-};
-
-QT_END_NAMESPACE
-
-#endif // QFXBORDERIMAGE_P_H
diff --git a/src/declarative/fx/qfxflipable.h b/src/declarative/fx/qfxflipable.h
deleted file mode 100644
index e1bd9ea..0000000
--- a/src/declarative/fx/qfxflipable.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QFXFLIPABLE_H
-#define QFXFLIPABLE_H
-
-#include <QtCore/QObject>
-#include <QtGui/QTransform>
-#include <QtDeclarative/qfxitem.h>
-#include <QtGui/qvector3d.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-
-class QFxFlipablePrivate;
-class Q_DECLARATIVE_EXPORT QFxFlipable : public QFxItem
-{
- Q_OBJECT
-
- Q_ENUMS(Side)
- Q_PROPERTY(QFxItem *front READ front WRITE setFront)
- Q_PROPERTY(QFxItem *back READ back WRITE setBack)
- Q_PROPERTY(Side side READ side NOTIFY sideChanged)
- //### flipAxis
- //### flipRotation
-public:
- QFxFlipable(QFxItem *parent=0);
- ~QFxFlipable();
-
- QFxItem *front();
- void setFront(QFxItem *);
-
- QFxItem *back();
- void setBack(QFxItem *);
-
- enum Side { Front, Back };
- Side side() const;
-
-Q_SIGNALS:
- void sideChanged();
-
-private:
- Q_DISABLE_COPY(QFxFlipable)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxFlipable)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QFxFlipable)
-
-QT_END_HEADER
-
-#endif // QFXFLIPABLE_H
diff --git a/src/declarative/fx/qfxfocusscope.h b/src/declarative/fx/qfxfocusscope.h
deleted file mode 100644
index e337fc6..0000000
--- a/src/declarative/fx/qfxfocusscope.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QFXFOCUSSCOPE_H
-#define QFXFOCUSSCOPE_H
-
-#include <QtDeclarative/qfxitem.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-
-//### set component root as focusscope
-class Q_DECLARATIVE_EXPORT QFxFocusScope : public QFxItem
-{
- Q_OBJECT
-public:
- QFxFocusScope(QFxItem *parent=0);
- virtual ~QFxFocusScope();
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QFxFocusScope)
-
-QT_END_HEADER
-
-#endif // QFXFOCUSSCOPE_H
diff --git a/src/declarative/graphicsitems/graphicsitems.pri b/src/declarative/graphicsitems/graphicsitems.pri
new file mode 100644
index 0000000..8eac580
--- /dev/null
+++ b/src/declarative/graphicsitems/graphicsitems.pri
@@ -0,0 +1,84 @@
+HEADERS += \
+ graphicsitems/qmlgraphicsanchors_p.h \
+ graphicsitems/qmlgraphicsanchors_p_p.h \
+ graphicsitems/qmlgraphicsevents_p_p.h \
+ graphicsitems/qmlgraphicsflickable_p.h \
+ graphicsitems/qmlgraphicsflickable_p_p.h \
+ graphicsitems/qmlgraphicsflipable_p.h \
+ graphicsitems/qmlgraphicsgridview_p.h \
+ graphicsitems/qmlgraphicsimage_p.h \
+ graphicsitems/qmlgraphicsimagebase_p.h \
+ graphicsitems/qmlgraphicsborderimage_p.h \
+ graphicsitems/qmlgraphicspainteditem_p.h \
+ graphicsitems/qmlgraphicspainteditem_p_p.h \
+ graphicsitems/qmlgraphicsimage_p_p.h \
+ graphicsitems/qmlgraphicsborderimage_p_p.h \
+ graphicsitems/qmlgraphicsimagebase_p_p.h \
+ graphicsitems/qmlgraphicsitem.h \
+ graphicsitems/qmlgraphicsitem_p.h \
+ graphicsitems/qmlgraphicsfocuspanel_p.h \
+ graphicsitems/qmlgraphicsfocusscope_p.h \
+ graphicsitems/qmlgraphicspositioners_p.h \
+ graphicsitems/qmlgraphicspositioners_p_p.h \
+ graphicsitems/qmlgraphicsloader_p.h \
+ graphicsitems/qmlgraphicsloader_p_p.h \
+ graphicsitems/qmlgraphicsmouseregion_p.h \
+ graphicsitems/qmlgraphicsmouseregion_p_p.h \
+ graphicsitems/qmlgraphicspath_p.h \
+ graphicsitems/qmlgraphicspath_p_p.h \
+ graphicsitems/qmlgraphicspathview_p.h \
+ graphicsitems/qmlgraphicspathview_p_p.h \
+ graphicsitems/qmlgraphicsrect_p.h \
+ graphicsitems/qmlgraphicsrect_p_p.h \
+ graphicsitems/qmlgraphicsrepeater_p.h \
+ graphicsitems/qmlgraphicsrepeater_p_p.h \
+ graphicsitems/qmlgraphicsscalegrid_p_p.h \
+ graphicsitems/qmlgraphicstextinput_p.h \
+ graphicsitems/qmlgraphicstextinput_p_p.h \
+ graphicsitems/qmlgraphicstextedit_p.h \
+ graphicsitems/qmlgraphicstextedit_p_p.h \
+ graphicsitems/qmlgraphicstext_p.h \
+ graphicsitems/qmlgraphicstext_p_p.h \
+ graphicsitems/qmlgraphicspixmapcache_p.h \
+ graphicsitems/qmlgraphicsvisualitemmodel_p.h \
+ graphicsitems/qmlgraphicslistview_p.h \
+ graphicsitems/qmlgraphicsgraphicsobjectcontainer_p.h \
+ graphicsitems/qmlgraphicslayoutitem_p.h \
+ graphicsitems/qmlgraphicseffects.cpp
+
+SOURCES += \
+ graphicsitems/qmlgraphicsanchors.cpp \
+ graphicsitems/qmlgraphicsevents.cpp \
+ graphicsitems/qmlgraphicsflickable.cpp \
+ graphicsitems/qmlgraphicsflipable.cpp \
+ graphicsitems/qmlgraphicsgridview.cpp \
+ graphicsitems/qmlgraphicsimage.cpp \
+ graphicsitems/qmlgraphicsborderimage.cpp \
+ graphicsitems/qmlgraphicsimagebase.cpp \
+ graphicsitems/qmlgraphicspainteditem.cpp \
+ graphicsitems/qmlgraphicsitem.cpp \
+ graphicsitems/qmlgraphicsfocuspanel.cpp \
+ graphicsitems/qmlgraphicsfocusscope.cpp \
+ graphicsitems/qmlgraphicspositioners.cpp \
+ graphicsitems/qmlgraphicsloader.cpp \
+ graphicsitems/qmlgraphicsmouseregion.cpp \
+ graphicsitems/qmlgraphicspath.cpp \
+ graphicsitems/qmlgraphicspathview.cpp \
+ graphicsitems/qmlgraphicsrect.cpp \
+ graphicsitems/qmlgraphicsrepeater.cpp \
+ graphicsitems/qmlgraphicsscalegrid.cpp \
+ graphicsitems/qmlgraphicstextinput.cpp \
+ graphicsitems/qmlgraphicstext.cpp \
+ graphicsitems/qmlgraphicstextedit.cpp \
+ graphicsitems/qmlgraphicspixmapcache.cpp \
+ graphicsitems/qmlgraphicsvisualitemmodel.cpp \
+ graphicsitems/qmlgraphicslistview.cpp \
+ graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp \
+ graphicsitems/qmlgraphicslayoutitem.cpp \
+
+contains(QT_CONFIG, webkit) {
+ QT+=webkit
+ SOURCES += graphicsitems/qmlgraphicswebview.cpp
+ HEADERS += graphicsitems/qmlgraphicswebview_p.h
+}
+
diff --git a/src/declarative/fx/qfxanchors.cpp b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
index 8d4a8b8..e1d2f43 100644
--- a/src/declarative/fx/qfxanchors.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,63 +21,62 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxanchors_p.h"
-#include "qfxitem.h"
-#include "qfxitem_p.h"
+#include "qmlgraphicsanchors_p_p.h"
+#include "qmlgraphicsitem.h"
+#include "qmlgraphicsitem_p.h"
#include <QDebug>
#include <QtDeclarative/qmlinfo.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Anchors,QFxAnchors)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Anchors,QmlGraphicsAnchors)
//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)
//### const item?
//local position
-static qreal position(QFxItem *item, QFxAnchorLine::AnchorLine anchorLine)
+static qreal position(QmlGraphicsItem *item, QmlGraphicsAnchorLine::AnchorLine anchorLine)
{
qreal ret = 0.0;
switch(anchorLine) {
- case QFxAnchorLine::Left:
+ case QmlGraphicsAnchorLine::Left:
ret = item->x();
break;
- case QFxAnchorLine::Right:
+ case QmlGraphicsAnchorLine::Right:
ret = item->x() + item->width();
break;
- case QFxAnchorLine::Top:
+ case QmlGraphicsAnchorLine::Top:
ret = item->y();
break;
- case QFxAnchorLine::Bottom:
+ case QmlGraphicsAnchorLine::Bottom:
ret = item->y() + item->height();
break;
- case QFxAnchorLine::HCenter:
+ case QmlGraphicsAnchorLine::HCenter:
ret = item->x() + item->width()/2;
break;
- case QFxAnchorLine::VCenter:
+ case QmlGraphicsAnchorLine::VCenter:
ret = item->y() + item->height()/2;
break;
- case QFxAnchorLine::Baseline:
+ case QmlGraphicsAnchorLine::Baseline:
ret = item->y() + item->baselineOffset();
break;
default:
@@ -87,29 +87,29 @@ static qreal position(QFxItem *item, QFxAnchorLine::AnchorLine anchorLine)
}
//position when origin is 0,0
-static qreal adjustedPosition(QFxItem *item, QFxAnchorLine::AnchorLine anchorLine)
+static qreal adjustedPosition(QmlGraphicsItem *item, QmlGraphicsAnchorLine::AnchorLine anchorLine)
{
int ret = 0;
switch(anchorLine) {
- case QFxAnchorLine::Left:
+ case QmlGraphicsAnchorLine::Left:
ret = 0;
break;
- case QFxAnchorLine::Right:
+ case QmlGraphicsAnchorLine::Right:
ret = item->width();
break;
- case QFxAnchorLine::Top:
+ case QmlGraphicsAnchorLine::Top:
ret = 0;
break;
- case QFxAnchorLine::Bottom:
+ case QmlGraphicsAnchorLine::Bottom:
ret = item->height();
break;
- case QFxAnchorLine::HCenter:
+ case QmlGraphicsAnchorLine::HCenter:
ret = item->width()/2;
break;
- case QFxAnchorLine::VCenter:
+ case QmlGraphicsAnchorLine::VCenter:
ret = item->height()/2;
break;
- case QFxAnchorLine::Baseline:
+ case QmlGraphicsAnchorLine::Baseline:
ret = item->baselineOffset();
break;
default:
@@ -121,21 +121,21 @@ static qreal adjustedPosition(QFxItem *item, QFxAnchorLine::AnchorLine anchorLin
/*!
\internal
- \class QFxAnchors
+ \class QmlGraphicsAnchors
\ingroup group_layouts
- \brief The QFxAnchors class provides a way to lay out items relative to other items.
+ \brief The QmlGraphicsAnchors class provides a way to lay out items relative to other items.
\warning Currently, only anchoring to siblings or parent is supported.
*/
-QFxAnchors::QFxAnchors(QObject *parent)
- : QObject(*new QFxAnchorsPrivate(), parent)
+QmlGraphicsAnchors::QmlGraphicsAnchors(QObject *parent)
+ : QObject(*new QmlGraphicsAnchorsPrivate(), parent)
{
}
-QFxAnchors::~QFxAnchors()
+QmlGraphicsAnchors::~QmlGraphicsAnchors()
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
d->remDepend(d->fill);
d->remDepend(d->centerIn);
d->remDepend(d->left.item);
@@ -147,7 +147,7 @@ QFxAnchors::~QFxAnchors()
d->remDepend(d->baseline.item);
}
-void QFxAnchorsPrivate::fillChanged()
+void QmlGraphicsAnchorsPrivate::fillChanged()
{
if (!fill || !isItemComplete())
return;
@@ -161,7 +161,7 @@ void QFxAnchorsPrivate::fillChanged()
setItemHeight(fill->height()-topMargin-bottomMargin);
}
-void QFxAnchorsPrivate::centerInChanged()
+void QmlGraphicsAnchorsPrivate::centerInChanged()
{
if (!centerIn || fill || !isItemComplete())
return;
@@ -179,7 +179,7 @@ void QFxAnchorsPrivate::centerInChanged()
}
}
-void QFxAnchorsPrivate::clearItem(QFxItem *item)
+void QmlGraphicsAnchorsPrivate::clearItem(QmlGraphicsItem *item)
{
if (!item)
return;
@@ -189,107 +189,107 @@ void QFxAnchorsPrivate::clearItem(QFxItem *item)
centerIn = 0;
if (left.item == item) {
left.item = 0;
- usedAnchors &= ~QFxAnchors::HasLeftAnchor;
+ usedAnchors &= ~QmlGraphicsAnchors::HasLeftAnchor;
}
if (right.item == item) {
right.item = 0;
- usedAnchors &= ~QFxAnchors::HasRightAnchor;
+ usedAnchors &= ~QmlGraphicsAnchors::HasRightAnchor;
}
if (top.item == item) {
top.item = 0;
- usedAnchors &= ~QFxAnchors::HasTopAnchor;
+ usedAnchors &= ~QmlGraphicsAnchors::HasTopAnchor;
}
if (bottom.item == item) {
bottom.item = 0;
- usedAnchors &= ~QFxAnchors::HasBottomAnchor;
+ usedAnchors &= ~QmlGraphicsAnchors::HasBottomAnchor;
}
if (vCenter.item == item) {
vCenter.item = 0;
- usedAnchors &= ~QFxAnchors::HasVCenterAnchor;
+ usedAnchors &= ~QmlGraphicsAnchors::HasVCenterAnchor;
}
if (hCenter.item == item) {
hCenter.item = 0;
- usedAnchors &= ~QFxAnchors::HasHCenterAnchor;
+ usedAnchors &= ~QmlGraphicsAnchors::HasHCenterAnchor;
}
if (baseline.item == item) {
baseline.item = 0;
- usedAnchors &= ~QFxAnchors::HasBaselineAnchor;
+ usedAnchors &= ~QmlGraphicsAnchors::HasBaselineAnchor;
}
}
-void QFxAnchorsPrivate::addDepend(QFxItem *item)
+void QmlGraphicsAnchorsPrivate::addDepend(QmlGraphicsItem *item)
{
- Q_Q(QFxAnchors);
+ Q_Q(QmlGraphicsAnchors);
if (!item)
return;
- QFxItemPrivate *p =
- static_cast<QFxItemPrivate *>(QGraphicsItemPrivate::get(item));
+ QmlGraphicsItemPrivate *p =
+ static_cast<QmlGraphicsItemPrivate *>(QGraphicsItemPrivate::get(item));
p->dependantAnchors.append(q);
}
-void QFxAnchorsPrivate::remDepend(QFxItem *item)
+void QmlGraphicsAnchorsPrivate::remDepend(QmlGraphicsItem *item)
{
- Q_Q(QFxAnchors);
+ Q_Q(QmlGraphicsAnchors);
if (!item)
return;
- QFxItemPrivate *p =
- static_cast<QFxItemPrivate *>(QGraphicsItemPrivate::get(item));
+ QmlGraphicsItemPrivate *p =
+ static_cast<QmlGraphicsItemPrivate *>(QGraphicsItemPrivate::get(item));
p->dependantAnchors.removeOne(q);
}
-bool QFxAnchorsPrivate::isItemComplete() const
+bool QmlGraphicsAnchorsPrivate::isItemComplete() const
{
return componentComplete;
}
-void QFxAnchors::classBegin()
+void QmlGraphicsAnchors::classBegin()
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
d->componentComplete = false;
}
-void QFxAnchors::componentComplete()
+void QmlGraphicsAnchors::componentComplete()
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
d->componentComplete = true;
}
-void QFxAnchorsPrivate::setItemHeight(qreal v)
+void QmlGraphicsAnchorsPrivate::setItemHeight(qreal v)
{
updatingMe = true;
item->setHeight(v);
updatingMe = false;
}
-void QFxAnchorsPrivate::setItemWidth(qreal v)
+void QmlGraphicsAnchorsPrivate::setItemWidth(qreal v)
{
updatingMe = true;
item->setWidth(v);
updatingMe = false;
}
-void QFxAnchorsPrivate::setItemX(qreal v)
+void QmlGraphicsAnchorsPrivate::setItemX(qreal v)
{
updatingMe = true;
item->setX(v);
updatingMe = false;
}
-void QFxAnchorsPrivate::setItemY(qreal v)
+void QmlGraphicsAnchorsPrivate::setItemY(qreal v)
{
updatingMe = true;
item->setY(v);
updatingMe = false;
}
-void QFxAnchorsPrivate::setItemPos(const QPointF &v)
+void QmlGraphicsAnchorsPrivate::setItemPos(const QPointF &v)
{
updatingMe = true;
item->setPos(v);
updatingMe = false;
}
-void QFxAnchorsPrivate::updateMe()
+void QmlGraphicsAnchorsPrivate::updateMe()
{
if (updatingMe) {
updatingMe = false;
@@ -302,7 +302,7 @@ void QFxAnchorsPrivate::updateMe()
updateVerticalAnchors();
}
-void QFxAnchorsPrivate::updateOnComplete()
+void QmlGraphicsAnchorsPrivate::updateOnComplete()
{
fillChanged();
centerInChanged();
@@ -310,7 +310,7 @@ void QFxAnchorsPrivate::updateOnComplete()
updateVerticalAnchors();
}
-void QFxAnchorsPrivate::update(QFxItem *, const QRectF &newG, const QRectF &oldG)
+void QmlGraphicsAnchorsPrivate::update(QmlGraphicsItem *, const QRectF &newG, const QRectF &oldG)
{
fillChanged();
centerInChanged();
@@ -321,15 +321,15 @@ void QFxAnchorsPrivate::update(QFxItem *, const QRectF &newG, const QRectF &oldG
updateVerticalAnchors();
}
-QFxItem *QFxAnchors::fill() const
+QmlGraphicsItem *QmlGraphicsAnchors::fill() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->fill;
}
-void QFxAnchors::setFill(QFxItem *f)
+void QmlGraphicsAnchors::setFill(QmlGraphicsItem *f)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (!f) {
d->remDepend(d->fill);
d->fill = f;
@@ -346,15 +346,15 @@ void QFxAnchors::setFill(QFxItem *f)
d->fillChanged();
}
-QFxItem *QFxAnchors::centerIn() const
+QmlGraphicsItem *QmlGraphicsAnchors::centerIn() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->centerIn;
}
-void QFxAnchors::setCenterIn(QFxItem* c)
+void QmlGraphicsAnchors::setCenterIn(QmlGraphicsItem* c)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (!c) {
d->remDepend(d->centerIn);
d->centerIn = c;
@@ -372,11 +372,11 @@ void QFxAnchors::setCenterIn(QFxItem* c)
d->centerInChanged();
}
-bool QFxAnchorsPrivate::calcStretch(const QFxAnchorLine &edge1,
- const QFxAnchorLine &edge2,
+bool QmlGraphicsAnchorsPrivate::calcStretch(const QmlGraphicsAnchorLine &edge1,
+ const QmlGraphicsAnchorLine &edge2,
int offset1,
int offset2,
- QFxAnchorLine::AnchorLine line,
+ QmlGraphicsAnchorLine::AnchorLine line,
int &stretch)
{
bool edge1IsParent = (edge1.item == item->parentItem());
@@ -401,21 +401,21 @@ bool QFxAnchorsPrivate::calcStretch(const QFxAnchorLine &edge1,
return invalid;
}
-void QFxAnchorsPrivate::updateVerticalAnchors()
+void QmlGraphicsAnchorsPrivate::updateVerticalAnchors()
{
if (fill || centerIn || !isItemComplete())
return;
if (updatingVerticalAnchor < 2) {
++updatingVerticalAnchor;
- if (usedAnchors & QFxAnchors::HasTopAnchor) {
+ if (usedAnchors & QmlGraphicsAnchors::HasTopAnchor) {
//Handle stretching
bool invalid = true;
int height = 0;
- if (usedAnchors & QFxAnchors::HasBottomAnchor) {
- invalid = calcStretch(top, bottom, topMargin, -bottomMargin, QFxAnchorLine::Top, height);
- } else if (usedAnchors & QFxAnchors::HasVCenterAnchor) {
- invalid = calcStretch(top, vCenter, topMargin, vCenterOffset, QFxAnchorLine::Top, height);
+ if (usedAnchors & QmlGraphicsAnchors::HasBottomAnchor) {
+ invalid = calcStretch(top, bottom, topMargin, -bottomMargin, QmlGraphicsAnchorLine::Top, height);
+ } else if (usedAnchors & QmlGraphicsAnchors::HasVCenterAnchor) {
+ invalid = calcStretch(top, vCenter, topMargin, vCenterOffset, QmlGraphicsAnchorLine::Top, height);
height *= 2;
}
if (!invalid)
@@ -427,12 +427,12 @@ void QFxAnchorsPrivate::updateVerticalAnchors()
} else if (top.item->parentItem() == item->parentItem()) {
setItemY(position(top.item, top.anchorLine) + topMargin);
}
- } else if (usedAnchors & QFxAnchors::HasBottomAnchor) {
+ } else if (usedAnchors & QmlGraphicsAnchors::HasBottomAnchor) {
//Handle stretching (top + bottom case is handled above)
- if (usedAnchors & QFxAnchors::HasVCenterAnchor) {
+ if (usedAnchors & QmlGraphicsAnchors::HasVCenterAnchor) {
int height = 0;
bool invalid = calcStretch(vCenter, bottom, vCenterOffset, -bottomMargin,
- QFxAnchorLine::Top, height);
+ QmlGraphicsAnchorLine::Top, height);
if (!invalid)
setItemHeight(height*2);
}
@@ -443,7 +443,7 @@ void QFxAnchorsPrivate::updateVerticalAnchors()
} else if (bottom.item->parentItem() == item->parentItem()) {
setItemY(position(bottom.item, bottom.anchorLine) - item->height() - bottomMargin);
}
- } else if (usedAnchors & QFxAnchors::HasVCenterAnchor) {
+ } else if (usedAnchors & QmlGraphicsAnchors::HasVCenterAnchor) {
//(stetching handled above)
//Handle vCenter
@@ -453,7 +453,7 @@ void QFxAnchorsPrivate::updateVerticalAnchors()
} else if (vCenter.item->parentItem() == item->parentItem()) {
setItemY(position(vCenter.item, vCenter.anchorLine) - item->height()/2 + vCenterOffset);
}
- } else if (usedAnchors & QFxAnchors::HasBaselineAnchor) {
+ } else if (usedAnchors & QmlGraphicsAnchors::HasBaselineAnchor) {
//Handle baseline
if (baseline.item->parentItem() == item->parentItem()) {
setItemY(position(baseline.item, baseline.anchorLine) - item->baselineOffset() + baselineOffset);
@@ -462,11 +462,11 @@ void QFxAnchorsPrivate::updateVerticalAnchors()
--updatingVerticalAnchor;
} else {
// ### Make this certain :)
- qmlInfo(QFxAnchors::tr("Possible anchor loop detected on vertical anchor."), item);
+ qmlInfo(QmlGraphicsAnchors::tr("Possible anchor loop detected on vertical anchor."), item);
}
}
-void QFxAnchorsPrivate::updateHorizontalAnchors()
+void QmlGraphicsAnchorsPrivate::updateHorizontalAnchors()
{
if (fill || centerIn || !isItemComplete())
return;
@@ -474,14 +474,14 @@ void QFxAnchorsPrivate::updateHorizontalAnchors()
if (updatingHorizontalAnchor < 2) {
++updatingHorizontalAnchor;
- if (usedAnchors & QFxAnchors::HasLeftAnchor) {
+ if (usedAnchors & QmlGraphicsAnchors::HasLeftAnchor) {
//Handle stretching
bool invalid = true;
int width = 0;
- if (usedAnchors & QFxAnchors::HasRightAnchor) {
- invalid = calcStretch(left, right, leftMargin, -rightMargin, QFxAnchorLine::Left, width);
- } else if (usedAnchors & QFxAnchors::HasHCenterAnchor) {
- invalid = calcStretch(left, hCenter, leftMargin, hCenterOffset, QFxAnchorLine::Left, width);
+ if (usedAnchors & QmlGraphicsAnchors::HasRightAnchor) {
+ invalid = calcStretch(left, right, leftMargin, -rightMargin, QmlGraphicsAnchorLine::Left, width);
+ } else if (usedAnchors & QmlGraphicsAnchors::HasHCenterAnchor) {
+ invalid = calcStretch(left, hCenter, leftMargin, hCenterOffset, QmlGraphicsAnchorLine::Left, width);
width *= 2;
}
if (!invalid)
@@ -493,12 +493,12 @@ void QFxAnchorsPrivate::updateHorizontalAnchors()
} else if (left.item->parentItem() == item->parentItem()) {
setItemX(position(left.item, left.anchorLine) + leftMargin);
}
- } else if (usedAnchors & QFxAnchors::HasRightAnchor) {
+ } else if (usedAnchors & QmlGraphicsAnchors::HasRightAnchor) {
//Handle stretching (left + right case is handled in updateLeftAnchor)
- if (usedAnchors & QFxAnchors::HasHCenterAnchor) {
+ if (usedAnchors & QmlGraphicsAnchors::HasHCenterAnchor) {
int width = 0;
bool invalid = calcStretch(hCenter, right, hCenterOffset, -rightMargin,
- QFxAnchorLine::Left, width);
+ QmlGraphicsAnchorLine::Left, width);
if (!invalid)
setItemWidth(width*2);
}
@@ -509,7 +509,7 @@ void QFxAnchorsPrivate::updateHorizontalAnchors()
} else if (right.item->parentItem() == item->parentItem()) {
setItemX(position(right.item, right.anchorLine) - item->width() - rightMargin);
}
- } else if (usedAnchors & QFxAnchors::HasHCenterAnchor) {
+ } else if (usedAnchors & QmlGraphicsAnchors::HasHCenterAnchor) {
//Handle hCenter
if (hCenter.item == item->parentItem()) {
setItemX(adjustedPosition(hCenter.item, hCenter.anchorLine) - item->width()/2 + hCenterOffset);
@@ -521,19 +521,19 @@ void QFxAnchorsPrivate::updateHorizontalAnchors()
--updatingHorizontalAnchor;
} else {
// ### Make this certain :)
- qmlInfo(QFxAnchors::tr("Possible anchor loop detected on horizontal anchor."), item);
+ qmlInfo(QmlGraphicsAnchors::tr("Possible anchor loop detected on horizontal anchor."), item);
}
}
-QFxAnchorLine QFxAnchors::top() const
+QmlGraphicsAnchorLine QmlGraphicsAnchors::top() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->top;
}
-void QFxAnchors::setTop(const QFxAnchorLine &edge)
+void QmlGraphicsAnchors::setTop(const QmlGraphicsAnchorLine &edge)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (!d->checkVAnchorValid(edge))
return;
@@ -550,24 +550,24 @@ void QFxAnchors::setTop(const QFxAnchorLine &edge)
d->updateVerticalAnchors();
}
-void QFxAnchors::resetTop()
+void QmlGraphicsAnchors::resetTop()
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
d->usedAnchors &= ~HasTopAnchor;
d->remDepend(d->top.item);
- d->top = QFxAnchorLine();
+ d->top = QmlGraphicsAnchorLine();
d->updateVerticalAnchors();
}
-QFxAnchorLine QFxAnchors::bottom() const
+QmlGraphicsAnchorLine QmlGraphicsAnchors::bottom() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->bottom;
}
-void QFxAnchors::setBottom(const QFxAnchorLine &edge)
+void QmlGraphicsAnchors::setBottom(const QmlGraphicsAnchorLine &edge)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (!d->checkVAnchorValid(edge))
return;
@@ -584,24 +584,24 @@ void QFxAnchors::setBottom(const QFxAnchorLine &edge)
d->updateVerticalAnchors();
}
-void QFxAnchors::resetBottom()
+void QmlGraphicsAnchors::resetBottom()
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
d->usedAnchors &= ~HasBottomAnchor;
d->remDepend(d->bottom.item);
- d->bottom = QFxAnchorLine();
+ d->bottom = QmlGraphicsAnchorLine();
d->updateVerticalAnchors();
}
-QFxAnchorLine QFxAnchors::verticalCenter() const
+QmlGraphicsAnchorLine QmlGraphicsAnchors::verticalCenter() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->vCenter;
}
-void QFxAnchors::setVerticalCenter(const QFxAnchorLine &edge)
+void QmlGraphicsAnchors::setVerticalCenter(const QmlGraphicsAnchorLine &edge)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (!d->checkVAnchorValid(edge))
return;
@@ -618,24 +618,24 @@ void QFxAnchors::setVerticalCenter(const QFxAnchorLine &edge)
d->updateVerticalAnchors();
}
-void QFxAnchors::resetVerticalCenter()
+void QmlGraphicsAnchors::resetVerticalCenter()
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
d->usedAnchors &= ~HasVCenterAnchor;
d->remDepend(d->vCenter.item);
- d->vCenter = QFxAnchorLine();
+ d->vCenter = QmlGraphicsAnchorLine();
d->updateVerticalAnchors();
}
-QFxAnchorLine QFxAnchors::baseline() const
+QmlGraphicsAnchorLine QmlGraphicsAnchors::baseline() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->baseline;
}
-void QFxAnchors::setBaseline(const QFxAnchorLine &edge)
+void QmlGraphicsAnchors::setBaseline(const QmlGraphicsAnchorLine &edge)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (!d->checkVAnchorValid(edge))
return;
@@ -652,24 +652,24 @@ void QFxAnchors::setBaseline(const QFxAnchorLine &edge)
d->updateVerticalAnchors();
}
-void QFxAnchors::resetBaseline()
+void QmlGraphicsAnchors::resetBaseline()
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
d->usedAnchors &= ~HasBaselineAnchor;
d->remDepend(d->baseline.item);
- d->baseline = QFxAnchorLine();
+ d->baseline = QmlGraphicsAnchorLine();
d->updateVerticalAnchors();
}
-QFxAnchorLine QFxAnchors::left() const
+QmlGraphicsAnchorLine QmlGraphicsAnchors::left() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->left;
}
-void QFxAnchors::setLeft(const QFxAnchorLine &edge)
+void QmlGraphicsAnchors::setLeft(const QmlGraphicsAnchorLine &edge)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (!d->checkHAnchorValid(edge))
return;
@@ -686,24 +686,24 @@ void QFxAnchors::setLeft(const QFxAnchorLine &edge)
d->updateHorizontalAnchors();
}
-void QFxAnchors::resetLeft()
+void QmlGraphicsAnchors::resetLeft()
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
d->usedAnchors &= ~HasLeftAnchor;
d->remDepend(d->left.item);
- d->left = QFxAnchorLine();
+ d->left = QmlGraphicsAnchorLine();
d->updateHorizontalAnchors();
}
-QFxAnchorLine QFxAnchors::right() const
+QmlGraphicsAnchorLine QmlGraphicsAnchors::right() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->right;
}
-void QFxAnchors::setRight(const QFxAnchorLine &edge)
+void QmlGraphicsAnchors::setRight(const QmlGraphicsAnchorLine &edge)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (!d->checkHAnchorValid(edge))
return;
@@ -721,24 +721,24 @@ void QFxAnchors::setRight(const QFxAnchorLine &edge)
d->updateHorizontalAnchors();
}
-void QFxAnchors::resetRight()
+void QmlGraphicsAnchors::resetRight()
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
d->usedAnchors &= ~HasRightAnchor;
d->remDepend(d->right.item);
- d->right = QFxAnchorLine();
+ d->right = QmlGraphicsAnchorLine();
d->updateHorizontalAnchors();
}
-QFxAnchorLine QFxAnchors::horizontalCenter() const
+QmlGraphicsAnchorLine QmlGraphicsAnchors::horizontalCenter() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->hCenter;
}
-void QFxAnchors::setHorizontalCenter(const QFxAnchorLine &edge)
+void QmlGraphicsAnchors::setHorizontalCenter(const QmlGraphicsAnchorLine &edge)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (!d->checkHAnchorValid(edge))
return;
@@ -755,24 +755,24 @@ void QFxAnchors::setHorizontalCenter(const QFxAnchorLine &edge)
d->updateHorizontalAnchors();
}
-void QFxAnchors::resetHorizontalCenter()
+void QmlGraphicsAnchors::resetHorizontalCenter()
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
d->usedAnchors &= ~HasHCenterAnchor;
d->remDepend(d->hCenter.item);
- d->hCenter = QFxAnchorLine();
+ d->hCenter = QmlGraphicsAnchorLine();
d->updateHorizontalAnchors();
}
-qreal QFxAnchors::leftMargin() const
+qreal QmlGraphicsAnchors::leftMargin() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->leftMargin;
}
-void QFxAnchors::setLeftMargin(qreal offset)
+void QmlGraphicsAnchors::setLeftMargin(qreal offset)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (d->leftMargin == offset)
return;
d->leftMargin = offset;
@@ -780,15 +780,15 @@ void QFxAnchors::setLeftMargin(qreal offset)
emit leftMarginChanged();
}
-qreal QFxAnchors::rightMargin() const
+qreal QmlGraphicsAnchors::rightMargin() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->rightMargin;
}
-void QFxAnchors::setRightMargin(qreal offset)
+void QmlGraphicsAnchors::setRightMargin(qreal offset)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (d->rightMargin == offset)
return;
d->rightMargin = offset;
@@ -796,15 +796,15 @@ void QFxAnchors::setRightMargin(qreal offset)
emit rightMarginChanged();
}
-qreal QFxAnchors::horizontalCenterOffset() const
+qreal QmlGraphicsAnchors::horizontalCenterOffset() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->hCenterOffset;
}
-void QFxAnchors::setHorizontalCenterOffset(qreal offset)
+void QmlGraphicsAnchors::setHorizontalCenterOffset(qreal offset)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (d->hCenterOffset == offset)
return;
d->hCenterOffset = offset;
@@ -812,15 +812,15 @@ void QFxAnchors::setHorizontalCenterOffset(qreal offset)
emit horizontalCenterOffsetChanged();
}
-qreal QFxAnchors::topMargin() const
+qreal QmlGraphicsAnchors::topMargin() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->topMargin;
}
-void QFxAnchors::setTopMargin(qreal offset)
+void QmlGraphicsAnchors::setTopMargin(qreal offset)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (d->topMargin == offset)
return;
d->topMargin = offset;
@@ -828,15 +828,15 @@ void QFxAnchors::setTopMargin(qreal offset)
emit topMarginChanged();
}
-qreal QFxAnchors::bottomMargin() const
+qreal QmlGraphicsAnchors::bottomMargin() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->bottomMargin;
}
-void QFxAnchors::setBottomMargin(qreal offset)
+void QmlGraphicsAnchors::setBottomMargin(qreal offset)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (d->bottomMargin == offset)
return;
d->bottomMargin = offset;
@@ -844,15 +844,15 @@ void QFxAnchors::setBottomMargin(qreal offset)
emit bottomMarginChanged();
}
-qreal QFxAnchors::verticalCenterOffset() const
+qreal QmlGraphicsAnchors::verticalCenterOffset() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->vCenterOffset;
}
-void QFxAnchors::setVerticalCenterOffset(qreal offset)
+void QmlGraphicsAnchors::setVerticalCenterOffset(qreal offset)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (d->vCenterOffset == offset)
return;
d->vCenterOffset = offset;
@@ -860,15 +860,15 @@ void QFxAnchors::setVerticalCenterOffset(qreal offset)
emit verticalCenterOffsetChanged();
}
-qreal QFxAnchors::baselineOffset() const
+qreal QmlGraphicsAnchors::baselineOffset() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->baselineOffset;
}
-void QFxAnchors::setBaselineOffset(qreal offset)
+void QmlGraphicsAnchors::setBaselineOffset(qreal offset)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
if (d->baselineOffset == offset)
return;
d->baselineOffset = offset;
@@ -876,87 +876,87 @@ void QFxAnchors::setBaselineOffset(qreal offset)
emit baselineOffsetChanged();
}
-QFxAnchors::UsedAnchors QFxAnchors::usedAnchors() const
+QmlGraphicsAnchors::UsedAnchors QmlGraphicsAnchors::usedAnchors() const
{
- Q_D(const QFxAnchors);
+ Q_D(const QmlGraphicsAnchors);
return d->usedAnchors;
}
-void QFxAnchors::setItem(QFxItem *item)
+void QmlGraphicsAnchors::setItem(QmlGraphicsItem *item)
{
- Q_D(QFxAnchors);
+ Q_D(QmlGraphicsAnchors);
d->item = item;
}
-bool QFxAnchorsPrivate::checkHValid() const
+bool QmlGraphicsAnchorsPrivate::checkHValid() const
{
- if (usedAnchors & QFxAnchors::HasLeftAnchor &&
- usedAnchors & QFxAnchors::HasRightAnchor &&
- usedAnchors & QFxAnchors::HasHCenterAnchor) {
- qmlInfo(QFxAnchors::tr("Can't specify left, right, and hcenter anchors."), item);
+ if (usedAnchors & QmlGraphicsAnchors::HasLeftAnchor &&
+ usedAnchors & QmlGraphicsAnchors::HasRightAnchor &&
+ usedAnchors & QmlGraphicsAnchors::HasHCenterAnchor) {
+ qmlInfo(QmlGraphicsAnchors::tr("Can't specify left, right, and hcenter anchors."), item);
return false;
}
return true;
}
-bool QFxAnchorsPrivate::checkHAnchorValid(QFxAnchorLine anchor) const
+bool QmlGraphicsAnchorsPrivate::checkHAnchorValid(QmlGraphicsAnchorLine anchor) const
{
if (!anchor.item) {
- qmlInfo(QFxAnchors::tr("Can't anchor to a null item."), item);
+ qmlInfo(QmlGraphicsAnchors::tr("Can't anchor to a null item."), item);
return false;
- } else if (anchor.anchorLine & QFxAnchorLine::Vertical_Mask) {
- qmlInfo(QFxAnchors::tr("Can't anchor a horizontal edge to a vertical edge."), item);
+ } else if (anchor.anchorLine & QmlGraphicsAnchorLine::Vertical_Mask) {
+ qmlInfo(QmlGraphicsAnchors::tr("Can't anchor a horizontal edge to a vertical edge."), item);
return false;
} else if (anchor.item != item->parentItem() && anchor.item->parentItem() != item->parentItem()){
- qmlInfo(QFxAnchors::tr("Can't anchor to an item that isn't a parent or sibling."), item);
+ qmlInfo(QmlGraphicsAnchors::tr("Can't anchor to an item that isn't a parent or sibling."), item);
return false;
} else if (anchor.item == item) {
- qmlInfo(QFxAnchors::tr("Can't anchor item to self."), item);
+ qmlInfo(QmlGraphicsAnchors::tr("Can't anchor item to self."), item);
return false;
}
return true;
}
-bool QFxAnchorsPrivate::checkVValid() const
+bool QmlGraphicsAnchorsPrivate::checkVValid() const
{
- if (usedAnchors & QFxAnchors::HasTopAnchor &&
- usedAnchors & QFxAnchors::HasBottomAnchor &&
- usedAnchors & QFxAnchors::HasVCenterAnchor) {
- qmlInfo(QFxAnchors::tr("Can't specify top, bottom, and vcenter anchors."), item);
+ if (usedAnchors & QmlGraphicsAnchors::HasTopAnchor &&
+ usedAnchors & QmlGraphicsAnchors::HasBottomAnchor &&
+ usedAnchors & QmlGraphicsAnchors::HasVCenterAnchor) {
+ qmlInfo(QmlGraphicsAnchors::tr("Can't specify top, bottom, and vcenter anchors."), item);
return false;
- } else if (usedAnchors & QFxAnchors::HasBaselineAnchor &&
- (usedAnchors & QFxAnchors::HasTopAnchor ||
- usedAnchors & QFxAnchors::HasBottomAnchor ||
- usedAnchors & QFxAnchors::HasVCenterAnchor)) {
- qmlInfo(QFxAnchors::tr("Baseline anchor can't be used in conjunction with top, bottom, or vcenter anchors."), item);
+ } else if (usedAnchors & QmlGraphicsAnchors::HasBaselineAnchor &&
+ (usedAnchors & QmlGraphicsAnchors::HasTopAnchor ||
+ usedAnchors & QmlGraphicsAnchors::HasBottomAnchor ||
+ usedAnchors & QmlGraphicsAnchors::HasVCenterAnchor)) {
+ qmlInfo(QmlGraphicsAnchors::tr("Baseline anchor can't be used in conjunction with top, bottom, or vcenter anchors."), item);
return false;
}
return true;
}
-bool QFxAnchorsPrivate::checkVAnchorValid(QFxAnchorLine anchor) const
+bool QmlGraphicsAnchorsPrivate::checkVAnchorValid(QmlGraphicsAnchorLine anchor) const
{
if (!anchor.item) {
- qmlInfo(QFxAnchors::tr("Can't anchor to a null item."), item);
+ qmlInfo(QmlGraphicsAnchors::tr("Can't anchor to a null item."), item);
return false;
- } else if (anchor.anchorLine & QFxAnchorLine::Horizontal_Mask) {
- qmlInfo(QFxAnchors::tr("Can't anchor a vertical edge to a horizontal edge."), item);
+ } else if (anchor.anchorLine & QmlGraphicsAnchorLine::Horizontal_Mask) {
+ qmlInfo(QmlGraphicsAnchors::tr("Can't anchor a vertical edge to a horizontal edge."), item);
return false;
} else if (anchor.item != item->parentItem() && anchor.item->parentItem() != item->parentItem()){
- qmlInfo(QFxAnchors::tr("Can't anchor to an item that isn't a parent or sibling."), item);
+ qmlInfo(QmlGraphicsAnchors::tr("Can't anchor to an item that isn't a parent or sibling."), item);
return false;
} else if (anchor.item == item){
- qmlInfo(QFxAnchors::tr("Can't anchor item to self."), item);
+ qmlInfo(QmlGraphicsAnchors::tr("Can't anchor item to self."), item);
return false;
}
return true;
}
-QT_END_NAMESPACE
+#include "moc_qmlgraphicsanchors_p.cpp"
-#include "moc_qfxanchors.cpp"
+QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxanchors.h b/src/declarative/graphicsitems/qmlgraphicsanchors_p.h
index 3dd64c7..f6e9e1a 100644
--- a/src/declarative/fx/qfxanchors.h
+++ b/src/declarative/graphicsitems/qmlgraphicsanchors_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,32 +21,30 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXANCHORS_H
-#define QFXANCHORS_H
+#ifndef QMLGRAPHICSANCHORS_H
+#define QMLGRAPHICSANCHORS_H
#include <QtCore/QObject>
-#include <QtDeclarative/qfxglobal.h>
#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
QT_BEGIN_HEADER
@@ -53,19 +52,19 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxAnchorsPrivate;
-class QFxAnchorLine;
-class Q_DECLARATIVE_EXPORT QFxAnchors : public QObject
+class QmlGraphicsAnchorsPrivate;
+class QmlGraphicsAnchorLine;
+class Q_DECLARATIVE_EXPORT QmlGraphicsAnchors : public QObject
{
Q_OBJECT
- Q_PROPERTY(QFxAnchorLine left READ left WRITE setLeft RESET resetLeft)
- Q_PROPERTY(QFxAnchorLine right READ right WRITE setRight RESET resetRight)
- Q_PROPERTY(QFxAnchorLine horizontalCenter READ horizontalCenter WRITE setHorizontalCenter RESET resetHorizontalCenter)
- Q_PROPERTY(QFxAnchorLine top READ top WRITE setTop RESET resetTop)
- Q_PROPERTY(QFxAnchorLine bottom READ bottom WRITE setBottom RESET resetBottom)
- Q_PROPERTY(QFxAnchorLine verticalCenter READ verticalCenter WRITE setVerticalCenter RESET resetVerticalCenter)
- Q_PROPERTY(QFxAnchorLine baseline READ baseline WRITE setBaseline RESET resetBaseline)
+ Q_PROPERTY(QmlGraphicsAnchorLine left READ left WRITE setLeft RESET resetLeft)
+ Q_PROPERTY(QmlGraphicsAnchorLine right READ right WRITE setRight RESET resetRight)
+ Q_PROPERTY(QmlGraphicsAnchorLine horizontalCenter READ horizontalCenter WRITE setHorizontalCenter RESET resetHorizontalCenter)
+ Q_PROPERTY(QmlGraphicsAnchorLine top READ top WRITE setTop RESET resetTop)
+ Q_PROPERTY(QmlGraphicsAnchorLine bottom READ bottom WRITE setBottom RESET resetBottom)
+ Q_PROPERTY(QmlGraphicsAnchorLine verticalCenter READ verticalCenter WRITE setVerticalCenter RESET resetVerticalCenter)
+ Q_PROPERTY(QmlGraphicsAnchorLine baseline READ baseline WRITE setBaseline RESET resetBaseline)
Q_PROPERTY(qreal leftMargin READ leftMargin WRITE setLeftMargin NOTIFY leftMarginChanged)
Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin NOTIFY rightMarginChanged)
Q_PROPERTY(qreal horizontalCenterOffset READ horizontalCenterOffset WRITE setHorizontalCenterOffset NOTIFY horizontalCenterOffsetChanged())
@@ -73,12 +72,12 @@ class Q_DECLARATIVE_EXPORT QFxAnchors : 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(QFxItem *fill READ fill WRITE setFill)
- Q_PROPERTY(QFxItem *centerIn READ centerIn WRITE setCenterIn)
+ Q_PROPERTY(QmlGraphicsItem *fill READ fill WRITE setFill)
+ Q_PROPERTY(QmlGraphicsItem *centerIn READ centerIn WRITE setCenterIn)
public:
- QFxAnchors(QObject *parent=0);
- virtual ~QFxAnchors();
+ QmlGraphicsAnchors(QObject *parent=0);
+ virtual ~QmlGraphicsAnchors();
enum UsedAnchor {
HasLeftAnchor = 0x01,
@@ -93,32 +92,32 @@ public:
};
Q_DECLARE_FLAGS(UsedAnchors, UsedAnchor)
- QFxAnchorLine left() const;
- void setLeft(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine left() const;
+ void setLeft(const QmlGraphicsAnchorLine &edge);
void resetLeft();
- QFxAnchorLine right() const;
- void setRight(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine right() const;
+ void setRight(const QmlGraphicsAnchorLine &edge);
void resetRight();
- QFxAnchorLine horizontalCenter() const;
- void setHorizontalCenter(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine horizontalCenter() const;
+ void setHorizontalCenter(const QmlGraphicsAnchorLine &edge);
void resetHorizontalCenter();
- QFxAnchorLine top() const;
- void setTop(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine top() const;
+ void setTop(const QmlGraphicsAnchorLine &edge);
void resetTop();
- QFxAnchorLine bottom() const;
- void setBottom(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine bottom() const;
+ void setBottom(const QmlGraphicsAnchorLine &edge);
void resetBottom();
- QFxAnchorLine verticalCenter() const;
- void setVerticalCenter(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine verticalCenter() const;
+ void setVerticalCenter(const QmlGraphicsAnchorLine &edge);
void resetVerticalCenter();
- QFxAnchorLine baseline() const;
- void setBaseline(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine baseline() const;
+ void setBaseline(const QmlGraphicsAnchorLine &edge);
void resetBaseline();
qreal leftMargin() const;
@@ -142,15 +141,15 @@ public:
qreal baselineOffset() const;
void setBaselineOffset(qreal);
- QFxItem *fill() const;
- void setFill(QFxItem *);
+ QmlGraphicsItem *fill() const;
+ void setFill(QmlGraphicsItem *);
- QFxItem *centerIn() const;
- void setCenterIn(QFxItem *);
+ QmlGraphicsItem *centerIn() const;
+ void setCenterIn(QmlGraphicsItem *);
UsedAnchors usedAnchors() const;
- void setItem(QFxItem *item);
+ void setItem(QmlGraphicsItem *item);
void classBegin();
void componentComplete();
@@ -165,15 +164,15 @@ Q_SIGNALS:
void baselineOffsetChanged();
private:
- friend class QFxItem;
- Q_DISABLE_COPY(QFxAnchors)
- Q_DECLARE_PRIVATE(QFxAnchors)
+ friend class QmlGraphicsItem;
+ Q_DISABLE_COPY(QmlGraphicsAnchors)
+ Q_DECLARE_PRIVATE(QmlGraphicsAnchors)
};
-Q_DECLARE_OPERATORS_FOR_FLAGS(QFxAnchors::UsedAnchors)
+Q_DECLARE_OPERATORS_FOR_FLAGS(QmlGraphicsAnchors::UsedAnchors)
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxAnchors)
+QML_DECLARE_TYPE(QmlGraphicsAnchors)
QT_END_HEADER
diff --git a/src/declarative/fx/qfxanchors_p.h b/src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h
index 9b1bc18..5f8b2c1 100644
--- a/src/declarative/fx/qfxanchors_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXANCHORS_P_H
-#define QFXANCHORS_P_H
+#ifndef QMLGRAPHICSANCHORS_P_H
+#define QMLGRAPHICSANCHORS_P_H
//
// W A R N I N G
@@ -53,15 +53,15 @@
// We mean it.
//
-#include "qfxanchors.h"
+#include "qmlgraphicsanchors_p.h"
#include "private/qobject_p.h"
QT_BEGIN_NAMESPACE
-class QFxAnchorLine
+class QmlGraphicsAnchorLine
{
public:
- QFxAnchorLine() : item(0), anchorLine(Invalid)
+ QmlGraphicsAnchorLine() : item(0), anchorLine(Invalid)
{
}
@@ -78,16 +78,16 @@ public:
Vertical_Mask = Top | Bottom | VCenter | Baseline
};
- QFxItem *item;
+ QmlGraphicsItem *item;
AnchorLine anchorLine;
};
-Q_DECLARE_METATYPE(QFxAnchorLine)
+Q_DECLARE_METATYPE(QmlGraphicsAnchorLine)
-class QFxAnchorsPrivate : public QObjectPrivate
+class QmlGraphicsAnchorsPrivate : public QObjectPrivate
{
- Q_DECLARE_PUBLIC(QFxAnchors)
+ Q_DECLARE_PUBLIC(QmlGraphicsAnchors)
public:
- QFxAnchorsPrivate()
+ QmlGraphicsAnchorsPrivate()
: updatingMe(false), updatingHorizontalAnchor(0),
updatingVerticalAnchor(0), item(0), usedAnchors(0), fill(0),
centerIn(0), leftMargin(0), rightMargin(0), topMargin(0),
@@ -100,10 +100,10 @@ public:
{
}
- void clearItem(QFxItem *);
+ void clearItem(QmlGraphicsItem *);
- void addDepend(QFxItem *);
- void remDepend(QFxItem *);
+ void addDepend(QmlGraphicsItem *);
+ void remDepend(QmlGraphicsItem *);
bool isItemComplete() const;
bool updatingMe;
@@ -118,32 +118,32 @@ public:
void updateOnComplete();
void updateMe();
- void update(QFxItem *, const QRectF &, const QRectF &);
+ void update(QmlGraphicsItem *, const QRectF &, const QRectF &);
bool checkHValid() const;
bool checkVValid() const;
- bool checkHAnchorValid(QFxAnchorLine anchor) const;
- bool checkVAnchorValid(QFxAnchorLine anchor) const;
- bool calcStretch(const QFxAnchorLine &edge1, const QFxAnchorLine &edge2, int offset1, int offset2, QFxAnchorLine::AnchorLine line, int &stretch);
+ bool checkHAnchorValid(QmlGraphicsAnchorLine anchor) const;
+ bool checkVAnchorValid(QmlGraphicsAnchorLine anchor) const;
+ bool calcStretch(const QmlGraphicsAnchorLine &edge1, const QmlGraphicsAnchorLine &edge2, int offset1, int offset2, QmlGraphicsAnchorLine::AnchorLine line, int &stretch);
void updateHorizontalAnchors();
void updateVerticalAnchors();
void fillChanged();
void centerInChanged();
- QFxItem *item;
- QFxAnchors::UsedAnchors usedAnchors;
+ QmlGraphicsItem *item;
+ QmlGraphicsAnchors::UsedAnchors usedAnchors;
- QFxItem *fill;
- QFxItem *centerIn;
+ QmlGraphicsItem *fill;
+ QmlGraphicsItem *centerIn;
- QFxAnchorLine left;
- QFxAnchorLine right;
- QFxAnchorLine top;
- QFxAnchorLine bottom;
- QFxAnchorLine vCenter;
- QFxAnchorLine hCenter;
- QFxAnchorLine baseline;
+ QmlGraphicsAnchorLine left;
+ QmlGraphicsAnchorLine right;
+ QmlGraphicsAnchorLine top;
+ QmlGraphicsAnchorLine bottom;
+ QmlGraphicsAnchorLine vCenter;
+ QmlGraphicsAnchorLine hCenter;
+ QmlGraphicsAnchorLine baseline;
qreal leftMargin;
qreal rightMargin;
diff --git a/src/declarative/fx/qfxborderimage.cpp b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
index f1574e5..ed39a2b 100644
--- a/src/declarative/fx/qfxborderimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxborderimage.h"
-#include "qfxborderimage_p.h"
+#include "qmlgraphicsborderimage_p.h"
+#include "qmlgraphicsborderimage_p_p.h"
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QFile>
@@ -48,10 +48,10 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,BorderImage,QFxBorderImage)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,BorderImage,QmlGraphicsBorderImage)
/*!
- \qmlclass BorderImage QFxBorderImage
+ \qmlclass BorderImage QmlGraphicsBorderImage
\brief The BorderImage element provides an image that can be used as a border.
\inherits Item
@@ -64,23 +64,23 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,BorderImage,QFxBorderImage)
/*!
\internal
- \class QFxBorderImage BorderImage
- \brief The QFxBorderImage class provides an image item that you can add to a QmlView.
+ \class QmlGraphicsBorderImage BorderImage
+ \brief The QmlGraphicsBorderImage class provides an image item that you can add to a QmlView.
*/
-QFxBorderImage::QFxBorderImage(QFxItem *parent)
- : QFxImageBase(*(new QFxBorderImagePrivate), parent)
+QmlGraphicsBorderImage::QmlGraphicsBorderImage(QmlGraphicsItem *parent)
+ : QmlGraphicsImageBase(*(new QmlGraphicsBorderImagePrivate), parent)
{
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
-QFxBorderImage::~QFxBorderImage()
+QmlGraphicsBorderImage::~QmlGraphicsBorderImage()
{
- Q_D(QFxBorderImage);
+ Q_D(QmlGraphicsBorderImage);
if (d->sciReply)
d->sciReply->deleteLater();
if (d->sciPendingPixmapCache)
- QFxPixmapCache::cancelGet(d->sciurl, this);
+ QmlGraphicsPixmapCache::cancelGet(d->sciurl, this);
}
/*!
\qmlproperty enum BorderImage::status
@@ -147,9 +147,9 @@ static QString toLocalFileOrQrc(const QUrl& url)
}
-void QFxBorderImage::setSource(const QUrl &url)
+void QmlGraphicsBorderImage::setSource(const QUrl &url)
{
- Q_D(QFxBorderImage);
+ Q_D(QmlGraphicsBorderImage);
//equality is fairly expensive, so we bypass for simple, common case
if ((d->url.isEmpty() == url.isEmpty()) && url == d->url)
return;
@@ -160,11 +160,11 @@ void QFxBorderImage::setSource(const QUrl &url)
}
if (d->pendingPixmapCache) {
- QFxPixmapCache::cancelGet(d->url, this);
+ QmlGraphicsPixmapCache::cancelGet(d->url, this);
d->pendingPixmapCache = false;
}
if (d->sciPendingPixmapCache) {
- QFxPixmapCache::cancelGet(d->sciurl, this);
+ QmlGraphicsPixmapCache::cancelGet(d->sciurl, this);
d->sciPendingPixmapCache = false;
}
@@ -193,7 +193,7 @@ void QFxBorderImage::setSource(const QUrl &url)
if (!lf.isEmpty()) {
QFile file(lf);
file.open(QIODevice::ReadOnly);
- setGridScaledImage(QFxGridScaledImage(&file));
+ setGridScaledImage(QmlGraphicsGridScaledImage(&file));
} else
#endif
{
@@ -203,7 +203,7 @@ void QFxBorderImage::setSource(const QUrl &url)
this, SLOT(sciRequestFinished()));
}
} else {
- QNetworkReply *reply = QFxPixmapCache::get(qmlEngine(this), d->url, &d->pix);
+ QNetworkReply *reply = QmlGraphicsPixmapCache::get(qmlEngine(this), d->url, &d->pix);
if (reply) {
d->pendingPixmapCache = true;
connect(reply, SIGNAL(finished()), this, SLOT(requestFinished()));
@@ -254,9 +254,9 @@ void QFxBorderImage::setSource(const QUrl &url)
\l {BorderImage::source}{.sci file}.
*/
-QFxScaleGrid *QFxBorderImage::border()
+QmlGraphicsScaleGrid *QmlGraphicsBorderImage::border()
{
- Q_D(QFxBorderImage);
+ Q_D(QmlGraphicsBorderImage);
return d->getScaleGrid();
}
@@ -272,15 +272,15 @@ QFxScaleGrid *QFxBorderImage::border()
\o Round - Like Repeat, but scales the images down to ensure that the last image is not cropped.
\endlist
*/
-QFxBorderImage::TileMode QFxBorderImage::horizontalTileMode() const
+QmlGraphicsBorderImage::TileMode QmlGraphicsBorderImage::horizontalTileMode() const
{
- Q_D(const QFxBorderImage);
+ Q_D(const QmlGraphicsBorderImage);
return d->horizontalTileMode;
}
-void QFxBorderImage::setHorizontalTileMode(TileMode t)
+void QmlGraphicsBorderImage::setHorizontalTileMode(TileMode t)
{
- Q_D(QFxBorderImage);
+ Q_D(QmlGraphicsBorderImage);
if (t != d->horizontalTileMode) {
d->horizontalTileMode = t;
emit horizontalTileModeChanged();
@@ -288,15 +288,15 @@ void QFxBorderImage::setHorizontalTileMode(TileMode t)
}
}
-QFxBorderImage::TileMode QFxBorderImage::verticalTileMode() const
+QmlGraphicsBorderImage::TileMode QmlGraphicsBorderImage::verticalTileMode() const
{
- Q_D(const QFxBorderImage);
+ Q_D(const QmlGraphicsBorderImage);
return d->verticalTileMode;
}
-void QFxBorderImage::setVerticalTileMode(TileMode t)
+void QmlGraphicsBorderImage::setVerticalTileMode(TileMode t)
{
- Q_D(QFxBorderImage);
+ Q_D(QmlGraphicsBorderImage);
if (t != d->verticalTileMode) {
d->verticalTileMode = t;
emit verticalTileModeChanged();
@@ -304,14 +304,14 @@ void QFxBorderImage::setVerticalTileMode(TileMode t)
}
}
-void QFxBorderImage::setGridScaledImage(const QFxGridScaledImage& sci)
+void QmlGraphicsBorderImage::setGridScaledImage(const QmlGraphicsGridScaledImage& sci)
{
- Q_D(QFxBorderImage);
+ Q_D(QmlGraphicsBorderImage);
if (!sci.isValid()) {
d->status = Error;
emit statusChanged(d->status);
} else {
- QFxScaleGrid *sg = border();
+ QmlGraphicsScaleGrid *sg = border();
sg->setTop(sci.gridTop());
sg->setBottom(sci.gridBottom());
sg->setLeft(sci.gridLeft());
@@ -320,7 +320,7 @@ void QFxBorderImage::setGridScaledImage(const QFxGridScaledImage& sci)
d->verticalTileMode = sci.verticalTileRule();
d->sciurl = d->url.resolved(QUrl(sci.pixmapUrl()));
- QNetworkReply *reply = QFxPixmapCache::get(qmlEngine(this), d->sciurl, &d->pix);
+ QNetworkReply *reply = QmlGraphicsPixmapCache::get(qmlEngine(this), d->sciurl, &d->pix);
if (reply) {
d->sciPendingPixmapCache = true;
connect(reply, SIGNAL(finished()), this, SLOT(requestFinished()));
@@ -342,16 +342,16 @@ void QFxBorderImage::setGridScaledImage(const QFxGridScaledImage& sci)
}
}
-void QFxBorderImage::requestFinished()
+void QmlGraphicsBorderImage::requestFinished()
{
- Q_D(QFxBorderImage);
+ Q_D(QmlGraphicsBorderImage);
if (d->url.path().endsWith(QLatin1String(".sci"))) {
d->sciPendingPixmapCache = false;
- QFxPixmapCache::find(d->sciurl, &d->pix);
+ QmlGraphicsPixmapCache::find(d->sciurl, &d->pix);
} else {
d->pendingPixmapCache = false;
- if (!QFxPixmapCache::find(d->url, &d->pix))
+ if (!QmlGraphicsPixmapCache::find(d->url, &d->pix))
d->status = Error;
}
setImplicitWidth(d->pix.width());
@@ -366,25 +366,25 @@ void QFxBorderImage::requestFinished()
update();
}
-void QFxBorderImage::sciRequestFinished()
+void QmlGraphicsBorderImage::sciRequestFinished()
{
- Q_D(QFxBorderImage);
+ Q_D(QmlGraphicsBorderImage);
if (d->sciReply->error() != QNetworkReply::NoError) {
d->status = Error;
d->sciReply->deleteLater();
d->sciReply = 0;
emit statusChanged(d->status);
} else {
- QFxGridScaledImage sci(d->sciReply);
+ QmlGraphicsGridScaledImage sci(d->sciReply);
d->sciReply->deleteLater();
d->sciReply = 0;
setGridScaledImage(sci);
}
}
-void QFxBorderImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+void QmlGraphicsBorderImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
- Q_D(QFxBorderImage);
+ Q_D(QmlGraphicsBorderImage);
if (d->pix.isNull())
return;
@@ -402,8 +402,8 @@ void QFxBorderImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidge
}
}
-QFxBorderImage::QFxBorderImage(QFxBorderImagePrivate &dd, QFxItem *parent)
- : QFxImageBase(dd, parent)
+QmlGraphicsBorderImage::QmlGraphicsBorderImage(QmlGraphicsBorderImagePrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsImageBase(dd, parent)
{
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
diff --git a/src/declarative/fx/qfxborderimage.h b/src/declarative/graphicsitems/qmlgraphicsborderimage_p.h
index 5bc1067..04850e6 100644
--- a/src/declarative/fx/qfxborderimage.h
+++ b/src/declarative/graphicsitems/qmlgraphicsborderimage_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,53 +21,52 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXBORDERIMAGE_H
-#define QFXBORDERIMAGE_H
+#ifndef QMLGRAPHICSBORDERIMAGE_H
+#define QMLGRAPHICSBORDERIMAGE_H
#include <QtNetwork/qnetworkreply.h>
-#include "qfximagebase.h"
+#include "qmlgraphicsimagebase_p.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxScaleGrid;
-class QFxGridScaledImage;
-class QFxBorderImagePrivate;
-class Q_DECLARATIVE_EXPORT QFxBorderImage : public QFxImageBase
+class QmlGraphicsScaleGrid;
+class QmlGraphicsGridScaledImage;
+class QmlGraphicsBorderImagePrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsBorderImage : public QmlGraphicsImageBase
{
Q_OBJECT
Q_ENUMS(TileMode)
- Q_PROPERTY(QFxScaleGrid *border READ border CONSTANT)
+ Q_PROPERTY(QmlGraphicsScaleGrid *border READ border CONSTANT)
Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged)
Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged)
public:
- QFxBorderImage(QFxItem *parent=0);
- ~QFxBorderImage();
+ QmlGraphicsBorderImage(QmlGraphicsItem *parent=0);
+ ~QmlGraphicsBorderImage();
- QFxScaleGrid *border();
+ QmlGraphicsScaleGrid *border();
enum TileMode { Stretch = Qt::StretchTile, Repeat = Qt::RepeatTile, Round = Qt::RoundTile };
@@ -84,22 +84,22 @@ Q_SIGNALS:
void verticalTileModeChanged();
protected:
- QFxBorderImage(QFxBorderImagePrivate &dd, QFxItem *parent);
+ QmlGraphicsBorderImage(QmlGraphicsBorderImagePrivate &dd, QmlGraphicsItem *parent);
private:
- void setGridScaledImage(const QFxGridScaledImage& sci);
+ void setGridScaledImage(const QmlGraphicsGridScaledImage& sci);
private Q_SLOTS:
void requestFinished();
void sciRequestFinished();
private:
- Q_DISABLE_COPY(QFxBorderImage)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxBorderImage)
+ Q_DISABLE_COPY(QmlGraphicsBorderImage)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsBorderImage)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxBorderImage)
+QML_DECLARE_TYPE(QmlGraphicsBorderImage)
QT_END_HEADER
-#endif // QFXBORDERIMAGE_H
+#endif // QMLGRAPHICSBORDERIMAGE_H
diff --git a/src/declarative/graphicsitems/qmlgraphicsborderimage_p_p.h b/src/declarative/graphicsitems/qmlgraphicsborderimage_p_p.h
new file mode 100644
index 0000000..51ebb02
--- /dev/null
+++ b/src/declarative/graphicsitems/qmlgraphicsborderimage_p_p.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMLGRAPHICSBORDERIMAGE_P_H
+#define QMLGRAPHICSBORDERIMAGE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qmlgraphicsimagebase_p_p.h"
+#include "qmlgraphicsscalegrid_p_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QNetworkReply;
+class QmlGraphicsBorderImagePrivate : public QmlGraphicsImageBasePrivate
+{
+ Q_DECLARE_PUBLIC(QmlGraphicsBorderImage)
+
+public:
+ QmlGraphicsBorderImagePrivate()
+ : border(0), sciReply(0),
+ sciPendingPixmapCache(false),
+ horizontalTileMode(QmlGraphicsBorderImage::Stretch),
+ verticalTileMode(QmlGraphicsBorderImage::Stretch)
+ {
+ }
+
+ ~QmlGraphicsBorderImagePrivate()
+ {
+ }
+
+ QmlGraphicsScaleGrid *getScaleGrid()
+ {
+ Q_Q(QmlGraphicsBorderImage);
+ if (!border)
+ border = new QmlGraphicsScaleGrid(q);
+ return border;
+ }
+
+ QmlGraphicsScaleGrid *border;
+ QUrl sciurl;
+ QNetworkReply *sciReply;
+ bool sciPendingPixmapCache;
+ QmlGraphicsBorderImage::TileMode horizontalTileMode;
+ QmlGraphicsBorderImage::TileMode verticalTileMode;
+};
+
+QT_END_NAMESPACE
+
+#endif // QMLGRAPHICSBORDERIMAGE_P_H
diff --git a/src/declarative/fx/qfxeffects.cpp b/src/declarative/graphicsitems/qmlgraphicseffects.cpp
index ebdd880..c611eea 100644
--- a/src/declarative/fx/qfxeffects.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicseffects.cpp
@@ -1,5 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
#include <qml.h>
-#include <qfxglobal.h>
#include <QtGui/qgraphicseffect.h>
QML_DECLARE_TYPE(QGraphicsEffect)
@@ -9,7 +48,7 @@ QML_DECLARE_TYPE(QGraphicsBlurEffect)
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Blur,QGraphicsBlurEffect)
/*!
- \qmlclass Blur
+ \qmlclass Blur QGraphicsBlurEffect
\brief The Blur object provides a blur effect.
A blur effect blurs the source item. This effect is useful for reducing details,
@@ -46,7 +85,7 @@ QML_DECLARE_TYPE(QGraphicsGrayscaleEffect)
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Grayscale,QGraphicsGrayscaleEffect)
/*!
- \qmlclass Grayscale
+ \qmlclass Grayscale QGraphicsGrayscaleEffect
\brief The Grayscale object provides a grayscale effect.
A grayscale effect renders the source item in shades of gray.
@@ -65,7 +104,7 @@ QML_DECLARE_TYPE(QGraphicsColorizeEffect)
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Colorize,QGraphicsColorizeEffect)
/*!
- \qmlclass Colorize
+ \qmlclass Colorize QGraphicsColorizeEffect
\brief The Colorize object provides a colorize effect.
A colorize effect renders the source item with a tint of its color.
@@ -93,7 +132,7 @@ QML_DECLARE_TYPE(QGraphicsPixelizeEffect)
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Pixelize,QGraphicsPixelizeEffect)
/*!
- \qmlclass Pixelize
+ \qmlclass Pixelize QGraphicsPixelizeEffect
\brief The Pixelize object provides a pixelize effect.
A pixelize effect renders the source item in lower resolution. The resolution
@@ -119,7 +158,7 @@ QML_DECLARE_TYPE(QGraphicsDropShadowEffect)
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,DropShadow,QGraphicsDropShadowEffect)
/*!
- \qmlclass DropShadow
+ \qmlclass DropShadow QGraphicsDropShadowEffect
\brief The DropShadow object provides a drop shadow effect.
A drop shadow effect renders the source item with a drop shadow. The color of
@@ -162,7 +201,7 @@ QML_DECLARE_TYPE(QGraphicsOpacityEffect)
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Opacity,QGraphicsOpacityEffect)
/*!
- \qmlclass Opacity
+ \qmlclass Opacity QGraphicsOpacityEffect
\brief The Opacity object provides an opacity effect.
An opacity effect renders the source with an opacity. This effect is useful
@@ -188,7 +227,7 @@ QML_DECLARE_TYPE(QGraphicsBloomEffect)
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Bloom,QGraphicsBloomEffect)
/*!
- \qmlclass Bloom
+ \qmlclass Bloom QGraphicsBloomEffect
\brief The Bloom object provides a bloom/glow effect.
A bloom/glow effect adds fringes of light around bright areas in the source item.
diff --git a/src/declarative/fx/qfxevents.cpp b/src/declarative/graphicsitems/qmlgraphicsevents.cpp
index 43f0dd7..9958dea 100644
--- a/src/declarative/fx/qfxevents.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsevents.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,30 +21,29 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxevents_p.h"
+#include "qmlgraphicsevents_p_p.h"
QT_BEGIN_NAMESPACE
/*!
- \qmlclass KeyEvent QFxKeyEvent
+ \qmlclass KeyEvent QmlGraphicsKeyEvent
\brief The KeyEvent object provides information about a key event.
For example, the following changes the Item's state property when the Enter
@@ -58,7 +58,7 @@ Item {
/*!
\internal
- \class QFxKeyEvent
+ \class QmlGraphicsKeyEvent
*/
/*!
@@ -112,7 +112,7 @@ Item {
/*!
- \qmlclass MouseEvent QFxMouseEvent
+ \qmlclass MouseEvent QmlGraphicsMouseEvent
\brief The MouseEvent object provides information about a mouse event.
The position of the mouse can be found via the x and y properties.
@@ -121,7 +121,7 @@ Item {
/*!
\internal
- \class QFxMouseEvent
+ \class QmlGraphicsMouseEvent
*/
/*!
@@ -189,7 +189,7 @@ MouseRegion {
\endqml
*/
-QML_DEFINE_NOCREATE_TYPE(QFxKeyEvent)
-QML_DEFINE_NOCREATE_TYPE(QFxMouseEvent)
+QML_DEFINE_NOCREATE_TYPE(QmlGraphicsKeyEvent)
+QML_DEFINE_NOCREATE_TYPE(QmlGraphicsMouseEvent)
QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxevents_p.h b/src/declarative/graphicsitems/qmlgraphicsevents_p_p.h
index 7b0c24c..9cab18e 100644
--- a/src/declarative/fx/qfxevents_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsevents_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXEVENTS_P_H
-#define QFXEVENTS_P_H
+#ifndef QMLGRAPHICSEVENTS_P_H
+#define QMLGRAPHICSEVENTS_P_H
//
// W A R N I N G
@@ -53,14 +53,13 @@
// We mean it.
//
-#include <QtDeclarative/qfxglobal.h>
#include <QtDeclarative/qml.h>
#include <QtCore/qobject.h>
#include <QtGui/qevent.h>
QT_BEGIN_NAMESPACE
-class QFxKeyEvent : public QObject
+class QmlGraphicsKeyEvent : public QObject
{
Q_OBJECT
Q_PROPERTY(int key READ key)
@@ -71,9 +70,9 @@ class QFxKeyEvent : public QObject
Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted)
public:
- QFxKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString &text=QString(), bool autorep=false, ushort count=1)
+ QmlGraphicsKeyEvent(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); }
- QFxKeyEvent(const QKeyEvent &ke)
+ QmlGraphicsKeyEvent(const QKeyEvent &ke)
: event(ke) { event.setAccepted(false); }
int key() const { return event.key(); }
@@ -89,7 +88,7 @@ private:
QKeyEvent event;
};
-class QFxMouseEvent : public QObject
+class QmlGraphicsMouseEvent : public QObject
{
Q_OBJECT
Q_PROPERTY(int x READ x)
@@ -102,7 +101,7 @@ class QFxMouseEvent : public QObject
Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted)
public:
- QFxMouseEvent(int x, int y, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers
+ QmlGraphicsMouseEvent(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) {}
@@ -131,7 +130,7 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxKeyEvent)
-QML_DECLARE_TYPE(QFxMouseEvent)
+QML_DECLARE_TYPE(QmlGraphicsKeyEvent)
+QML_DECLARE_TYPE(QmlGraphicsMouseEvent)
-#endif // QFXEVENTS_P_H
+#endif // QMLGRAPHICSEVENTS_P_H
diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/graphicsitems/qmlgraphicsflickable.cpp
index 659193d..8895977 100644
--- a/src/declarative/fx/qfxflickable.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsflickable.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxflickable.h"
-#include "qfxflickable_p.h"
+#include "qmlgraphicsflickable_p.h"
+#include "qmlgraphicsflickable_p_p.h"
#include <QGraphicsSceneMouseEvent>
#include <QPointer>
@@ -60,7 +60,7 @@ static const int FlickThreshold = 20;
// Really slow flicks can be annoying.
static const int minimumFlickVelocity = 200;
-class QFxFlickableVisibleArea : public QObject
+class QmlGraphicsFlickableVisibleArea : public QObject
{
Q_OBJECT
@@ -70,7 +70,7 @@ class QFxFlickableVisibleArea : public QObject
Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY pageChanged)
public:
- QFxFlickableVisibleArea(QFxFlickable *parent=0);
+ QmlGraphicsFlickableVisibleArea(QmlGraphicsFlickable *parent=0);
qreal xPosition() const;
qreal widthRatio() const;
@@ -83,42 +83,42 @@ signals:
void pageChanged();
private:
- QFxFlickable *flickable;
+ QmlGraphicsFlickable *flickable;
qreal m_xPosition;
qreal m_widthRatio;
qreal m_yPosition;
qreal m_heightRatio;
};
-QFxFlickableVisibleArea::QFxFlickableVisibleArea(QFxFlickable *parent)
+QmlGraphicsFlickableVisibleArea::QmlGraphicsFlickableVisibleArea(QmlGraphicsFlickable *parent)
: QObject(parent), flickable(parent), m_xPosition(0.), m_widthRatio(0.)
, m_yPosition(0.), m_heightRatio(0.)
{
}
-qreal QFxFlickableVisibleArea::widthRatio() const
+qreal QmlGraphicsFlickableVisibleArea::widthRatio() const
{
return m_widthRatio;
}
-qreal QFxFlickableVisibleArea::xPosition() const
+qreal QmlGraphicsFlickableVisibleArea::xPosition() const
{
return m_xPosition;
}
-qreal QFxFlickableVisibleArea::heightRatio() const
+qreal QmlGraphicsFlickableVisibleArea::heightRatio() const
{
return m_heightRatio;
}
-qreal QFxFlickableVisibleArea::yPosition() const
+qreal QmlGraphicsFlickableVisibleArea::yPosition() const
{
return m_yPosition;
}
-void QFxFlickableVisibleArea::updateVisible()
+void QmlGraphicsFlickableVisibleArea::updateVisible()
{
- QFxFlickablePrivate *p = static_cast<QFxFlickablePrivate *>(QGraphicsItemPrivate::get(flickable));
+ QmlGraphicsFlickablePrivate *p = static_cast<QmlGraphicsFlickablePrivate *>(QGraphicsItemPrivate::get(flickable));
bool pageChange = false;
// Vertical
@@ -155,21 +155,21 @@ void QFxFlickableVisibleArea::updateVisible()
}
-QFxFlickablePrivate::QFxFlickablePrivate()
- : viewport(new QFxItem), _moveX(viewport, &QFxItem::setX), _moveY(viewport, &QFxItem::setY)
+QmlGraphicsFlickablePrivate::QmlGraphicsFlickablePrivate()
+ : viewport(new QmlGraphicsItem), _moveX(viewport, &QmlGraphicsItem::setX), _moveY(viewport, &QmlGraphicsItem::setY)
, vWidth(-1), vHeight(-1), overShoot(true), flicked(false), moving(false), stealMouse(false)
, pressed(false), atXEnd(false), atXBeginning(true), atYEnd(false), atYBeginning(true)
, interactive(true), deceleration(500), maxVelocity(5000), reportedVelocitySmoothing(100)
, delayedPressEvent(0), delayedPressTarget(0), pressDelay(0)
, horizontalVelocity(this), verticalVelocity(this), vTime(0), visibleArea(0)
{
- fixupXEvent = QmlTimeLineEvent::timeLineEvent<QFxFlickablePrivate, &QFxFlickablePrivate::fixupX>(&_moveX, this);
- fixupYEvent = QmlTimeLineEvent::timeLineEvent<QFxFlickablePrivate, &QFxFlickablePrivate::fixupY>(&_moveY, this);
+ fixupXEvent = QmlTimeLineEvent::timeLineEvent<QmlGraphicsFlickablePrivate, &QmlGraphicsFlickablePrivate::fixupX>(&_moveX, this);
+ fixupYEvent = QmlTimeLineEvent::timeLineEvent<QmlGraphicsFlickablePrivate, &QmlGraphicsFlickablePrivate::fixupY>(&_moveY, this);
}
-void QFxFlickablePrivate::init()
+void QmlGraphicsFlickablePrivate::init()
{
- Q_Q(QFxFlickable);
+ Q_Q(QmlGraphicsFlickable);
viewport->setParent(q);
QObject::connect(&timeline, SIGNAL(updated()), q, SLOT(ticked()));
QObject::connect(&timeline, SIGNAL(completed()), q, SLOT(movementEnding()));
@@ -181,9 +181,9 @@ void QFxFlickablePrivate::init()
QObject::connect(q, SIGNAL(widthChanged()), q, SLOT(widthChange()));
}
-void QFxFlickablePrivate::flickX(qreal velocity)
+void QmlGraphicsFlickablePrivate::flickX(qreal velocity)
{
- Q_Q(QFxFlickable);
+ Q_Q(QmlGraphicsFlickable);
qreal maxDistance = -1;
if (qAbs(velocity) < minimumFlickVelocity) // Minimum velocity to avoid annoyingly slow flicks.
velocity = velocity < 0 ? -minimumFlickVelocity : minimumFlickVelocity;
@@ -219,9 +219,9 @@ void QFxFlickablePrivate::flickX(qreal velocity)
}
}
-void QFxFlickablePrivate::flickY(qreal velocity)
+void QmlGraphicsFlickablePrivate::flickY(qreal velocity)
{
- Q_Q(QFxFlickable);
+ Q_Q(QmlGraphicsFlickable);
qreal maxDistance = -1;
// -ve velocity means list is moving up
if (velocity > 0) {
@@ -255,9 +255,9 @@ void QFxFlickablePrivate::flickY(qreal velocity)
}
}
-void QFxFlickablePrivate::fixupX()
+void QmlGraphicsFlickablePrivate::fixupX()
{
- Q_Q(QFxFlickable);
+ Q_Q(QmlGraphicsFlickable);
if (!q->xflick() || _moveX.timeLine())
return;
@@ -277,9 +277,9 @@ void QFxFlickablePrivate::fixupX()
}
}
-void QFxFlickablePrivate::fixupY()
+void QmlGraphicsFlickablePrivate::fixupY()
{
- Q_Q(QFxFlickable);
+ Q_Q(QmlGraphicsFlickable);
if (!q->yflick() || _moveY.timeLine())
return;
@@ -299,9 +299,9 @@ void QFxFlickablePrivate::fixupY()
}
}
-void QFxFlickablePrivate::updateBeginningEnd()
+void QmlGraphicsFlickablePrivate::updateBeginningEnd()
{
- Q_Q(QFxFlickable);
+ Q_Q(QmlGraphicsFlickable);
bool atBoundaryChange = false;
// Vertical
@@ -341,10 +341,10 @@ void QFxFlickablePrivate::updateBeginningEnd()
visibleArea->updateVisible();
}
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Flickable,QFxFlickable)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Flickable,QmlGraphicsFlickable)
/*!
- \qmlclass Flickable
+ \qmlclass Flickable QFxFlickable
\brief The Flickable item provides a surface that can be "flicked".
\inherits Item
@@ -369,12 +369,12 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Flickable,QFxFlickable)
/*!
\internal
- \class QFxFlickable
- \brief The QFxFlickable class provides a view that can be "flicked".
+ \class QmlGraphicsFlickable
+ \brief The QmlGraphicsFlickable class provides a view that can be "flicked".
\ingroup group_widgets
- QFxFlickable allows its children to be dragged and flicked.
+ QmlGraphicsFlickable allows its children to be dragged and flicked.
\code
Flickable {
@@ -383,8 +383,8 @@ Flickable {
}
\endcode
- Note that QFxFlickable does not automatically clip its contents. If
- it is not full-screen it is likely that QFxItem::clip should be set
+ Note that QmlGraphicsFlickable does not automatically clip its contents. If
+ it is not full-screen it is likely that QmlGraphicsItem::clip should be set
to true.
*/
@@ -410,21 +410,21 @@ Flickable {
\endcode
*/
-QFxFlickable::QFxFlickable(QFxItem *parent)
- : QFxItem(*(new QFxFlickablePrivate), parent)
+QmlGraphicsFlickable::QmlGraphicsFlickable(QmlGraphicsItem *parent)
+ : QmlGraphicsItem(*(new QmlGraphicsFlickablePrivate), parent)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
d->init();
}
-QFxFlickable::QFxFlickable(QFxFlickablePrivate &dd, QFxItem *parent)
- : QFxItem(dd, parent)
+QmlGraphicsFlickable::QmlGraphicsFlickable(QmlGraphicsFlickablePrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsItem(dd, parent)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
d->init();
}
-QFxFlickable::~QFxFlickable()
+QmlGraphicsFlickable::~QmlGraphicsFlickable()
{
}
@@ -436,15 +436,15 @@ QFxFlickable::~QFxFlickable()
corner of the Flickable. For example, if you flick an image up 100 pixels,
\c yPosition will be 100.
*/
-qreal QFxFlickable::viewportX() const
+qreal QmlGraphicsFlickable::viewportX() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return -d->_moveX.value();
}
-void QFxFlickable::setViewportX(qreal pos)
+void QmlGraphicsFlickable::setViewportX(qreal pos)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
pos = qRound(pos);
d->timeline.reset(d->_moveX);
if (-pos != d->_moveX.value()) {
@@ -453,15 +453,15 @@ void QFxFlickable::setViewportX(qreal pos)
}
}
-qreal QFxFlickable::viewportY() const
+qreal QmlGraphicsFlickable::viewportY() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return -d->_moveY.value();
}
-void QFxFlickable::setViewportY(qreal pos)
+void QmlGraphicsFlickable::setViewportY(qreal pos)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
pos = qRound(pos);
d->timeline.reset(d->_moveY);
if (-pos != d->_moveY.value()) {
@@ -479,15 +479,15 @@ void QFxFlickable::setViewportY(qreal pos)
special interaction with Flickable's children: for example, you might want to
freeze a flickable map while viewing detailed information on a location popup that is a child of the Flickable.
*/
-bool QFxFlickable::isInteractive() const
+bool QmlGraphicsFlickable::isInteractive() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->interactive;
}
-void QFxFlickable::setInteractive(bool interactive)
+void QmlGraphicsFlickable::setInteractive(bool interactive)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
d->interactive = interactive;
if (!interactive && d->flicked) {
d->timeline.clear();
@@ -507,15 +507,15 @@ void QFxFlickable::setInteractive(bool interactive)
The reported velocity is smoothed to avoid erratic output.
reportedVelocitySmoothing determines how much smoothing is applied.
*/
-qreal QFxFlickable::horizontalVelocity() const
+qreal QmlGraphicsFlickable::horizontalVelocity() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->horizontalVelocity.value();
}
-qreal QFxFlickable::verticalVelocity() const
+qreal QmlGraphicsFlickable::verticalVelocity() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->verticalVelocity.value();
}
@@ -528,62 +528,62 @@ qreal QFxFlickable::verticalVelocity() const
These properties are true if the flickable view is positioned at the beginning,
or end respecively.
*/
-bool QFxFlickable::isAtXEnd() const
+bool QmlGraphicsFlickable::isAtXEnd() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->atXEnd;
}
-bool QFxFlickable::isAtXBeginning() const
+bool QmlGraphicsFlickable::isAtXBeginning() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->atXBeginning;
}
-bool QFxFlickable::isAtYEnd() const
+bool QmlGraphicsFlickable::isAtYEnd() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->atYEnd;
}
-bool QFxFlickable::isAtYBeginning() const
+bool QmlGraphicsFlickable::isAtYBeginning() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->atYBeginning;
}
-void QFxFlickable::ticked()
+void QmlGraphicsFlickable::ticked()
{
viewportMoved();
}
-QFxItem *QFxFlickable::viewport()
+QmlGraphicsItem *QmlGraphicsFlickable::viewport()
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
return d->viewport;
}
-qreal QFxFlickable::visibleX() const
+qreal QmlGraphicsFlickable::visibleX() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return -d->_moveX.value();
}
-qreal QFxFlickable::visibleY() const
+qreal QmlGraphicsFlickable::visibleY() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return -d->_moveY.value();
}
-QFxFlickableVisibleArea *QFxFlickable::visibleArea()
+QmlGraphicsFlickableVisibleArea *QmlGraphicsFlickable::visibleArea()
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
if (!d->visibleArea)
- d->visibleArea = new QFxFlickableVisibleArea(this);
+ d->visibleArea = new QmlGraphicsFlickableVisibleArea(this);
return d->visibleArea;
}
-void QFxFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event)
{
if (interactive && timeline.isActive() && (qAbs(velocityX) > 10 || qAbs(velocityY) > 10))
stealMouse = true; // If we've been flicked then steal the click.
@@ -594,18 +594,18 @@ void QFxFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event)
velocityX = 0;
velocityY = 0;
lastPos = QPoint();
- QFxItemPrivate::start(lastPosTime);
+ QmlGraphicsItemPrivate::start(lastPosTime);
pressPos = event->pos();
pressX = _moveX.value();
pressY = _moveY.value();
flicked = false;
- QFxItemPrivate::start(pressTime);
- QFxItemPrivate::start(velocityTime);
+ QmlGraphicsItemPrivate::start(pressTime);
+ QmlGraphicsItemPrivate::start(velocityTime);
}
-void QFxFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
- Q_Q(QFxFlickable);
+ Q_Q(QmlGraphicsFlickable);
if (!interactive || lastPosTime.isNull())
return;
bool rejectY = false;
@@ -614,7 +614,7 @@ void QFxFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event)
if (q->yflick()) {
int dy = int(event->pos().y() - pressPos.y());
- if (qAbs(dy) > DragThreshold || QFxItemPrivate::elapsed(pressTime) > 200) {
+ if (qAbs(dy) > DragThreshold || QmlGraphicsItemPrivate::elapsed(pressTime) > 200) {
qreal newY = dy + pressY;
const qreal minY = q->minYExtent();
const qreal maxY = q->maxYExtent();
@@ -641,7 +641,7 @@ void QFxFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event)
if (q->xflick()) {
int dx = int(event->pos().x() - pressPos.x());
- if (qAbs(dx) > DragThreshold || QFxItemPrivate::elapsed(pressTime) > 200) {
+ if (qAbs(dx) > DragThreshold || QmlGraphicsItemPrivate::elapsed(pressTime) > 200) {
qreal newX = dx + pressX;
const qreal minX = q->minXExtent();
const qreal maxX = q->maxXExtent();
@@ -668,7 +668,7 @@ void QFxFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
if (!lastPos.isNull()) {
- qreal elapsed = qreal(QFxItemPrivate::restart(lastPosTime)) / 1000.;
+ qreal elapsed = qreal(QmlGraphicsItemPrivate::restart(lastPosTime)) / 1000.;
if (elapsed <= 0)
elapsed = 1;
if (q->yflick()) {
@@ -697,14 +697,14 @@ void QFxFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event)
lastPos = event->pos();
}
-void QFxFlickablePrivate::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsFlickablePrivate::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
- Q_Q(QFxFlickable);
+ Q_Q(QmlGraphicsFlickable);
pressed = false;
if (lastPosTime.isNull())
return;
- if (QFxItemPrivate::elapsed(lastPosTime) > 100) {
+ if (QmlGraphicsItemPrivate::elapsed(lastPosTime) > 100) {
// if we drag then pause before release we should not cause a flick.
velocityX = 0.0;
velocityY = 0.0;
@@ -736,32 +736,32 @@ void QFxFlickablePrivate::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *even
q->movementEnding();
}
-void QFxFlickable::mousePressEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsFlickable::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
d->handleMousePressEvent(event);
event->accept();
}
-void QFxFlickable::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsFlickable::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
d->handleMouseMoveEvent(event);
event->accept();
}
-void QFxFlickable::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsFlickable::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
d->clearDelayedPress();
d->handleMouseReleaseEvent(event);
event->accept();
ungrabMouse();
}
-void QFxFlickablePrivate::captureDelayedPress(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsFlickablePrivate::captureDelayedPress(QGraphicsSceneMouseEvent *event)
{
- Q_Q(QFxFlickable);
+ Q_Q(QmlGraphicsFlickable);
if (!q->scene() || pressDelay <= 0)
return;
delayedPressTarget = q->scene()->mouseGrabberItem();
@@ -787,7 +787,7 @@ void QFxFlickablePrivate::captureDelayedPress(QGraphicsSceneMouseEvent *event)
delayedPressTimer.start(pressDelay, q);
}
-void QFxFlickablePrivate::clearDelayedPress()
+void QmlGraphicsFlickablePrivate::clearDelayedPress()
{
if (delayedPressEvent) {
delayedPressTimer.stop();
@@ -796,13 +796,13 @@ void QFxFlickablePrivate::clearDelayedPress()
}
}
-void QFxFlickable::timerEvent(QTimerEvent *event)
+void QmlGraphicsFlickable::timerEvent(QTimerEvent *event)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
if (event->timerId() == d->delayedPressTimer.timerId()) {
d->delayedPressTimer.stop();
if (d->delayedPressEvent) {
- QFxItem *grabber = scene() ? qobject_cast<QFxItem*>(scene()->mouseGrabberItem()) : 0;
+ QmlGraphicsItem *grabber = scene() ? qobject_cast<QmlGraphicsItem*>(scene()->mouseGrabberItem()) : 0;
if (!grabber || grabber != this)
scene()->sendEvent(d->delayedPressTarget, d->delayedPressEvent);
delete d->delayedPressEvent;
@@ -811,32 +811,32 @@ void QFxFlickable::timerEvent(QTimerEvent *event)
}
}
-qreal QFxFlickable::minYExtent() const
+qreal QmlGraphicsFlickable::minYExtent() const
{
return 0.0;
}
-qreal QFxFlickable::minXExtent() const
+qreal QmlGraphicsFlickable::minXExtent() const
{
return 0.0;
}
/* returns -ve */
-qreal QFxFlickable::maxXExtent() const
+qreal QmlGraphicsFlickable::maxXExtent() const
{
return width() - vWidth();
}
/* returns -ve */
-qreal QFxFlickable::maxYExtent() const
+qreal QmlGraphicsFlickable::maxYExtent() const
{
return height() - vHeight();
}
-void QFxFlickable::viewportMoved()
+void QmlGraphicsFlickable::viewportMoved()
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
- int elapsed = QFxItemPrivate::elapsed(d->velocityTime);
+ int elapsed = QmlGraphicsItemPrivate::elapsed(d->velocityTime);
if (elapsed) {
qreal prevY = d->lastFlickablePosition.x();
@@ -861,7 +861,7 @@ void QFxFlickable::viewportMoved()
}
d->lastFlickablePosition = QPointF(d->_moveY.value(), d->_moveX.value());
- QFxItemPrivate::restart(d->velocityTime);
+ QmlGraphicsItemPrivate::restart(d->velocityTime);
d->updateBeginningEnd();
if (d->flicked) {
@@ -889,53 +889,61 @@ void QFxFlickable::viewportMoved()
}
}
-void QFxFlickablePrivate::data_removeAt(int)
+void QmlGraphicsFlickable::cancelFlick()
+{
+ Q_D(QmlGraphicsFlickable);
+ d->timeline.reset(d->_moveX);
+ d->timeline.reset(d->_moveY);
+ movementEnding();
+}
+
+void QmlGraphicsFlickablePrivate::data_removeAt(int)
{
// ###
}
-int QFxFlickablePrivate::data_count() const
+int QmlGraphicsFlickablePrivate::data_count() const
{
// ###
return 0;
}
-void QFxFlickablePrivate::data_append(QObject *o)
+void QmlGraphicsFlickablePrivate::data_append(QObject *o)
{
- Q_Q(QFxFlickable);
- QFxItem *i = qobject_cast<QFxItem *>(o);
+ Q_Q(QmlGraphicsFlickable);
+ QmlGraphicsItem *i = qobject_cast<QmlGraphicsItem *>(o);
if (i)
viewport->fxChildren()->append(i);
else
o->setParent(q);
}
-void QFxFlickablePrivate::data_insert(int, QObject *)
+void QmlGraphicsFlickablePrivate::data_insert(int, QObject *)
{
// ###
}
-QObject *QFxFlickablePrivate::data_at(int) const
+QObject *QmlGraphicsFlickablePrivate::data_at(int) const
{
// ###
return 0;
}
-void QFxFlickablePrivate::data_clear()
+void QmlGraphicsFlickablePrivate::data_clear()
{
// ###
}
-QmlList<QObject *> *QFxFlickable::flickableData()
+QmlList<QObject *> *QmlGraphicsFlickable::flickableData()
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
return &d->data;
}
-QmlList<QFxItem *> *QFxFlickable::flickableChildren()
+QmlList<QmlGraphicsItem *> *QmlGraphicsFlickable::flickableChildren()
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
return d->viewport->fxChildren();
}
@@ -949,15 +957,15 @@ QmlList<QFxItem *> *QFxFlickable::flickableChildren()
the feeling that the edges of the view are soft, rather than a hard
physical boundary.
*/
-bool QFxFlickable::overShoot() const
+bool QmlGraphicsFlickable::overShoot() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->overShoot;
}
-void QFxFlickable::setOverShoot(bool o)
+void QmlGraphicsFlickable::setOverShoot(bool o)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
d->overShoot = o;
}
@@ -975,15 +983,15 @@ void QFxFlickable::setOverShoot(bool o)
}
\endcode
*/
-qreal QFxFlickable::viewportWidth() const
+qreal QmlGraphicsFlickable::viewportWidth() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->vWidth;
}
-void QFxFlickable::setViewportWidth(qreal w)
+void QmlGraphicsFlickable::setViewportWidth(qreal w)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
if (d->vWidth == w)
return;
d->vWidth = w;
@@ -998,9 +1006,9 @@ void QFxFlickable::setViewportWidth(qreal w)
d->updateBeginningEnd();
}
-void QFxFlickable::widthChange()
+void QmlGraphicsFlickable::widthChange()
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
if (d->vWidth < 0) {
d->viewport->setWidth(width());
emit viewportWidthChanged();
@@ -1008,9 +1016,9 @@ void QFxFlickable::widthChange()
d->updateBeginningEnd();
}
-void QFxFlickable::heightChange()
+void QmlGraphicsFlickable::heightChange()
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
if (d->vHeight < 0) {
d->viewport->setHeight(height());
emit viewportHeightChanged();
@@ -1018,15 +1026,15 @@ void QFxFlickable::heightChange()
d->updateBeginningEnd();
}
-qreal QFxFlickable::viewportHeight() const
+qreal QmlGraphicsFlickable::viewportHeight() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->vHeight;
}
-void QFxFlickable::setViewportHeight(qreal h)
+void QmlGraphicsFlickable::setViewportHeight(qreal h)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
if (d->vHeight == h)
return;
d->vHeight = h;
@@ -1041,42 +1049,42 @@ void QFxFlickable::setViewportHeight(qreal h)
d->updateBeginningEnd();
}
-qreal QFxFlickable::vWidth() const
+qreal QmlGraphicsFlickable::vWidth() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
if (d->vWidth < 0)
return width();
else
return d->vWidth;
}
-qreal QFxFlickable::vHeight() const
+qreal QmlGraphicsFlickable::vHeight() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
if (d->vHeight < 0)
return height();
else
return d->vHeight;
}
-bool QFxFlickable::xflick() const
+bool QmlGraphicsFlickable::xflick() const
{
return vWidth() != width();
}
-bool QFxFlickable::yflick() const
+bool QmlGraphicsFlickable::yflick() const
{
return vHeight() != height();
}
-bool QFxFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
+bool QmlGraphicsFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
QGraphicsSceneMouseEvent mouseEvent(event->type());
QRectF myRect = mapToScene(QRectF(0, 0, width(), height())).boundingRect();
QGraphicsScene *s = scene();
- QFxItem *grabber = s ? qobject_cast<QFxItem*>(s->mouseGrabberItem()) : 0;
+ QmlGraphicsItem *grabber = s ? qobject_cast<QmlGraphicsItem*>(s->mouseGrabberItem()) : 0;
if ((d->stealMouse || myRect.contains(event->scenePos().toPoint())) && (!grabber || !grabber->keepMouseGrab())) {
mouseEvent.setAccepted(false);
for (int i = 0x1; i <= 0x10; i <<= 1) {
@@ -1111,7 +1119,7 @@ bool QFxFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
default:
break;
}
- grabber = qobject_cast<QFxItem*>(s->mouseGrabberItem());
+ grabber = qobject_cast<QmlGraphicsItem*>(s->mouseGrabberItem());
if (grabber && d->stealMouse && !grabber->keepMouseGrab() && grabber != this) {
d->clearDelayedPress();
grabMouse();
@@ -1126,10 +1134,10 @@ bool QFxFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
return false;
}
-bool QFxFlickable::sceneEventFilter(QGraphicsItem *i, QEvent *e)
+bool QmlGraphicsFlickable::sceneEventFilter(QGraphicsItem *i, QEvent *e)
{
if (!isVisible())
- return QFxItem::sceneEventFilter(i, e);
+ return QmlGraphicsItem::sceneEventFilter(i, e);
switch (e->type()) {
case QEvent::GraphicsSceneMousePress:
case QEvent::GraphicsSceneMouseMove:
@@ -1139,7 +1147,7 @@ bool QFxFlickable::sceneEventFilter(QGraphicsItem *i, QEvent *e)
break;
}
- return QFxItem::sceneEventFilter(i, e);
+ return QmlGraphicsItem::sceneEventFilter(i, e);
}
/*!
@@ -1148,15 +1156,15 @@ bool QFxFlickable::sceneEventFilter(QGraphicsItem *i, QEvent *e)
The default is 5000 pixels/s
*/
-qreal QFxFlickable::maximumFlickVelocity() const
+qreal QmlGraphicsFlickable::maximumFlickVelocity() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->maxVelocity;
}
-void QFxFlickable::setMaximumFlickVelocity(qreal v)
+void QmlGraphicsFlickable::setMaximumFlickVelocity(qreal v)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
if (v == d->maxVelocity)
return;
d->maxVelocity = v;
@@ -1168,21 +1176,21 @@ void QFxFlickable::setMaximumFlickVelocity(qreal v)
The default is 500.
*/
-qreal QFxFlickable::flickDeceleration() const
+qreal QmlGraphicsFlickable::flickDeceleration() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->deceleration;
}
-void QFxFlickable::setFlickDeceleration(qreal deceleration)
+void QmlGraphicsFlickable::setFlickDeceleration(qreal deceleration)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
d->deceleration = deceleration;
}
-bool QFxFlickable::isFlicking() const
+bool QmlGraphicsFlickable::isFlicking() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->flicked;
}
@@ -1197,29 +1205,29 @@ bool QFxFlickable::isFlicking() const
the press event will not be delivered. If the button is released
within the timeout, both the press and release will be delivered.
*/
-int QFxFlickable::pressDelay() const
+int QmlGraphicsFlickable::pressDelay() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->pressDelay;
}
-void QFxFlickable::setPressDelay(int delay)
+void QmlGraphicsFlickable::setPressDelay(int delay)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
if (d->pressDelay == delay)
return;
d->pressDelay = delay;
}
-qreal QFxFlickable::reportedVelocitySmoothing() const
+qreal QmlGraphicsFlickable::reportedVelocitySmoothing() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->reportedVelocitySmoothing;
}
-void QFxFlickable::setReportedVelocitySmoothing(qreal reportedVelocitySmoothing)
+void QmlGraphicsFlickable::setReportedVelocitySmoothing(qreal reportedVelocitySmoothing)
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
Q_ASSERT(reportedVelocitySmoothing >= 0);
if (reportedVelocitySmoothing == d->reportedVelocitySmoothing)
return;
@@ -1227,15 +1235,15 @@ void QFxFlickable::setReportedVelocitySmoothing(qreal reportedVelocitySmoothing)
emit reportedVelocitySmoothingChanged(reportedVelocitySmoothing);
}
-bool QFxFlickable::isMoving() const
+bool QmlGraphicsFlickable::isMoving() const
{
- Q_D(const QFxFlickable);
+ Q_D(const QmlGraphicsFlickable);
return d->moving;
}
-void QFxFlickable::movementStarting()
+void QmlGraphicsFlickable::movementStarting()
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
if (!d->moving) {
d->moving = true;
emit movingChanged();
@@ -1243,9 +1251,9 @@ void QFxFlickable::movementStarting()
}
}
-void QFxFlickable::movementEnding()
+void QmlGraphicsFlickable::movementEnding()
{
- Q_D(QFxFlickable);
+ Q_D(QmlGraphicsFlickable);
if (d->moving) {
d->moving = false;
emit movingChanged();
@@ -1257,18 +1265,19 @@ void QFxFlickable::movementEnding()
emit flickEnded();
}
d->horizontalVelocity.setValue(0);
+ d->verticalVelocity.setValue(0);
}
-void QFxFlickablePrivate::updateVelocity()
+void QmlGraphicsFlickablePrivate::updateVelocity()
{
- Q_Q(QFxFlickable);
+ Q_Q(QmlGraphicsFlickable);
emit q->horizontalVelocityChanged();
emit q->verticalVelocityChanged();
}
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxFlickableVisibleArea)
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,VisibleArea,QFxFlickableVisibleArea)
+QML_DECLARE_TYPE(QmlGraphicsFlickableVisibleArea)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,VisibleArea,QmlGraphicsFlickableVisibleArea)
-#include "qfxflickable.moc"
+#include "qmlgraphicsflickable.moc"
diff --git a/src/declarative/fx/qfxflickable.h b/src/declarative/graphicsitems/qmlgraphicsflickable_p.h
index 4c80e8f..08b0fd8 100644
--- a/src/declarative/fx/qfxflickable.h
+++ b/src/declarative/graphicsitems/qmlgraphicsflickable_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,29 +21,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXFLICKABLE_H
-#define QFXFLICKABLE_H
+#ifndef QMLGRAPHICSFLICKABLE_H
+#define QMLGRAPHICSFLICKABLE_H
-#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
QT_BEGIN_HEADER
@@ -50,9 +50,9 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxFlickablePrivate;
-class QFxFlickableVisibleArea;
-class Q_DECLARATIVE_EXPORT QFxFlickable : public QFxItem
+class QmlGraphicsFlickablePrivate;
+class QmlGraphicsFlickableVisibleArea;
+class Q_DECLARATIVE_EXPORT QmlGraphicsFlickable : public QmlGraphicsItem
{
Q_OBJECT
@@ -79,18 +79,18 @@ class Q_DECLARATIVE_EXPORT QFxFlickable : public QFxItem
Q_PROPERTY(bool atXBeginning READ isAtXBeginning NOTIFY isAtBoundaryChanged)
Q_PROPERTY(bool atYBeginning READ isAtYBeginning NOTIFY isAtBoundaryChanged)
- Q_PROPERTY(QFxFlickableVisibleArea *visibleArea READ visibleArea CONSTANT)
+ Q_PROPERTY(QmlGraphicsFlickableVisibleArea *visibleArea READ visibleArea CONSTANT)
Q_PROPERTY(QmlList<QObject *>* flickableData READ flickableData)
- Q_PROPERTY(QmlList<QFxItem *>* flickableChildren READ flickableChildren)
+ Q_PROPERTY(QmlList<QmlGraphicsItem *>* flickableChildren READ flickableChildren)
Q_CLASSINFO("DefaultProperty", "flickableData")
public:
- QFxFlickable(QFxItem *parent=0);
- ~QFxFlickable();
+ QmlGraphicsFlickable(QmlGraphicsItem *parent=0);
+ ~QmlGraphicsFlickable();
QmlList<QObject *> *flickableData();
- QmlList<QFxItem *> *flickableChildren();
+ QmlList<QmlGraphicsItem *> *flickableChildren();
bool overShoot() const;
void setOverShoot(bool);
@@ -133,7 +133,7 @@ public:
bool isAtYEnd() const;
bool isAtYBeginning() const;
- QFxItem *viewport();
+ QmlGraphicsItem *viewport();
Q_SIGNALS:
void viewportWidthChanged();
@@ -162,7 +162,7 @@ protected:
qreal visibleX() const;
qreal visibleY() const;
- QFxFlickableVisibleArea *visibleArea();
+ QmlGraphicsFlickableVisibleArea *visibleArea();
protected Q_SLOTS:
virtual void ticked();
@@ -183,19 +183,20 @@ protected:
bool xflick() const;
bool yflick() const;
+ void cancelFlick();
protected:
- QFxFlickable(QFxFlickablePrivate &dd, QFxItem *parent);
+ QmlGraphicsFlickable(QmlGraphicsFlickablePrivate &dd, QmlGraphicsItem *parent);
private:
- Q_DISABLE_COPY(QFxFlickable)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxFlickable)
- friend class QFxFlickableVisibleArea;
+ Q_DISABLE_COPY(QmlGraphicsFlickable)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsFlickable)
+ friend class QmlGraphicsFlickableVisibleArea;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxFlickable)
+QML_DECLARE_TYPE(QmlGraphicsFlickable)
QT_END_HEADER
diff --git a/src/declarative/fx/qfxflickable_p.h b/src/declarative/graphicsitems/qmlgraphicsflickable_p_p.h
index 07d66b8..2850e35 100644
--- a/src/declarative/fx/qfxflickable_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsflickable_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXFLICKABLE_P_H
-#define QFXFLICKABLE_P_H
+#ifndef QMLGRAPHICSFLICKABLE_P_H
+#define QMLGRAPHICSFLICKABLE_P_H
//
// W A R N I N G
@@ -54,21 +54,21 @@
//
#include "qdatetime.h"
-#include "qfxflickable.h"
-#include "qfxitem_p.h"
+#include "qmlgraphicsflickable_p.h"
+#include "qmlgraphicsitem_p.h"
#include "qml.h"
-#include "private/qmltimeline_p.h"
-#include "private/qmlanimation_p.h"
+#include "private/qmltimeline_p_p.h"
+#include "private/qmlanimation_p_p.h"
QT_BEGIN_NAMESPACE
-class QFxFlickableVisibleArea;
-class QFxFlickablePrivate : public QFxItemPrivate
+class QmlGraphicsFlickableVisibleArea;
+class QmlGraphicsFlickablePrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxFlickable)
+ Q_DECLARE_PUBLIC(QmlGraphicsFlickable)
public:
- QFxFlickablePrivate();
+ QmlGraphicsFlickablePrivate();
void init();
virtual void flickX(qreal velocity);
virtual void flickY(qreal velocity);
@@ -80,9 +80,9 @@ public:
void clearDelayedPress();
public:
- QFxItem *viewport;
- QmlTimeLineValueProxy<QFxItem> _moveX;
- QmlTimeLineValueProxy<QFxItem> _moveY;
+ QmlGraphicsItem *viewport;
+ QmlTimeLineValueProxy<QmlGraphicsItem> _moveX;
+ QmlTimeLineValueProxy<QmlGraphicsItem> _moveY;
QmlTimeLine timeline;
qreal vWidth;
qreal vHeight;
@@ -121,19 +121,19 @@ public:
void updateVelocity();
struct Velocity : public QmlTimeLineValue
{
- Velocity(QFxFlickablePrivate *p)
+ Velocity(QmlGraphicsFlickablePrivate *p)
: parent(p) {}
virtual void setValue(qreal v) {
QmlTimeLineValue::setValue(v);
parent->updateVelocity();
}
- QFxFlickablePrivate *parent;
+ QmlGraphicsFlickablePrivate *parent;
};
Velocity horizontalVelocity;
Velocity verticalVelocity;
int vTime;
QmlTimeLine velocityTimeline;
- QFxFlickableVisibleArea *visibleArea;
+ QmlGraphicsFlickableVisibleArea *visibleArea;
void handleMousePressEvent(QGraphicsSceneMouseEvent *);
void handleMouseMoveEvent(QGraphicsSceneMouseEvent *);
@@ -147,8 +147,8 @@ public:
QObject *data_at(int) const;
void data_clear();
- friend class QFxFlickableVisibleArea;
- QML_DECLARE_LIST_PROXY(QFxFlickablePrivate, QObject *, data)
+ friend class QmlGraphicsFlickableVisibleArea;
+ QML_DECLARE_LIST_PROXY(QmlGraphicsFlickablePrivate, QObject *, data)
};
QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxflipable.cpp b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
index d381cfe..05cc214 100644
--- a/src/declarative/fx/qfxflipable.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,49 +21,48 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxflipable.h"
-#include "private/qfxitem_p.h"
+#include "qmlgraphicsflipable_p.h"
+#include "private/qmlgraphicsitem_p.h"
#include "QtGui/qgraphicstransform.h"
#include <QtDeclarative/qmlinfo.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Flipable,QFxFlipable)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Flipable,QmlGraphicsFlipable)
-class QFxFlipablePrivate : public QFxItemPrivate
+class QmlGraphicsFlipablePrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxFlipable)
+ Q_DECLARE_PUBLIC(QmlGraphicsFlipable)
public:
- QFxFlipablePrivate() : current(QFxFlipable::Front), front(0), back(0) {}
+ QmlGraphicsFlipablePrivate() : current(QmlGraphicsFlipable::Front), front(0), back(0) {}
void updateSceneTransformFromParent();
- QFxFlipable::Side current;
- QFxItem *front;
- QFxItem *back;
+ QmlGraphicsFlipable::Side current;
+ QmlGraphicsItem *front;
+ QmlGraphicsItem *back;
};
/*!
- \qmlclass Flipable QFxFlipable
+ \qmlclass Flipable QmlGraphicsFlipable
\brief The Flipable item provides a surface that can be flipped.
\inherits Item
@@ -107,21 +107,21 @@ public:
/*!
\internal
- \class QFxFlipable
- \brief The QFxFlipable class provides a flipable surface.
+ \class QmlGraphicsFlipable
+ \brief The QmlGraphicsFlipable class provides a flipable surface.
\ingroup group_widgets
- QFxFlipable allows you to specify a front and a back, as well as an
+ QmlGraphicsFlipable allows you to specify a front and a back, as well as an
axis for the flip.
*/
-QFxFlipable::QFxFlipable(QFxItem *parent)
-: QFxItem(*(new QFxFlipablePrivate), parent)
+QmlGraphicsFlipable::QmlGraphicsFlipable(QmlGraphicsItem *parent)
+: QmlGraphicsItem(*(new QmlGraphicsFlipablePrivate), parent)
{
}
-QFxFlipable::~QFxFlipable()
+QmlGraphicsFlipable::~QmlGraphicsFlipable()
{
}
@@ -132,15 +132,15 @@ QFxFlipable::~QFxFlipable()
The front and back sides of the flipable.
*/
-QFxItem *QFxFlipable::front()
+QmlGraphicsItem *QmlGraphicsFlipable::front()
{
- Q_D(const QFxFlipable);
+ Q_D(const QmlGraphicsFlipable);
return d->front;
}
-void QFxFlipable::setFront(QFxItem *front)
+void QmlGraphicsFlipable::setFront(QmlGraphicsItem *front)
{
- Q_D(QFxFlipable);
+ Q_D(QmlGraphicsFlipable);
if (d->front) {
qmlInfo(tr("front is a write-once property"),this);
return;
@@ -151,15 +151,15 @@ void QFxFlipable::setFront(QFxItem *front)
d->front->setOpacity(0.);
}
-QFxItem *QFxFlipable::back()
+QmlGraphicsItem *QmlGraphicsFlipable::back()
{
- Q_D(const QFxFlipable);
+ Q_D(const QmlGraphicsFlipable);
return d->back;
}
-void QFxFlipable::setBack(QFxItem *back)
+void QmlGraphicsFlipable::setBack(QmlGraphicsItem *back)
{
- Q_D(QFxFlipable);
+ Q_D(QmlGraphicsFlipable);
if (d->back) {
qmlInfo(tr("back is a write-once property"),this);
return;
@@ -176,11 +176,11 @@ void QFxFlipable::setBack(QFxItem *back)
The side of the Flippable currently visible. Possible values are \c
Front and \c Back.
*/
-QFxFlipable::Side QFxFlipable::side() const
+QmlGraphicsFlipable::Side QmlGraphicsFlipable::side() const
{
- Q_D(const QFxFlipable);
+ Q_D(const QmlGraphicsFlipable);
if (d->dirtySceneTransform)
- const_cast<QFxFlipablePrivate *>(d)->updateSceneTransformFromParent();
+ const_cast<QmlGraphicsFlipablePrivate *>(d)->updateSceneTransformFromParent();
return d->current;
}
@@ -188,11 +188,11 @@ QFxFlipable::Side QFxFlipable::side() const
// determination on the currently visible side of the flipable
// has to be done on the complete scene transform to give
// correct results.
-void QFxFlipablePrivate::updateSceneTransformFromParent()
+void QmlGraphicsFlipablePrivate::updateSceneTransformFromParent()
{
- Q_Q(QFxFlipable);
+ Q_Q(QmlGraphicsFlipable);
- QFxItemPrivate::updateSceneTransformFromParent();
+ QmlGraphicsItemPrivate::updateSceneTransformFromParent();
QPointF p1(0, 0);
QPointF p2(1, 0);
QPointF p3(1, 1);
@@ -204,16 +204,16 @@ void QFxFlipablePrivate::updateSceneTransformFromParent()
qreal cross = (p1.x() - p2.x()) * (p3.y() - p2.y()) -
(p1.y() - p2.y()) * (p3.x() - p2.x());
- QFxFlipable::Side newSide;
+ QmlGraphicsFlipable::Side newSide;
if (cross > 0) {
- newSide = QFxFlipable::Back;
+ newSide = QmlGraphicsFlipable::Back;
} else {
- newSide = QFxFlipable::Front;
+ newSide = QmlGraphicsFlipable::Front;
}
if (newSide != current) {
current = newSide;
- if (current == QFxFlipable::Back) {
+ if (current == QmlGraphicsFlipable::Back) {
QTransform mat;
mat.translate(back->width()/2,back->height()/2);
if (back->width() && p1.x() >= p2.x())
@@ -224,13 +224,11 @@ void QFxFlipablePrivate::updateSceneTransformFromParent()
back->setTransform(mat);
}
if (front)
- front->setOpacity((current==QFxFlipable::Front)?1.:0.);
+ front->setOpacity((current==QmlGraphicsFlipable::Front)?1.:0.);
if (back)
- back->setOpacity((current==QFxFlipable::Back)?1.:0.);
+ back->setOpacity((current==QmlGraphicsFlipable::Back)?1.:0.);
emit q->sideChanged();
}
}
QT_END_NAMESPACE
-
-#include "moc_qfxflipable.cpp"
diff --git a/src/declarative/graphicsitems/qmlgraphicsflipable_p.h b/src/declarative/graphicsitems/qmlgraphicsflipable_p.h
new file mode 100644
index 0000000..23b6c76
--- /dev/null
+++ b/src/declarative/graphicsitems/qmlgraphicsflipable_p.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMLGRAPHICSFLIPABLE_H
+#define QMLGRAPHICSFLIPABLE_H
+
+#include <QtCore/QObject>
+#include <QtGui/QTransform>
+#include <QtDeclarative/qmlgraphicsitem.h>
+#include <QtGui/qvector3d.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+class QmlGraphicsFlipablePrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsFlipable : public QmlGraphicsItem
+{
+ Q_OBJECT
+
+ Q_ENUMS(Side)
+ Q_PROPERTY(QmlGraphicsItem *front READ front WRITE setFront)
+ Q_PROPERTY(QmlGraphicsItem *back READ back WRITE setBack)
+ Q_PROPERTY(Side side READ side NOTIFY sideChanged)
+ //### flipAxis
+ //### flipRotation
+public:
+ QmlGraphicsFlipable(QmlGraphicsItem *parent=0);
+ ~QmlGraphicsFlipable();
+
+ QmlGraphicsItem *front();
+ void setFront(QmlGraphicsItem *);
+
+ QmlGraphicsItem *back();
+ void setBack(QmlGraphicsItem *);
+
+ enum Side { Front, Back };
+ Side side() const;
+
+Q_SIGNALS:
+ void sideChanged();
+
+private:
+ Q_DISABLE_COPY(QmlGraphicsFlipable)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsFlipable)
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QmlGraphicsFlipable)
+
+QT_END_HEADER
+
+#endif // QMLGRAPHICSFLIPABLE_H
diff --git a/src/declarative/fx/qfxfocuspanel.cpp b/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp
index 3bb0b25..d3ee184 100644
--- a/src/declarative/fx/qfxfocuspanel.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsfocuspanel.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,35 +21,34 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxfocuspanel.h"
+#include "qmlgraphicsfocuspanel_p.h"
#include <QtGui/qgraphicsscene.h>
#include <QEvent>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FocusPanel,QFxFocusPanel)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FocusPanel,QmlGraphicsFocusPanel)
/*!
- \qmlclass FocusPanel
+ \qmlclass FocusPanel QFxFocusPanel
\brief The FocusPanel item explicitly creates a focus panel.
\inherits Item
@@ -59,16 +59,16 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FocusPanel,QFxFocusPanel)
/*!
\internal
- \class QFxFocusPanel
+ \class QmlGraphicsFocusPanel
*/
-QFxFocusPanel::QFxFocusPanel(QFxItem *parent) :
- QFxItem(parent)
+QmlGraphicsFocusPanel::QmlGraphicsFocusPanel(QmlGraphicsItem *parent) :
+ QmlGraphicsItem(parent)
{
setFlag(ItemIsPanel);
}
-QFxFocusPanel::~QFxFocusPanel()
+QmlGraphicsFocusPanel::~QmlGraphicsFocusPanel()
{
}
@@ -78,12 +78,12 @@ QFxFocusPanel::~QFxFocusPanel()
Sets whether the item is the active focus panel.
*/
-bool QFxFocusPanel::sceneEvent(QEvent *event)
+bool QmlGraphicsFocusPanel::sceneEvent(QEvent *event)
{
if (event->type() == QEvent::WindowActivate ||
event->type() == QEvent::WindowDeactivate)
emit activeChanged();
- return QFxItem::sceneEvent(event);
+ return QmlGraphicsItem::sceneEvent(event);
}
QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxfocuspanel.h b/src/declarative/graphicsitems/qmlgraphicsfocuspanel_p.h
index 1fea011..d014da2 100644
--- a/src/declarative/fx/qfxfocuspanel.h
+++ b/src/declarative/graphicsitems/qmlgraphicsfocuspanel_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,29 +21,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXFOCUSPANEL_H
-#define QFXFOCUSPANEL_H
+#ifndef QMLGRAPHICSFOCUSPANEL_H
+#define QMLGRAPHICSFOCUSPANEL_H
-#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
QT_BEGIN_HEADER
@@ -50,13 +50,13 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class Q_DECLARATIVE_EXPORT QFxFocusPanel : public QFxItem
+class Q_DECLARATIVE_EXPORT QmlGraphicsFocusPanel : public QmlGraphicsItem
{
Q_OBJECT
Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged)
public:
- QFxFocusPanel(QFxItem *parent=0);
- virtual ~QFxFocusPanel();
+ QmlGraphicsFocusPanel(QmlGraphicsItem *parent=0);
+ virtual ~QmlGraphicsFocusPanel();
Q_SIGNALS:
void activeChanged();
@@ -65,13 +65,13 @@ protected:
bool sceneEvent(QEvent *event);
private:
- Q_DISABLE_COPY(QFxFocusPanel)
+ Q_DISABLE_COPY(QmlGraphicsFocusPanel)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxFocusPanel)
+QML_DECLARE_TYPE(QmlGraphicsFocusPanel)
QT_END_HEADER
-#endif // QFXFOCUSPANEL_H
+#endif // QMLGRAPHICSFOCUSPANEL_H
diff --git a/src/declarative/fx/qfxfocusscope.cpp b/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp
index 9bcc17e..cd30b2b 100644
--- a/src/declarative/fx/qfxfocusscope.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsfocusscope.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,33 +21,32 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxfocusscope.h"
+#include "qmlgraphicsfocusscope_p.h"
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FocusScope,QFxFocusScope)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FocusScope,QmlGraphicsFocusScope)
/*!
- \qmlclass FocusScope
+ \qmlclass FocusScope QFxFocusScope
\brief The FocusScope object explicitly creates a focus scope.
\inherits Item
@@ -57,16 +57,16 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,FocusScope,QFxFocusScope)
/*!
\internal
- \class QFxFocusScope
+ \class QmlGraphicsFocusScope
*/
-QFxFocusScope::QFxFocusScope(QFxItem *parent) :
- QFxItem(parent)
+QmlGraphicsFocusScope::QmlGraphicsFocusScope(QmlGraphicsItem *parent) :
+ QmlGraphicsItem(parent)
{
setFlag(QGraphicsItem::ItemIsFocusScope);
}
-QFxFocusScope::~QFxFocusScope()
+QmlGraphicsFocusScope::~QmlGraphicsFocusScope()
{
}
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qmlgraphicsfocusscope_p.h b/src/declarative/graphicsitems/qmlgraphicsfocusscope_p.h
new file mode 100644
index 0000000..813a999
--- /dev/null
+++ b/src/declarative/graphicsitems/qmlgraphicsfocusscope_p.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMLGRAPHICSFOCUSSCOPE_H
+#define QMLGRAPHICSFOCUSSCOPE_H
+
+#include <QtDeclarative/qmlgraphicsitem.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+//### set component root as focusscope
+class Q_DECLARATIVE_EXPORT QmlGraphicsFocusScope : public QmlGraphicsItem
+{
+ Q_OBJECT
+public:
+ QmlGraphicsFocusScope(QmlGraphicsItem *parent=0);
+ virtual ~QmlGraphicsFocusScope();
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QmlGraphicsFocusScope)
+
+QT_END_HEADER
+
+#endif // QMLGRAPHICSFOCUSSCOPE_H
diff --git a/src/declarative/fx/qfxgraphicsobjectcontainer.cpp b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp
index 5a61d12..2a0d6a6 100644
--- a/src/declarative/fx/qfxgraphicsobjectcontainer.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,46 +21,45 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxgraphicsobjectcontainer.h"
+#include "qmlgraphicsgraphicsobjectcontainer_p.h"
#include <QGraphicsObject>
#include <QGraphicsWidget>
#include <QGraphicsSceneResizeEvent>
-#include <private/qfxitem_p.h>
+#include <private/qmlgraphicsitem_p.h>
QT_BEGIN_NAMESPACE
-class QFxGraphicsObjectContainerPrivate : public QFxItemPrivate
+class QmlGraphicsGraphicsObjectContainerPrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxGraphicsObjectContainer)
+ Q_DECLARE_PUBLIC(QmlGraphicsGraphicsObjectContainer)
public:
- QFxGraphicsObjectContainerPrivate() : QFxItemPrivate(), graphicsObject(0), syncedResize(false)
+ QmlGraphicsGraphicsObjectContainerPrivate() : QmlGraphicsItemPrivate(), graphicsObject(0), syncedResize(false)
{ }
void _q_updateSize();
void setFiltering(bool on)
{
- Q_Q(QFxGraphicsObjectContainer);
+ Q_Q(QmlGraphicsGraphicsObjectContainer);
if (graphicsObject && graphicsObject->isWidget()) {
if (!on) {
graphicsObject->removeEventFilter(q);
@@ -80,31 +80,31 @@ public:
/*!
- \qmlclass GraphicsObjectContainer QFxGraphicsObjectContainer
+ \qmlclass GraphicsObjectContainer QmlGraphicsGraphicsObjectContainer
\brief The GraphicsObjectContainer element allows you to add QGraphicsObjects into Fluid UI elements.
*/
/*!
\internal
- \class QFxGraphicsObjectContainer
- \brief The QFxGraphicsObjectContainer class allows you to add QGraphicsObjects into Fluid UI applications.
+ \class QmlGraphicsGraphicsObjectContainer
+ \brief The QmlGraphicsGraphicsObjectContainer class allows you to add QGraphicsObjects into Fluid UI applications.
*/
QML_DEFINE_NOCREATE_TYPE(QGraphicsObject)
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,GraphicsObjectContainer,QFxGraphicsObjectContainer)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,GraphicsObjectContainer,QmlGraphicsGraphicsObjectContainer)
-QFxGraphicsObjectContainer::QFxGraphicsObjectContainer(QFxItem *parent)
-: QFxItem(*new QFxGraphicsObjectContainerPrivate, parent)
+QmlGraphicsGraphicsObjectContainer::QmlGraphicsGraphicsObjectContainer(QmlGraphicsItem *parent)
+: QmlGraphicsItem(*new QmlGraphicsGraphicsObjectContainerPrivate, parent)
{
}
-QFxGraphicsObjectContainer::~QFxGraphicsObjectContainer()
+QmlGraphicsGraphicsObjectContainer::~QmlGraphicsGraphicsObjectContainer()
{
}
-QGraphicsObject *QFxGraphicsObjectContainer::graphicsObject() const
+QGraphicsObject *QmlGraphicsGraphicsObjectContainer::graphicsObject() const
{
- Q_D(const QFxGraphicsObjectContainer);
+ Q_D(const QmlGraphicsGraphicsObjectContainer);
return d->graphicsObject;
}
@@ -112,9 +112,9 @@ QGraphicsObject *QFxGraphicsObjectContainer::graphicsObject() const
\qmlproperty QGraphicsObject GraphicsObjectContainer::graphicsObject
The QGraphicsObject associated with this element.
*/
-void QFxGraphicsObjectContainer::setGraphicsObject(QGraphicsObject *object)
+void QmlGraphicsGraphicsObjectContainer::setGraphicsObject(QGraphicsObject *object)
{
- Q_D(QFxGraphicsObjectContainer);
+ Q_D(QmlGraphicsGraphicsObjectContainer);
if (object == d->graphicsObject)
return;
@@ -147,20 +147,20 @@ void QFxGraphicsObjectContainer::setGraphicsObject(QGraphicsObject *object)
}
}
-QVariant QFxGraphicsObjectContainer::itemChange(GraphicsItemChange change, const QVariant &value)
+QVariant QmlGraphicsGraphicsObjectContainer::itemChange(GraphicsItemChange change, const QVariant &value)
{
- Q_D(QFxGraphicsObjectContainer);
+ Q_D(QmlGraphicsGraphicsObjectContainer);
if (change == ItemSceneHasChanged) {
QGraphicsObject *o = d->graphicsObject;
d->graphicsObject = 0;
setGraphicsObject(o);
}
- return QFxItem::itemChange(change, value);
+ return QmlGraphicsItem::itemChange(change, value);
}
-bool QFxGraphicsObjectContainer::eventFilter(QObject *watched, QEvent *e)
+bool QmlGraphicsGraphicsObjectContainer::eventFilter(QObject *watched, QEvent *e)
{
- Q_D(QFxGraphicsObjectContainer);
+ Q_D(QmlGraphicsGraphicsObjectContainer);
if (watched == d->graphicsObject && e->type() == QEvent::GraphicsSceneResize) {
if (d->graphicsObject && d->graphicsObject->isWidget() && d->syncedResize) {
QSizeF newSize = static_cast<QGraphicsWidget*>(d->graphicsObject)->size();
@@ -168,7 +168,7 @@ bool QFxGraphicsObjectContainer::eventFilter(QObject *watched, QEvent *e)
setImplicitHeight(newSize.height());
}
}
- return QFxItem::eventFilter(watched, e);
+ return QmlGraphicsItem::eventFilter(watched, e);
}
/*!
@@ -190,15 +190,15 @@ bool QFxGraphicsObjectContainer::eventFilter(QObject *watched, QEvent *e)
widget's size will be reflected in the container.
\endlist
*/
-bool QFxGraphicsObjectContainer::synchronizedResizing() const
+bool QmlGraphicsGraphicsObjectContainer::synchronizedResizing() const
{
- Q_D(const QFxGraphicsObjectContainer);
+ Q_D(const QmlGraphicsGraphicsObjectContainer);
return d->syncedResize;
}
-void QFxGraphicsObjectContainer::setSynchronizedResizing(bool on)
+void QmlGraphicsGraphicsObjectContainer::setSynchronizedResizing(bool on)
{
- Q_D(QFxGraphicsObjectContainer);
+ Q_D(QmlGraphicsGraphicsObjectContainer);
if (on == d->syncedResize)
return;
@@ -206,7 +206,7 @@ void QFxGraphicsObjectContainer::setSynchronizedResizing(bool on)
d->setFiltering(on);
}
-void QFxGraphicsObjectContainerPrivate::_q_updateSize()
+void QmlGraphicsGraphicsObjectContainerPrivate::_q_updateSize()
{
if (!graphicsObject || !graphicsObject->isWidget() || !syncedResize)
return;
@@ -225,6 +225,6 @@ void QFxGraphicsObjectContainerPrivate::_q_updateSize()
}*/
}
-QT_END_NAMESPACE
+#include "moc_qmlgraphicsgraphicsobjectcontainer_p.cpp"
-#include "moc_qfxgraphicsobjectcontainer.cpp"
+QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxgraphicsobjectcontainer.h b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer_p.h
index 656a7f8..10f08bd 100644
--- a/src/declarative/fx/qfxgraphicsobjectcontainer.h
+++ b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,29 +21,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXGRAPHICSOBJECTCONTAINER_H
-#define QFXGRAPHICSOBJECTCONTAINER_H
+#ifndef QMLGRAPHICSGRAPHICSOBJECTCONTAINER_H
+#define QMLGRAPHICSGRAPHICSOBJECTCONTAINER_H
-#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
QT_BEGIN_HEADER
@@ -51,9 +51,9 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QGraphicsObject;
-class QFxGraphicsObjectContainerPrivate;
+class QmlGraphicsGraphicsObjectContainerPrivate;
-class Q_DECLARATIVE_EXPORT QFxGraphicsObjectContainer : public QFxItem
+class Q_DECLARATIVE_EXPORT QmlGraphicsGraphicsObjectContainer : public QmlGraphicsItem
{
Q_OBJECT
@@ -62,8 +62,8 @@ class Q_DECLARATIVE_EXPORT QFxGraphicsObjectContainer : public QFxItem
Q_PROPERTY(bool synchronizedResizing READ synchronizedResizing WRITE setSynchronizedResizing)
public:
- QFxGraphicsObjectContainer(QFxItem *parent = 0);
- ~QFxGraphicsObjectContainer();
+ QmlGraphicsGraphicsObjectContainer(QmlGraphicsItem *parent = 0);
+ ~QmlGraphicsGraphicsObjectContainer();
QGraphicsObject *graphicsObject() const;
void setGraphicsObject(QGraphicsObject *);
@@ -77,14 +77,14 @@ protected:
private:
Q_PRIVATE_SLOT(d_func(), void _q_updateSize())
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxGraphicsObjectContainer)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsGraphicsObjectContainer)
};
QT_END_NAMESPACE
QML_DECLARE_TYPE(QGraphicsObject)
-QML_DECLARE_TYPE(QFxGraphicsObjectContainer)
+QML_DECLARE_TYPE(QmlGraphicsGraphicsObjectContainer)
QT_END_HEADER
-#endif // QFXGRAPHICSOBJECTCONTAINER_H
+#endif // QMLGRAPHICSGRAPHICSOBJECTCONTAINER_H
diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/graphicsitems/qmlgraphicsgridview.cpp
index 0b2a935..cadd650 100644
--- a/src/declarative/fx/qfxgridview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsgridview.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,47 +21,46 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxvisualitemmodel.h"
-#include "qlistmodelinterface.h"
-#include "qmleasefollow.h"
-#include "private/qfxflickable_p.h"
-#include "qfxgridview.h"
+#include "qmlgraphicsgridview_p.h"
+#include <private/qmlgraphicsvisualitemmodel_p.h>
+#include <private/qlistmodelinterface_p.h>
+#include <private/qmleasefollow_p.h>
+#include <private/qmlgraphicsflickable_p_p.h>
#include <QKeyEvent>
QT_BEGIN_NAMESPACE
-class QFxGridViewAttached : public QObject
+class QmlGraphicsGridViewAttached : public QObject
{
Q_OBJECT
public:
- QFxGridViewAttached(QObject *parent)
+ QmlGraphicsGridViewAttached(QObject *parent)
: QObject(parent), m_isCurrent(false), m_delayRemove(false) {}
- ~QFxGridViewAttached() {
+ ~QmlGraphicsGridViewAttached() {
attachedProperties.remove(parent());
}
- Q_PROPERTY(QFxGridView *view READ view CONSTANT)
- QFxGridView *view() { return m_view; }
+ Q_PROPERTY(QmlGraphicsGridView *view READ view CONSTANT)
+ QmlGraphicsGridView *view() { return m_view; }
Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
bool isCurrentItem() const { return m_isCurrent; }
@@ -80,10 +80,10 @@ public:
}
}
- static QFxGridViewAttached *properties(QObject *obj) {
- QFxGridViewAttached *rv = attachedProperties.value(obj);
+ static QmlGraphicsGridViewAttached *properties(QObject *obj) {
+ QmlGraphicsGridViewAttached *rv = attachedProperties.value(obj);
if (!rv) {
- rv = new QFxGridViewAttached(obj);
+ rv = new QmlGraphicsGridViewAttached(obj);
attachedProperties.insert(obj, rv);
}
return rv;
@@ -99,14 +99,14 @@ Q_SIGNALS:
void remove();
public:
- QFxGridView *m_view;
+ QmlGraphicsGridView *m_view;
bool m_isCurrent;
bool m_delayRemove;
- static QHash<QObject*, QFxGridViewAttached*> attachedProperties;
+ static QHash<QObject*, QmlGraphicsGridViewAttached*> attachedProperties;
};
-QHash<QObject*, QFxGridViewAttached*> QFxGridViewAttached::attachedProperties;
+QHash<QObject*, QmlGraphicsGridViewAttached*> QmlGraphicsGridViewAttached::attachedProperties;
//----------------------------------------------------------------------------
@@ -114,42 +114,42 @@ QHash<QObject*, QFxGridViewAttached*> QFxGridViewAttached::attachedProperties;
class FxGridItem
{
public:
- FxGridItem(QFxItem *i, QFxGridView *v) : item(i), view(v) {
- attached = QFxGridViewAttached::properties(item);
+ FxGridItem(QmlGraphicsItem *i, QmlGraphicsGridView *v) : item(i), view(v) {
+ attached = QmlGraphicsGridViewAttached::properties(item);
attached->m_view = view;
}
~FxGridItem() {}
- qreal rowPos() const { return (view->flow() == QFxGridView::LeftToRight ? item->y() : item->x()); }
- qreal colPos() const { return (view->flow() == QFxGridView::LeftToRight ? item->x() : item->y()); }
+ qreal rowPos() const { return (view->flow() == QmlGraphicsGridView::LeftToRight ? item->y() : item->x()); }
+ qreal colPos() const { return (view->flow() == QmlGraphicsGridView::LeftToRight ? item->x() : item->y()); }
qreal endRowPos() const {
- return view->flow() == QFxGridView::LeftToRight
+ return view->flow() == QmlGraphicsGridView::LeftToRight
? item->y() + view->cellHeight() - 1
: item->x() + view->cellWidth() - 1;
}
void setPosition(qreal col, qreal row) {
- if (view->flow() == QFxGridView::LeftToRight) {
+ if (view->flow() == QmlGraphicsGridView::LeftToRight) {
item->setPos(QPointF(col, row));
} else {
item->setPos(QPointF(row, col));
}
}
- QFxItem *item;
- QFxGridView *view;
- QFxGridViewAttached *attached;
+ QmlGraphicsItem *item;
+ QmlGraphicsGridView *view;
+ QmlGraphicsGridViewAttached *attached;
int index;
};
//----------------------------------------------------------------------------
-class QFxGridViewPrivate : public QFxFlickablePrivate
+class QmlGraphicsGridViewPrivate : public QmlGraphicsFlickablePrivate
{
- Q_DECLARE_PUBLIC(QFxGridView)
+ Q_DECLARE_PUBLIC(QmlGraphicsGridView)
public:
- QFxGridViewPrivate()
- : model(0), currentItem(0), flow(QFxGridView::LeftToRight)
+ QmlGraphicsGridViewPrivate()
+ : model(0), currentItem(0), flow(QmlGraphicsGridView::LeftToRight)
, visiblePos(0), visibleIndex(0) , currentIndex(-1)
, cellWidth(100), cellHeight(100), columns(1), requestedIndex(-1)
, highlightComponent(0), highlight(0), trackedItem(0)
@@ -184,19 +184,19 @@ public:
}
qreal position() const {
- Q_Q(const QFxGridView);
- return flow == QFxGridView::LeftToRight ? q->viewportY() : q->viewportX();
+ Q_Q(const QmlGraphicsGridView);
+ return flow == QmlGraphicsGridView::LeftToRight ? q->viewportY() : q->viewportX();
}
void setPosition(qreal pos) {
- Q_Q(QFxGridView);
- if (flow == QFxGridView::LeftToRight)
+ Q_Q(QmlGraphicsGridView);
+ if (flow == QmlGraphicsGridView::LeftToRight)
q->setViewportY(pos);
else
q->setViewportX(pos);
}
int size() const {
- Q_Q(const QFxGridView);
- return flow == QFxGridView::LeftToRight ? q->height() : q->width();
+ Q_Q(const QmlGraphicsGridView);
+ return flow == QmlGraphicsGridView::LeftToRight ? q->height() : q->width();
}
qreal startPosition() const {
qreal pos = 0;
@@ -217,10 +217,10 @@ public:
}
int rowSize() const {
- return flow == QFxGridView::LeftToRight ? cellHeight : cellWidth;
+ return flow == QmlGraphicsGridView::LeftToRight ? cellHeight : cellWidth;
}
int colSize() const {
- return flow == QFxGridView::LeftToRight ? cellWidth : cellHeight;
+ return flow == QmlGraphicsGridView::LeftToRight ? cellWidth : cellHeight;
}
qreal colPosAt(int modelIndex) const {
@@ -293,12 +293,12 @@ public:
}
}
- QFxVisualModel *model;
+ QmlGraphicsVisualModel *model;
QVariant modelVariant;
QList<FxGridItem*> visibleItems;
- QHash<QFxItem*,int> unrequestedItems;
+ QHash<QmlGraphicsItem*,int> unrequestedItems;
FxGridItem *currentItem;
- QFxGridView::Flow flow;
+ QmlGraphicsGridView::Flow flow;
int visiblePos;
int visibleIndex;
int currentIndex;
@@ -321,15 +321,15 @@ public:
int fixCurrentVisibility : 1;
};
-void QFxGridViewPrivate::init()
+void QmlGraphicsGridViewPrivate::init()
{
- Q_Q(QFxGridView);
+ Q_Q(QmlGraphicsGridView);
q->setFlag(QGraphicsItem::ItemIsFocusScope);
QObject::connect(q, SIGNAL(widthChanged()), q, SLOT(sizeChange()));
QObject::connect(q, SIGNAL(heightChanged()), q, SLOT(sizeChange()));
}
-void QFxGridViewPrivate::clear()
+void QmlGraphicsGridViewPrivate::clear()
{
for (int i = 0; i < visibleItems.count(); ++i)
releaseItem(visibleItems.at(i));
@@ -343,13 +343,13 @@ void QFxGridViewPrivate::clear()
trackedItem = 0;
}
-FxGridItem *QFxGridViewPrivate::createItem(int modelIndex)
+FxGridItem *QmlGraphicsGridViewPrivate::createItem(int modelIndex)
{
- Q_Q(QFxGridView);
+ Q_Q(QmlGraphicsGridView);
// create object
requestedIndex = modelIndex;
FxGridItem *listItem = 0;
- if (QFxItem *item = model->item(modelIndex, false)) {
+ if (QmlGraphicsItem *item = model->item(modelIndex, false)) {
listItem = new FxGridItem(item, q);
listItem->index = modelIndex;
// complete
@@ -362,9 +362,9 @@ FxGridItem *QFxGridViewPrivate::createItem(int modelIndex)
}
-void QFxGridViewPrivate::releaseItem(FxGridItem *item)
+void QmlGraphicsGridViewPrivate::releaseItem(FxGridItem *item)
{
- Q_Q(QFxGridView);
+ Q_Q(QmlGraphicsGridView);
if (!item)
return;
if (trackedItem == item) {
@@ -379,9 +379,9 @@ void QFxGridViewPrivate::releaseItem(FxGridItem *item)
delete item;
}
-void QFxGridViewPrivate::refill(qreal from, qreal to)
+void QmlGraphicsGridViewPrivate::refill(qreal from, qreal to)
{
- Q_Q(QFxGridView);
+ Q_Q(QmlGraphicsGridView);
if (!isValid() || !q->isComponentComplete())
return;
@@ -463,28 +463,28 @@ void QFxGridViewPrivate::refill(qreal from, qreal to)
changed = true;
}
if (changed) {
- if (flow == QFxGridView::LeftToRight)
+ if (flow == QmlGraphicsGridView::LeftToRight)
q->setViewportHeight(endPosition() - startPosition());
else
q->setViewportWidth(endPosition() - startPosition());
}
}
-void QFxGridViewPrivate::updateGrid()
+void QmlGraphicsGridViewPrivate::updateGrid()
{
- Q_Q(QFxGridView);
- columns = (int)qMax((flow == QFxGridView::LeftToRight ? q->width() : q->height()) / colSize(), qreal(1.));
+ Q_Q(QmlGraphicsGridView);
+ columns = (int)qMax((flow == QmlGraphicsGridView::LeftToRight ? q->width() : q->height()) / colSize(), qreal(1.));
if (isValid()) {
- if (flow == QFxGridView::LeftToRight)
+ if (flow == QmlGraphicsGridView::LeftToRight)
q->setViewportHeight(endPosition() - startPosition());
else
q->setViewportWidth(endPosition() - startPosition());
}
}
-void QFxGridViewPrivate::layout(bool removed)
+void QmlGraphicsGridViewPrivate::layout(bool removed)
{
- Q_Q(QFxGridView);
+ Q_Q(QmlGraphicsGridView);
if (visibleItems.count()) {
qreal rowPos = visibleItems.first()->rowPos();
qreal colPos = visibleItems.first()->colPos();
@@ -510,7 +510,7 @@ void QFxGridViewPrivate::layout(bool removed)
q->refill();
q->trackedPositionChanged();
updateHighlight();
- if (flow == QFxGridView::LeftToRight) {
+ if (flow == QmlGraphicsGridView::LeftToRight) {
q->setViewportHeight(endPosition() - startPosition());
fixupY();
} else {
@@ -520,19 +520,19 @@ void QFxGridViewPrivate::layout(bool removed)
updateUnrequestedPositions();
}
-void QFxGridViewPrivate::updateUnrequestedIndexes()
+void QmlGraphicsGridViewPrivate::updateUnrequestedIndexes()
{
- Q_Q(QFxGridView);
- QHash<QFxItem*,int>::iterator it;
+ Q_Q(QmlGraphicsGridView);
+ QHash<QmlGraphicsItem*,int>::iterator it;
for (it = unrequestedItems.begin(); it != unrequestedItems.end(); ++it)
*it = model->indexOf(it.key(), q);
}
-void QFxGridViewPrivate::updateUnrequestedPositions()
+void QmlGraphicsGridViewPrivate::updateUnrequestedPositions()
{
- QHash<QFxItem*,int>::const_iterator it;
+ QHash<QmlGraphicsItem*,int>::const_iterator it;
for (it = unrequestedItems.begin(); it != unrequestedItems.end(); ++it) {
- if (flow == QFxGridView::LeftToRight) {
+ if (flow == QmlGraphicsGridView::LeftToRight) {
it.key()->setPos(QPointF(colPosAt(*it), rowPosAt(*it)));
} else {
it.key()->setPos(QPointF(rowPosAt(*it), colPosAt(*it)));
@@ -540,9 +540,9 @@ void QFxGridViewPrivate::updateUnrequestedPositions()
}
}
-void QFxGridViewPrivate::updateTrackedItem()
+void QmlGraphicsGridViewPrivate::updateTrackedItem()
{
- Q_Q(QFxGridView);
+ Q_Q(QmlGraphicsGridView);
FxGridItem *item = currentItem;
if (highlight)
item = highlight;
@@ -563,9 +563,9 @@ void QFxGridViewPrivate::updateTrackedItem()
q->trackedPositionChanged();
}
-void QFxGridViewPrivate::createHighlight()
+void QmlGraphicsGridViewPrivate::createHighlight()
{
- Q_Q(QFxGridView);
+ Q_Q(QmlGraphicsGridView);
if (highlight) {
if (trackedItem == highlight)
trackedItem = 0;
@@ -586,7 +586,7 @@ void QFxGridViewPrivate::createHighlight()
QObject *nobj = highlightComponent->create(highlightContext);
if (nobj) {
highlightContext->setParent(nobj);
- QFxItem *item = qobject_cast<QFxItem *>(nobj);
+ QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem *>(nobj);
if (item) {
item->setParent(q->viewport());
highlight = new FxGridItem(item, q);
@@ -605,7 +605,7 @@ void QFxGridViewPrivate::createHighlight()
}
}
-void QFxGridViewPrivate::updateHighlight()
+void QmlGraphicsGridViewPrivate::updateHighlight()
{
if ((!currentItem && highlight) || (currentItem && !highlight))
createHighlight();
@@ -619,9 +619,9 @@ void QFxGridViewPrivate::updateHighlight()
}
}
-void QFxGridViewPrivate::updateCurrent(int modelIndex)
+void QmlGraphicsGridViewPrivate::updateCurrent(int modelIndex)
{
- Q_Q(QFxGridView);
+ Q_Q(QmlGraphicsGridView);
if (!isValid() || modelIndex < 0 || modelIndex >= model->count()) {
if (currentItem) {
currentItem->attached->setIsCurrentItem(false);
@@ -658,7 +658,7 @@ void QFxGridViewPrivate::updateCurrent(int modelIndex)
//----------------------------------------------------------------------------
/*!
- \qmlclass GridView
+ \qmlclass GridView QFxGridView
\inherits Flickable
\brief The GridView item provides a grid view of items provided by a model.
@@ -680,16 +680,16 @@ void QFxGridViewPrivate::updateCurrent(int modelIndex)
In this case ListModel is a handy way for us to test our UI. In practice
the model would be implemented in C++, or perhaps via a SQL data source.
*/
-QFxGridView::QFxGridView(QFxItem *parent)
- : QFxFlickable(*(new QFxGridViewPrivate), parent)
+QmlGraphicsGridView::QmlGraphicsGridView(QmlGraphicsItem *parent)
+ : QmlGraphicsFlickable(*(new QmlGraphicsGridViewPrivate), parent)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
d->init();
}
-QFxGridView::~QFxGridView()
+QmlGraphicsGridView::~QmlGraphicsGridView()
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
d->clear();
if (d->ownModel)
delete d->model;
@@ -758,27 +758,27 @@ QFxGridView::~QFxGridView()
\sa {qmlmodels}{Data Models}
*/
-QVariant QFxGridView::model() const
+QVariant QmlGraphicsGridView::model() const
{
- Q_D(const QFxGridView);
+ Q_D(const QmlGraphicsGridView);
return d->modelVariant;
}
-void QFxGridView::setModel(const QVariant &model)
+void QmlGraphicsGridView::setModel(const QVariant &model)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
if (d->model) {
disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
disconnect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
- disconnect(d->model, SIGNAL(createdItem(int, QFxItem*)), this, SLOT(createdItem(int,QFxItem*)));
- disconnect(d->model, SIGNAL(destroyingItem(QFxItem*)), this, SLOT(destroyingItem(QFxItem*)));
+ disconnect(d->model, SIGNAL(createdItem(int, QmlGraphicsItem*)), this, SLOT(createdItem(int,QmlGraphicsItem*)));
+ disconnect(d->model, SIGNAL(destroyingItem(QmlGraphicsItem*)), this, SLOT(destroyingItem(QmlGraphicsItem*)));
}
d->clear();
d->modelVariant = model;
QObject *object = qvariant_cast<QObject*>(model);
- QFxVisualModel *vim = 0;
- if (object && (vim = qobject_cast<QFxVisualModel *>(object))) {
+ QmlGraphicsVisualModel *vim = 0;
+ if (object && (vim = qobject_cast<QmlGraphicsVisualModel *>(object))) {
if (d->ownModel) {
delete d->model;
d->ownModel = false;
@@ -786,10 +786,10 @@ void QFxGridView::setModel(const QVariant &model)
d->model = vim;
} else {
if (!d->ownModel) {
- d->model = new QFxVisualDataModel(qmlContext(this));
+ d->model = new QmlGraphicsVisualDataModel(qmlContext(this));
d->ownModel = true;
}
- if (QFxVisualDataModel *dataModel = qobject_cast<QFxVisualDataModel*>(d->model))
+ if (QmlGraphicsVisualDataModel *dataModel = qobject_cast<QmlGraphicsVisualDataModel*>(d->model))
dataModel->setModel(model);
}
if (d->model) {
@@ -800,8 +800,8 @@ void QFxGridView::setModel(const QVariant &model)
connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
connect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
- connect(d->model, SIGNAL(createdItem(int, QFxItem*)), this, SLOT(createdItem(int,QFxItem*)));
- connect(d->model, SIGNAL(destroyingItem(QFxItem*)), this, SLOT(destroyingItem(QFxItem*)));
+ connect(d->model, SIGNAL(createdItem(int, QmlGraphicsItem*)), this, SLOT(createdItem(int,QmlGraphicsItem*)));
+ connect(d->model, SIGNAL(destroyingItem(QmlGraphicsItem*)), this, SLOT(destroyingItem(QmlGraphicsItem*)));
refill();
emit countChanged();
}
@@ -815,25 +815,25 @@ void QFxGridView::setModel(const QVariant &model)
Here is an example delegate:
\snippet doc/src/snippets/declarative/gridview/gridview.qml 0
*/
-QmlComponent *QFxGridView::delegate() const
+QmlComponent *QmlGraphicsGridView::delegate() const
{
- Q_D(const QFxGridView);
+ Q_D(const QmlGraphicsGridView);
if (d->model) {
- if (QFxVisualDataModel *dataModel = qobject_cast<QFxVisualDataModel*>(d->model))
+ if (QmlGraphicsVisualDataModel *dataModel = qobject_cast<QmlGraphicsVisualDataModel*>(d->model))
return dataModel->delegate();
}
return 0;
}
-void QFxGridView::setDelegate(QmlComponent *delegate)
+void QmlGraphicsGridView::setDelegate(QmlComponent *delegate)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
if (!d->ownModel) {
- d->model = new QFxVisualDataModel(qmlContext(this));
+ d->model = new QmlGraphicsVisualDataModel(qmlContext(this));
d->ownModel = true;
}
- if (QFxVisualDataModel *dataModel = qobject_cast<QFxVisualDataModel*>(d->model)) {
+ if (QmlGraphicsVisualDataModel *dataModel = qobject_cast<QmlGraphicsVisualDataModel*>(d->model)) {
dataModel->setDelegate(delegate);
d->updateCurrent(d->currentIndex);
refill();
@@ -848,24 +848,26 @@ void QFxGridView::setDelegate(QmlComponent *delegate)
\c currentItem is the current item. Note that the position of the current item
may only be approximate until it becomes visible in the view.
*/
-int QFxGridView::currentIndex() const
+int QmlGraphicsGridView::currentIndex() const
{
- Q_D(const QFxGridView);
+ Q_D(const QmlGraphicsGridView);
return d->currentIndex;
}
-void QFxGridView::setCurrentIndex(int index)
+void QmlGraphicsGridView::setCurrentIndex(int index)
{
- Q_D(QFxGridView);
- if (d->isValid() && index != d->currentIndex && index < d->model->count() && index >= 0)
+ Q_D(QmlGraphicsGridView);
+ if (d->isValid() && index != d->currentIndex && index < d->model->count() && index >= 0) {
+ cancelFlick();
d->updateCurrent(index);
- else
+ } else {
d->currentIndex = index;
+ }
}
-QFxItem *QFxGridView::currentItem()
+QmlGraphicsItem *QmlGraphicsGridView::currentItem()
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
if (!d->currentItem)
return 0;
return d->currentItem->item;
@@ -875,9 +877,9 @@ QFxItem *QFxGridView::currentItem()
\qmlproperty int GridView::count
This property holds the number of items in the view.
*/
-int QFxGridView::count() const
+int QmlGraphicsGridView::count() const
{
- Q_D(const QFxGridView);
+ Q_D(const QmlGraphicsGridView);
if (d->model)
return d->model->count();
return 0;
@@ -896,15 +898,15 @@ int QFxGridView::count() const
\sa highlightFollowsCurrentItem
*/
-QmlComponent *QFxGridView::highlight() const
+QmlComponent *QmlGraphicsGridView::highlight() const
{
- Q_D(const QFxGridView);
+ Q_D(const QmlGraphicsGridView);
return d->highlightComponent;
}
-void QFxGridView::setHighlight(QmlComponent *highlight)
+void QmlGraphicsGridView::setHighlight(QmlComponent *highlight)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
delete d->highlightComponent;
d->highlightComponent = highlight;
d->updateCurrent(d->currentIndex);
@@ -930,15 +932,15 @@ void QFxGridView::setHighlight(QmlComponent *highlight)
}
\endcode
*/
-bool QFxGridView::highlightFollowsCurrentItem() const
+bool QmlGraphicsGridView::highlightFollowsCurrentItem() const
{
- Q_D(const QFxGridView);
+ Q_D(const QmlGraphicsGridView);
return d->autoHighlight;
}
-void QFxGridView::setHighlightFollowsCurrentItem(bool autoHighlight)
+void QmlGraphicsGridView::setHighlightFollowsCurrentItem(bool autoHighlight)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
d->autoHighlight = autoHighlight;
if (d->highlightXAnimator) {
d->highlightXAnimator->setEnabled(d->autoHighlight);
@@ -956,15 +958,15 @@ void QFxGridView::setHighlightFollowsCurrentItem(bool autoHighlight)
If \a flow is \c LeftToRight, the view will scroll vertically.
If \a flow is \c TopToBottom, the view will scroll horizontally.
*/
-QFxGridView::Flow QFxGridView::flow() const
+QmlGraphicsGridView::Flow QmlGraphicsGridView::flow() const
{
- Q_D(const QFxGridView);
+ Q_D(const QmlGraphicsGridView);
return d->flow;
}
-void QFxGridView::setFlow(Flow flow)
+void QmlGraphicsGridView::setFlow(Flow flow)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
if (d->flow != flow) {
d->flow = flow;
if (d->flow == LeftToRight)
@@ -985,15 +987,15 @@ void QFxGridView::setFlow(Flow flow)
If this property is true then key presses to move off of one end of the grid will cause the
selection to jump to the other side.
*/
-bool QFxGridView::isWrapEnabled() const
+bool QmlGraphicsGridView::isWrapEnabled() const
{
- Q_D(const QFxGridView);
+ Q_D(const QmlGraphicsGridView);
return d->wrap;
}
-void QFxGridView::setWrapEnabled(bool wrap)
+void QmlGraphicsGridView::setWrapEnabled(bool wrap)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
d->wrap = wrap;
}
@@ -1005,15 +1007,15 @@ void QFxGridView::setWrapEnabled(bool wrap)
and below the bottom of the view to cache. Setting this value can make
scrolling the view smoother at the expense of additional memory usage.
*/
-int QFxGridView::cacheBuffer() const
+int QmlGraphicsGridView::cacheBuffer() const
{
- Q_D(const QFxGridView);
+ Q_D(const QmlGraphicsGridView);
return d->buffer;
}
-void QFxGridView::setCacheBuffer(int buffer)
+void QmlGraphicsGridView::setCacheBuffer(int buffer)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
if (d->buffer != buffer) {
d->buffer = buffer;
if (isComponentComplete())
@@ -1029,15 +1031,15 @@ void QFxGridView::setCacheBuffer(int buffer)
The default sell size is 100x100.
*/
-int QFxGridView::cellWidth() const
+int QmlGraphicsGridView::cellWidth() const
{
- Q_D(const QFxGridView);
+ Q_D(const QmlGraphicsGridView);
return d->cellWidth;
}
-void QFxGridView::setCellWidth(int cellWidth)
+void QmlGraphicsGridView::setCellWidth(int cellWidth)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
if (cellWidth != d->cellWidth && cellWidth > 0) {
d->cellWidth = qMax(1, cellWidth);
d->updateGrid();
@@ -1046,15 +1048,15 @@ void QFxGridView::setCellWidth(int cellWidth)
}
}
-int QFxGridView::cellHeight() const
+int QmlGraphicsGridView::cellHeight() const
{
- Q_D(const QFxGridView);
+ Q_D(const QmlGraphicsGridView);
return d->cellHeight;
}
-void QFxGridView::setCellHeight(int cellHeight)
+void QmlGraphicsGridView::setCellHeight(int cellHeight)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
if (cellHeight != d->cellHeight && cellHeight > 0) {
d->cellHeight = qMax(1, cellHeight);
d->updateGrid();
@@ -1063,62 +1065,62 @@ void QFxGridView::setCellHeight(int cellHeight)
}
}
-void QFxGridView::sizeChange()
+void QmlGraphicsGridView::sizeChange()
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
if (isComponentComplete()) {
d->updateGrid();
d->layout();
}
}
-void QFxGridView::viewportMoved()
+void QmlGraphicsGridView::viewportMoved()
{
- QFxFlickable::viewportMoved();
+ QmlGraphicsFlickable::viewportMoved();
refill();
}
-qreal QFxGridView::minYExtent() const
+qreal QmlGraphicsGridView::minYExtent() const
{
- Q_D(const QFxGridView);
- if (d->flow == QFxGridView::TopToBottom)
- return QFxFlickable::minYExtent();
+ Q_D(const QmlGraphicsGridView);
+ if (d->flow == QmlGraphicsGridView::TopToBottom)
+ return QmlGraphicsFlickable::minYExtent();
return -d->startPosition();
}
-qreal QFxGridView::maxYExtent() const
+qreal QmlGraphicsGridView::maxYExtent() const
{
- Q_D(const QFxGridView);
- if (d->flow == QFxGridView::TopToBottom)
- return QFxFlickable::maxYExtent();
+ Q_D(const QmlGraphicsGridView);
+ if (d->flow == QmlGraphicsGridView::TopToBottom)
+ return QmlGraphicsFlickable::maxYExtent();
return -(d->endPosition() - height());
}
-qreal QFxGridView::minXExtent() const
+qreal QmlGraphicsGridView::minXExtent() const
{
- Q_D(const QFxGridView);
- if (d->flow == QFxGridView::LeftToRight)
- return QFxFlickable::minXExtent();
+ Q_D(const QmlGraphicsGridView);
+ if (d->flow == QmlGraphicsGridView::LeftToRight)
+ return QmlGraphicsFlickable::minXExtent();
return -d->startPosition();
}
-qreal QFxGridView::maxXExtent() const
+qreal QmlGraphicsGridView::maxXExtent() const
{
- Q_D(const QFxGridView);
- if (d->flow == QFxGridView::LeftToRight)
- return QFxFlickable::maxXExtent();
+ Q_D(const QmlGraphicsGridView);
+ if (d->flow == QmlGraphicsGridView::LeftToRight)
+ return QmlGraphicsFlickable::maxXExtent();
return -(d->endPosition() - width());
}
-void QFxGridView::keyPressEvent(QKeyEvent *event)
+void QmlGraphicsGridView::keyPressEvent(QKeyEvent *event)
{
- Q_D(QFxGridView);
- QFxFlickable::keyPressEvent(event);
+ Q_D(QmlGraphicsGridView);
+ QmlGraphicsFlickable::keyPressEvent(event);
if (event->isAccepted())
return;
if (d->model && d->model->count() && d->interactive) {
- d->moveReason = QFxGridViewPrivate::Key;
+ d->moveReason = QmlGraphicsGridViewPrivate::Key;
int oldCurrent = currentIndex();
switch (event->key()) {
case Qt::Key_Up:
@@ -1141,7 +1143,7 @@ void QFxGridView::keyPressEvent(QKeyEvent *event)
return;
}
}
- d->moveReason = QFxGridViewPrivate::Other;
+ d->moveReason = QmlGraphicsGridViewPrivate::Other;
event->ignore();
}
@@ -1152,10 +1154,10 @@ void QFxGridView::keyPressEvent(QKeyEvent *event)
The current index will wrap if keyNavigationWraps is true and it
is currently at the end.
*/
-void QFxGridView::moveCurrentIndexUp()
+void QmlGraphicsGridView::moveCurrentIndexUp()
{
- Q_D(QFxGridView);
- if (d->flow == QFxGridView::LeftToRight) {
+ Q_D(QmlGraphicsGridView);
+ if (d->flow == QmlGraphicsGridView::LeftToRight) {
if (currentIndex() >= d->columns || d->wrap) {
int index = currentIndex() - d->columns;
setCurrentIndex(index >= 0 ? index : d->model->count()-1);
@@ -1175,10 +1177,10 @@ void QFxGridView::moveCurrentIndexUp()
The current index will wrap if keyNavigationWraps is true and it
is currently at the end.
*/
-void QFxGridView::moveCurrentIndexDown()
+void QmlGraphicsGridView::moveCurrentIndexDown()
{
- Q_D(QFxGridView);
- if (d->flow == QFxGridView::LeftToRight) {
+ Q_D(QmlGraphicsGridView);
+ if (d->flow == QmlGraphicsGridView::LeftToRight) {
if (currentIndex() < d->model->count() - d->columns || d->wrap) {
int index = currentIndex()+d->columns;
setCurrentIndex(index < d->model->count() ? index : 0);
@@ -1198,10 +1200,10 @@ void QFxGridView::moveCurrentIndexDown()
The current index will wrap if keyNavigationWraps is true and it
is currently at the end.
*/
-void QFxGridView::moveCurrentIndexLeft()
+void QmlGraphicsGridView::moveCurrentIndexLeft()
{
- Q_D(QFxGridView);
- if (d->flow == QFxGridView::LeftToRight) {
+ Q_D(QmlGraphicsGridView);
+ if (d->flow == QmlGraphicsGridView::LeftToRight) {
if (currentIndex() > 0 || d->wrap) {
int index = currentIndex() - 1;
setCurrentIndex(index >= 0 ? index : d->model->count()-1);
@@ -1221,10 +1223,10 @@ void QFxGridView::moveCurrentIndexLeft()
The current index will wrap if keyNavigationWraps is true and it
is currently at the end.
*/
-void QFxGridView::moveCurrentIndexRight()
+void QmlGraphicsGridView::moveCurrentIndexRight()
{
- Q_D(QFxGridView);
- if (d->flow == QFxGridView::LeftToRight) {
+ Q_D(QmlGraphicsGridView);
+ if (d->flow == QmlGraphicsGridView::LeftToRight) {
if (currentIndex() < d->model->count() - 1 || d->wrap) {
int index = currentIndex() + 1;
setCurrentIndex(index < d->model->count() ? index : 0);
@@ -1237,22 +1239,22 @@ void QFxGridView::moveCurrentIndexRight()
}
}
-void QFxGridView::componentComplete()
+void QmlGraphicsGridView::componentComplete()
{
- Q_D(QFxGridView);
- QFxFlickable::componentComplete();
+ Q_D(QmlGraphicsGridView);
+ QmlGraphicsFlickable::componentComplete();
d->updateGrid();
if (d->currentIndex < 0)
d->updateCurrent(0);
refill();
}
-void QFxGridView::trackedPositionChanged()
+void QmlGraphicsGridView::trackedPositionChanged()
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
if (!d->trackedItem)
return;
- if (!isFlicking() && !d->pressed && d->moveReason == QFxGridViewPrivate::Key) {
+ if (!isFlicking() && !d->pressed && d->moveReason == QmlGraphicsGridViewPrivate::Key) {
if (d->trackedItem->rowPos() < d->position()) {
d->setPosition(d->trackedItem->rowPos());
} else if (d->trackedItem->endRowPos() > d->position() + d->size()) {
@@ -1264,9 +1266,9 @@ void QFxGridView::trackedPositionChanged()
}
}
-void QFxGridView::itemsInserted(int modelIndex, int count)
+void QmlGraphicsGridView::itemsInserted(int modelIndex, int count)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
if (!d->visibleItems.count() || d->model->count() <= 1) {
refill();
d->updateCurrent(qMax(0, qMin(d->currentIndex, d->model->count()-1)));
@@ -1375,9 +1377,9 @@ void QFxGridView::itemsInserted(int modelIndex, int count)
emit countChanged();
}
-void QFxGridView::itemsRemoved(int modelIndex, int count)
+void QmlGraphicsGridView::itemsRemoved(int modelIndex, int count)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
bool currentRemoved = d->currentIndex >= modelIndex && d->currentIndex < modelIndex + count;
int index = d->mapFromModel(modelIndex);
if (index == -1) {
@@ -1463,9 +1465,9 @@ void QFxGridView::itemsRemoved(int modelIndex, int count)
emit countChanged();
}
-void QFxGridView::destroyRemoved()
+void QmlGraphicsGridView::destroyRemoved()
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
for (QList<FxGridItem*>::Iterator it = d->visibleItems.begin();
it != d->visibleItems.end();) {
FxGridItem *listItem = *it;
@@ -1481,9 +1483,9 @@ void QFxGridView::destroyRemoved()
d->layout();
}
-void QFxGridView::itemsMoved(int from, int to, int count)
+void QmlGraphicsGridView::itemsMoved(int from, int to, int count)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
QHash<int,FxGridItem*> moved;
QList<FxGridItem*>::Iterator it = d->visibleItems.begin();
@@ -1542,14 +1544,14 @@ void QFxGridView::itemsMoved(int from, int to, int count)
d->layout();
}
-void QFxGridView::createdItem(int index, QFxItem *item)
+void QmlGraphicsGridView::createdItem(int index, QmlGraphicsItem *item)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
item->setParentItem(this);
if (d->requestedIndex != index) {
item->setParentItem(this);
d->unrequestedItems.insert(item, index);
- if (d->flow == QFxGridView::LeftToRight) {
+ if (d->flow == QmlGraphicsGridView::LeftToRight) {
item->setPos(QPointF(d->colPosAt(index), d->rowPosAt(index)));
} else {
item->setPos(QPointF(d->rowPosAt(index), d->colPosAt(index)));
@@ -1557,27 +1559,27 @@ void QFxGridView::createdItem(int index, QFxItem *item)
}
}
-void QFxGridView::destroyingItem(QFxItem *item)
+void QmlGraphicsGridView::destroyingItem(QmlGraphicsItem *item)
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
d->unrequestedItems.remove(item);
}
-void QFxGridView::refill()
+void QmlGraphicsGridView::refill()
{
- Q_D(QFxGridView);
+ Q_D(QmlGraphicsGridView);
d->refill(d->position(), d->position()+d->size()-1);
}
-QFxGridViewAttached *QFxGridView::qmlAttachedProperties(QObject *obj)
+QmlGraphicsGridViewAttached *QmlGraphicsGridView::qmlAttachedProperties(QObject *obj)
{
- return QFxGridViewAttached::properties(obj);
+ return QmlGraphicsGridViewAttached::properties(obj);
}
-QML_DEFINE_TYPE(Qt, 4,6, (QT_VERSION&0x00ff00)>>8, GridView, QFxGridView)
+QML_DEFINE_TYPE(Qt, 4,6, (QT_VERSION&0x00ff00)>>8, GridView, QmlGraphicsGridView)
QT_END_NAMESPACE
-#include "qfxgridview.moc"
+#include "qmlgraphicsgridview.moc"
diff --git a/src/declarative/fx/qfxgridview.h b/src/declarative/graphicsitems/qmlgraphicsgridview_p.h
index 1c0a700..3fd36bd 100644
--- a/src/declarative/fx/qfxgridview.h
+++ b/src/declarative/graphicsitems/qmlgraphicsgridview_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,47 +21,46 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXGRIDVIEW_H
-#define QFXGRIDVIEW_H
+#ifndef QMLGRAPHICSGRIDVIEW_H
+#define QMLGRAPHICSGRIDVIEW_H
-#include <QtDeclarative/qfxflickable.h>
+#include <private/qmlgraphicsflickable_p.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxVisualModel;
-class QFxGridViewAttached;
-class QFxGridViewPrivate;
-class Q_DECLARATIVE_EXPORT QFxGridView : public QFxFlickable
+class QmlGraphicsVisualModel;
+class QmlGraphicsGridViewAttached;
+class QmlGraphicsGridViewPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsGridView : public QmlGraphicsFlickable
{
Q_OBJECT
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxGridView)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsGridView)
Q_PROPERTY(QVariant model READ model WRITE setModel)
Q_PROPERTY(QmlComponent *delegate READ delegate WRITE setDelegate)
Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)
- Q_PROPERTY(QFxItem *currentItem READ currentItem NOTIFY currentIndexChanged)
+ Q_PROPERTY(QmlGraphicsItem *currentItem READ currentItem NOTIFY currentIndexChanged)
Q_PROPERTY(int count READ count NOTIFY countChanged)
Q_PROPERTY(QmlComponent *highlight READ highlight WRITE setHighlight)
Q_PROPERTY(bool highlightFollowsCurrentItem READ highlightFollowsCurrentItem WRITE setHighlightFollowsCurrentItem)
@@ -72,8 +72,8 @@ class Q_DECLARATIVE_EXPORT QFxGridView : public QFxFlickable
Q_CLASSINFO("DefaultProperty", "data")
public:
- QFxGridView(QFxItem *parent=0);
- ~QFxGridView();
+ QmlGraphicsGridView(QmlGraphicsItem *parent=0);
+ ~QmlGraphicsGridView();
QVariant model() const;
void setModel(const QVariant &);
@@ -84,7 +84,7 @@ public:
int currentIndex() const;
void setCurrentIndex(int idx);
- QFxItem *currentItem();
+ QmlGraphicsItem *currentItem();
int count() const;
QmlComponent *highlight() const;
@@ -110,7 +110,7 @@ public:
int cellHeight() const;
void setCellHeight(int);
- static QFxGridViewAttached *qmlAttachedProperties(QObject *);
+ static QmlGraphicsGridViewAttached *qmlAttachedProperties(QObject *);
public Q_SLOTS:
void moveCurrentIndexUp();
@@ -139,8 +139,8 @@ private Q_SLOTS:
void itemsRemoved(int index, int count);
void itemsMoved(int from, int to, int count);
void destroyRemoved();
- void createdItem(int index, QFxItem *item);
- void destroyingItem(QFxItem *item);
+ void createdItem(int index, QmlGraphicsItem *item);
+ void destroyingItem(QmlGraphicsItem *item);
void sizeChange();
private:
@@ -149,8 +149,8 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxGridView)
-QML_DECLARE_TYPEINFO(QFxGridView, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(QmlGraphicsGridView)
+QML_DECLARE_TYPEINFO(QmlGraphicsGridView, QML_HAS_ATTACHED_PROPERTIES)
QT_END_HEADER
diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/graphicsitems/qmlgraphicsimage.cpp
index 45a481c..fd220a3 100644
--- a/src/declarative/fx/qfximage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsimage.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfximage.h"
-#include "qfximage_p.h"
+#include "qmlgraphicsimage_p.h"
+#include "qmlgraphicsimage_p_p.h"
#include <QKeyEvent>
#include <QPainter>
@@ -48,10 +48,10 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Image,QFxImage)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Image,QmlGraphicsImage)
/*!
- \qmlclass Image QFxImage
+ \qmlclass Image QmlGraphicsImage
\brief The Image element allows you to add bitmaps to a scene.
\inherits Item
@@ -112,8 +112,8 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Image,QFxImage)
/*!
\internal
- \class QFxImage Image
- \brief The QFxImage class provides an image item that you can add to a QmlView.
+ \class QmlGraphicsImage Image
+ \brief The QmlGraphicsImage class provides an image item that you can add to a QmlView.
\ingroup group_coreitems
@@ -122,34 +122,34 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Image,QFxImage)
Image { source: "pics/star.png" }
\endqml
- A QFxImage object can be instantiated in Qml using the tag \l Image.
+ A QmlGraphicsImage object can be instantiated in Qml using the tag \l Image.
*/
-QFxImage::QFxImage(QFxItem *parent)
- : QFxImageBase(*(new QFxImagePrivate), parent)
+QmlGraphicsImage::QmlGraphicsImage(QmlGraphicsItem *parent)
+ : QmlGraphicsImageBase(*(new QmlGraphicsImagePrivate), parent)
{
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
-QFxImage::QFxImage(QFxImagePrivate &dd, QFxItem *parent)
- : QFxImageBase(dd, parent)
+QmlGraphicsImage::QmlGraphicsImage(QmlGraphicsImagePrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsImageBase(dd, parent)
{
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
-QFxImage::~QFxImage()
+QmlGraphicsImage::~QmlGraphicsImage()
{
}
-QPixmap QFxImage::pixmap() const
+QPixmap QmlGraphicsImage::pixmap() const
{
- Q_D(const QFxImage);
+ Q_D(const QmlGraphicsImage);
return d->pix;
}
-void QFxImage::setPixmap(const QPixmap &pix)
+void QmlGraphicsImage::setPixmap(const QPixmap &pix)
{
- Q_D(QFxImage);
+ Q_D(QmlGraphicsImage);
if (!d->url.isEmpty())
return;
d->pix = pix;
@@ -179,15 +179,15 @@ void QFxImage::setPixmap(const QPixmap &pix)
\sa examples/declarative/fillmode
\sa examples/declarative/aspectratio
*/
-QFxImage::FillMode QFxImage::fillMode() const
+QmlGraphicsImage::FillMode QmlGraphicsImage::fillMode() const
{
- Q_D(const QFxImage);
+ Q_D(const QmlGraphicsImage);
return d->fillMode;
}
-void QFxImage::setFillMode(FillMode mode)
+void QmlGraphicsImage::setFillMode(FillMode mode)
{
- Q_D(QFxImage);
+ Q_D(QmlGraphicsImage);
if (d->fillMode == mode)
return;
d->fillMode = mode;
@@ -239,9 +239,9 @@ void QFxImage::setFillMode(FillMode mode)
The URL may be absolute, or relative to the URL of the component.
*/
-void QFxImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+void QmlGraphicsImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
- Q_D(QFxImage);
+ Q_D(QmlGraphicsImage);
if (d->pix.isNull())
return;
diff --git a/src/declarative/fx/qfximage.h b/src/declarative/graphicsitems/qmlgraphicsimage_p.h
index fc8079c..76b8da5 100644
--- a/src/declarative/fx/qfximage.h
+++ b/src/declarative/graphicsitems/qmlgraphicsimage_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,38 +21,37 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXIMAGE_H
-#define QFXIMAGE_H
+#ifndef QMLGRAPHICSIMAGE_H
+#define QMLGRAPHICSIMAGE_H
#include <QtNetwork/qnetworkreply.h>
-#include "qfximagebase.h"
+#include "qmlgraphicsimagebase_p.h"
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxImagePrivate;
-class Q_DECLARATIVE_EXPORT QFxImage : public QFxImageBase
+class QmlGraphicsImagePrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsImage : public QmlGraphicsImageBase
{
Q_OBJECT
Q_ENUMS(FillMode)
@@ -60,8 +60,8 @@ class Q_DECLARATIVE_EXPORT QFxImage : public QFxImageBase
Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged)
public:
- QFxImage(QFxItem *parent=0);
- ~QFxImage();
+ QmlGraphicsImage(QmlGraphicsItem *parent=0);
+ ~QmlGraphicsImage();
enum FillMode { Stretch, PreserveAspectFit, PreserveAspectCrop, Tile, TileVertically, TileHorizontally };
FillMode fillMode() const;
@@ -76,15 +76,15 @@ Q_SIGNALS:
void fillModeChanged();
protected:
- QFxImage(QFxImagePrivate &dd, QFxItem *parent);
+ QmlGraphicsImage(QmlGraphicsImagePrivate &dd, QmlGraphicsItem *parent);
private:
- Q_DISABLE_COPY(QFxImage)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxImage)
+ Q_DISABLE_COPY(QmlGraphicsImage)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsImage)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxImage)
+QML_DECLARE_TYPE(QmlGraphicsImage)
QT_END_HEADER
-#endif // QFXIMAGE_H
+#endif // QMLGRAPHICSIMAGE_H
diff --git a/src/declarative/fx/qfximage_p.h b/src/declarative/graphicsitems/qmlgraphicsimage_p_p.h
index 8bdcc14..62a4d1e 100644
--- a/src/declarative/fx/qfximage_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsimage_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXIMAGE_P_H
-#define QFXIMAGE_P_H
+#ifndef QMLGRAPHICSIMAGE_P_H
+#define QMLGRAPHICSIMAGE_P_H
//
// W A R N I N G
@@ -53,25 +53,25 @@
// We mean it.
//
-#include "qfxitem_p.h"
-#include "qfximagebase_p.h"
+#include "qmlgraphicsitem_p.h"
+#include "qmlgraphicsimagebase_p_p.h"
QT_BEGIN_NAMESPACE
-class QFxImagePrivate : public QFxImageBasePrivate
+class QmlGraphicsImagePrivate : public QmlGraphicsImageBasePrivate
{
- Q_DECLARE_PUBLIC(QFxImage)
+ Q_DECLARE_PUBLIC(QmlGraphicsImage)
public:
- QFxImagePrivate()
- : fillMode(QFxImage::Stretch)
+ QmlGraphicsImagePrivate()
+ : fillMode(QmlGraphicsImage::Stretch)
{
}
- QFxImage::FillMode fillMode;
+ QmlGraphicsImage::FillMode fillMode;
};
QT_END_NAMESPACE
-#endif // QFXIMAGE_P_H
+#endif // QMLGRAPHICSIMAGE_P_H
diff --git a/src/declarative/fx/qfximagebase.cpp b/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp
index a68c1f9..283fb04 100644
--- a/src/declarative/fx/qfximagebase.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,82 +21,81 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfximagebase.h"
-#include "qfximagebase_p.h"
+#include "qmlgraphicsimagebase_p.h"
+#include "qmlgraphicsimagebase_p_p.h"
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QFile>
#include <QtDeclarative/qmlengine.h>
-#include <QtDeclarative/qfxpixmapcache.h>
+#include <private/qmlgraphicspixmapcache_p.h>
QT_BEGIN_NAMESPACE
-QFxImageBase::QFxImageBase(QFxItem *parent)
- : QFxItem(*(new QFxImageBasePrivate), parent)
+QmlGraphicsImageBase::QmlGraphicsImageBase(QmlGraphicsItem *parent)
+ : QmlGraphicsItem(*(new QmlGraphicsImageBasePrivate), parent)
{
setFlag(QGraphicsItem::ItemHasNoContents, true);
}
-QFxImageBase::QFxImageBase(QFxImageBasePrivate &dd, QFxItem *parent)
- : QFxItem(dd, parent)
+QmlGraphicsImageBase::QmlGraphicsImageBase(QmlGraphicsImageBasePrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsItem(dd, parent)
{
setFlag(QGraphicsItem::ItemHasNoContents, true);
}
-QFxImageBase::~QFxImageBase()
+QmlGraphicsImageBase::~QmlGraphicsImageBase()
{
- Q_D(QFxImageBase);
+ Q_D(QmlGraphicsImageBase);
if (d->pendingPixmapCache)
- QFxPixmapCache::cancelGet(d->url, this);
+ QmlGraphicsPixmapCache::cancelGet(d->url, this);
}
-QFxImageBase::Status QFxImageBase::status() const
+QmlGraphicsImageBase::Status QmlGraphicsImageBase::status() const
{
- Q_D(const QFxImageBase);
+ Q_D(const QmlGraphicsImageBase);
return d->status;
}
-qreal QFxImageBase::progress() const
+qreal QmlGraphicsImageBase::progress() const
{
- Q_D(const QFxImageBase);
+ Q_D(const QmlGraphicsImageBase);
return d->progress;
}
-QUrl QFxImageBase::source() const
+QUrl QmlGraphicsImageBase::source() const
{
- Q_D(const QFxImageBase);
+ Q_D(const QmlGraphicsImageBase);
return d->url;
}
-void QFxImageBase::setSource(const QUrl &url)
+void QmlGraphicsImageBase::setSource(const QUrl &url)
{
- Q_D(QFxImageBase);
+ Q_D(QmlGraphicsImageBase);
//equality is fairly expensive, so we bypass for simple, common case
if ((d->url.isEmpty() == url.isEmpty()) && url == d->url)
return;
if (d->pendingPixmapCache) {
- QFxPixmapCache::cancelGet(d->url, this);
+ QmlGraphicsPixmapCache::cancelGet(d->url, this);
d->pendingPixmapCache = false;
}
@@ -117,7 +117,7 @@ void QFxImageBase::setSource(const QUrl &url)
update();
} else {
d->status = Loading;
- QNetworkReply *reply = QFxPixmapCache::get(qmlEngine(this), d->url, &d->pix);
+ QNetworkReply *reply = QmlGraphicsPixmapCache::get(qmlEngine(this), d->url, &d->pix);
if (reply) {
d->pendingPixmapCache = true;
connect(reply, SIGNAL(finished()), this, SLOT(requestFinished()));
@@ -141,13 +141,13 @@ void QFxImageBase::setSource(const QUrl &url)
emit statusChanged(d->status);
}
-void QFxImageBase::requestFinished()
+void QmlGraphicsImageBase::requestFinished()
{
- Q_D(QFxImageBase);
+ Q_D(QmlGraphicsImageBase);
d->pendingPixmapCache = false;
- if (!QFxPixmapCache::find(d->url, &d->pix))
+ if (!QmlGraphicsPixmapCache::find(d->url, &d->pix))
d->status = Error;
setImplicitWidth(d->pix.width());
setImplicitHeight(d->pix.height());
@@ -161,9 +161,9 @@ void QFxImageBase::requestFinished()
update();
}
-void QFxImageBase::requestProgress(qint64 received, qint64 total)
+void QmlGraphicsImageBase::requestProgress(qint64 received, qint64 total)
{
- Q_D(QFxImageBase);
+ Q_D(QmlGraphicsImageBase);
if (d->status == Loading && total > 0) {
d->progress = qreal(received)/total;
emit progressChanged(d->progress);
diff --git a/src/declarative/fx/qfximagebase.h b/src/declarative/graphicsitems/qmlgraphicsimagebase_p.h
index 226d3c3..c8f8e85 100644
--- a/src/declarative/fx/qfximagebase.h
+++ b/src/declarative/graphicsitems/qmlgraphicsimagebase_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,35 +21,35 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXIMAGEBASE_H
-#define QFXIMAGEBASE_H
+#ifndef QMLGRAPHICSIMAGEBASE_H
+#define QMLGRAPHICSIMAGEBASE_H
-#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
-class QFxImageBasePrivate;
-class QFxImageBase : public QFxItem
+class QmlGraphicsImageBasePrivate;
+class QmlGraphicsImageBase : public QmlGraphicsItem
{
Q_OBJECT
Q_ENUMS(Status)
@@ -58,8 +59,8 @@ class QFxImageBase : public QFxItem
Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
public:
- QFxImageBase(QFxItem *parent = 0);
- ~QFxImageBase();
+ QmlGraphicsImageBase(QmlGraphicsItem *parent = 0);
+ ~QmlGraphicsImageBase();
enum Status { Null, Ready, Loading, Error };
Status status() const;
qreal progress() const;
@@ -73,18 +74,19 @@ Q_SIGNALS:
void progressChanged(qreal progress);
protected:
- QFxImageBase(QFxImageBasePrivate &dd, QFxItem *parent);
+ QmlGraphicsImageBase(QmlGraphicsImageBasePrivate &dd, QmlGraphicsItem *parent);
private Q_SLOTS:
virtual void requestFinished();
void requestProgress(qint64,qint64);
private:
- Q_DISABLE_COPY(QFxImageBase)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxImageBase)
+ Q_DISABLE_COPY(QmlGraphicsImageBase)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsImageBase)
};
QT_END_NAMESPACE
+
QT_END_HEADER
-#endif // QFXIMAGEBASE_H
+#endif // QMLGRAPHICSIMAGEBASE_H
diff --git a/src/declarative/fx/qfximagebase_p.h b/src/declarative/graphicsitems/qmlgraphicsimagebase_p_p.h
index a6fcc80..e7f85a6 100644
--- a/src/declarative/fx/qfximagebase_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsimagebase_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXIMAGEBASE_P_H
-#define QFXIMAGEBASE_P_H
+#ifndef QMLGRAPHICSIMAGEBASE_P_H
+#define QMLGRAPHICSIMAGEBASE_P_H
//
// W A R N I N G
@@ -53,26 +53,26 @@
// We mean it.
//
-#include "qfxitem_p.h"
+#include "qmlgraphicsitem_p.h"
#include <QtCore/QPointer>
QT_BEGIN_NAMESPACE
class QNetworkReply;
-class QFxImageBasePrivate : public QFxItemPrivate
+class QmlGraphicsImageBasePrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxImageBase)
+ Q_DECLARE_PUBLIC(QmlGraphicsImageBase)
public:
- QFxImageBasePrivate()
- : status(QFxImageBase::Null),
+ QmlGraphicsImageBasePrivate()
+ : status(QmlGraphicsImageBase::Null),
progress(0.0),
pendingPixmapCache(false)
{
}
QPixmap pix;
- QFxImageBase::Status status;
+ QmlGraphicsImageBase::Status status;
QUrl url;
qreal progress;
bool pendingPixmapCache;
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
index ed07696..0e741c4 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,21 +47,21 @@
#include <QNetworkRequest>
#include <QGraphicsSceneMouseEvent>
#include <QtScript/qscriptengine.h>
-#include <private/qfxperf_p.h>
+#include <private/qfxperf_p_p.h>
#include <QtGui/qgraphicstransform.h>
#include <QtGui/qgraphicseffect.h>
#include <QtDeclarative/qmlengine.h>
-#include <QtDeclarative/qmlopenmetaobject.h>
-#include "qmlstate.h"
-#include "qlistmodelinterface.h"
+#include <private/qmlopenmetaobject_p.h>
+#include <private/qmlstate_p.h>
+#include <private/qlistmodelinterface_p.h>
#include "qmlview.h"
-#include "qmlstategroup.h"
+#include <private/qmlstategroup_p.h>
-#include "qfxitem_p.h"
-#include "qfxitem.h"
-#include "qfxevents_p.h"
+#include "qmlgraphicsitem_p.h"
+#include "qmlgraphicsitem.h"
+#include <private/qmlgraphicsevents_p_p.h>
#include <qmlcomponent.h>
QT_BEGIN_NAMESPACE
@@ -70,16 +70,16 @@ QT_BEGIN_NAMESPACE
#define FLT_MAX 1E+37
#endif
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Item,QFxItem)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Item,QmlGraphicsItem)
QML_DEFINE_NOCREATE_TYPE(QGraphicsTransform);
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Scale,QGraphicsScale)
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rotation,QGraphicsRotation)
-#include "qfxeffects.cpp"
+#include "qmlgraphicseffects.cpp"
/*!
- \qmlclass Transform
+ \qmlclass Transform QGraphicsTransform
\brief The Transform elements provide a way of building advanced transformations on Items.
The Transform elements let you create and control advanced transformations that can be configured
@@ -92,7 +92,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rotation,QGraphicsRotation)
*/
/*!
- \qmlclass Scale
+ \qmlclass Scale QGraphicsScale
\brief The Scale object provides a way to scale an Item.
The Scale object gives more control over scaling than using Item's scale property. Specifically,
@@ -130,7 +130,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rotation,QGraphicsRotation)
*/
/*!
- \qmlclass Rotation
+ \qmlclass Rotation QGraphicsRotation
\brief The Rotation object provides a way to rotate an Item.
The Rotation object gives more control over rotation than using Item's rotation property.
@@ -224,13 +224,13 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rotation,QGraphicsRotation)
/*!
\internal
- \class QFxContents
+ \class QmlGraphicsContents
\ingroup group_utility
- \brief The QFxContents class gives access to the height and width of an item's contents.
+ \brief The QmlGraphicsContents class gives access to the height and width of an item's contents.
*/
-QFxContents::QFxContents() : m_x(0), m_y(0), m_width(0), m_height(0)
+QmlGraphicsContents::QmlGraphicsContents() : m_x(0), m_y(0), m_width(0), m_height(0)
{
}
@@ -245,13 +245,13 @@ QFxContents::QFxContents() : m_x(0), m_y(0), m_width(0), m_height(0)
sized to fit its children.
*/
-QRectF QFxContents::rectF() const
+QRectF QmlGraphicsContents::rectF() const
{
return QRectF(m_x, m_y, m_width, m_height);
}
//TODO: optimization: only check sender(), if there is one
-void QFxContents::calcHeight()
+void QmlGraphicsContents::calcHeight()
{
qreal oldy = m_y;
qreal oldheight = m_height;
@@ -261,8 +261,8 @@ void QFxContents::calcHeight()
QList<QGraphicsItem *> children = m_item->childItems();
for (int i = 0; i < children.count(); ++i) {
- QFxItem *child = qobject_cast<QFxItem *>(children.at(i));
- if(!child)//### Should this be ignoring non-QFxItem graphicsobjects?
+ QmlGraphicsItem *child = qobject_cast<QmlGraphicsItem *>(children.at(i));
+ if(!child)//### Should this be ignoring non-QmlGraphicsItem graphicsobjects?
continue;
qreal y = child->y();
if (y + child->height() > bottom)
@@ -279,7 +279,7 @@ void QFxContents::calcHeight()
}
//TODO: optimization: only check sender(), if there is one
-void QFxContents::calcWidth()
+void QmlGraphicsContents::calcWidth()
{
qreal oldx = m_x;
qreal oldwidth = m_width;
@@ -289,8 +289,8 @@ void QFxContents::calcWidth()
QList<QGraphicsItem *> children = m_item->childItems();
for (int i = 0; i < children.count(); ++i) {
- QFxItem *child = qobject_cast<QFxItem *>(children.at(i));
- if(!child)//### Should this be ignoring non-QFxItem graphicsobjects?
+ QmlGraphicsItem *child = qobject_cast<QmlGraphicsItem *>(children.at(i));
+ if(!child)//### Should this be ignoring non-QmlGraphicsItem graphicsobjects?
continue;
qreal x = child->x();
if (x + child->width() > right)
@@ -306,14 +306,14 @@ void QFxContents::calcWidth()
emit rectChanged();
}
-void QFxContents::setItem(QFxItem *item)
+void QmlGraphicsContents::setItem(QmlGraphicsItem *item)
{
m_item = item;
QList<QGraphicsItem *> children = m_item->childItems();
for (int i = 0; i < children.count(); ++i) {
- QFxItem *child = qobject_cast<QFxItem *>(children.at(i));
- if(!child)//### Should this be ignoring non-QFxItem graphicsobjects?
+ QmlGraphicsItem *child = qobject_cast<QmlGraphicsItem *>(children.at(i));
+ if(!child)//### Should this be ignoring non-QmlGraphicsItem graphicsobjects?
continue;
connect(child, SIGNAL(heightChanged()), this, SLOT(calcHeight()));
connect(child, SIGNAL(yChanged()), this, SLOT(calcHeight()));
@@ -327,16 +327,16 @@ void QFxContents::setItem(QFxItem *item)
}
/*
- Key filters can be installed on a QFxItem, but not removed. Currently they
+ Key filters can be installed on a QmlGraphicsItem, but not removed. Currently they
are only used by attached objects (which are only destroyed on Item
destruction), so this isn't a problem. If in future this becomes any form
of public API, they will have to support removal too.
*/
-class QFxItemKeyFilter
+class QmlGraphicsItemKeyFilter
{
public:
- QFxItemKeyFilter(QFxItem * = 0);
- virtual ~QFxItemKeyFilter();
+ QmlGraphicsItemKeyFilter(QmlGraphicsItem * = 0);
+ virtual ~QmlGraphicsItemKeyFilter();
virtual void keyPressed(QKeyEvent *event);
virtual void keyReleased(QKeyEvent *event);
@@ -345,84 +345,84 @@ public:
virtual void componentComplete();
private:
- QFxItemKeyFilter *m_next;
+ QmlGraphicsItemKeyFilter *m_next;
};
-QFxItemKeyFilter::QFxItemKeyFilter(QFxItem *item)
+QmlGraphicsItemKeyFilter::QmlGraphicsItemKeyFilter(QmlGraphicsItem *item)
: m_next(0)
{
- QFxItemPrivate *p =
- item?static_cast<QFxItemPrivate *>(QGraphicsItemPrivate::get(item)):0;
+ QmlGraphicsItemPrivate *p =
+ item?static_cast<QmlGraphicsItemPrivate *>(QGraphicsItemPrivate::get(item)):0;
if (p) {
m_next = p->keyHandler;
p->keyHandler = this;
}
}
-QFxItemKeyFilter::~QFxItemKeyFilter()
+QmlGraphicsItemKeyFilter::~QmlGraphicsItemKeyFilter()
{
}
-void QFxItemKeyFilter::keyPressed(QKeyEvent *event)
+void QmlGraphicsItemKeyFilter::keyPressed(QKeyEvent *event)
{
if (m_next) m_next->keyPressed(event);
}
-void QFxItemKeyFilter::keyReleased(QKeyEvent *event)
+void QmlGraphicsItemKeyFilter::keyReleased(QKeyEvent *event)
{
if (m_next) m_next->keyReleased(event);
}
-void QFxItemKeyFilter::inputMethodEvent(QInputMethodEvent *event)
+void QmlGraphicsItemKeyFilter::inputMethodEvent(QInputMethodEvent *event)
{
if (m_next) m_next->inputMethodEvent(event);
}
-QVariant QFxItemKeyFilter::inputMethodQuery(Qt::InputMethodQuery query) const
+QVariant QmlGraphicsItemKeyFilter::inputMethodQuery(Qt::InputMethodQuery query) const
{
if (m_next) return m_next->inputMethodQuery(query);
return QVariant();
}
-void QFxItemKeyFilter::componentComplete()
+void QmlGraphicsItemKeyFilter::componentComplete()
{
if (m_next) m_next->componentComplete();
}
-class QFxKeyNavigationAttachedPrivate : public QObjectPrivate
+class QmlGraphicsKeyNavigationAttachedPrivate : public QObjectPrivate
{
public:
- QFxKeyNavigationAttachedPrivate()
+ QmlGraphicsKeyNavigationAttachedPrivate()
: QObjectPrivate(), left(0), right(0), up(0), down(0) {}
- QFxItem *left;
- QFxItem *right;
- QFxItem *up;
- QFxItem *down;
+ QmlGraphicsItem *left;
+ QmlGraphicsItem *right;
+ QmlGraphicsItem *up;
+ QmlGraphicsItem *down;
};
-class QFxKeyNavigationAttached : public QObject, public QFxItemKeyFilter
+class QmlGraphicsKeyNavigationAttached : public QObject, public QmlGraphicsItemKeyFilter
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QFxKeyNavigationAttached)
+ Q_DECLARE_PRIVATE(QmlGraphicsKeyNavigationAttached)
- Q_PROPERTY(QFxItem *left READ left WRITE setLeft NOTIFY changed)
- Q_PROPERTY(QFxItem *right READ right WRITE setRight NOTIFY changed)
- Q_PROPERTY(QFxItem *up READ up WRITE setUp NOTIFY changed)
- Q_PROPERTY(QFxItem *down READ down WRITE setDown NOTIFY changed)
+ Q_PROPERTY(QmlGraphicsItem *left READ left WRITE setLeft NOTIFY changed)
+ Q_PROPERTY(QmlGraphicsItem *right READ right WRITE setRight NOTIFY changed)
+ Q_PROPERTY(QmlGraphicsItem *up READ up WRITE setUp NOTIFY changed)
+ Q_PROPERTY(QmlGraphicsItem *down READ down WRITE setDown NOTIFY changed)
public:
- QFxKeyNavigationAttached(QObject * = 0);
+ QmlGraphicsKeyNavigationAttached(QObject * = 0);
- QFxItem *left() const;
- void setLeft(QFxItem *);
- QFxItem *right() const;
- void setRight(QFxItem *);
- QFxItem *up() const;
- void setUp(QFxItem *);
- QFxItem *down() const;
- void setDown(QFxItem *);
+ QmlGraphicsItem *left() const;
+ void setLeft(QmlGraphicsItem *);
+ QmlGraphicsItem *right() const;
+ void setRight(QmlGraphicsItem *);
+ QmlGraphicsItem *up() const;
+ void setUp(QmlGraphicsItem *);
+ QmlGraphicsItem *down() const;
+ void setDown(QmlGraphicsItem *);
- static QFxKeyNavigationAttached *qmlAttachedProperties(QObject *);
+ static QmlGraphicsKeyNavigationAttached *qmlAttachedProperties(QObject *);
Q_SIGNALS:
void changed();
@@ -432,73 +432,73 @@ private:
virtual void keyReleased(QKeyEvent *event);
};
-QFxKeyNavigationAttached::QFxKeyNavigationAttached(QObject *parent)
-: QObject(*(new QFxKeyNavigationAttachedPrivate), parent),
- QFxItemKeyFilter(qobject_cast<QFxItem*>(parent))
+QmlGraphicsKeyNavigationAttached::QmlGraphicsKeyNavigationAttached(QObject *parent)
+: QObject(*(new QmlGraphicsKeyNavigationAttachedPrivate), parent),
+ QmlGraphicsItemKeyFilter(qobject_cast<QmlGraphicsItem*>(parent))
{
}
-QFxKeyNavigationAttached *
-QFxKeyNavigationAttached::qmlAttachedProperties(QObject *obj)
+QmlGraphicsKeyNavigationAttached *
+QmlGraphicsKeyNavigationAttached::qmlAttachedProperties(QObject *obj)
{
- return new QFxKeyNavigationAttached(obj);
+ return new QmlGraphicsKeyNavigationAttached(obj);
}
-QFxItem *QFxKeyNavigationAttached::left() const
+QmlGraphicsItem *QmlGraphicsKeyNavigationAttached::left() const
{
- Q_D(const QFxKeyNavigationAttached);
+ Q_D(const QmlGraphicsKeyNavigationAttached);
return d->left;
}
-void QFxKeyNavigationAttached::setLeft(QFxItem *i)
+void QmlGraphicsKeyNavigationAttached::setLeft(QmlGraphicsItem *i)
{
- Q_D(QFxKeyNavigationAttached);
+ Q_D(QmlGraphicsKeyNavigationAttached);
d->left = i;
emit changed();
}
-QFxItem *QFxKeyNavigationAttached::right() const
+QmlGraphicsItem *QmlGraphicsKeyNavigationAttached::right() const
{
- Q_D(const QFxKeyNavigationAttached);
+ Q_D(const QmlGraphicsKeyNavigationAttached);
return d->right;
}
-void QFxKeyNavigationAttached::setRight(QFxItem *i)
+void QmlGraphicsKeyNavigationAttached::setRight(QmlGraphicsItem *i)
{
- Q_D(QFxKeyNavigationAttached);
+ Q_D(QmlGraphicsKeyNavigationAttached);
d->right = i;
emit changed();
}
-QFxItem *QFxKeyNavigationAttached::up() const
+QmlGraphicsItem *QmlGraphicsKeyNavigationAttached::up() const
{
- Q_D(const QFxKeyNavigationAttached);
+ Q_D(const QmlGraphicsKeyNavigationAttached);
return d->up;
}
-void QFxKeyNavigationAttached::setUp(QFxItem *i)
+void QmlGraphicsKeyNavigationAttached::setUp(QmlGraphicsItem *i)
{
- Q_D(QFxKeyNavigationAttached);
+ Q_D(QmlGraphicsKeyNavigationAttached);
d->up = i;
emit changed();
}
-QFxItem *QFxKeyNavigationAttached::down() const
+QmlGraphicsItem *QmlGraphicsKeyNavigationAttached::down() const
{
- Q_D(const QFxKeyNavigationAttached);
+ Q_D(const QmlGraphicsKeyNavigationAttached);
return d->down;
}
-void QFxKeyNavigationAttached::setDown(QFxItem *i)
+void QmlGraphicsKeyNavigationAttached::setDown(QmlGraphicsItem *i)
{
- Q_D(QFxKeyNavigationAttached);
+ Q_D(QmlGraphicsKeyNavigationAttached);
d->down = i;
emit changed();
}
-void QFxKeyNavigationAttached::keyPressed(QKeyEvent *event)
+void QmlGraphicsKeyNavigationAttached::keyPressed(QKeyEvent *event)
{
- Q_D(QFxKeyNavigationAttached);
+ Q_D(QmlGraphicsKeyNavigationAttached);
event->ignore();
@@ -531,12 +531,12 @@ void QFxKeyNavigationAttached::keyPressed(QKeyEvent *event)
break;
}
- if (!event->isAccepted()) QFxItemKeyFilter::keyPressed(event);
+ if (!event->isAccepted()) QmlGraphicsItemKeyFilter::keyPressed(event);
}
-void QFxKeyNavigationAttached::keyReleased(QKeyEvent *event)
+void QmlGraphicsKeyNavigationAttached::keyReleased(QKeyEvent *event)
{
- Q_D(QFxKeyNavigationAttached);
+ Q_D(QmlGraphicsKeyNavigationAttached);
event->ignore();
@@ -565,7 +565,7 @@ void QFxKeyNavigationAttached::keyReleased(QKeyEvent *event)
break;
}
- if (!event->isAccepted()) QFxItemKeyFilter::keyReleased(event);
+ if (!event->isAccepted()) QmlGraphicsItemKeyFilter::keyReleased(event);
}
/*!
@@ -895,10 +895,10 @@ void QFxKeyNavigationAttached::keyReleased(QKeyEvent *event)
*/
-class QFxKeysAttachedPrivate : public QObjectPrivate
+class QmlGraphicsKeysAttachedPrivate : public QObjectPrivate
{
public:
- QFxKeysAttachedPrivate()
+ QmlGraphicsKeysAttachedPrivate()
: QObjectPrivate(), inPress(false), inRelease(false)
, inIM(false), enabled(true), imeItem(0), item(0)
{}
@@ -921,82 +921,82 @@ public:
bool enabled : 1;
QGraphicsItem *imeItem;
- QList<QFxItem *> targets;
- QFxItem *item;
+ QList<QmlGraphicsItem *> targets;
+ QmlGraphicsItem *item;
};
-class QFxKeysAttached : public QObject, public QFxItemKeyFilter
+class QmlGraphicsKeysAttached : public QObject, public QmlGraphicsItemKeyFilter
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QFxKeysAttached)
+ Q_DECLARE_PRIVATE(QmlGraphicsKeysAttached)
Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
- Q_PROPERTY(QList<QFxItem *> *forwardTo READ forwardTo)
+ Q_PROPERTY(QList<QmlGraphicsItem *> *forwardTo READ forwardTo)
public:
- QFxKeysAttached(QObject *parent=0);
- ~QFxKeysAttached();
+ QmlGraphicsKeysAttached(QObject *parent=0);
+ ~QmlGraphicsKeysAttached();
- bool enabled() const { Q_D(const QFxKeysAttached); return d->enabled; }
+ bool enabled() const { Q_D(const QmlGraphicsKeysAttached); return d->enabled; }
void setEnabled(bool enabled) {
- Q_D(QFxKeysAttached);
+ Q_D(QmlGraphicsKeysAttached);
if (enabled != d->enabled) {
d->enabled = enabled;
emit enabledChanged();
}
}
- QList<QFxItem *> *forwardTo() {
- Q_D(QFxKeysAttached);
+ QList<QmlGraphicsItem *> *forwardTo() {
+ Q_D(QmlGraphicsKeysAttached);
return &d->targets;
}
virtual void componentComplete();
- static QFxKeysAttached *qmlAttachedProperties(QObject *);
+ static QmlGraphicsKeysAttached *qmlAttachedProperties(QObject *);
Q_SIGNALS:
void enabledChanged();
- void pressed(QFxKeyEvent *event);
- void released(QFxKeyEvent *event);
- void digit0Pressed(QFxKeyEvent *event);
- void digit1Pressed(QFxKeyEvent *event);
- void digit2Pressed(QFxKeyEvent *event);
- void digit3Pressed(QFxKeyEvent *event);
- void digit4Pressed(QFxKeyEvent *event);
- void digit5Pressed(QFxKeyEvent *event);
- void digit6Pressed(QFxKeyEvent *event);
- void digit7Pressed(QFxKeyEvent *event);
- void digit8Pressed(QFxKeyEvent *event);
- void digit9Pressed(QFxKeyEvent *event);
-
- void leftPressed(QFxKeyEvent *event);
- void rightPressed(QFxKeyEvent *event);
- void upPressed(QFxKeyEvent *event);
- void downPressed(QFxKeyEvent *event);
-
- void asteriskPressed(QFxKeyEvent *event);
- void numberSignPressed(QFxKeyEvent *event);
- void escapePressed(QFxKeyEvent *event);
- void returnPressed(QFxKeyEvent *event);
- void enterPressed(QFxKeyEvent *event);
- void deletePressed(QFxKeyEvent *event);
- void spacePressed(QFxKeyEvent *event);
- void backPressed(QFxKeyEvent *event);
- void cancelPressed(QFxKeyEvent *event);
- void selectPressed(QFxKeyEvent *event);
- void yesPressed(QFxKeyEvent *event);
- void noPressed(QFxKeyEvent *event);
- void context1Pressed(QFxKeyEvent *event);
- void context2Pressed(QFxKeyEvent *event);
- void context3Pressed(QFxKeyEvent *event);
- void context4Pressed(QFxKeyEvent *event);
- void callPressed(QFxKeyEvent *event);
- void hangupPressed(QFxKeyEvent *event);
- void flipPressed(QFxKeyEvent *event);
- void menuPressed(QFxKeyEvent *event);
- void volumeUpPressed(QFxKeyEvent *event);
- void volumeDownPressed(QFxKeyEvent *event);
+ void pressed(QmlGraphicsKeyEvent *event);
+ void released(QmlGraphicsKeyEvent *event);
+ void digit0Pressed(QmlGraphicsKeyEvent *event);
+ void digit1Pressed(QmlGraphicsKeyEvent *event);
+ void digit2Pressed(QmlGraphicsKeyEvent *event);
+ void digit3Pressed(QmlGraphicsKeyEvent *event);
+ void digit4Pressed(QmlGraphicsKeyEvent *event);
+ void digit5Pressed(QmlGraphicsKeyEvent *event);
+ void digit6Pressed(QmlGraphicsKeyEvent *event);
+ void digit7Pressed(QmlGraphicsKeyEvent *event);
+ void digit8Pressed(QmlGraphicsKeyEvent *event);
+ void digit9Pressed(QmlGraphicsKeyEvent *event);
+
+ void leftPressed(QmlGraphicsKeyEvent *event);
+ void rightPressed(QmlGraphicsKeyEvent *event);
+ void upPressed(QmlGraphicsKeyEvent *event);
+ void downPressed(QmlGraphicsKeyEvent *event);
+
+ void asteriskPressed(QmlGraphicsKeyEvent *event);
+ void numberSignPressed(QmlGraphicsKeyEvent *event);
+ void escapePressed(QmlGraphicsKeyEvent *event);
+ void returnPressed(QmlGraphicsKeyEvent *event);
+ void enterPressed(QmlGraphicsKeyEvent *event);
+ void deletePressed(QmlGraphicsKeyEvent *event);
+ void spacePressed(QmlGraphicsKeyEvent *event);
+ void backPressed(QmlGraphicsKeyEvent *event);
+ void cancelPressed(QmlGraphicsKeyEvent *event);
+ void selectPressed(QmlGraphicsKeyEvent *event);
+ void yesPressed(QmlGraphicsKeyEvent *event);
+ void noPressed(QmlGraphicsKeyEvent *event);
+ void context1Pressed(QmlGraphicsKeyEvent *event);
+ void context2Pressed(QmlGraphicsKeyEvent *event);
+ void context3Pressed(QmlGraphicsKeyEvent *event);
+ void context4Pressed(QmlGraphicsKeyEvent *event);
+ void callPressed(QmlGraphicsKeyEvent *event);
+ void hangupPressed(QmlGraphicsKeyEvent *event);
+ void flipPressed(QmlGraphicsKeyEvent *event);
+ void menuPressed(QmlGraphicsKeyEvent *event);
+ void volumeUpPressed(QmlGraphicsKeyEvent *event);
+ void volumeDownPressed(QmlGraphicsKeyEvent *event);
private:
virtual void keyPressed(QKeyEvent *event);
@@ -1026,7 +1026,7 @@ private:
static const SigMap sigMap[];
};
-const QFxKeysAttached::SigMap QFxKeysAttached::sigMap[] = {
+const QmlGraphicsKeysAttached::SigMap QmlGraphicsKeysAttached::sigMap[] = {
{ Qt::Key_Left, "leftPressed" },
{ Qt::Key_Right, "rightPressed" },
{ Qt::Key_Up, "upPressed" },
@@ -1056,26 +1056,26 @@ const QFxKeysAttached::SigMap QFxKeysAttached::sigMap[] = {
{ 0, 0 }
};
-bool QFxKeysAttachedPrivate::isConnected(const char *signalName)
+bool QmlGraphicsKeysAttachedPrivate::isConnected(const char *signalName)
{
return isSignalConnected(signalIndex(signalName));
}
-QFxKeysAttached::QFxKeysAttached(QObject *parent)
-: QObject(*(new QFxKeysAttachedPrivate), parent),
- QFxItemKeyFilter(qobject_cast<QFxItem*>(parent))
+QmlGraphicsKeysAttached::QmlGraphicsKeysAttached(QObject *parent)
+: QObject(*(new QmlGraphicsKeysAttachedPrivate), parent),
+ QmlGraphicsItemKeyFilter(qobject_cast<QmlGraphicsItem*>(parent))
{
- Q_D(QFxKeysAttached);
- d->item = qobject_cast<QFxItem*>(parent);
+ Q_D(QmlGraphicsKeysAttached);
+ d->item = qobject_cast<QmlGraphicsItem*>(parent);
}
-QFxKeysAttached::~QFxKeysAttached()
+QmlGraphicsKeysAttached::~QmlGraphicsKeysAttached()
{
}
-void QFxKeysAttached::componentComplete()
+void QmlGraphicsKeysAttached::componentComplete()
{
- Q_D(QFxKeysAttached);
+ Q_D(QmlGraphicsKeysAttached);
if (d->item) {
for (int ii = 0; ii < d->targets.count(); ++ii) {
QGraphicsItem *targetItem = d->finalFocusProxy(d->targets.at(ii));
@@ -1087,9 +1087,9 @@ void QFxKeysAttached::componentComplete()
}
}
-void QFxKeysAttached::keyPressed(QKeyEvent *event)
+void QmlGraphicsKeysAttached::keyPressed(QKeyEvent *event)
{
- Q_D(QFxKeysAttached);
+ Q_D(QmlGraphicsKeysAttached);
if (!d->enabled || d->inPress) {
event->ignore();
return;
@@ -1111,27 +1111,27 @@ void QFxKeysAttached::keyPressed(QKeyEvent *event)
d->inPress = false;
}
- QFxKeyEvent ke(*event);
+ QmlGraphicsKeyEvent ke(*event);
QByteArray keySignal = keyToSignal(event->key());
if (!keySignal.isEmpty()) {
- keySignal += "(QFxKeyEvent*)";
+ keySignal += "(QmlGraphicsKeyEvent*)";
if (d->isConnected(keySignal)) {
// If we specifically handle a key then default to accepted
ke.setAccepted(true);
- int idx = QFxKeysAttached::staticMetaObject.indexOfSignal(keySignal);
- metaObject()->method(idx).invoke(this, Q_ARG(QFxKeysAttached, &ke));
+ int idx = QmlGraphicsKeysAttached::staticMetaObject.indexOfSignal(keySignal);
+ metaObject()->method(idx).invoke(this, Q_ARG(QmlGraphicsKeysAttached, &ke));
}
}
if (!ke.isAccepted())
emit pressed(&ke);
event->setAccepted(ke.isAccepted());
- if (!event->isAccepted()) QFxItemKeyFilter::keyPressed(event);
+ if (!event->isAccepted()) QmlGraphicsItemKeyFilter::keyPressed(event);
}
-void QFxKeysAttached::keyReleased(QKeyEvent *event)
+void QmlGraphicsKeysAttached::keyReleased(QKeyEvent *event)
{
- Q_D(QFxKeysAttached);
+ Q_D(QmlGraphicsKeysAttached);
if (!d->enabled || d->inRelease) {
event->ignore();
return;
@@ -1152,16 +1152,16 @@ void QFxKeysAttached::keyReleased(QKeyEvent *event)
d->inRelease = false;
}
- QFxKeyEvent ke(*event);
+ QmlGraphicsKeyEvent ke(*event);
emit released(&ke);
event->setAccepted(ke.isAccepted());
- if (!event->isAccepted()) QFxItemKeyFilter::keyReleased(event);
+ if (!event->isAccepted()) QmlGraphicsItemKeyFilter::keyReleased(event);
}
-void QFxKeysAttached::inputMethodEvent(QInputMethodEvent *event)
+void QmlGraphicsKeysAttached::inputMethodEvent(QInputMethodEvent *event)
{
- Q_D(QFxKeysAttached);
+ Q_D(QmlGraphicsKeysAttached);
if (d->item && !d->inIM && d->item->scene()) {
d->inIM = true;
for (int ii = 0; ii < d->targets.count(); ++ii) {
@@ -1177,10 +1177,10 @@ void QFxKeysAttached::inputMethodEvent(QInputMethodEvent *event)
}
d->inIM = false;
}
- if (!event->isAccepted()) QFxItemKeyFilter::inputMethodEvent(event);
+ if (!event->isAccepted()) QmlGraphicsItemKeyFilter::inputMethodEvent(event);
}
-class QFxItemAccessor : public QGraphicsItem
+class QmlGraphicsItemAccessor : public QGraphicsItem
{
public:
QVariant doInputMethodQuery(Qt::InputMethodQuery query) const {
@@ -1188,43 +1188,43 @@ public:
}
};
-QVariant QFxKeysAttached::inputMethodQuery(Qt::InputMethodQuery query) const
+QVariant QmlGraphicsKeysAttached::inputMethodQuery(Qt::InputMethodQuery query) const
{
- Q_D(const QFxKeysAttached);
+ Q_D(const QmlGraphicsKeysAttached);
if (d->item) {
for (int ii = 0; ii < d->targets.count(); ++ii) {
QGraphicsItem *i = d->finalFocusProxy(d->targets.at(ii));
if (i && (i->flags() & QGraphicsItem::ItemAcceptsInputMethod) && i == d->imeItem) { //### how robust is i == d->imeItem check?
- QVariant v = static_cast<QFxItemAccessor *>(i)->doInputMethodQuery(query);
+ QVariant v = static_cast<QmlGraphicsItemAccessor *>(i)->doInputMethodQuery(query);
if (v.type() == QVariant::RectF)
v = d->item->mapRectFromItem(i, v.toRectF()); //### cost?
return v;
}
}
}
- return QFxItemKeyFilter::inputMethodQuery(query);
+ return QmlGraphicsItemKeyFilter::inputMethodQuery(query);
}
-QFxKeysAttached *QFxKeysAttached::qmlAttachedProperties(QObject *obj)
+QmlGraphicsKeysAttached *QmlGraphicsKeysAttached::qmlAttachedProperties(QObject *obj)
{
- return new QFxKeysAttached(obj);
+ return new QmlGraphicsKeysAttached(obj);
}
/*!
- \class QFxItem
- \brief The QFxItem class provides the most basic of all visual items in QML.
+ \class QmlGraphicsItem
+ \brief The QmlGraphicsItem class provides the most basic of all visual items in QML.
- All visual items in Qt Declarative inherit from QFxItem. Although QFxItem
+ All visual items in Qt Declarative inherit from QmlGraphicsItem. Although QmlGraphicsItem
has no visual appearance, it defines all the properties that are
common across visual items - such as the x and y position, the
width and height, \l {anchor-layout}{anchoring} and key handling.
- You can subclass QFxItem to provide your own custom visual item that inherits
+ You can subclass QmlGraphicsItem to provide your own custom visual item that inherits
these features.
*/
/*!
- \qmlclass Item QFxItem
+ \qmlclass Item QmlGraphicsItem
\brief The Item is the most basic of all visual items in QML.
All visual items in Qt Declarative inherit from Item. Although Item
@@ -1285,92 +1285,114 @@ QFxKeysAttached *QFxKeysAttached::qmlAttachedProperties(QObject *obj)
*/
/*!
- \fn void QFxItem::baselineOffsetChanged()
-
- This signal is emitted when the baseline offset of the item
- is changed.
+ \property QmlGraphicsItem::baseline
+ \internal
*/
/*!
- \fn void QFxItem::widthChanged()
-
- This signal is emitted when the width of the item changes.
+ \property QmlGraphicsItem::effect
+ \internal
*/
/*!
- \fn void QFxItem::heightChanged()
+ \property QmlGraphicsItem::focus
+ \internal
+*/
- This signal is emitted when the height of the item changes.
+/*!
+ \property QmlGraphicsItem::wantsFocus
+ \internal
*/
/*!
- \fn void QFxItem::stateChanged(const QString &state)
+ \property QmlGraphicsItem::transformOrigin
+ \internal
+*/
- This signal is emitted when the \a state of the item changes.
+/*!
+ \fn void QmlGraphicsItem::childrenRectChanged()
+ \internal
+*/
- \sa {qmlstates}{States}
+/*!
+ \fn void QmlGraphicsItem::baselineOffsetChanged()
+ \internal
*/
/*!
- \fn void QFxItem::parentChanged()
+ \fn void QmlGraphicsItem::widthChanged()
+ \internal
+*/
- This signal is emitted when the parent of the item changes.
+/*!
+ \fn void QmlGraphicsItem::heightChanged()
+ \internal
+*/
- \sa setParentItem()
+/*!
+ \fn void QmlGraphicsItem::stateChanged(const QString &state)
+ \internal
*/
/*!
- \fn void QFxItem::focusChanged()
+ \fn void QmlGraphicsItem::parentChanged()
+ \internal
+*/
- This signal is emitted when the item's focus state changes.
+/*!
+ \fn void QmlGraphicsItem::focusChanged()
+ \internal
+*/
- \sa QFxItem::setFocus()
+/*!
+ \fn void QmlGraphicsItem::wantsFocusChanged()
+ \internal
*/
static inline void qfxitem_registerAnchorLine() {
static bool registered = false;
if (!registered) {
- qRegisterMetaType<QFxAnchorLine>("QFxAnchorLine");
+ qRegisterMetaType<QmlGraphicsAnchorLine>("QmlGraphicsAnchorLine");
registered = true;
}
}
/*!
- \fn QFxItem::QFxItem(QFxItem *parent)
+ \fn QmlGraphicsItem::QmlGraphicsItem(QmlGraphicsItem *parent)
- Constructs a QFxItem with the given \a parent.
+ Constructs a QmlGraphicsItem with the given \a parent.
*/
-QFxItem::QFxItem(QFxItem* parent)
- : QGraphicsObject(*(new QFxItemPrivate), parent, 0)
+QmlGraphicsItem::QmlGraphicsItem(QmlGraphicsItem* parent)
+ : QGraphicsObject(*(new QmlGraphicsItemPrivate), parent, 0)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
qfxitem_registerAnchorLine();
d->init(parent);
}
/*! \internal
*/
-QFxItem::QFxItem(QFxItemPrivate &dd, QFxItem *parent)
+QmlGraphicsItem::QmlGraphicsItem(QmlGraphicsItemPrivate &dd, QmlGraphicsItem *parent)
: QGraphicsObject(dd, parent, 0)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
qfxitem_registerAnchorLine();
d->init(parent);
}
/*!
- Destroys the QFxItem.
+ Destroys the QmlGraphicsItem.
*/
-QFxItem::~QFxItem()
+QmlGraphicsItem::~QmlGraphicsItem()
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
for (int ii = 0; ii < d->dependantAnchors.count(); ++ii) {
- QFxAnchors *anchor = d->dependantAnchors.at(ii);
+ QmlGraphicsAnchors *anchor = d->dependantAnchors.at(ii);
anchor->d_func()->clearItem(this);
}
if (!d->parent || (parentItem() && !parentItem()->QGraphicsItem::d_ptr->inDestructor))
for (int ii = 0; ii < d->dependantAnchors.count(); ++ii) {
- QFxAnchors *anchor = d->dependantAnchors.at(ii);
+ QmlGraphicsAnchors *anchor = d->dependantAnchors.at(ii);
if (anchor->d_func()->item && anchor->d_func()->item->parentItem() != this) //child will be deleted anyway
anchor->d_func()->updateOnComplete();
}
@@ -1405,12 +1427,12 @@ QFxItem::~QFxItem()
*/
/*!
- \property QFxItem::parent
+ \property QmlGraphicsItem::parent
This property holds the parent of the item.
*/
-void QFxItem::setParentItem(QFxItem *parent)
+void QmlGraphicsItem::setParentItem(QmlGraphicsItem *parent)
{
- QFxItem *oldParent = parentItem();
+ QmlGraphicsItem *oldParent = parentItem();
if (parent == oldParent || !parent) return;
QObject::setParent(parent);
@@ -1418,11 +1440,11 @@ void QFxItem::setParentItem(QFxItem *parent)
}
/*!
- Returns the QFxItem parent of this item.
+ Returns the QmlGraphicsItem parent of this item.
*/
-QFxItem *QFxItem::parentItem() const
+QmlGraphicsItem *QmlGraphicsItem::parentItem() const
{
- return qobject_cast<QFxItem *>(QGraphicsObject::parentItem());
+ return qobject_cast<QmlGraphicsItem *>(QGraphicsObject::parentItem());
}
/*!
@@ -1453,16 +1475,13 @@ QFxItem *QFxItem::parentItem() const
*/
/*!
- \property QFxItem::children
-
- This property contains the list of visual children of this item.
+ \property QmlGraphicsItem::children
+ \internal
*/
/*!
- \property QFxItem::resources
-
- This property contains non-visual resources that you want to
- reference by name.
+ \property QmlGraphicsItem::resources
+ \internal
*/
/*!
@@ -1474,84 +1493,86 @@ QFxItem *QFxItem::parentItem() const
\sa componentComplete()
*/
-bool QFxItem::isComponentComplete() const
+bool QmlGraphicsItem::isComponentComplete() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->_componentComplete;
}
/*!
- \property QFxItem::anchors
- \brief The anchors (alignments) used by the item.
+ \property QmlGraphicsItem::anchors
+ \internal
*/
-QFxAnchors *QFxItem::anchors()
+
+/*! \internal */
+QmlGraphicsAnchors *QmlGraphicsItem::anchors()
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
return d->anchors();
}
-void QFxItemPrivate::data_removeAt(int)
+void QmlGraphicsItemPrivate::data_removeAt(int)
{
// ###
}
-int QFxItemPrivate::data_count() const
+int QmlGraphicsItemPrivate::data_count() const
{
// ###
return 0;
}
-void QFxItemPrivate::data_append(QObject *o)
+void QmlGraphicsItemPrivate::data_append(QObject *o)
{
- Q_Q(QFxItem);
- QFxItem *i = qobject_cast<QFxItem *>(o);
+ Q_Q(QmlGraphicsItem);
+ QmlGraphicsItem *i = qobject_cast<QmlGraphicsItem *>(o);
if (i)
q->fxChildren()->append(i);
else
resources_append(o);
}
-void QFxItemPrivate::data_insert(int, QObject *)
+void QmlGraphicsItemPrivate::data_insert(int, QObject *)
{
// ###
}
-QObject *QFxItemPrivate::data_at(int) const
+QObject *QmlGraphicsItemPrivate::data_at(int) const
{
// ###
return 0;
}
-void QFxItemPrivate::data_clear()
+void QmlGraphicsItemPrivate::data_clear()
{
// ###
}
-void QFxItemPrivate::resources_removeAt(int)
+void QmlGraphicsItemPrivate::resources_removeAt(int)
{
// ###
}
-int QFxItemPrivate::resources_count() const
+int QmlGraphicsItemPrivate::resources_count() const
{
- Q_Q(const QFxItem);
+ Q_Q(const QmlGraphicsItem);
return q->children().count();
}
-void QFxItemPrivate::resources_append(QObject *o)
+void QmlGraphicsItemPrivate::resources_append(QObject *o)
{
- Q_Q(QFxItem);
+ Q_Q(QmlGraphicsItem);
o->setParent(q);
}
-void QFxItemPrivate::resources_insert(int, QObject *)
+void QmlGraphicsItemPrivate::resources_insert(int, QObject *)
{
// ###
}
-QObject *QFxItemPrivate::resources_at(int idx) const
+QObject *QmlGraphicsItemPrivate::resources_at(int idx) const
{
- Q_Q(const QFxItem);
+ Q_Q(const QmlGraphicsItem);
QObjectList children = q->children();
if (idx < children.count())
return children.at(idx);
@@ -1559,50 +1580,50 @@ QObject *QFxItemPrivate::resources_at(int idx) const
return 0;
}
-void QFxItemPrivate::resources_clear()
+void QmlGraphicsItemPrivate::resources_clear()
{
// ###
}
-void QFxItemPrivate::children_removeAt(int)
+void QmlGraphicsItemPrivate::children_removeAt(int)
{
// ###
}
-int QFxItemPrivate::children_count() const
+int QmlGraphicsItemPrivate::children_count() const
{
- Q_Q(const QFxItem);
+ Q_Q(const QmlGraphicsItem);
return q->childItems().count();
}
-void QFxItemPrivate::children_append(QFxItem *i)
+void QmlGraphicsItemPrivate::children_append(QmlGraphicsItem *i)
{
- Q_Q(QFxItem);
+ Q_Q(QmlGraphicsItem);
i->setParentItem(q);
}
-void QFxItemPrivate::children_insert(int, QFxItem *)
+void QmlGraphicsItemPrivate::children_insert(int, QmlGraphicsItem *)
{
// ###
}
-QFxItem *QFxItemPrivate::children_at(int idx) const
+QmlGraphicsItem *QmlGraphicsItemPrivate::children_at(int idx) const
{
- Q_Q(const QFxItem);
+ Q_Q(const QmlGraphicsItem);
QList<QGraphicsItem *> children = q->childItems();
if (idx < children.count())
- return qobject_cast<QFxItem *>(children.at(idx));
+ return qobject_cast<QmlGraphicsItem *>(children.at(idx));
else
return 0;
}
-void QFxItemPrivate::children_clear()
+void QmlGraphicsItemPrivate::children_clear()
{
// ###
}
-void QFxItemPrivate::transform_removeAt(int i)
+void QmlGraphicsItemPrivate::transform_removeAt(int i)
{
if (!transformData)
return;
@@ -1610,33 +1631,33 @@ void QFxItemPrivate::transform_removeAt(int i)
dirtySceneTransform = 1;
}
-int QFxItemPrivate::transform_count() const
+int QmlGraphicsItemPrivate::transform_count() const
{
return transformData ? transformData->graphicsTransforms.size() : 0;
}
-void QFxItemPrivate::transform_append(QGraphicsTransform *item)
+void QmlGraphicsItemPrivate::transform_append(QGraphicsTransform *item)
{
appendGraphicsTransform(item);
}
-void QFxItemPrivate::transform_insert(int, QGraphicsTransform *)
+void QmlGraphicsItemPrivate::transform_insert(int, QGraphicsTransform *)
{
// ###
}
-QGraphicsTransform *QFxItemPrivate::transform_at(int idx) const
+QGraphicsTransform *QmlGraphicsItemPrivate::transform_at(int idx) const
{
if (!transformData)
return 0;
return transformData->graphicsTransforms.at(idx);
}
-void QFxItemPrivate::transform_clear()
+void QmlGraphicsItemPrivate::transform_clear()
{
if (!transformData)
return;
- Q_Q(QFxItem);
+ Q_Q(QmlGraphicsItem);
q->setTransformations(QList<QGraphicsTransform *>());
}
@@ -1675,45 +1696,40 @@ void QFxItemPrivate::transform_clear()
*/
/*!
- \property QFxItem::data
-
- The data property is allows you to freely mix the visual children
- and the non-visual resources of an item. If you assign a visual
- item to the data list it becomes a child and if you assign any
- other object type, it is added as a resource.
+ \property QmlGraphicsItem::data
+ \internal
+*/
- data is a behind-the-scenes property: you should never need to
- explicitly specify it.
- */
-QmlList<QObject *> *QFxItem::data()
+/*! \internal */
+QmlList<QObject *> *QmlGraphicsItem::data()
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
return &d->data;
}
/*!
- \property QFxItem::childrenRect
+ \property QmlGraphicsItem::childrenRect
\brief The geometry of an item's children.
childrenRect provides an easy way to access the (collective) position and size of the item's children.
*/
-QRectF QFxItem::childrenRect()
+QRectF QmlGraphicsItem::childrenRect()
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
if (!d->_contents) {
- d->_contents = new QFxContents;
+ d->_contents = new QmlGraphicsContents;
d->_contents->setParent(this);
d->_contents->setItem(this);
}
return d->_contents->rectF();
}
-bool QFxItem::clip() const
+bool QmlGraphicsItem::clip() const
{
return flags() & ItemClipsChildrenToShape;
}
-void QFxItem::setClip(bool c)
+void QmlGraphicsItem::setClip(bool c)
{
setFlag(ItemClipsChildrenToShape, c);
}
@@ -1732,13 +1748,13 @@ void QFxItem::setClip(bool c)
*/
/*!
- \property QFxItem::width
+ \property QmlGraphicsItem::width
Defines the item's width relative to its parent.
*/
/*!
- \property QFxItem::height
+ \property QmlGraphicsItem::height
Defines the item's height relative to its parent.
*/
@@ -1826,15 +1842,15 @@ void QFxItem::setClip(bool c)
geometry from \a oldGeometry to \a newGeometry. If the two
geometries are the same, it doesn't do anything.
*/
-void QFxItem::geometryChanged(const QRectF &newGeometry,
+void QmlGraphicsItem::geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
if (d->_anchors)
d->_anchors->d_func()->updateMe();
- if (transformOrigin() != QFxItem::TopLeft)
+ if (transformOrigin() != QmlGraphicsItem::TopLeft)
setTransformOriginPoint(d->computeTransformOrigin());
if (newGeometry.x() != oldGeometry.x())
@@ -1847,47 +1863,45 @@ void QFxItem::geometryChanged(const QRectF &newGeometry,
emit heightChanged();
for(int ii = 0; ii < d->dependantAnchors.count(); ++ii) {
- QFxAnchors *anchor = d->dependantAnchors.at(ii);
+ QmlGraphicsAnchors *anchor = d->dependantAnchors.at(ii);
anchor->d_func()->update(this, newGeometry, oldGeometry);
}
}
-/*!
- \reimp
-*/
-void QFxItem::keyPressEvent(QKeyEvent *event)
+/*! \internal */
+void QmlGraphicsItem::keyPressEvent(QKeyEvent *event)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
if (d->keyHandler)
d->keyHandler->keyPressed(event);
else
event->ignore();
}
-/*!
- \reimp
-*/
-void QFxItem::keyReleaseEvent(QKeyEvent *event)
+/*! \internal */
+void QmlGraphicsItem::keyReleaseEvent(QKeyEvent *event)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
if (d->keyHandler)
d->keyHandler->keyReleased(event);
else
event->ignore();
}
-void QFxItem::inputMethodEvent(QInputMethodEvent *event)
+/*! \internal */
+void QmlGraphicsItem::inputMethodEvent(QInputMethodEvent *event)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
if (d->keyHandler)
d->keyHandler->inputMethodEvent(event);
else
event->ignore();
}
-QVariant QFxItem::inputMethodQuery(Qt::InputMethodQuery query) const
+/*! \internal */
+QVariant QmlGraphicsItem::inputMethodQuery(Qt::InputMethodQuery query) const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
QVariant v;
if (d->keyHandler)
v = d->keyHandler->inputMethodQuery(query);
@@ -1917,112 +1931,95 @@ QVariant QFxItem::inputMethodQuery(Qt::InputMethodQuery query) const
/*!
\internal
*/
-QFxAnchorLine QFxItem::left() const
+QmlGraphicsAnchorLine QmlGraphicsItem::left() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->anchorLines()->left;
}
/*!
\internal
*/
-QFxAnchorLine QFxItem::right() const
+QmlGraphicsAnchorLine QmlGraphicsItem::right() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->anchorLines()->right;
}
/*!
\internal
*/
-QFxAnchorLine QFxItem::horizontalCenter() const
+QmlGraphicsAnchorLine QmlGraphicsItem::horizontalCenter() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->anchorLines()->hCenter;
}
/*!
\internal
*/
-QFxAnchorLine QFxItem::top() const
+QmlGraphicsAnchorLine QmlGraphicsItem::top() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->anchorLines()->top;
}
/*!
\internal
*/
-QFxAnchorLine QFxItem::bottom() const
+QmlGraphicsAnchorLine QmlGraphicsItem::bottom() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->anchorLines()->bottom;
}
/*!
\internal
*/
-QFxAnchorLine QFxItem::verticalCenter() const
+QmlGraphicsAnchorLine QmlGraphicsItem::verticalCenter() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->anchorLines()->vCenter;
}
+
/*!
\internal
*/
-QFxAnchorLine QFxItem::baseline() const
+QmlGraphicsAnchorLine QmlGraphicsItem::baseline() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->anchorLines()->baseline;
}
/*!
- \property QFxItem::top
-
- One of the anchor lines of the item.
-
- For more information see \l {anchor-layout}{Anchor Layouts}.
+ \property QmlGraphicsItem::top
+ \internal
*/
/*!
- \property QFxItem::bottom
-
- One of the anchor lines of the item.
-
- For more information see \l {anchor-layout}{Anchor Layouts}.
+ \property QmlGraphicsItem::bottom
+ \internal
*/
/*!
- \property QFxItem::left
-
- One of the anchor lines of the item.
-
- For more information see \l {anchor-layout}{Anchor Layouts}.
+ \property QmlGraphicsItem::left
+ \internal
*/
/*!
- \property QFxItem::right
-
- One of the anchor lines of the item.
-
- For more information see \l {anchor-layout}{Anchor Layouts}.
+ \property QmlGraphicsItem::right
+ \internal
*/
/*!
- \property QFxItem::horizontalCenter
-
- One of the anchor lines of the item.
-
- For more information see \l {anchor-layout}{Anchor Layouts}.
+ \property QmlGraphicsItem::horizontalCenter
+ \internal
*/
/*!
- \property QFxItem::verticalCenter
-
- One of the anchor lines of the item.
-
- For more information see \l {anchor-layout}{Anchor Layouts}.
+ \property QmlGraphicsItem::verticalCenter
+ \internal
*/
/*!
@@ -2107,7 +2104,7 @@ QFxAnchorLine QFxItem::baseline() const
*/
/*!
- \property QFxItem::baselineOffset
+ \property QmlGraphicsItem::baselineOffset
\brief The position of the item's baseline in local coordinates.
The baseline of a Text item is the imaginary line on which the text
@@ -2116,21 +2113,18 @@ QFxAnchorLine QFxItem::baseline() const
For non-text items, a default baseline offset of 0 is used.
*/
-qreal QFxItem::baselineOffset() const
+qreal QmlGraphicsItem::baselineOffset() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
if (!d->_baselineOffset.isValid()) {
return 0.0;
} else
return d->_baselineOffset;
}
-/*!
- \internal
-*/
-void QFxItem::setBaselineOffset(qreal offset)
+void QmlGraphicsItem::setBaselineOffset(qreal offset)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
if (offset == d->_baselineOffset)
return;
@@ -2138,7 +2132,7 @@ void QFxItem::setBaselineOffset(qreal offset)
emit baselineOffsetChanged();
for(int ii = 0; ii < d->dependantAnchors.count(); ++ii) {
- QFxAnchors *anchor = d->dependantAnchors.at(ii);
+ QmlGraphicsAnchors *anchor = d->dependantAnchors.at(ii);
anchor->d_func()->updateVerticalAnchors();
}
}
@@ -2258,11 +2252,11 @@ void QFxItem::setBaselineOffset(qreal offset)
Returns a value indicating whether mouse input should
remain with this item exclusively.
- \sa setKeepMouseGrab
+ \sa setKeepMouseGrab()
*/
-bool QFxItem::keepMouseGrab() const
+bool QmlGraphicsItem::keepMouseGrab() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->_keepMouse;
}
@@ -2284,33 +2278,37 @@ bool QFxItem::keepMouseGrab() const
\sa keepMouseGrab
*/
-void QFxItem::setKeepMouseGrab(bool keep)
+void QmlGraphicsItem::setKeepMouseGrab(bool keep)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
d->_keepMouse = keep;
}
/*!
+ \internal
+
This function emits the \e focusChanged signal.
Subclasses overriding this function should call up
to their base class.
*/
-void QFxItem::focusChanged(bool flag)
+void QmlGraphicsItem::focusChanged(bool flag)
{
Q_UNUSED(flag);
emit focusChanged();
}
-QmlList<QFxItem *> *QFxItem::fxChildren()
+/*! \internal */
+QmlList<QmlGraphicsItem *> *QmlGraphicsItem::fxChildren()
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
return &(d->children);
}
-QmlList<QObject *> *QFxItem::resources()
+/*! \internal */
+QmlList<QObject *> *QmlGraphicsItem::resources()
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
return &(d->resources);
}
@@ -2332,14 +2330,13 @@ QmlList<QObject *> *QFxItem::resources()
*/
/*!
- \property QFxItem::states
- This property holds a list of states defined by the item.
-
- \sa {qmlstate}{States}
+ \property QmlGraphicsItem::states
+ \internal
*/
-QmlList<QmlState *>* QFxItem::states()
+/*! \internal */
+QmlList<QmlState *>* QmlGraphicsItem::states()
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
return d->states()->statesProperty();
}
@@ -2361,14 +2358,14 @@ QmlList<QmlState *>* QFxItem::states()
*/
/*!
- \property QFxItem::transitions
- This property holds a list of transitions defined by the item.
-
- \sa {state-transitions}{Transitions}
+ \property QmlGraphicsItem::transitions
+ \internal
*/
-QmlList<QmlTransition *>* QFxItem::transitions()
+
+/*! \internal */
+QmlList<QmlTransition *>* QmlGraphicsItem::transitions()
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
return d->states()->transitionsProperty();
}
@@ -2404,7 +2401,7 @@ QmlList<QmlTransition *>* QFxItem::transitions()
*/
/*!
- \property QFxItem::clip
+ \property QmlGraphicsItem::clip
This property holds whether clipping is enabled.
if clipping is enabled, an item will clip its own painting, as well
@@ -2440,42 +2437,24 @@ QmlList<QmlTransition *>* QFxItem::transitions()
*/
/*!
- \property QFxItem::state
-
- This property holds the name of the current state of the item.
-
- This property is often used in scripts to change between states. For
- example:
-
- \qml
- Script {
- function toggle() {
- if (button.state == 'On')
- button.state = 'Off';
- else
- button.state = 'On';
- }
- }
- \endqml
-
- If the item is in its base state (i.e. no explicit state has been
- set), \c state will be a blank string. Likewise, you can return an
- item to its base state by setting its current state to \c ''.
-
- \sa {qmlstates}{States}
+ \property QmlGraphicsItem::state
+ \internal
*/
-QString QFxItem::state() const
+
+/*! \internal */
+QString QmlGraphicsItem::state() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
if (!d->_stateGroup)
return QString();
else
return d->_stateGroup->state();
}
-void QFxItem::setState(const QString &state)
+/*! \internal */
+void QmlGraphicsItem::setState(const QString &state)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
d->states()->setState(state);
}
@@ -2487,24 +2466,28 @@ void QFxItem::setState(const QString &state)
*/
/*!
- \property QFxItem::transform
- This property holds a list of transformations set on the item.
+ \property QmlGraphicsItem::transform
+ \internal
*/
-QmlList<QGraphicsTransform *>* QFxItem::transform()
+
+/*! \internal */
+QmlList<QGraphicsTransform *>* QmlGraphicsItem::transform()
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
return &(d->transform);
}
/*!
+ \internal
+
classBegin() is called when the item is constructed, but its
properties have not yet been set.
\sa componentComplete(), isComponentComplete()
*/
-void QFxItem::classBegin()
+void QmlGraphicsItem::classBegin()
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
d->_componentComplete = false;
if (d->_stateGroup)
d->_stateGroup->classBegin();
@@ -2513,18 +2496,20 @@ void QFxItem::classBegin()
}
/*!
+ \internal
+
componentComplete() is called when all items in the component
have been constructed. It is often desireable to delay some
processing until the component is complete an all bindings in the
component have been resolved.
*/
-void QFxItem::componentComplete()
+void QmlGraphicsItem::componentComplete()
{
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::ItemComponentComplete> cc;
+ QmlPerfTimer<QmlPerf::ItemComponentComplete> cc;
#endif
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
d->_componentComplete = true;
if (d->_stateGroup)
d->_stateGroup->componentComplete();
@@ -2536,9 +2521,9 @@ void QFxItem::componentComplete()
d->keyHandler->componentComplete();
}
-QmlStateGroup *QFxItemPrivate::states()
+QmlStateGroup *QmlGraphicsItemPrivate::states()
{
- Q_Q(QFxItem);
+ Q_Q(QmlGraphicsItem);
if (!_stateGroup) {
_stateGroup = new QmlStateGroup(q);
if (!_componentComplete)
@@ -2550,57 +2535,55 @@ QmlStateGroup *QFxItemPrivate::states()
return _stateGroup;
}
-QFxItemPrivate::AnchorLines::AnchorLines(QFxItem *q)
+QmlGraphicsItemPrivate::AnchorLines::AnchorLines(QmlGraphicsItem *q)
{
left.item = q;
- left.anchorLine = QFxAnchorLine::Left;
+ left.anchorLine = QmlGraphicsAnchorLine::Left;
right.item = q;
- right.anchorLine = QFxAnchorLine::Right;
+ right.anchorLine = QmlGraphicsAnchorLine::Right;
hCenter.item = q;
- hCenter.anchorLine = QFxAnchorLine::HCenter;
+ hCenter.anchorLine = QmlGraphicsAnchorLine::HCenter;
top.item = q;
- top.anchorLine = QFxAnchorLine::Top;
+ top.anchorLine = QmlGraphicsAnchorLine::Top;
bottom.item = q;
- bottom.anchorLine = QFxAnchorLine::Bottom;
+ bottom.anchorLine = QmlGraphicsAnchorLine::Bottom;
vCenter.item = q;
- vCenter.anchorLine = QFxAnchorLine::VCenter;
+ vCenter.anchorLine = QmlGraphicsAnchorLine::VCenter;
baseline.item = q;
- baseline.anchorLine = QFxAnchorLine::Baseline;
+ baseline.anchorLine = QmlGraphicsAnchorLine::Baseline;
}
-QPointF QFxItemPrivate::computeTransformOrigin() const
+QPointF QmlGraphicsItemPrivate::computeTransformOrigin() const
{
- Q_Q(const QFxItem);
+ Q_Q(const QmlGraphicsItem);
QRectF br = q->boundingRect();
switch(origin) {
default:
- case QFxItem::TopLeft:
+ case QmlGraphicsItem::TopLeft:
return QPointF(0, 0);
- case QFxItem::Top:
+ case QmlGraphicsItem::Top:
return QPointF(br.width() / 2., 0);
- case QFxItem::TopRight:
+ case QmlGraphicsItem::TopRight:
return QPointF(br.width(), 0);
- case QFxItem::Left:
+ case QmlGraphicsItem::Left:
return QPointF(0, br.height() / 2.);
- case QFxItem::Center:
+ case QmlGraphicsItem::Center:
return QPointF(br.width() / 2., br.height() / 2.);
- case QFxItem::Right:
+ case QmlGraphicsItem::Right:
return QPointF(br.width(), br.height() / 2.);
- case QFxItem::BottomLeft:
+ case QmlGraphicsItem::BottomLeft:
return QPointF(0, br.height());
- case QFxItem::Bottom:
+ case QmlGraphicsItem::Bottom:
return QPointF(br.width() / 2., br.height());
- case QFxItem::BottomRight:
+ case QmlGraphicsItem::BottomRight:
return QPointF(br.width(), br.height());
}
}
-/*!
- \reimp
-*/
-bool QFxItem::sceneEvent(QEvent *event)
+/*! \internal */
+bool QmlGraphicsItem::sceneEvent(QEvent *event)
{
bool rv = QGraphicsItem::sceneEvent(event);
@@ -2612,10 +2595,8 @@ bool QFxItem::sceneEvent(QEvent *event)
return rv;
}
-/*!
- \reimp
-*/
-QVariant QFxItem::itemChange(GraphicsItemChange change,
+/*! \internal */
+QVariant QmlGraphicsItem::itemChange(GraphicsItemChange change,
const QVariant &value)
{
if (change == ItemParentHasChanged) {
@@ -2625,17 +2606,15 @@ QVariant QFxItem::itemChange(GraphicsItemChange change,
return QGraphicsItem::itemChange(change, value);
}
-/*!
- \reimp
-*/
-QRectF QFxItem::boundingRect() const
+/*! \internal */
+QRectF QmlGraphicsItem::boundingRect() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return QRectF(0, 0, d->width, d->height);
}
/*!
- \enum QFxItem::TransformOrigin
+ \enum QmlGraphicsItem::TransformOrigin
Controls the point about which simple transforms like scale apply.
@@ -2653,18 +2632,18 @@ QRectF QFxItem::boundingRect() const
/*!
Returns the current transform origin.
*/
-QFxItem::TransformOrigin QFxItem::transformOrigin() const
+QmlGraphicsItem::TransformOrigin QmlGraphicsItem::transformOrigin() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->origin;
}
/*!
Set the transform \a origin.
*/
-void QFxItem::setTransformOrigin(TransformOrigin origin)
+void QmlGraphicsItem::setTransformOrigin(TransformOrigin origin)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
if (origin != d->origin) {
d->origin = origin;
QGraphicsItem::setTransformOriginPoint(d->computeTransformOrigin());
@@ -2672,7 +2651,7 @@ void QFxItem::setTransformOrigin(TransformOrigin origin)
}
/*!
- \property QFxItem::smooth
+ \property QmlGraphicsItem::smooth
\brief whether the item is smoothly transformed.
This property is provided purely for the purpose of optimization. Turning
@@ -2681,30 +2660,45 @@ void QFxItem::setTransformOrigin(TransformOrigin origin)
By default smooth transformations are off.
*/
-bool QFxItem::smoothTransform() const
+
+/*!
+ Returns true if the item should be drawn with antialiasing and
+ smooth pixmap filtering, false otherwise.
+
+ The default is false.
+
+ \sa setSmoothTransform()
+*/
+bool QmlGraphicsItem::smoothTransform() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->smooth;
}
-void QFxItem::setSmoothTransform(bool s)
+/*!
+ Sets whether the item should be drawn with antialiasing and
+ smooth pixmap filtering to \a smooth.
+
+ \sa smoothTransform()
+*/
+void QmlGraphicsItem::setSmoothTransform(bool smooth)
{
- Q_D(QFxItem);
- if (d->smooth == s)
+ Q_D(QmlGraphicsItem);
+ if (d->smooth == smooth)
return;
- d->smooth = s;
+ d->smooth = smooth;
update();
}
-qreal QFxItem::width() const
+qreal QmlGraphicsItem::width() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->width;
}
-void QFxItem::setWidth(qreal w)
+void QmlGraphicsItem::setWidth(qreal w)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
d->widthValid = true;
if (d->width == w)
return;
@@ -2719,22 +2713,22 @@ void QFxItem::setWidth(qreal w)
QRectF(x(), y(), oldWidth, height()));
}
-void QFxItem::resetWidth()
+void QmlGraphicsItem::resetWidth()
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
d->widthValid = false;
setImplicitWidth(implicitWidth());
}
-qreal QFxItem::implicitWidth() const
+qreal QmlGraphicsItem::implicitWidth() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->implicitWidth;
}
-void QFxItem::setImplicitWidth(qreal w)
+void QmlGraphicsItem::setImplicitWidth(qreal w)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
d->implicitWidth = w;
if (d->width == w || widthValid())
return;
@@ -2749,21 +2743,21 @@ void QFxItem::setImplicitWidth(qreal w)
QRectF(x(), y(), oldWidth, height()));
}
-bool QFxItem::widthValid() const
+bool QmlGraphicsItem::widthValid() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->widthValid;
}
-qreal QFxItem::height() const
+qreal QmlGraphicsItem::height() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->height;
}
-void QFxItem::setHeight(qreal h)
+void QmlGraphicsItem::setHeight(qreal h)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
d->heightValid = true;
if (d->height == h)
return;
@@ -2778,22 +2772,22 @@ void QFxItem::setHeight(qreal h)
QRectF(x(), y(), width(), oldHeight));
}
-void QFxItem::resetHeight()
+void QmlGraphicsItem::resetHeight()
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
d->heightValid = false;
setImplicitHeight(implicitHeight());
}
-qreal QFxItem::implicitHeight() const
+qreal QmlGraphicsItem::implicitHeight() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->implicitHeight;
}
-void QFxItem::setImplicitHeight(qreal h)
+void QmlGraphicsItem::setImplicitHeight(qreal h)
{
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
d->implicitHeight = h;
if (d->height == h || heightValid())
return;
@@ -2808,9 +2802,9 @@ void QFxItem::setImplicitHeight(qreal h)
QRectF(x(), y(), width(), oldHeight));
}
-bool QFxItem::heightValid() const
+bool QmlGraphicsItem::heightValid() const
{
- Q_D(const QFxItem);
+ Q_D(const QmlGraphicsItem);
return d->heightValid;
}
@@ -2819,7 +2813,9 @@ bool QFxItem::heightValid() const
This property indicates whether the item has has an active focus request.
*/
-bool QFxItem::wantsFocus() const
+
+/*! \internal */
+bool QmlGraphicsItem::wantsFocus() const
{
return focusItem() != 0;
}
@@ -2829,12 +2825,15 @@ bool QFxItem::wantsFocus() const
This property indicates whether the item has keyboard input focus. Set this
property to true to request focus.
*/
-bool QFxItem::hasFocus() const
+
+/*! \internal */
+bool QmlGraphicsItem::hasFocus() const
{
return QGraphicsItem::hasFocus();
}
-void QFxItem::setFocus(bool focus)
+/*! \internal */
+void QmlGraphicsItem::setFocus(bool focus)
{
if (focus)
QGraphicsItem::setFocus(Qt::OtherFocusReason);
@@ -2844,23 +2843,25 @@ void QFxItem::setFocus(bool focus)
/*!
\reimp
+ \internal
*/
-void QFxItem::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
+void QmlGraphicsItem::paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
{
}
/*!
\reimp
+ \internal
*/
-bool QFxItem::event(QEvent *ev)
+bool QmlGraphicsItem::event(QEvent *ev)
{
return QGraphicsObject::event(ev);
}
-QDebug operator<<(QDebug debug, QFxItem *item)
+QDebug operator<<(QDebug debug, QmlGraphicsItem *item)
{
if (!item) {
- debug << "QFxItem(0)";
+ debug << "QmlGraphicsItem(0)";
return debug;
}
@@ -2871,13 +2872,13 @@ QDebug operator<<(QDebug debug, QFxItem *item)
return debug;
}
-int QFxItemPrivate::consistentTime = -1;
-void QFxItemPrivate::setConsistentTime(int t)
+int QmlGraphicsItemPrivate::consistentTime = -1;
+void QmlGraphicsItemPrivate::setConsistentTime(int t)
{
consistentTime = t;
}
-QTime QFxItemPrivate::currentTime()
+QTime QmlGraphicsItemPrivate::currentTime()
{
if (consistentTime == -1)
return QTime::currentTime();
@@ -2885,12 +2886,12 @@ QTime QFxItemPrivate::currentTime()
return QTime(0, 0).addMSecs(consistentTime);
}
-void QFxItemPrivate::start(QTime &t)
+void QmlGraphicsItemPrivate::start(QTime &t)
{
t = currentTime();
}
-int QFxItemPrivate::elapsed(QTime &t)
+int QmlGraphicsItemPrivate::elapsed(QTime &t)
{
int n = t.msecsTo(currentTime());
if (n < 0) // passed midnight
@@ -2898,7 +2899,7 @@ int QFxItemPrivate::elapsed(QTime &t)
return n;
}
-int QFxItemPrivate::restart(QTime &t)
+int QmlGraphicsItemPrivate::restart(QTime &t)
{
QTime time = currentTime();
int n = t.msecsTo(time);
@@ -2908,13 +2909,14 @@ int QFxItemPrivate::restart(QTime &t)
return n;
}
+#include "qmlgraphicsitem.moc"
+#include "moc_qmlgraphicsitem.cpp"
+
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxKeysAttached)
-QML_DECLARE_TYPEINFO(QFxKeysAttached, QML_HAS_ATTACHED_PROPERTIES)
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Keys,QFxKeysAttached)
-QML_DECLARE_TYPE(QFxKeyNavigationAttached)
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,KeyNavigation,QFxKeyNavigationAttached)
+QML_DECLARE_TYPE(QmlGraphicsKeysAttached)
+QML_DECLARE_TYPEINFO(QmlGraphicsKeysAttached, QML_HAS_ATTACHED_PROPERTIES)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Keys,QmlGraphicsKeysAttached)
+QML_DECLARE_TYPE(QmlGraphicsKeyNavigationAttached)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,KeyNavigation,QmlGraphicsKeyNavigationAttached)
-#include "moc_qfxitem.cpp"
-#include "qfxitem.moc"
diff --git a/src/declarative/fx/qfxitem.h b/src/declarative/graphicsitems/qmlgraphicsitem.h
index b2aefe2..bdfc245 100644
--- a/src/declarative/fx/qfxitem.h
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,31 +21,29 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXITEM_H
-#define QFXITEM_H
+#ifndef QMLGRAPHICSITEM_H
+#define QMLGRAPHICSITEM_H
#include <QtCore/QObject>
#include <QtCore/QList>
-#include <QtDeclarative/qfxglobal.h>
#include <QtDeclarative/qml.h>
#include <QtDeclarative/qmlcomponent.h>
#include <QtGui/qgraphicsitem.h>
@@ -58,19 +57,19 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QmlState;
-class QFxAnchorLine;
+class QmlGraphicsAnchorLine;
class QmlTransition;
-class QFxKeyEvent;
-class QFxAnchors;
-class QFxItemPrivate;
-class Q_DECLARATIVE_EXPORT QFxItem : public QGraphicsObject, public QmlParserStatus
+class QmlGraphicsKeyEvent;
+class QmlGraphicsAnchors;
+class QmlGraphicsItemPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsItem : public QGraphicsObject, public QmlParserStatus
{
Q_OBJECT
Q_INTERFACES(QmlParserStatus)
- Q_PROPERTY(QFxItem * parent READ parentItem WRITE setParentItem NOTIFY parentChanged DESIGNABLE false FINAL)
+ Q_PROPERTY(QmlGraphicsItem * parent READ parentItem WRITE setParentItem NOTIFY parentChanged DESIGNABLE false FINAL)
Q_PROPERTY(QmlList<QObject *> *data READ data DESIGNABLE false)
- Q_PROPERTY(QmlList<QFxItem *>* children READ fxChildren DESIGNABLE false)
+ Q_PROPERTY(QmlList<QmlGraphicsItem *>* children READ fxChildren DESIGNABLE false)
Q_PROPERTY(QmlList<QObject *>* resources READ resources DESIGNABLE false)
Q_PROPERTY(QmlList<QmlState *>* states READ states DESIGNABLE false)
Q_PROPERTY(QmlList<QmlTransition *>* transitions READ transitions DESIGNABLE false)
@@ -78,14 +77,14 @@ class Q_DECLARATIVE_EXPORT QFxItem : public QGraphicsObject, public QmlParserSta
Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY widthChanged RESET resetWidth FINAL)
Q_PROPERTY(qreal height READ height WRITE setHeight NOTIFY heightChanged RESET resetHeight FINAL)
Q_PROPERTY(QRectF childrenRect READ childrenRect NOTIFY childrenRectChanged DESIGNABLE false FINAL)
- Q_PROPERTY(QFxAnchors * anchors READ anchors DESIGNABLE false CONSTANT FINAL)
- Q_PROPERTY(QFxAnchorLine left READ left CONSTANT FINAL)
- Q_PROPERTY(QFxAnchorLine right READ right CONSTANT FINAL)
- Q_PROPERTY(QFxAnchorLine horizontalCenter READ horizontalCenter CONSTANT FINAL)
- Q_PROPERTY(QFxAnchorLine top READ top CONSTANT FINAL)
- Q_PROPERTY(QFxAnchorLine bottom READ bottom CONSTANT FINAL)
- Q_PROPERTY(QFxAnchorLine verticalCenter READ verticalCenter CONSTANT FINAL)
- Q_PROPERTY(QFxAnchorLine baseline READ baseline CONSTANT FINAL)
+ Q_PROPERTY(QmlGraphicsAnchors * anchors READ anchors DESIGNABLE false CONSTANT FINAL)
+ Q_PROPERTY(QmlGraphicsAnchorLine left READ left CONSTANT FINAL)
+ Q_PROPERTY(QmlGraphicsAnchorLine right READ right CONSTANT FINAL)
+ Q_PROPERTY(QmlGraphicsAnchorLine horizontalCenter READ horizontalCenter CONSTANT FINAL)
+ Q_PROPERTY(QmlGraphicsAnchorLine top READ top CONSTANT FINAL)
+ Q_PROPERTY(QmlGraphicsAnchorLine bottom READ bottom CONSTANT FINAL)
+ Q_PROPERTY(QmlGraphicsAnchorLine verticalCenter READ verticalCenter CONSTANT FINAL)
+ Q_PROPERTY(QmlGraphicsAnchorLine baseline READ baseline CONSTANT FINAL)
Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged)
Q_PROPERTY(bool clip READ clip WRITE setClip) // ### move to QGI/QGO, NOTIFY
Q_PROPERTY(bool focus READ hasFocus WRITE setFocus NOTIFY focusChanged FINAL)
@@ -104,18 +103,18 @@ public:
BottomLeft, Bottom, BottomRight
};
- QFxItem(QFxItem *parent = 0);
- virtual ~QFxItem();
+ QmlGraphicsItem(QmlGraphicsItem *parent = 0);
+ virtual ~QmlGraphicsItem();
- QFxItem *parentItem() const;
- void setParentItem(QFxItem *parent);
- void setParent(QFxItem *parent) { setParentItem(parent); }
+ QmlGraphicsItem *parentItem() const;
+ void setParentItem(QmlGraphicsItem *parent);
+ void setParent(QmlGraphicsItem *parent) { setParentItem(parent); }
QmlList<QObject *> *data();
- QmlList<QFxItem *> *fxChildren();
+ QmlList<QmlGraphicsItem *> *fxChildren();
QmlList<QObject *> *resources();
- QFxAnchors *anchors();
+ QmlGraphicsAnchors *anchors();
QRectF childrenRect();
bool clip() const;
@@ -190,22 +189,22 @@ protected:
const QRectF &oldGeometry);
protected:
- QFxItem(QFxItemPrivate &dd, QFxItem *parent = 0);
+ QmlGraphicsItem(QmlGraphicsItemPrivate &dd, QmlGraphicsItem *parent = 0);
private:
// ### public?
- QFxAnchorLine left() const;
- QFxAnchorLine right() const;
- QFxAnchorLine horizontalCenter() const;
- QFxAnchorLine top() const;
- QFxAnchorLine bottom() const;
- QFxAnchorLine verticalCenter() const;
- QFxAnchorLine baseline() const;
+ QmlGraphicsAnchorLine left() const;
+ QmlGraphicsAnchorLine right() const;
+ QmlGraphicsAnchorLine horizontalCenter() const;
+ QmlGraphicsAnchorLine top() const;
+ QmlGraphicsAnchorLine bottom() const;
+ QmlGraphicsAnchorLine verticalCenter() const;
+ QmlGraphicsAnchorLine baseline() const;
friend class QmlStatePrivate;
- friend class QFxAnchors;
- Q_DISABLE_COPY(QFxItem)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxItem)
+ friend class QmlGraphicsAnchors;
+ Q_DISABLE_COPY(QmlGraphicsItem)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsItem)
};
template<typename T>
@@ -224,15 +223,15 @@ T qobject_cast(QGraphicsItem *item)
return qobject_cast<T>(o);
}
-QDebug Q_DECLARATIVE_EXPORT operator<<(QDebug debug, QFxItem *item);
+QDebug Q_DECLARATIVE_EXPORT operator<<(QDebug debug, QmlGraphicsItem *item);
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxItem)
+QML_DECLARE_TYPE(QmlGraphicsItem)
QML_DECLARE_TYPE(QGraphicsTransform)
QML_DECLARE_TYPE(QGraphicsScale)
QML_DECLARE_TYPE(QGraphicsRotation)
QT_END_HEADER
-#endif // QFXITEM_H
+#endif // QMLGRAPHICSITEM_H
diff --git a/src/declarative/fx/qfxitem_p.h b/src/declarative/graphicsitems/qmlgraphicsitem_p.h
index 2c7440f..f98c121 100644
--- a/src/declarative/fx/qfxitem_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsitem_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXITEM_P_H
-#define QFXITEM_P_H
+#ifndef QMLGRAPHICSITEM_P_H
+#define QMLGRAPHICSITEM_P_H
//
// W A R N I N G
@@ -53,11 +53,11 @@
// We mean it.
//
-#include <QtDeclarative/qfxitem.h>
-#include <QtDeclarative/qmlstate.h>
-#include <QtDeclarative/qfxanchors.h>
-#include <private/qmlnullablevalue_p.h>
-#include <private/qfxanchors_p.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
+#include <private/qmlstate_p.h>
+#include <private/qmlgraphicsanchors_p.h>
+#include <private/qmlnullablevalue_p_p.h>
+#include <private/qmlgraphicsanchors_p_p.h>
#include <QtDeclarative/qml.h>
#include <QtDeclarative/qmlcontext.h>
#include <QtCore/qlist.h>
@@ -67,18 +67,18 @@
QT_BEGIN_NAMESPACE
class QNetworkReply;
-class QFxItemKeyFilter;
+class QmlGraphicsItemKeyFilter;
//### merge into private?
-class QFxContents : public QObject
+class QmlGraphicsContents : public QObject
{
Q_OBJECT
public:
- QFxContents();
+ QmlGraphicsContents();
QRectF rectF() const;
- void setItem(QFxItem *item);
+ void setItem(QmlGraphicsItem *item);
public Q_SLOTS:
void calcHeight();
@@ -88,34 +88,34 @@ Q_SIGNALS:
void rectChanged();
private:
- QFxItem *m_item;
+ QmlGraphicsItem *m_item;
qreal m_x;
qreal m_y;
qreal m_width;
qreal m_height;
};
-class QFxItemPrivate : public QGraphicsItemPrivate
+class QmlGraphicsItemPrivate : public QGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxItem)
+ Q_DECLARE_PUBLIC(QmlGraphicsItem)
public:
- QFxItemPrivate()
+ QmlGraphicsItemPrivate()
: _anchors(0), _contents(0),
_baselineOffset(0),
_anchorLines(0),
- _stateGroup(0), origin(QFxItem::TopLeft),
+ _stateGroup(0), origin(QmlGraphicsItem::TopLeft),
widthValid(false), heightValid(false),
_componentComplete(true), _keepMouse(false),
smooth(false), keyHandler(0),
width(0), height(0), implicitWidth(0), implicitHeight(0)
{}
- ~QFxItemPrivate()
+ ~QmlGraphicsItemPrivate()
{ delete _anchors; }
- void init(QFxItem *parent)
+ void init(QmlGraphicsItem *parent)
{
- Q_Q(QFxItem);
+ Q_Q(QmlGraphicsItem);
if (parent)
q->setParentItem(parent);
@@ -136,7 +136,7 @@ public:
void data_insert(int, QObject *);
QObject *data_at(int) const;
void data_clear();
- QML_DECLARE_LIST_PROXY(QFxItemPrivate, QObject *, data)
+ QML_DECLARE_LIST_PROXY(QmlGraphicsItemPrivate, QObject *, data)
// resources property
void resources_removeAt(int);
@@ -145,16 +145,16 @@ public:
void resources_insert(int, QObject *);
QObject *resources_at(int) const;
void resources_clear();
- QML_DECLARE_LIST_PROXY(QFxItemPrivate, QObject *, resources)
+ QML_DECLARE_LIST_PROXY(QmlGraphicsItemPrivate, QObject *, resources)
// children property
void children_removeAt(int);
int children_count() const;
- void children_append(QFxItem *);
- void children_insert(int, QFxItem *);
- QFxItem *children_at(int) const;
+ void children_append(QmlGraphicsItem *);
+ void children_insert(int, QmlGraphicsItem *);
+ QmlGraphicsItem *children_at(int) const;
void children_clear();
- QML_DECLARE_LIST_PROXY(QFxItemPrivate, QFxItem *, children)
+ QML_DECLARE_LIST_PROXY(QmlGraphicsItemPrivate, QmlGraphicsItem *, children)
// transform property
void transform_removeAt(int);
@@ -163,53 +163,53 @@ public:
void transform_insert(int, QGraphicsTransform *);
QGraphicsTransform *transform_at(int) const;
void transform_clear();
- QML_DECLARE_LIST_PROXY(QFxItemPrivate, QGraphicsTransform *, transform)
+ QML_DECLARE_LIST_PROXY(QmlGraphicsItemPrivate, QGraphicsTransform *, transform)
- QFxAnchors *anchors() {
+ QmlGraphicsAnchors *anchors() {
if (!_anchors) {
- Q_Q(QFxItem);
- _anchors = new QFxAnchors;
+ Q_Q(QmlGraphicsItem);
+ _anchors = new QmlGraphicsAnchors;
_anchors->setItem(q);
if (!_componentComplete)
_anchors->classBegin();
}
return _anchors;
}
- QList<QFxAnchors *> dependantAnchors;
- QFxAnchors *_anchors;
- QFxContents *_contents;
+ QList<QmlGraphicsAnchors *> dependantAnchors;
+ QmlGraphicsAnchors *_anchors;
+ QmlGraphicsContents *_contents;
QmlNullableValue<qreal> _baselineOffset;
struct AnchorLines {
- AnchorLines(QFxItem *);
- QFxAnchorLine left;
- QFxAnchorLine right;
- QFxAnchorLine hCenter;
- QFxAnchorLine top;
- QFxAnchorLine bottom;
- QFxAnchorLine vCenter;
- QFxAnchorLine baseline;
+ AnchorLines(QmlGraphicsItem *);
+ QmlGraphicsAnchorLine left;
+ QmlGraphicsAnchorLine right;
+ QmlGraphicsAnchorLine hCenter;
+ QmlGraphicsAnchorLine top;
+ QmlGraphicsAnchorLine bottom;
+ QmlGraphicsAnchorLine vCenter;
+ QmlGraphicsAnchorLine baseline;
};
mutable AnchorLines *_anchorLines;
AnchorLines *anchorLines() const {
- Q_Q(const QFxItem);
+ Q_Q(const QmlGraphicsItem);
if (!_anchorLines) _anchorLines =
- new AnchorLines(const_cast<QFxItem *>(q));
+ new AnchorLines(const_cast<QmlGraphicsItem *>(q));
return _anchorLines;
}
QmlStateGroup *states();
QmlStateGroup *_stateGroup;
- QFxItem::TransformOrigin origin:4;
+ QmlGraphicsItem::TransformOrigin origin:4;
bool widthValid:1;
bool heightValid:1;
bool _componentComplete:1;
bool _keepMouse:1;
bool smooth:1;
- QFxItemKeyFilter *keyHandler;
+ QmlGraphicsItemKeyFilter *keyHandler;
qreal width;
qreal height;
@@ -220,7 +220,7 @@ public:
virtual void setPosHelper(const QPointF &pos)
{
- Q_Q(QFxItem);
+ Q_Q(QmlGraphicsItem);
QRectF oldGeometry(this->pos.x(), this->pos.y(), width, height);
QGraphicsItemPrivate::setPosHelper(pos);
q->geometryChanged(QRectF(this->pos.x(), this->pos.y(), width, height), oldGeometry);
@@ -242,4 +242,4 @@ public:
QT_END_NAMESPACE
-#endif // QFXITEM_P_H
+#endif // QMLGRAPHICSITEM_P_H
diff --git a/src/declarative/fx/qfxlayoutitem.cpp b/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp
index 61998e7..45420ed 100644
--- a/src/declarative/fx/qfxlayoutitem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicslayoutitem.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,42 +21,41 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxlayoutitem.h"
+#include "qmlgraphicslayoutitem_p.h"
#include <QDebug>
#include <limits.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,LayoutItem,QFxLayoutItem)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,LayoutItem,QmlGraphicsLayoutItem)
/*!
- \qmlclass LayoutItem QFxLayoutItem
+ \qmlclass LayoutItem QmlGraphicsLayoutItem
\brief The LayoutItem element allows you to place your Fluid UI elements inside a classical Qt layout.
*/
/*!
\internal
- \class QFxLayoutItem
- \brief The QFxLayoutItem class allows you to place your Fluid UI elements inside a classical Qt layout.
+ \class QmlGraphicsLayoutItem
+ \brief The QmlGraphicsLayoutItem class allows you to place your Fluid UI elements inside a classical Qt layout.
*/
@@ -77,13 +77,13 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,LayoutItem,QFxLayoutItem)
The preferredSize property can be set to specify the preferred size of this LayoutItem
*/
-QFxLayoutItem::QFxLayoutItem(QFxItem* parent)
- : QFxItem(parent), m_maximumSize(INT_MAX,INT_MAX), m_minimumSize(0,0), m_preferredSize(0,0)
+QmlGraphicsLayoutItem::QmlGraphicsLayoutItem(QmlGraphicsItem* parent)
+ : QmlGraphicsItem(parent), m_maximumSize(INT_MAX,INT_MAX), m_minimumSize(0,0), m_preferredSize(0,0)
{
setGraphicsItem(this);
}
-void QFxLayoutItem::setGeometry(const QRectF & rect)
+void QmlGraphicsLayoutItem::setGeometry(const QRectF & rect)
{
setX(rect.x());
setY(rect.y());
@@ -91,7 +91,7 @@ void QFxLayoutItem::setGeometry(const QRectF & rect)
setHeight(rect.height());
}
-QSizeF QFxLayoutItem::sizeHint(Qt::SizeHint w, const QSizeF &constraint) const
+QSizeF QmlGraphicsLayoutItem::sizeHint(Qt::SizeHint w, const QSizeF &constraint) const
{
Q_UNUSED(constraint);
if(w == Qt::MinimumSize){
diff --git a/src/declarative/fx/qfxlayoutitem.h b/src/declarative/graphicsitems/qmlgraphicslayoutitem_p.h
index 7150554..35905b5 100644
--- a/src/declarative/fx/qfxlayoutitem.h
+++ b/src/declarative/graphicsitems/qmlgraphicslayoutitem_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,29 +21,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXGRAPHICSLAYOUTITEM_H
-#define QFXGRAPHICSLAYOUTITEM_H
+#ifndef QMLGRAPHICSGRAPHICSLAYOUTITEM_H
+#define QMLGRAPHICSGRAPHICSLAYOUTITEM_H
#include <QGraphicsLayoutItem>
-#include <QFxItem>
+#include <QmlGraphicsItem>
#include <QSizeF>
QT_BEGIN_HEADER
@@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxLayoutItem : public QFxItem, public QGraphicsLayoutItem
+class QmlGraphicsLayoutItem : public QmlGraphicsItem, public QGraphicsLayoutItem
{
Q_OBJECT
Q_INTERFACES(QGraphicsLayoutItem)
@@ -59,7 +59,7 @@ class QFxLayoutItem : public QFxItem, public QGraphicsLayoutItem
Q_PROPERTY(QSizeF minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged)
Q_PROPERTY(QSizeF preferredSize READ preferredSize WRITE setPreferredSize NOTIFY preferredSizeChanged)
public:
- QFxLayoutItem(QFxItem* parent=0);
+ QmlGraphicsLayoutItem(QmlGraphicsItem* parent=0);
QSizeF maximumSize() const { return m_maximumSize; }
void setMaximumSize(const QSizeF &s) { if(s==m_maximumSize) return; m_maximumSize = s; emit maximumSizeChanged(); }
@@ -87,7 +87,7 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxLayoutItem)
+QML_DECLARE_TYPE(QmlGraphicsLayoutItem)
QT_END_HEADER
#endif
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/graphicsitems/qmlgraphicslistview.cpp
index 1f1b97b..dc8bab2 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicslistview.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,47 +21,46 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "private/qfxflickable_p.h"
-#include "qmleasefollow.h"
-#include "qlistmodelinterface.h"
-#include "qfxvisualitemmodel.h"
-#include "qfxlistview.h"
+#include "private/qmlgraphicsflickable_p_p.h"
+#include <private/qmleasefollow_p.h>
+#include <private/qlistmodelinterface_p.h>
+#include "qmlgraphicsvisualitemmodel_p.h"
+#include "qmlgraphicslistview_p.h"
#include <qmlexpression.h>
#include <QKeyEvent>
QT_BEGIN_NAMESPACE
-class QFxListViewAttached : public QObject
+class QmlGraphicsListViewAttached : public QObject
{
Q_OBJECT
public:
- QFxListViewAttached(QObject *parent)
+ QmlGraphicsListViewAttached(QObject *parent)
: QObject(parent), m_view(0), m_isCurrent(false), m_delayRemove(false) {}
- ~QFxListViewAttached() {
+ ~QmlGraphicsListViewAttached() {
attachedProperties.remove(parent());
}
- Q_PROPERTY(QFxListView *view READ view CONSTANT)
- QFxListView *view() { return m_view; }
+ Q_PROPERTY(QmlGraphicsListView *view READ view CONSTANT)
+ QmlGraphicsListView *view() { return m_view; }
Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
bool isCurrentItem() const { return m_isCurrent; }
@@ -98,10 +98,10 @@ public:
}
}
- static QFxListViewAttached *properties(QObject *obj) {
- QFxListViewAttached *rv = attachedProperties.value(obj);
+ static QmlGraphicsListViewAttached *properties(QObject *obj) {
+ QmlGraphicsListViewAttached *rv = attachedProperties.value(obj);
if (!rv) {
- rv = new QFxListViewAttached(obj);
+ rv = new QmlGraphicsListViewAttached(obj);
attachedProperties.insert(obj, rv);
}
return rv;
@@ -119,64 +119,64 @@ Q_SIGNALS:
void remove();
public:
- QFxListView *m_view;
+ QmlGraphicsListView *m_view;
bool m_isCurrent;
mutable QString m_section;
QString m_prevSection;
bool m_delayRemove;
- static QHash<QObject*, QFxListViewAttached*> attachedProperties;
+ static QHash<QObject*, QmlGraphicsListViewAttached*> attachedProperties;
};
-QHash<QObject*, QFxListViewAttached*> QFxListViewAttached::attachedProperties;
+QHash<QObject*, QmlGraphicsListViewAttached*> QmlGraphicsListViewAttached::attachedProperties;
//----------------------------------------------------------------------------
class FxListItem
{
public:
- FxListItem(QFxItem *i, QFxListView *v) : item(i), view(v) {
- attached = QFxListViewAttached::properties(item);
+ FxListItem(QmlGraphicsItem *i, QmlGraphicsListView *v) : item(i), view(v) {
+ attached = QmlGraphicsListViewAttached::properties(item);
attached->m_view = view;
}
~FxListItem() {}
- qreal position() const { return (view->orientation() == QFxListView::Vertical ? item->y() : item->x()); }
- int size() const { return (view->orientation() == QFxListView::Vertical ? item->height() : item->width()); }
+ qreal position() const { return (view->orientation() == QmlGraphicsListView::Vertical ? item->y() : item->x()); }
+ int size() const { return (view->orientation() == QmlGraphicsListView::Vertical ? item->height() : item->width()); }
qreal endPosition() const {
- return (view->orientation() == QFxListView::Vertical
+ return (view->orientation() == QmlGraphicsListView::Vertical
? item->y() + (item->height() > 0 ? item->height() : 1)
: item->x() + (item->width() > 0 ? item->width() : 1)) - 1;
}
void setPosition(qreal pos) {
- if (view->orientation() == QFxListView::Vertical) {
+ if (view->orientation() == QmlGraphicsListView::Vertical) {
item->setY(pos);
} else {
item->setX(pos);
}
}
- QFxItem *item;
- QFxListView *view;
- QFxListViewAttached *attached;
+ QmlGraphicsItem *item;
+ QmlGraphicsListView *view;
+ QmlGraphicsListViewAttached *attached;
int index;
};
//----------------------------------------------------------------------------
-class QFxListViewPrivate : public QFxFlickablePrivate
+class QmlGraphicsListViewPrivate : public QmlGraphicsFlickablePrivate
{
- Q_DECLARE_PUBLIC(QFxListView)
+ Q_DECLARE_PUBLIC(QmlGraphicsListView)
public:
- QFxListViewPrivate()
- : model(0), currentItem(0), orient(QFxListView::Vertical)
+ QmlGraphicsListViewPrivate()
+ : model(0), currentItem(0), orient(QmlGraphicsListView::Vertical)
, visiblePos(0), visibleIndex(0)
, averageSize(100.0), currentIndex(-1), requestedIndex(-1)
, highlightRangeStart(0), highlightRangeEnd(0)
, highlightComponent(0), highlight(0), trackedItem(0)
, moveReason(Other), buffer(0), highlightPosAnimator(0), highlightSizeAnimator(0), spacing(0.0)
- , highlightMoveSpeed(400), highlightResizeSpeed(400), highlightRange(QFxListView::NoHighlightRange)
+ , highlightMoveSpeed(400), highlightResizeSpeed(400), highlightRange(QmlGraphicsListView::NoHighlightRange)
, ownModel(false), wrap(false), autoHighlight(true)
, haveHighlightRange(false)
{}
@@ -198,19 +198,19 @@ public:
}
qreal position() const {
- Q_Q(const QFxListView);
- return orient == QFxListView::Vertical ? q->viewportY() : q->viewportX();
+ Q_Q(const QmlGraphicsListView);
+ return orient == QmlGraphicsListView::Vertical ? q->viewportY() : q->viewportX();
}
void setPosition(qreal pos) {
- Q_Q(QFxListView);
- if (orient == QFxListView::Vertical)
+ Q_Q(QmlGraphicsListView);
+ if (orient == QmlGraphicsListView::Vertical)
q->setViewportY(pos);
else
q->setViewportX(pos);
}
qreal size() const {
- Q_Q(const QFxListView);
- return orient == QFxListView::Vertical ? q->height() : q->width();
+ Q_Q(const QmlGraphicsListView);
+ return orient == QmlGraphicsListView::Vertical ? q->height() : q->width();
}
qreal startPosition() const {
@@ -261,7 +261,7 @@ public:
}
QString sectionAt(int modelIndex) {
- Q_Q(QFxListView);
+ Q_Q(QmlGraphicsListView);
if (FxListItem *item = visibleItem(modelIndex))
return item->attached->section();
QString section;
@@ -343,6 +343,15 @@ public:
return true;
}
+ void updateViewport() {
+ Q_Q(QmlGraphicsListView);
+ if (orient == QmlGraphicsListView::Vertical)
+ q->setViewportHeight(endPosition() - startPosition());
+ else
+ q->setViewportWidth(endPosition() - startPosition());
+ }
+
+
// for debugging only
void checkVisible() const {
int skip = 0;
@@ -373,12 +382,12 @@ public:
virtual void flickX(qreal velocity);
virtual void flickY(qreal velocity);
- QFxVisualModel *model;
+ QmlGraphicsVisualModel *model;
QVariant modelVariant;
QList<FxListItem*> visibleItems;
- QHash<QFxItem*,int> unrequestedItems;
+ QHash<QmlGraphicsItem*,int> unrequestedItems;
FxListItem *currentItem;
- QFxListView::Orientation orient;
+ QmlGraphicsListView::Orientation orient;
int visiblePos;
int visibleIndex;
qreal averageSize;
@@ -399,7 +408,7 @@ public:
qreal spacing;
qreal highlightMoveSpeed;
qreal highlightResizeSpeed;
- QFxListView::HighlightRangeMode highlightRange;
+ QmlGraphicsListView::HighlightRangeMode highlightRange;
bool ownModel : 1;
bool wrap : 1;
@@ -407,15 +416,15 @@ public:
bool haveHighlightRange : 1;
};
-void QFxListViewPrivate::init()
+void QmlGraphicsListViewPrivate::init()
{
- Q_Q(QFxListView);
+ Q_Q(QmlGraphicsListView);
q->setFlag(QGraphicsItem::ItemIsFocusScope);
QObject::connect(q, SIGNAL(heightChanged()), q, SLOT(refill()));
QObject::connect(q, SIGNAL(widthChanged()), q, SLOT(refill()));
}
-void QFxListViewPrivate::clear()
+void QmlGraphicsListViewPrivate::clear()
{
for (int i = 0; i < visibleItems.count(); ++i)
releaseItem(visibleItems.at(i));
@@ -429,13 +438,13 @@ void QFxListViewPrivate::clear()
trackedItem = 0;
}
-FxListItem *QFxListViewPrivate::createItem(int modelIndex)
+FxListItem *QmlGraphicsListViewPrivate::createItem(int modelIndex)
{
- Q_Q(QFxListView);
+ Q_Q(QmlGraphicsListView);
// create object
requestedIndex = modelIndex;
FxListItem *listItem = 0;
- if (QFxItem *item = model->item(modelIndex, false)) {
+ if (QmlGraphicsItem *item = model->item(modelIndex, false)) {
listItem = new FxListItem(item, q);
listItem->index = modelIndex;
// initialise attached properties
@@ -454,7 +463,7 @@ FxListItem *QFxListViewPrivate::createItem(int modelIndex)
model->completeItem();
listItem->item->setZValue(1);
listItem->item->setParent(q->viewport());
- if (orient == QFxListView::Vertical)
+ if (orient == QmlGraphicsListView::Vertical)
QObject::connect(listItem->item, SIGNAL(heightChanged()), q, SLOT(itemResized()));
else
QObject::connect(listItem->item, SIGNAL(widthChanged()), q, SLOT(itemResized()));
@@ -464,14 +473,14 @@ FxListItem *QFxListViewPrivate::createItem(int modelIndex)
return listItem;
}
-void QFxListViewPrivate::releaseItem(FxListItem *item)
+void QmlGraphicsListViewPrivate::releaseItem(FxListItem *item)
{
- Q_Q(QFxListView);
+ Q_Q(QmlGraphicsListView);
if (!item)
return;
if (trackedItem == item) {
- const char *notifier1 = orient == QFxListView::Vertical ? SIGNAL(yChanged()) : SIGNAL(xChanged());
- const char *notifier2 = orient == QFxListView::Vertical ? SIGNAL(heightChanged()) : SIGNAL(widthChanged());
+ const char *notifier1 = orient == QmlGraphicsListView::Vertical ? SIGNAL(yChanged()) : SIGNAL(xChanged());
+ const char *notifier2 = orient == QmlGraphicsListView::Vertical ? SIGNAL(heightChanged()) : SIGNAL(widthChanged());
QObject::disconnect(trackedItem->item, notifier1, q, SLOT(trackedPositionChanged()));
QObject::disconnect(trackedItem->item, notifier2, q, SLOT(trackedPositionChanged()));
trackedItem = 0;
@@ -479,7 +488,7 @@ void QFxListViewPrivate::releaseItem(FxListItem *item)
if (model->release(item->item) == 0) {
// item was not destroyed, and we no longer reference it.
unrequestedItems.insert(item->item, model->indexOf(item->item, q));
- if (orient == QFxListView::Vertical)
+ if (orient == QmlGraphicsListView::Vertical)
QObject::disconnect(item->item, SIGNAL(heightChanged()), q, SLOT(itemResized()));
else
QObject::disconnect(item->item, SIGNAL(widthChanged()), q, SLOT(itemResized()));
@@ -487,9 +496,9 @@ void QFxListViewPrivate::releaseItem(FxListItem *item)
delete item;
}
-void QFxListViewPrivate::refill(qreal from, qreal to)
+void QmlGraphicsListViewPrivate::refill(qreal from, qreal to)
{
- Q_Q(QFxListView);
+ Q_Q(QmlGraphicsListView);
if (!isValid() || !q->isComponentComplete())
return;
from -= buffer;
@@ -553,16 +562,13 @@ void QFxListViewPrivate::refill(qreal from, qreal to)
updateAverage();
if (!sectionExpression.isEmpty())
updateCurrentSection();
- if (orient == QFxListView::Vertical)
- q->setViewportHeight(endPosition() - startPosition());
- else
- q->setViewportWidth(endPosition() - startPosition());
+ updateViewport();
}
}
-void QFxListViewPrivate::layout()
+void QmlGraphicsListViewPrivate::layout()
{
- Q_Q(QFxListView);
+ Q_Q(QmlGraphicsListView);
if (!visibleItems.isEmpty()) {
int oldEnd = visibleItems.last()->endPosition();
int pos = visibleItems.first()->endPosition() + spacing + 1;
@@ -581,40 +587,41 @@ void QFxListViewPrivate::layout()
updateHighlight();
fixupPosition();
updateUnrequestedPositions();
+ updateViewport();
}
-void QFxListViewPrivate::updateUnrequestedIndexes()
+void QmlGraphicsListViewPrivate::updateUnrequestedIndexes()
{
- Q_Q(QFxListView);
- QHash<QFxItem*,int>::iterator it;
+ Q_Q(QmlGraphicsListView);
+ QHash<QmlGraphicsItem*,int>::iterator it;
for (it = unrequestedItems.begin(); it != unrequestedItems.end(); ++it)
*it = model->indexOf(it.key(), q);
}
-void QFxListViewPrivate::updateUnrequestedPositions()
+void QmlGraphicsListViewPrivate::updateUnrequestedPositions()
{
- QHash<QFxItem*,int>::const_iterator it;
+ QHash<QmlGraphicsItem*,int>::const_iterator it;
for (it = unrequestedItems.begin(); it != unrequestedItems.end(); ++it) {
if (visibleItem(*it))
continue;
- if (orient == QFxListView::Vertical)
+ if (orient == QmlGraphicsListView::Vertical)
it.key()->setY(positionAt(*it));
else
it.key()->setX(positionAt(*it));
}
}
-void QFxListViewPrivate::updateTrackedItem()
+void QmlGraphicsListViewPrivate::updateTrackedItem()
{
- Q_Q(QFxListView);
+ Q_Q(QmlGraphicsListView);
FxListItem *item = currentItem;
if (highlight)
item = highlight;
FxListItem *oldTracked = trackedItem;
- const char *notifier1 = orient == QFxListView::Vertical ? SIGNAL(yChanged()) : SIGNAL(xChanged());
- const char *notifier2 = orient == QFxListView::Vertical ? SIGNAL(heightChanged()) : SIGNAL(widthChanged());
+ const char *notifier1 = orient == QmlGraphicsListView::Vertical ? SIGNAL(yChanged()) : SIGNAL(xChanged());
+ const char *notifier2 = orient == QmlGraphicsListView::Vertical ? SIGNAL(heightChanged()) : SIGNAL(widthChanged());
if (trackedItem && item != trackedItem) {
QObject::disconnect(trackedItem->item, notifier1, q, SLOT(trackedPositionChanged()));
@@ -631,9 +638,9 @@ void QFxListViewPrivate::updateTrackedItem()
q->trackedPositionChanged();
}
-void QFxListViewPrivate::createHighlight()
+void QmlGraphicsListViewPrivate::createHighlight()
{
- Q_Q(QFxListView);
+ Q_Q(QmlGraphicsListView);
if (highlight) {
if (trackedItem == highlight)
trackedItem = 0;
@@ -647,13 +654,13 @@ void QFxListViewPrivate::createHighlight()
}
if (currentItem) {
- QFxItem *item = 0;
+ QmlGraphicsItem *item = 0;
if (highlightComponent) {
QmlContext *highlightContext = new QmlContext(qmlContext(q));
QObject *nobj = highlightComponent->create(highlightContext);
if (nobj) {
highlightContext->setParent(nobj);
- item = qobject_cast<QFxItem *>(nobj);
+ item = qobject_cast<QmlGraphicsItem *>(nobj);
if (!item) {
delete nobj;
} else {
@@ -663,22 +670,22 @@ void QFxListViewPrivate::createHighlight()
delete highlightContext;
}
} else {
- item = new QFxItem;
+ item = new QmlGraphicsItem;
item->setParent(q->viewport());
}
if (item) {
item->setZValue(0);
highlight = new FxListItem(item, q);
- if (orient == QFxListView::Vertical)
+ if (orient == QmlGraphicsListView::Vertical)
highlight->item->setHeight(currentItem->item->height());
else
highlight->item->setWidth(currentItem->item->width());
- const QLatin1String posProp(orient == QFxListView::Vertical ? "y" : "x");
+ const QLatin1String posProp(orient == QmlGraphicsListView::Vertical ? "y" : "x");
highlightPosAnimator = new QmlEaseFollow(q);
highlightPosAnimator->setTarget(QmlMetaProperty(highlight->item, posProp));
highlightPosAnimator->setVelocity(highlightMoveSpeed);
highlightPosAnimator->setEnabled(autoHighlight);
- const QLatin1String sizeProp(orient == QFxListView::Vertical ? "height" : "width");
+ const QLatin1String sizeProp(orient == QmlGraphicsListView::Vertical ? "height" : "width");
highlightSizeAnimator = new QmlEaseFollow(q);
highlightSizeAnimator->setVelocity(highlightResizeSpeed);
highlightSizeAnimator->setTarget(QmlMetaProperty(highlight->item, sizeProp));
@@ -687,7 +694,7 @@ void QFxListViewPrivate::createHighlight()
}
}
-void QFxListViewPrivate::updateHighlight()
+void QmlGraphicsListViewPrivate::updateHighlight()
{
if ((!currentItem && highlight) || (currentItem && !highlight))
createHighlight();
@@ -695,7 +702,7 @@ void QFxListViewPrivate::updateHighlight()
// auto-update highlight
highlightPosAnimator->setSourceValue(currentItem->position());
highlightSizeAnimator->setSourceValue(currentItem->size());
- if (orient == QFxListView::Vertical) {
+ if (orient == QmlGraphicsListView::Vertical) {
if (highlight->item->width() == 0)
highlight->item->setWidth(currentItem->item->width());
} else {
@@ -706,7 +713,7 @@ void QFxListViewPrivate::updateHighlight()
updateTrackedItem();
}
-void QFxListViewPrivate::updateSections()
+void QmlGraphicsListViewPrivate::updateSections()
{
if (!sectionExpression.isEmpty()) {
QString prevSection;
@@ -714,7 +721,7 @@ void QFxListViewPrivate::updateSections()
prevSection = sectionAt(visibleIndex-1);
for (int i = 0; i < visibleItems.count(); ++i) {
if (visibleItems.at(i)->index != -1) {
- QFxListViewAttached *attached = visibleItems.at(i)->attached;
+ QmlGraphicsListViewAttached *attached = visibleItems.at(i)->attached;
attached->setPrevSection(prevSection);
prevSection = attached->section();
}
@@ -722,7 +729,7 @@ void QFxListViewPrivate::updateSections()
}
}
-void QFxListViewPrivate::updateCurrentSection()
+void QmlGraphicsListViewPrivate::updateCurrentSection()
{
if (sectionExpression.isEmpty() || visibleItems.isEmpty()) {
currentSection = QString();
@@ -738,9 +745,9 @@ void QFxListViewPrivate::updateCurrentSection()
currentSection = visibleItems.first()->attached->section();
}
-void QFxListViewPrivate::updateCurrent(int modelIndex)
+void QmlGraphicsListViewPrivate::updateCurrent(int modelIndex)
{
- Q_Q(QFxListView);
+ Q_Q(QmlGraphicsListView);
if (!isValid() || modelIndex < 0 || modelIndex >= model->count()) {
if (currentItem) {
currentItem->attached->setIsCurrentItem(false);
@@ -780,7 +787,7 @@ void QFxListViewPrivate::updateCurrent(int modelIndex)
releaseItem(oldCurrentItem);
}
-void QFxListViewPrivate::updateAverage()
+void QmlGraphicsListViewPrivate::updateAverage()
{
if (!visibleItems.count())
return;
@@ -790,21 +797,21 @@ void QFxListViewPrivate::updateAverage()
averageSize = sum / visibleItems.count();
}
-void QFxListViewPrivate::fixupPosition()
+void QmlGraphicsListViewPrivate::fixupPosition()
{
- if (orient == QFxListView::Vertical)
+ if (orient == QmlGraphicsListView::Vertical)
fixupY();
else
fixupX();
}
-void QFxListViewPrivate::fixupY()
+void QmlGraphicsListViewPrivate::fixupY()
{
- QFxFlickablePrivate::fixupY();
- if (orient == QFxListView::Horizontal)
+ QmlGraphicsFlickablePrivate::fixupY();
+ if (orient == QmlGraphicsListView::Horizontal)
return;
- if (haveHighlightRange && highlightRange == QFxListView::StrictlyEnforceRange) {
+ if (haveHighlightRange && highlightRange == QmlGraphicsListView::StrictlyEnforceRange) {
if (currentItem && highlight && currentItem->position() != highlight->position()) {
moveReason = Mouse;
timeline.clear();
@@ -813,13 +820,13 @@ void QFxListViewPrivate::fixupY()
}
}
-void QFxListViewPrivate::fixupX()
+void QmlGraphicsListViewPrivate::fixupX()
{
- QFxFlickablePrivate::fixupX();
- if (orient == QFxListView::Vertical)
+ QmlGraphicsFlickablePrivate::fixupX();
+ if (orient == QmlGraphicsListView::Vertical)
return;
- if (haveHighlightRange && highlightRange == QFxListView::StrictlyEnforceRange) {
+ if (haveHighlightRange && highlightRange == QmlGraphicsListView::StrictlyEnforceRange) {
if (currentItem && highlight && currentItem->position() != highlight->position()) {
moveReason = Mouse;
timeline.clear();
@@ -828,12 +835,12 @@ void QFxListViewPrivate::fixupX()
}
}
-void QFxListViewPrivate::flickX(qreal velocity)
+void QmlGraphicsListViewPrivate::flickX(qreal velocity)
{
- Q_Q(QFxListView);
+ Q_Q(QmlGraphicsListView);
- if (!haveHighlightRange || highlightRange != QFxListView::StrictlyEnforceRange) {
- QFxFlickablePrivate::flickX(velocity);
+ if (!haveHighlightRange || highlightRange != QmlGraphicsListView::StrictlyEnforceRange) {
+ QmlGraphicsFlickablePrivate::flickX(velocity);
return;
}
@@ -886,12 +893,12 @@ void QFxListViewPrivate::flickX(qreal velocity)
}
}
-void QFxListViewPrivate::flickY(qreal velocity)
+void QmlGraphicsListViewPrivate::flickY(qreal velocity)
{
- Q_Q(QFxListView);
+ Q_Q(QmlGraphicsListView);
- if (!haveHighlightRange || highlightRange != QFxListView::StrictlyEnforceRange) {
- QFxFlickablePrivate::flickY(velocity);
+ if (!haveHighlightRange || highlightRange != QmlGraphicsListView::StrictlyEnforceRange) {
+ QmlGraphicsFlickablePrivate::flickY(velocity);
return;
}
@@ -947,7 +954,7 @@ void QFxListViewPrivate::flickY(qreal velocity)
//----------------------------------------------------------------------------
/*!
- \qmlclass ListView
+ \qmlclass ListView QFxListView
\inherits Flickable
\brief The ListView item provides a list view of items provided by a model.
@@ -970,16 +977,16 @@ void QFxListViewPrivate::flickY(qreal velocity)
the model would be implemented in C++, or perhaps via a SQL data source.
*/
-QFxListView::QFxListView(QFxItem *parent)
- : QFxFlickable(*(new QFxListViewPrivate), parent)
+QmlGraphicsListView::QmlGraphicsListView(QmlGraphicsItem *parent)
+ : QmlGraphicsFlickable(*(new QmlGraphicsListViewPrivate), parent)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
d->init();
}
-QFxListView::~QFxListView()
+QmlGraphicsListView::~QmlGraphicsListView()
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
d->clear();
if (d->ownModel)
delete d->model;
@@ -1072,27 +1079,27 @@ QFxListView::~QFxListView()
\sa {qmlmodels}{Data Models}
*/
-QVariant QFxListView::model() const
+QVariant QmlGraphicsListView::model() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
return d->modelVariant;
}
-void QFxListView::setModel(const QVariant &model)
+void QmlGraphicsListView::setModel(const QVariant &model)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
if (d->model) {
disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
disconnect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
- disconnect(d->model, SIGNAL(createdItem(int, QFxItem*)), this, SLOT(createdItem(int,QFxItem*)));
- disconnect(d->model, SIGNAL(destroyingItem(QFxItem*)), this, SLOT(destroyingItem(QFxItem*)));
+ disconnect(d->model, SIGNAL(createdItem(int, QmlGraphicsItem*)), this, SLOT(createdItem(int,QmlGraphicsItem*)));
+ disconnect(d->model, SIGNAL(destroyingItem(QmlGraphicsItem*)), this, SLOT(destroyingItem(QmlGraphicsItem*)));
}
d->clear();
d->modelVariant = model;
QObject *object = qvariant_cast<QObject*>(model);
- QFxVisualModel *vim = 0;
- if (object && (vim = qobject_cast<QFxVisualModel *>(object))) {
+ QmlGraphicsVisualModel *vim = 0;
+ if (object && (vim = qobject_cast<QmlGraphicsVisualModel *>(object))) {
if (d->ownModel) {
delete d->model;
d->ownModel = false;
@@ -1100,10 +1107,10 @@ void QFxListView::setModel(const QVariant &model)
d->model = vim;
} else {
if (!d->ownModel) {
- d->model = new QFxVisualDataModel(qmlContext(this));
+ d->model = new QmlGraphicsVisualDataModel(qmlContext(this));
d->ownModel = true;
}
- if (QFxVisualDataModel *dataModel = qobject_cast<QFxVisualDataModel*>(d->model))
+ if (QmlGraphicsVisualDataModel *dataModel = qobject_cast<QmlGraphicsVisualDataModel*>(d->model))
dataModel->setModel(model);
}
if (d->model) {
@@ -1114,8 +1121,8 @@ void QFxListView::setModel(const QVariant &model)
connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
connect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
- connect(d->model, SIGNAL(createdItem(int, QFxItem*)), this, SLOT(createdItem(int,QFxItem*)));
- connect(d->model, SIGNAL(destroyingItem(QFxItem*)), this, SLOT(destroyingItem(QFxItem*)));
+ connect(d->model, SIGNAL(createdItem(int, QmlGraphicsItem*)), this, SLOT(createdItem(int,QmlGraphicsItem*)));
+ connect(d->model, SIGNAL(destroyingItem(QmlGraphicsItem*)), this, SLOT(destroyingItem(QmlGraphicsItem*)));
refill();
emit countChanged();
}
@@ -1129,25 +1136,25 @@ void QFxListView::setModel(const QVariant &model)
Here is an example delegate:
\snippet doc/src/snippets/declarative/listview/listview.qml 0
*/
-QmlComponent *QFxListView::delegate() const
+QmlComponent *QmlGraphicsListView::delegate() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
if (d->model) {
- if (QFxVisualDataModel *dataModel = qobject_cast<QFxVisualDataModel*>(d->model))
+ if (QmlGraphicsVisualDataModel *dataModel = qobject_cast<QmlGraphicsVisualDataModel*>(d->model))
return dataModel->delegate();
}
return 0;
}
-void QFxListView::setDelegate(QmlComponent *delegate)
+void QmlGraphicsListView::setDelegate(QmlComponent *delegate)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
if (!d->ownModel) {
- d->model = new QFxVisualDataModel(qmlContext(this));
+ d->model = new QmlGraphicsVisualDataModel(qmlContext(this));
d->ownModel = true;
}
- if (QFxVisualDataModel *dataModel = qobject_cast<QFxVisualDataModel*>(d->model)) {
+ if (QmlGraphicsVisualDataModel *dataModel = qobject_cast<QmlGraphicsVisualDataModel*>(d->model)) {
dataModel->setDelegate(delegate);
d->updateCurrent(d->currentIndex);
refill();
@@ -1162,25 +1169,27 @@ void QFxListView::setDelegate(QmlComponent *delegate)
\c currentItem is the current item. Note that the position of the current item
may only be approximate until it becomes visible in the view.
*/
-int QFxListView::currentIndex() const
+int QmlGraphicsListView::currentIndex() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
return d->currentIndex;
}
-void QFxListView::setCurrentIndex(int index)
+void QmlGraphicsListView::setCurrentIndex(int index)
{
- Q_D(QFxListView);
- d->moveReason = QFxListViewPrivate::Other;
- if (d->isValid() && index != d->currentIndex && index < d->model->count() && index >= 0)
+ Q_D(QmlGraphicsListView);
+ d->moveReason = QmlGraphicsListViewPrivate::Other;
+ if (d->isValid() && index != d->currentIndex && index < d->model->count() && index >= 0) {
+ cancelFlick();
d->updateCurrent(index);
- else
+ } else {
d->currentIndex = index;
+ }
}
-QFxItem *QFxListView::currentItem()
+QmlGraphicsItem *QmlGraphicsListView::currentItem()
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
if (!d->currentItem)
return 0;
return d->currentItem->item;
@@ -1190,9 +1199,9 @@ QFxItem *QFxListView::currentItem()
\qmlproperty int ListView::count
This property holds the number of items in the view.
*/
-int QFxListView::count() const
+int QmlGraphicsListView::count() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
if (d->model)
return d->model->count();
return 0;
@@ -1215,15 +1224,15 @@ int QFxListView::count() const
\sa highlightFollowsCurrentItem
*/
-QmlComponent *QFxListView::highlight() const
+QmlComponent *QmlGraphicsListView::highlight() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
return d->highlightComponent;
}
-void QFxListView::setHighlight(QmlComponent *highlight)
+void QmlGraphicsListView::setHighlight(QmlComponent *highlight)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
delete d->highlightComponent;
d->highlightComponent = highlight;
d->updateCurrent(d->currentIndex);
@@ -1247,15 +1256,15 @@ void QFxListView::setHighlight(QmlComponent *highlight)
\sa highlight
*/
-bool QFxListView::highlightFollowsCurrentItem() const
+bool QmlGraphicsListView::highlightFollowsCurrentItem() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
return d->autoHighlight;
}
-void QFxListView::setHighlightFollowsCurrentItem(bool autoHighlight)
+void QmlGraphicsListView::setHighlightFollowsCurrentItem(bool autoHighlight)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
d->autoHighlight = autoHighlight;
if (d->highlightPosAnimator) {
d->highlightPosAnimator->setEnabled(d->autoHighlight);
@@ -1287,41 +1296,41 @@ void QFxListView::setHighlightFollowsCurrentItem(bool autoHighlight)
Note that a valid range requires preferredHighlightEnd to be greater
than or equal to preferredHighlightBegin.
*/
-qreal QFxListView::preferredHighlightBegin() const
+qreal QmlGraphicsListView::preferredHighlightBegin() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
return d->highlightRangeStart;
}
-void QFxListView::setPreferredHighlightBegin(qreal start)
+void QmlGraphicsListView::setPreferredHighlightBegin(qreal start)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
d->highlightRangeStart = start;
d->haveHighlightRange = d->highlightRange != NoHighlightRange && d->highlightRangeStart <= d->highlightRangeEnd;
}
-qreal QFxListView::preferredHighlightEnd() const
+qreal QmlGraphicsListView::preferredHighlightEnd() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
return d->highlightRangeEnd;
}
-void QFxListView::setPreferredHighlightEnd(qreal end)
+void QmlGraphicsListView::setPreferredHighlightEnd(qreal end)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
d->highlightRangeEnd = end;
d->haveHighlightRange = d->highlightRange != NoHighlightRange && d->highlightRangeStart <= d->highlightRangeEnd;
}
-QFxListView::HighlightRangeMode QFxListView::highlightRangeMode() const
+QmlGraphicsListView::HighlightRangeMode QmlGraphicsListView::highlightRangeMode() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
return d->highlightRange;
}
-void QFxListView::setHighlightRangeMode(HighlightRangeMode mode)
+void QmlGraphicsListView::setHighlightRangeMode(HighlightRangeMode mode)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
d->highlightRange = mode;
d->haveHighlightRange = d->highlightRange != NoHighlightRange && d->highlightRangeStart <= d->highlightRangeEnd;
}
@@ -1331,15 +1340,15 @@ void QFxListView::setHighlightRangeMode(HighlightRangeMode mode)
This property holds the spacing to leave between items.
*/
-qreal QFxListView::spacing() const
+qreal QmlGraphicsListView::spacing() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
return d->spacing;
}
-void QFxListView::setSpacing(qreal spacing)
+void QmlGraphicsListView::setSpacing(qreal spacing)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
if (spacing != d->spacing) {
d->spacing = spacing;
d->layout();
@@ -1358,18 +1367,18 @@ void QFxListView::setSpacing(qreal spacing)
Horizontal Example:
\image ListViewHorizontal.png
*/
-QFxListView::Orientation QFxListView::orientation() const
+QmlGraphicsListView::Orientation QmlGraphicsListView::orientation() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
return d->orient;
}
-void QFxListView::setOrientation(QFxListView::Orientation orientation)
+void QmlGraphicsListView::setOrientation(QmlGraphicsListView::Orientation orientation)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
if (d->orient != orientation) {
d->orient = orientation;
- if (d->orient == QFxListView::Vertical)
+ if (d->orient == QmlGraphicsListView::Vertical)
setViewportWidth(-1);
else
setViewportHeight(-1);
@@ -1387,15 +1396,15 @@ void QFxListView::setOrientation(QFxListView::Orientation orientation)
If this property is true then key presses to move off of one end of the list will cause the
current item to jump to the other end.
*/
-bool QFxListView::isWrapEnabled() const
+bool QmlGraphicsListView::isWrapEnabled() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
return d->wrap;
}
-void QFxListView::setWrapEnabled(bool wrap)
+void QmlGraphicsListView::setWrapEnabled(bool wrap)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
d->wrap = wrap;
}
@@ -1407,15 +1416,15 @@ void QFxListView::setWrapEnabled(bool wrap)
and below the bottom of the list to cache. Setting this value can make
scrolling the list smoother at the expense of additional memory usage.
*/
-int QFxListView::cacheBuffer() const
+int QmlGraphicsListView::cacheBuffer() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
return d->buffer;
}
-void QFxListView::setCacheBuffer(int b)
+void QmlGraphicsListView::setCacheBuffer(int b)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
if (d->buffer != b) {
d->buffer = b;
if (isComponentComplete())
@@ -1437,24 +1446,24 @@ void QFxListView::setCacheBuffer(int b)
\image ListViewSections.png
*/
-QString QFxListView::sectionExpression() const
+QString QmlGraphicsListView::sectionExpression() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
return d->sectionExpression;
}
-void QFxListView::setSectionExpression(const QString &expression)
+void QmlGraphicsListView::setSectionExpression(const QString &expression)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
if (d->sectionExpression != expression) {
d->sectionExpression = expression;
emit sectionExpressionChanged();
}
}
-QString QFxListView::currentSection() const
+QString QmlGraphicsListView::currentSection() const
{
- Q_D(const QFxListView);
+ Q_D(const QmlGraphicsListView);
return d->currentSection;
}
@@ -1463,15 +1472,15 @@ QString QFxListView::currentSection() const
This property holds the moving animation speed of the highlight delegate.
*/
-qreal QFxListView::highlightMoveSpeed() const
+qreal QmlGraphicsListView::highlightMoveSpeed() const
{
- Q_D(const QFxListView);\
+ Q_D(const QmlGraphicsListView);\
return d->highlightMoveSpeed;
}
-void QFxListView::setHighlightMoveSpeed(qreal speed)
+void QmlGraphicsListView::setHighlightMoveSpeed(qreal speed)
{
- Q_D(QFxListView);\
+ Q_D(QmlGraphicsListView);\
if (d->highlightMoveSpeed != speed)
{
d->highlightMoveSpeed = speed;
@@ -1484,15 +1493,15 @@ void QFxListView::setHighlightMoveSpeed(qreal speed)
This property holds the resizing animation speed of the highlight delegate.
*/
-qreal QFxListView::highlightResizeSpeed() const
+qreal QmlGraphicsListView::highlightResizeSpeed() const
{
- Q_D(const QFxListView);\
+ Q_D(const QmlGraphicsListView);\
return d->highlightResizeSpeed;
}
-void QFxListView::setHighlightResizeSpeed(qreal speed)
+void QmlGraphicsListView::setHighlightResizeSpeed(qreal speed)
{
- Q_D(QFxListView);\
+ Q_D(QmlGraphicsListView);\
if (d->highlightResizeSpeed != speed)
{
d->highlightResizeSpeed = speed;
@@ -1500,14 +1509,14 @@ void QFxListView::setHighlightResizeSpeed(qreal speed)
}
}
-void QFxListView::viewportMoved()
+void QmlGraphicsListView::viewportMoved()
{
- Q_D(QFxListView);
- QFxFlickable::viewportMoved();
+ Q_D(QmlGraphicsListView);
+ QmlGraphicsFlickable::viewportMoved();
refill();
if (isFlicking() || d->moving)
- d->moveReason = QFxListViewPrivate::Mouse;
- if (d->moveReason == QFxListViewPrivate::Mouse) {
+ d->moveReason = QmlGraphicsListViewPrivate::Mouse;
+ if (d->moveReason == QmlGraphicsListViewPrivate::Mouse) {
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange && d->highlight) {
int idx = d->snapIndex();
if (idx >= 0 && idx != d->currentIndex)
@@ -1523,11 +1532,11 @@ void QFxListView::viewportMoved()
}
}
-qreal QFxListView::minYExtent() const
+qreal QmlGraphicsListView::minYExtent() const
{
- Q_D(const QFxListView);
- if (d->orient == QFxListView::Horizontal)
- return QFxFlickable::minYExtent();
+ Q_D(const QmlGraphicsListView);
+ if (d->orient == QmlGraphicsListView::Horizontal)
+ return QmlGraphicsFlickable::minYExtent();
qreal extent = -d->startPosition();
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
extent += d->highlightRangeStart;
@@ -1535,11 +1544,11 @@ qreal QFxListView::minYExtent() const
return extent;
}
-qreal QFxListView::maxYExtent() const
+qreal QmlGraphicsListView::maxYExtent() const
{
- Q_D(const QFxListView);
- if (d->orient == QFxListView::Horizontal)
- return QFxFlickable::maxYExtent();
+ Q_D(const QmlGraphicsListView);
+ if (d->orient == QmlGraphicsListView::Horizontal)
+ return QmlGraphicsFlickable::maxYExtent();
qreal extent;
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
extent = -(d->positionAt(count()-1) - d->highlightRangeEnd);
@@ -1551,11 +1560,11 @@ qreal QFxListView::maxYExtent() const
return extent;
}
-qreal QFxListView::minXExtent() const
+qreal QmlGraphicsListView::minXExtent() const
{
- Q_D(const QFxListView);
- if (d->orient == QFxListView::Vertical)
- return QFxFlickable::minXExtent();
+ Q_D(const QmlGraphicsListView);
+ if (d->orient == QmlGraphicsListView::Vertical)
+ return QmlGraphicsFlickable::minXExtent();
qreal extent = -d->startPosition();
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
extent += d->highlightRangeStart;
@@ -1563,11 +1572,11 @@ qreal QFxListView::minXExtent() const
return extent;
}
-qreal QFxListView::maxXExtent() const
+qreal QmlGraphicsListView::maxXExtent() const
{
- Q_D(const QFxListView);
- if (d->orient == QFxListView::Vertical)
- return QFxFlickable::maxXExtent();
+ Q_D(const QmlGraphicsListView);
+ if (d->orient == QmlGraphicsListView::Vertical)
+ return QmlGraphicsFlickable::maxXExtent();
qreal extent;
if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange)
extent = -(d->positionAt(count()-1) - d->highlightRangeEnd);
@@ -1579,18 +1588,18 @@ qreal QFxListView::maxXExtent() const
return extent;
}
-void QFxListView::keyPressEvent(QKeyEvent *event)
+void QmlGraphicsListView::keyPressEvent(QKeyEvent *event)
{
- Q_D(QFxListView);
- QFxFlickable::keyPressEvent(event);
+ Q_D(QmlGraphicsListView);
+ QmlGraphicsFlickable::keyPressEvent(event);
if (event->isAccepted())
return;
if (d->model && d->model->count() && d->interactive) {
- if ((d->orient == QFxListView::Horizontal && event->key() == Qt::Key_Left)
- || (d->orient == QFxListView::Vertical && event->key() == Qt::Key_Up)) {
+ if ((d->orient == QmlGraphicsListView::Horizontal && event->key() == Qt::Key_Left)
+ || (d->orient == QmlGraphicsListView::Vertical && event->key() == Qt::Key_Up)) {
if (currentIndex() > 0 || (d->wrap && !event->isAutoRepeat())) {
- d->moveReason = QFxListViewPrivate::Key;
+ d->moveReason = QmlGraphicsListViewPrivate::Key;
decrementCurrentIndex();
event->accept();
return;
@@ -1598,10 +1607,10 @@ void QFxListView::keyPressEvent(QKeyEvent *event)
event->accept();
return;
}
- } else if ((d->orient == QFxListView::Horizontal && event->key() == Qt::Key_Right)
- || (d->orient == QFxListView::Vertical && event->key() == Qt::Key_Down)) {
+ } else if ((d->orient == QmlGraphicsListView::Horizontal && event->key() == Qt::Key_Right)
+ || (d->orient == QmlGraphicsListView::Vertical && event->key() == Qt::Key_Down)) {
if (currentIndex() < d->model->count() - 1 || (d->wrap && !event->isAutoRepeat())) {
- d->moveReason = QFxListViewPrivate::Key;
+ d->moveReason = QmlGraphicsListViewPrivate::Key;
incrementCurrentIndex();
event->accept();
return;
@@ -1611,7 +1620,7 @@ void QFxListView::keyPressEvent(QKeyEvent *event)
}
}
}
- d->moveReason = QFxListViewPrivate::Other;
+ d->moveReason = QmlGraphicsListViewPrivate::Other;
event->ignore();
}
@@ -1621,11 +1630,12 @@ void QFxListView::keyPressEvent(QKeyEvent *event)
Increments the current index. The current index will wrap
if keyNavigationWraps is true and it is currently at the end.
*/
-void QFxListView::incrementCurrentIndex()
+void QmlGraphicsListView::incrementCurrentIndex()
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
if (currentIndex() < d->model->count() - 1 || d->wrap) {
int index = currentIndex()+1;
+ cancelFlick();
d->updateCurrent(index < d->model->count() ? index : 0);
}
}
@@ -1636,69 +1646,79 @@ void QFxListView::incrementCurrentIndex()
Decrements the current index. The current index will wrap
if keyNavigationWraps is true and it is currently at the beginning.
*/
-void QFxListView::decrementCurrentIndex()
+void QmlGraphicsListView::decrementCurrentIndex()
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
if (currentIndex() > 0 || d->wrap) {
int index = currentIndex()-1;
+ cancelFlick();
d->updateCurrent(index >= 0 ? index : d->model->count()-1);
}
}
-void QFxListView::componentComplete()
+void QmlGraphicsListView::componentComplete()
{
- Q_D(QFxListView);
- QFxFlickable::componentComplete();
+ Q_D(QmlGraphicsListView);
+ QmlGraphicsFlickable::componentComplete();
if (d->currentIndex < 0)
d->updateCurrent(0);
refill();
d->fixupPosition();
}
-void QFxListView::refill()
+void QmlGraphicsListView::refill()
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
d->refill(d->position(), d->position()+d->size()-1);
}
-void QFxListView::trackedPositionChanged()
+void QmlGraphicsListView::trackedPositionChanged()
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
if (!d->trackedItem)
return;
- if (!isFlicking() && !d->moving && d->moveReason != QFxListViewPrivate::Mouse) {
+ if (!isFlicking() && !d->moving && d->moveReason != QmlGraphicsListViewPrivate::Mouse) {
const qreal trackedPos = d->trackedItem->position();
+ const qreal viewPos = d->position();
if (d->haveHighlightRange) {
if (d->highlightRange == StrictlyEnforceRange) {
- qreal pos = d->position();
+ qreal pos = viewPos;
if (trackedPos > pos + d->highlightRangeEnd - d->trackedItem->size())
pos = trackedPos - d->highlightRangeEnd + d->trackedItem->size();
if (trackedPos < pos + d->highlightRangeStart)
pos = trackedPos - d->highlightRangeStart;
d->setPosition(pos);
} else {
- qreal pos = d->position();
+ qreal pos = viewPos;
if (trackedPos < d->startPosition() + d->highlightRangeStart) {
pos = d->startPosition();
} else if (d->trackedItem->endPosition() > d->endPosition() - d->size() + d->highlightRangeEnd) {
pos = d->endPosition() - d->size();
} else {
- if (trackedPos < d->position() + d->highlightRangeStart) {
+ if (trackedPos < viewPos + d->highlightRangeStart) {
pos = trackedPos - d->highlightRangeStart;
- } else if (trackedPos > d->position() + d->highlightRangeEnd - d->trackedItem->size()) {
+ } else if (trackedPos > viewPos + d->highlightRangeEnd - d->trackedItem->size()) {
pos = trackedPos - d->highlightRangeEnd + d->trackedItem->size();
}
}
d->setPosition(pos);
}
} else {
- if (trackedPos < d->position()) {
- d->setPosition(trackedPos);
+ if (trackedPos < viewPos && d->currentItem->position() < viewPos) {
+ d->setPosition(d->currentItem->position() < trackedPos ? trackedPos : d->currentItem->position());
d->fixupPosition();
- } else if (d->trackedItem->endPosition() > d->position() + d->size()) {
- qreal pos = d->trackedItem->endPosition() - d->size();
- if (d->trackedItem->size() > d->size())
- pos = trackedPos;
+ } else if (d->trackedItem->endPosition() > viewPos + d->size()
+ && d->currentItem->endPosition() > viewPos + d->size()) {
+ qreal pos;
+ if (d->trackedItem->endPosition() < d->currentItem->endPosition()) {
+ pos = d->trackedItem->endPosition() - d->size();
+ if (d->trackedItem->size() > d->size())
+ pos = trackedPos;
+ } else {
+ pos = d->currentItem->endPosition() - d->size();
+ if (d->currentItem->size() > d->size())
+ pos = d->currentItem->position();
+ }
d->setPosition(pos);
d->fixupPosition();
}
@@ -1706,19 +1726,19 @@ void QFxListView::trackedPositionChanged()
}
}
-void QFxListView::itemResized()
+void QmlGraphicsListView::itemResized()
{
- Q_D(QFxListView);
- QFxItem *item = qobject_cast<QFxItem*>(sender());
+ Q_D(QmlGraphicsListView);
+ QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem*>(sender());
if (item) {
d->layout();
d->fixupPosition();
}
}
-void QFxListView::itemsInserted(int modelIndex, int count)
+void QmlGraphicsListView::itemsInserted(int modelIndex, int count)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
d->updateUnrequestedIndexes();
if (!d->visibleItems.count() || d->model->count() <= 1) {
d->layout();
@@ -1800,12 +1820,13 @@ void QFxListView::itemsInserted(int modelIndex, int count)
for (int j = 0; j < added.count(); ++j)
added.at(j)->attached->emitAdd();
d->updateUnrequestedPositions();
+ d->updateViewport();
emit countChanged();
}
-void QFxListView::itemsRemoved(int modelIndex, int count)
+void QmlGraphicsListView::itemsRemoved(int modelIndex, int count)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
d->updateUnrequestedIndexes();
bool currentRemoved = d->currentIndex >= modelIndex && d->currentIndex < modelIndex + count;
if (!d->mapRangeFromModel(modelIndex, count)) {
@@ -1900,9 +1921,9 @@ void QFxListView::itemsRemoved(int modelIndex, int count)
emit countChanged();
}
-void QFxListView::destroyRemoved()
+void QmlGraphicsListView::destroyRemoved()
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
for (QList<FxListItem*>::Iterator it = d->visibleItems.begin();
it != d->visibleItems.end();) {
FxListItem *listItem = *it;
@@ -1918,9 +1939,9 @@ void QFxListView::destroyRemoved()
d->layout();
}
-void QFxListView::itemsMoved(int from, int to, int count)
+void QmlGraphicsListView::itemsMoved(int from, int to, int count)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
qreal firstItemPos = d->visibleItems.first()->position();
QHash<int,FxListItem*> moved;
int moveBy = 0;
@@ -1984,31 +2005,32 @@ void QFxListView::itemsMoved(int from, int to, int count)
d->layout();
}
-void QFxListView::createdItem(int index, QFxItem *item)
+void QmlGraphicsListView::createdItem(int index, QmlGraphicsItem *item)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
if (d->requestedIndex != index) {
item->setParentItem(viewport());
d->unrequestedItems.insert(item, index);
- if (d->orient == QFxListView::Vertical)
+ if (d->orient == QmlGraphicsListView::Vertical)
item->setY(d->positionAt(index));
else
item->setX(d->positionAt(index));
}
}
-void QFxListView::destroyingItem(QFxItem *item)
+void QmlGraphicsListView::destroyingItem(QmlGraphicsItem *item)
{
- Q_D(QFxListView);
+ Q_D(QmlGraphicsListView);
d->unrequestedItems.remove(item);
}
-QFxListViewAttached *QFxListView::qmlAttachedProperties(QObject *obj)
+QmlGraphicsListViewAttached *QmlGraphicsListView::qmlAttachedProperties(QObject *obj)
{
- return QFxListViewAttached::properties(obj);
+ return QmlGraphicsListViewAttached::properties(obj);
}
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ListView,QFxListView)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,ListView,QmlGraphicsListView)
QT_END_NAMESPACE
-#include "qfxlistview.moc"
+
+#include "qmlgraphicslistview.moc"
diff --git a/src/declarative/fx/qfxlistview.h b/src/declarative/graphicsitems/qmlgraphicslistview_p.h
index b31b951..115cad9 100644
--- a/src/declarative/fx/qfxlistview.h
+++ b/src/declarative/graphicsitems/qmlgraphicslistview_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,29 +21,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXLISTVIEW_H
-#define QFXLISTVIEW_H
+#ifndef QMLGRAPHICSLISTVIEW_H
+#define QMLGRAPHICSLISTVIEW_H
-#include <QtDeclarative/qfxflickable.h>
+#include <private/qmlgraphicsflickable_p.h>
QT_BEGIN_HEADER
@@ -51,18 +51,18 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxVisualModel;
-class QFxListViewAttached;
-class QFxListViewPrivate;
-class Q_DECLARATIVE_EXPORT QFxListView : public QFxFlickable
+class QmlGraphicsVisualModel;
+class QmlGraphicsListViewAttached;
+class QmlGraphicsListViewPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsListView : public QmlGraphicsFlickable
{
Q_OBJECT
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxListView)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsListView)
Q_PROPERTY(QVariant model READ model WRITE setModel)
Q_PROPERTY(QmlComponent *delegate READ delegate WRITE setDelegate)
Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)
- Q_PROPERTY(QFxItem *currentItem READ currentItem NOTIFY currentIndexChanged)
+ Q_PROPERTY(QmlGraphicsItem *currentItem READ currentItem NOTIFY currentIndexChanged)
Q_PROPERTY(int count READ count NOTIFY countChanged)
Q_PROPERTY(QmlComponent *highlight READ highlight WRITE setHighlight)
Q_PROPERTY(bool highlightFollowsCurrentItem READ highlightFollowsCurrentItem WRITE setHighlightFollowsCurrentItem)
@@ -85,8 +85,8 @@ class Q_DECLARATIVE_EXPORT QFxListView : public QFxFlickable
Q_CLASSINFO("DefaultProperty", "data")
public:
- QFxListView(QFxItem *parent=0);
- ~QFxListView();
+ QmlGraphicsListView(QmlGraphicsItem *parent=0);
+ ~QmlGraphicsListView();
QVariant model() const;
void setModel(const QVariant &);
@@ -97,7 +97,7 @@ public:
int currentIndex() const;
void setCurrentIndex(int idx);
- QFxItem *currentItem();
+ QmlGraphicsItem *currentItem();
int count() const;
QmlComponent *highlight() const;
@@ -139,7 +139,7 @@ public:
qreal highlightResizeSpeed() const;
void setHighlightResizeSpeed(qreal);
- static QFxListViewAttached *qmlAttachedProperties(QObject *);
+ static QmlGraphicsListViewAttached *qmlAttachedProperties(QObject *);
public Q_SLOTS:
void incrementCurrentIndex();
@@ -172,14 +172,14 @@ private Q_SLOTS:
void itemsRemoved(int index, int count);
void itemsMoved(int from, int to, int count);
void destroyRemoved();
- void createdItem(int index, QFxItem *item);
- void destroyingItem(QFxItem *item);
+ void createdItem(int index, QmlGraphicsItem *item);
+ void destroyingItem(QmlGraphicsItem *item);
};
QT_END_NAMESPACE
-QML_DECLARE_TYPEINFO(QFxListView, QML_HAS_ATTACHED_PROPERTIES)
-QML_DECLARE_TYPE(QFxListView)
+QML_DECLARE_TYPEINFO(QmlGraphicsListView, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(QmlGraphicsListView)
QT_END_HEADER
diff --git a/src/declarative/fx/qfxloader.cpp b/src/declarative/graphicsitems/qmlgraphicsloader.cpp
index da4a280..65753d8 100644
--- a/src/declarative/fx/qfxloader.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsloader.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,43 +21,42 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxloader_p.h"
+#include "qmlgraphicsloader_p_p.h"
#include <private/qmlengine_p.h>
QT_BEGIN_NAMESPACE
-QFxLoaderPrivate::QFxLoaderPrivate()
-: item(0), component(0), ownComponent(false), resizeMode(QFxLoader::SizeLoaderToItem)
+QmlGraphicsLoaderPrivate::QmlGraphicsLoaderPrivate()
+: item(0), component(0), ownComponent(false), resizeMode(QmlGraphicsLoader::SizeLoaderToItem)
{
}
-QFxLoaderPrivate::~QFxLoaderPrivate()
+QmlGraphicsLoaderPrivate::~QmlGraphicsLoaderPrivate()
{
}
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Loader,QFxLoader)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Loader,QmlGraphicsLoader)
/*!
- \qmlclass Loader
+ \qmlclass Loader QFxLoader
\inherits Item
\brief The Loader item allows dynamically loading an Item-based
@@ -78,22 +78,22 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Loader,QFxLoader)
/*!
\internal
- \class QFxLoader
+ \class QmlGraphicsLoader
\qmlclass Loader
*/
/*!
- Create a new QFxLoader instance.
+ Create a new QmlGraphicsLoader instance.
*/
-QFxLoader::QFxLoader(QFxItem *parent)
- : QFxItem(*(new QFxLoaderPrivate), parent)
+QmlGraphicsLoader::QmlGraphicsLoader(QmlGraphicsItem *parent)
+ : QmlGraphicsItem(*(new QmlGraphicsLoaderPrivate), parent)
{
}
/*!
Destroy the loader instance.
*/
-QFxLoader::~QFxLoader()
+QmlGraphicsLoader::~QmlGraphicsLoader()
{
}
@@ -104,15 +104,15 @@ QFxLoader::~QFxLoader()
\sa status, progress
*/
-QUrl QFxLoader::source() const
+QUrl QmlGraphicsLoader::source() const
{
- Q_D(const QFxLoader);
+ Q_D(const QmlGraphicsLoader);
return d->source;
}
-void QFxLoader::setSource(const QUrl &url)
+void QmlGraphicsLoader::setSource(const QUrl &url)
{
- Q_D(QFxLoader);
+ Q_D(QmlGraphicsLoader);
if (d->source == url)
return;
@@ -167,15 +167,15 @@ void QFxLoader::setSource(const QUrl &url)
\sa source
*/
-QmlComponent *QFxLoader::sourceComponent() const
+QmlComponent *QmlGraphicsLoader::sourceComponent() const
{
- Q_D(const QFxLoader);
+ Q_D(const QmlGraphicsLoader);
return d->component;
}
-void QFxLoader::setSourceComponent(QmlComponent *comp)
+void QmlGraphicsLoader::setSourceComponent(QmlComponent *comp)
{
- Q_D(QFxLoader);
+ Q_D(QmlGraphicsLoader);
if (comp == d->component)
return;
@@ -211,9 +211,9 @@ void QFxLoader::setSourceComponent(QmlComponent *comp)
}
}
-void QFxLoaderPrivate::_q_sourceLoaded()
+void QmlGraphicsLoaderPrivate::_q_sourceLoaded()
{
- Q_Q(QFxLoader);
+ Q_Q(QmlGraphicsLoader);
if (component) {
QmlContext *ctxt = new QmlContext(qmlContext(q));
@@ -229,14 +229,14 @@ void QFxLoaderPrivate::_q_sourceLoaded()
QObject *obj = component->create(ctxt);
if (obj) {
- item = qobject_cast<QFxItem *>(obj);
+ item = qobject_cast<QmlGraphicsItem *>(obj);
if (item) {
item->setParentItem(q);
// item->setFocus(true);
- QFxItem *resizeItem = 0;
- if (resizeMode == QFxLoader::SizeLoaderToItem)
+ QmlGraphicsItem *resizeItem = 0;
+ if (resizeMode == QmlGraphicsLoader::SizeLoaderToItem)
resizeItem = item;
- else if (resizeMode == QFxLoader::SizeItemToLoader)
+ else if (resizeMode == QmlGraphicsLoader::SizeItemToLoader)
resizeItem = q;
if (resizeItem) {
QObject::connect(resizeItem, SIGNAL(widthChanged()), q, SLOT(_q_updateSize()));
@@ -269,12 +269,12 @@ void QFxLoaderPrivate::_q_sourceLoaded()
\sa progress
*/
-QFxLoader::Status QFxLoader::status() const
+QmlGraphicsLoader::Status QmlGraphicsLoader::status() const
{
- Q_D(const QFxLoader);
+ Q_D(const QmlGraphicsLoader);
if (d->component)
- return static_cast<QFxLoader::Status>(d->component->status());
+ return static_cast<QmlGraphicsLoader::Status>(d->component->status());
if (d->item)
return Ready;
@@ -290,9 +290,9 @@ QFxLoader::Status QFxLoader::status() const
\sa status
*/
-qreal QFxLoader::progress() const
+qreal QmlGraphicsLoader::progress() const
{
- Q_D(const QFxLoader);
+ Q_D(const QmlGraphicsLoader);
if (d->item)
return 1.0;
@@ -315,20 +315,20 @@ qreal QFxLoader::progress() const
The default resizeMode is SizeLoaderToItem.
*/
-QFxLoader::ResizeMode QFxLoader::resizeMode() const
+QmlGraphicsLoader::ResizeMode QmlGraphicsLoader::resizeMode() const
{
- Q_D(const QFxLoader);
+ Q_D(const QmlGraphicsLoader);
return d->resizeMode;
}
-void QFxLoader::setResizeMode(ResizeMode mode)
+void QmlGraphicsLoader::setResizeMode(ResizeMode mode)
{
- Q_D(QFxLoader);
+ Q_D(QmlGraphicsLoader);
if (mode == d->resizeMode)
return;
if (d->item) {
- QFxItem *resizeItem = 0;
+ QmlGraphicsItem *resizeItem = 0;
if (d->resizeMode == SizeLoaderToItem)
resizeItem = d->item;
else if (d->resizeMode == SizeItemToLoader)
@@ -342,7 +342,7 @@ void QFxLoader::setResizeMode(ResizeMode mode)
d->resizeMode = mode;
if (d->item) {
- QFxItem *resizeItem = 0;
+ QmlGraphicsItem *resizeItem = 0;
if (d->resizeMode == SizeLoaderToItem)
resizeItem = d->item;
else if (d->resizeMode == SizeItemToLoader)
@@ -356,17 +356,17 @@ void QFxLoader::setResizeMode(ResizeMode mode)
}
}
-void QFxLoaderPrivate::_q_updateSize()
+void QmlGraphicsLoaderPrivate::_q_updateSize()
{
- Q_Q(QFxLoader);
+ Q_Q(QmlGraphicsLoader);
if (!item)
return;
switch (resizeMode) {
- case QFxLoader::SizeLoaderToItem:
+ case QmlGraphicsLoader::SizeLoaderToItem:
q->setImplicitWidth(item->width());
q->setImplicitHeight(item->height());
break;
- case QFxLoader::SizeItemToLoader:
+ case QmlGraphicsLoader::SizeItemToLoader:
item->setWidth(q->width());
item->setHeight(q->height());
break;
@@ -379,12 +379,12 @@ void QFxLoaderPrivate::_q_updateSize()
\qmlproperty Item Loader::item
This property holds the top-level item created from source.
*/
-QFxItem *QFxLoader::item() const
+QmlGraphicsItem *QmlGraphicsLoader::item() const
{
- Q_D(const QFxLoader);
+ Q_D(const QmlGraphicsLoader);
return d->item;
}
-QT_END_NAMESPACE
+#include "moc_qmlgraphicsloader_p.cpp"
-#include "moc_qfxloader.cpp"
+QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxloader.h b/src/declarative/graphicsitems/qmlgraphicsloader_p.h
index b967465..8cd1819 100644
--- a/src/declarative/fx/qfxloader.h
+++ b/src/declarative/graphicsitems/qmlgraphicsloader_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,29 +21,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXLOADER_H
-#define QFXLOADER_H
+#ifndef QMLGRAPHICSLOADER_H
+#define QMLGRAPHICSLOADER_H
-#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
QT_BEGIN_HEADER
@@ -50,8 +50,8 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxLoaderPrivate;
-class Q_DECLARATIVE_EXPORT QFxLoader : public QFxItem
+class QmlGraphicsLoaderPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsLoader : public QmlGraphicsItem
{
Q_OBJECT
Q_ENUMS(Status)
@@ -60,14 +60,14 @@ class Q_DECLARATIVE_EXPORT QFxLoader : public QFxItem
Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
Q_PROPERTY(QmlComponent *sourceComponent READ sourceComponent WRITE setSourceComponent NOTIFY sourceChanged)
Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode)
- Q_PROPERTY(QFxItem *item READ item NOTIFY itemChanged)
+ Q_PROPERTY(QmlGraphicsItem *item READ item NOTIFY itemChanged)
Q_PROPERTY(Status status READ status NOTIFY statusChanged)
Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
//### sourceItem
public:
- QFxLoader(QFxItem *parent=0);
- virtual ~QFxLoader();
+ QmlGraphicsLoader(QmlGraphicsItem *parent=0);
+ virtual ~QmlGraphicsLoader();
QUrl source() const;
void setSource(const QUrl &);
@@ -83,7 +83,7 @@ public:
ResizeMode resizeMode() const;
void setResizeMode(ResizeMode mode);
- QFxItem *item() const;
+ QmlGraphicsItem *item() const;
Q_SIGNALS:
void itemChanged();
@@ -92,16 +92,16 @@ Q_SIGNALS:
void progressChanged();
private:
- Q_DISABLE_COPY(QFxLoader)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxLoader)
+ Q_DISABLE_COPY(QmlGraphicsLoader)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsLoader)
Q_PRIVATE_SLOT(d_func(), void _q_sourceLoaded())
Q_PRIVATE_SLOT(d_func(), void _q_updateSize())
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxLoader)
+QML_DECLARE_TYPE(QmlGraphicsLoader)
QT_END_HEADER
-#endif // QFXLOADER_H
+#endif // QMLGRAPHICSLOADER_H
diff --git a/src/declarative/fx/qfxloader_p.h b/src/declarative/graphicsitems/qmlgraphicsloader_p_p.h
index 0700fcd..23fedb7 100644
--- a/src/declarative/fx/qfxloader_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsloader_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXLOADER_P_H
-#define QFXLOADER_P_H
+#ifndef QMLGRAPHICSLOADER_P_H
+#define QMLGRAPHICSLOADER_P_H
//
// W A R N I N G
@@ -53,25 +53,25 @@
// We mean it.
//
-#include "qfxitem_p.h"
-#include "qfxloader.h"
+#include "qmlgraphicsitem_p.h"
+#include "qmlgraphicsloader_p.h"
QT_BEGIN_NAMESPACE
class QmlContext;
-class QFxLoaderPrivate : public QFxItemPrivate
+class QmlGraphicsLoaderPrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxLoader)
+ Q_DECLARE_PUBLIC(QmlGraphicsLoader)
public:
- QFxLoaderPrivate();
- ~QFxLoaderPrivate();
+ QmlGraphicsLoaderPrivate();
+ ~QmlGraphicsLoaderPrivate();
QUrl source;
- QFxItem *item;
+ QmlGraphicsItem *item;
QmlComponent *component;
bool ownComponent;
- QFxLoader::ResizeMode resizeMode;
+ QmlGraphicsLoader::ResizeMode resizeMode;
void _q_sourceLoaded();
void _q_updateSize();
@@ -79,4 +79,4 @@ public:
QT_END_NAMESPACE
-#endif // QFXLOADER_P_H
+#endif // QMLGRAPHICSLOADER_P_H
diff --git a/src/declarative/fx/qfxmouseregion.cpp b/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp
index 315a273..75e31b8 100644
--- a/src/declarative/fx/qfxmouseregion.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsmouseregion.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,28 +21,27 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxmouseregion.h"
-#include "qfxmouseregion_p.h"
-#include "qfxevents_p.h"
+#include "qmlgraphicsmouseregion_p.h"
+#include "qmlgraphicsmouseregion_p_p.h"
+#include "qmlgraphicsevents_p_p.h"
#include <QGraphicsSceneMouseEvent>
@@ -49,78 +49,78 @@ QT_BEGIN_NAMESPACE
static const qreal DragThreshold = 5;
static const int PressAndHoldDelay = 800;
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Drag,QFxDrag)
-QFxDrag::QFxDrag(QObject *parent)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Drag,QmlGraphicsDrag)
+QmlGraphicsDrag::QmlGraphicsDrag(QObject *parent)
: QObject(parent), _target(0), _axis(XandYAxis), _xmin(0), _xmax(0), _ymin(0), _ymax(0)
{
}
-QFxDrag::~QFxDrag()
+QmlGraphicsDrag::~QmlGraphicsDrag()
{
}
-QFxItem *QFxDrag::target() const
+QmlGraphicsItem *QmlGraphicsDrag::target() const
{
return _target;
}
-void QFxDrag::setTarget(QFxItem *t)
+void QmlGraphicsDrag::setTarget(QmlGraphicsItem *t)
{
_target = t;
}
-QFxDrag::Axis QFxDrag::axis() const
+QmlGraphicsDrag::Axis QmlGraphicsDrag::axis() const
{
return _axis;
}
-void QFxDrag::setAxis(QFxDrag::Axis a)
+void QmlGraphicsDrag::setAxis(QmlGraphicsDrag::Axis a)
{
_axis = a;
}
-qreal QFxDrag::xmin() const
+qreal QmlGraphicsDrag::xmin() const
{
return _xmin;
}
-void QFxDrag::setXmin(qreal m)
+void QmlGraphicsDrag::setXmin(qreal m)
{
_xmin = m;
}
-qreal QFxDrag::xmax() const
+qreal QmlGraphicsDrag::xmax() const
{
return _xmax;
}
-void QFxDrag::setXmax(qreal m)
+void QmlGraphicsDrag::setXmax(qreal m)
{
_xmax = m;
}
-qreal QFxDrag::ymin() const
+qreal QmlGraphicsDrag::ymin() const
{
return _ymin;
}
-void QFxDrag::setYmin(qreal m)
+void QmlGraphicsDrag::setYmin(qreal m)
{
_ymin = m;
}
-qreal QFxDrag::ymax() const
+qreal QmlGraphicsDrag::ymax() const
{
return _ymax;
}
-void QFxDrag::setYmax(qreal m)
+void QmlGraphicsDrag::setYmax(qreal m)
{
_ymax = m;
}
/*!
- \qmlclass MouseRegion
+ \qmlclass MouseRegion QFxMouseRegion
\brief The MouseRegion item enables simple mouse handling.
\inherits Item
@@ -225,35 +225,35 @@ void QFxDrag::setYmax(qreal m)
The \e accepted property of the MouseEvent parameter is ignored in this handler.
*/
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,MouseRegion,QFxMouseRegion)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,MouseRegion,QmlGraphicsMouseRegion)
/*!
\internal
- \class QFxMouseRegion
- \brief The QFxMouseRegion class provides a simple mouse handling abstraction for use within Qml.
+ \class QmlGraphicsMouseRegion
+ \brief The QmlGraphicsMouseRegion class provides a simple mouse handling abstraction for use within Qml.
\ingroup group_coreitems
- All QFxItem derived classes can do mouse handling but the QFxMouseRegion class exposes mouse
+ All QmlGraphicsItem derived classes can do mouse handling but the QmlGraphicsMouseRegion class exposes mouse
handling data as properties and tracks flicking and dragging of the mouse.
- A QFxMouseRegion object can be instantiated in Qml using the tag \l MouseRegion.
+ A QmlGraphicsMouseRegion object can be instantiated in Qml using the tag \l MouseRegion.
*/
-QFxMouseRegion::QFxMouseRegion(QFxItem *parent)
- : QFxItem(*(new QFxMouseRegionPrivate), parent)
+QmlGraphicsMouseRegion::QmlGraphicsMouseRegion(QmlGraphicsItem *parent)
+ : QmlGraphicsItem(*(new QmlGraphicsMouseRegionPrivate), parent)
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
d->init();
}
-QFxMouseRegion::QFxMouseRegion(QFxMouseRegionPrivate &dd, QFxItem *parent)
- : QFxItem(dd, parent)
+QmlGraphicsMouseRegion::QmlGraphicsMouseRegion(QmlGraphicsMouseRegionPrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsItem(dd, parent)
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
d->init();
}
-QFxMouseRegion::~QFxMouseRegion()
+QmlGraphicsMouseRegion::~QmlGraphicsMouseRegion()
{
}
@@ -274,15 +274,15 @@ QFxMouseRegion::~QFxMouseRegion()
The coordinates are relative to the MouseRegion.
*/
-qreal QFxMouseRegion::mouseX() const
+qreal QmlGraphicsMouseRegion::mouseX() const
{
- Q_D(const QFxMouseRegion);
+ Q_D(const QmlGraphicsMouseRegion);
return d->lastPos.x();
}
-qreal QFxMouseRegion::mouseY() const
+qreal QmlGraphicsMouseRegion::mouseY() const
{
- Q_D(const QFxMouseRegion);
+ Q_D(const QmlGraphicsMouseRegion);
return d->lastPos.y();
}
@@ -290,15 +290,15 @@ qreal QFxMouseRegion::mouseY() const
\qmlproperty bool MouseRegion::enabled
This property holds whether the item accepts mouse events.
*/
-bool QFxMouseRegion::isEnabled() const
+bool QmlGraphicsMouseRegion::isEnabled() const
{
- Q_D(const QFxMouseRegion);
+ Q_D(const QmlGraphicsMouseRegion);
return d->absorb;
}
-void QFxMouseRegion::setEnabled(bool a)
+void QmlGraphicsMouseRegion::setEnabled(bool a)
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
if (a != d->absorb) {
d->absorb = a;
emit enabledChanged();
@@ -331,40 +331,40 @@ void QFxMouseRegion::setEnabled(bool a)
\sa acceptedButtons
*/
-Qt::MouseButtons QFxMouseRegion::pressedButtons() const
+Qt::MouseButtons QmlGraphicsMouseRegion::pressedButtons() const
{
- Q_D(const QFxMouseRegion);
+ Q_D(const QmlGraphicsMouseRegion);
return d->lastButtons;
}
-void QFxMouseRegion::mousePressEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsMouseRegion::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
d->moved = false;
if (!d->absorb)
- QFxItem::mousePressEvent(event);
+ QmlGraphicsItem::mousePressEvent(event);
else {
d->longPress = false;
d->saveEvent(event);
- d->dragX = drag()->axis() & QFxDrag::XAxis;
- d->dragY = drag()->axis() & QFxDrag::YAxis;
+ d->dragX = drag()->axis() & QmlGraphicsDrag::XAxis;
+ d->dragY = drag()->axis() & QmlGraphicsDrag::YAxis;
d->dragged = false;
setHovered(true);
d->start = event->pos();
d->startScene = event->scenePos();
// we should only start timer if pressAndHold is connected to.
- if (d->isConnected("pressAndHold(QFxMouseEvent*)"))
+ if (d->isConnected("pressAndHold(QmlGraphicsMouseEvent*)"))
d->pressAndHoldTimer.start(PressAndHoldDelay, this);
setKeepMouseGrab(false);
event->setAccepted(setPressed(true));
}
}
-void QFxMouseRegion::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsMouseRegion::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
if (!d->absorb) {
- QFxItem::mouseMoveEvent(event);
+ QmlGraphicsItem::mouseMoveEvent(event);
return;
}
@@ -424,16 +424,16 @@ void QFxMouseRegion::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
}
d->moved = true;
- QFxMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, d->longPress);
+ QmlGraphicsMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, d->longPress);
emit positionChanged(&me);
}
-void QFxMouseRegion::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsMouseRegion::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
if (!d->absorb) {
- QFxItem::mouseReleaseEvent(event);
+ QmlGraphicsItem::mouseReleaseEvent(event);
} else {
d->saveEvent(event);
setPressed(false);
@@ -444,57 +444,57 @@ void QFxMouseRegion::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
}
}
-void QFxMouseRegion::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsMouseRegion::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
if (!d->absorb) {
- QFxItem::mouseDoubleClickEvent(event);
+ QmlGraphicsItem::mouseDoubleClickEvent(event);
} else {
- QFxItem::mouseDoubleClickEvent(event);
+ QmlGraphicsItem::mouseDoubleClickEvent(event);
if (event->isAccepted()) {
// Only deliver the event if we have accepted the press.
d->saveEvent(event);
- QFxMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, true, false);
+ QmlGraphicsMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, true, false);
emit this->doubleClicked(&me);
}
}
}
-void QFxMouseRegion::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
+void QmlGraphicsMouseRegion::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
if (!d->absorb)
- QFxItem::hoverEnterEvent(event);
+ QmlGraphicsItem::hoverEnterEvent(event);
else
setHovered(true);
}
-void QFxMouseRegion::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
+void QmlGraphicsMouseRegion::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
if (!d->absorb) {
- QFxItem::hoverEnterEvent(event);
+ QmlGraphicsItem::hoverEnterEvent(event);
} else {
d->lastPos = event->pos();
- QFxMouseEvent me(d->lastPos.x(), d->lastPos.y(), Qt::NoButton, d->lastButtons, d->lastModifiers, false, d->longPress);
+ QmlGraphicsMouseEvent me(d->lastPos.x(), d->lastPos.y(), Qt::NoButton, d->lastButtons, d->lastModifiers, false, d->longPress);
emit positionChanged(&me);
}
}
-void QFxMouseRegion::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
+void QmlGraphicsMouseRegion::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
if (!d->absorb)
- QFxItem::hoverLeaveEvent(event);
+ QmlGraphicsItem::hoverLeaveEvent(event);
else
setHovered(false);
}
-bool QFxMouseRegion::sceneEvent(QEvent *event)
+bool QmlGraphicsMouseRegion::sceneEvent(QEvent *event)
{
- bool rv = QFxItem::sceneEvent(event);
+ bool rv = QmlGraphicsItem::sceneEvent(event);
if (event->type() == QEvent::UngrabMouse) {
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
if (d->pressed) {
// if our mouse grab has been removed (probably by Flickable), fix our
// state
@@ -507,14 +507,14 @@ bool QFxMouseRegion::sceneEvent(QEvent *event)
return rv;
}
-void QFxMouseRegion::timerEvent(QTimerEvent *event)
+void QmlGraphicsMouseRegion::timerEvent(QTimerEvent *event)
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
if (event->timerId() == d->pressAndHoldTimer.timerId()) {
d->pressAndHoldTimer.stop();
if (d->pressed && d->dragged == false && d->hovered == true) {
d->longPress = true;
- QFxMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, d->longPress);
+ QmlGraphicsMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, false, d->longPress);
emit pressAndHold(&me);
}
}
@@ -538,9 +538,9 @@ void QFxMouseRegion::timerEvent(QTimerEvent *event)
\warning This property is not updated if the region moves under the mouse: \e containsMouse will not change.
In addition, if hoverEnabled is false, containsMouse will only be valid when the mouse is pressed.
*/
-bool QFxMouseRegion::hovered() const
+bool QmlGraphicsMouseRegion::hovered() const
{
- Q_D(const QFxMouseRegion);
+ Q_D(const QmlGraphicsMouseRegion);
return d->hovered;
}
@@ -548,15 +548,15 @@ bool QFxMouseRegion::hovered() const
\qmlproperty bool MouseRegion::pressed
This property holds whether the mouse region is currently pressed.
*/
-bool QFxMouseRegion::pressed() const
+bool QmlGraphicsMouseRegion::pressed() const
{
- Q_D(const QFxMouseRegion);
+ Q_D(const QmlGraphicsMouseRegion);
return d->pressed;
}
-void QFxMouseRegion::setHovered(bool h)
+void QmlGraphicsMouseRegion::setHovered(bool h)
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
if (d->hovered != h) {
d->hovered = h;
emit hoveredChanged();
@@ -584,12 +584,12 @@ void QFxMouseRegion::setHovered(bool h)
The default is to accept the Left button.
*/
-Qt::MouseButtons QFxMouseRegion::acceptedButtons() const
+Qt::MouseButtons QmlGraphicsMouseRegion::acceptedButtons() const
{
return acceptedMouseButtons();
}
-void QFxMouseRegion::setAcceptedButtons(Qt::MouseButtons buttons)
+void QmlGraphicsMouseRegion::setAcceptedButtons(Qt::MouseButtons buttons)
{
if (buttons != acceptedMouseButtons()) {
setAcceptedMouseButtons(buttons);
@@ -597,14 +597,14 @@ void QFxMouseRegion::setAcceptedButtons(Qt::MouseButtons buttons)
}
}
-bool QFxMouseRegion::setPressed(bool p)
+bool QmlGraphicsMouseRegion::setPressed(bool p)
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
bool isclick = d->pressed == true && p == false && d->dragged == false && d->hovered == true;
if (d->pressed != p) {
d->pressed = p;
- QFxMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, isclick, d->longPress);
+ QmlGraphicsMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, isclick, d->longPress);
if (d->pressed) {
emit positionChanged(&me);
emit pressed(&me);
@@ -620,9 +620,9 @@ bool QFxMouseRegion::setPressed(bool p)
return false;
}
-QFxDrag *QFxMouseRegion::drag()
+QmlGraphicsDrag *QmlGraphicsMouseRegion::drag()
{
- Q_D(QFxMouseRegion);
+ Q_D(QmlGraphicsMouseRegion);
return &(d->drag);
}
diff --git a/src/declarative/fx/qfxmouseregion.h b/src/declarative/graphicsitems/qmlgraphicsmouseregion_p.h
index 114ea87..3403c75 100644
--- a/src/declarative/fx/qfxmouseregion.h
+++ b/src/declarative/graphicsitems/qmlgraphicsmouseregion_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,29 +21,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXMOUSEREGION_H
-#define QFXMOUSEREGION_H
+#ifndef QMLGRAPHICSMOUSEREGION_H
+#define QMLGRAPHICSMOUSEREGION_H
-#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
QT_BEGIN_HEADER
@@ -50,12 +50,12 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class Q_DECLARATIVE_EXPORT QFxDrag : public QObject
+class Q_DECLARATIVE_EXPORT QmlGraphicsDrag : public QObject
{
Q_OBJECT
Q_ENUMS(Axis)
- Q_PROPERTY(QFxItem *target READ target WRITE setTarget)
+ Q_PROPERTY(QmlGraphicsItem *target READ target WRITE setTarget)
Q_PROPERTY(Axis axis READ axis WRITE setAxis)
Q_PROPERTY(qreal minimumX READ xmin WRITE setXmin)
Q_PROPERTY(qreal maximumX READ xmax WRITE setXmax)
@@ -64,11 +64,11 @@ class Q_DECLARATIVE_EXPORT QFxDrag : public QObject
//### consider drag and drop
public:
- QFxDrag(QObject *parent=0);
- ~QFxDrag();
+ QmlGraphicsDrag(QObject *parent=0);
+ ~QmlGraphicsDrag();
- QFxItem *target() const;
- void setTarget(QFxItem *);
+ QmlGraphicsItem *target() const;
+ void setTarget(QmlGraphicsItem *);
enum Axis { XAxis=0x01, YAxis=0x02, XandYAxis=0x03 };
Axis axis() const;
@@ -84,18 +84,18 @@ public:
void setYmax(qreal);
private:
- QFxItem *_target;
+ QmlGraphicsItem *_target;
Axis _axis;
qreal _xmin;
qreal _xmax;
qreal _ymin;
qreal _ymax;
- Q_DISABLE_COPY(QFxDrag)
+ Q_DISABLE_COPY(QmlGraphicsDrag)
};
-class QFxMouseEvent;
-class QFxMouseRegionPrivate;
-class Q_DECLARATIVE_EXPORT QFxMouseRegion : public QFxItem
+class QmlGraphicsMouseEvent;
+class QmlGraphicsMouseRegionPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsMouseRegion : public QmlGraphicsItem
{
Q_OBJECT
@@ -107,11 +107,11 @@ class Q_DECLARATIVE_EXPORT QFxMouseRegion : public QFxItem
Q_PROPERTY(Qt::MouseButtons pressedButtons READ pressedButtons NOTIFY pressedChanged)
Q_PROPERTY(Qt::MouseButtons acceptedButtons READ acceptedButtons WRITE setAcceptedButtons NOTIFY acceptedButtonsChanged)
Q_PROPERTY(bool hoverEnabled READ acceptHoverEvents WRITE setAcceptHoverEvents)
- Q_PROPERTY(QFxDrag *drag READ drag) //### add flicking to QFxDrag or add a QFxFlick ???
+ Q_PROPERTY(QmlGraphicsDrag *drag READ drag) //### add flicking to QmlGraphicsDrag or add a QmlGraphicsFlick ???
public:
- QFxMouseRegion(QFxItem *parent=0);
- ~QFxMouseRegion();
+ QmlGraphicsMouseRegion(QmlGraphicsItem *parent=0);
+ ~QmlGraphicsMouseRegion();
qreal mouseX() const;
qreal mouseY() const;
@@ -127,20 +127,20 @@ public:
Qt::MouseButtons acceptedButtons() const;
void setAcceptedButtons(Qt::MouseButtons buttons);
- QFxDrag *drag();
+ QmlGraphicsDrag *drag();
Q_SIGNALS:
void hoveredChanged();
void pressedChanged();
void enabledChanged();
void acceptedButtonsChanged();
- void positionChanged(QFxMouseEvent *mouse);
+ void positionChanged(QmlGraphicsMouseEvent *mouse);
- void pressed(QFxMouseEvent *mouse);
- void pressAndHold(QFxMouseEvent *mouse);
- void released(QFxMouseEvent *mouse);
- void clicked(QFxMouseEvent *mouse);
- void doubleClicked(QFxMouseEvent *mouse);
+ void pressed(QmlGraphicsMouseEvent *mouse);
+ void pressAndHold(QmlGraphicsMouseEvent *mouse);
+ void released(QmlGraphicsMouseEvent *mouse);
+ void clicked(QmlGraphicsMouseEvent *mouse);
+ void doubleClicked(QmlGraphicsMouseEvent *mouse);
void entered();
void exited();
@@ -163,18 +163,18 @@ private:
void handleRelease();
protected:
- QFxMouseRegion(QFxMouseRegionPrivate &dd, QFxItem *parent);
+ QmlGraphicsMouseRegion(QmlGraphicsMouseRegionPrivate &dd, QmlGraphicsItem *parent);
private:
- Q_DISABLE_COPY(QFxMouseRegion)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxMouseRegion)
+ Q_DISABLE_COPY(QmlGraphicsMouseRegion)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsMouseRegion)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxDrag)
-QML_DECLARE_TYPE(QFxMouseRegion)
+QML_DECLARE_TYPE(QmlGraphicsDrag)
+QML_DECLARE_TYPE(QmlGraphicsMouseRegion)
QT_END_HEADER
-#endif // QFXMOUSEREGION_H
+#endif // QMLGRAPHICSMOUSEREGION_H
diff --git a/src/declarative/fx/qfxmouseregion_p.h b/src/declarative/graphicsitems/qmlgraphicsmouseregion_p_p.h
index caed2ab..ad7cc9f 100644
--- a/src/declarative/fx/qfxmouseregion_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsmouseregion_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXMOUSEREGION_P_H
-#define QFXMOUSEREGION_P_H
+#ifndef QMLGRAPHICSMOUSEREGION_P_H
+#define QMLGRAPHICSMOUSEREGION_P_H
//
// W A R N I N G
@@ -56,23 +56,23 @@
#include "qdatetime.h"
#include "qbasictimer.h"
#include "qgraphicssceneevent.h"
-#include "qfxitem_p.h"
+#include "qmlgraphicsitem_p.h"
QT_BEGIN_NAMESPACE
-class QFxMouseRegionPrivate : public QFxItemPrivate
+class QmlGraphicsMouseRegionPrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxMouseRegion)
+ Q_DECLARE_PUBLIC(QmlGraphicsMouseRegion)
public:
- QFxMouseRegionPrivate()
+ QmlGraphicsMouseRegionPrivate()
: absorb(true), hovered(false), pressed(false), longPress(false), drag(0)
{
}
void init()
{
- Q_Q(QFxMouseRegion);
+ Q_Q(QmlGraphicsMouseRegion);
q->setAcceptedMouseButtons(Qt::LeftButton);
}
@@ -84,7 +84,7 @@ public:
}
bool isConnected(const char *signal) {
- Q_Q(QFxMouseRegion);
+ Q_Q(QmlGraphicsMouseRegion);
int idx = QObjectPrivate::get(q)->signalIndex(signal);
return QObjectPrivate::get(q)->isSignalConnected(idx);
}
@@ -97,7 +97,7 @@ public:
bool dragX : 1;
bool dragY : 1;
bool dragged : 1;
- QFxDrag drag;
+ QmlGraphicsDrag drag;
QPointF start;
QPointF startScene;
qreal startX;
@@ -111,4 +111,4 @@ public:
QT_END_NAMESPACE
-#endif // QFXMOUSEREGION_P_H
+#endif // QMLGRAPHICSMOUSEREGION_P_H
diff --git a/src/declarative/fx/qfxpainteditem.cpp b/src/declarative/graphicsitems/qmlgraphicspainteditem.cpp
index e0ef99f..a0d9b09 100644
--- a/src/declarative/fx/qfxpainteditem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspainteditem.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxpainteditem.h"
-#include "qfxpainteditem_p.h"
+#include "qmlgraphicspainteditem_p.h"
+#include "qmlgraphicspainteditem_p_p.h"
#include <QDebug>
#include <QPen>
@@ -53,8 +53,8 @@
QT_BEGIN_NAMESPACE
/*!
- \class QFxPaintedItem
- \brief The QFxPaintedItem class is an abstract base class for QmlView items that want cached painting.
+ \class QmlGraphicsPaintedItem
+ \brief The QmlGraphicsPaintedItem class is an abstract base class for QmlView items that want cached painting.
\internal
This is a convenience class for implementing items that paint their contents
@@ -62,21 +62,21 @@ QT_BEGIN_NAMESPACE
The dirtyCache() function should be called if the contents change to
ensure the cache is refreshed the next time painting occurs.
- To subclass QFxPaintedItem, you must reimplement drawContents() to draw
+ To subclass QmlGraphicsPaintedItem, you must reimplement drawContents() to draw
the contents of the item.
*/
/*!
- \fn void QFxPaintedItem::drawContents(QPainter *painter, const QRect &rect)
+ \fn void QmlGraphicsPaintedItem::drawContents(QPainter *painter, const QRect &rect)
This function is called when the cache needs to be refreshed. When
- sub-classing QFxPaintedItem this function should be implemented so as to
+ sub-classing QmlGraphicsPaintedItem this function should be implemented so as to
paint the contents of the item using the given \a painter for the
area of the contents specified by \a rect.
*/
/*!
- \property QFxPaintedItem::contentsSize
+ \property QmlGraphicsPaintedItem::contentsSize
\brief The size of the contents
The contents size is the size of the item in regards to how it is painted
@@ -94,11 +94,11 @@ static int inpaint_clearcache=0;
\sa clearCache()
*/
-void QFxPaintedItem::dirtyCache(const QRect& rect)
+void QmlGraphicsPaintedItem::dirtyCache(const QRect& rect)
{
- Q_D(QFxPaintedItem);
+ Q_D(QmlGraphicsPaintedItem);
for (int i=0; i < d->imagecache.count(); ) {
- QFxPaintedItemPrivate::ImageCacheItem *c = d->imagecache[i];
+ QmlGraphicsPaintedItemPrivate::ImageCacheItem *c = d->imagecache[i];
QRect isect = (c->area & rect) | c->dirty;
if (isect == c->area && !inpaint) {
delete d->imagecache.takeAt(i);
@@ -114,13 +114,13 @@ void QFxPaintedItem::dirtyCache(const QRect& rect)
\sa dirtyCache()
*/
-void QFxPaintedItem::clearCache()
+void QmlGraphicsPaintedItem::clearCache()
{
if (inpaint) {
inpaint_clearcache=1;
return;
}
- Q_D(QFxPaintedItem);
+ Q_D(QmlGraphicsPaintedItem);
qDeleteAll(d->imagecache);
d->imagecache.clear();
}
@@ -130,9 +130,9 @@ void QFxPaintedItem::clearCache()
\sa setContentsSize()
*/
-QSize QFxPaintedItem::contentsSize() const
+QSize QmlGraphicsPaintedItem::contentsSize() const
{
- Q_D(const QFxPaintedItem);
+ Q_D(const QmlGraphicsPaintedItem);
return d->contentsSize;
}
@@ -141,9 +141,9 @@ QSize QFxPaintedItem::contentsSize() const
\sa contentsSize()
*/
-void QFxPaintedItem::setContentsSize(const QSize &size)
+void QmlGraphicsPaintedItem::setContentsSize(const QSize &size)
{
- Q_D(QFxPaintedItem);
+ Q_D(QmlGraphicsPaintedItem);
if (d->contentsSize == size) return;
d->contentsSize = size;
clearCache();
@@ -151,21 +151,21 @@ void QFxPaintedItem::setContentsSize(const QSize &size)
}
/*!
- Constructs a new QFxPaintedItem with the given \a parent.
+ Constructs a new QmlGraphicsPaintedItem with the given \a parent.
*/
-QFxPaintedItem::QFxPaintedItem(QFxItem *parent)
- : QFxItem(*(new QFxPaintedItemPrivate), parent)
+QmlGraphicsPaintedItem::QmlGraphicsPaintedItem(QmlGraphicsItem *parent)
+ : QmlGraphicsItem(*(new QmlGraphicsPaintedItemPrivate), parent)
{
init();
}
/*!
\internal
- Constructs a new QFxPaintedItem with the given \a parent and
+ Constructs a new QmlGraphicsPaintedItem with the given \a parent and
initialized private data member \a dd.
*/
-QFxPaintedItem::QFxPaintedItem(QFxPaintedItemPrivate &dd, QFxItem *parent)
- : QFxItem(dd, parent)
+QmlGraphicsPaintedItem::QmlGraphicsPaintedItem(QmlGraphicsPaintedItemPrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsItem(dd, parent)
{
init();
}
@@ -173,7 +173,7 @@ QFxPaintedItem::QFxPaintedItem(QFxPaintedItemPrivate &dd, QFxItem *parent)
/*!
Destroys the image item.
*/
-QFxPaintedItem::~QFxPaintedItem()
+QmlGraphicsPaintedItem::~QmlGraphicsPaintedItem()
{
clearCache();
}
@@ -181,16 +181,16 @@ QFxPaintedItem::~QFxPaintedItem()
/*!
\internal
*/
-void QFxPaintedItem::init()
+void QmlGraphicsPaintedItem::init()
{
connect(this,SIGNAL(widthChanged()),this,SLOT(clearCache()));
connect(this,SIGNAL(heightChanged()),this,SLOT(clearCache()));
connect(this,SIGNAL(visibleChanged()),this,SLOT(clearCache()));
}
-void QFxPaintedItem::setCacheFrozen(bool frozen)
+void QmlGraphicsPaintedItem::setCacheFrozen(bool frozen)
{
- Q_D(QFxPaintedItem);
+ Q_D(QmlGraphicsPaintedItem);
if (d->cachefrozen == frozen)
return;
d->cachefrozen = frozen;
@@ -200,9 +200,9 @@ void QFxPaintedItem::setCacheFrozen(bool frozen)
/*!
\reimp
*/
-void QFxPaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+void QmlGraphicsPaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
- Q_D(QFxPaintedItem);
+ Q_D(QmlGraphicsPaintedItem);
const QRect content(QPoint(0,0),d->contentsSize);
if (content.width() <= 0 || content.height() <= 0)
return;
@@ -290,7 +290,7 @@ void QFxPaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidge
qp.translate(-r.x(),-r.y());
drawContents(&qp, r);
}
- QFxPaintedItemPrivate::ImageCacheItem *newitem = new QFxPaintedItemPrivate::ImageCacheItem;
+ QmlGraphicsPaintedItemPrivate::ImageCacheItem *newitem = new QmlGraphicsPaintedItemPrivate::ImageCacheItem;
newitem->area = r;
newitem->image = img;
d->imagecache.append(newitem);
@@ -320,21 +320,21 @@ void QFxPaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidge
*/
/*!
- \property QFxPaintedItem::cacheSize
+ \property QmlGraphicsPaintedItem::cacheSize
The maximum number of pixels of image cache to allow. The default
is 0.1 megapixels. The cache will not be larger than the (unscaled)
- size of the QFxPaintedItem.
+ size of the QmlGraphicsPaintedItem.
*/
-int QFxPaintedItem::cacheSize() const
+int QmlGraphicsPaintedItem::cacheSize() const
{
- Q_D(const QFxPaintedItem);
+ Q_D(const QmlGraphicsPaintedItem);
return d->max_imagecache_size;
}
-void QFxPaintedItem::setCacheSize(int pixels)
+void QmlGraphicsPaintedItem::setCacheSize(int pixels)
{
- Q_D(QFxPaintedItem);
+ Q_D(QmlGraphicsPaintedItem);
if (pixels < d->max_imagecache_size) {
int cachesize=0;
for (int i=0; i<d->imagecache.count(); ++i) {
@@ -359,7 +359,7 @@ void QFxPaintedItem::setCacheSize(int pixels)
}
/*!
- \property QFxPaintedItem::fillColor
+ \property QmlGraphicsPaintedItem::fillColor
The color to be used to fill the item prior to calling drawContents().
By default, this is Qt::transparent.
@@ -367,9 +367,9 @@ void QFxPaintedItem::setCacheSize(int pixels)
Performance improvements can be achieved if subclasses call this with either an
invalid color (QColor()), or an appropriate solid color.
*/
-void QFxPaintedItem::setFillColor(const QColor& c)
+void QmlGraphicsPaintedItem::setFillColor(const QColor& c)
{
- Q_D(QFxPaintedItem);
+ Q_D(QmlGraphicsPaintedItem);
if (d->fillColor == c)
return;
d->fillColor = c;
@@ -377,9 +377,9 @@ void QFxPaintedItem::setFillColor(const QColor& c)
update();
}
-QColor QFxPaintedItem::fillColor() const
+QColor QmlGraphicsPaintedItem::fillColor() const
{
- Q_D(const QFxPaintedItem);
+ Q_D(const QmlGraphicsPaintedItem);
return d->fillColor;
}
diff --git a/src/declarative/fx/qfxpainteditem.h b/src/declarative/graphicsitems/qmlgraphicspainteditem_p.h
index 13c6b15..99873a7 100644
--- a/src/declarative/fx/qfxpainteditem.h
+++ b/src/declarative/graphicsitems/qmlgraphicspainteditem_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,30 +21,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXIMAGEITEM_H
-#define QFXIMAGEITEM_H
+#ifndef QMLGRAPHICSIMAGEITEM_H
+#define QMLGRAPHICSIMAGEITEM_H
-#include <QtDeclarative/qfxglobal.h>
-#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
QT_BEGIN_HEADER
@@ -52,8 +51,8 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxPaintedItemPrivate;
-class Q_DECLARATIVE_EXPORT QFxPaintedItem : public QFxItem
+class QmlGraphicsPaintedItemPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsPaintedItem : public QmlGraphicsItem
{
Q_OBJECT
@@ -62,8 +61,8 @@ class Q_DECLARATIVE_EXPORT QFxPaintedItem : public QFxItem
Q_PROPERTY(int cacheSize READ cacheSize WRITE setCacheSize)
public:
- QFxPaintedItem(QFxItem *parent=0);
- ~QFxPaintedItem();
+ QmlGraphicsPaintedItem(QmlGraphicsItem *parent=0);
+ ~QmlGraphicsPaintedItem();
QSize contentsSize() const;
void setContentsSize(const QSize &);
@@ -77,7 +76,7 @@ public:
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
protected:
- QFxPaintedItem(QFxPaintedItemPrivate &dd, QFxItem *parent);
+ QmlGraphicsPaintedItem(QmlGraphicsPaintedItemPrivate &dd, QmlGraphicsItem *parent);
virtual void drawContents(QPainter *p, const QRect &) = 0;
@@ -92,13 +91,13 @@ protected Q_SLOTS:
private:
void init();
- Q_DISABLE_COPY(QFxPaintedItem)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxPaintedItem)
+ Q_DISABLE_COPY(QmlGraphicsPaintedItem)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsPaintedItem)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxPaintedItem)
+QML_DECLARE_TYPE(QmlGraphicsPaintedItem)
QT_END_HEADER
diff --git a/src/declarative/fx/qfxpainteditem_p.h b/src/declarative/graphicsitems/qmlgraphicspainteditem_p_p.h
index 179fd61..a744557 100644
--- a/src/declarative/fx/qfxpainteditem_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicspainteditem_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXIMAGEITEM_P_H
-#define QFXIMAGEITEM_P_H
+#ifndef QMLGRAPHICSIMAGEITEM_P_H
+#define QMLGRAPHICSIMAGEITEM_P_H
//
// W A R N I N G
@@ -53,16 +53,16 @@
// We mean it.
//
-#include <private/qfxitem_p.h>
+#include <private/qmlgraphicsitem_p.h>
QT_BEGIN_NAMESPACE
-class QFxPaintedItemPrivate : public QFxItemPrivate
+class QmlGraphicsPaintedItemPrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxPaintedItem)
+ Q_DECLARE_PUBLIC(QmlGraphicsPaintedItem)
public:
- QFxPaintedItemPrivate()
+ QmlGraphicsPaintedItemPrivate()
: max_imagecache_size(100000), fillColor(Qt::transparent), cachefrozen(false)
{
}
diff --git a/src/declarative/fx/qfxpath.cpp b/src/declarative/graphicsitems/qmlgraphicspath.cpp
index 26fafc5..c0e6caf 100644
--- a/src/declarative/fx/qfxpath.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspath.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,44 +21,43 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxpath.h"
-#include "qfxpath_p.h"
-#include <private/qfxperf_p.h>
+#include "qmlgraphicspath_p.h"
+#include "qmlgraphicspath_p_p.h"
+#include <private/qfxperf_p_p.h>
#include <private/qbezier_p.h>
#include <QSet>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Path,QFxPath)
-QML_DEFINE_NOCREATE_TYPE(QFxPathElement)
-QML_DEFINE_NOCREATE_TYPE(QFxCurve)
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathAttribute,QFxPathAttribute)
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathPercent,QFxPathPercent)
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathLine,QFxPathLine)
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathQuad,QFxPathQuad)
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathCubic,QFxPathCubic)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Path,QmlGraphicsPath)
+QML_DEFINE_NOCREATE_TYPE(QmlGraphicsPathElement)
+QML_DEFINE_NOCREATE_TYPE(QmlGraphicsCurve)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathAttribute,QmlGraphicsPathAttribute)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathPercent,QmlGraphicsPathPercent)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathLine,QmlGraphicsPathLine)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathQuad,QmlGraphicsPathQuad)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathCubic,QmlGraphicsPathCubic)
/*!
- \qmlclass PathElement
+ \qmlclass PathElement QFxPathElement
\brief PathElement is the base path type.
This type is the base for all path types. It cannot
@@ -68,12 +68,12 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathCubic,QFxPathCubic)
/*!
\internal
- \class QFxPathElement
+ \class QmlGraphicsPathElement
\ingroup group_utility
*/
/*!
- \qmlclass Path QFxPath
+ \qmlclass Path QmlGraphicsPath
\brief A Path object defines a path for use by \l PathView.
A Path is composed of one or more path segments - PathLine, PathQuad,
@@ -90,22 +90,22 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathCubic,QFxPathCubic)
/*!
\internal
- \class QFxPath
+ \class QmlGraphicsPath
\ingroup group_utility
- \brief The QFxPath class defines a path.
- \sa QFxPathView
+ \brief The QmlGraphicsPath class defines a path.
+ \sa QmlGraphicsPathView
*/
-QFxPath::QFxPath(QObject *parent)
- : QObject(*(new QFxPathPrivate), parent)
+QmlGraphicsPath::QmlGraphicsPath(QObject *parent)
+ : QObject(*(new QmlGraphicsPathPrivate), parent)
{
}
-QFxPath::QFxPath(QFxPathPrivate &dd, QObject *parent)
+QmlGraphicsPath::QmlGraphicsPath(QmlGraphicsPathPrivate &dd, QObject *parent)
: QObject(dd, parent)
{
}
-QFxPath::~QFxPath()
+QmlGraphicsPath::~QmlGraphicsPath()
{
}
@@ -114,27 +114,27 @@ QFxPath::~QFxPath()
\qmlproperty real Path::startY
This property holds the starting position of the path.
*/
-qreal QFxPath::startX() const
+qreal QmlGraphicsPath::startX() const
{
- Q_D(const QFxPath);
+ Q_D(const QmlGraphicsPath);
return d->startX;
}
-void QFxPath::setStartX(qreal x)
+void QmlGraphicsPath::setStartX(qreal x)
{
- Q_D(QFxPath);
+ Q_D(QmlGraphicsPath);
d->startX = x;
}
-qreal QFxPath::startY() const
+qreal QmlGraphicsPath::startY() const
{
- Q_D(const QFxPath);
+ Q_D(const QmlGraphicsPath);
return d->startY;
}
-void QFxPath::setStartY(qreal y)
+void QmlGraphicsPath::setStartY(qreal y)
{
- Q_D(QFxPath);
+ Q_D(QmlGraphicsPath);
d->startY = y;
}
@@ -156,15 +156,15 @@ void QFxPath::setStartY(qreal y)
\snippet doc/src/snippets/declarative/pathview/pathattributes.qml 2
*/
-QList<QFxPathElement *>* QFxPath::pathElements()
+QList<QmlGraphicsPathElement *>* QmlGraphicsPath::pathElements()
{
- Q_D(QFxPath);
+ Q_D(QmlGraphicsPath);
return &(d->_pathElements);
}
-void QFxPath::interpolate(int idx, const QString &name, qreal value)
+void QmlGraphicsPath::interpolate(int idx, const QString &name, qreal value)
{
- Q_D(QFxPath);
+ Q_D(QmlGraphicsPath);
if (!idx)
return;
@@ -193,9 +193,9 @@ void QFxPath::interpolate(int idx, const QString &name, qreal value)
}
}
-void QFxPath::endpoint(const QString &name)
+void QmlGraphicsPath::endpoint(const QString &name)
{
- Q_D(QFxPath);
+ Q_D(QmlGraphicsPath);
const AttributePoint &first = d->_attributePoints.first();
qreal val = first.values.value(name);
for (int ii = d->_attributePoints.count() - 1; ii >= 0; ii--) {
@@ -210,9 +210,9 @@ void QFxPath::endpoint(const QString &name)
}
}
-void QFxPath::processPath()
+void QmlGraphicsPath::processPath()
{
- Q_D(QFxPath);
+ Q_D(QmlGraphicsPath);
d->_pointCache.clear();
d->_attributePoints.clear();
@@ -225,17 +225,17 @@ void QFxPath::processPath()
d->_path.moveTo(d->startX, d->startY);
- foreach (QFxPathElement *pathElement, d->_pathElements) {
- if (QFxCurve *curve = qobject_cast<QFxCurve *>(pathElement)) {
+ foreach (QmlGraphicsPathElement *pathElement, d->_pathElements) {
+ if (QmlGraphicsCurve *curve = qobject_cast<QmlGraphicsCurve *>(pathElement)) {
curve->addToPath(d->_path);
AttributePoint p;
p.origpercent = d->_path.length();
d->_attributePoints << p;
- } else if (QFxPathAttribute *attribute = qobject_cast<QFxPathAttribute *>(pathElement)) {
+ } else if (QmlGraphicsPathAttribute *attribute = qobject_cast<QmlGraphicsPathAttribute *>(pathElement)) {
AttributePoint &point = d->_attributePoints.last();
point.values[attribute->name()] = attribute->value();
interpolate(d->_attributePoints.count() - 1, attribute->name(), attribute->value());
- } else if (QFxPathPercent *percent = qobject_cast<QFxPathPercent *>(pathElement)) {
+ } else if (QmlGraphicsPathPercent *percent = qobject_cast<QmlGraphicsPathPercent *>(pathElement)) {
AttributePoint &point = d->_attributePoints.last();
point.values[QLatin1String("_qfx_percent")] = percent->value();
interpolate(d->_attributePoints.count() - 1, QLatin1String("_qfx_percent"), percent->value());
@@ -255,7 +255,7 @@ void QFxPath::processPath()
qreal prevorigpercent = 0;
for (int ii = 0; ii < d->_attributePoints.count(); ++ii) {
const AttributePoint &point = d->_attributePoints.at(ii);
- if (point.values.contains(QLatin1String("_qfx_percent"))) { //special string for QFxPathPercent
+ if (point.values.contains(QLatin1String("_qfx_percent"))) { //special string for QmlGraphicsPathPercent
if ( ii > 0) {
qreal scale = (d->_attributePoints[ii].origpercent/length - prevorigpercent) /
(point.values.value(QLatin1String("_qfx_percent"))-prevpercent);
@@ -274,33 +274,33 @@ void QFxPath::processPath()
emit changed();
}
-void QFxPath::componentComplete()
+void QmlGraphicsPath::componentComplete()
{
- Q_D(QFxPath);
+ Q_D(QmlGraphicsPath);
QSet<QString> attrs;
// First gather up all the attributes
- foreach (QFxPathElement *pathElement, d->_pathElements) {
- if (QFxPathAttribute *attribute =
- qobject_cast<QFxPathAttribute *>(pathElement))
+ foreach (QmlGraphicsPathElement *pathElement, d->_pathElements) {
+ if (QmlGraphicsPathAttribute *attribute =
+ qobject_cast<QmlGraphicsPathAttribute *>(pathElement))
attrs.insert(attribute->name());
}
d->_attributes = attrs.toList();
processPath();
- foreach (QFxPathElement *pathElement, d->_pathElements)
+ foreach (QmlGraphicsPathElement *pathElement, d->_pathElements)
connect(pathElement, SIGNAL(changed()), this, SLOT(processPath()));
}
-QPainterPath QFxPath::path() const
+QPainterPath QmlGraphicsPath::path() const
{
- Q_D(const QFxPath);
+ Q_D(const QmlGraphicsPath);
return d->_path;
}
-QStringList QFxPath::attributes() const
+QStringList QmlGraphicsPath::attributes() const
{
- Q_D(const QFxPath);
+ Q_D(const QmlGraphicsPath);
return d->_attributes;
}
#include <QTime>
@@ -342,11 +342,11 @@ static inline QBezier nextBezier(const QPainterPath &path, int *from, qreal *bez
return QBezier();
}
-void QFxPath::createPointCache() const
+void QmlGraphicsPath::createPointCache() const
{
- Q_D(const QFxPath);
+ Q_D(const QmlGraphicsPath);
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::QFxPathViewPathCache> pc;
+ QmlPerfTimer<QmlPerf::QmlGraphicsPathViewPathCache> pc;
#endif
qreal pathLength = d->_path.length();
const int points = int(pathLength*2);
@@ -393,9 +393,9 @@ void QFxPath::createPointCache() const
}
}
-QPointF QFxPath::pointAt(qreal p) const
+QPointF QmlGraphicsPath::pointAt(qreal p) const
{
- Q_D(const QFxPath);
+ Q_D(const QmlGraphicsPath);
if (d->_pointCache.isEmpty()) {
createPointCache();
}
@@ -407,9 +407,9 @@ QPointF QFxPath::pointAt(qreal p) const
return d->_pointCache.at(idx);
}
-qreal QFxPath::attributeAt(const QString &name, qreal percent) const
+qreal QmlGraphicsPath::attributeAt(const QString &name, qreal percent) const
{
- Q_D(const QFxPath);
+ Q_D(const QmlGraphicsPath);
if (percent < 0 || percent > 1)
return 0;
@@ -435,12 +435,12 @@ qreal QFxPath::attributeAt(const QString &name, qreal percent) const
/****************************************************************************/
-qreal QFxCurve::x() const
+qreal QmlGraphicsCurve::x() const
{
return _x;
}
-void QFxCurve::setX(qreal x)
+void QmlGraphicsCurve::setX(qreal x)
{
if (_x != x) {
_x = x;
@@ -448,12 +448,12 @@ void QFxCurve::setX(qreal x)
}
}
-qreal QFxCurve::y() const
+qreal QmlGraphicsCurve::y() const
{
return _y;
}
-void QFxCurve::setY(qreal y)
+void QmlGraphicsCurve::setY(qreal y)
{
if (_y != y) {
_y = y;
@@ -464,7 +464,7 @@ void QFxCurve::setY(qreal y)
/****************************************************************************/
/*!
- \qmlclass PathAttribute
+ \qmlclass PathAttribute QFxPathAttribute
\brief The PathAttribute allows setting an attribute at a given position in a Path.
The PathAttribute object allows attibutes consisting of a name and
@@ -492,11 +492,11 @@ void QFxCurve::setY(qreal y)
/*!
\internal
- \class QFxPathAttribute
+ \class QmlGraphicsPathAttribute
\ingroup group_utility
- \brief The QFxPathAttribute class allows to set the value of an attribute at a given position in the path.
+ \brief The QmlGraphicsPathAttribute class allows to set the value of an attribute at a given position in the path.
- \sa QFxPath
+ \sa QmlGraphicsPath
*/
@@ -509,12 +509,12 @@ void QFxCurve::setY(qreal y)
the name of the attribute to change.
*/
-QString QFxPathAttribute::name() const
+QString QmlGraphicsPathAttribute::name() const
{
return _name;
}
-void QFxPathAttribute::setName(const QString &name)
+void QmlGraphicsPathAttribute::setName(const QString &name)
{
_name = name;
}
@@ -527,12 +527,12 @@ void QFxPathAttribute::setName(const QString &name)
/*!
the new value of the attribute.
*/
-qreal QFxPathAttribute::value() const
+qreal QmlGraphicsPathAttribute::value() const
{
return _value;
}
-void QFxPathAttribute::setValue(qreal value)
+void QmlGraphicsPathAttribute::setValue(qreal value)
{
if (_value != value) {
_value = value;
@@ -543,7 +543,7 @@ void QFxPathAttribute::setValue(qreal value)
/****************************************************************************/
/*!
- \qmlclass PathLine
+ \qmlclass PathLine QFxPathLine
\brief The PathLine defines a straight line.
The example below creates a path consisting of a straight line from
@@ -561,11 +561,11 @@ void QFxPathAttribute::setValue(qreal value)
/*!
\internal
- \class QFxPathLine
+ \class QmlGraphicsPathLine
\ingroup group_utility
- \brief The QFxPathLine class defines a straight line.
+ \brief The QmlGraphicsPathLine class defines a straight line.
- \sa QFxPath
+ \sa QmlGraphicsPath
*/
/*!
@@ -575,7 +575,7 @@ void QFxPathAttribute::setValue(qreal value)
Defines the end point of the line.
*/
-void QFxPathLine::addToPath(QPainterPath &path)
+void QmlGraphicsPathLine::addToPath(QPainterPath &path)
{
path.lineTo(x(), y());
}
@@ -583,7 +583,7 @@ void QFxPathLine::addToPath(QPainterPath &path)
/****************************************************************************/
/*!
- \qmlclass PathQuad
+ \qmlclass PathQuad QFxPathQuad
\brief The PathQuad defines a quadratic Bezier curve with a control point.
The following QML produces the path shown below:
@@ -604,11 +604,11 @@ void QFxPathLine::addToPath(QPainterPath &path)
/*!
\internal
- \class QFxPathQuad
+ \class QmlGraphicsPathQuad
\ingroup group_utility
- \brief The QFxPathQuad class defines a quadratic Bezier curve with a control point.
+ \brief The QmlGraphicsPathQuad class defines a quadratic Bezier curve with a control point.
- \sa QFxPath
+ \sa QmlGraphicsPath
*/
@@ -629,12 +629,12 @@ void QFxPathLine::addToPath(QPainterPath &path)
/*!
the x position of the control point.
*/
-qreal QFxPathQuad::controlX() const
+qreal QmlGraphicsPathQuad::controlX() const
{
return _controlX;
}
-void QFxPathQuad::setControlX(qreal x)
+void QmlGraphicsPathQuad::setControlX(qreal x)
{
if (_controlX != x) {
_controlX = x;
@@ -646,12 +646,12 @@ void QFxPathQuad::setControlX(qreal x)
/*!
the y position of the control point.
*/
-qreal QFxPathQuad::controlY() const
+qreal QmlGraphicsPathQuad::controlY() const
{
return _controlY;
}
-void QFxPathQuad::setControlY(qreal y)
+void QmlGraphicsPathQuad::setControlY(qreal y)
{
if (_controlY != y) {
_controlY = y;
@@ -659,7 +659,7 @@ void QFxPathQuad::setControlY(qreal y)
}
}
-void QFxPathQuad::addToPath(QPainterPath &path)
+void QmlGraphicsPathQuad::addToPath(QPainterPath &path)
{
path.quadTo(controlX(), controlY(), x(), y());
}
@@ -667,7 +667,7 @@ void QFxPathQuad::addToPath(QPainterPath &path)
/****************************************************************************/
/*!
- \qmlclass PathCubic
+ \qmlclass PathCubic QFxPathCubic
\brief The PathCubic defines a cubic Bezier curve with two control points.
The following QML produces the path shown below:
@@ -691,11 +691,11 @@ void QFxPathQuad::addToPath(QPainterPath &path)
/*!
\internal
- \class QFxPathCubic
+ \class QmlGraphicsPathCubic
\ingroup group_utility
- \brief The QFxPathCubic class defines a cubic Bezier curve with two control points.
+ \brief The QmlGraphicsPathCubic class defines a cubic Bezier curve with two control points.
- \sa QFxPath
+ \sa QmlGraphicsPath
*/
/*!
@@ -711,12 +711,12 @@ void QFxPathQuad::addToPath(QPainterPath &path)
Defines the position of the first control point.
*/
-qreal QFxPathCubic::control1X() const
+qreal QmlGraphicsPathCubic::control1X() const
{
return _control1X;
}
-void QFxPathCubic::setControl1X(qreal x)
+void QmlGraphicsPathCubic::setControl1X(qreal x)
{
if (_control1X != x) {
_control1X = x;
@@ -724,12 +724,12 @@ void QFxPathCubic::setControl1X(qreal x)
}
}
-qreal QFxPathCubic::control1Y() const
+qreal QmlGraphicsPathCubic::control1Y() const
{
return _control1Y;
}
-void QFxPathCubic::setControl1Y(qreal y)
+void QmlGraphicsPathCubic::setControl1Y(qreal y)
{
if (_control1Y != y) {
_control1Y = y;
@@ -743,12 +743,12 @@ void QFxPathCubic::setControl1Y(qreal y)
Defines the position of the second control point.
*/
-qreal QFxPathCubic::control2X() const
+qreal QmlGraphicsPathCubic::control2X() const
{
return _control2X;
}
-void QFxPathCubic::setControl2X(qreal x)
+void QmlGraphicsPathCubic::setControl2X(qreal x)
{
if (_control2X != x) {
_control2X = x;
@@ -756,12 +756,12 @@ void QFxPathCubic::setControl2X(qreal x)
}
}
-qreal QFxPathCubic::control2Y() const
+qreal QmlGraphicsPathCubic::control2Y() const
{
return _control2Y;
}
-void QFxPathCubic::setControl2Y(qreal y)
+void QmlGraphicsPathCubic::setControl2Y(qreal y)
{
if (_control2Y != y) {
_control2Y = y;
@@ -769,7 +769,7 @@ void QFxPathCubic::setControl2Y(qreal y)
}
}
-void QFxPathCubic::addToPath(QPainterPath &path)
+void QmlGraphicsPathCubic::addToPath(QPainterPath &path)
{
path.cubicTo(control1X(), control1Y(), control2X(), control2Y(), x(), y());
}
@@ -777,7 +777,7 @@ void QFxPathCubic::addToPath(QPainterPath &path)
/****************************************************************************/
/*!
- \qmlclass PathPercent
+ \qmlclass PathPercent QFxPathPercent
\brief The PathPercent manipulates the way a path is interpreted.
The examples below show the normal distrubution of items along a path
@@ -816,23 +816,23 @@ void QFxPathCubic::addToPath(QPainterPath &path)
/*!
\internal
- \class QFxPathPercent
+ \class QmlGraphicsPathPercent
\ingroup group_utility
- \brief The QFxPathPercent class manipulates the way a path is interpreted.
+ \brief The QmlGraphicsPathPercent class manipulates the way a path is interpreted.
- QFxPathPercent allows you to bunch up items (or spread out items) along various
- segments of a QFxPathView's path.
+ QmlGraphicsPathPercent allows you to bunch up items (or spread out items) along various
+ segments of a QmlGraphicsPathView's path.
- \sa QFxPath
+ \sa QmlGraphicsPath
*/
-qreal QFxPathPercent::value() const
+qreal QmlGraphicsPathPercent::value() const
{
return _value;
}
-void QFxPathPercent::setValue(qreal value)
+void QmlGraphicsPathPercent::setValue(qreal value)
{
_value = value;
}
diff --git a/src/declarative/fx/qfxpath.h b/src/declarative/graphicsitems/qmlgraphicspath_p.h
index 04d24c6..4710367 100644
--- a/src/declarative/fx/qfxpath.h
+++ b/src/declarative/graphicsitems/qmlgraphicspath_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,32 +21,31 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXPATH_H
-#define QFXPATH_H
+#ifndef QMLGRAPHICSPATH_H
+#define QMLGRAPHICSPATH_H
#include <QtCore/QObject>
#include <QtGui/QPainterPath>
#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
QT_BEGIN_HEADER
@@ -53,23 +53,23 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class Q_DECLARATIVE_EXPORT QFxPathElement : public QObject
+class Q_DECLARATIVE_EXPORT QmlGraphicsPathElement : public QObject
{
Q_OBJECT
public:
- QFxPathElement(QObject *parent=0) : QObject(parent) {}
+ QmlGraphicsPathElement(QObject *parent=0) : QObject(parent) {}
Q_SIGNALS:
void changed();
};
-class Q_DECLARATIVE_EXPORT QFxPathAttribute : public QFxPathElement
+class Q_DECLARATIVE_EXPORT QmlGraphicsPathAttribute : public QmlGraphicsPathElement
{
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName)
Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY changed)
public:
- QFxPathAttribute(QObject *parent=0) : QFxPathElement(parent), _value(0) {}
+ QmlGraphicsPathAttribute(QObject *parent=0) : QmlGraphicsPathElement(parent), _value(0) {}
QString name() const;
@@ -83,14 +83,14 @@ private:
qreal _value;
};
-class Q_DECLARATIVE_EXPORT QFxCurve : public QFxPathElement
+class Q_DECLARATIVE_EXPORT QmlGraphicsCurve : public QmlGraphicsPathElement
{
Q_OBJECT
Q_PROPERTY(qreal x READ x WRITE setX NOTIFY changed)
Q_PROPERTY(qreal y READ y WRITE setY NOTIFY changed)
public:
- QFxCurve(QObject *parent=0) : QFxPathElement(parent), _x(0), _y(0) {}
+ QmlGraphicsCurve(QObject *parent=0) : QmlGraphicsPathElement(parent), _x(0), _y(0) {}
qreal x() const;
void setX(qreal x);
@@ -105,23 +105,23 @@ private:
qreal _y;
};
-class Q_DECLARATIVE_EXPORT QFxPathLine : public QFxCurve
+class Q_DECLARATIVE_EXPORT QmlGraphicsPathLine : public QmlGraphicsCurve
{
Q_OBJECT
public:
- QFxPathLine(QObject *parent=0) : QFxCurve(parent) {}
+ QmlGraphicsPathLine(QObject *parent=0) : QmlGraphicsCurve(parent) {}
void addToPath(QPainterPath &path);
};
-class Q_DECLARATIVE_EXPORT QFxPathQuad : public QFxCurve
+class Q_DECLARATIVE_EXPORT QmlGraphicsPathQuad : public QmlGraphicsCurve
{
Q_OBJECT
Q_PROPERTY(qreal controlX READ controlX WRITE setControlX NOTIFY changed)
Q_PROPERTY(qreal controlY READ controlY WRITE setControlY NOTIFY changed)
public:
- QFxPathQuad(QObject *parent=0) : QFxCurve(parent), _controlX(0), _controlY(0) {}
+ QmlGraphicsPathQuad(QObject *parent=0) : QmlGraphicsCurve(parent), _controlX(0), _controlY(0) {}
qreal controlX() const;
void setControlX(qreal x);
@@ -136,7 +136,7 @@ private:
qreal _controlY;
};
-class Q_DECLARATIVE_EXPORT QFxPathCubic : public QFxCurve
+class Q_DECLARATIVE_EXPORT QmlGraphicsPathCubic : public QmlGraphicsCurve
{
Q_OBJECT
@@ -145,7 +145,7 @@ class Q_DECLARATIVE_EXPORT QFxPathCubic : public QFxCurve
Q_PROPERTY(qreal control2X READ control2X WRITE setControl2X NOTIFY changed)
Q_PROPERTY(qreal control2Y READ control2Y WRITE setControl2Y NOTIFY changed)
public:
- QFxPathCubic(QObject *parent=0) : QFxCurve(parent), _control1X(0), _control1Y(0), _control2X(0), _control2Y(0) {}
+ QmlGraphicsPathCubic(QObject *parent=0) : QmlGraphicsCurve(parent), _control1X(0), _control1Y(0), _control2X(0), _control2Y(0) {}
qreal control1X() const;
void setControl1X(qreal x);
@@ -168,12 +168,12 @@ private:
int _control2Y;
};
-class Q_DECLARATIVE_EXPORT QFxPathPercent : public QFxPathElement
+class Q_DECLARATIVE_EXPORT QmlGraphicsPathPercent : public QmlGraphicsPathElement
{
Q_OBJECT
Q_PROPERTY(qreal value READ value WRITE setValue)
public:
- QFxPathPercent(QObject *parent=0) : QFxPathElement(parent) {}
+ QmlGraphicsPathPercent(QObject *parent=0) : QmlGraphicsPathElement(parent) {}
qreal value() const;
void setValue(qreal value);
@@ -182,22 +182,22 @@ private:
qreal _value;
};
-class QFxPathPrivate;
-class Q_DECLARATIVE_EXPORT QFxPath : public QObject, public QmlParserStatus
+class QmlGraphicsPathPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsPath : public QObject, public QmlParserStatus
{
Q_OBJECT
Q_INTERFACES(QmlParserStatus)
- Q_PROPERTY(QList<QFxPathElement *>* pathElements READ pathElements)
+ Q_PROPERTY(QList<QmlGraphicsPathElement *>* pathElements READ pathElements)
Q_PROPERTY(qreal startX READ startX WRITE setStartX)
Q_PROPERTY(qreal startY READ startY WRITE setStartY)
Q_CLASSINFO("DefaultProperty", "pathElements")
Q_INTERFACES(QmlParserStatus)
public:
- QFxPath(QObject *parent=0);
- ~QFxPath();
+ QmlGraphicsPath(QObject *parent=0);
+ ~QmlGraphicsPath();
- QList<QFxPathElement *>* pathElements();
+ QList<QmlGraphicsPathElement *>* pathElements();
qreal startX() const;
void setStartX(qreal x);
@@ -215,7 +215,7 @@ Q_SIGNALS:
protected:
virtual void componentComplete();
- QFxPath(QFxPathPrivate &dd, QObject *parent);
+ QmlGraphicsPath(QmlGraphicsPathPrivate &dd, QObject *parent);
private Q_SLOTS:
void processPath();
@@ -239,21 +239,21 @@ private:
void createPointCache() const;
private:
- Q_DISABLE_COPY(QFxPath)
- Q_DECLARE_PRIVATE(QFxPath)
+ Q_DISABLE_COPY(QmlGraphicsPath)
+ Q_DECLARE_PRIVATE(QmlGraphicsPath)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxPathElement)
-QML_DECLARE_TYPE(QFxPathAttribute)
-QML_DECLARE_TYPE(QFxCurve)
-QML_DECLARE_TYPE(QFxPathLine)
-QML_DECLARE_TYPE(QFxPathQuad)
-QML_DECLARE_TYPE(QFxPathCubic)
-QML_DECLARE_TYPE(QFxPathPercent)
-QML_DECLARE_TYPE(QFxPath)
+QML_DECLARE_TYPE(QmlGraphicsPathElement)
+QML_DECLARE_TYPE(QmlGraphicsPathAttribute)
+QML_DECLARE_TYPE(QmlGraphicsCurve)
+QML_DECLARE_TYPE(QmlGraphicsPathLine)
+QML_DECLARE_TYPE(QmlGraphicsPathQuad)
+QML_DECLARE_TYPE(QmlGraphicsPathCubic)
+QML_DECLARE_TYPE(QmlGraphicsPathPercent)
+QML_DECLARE_TYPE(QmlGraphicsPath)
QT_END_HEADER
-#endif // QFXPATH_H
+#endif // QMLGRAPHICSPATH_H
diff --git a/src/declarative/fx/qfxpath_p.h b/src/declarative/graphicsitems/qmlgraphicspath_p_p.h
index d4a419a..36e8945 100644
--- a/src/declarative/fx/qfxpath_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicspath_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXPATH_P_H
-#define QFXPATH_P_H
+#ifndef QMLGRAPHICSPATH_P_H
+#define QMLGRAPHICSPATH_P_H
//
// W A R N I N G
@@ -54,22 +54,22 @@
//
#include "private/qobject_p.h"
-#include "qfxpath.h"
+#include "qmlgraphicspath_p.h"
#include "qml.h"
QT_BEGIN_NAMESPACE
-class QFxPathPrivate : public QObjectPrivate
+class QmlGraphicsPathPrivate : public QObjectPrivate
{
- Q_DECLARE_PUBLIC(QFxPath)
+ Q_DECLARE_PUBLIC(QmlGraphicsPath)
public:
- QFxPathPrivate() : startX(0), startY(0) { }
+ QmlGraphicsPathPrivate() : startX(0), startY(0) { }
QPainterPath _path;
- QList<QFxPathElement*> _pathElements;
+ QList<QmlGraphicsPathElement*> _pathElements;
mutable QVector<QPointF> _pointCache;
- QList<QFxPath::AttributePoint> _attributePoints;
+ QList<QmlGraphicsPath::AttributePoint> _attributePoints;
QStringList _attributes;
int startX;
int startY;
diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/graphicsitems/qmlgraphicspathview.cpp
index c580e98..52d2fa9 100644
--- a/src/declarative/fx/qfxpathview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspathview.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,32 +42,32 @@
#include <math.h>
#include <QDebug>
#include <QEvent>
-#include "qmlstate.h"
-#include "qlistmodelinterface.h"
-#include "qmlopenmetaobject.h"
+#include <private/qmlstate_p.h>
+#include <private/qlistmodelinterface_p.h>
+#include <private/qmlopenmetaobject_p.h>
-#include "qfxpathview.h"
-#include "qfxpathview_p.h"
+#include <private/qmlgraphicspathview_p.h>
+#include <private/qmlgraphicspathview_p_p.h>
#include <QGraphicsSceneEvent>
static const int FlickThreshold = 5;
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathView,QFxPathView)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,PathView,QmlGraphicsPathView)
-class QFxPathViewAttached : public QObject
+class QmlGraphicsPathViewAttached : public QObject
{
Q_OBJECT
public:
- QFxPathViewAttached(QObject *parent)
+ QmlGraphicsPathViewAttached(QObject *parent)
: QObject(parent), mo(new QmlOpenMetaObject(this))
{
}
- ~QFxPathViewAttached()
+ ~QmlGraphicsPathViewAttached()
{
- QFxPathView::attachedProperties.remove(parent());
+ QmlGraphicsPathView::attachedProperties.remove(parent());
}
QVariant value(const QByteArray &name) const
@@ -86,18 +86,18 @@ private:
/*!
\internal
- \class QFxPathView
- \brief The QFxPathView class lays out items provided by a model on a path.
+ \class QmlGraphicsPathView
+ \brief The QmlGraphicsPathView class lays out items provided by a model on a path.
\ingroup group_views
The model must be a \l QListModelInterface subclass.
- \sa QFxPath
+ \sa QmlGraphicsPath
*/
/*!
- \qmlclass PathView
+ \qmlclass PathView QFxPathView
\brief The PathView element lays out model-provided items on a path.
\inherits Item
@@ -112,23 +112,23 @@ private:
\sa Path
*/
-QFxPathView::QFxPathView(QFxItem *parent)
- : QFxItem(*(new QFxPathViewPrivate), parent)
+QmlGraphicsPathView::QmlGraphicsPathView(QmlGraphicsItem *parent)
+ : QmlGraphicsItem(*(new QmlGraphicsPathViewPrivate), parent)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
d->init();
}
-QFxPathView::QFxPathView(QFxPathViewPrivate &dd, QFxItem *parent)
- : QFxItem(dd, parent)
+QmlGraphicsPathView::QmlGraphicsPathView(QmlGraphicsPathViewPrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsItem(dd, parent)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
d->init();
}
-QFxPathView::~QFxPathView()
+QmlGraphicsPathView::~QmlGraphicsPathView()
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
if (d->ownModel)
delete d->model;
}
@@ -143,21 +143,21 @@ QFxPathView::~QFxPathView()
\sa {qmlmodels}{Data Models}
*/
-QVariant QFxPathView::model() const
+QVariant QmlGraphicsPathView::model() const
{
- Q_D(const QFxPathView);
+ Q_D(const QmlGraphicsPathView);
return d->modelVariant;
}
-void QFxPathView::setModel(const QVariant &model)
+void QmlGraphicsPathView::setModel(const QVariant &model)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
if (d->model) {
disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
- disconnect(d->model, SIGNAL(createdItem(int, QFxItem*)), this, SLOT(createdItem(int,QFxItem*)));
+ disconnect(d->model, SIGNAL(createdItem(int, QmlGraphicsItem*)), this, SLOT(createdItem(int,QmlGraphicsItem*)));
for (int i=0; i<d->items.count(); i++){
- QFxItem *p = d->items[i];
+ QmlGraphicsItem *p = d->items[i];
d->model->release(p);
}
d->items.clear();
@@ -165,8 +165,8 @@ void QFxPathView::setModel(const QVariant &model)
d->modelVariant = model;
QObject *object = qvariant_cast<QObject*>(model);
- QFxVisualModel *vim = 0;
- if (object && (vim = qobject_cast<QFxVisualModel *>(object))) {
+ QmlGraphicsVisualModel *vim = 0;
+ if (object && (vim = qobject_cast<QmlGraphicsVisualModel *>(object))) {
if (d->ownModel) {
delete d->model;
d->ownModel = false;
@@ -174,16 +174,16 @@ void QFxPathView::setModel(const QVariant &model)
d->model = vim;
} else {
if (!d->ownModel) {
- d->model = new QFxVisualDataModel(qmlContext(this));
+ d->model = new QmlGraphicsVisualDataModel(qmlContext(this));
d->ownModel = true;
}
- if (QFxVisualDataModel *dataModel = qobject_cast<QFxVisualDataModel*>(d->model))
+ if (QmlGraphicsVisualDataModel *dataModel = qobject_cast<QmlGraphicsVisualDataModel*>(d->model))
dataModel->setModel(model);
}
if (d->model) {
connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
- connect(d->model, SIGNAL(createdItem(int, QFxItem*)), this, SLOT(createdItem(int,QFxItem*)));
+ connect(d->model, SIGNAL(createdItem(int, QmlGraphicsItem*)), this, SLOT(createdItem(int,QmlGraphicsItem*)));
}
d->firstIndex = 0;
d->pathOffset = 0;
@@ -195,9 +195,9 @@ void QFxPathView::setModel(const QVariant &model)
\qmlproperty int PathView::count
This property holds the number of items in the model.
*/
-int QFxPathView::count() const
+int QmlGraphicsPathView::count() const
{
- Q_D(const QFxPathView);
+ Q_D(const QmlGraphicsPathView);
return d->model ? d->model->count() : 0;
}
@@ -207,15 +207,15 @@ int QFxPathView::count() const
This property holds the path used to lay out the items.
For more information see the \l Path documentation.
*/
-QFxPath *QFxPathView::path() const
+QmlGraphicsPath *QmlGraphicsPathView::path() const
{
- Q_D(const QFxPathView);
+ Q_D(const QmlGraphicsPathView);
return d->path;
}
-void QFxPathView::setPath(QFxPath *path)
+void QmlGraphicsPathView::setPath(QmlGraphicsPath *path)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
d->path = path;
connect(d->path, SIGNAL(changed()), this, SLOT(refill()));
d->regenerate();
@@ -225,15 +225,15 @@ void QFxPathView::setPath(QFxPath *path)
\qmlproperty int PathView::currentIndex
This property holds the index of the current item.
*/
-int QFxPathView::currentIndex() const
+int QmlGraphicsPathView::currentIndex() const
{
- Q_D(const QFxPathView);
+ Q_D(const QmlGraphicsPathView);
return d->currentIndex;
}
-void QFxPathView::setCurrentIndex(int idx)
+void QmlGraphicsPathView::setCurrentIndex(int idx)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
if (d->model && d->model->count())
idx = qAbs(idx % d->model->count());
if (d->model && idx != d->currentIndex) {
@@ -253,22 +253,22 @@ void QFxPathView::setCurrentIndex(int idx)
The offset specifies how far along the path the items are from their initial positions.
*/
-qreal QFxPathView::offset() const
+qreal QmlGraphicsPathView::offset() const
{
- Q_D(const QFxPathView);
+ Q_D(const QmlGraphicsPathView);
return d->_offset;
}
-void QFxPathView::setOffset(qreal offset)
+void QmlGraphicsPathView::setOffset(qreal offset)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
d->setOffset(offset);
d->updateCurrent();
}
-void QFxPathViewPrivate::setOffset(qreal o)
+void QmlGraphicsPathViewPrivate::setOffset(qreal o)
{
- Q_Q(QFxPathView);
+ Q_Q(QmlGraphicsPathView);
if (_offset != o) {
_offset = fmod(o, 100.0);
if (_offset < 0)
@@ -282,15 +282,15 @@ void QFxPathViewPrivate::setOffset(qreal o)
This property determines the position (0-100) the nearest item will snap to.
*/
-qreal QFxPathView::snapPosition() const
+qreal QmlGraphicsPathView::snapPosition() const
{
- Q_D(const QFxPathView);
+ Q_D(const QmlGraphicsPathView);
return d->snapPos;
}
-void QFxPathView::setSnapPosition(qreal pos)
+void QmlGraphicsPathView::setSnapPosition(qreal pos)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
d->snapPos = pos/100;
d->fixOffset();
}
@@ -303,15 +303,15 @@ void QFxPathView::setSnapPosition(qreal pos)
dragMargin is greater than zero, a drag can be initiated by clicking
within dragMargin pixels of the path.
*/
-qreal QFxPathView::dragMargin() const
+qreal QmlGraphicsPathView::dragMargin() const
{
- Q_D(const QFxPathView);
+ Q_D(const QmlGraphicsPathView);
return d->dragMargin;
}
-void QFxPathView::setDragMargin(qreal dragMargin)
+void QmlGraphicsPathView::setDragMargin(qreal dragMargin)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
d->dragMargin = dragMargin;
}
@@ -323,25 +323,25 @@ void QFxPathView::setDragMargin(qreal dragMargin)
Here is an example delegate:
\snippet doc/src/snippets/declarative/pathview/pathview.qml 1
*/
-QmlComponent *QFxPathView::delegate() const
+QmlComponent *QmlGraphicsPathView::delegate() const
{
- Q_D(const QFxPathView);
+ Q_D(const QmlGraphicsPathView);
if (d->model) {
- if (QFxVisualDataModel *dataModel = qobject_cast<QFxVisualDataModel*>(d->model))
+ if (QmlGraphicsVisualDataModel *dataModel = qobject_cast<QmlGraphicsVisualDataModel*>(d->model))
return dataModel->delegate();
}
return 0;
}
-void QFxPathView::setDelegate(QmlComponent *c)
+void QmlGraphicsPathView::setDelegate(QmlComponent *c)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
if (!d->ownModel) {
- d->model = new QFxVisualDataModel(qmlContext(this));
+ d->model = new QmlGraphicsVisualDataModel(qmlContext(this));
d->ownModel = true;
}
- if (QFxVisualDataModel *dataModel = qobject_cast<QFxVisualDataModel*>(d->model)) {
+ if (QmlGraphicsVisualDataModel *dataModel = qobject_cast<QmlGraphicsVisualDataModel*>(d->model)) {
dataModel->setDelegate(c);
d->regenerate();
}
@@ -351,22 +351,22 @@ void QFxPathView::setDelegate(QmlComponent *c)
\qmlproperty int PathView::pathItemCount
This property holds the number of items visible on the path at any one time
*/
-int QFxPathView::pathItemCount() const
+int QmlGraphicsPathView::pathItemCount() const
{
- Q_D(const QFxPathView);
+ Q_D(const QmlGraphicsPathView);
return d->pathItems;
}
-void QFxPathView::setPathItemCount(int i)
+void QmlGraphicsPathView::setPathItemCount(int i)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
if (i == d->pathItems)
return;
d->pathItems = i;
d->regenerate();
}
-QPointF QFxPathViewPrivate::pointNear(const QPointF &point, qreal *nearPercent) const
+QPointF QmlGraphicsPathViewPrivate::pointNear(const QPointF &point, qreal *nearPercent) const
{
//XXX maybe do recursively at increasing resolution.
qreal mindist = 1e10; // big number
@@ -390,9 +390,9 @@ QPointF QFxPathViewPrivate::pointNear(const QPointF &point, qreal *nearPercent)
}
-void QFxPathView::mousePressEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsPathView::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
if (!d->items.count())
return;
QPointF scenePoint = mapToScene(event->pos());
@@ -416,13 +416,13 @@ void QFxPathView::mousePressEvent(QGraphicsSceneMouseEvent *event)
d->stealMouse = false;
d->lastElapsed = 0;
d->lastDist = 0;
- QFxItemPrivate::start(d->lastPosTime);
+ QmlGraphicsItemPrivate::start(d->lastPosTime);
d->tl.clear();
}
-void QFxPathView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsPathView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
if (d->lastPosTime.isNull())
return;
@@ -433,7 +433,7 @@ void QFxPathView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
if (d->stealMouse) {
- d->moveReason = QFxPathViewPrivate::Mouse;
+ d->moveReason = QmlGraphicsPathViewPrivate::Mouse;
qreal newPc;
d->pointNear(event->pos(), &newPc);
qreal diff = newPc - d->startPc;
@@ -445,20 +445,20 @@ void QFxPathView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
else if (diff < -50)
diff += 100;
- d->lastElapsed = QFxItemPrivate::restart(d->lastPosTime);
+ d->lastElapsed = QmlGraphicsItemPrivate::restart(d->lastPosTime);
d->lastDist = diff;
d->startPc = newPc;
}
}
}
-void QFxPathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
+void QmlGraphicsPathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
if (d->lastPosTime.isNull())
return;
- qreal elapsed = qreal(d->lastElapsed + QFxItemPrivate::elapsed(d->lastPosTime)) / 1000.;
+ qreal elapsed = qreal(d->lastElapsed + QmlGraphicsItemPrivate::elapsed(d->lastPosTime)) / 1000.;
qreal velocity = elapsed > 0. ? d->lastDist / elapsed : 0;
if (d->model && d->model->count() && qAbs(velocity) > 5) {
if (velocity > 100)
@@ -479,13 +479,13 @@ void QFxPathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
ungrabMouse();
}
-bool QFxPathView::sendMouseEvent(QGraphicsSceneMouseEvent *event)
+bool QmlGraphicsPathView::sendMouseEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
QGraphicsSceneMouseEvent mouseEvent(event->type());
QRectF myRect = mapToScene(QRectF(0, 0, width(), height())).boundingRect();
QGraphicsScene *s = scene();
- QFxItem *grabber = s ? qobject_cast<QFxItem*>(s->mouseGrabberItem()) : 0;
+ QmlGraphicsItem *grabber = s ? qobject_cast<QmlGraphicsItem*>(s->mouseGrabberItem()) : 0;
if ((d->stealMouse || myRect.contains(event->scenePos().toPoint())) && (!grabber || !grabber->keepMouseGrab())) {
mouseEvent.setAccepted(false);
for (int i = 0x1; i <= 0x10; i <<= 1) {
@@ -512,7 +512,7 @@ bool QFxPathView::sendMouseEvent(QGraphicsSceneMouseEvent *event)
default:
break;
}
- grabber = qobject_cast<QFxItem*>(s->mouseGrabberItem());
+ grabber = qobject_cast<QmlGraphicsItem*>(s->mouseGrabberItem());
if (grabber && d->stealMouse && !grabber->keepMouseGrab() && grabber != this)
grabMouse();
@@ -523,10 +523,10 @@ bool QFxPathView::sendMouseEvent(QGraphicsSceneMouseEvent *event)
return false;
}
-bool QFxPathView::sceneEventFilter(QGraphicsItem *i, QEvent *e)
+bool QmlGraphicsPathView::sceneEventFilter(QGraphicsItem *i, QEvent *e)
{
if (!isVisible())
- return QFxItem::sceneEventFilter(i, e);
+ return QmlGraphicsItem::sceneEventFilter(i, e);
switch (e->type()) {
case QEvent::GraphicsSceneMousePress:
@@ -542,13 +542,13 @@ bool QFxPathView::sceneEventFilter(QGraphicsItem *i, QEvent *e)
break;
}
- return QFxItem::sceneEventFilter(i, e);
+ return QmlGraphicsItem::sceneEventFilter(i, e);
}
-void QFxPathView::componentComplete()
+void QmlGraphicsPathView::componentComplete()
{
- Q_D(QFxPathView);
- QFxItem::componentComplete();
+ Q_D(QmlGraphicsPathView);
+ QmlGraphicsItem::componentComplete();
d->regenerate();
// move to correct offset
@@ -567,14 +567,14 @@ void QFxPathView::componentComplete()
}
}
-void QFxPathViewPrivate::regenerate()
+void QmlGraphicsPathViewPrivate::regenerate()
{
- Q_Q(QFxPathView);
+ Q_Q(QmlGraphicsPathView);
if (!q->isComponentComplete())
return;
for (int i=0; i<items.count(); i++){
- QFxItem *p = items[i];
+ QmlGraphicsItem *p = items[i];
releaseItem(p);
}
items.clear();
@@ -590,7 +590,7 @@ void QFxPathViewPrivate::regenerate()
int numItems = pathItems >= 0 ? pathItems : model->count();
for (int i=0; i < numItems && i < model->count(); ++i){
int index = (i + firstIndex) % model->count();
- QFxItem *item = getItem(index);
+ QmlGraphicsItem *item = getItem(index);
if (!item) {
qWarning() << "PathView: Cannot create item, index" << (i + firstIndex) % model->count();
return;
@@ -603,20 +603,20 @@ void QFxPathViewPrivate::regenerate()
q->refill();
}
-void QFxPathViewPrivate::updateItem(QFxItem *item, qreal percent)
+void QmlGraphicsPathViewPrivate::updateItem(QmlGraphicsItem *item, qreal percent)
{
- if (QObject *obj = QFxPathView::qmlAttachedProperties(item)) {
+ if (QObject *obj = QmlGraphicsPathView::qmlAttachedProperties(item)) {
foreach(const QString &attr, path->attributes())
- static_cast<QFxPathViewAttached *>(obj)->setValue(attr.toUtf8(), path->attributeAt(attr, percent));
+ static_cast<QmlGraphicsPathViewAttached *>(obj)->setValue(attr.toUtf8(), path->attributeAt(attr, percent));
}
QPointF pf = path->pointAt(percent);
item->setX(pf.x() - item->width()*item->scale()/2);
item->setY(pf.y() - item->height()*item->scale()/2);
}
-void QFxPathView::refill()
+void QmlGraphicsPathView::refill()
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
if (!d->isValid() || !isComponentComplete())
return;
@@ -649,13 +649,13 @@ void QFxPathView::refill()
//A wraparound has occured
if (wrapIndex < d->items.count()/2){
while(wrapIndex-- >= 0){
- QFxItem* p = d->items.takeFirst();
+ QmlGraphicsItem* p = d->items.takeFirst();
d->updateItem(p, 0.0);
d->releaseItem(p);
d->firstIndex++;
d->firstIndex %= d->model->count();
int index = (d->firstIndex + d->items.count())%d->model->count();
- QFxItem *item = d->getItem(index);
+ QmlGraphicsItem *item = d->getItem(index);
item->setZValue(wrapIndex);
if (d->currentIndex == index)
item->setFocus(true);
@@ -665,13 +665,13 @@ void QFxPathView::refill()
}
} else {
while(wrapIndex++ < d->items.count()-1){
- QFxItem* p = d->items.takeLast();
+ QmlGraphicsItem* p = d->items.takeLast();
d->updateItem(p, 1.0);
d->releaseItem(p);
d->firstIndex--;
if (d->firstIndex < 0)
d->firstIndex = d->model->count() - 1;
- QFxItem *item = d->getItem(d->firstIndex);
+ QmlGraphicsItem *item = d->getItem(d->firstIndex);
item->setZValue(d->firstIndex);
if (d->currentIndex == d->firstIndex)
item->setFocus(true);
@@ -689,15 +689,15 @@ void QFxPathView::refill()
d->updateItem(d->items.at(i), rotatedPositions[i]);
}
-void QFxPathView::itemsInserted(int modelIndex, int count)
+void QmlGraphicsPathView::itemsInserted(int modelIndex, int count)
{
//XXX support animated insertion
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
if (!d->isValid() || !isComponentComplete())
return;
if (d->pathItems == -1) {
for (int i = 0; i < count; ++i) {
- QFxItem *item = d->getItem(modelIndex + i);
+ QmlGraphicsItem *item = d->getItem(modelIndex + i);
item->setZValue(modelIndex + i);
d->items.insert(modelIndex + i, item);
}
@@ -719,15 +719,15 @@ void QFxPathView::itemsInserted(int modelIndex, int count)
d->moveOffset.setValue(targetOffset);
}
-void QFxPathView::itemsRemoved(int modelIndex, int count)
+void QmlGraphicsPathView::itemsRemoved(int modelIndex, int count)
{
//XXX support animated removal
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
if (!d->isValid() || !isComponentComplete())
return;
if (d->pathItems == -1) {
for (int i = 0; i < count; ++i) {
- QFxItem* p = d->items.takeAt(modelIndex);
+ QmlGraphicsItem* p = d->items.takeAt(modelIndex);
d->model->release(p);
}
d->snapToCurrent();
@@ -756,28 +756,28 @@ void QFxPathView::itemsRemoved(int modelIndex, int count)
d->moveOffset.setValue(targetOffset);
}
-void QFxPathView::createdItem(int index, QFxItem *item)
+void QmlGraphicsPathView::createdItem(int index, QmlGraphicsItem *item)
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
if (d->requestedIndex != index) {
item->setParentItem(this);
d->updateItem(item, index < d->firstIndex ? 0.0 : 1.0);
}
}
-void QFxPathView::destroyingItem(QFxItem *item)
+void QmlGraphicsPathView::destroyingItem(QmlGraphicsItem *item)
{
Q_UNUSED(item);
}
-void QFxPathView::ticked()
+void QmlGraphicsPathView::ticked()
{
- Q_D(QFxPathView);
+ Q_D(QmlGraphicsPathView);
d->updateCurrent();
}
// find the item closest to the snap position
-int QFxPathViewPrivate::calcCurrentIndex()
+int QmlGraphicsPathViewPrivate::calcCurrentIndex()
{
int current = -1;
if (model && items.count()) {
@@ -816,9 +816,9 @@ int QFxPathViewPrivate::calcCurrentIndex()
return current;
}
-void QFxPathViewPrivate::updateCurrent()
+void QmlGraphicsPathViewPrivate::updateCurrent()
{
- Q_Q(QFxPathView);
+ Q_Q(QmlGraphicsPathView);
if (moveReason != Mouse)
return;
int idx = calcCurrentIndex();
@@ -831,9 +831,9 @@ void QFxPathViewPrivate::updateCurrent()
}
}
-void QFxPathViewPrivate::fixOffset()
+void QmlGraphicsPathViewPrivate::fixOffset()
{
- Q_Q(QFxPathView);
+ Q_Q(QmlGraphicsPathView);
if (model && items.count()) {
int curr = calcCurrentIndex();
if (curr != currentIndex)
@@ -843,7 +843,7 @@ void QFxPathViewPrivate::fixOffset()
}
}
-void QFxPathViewPrivate::snapToCurrent()
+void QmlGraphicsPathViewPrivate::snapToCurrent()
{
if (!model || model->count() <= 0)
return;
@@ -897,12 +897,12 @@ void QFxPathViewPrivate::snapToCurrent()
}
}
-QHash<QObject*, QObject*> QFxPathView::attachedProperties;
-QObject *QFxPathView::qmlAttachedProperties(QObject *obj)
+QHash<QObject*, QObject*> QmlGraphicsPathView::attachedProperties;
+QObject *QmlGraphicsPathView::qmlAttachedProperties(QObject *obj)
{
QObject *rv = attachedProperties.value(obj);
if (!rv) {
- rv = new QFxPathViewAttached(obj);
+ rv = new QmlGraphicsPathViewAttached(obj);
attachedProperties.insert(obj, rv);
}
return rv;
@@ -910,4 +910,4 @@ QObject *QFxPathView::qmlAttachedProperties(QObject *obj)
QT_END_NAMESPACE
-#include "qfxpathview.moc"
+#include "qmlgraphicspathview.moc"
diff --git a/src/declarative/fx/qfxpathview.h b/src/declarative/graphicsitems/qmlgraphicspathview_p.h
index c8c0ac0..f1fed98 100644
--- a/src/declarative/fx/qfxpathview.h
+++ b/src/declarative/graphicsitems/qmlgraphicspathview_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,30 +21,29 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXPATHVIEW_H
-#define QFXPATHVIEW_H
+#ifndef QMLGRAPHICSPATHVIEW_H
+#define QMLGRAPHICSPATHVIEW_H
-#include <QtDeclarative/qfxitem.h>
-#include <QtDeclarative/qfxpath.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
+#include <private/qmlgraphicspath_p.h>
QT_BEGIN_HEADER
@@ -52,13 +52,13 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QListModelInterface;
-class QFxPathViewPrivate;
-class Q_DECLARATIVE_EXPORT QFxPathView : public QFxItem
+class QmlGraphicsPathViewPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsPathView : public QmlGraphicsItem
{
Q_OBJECT
Q_PROPERTY(QVariant model READ model WRITE setModel)
- Q_PROPERTY(QFxPath *path READ path WRITE setPath)
+ Q_PROPERTY(QmlGraphicsPath *path READ path WRITE setPath)
Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)
Q_PROPERTY(qreal offset READ offset WRITE setOffset NOTIFY offsetChanged)
Q_PROPERTY(qreal snapPosition READ snapPosition WRITE setSnapPosition)
@@ -68,14 +68,14 @@ class Q_DECLARATIVE_EXPORT QFxPathView : public QFxItem
Q_PROPERTY(int pathItemCount READ pathItemCount WRITE setPathItemCount)
public:
- QFxPathView(QFxItem *parent=0);
- virtual ~QFxPathView();
+ QmlGraphicsPathView(QmlGraphicsItem *parent=0);
+ virtual ~QmlGraphicsPathView();
QVariant model() const;
void setModel(const QVariant &);
- QFxPath *path() const;
- void setPath(QFxPath *);
+ QmlGraphicsPath *path() const;
+ void setPath(QmlGraphicsPath *);
int currentIndex() const;
void setCurrentIndex(int idx);
@@ -116,23 +116,23 @@ private Q_SLOTS:
void ticked();
void itemsInserted(int index, int count);
void itemsRemoved(int index, int count);
- void createdItem(int index, QFxItem *item);
- void destroyingItem(QFxItem *item);
+ void createdItem(int index, QmlGraphicsItem *item);
+ void destroyingItem(QmlGraphicsItem *item);
protected:
- QFxPathView(QFxPathViewPrivate &dd, QFxItem *parent);
+ QmlGraphicsPathView(QmlGraphicsPathViewPrivate &dd, QmlGraphicsItem *parent);
private:
- friend class QFxPathViewAttached;
+ friend class QmlGraphicsPathViewAttached;
static QHash<QObject*, QObject*> attachedProperties;
- Q_DISABLE_COPY(QFxPathView)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxPathView)
+ Q_DISABLE_COPY(QmlGraphicsPathView)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsPathView)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxPathView)
-QML_DECLARE_TYPEINFO(QFxPathView, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(QmlGraphicsPathView)
+QML_DECLARE_TYPEINFO(QmlGraphicsPathView, QML_HAS_ATTACHED_PROPERTIES)
QT_END_HEADER
-#endif // QFXPATHVIEW_H
+#endif // QMLGRAPHICSPATHVIEW_H
diff --git a/src/declarative/fx/qfxpathview_p.h b/src/declarative/graphicsitems/qmlgraphicspathview_p_p.h
index 60bfdb3..a0f2a3d 100644
--- a/src/declarative/fx/qfxpathview_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicspathview_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXPATHVIEW_P_H
-#define QFXPATHVIEW_P_H
+#ifndef QMLGRAPHICSPATHVIEW_P_H
+#define QMLGRAPHICSPATHVIEW_P_H
//
// W A R N I N G
@@ -54,37 +54,37 @@
//
#include "qdatetime.h"
-#include "qfxpathview.h"
-#include "qfxitem_p.h"
-#include "qfxvisualitemmodel.h"
+#include "qmlgraphicspathview_p.h"
+#include "qmlgraphicsitem_p.h"
+#include "qmlgraphicsvisualitemmodel_p.h"
#include "qml.h"
-#include "private/qmlanimation_p.h"
+#include "private/qmlanimation_p_p.h"
QT_BEGIN_NAMESPACE
typedef struct PathViewItem{
int index;
- QFxItem* item;
+ QmlGraphicsItem* item;
}PathViewItem;
-class QFxPathViewPrivate : public QFxItemPrivate
+class QmlGraphicsPathViewPrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxPathView)
+ Q_DECLARE_PUBLIC(QmlGraphicsPathView)
public:
- QFxPathViewPrivate()
+ QmlGraphicsPathViewPrivate()
: path(0), currentIndex(0), startPc(0), lastDist(0)
, lastElapsed(0), stealMouse(false), ownModel(false), activeItem(0)
- , snapPos(0), dragMargin(0), moveOffset(this, &QFxPathViewPrivate::setOffset)
+ , snapPos(0), dragMargin(0), moveOffset(this, &QmlGraphicsPathViewPrivate::setOffset)
, firstIndex(0), pathItems(-1), pathOffset(0), requestedIndex(-1), model(0)
, moveReason(Other)
{
- fixupOffsetEvent = QmlTimeLineEvent::timeLineEvent<QFxPathViewPrivate, &QFxPathViewPrivate::fixOffset>(&moveOffset, this);
+ fixupOffsetEvent = QmlTimeLineEvent::timeLineEvent<QmlGraphicsPathViewPrivate, &QmlGraphicsPathViewPrivate::fixOffset>(&moveOffset, this);
}
void init()
{
- Q_Q(QFxPathView);
+ Q_Q(QmlGraphicsPathView);
_offset = 0;
q->setAcceptedMouseButtons(Qt::LeftButton);
q->setFlag(QGraphicsItem::ItemIsFocusScope);
@@ -92,16 +92,16 @@ public:
q->connect(&tl, SIGNAL(updated()), q, SLOT(ticked()));
}
- QFxItem *getItem(int modelIndex) {
- Q_Q(QFxPathView);
+ QmlGraphicsItem *getItem(int modelIndex) {
+ Q_Q(QmlGraphicsPathView);
requestedIndex = modelIndex;
- QFxItem *item = model->item(modelIndex);
+ QmlGraphicsItem *item = model->item(modelIndex);
if (item)
item->setParentItem(q);
requestedIndex = -1;
return item;
}
- void releaseItem(QFxItem *item) {
+ void releaseItem(QmlGraphicsItem *item) {
model->release(item);
}
@@ -114,11 +114,11 @@ public:
void fixOffset();
void setOffset(qreal offset);
void regenerate();
- void updateItem(QFxItem *, qreal);
+ void updateItem(QmlGraphicsItem *, qreal);
void snapToCurrent();
QPointF pointNear(const QPointF &point, qreal *nearPercent=0) const;
- QFxPath *path;
+ QmlGraphicsPath *path;
int currentIndex;
qreal startPc;
QPointF startPoint;
@@ -129,18 +129,18 @@ public:
bool ownModel : 1;
QTime lastPosTime;
QPointF lastPos;
- QFxItem *activeItem;
+ QmlGraphicsItem *activeItem;
qreal snapPos;
qreal dragMargin;
QmlTimeLine tl;
- QmlTimeLineValueProxy<QFxPathViewPrivate> moveOffset;
+ QmlTimeLineValueProxy<QmlGraphicsPathViewPrivate> moveOffset;
QmlTimeLineEvent fixupOffsetEvent;
int firstIndex;
int pathItems;
int pathOffset;
int requestedIndex;
- QList<QFxItem *> items;
- QFxVisualModel *model;
+ QList<QmlGraphicsItem *> items;
+ QmlGraphicsVisualModel *model;
QVariant modelVariant;
enum MovementReason { Other, Key, Mouse };
MovementReason moveReason;
diff --git a/src/declarative/fx/qfxpixmapcache.cpp b/src/declarative/graphicsitems/qmlgraphicspixmapcache.cpp
index 13e1b16..fdf489c 100644
--- a/src/declarative/fx/qfxpixmapcache.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspixmapcache.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,39 +21,38 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxpixmapcache.h"
+#include "qmlgraphicspixmapcache_p.h"
#include <QImageReader>
#include <QHash>
#include <QNetworkReply>
#include <QPixmapCache>
-#include <private/qfxperf_p.h>
+#include <private/qfxperf_p_p.h>
#include <QtDeclarative/qmlengine.h>
#include <QFile>
#include <QtCore/qdebug.h>
QT_BEGIN_NAMESPACE
class QSharedNetworkReply;
-typedef QHash<QString, QSharedNetworkReply *> QFxSharedNetworkReplyHash;
-static QFxSharedNetworkReplyHash qfxActiveNetworkReplies;
+typedef QHash<QString, QSharedNetworkReply *> QmlGraphicsSharedNetworkReplyHash;
+static QmlGraphicsSharedNetworkReplyHash qfxActiveNetworkReplies;
class QSharedNetworkReply
{
@@ -118,8 +118,8 @@ static bool readImage(QIODevice *dev, QPixmap *pixmap)
/*!
\internal
- \class QFxPixmapCache
- \brief Enacapsultes a pixmap for QFx items.
+ \class QmlGraphicsPixmapCache
+ \brief Enacapsultes a pixmap for QmlGraphics items.
This class is NOT reentrant.
*/
@@ -140,10 +140,10 @@ static QString toLocalFileOrQrc(const QUrl& url)
Returns true if the image was loaded without error.
*/
-bool QFxPixmapCache::find(const QUrl& url, QPixmap *pixmap)
+bool QmlGraphicsPixmapCache::find(const QUrl& url, QPixmap *pixmap)
{
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::PixmapLoad> perf;
+ QmlPerfTimer<QmlPerf::PixmapLoad> perf;
#endif
QString key = url.toString();
@@ -166,10 +166,10 @@ bool QFxPixmapCache::find(const QUrl& url, QPixmap *pixmap)
} else
#endif
{
- QFxSharedNetworkReplyHash::Iterator iter = qfxActiveNetworkReplies.find(key);
+ QmlGraphicsSharedNetworkReplyHash::Iterator iter = qfxActiveNetworkReplies.find(key);
if (iter == qfxActiveNetworkReplies.end()) {
// API usage error
- qWarning() << "QFxPixmapCache: URL not loaded" << url;
+ qWarning() << "QmlGraphicsPixmapCache: URL not loaded" << url;
ok = false;
} else {
if ((*iter)->reply->error()) {
@@ -195,7 +195,7 @@ bool QFxPixmapCache::find(const QUrl& url, QPixmap *pixmap)
#endif
// We may be the second finder. Still need to check for active replies.
{
- QFxSharedNetworkReplyHash::Iterator iter = qfxActiveNetworkReplies.find(key);
+ QmlGraphicsSharedNetworkReplyHash::Iterator iter = qfxActiveNetworkReplies.find(key);
if (iter != qfxActiveNetworkReplies.end())
(*iter)->release();
}
@@ -213,7 +213,7 @@ bool QFxPixmapCache::find(const QUrl& url, QPixmap *pixmap)
The returned QNetworkReply will be deleted when all get() calls are
matched by a corresponding find() call.
*/
-QNetworkReply *QFxPixmapCache::get(QmlEngine *engine, const QUrl& url, QPixmap *pixmap)
+QNetworkReply *QmlGraphicsPixmapCache::get(QmlEngine *engine, const QUrl& url, QPixmap *pixmap)
{
#ifndef QT_NO_LOCALFILE_OPTIMIZED_QML
QString lf = toLocalFileOrQrc(url);
@@ -239,7 +239,7 @@ QNetworkReply *QFxPixmapCache::get(QmlEngine *engine, const QUrl& url, QPixmap *
return 0;
}
- QFxSharedNetworkReplyHash::Iterator iter = qfxActiveNetworkReplies.find(key);
+ QmlGraphicsSharedNetworkReplyHash::Iterator iter = qfxActiveNetworkReplies.find(key);
if (iter == qfxActiveNetworkReplies.end()) {
QNetworkRequest req(url);
QSharedNetworkReply *item = new QSharedNetworkReply(engine->networkAccessManager()->get(req));
@@ -259,10 +259,10 @@ QNetworkReply *QFxPixmapCache::get(QmlEngine *engine, const QUrl& url, QPixmap *
Any connections from the QNetworkReply returned by get() to \a obj will be
disconnected.
*/
-void QFxPixmapCache::cancelGet(const QUrl& url, QObject* obj)
+void QmlGraphicsPixmapCache::cancelGet(const QUrl& url, QObject* obj)
{
QString key = url.toString();
- QFxSharedNetworkReplyHash::Iterator iter = qfxActiveNetworkReplies.find(key);
+ QmlGraphicsSharedNetworkReplyHash::Iterator iter = qfxActiveNetworkReplies.find(key);
if (iter == qfxActiveNetworkReplies.end())
return;
if (obj)
@@ -274,7 +274,7 @@ void QFxPixmapCache::cancelGet(const QUrl& url, QObject* obj)
This function is mainly for test verification. It returns the number of
requests that are still unfinished.
*/
-int QFxPixmapCache::pendingRequests()
+int QmlGraphicsPixmapCache::pendingRequests()
{
return qfxActiveNetworkReplies.count();
}
diff --git a/src/declarative/fx/qfxpixmapcache.h b/src/declarative/graphicsitems/qmlgraphicspixmapcache_p.h
index fb5b88a..29de98d 100644
--- a/src/declarative/fx/qfxpixmapcache.h
+++ b/src/declarative/graphicsitems/qmlgraphicspixmapcache_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,31 +21,29 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXPIXMAPCACHE_H
-#define QFXPIXMAPCACHE_H
+#ifndef QMLGRAPHICSPIXMAPCACHE_H
+#define QMLGRAPHICSPIXMAPCACHE_H
#include <QtCore/QString>
#include <QtGui/QPixmap>
-#include <QtDeclarative/qfxglobal.h>
#include <QtCore/qurl.h>
QT_BEGIN_HEADER
@@ -54,13 +53,13 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
class QmlEngine;
class QNetworkReply;
-class Q_DECLARATIVE_EXPORT QFxPixmapCache
+class Q_DECLARATIVE_EXPORT QmlGraphicsPixmapCache
{
public:
static QNetworkReply *get(QmlEngine *, const QUrl& url, QPixmap *pixmap);
static void cancelGet(const QUrl& url, QObject* obj);
- static bool find(const QUrl& url, QPixmap *pixmap); // url must have been passed to QFxPixmapCache::get, and any returned reply finished.
+ static bool find(const QUrl& url, QPixmap *pixmap); // url must have been passed to QmlGraphicsPixmapCache::get, and any returned reply finished.
static int pendingRequests(); // mainly for test verification
};
@@ -69,4 +68,4 @@ QT_END_NAMESPACE
QT_END_HEADER
-#endif // QFXPIXMAPCACHE_H
+#endif // QMLGRAPHICSPIXMAPCACHE_H
diff --git a/src/declarative/fx/qfxpositioners.cpp b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
index 86a069d..ba696e7 100644
--- a/src/declarative/fx/qfxpositioners.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,23 +42,23 @@
#include <QDebug>
#include <QCoreApplication>
#include "qml.h"
-#include "qmlstate.h"
-#include "qmlstategroup.h"
-#include "qmlstateoperations.h"
-#include "private/qfxperf_p.h"
-#include "qfxpositioners.h"
-#include "qfxpositioners_p.h"
+#include <private/qmlstate_p.h>
+#include <private/qmlstategroup_p.h>
+#include <private/qmlstateoperations_p.h>
+#include <private/qfxperf_p_p.h>
+#include <private/qmlgraphicspositioners_p.h>
+#include <private/qmlgraphicspositioners_p_p.h>
QT_BEGIN_NAMESPACE
/*!
\internal
- \class QFxBasePositioner
+ \class QmlGraphicsBasePositioner
\ingroup group_layouts
- \brief The QFxBasePositioner class provides a base for QFx layouts.
+ \brief The QmlGraphicsBasePositioner class provides a base for QmlGraphics layouts.
- To create a QFx Positioner, simply subclass QFxBasePositioner and implement
+ To create a QmlGraphics Positioner, simply subclass QmlGraphicsBasePositioner and implement
doLayout(), which is automatically called when the layout might need
updating.
@@ -70,29 +70,29 @@ QT_BEGIN_NAMESPACE
Note also that the subclass is responsible for adding the
spacing in between items.
*/
-QFxBasePositioner::QFxBasePositioner(AutoUpdateType at, QFxItem *parent)
- : QFxItem(*(new QFxBasePositionerPrivate), parent)
+QmlGraphicsBasePositioner::QmlGraphicsBasePositioner(AutoUpdateType at, QmlGraphicsItem *parent)
+ : QmlGraphicsItem(*(new QmlGraphicsBasePositionerPrivate), parent)
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
d->init(at);
}
-QFxBasePositioner::QFxBasePositioner(QFxBasePositionerPrivate &dd, AutoUpdateType at, QFxItem *parent)
- : QFxItem(dd, parent)
+QmlGraphicsBasePositioner::QmlGraphicsBasePositioner(QmlGraphicsBasePositionerPrivate &dd, AutoUpdateType at, QmlGraphicsItem *parent)
+ : QmlGraphicsItem(dd, parent)
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
d->init(at);
}
-int QFxBasePositioner::spacing() const
+int QmlGraphicsBasePositioner::spacing() const
{
- Q_D(const QFxBasePositioner);
+ Q_D(const QmlGraphicsBasePositioner);
return d->_spacing;
}
-void QFxBasePositioner::setSpacing(int s)
+void QmlGraphicsBasePositioner::setSpacing(int s)
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
if (s==d->_spacing)
return;
d->_spacing = s;
@@ -100,52 +100,52 @@ void QFxBasePositioner::setSpacing(int s)
emit spacingChanged();
}
-QmlTransition *QFxBasePositioner::move() const
+QmlTransition *QmlGraphicsBasePositioner::move() const
{
- Q_D(const QFxBasePositioner);
+ Q_D(const QmlGraphicsBasePositioner);
return d->moveTransition;
}
-void QFxBasePositioner::setMove(QmlTransition *mt)
+void QmlGraphicsBasePositioner::setMove(QmlTransition *mt)
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
d->moveTransition = mt;
}
-QmlTransition *QFxBasePositioner::add() const
+QmlTransition *QmlGraphicsBasePositioner::add() const
{
- Q_D(const QFxBasePositioner);
+ Q_D(const QmlGraphicsBasePositioner);
return d->addTransition;
}
-void QFxBasePositioner::setAdd(QmlTransition *add)
+void QmlGraphicsBasePositioner::setAdd(QmlTransition *add)
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
d->addTransition = add;
}
-QmlTransition *QFxBasePositioner::remove() const
+QmlTransition *QmlGraphicsBasePositioner::remove() const
{
- Q_D(const QFxBasePositioner);
+ Q_D(const QmlGraphicsBasePositioner);
return d->removeTransition;
}
-void QFxBasePositioner::setRemove(QmlTransition *remove)
+void QmlGraphicsBasePositioner::setRemove(QmlTransition *remove)
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
d->removeTransition = remove;
}
-void QFxBasePositioner::componentComplete()
+void QmlGraphicsBasePositioner::componentComplete()
{
- QFxItem::componentComplete();
+ QmlGraphicsItem::componentComplete();
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::BasepositionerComponentComplete> cc;
+ QmlPerfTimer<QmlPerf::BasepositionerComponentComplete> cc;
#endif
prePositioning();
}
-QVariant QFxBasePositioner::itemChange(GraphicsItemChange change,
+QVariant QmlGraphicsBasePositioner::itemChange(GraphicsItemChange change,
const QVariant &value)
{
if (change == ItemChildAddedChange ||
@@ -153,12 +153,12 @@ QVariant QFxBasePositioner::itemChange(GraphicsItemChange change,
prePositioning();
}
- return QFxItem::itemChange(change, value);
+ return QmlGraphicsItem::itemChange(change, value);
}
-bool QFxBasePositioner::event(QEvent *e)
+bool QmlGraphicsBasePositioner::event(QEvent *e)
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
if (e->type() == QEvent::User) {
d->_ep = false;
d->_stableItems += d->_newItems;
@@ -166,25 +166,25 @@ bool QFxBasePositioner::event(QEvent *e)
d->_newItems.clear();
return true;
}
- return QFxItem::event(e);
+ return QmlGraphicsItem::event(e);
}
/*!
Items that have just been added to the positioner. This includes invisible items
that have turned visible.
*/
-QSet<QFxItem *>* QFxBasePositioner::newItems()
+QSet<QmlGraphicsItem *>* QmlGraphicsBasePositioner::newItems()
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
return &d->_newItems;
}
/*!
Items that are visible in the positioner, not including ones that have just been added.
*/
-QSet<QFxItem *>* QFxBasePositioner::items()
+QSet<QmlGraphicsItem *>* QmlGraphicsBasePositioner::items()
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
return &d->_stableItems;
}
@@ -192,15 +192,15 @@ QSet<QFxItem *>* QFxBasePositioner::items()
Items that have just left the positioner. This includes visible items
that have turned invisible.
*/
-QSet<QFxItem *>* QFxBasePositioner::leavingItems()
+QSet<QmlGraphicsItem *>* QmlGraphicsBasePositioner::leavingItems()
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
return &d->_leavingItems;
}
-void QFxBasePositioner::prePositioning()
+void QmlGraphicsBasePositioner::prePositioning()
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
if (!isComponentComplete() || d->_movingItem)
return;
@@ -208,10 +208,10 @@ void QFxBasePositioner::prePositioning()
d->_ep = true;
QCoreApplication::postEvent(this, new QEvent(QEvent::User));
}
- QSet<QFxItem *> allItems;
+ QSet<QmlGraphicsItem *> allItems;
QList<QGraphicsItem *> children = childItems();
for (int ii = 0; ii < children.count(); ++ii) {
- QFxItem *child = qobject_cast<QFxItem *>(children.at(ii));
+ QmlGraphicsItem *child = qobject_cast<QmlGraphicsItem *>(children.at(ii));
if (!child)
continue;
if (!d->_items.contains(child)){
@@ -235,8 +235,8 @@ void QFxBasePositioner::prePositioning()
}
allItems += child;
}
- QSet<QFxItem *> deletedItems = d->_items - allItems;
- foreach(QFxItem *child, d->_items){
+ QSet<QmlGraphicsItem *> deletedItems = d->_items - allItems;
+ foreach(QmlGraphicsItem *child, d->_items){
if (!allItems.contains(child)){
if (!deletedItems.contains(child)) {
QObject::disconnect(child, SIGNAL(opacityChanged()),
@@ -256,7 +256,7 @@ void QFxBasePositioner::prePositioning()
//###To keep this valid, do we need to update on pos change as well?
qreal h = 0.0f;
qreal w = 0.0f;
- foreach(QFxItem *child, d->_items){
+ foreach(QmlGraphicsItem *child, d->_items){
if(!child->isVisible() || child->opacity() <= 0)
continue;
h = qMax(h, child->y() + child->height());
@@ -266,9 +266,9 @@ void QFxBasePositioner::prePositioning()
setImplicitWidth(w);
}
-void QFxBasePositioner::applyTransition(const QList<QPair<QString, QVariant> >& changes, QFxItem* target, QmlStateOperation::ActionList &actions)
+void QmlGraphicsBasePositioner::applyTransition(const QList<QPair<QString, QVariant> >& changes, QmlGraphicsItem* target, QmlStateOperation::ActionList &actions)
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
if (!target)
return;
@@ -282,9 +282,9 @@ void QFxBasePositioner::applyTransition(const QList<QPair<QString, QVariant> >&
d->_animated << target;
}
-void QFxBasePositioner::finishApplyTransitions()
+void QmlGraphicsBasePositioner::finishApplyTransitions()
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
// Note that if a transition is not set the transition manager will
// apply the changes directly, in the case someone uses applyAdd/Move/Remove
// without testing add()/move()/remove().
@@ -295,9 +295,9 @@ void QFxBasePositioner::finishApplyTransitions()
d->moveActions.clear();
d->removeActions.clear();
}
-void QFxBasePositioner::setMovingItem(QFxItem *i)
+void QmlGraphicsBasePositioner::setMovingItem(QmlGraphicsItem *i)
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
d->_movingItem = i;
}
@@ -305,9 +305,9 @@ void QFxBasePositioner::setMovingItem(QFxItem *i)
Applies the positioner's add transition to the \a target item.\a changes is a list of property,value
pairs which will be changed on the target using the add transition.
*/
-void QFxBasePositioner::applyAdd(const QList<QPair<QString, QVariant> >& changes, QFxItem* target)
+void QmlGraphicsBasePositioner::applyAdd(const QList<QPair<QString, QVariant> >& changes, QmlGraphicsItem* target)
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
applyTransition(changes,target, d->addActions);
}
@@ -315,9 +315,9 @@ void QFxBasePositioner::applyAdd(const QList<QPair<QString, QVariant> >& changes
Applies the positioner's move transition to the \a target.\a changes is a list of property,value pairs
which will be changed on the target using the move transition.
*/
-void QFxBasePositioner::applyMove(const QList<QPair<QString, QVariant> >& changes, QFxItem* target)
+void QmlGraphicsBasePositioner::applyMove(const QList<QPair<QString, QVariant> >& changes, QmlGraphicsItem* target)
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
applyTransition(changes,target, d->moveActions);
}
@@ -325,15 +325,15 @@ void QFxBasePositioner::applyMove(const QList<QPair<QString, QVariant> >& change
Applies the positioner's remove transition to the \a target item.\a changes is a list of
property,value pairs which will be changed on the target using the remove transition.
*/
-void QFxBasePositioner::applyRemove(const QList<QPair<QString, QVariant> >& changes, QFxItem* target)
+void QmlGraphicsBasePositioner::applyRemove(const QList<QPair<QString, QVariant> >& changes, QmlGraphicsItem* target)
{
- Q_D(QFxBasePositioner);
+ Q_D(QmlGraphicsBasePositioner);
applyTransition(changes,target, d->removeActions);
}
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Column,QFxColumn)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Column,QmlGraphicsColumn)
/*!
- \qmlclass Column
+ \qmlclass Column QFxColumn
\brief The Column item lines up its children vertically.
\inherits Item
@@ -472,20 +472,20 @@ Column {
*/
/*!
\internal
- \class QFxColumn
- \brief The QFxColumn class lines up items vertically.
+ \class QmlGraphicsColumn
+ \brief The QmlGraphicsColumn class lines up items vertically.
\ingroup group_positioners
*/
-QFxColumn::QFxColumn(QFxItem *parent)
-: QFxBasePositioner(Vertical, parent)
+QmlGraphicsColumn::QmlGraphicsColumn(QmlGraphicsItem *parent)
+: QmlGraphicsBasePositioner(Vertical, parent)
{
}
-void QFxColumn::doPositioning()
+void QmlGraphicsColumn::doPositioning()
{
int voffset = 0;
- foreach(QFxItem* item, *leavingItems()){
+ foreach(QmlGraphicsItem* item, *leavingItems()){
if (remove()){
QList<QPair<QString,QVariant> > changes;
applyRemove(changes, item);
@@ -494,7 +494,7 @@ void QFxColumn::doPositioning()
QList<QGraphicsItem *> children = childItems();
for (int ii = 0; ii < children.count(); ++ii) {
- QFxItem *child = qobject_cast<QFxItem *>(children.at(ii));
+ QmlGraphicsItem *child = qobject_cast<QmlGraphicsItem *>(children.at(ii));
if (!child || child->opacity() == 0.0)
continue;
@@ -517,9 +517,9 @@ void QFxColumn::doPositioning()
}
}
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Row,QFxRow)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Row,QmlGraphicsRow)
/*!
- \qmlclass Row
+ \qmlclass Row QFxRow
\brief The Row item lines up its children horizontally.
\inherits Item
@@ -629,20 +629,20 @@ Row {
*/
/*!
\internal
- \class QFxRow
- \brief The QFxRow class lines up items horizontally.
+ \class QmlGraphicsRow
+ \brief The QmlGraphicsRow class lines up items horizontally.
\ingroup group_positioners
*/
-QFxRow::QFxRow(QFxItem *parent)
-: QFxBasePositioner(Horizontal, parent)
+QmlGraphicsRow::QmlGraphicsRow(QmlGraphicsItem *parent)
+: QmlGraphicsBasePositioner(Horizontal, parent)
{
}
-void QFxRow::doPositioning()
+void QmlGraphicsRow::doPositioning()
{
int hoffset = 0;
- foreach(QFxItem* item, *leavingItems()){
+ foreach(QmlGraphicsItem* item, *leavingItems()){
if (remove()){
QList<QPair<QString,QVariant> > changes;
applyRemove(changes, item);
@@ -650,7 +650,7 @@ void QFxRow::doPositioning()
}
QList<QGraphicsItem *> children = childItems();
for (int ii = 0; ii < children.count(); ++ii) {
- QFxItem *child = qobject_cast<QFxItem *>(children.at(ii));
+ QmlGraphicsItem *child = qobject_cast<QmlGraphicsItem *>(children.at(ii));
if (!child || child->opacity() == 0.0)
continue;
@@ -675,10 +675,10 @@ void QFxRow::doPositioning()
}
}
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Grid,QFxGrid)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Grid,QmlGraphicsGrid)
/*!
- \qmlclass Grid QFxGrid
+ \qmlclass Grid QmlGraphicsGrid
\brief The Grid item positions its children in a grid.
\inherits Item
@@ -810,13 +810,13 @@ Grid {
*/
/*!
\internal
- \class QFxGrid
- \brief The QFxGrid class lays out items in a grid.
+ \class QmlGraphicsGrid
+ \brief The QmlGraphicsGrid class lays out items in a grid.
\ingroup group_layouts
*/
-QFxGrid::QFxGrid(QFxItem *parent) :
- QFxBasePositioner(Both, parent)
+QmlGraphicsGrid::QmlGraphicsGrid(QmlGraphicsItem *parent) :
+ QmlGraphicsBasePositioner(Both, parent)
{
_columns=-1;
_rows=-1;
@@ -840,7 +840,7 @@ QFxGrid::QFxGrid(QFxItem *parent) :
many rows some rows will be of zero width.
*/
-void QFxGrid::doPositioning()
+void QmlGraphicsGrid::doPositioning()
{
int c=_columns,r=_rows;//Actual number of rows/columns
int numVisible = items()->size() + newItems()->size();
@@ -866,7 +866,7 @@ void QFxGrid::doPositioning()
if (childIndex == children.count())
continue;
- QFxItem *child = qobject_cast<QFxItem *>(children.at(childIndex++));
+ QmlGraphicsItem *child = qobject_cast<QmlGraphicsItem *>(children.at(childIndex++));
if (!child || child->opacity() == 0.0)
continue;
if (child->width() > maxColWidth[j])
@@ -880,14 +880,14 @@ void QFxGrid::doPositioning()
int yoffset=0;
int curRow =0;
int curCol =0;
- foreach(QFxItem* item, *leavingItems()){
+ foreach(QmlGraphicsItem* item, *leavingItems()){
if (remove()){
QList<QPair<QString,QVariant> > changes;
applyRemove(changes, item);
}
}
foreach(QGraphicsItem* schild, children){
- QFxItem *child = qobject_cast<QFxItem *>(schild);
+ QmlGraphicsItem *child = qobject_cast<QmlGraphicsItem *>(schild);
if (!child || child->opacity() == 0.0)
continue;
bool needMove = (child->x()!=xoffset)||(child->y()!=yoffset);
diff --git a/src/declarative/fx/qfxpositioners.h b/src/declarative/graphicsitems/qmlgraphicspositioners_p.h
index d62da08..0011ec5 100644
--- a/src/declarative/fx/qfxpositioners.h
+++ b/src/declarative/graphicsitems/qmlgraphicspositioners_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,32 +21,31 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXLAYOUTS_H
-#define QFXLAYOUTS_H
+#ifndef QMLGRAPHICSLAYOUTS_H
+#define QMLGRAPHICSLAYOUTS_H
#include <QtCore/QObject>
#include <QtCore/QString>
-#include <QtDeclarative/qfxitem.h>
-#include <QtDeclarative/qmlstate.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
+#include <private/qmlstate_p.h>
QT_BEGIN_HEADER
@@ -53,9 +53,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxBasePositionerPrivate;
+class QmlGraphicsBasePositionerPrivate;
-class Q_DECLARATIVE_EXPORT QFxBasePositioner : public QFxItem
+class Q_DECLARATIVE_EXPORT QmlGraphicsBasePositioner : public QmlGraphicsItem
{
Q_OBJECT
@@ -65,7 +65,7 @@ class Q_DECLARATIVE_EXPORT QFxBasePositioner : public QFxItem
Q_PROPERTY(QmlTransition *remove READ remove WRITE setRemove)
public:
enum AutoUpdateType { None = 0x0, Horizontal = 0x1, Vertical = 0x2, Both = 0x3 };
- QFxBasePositioner(AutoUpdateType, QFxItem *parent);
+ QmlGraphicsBasePositioner(AutoUpdateType, QmlGraphicsItem *parent);
int spacing() const;
void setSpacing(int);
@@ -83,12 +83,12 @@ protected:
virtual void componentComplete();
virtual QVariant itemChange(GraphicsItemChange, const QVariant &);
virtual bool event(QEvent *);
- QSet<QFxItem *>* newItems();
- QSet<QFxItem *>* leavingItems();
- QSet<QFxItem *>* items();
- void applyAdd(const QList<QPair<QString, QVariant> >& changes, QFxItem* target);
- void applyMove(const QList<QPair<QString, QVariant> >& changes, QFxItem* target);
- void applyRemove(const QList<QPair<QString, QVariant> >& changes, QFxItem* target);
+ QSet<QmlGraphicsItem *>* newItems();
+ QSet<QmlGraphicsItem *>* leavingItems();
+ QSet<QmlGraphicsItem *>* items();
+ void applyAdd(const QList<QPair<QString, QVariant> >& changes, QmlGraphicsItem* target);
+ void applyMove(const QList<QPair<QString, QVariant> >& changes, QmlGraphicsItem* target);
+ void applyRemove(const QList<QPair<QString, QVariant> >& changes, QmlGraphicsItem* target);
void finishApplyTransitions();
Q_SIGNALS:
@@ -102,45 +102,45 @@ private Q_SLOTS:
void prePositioning();
protected:
- QFxBasePositioner(QFxBasePositionerPrivate &dd, AutoUpdateType at, QFxItem *parent);
- void setMovingItem(QFxItem *);
+ QmlGraphicsBasePositioner(QmlGraphicsBasePositionerPrivate &dd, AutoUpdateType at, QmlGraphicsItem *parent);
+ void setMovingItem(QmlGraphicsItem *);
private:
- void applyTransition(const QList<QPair<QString, QVariant> >& changes, QFxItem* target,
+ void applyTransition(const QList<QPair<QString, QVariant> >& changes, QmlGraphicsItem* target,
QmlStateOperation::ActionList &actions);
- Q_DISABLE_COPY(QFxBasePositioner)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxBasePositioner)
+ Q_DISABLE_COPY(QmlGraphicsBasePositioner)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsBasePositioner)
};
-class Q_DECLARATIVE_EXPORT QFxColumn : public QFxBasePositioner
+class Q_DECLARATIVE_EXPORT QmlGraphicsColumn : public QmlGraphicsBasePositioner
{
Q_OBJECT
public:
- QFxColumn(QFxItem *parent=0);
+ QmlGraphicsColumn(QmlGraphicsItem *parent=0);
protected Q_SLOTS:
virtual void doPositioning();
private:
- Q_DISABLE_COPY(QFxColumn)
+ Q_DISABLE_COPY(QmlGraphicsColumn)
};
-class Q_DECLARATIVE_EXPORT QFxRow: public QFxBasePositioner
+class Q_DECLARATIVE_EXPORT QmlGraphicsRow: public QmlGraphicsBasePositioner
{
Q_OBJECT
public:
- QFxRow(QFxItem *parent=0);
+ QmlGraphicsRow(QmlGraphicsItem *parent=0);
protected Q_SLOTS:
virtual void doPositioning();
private:
- Q_DISABLE_COPY(QFxRow)
+ Q_DISABLE_COPY(QmlGraphicsRow)
};
-class Q_DECLARATIVE_EXPORT QFxGrid : public QFxBasePositioner
+class Q_DECLARATIVE_EXPORT QmlGraphicsGrid : public QmlGraphicsBasePositioner
{
Q_OBJECT
Q_PROPERTY(int rows READ rows WRITE setRows)
Q_PROPERTY(int columns READ columns WRITE setcolumns)
public:
- QFxGrid(QFxItem *parent=0);
+ QmlGraphicsGrid(QmlGraphicsItem *parent=0);
int rows() const {return _rows;}
void setRows(const int rows){_rows = rows;}
@@ -153,14 +153,14 @@ protected Q_SLOTS:
private:
int _rows;
int _columns;
- Q_DISABLE_COPY(QFxGrid)
+ Q_DISABLE_COPY(QmlGraphicsGrid)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxColumn)
-QML_DECLARE_TYPE(QFxRow)
-QML_DECLARE_TYPE(QFxGrid)
+QML_DECLARE_TYPE(QmlGraphicsColumn)
+QML_DECLARE_TYPE(QmlGraphicsRow)
+QML_DECLARE_TYPE(QmlGraphicsGrid)
QT_END_HEADER
diff --git a/src/declarative/fx/qfxpositioners_p.h b/src/declarative/graphicsitems/qmlgraphicspositioners_p_p.h
index 8960952..61b4497 100644
--- a/src/declarative/fx/qfxpositioners_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicspositioners_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXLAYOUTS_P_H
-#define QFXLAYOUTS_P_H
+#ifndef QMLGRAPHICSLAYOUTS_P_H
+#define QMLGRAPHICSLAYOUTS_P_H
//
// W A R N I N G
@@ -53,28 +53,28 @@
// We mean it.
//
-#include <private/qfxitem_p.h>
+#include <private/qmlgraphicsitem_p.h>
#include <QtCore/QObject>
#include <QtCore/QString>
-#include <QtDeclarative/qfxpositioners.h>
-#include <QtDeclarative/qmlstate.h>
-#include <private/qmltransitionmanager_p.h>
-#include <QtDeclarative/qmlstateoperations.h>
+#include <private/qmlgraphicspositioners_p.h>
+#include <private/qmlstate_p.h>
+#include <private/qmltransitionmanager_p_p.h>
+#include <private/qmlstateoperations_p.h>
QT_BEGIN_NAMESPACE
-class QFxBasePositionerPrivate : public QFxItemPrivate
+class QmlGraphicsBasePositionerPrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxBasePositioner)
+ Q_DECLARE_PUBLIC(QmlGraphicsBasePositioner)
public:
- QFxBasePositionerPrivate()
+ QmlGraphicsBasePositionerPrivate()
: _ep(false), _componentComplete(false), _spacing(0),
- aut(QFxBasePositioner::None), moveTransition(0), addTransition(0),
+ aut(QmlGraphicsBasePositioner::None), moveTransition(0), addTransition(0),
removeTransition(0), _movingItem(0)
{
}
- void init(QFxBasePositioner::AutoUpdateType at)
+ void init(QmlGraphicsBasePositioner::AutoUpdateType at)
{
aut = at;
}
@@ -82,15 +82,15 @@ public:
bool _ep;
bool _componentComplete;
int _spacing;
- QFxBasePositioner::AutoUpdateType aut;
+ QmlGraphicsBasePositioner::AutoUpdateType aut;
QmlTransition *moveTransition;
QmlTransition *addTransition;
QmlTransition *removeTransition;
- QSet<QFxItem *> _items;
- QSet<QFxItem *> _leavingItems;
- QSet<QFxItem *> _stableItems;
- QSet<QFxItem *> _newItems;
- QSet<QFxItem *> _animated;
+ QSet<QmlGraphicsItem *> _items;
+ QSet<QmlGraphicsItem *> _leavingItems;
+ QSet<QmlGraphicsItem *> _stableItems;
+ QSet<QmlGraphicsItem *> _newItems;
+ QSet<QmlGraphicsItem *> _animated;
QmlStateOperation::ActionList addActions;
QmlStateOperation::ActionList moveActions;
QmlStateOperation::ActionList removeActions;
@@ -98,7 +98,7 @@ public:
QmlTransitionManager moveTransitionManager;
QmlTransitionManager removeTransitionManager;
// QmlStateGroup *stateGroup;
- QFxItem *_movingItem;
+ QmlGraphicsItem *_movingItem;
};
QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxrect.cpp b/src/declarative/graphicsitems/qmlgraphicsrect.cpp
index d4207a6..605e82c 100644
--- a/src/declarative/fx/qfxrect.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsrect.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,40 +21,39 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxrect.h"
-#include "qfxrect_p.h"
+#include "qmlgraphicsrect_p.h"
+#include "qmlgraphicsrect_p_p.h"
#include <QPainter>
#include <QtCore/qmath.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Pen,QFxPen)
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,GradientStop,QFxGradientStop)
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Gradient,QFxGradient)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Pen,QmlGraphicsPen)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,GradientStop,QmlGraphicsGradientStop)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Gradient,QmlGraphicsGradient)
/*!
\internal
- \class QFxPen
- \brief The QFxPen class provides a pen used for drawing rectangle borders on a QmlView.
+ \class QmlGraphicsPen
+ \brief The QmlGraphicsPen class provides a pen used for drawing rectangle borders on a QmlView.
By default, the pen is invalid and nothing is drawn. You must either set a color (then the default
width is 1) or a width (then the default color is black).
@@ -66,14 +66,14 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Gradient,QFxGradient)
\endqml
*/
-void QFxPen::setColor(const QColor &c)
+void QmlGraphicsPen::setColor(const QColor &c)
{
_color = c;
_valid = _color.alpha() ? true : false;
emit penChanged();
}
-void QFxPen::setWidth(int w)
+void QmlGraphicsPen::setWidth(int w)
{
if (_width == w && _valid)
return;
@@ -85,7 +85,7 @@ void QFxPen::setWidth(int w)
/*!
- \qmlclass GradientStop QFxGradientStop
+ \qmlclass GradientStop QmlGraphicsGradientStop
\brief The GradientStop item defines the color at a position in a Gradient
\sa Gradient
@@ -98,14 +98,14 @@ void QFxPen::setWidth(int w)
Sets a \e color at a \e position in a gradient.
*/
-void QFxGradientStop::updateGradient()
+void QmlGraphicsGradientStop::updateGradient()
{
- if (QFxGradient *grad = qobject_cast<QFxGradient*>(parent()))
+ if (QmlGraphicsGradient *grad = qobject_cast<QmlGraphicsGradient*>(parent()))
grad->doUpdate();
}
/*!
- \qmlclass Gradient QFxGradient
+ \qmlclass Gradient QmlGraphicsGradient
\brief The Gradient item defines a gradient fill.
A gradient is defined by two or more colors, which will be blended seemlessly. The
@@ -128,12 +128,12 @@ void QFxGradientStop::updateGradient()
This property holds the gradient stops describing the gradient.
*/
-const QGradient *QFxGradient::gradient() const
+const QGradient *QmlGraphicsGradient::gradient() const
{
if (!m_gradient && !m_stops.isEmpty()) {
m_gradient = new QLinearGradient(0,0,0,1.0);
for (int i = 0; i < m_stops.count(); ++i) {
- const QFxGradientStop *stop = m_stops.at(i);
+ const QmlGraphicsGradientStop *stop = m_stops.at(i);
m_gradient->setCoordinateMode(QGradient::ObjectBoundingMode);
m_gradient->setColorAt(stop->position(), stop->color());
}
@@ -142,17 +142,17 @@ const QGradient *QFxGradient::gradient() const
return m_gradient;
}
-void QFxGradient::doUpdate()
+void QmlGraphicsGradient::doUpdate()
{
delete m_gradient;
m_gradient = 0;
emit updated();
}
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rectangle,QFxRect)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rectangle,QmlGraphicsRect)
/*!
- \qmlclass Rectangle QFxRect
+ \qmlclass Rectangle QmlGraphicsRect
\brief The Rectangle item allows you to add rectangles to a scene.
\inherits Item
@@ -175,28 +175,28 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Rectangle,QFxRect)
/*!
\internal
- \class QFxRect
- \brief The QFxRect class provides a rectangle item that you can add to a QmlView.
+ \class QmlGraphicsRect
+ \brief The QmlGraphicsRect class provides a rectangle item that you can add to a QmlView.
*/
-QFxRect::QFxRect(QFxItem *parent)
- : QFxItem(*(new QFxRectPrivate), parent)
+QmlGraphicsRect::QmlGraphicsRect(QmlGraphicsItem *parent)
+ : QmlGraphicsItem(*(new QmlGraphicsRectPrivate), parent)
{
- Q_D(QFxRect);
+ Q_D(QmlGraphicsRect);
d->init();
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
-QFxRect::QFxRect(QFxRectPrivate &dd, QFxItem *parent)
- : QFxItem(dd, parent)
+QmlGraphicsRect::QmlGraphicsRect(QmlGraphicsRectPrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsItem(dd, parent)
{
- Q_D(QFxRect);
+ Q_D(QmlGraphicsRect);
d->init();
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
-void QFxRect::doUpdate()
+void QmlGraphicsRect::doUpdate()
{
- Q_D(QFxRect);
+ Q_D(QmlGraphicsRect);
d->rectImage = QPixmap();
const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
d->setPaintMargin((pw+1)/2);
@@ -214,9 +214,9 @@ void QFxRect::doUpdate()
To keep the border smooth (rather than blurry), odd widths cause the rectangle to be painted at
a half-pixel offset;
*/
-QFxPen *QFxRect::border()
+QmlGraphicsPen *QmlGraphicsRect::border()
{
- Q_D(QFxRect);
+ Q_D(QmlGraphicsRect);
return d->getPen();
}
@@ -254,15 +254,15 @@ QFxPen *QFxRect::border()
\sa Gradient, color
*/
-QFxGradient *QFxRect::gradient() const
+QmlGraphicsGradient *QmlGraphicsRect::gradient() const
{
- Q_D(const QFxRect);
+ Q_D(const QmlGraphicsRect);
return d->gradient;
}
-void QFxRect::setGradient(QFxGradient *gradient)
+void QmlGraphicsRect::setGradient(QmlGraphicsGradient *gradient)
{
- Q_D(QFxRect);
+ Q_D(QmlGraphicsRect);
if (d->gradient == gradient)
return;
if (d->gradient)
@@ -282,15 +282,15 @@ void QFxRect::setGradient(QFxGradient *gradient)
painted as a normal rectangle. The same radius is used by all 4 corners; there is currently
no way to specify different radii for different corners.
*/
-qreal QFxRect::radius() const
+qreal QmlGraphicsRect::radius() const
{
- Q_D(const QFxRect);
+ Q_D(const QmlGraphicsRect);
return d->radius;
}
-void QFxRect::setRadius(qreal radius)
+void QmlGraphicsRect::setRadius(qreal radius)
{
- Q_D(QFxRect);
+ Q_D(QmlGraphicsRect);
if (d->radius == radius)
return;
@@ -316,15 +316,15 @@ void QFxRect::setRadius(qreal radius)
If both a gradient and a color are specified, the gradient will be used.
*/
-QColor QFxRect::color() const
+QColor QmlGraphicsRect::color() const
{
- Q_D(const QFxRect);
+ Q_D(const QmlGraphicsRect);
return d->color;
}
-void QFxRect::setColor(const QColor &c)
+void QmlGraphicsRect::setColor(const QColor &c)
{
- Q_D(QFxRect);
+ Q_D(QmlGraphicsRect);
if (d->color == c)
return;
@@ -334,9 +334,9 @@ void QFxRect::setColor(const QColor &c)
emit colorChanged();
}
-void QFxRect::generateRoundedRect()
+void QmlGraphicsRect::generateRoundedRect()
{
- Q_D(QFxRect);
+ Q_D(QmlGraphicsRect);
if (d->rectImage.isNull()) {
const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
const int radius = qCeil(d->radius); //ensure odd numbered width/height so we get 1-pixel center
@@ -358,9 +358,9 @@ void QFxRect::generateRoundedRect()
}
}
-void QFxRect::generateBorderedRect()
+void QmlGraphicsRect::generateBorderedRect()
{
- Q_D(QFxRect);
+ Q_D(QmlGraphicsRect);
if (d->rectImage.isNull()) {
const int pw = d->pen && d->pen->isValid() ? d->pen->width() : 0;
d->rectImage = QPixmap(pw*2 + 3, pw*2 + 3);
@@ -382,9 +382,9 @@ void QFxRect::generateBorderedRect()
}
}
-void QFxRect::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+void QmlGraphicsRect::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
- Q_D(QFxRect);
+ Q_D(QmlGraphicsRect);
if (d->radius > 0 || (d->pen && d->pen->isValid())
|| (d->gradient && d->gradient->gradient()) ) {
drawRect(*p);
@@ -399,9 +399,9 @@ void QFxRect::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
}
}
-void QFxRect::drawRect(QPainter &p)
+void QmlGraphicsRect::drawRect(QPainter &p)
{
- Q_D(QFxRect);
+ Q_D(QmlGraphicsRect);
if (d->gradient && d->gradient->gradient()) {
// XXX This path is still slower than the image path
// Image path won't work for gradients though
@@ -466,9 +466,9 @@ void QFxRect::drawRect(QPainter &p)
\image rect-smooth.png
*/
-QRectF QFxRect::boundingRect() const
+QRectF QmlGraphicsRect::boundingRect() const
{
- Q_D(const QFxRect);
+ Q_D(const QmlGraphicsRect);
return QRectF(-d->paintmargin, -d->paintmargin, d->width+d->paintmargin*2, d->height+d->paintmargin*2);
}
diff --git a/src/declarative/fx/qfxrect.h b/src/declarative/graphicsitems/qmlgraphicsrect_p.h
index e5bb8d3..97334fd 100644
--- a/src/declarative/fx/qfxrect.h
+++ b/src/declarative/graphicsitems/qmlgraphicsrect_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,29 +21,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXRECT_H
-#define QFXRECT_H
+#ifndef QMLGRAPHICSRECT_H
+#define QMLGRAPHICSRECT_H
-#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
#include <QtGui/qbrush.h>
@@ -51,14 +51,14 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class Q_DECLARATIVE_EXPORT QFxPen : public QObject
+class Q_DECLARATIVE_EXPORT QmlGraphicsPen : public QObject
{
Q_OBJECT
Q_PROPERTY(int width READ width WRITE setWidth NOTIFY penChanged)
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY penChanged)
public:
- QFxPen(QObject *parent=0)
+ QmlGraphicsPen(QObject *parent=0)
: QObject(parent), _width(1), _color("#000000"), _valid(false)
{}
@@ -79,7 +79,7 @@ private:
bool _valid;
};
-class Q_DECLARATIVE_EXPORT QFxGradientStop : public QObject
+class Q_DECLARATIVE_EXPORT QmlGraphicsGradientStop : public QObject
{
Q_OBJECT
@@ -87,7 +87,7 @@ class Q_DECLARATIVE_EXPORT QFxGradientStop : public QObject
Q_PROPERTY(QColor color READ color WRITE setColor)
public:
- QFxGradientStop(QObject *parent=0) : QObject(parent) {}
+ QmlGraphicsGradientStop(QObject *parent=0) : QObject(parent) {}
qreal position() const { return m_position; }
void setPosition(qreal position) { m_position = position; updateGradient(); }
@@ -103,18 +103,18 @@ private:
QColor m_color;
};
-class Q_DECLARATIVE_EXPORT QFxGradient : public QObject
+class Q_DECLARATIVE_EXPORT QmlGraphicsGradient : public QObject
{
Q_OBJECT
- Q_PROPERTY(QList<QFxGradientStop *> *stops READ stops)
+ Q_PROPERTY(QList<QmlGraphicsGradientStop *> *stops READ stops)
Q_CLASSINFO("DefaultProperty", "stops")
public:
- QFxGradient(QObject *parent=0) : QObject(parent), m_gradient(0) {}
- ~QFxGradient() { delete m_gradient; }
+ QmlGraphicsGradient(QObject *parent=0) : QObject(parent), m_gradient(0) {}
+ ~QmlGraphicsGradient() { delete m_gradient; }
- QList<QFxGradientStop *> *stops() { return &m_stops; }
+ QList<QmlGraphicsGradientStop *> *stops() { return &m_stops; }
const QGradient *gradient() const;
@@ -125,30 +125,30 @@ private:
void doUpdate();
private:
- QList<QFxGradientStop *> m_stops;
+ QList<QmlGraphicsGradientStop *> m_stops;
mutable QGradient *m_gradient;
- friend class QFxGradientStop;
+ friend class QmlGraphicsGradientStop;
};
-class QFxRectPrivate;
-class Q_DECLARATIVE_EXPORT QFxRect : public QFxItem
+class QmlGraphicsRectPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsRect : public QmlGraphicsItem
{
Q_OBJECT
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
- Q_PROPERTY(QFxGradient *gradient READ gradient WRITE setGradient)
- Q_PROPERTY(QFxPen * border READ border CONSTANT)
+ Q_PROPERTY(QmlGraphicsGradient *gradient READ gradient WRITE setGradient)
+ Q_PROPERTY(QmlGraphicsPen * border READ border CONSTANT)
Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
public:
- QFxRect(QFxItem *parent=0);
+ QmlGraphicsRect(QmlGraphicsItem *parent=0);
QColor color() const;
void setColor(const QColor &);
- QFxPen *border();
+ QmlGraphicsPen *border();
- QFxGradient *gradient() const;
- void setGradient(QFxGradient *gradient);
+ QmlGraphicsGradient *gradient() const;
+ void setGradient(QmlGraphicsGradient *gradient);
qreal radius() const;
void setRadius(qreal radius);
@@ -170,20 +170,20 @@ private:
void drawRect(QPainter &painter);
protected:
- QFxRect(QFxRectPrivate &dd, QFxItem *parent);
+ QmlGraphicsRect(QmlGraphicsRectPrivate &dd, QmlGraphicsItem *parent);
private:
- Q_DISABLE_COPY(QFxRect)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxRect)
+ Q_DISABLE_COPY(QmlGraphicsRect)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsRect)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxPen)
-QML_DECLARE_TYPE(QFxGradientStop)
-QML_DECLARE_TYPE(QFxGradient)
-QML_DECLARE_TYPE(QFxRect)
+QML_DECLARE_TYPE(QmlGraphicsPen)
+QML_DECLARE_TYPE(QmlGraphicsGradientStop)
+QML_DECLARE_TYPE(QmlGraphicsGradient)
+QML_DECLARE_TYPE(QmlGraphicsRect)
QT_END_HEADER
-#endif // QFXRECT_H
+#endif // QMLGRAPHICSRECT_H
diff --git a/src/declarative/fx/qfxrect_p.h b/src/declarative/graphicsitems/qmlgraphicsrect_p_p.h
index c055b76..f44e8de 100644
--- a/src/declarative/fx/qfxrect_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsrect_p_p.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QFXRECT_P_H
-#define QFXRECT_P_H
+#ifndef QMLGRAPHICSRECT_P_H
+#define QMLGRAPHICSRECT_P_H
//
// W A R N I N G
@@ -53,23 +53,23 @@
// We mean it.
//
-#include "qfxitem_p.h"
+#include "qmlgraphicsitem_p.h"
QT_BEGIN_NAMESPACE
-class QFxGradient;
-class QFxRect;
-class QFxRectPrivate : public QFxItemPrivate
+class QmlGraphicsGradient;
+class QmlGraphicsRect;
+class QmlGraphicsRectPrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxRect)
+ Q_DECLARE_PUBLIC(QmlGraphicsRect)
public:
- QFxRectPrivate() :
+ QmlGraphicsRectPrivate() :
color(Qt::white), gradient(0), pen(0), radius(0), paintmargin(0)
{
}
- ~QFxRectPrivate()
+ ~QmlGraphicsRectPrivate()
{
delete pen;
}
@@ -80,23 +80,23 @@ public:
QColor getColor();
QColor color;
- QFxGradient *gradient;
- QFxPen *getPen() {
+ QmlGraphicsGradient *gradient;
+ QmlGraphicsPen *getPen() {
if (!pen) {
- Q_Q(QFxRect);
- pen = new QFxPen;
+ Q_Q(QmlGraphicsRect);
+ pen = new QmlGraphicsPen;
QObject::connect(pen, SIGNAL(penChanged()), q, SLOT(doUpdate()));
}
return pen;
}
- QFxPen *pen;
+ QmlGraphicsPen *pen;
qreal radius;
qreal paintmargin;
QPixmap rectImage;
void setPaintMargin(qreal margin)
{
- Q_Q(QFxRect);
+ Q_Q(QmlGraphicsRect);
if (margin == paintmargin)
return;
q->prepareGeometryChange();
@@ -106,4 +106,4 @@ public:
QT_END_NAMESPACE
-#endif // QFXRECT_P_H
+#endif // QMLGRAPHICSRECT_P_H
diff --git a/src/declarative/fx/qfxrepeater.cpp b/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp
index 94954e7..ba860e9 100644
--- a/src/declarative/fx/qfxrepeater.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsrepeater.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,46 +21,45 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxrepeater.h"
-#include "qfxrepeater_p.h"
-#include "qmllistaccessor.h"
-#include "qfxvisualitemmodel.h"
-#include <qlistmodelinterface.h>
+#include "qmlgraphicsrepeater_p.h"
+#include "qmlgraphicsrepeater_p_p.h"
+#include <private/qmllistaccessor_p.h>
+#include <private/qmlgraphicsvisualitemmodel_p.h>
+#include <private/qlistmodelinterface_p.h>
QT_BEGIN_NAMESPACE
-QFxRepeaterPrivate::QFxRepeaterPrivate()
+QmlGraphicsRepeaterPrivate::QmlGraphicsRepeaterPrivate()
: model(0), ownModel(false)
{
}
-QFxRepeaterPrivate::~QFxRepeaterPrivate()
+QmlGraphicsRepeaterPrivate::~QmlGraphicsRepeaterPrivate()
{
}
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Repeater,QFxRepeater)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Repeater,QmlGraphicsRepeater)
/*!
- \qmlclass Repeater
+ \qmlclass Repeater QFxRepeater
\inherits Item
\brief The Repeater item allows you to repeat a component based on a model.
@@ -103,7 +103,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Repeater,QFxRepeater)
/*!
\internal
- \class QFxRepeater
+ \class QmlGraphicsRepeater
\qmlclass Repeater
XXX Repeater is very conservative in how it instatiates/deletes items. Also
@@ -111,18 +111,18 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Repeater,QFxRepeater)
*/
/*!
- Create a new QFxRepeater instance.
+ Create a new QmlGraphicsRepeater instance.
*/
-QFxRepeater::QFxRepeater(QFxItem *parent)
- : QFxItem(*(new QFxRepeaterPrivate), parent)
+QmlGraphicsRepeater::QmlGraphicsRepeater(QmlGraphicsItem *parent)
+ : QmlGraphicsItem(*(new QmlGraphicsRepeaterPrivate), parent)
{
}
/*!
\internal
*/
-QFxRepeater::QFxRepeater(QFxRepeaterPrivate &dd, QFxItem *parent)
- : QFxItem(dd, parent)
+QmlGraphicsRepeater::QmlGraphicsRepeater(QmlGraphicsRepeaterPrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsItem(dd, parent)
{
}
@@ -130,7 +130,7 @@ QFxRepeater::QFxRepeater(QFxRepeaterPrivate &dd, QFxItem *parent)
Destroy the repeater instance. All items it instantiated are also
destroyed.
*/
-QFxRepeater::~QFxRepeater()
+QmlGraphicsRepeater::~QmlGraphicsRepeater()
{
}
@@ -154,29 +154,29 @@ QFxRepeater::~QFxRepeater()
\sa {qmlmodels}{Data Models}
*/
-QVariant QFxRepeater::model() const
+QVariant QmlGraphicsRepeater::model() const
{
- Q_D(const QFxRepeater);
+ Q_D(const QmlGraphicsRepeater);
return d->dataSource;
}
-void QFxRepeater::setModel(const QVariant &model)
+void QmlGraphicsRepeater::setModel(const QVariant &model)
{
- Q_D(QFxRepeater);
+ Q_D(QmlGraphicsRepeater);
clear();
if (d->model) {
disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int)));
disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
disconnect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
/*
- disconnect(d->model, SIGNAL(createdItem(int, QFxItem*)), this, SLOT(createdItem(int,QFxItem*)));
- disconnect(d->model, SIGNAL(destroyingItem(QFxItem*)), this, SLOT(destroyingItem(QFxItem*)));
+ disconnect(d->model, SIGNAL(createdItem(int, QmlGraphicsItem*)), this, SLOT(createdItem(int,QmlGraphicsItem*)));
+ disconnect(d->model, SIGNAL(destroyingItem(QmlGraphicsItem*)), this, SLOT(destroyingItem(QmlGraphicsItem*)));
*/
}
d->dataSource = model;
QObject *object = qvariant_cast<QObject*>(model);
- QFxVisualModel *vim = 0;
- if (object && (vim = qobject_cast<QFxVisualModel *>(object))) {
+ QmlGraphicsVisualModel *vim = 0;
+ if (object && (vim = qobject_cast<QmlGraphicsVisualModel *>(object))) {
if (d->ownModel) {
delete d->model;
d->ownModel = false;
@@ -184,10 +184,10 @@ void QFxRepeater::setModel(const QVariant &model)
d->model = vim;
} else {
if (!d->ownModel) {
- d->model = new QFxVisualDataModel(qmlContext(this));
+ d->model = new QmlGraphicsVisualDataModel(qmlContext(this));
d->ownModel = true;
}
- if (QFxVisualDataModel *dataModel = qobject_cast<QFxVisualDataModel*>(d->model))
+ if (QmlGraphicsVisualDataModel *dataModel = qobject_cast<QmlGraphicsVisualDataModel*>(d->model))
dataModel->setModel(model);
}
if (d->model) {
@@ -195,8 +195,8 @@ void QFxRepeater::setModel(const QVariant &model)
connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int)));
connect(d->model, SIGNAL(itemsMoved(int,int,int)), this, SLOT(itemsMoved(int,int,int)));
/*
- connect(d->model, SIGNAL(createdItem(int, QFxItem*)), this, SLOT(createdItem(int,QFxItem*)));
- connect(d->model, SIGNAL(destroyingItem(QFxItem*)), this, SLOT(destroyingItem(QFxItem*)));
+ connect(d->model, SIGNAL(createdItem(int, QmlGraphicsItem*)), this, SLOT(createdItem(int,QmlGraphicsItem*)));
+ connect(d->model, SIGNAL(destroyingItem(QmlGraphicsItem*)), this, SLOT(destroyingItem(QmlGraphicsItem*)));
*/
regenerate();
emit countChanged();
@@ -209,25 +209,25 @@ void QFxRepeater::setModel(const QVariant &model)
The delegate provides a template describing what each item instantiated by the repeater should look and act like.
*/
-QmlComponent *QFxRepeater::delegate() const
+QmlComponent *QmlGraphicsRepeater::delegate() const
{
- Q_D(const QFxRepeater);
+ Q_D(const QmlGraphicsRepeater);
if (d->model) {
- if (QFxVisualDataModel *dataModel = qobject_cast<QFxVisualDataModel*>(d->model))
+ if (QmlGraphicsVisualDataModel *dataModel = qobject_cast<QmlGraphicsVisualDataModel*>(d->model))
return dataModel->delegate();
}
return 0;
}
-void QFxRepeater::setDelegate(QmlComponent *delegate)
+void QmlGraphicsRepeater::setDelegate(QmlComponent *delegate)
{
- Q_D(QFxRepeater);
+ Q_D(QmlGraphicsRepeater);
if (!d->ownModel) {
- d->model = new QFxVisualDataModel(qmlContext(this));
+ d->model = new QmlGraphicsVisualDataModel(qmlContext(this));
d->ownModel = true;
}
- if (QFxVisualDataModel *dataModel = qobject_cast<QFxVisualDataModel*>(d->model)) {
+ if (QmlGraphicsVisualDataModel *dataModel = qobject_cast<QmlGraphicsVisualDataModel*>(d->model)) {
dataModel->setDelegate(delegate);
regenerate();
}
@@ -238,9 +238,9 @@ void QFxRepeater::setDelegate(QmlComponent *delegate)
This property holds the number of items in the repeater.
*/
-int QFxRepeater::count() const
+int QmlGraphicsRepeater::count() const
{
- Q_D(const QFxRepeater);
+ Q_D(const QmlGraphicsRepeater);
if (d->model)
return d->model->count();
return 0;
@@ -250,19 +250,19 @@ int QFxRepeater::count() const
/*!
\internal
*/
-void QFxRepeater::componentComplete()
+void QmlGraphicsRepeater::componentComplete()
{
- QFxItem::componentComplete();
+ QmlGraphicsItem::componentComplete();
regenerate();
}
/*!
\internal
*/
-QVariant QFxRepeater::itemChange(GraphicsItemChange change,
+QVariant QmlGraphicsRepeater::itemChange(GraphicsItemChange change,
const QVariant &value)
{
- QVariant rv = QFxItem::itemChange(change, value);
+ QVariant rv = QmlGraphicsItem::itemChange(change, value);
if (change == ItemParentHasChanged) {
regenerate();
}
@@ -270,11 +270,11 @@ QVariant QFxRepeater::itemChange(GraphicsItemChange change,
return rv;
}
-void QFxRepeater::clear()
+void QmlGraphicsRepeater::clear()
{
- Q_D(QFxRepeater);
+ Q_D(QmlGraphicsRepeater);
if (d->model) {
- foreach (QFxItem *item, d->deletables)
+ foreach (QmlGraphicsItem *item, d->deletables)
d->model->release(item);
}
d->deletables.clear();
@@ -283,9 +283,9 @@ void QFxRepeater::clear()
/*!
\internal
*/
-void QFxRepeater::regenerate()
+void QmlGraphicsRepeater::regenerate()
{
- Q_D(QFxRepeater);
+ Q_D(QmlGraphicsRepeater);
clear();
@@ -293,7 +293,7 @@ void QFxRepeater::regenerate()
return;
for (int ii = 0; ii < count(); ++ii) {
- QFxItem *item = d->model->item(ii);
+ QmlGraphicsItem *item = d->model->item(ii);
if (item) {
item->setParent(parentItem());
item->stackBefore(this);
@@ -302,17 +302,17 @@ void QFxRepeater::regenerate()
}
}
-void QFxRepeater::itemsInserted(int, int)
+void QmlGraphicsRepeater::itemsInserted(int, int)
{
regenerate();
}
-void QFxRepeater::itemsRemoved(int, int)
+void QmlGraphicsRepeater::itemsRemoved(int, int)
{
regenerate();
}
-void QFxRepeater::itemsMoved(int,int,int)
+void QmlGraphicsRepeater::itemsMoved(int,int,int)
{
regenerate();
}
diff --git a/src/declarative/fx/qfxrepeater.h b/src/declarative/graphicsitems/qmlgraphicsrepeater_p.h
index 7a0318b..8d71303 100644
--- a/src/declarative/fx/qfxrepeater.h
+++ b/src/declarative/graphicsitems/qmlgraphicsrepeater_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,29 +21,28 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXREPEATER_H
-#define QFXREPEATER_H
+#ifndef QMLGRAPHICSREPEATER_H
+#define QMLGRAPHICSREPEATER_H
-#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
QT_BEGIN_HEADER
@@ -50,8 +50,8 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxRepeaterPrivate;
-class Q_DECLARATIVE_EXPORT QFxRepeater : public QFxItem
+class QmlGraphicsRepeaterPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsRepeater : public QmlGraphicsItem
{
Q_OBJECT
@@ -61,8 +61,8 @@ class Q_DECLARATIVE_EXPORT QFxRepeater : public QFxItem
Q_CLASSINFO("DefaultProperty", "delegate")
public:
- QFxRepeater(QFxItem *parent=0);
- virtual ~QFxRepeater();
+ QmlGraphicsRepeater(QmlGraphicsItem *parent=0);
+ virtual ~QmlGraphicsRepeater();
QVariant model() const;
void setModel(const QVariant &);
@@ -82,7 +82,7 @@ private:
protected:
virtual void componentComplete();
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
- QFxRepeater(QFxRepeaterPrivate &dd, QFxItem *parent);
+ QmlGraphicsRepeater(QmlGraphicsRepeaterPrivate &dd, QmlGraphicsItem *parent);
private Q_SLOTS:
void itemsInserted(int,int);
@@ -90,14 +90,14 @@ private Q_SLOTS:
void itemsMoved(int,int,int);
private:
- Q_DISABLE_COPY(QFxRepeater)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxRepeater)
+ Q_DISABLE_COPY(QmlGraphicsRepeater)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsRepeater)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxRepeater)
+QML_DECLARE_TYPE(QmlGraphicsRepeater)
QT_END_HEADER
-#endif // QFXREPEATER_H
+#endif // QMLGRAPHICSREPEATER_H
diff --git a/src/declarative/fx/qfxrepeater_p.h b/src/declarative/graphicsitems/qmlgraphicsrepeater_p_p.h
index a4eb96d..4af0d9e 100644
--- a/src/declarative/fx/qfxrepeater_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsrepeater_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXREPEATER_P_H
-#define QFXREPEATER_P_H
+#ifndef QMLGRAPHICSREPEATER_P_H
+#define QMLGRAPHICSREPEATER_P_H
//
// W A R N I N G
@@ -53,29 +53,29 @@
// We mean it.
//
-#include "qfxitem_p.h"
-#include "qfxrepeater.h"
+#include "qmlgraphicsitem_p.h"
+#include "qmlgraphicsrepeater_p.h"
#include <QPointer>
QT_BEGIN_NAMESPACE
class QmlContext;
-class QFxVisualModel;
-class QFxRepeaterPrivate : public QFxItemPrivate
+class QmlGraphicsVisualModel;
+class QmlGraphicsRepeaterPrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxRepeater)
+ Q_DECLARE_PUBLIC(QmlGraphicsRepeater)
public:
- QFxRepeaterPrivate();
- ~QFxRepeaterPrivate();
+ QmlGraphicsRepeaterPrivate();
+ ~QmlGraphicsRepeaterPrivate();
- QFxVisualModel *model;
+ QmlGraphicsVisualModel *model;
QVariant dataSource;
bool ownModel;
- QList<QPointer<QFxItem> > deletables;
+ QList<QPointer<QmlGraphicsItem> > deletables;
};
QT_END_NAMESPACE
-#endif // QFXREPEATER_P_H
+#endif // QMLGRAPHICSREPEATER_P_H
diff --git a/src/declarative/fx/qfxscalegrid.cpp b/src/declarative/graphicsitems/qmlgraphicsscalegrid.cpp
index 4c6a522..7517a3c 100644
--- a/src/declarative/fx/qfxscalegrid.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsscalegrid.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,31 +42,31 @@
#include <QBuffer>
#include <qml.h>
#include <QDebug>
-#include "qfxscalegrid_p.h"
+#include "qmlgraphicsscalegrid_p_p.h"
QT_BEGIN_NAMESPACE
/*!
\internal
- \class QFxScaleGrid
- \brief The QFxScaleGrid class allows you to specify a 3x3 grid to use in scaling an image.
+ \class QmlGraphicsScaleGrid
+ \brief The QmlGraphicsScaleGrid class allows you to specify a 3x3 grid to use in scaling an image.
*/
-QML_DEFINE_NOCREATE_TYPE(QFxScaleGrid)
+QML_DEFINE_NOCREATE_TYPE(QmlGraphicsScaleGrid)
-QFxScaleGrid::QFxScaleGrid(QObject *parent) : QObject(parent), _left(0), _top(0), _right(0), _bottom(0)
+QmlGraphicsScaleGrid::QmlGraphicsScaleGrid(QObject *parent) : QObject(parent), _left(0), _top(0), _right(0), _bottom(0)
{
}
-QFxScaleGrid::~QFxScaleGrid()
+QmlGraphicsScaleGrid::~QmlGraphicsScaleGrid()
{
}
-bool QFxScaleGrid::isNull() const
+bool QmlGraphicsScaleGrid::isNull() const
{
return !_left && !_top && !_right && !_bottom;
}
-void QFxScaleGrid::setLeft(int pos)
+void QmlGraphicsScaleGrid::setLeft(int pos)
{
if (_left != pos) {
_left = pos;
@@ -74,7 +74,7 @@ void QFxScaleGrid::setLeft(int pos)
}
}
-void QFxScaleGrid::setTop(int pos)
+void QmlGraphicsScaleGrid::setTop(int pos)
{
if (_top != pos) {
_top = pos;
@@ -82,7 +82,7 @@ void QFxScaleGrid::setTop(int pos)
}
}
-void QFxScaleGrid::setRight(int pos)
+void QmlGraphicsScaleGrid::setRight(int pos)
{
if (_right != pos) {
_right = pos;
@@ -90,7 +90,7 @@ void QFxScaleGrid::setRight(int pos)
}
}
-void QFxScaleGrid::setBottom(int pos)
+void QmlGraphicsScaleGrid::setBottom(int pos)
{
if (_bottom != pos) {
_bottom = pos;
@@ -98,18 +98,18 @@ void QFxScaleGrid::setBottom(int pos)
}
}
-QFxGridScaledImage::QFxGridScaledImage()
+QmlGraphicsGridScaledImage::QmlGraphicsGridScaledImage()
: _l(-1), _r(-1), _t(-1), _b(-1),
- _h(QFxBorderImage::Stretch), _v(QFxBorderImage::Stretch)
+ _h(QmlGraphicsBorderImage::Stretch), _v(QmlGraphicsBorderImage::Stretch)
{
}
-QFxGridScaledImage::QFxGridScaledImage(const QFxGridScaledImage &o)
+QmlGraphicsGridScaledImage::QmlGraphicsGridScaledImage(const QmlGraphicsGridScaledImage &o)
: _l(o._l), _r(o._r), _t(o._t), _b(o._b), _h(o._h), _v(o._v), _pix(o._pix)
{
}
-QFxGridScaledImage &QFxGridScaledImage::operator=(const QFxGridScaledImage &o)
+QmlGraphicsGridScaledImage &QmlGraphicsGridScaledImage::operator=(const QmlGraphicsGridScaledImage &o)
{
_l = o._l;
_r = o._r;
@@ -121,8 +121,8 @@ QFxGridScaledImage &QFxGridScaledImage::operator=(const QFxGridScaledImage &o)
return *this;
}
-QFxGridScaledImage::QFxGridScaledImage(QIODevice *data)
-: _l(-1), _r(-1), _t(-1), _b(-1), _h(QFxBorderImage::Stretch), _v(QFxBorderImage::Stretch)
+QmlGraphicsGridScaledImage::QmlGraphicsGridScaledImage(QIODevice *data)
+: _l(-1), _r(-1), _t(-1), _b(-1), _h(QmlGraphicsBorderImage::Stretch), _v(QmlGraphicsBorderImage::Stretch)
{
int l = -1;
int r = -1;
@@ -166,45 +166,45 @@ QFxGridScaledImage::QFxGridScaledImage(QIODevice *data)
_pix = imgFile;
}
-QFxBorderImage::TileMode QFxGridScaledImage::stringToRule(const QString &s)
+QmlGraphicsBorderImage::TileMode QmlGraphicsGridScaledImage::stringToRule(const QString &s)
{
if (s == QLatin1String("Stretch"))
- return QFxBorderImage::Stretch;
+ return QmlGraphicsBorderImage::Stretch;
if (s == QLatin1String("Repeat"))
- return QFxBorderImage::Repeat;
+ return QmlGraphicsBorderImage::Repeat;
if (s == QLatin1String("Round"))
- return QFxBorderImage::Round;
+ return QmlGraphicsBorderImage::Round;
qWarning() << "Unknown tile rule specified. Using Stretch";
- return QFxBorderImage::Stretch;
+ return QmlGraphicsBorderImage::Stretch;
}
-bool QFxGridScaledImage::isValid() const
+bool QmlGraphicsGridScaledImage::isValid() const
{
return _l >= 0;
}
-int QFxGridScaledImage::gridLeft() const
+int QmlGraphicsGridScaledImage::gridLeft() const
{
return _l;
}
-int QFxGridScaledImage::gridRight() const
+int QmlGraphicsGridScaledImage::gridRight() const
{
return _r;
}
-int QFxGridScaledImage::gridTop() const
+int QmlGraphicsGridScaledImage::gridTop() const
{
return _t;
}
-int QFxGridScaledImage::gridBottom() const
+int QmlGraphicsGridScaledImage::gridBottom() const
{
return _b;
}
-QString QFxGridScaledImage::pixmapUrl() const
+QString QmlGraphicsGridScaledImage::pixmapUrl() const
{
return _pix;
}
diff --git a/src/declarative/fx/qfxscalegrid_p.h b/src/declarative/graphicsitems/qmlgraphicsscalegrid_p_p.h
index bae1436..b66a5a5 100644
--- a/src/declarative/fx/qfxscalegrid_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsscalegrid_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,34 +21,32 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXSCALEGRID_H
-#define QFXSCALEGRID_H
+#ifndef QMLGRAPHICSSCALEGRID_H
+#define QMLGRAPHICSSCALEGRID_H
#include <QtCore/QString>
#include <QtCore/QObject>
-#include <QtDeclarative/qfxglobal.h>
-#include <QtDeclarative/qfxpixmapcache.h>
+#include <private/qmlgraphicspixmapcache_p.h>
#include <QtDeclarative/qml.h>
-#include "qfxborderimage.h"
+#include "qmlgraphicsborderimage_p.h"
QT_BEGIN_HEADER
@@ -56,7 +55,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class Q_DECLARATIVE_EXPORT QFxScaleGrid : public QObject
+class Q_DECLARATIVE_EXPORT QmlGraphicsScaleGrid : public QObject
{
Q_OBJECT
Q_ENUMS(TileRule)
@@ -67,8 +66,8 @@ class Q_DECLARATIVE_EXPORT QFxScaleGrid : public QObject
Q_PROPERTY(int bottom READ bottom WRITE setBottom NOTIFY borderChanged)
public:
- QFxScaleGrid(QObject *parent=0);
- ~QFxScaleGrid();
+ QmlGraphicsScaleGrid(QObject *parent=0);
+ ~QmlGraphicsScaleGrid();
bool isNull() const;
@@ -94,40 +93,40 @@ private:
int _bottom;
};
-class Q_DECLARATIVE_EXPORT QFxGridScaledImage
+class Q_DECLARATIVE_EXPORT QmlGraphicsGridScaledImage
{
public:
- QFxGridScaledImage();
- QFxGridScaledImage(const QFxGridScaledImage &);
- QFxGridScaledImage(QIODevice*);
- QFxGridScaledImage &operator=(const QFxGridScaledImage &);
+ QmlGraphicsGridScaledImage();
+ QmlGraphicsGridScaledImage(const QmlGraphicsGridScaledImage &);
+ QmlGraphicsGridScaledImage(QIODevice*);
+ QmlGraphicsGridScaledImage &operator=(const QmlGraphicsGridScaledImage &);
bool isValid() const;
int gridLeft() const;
int gridRight() const;
int gridTop() const;
int gridBottom() const;
- QFxBorderImage::TileMode horizontalTileRule() const { return _h; }
- QFxBorderImage::TileMode verticalTileRule() const { return _v; }
+ QmlGraphicsBorderImage::TileMode horizontalTileRule() const { return _h; }
+ QmlGraphicsBorderImage::TileMode verticalTileRule() const { return _v; }
QString pixmapUrl() const;
private:
- static QFxBorderImage::TileMode stringToRule(const QString &);
+ static QmlGraphicsBorderImage::TileMode stringToRule(const QString &);
private:
int _l;
int _r;
int _t;
int _b;
- QFxBorderImage::TileMode _h;
- QFxBorderImage::TileMode _v;
+ QmlGraphicsBorderImage::TileMode _h;
+ QmlGraphicsBorderImage::TileMode _v;
QString _pix;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxScaleGrid)
+QML_DECLARE_TYPE(QmlGraphicsScaleGrid)
QT_END_HEADER
-#endif // QFXSCALEGRID_H
+#endif // QMLGRAPHICSSCALEGRID_H
diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/graphicsitems/qmlgraphicstext.cpp
index 4a01cbd..6790923 100644
--- a/src/declarative/fx/qfxtext.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicstext.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,30 +21,29 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxtext.h"
-#include "qfxtext_p.h"
+#include "qmlgraphicstext_p.h"
+#include "qmlgraphicstext_p_p.h"
#include <private/qtextcontrol_p.h>
-#include <private/qfxperf_p.h>
+#include <private/qfxperf_p_p.h>
#include <QTextLayout>
#include <QTextLine>
#include <QTextDocument>
@@ -52,10 +52,10 @@
#include <QPainter>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Text,QFxText)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Text,QmlGraphicsText)
/*!
- \qmlclass Text QFxText
+ \qmlclass Text QmlGraphicsText
\brief The Text item allows you to add formatted text to a scene.
\inherits Item
@@ -80,11 +80,11 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Text,QFxText)
/*!
\internal
- \class QFxText
+ \class QmlGraphicsText
\qmlclass Text
\ingroup group_coreitems
- \brief The QFxText class provides a formatted text item that you can add to a QmlView.
+ \brief The QmlGraphicsText class provides a formatted text item that you can add to a QmlView.
Text was designed for read-only text; it does not allow for any text editing.
It can display both plain and rich text. For example:
@@ -102,23 +102,23 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Text,QFxText)
The \c elide property can alternatively be used to fit a line of plain text to a set width.
- A QFxText object can be instantiated in Qml using the tag \c Text.
+ A QmlGraphicsText object can be instantiated in Qml using the tag \c Text.
*/
-QFxText::QFxText(QFxItem *parent)
- : QFxItem(*(new QFxTextPrivate), parent)
+QmlGraphicsText::QmlGraphicsText(QmlGraphicsItem *parent)
+ : QmlGraphicsItem(*(new QmlGraphicsTextPrivate), parent)
{
setAcceptedMouseButtons(Qt::LeftButton);
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
-QFxText::QFxText(QFxTextPrivate &dd, QFxItem *parent)
- : QFxItem(dd, parent)
+QmlGraphicsText::QmlGraphicsText(QmlGraphicsTextPrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsItem(dd, parent)
{
setAcceptedMouseButtons(Qt::LeftButton);
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
-QFxText::~QFxText()
+QmlGraphicsText::~QmlGraphicsText()
{
}
@@ -132,15 +132,15 @@ QFxText::~QFxText()
Set the Text's font attributes.
*/
-QFont QFxText::font() const
+QFont QmlGraphicsText::font() const
{
- Q_D(const QFxText);
+ Q_D(const QmlGraphicsText);
return d->font;
}
-void QFxText::setFont(const QFont &font)
+void QmlGraphicsText::setFont(const QFont &font)
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
d->font = font;
d->imgDirty = true;
@@ -148,12 +148,12 @@ void QFxText::setFont(const QFont &font)
update();
}
-void QFxText::setText(const QString &n)
+void QmlGraphicsText::setText(const QString &n)
{
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::QFxText_setText> st;
+ QmlPerfTimer<QmlPerf::QmlGraphicsText_setText> st;
#endif
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
if (d->text == n)
return;
@@ -184,15 +184,15 @@ void QFxText::setText(const QString &n)
The item will try to automatically determine whether the text should
be treated as rich text. This determination is made using Qt::mightBeRichText().
*/
-QString QFxText::text() const
+QString QmlGraphicsText::text() const
{
- Q_D(const QFxText);
+ Q_D(const QmlGraphicsText);
return d->text;
}
-void QFxText::setColor(const QColor &color)
+void QmlGraphicsText::setColor(const QColor &color)
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
if (d->color == color)
return;
@@ -215,9 +215,9 @@ void QFxText::setColor(const QColor &color)
\endqml
*/
-QColor QFxText::color() const
+QColor QmlGraphicsText::color() const
{
- Q_D(const QFxText);
+ Q_D(const QmlGraphicsText);
return d->color;
}
@@ -239,15 +239,15 @@ QColor QFxText::color() const
\image declarative-textstyle.png
*/
-QFxText::TextStyle QFxText::style() const
+QmlGraphicsText::TextStyle QmlGraphicsText::style() const
{
- Q_D(const QFxText);
+ Q_D(const QmlGraphicsText);
return d->style;
}
-void QFxText::setStyle(QFxText::TextStyle style)
+void QmlGraphicsText::setStyle(QmlGraphicsText::TextStyle style)
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
if (d->style == style)
return;
@@ -256,9 +256,9 @@ void QFxText::setStyle(QFxText::TextStyle style)
update();
}
-void QFxText::setStyleColor(const QColor &color)
+void QmlGraphicsText::setStyleColor(const QColor &color)
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
if (d->styleColor == color)
return;
@@ -276,9 +276,9 @@ void QFxText::setStyleColor(const QColor &color)
shadow color for raised or sunken text. If no style has been set, it is not
used at all.
*/
-QColor QFxText::styleColor() const
+QColor QmlGraphicsText::styleColor() const
{
- Q_D(const QFxText);
+ Q_D(const QmlGraphicsText);
return d->styleColor;
}
@@ -293,27 +293,27 @@ QColor QFxText::styleColor() const
\c AlignHCenter. The valid values for \c verticalAlignment are \c AlignTop, \c AlignBottom
and \c AlignVCenter.
*/
-QFxText::HAlignment QFxText::hAlign() const
+QmlGraphicsText::HAlignment QmlGraphicsText::hAlign() const
{
- Q_D(const QFxText);
+ Q_D(const QmlGraphicsText);
return d->hAlign;
}
-void QFxText::setHAlign(HAlignment align)
+void QmlGraphicsText::setHAlign(HAlignment align)
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
d->hAlign = align;
}
-QFxText::VAlignment QFxText::vAlign() const
+QmlGraphicsText::VAlignment QmlGraphicsText::vAlign() const
{
- Q_D(const QFxText);
+ Q_D(const QmlGraphicsText);
return d->vAlign;
}
-void QFxText::setVAlign(VAlignment align)
+void QmlGraphicsText::setVAlign(VAlignment align)
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
d->vAlign = align;
}
@@ -330,15 +330,15 @@ void QFxText::setVAlign(VAlignment align)
Wrapping is off by default.
*/
//### Future may provide choice of wrap modes, such as QTextOption::WrapAtWordBoundaryOrAnywhere
-bool QFxText::wrap() const
+bool QmlGraphicsText::wrap() const
{
- Q_D(const QFxText);
+ Q_D(const QmlGraphicsText);
return d->wrap;
}
-void QFxText::setWrap(bool w)
+void QmlGraphicsText::setWrap(bool w)
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
if (w == d->wrap)
return;
@@ -384,15 +384,15 @@ Column {
\endtable
*/
-QFxText::TextFormat QFxText::textFormat() const
+QmlGraphicsText::TextFormat QmlGraphicsText::textFormat() const
{
- Q_D(const QFxText);
+ Q_D(const QmlGraphicsText);
return d->format;
}
-void QFxText::setTextFormat(TextFormat format)
+void QmlGraphicsText::setTextFormat(TextFormat format)
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
if (format == d->format)
return;
bool wasRich = d->richText;
@@ -435,15 +435,15 @@ void QFxText::setTextFormat(TextFormat format)
Multi-length strings are ordered from longest to shortest, separated by the
Unicode "String Terminator" character \c U009C (write this in QML with \c{"\\x9C"}).
*/
-QFxText::TextElideMode QFxText::elideMode() const
+QmlGraphicsText::TextElideMode QmlGraphicsText::elideMode() const
{
- Q_D(const QFxText);
+ Q_D(const QmlGraphicsText);
return d->elideMode;
}
-void QFxText::setElideMode(QFxText::TextElideMode mode)
+void QmlGraphicsText::setElideMode(QmlGraphicsText::TextElideMode mode)
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
if (mode == d->elideMode)
return;
@@ -453,22 +453,22 @@ void QFxText::setElideMode(QFxText::TextElideMode mode)
d->updateSize();
}
-void QFxText::geometryChanged(const QRectF &newGeometry,
+void QmlGraphicsText::geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry)
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
if (newGeometry.width() != oldGeometry.width()) {
- if (d->wrap || d->elideMode != QFxText::ElideNone) {
+ if (d->wrap || d->elideMode != QmlGraphicsText::ElideNone) {
d->imgDirty = true;
d->updateSize();
}
}
- QFxItem::geometryChanged(newGeometry, oldGeometry);
+ QmlGraphicsItem::geometryChanged(newGeometry, oldGeometry);
}
-void QFxTextPrivate::updateSize()
+void QmlGraphicsTextPrivate::updateSize()
{
- Q_Q(QFxText);
+ Q_Q(QmlGraphicsText);
if (q->isComponentComplete()) {
QFontMetrics fm(font);
if (text.isEmpty()) {
@@ -486,7 +486,7 @@ void QFxTextPrivate::updateSize()
tmp = text;
tmp.replace(QLatin1Char('\n'), QChar::LineSeparator);
singleline = !tmp.contains(QChar::LineSeparator);
- if (singleline && elideMode != QFxText::ElideNone && q->widthValid())
+ if (singleline && elideMode != QmlGraphicsText::ElideNone && q->widthValid())
tmp = fm.elidedText(tmp,(Qt::TextElideMode)elideMode,q->width()); // XXX still worth layout...?
layout.clearLayout();
layout.setFont(font);
@@ -514,9 +514,9 @@ void QFxTextPrivate::updateSize()
int yoff = 0;
if (q->heightValid()) {
- if (vAlign == QFxText::AlignBottom)
+ if (vAlign == QmlGraphicsText::AlignBottom)
yoff = dy;
- else if (vAlign == QFxText::AlignVCenter)
+ else if (vAlign == QmlGraphicsText::AlignVCenter)
yoff = dy/2;
}
q->setBaselineOffset(fm.ascent() + yoff);
@@ -532,7 +532,7 @@ void QFxTextPrivate::updateSize()
// ### text layout handling should be profiled and optimized as needed
// what about QStackTextEngine engine(tmp, d->font.font()); QTextLayout textLayout(&engine);
-void QFxTextPrivate::drawOutline()
+void QmlGraphicsTextPrivate::drawOutline()
{
QPixmap img = QPixmap(imgCache.size());
img.fill(Qt::transparent);
@@ -556,7 +556,7 @@ void QFxTextPrivate::drawOutline()
imgCache = img;
}
-void QFxTextPrivate::drawOutline(int yOffset)
+void QmlGraphicsTextPrivate::drawOutline(int yOffset)
{
QPixmap img = QPixmap(imgCache.size());
img.fill(Qt::transparent);
@@ -574,9 +574,9 @@ void QFxTextPrivate::drawOutline(int yOffset)
imgCache = img;
}
-QSize QFxTextPrivate::setupTextLayout(QTextLayout *layout)
+QSize QmlGraphicsTextPrivate::setupTextLayout(QTextLayout *layout)
{
- Q_Q(QFxText);
+ Q_Q(QmlGraphicsText);
layout->setCacheEnabled(true);
QFontMetrics fm = QFontMetrics(font);
@@ -586,7 +586,7 @@ QSize QFxTextPrivate::setupTextLayout(QTextLayout *layout)
qreal lineWidth = 0;
//set manual width
- if ((wrap || elideMode != QFxText::ElideNone) && q->widthValid())
+ if ((wrap || elideMode != QmlGraphicsText::ElideNone) && q->widthValid())
lineWidth = q->width();
layout->beginLayout();
@@ -596,7 +596,7 @@ QSize QFxTextPrivate::setupTextLayout(QTextLayout *layout)
if (!line.isValid())
break;
- if ((wrap || elideMode != QFxText::ElideNone) && q->widthValid())
+ if ((wrap || elideMode != QmlGraphicsText::ElideNone) && q->widthValid())
line.setLineWidth(lineWidth);
}
layout->endLayout();
@@ -610,7 +610,7 @@ QSize QFxTextPrivate::setupTextLayout(QTextLayout *layout)
return QSize((int)widthUsed, height);
}
-QPixmap QFxTextPrivate::wrappedTextImage(bool drawStyle)
+QPixmap QmlGraphicsTextPrivate::wrappedTextImage(bool drawStyle)
{
//do layout
QSize size = cachedLayoutSize;
@@ -618,11 +618,11 @@ QPixmap QFxTextPrivate::wrappedTextImage(bool drawStyle)
int x = 0;
for (int i = 0; i < layout.lineCount(); ++i) {
QTextLine line = layout.lineAt(i);
- if (hAlign == QFxText::AlignLeft) {
+ if (hAlign == QmlGraphicsText::AlignLeft) {
x = 0;
- } else if (hAlign == QFxText::AlignRight) {
+ } else if (hAlign == QmlGraphicsText::AlignRight) {
x = size.width() - (int)line.naturalTextWidth();
- } else if (hAlign == QFxText::AlignHCenter) {
+ } else if (hAlign == QmlGraphicsText::AlignHCenter) {
x = (size.width() - (int)line.naturalTextWidth()) / 2;
}
line.setPosition(QPoint(x, (int)line.y()));
@@ -644,7 +644,7 @@ QPixmap QFxTextPrivate::wrappedTextImage(bool drawStyle)
return img;
}
-QPixmap QFxTextPrivate::richTextImage(bool drawStyle)
+QPixmap QmlGraphicsTextPrivate::richTextImage(bool drawStyle)
{
QSize size = doc->size().toSize();
@@ -671,7 +671,7 @@ QPixmap QFxTextPrivate::richTextImage(bool drawStyle)
return img;
}
-void QFxTextPrivate::checkImgCache()
+void QmlGraphicsTextPrivate::checkImgCache()
{
if (!imgDirty)
return;
@@ -682,22 +682,22 @@ void QFxTextPrivate::checkImgCache()
imgStyleCache = QPixmap();
} else if (richText) {
imgCache = richTextImage(false);
- if (style != QFxText::Normal)
+ if (style != QmlGraphicsText::Normal)
imgStyleCache = richTextImage(true); //### should use styleColor
} else {
imgCache = wrappedTextImage(false);
- if (style != QFxText::Normal)
+ if (style != QmlGraphicsText::Normal)
imgStyleCache = wrappedTextImage(true); //### should use styleColor
}
if (!empty)
switch (style) {
- case QFxText::Outline:
+ case QmlGraphicsText::Outline:
drawOutline();
break;
- case QFxText::Sunken:
+ case QmlGraphicsText::Sunken:
drawOutline(-1);
break;
- case QFxText::Raised:
+ case QmlGraphicsText::Raised:
drawOutline(1);
break;
default:
@@ -707,9 +707,9 @@ void QFxTextPrivate::checkImgCache()
imgDirty = false;
}
-void QFxText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
+void QmlGraphicsText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
d->checkImgCache();
if (d->imgCache.isNull())
return;
@@ -779,13 +779,13 @@ void QFxText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
filtering at the beginning of the animation and reenable it at the conclusion.
*/
-void QFxText::componentComplete()
+void QmlGraphicsText::componentComplete()
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::TextComponentComplete> cc;
+ QmlPerfTimer<QmlPerf::TextComponentComplete> cc;
#endif
- QFxItem::componentComplete();
+ QmlGraphicsItem::componentComplete();
if (d->dirty) {
d->updateSize();
d->dirty = false;
@@ -796,9 +796,9 @@ void QFxText::componentComplete()
\overload
Handles the given mouse \a event.
*/
-void QFxText::mousePressEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsText::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
if (!d->richText || !d->doc || d->control->anchorAt(event->pos()).isEmpty()) {
event->setAccepted(false);
@@ -810,7 +810,7 @@ void QFxText::mousePressEvent(QGraphicsSceneMouseEvent *event)
// ### may malfunction if two of the same links are clicked & dragged onto each other)
if (!event->isAccepted())
- QFxItem::mousePressEvent(event);
+ QmlGraphicsItem::mousePressEvent(event);
}
@@ -824,9 +824,9 @@ void QFxText::mousePressEvent(QGraphicsSceneMouseEvent *event)
\overload
Handles the given mouse \a event.
*/
-void QFxText::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsText::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxText);
+ Q_D(QmlGraphicsText);
// ### confirm the link, and send a signal out
if (d->richText && d->doc && d->activeLink == d->control->anchorAt(event->pos()))
@@ -835,6 +835,6 @@ void QFxText::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
event->setAccepted(false);
if (!event->isAccepted())
- QFxItem::mouseReleaseEvent(event);
+ QmlGraphicsItem::mouseReleaseEvent(event);
}
QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxtext.h b/src/declarative/graphicsitems/qmlgraphicstext_p.h
index cdb8025..ac1ded0 100644
--- a/src/declarative/fx/qfxtext.h
+++ b/src/declarative/graphicsitems/qmlgraphicstext_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,37 +21,36 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXTEXT_H
-#define QFXTEXT_H
+#ifndef QMLGRAPHICSTEXT_H
+#define QMLGRAPHICSTEXT_H
-#include <QtDeclarative/qfxitem.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxTextPrivate;
-class Q_DECLARATIVE_EXPORT QFxText : public QFxItem
+class QmlGraphicsTextPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsText : public QmlGraphicsItem
{
Q_OBJECT
Q_ENUMS(HAlignment)
@@ -71,8 +71,8 @@ class Q_DECLARATIVE_EXPORT QFxText : public QFxItem
Q_PROPERTY(TextElideMode elide READ elideMode WRITE setElideMode) //### elideMode?
public:
- QFxText(QFxItem *parent=0);
- ~QFxText();
+ QmlGraphicsText(QmlGraphicsItem *parent=0);
+ ~QmlGraphicsText();
enum HAlignment { AlignLeft = Qt::AlignLeft,
AlignRight = Qt::AlignRight,
@@ -131,20 +131,20 @@ Q_SIGNALS:
void linkActivated(const QString &link);
protected:
- QFxText(QFxTextPrivate &dd, QFxItem *parent);
+ QmlGraphicsText(QmlGraphicsTextPrivate &dd, QmlGraphicsItem *parent);
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
virtual void geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry);
private:
- Q_DISABLE_COPY(QFxText)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxText)
+ Q_DISABLE_COPY(QmlGraphicsText)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsText)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxText)
+QML_DECLARE_TYPE(QmlGraphicsText)
QT_END_HEADER
diff --git a/src/declarative/fx/qfxtext_p.h b/src/declarative/graphicsitems/qmlgraphicstext_p_p.h
index a10cdfa..4ca1ad4 100644
--- a/src/declarative/fx/qfxtext_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicstext_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXTEXT_P_H
-#define QFXTEXT_P_H
+#ifndef QMLGRAPHICSTEXT_P_H
+#define QMLGRAPHICSTEXT_P_H
//
// W A R N I N G
@@ -53,8 +53,8 @@
// We mean it.
//
-#include "qfxitem.h"
-#include "qfxitem_p.h"
+#include "qmlgraphicsitem.h"
+#include "qmlgraphicsitem_p.h"
#include "qml.h"
#include <QtGui/qtextlayout.h>
@@ -64,15 +64,15 @@ class QTextLayout;
class QTextDocument;
class QTextControl;
-class QFxTextPrivate : public QFxItemPrivate
+class QmlGraphicsTextPrivate : public QmlGraphicsItemPrivate
{
- Q_DECLARE_PUBLIC(QFxText)
+ Q_DECLARE_PUBLIC(QmlGraphicsText)
public:
- QFxTextPrivate()
- : color((QRgb)0), style(QFxText::Normal), imgDirty(true),
- hAlign(QFxText::AlignLeft), vAlign(QFxText::AlignTop), elideMode(QFxText::ElideNone),
+ QmlGraphicsTextPrivate()
+ : color((QRgb)0), style(QmlGraphicsText::Normal), imgDirty(true),
+ hAlign(QmlGraphicsText::AlignLeft), vAlign(QmlGraphicsText::AlignTop), elideMode(QmlGraphicsText::ElideNone),
dirty(true), wrap(false), richText(false), singleline(false), control(0), doc(0),
- format(QFxText::AutoText)
+ format(QmlGraphicsText::AutoText)
{
}
@@ -89,15 +89,15 @@ public:
QString text;
QFont font;
QColor color;
- QFxText::TextStyle style;
+ QmlGraphicsText::TextStyle style;
QColor styleColor;
QString activeLink;
bool imgDirty;
QPixmap imgCache;
QPixmap imgStyleCache;
- QFxText::HAlignment hAlign;
- QFxText::VAlignment vAlign;
- QFxText::TextElideMode elideMode;
+ QmlGraphicsText::HAlignment hAlign;
+ QmlGraphicsText::VAlignment vAlign;
+ QmlGraphicsText::TextElideMode elideMode;
bool dirty;
bool wrap;
bool richText;
@@ -106,7 +106,7 @@ public:
QTextDocument *doc;
QTextLayout layout;
QSize cachedLayoutSize;
- QFxText::TextFormat format;
+ QmlGraphicsText::TextFormat format;
};
QT_END_NAMESPACE
diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp
index ccb8f7e..0c81dca 100644
--- a/src/declarative/fx/qfxtextedit.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicstextedit.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,30 +21,29 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <qfxtextedit.h>
-#include "qfxtextedit_p.h"
+#include "qmlgraphicstextedit_p.h"
+#include "qmlgraphicstextedit_p_p.h"
#include <private/qtextcontrol_p.h>
-#include <private/qfxperf_p.h>
-#include "qfxevents_p.h"
+#include <private/qfxperf_p_p.h>
+#include <private/qmlgraphicsevents_p_p.h>
#include <QTextLayout>
#include <QTextLine>
#include <QTextDocument>
@@ -53,10 +53,10 @@
#include <QPainter>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,TextEdit,QFxTextEdit)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,TextEdit,QmlGraphicsTextEdit)
/*!
- \qmlclass TextEdit
+ \qmlclass TextEdit QFxTextEdit
\brief The TextEdit item allows you to add editable formatted text to a scene.
It can display both plain and rich text. For example:
@@ -80,42 +80,42 @@ TextEdit {
/*!
\internal
- \class QFxTextEdit
+ \class QmlGraphicsTextEdit
\qmlclass TextEdit
\ingroup group_coreitems
- \brief The QFxTextEdit class provides an editable formatted text item that you can add to a QmlView.
+ \brief The QmlGraphicsTextEdit class provides an editable formatted text item that you can add to a QmlView.
It can display both plain and rich text.
\image declarative-textedit.png
- A QFxTextEdit object can be instantiated in Qml using the tag \c &lt;TextEdit&gt;.
+ A QmlGraphicsTextEdit object can be instantiated in Qml using the tag \c &lt;TextEdit&gt;.
*/
/*!
- Constructs a new QFxTextEdit.
+ Constructs a new QmlGraphicsTextEdit.
*/
-QFxTextEdit::QFxTextEdit(QFxItem *parent)
-: QFxPaintedItem(*(new QFxTextEditPrivate), parent)
+QmlGraphicsTextEdit::QmlGraphicsTextEdit(QmlGraphicsItem *parent)
+: QmlGraphicsPaintedItem(*(new QmlGraphicsTextEditPrivate), parent)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
d->init();
}
/*!
\internal
*/
-QFxTextEdit::QFxTextEdit(QFxTextEditPrivate &dd, QFxItem *parent)
- : QFxPaintedItem(dd, parent)
+QmlGraphicsTextEdit::QmlGraphicsTextEdit(QmlGraphicsTextEditPrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsPaintedItem(dd, parent)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
d->init();
}
-QString QFxTextEdit::text() const
+QString QmlGraphicsTextEdit::text() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
if (d->richText)
return d->document->toHtml();
@@ -141,10 +141,10 @@ QString QFxTextEdit::text() const
automatically determine whether the text should be treated as
rich text. This determination is made using Qt::mightBeRichText().
*/
-void QFxTextEdit::setText(const QString &text)
+void QmlGraphicsTextEdit::setText(const QString &text)
{
- Q_D(QFxTextEdit);
- if (QFxTextEdit::text() == text)
+ Q_D(QmlGraphicsTextEdit);
+ if (QmlGraphicsTextEdit::text() == text)
return;
d->text = text;
d->richText = d->format == RichText || (d->format == AutoText && Qt::mightBeRichText(text));
@@ -192,15 +192,15 @@ Column {
\o \image declarative-textformat.png
\endtable
*/
-QFxTextEdit::TextFormat QFxTextEdit::textFormat() const
+QmlGraphicsTextEdit::TextFormat QmlGraphicsTextEdit::textFormat() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->format;
}
-void QFxTextEdit::setTextFormat(TextFormat format)
+void QmlGraphicsTextEdit::setTextFormat(TextFormat format)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (format == d->format)
return;
bool wasRich = d->richText;
@@ -216,15 +216,15 @@ void QFxTextEdit::setTextFormat(TextFormat format)
d->format = format;
}
-QFont QFxTextEdit::font() const
+QFont QmlGraphicsTextEdit::font() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->font;
}
-void QFxTextEdit::setFont(const QFont &font)
+void QmlGraphicsTextEdit::setFont(const QFont &font)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
d->font = font;
clearCache();
@@ -250,15 +250,15 @@ TextEdit { color: "#00FF00"; ... }
TextEdit { color: "steelblue"; ... }
\endqml
*/
-QColor QFxTextEdit::color() const
+QColor QmlGraphicsTextEdit::color() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->color;
}
-void QFxTextEdit::setColor(const QColor &color)
+void QmlGraphicsTextEdit::setColor(const QColor &color)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (d->color == color)
return;
@@ -275,15 +275,15 @@ void QFxTextEdit::setColor(const QColor &color)
The text highlight color, used behind selections.
*/
-QColor QFxTextEdit::selectionColor() const
+QColor QmlGraphicsTextEdit::selectionColor() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->selectionColor;
}
-void QFxTextEdit::setSelectionColor(const QColor &color)
+void QmlGraphicsTextEdit::setSelectionColor(const QColor &color)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (d->selectionColor == color)
return;
@@ -300,15 +300,15 @@ void QFxTextEdit::setSelectionColor(const QColor &color)
The selected text color, used in selections.
*/
-QColor QFxTextEdit::selectedTextColor() const
+QColor QmlGraphicsTextEdit::selectedTextColor() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->selectedTextColor;
}
-void QFxTextEdit::setSelectedTextColor(const QColor &color)
+void QmlGraphicsTextEdit::setSelectedTextColor(const QColor &color)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (d->selectedTextColor == color)
return;
@@ -331,15 +331,15 @@ void QFxTextEdit::setSelectedTextColor(const QColor &color)
\c AlignHCenter. The valid values for \c verticalAlignment are \c AlignTop, \c AlignBottom
and \c AlignVCenter.
*/
-QFxTextEdit::HAlignment QFxTextEdit::hAlign() const
+QmlGraphicsTextEdit::HAlignment QmlGraphicsTextEdit::hAlign() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->hAlign;
}
-void QFxTextEdit::setHAlign(QFxTextEdit::HAlignment alignment)
+void QmlGraphicsTextEdit::setHAlign(QmlGraphicsTextEdit::HAlignment alignment)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (alignment == d->hAlign)
return;
d->hAlign = alignment;
@@ -347,15 +347,15 @@ void QFxTextEdit::setHAlign(QFxTextEdit::HAlignment alignment)
updateSize();
}
-QFxTextEdit::VAlignment QFxTextEdit::vAlign() const
+QmlGraphicsTextEdit::VAlignment QmlGraphicsTextEdit::vAlign() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->vAlign;
}
-void QFxTextEdit::setVAlign(QFxTextEdit::VAlignment alignment)
+void QmlGraphicsTextEdit::setVAlign(QmlGraphicsTextEdit::VAlignment alignment)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (alignment == d->vAlign)
return;
d->vAlign = alignment;
@@ -363,9 +363,9 @@ void QFxTextEdit::setVAlign(QFxTextEdit::VAlignment alignment)
updateSize();
}
-bool QFxTextEdit::wrap() const
+bool QmlGraphicsTextEdit::wrap() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->wrap;
}
@@ -377,9 +377,9 @@ bool QFxTextEdit::wrap() const
Wrapping is done on word boundaries (i.e. it is a "word-wrap"). Wrapping is off by default.
*/
-void QFxTextEdit::setWrap(bool w)
+void QmlGraphicsTextEdit::setWrap(bool w)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (w == d->wrap)
return;
d->wrap = w;
@@ -394,15 +394,15 @@ void QFxTextEdit::setWrap(bool w)
This property is set and unset when the text edit gets focus, but it can also
be set directly (useful, for example, if a KeyProxy might forward keys to it).
*/
-bool QFxTextEdit::isCursorVisible() const
+bool QmlGraphicsTextEdit::isCursorVisible() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->cursorVisible;
}
-void QFxTextEdit::setCursorVisible(bool on)
+void QmlGraphicsTextEdit::setCursorVisible(bool on)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (d->cursorVisible == on)
return;
d->cursorVisible = on;
@@ -416,15 +416,15 @@ void QFxTextEdit::setCursorVisible(bool on)
\qmlproperty int TextEdit::cursorPosition
The position of the cursor in the TextEdit.
*/
-int QFxTextEdit::cursorPosition() const
+int QmlGraphicsTextEdit::cursorPosition() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->control->textCursor().position();
}
-void QFxTextEdit::setCursorPosition(int pos)
+void QmlGraphicsTextEdit::setCursorPosition(int pos)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
QTextCursor cursor = d->control->textCursor();
if (cursor.position() == pos)
return;
@@ -442,18 +442,18 @@ void QFxTextEdit::setCursorPosition(int pos)
needed, and the x and y properties of delegate instance will be set so as
to be one pixel before the top left of the current character.
- Note that the root item of the delegate component must be a QFxItem or
- QFxItem derived item.
+ Note that the root item of the delegate component must be a QmlGraphicsItem or
+ QmlGraphicsItem derived item.
*/
-QmlComponent* QFxTextEdit::cursorDelegate() const
+QmlComponent* QmlGraphicsTextEdit::cursorDelegate() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->cursorComponent;
}
-void QFxTextEdit::setCursorDelegate(QmlComponent* c)
+void QmlGraphicsTextEdit::setCursorDelegate(QmlComponent* c)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if(d->cursorComponent){
if(d->cursor){
disconnect(d->control, SIGNAL(cursorPositionChanged()),
@@ -474,12 +474,12 @@ void QFxTextEdit::setCursorDelegate(QmlComponent* c)
}
}
-void QFxTextEdit::loadCursorDelegate()
+void QmlGraphicsTextEdit::loadCursorDelegate()
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if(d->cursorComponent->isLoading())
return;
- d->cursor = qobject_cast<QFxItem*>(d->cursorComponent->create(qmlContext(this)));
+ d->cursor = qobject_cast<QmlGraphicsItem*>(d->cursorComponent->create(qmlContext(this)));
if(d->cursor){
connect(d->control, SIGNAL(cursorPositionChanged()),
this, SLOT(moveCursorDelegate()));
@@ -506,15 +506,15 @@ void QFxTextEdit::loadCursorDelegate()
\sa selectionEnd, cursorPosition, selectedText
*/
-int QFxTextEdit::selectionStart() const
+int QmlGraphicsTextEdit::selectionStart() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->control->textCursor().selectionStart();
}
-void QFxTextEdit::setSelectionStart(int s)
+void QmlGraphicsTextEdit::setSelectionStart(int s)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if(d->lastSelectionStart == s || s < 0 || s > text().length())
return;
d->lastSelectionStart = s;
@@ -534,15 +534,15 @@ void QFxTextEdit::setSelectionStart(int s)
\sa selectionStart, cursorPosition, selectedText
*/
-int QFxTextEdit::selectionEnd() const
+int QmlGraphicsTextEdit::selectionEnd() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->control->textCursor().selectionEnd();
}
-void QFxTextEdit::setSelectionEnd(int s)
+void QmlGraphicsTextEdit::setSelectionEnd(int s)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if(d->lastSelectionEnd == s || s < 0 || s > text().length())
return;
d->lastSelectionEnd = s;
@@ -563,9 +563,9 @@ void QFxTextEdit::setSelectionEnd(int s)
myTextEdit.selectionEnd);
\endcode
*/
-QString QFxTextEdit::selectedText() const
+QString QmlGraphicsTextEdit::selectedText() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->control->textCursor().selectedText();
}
@@ -575,15 +575,15 @@ QString QFxTextEdit::selectedText() const
Whether the TextEdit should gain focus on a mouse press. By default this is
set to false;
*/
-bool QFxTextEdit::focusOnPress() const
+bool QmlGraphicsTextEdit::focusOnPress() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->focusOnPress;
}
-void QFxTextEdit::setFocusOnPress(bool on)
+void QmlGraphicsTextEdit::setFocusOnPress(bool on)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (d->focusOnPress == on)
return;
d->focusOnPress = on;
@@ -595,51 +595,51 @@ void QFxTextEdit::setFocusOnPress(bool on)
Whether the TextEdit should keep the selection visible when it loses focus to another
item in the scene. By default this is set to true;
*/
-bool QFxTextEdit::persistentSelection() const
+bool QmlGraphicsTextEdit::persistentSelection() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->persistentSelection;
}
-void QFxTextEdit::setPersistentSelection(bool on)
+void QmlGraphicsTextEdit::setPersistentSelection(bool on)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (d->persistentSelection == on)
return;
d->persistentSelection = on;
}
-qreal QFxTextEdit::textMargin() const
+qreal QmlGraphicsTextEdit::textMargin() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->textMargin;
}
-void QFxTextEdit::setTextMargin(qreal margin)
+void QmlGraphicsTextEdit::setTextMargin(qreal margin)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (d->textMargin == margin)
return;
d->textMargin = margin;
d->document->setDocumentMargin(d->textMargin);
}
-void QFxTextEdit::geometryChanged(const QRectF &newGeometry,
+void QmlGraphicsTextEdit::geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry)
{
if (newGeometry.width() != oldGeometry.width())
updateSize();
- QFxPaintedItem::geometryChanged(newGeometry, oldGeometry);
+ QmlGraphicsPaintedItem::geometryChanged(newGeometry, oldGeometry);
}
/*!
Ensures any delayed caching or data loading the class
needs to performed is complete.
*/
-void QFxTextEdit::componentComplete()
+void QmlGraphicsTextEdit::componentComplete()
{
- Q_D(QFxTextEdit);
- QFxPaintedItem::componentComplete();
+ Q_D(QmlGraphicsTextEdit);
+ QmlGraphicsPaintedItem::componentComplete();
if (d->dirty) {
updateSize();
d->dirty = false;
@@ -654,9 +654,9 @@ void QFxTextEdit::componentComplete()
By default this property is false.
*/
-void QFxTextEdit::setReadOnly(bool r)
+void QmlGraphicsTextEdit::setReadOnly(bool r)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
Qt::TextInteractionFlags flags = Qt::NoTextInteraction;
if (r) {
@@ -669,9 +669,9 @@ void QFxTextEdit::setReadOnly(bool r)
d->control->moveCursor(QTextCursor::End);
}
-bool QFxTextEdit::isReadOnly() const
+bool QmlGraphicsTextEdit::isReadOnly() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return !(d->control->textInteractionFlags() & Qt::TextEditable);
}
@@ -679,9 +679,9 @@ bool QFxTextEdit::isReadOnly() const
Sets how the text edit should interact with user input to the given
\a flags.
*/
-void QFxTextEdit::setTextInteractionFlags(Qt::TextInteractionFlags flags)
+void QmlGraphicsTextEdit::setTextInteractionFlags(Qt::TextInteractionFlags flags)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
d->control->setTextInteractionFlags(flags);
}
@@ -689,9 +689,9 @@ void QFxTextEdit::setTextInteractionFlags(Qt::TextInteractionFlags flags)
Returns the flags specifying how the text edit should interact
with user input.
*/
-Qt::TextInteractionFlags QFxTextEdit::textInteractionFlags() const
+Qt::TextInteractionFlags QmlGraphicsTextEdit::textInteractionFlags() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->control->textInteractionFlags();
}
@@ -699,9 +699,9 @@ Qt::TextInteractionFlags QFxTextEdit::textInteractionFlags() const
Returns the cursor for the point at the given \a pos on the
text edit.
*/
-QTextCursor QFxTextEdit::cursorForPosition(const QPoint &pos) const
+QTextCursor QmlGraphicsTextEdit::cursorForPosition(const QPoint &pos) const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->control->cursorForPosition(pos);
}
@@ -709,9 +709,9 @@ QTextCursor QFxTextEdit::cursorForPosition(const QPoint &pos) const
Returns the rectangle where the given text \a cursor is rendered
within the text edit.
*/
-QRect QFxTextEdit::cursorRect(const QTextCursor &cursor) const
+QRect QmlGraphicsTextEdit::cursorRect(const QTextCursor &cursor) const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
if (cursor.isNull())
return QRect();
@@ -722,9 +722,9 @@ QRect QFxTextEdit::cursorRect(const QTextCursor &cursor) const
Returns the rectangle where the text cursor is rendered
within the text edit.
*/
-QRect QFxTextEdit::cursorRect() const
+QRect QmlGraphicsTextEdit::cursorRect() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->control->cursorRect().toRect();
}
@@ -732,18 +732,18 @@ QRect QFxTextEdit::cursorRect() const
/*!
Sets the text cursor for the text edit to the given \a cursor.
*/
-void QFxTextEdit::setTextCursor(const QTextCursor &cursor)
+void QmlGraphicsTextEdit::setTextCursor(const QTextCursor &cursor)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
d->control->setTextCursor(cursor);
}
/*!
Returns the text cursor for the text edit.
*/
-QTextCursor QFxTextEdit::textCursor() const
+QTextCursor QmlGraphicsTextEdit::textCursor() const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->control->textCursor();
}
@@ -752,9 +752,9 @@ Moves the cursor by performing the given \a operation.
If \a mode is QTextCursor::KeepAnchor, the cursor selects the text it moves over. This is the same effect that the user achieves when they hold down the Shift key and move the cursor with the cursor keys.
*/
-void QFxTextEdit::moveCursor(QTextCursor::MoveOperation operation, QTextCursor::MoveMode mode)
+void QmlGraphicsTextEdit::moveCursor(QTextCursor::MoveOperation operation, QTextCursor::MoveMode mode)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
d->control->moveCursor(operation, mode);
}
@@ -762,23 +762,23 @@ void QFxTextEdit::moveCursor(QTextCursor::MoveOperation operation, QTextCursor::
\overload
Handles the given \a event.
*/
-bool QFxTextEdit::event(QEvent *event)
+bool QmlGraphicsTextEdit::event(QEvent *event)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (event->type() == QEvent::ShortcutOverride) {
d->control->processEvent(event, QPointF(0, 0));
return event->isAccepted();
}
- return QFxPaintedItem::event(event);
+ return QmlGraphicsPaintedItem::event(event);
}
/*!
\overload
Handles the given key \a event.
*/
-void QFxTextEdit::keyPressEvent(QKeyEvent *event)
+void QmlGraphicsTextEdit::keyPressEvent(QKeyEvent *event)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
//### this causes non-standard cursor behavior in some cases.
// is it still needed?
/*QTextCursor c = textCursor();
@@ -803,19 +803,19 @@ void QFxTextEdit::keyPressEvent(QKeyEvent *event)
d->control->processEvent(event, QPointF(0, 0));
if (!event->isAccepted())
- QFxPaintedItem::keyPressEvent(event);
+ QmlGraphicsPaintedItem::keyPressEvent(event);
}
/*!
\overload
Handles the given key \a event.
*/
-void QFxTextEdit::keyReleaseEvent(QKeyEvent *event)
+void QmlGraphicsTextEdit::keyReleaseEvent(QKeyEvent *event)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
d->control->processEvent(event, QPointF(0, 0));
if (!event->isAccepted())
- QFxPaintedItem::keyReleaseEvent(event);
+ QmlGraphicsPaintedItem::keyReleaseEvent(event);
}
/*!
@@ -825,18 +825,18 @@ void QFxTextEdit::keyReleaseEvent(QKeyEvent *event)
like KeyProxy can give the behavior of focus even when hasFocus() isn't
true.
*/
-void QFxTextEdit::focusChanged(bool hasFocus)
+void QmlGraphicsTextEdit::focusChanged(bool hasFocus)
{
setCursorVisible(hasFocus);
- QFxItem::focusChanged(hasFocus);
+ QmlGraphicsItem::focusChanged(hasFocus);
}
/*!
Causes all text to be selected.
*/
-void QFxTextEdit::selectAll()
+void QmlGraphicsTextEdit::selectAll()
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
d->control->selectAll();
}
@@ -844,59 +844,59 @@ void QFxTextEdit::selectAll()
\overload
Handles the given mouse \a event.
*/
-void QFxTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (d->focusOnPress)
setFocus(true);
d->control->processEvent(event, QPointF(0, 0));
if (!event->isAccepted())
- QFxPaintedItem::mousePressEvent(event);
+ QmlGraphicsPaintedItem::mousePressEvent(event);
}
/*!
\overload
Handles the given mouse \a event.
*/
-void QFxTextEdit::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsTextEdit::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
d->control->processEvent(event, QPointF(0, 0));
if (!event->isAccepted())
- QFxPaintedItem::mousePressEvent(event);
+ QmlGraphicsPaintedItem::mousePressEvent(event);
}
/*!
\overload
Handles the given mouse \a event.
*/
-void QFxTextEdit::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsTextEdit::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
d->control->processEvent(event, QPointF(0, 0));
if (!event->isAccepted())
- QFxPaintedItem::mouseDoubleClickEvent(event);
+ QmlGraphicsPaintedItem::mouseDoubleClickEvent(event);
}
/*!
\overload
Handles the given mouse \a event.
*/
-void QFxTextEdit::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsTextEdit::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
d->control->processEvent(event, QPointF(0, 0));
if (!event->isAccepted())
- QFxPaintedItem::mousePressEvent(event);
+ QmlGraphicsPaintedItem::mousePressEvent(event);
}
/*!
\overload
Handles the given input method \a event.
*/
-void QFxTextEdit::inputMethodEvent(QInputMethodEvent *event)
+void QmlGraphicsTextEdit::inputMethodEvent(QInputMethodEvent *event)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
d->control->processEvent(event, QPointF(0, 0));
}
@@ -904,9 +904,9 @@ void QFxTextEdit::inputMethodEvent(QInputMethodEvent *event)
\overload
Returns the value of the given \a property.
*/
-QVariant QFxTextEdit::inputMethodQuery(Qt::InputMethodQuery property) const
+QVariant QmlGraphicsTextEdit::inputMethodQuery(Qt::InputMethodQuery property) const
{
- Q_D(const QFxTextEdit);
+ Q_D(const QmlGraphicsTextEdit);
return d->control->inputMethodQuery(property);
}
@@ -914,16 +914,16 @@ QVariant QFxTextEdit::inputMethodQuery(Qt::InputMethodQuery property) const
Draws the contents of the text edit using the given \a painter within
the given \a bounds.
*/
-void QFxTextEdit::drawContents(QPainter *painter, const QRect &bounds)
+void QmlGraphicsTextEdit::drawContents(QPainter *painter, const QRect &bounds)
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
painter->setRenderHint(QPainter::TextAntialiasing, true);
d->control->drawContents(painter, bounds);
}
-void QFxTextEdit::updateImgCache(const QRectF &r)
+void QmlGraphicsTextEdit::updateImgCache(const QRectF &r)
{
dirtyCache(r.toRect());
emit update();
@@ -942,9 +942,9 @@ void QFxTextEdit::updateImgCache(const QRectF &r)
filtering at the beginning of the animation and reenable it at the conclusion.
*/
-void QFxTextEditPrivate::init()
+void QmlGraphicsTextEditPrivate::init()
{
- Q_Q(QFxTextEdit);
+ Q_Q(QmlGraphicsTextEdit);
q->setSmoothTransform(smooth);
q->setAcceptedMouseButtons(Qt::LeftButton);
@@ -969,16 +969,16 @@ void QFxTextEditPrivate::init()
updateDefaultTextOption();
}
-void QFxTextEdit::q_textChanged()
+void QmlGraphicsTextEdit::q_textChanged()
{
if (!widthValid())
updateSize(); //### optimize: we get 3 calls to updateSize every time a letter is typed
emit textChanged(text());
}
-void QFxTextEdit::moveCursorDelegate()
+void QmlGraphicsTextEdit::moveCursorDelegate()
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if(!d->cursor)
return;
QRectF cursorRect = d->control->cursorRect();
@@ -986,9 +986,9 @@ void QFxTextEdit::moveCursorDelegate()
d->cursor->setY(cursorRect.y());
}
-void QFxTextEditPrivate::updateSelection()
+void QmlGraphicsTextEditPrivate::updateSelection()
{
- Q_Q(QFxTextEdit);
+ Q_Q(QmlGraphicsTextEdit);
QTextCursor cursor = control->textCursor();
bool startChange = (lastSelectionStart != cursor.selectionStart());
bool endChange = (lastSelectionEnd != cursor.selectionEnd());
@@ -1005,12 +1005,12 @@ void QFxTextEditPrivate::updateSelection()
startChange = (lastSelectionStart != control->textCursor().selectionStart());
endChange = (lastSelectionEnd != control->textCursor().selectionEnd());
if(startChange || endChange)
- qWarning() << "QFxTextEditPrivate::updateSelection() has failed you.";
+ qWarning() << "QmlGraphicsTextEditPrivate::updateSelection() has failed you.";
}
-void QFxTextEdit::updateSelectionMarkers()
+void QmlGraphicsTextEdit::updateSelectionMarkers()
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if(d->lastSelectionStart != d->control->textCursor().selectionStart()){
d->lastSelectionStart = d->control->textCursor().selectionStart();
emit selectionStartChanged();
@@ -1023,9 +1023,9 @@ void QFxTextEdit::updateSelectionMarkers()
//### we should perhaps be a bit smarter here -- depending on what has changed, we shouldn't
// need to do all the calculations each time
-void QFxTextEdit::updateSize()
+void QmlGraphicsTextEdit::updateSize()
{
- Q_D(QFxTextEdit);
+ Q_D(QmlGraphicsTextEdit);
if (isComponentComplete()) {
QFontMetrics fm = QFontMetrics(d->font);
int dy = height();
@@ -1064,7 +1064,7 @@ void QFxTextEdit::updateSize()
emit update();
}
-void QFxTextEditPrivate::updateDefaultTextOption()
+void QmlGraphicsTextEditPrivate::updateDefaultTextOption()
{
QTextOption opt = document->defaultTextOption();
int oldAlignment = opt.alignment();
diff --git a/src/declarative/fx/qfxtextedit.h b/src/declarative/graphicsitems/qmlgraphicstextedit_p.h
index f4f101a..efbe998 100644
--- a/src/declarative/fx/qfxtextedit.h
+++ b/src/declarative/graphicsitems/qmlgraphicstextedit_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,30 +21,29 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXTEXTEDIT_H
-#define QFXTEXTEDIT_H
+#ifndef QMLGRAPHICSTEXTEDIT_H
+#define QMLGRAPHICSTEXTEDIT_H
-#include <QtDeclarative/qfxtext.h>
-#include <QtDeclarative/qfxpainteditem.h>
+#include <private/qmlgraphicstext_p.h>
+#include <private/qmlgraphicspainteditem_p.h>
#include <QtGui/qtextdocument.h>
#include <QtGui/qtextoption.h>
@@ -58,8 +58,8 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxTextEditPrivate;
-class Q_DECLARATIVE_EXPORT QFxTextEdit : public QFxPaintedItem
+class QmlGraphicsTextEditPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsTextEdit : public QmlGraphicsPaintedItem
{
Q_OBJECT
Q_ENUMS(VAlignment)
@@ -87,7 +87,7 @@ class Q_DECLARATIVE_EXPORT QFxTextEdit : public QFxPaintedItem
Q_PROPERTY(qreal textMargin READ textMargin WRITE setTextMargin)
public:
- QFxTextEdit(QFxItem *parent=0);
+ QmlGraphicsTextEdit(QmlGraphicsItem *parent=0);
enum HAlignment {
AlignLeft = Qt::AlignLeft,
@@ -201,7 +201,7 @@ private:
void updateSize();
protected:
- QFxTextEdit(QFxTextEditPrivate &dd, QFxItem *parent);
+ QmlGraphicsTextEdit(QmlGraphicsTextEditPrivate &dd, QmlGraphicsItem *parent);
virtual void geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry);
@@ -221,13 +221,13 @@ protected:
void drawContents(QPainter *, const QRect &);
private:
- Q_DISABLE_COPY(QFxTextEdit)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxTextEdit)
+ Q_DISABLE_COPY(QmlGraphicsTextEdit)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsTextEdit)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxTextEdit)
+QML_DECLARE_TYPE(QmlGraphicsTextEdit)
QT_END_HEADER
diff --git a/src/declarative/fx/qfxtextedit_p.h b/src/declarative/graphicsitems/qmlgraphicstextedit_p_p.h
index 82481ff..4cbc56d 100644
--- a/src/declarative/fx/qfxtextedit_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicstextedit_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXTEXTEDIT_P_H
-#define QFXTEXTEDIT_P_H
+#ifndef QMLGRAPHICSTEXTEDIT_P_H
+#define QMLGRAPHICSTEXTEDIT_P_H
//
// W A R N I N G
@@ -53,8 +53,8 @@
// We mean it.
//
-#include "qfxitem.h"
-#include "qfxpainteditem_p.h"
+#include "qmlgraphicsitem.h"
+#include "qmlgraphicspainteditem_p_p.h"
#include "qml.h"
@@ -62,16 +62,16 @@ QT_BEGIN_NAMESPACE
class QTextLayout;
class QTextDocument;
class QTextControl;
-class QFxTextEditPrivate : public QFxPaintedItemPrivate
+class QmlGraphicsTextEditPrivate : public QmlGraphicsPaintedItemPrivate
{
- Q_DECLARE_PUBLIC(QFxTextEdit)
+ Q_DECLARE_PUBLIC(QmlGraphicsTextEdit)
public:
- QFxTextEditPrivate()
- : color("black"), imgDirty(true), hAlign(QFxTextEdit::AlignLeft), vAlign(QFxTextEdit::AlignTop),
+ QmlGraphicsTextEditPrivate()
+ : color("black"), imgDirty(true), hAlign(QmlGraphicsTextEdit::AlignLeft), vAlign(QmlGraphicsTextEdit::AlignTop),
dirty(false), wrap(false), richText(false), cursorVisible(false), focusOnPress(false),
persistentSelection(true), textMargin(0.0), lastSelectionStart(0), lastSelectionEnd(0),
- cursorComponent(0), cursor(0), format(QFxTextEdit::AutoText), document(0)
+ cursorComponent(0), cursor(0), format(QmlGraphicsTextEdit::AutoText), document(0)
{
}
@@ -91,8 +91,8 @@ public:
bool imgDirty;
QPixmap imgCache;
QPixmap imgStyleCache;
- QFxTextEdit::HAlignment hAlign;
- QFxTextEdit::VAlignment vAlign;
+ QmlGraphicsTextEdit::HAlignment hAlign;
+ QmlGraphicsTextEdit::VAlignment vAlign;
bool dirty;
bool wrap;
bool richText;
@@ -103,8 +103,8 @@ public:
int lastSelectionStart;
int lastSelectionEnd;
QmlComponent* cursorComponent;
- QFxItem* cursor;
- QFxTextEdit::TextFormat format;
+ QmlGraphicsItem* cursor;
+ QmlGraphicsTextEdit::TextFormat format;
QTextDocument *document;
QTextControl *control;
};
diff --git a/src/declarative/fx/qfxtextinput.cpp b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp
index e9ddd3f..44ccda1 100644
--- a/src/declarative/fx/qfxtextinput.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qfxtextinput.h"
-#include "qfxtextinput_p.h"
+#include "qmlgraphicstextinput_p.h"
+#include "qmlgraphicstextinput_p_p.h"
#include "qmlinfo.h"
#include <QValidator>
#include <QApplication>
@@ -49,12 +49,12 @@
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,TextInput,QFxTextInput);
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,TextInput,QmlGraphicsTextInput);
QML_DEFINE_NOCREATE_TYPE(QValidator);
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,QIntValidator,QIntValidator);
/*!
- \qmlclass TextInput
+ \qmlclass TextInput QFxTextInput
The TextInput item allows you to add an editable line of text to a scene.
TextInput can only display a single line of text, and can only display
@@ -63,24 +63,24 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,QIntValidator,QIntValidator);
Input constraints include setting a QValidator, an input mask, or a
maximum input length.
*/
-QFxTextInput::QFxTextInput(QFxItem* parent)
- : QFxPaintedItem(*(new QFxTextInputPrivate), parent)
+QmlGraphicsTextInput::QmlGraphicsTextInput(QmlGraphicsItem* parent)
+ : QmlGraphicsPaintedItem(*(new QmlGraphicsTextInputPrivate), parent)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->init();
}
/*
\internal
*/
-QFxTextInput::QFxTextInput(QFxTextInputPrivate &dd, QFxItem* parent)
- : QFxPaintedItem(dd, parent)
+QmlGraphicsTextInput::QmlGraphicsTextInput(QmlGraphicsTextInputPrivate &dd, QmlGraphicsItem* parent)
+ : QmlGraphicsPaintedItem(dd, parent)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->init();
}
-QFxTextInput::~QFxTextInput()
+QmlGraphicsTextInput::~QmlGraphicsTextInput()
{
}
@@ -90,15 +90,15 @@ QFxTextInput::~QFxTextInput()
The text in the TextInput.
*/
-QString QFxTextInput::text() const
+QString QmlGraphicsTextInput::text() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->control->text();
}
-void QFxTextInput::setText(const QString &s)
+void QmlGraphicsTextInput::setText(const QString &s)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
if(s == text())
return;
d->control->setText(s);
@@ -115,15 +115,15 @@ void QFxTextInput::setText(const QString &s)
Set the TextInput's font attributes.
*/
-QFont QFxTextInput::font() const
+QFont QmlGraphicsTextInput::font() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->font;
}
-void QFxTextInput::setFont(const QFont &font)
+void QmlGraphicsTextInput::setFont(const QFont &font)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->font = font;
d->control->setFont(d->font);
@@ -139,15 +139,15 @@ void QFxTextInput::setFont(const QFont &font)
The text color.
*/
-QColor QFxTextInput::color() const
+QColor QmlGraphicsTextInput::color() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->color;
}
-void QFxTextInput::setColor(const QColor &c)
+void QmlGraphicsTextInput::setColor(const QColor &c)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->color = c;
}
@@ -157,15 +157,15 @@ void QFxTextInput::setColor(const QColor &c)
The text highlight color, used behind selections.
*/
-QColor QFxTextInput::selectionColor() const
+QColor QmlGraphicsTextInput::selectionColor() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->selectionColor;
}
-void QFxTextInput::setSelectionColor(const QColor &color)
+void QmlGraphicsTextInput::setSelectionColor(const QColor &color)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
if (d->selectionColor == color)
return;
@@ -180,15 +180,15 @@ void QFxTextInput::setSelectionColor(const QColor &color)
The highlighted text color, used in selections.
*/
-QColor QFxTextInput::selectedTextColor() const
+QColor QmlGraphicsTextInput::selectedTextColor() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->selectedTextColor;
}
-void QFxTextInput::setSelectedTextColor(const QColor &color)
+void QmlGraphicsTextInput::setSelectedTextColor(const QColor &color)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
if (d->selectedTextColor == color)
return;
@@ -213,40 +213,40 @@ void QFxTextInput::setSelectedTextColor(const QColor &color)
The valid values for \c horizontalAlignment are \c AlignLeft, \c AlignRight and
\c AlignHCenter.
*/
-QFxTextInput::HAlignment QFxTextInput::hAlign() const
+QmlGraphicsTextInput::HAlignment QmlGraphicsTextInput::hAlign() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->hAlign;
}
-void QFxTextInput::setHAlign(HAlignment align)
+void QmlGraphicsTextInput::setHAlign(HAlignment align)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->hAlign = align;
//TODO: implement
}
-bool QFxTextInput::isReadOnly() const
+bool QmlGraphicsTextInput::isReadOnly() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->control->isReadOnly();
}
-void QFxTextInput::setReadOnly(bool ro)
+void QmlGraphicsTextInput::setReadOnly(bool ro)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->control->setReadOnly(ro);
}
-int QFxTextInput::maxLength() const
+int QmlGraphicsTextInput::maxLength() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->control->maxLength();
}
-void QFxTextInput::setMaxLength(int ml)
+void QmlGraphicsTextInput::setMaxLength(int ml)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->control->setMaxLength(ml);
}
@@ -257,15 +257,15 @@ void QFxTextInput::setMaxLength(int ml)
This property is set and unset when the line edit gets focus, but it can also
be set directly (useful, for example, if a KeyProxy might forward keys to it).
*/
-bool QFxTextInput::isCursorVisible() const
+bool QmlGraphicsTextInput::isCursorVisible() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->cursorVisible;
}
-void QFxTextInput::setCursorVisible(bool on)
+void QmlGraphicsTextInput::setCursorVisible(bool on)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
if (d->cursorVisible == on)
return;
d->cursorVisible = on;
@@ -277,14 +277,14 @@ void QFxTextInput::setCursorVisible(bool on)
\qmlproperty int TextInput::cursorPosition
The position of the cursor in the TextInput.
*/
-int QFxTextInput::cursorPosition() const
+int QmlGraphicsTextInput::cursorPosition() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->control->cursor();
}
-void QFxTextInput::setCursorPosition(int cp)
+void QmlGraphicsTextInput::setCursorPosition(int cp)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->control->moveCursor(cp);
}
@@ -294,9 +294,9 @@ void QFxTextInput::setCursorPosition(int cp)
Returns a Rect which encompasses the cursor, but which may be larger than is
required. Ignores custom cursor delegates.
*/
-QRect QFxTextInput::cursorRect() const
+QRect QmlGraphicsTextInput::cursorRect() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->control->cursorRect();
}
@@ -313,15 +313,15 @@ QRect QFxTextInput::cursorRect() const
\sa selectionEnd, cursorPosition, selectedText
*/
-int QFxTextInput::selectionStart() const
+int QmlGraphicsTextInput::selectionStart() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->lastSelectionStart;
}
-void QFxTextInput::setSelectionStart(int s)
+void QmlGraphicsTextInput::setSelectionStart(int s)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
if(d->lastSelectionStart == s || s < 0 || s > text().length())
return;
d->lastSelectionStart = s;
@@ -341,15 +341,15 @@ void QFxTextInput::setSelectionStart(int s)
\sa selectionStart, cursorPosition, selectedText
*/
-int QFxTextInput::selectionEnd() const
+int QmlGraphicsTextInput::selectionEnd() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->lastSelectionEnd;
}
-void QFxTextInput::setSelectionEnd(int s)
+void QmlGraphicsTextInput::setSelectionEnd(int s)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
if(d->lastSelectionEnd == s || s < 0 || s > text().length())
return;
d->lastSelectionEnd = s;
@@ -370,9 +370,9 @@ void QFxTextInput::setSelectionEnd(int s)
myTextInput.selectionEnd);
\endqml
*/
-QString QFxTextInput::selectedText() const
+QString QmlGraphicsTextInput::selectedText() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->control->selectedText();
}
@@ -382,15 +382,15 @@ QString QFxTextInput::selectedText() const
Whether the TextInput should gain focus on a mouse press. By default this is
set to true.
*/
-bool QFxTextInput::focusOnPress() const
+bool QmlGraphicsTextInput::focusOnPress() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->focusOnPress;
}
-void QFxTextInput::setFocusOnPress(bool b)
+void QmlGraphicsTextInput::setFocusOnPress(bool b)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->focusOnPress = b;
}
@@ -404,16 +404,16 @@ void QFxTextInput::setFocusOnPress(bool b)
\sa acceptableInput, inputMask
*/
-QValidator* QFxTextInput::validator() const
+QValidator* QmlGraphicsTextInput::validator() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
//###const cast isn't good, but needed for property system?
return const_cast<QValidator*>(d->control->validator());
}
-void QFxTextInput::setValidator(QValidator* v)
+void QmlGraphicsTextInput::setValidator(QValidator* v)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->control->setValidator(v);
if(!d->control->hasAcceptableInput()){
d->oldValidity = false;
@@ -430,15 +430,15 @@ void QFxTextInput::setValidator(QValidator* v)
\sa acceptableInput, validator
*/
-QString QFxTextInput::inputMask() const
+QString QmlGraphicsTextInput::inputMask() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->control->inputMask();
}
-void QFxTextInput::setInputMask(const QString &im)
+void QmlGraphicsTextInput::setInputMask(const QString &im)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->control->setInputMask(im);
}
@@ -450,9 +450,9 @@ void QFxTextInput::setInputMask(const QString &im)
if the current text is acceptable to the validator or input mask as a final
string (not as an intermediate string).
*/
-bool QFxTextInput::hasAcceptableInput() const
+bool QmlGraphicsTextInput::hasAcceptableInput() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->control->hasAcceptableInput();
}
@@ -466,15 +466,15 @@ bool QFxTextInput::hasAcceptableInput() const
current character as asterixes.
*/
-QFxTextInput::EchoMode QFxTextInput::echoMode() const
+QmlGraphicsTextInput::EchoMode QmlGraphicsTextInput::echoMode() const
{
- Q_D(const QFxTextInput);
- return (QFxTextInput::EchoMode)d->control->echoMode();
+ Q_D(const QmlGraphicsTextInput);
+ return (QmlGraphicsTextInput::EchoMode)d->control->echoMode();
}
-void QFxTextInput::setEchoMode(QFxTextInput::EchoMode echo)
+void QmlGraphicsTextInput::setEchoMode(QmlGraphicsTextInput::EchoMode echo)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->control->setEchoMode((uint)echo);
}
@@ -488,18 +488,18 @@ void QFxTextInput::setEchoMode(QFxTextInput::EchoMode echo)
needed, and the x property of delegate instance will be set so as
to be one pixel before the top left of the current character.
- Note that the root item of the delegate component must be a QFxItem or
- QFxItem derived item.
+ Note that the root item of the delegate component must be a QmlGraphicsItem or
+ QmlGraphicsItem derived item.
*/
-QmlComponent* QFxTextInput::cursorDelegate() const
+QmlComponent* QmlGraphicsTextInput::cursorDelegate() const
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->cursorComponent;
}
-void QFxTextInput::setCursorDelegate(QmlComponent* c)
+void QmlGraphicsTextInput::setCursorDelegate(QmlComponent* c)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->cursorComponent = c;
if(!c){
//note that the components are owned by something else
@@ -511,9 +511,9 @@ void QFxTextInput::setCursorDelegate(QmlComponent* c)
}
}
-void QFxTextInputPrivate::startCreatingCursor()
+void QmlGraphicsTextInputPrivate::startCreatingCursor()
{
- Q_Q(QFxTextInput);
+ Q_Q(QmlGraphicsTextInput);
q->connect(control, SIGNAL(cursorPositionChanged(int, int)),
q, SLOT(moveCursor()));
if(cursorComponent->isReady()){
@@ -522,14 +522,14 @@ void QFxTextInputPrivate::startCreatingCursor()
q->connect(cursorComponent, SIGNAL(statusChanged(int)),
q, SLOT(createCursor()));
}else{//isError
- qmlInfo(QFxTextInput::tr("Could not load cursor delegate"), q);
+ qmlInfo(QmlGraphicsTextInput::tr("Could not load cursor delegate"), q);
qWarning() << cursorComponent->errors();
}
}
-void QFxTextInput::createCursor()
+void QmlGraphicsTextInput::createCursor()
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
if(d->cursorComponent->isError()){
qmlInfo(tr("Could not load cursor delegate"),this);
qWarning() << d->cursorComponent->errors();
@@ -541,7 +541,7 @@ void QFxTextInput::createCursor()
if(d->cursorItem)
delete d->cursorItem;
- d->cursorItem = qobject_cast<QFxItem*>(d->cursorComponent->create());
+ d->cursorItem = qobject_cast<QmlGraphicsItem*>(d->cursorComponent->create());
if(!d->cursorItem){
qmlInfo(tr("Could not instantiate cursor delegate"),this);
//The failed instantiation should print its own error messages
@@ -553,31 +553,31 @@ void QFxTextInput::createCursor()
d->cursorItem->setHeight(d->control->height());
}
-void QFxTextInput::moveCursor()
+void QmlGraphicsTextInput::moveCursor()
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
if(!d->cursorItem)
return;
d->cursorItem->setX(d->control->cursorToX() - d->hscroll);
}
-int QFxTextInput::xToPos(int x)
+int QmlGraphicsTextInput::xToPos(int x)
{
- Q_D(const QFxTextInput);
+ Q_D(const QmlGraphicsTextInput);
return d->control->xToPos(x - d->hscroll);
}
-void QFxTextInput::focusChanged(bool hasFocus)
+void QmlGraphicsTextInput::focusChanged(bool hasFocus)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->focused = hasFocus;
setCursorVisible(hasFocus);
- QFxItem::focusChanged(hasFocus);
+ QmlGraphicsItem::focusChanged(hasFocus);
}
-void QFxTextInput::keyPressEvent(QKeyEvent* ev)
+void QmlGraphicsTextInput::keyPressEvent(QKeyEvent* ev)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
if((d->control->cursor() == 0 && ev->key() == Qt::Key_Left)
|| (d->control->cursor() == d->control->text().length()
&& ev->key() == Qt::Key_Right)){
@@ -587,12 +587,12 @@ void QFxTextInput::keyPressEvent(QKeyEvent* ev)
d->control->processKeyEvent(ev);
}
if (!ev->isAccepted())
- QFxPaintedItem::keyPressEvent(ev);
+ QmlGraphicsPaintedItem::keyPressEvent(ev);
}
-void QFxTextInput::mousePressEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsTextInput::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
if(d->focusOnPress){
setFocus(true);
setCursorVisible(true);
@@ -601,9 +601,9 @@ void QFxTextInput::mousePressEvent(QGraphicsSceneMouseEvent *event)
d->control->processEvent(event);
}
-bool QFxTextInput::event(QEvent* ev)
+bool QmlGraphicsTextInput::event(QEvent* ev)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
//Anything we don't deal with ourselves, pass to the control
bool handled = false;
switch(ev->type()){
@@ -615,21 +615,21 @@ bool QFxTextInput::event(QEvent* ev)
handled = d->control->processEvent(ev);
}
if(!handled)
- return QFxPaintedItem::event(ev);
+ return QmlGraphicsPaintedItem::event(ev);
return true;
}
-void QFxTextInput::geometryChanged(const QRectF &newGeometry,
+void QmlGraphicsTextInput::geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry)
{
if (newGeometry.width() != oldGeometry.width())
updateSize();
- QFxPaintedItem::geometryChanged(newGeometry, oldGeometry);
+ QmlGraphicsPaintedItem::geometryChanged(newGeometry, oldGeometry);
}
-void QFxTextInput::drawContents(QPainter *p, const QRect &r)
+void QmlGraphicsTextInput::drawContents(QPainter *p, const QRect &r)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
p->setRenderHint(QPainter::TextAntialiasing, true);
p->save();
p->setPen(QPen(d->color));
@@ -647,9 +647,9 @@ void QFxTextInput::drawContents(QPainter *p, const QRect &r)
p->restore();
}
-void QFxTextInput::selectAll()
+void QmlGraphicsTextInput::selectAll()
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
d->control->setSelection(0, d->control->text().length());
}
@@ -667,9 +667,9 @@ void QFxTextInput::selectAll()
filtering at the beginning of the animation and reenable it at the conclusion.
*/
-void QFxTextInputPrivate::init()
+void QmlGraphicsTextInputPrivate::init()
{
- Q_Q(QFxTextInput);
+ Q_Q(QmlGraphicsTextInput);
control->setCursorWidth(1);
control->setPasswordCharacter(QLatin1Char('*'));
control->setLayoutDirection(Qt::LeftToRight);
@@ -698,9 +698,9 @@ void QFxTextInputPrivate::init()
lastSelectionEnd = 0;
}
-void QFxTextInput::cursorPosChanged()
+void QmlGraphicsTextInput::cursorPosChanged()
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
emit cursorPositionChanged();
if(!d->control->hasSelectedText()){
@@ -715,9 +715,9 @@ void QFxTextInput::cursorPosChanged()
}
}
-void QFxTextInput::selectionChanged()
+void QmlGraphicsTextInput::selectionChanged()
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
emit selectedTextChanged();
if(d->lastSelectionStart != d->control->selectionStart()){
@@ -734,9 +734,9 @@ void QFxTextInput::selectionChanged()
}
}
-void QFxTextInput::q_textChanged()
+void QmlGraphicsTextInput::q_textChanged()
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
updateSize();
emit textChanged();
if(hasAcceptableInput() != d->oldValidity){
@@ -745,7 +745,7 @@ void QFxTextInput::q_textChanged()
}
}
-void QFxTextInput::updateRect(const QRect &r)
+void QmlGraphicsTextInput::updateRect(const QRect &r)
{
if(r == QRect())
clearCache();
@@ -754,9 +754,9 @@ void QFxTextInput::updateRect(const QRect &r)
update();
}
-void QFxTextInput::updateSize(bool needsRedraw)
+void QmlGraphicsTextInput::updateSize(bool needsRedraw)
{
- Q_D(QFxTextInput);
+ Q_D(QmlGraphicsTextInput);
int w = width();
int h = height();
setImplicitHeight(d->control->height());
diff --git a/src/declarative/fx/qfxtextinput.h b/src/declarative/graphicsitems/qmlgraphicstextinput_p.h
index 2540d41..7d3fef0 100644
--- a/src/declarative/fx/qfxtextinput.h
+++ b/src/declarative/graphicsitems/qmlgraphicstextinput_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,30 +21,29 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXTEXTINPUT_H
-#define QFXTEXTINPUT_H
+#ifndef QMLGRAPHICSTEXTINPUT_H
+#define QMLGRAPHICSTEXTINPUT_H
-#include "qfxtext.h"
-#include "qfxpainteditem.h"
+#include "qmlgraphicstext_p.h"
+#include "qmlgraphicspainteditem_p.h"
#include <QGraphicsSceneMouseEvent>
#include <QIntValidator>
@@ -53,9 +53,9 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxTextInputPrivate;
+class QmlGraphicsTextInputPrivate;
class QValidator;
-class Q_DECLARATIVE_EXPORT QFxTextInput : public QFxPaintedItem
+class Q_DECLARATIVE_EXPORT QmlGraphicsTextInput : public QmlGraphicsPaintedItem
{
Q_OBJECT
Q_ENUMS(HAlignment)
@@ -84,8 +84,8 @@ class Q_DECLARATIVE_EXPORT QFxTextInput : public QFxPaintedItem
Q_PROPERTY(bool focusOnPress READ focusOnPress WRITE setFocusOnPress)
public:
- QFxTextInput(QFxItem* parent=0);
- ~QFxTextInput();
+ QmlGraphicsTextInput(QmlGraphicsItem* parent=0);
+ ~QmlGraphicsTextInput();
enum EchoMode {//To match QLineEdit::EchoMode
Normal,
@@ -172,7 +172,7 @@ Q_SIGNALS:
void acceptableInputChanged();
protected:
- QFxTextInput(QFxTextInputPrivate &dd, QFxItem *parent);
+ QmlGraphicsTextInput(QmlGraphicsTextInputPrivate &dd, QmlGraphicsItem *parent);
virtual void geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry);
@@ -195,15 +195,15 @@ private Q_SLOTS:
void updateRect(const QRect &r = QRect());
private:
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxTextInput)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsTextInput)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxTextInput)
+QML_DECLARE_TYPE(QmlGraphicsTextInput)
QML_DECLARE_TYPE(QValidator)
QML_DECLARE_TYPE(QIntValidator)
QT_END_HEADER
-#endif // QFXTEXTINPUT_H
+#endif // QMLGRAPHICSTEXTINPUT_H
diff --git a/src/declarative/fx/qfxtextinput_p.h b/src/declarative/graphicsitems/qmlgraphicstextinput_p_p.h
index 3978be4..4e9f209 100644
--- a/src/declarative/fx/qfxtextinput_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicstextinput_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,31 +21,30 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXTEXTINPUT_P_H
-#define QFXTEXTINPUT_P_H
+#ifndef QMLGRAPHICSTEXTINPUT_P_H
+#define QMLGRAPHICSTEXTINPUT_P_H
-#include "qfxtextinput.h"
+#include "qmlgraphicstextinput_p.h"
#include "qml.h"
-#include "qfxpainteditem_p.h"
+#include "qmlgraphicspainteditem_p_p.h"
#include "private/qlinecontrol_p.h"
#include <QPointer>
//
@@ -59,19 +59,19 @@
QT_BEGIN_NAMESPACE
-class QFxTextInputPrivate : public QFxPaintedItemPrivate
+class QmlGraphicsTextInputPrivate : public QmlGraphicsPaintedItemPrivate
{
- Q_DECLARE_PUBLIC(QFxTextInput)
+ Q_DECLARE_PUBLIC(QmlGraphicsTextInput)
public:
- QFxTextInputPrivate() : control(new QLineControl(QString())),
- color((QRgb)0), style(QFxText::Normal),
- styleColor((QRgb)0), hAlign(QFxTextInput::AlignLeft),
+ QmlGraphicsTextInputPrivate() : control(new QLineControl(QString())),
+ color((QRgb)0), style(QmlGraphicsText::Normal),
+ styleColor((QRgb)0), hAlign(QmlGraphicsTextInput::AlignLeft),
hscroll(0), oldScroll(0), focused(false), focusOnPress(true),
cursorVisible(false)
{
}
- ~QFxTextInputPrivate()
+ ~QmlGraphicsTextInputPrivate()
{
delete control;
}
@@ -85,11 +85,11 @@ public:
QColor color;
QColor selectionColor;
QColor selectedTextColor;
- QFxText::TextStyle style;
+ QmlGraphicsText::TextStyle style;
QColor styleColor;
- QFxTextInput::HAlignment hAlign;
+ QmlGraphicsTextInput::HAlignment hAlign;
QPointer<QmlComponent> cursorComponent;
- QPointer<QFxItem> cursorItem;
+ QPointer<QmlGraphicsItem> cursorItem;
int lastSelectionStart;
int lastSelectionEnd;
diff --git a/src/declarative/fx/qfxvisualitemmodel.cpp b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
index 7ee6eea..686c0da 100644
--- a/src/declarative/fx/qfxvisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,38 +21,37 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qlistmodelinterface.h"
-#include "qfxitem.h"
+#include <private/qlistmodelinterface_p.h>
+#include "qmlgraphicsitem.h"
#include <qmlcontext.h>
#include <qmlexpression.h>
-#include "qmlpackage.h"
+#include <private/qmlpackage_p.h>
#include "qhash.h"
#include "qlist.h"
#include "private/qobject_p.h"
#include "private/qmetaobjectbuilder_p.h"
-#include "qmlopenmetaobject.h"
-#include "qmllistaccessor.h"
+#include <private/qmlopenmetaobject_p.h>
+#include <private/qmllistaccessor_p.h>
#include "qmlinfo.h"
-#include "qfxvisualitemmodel.h"
+#include "qmlgraphicsvisualitemmodel_p.h"
#include "private/qguard_p.h"
#include <QtCore/qdebug.h>
@@ -59,14 +59,14 @@ QML_DECLARE_TYPE(QListModelInterface)
QT_BEGIN_NAMESPACE
-class QFxVisualItemModelAttached : public QObject
+class QmlGraphicsVisualItemModelAttached : public QObject
{
Q_OBJECT
public:
- QFxVisualItemModelAttached(QObject *parent)
+ QmlGraphicsVisualItemModelAttached(QObject *parent)
: QObject(parent), m_index(0) {}
- ~QFxVisualItemModelAttached() {
+ ~QmlGraphicsVisualItemModelAttached() {
attachedProperties.remove(parent());
}
@@ -79,10 +79,10 @@ public:
}
}
- static QFxVisualItemModelAttached *properties(QObject *obj) {
- QFxVisualItemModelAttached *rv = attachedProperties.value(obj);
+ static QmlGraphicsVisualItemModelAttached *properties(QObject *obj) {
+ QmlGraphicsVisualItemModelAttached *rv = attachedProperties.value(obj);
if (!rv) {
- rv = new QFxVisualItemModelAttached(obj);
+ rv = new QmlGraphicsVisualItemModelAttached(obj);
attachedProperties.insert(obj, rv);
}
return rv;
@@ -94,37 +94,37 @@ Q_SIGNALS:
public:
int m_index;
- static QHash<QObject*, QFxVisualItemModelAttached*> attachedProperties;
+ static QHash<QObject*, QmlGraphicsVisualItemModelAttached*> attachedProperties;
};
-QHash<QObject*, QFxVisualItemModelAttached*> QFxVisualItemModelAttached::attachedProperties;
+QHash<QObject*, QmlGraphicsVisualItemModelAttached*> QmlGraphicsVisualItemModelAttached::attachedProperties;
-class QFxVisualItemModelPrivate : public QObjectPrivate
+class QmlGraphicsVisualItemModelPrivate : public QObjectPrivate
{
- Q_DECLARE_PUBLIC(QFxVisualItemModel)
+ Q_DECLARE_PUBLIC(QmlGraphicsVisualItemModel)
public:
- QFxVisualItemModelPrivate() : QObjectPrivate(), children(this) {}
+ QmlGraphicsVisualItemModelPrivate() : QObjectPrivate(), children(this) {}
- struct ItemList : public QmlConcreteList<QFxItem *>
+ struct ItemList : public QmlConcreteList<QmlGraphicsItem *>
{
- ItemList(QFxVisualItemModelPrivate *m) : QmlConcreteList<QFxItem *>(), model(m) {}
+ ItemList(QmlGraphicsVisualItemModelPrivate *m) : QmlConcreteList<QmlGraphicsItem *>(), model(m) {}
- void append(QFxItem *item);
+ void append(QmlGraphicsItem *item);
- QFxVisualItemModelPrivate *model;
+ QmlGraphicsVisualItemModelPrivate *model;
};
void itemAppended() {
- Q_Q(QFxVisualItemModel);
- QFxVisualItemModelAttached *attached = QFxVisualItemModelAttached::properties(children.last());
+ Q_Q(QmlGraphicsVisualItemModel);
+ QmlGraphicsVisualItemModelAttached *attached = QmlGraphicsVisualItemModelAttached::properties(children.last());
attached->setIndex(children.count()-1);
emit q->itemsInserted(children.count()-1, 1);
emit q->countChanged();
}
void emitChildrenChanged() {
- Q_Q(QFxVisualItemModel);
+ Q_Q(QmlGraphicsVisualItemModel);
emit q->childrenChanged();
}
ItemList children;
@@ -132,7 +132,7 @@ public:
/*!
- \qmlclass VisualItemModel QFxVisualItemModel
+ \qmlclass VisualItemModel QmlGraphicsVisualItemModel
\brief The VisualItemModel allows items to be provided to a view.
The children of the VisualItemModel are provided in a model which
@@ -160,14 +160,14 @@ public:
}
\endcode
*/
-QFxVisualItemModel::QFxVisualItemModel()
- : QFxVisualModel(*(new QFxVisualItemModelPrivate))
+QmlGraphicsVisualItemModel::QmlGraphicsVisualItemModel()
+ : QmlGraphicsVisualModel(*(new QmlGraphicsVisualItemModelPrivate))
{
}
-QmlList<QFxItem *> *QFxVisualItemModel::children()
+QmlList<QmlGraphicsItem *> *QmlGraphicsVisualItemModel::children()
{
- Q_D(QFxVisualItemModel);
+ Q_D(QmlGraphicsVisualItemModel);
return &(d->children);
}
@@ -176,37 +176,37 @@ QmlList<QFxItem *> *QFxVisualItemModel::children()
The number of items in the model. This property is readonly.
*/
-int QFxVisualItemModel::count() const
+int QmlGraphicsVisualItemModel::count() const
{
- Q_D(const QFxVisualItemModel);
+ Q_D(const QmlGraphicsVisualItemModel);
return d->children.count();
}
-bool QFxVisualItemModel::isValid() const
+bool QmlGraphicsVisualItemModel::isValid() const
{
return true;
}
-QFxItem *QFxVisualItemModel::item(int index, bool)
+QmlGraphicsItem *QmlGraphicsVisualItemModel::item(int index, bool)
{
- Q_D(QFxVisualItemModel);
+ Q_D(QmlGraphicsVisualItemModel);
return d->children.at(index);
}
-QFxVisualModel::ReleaseFlags QFxVisualItemModel::release(QFxItem *)
+QmlGraphicsVisualModel::ReleaseFlags QmlGraphicsVisualItemModel::release(QmlGraphicsItem *)
{
// Nothing to do
return 0;
}
-void QFxVisualItemModel::completeItem()
+void QmlGraphicsVisualItemModel::completeItem()
{
// Nothing to do
}
-QVariant QFxVisualItemModel::evaluate(int index, const QString &expression, QObject *objectContext)
+QVariant QmlGraphicsVisualItemModel::evaluate(int index, const QString &expression, QObject *objectContext)
{
- Q_D(QFxVisualItemModel);
+ Q_D(QmlGraphicsVisualItemModel);
QmlContext *ccontext = qmlContext(this);
QmlContext *ctxt = new QmlContext(ccontext);
ctxt->addDefaultObject(d->children.at(index));
@@ -217,41 +217,41 @@ QVariant QFxVisualItemModel::evaluate(int index, const QString &expression, QObj
return value;
}
-int QFxVisualItemModel::indexOf(QFxItem *item, QObject *) const
+int QmlGraphicsVisualItemModel::indexOf(QmlGraphicsItem *item, QObject *) const
{
- Q_D(const QFxVisualItemModel);
+ Q_D(const QmlGraphicsVisualItemModel);
return d->children.indexOf(item);
}
-void QFxVisualItemModelPrivate::ItemList::append(QFxItem *item)
+void QmlGraphicsVisualItemModelPrivate::ItemList::append(QmlGraphicsItem *item)
{
- QmlConcreteList<QFxItem*>::append(item);
+ QmlConcreteList<QmlGraphicsItem*>::append(item);
item->QObject::setParent(model->q_ptr);
model->itemAppended();
model->emitChildrenChanged();
}
-QFxVisualItemModelAttached *QFxVisualItemModel::qmlAttachedProperties(QObject *obj)
+QmlGraphicsVisualItemModelAttached *QmlGraphicsVisualItemModel::qmlAttachedProperties(QObject *obj)
{
- return QFxVisualItemModelAttached::properties(obj);
+ return QmlGraphicsVisualItemModelAttached::properties(obj);
}
-class QFxVisualDataModelParts;
-class QFxVisualDataModelData;
-class QFxVisualDataModelPrivate : public QObjectPrivate
+class QmlGraphicsVisualDataModelParts;
+class QmlGraphicsVisualDataModelData;
+class QmlGraphicsVisualDataModelPrivate : public QObjectPrivate
{
public:
- QFxVisualDataModelPrivate(QmlContext *);
+ QmlGraphicsVisualDataModelPrivate(QmlContext *);
- static QFxVisualDataModelPrivate *get(QFxVisualDataModel *m) {
- return static_cast<QFxVisualDataModelPrivate *>(QObjectPrivate::get(m));
+ static QmlGraphicsVisualDataModelPrivate *get(QmlGraphicsVisualDataModel *m) {
+ return static_cast<QmlGraphicsVisualDataModelPrivate *>(QObjectPrivate::get(m));
}
QGuard<QListModelInterface> m_listModelInterface;
QGuard<QAbstractItemModel> m_abstractItemModel;
- QGuard<QFxVisualDataModel> m_visualItemModel;
+ QGuard<QmlGraphicsVisualDataModel> m_visualItemModel;
QString m_part;
QmlComponent *m_delegate;
@@ -334,10 +334,10 @@ public:
Cache m_cache;
QHash<QObject *, QmlPackage*> m_packaged;
- QFxVisualDataModelParts *m_parts;
- friend class QFxVisualItemParts;
+ QmlGraphicsVisualDataModelParts *m_parts;
+ friend class QmlGraphicsVisualItemParts;
- QFxVisualDataModelData *data(QObject *item);
+ QmlGraphicsVisualDataModelData *data(QObject *item);
QVariant m_modelVariant;
QmlListAccessor *m_listAccessor;
@@ -355,26 +355,26 @@ public:
}
};
-class QFxVisualDataModelDataMetaObject : public QmlOpenMetaObject
+class QmlGraphicsVisualDataModelDataMetaObject : public QmlOpenMetaObject
{
public:
- QFxVisualDataModelDataMetaObject(QObject *parent)
+ QmlGraphicsVisualDataModelDataMetaObject(QObject *parent)
: QmlOpenMetaObject(parent) {}
virtual QVariant propertyCreated(int, QMetaPropertyBuilder &);
virtual int createProperty(const char *, const char *);
private:
- friend class QFxVisualDataModelData;
+ friend class QmlGraphicsVisualDataModelData;
QList<int> roles;
};
-class QFxVisualDataModelData : public QObject
+class QmlGraphicsVisualDataModelData : public QObject
{
Q_OBJECT
public:
- QFxVisualDataModelData(int index, QFxVisualDataModel *model);
- ~QFxVisualDataModelData();
+ QmlGraphicsVisualDataModelData(int index, QmlGraphicsVisualDataModel *model);
+ ~QmlGraphicsVisualDataModelData();
Q_PROPERTY(int index READ index NOTIFY indexChanged)
int index() const;
@@ -388,37 +388,37 @@ Q_SIGNALS:
void indexChanged();
private:
- friend class QFxVisualDataModelDataMetaObject;
+ friend class QmlGraphicsVisualDataModelDataMetaObject;
int m_index;
- QGuard<QFxVisualDataModel> m_model;
- QFxVisualDataModelDataMetaObject *m_meta;
+ QGuard<QmlGraphicsVisualDataModel> m_model;
+ QmlGraphicsVisualDataModelDataMetaObject *m_meta;
};
-int QFxVisualDataModelData::count() const
+int QmlGraphicsVisualDataModelData::count() const
{
return m_meta->count();
}
-int QFxVisualDataModelData::role(int id) const
+int QmlGraphicsVisualDataModelData::role(int id) const
{
Q_ASSERT(id >= 0 && id < count());
return m_meta->roles.at(id);
}
-void QFxVisualDataModelData::setValue(int id, const QVariant &val)
+void QmlGraphicsVisualDataModelData::setValue(int id, const QVariant &val)
{
m_meta->setValue(id, val);
}
-int QFxVisualDataModelDataMetaObject::createProperty(const char *name, const char *type)
+int QmlGraphicsVisualDataModelDataMetaObject::createProperty(const char *name, const char *type)
{
- QFxVisualDataModelData *data =
- static_cast<QFxVisualDataModelData *>(object());
+ QmlGraphicsVisualDataModelData *data =
+ static_cast<QmlGraphicsVisualDataModelData *>(object());
if (!data->m_model)
return -1;
- QFxVisualDataModelPrivate *model = QFxVisualDataModelPrivate::get(data->m_model);
+ QmlGraphicsVisualDataModelPrivate *model = QmlGraphicsVisualDataModelPrivate::get(data->m_model);
if ((!model->m_listModelInterface || !model->m_abstractItemModel) && model->m_listAccessor) {
model->ensureRoles();
@@ -439,15 +439,15 @@ int QFxVisualDataModelDataMetaObject::createProperty(const char *name, const cha
}
QVariant
-QFxVisualDataModelDataMetaObject::propertyCreated(int, QMetaPropertyBuilder &prop)
+QmlGraphicsVisualDataModelDataMetaObject::propertyCreated(int, QMetaPropertyBuilder &prop)
{
prop.setWritable(false);
- QFxVisualDataModelData *data =
- static_cast<QFxVisualDataModelData *>(object());
+ QmlGraphicsVisualDataModelData *data =
+ static_cast<QmlGraphicsVisualDataModelData *>(object());
Q_ASSERT(data->m_model);
- QFxVisualDataModelPrivate *model = QFxVisualDataModelPrivate::get(data->m_model);
+ QmlGraphicsVisualDataModelPrivate *model = QmlGraphicsVisualDataModelPrivate::get(data->m_model);
QString name = QString::fromUtf8(prop.name());
if ((!model->m_listModelInterface || !model->m_abstractItemModel) && model->m_listAccessor) {
@@ -493,109 +493,109 @@ QFxVisualDataModelDataMetaObject::propertyCreated(int, QMetaPropertyBuilder &pro
return QVariant();
}
-QFxVisualDataModelData::QFxVisualDataModelData(int index,
- QFxVisualDataModel *model)
+QmlGraphicsVisualDataModelData::QmlGraphicsVisualDataModelData(int index,
+ QmlGraphicsVisualDataModel *model)
: m_index(index), m_model(model),
- m_meta(new QFxVisualDataModelDataMetaObject(this))
+ m_meta(new QmlGraphicsVisualDataModelDataMetaObject(this))
{
}
-QFxVisualDataModelData::~QFxVisualDataModelData()
+QmlGraphicsVisualDataModelData::~QmlGraphicsVisualDataModelData()
{
}
-int QFxVisualDataModelData::index() const
+int QmlGraphicsVisualDataModelData::index() const
{
return m_index;
}
// This is internal only - it should not be set from qml
-void QFxVisualDataModelData::setIndex(int index)
+void QmlGraphicsVisualDataModelData::setIndex(int index)
{
m_index = index;
emit indexChanged();
}
-class QFxVisualDataModelPartsMetaObject : public QmlOpenMetaObject
+class QmlGraphicsVisualDataModelPartsMetaObject : public QmlOpenMetaObject
{
public:
- QFxVisualDataModelPartsMetaObject(QObject *parent)
+ QmlGraphicsVisualDataModelPartsMetaObject(QObject *parent)
: QmlOpenMetaObject(parent) {}
virtual QVariant propertyCreated(int, QMetaPropertyBuilder &);
};
-class QFxVisualDataModelParts : public QObject
+class QmlGraphicsVisualDataModelParts : public QObject
{
Q_OBJECT
public:
- QFxVisualDataModelParts(QFxVisualDataModel *parent);
+ QmlGraphicsVisualDataModelParts(QmlGraphicsVisualDataModel *parent);
private:
- friend class QFxVisualDataModelPartsMetaObject;
- QFxVisualDataModel *model;
+ friend class QmlGraphicsVisualDataModelPartsMetaObject;
+ QmlGraphicsVisualDataModel *model;
};
QVariant
-QFxVisualDataModelPartsMetaObject::propertyCreated(int, QMetaPropertyBuilder &prop)
+QmlGraphicsVisualDataModelPartsMetaObject::propertyCreated(int, QMetaPropertyBuilder &prop)
{
prop.setWritable(false);
- QFxVisualDataModel *m = new QFxVisualDataModel;
+ QmlGraphicsVisualDataModel *m = new QmlGraphicsVisualDataModel;
m->setParent(object());
m->setPart(QString::fromUtf8(prop.name()));
- m->setModel(QVariant::fromValue(static_cast<QFxVisualDataModelParts *>(object())->model));
+ m->setModel(QVariant::fromValue(static_cast<QmlGraphicsVisualDataModelParts *>(object())->model));
QVariant var = QVariant::fromValue((QObject *)m);
return var;
}
-QFxVisualDataModelParts::QFxVisualDataModelParts(QFxVisualDataModel *parent)
+QmlGraphicsVisualDataModelParts::QmlGraphicsVisualDataModelParts(QmlGraphicsVisualDataModel *parent)
: QObject(parent), model(parent)
{
- new QFxVisualDataModelPartsMetaObject(this);
+ new QmlGraphicsVisualDataModelPartsMetaObject(this);
}
-QFxVisualDataModelPrivate::QFxVisualDataModelPrivate(QmlContext *ctxt)
+QmlGraphicsVisualDataModelPrivate::QmlGraphicsVisualDataModelPrivate(QmlContext *ctxt)
: m_listModelInterface(0), m_abstractItemModel(0), m_visualItemModel(0), m_delegate(0)
, m_context(ctxt), m_parts(0), m_listAccessor(0)
{
}
-QFxVisualDataModelData *QFxVisualDataModelPrivate::data(QObject *item)
+QmlGraphicsVisualDataModelData *QmlGraphicsVisualDataModelPrivate::data(QObject *item)
{
- QFxVisualDataModelData *dataItem =
- item->findChild<QFxVisualDataModelData *>();
+ QmlGraphicsVisualDataModelData *dataItem =
+ item->findChild<QmlGraphicsVisualDataModelData *>();
Q_ASSERT(dataItem);
return dataItem;
}
-QFxVisualDataModel::QFxVisualDataModel()
-: QFxVisualModel(*(new QFxVisualDataModelPrivate(0)))
+QmlGraphicsVisualDataModel::QmlGraphicsVisualDataModel()
+: QmlGraphicsVisualModel(*(new QmlGraphicsVisualDataModelPrivate(0)))
{
}
-QFxVisualDataModel::QFxVisualDataModel(QmlContext *ctxt)
-: QFxVisualModel(*(new QFxVisualDataModelPrivate(ctxt)))
+QmlGraphicsVisualDataModel::QmlGraphicsVisualDataModel(QmlContext *ctxt)
+: QmlGraphicsVisualModel(*(new QmlGraphicsVisualDataModelPrivate(ctxt)))
{
}
-QFxVisualDataModel::~QFxVisualDataModel()
+QmlGraphicsVisualDataModel::~QmlGraphicsVisualDataModel()
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
if (d->m_listAccessor)
delete d->m_listAccessor;
}
-QVariant QFxVisualDataModel::model() const
+QVariant QmlGraphicsVisualDataModel::model() const
{
- Q_D(const QFxVisualDataModel);
+ Q_D(const QmlGraphicsVisualDataModel);
return d->m_modelVariant;
}
-void QFxVisualDataModel::setModel(const QVariant &model)
+void QmlGraphicsVisualDataModel::setModel(const QVariant &model)
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
delete d->m_listAccessor;
d->m_listAccessor = 0;
d->m_modelVariant = model;
@@ -656,7 +656,7 @@ void QFxVisualDataModel::setModel(const QVariant &model)
this, SLOT(_q_dataChanged(const QModelIndex&,const QModelIndex&)));
return;
}
- if ((d->m_visualItemModel = qvariant_cast<QFxVisualDataModel *>(model))) {
+ if ((d->m_visualItemModel = qvariant_cast<QmlGraphicsVisualDataModel *>(model))) {
QObject::connect(d->m_visualItemModel, SIGNAL(itemsInserted(int,int)),
this, SIGNAL(itemsInserted(int,int)));
QObject::connect(d->m_visualItemModel, SIGNAL(itemsRemoved(int,int)),
@@ -677,17 +677,17 @@ void QFxVisualDataModel::setModel(const QVariant &model)
}
}
-QmlComponent *QFxVisualDataModel::delegate() const
+QmlComponent *QmlGraphicsVisualDataModel::delegate() const
{
- Q_D(const QFxVisualDataModel);
+ Q_D(const QmlGraphicsVisualDataModel);
if (d->m_visualItemModel)
return d->m_visualItemModel->delegate();
return d->m_delegate;
}
-void QFxVisualDataModel::setDelegate(QmlComponent *delegate)
+void QmlGraphicsVisualDataModel::setDelegate(QmlComponent *delegate)
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
d->m_delegate = delegate;
if (d->modelCount()) {
emit itemsInserted(0, d->modelCount());
@@ -695,27 +695,27 @@ void QFxVisualDataModel::setDelegate(QmlComponent *delegate)
}
}
-QString QFxVisualDataModel::part() const
+QString QmlGraphicsVisualDataModel::part() const
{
- Q_D(const QFxVisualDataModel);
+ Q_D(const QmlGraphicsVisualDataModel);
return d->m_part;
}
-void QFxVisualDataModel::setPart(const QString &part)
+void QmlGraphicsVisualDataModel::setPart(const QString &part)
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
d->m_part = part;
}
-int QFxVisualDataModel::count() const
+int QmlGraphicsVisualDataModel::count() const
{
- Q_D(const QFxVisualDataModel);
+ Q_D(const QmlGraphicsVisualDataModel);
return d->modelCount();
}
-QFxItem *QFxVisualDataModel::item(int index, bool complete)
+QmlGraphicsItem *QmlGraphicsVisualDataModel::item(int index, bool complete)
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
if (d->m_visualItemModel)
return d->m_visualItemModel->item(index, d->m_part.toUtf8(), complete);
return item(index, QByteArray(), complete);
@@ -724,9 +724,9 @@ QFxItem *QFxVisualDataModel::item(int index, bool complete)
/*
Returns ReleaseStatus flags.
*/
-QFxVisualDataModel::ReleaseFlags QFxVisualDataModel::release(QFxItem *item)
+QmlGraphicsVisualDataModel::ReleaseFlags QmlGraphicsVisualDataModel::release(QmlGraphicsItem *item)
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
if (d->m_visualItemModel)
return d->m_visualItemModel->release(item);
@@ -757,17 +757,17 @@ QFxVisualDataModel::ReleaseFlags QFxVisualDataModel::release(QFxItem *item)
return stat;
}
-QObject *QFxVisualDataModel::parts()
+QObject *QmlGraphicsVisualDataModel::parts()
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
if (!d->m_parts)
- d->m_parts = new QFxVisualDataModelParts(this);
+ d->m_parts = new QmlGraphicsVisualDataModelParts(this);
return d->m_parts;
}
-QFxItem *QFxVisualDataModel::item(int index, const QByteArray &viewId, bool complete)
+QmlGraphicsItem *QmlGraphicsVisualDataModel::item(int index, const QByteArray &viewId, bool complete)
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
if (d->m_visualItemModel)
return d->m_visualItemModel->item(index, viewId, complete);
@@ -779,7 +779,7 @@ QFxItem *QFxVisualDataModel::item(int index, const QByteArray &viewId, bool comp
QmlContext *ccontext = d->m_context;
if (!ccontext) ccontext = qmlContext(this);
QmlContext *ctxt = new QmlContext(ccontext);
- QFxVisualDataModelData *data = new QFxVisualDataModelData(index, this);
+ QmlGraphicsVisualDataModelData *data = new QmlGraphicsVisualDataModelData(index, this);
ctxt->setContextProperty(QLatin1String("model"), data);
ctxt->addDefaultObject(data);
nobj = d->m_delegate->beginCreate(ctxt);
@@ -797,27 +797,27 @@ QFxItem *QFxVisualDataModel::item(int index, const QByteArray &viewId, bool comp
qWarning() << d->m_delegate->errors();
}
}
- QFxItem *item = qobject_cast<QFxItem *>(nobj);
+ QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem *>(nobj);
if (!item) {
QmlPackage *package = qobject_cast<QmlPackage *>(nobj);
if (package) {
QObject *o = package->part(QString::fromUtf8(viewId));
- item = qobject_cast<QFxItem *>(o);
+ item = qobject_cast<QmlGraphicsItem *>(o);
if (item)
d->m_packaged.insertMulti(item, package);
}
}
if (!item) {
d->m_cache.releaseItem(nobj);
- qmlInfo(QFxVisualDataModel::tr("Delegate component must be Item type."), d->m_delegate);
+ qmlInfo(QmlGraphicsVisualDataModel::tr("Delegate component must be Item type."), d->m_delegate);
}
return item;
}
-void QFxVisualDataModel::completeItem()
+void QmlGraphicsVisualDataModel::completeItem()
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
if (d->m_visualItemModel) {
d->m_visualItemModel->completeItem();
return;
@@ -826,9 +826,9 @@ void QFxVisualDataModel::completeItem()
d->m_delegate->completeCreate();
}
-QVariant QFxVisualDataModel::evaluate(int index, const QString &expression, QObject *objectContext)
+QVariant QmlGraphicsVisualDataModel::evaluate(int index, const QString &expression, QObject *objectContext)
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
if (d->m_visualItemModel)
return d->m_visualItemModel->evaluate(index, expression, objectContext);
@@ -838,7 +838,7 @@ QVariant QFxVisualDataModel::evaluate(int index, const QString &expression, QObj
QVariant value;
QObject *nobj = d->m_cache.item(index);
if (nobj) {
- QFxItem *item = qobject_cast<QFxItem *>(nobj);
+ QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem *>(nobj);
if (item) {
QmlExpression e(qmlContext(item), expression, objectContext);
e.setTrackChange(false);
@@ -848,7 +848,7 @@ QVariant QFxVisualDataModel::evaluate(int index, const QString &expression, QObj
QmlContext *ccontext = d->m_context;
if (!ccontext) ccontext = qmlContext(this);
QmlContext *ctxt = new QmlContext(ccontext);
- QFxVisualDataModelData *data = new QFxVisualDataModelData(index, this);
+ QmlGraphicsVisualDataModelData *data = new QmlGraphicsVisualDataModelData(index, this);
ctxt->addDefaultObject(data);
QmlExpression e(ctxt, expression, objectContext);
e.setTrackChange(false);
@@ -860,7 +860,7 @@ QVariant QFxVisualDataModel::evaluate(int index, const QString &expression, QObj
return value;
}
-int QFxVisualDataModel::indexOf(QFxItem *item, QObject *objectContext) const
+int QmlGraphicsVisualDataModel::indexOf(QmlGraphicsItem *item, QObject *objectContext) const
{
QmlExpression e(qmlContext(item), QLatin1String("index"), objectContext);
e.setTrackChange(false);
@@ -870,15 +870,15 @@ int QFxVisualDataModel::indexOf(QFxItem *item, QObject *objectContext) const
return -1;
}
-void QFxVisualDataModel::_q_itemsChanged(int index, int count,
+void QmlGraphicsVisualDataModel::_q_itemsChanged(int index, int count,
const QList<int> &roles)
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
// XXX - highly inefficient
for (int ii = index; ii < index + count; ++ii) {
if (QObject *item = d->m_cache.item(ii)) {
- QFxVisualDataModelData *data = d->data(item);
+ QmlGraphicsVisualDataModelData *data = d->data(item);
for (int prop = 0; prop < data->count(); ++prop) {
@@ -897,22 +897,22 @@ void QFxVisualDataModel::_q_itemsChanged(int index, int count,
}
}
-void QFxVisualDataModel::_q_itemsInserted(int index, int count)
+void QmlGraphicsVisualDataModel::_q_itemsInserted(int index, int count)
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
// XXX - highly inefficient
- QHash<int,QFxVisualDataModelPrivate::ObjectRef> items;
- for (QHash<int,QFxVisualDataModelPrivate::ObjectRef>::Iterator iter = d->m_cache.begin();
+ QHash<int,QmlGraphicsVisualDataModelPrivate::ObjectRef> items;
+ for (QHash<int,QmlGraphicsVisualDataModelPrivate::ObjectRef>::Iterator iter = d->m_cache.begin();
iter != d->m_cache.end(); ) {
if (iter.key() >= index) {
- QFxVisualDataModelPrivate::ObjectRef objRef = *iter;
+ QmlGraphicsVisualDataModelPrivate::ObjectRef objRef = *iter;
int index = iter.key() + count;
iter = d->m_cache.erase(iter);
items.insert(index, objRef);
- QFxVisualDataModelData *data = d->data(objRef.obj);
+ QmlGraphicsVisualDataModelData *data = d->data(objRef.obj);
data->setIndex(index);
} else {
++iter;
@@ -924,25 +924,25 @@ void QFxVisualDataModel::_q_itemsInserted(int index, int count)
emit countChanged();
}
-void QFxVisualDataModel::_q_itemsRemoved(int index, int count)
+void QmlGraphicsVisualDataModel::_q_itemsRemoved(int index, int count)
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
// XXX - highly inefficient
- QHash<int, QFxVisualDataModelPrivate::ObjectRef> items;
- for (QHash<int, QFxVisualDataModelPrivate::ObjectRef>::Iterator iter = d->m_cache.begin();
+ QHash<int, QmlGraphicsVisualDataModelPrivate::ObjectRef> items;
+ for (QHash<int, QmlGraphicsVisualDataModelPrivate::ObjectRef>::Iterator iter = d->m_cache.begin();
iter != d->m_cache.end(); ) {
if (iter.key() >= index && iter.key() < index + count) {
- QFxVisualDataModelPrivate::ObjectRef objRef = *iter;
+ QmlGraphicsVisualDataModelPrivate::ObjectRef objRef = *iter;
iter = d->m_cache.erase(iter);
items.insertMulti(-1, objRef); //XXX perhaps better to maintain separately
- QFxVisualDataModelData *data = d->data(objRef.obj);
+ QmlGraphicsVisualDataModelData *data = d->data(objRef.obj);
data->setIndex(-1);
} else if (iter.key() >= index + count) {
- QFxVisualDataModelPrivate::ObjectRef objRef = *iter;
+ QmlGraphicsVisualDataModelPrivate::ObjectRef objRef = *iter;
int index = iter.key() - count;
iter = d->m_cache.erase(iter);
items.insert(index, objRef);
- QFxVisualDataModelData *data = d->data(objRef.obj);
+ QmlGraphicsVisualDataModelData *data = d->data(objRef.obj);
data->setIndex(index);
} else {
++iter;
@@ -954,38 +954,38 @@ void QFxVisualDataModel::_q_itemsRemoved(int index, int count)
emit countChanged();
}
-void QFxVisualDataModel::_q_itemsMoved(int from, int to, int count)
+void QmlGraphicsVisualDataModel::_q_itemsMoved(int from, int to, int count)
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
// XXX - highly inefficient
- QHash<int,QFxVisualDataModelPrivate::ObjectRef> items;
- for (QHash<int,QFxVisualDataModelPrivate::ObjectRef>::Iterator iter = d->m_cache.begin();
+ QHash<int,QmlGraphicsVisualDataModelPrivate::ObjectRef> items;
+ for (QHash<int,QmlGraphicsVisualDataModelPrivate::ObjectRef>::Iterator iter = d->m_cache.begin();
iter != d->m_cache.end(); ) {
if (iter.key() >= from && iter.key() < from + count) {
- QFxVisualDataModelPrivate::ObjectRef objRef = *iter;
+ QmlGraphicsVisualDataModelPrivate::ObjectRef objRef = *iter;
int index = iter.key() - from + to;
iter = d->m_cache.erase(iter);
items.insert(index, objRef);
- QFxVisualDataModelData *data = d->data(objRef.obj);
+ QmlGraphicsVisualDataModelData *data = d->data(objRef.obj);
data->setIndex(index);
} else {
++iter;
}
}
- for (QHash<int,QFxVisualDataModelPrivate::ObjectRef>::Iterator iter = d->m_cache.begin();
+ for (QHash<int,QmlGraphicsVisualDataModelPrivate::ObjectRef>::Iterator iter = d->m_cache.begin();
iter != d->m_cache.end(); ) {
if (iter.key() >= qMin(from,to) && iter.key() < qMax(from+count,to+count)) {
- QFxVisualDataModelPrivate::ObjectRef objRef = *iter;
+ QmlGraphicsVisualDataModelPrivate::ObjectRef objRef = *iter;
int index = iter.key() + from - to;
iter = d->m_cache.erase(iter);
items.insert(index, objRef);
- QFxVisualDataModelData *data = d->data(objRef.obj);
+ QmlGraphicsVisualDataModelData *data = d->data(objRef.obj);
data->setIndex(index);
} else {
++iter;
@@ -996,37 +996,38 @@ void QFxVisualDataModel::_q_itemsMoved(int from, int to, int count)
emit itemsMoved(from, to, count);
}
-void QFxVisualDataModel::_q_rowsInserted(const QModelIndex &, int begin, int end)
+void QmlGraphicsVisualDataModel::_q_rowsInserted(const QModelIndex &, int begin, int end)
{
_q_itemsInserted(begin, end - begin + 1);
}
-void QFxVisualDataModel::_q_rowsRemoved(const QModelIndex &, int begin, int end)
+void QmlGraphicsVisualDataModel::_q_rowsRemoved(const QModelIndex &, int begin, int end)
{
_q_itemsRemoved(begin, end - begin + 1);
}
-void QFxVisualDataModel::_q_dataChanged(const QModelIndex &begin, const QModelIndex &end)
+void QmlGraphicsVisualDataModel::_q_dataChanged(const QModelIndex &begin, const QModelIndex &end)
{
- Q_D(QFxVisualDataModel);
+ Q_D(QmlGraphicsVisualDataModel);
_q_itemsChanged(begin.row(), end.row() - begin.row() + 1, d->m_roles);
}
-void QFxVisualDataModel::_q_createdPackage(int index, QmlPackage *package)
+void QmlGraphicsVisualDataModel::_q_createdPackage(int index, QmlPackage *package)
{
- Q_D(QFxVisualDataModel);
- emit createdItem(index, qobject_cast<QFxItem*>(package->part(d->m_part)));
+ Q_D(QmlGraphicsVisualDataModel);
+ emit createdItem(index, qobject_cast<QmlGraphicsItem*>(package->part(d->m_part)));
}
-void QFxVisualDataModel::_q_destroyingPackage(QmlPackage *package)
+void QmlGraphicsVisualDataModel::_q_destroyingPackage(QmlPackage *package)
{
- Q_D(QFxVisualDataModel);
- emit destroyingItem(qobject_cast<QFxItem*>(package->part(d->m_part)));
+ Q_D(QmlGraphicsVisualDataModel);
+ emit destroyingItem(qobject_cast<QmlGraphicsItem*>(package->part(d->m_part)));
}
-QML_DEFINE_NOCREATE_TYPE(QFxVisualModel);
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,VisualItemModel,QFxVisualItemModel)
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,VisualDataModel,QFxVisualDataModel)
+QML_DEFINE_NOCREATE_TYPE(QmlGraphicsVisualModel);
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,VisualItemModel,QmlGraphicsVisualItemModel)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,VisualDataModel,QmlGraphicsVisualDataModel)
QT_END_NAMESPACE
-#include "qfxvisualitemmodel.moc"
+
+#include "qmlgraphicsvisualitemmodel.moc"
diff --git a/src/declarative/fx/qfxvisualitemmodel.h b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h
index 8e33279..8b0a8f5 100644
--- a/src/declarative/fx/qfxvisualitemmodel.h
+++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXVISUALDATAMODEL_H
-#define QFXVISUALDATAMODEL_H
+#ifndef QMLGRAPHICSVISUALDATAMODEL_H
+#define QMLGRAPHICSVISUALDATAMODEL_H
#include <QtCore/qobject.h>
#include <QtCore/qabstractitemmodel.h>
@@ -58,88 +58,88 @@ QT_MODULE(Declarative)
*****************************************************************************
*****************************************************************************/
-class QFxItem;
+class QmlGraphicsItem;
class QmlComponent;
class QmlPackage;
-class QFxVisualDataModelPrivate;
+class QmlGraphicsVisualDataModelPrivate;
-class Q_DECLARATIVE_EXPORT QFxVisualModel : public QObject
+class Q_DECLARATIVE_EXPORT QmlGraphicsVisualModel : public QObject
{
Q_OBJECT
Q_PROPERTY(int count READ count NOTIFY countChanged)
public:
- QFxVisualModel() {}
- virtual ~QFxVisualModel() {}
+ QmlGraphicsVisualModel() {}
+ virtual ~QmlGraphicsVisualModel() {}
enum ReleaseFlag { Referenced = 0x01, Destroyed = 0x02 };
Q_DECLARE_FLAGS(ReleaseFlags, ReleaseFlag)
virtual int count() const = 0;
virtual bool isValid() const = 0;
- virtual QFxItem *item(int index, bool complete=true) = 0;
- virtual ReleaseFlags release(QFxItem *item) = 0;
+ virtual QmlGraphicsItem *item(int index, bool complete=true) = 0;
+ virtual ReleaseFlags release(QmlGraphicsItem *item) = 0;
virtual void completeItem() = 0;
virtual QVariant evaluate(int index, const QString &expression, QObject *objectContext) = 0;
- virtual int indexOf(QFxItem *item, QObject *objectContext) const = 0;
+ virtual int indexOf(QmlGraphicsItem *item, QObject *objectContext) const = 0;
Q_SIGNALS:
void countChanged();
void itemsInserted(int index, int count);
void itemsRemoved(int index, int count);
void itemsMoved(int from, int to, int count);
- void createdItem(int index, QFxItem *item);
- void destroyingItem(QFxItem *item);
+ void createdItem(int index, QmlGraphicsItem *item);
+ void destroyingItem(QmlGraphicsItem *item);
protected:
- QFxVisualModel(QObjectPrivate &dd, QObject *parent = 0)
+ QmlGraphicsVisualModel(QObjectPrivate &dd, QObject *parent = 0)
: QObject(dd, parent) {}
private:
- Q_DISABLE_COPY(QFxVisualModel)
+ Q_DISABLE_COPY(QmlGraphicsVisualModel)
};
-class QFxVisualItemModelAttached;
-class QFxVisualItemModelPrivate;
-class Q_DECLARATIVE_EXPORT QFxVisualItemModel : public QFxVisualModel
+class QmlGraphicsVisualItemModelAttached;
+class QmlGraphicsVisualItemModelPrivate;
+class Q_DECLARATIVE_EXPORT QmlGraphicsVisualItemModel : public QmlGraphicsVisualModel
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QFxVisualItemModel)
+ Q_DECLARE_PRIVATE(QmlGraphicsVisualItemModel)
- Q_PROPERTY(QmlList<QFxItem *>* children READ children NOTIFY childrenChanged DESIGNABLE false)
+ Q_PROPERTY(QmlList<QmlGraphicsItem *>* children READ children NOTIFY childrenChanged DESIGNABLE false)
Q_CLASSINFO("DefaultProperty", "children")
public:
- QFxVisualItemModel();
- virtual ~QFxVisualItemModel() {}
+ QmlGraphicsVisualItemModel();
+ virtual ~QmlGraphicsVisualItemModel() {}
virtual int count() const;
virtual bool isValid() const;
- virtual QFxItem *item(int index, bool complete=true);
- virtual ReleaseFlags release(QFxItem *item);
+ virtual QmlGraphicsItem *item(int index, bool complete=true);
+ virtual ReleaseFlags release(QmlGraphicsItem *item);
virtual void completeItem();
virtual QVariant evaluate(int index, const QString &expression, QObject *objectContext);
- virtual int indexOf(QFxItem *item, QObject *objectContext) const;
+ virtual int indexOf(QmlGraphicsItem *item, QObject *objectContext) const;
- QmlList<QFxItem *> *children();
+ QmlList<QmlGraphicsItem *> *children();
- static QFxVisualItemModelAttached *qmlAttachedProperties(QObject *obj);
+ static QmlGraphicsVisualItemModelAttached *qmlAttachedProperties(QObject *obj);
-signals:
+Q_SIGNALS:
void childrenChanged();
private:
- Q_DISABLE_COPY(QFxVisualItemModel)
+ Q_DISABLE_COPY(QmlGraphicsVisualItemModel)
};
-class Q_DECLARATIVE_EXPORT QFxVisualDataModel : public QFxVisualModel
+class Q_DECLARATIVE_EXPORT QmlGraphicsVisualDataModel : public QmlGraphicsVisualModel
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QFxVisualDataModel)
+ Q_DECLARE_PRIVATE(QmlGraphicsVisualDataModel)
Q_PROPERTY(QVariant model READ model WRITE setModel)
Q_PROPERTY(QmlComponent *delegate READ delegate WRITE setDelegate)
@@ -147,9 +147,9 @@ class Q_DECLARATIVE_EXPORT QFxVisualDataModel : public QFxVisualModel
Q_PROPERTY(QObject *parts READ parts CONSTANT)
Q_CLASSINFO("DefaultProperty", "delegate")
public:
- QFxVisualDataModel();
- QFxVisualDataModel(QmlContext *);
- virtual ~QFxVisualDataModel();
+ QmlGraphicsVisualDataModel();
+ QmlGraphicsVisualDataModel(QmlContext *);
+ virtual ~QmlGraphicsVisualDataModel();
QVariant model() const;
void setModel(const QVariant &);
@@ -162,13 +162,13 @@ public:
int count() const;
bool isValid() const { return delegate() != 0; }
- QFxItem *item(int index, bool complete=true);
- QFxItem *item(int index, const QByteArray &, bool complete=true);
- ReleaseFlags release(QFxItem *item);
+ QmlGraphicsItem *item(int index, bool complete=true);
+ QmlGraphicsItem *item(int index, const QByteArray &, bool complete=true);
+ ReleaseFlags release(QmlGraphicsItem *item);
void completeItem();
QVariant evaluate(int index, const QString &expression, QObject *objectContext);
- int indexOf(QFxItem *item, QObject *objectContext) const;
+ int indexOf(QmlGraphicsItem *item, QObject *objectContext) const;
QObject *parts();
@@ -188,16 +188,16 @@ private Q_SLOTS:
void _q_destroyingPackage(QmlPackage *package);
private:
- Q_DISABLE_COPY(QFxVisualDataModel)
+ Q_DISABLE_COPY(QmlGraphicsVisualDataModel)
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxVisualModel)
-QML_DECLARE_TYPE(QFxVisualItemModel)
-QML_DECLARE_TYPEINFO(QFxVisualItemModel, QML_HAS_ATTACHED_PROPERTIES)
-QML_DECLARE_TYPE(QFxVisualDataModel)
+QML_DECLARE_TYPE(QmlGraphicsVisualModel)
+QML_DECLARE_TYPE(QmlGraphicsVisualItemModel)
+QML_DECLARE_TYPEINFO(QmlGraphicsVisualItemModel, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(QmlGraphicsVisualDataModel)
QT_END_HEADER
-#endif // QFXVISUALDATAMODEL_H
+#endif // QMLGRAPHICSVISUALDATAMODEL_H
diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/graphicsitems/qmlgraphicswebview.cpp
index f7030ca..c6ab4c7 100644
--- a/src/declarative/fx/qfxwebview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicswebview.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -55,19 +55,19 @@
#include "qml.h"
#include "qmlengine.h"
-#include "qmlstate.h"
-#include "qlistmodelinterface.h"
+#include <private/qmlstate_p.h>
+#include <private/qlistmodelinterface_p.h>
-#include "qfxwebview.h"
-#include <private/qfxpainteditem_p.h>
+#include "qmlgraphicswebview_p.h"
+#include <private/qmlgraphicspainteditem_p_p.h>
QT_BEGIN_NAMESPACE
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,WebView,QFxWebView)
+QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,WebView,QmlGraphicsWebView)
QML_DEFINE_NOCREATE_TYPE(QAction)
static const int MAX_DOUBLECLICK_TIME=500; // XXX need better gesture system
-class QFxWebSettings : public QObject {
+class QmlGraphicsWebSettings : public QObject {
Q_OBJECT
Q_PROPERTY(QString standardFontFamily READ standardFontFamily WRITE setStandardFontFamily)
@@ -99,7 +99,7 @@ class QFxWebSettings : public QObject {
Q_PROPERTY(bool localContentCanAccessRemoteUrls READ localContentCanAccessRemoteUrls WRITE setLocalContentCanAccessRemoteUrls)
public:
- QFxWebSettings() {}
+ QmlGraphicsWebSettings() {}
QString standardFontFamily() const { return s->fontFamily(QWebSettings::StandardFont); }
void setStandardFontFamily(const QString& f) { s->setFontFamily(QWebSettings::StandardFont,f); }
@@ -157,17 +157,17 @@ public:
QWebSettings *s;
};
-QML_DECLARE_TYPE(QFxWebSettings)
-QML_DEFINE_NOCREATE_TYPE(QFxWebSettings)
+QML_DECLARE_TYPE(QmlGraphicsWebSettings)
+QML_DEFINE_NOCREATE_TYPE(QmlGraphicsWebSettings)
-class QFxWebViewPrivate : public QFxPaintedItemPrivate
+class QmlGraphicsWebViewPrivate : public QmlGraphicsPaintedItemPrivate
{
- Q_DECLARE_PUBLIC(QFxWebView)
+ Q_DECLARE_PUBLIC(QmlGraphicsWebView)
public:
- QFxWebViewPrivate()
- : QFxPaintedItemPrivate(), page(0), preferredwidth(0), pagewidth(0),
- progress(1.0), status(QFxWebView::Null), pending(PendingNone),
+ QmlGraphicsWebViewPrivate()
+ : QmlGraphicsPaintedItemPrivate(), page(0), preferredwidth(0), pagewidth(0),
+ progress(1.0), status(QmlGraphicsWebView::Null), pending(PendingNone),
newWindowComponent(0), newWindowParent(0),
windowObjects(this),
rendering(true)
@@ -180,35 +180,35 @@ public:
int preferredwidth;
int pagewidth;
qreal progress;
- QFxWebView::Status status;
+ QmlGraphicsWebView::Status status;
QString statusText;
enum { PendingNone, PendingUrl, PendingHtml, PendingContent } pending;
QUrl pending_url;
QString pending_string;
QByteArray pending_data;
- mutable QFxWebSettings settings;
+ mutable QmlGraphicsWebSettings settings;
QmlComponent *newWindowComponent;
- QFxItem *newWindowParent;
+ QmlGraphicsItem *newWindowParent;
void updateWindowObjects();
class WindowObjectList : public QmlConcreteList<QObject *>
{
public:
- WindowObjectList(QFxWebViewPrivate *p)
+ WindowObjectList(QmlGraphicsWebViewPrivate *p)
: priv(p) {}
virtual void append(QObject *v) {
QmlConcreteList<QObject *>::append(v);
priv->updateWindowObjects();
}
private:
- QFxWebViewPrivate *priv;
+ QmlGraphicsWebViewPrivate *priv;
} windowObjects;
bool rendering;
};
/*!
- \qmlclass WebView
+ \qmlclass WebView QFxWebView
\brief The WebView item allows you to add web content to a canvas.
\inherits Item
@@ -240,8 +240,8 @@ public:
/*!
\internal
- \class QFxWebView
- \brief The QFxWebView class allows you to add web content to a QmlView.
+ \class QmlGraphicsWebView
+ \brief The QmlGraphicsWebView class allows you to add web content to a QmlView.
A WebView renders web content base on a URL.
@@ -251,30 +251,30 @@ public:
toolbars, etc., those must be implemented around WebView. See the WebBrowser example
for a demonstration of this.
- A QFxWebView object can be instantiated in Qml using the tag \l WebView.
+ A QmlGraphicsWebView object can be instantiated in Qml using the tag \l WebView.
*/
-QFxWebView::QFxWebView(QFxItem *parent)
- : QFxPaintedItem(*(new QFxWebViewPrivate), parent)
+QmlGraphicsWebView::QmlGraphicsWebView(QmlGraphicsItem *parent)
+ : QmlGraphicsPaintedItem(*(new QmlGraphicsWebViewPrivate), parent)
{
init();
}
-QFxWebView::QFxWebView(QFxWebViewPrivate &dd, QFxItem *parent)
- : QFxPaintedItem(dd, parent)
+QmlGraphicsWebView::QmlGraphicsWebView(QmlGraphicsWebViewPrivate &dd, QmlGraphicsItem *parent)
+ : QmlGraphicsPaintedItem(dd, parent)
{
init();
}
-QFxWebView::~QFxWebView()
+QmlGraphicsWebView::~QmlGraphicsWebView()
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
delete d->page;
}
-void QFxWebView::init()
+void QmlGraphicsWebView::init()
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
setAcceptHoverEvents(true);
setAcceptedMouseButtons(Qt::LeftButton);
@@ -283,30 +283,30 @@ void QFxWebView::init()
d->page = 0;
}
-void QFxWebView::componentComplete()
+void QmlGraphicsWebView::componentComplete()
{
- QFxPaintedItem::componentComplete();
- Q_D(QFxWebView);
+ QmlGraphicsPaintedItem::componentComplete();
+ Q_D(QmlGraphicsWebView);
switch (d->pending) {
- case QFxWebViewPrivate::PendingUrl:
+ case QmlGraphicsWebViewPrivate::PendingUrl:
setUrl(d->pending_url);
break;
- case QFxWebViewPrivate::PendingHtml:
+ case QmlGraphicsWebViewPrivate::PendingHtml:
setHtml(d->pending_string, d->pending_url);
break;
- case QFxWebViewPrivate::PendingContent:
+ case QmlGraphicsWebViewPrivate::PendingContent:
setContent(d->pending_data, d->pending_string, d->pending_url);
break;
default:
break;
}
- d->pending = QFxWebViewPrivate::PendingNone;
+ d->pending = QmlGraphicsWebViewPrivate::PendingNone;
d->updateWindowObjects();
}
-QFxWebView::Status QFxWebView::status() const
+QmlGraphicsWebView::Status QmlGraphicsWebView::status() const
{
- Q_D(const QFxWebView);
+ Q_D(const QmlGraphicsWebView);
return d->status;
}
@@ -317,15 +317,15 @@ QFxWebView::Status QFxWebView::status() const
\sa onLoadFinished() onLoadFailed()
*/
-qreal QFxWebView::progress() const
+qreal QmlGraphicsWebView::progress() const
{
- Q_D(const QFxWebView);
+ Q_D(const QmlGraphicsWebView);
return d->progress;
}
-void QFxWebView::doLoadStarted()
+void QmlGraphicsWebView::doLoadStarted()
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
if (!d->url.isEmpty()) {
d->status = Loading;
@@ -334,18 +334,18 @@ void QFxWebView::doLoadStarted()
emit loadStarted();
}
-void QFxWebView::doLoadProgress(int p)
+void QmlGraphicsWebView::doLoadProgress(int p)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
if (d->progress == p/100.0)
return;
d->progress = p/100.0;
emit progressChanged();
}
-void QFxWebView::pageUrlChanged()
+void QmlGraphicsWebView::pageUrlChanged()
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
// Reset zooming to full
qreal zf = 1.0;
@@ -371,9 +371,9 @@ void QFxWebView::pageUrlChanged()
}
}
-void QFxWebView::doLoadFinished(bool ok)
+void QmlGraphicsWebView::doLoadFinished(bool ok)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
if (title().isEmpty())
pageUrlChanged(); // XXX bug 232556 - pages with no title never get urlChanged()
@@ -398,15 +398,15 @@ void QFxWebView::doLoadFinished(bool ok)
The url is always absolute (QML will resolve relative URL strings in the context
of the containing QML document).
*/
-QUrl QFxWebView::url() const
+QUrl QmlGraphicsWebView::url() const
{
- Q_D(const QFxWebView);
+ Q_D(const QmlGraphicsWebView);
return d->url;
}
-void QFxWebView::setUrl(const QUrl &url)
+void QmlGraphicsWebView::setUrl(const QUrl &url)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
if (url == d->url)
return;
@@ -440,15 +440,15 @@ void QFxWebView::setUrl(const QUrl &url)
\qmlproperty int WebView::preferredWidth
This property holds the ideal width for displaying the current URL.
*/
-int QFxWebView::preferredWidth() const
+int QmlGraphicsWebView::preferredWidth() const
{
- Q_D(const QFxWebView);
+ Q_D(const QmlGraphicsWebView);
return d->preferredwidth;
}
-void QFxWebView::setPreferredWidth(int iw)
+void QmlGraphicsWebView::setPreferredWidth(int iw)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
if (d->preferredwidth == iw) return;
if (d->pagewidth) {
if (d->preferredwidth) {
@@ -466,15 +466,15 @@ void QFxWebView::setPreferredWidth(int iw)
\qmlproperty int WebView::webPageWidth
This property holds the page width suggested to the web engine.
*/
-int QFxWebView::webPageWidth() const
+int QmlGraphicsWebView::webPageWidth() const
{
- Q_D(const QFxWebView);
+ Q_D(const QmlGraphicsWebView);
return d->pagewidth;
}
-void QFxWebView::setWebPageWidth(int pw)
+void QmlGraphicsWebView::setWebPageWidth(int pw)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
if (d->pagewidth == pw) return;
d->pagewidth = pw;
expandToWebPage();
@@ -484,26 +484,26 @@ void QFxWebView::setWebPageWidth(int pw)
Evaluates the \a scriptSource JavaScript inside the main frame
context and returns the result of the last executed statement.
*/
-QVariant QFxWebView::evaluateJavaScript(const QString &scriptSource)
+QVariant QmlGraphicsWebView::evaluateJavaScript(const QString &scriptSource)
{
return this->page()->mainFrame()->evaluateJavaScript(scriptSource);
}
-void QFxWebView::focusChanged(bool hasFocus)
+void QmlGraphicsWebView::focusChanged(bool hasFocus)
{
QFocusEvent e(hasFocus ? QEvent::FocusIn : QEvent::FocusOut);
page()->event(&e);
- QFxItem::focusChanged(hasFocus);
+ QmlGraphicsItem::focusChanged(hasFocus);
}
-void QFxWebView::contentsSizeChanged(const QSize&)
+void QmlGraphicsWebView::contentsSizeChanged(const QSize&)
{
expandToWebPage();
}
-void QFxWebView::expandToWebPage()
+void QmlGraphicsWebView::expandToWebPage()
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
QSize cs = page()->mainFrame()->contentsSize();
qreal zoom = zoomFactor();
if (cs.width() < d->preferredwidth*zoom)
@@ -520,17 +520,17 @@ void QFxWebView::expandToWebPage()
}
}
-void QFxWebView::geometryChanged(const QRectF &newGeometry,
+void QmlGraphicsWebView::geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry)
{
if (newGeometry.size() != oldGeometry.size())
expandToWebPage();
- QFxPaintedItem::geometryChanged(newGeometry, oldGeometry);
+ QmlGraphicsPaintedItem::geometryChanged(newGeometry, oldGeometry);
}
-void QFxWebView::paintPage(const QRect& r)
+void QmlGraphicsWebView::paintPage(const QRect& r)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
if (d->page->mainFrame()->contentsSize() != contentsSize())
setContentsSize(d->page->mainFrame()->contentsSize());
dirtyCache(r);
@@ -544,15 +544,15 @@ void QFxWebView::paintPage(const QRect& r)
allow. The default is 0.1 megapixels. The cache will not be larger
than the (unscaled) size of the WebView.
*/
-int QFxWebView::pixelCacheSize() const
+int QmlGraphicsWebView::pixelCacheSize() const
{
- Q_D(const QFxWebView);
+ Q_D(const QmlGraphicsWebView);
return d->max_imagecache_size;
}
-void QFxWebView::setPixelCacheSize(int pixels)
+void QmlGraphicsWebView::setPixelCacheSize(int pixels)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
if (pixels < d->max_imagecache_size) {
int cachesize=0;
for (int i=0; i<d->imagecache.count(); ++i) {
@@ -598,18 +598,18 @@ void QFxWebView::setPixelCacheSize(int pixels)
If Javascript is not enabled for this page, then this property does nothing.
*/
-QmlList<QObject *> *QFxWebView::javaScriptWindowObjects()
+QmlList<QObject *> *QmlGraphicsWebView::javaScriptWindowObjects()
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
return &d->windowObjects;
}
-class QFxWebViewAttached : public QObject
+class QmlGraphicsWebViewAttached : public QObject
{
Q_OBJECT
Q_PROPERTY(QString windowObjectName READ windowObjectName WRITE setWindowObjectName)
public:
- QFxWebViewAttached(QObject *parent)
+ QmlGraphicsWebViewAttached(QObject *parent)
: QObject(parent)
{
}
@@ -628,35 +628,35 @@ private:
QString m_windowObjectName;
};
-QFxWebViewAttached *QFxWebView::qmlAttachedProperties(QObject *o)
+QmlGraphicsWebViewAttached *QmlGraphicsWebView::qmlAttachedProperties(QObject *o)
{
- return new QFxWebViewAttached(o);
+ return new QmlGraphicsWebViewAttached(o);
}
-void QFxWebViewPrivate::updateWindowObjects()
+void QmlGraphicsWebViewPrivate::updateWindowObjects()
{
- Q_Q(QFxWebView);
+ Q_Q(QmlGraphicsWebView);
if (!q->isComponentComplete() || !page)
return;
for (int ii = 0; ii < windowObjects.count(); ++ii) {
QObject *object = windowObjects.at(ii);
- QFxWebViewAttached *attached = static_cast<QFxWebViewAttached *>(qmlAttachedPropertiesObject<QFxWebView>(object));
+ QmlGraphicsWebViewAttached *attached = static_cast<QmlGraphicsWebViewAttached *>(qmlAttachedPropertiesObject<QmlGraphicsWebView>(object));
if (attached && !attached->windowObjectName().isEmpty()) {
page->mainFrame()->addToJavaScriptWindowObject(attached->windowObjectName(), object);
}
}
}
-bool QFxWebView::renderingEnabled() const
+bool QmlGraphicsWebView::renderingEnabled() const
{
- Q_D(const QFxWebView);
+ Q_D(const QmlGraphicsWebView);
return d->rendering;
}
-void QFxWebView::setRenderingEnabled(bool enabled)
+void QmlGraphicsWebView::setRenderingEnabled(bool enabled)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
if (d->rendering == enabled)
return;
d->rendering = enabled;
@@ -666,9 +666,9 @@ void QFxWebView::setRenderingEnabled(bool enabled)
}
-void QFxWebView::drawContents(QPainter *p, const QRect &r)
+void QmlGraphicsWebView::drawContents(QPainter *p, const QRect &r)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
if (d->rendering)
page()->mainFrame()->render(p,r);
}
@@ -713,16 +713,16 @@ static QMouseEvent *sceneHoverMoveEventToMouseEvent(QGraphicsSceneHoverEvent *e)
emits this signals.
*/
-void QFxWebView::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsWebView::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{
QMouseEvent *me = sceneMouseEventToMouseEvent(event);
emit doubleClick(me->x(),me->y());
delete me;
}
-void QFxWebView::heuristicZoom(int clickX, int clickY)
+void QmlGraphicsWebView::heuristicZoom(int clickX, int clickY)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
qreal ozf = zoomFactor();
QRect showarea = elementAreaAt(clickX, clickY, 1, 1);
qreal z = qreal(preferredWidth())*ozf/showarea.width()*.95;
@@ -734,7 +734,7 @@ void QFxWebView::heuristicZoom(int clickX, int clickY)
emit zooming(z,r.x()+r.width()/2, r.y()+r.height()/2);
}
-void QFxWebView::mousePressEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsWebView::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
setFocus (true);
QMouseEvent *me = sceneMouseEventToMouseEvent(event);
@@ -753,11 +753,11 @@ void QFxWebView::mousePressEvent(QGraphicsSceneMouseEvent *event)
);
delete me;
if (!event->isAccepted()) {
- QFxPaintedItem::mousePressEvent(event);
+ QmlGraphicsPaintedItem::mousePressEvent(event);
}
}
-void QFxWebView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsWebView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
QMouseEvent *me = sceneMouseEventToMouseEvent(event);
page()->event(me);
@@ -774,11 +774,11 @@ void QFxWebView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
);
delete me;
if (!event->isAccepted()) {
- QFxPaintedItem::mouseReleaseEvent(event);
+ QmlGraphicsPaintedItem::mouseReleaseEvent(event);
}
}
-void QFxWebView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+void QmlGraphicsWebView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
QMouseEvent *me = sceneMouseEventToMouseEvent(event);
page()->event(me);
@@ -796,10 +796,10 @@ void QFxWebView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
);
delete me;
if (!event->isAccepted())
- QFxPaintedItem::mouseMoveEvent(event);
+ QmlGraphicsPaintedItem::mouseMoveEvent(event);
}
-void QFxWebView::hoverMoveEvent (QGraphicsSceneHoverEvent * event)
+void QmlGraphicsWebView::hoverMoveEvent (QGraphicsSceneHoverEvent * event)
{
QMouseEvent *me = sceneHoverMoveEventToMouseEvent(event);
page()->event(me);
@@ -812,24 +812,24 @@ void QFxWebView::hoverMoveEvent (QGraphicsSceneHoverEvent * event)
);
delete me;
if (!event->isAccepted())
- QFxPaintedItem::hoverMoveEvent(event);
+ QmlGraphicsPaintedItem::hoverMoveEvent(event);
}
-void QFxWebView::keyPressEvent(QKeyEvent* event)
+void QmlGraphicsWebView::keyPressEvent(QKeyEvent* event)
{
page()->event(event);
if (!event->isAccepted())
- QFxPaintedItem::keyPressEvent(event);
+ QmlGraphicsPaintedItem::keyPressEvent(event);
}
-void QFxWebView::keyReleaseEvent(QKeyEvent* event)
+void QmlGraphicsWebView::keyReleaseEvent(QKeyEvent* event)
{
page()->event(event);
if (!event->isAccepted())
- QFxPaintedItem::keyReleaseEvent(event);
+ QmlGraphicsPaintedItem::keyReleaseEvent(event);
}
-bool QFxWebView::sceneEvent(QEvent *event)
+bool QmlGraphicsWebView::sceneEvent(QEvent *event)
{
if (event->type() == QEvent::KeyPress) {
QKeyEvent *k = static_cast<QKeyEvent *>(event);
@@ -841,7 +841,7 @@ bool QFxWebView::sceneEvent(QEvent *event)
}
}
}
- return QFxPaintedItem::sceneEvent(event);
+ return QmlGraphicsPaintedItem::sceneEvent(event);
}
@@ -850,7 +850,7 @@ bool QFxWebView::sceneEvent(QEvent *event)
\qmlproperty action WebView::back
This property holds the action for causing the previous URL in the history to be displayed.
*/
-QAction *QFxWebView::backAction() const
+QAction *QmlGraphicsWebView::backAction() const
{
return page()->action(QWebPage::Back);
}
@@ -859,7 +859,7 @@ QAction *QFxWebView::backAction() const
\qmlproperty action WebView::forward
This property holds the action for causing the next URL in the history to be displayed.
*/
-QAction *QFxWebView::forwardAction() const
+QAction *QmlGraphicsWebView::forwardAction() const
{
return page()->action(QWebPage::Forward);
}
@@ -868,7 +868,7 @@ QAction *QFxWebView::forwardAction() const
\qmlproperty action WebView::reload
This property holds the action for reloading with the current URL
*/
-QAction *QFxWebView::reloadAction() const
+QAction *QmlGraphicsWebView::reloadAction() const
{
return page()->action(QWebPage::Reload);
}
@@ -877,7 +877,7 @@ QAction *QFxWebView::reloadAction() const
\qmlproperty action WebView::stop
This property holds the action for stopping loading with the current URL
*/
-QAction *QFxWebView::stopAction() const
+QAction *QmlGraphicsWebView::stopAction() const
{
return page()->action(QWebPage::Stop);
}
@@ -888,7 +888,7 @@ QAction *QFxWebView::stopAction() const
By default, this property contains an empty string.
*/
-QString QFxWebView::title() const
+QString QmlGraphicsWebView::title() const
{
return page()->mainFrame()->title();
}
@@ -899,7 +899,7 @@ QString QFxWebView::title() const
\qmlproperty pixmap WebView::icon
This property holds the icon associated with the web page currently viewed
*/
-QPixmap QFxWebView::icon() const
+QPixmap QmlGraphicsWebView::icon() const
{
return page()->mainFrame()->icon().pixmap(QSize(256,256));
}
@@ -909,12 +909,12 @@ QPixmap QFxWebView::icon() const
\qmlproperty real WebView::textSizeMultiplier
This property holds the multiplier used to scale the text in a Web page
*/
-void QFxWebView::setTextSizeMultiplier(qreal factor)
+void QmlGraphicsWebView::setTextSizeMultiplier(qreal factor)
{
page()->mainFrame()->setTextSizeMultiplier(factor);
}
-qreal QFxWebView::textSizeMultiplier() const
+qreal QmlGraphicsWebView::textSizeMultiplier() const
{
return page()->mainFrame()->textSizeMultiplier();
}
@@ -923,9 +923,9 @@ qreal QFxWebView::textSizeMultiplier() const
\qmlproperty real WebView::zoomFactor
This property holds the multiplier used to scale the contents of a Web page.
*/
-void QFxWebView::setZoomFactor(qreal factor)
+void QmlGraphicsWebView::setZoomFactor(qreal factor)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
if (factor == page()->mainFrame()->zoomFactor())
return;
@@ -936,7 +936,7 @@ void QFxWebView::setZoomFactor(qreal factor)
emit zoomFactorChanged();
}
-qreal QFxWebView::zoomFactor() const
+qreal QmlGraphicsWebView::zoomFactor() const
{
return page()->mainFrame()->zoomFactor();
}
@@ -947,32 +947,32 @@ qreal QFxWebView::zoomFactor() const
This property is the current status suggested by the current web page. In a web browser,
such status is often shown in some kind of status bar.
*/
-void QFxWebView::setStatusText(const QString& s)
+void QmlGraphicsWebView::setStatusText(const QString& s)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
d->statusText = s;
emit statusTextChanged();
}
-void QFxWebView::windowObjectCleared()
+void QmlGraphicsWebView::windowObjectCleared()
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
d->updateWindowObjects();
}
-QString QFxWebView::statusText() const
+QString QmlGraphicsWebView::statusText() const
{
- Q_D(const QFxWebView);
+ Q_D(const QmlGraphicsWebView);
return d->statusText;
}
-QWebPage *QFxWebView::page() const
+QWebPage *QmlGraphicsWebView::page() const
{
- Q_D(const QFxWebView);
+ Q_D(const QmlGraphicsWebView);
if (!d->page) {
- QFxWebView *self = const_cast<QFxWebView*>(this);
- QWebPage *wp = new QFxWebPage(self);
+ QmlGraphicsWebView *self = const_cast<QmlGraphicsWebView*>(this);
+ QWebPage *wp = new QmlGraphicsWebPage(self);
// QML items don't default to having a background,
// even though most we pages will set one anyway.
@@ -1033,16 +1033,16 @@ QWebPage *QFxWebView::page() const
}
\endqml
*/
-QFxWebSettings *QFxWebView::settingsObject() const
+QmlGraphicsWebSettings *QmlGraphicsWebView::settingsObject() const
{
- Q_D(const QFxWebView);
+ Q_D(const QmlGraphicsWebView);
d->settings.s = page()->settings();
return &d->settings;
}
-void QFxWebView::setPage(QWebPage *page)
+void QmlGraphicsWebView::setPage(QWebPage *page)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
if (d->page == page)
return;
if (d->page) {
@@ -1098,14 +1098,14 @@ void QFxWebView::setPage(QWebPage *page)
\sa progress onLoadFinished()
*/
-void QFxWebView::load(const QNetworkRequest &request,
+void QmlGraphicsWebView::load(const QNetworkRequest &request,
QNetworkAccessManager::Operation operation,
const QByteArray &body)
{
page()->mainFrame()->load(request, operation, body);
}
-QString QFxWebView::html() const
+QString QmlGraphicsWebView::html() const
{
return page()->mainFrame()->toHtml();
}
@@ -1122,9 +1122,9 @@ QString QFxWebView::html() const
}
\endqml
*/
-void QFxWebView::setHtml(const QString &html, const QUrl &baseUrl)
+void QmlGraphicsWebView::setHtml(const QString &html, const QUrl &baseUrl)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
page()->setViewportSize(QSize(
d->preferredwidth>0 ? d->preferredwidth : width(), height()));
if (isComponentComplete())
@@ -1136,9 +1136,9 @@ void QFxWebView::setHtml(const QString &html, const QUrl &baseUrl)
}
}
-void QFxWebView::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
+void QmlGraphicsWebView::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
page()->setViewportSize(QSize(
d->preferredwidth>0 ? d->preferredwidth : width(), height()));
@@ -1152,19 +1152,19 @@ void QFxWebView::setContent(const QByteArray &data, const QString &mimeType, con
}
}
-QWebHistory *QFxWebView::history() const
+QWebHistory *QmlGraphicsWebView::history() const
{
return page()->history();
}
-QWebSettings *QFxWebView::settings() const
+QWebSettings *QmlGraphicsWebView::settings() const
{
return page()->settings();
}
-QFxWebView *QFxWebView::createWindow(QWebPage::WebWindowType type)
+QmlGraphicsWebView *QmlGraphicsWebView::createWindow(QWebPage::WebWindowType type)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
switch (type) {
case QWebPage::WebBrowserWindow: {
if (!d->newWindowComponent && d->newWindowParent)
@@ -1172,17 +1172,17 @@ QFxWebView *QFxWebView::createWindow(QWebPage::WebWindowType type)
else if (d->newWindowComponent && !d->newWindowParent)
qWarning("WebView::newWindowParent not set - WebView::newWindowComponent ignored");
else if (d->newWindowComponent && d->newWindowParent) {
- QFxWebView *webview = 0;
+ QmlGraphicsWebView *webview = 0;
QmlContext *windowContext = new QmlContext(qmlContext(this));
QObject *nobj = d->newWindowComponent->create(windowContext);
if (nobj) {
windowContext->setParent(nobj);
- QFxItem *item = qobject_cast<QFxItem *>(nobj);
+ QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem *>(nobj);
if (!item) {
delete nobj;
} else {
- webview = item->findChild<QFxWebView*>();
+ webview = item->findChild<QmlGraphicsWebView*>();
if (!webview) {
delete item;
} else {
@@ -1215,15 +1215,15 @@ QFxWebView *QFxWebView::createWindow(QWebPage::WebWindowType type)
The parent of the new window is set by newWindowParent. It must be set.
*/
-QmlComponent *QFxWebView::newWindowComponent() const
+QmlComponent *QmlGraphicsWebView::newWindowComponent() const
{
- Q_D(const QFxWebView);
+ Q_D(const QmlGraphicsWebView);
return d->newWindowComponent;
}
-void QFxWebView::setNewWindowComponent(QmlComponent *newWindow)
+void QmlGraphicsWebView::setNewWindowComponent(QmlComponent *newWindow)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
delete d->newWindowComponent;
d->newWindowComponent = newWindow;
}
@@ -1236,15 +1236,15 @@ void QFxWebView::setNewWindowComponent(QmlComponent *newWindow)
\sa newWindowComponent
*/
-QFxItem *QFxWebView::newWindowParent() const
+QmlGraphicsItem *QmlGraphicsWebView::newWindowParent() const
{
- Q_D(const QFxWebView);
+ Q_D(const QmlGraphicsWebView);
return d->newWindowParent;
}
-void QFxWebView::setNewWindowParent(QFxItem *parent)
+void QmlGraphicsWebView::setNewWindowParent(QmlGraphicsItem *parent)
{
- Q_D(QFxWebView);
+ Q_D(QmlGraphicsWebView);
delete d->newWindowParent;
d->newWindowParent = parent;
}
@@ -1255,7 +1255,7 @@ void QFxWebView::setNewWindowParent(QFxItem *parent)
May return an area larger in the case when no smaller element is at the position.
*/
-QRect QFxWebView::elementAreaAt(int x, int y, int maxwidth, int maxheight) const
+QRect QmlGraphicsWebView::elementAreaAt(int x, int y, int maxwidth, int maxheight) const
{
QWebHitTestResult hit = page()->mainFrame()->hitTestContent(QPoint(x,y));
QWebElement element = hit.enclosingBlockElement();
@@ -1271,17 +1271,17 @@ QRect QFxWebView::elementAreaAt(int x, int y, int maxwidth, int maxheight) const
/*!
\internal
- \class QFxWebPage
- \brief The QFxWebPage class is a QWebPage that can create QML plugins.
+ \class QmlGraphicsWebPage
+ \brief The QmlGraphicsWebPage class is a QWebPage that can create QML plugins.
- \sa QFxWebView
+ \sa QmlGraphicsWebView
*/
-QFxWebPage::QFxWebPage(QFxWebView *parent) :
+QmlGraphicsWebPage::QmlGraphicsWebPage(QmlGraphicsWebView *parent) :
QWebPage(parent)
{
}
-QFxWebPage::~QFxWebPage()
+QmlGraphicsWebPage::~QmlGraphicsWebPage()
{
}
@@ -1306,7 +1306,7 @@ public:
}
return dsp;
}
- QWidget_Dummy_Plugin(const QUrl& url, QFxWebView *view, const QStringList &paramNames, const QStringList &paramValues) :
+ QWidget_Dummy_Plugin(const QUrl& url, QmlGraphicsWebView *view, const QStringList &paramNames, const QStringList &paramValues) :
QWidget(dummy_shared_parent()),
propertyNames(paramNames),
propertyValues(paramValues),
@@ -1329,7 +1329,7 @@ public Q_SLOTS:
qWarning() << component->errors();
return;
}
- item = qobject_cast<QFxItem*>(component->create(qmlContext(webview)));
+ item = qobject_cast<QmlGraphicsItem*>(component->create(qmlContext(webview)));
item->setParent(webview);
QString jsObjName;
for (int i=0; i<propertyNames.count(); ++i) {
@@ -1359,25 +1359,25 @@ public Q_SLOTS:
private:
QmlComponent *component;
- QFxItem *item;
+ QmlGraphicsItem *item;
QStringList propertyNames, propertyValues;
- QFxWebView *webview;
+ QmlGraphicsWebView *webview;
};
-QFxWebView *QFxWebPage::viewItem()
+QmlGraphicsWebView *QmlGraphicsWebPage::viewItem()
{
- return static_cast<QFxWebView*>(parent());
+ return static_cast<QmlGraphicsWebView*>(parent());
}
-QObject *QFxWebPage::createPlugin(const QString &, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues)
+QObject *QmlGraphicsWebPage::createPlugin(const QString &, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues)
{
QUrl comp = qmlContext(viewItem())->resolvedUrl(url);
return new QWidget_Dummy_Plugin(comp,viewItem(),paramNames,paramValues);
}
-QWebPage *QFxWebPage::createWindow(WebWindowType type)
+QWebPage *QmlGraphicsWebPage::createWindow(WebWindowType type)
{
- QFxWebView *newView = viewItem()->createWindow(type);
+ QmlGraphicsWebView *newView = viewItem()->createWindow(type);
if (newView)
return newView->page();
return 0;
@@ -1385,4 +1385,4 @@ QWebPage *QFxWebPage::createWindow(WebWindowType type)
QT_END_NAMESPACE
-#include "qfxwebview.moc"
+#include "qmlgraphicswebview.moc"
diff --git a/src/declarative/fx/qfxwebview.h b/src/declarative/graphicsitems/qmlgraphicswebview_p.h
index a31b2b0..6852bb0 100644
--- a/src/declarative/fx/qfxwebview.h
+++ b/src/declarative/graphicsitems/qmlgraphicswebview_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,32 +21,30 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXWEBVIEW_H
-#define QFXWEBVIEW_H
+#ifndef QMLGRAPHICSWEBVIEW_H
+#define QMLGRAPHICSWEBVIEW_H
#include <QtGui/QAction>
#include <QtCore/QUrl>
-#include <QtDeclarative/qfxglobal.h>
-#include <QtDeclarative/qfxpainteditem.h>
+#include <private/qmlgraphicspainteditem_p.h>
#include <QtNetwork/qnetworkaccessmanager.h>
#include <QtWebKit/QWebPage>
@@ -57,31 +56,31 @@ class QWebSettings;
QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxWebViewPrivate;
+class QmlGraphicsWebViewPrivate;
class QNetworkRequest;
-class QFxWebView;
+class QmlGraphicsWebView;
-class Q_DECLARATIVE_EXPORT QFxWebPage : public QWebPage
+class Q_DECLARATIVE_EXPORT QmlGraphicsWebPage : public QWebPage
{
Q_OBJECT
public:
- explicit QFxWebPage(QFxWebView *parent);
- ~QFxWebPage();
+ explicit QmlGraphicsWebPage(QmlGraphicsWebView *parent);
+ ~QmlGraphicsWebPage();
protected:
QObject *createPlugin(const QString &classid, const QUrl &url, const QStringList &paramNames, const QStringList &paramValues);
QWebPage *createWindow(WebWindowType type);
private:
- QFxWebView *viewItem();
+ QmlGraphicsWebView *viewItem();
};
-class QFxWebViewAttached;
-class QFxWebSettings;
+class QmlGraphicsWebViewAttached;
+class QmlGraphicsWebSettings;
//### TODO: browser plugins
-class Q_DECLARATIVE_EXPORT QFxWebView : public QFxPaintedItem
+class Q_DECLARATIVE_EXPORT QmlGraphicsWebView : public QmlGraphicsPaintedItem
{
Q_OBJECT
@@ -107,18 +106,18 @@ class Q_DECLARATIVE_EXPORT QFxWebView : public QFxPaintedItem
Q_PROPERTY(QAction* forward READ forwardAction CONSTANT)
Q_PROPERTY(QAction* stop READ stopAction CONSTANT)
- Q_PROPERTY(QFxWebSettings* settings READ settingsObject CONSTANT)
+ Q_PROPERTY(QmlGraphicsWebSettings* settings READ settingsObject CONSTANT)
Q_PROPERTY(QmlList<QObject *>* javaScriptWindowObjects READ javaScriptWindowObjects CONSTANT)
Q_PROPERTY(QmlComponent* newWindowComponent READ newWindowComponent WRITE setNewWindowComponent)
- Q_PROPERTY(QFxItem* newWindowParent READ newWindowParent WRITE setNewWindowParent)
+ Q_PROPERTY(QmlGraphicsItem* newWindowParent READ newWindowParent WRITE setNewWindowParent)
Q_PROPERTY(bool renderingEnabled READ renderingEnabled WRITE setRenderingEnabled)
public:
- QFxWebView(QFxItem *parent=0);
- ~QFxWebView();
+ QmlGraphicsWebView(QmlGraphicsItem *parent=0);
+ ~QmlGraphicsWebView();
QUrl url() const;
void setUrl(const QUrl &);
@@ -162,7 +161,7 @@ public:
QWebHistory *history() const;
QWebSettings *settings() const;
- QFxWebSettings *settingsObject() const;
+ QmlGraphicsWebSettings *settingsObject() const;
int pixelCacheSize() const;
void setPixelCacheSize(int pixels);
@@ -172,12 +171,12 @@ public:
QmlList<QObject *> *javaScriptWindowObjects();
- static QFxWebViewAttached *qmlAttachedProperties(QObject *);
+ static QmlGraphicsWebViewAttached *qmlAttachedProperties(QObject *);
QmlComponent *newWindowComponent() const;
void setNewWindowComponent(QmlComponent *newWindow);
- QFxItem *newWindowParent() const;
- void setNewWindowParent(QFxItem *newWindow);
+ QmlGraphicsItem *newWindowParent() const;
+ void setNewWindowParent(QmlGraphicsItem *newWindow);
Q_SIGNALS:
void preferredWidthChanged();
@@ -214,7 +213,7 @@ private Q_SLOTS:
void contentsSizeChanged(const QSize&);
protected:
- QFxWebView(QFxWebViewPrivate &dd, QFxItem *parent);
+ QmlGraphicsWebView(QmlGraphicsWebViewPrivate &dd, QmlGraphicsItem *parent);
void drawContents(QPainter *, const QRect &);
@@ -229,21 +228,21 @@ protected:
const QRectF &oldGeometry);
virtual void focusChanged(bool);
virtual bool sceneEvent(QEvent *event);
- QFxWebView *createWindow(QWebPage::WebWindowType type);
+ QmlGraphicsWebView *createWindow(QWebPage::WebWindowType type);
QRect elementAreaAt(int x, int y, int minwidth, int minheight) const;
private:
void init();
virtual void componentComplete();
- Q_DISABLE_COPY(QFxWebView)
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxWebView)
- friend class QFxWebPage;
+ Q_DISABLE_COPY(QmlGraphicsWebView)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsWebView)
+ friend class QmlGraphicsWebPage;
};
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QFxWebView)
-QML_DECLARE_TYPEINFO(QFxWebView, QML_HAS_ATTACHED_PROPERTIES)
+QML_DECLARE_TYPE(QmlGraphicsWebView)
+QML_DECLARE_TYPEINFO(QmlGraphicsWebView, QML_HAS_ATTACHED_PROPERTIES)
QML_DECLARE_TYPE(QAction)
QT_END_HEADER
diff --git a/src/declarative/qml/parser/qmljs.g b/src/declarative/qml/parser/qmljs.g
index eb9a8ab..70cf06a 100644
--- a/src/declarative/qml/parser/qmljs.g
+++ b/src/declarative/qml/parser/qmljs.g
@@ -105,7 +105,7 @@
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
-** This file is part of the QtScript module of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -159,7 +159,7 @@
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
-** This file is part of the QtScript module of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -2949,7 +2949,7 @@ PropertyNameAndValueListOpt: PropertyNameAndValueList ;
const int errorState = state_stack[tos];
// automatic insertion of `;'
- if (t_action(errorState, T_AUTOMATIC_SEMICOLON) && automatic(driver, yytoken)) {
+ if (yytoken != -1 && t_action(errorState, T_AUTOMATIC_SEMICOLON) && automatic(driver, yytoken)) {
SavedToken &tk = token_buffer[0];
tk.token = yytoken;
tk.dval = yylval;
diff --git a/src/declarative/qml/parser/qmljsast.cpp b/src/declarative/qml/parser/qmljsast.cpp
index 4c45bc8..6986bd2 100644
--- a/src/declarative/qml/parser/qmljsast.cpp
+++ b/src/declarative/qml/parser/qmljsast.cpp
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtScript module of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/parser/qmljsast_p.h b/src/declarative/qml/parser/qmljsast_p.h
index ef8a66b..b5f7264 100644
--- a/src/declarative/qml/parser/qmljsast_p.h
+++ b/src/declarative/qml/parser/qmljsast_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/parser/qmljsastfwd_p.h b/src/declarative/qml/parser/qmljsastfwd_p.h
index fcb97ad..b558a23 100644
--- a/src/declarative/qml/parser/qmljsastfwd_p.h
+++ b/src/declarative/qml/parser/qmljsastfwd_p.h
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtScript module of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/parser/qmljsastvisitor.cpp b/src/declarative/qml/parser/qmljsastvisitor.cpp
index d3a1d53..1290c89 100644
--- a/src/declarative/qml/parser/qmljsastvisitor.cpp
+++ b/src/declarative/qml/parser/qmljsastvisitor.cpp
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtScript module of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/parser/qmljsastvisitor_p.h b/src/declarative/qml/parser/qmljsastvisitor_p.h
index eea492a..7db84b0 100644
--- a/src/declarative/qml/parser/qmljsastvisitor_p.h
+++ b/src/declarative/qml/parser/qmljsastvisitor_p.h
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtScript module of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/parser/qmljsengine_p.cpp b/src/declarative/qml/parser/qmljsengine_p.cpp
index 32068c0..cee90a3 100644
--- a/src/declarative/qml/parser/qmljsengine_p.cpp
+++ b/src/declarative/qml/parser/qmljsengine_p.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/parser/qmljsengine_p.h b/src/declarative/qml/parser/qmljsengine_p.h
index 8627a99..a60c515 100644
--- a/src/declarative/qml/parser/qmljsengine_p.h
+++ b/src/declarative/qml/parser/qmljsengine_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/parser/qmljsglobal_p.h b/src/declarative/qml/parser/qmljsglobal_p.h
index 99bb19f..c91de49 100644
--- a/src/declarative/qml/parser/qmljsglobal_p.h
+++ b/src/declarative/qml/parser/qmljsglobal_p.h
@@ -1,3 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
#ifndef QMLJSGLOBAL_P_H
#define QMLJSGLOBAL_P_H
diff --git a/src/declarative/qml/parser/qmljsgrammar.cpp b/src/declarative/qml/parser/qmljsgrammar.cpp
index da3ce2a..b8c6560 100644
--- a/src/declarative/qml/parser/qmljsgrammar.cpp
+++ b/src/declarative/qml/parser/qmljsgrammar.cpp
@@ -2,16 +2,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtCore module of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -21,21 +22,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/parser/qmljsgrammar_p.h b/src/declarative/qml/parser/qmljsgrammar_p.h
index b297f81..d607e8d 100644
--- a/src/declarative/qml/parser/qmljsgrammar_p.h
+++ b/src/declarative/qml/parser/qmljsgrammar_p.h
@@ -2,16 +2,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtCore module of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -21,21 +22,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/parser/qmljslexer.cpp b/src/declarative/qml/parser/qmljslexer.cpp
index 2c03c21..d316f93 100644
--- a/src/declarative/qml/parser/qmljslexer.cpp
+++ b/src/declarative/qml/parser/qmljslexer.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/parser/qmljslexer_p.h b/src/declarative/qml/parser/qmljslexer_p.h
index 50f7c4b..f499750 100644
--- a/src/declarative/qml/parser/qmljslexer_p.h
+++ b/src/declarative/qml/parser/qmljslexer_p.h
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtScript module of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/parser/qmljsmemorypool_p.h b/src/declarative/qml/parser/qmljsmemorypool_p.h
index 70e7737..24a2145 100644
--- a/src/declarative/qml/parser/qmljsmemorypool_p.h
+++ b/src/declarative/qml/parser/qmljsmemorypool_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/parser/qmljsnodepool_p.h b/src/declarative/qml/parser/qmljsnodepool_p.h
index dfe3bac..ca4d729 100644
--- a/src/declarative/qml/parser/qmljsnodepool_p.h
+++ b/src/declarative/qml/parser/qmljsnodepool_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/parser/qmljsparser.cpp b/src/declarative/qml/parser/qmljsparser.cpp
index 402aaeb..453503b 100644
--- a/src/declarative/qml/parser/qmljsparser.cpp
+++ b/src/declarative/qml/parser/qmljsparser.cpp
@@ -3,16 +3,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtScript module of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -22,21 +23,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1713,7 +1713,7 @@ case 337: {
const int errorState = state_stack[tos];
// automatic insertion of `;'
- if (t_action(errorState, T_AUTOMATIC_SEMICOLON) && automatic(driver, yytoken)) {
+ if (yytoken != -1 && t_action(errorState, T_AUTOMATIC_SEMICOLON) && automatic(driver, yytoken)) {
SavedToken &tk = token_buffer[0];
tk.token = yytoken;
tk.dval = yylval;
diff --git a/src/declarative/qml/parser/qmljsparser_p.h b/src/declarative/qml/parser/qmljsparser_p.h
index b35bec3..7fad58a 100644
--- a/src/declarative/qml/parser/qmljsparser_p.h
+++ b/src/declarative/qml/parser/qmljsparser_p.h
@@ -3,16 +3,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtScript module of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -22,21 +23,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qbitfield_p.h b/src/declarative/qml/qbitfield_p.h
index a8cc9dc..8b3afdb 100644
--- a/src/declarative/qml/qbitfield_p.h
+++ b/src/declarative/qml/qbitfield_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmetaobjectbuilder.cpp b/src/declarative/qml/qmetaobjectbuilder.cpp
index e7a7591..c2f5659 100644
--- a/src/declarative/qml/qmetaobjectbuilder.cpp
+++ b/src/declarative/qml/qmetaobjectbuilder.cpp
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtCore module of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmetaobjectbuilder_p.h b/src/declarative/qml/qmetaobjectbuilder_p.h
index fc26c11..3eff4ff 100644
--- a/src/declarative/qml/qmetaobjectbuilder_p.h
+++ b/src/declarative/qml/qmetaobjectbuilder_p.h
@@ -1,16 +1,17 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtCore module of the Qt Toolkit.
+** This file is part of the QtDeclarative module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qml.h b/src/declarative/qml/qml.h
index 818b4e7..f6a6371 100644
--- a/src/declarative/qml/qml.h
+++ b/src/declarative/qml/qml.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -46,7 +46,6 @@
#include <QtCore/qstringlist.h>
#include <QtCore/qurl.h>
#include <QtCore/qmetaobject.h>
-#include <QtDeclarative/qfxglobal.h>
#include <QtDeclarative/qmlmetatype.h>
#include <QtDeclarative/qmlmetaproperty.h>
#include <QtDeclarative/qmlparserstatus.h>
diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri
index cbc2f85..ee13437 100644
--- a/src/declarative/qml/qml.pri
+++ b/src/declarative/qml/qml.pri
@@ -5,7 +5,6 @@ SOURCES += qml/qmlparser.cpp \
qml/qmlexpression.cpp \
qml/qmlbinding.cpp \
qml/qmlmetaproperty.cpp \
- qml/qmlcomponentjs.cpp \
qml/qmlcomponent.cpp \
qml/qmlcontext.cpp \
qml/qmlcustomparser.cpp \
@@ -50,14 +49,13 @@ SOURCES += qml/qmlparser.cpp \
qml/qmllistscriptclass.cpp
HEADERS += qml/qmlparser_p.h \
+ qml/qmlglobal_p.h \
qml/qmlinstruction_p.h \
qml/qmlvmemetaobject_p.h \
qml/qml.h \
qml/qmlbinding.h \
qml/qmlbinding_p.h \
qml/qmlmetaproperty.h \
- qml/qmlcomponentjs_p.h \
- qml/qmlcomponentjs_p_p.h \
qml/qmlcomponent.h \
qml/qmlcomponent_p.h \
qml/qmlcustomparser_p.h \
@@ -116,6 +114,8 @@ HEADERS += qml/qmlparser_p.h \
# for qtscript debugger
contains(QT_CONFIG, scripttools):QT += scripttools
+QT += sql
+
include(parser/parser.pri)
include(rewriter/rewriter.pri)
diff --git a/src/declarative/qml/qmlbasicscript.cpp b/src/declarative/qml/qmlbasicscript.cpp
index eba4307..b3bcf42 100644
--- a/src/declarative/qml/qmlbasicscript.cpp
+++ b/src/declarative/qml/qmlbasicscript.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -45,10 +45,11 @@
#include <private/qmlengine_p.h>
#include <private/qmlcontext_p.h>
#include <QStack>
-#include <private/qfxperf_p.h>
+#include <private/qfxperf_p_p.h>
#include <private/qmlrefcount_p.h>
#include <private/qmljsast_p.h>
#include <private/qmljsengine_p.h>
+#include <private/qmlglobal_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/qml/qmlbasicscript_p.h b/src/declarative/qml/qmlbasicscript_p.h
index 5ad7735..57d4fa7 100644
--- a/src/declarative/qml/qmlbasicscript_p.h
+++ b/src/declarative/qml/qmlbasicscript_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlbinding.cpp b/src/declarative/qml/qmlbinding.cpp
index 317a4b3..eb08b61 100644
--- a/src/declarative/qml/qmlbinding.cpp
+++ b/src/declarative/qml/qmlbinding.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -45,7 +45,7 @@
#include <qmlcontext.h>
#include <qmlinfo.h>
#include <QVariant>
-#include <private/qfxperf_p.h>
+#include <private/qfxperf_p_p.h>
#include <QtCore/qdebug.h>
#include <private/qmlcontext_p.h>
#include <private/qmldeclarativedata_p.h>
@@ -138,7 +138,7 @@ void QmlBinding::update(QmlMetaProperty::WriteFlags flags)
Q_D(QmlBinding);
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::BindableValueUpdate> bu;
+ QmlPerfTimer<QmlPerf::BindableValueUpdate> bu;
#endif
QmlBindingData *data = d->bindingData();
@@ -170,15 +170,15 @@ void QmlBinding::update(QmlMetaProperty::WriteFlags flags)
if (!isUndefined && data->property.object() &&
!data->property.write(value, flags)) {
- QString fileName = data->fileName;
+ QUrl url = data->url;
int line = data->line;
- if (fileName.isEmpty()) fileName = QLatin1String("<Unknown File>");
+ if (url.isEmpty()) url = QUrl(QLatin1String("<Unknown File>"));
const char *valueType = 0;
if (value.userType() == QVariant::Invalid) valueType = "null";
else valueType = QMetaType::typeName(value.userType());
- data->error.setUrl(fileName);
+ data->error.setUrl(url);
data->error.setLine(line);
data->error.setColumn(-1);
data->error.setDescription(QLatin1String("Unable to assign ") +
diff --git a/src/declarative/qml/qmlbinding.h b/src/declarative/qml/qmlbinding.h
index 6a3e92a..8814e77 100644
--- a/src/declarative/qml/qmlbinding.h
+++ b/src/declarative/qml/qmlbinding.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,7 +43,6 @@
#define QMLBINDING_H
#include <QtCore/QObject>
-#include <QtDeclarative/qfxglobal.h>
#include <QtDeclarative/qml.h>
#include <QtDeclarative/qmlpropertyvaluesource.h>
#include <QtDeclarative/qmlexpression.h>
diff --git a/src/declarative/qml/qmlbinding_p.h b/src/declarative/qml/qmlbinding_p.h
index c9378cb..6977e5b 100644
--- a/src/declarative/qml/qmlbinding_p.h
+++ b/src/declarative/qml/qmlbinding_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlbindingoptimizations.cpp b/src/declarative/qml/qmlbindingoptimizations.cpp
index 6dc221e..0efa600 100644
--- a/src/declarative/qml/qmlbindingoptimizations.cpp
+++ b/src/declarative/qml/qmlbindingoptimizations.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlbindingoptimizations_p.h b/src/declarative/qml/qmlbindingoptimizations_p.h
index d0a4df4..5a00eb2 100644
--- a/src/declarative/qml/qmlbindingoptimizations_p.h
+++ b/src/declarative/qml/qmlbindingoptimizations_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlboundsignal.cpp b/src/declarative/qml/qmlboundsignal.cpp
index d715309..def11c3 100644
--- a/src/declarative/qml/qmlboundsignal.cpp
+++ b/src/declarative/qml/qmlboundsignal.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,11 +44,11 @@
#include "private/qmlengine_p.h"
#include "private/qmlexpression_p.h"
#include "private/qmlcontext_p.h"
-#include <qfxglobal.h>
#include <qmlmetatype.h>
#include <qml.h>
#include <qmlcontext.h>
-#include <QDebug>
+#include <QtCore/qdebug.h>
+#include <private/qmlglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -102,7 +102,7 @@ QmlBoundSignal::QmlBoundSignal(QObject *scope, const QMetaMethod &signal,
// is that they both do the work to figure it out. Boo hoo.
if (evaluateIdx == -1) evaluateIdx = metaObject()->methodCount();
- QFx_setParent_noEvent(this, parent);
+ QmlGraphics_setParent_noEvent(this, parent);
QMetaObject::connect(scope, m_idx, this, evaluateIdx);
if (!signal.parameterTypes().isEmpty())
@@ -121,7 +121,7 @@ QmlBoundSignal::QmlBoundSignal(QmlContext *ctxt, const QString &val,
// is that they both do the work to figure it out. Boo hoo.
if (evaluateIdx == -1) evaluateIdx = metaObject()->methodCount();
- QFx_setParent_noEvent(this, parent);
+ QmlGraphics_setParent_noEvent(this, parent);
QMetaObject::connect(scope, m_idx, this, evaluateIdx);
m_expression = new QmlExpression(ctxt, val, scope);
diff --git a/src/declarative/qml/qmlboundsignal_p.h b/src/declarative/qml/qmlboundsignal_p.h
index 51c7155..35679fd 100644
--- a/src/declarative/qml/qmlboundsignal_p.h
+++ b/src/declarative/qml/qmlboundsignal_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlclassfactory.cpp b/src/declarative/qml/qmlclassfactory.cpp
index ddfbd78..3c19c2f 100644
--- a/src/declarative/qml/qmlclassfactory.cpp
+++ b/src/declarative/qml/qmlclassfactory.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlclassfactory_p.h b/src/declarative/qml/qmlclassfactory_p.h
index cd80ffc..91f616e 100644
--- a/src/declarative/qml/qmlclassfactory_p.h
+++ b/src/declarative/qml/qmlclassfactory_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlcleanup.cpp b/src/declarative/qml/qmlcleanup.cpp
index 7799cfc..ef803d0 100644
--- a/src/declarative/qml/qmlcleanup.cpp
+++ b/src/declarative/qml/qmlcleanup.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlcleanup_p.h b/src/declarative/qml/qmlcleanup_p.h
index e9196a3..c140e43 100644
--- a/src/declarative/qml/qmlcleanup_p.h
+++ b/src/declarative/qml/qmlcleanup_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlcompileddata.cpp b/src/declarative/qml/qmlcompileddata.cpp
index 7032a3b..f587053 100644
--- a/src/declarative/qml/qmlcompileddata.cpp
+++ b/src/declarative/qml/qmlcompileddata.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 7a417bb..b93a9b3 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,28 +21,27 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "private/qmlcompiler_p.h"
#include "private/qmlcompositetypedata_p.h"
-#include <private/qfxperf_p.h>
+#include <private/qfxperf_p_p.h>
#include "qmlparser_p.h"
#include "private/qmlscriptparser_p.h"
#include <qmlpropertyvaluesource.h>
@@ -70,12 +70,14 @@
#include "qmlmetaproperty_p.h"
#include "qmlrewrite_p.h"
#include <QtDeclarative/qmlscriptstring.h>
+#include <private/qmlglobal_p.h>
#include "qmlscriptparser_p.h"
QT_BEGIN_NAMESPACE
DEFINE_BOOL_CONFIG_OPTION(compilerDump, QML_COMPILER_DUMP);
+DEFINE_BOOL_CONFIG_OPTION(compilerStatDump, QML_COMPILER_STATISTICS_DUMP);
using namespace QmlParser;
@@ -561,7 +563,7 @@ bool QmlCompiler::compile(QmlEngine *engine,
QmlCompiledData *out)
{
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::Compilation> pc;
+ QmlPerfTimer<QmlPerf::Compilation> pc;
#endif
exceptions.clear();
@@ -613,6 +615,8 @@ bool QmlCompiler::compile(QmlEngine *engine,
if (!isError()) {
if (compilerDump())
out->dumpInstructions();
+ if (compilerStatDump())
+ dumpStats();
} else {
reset(out);
}
@@ -664,6 +668,8 @@ void QmlCompiler::compileTree(Object *tree)
bool QmlCompiler::buildObject(Object *obj, const BindingContext &ctxt)
{
+ componentStat.objects++;
+
Q_ASSERT (obj->type != -1);
const QmlCompiledData::TypeReference &tr =
output->types.at(obj->type);
@@ -1148,15 +1154,21 @@ bool QmlCompiler::buildComponentFromRoot(QmlParser::Object *obj,
const BindingContext &ctxt)
{
ComponentCompileState oldComponentCompileState = compileState;
+ ComponentStat oldComponentStat = componentStat;
+
compileState = ComponentCompileState();
compileState.root = obj;
+ componentStat = ComponentStat();
+ componentStat.lineNumber = obj->location.start.line;
+
if (obj)
COMPILE_CHECK(buildObject(obj, ctxt));
COMPILE_CHECK(completeComponentBuild());
compileState = oldComponentCompileState;
+ componentStat = oldComponentStat;
return true;
}
@@ -1646,6 +1658,7 @@ void QmlCompiler::saveComponentState()
Q_ASSERT(!savedCompileStates.contains(compileState.root));
savedCompileStates.insert(compileState.root, compileState);
+ savedComponentStats.append(componentStat);
}
QmlCompiler::ComponentCompileState
@@ -2454,6 +2467,8 @@ int QmlCompiler::genContextCache()
bool QmlCompiler::completeComponentBuild()
{
+ componentStat.ids = compileState.ids.count();
+
for (int ii = 0; ii < compileState.aliasingObjects.count(); ++ii) {
Object *aliasObject = compileState.aliasingObjects.at(ii);
COMPILE_CHECK(buildDynamicMeta(aliasObject, ResolveAliases));
@@ -2478,6 +2493,8 @@ bool QmlCompiler::completeComponentBuild()
QByteArray(bs.compileData(), bs.compileDataSize());
type = QmlExpressionPrivate::BasicScriptEngineData;
binding.isBasicScript = true;
+
+ componentStat.optimizedBindings++;
} else {
type = QmlExpressionPrivate::PreTransformedQtScriptData;
@@ -2495,6 +2512,8 @@ bool QmlCompiler::completeComponentBuild()
QByteArray((const char *)expression.constData(),
expression.length() * sizeof(QChar));
binding.isBasicScript = false;
+
+ componentStat.scriptBindings++;
}
binding.compiledData.prepend(QByteArray((const char *)&type,
sizeof(quint32)));
@@ -2505,6 +2524,19 @@ bool QmlCompiler::completeComponentBuild()
return true;
}
+void QmlCompiler::dumpStats()
+{
+ qWarning().nospace() << "QML Document: " << output->url.toString();
+ for (int ii = 0; ii < savedComponentStats.count(); ++ii) {
+ const ComponentStat &stat = savedComponentStats.at(ii);
+ qWarning().nospace() << " Component Line " << stat.lineNumber;
+ qWarning().nospace() << " Total Objects: " << stat.objects;
+ qWarning().nospace() << " IDs Used: " << stat.ids;
+ qWarning().nospace() << " Optimized Bindings: " << stat.optimizedBindings;
+ qWarning().nospace() << " QScript Bindings: " << stat.scriptBindings;
+ }
+}
+
/*!
Returns true if from can be assigned to a (QObject) property of type
to.
diff --git a/src/declarative/qml/qmlcompiler_p.h b/src/declarative/qml/qmlcompiler_p.h
index 8a9ca9c..51c165e 100644
--- a/src/declarative/qml/qmlcompiler_p.h
+++ b/src/declarative/qml/qmlcompiler_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -255,6 +255,8 @@ private:
void addId(const QString &, QmlParser::Object *);
+ void dumpStats();
+
struct BindingReference {
QmlParser::Variant expression;
QmlParser::Property *property;
@@ -280,9 +282,25 @@ private:
};
ComponentCompileState compileState;
+ struct ComponentStat
+ {
+ ComponentStat()
+ : ids(0), scriptBindings(0), optimizedBindings(0), objects(0) {}
+
+ int lineNumber;
+
+ int ids;
+ int scriptBindings;
+ int optimizedBindings;
+ int objects;
+ };
+ ComponentStat componentStat;
+
void saveComponentState();
+
ComponentCompileState componentState(QmlParser::Object *);
QHash<QmlParser::Object *, ComponentCompileState> savedCompileStates;
+ QList<ComponentStat> savedComponentStats;
QList<QmlError> exceptions;
QmlCompiledData *output;
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp
index 6181f41..03f07b3 100644
--- a/src/declarative/qml/qmlcomponent.cpp
+++ b/src/declarative/qml/qmlcomponent.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,7 @@
#include "qmlvme_p.h"
#include "qml.h"
#include <QStack>
-#include <private/qfxperf_p.h>
+#include <private/qfxperf_p_p.h>
#include <QStringList>
#include <qmlengine.h>
#include <QFileInfo>
@@ -56,6 +56,7 @@
#include <QtCore/qdebug.h>
#include <QApplication>
#include <private/qmlbinding_p.h>
+#include <private/qmlglobal_p.h>
#include "qmlscriptparser_p.h"
@@ -409,6 +410,9 @@ valid for components created directly from QML.
*/
QmlContext *QmlComponent::creationContext() const
{
+ Q_D(const QmlComponent);
+ if(d->creationContext)
+ return d->creationContext;
QmlDeclarativeData *ddata = QmlDeclarativeData::get(this);
if (ddata)
return ddata->context;
@@ -417,6 +421,17 @@ QmlContext *QmlComponent::creationContext() const
}
/*!
+ \internal
+ Sets the QmlContext the component was created in. This is only
+ desirable for components created in QML script.
+*/
+void QmlComponent::setCreationContext(QmlContext* c)
+{
+ Q_D(QmlComponent);
+ d->creationContext = c;
+}
+
+/*!
Load the QmlComponent from the provided \a url.
*/
void QmlComponent::loadUrl(const QUrl &url)
@@ -462,6 +477,24 @@ QList<QmlError> QmlComponent::errors() const
}
/*!
+ \internal
+ errorsString is only meant as a way to get the errors in script
+*/
+QString QmlComponent::errorsString() const
+{
+ Q_D(const QmlComponent);
+ QString ret;
+ if(!isError())
+ return ret;
+ foreach(const QmlError &e, d->errors) {
+ ret += e.url().toString() + QLatin1String(":") +
+ QString::number(e.line()) + QLatin1String(" ") +
+ e.description() + QLatin1String("\n");
+ }
+ return ret;
+}
+
+/*!
Return the component URL. This is the URL passed to either the constructor,
or the loadUrl() or setData() methods.
*/
@@ -481,6 +514,22 @@ QmlComponent::QmlComponent(QmlComponentPrivate &dd, QObject *parent)
/*!
+ \internal
+ A version of create which returns a scriptObject, for use in script
+*/
+QScriptValue QmlComponent::createObject()
+{
+ Q_D(QmlComponent);
+ QmlContext* ctxt = creationContext();
+ if(!ctxt){
+ qWarning() << QLatin1String("createObject can only be used in QML");
+ return QScriptValue();
+ }
+ QObject* ret = create(ctxt);
+ return QmlEnginePrivate::qmlScriptObject(ret, d->engine);
+}
+
+/*!
Create an object instance from this component. Returns 0 if creation
failed. \a context specifies the context within which to create the object
instance.
@@ -600,7 +649,7 @@ QmlComponentPrivate::beginCreate(QmlContext *context, const QBitField &bindings)
if (rv) {
- QFx_setParent_noEvent(ctxt, rv);
+ QmlGraphics_setParent_noEvent(ctxt, rv);
} else {
delete ctxt;
}
@@ -628,7 +677,7 @@ void QmlComponentPrivate::completeCreate()
if (completePending) {
{
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::BindInit> bi;
+ QmlPerfTimer<QmlPerf::BindInit> bi;
#endif
for (int ii = 0; ii < bindValues.count(); ++ii) {
QmlEnginePrivate::SimpleList<QmlAbstractBinding> bv =
diff --git a/src/declarative/qml/qmlcomponent.h b/src/declarative/qml/qmlcomponent.h
index a72aa4e..bfb4d53 100644
--- a/src/declarative/qml/qmlcomponent.h
+++ b/src/declarative/qml/qmlcomponent.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -45,7 +45,6 @@
#include <QtCore/qobject.h>
#include <QtCore/qstring.h>
#include <QtScript/qscriptvalue.h>
-#include <QtDeclarative/qfxglobal.h>
#include <QtDeclarative/qml.h>
#include <QtDeclarative/qmlerror.h>
@@ -64,6 +63,10 @@ class Q_DECLARATIVE_EXPORT QmlComponent : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QmlComponent)
+ Q_PROPERTY(bool isNull READ isNull NOTIFY statusChanged)
+ Q_PROPERTY(bool isReady READ isReady NOTIFY statusChanged)
+ Q_PROPERTY(bool isError READ isError NOTIFY statusChanged)
+ Q_PROPERTY(bool isLoading READ isLoading NOTIFY statusChanged)
public:
QmlComponent(QObject *parent = 0);
@@ -84,6 +87,7 @@ public:
bool isLoading() const;
QList<QmlError> errors() const;
+ Q_INVOKABLE QString errorsString() const;
qreal progress() const;
@@ -93,9 +97,12 @@ public:
virtual QObject *beginCreate(QmlContext *);
virtual void completeCreate();
+ Q_INVOKABLE QScriptValue createObject();
+
void loadUrl(const QUrl &url);
void setData(const QByteArray &, const QUrl &baseUrl);
+ void setCreationContext(QmlContext*);
QmlContext *creationContext() const;
static QmlComponentAttached *qmlAttachedProperties(QObject *);
diff --git a/src/declarative/qml/qmlcomponent_p.h b/src/declarative/qml/qmlcomponent_p.h
index f90502f..e69f541 100644
--- a/src/declarative/qml/qmlcomponent_p.h
+++ b/src/declarative/qml/qmlcomponent_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -76,7 +76,7 @@ class QmlComponentPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QmlComponent)
public:
- QmlComponentPrivate() : typeData(0), progress(0.), start(-1), count(-1), cc(0), componentAttacheds(0), completePending(false), engine(0) {}
+ QmlComponentPrivate() : typeData(0), progress(0.), start(-1), count(-1), cc(0), componentAttacheds(0), completePending(false), engine(0), creationContext(0) {}
QObject *create(QmlContext *context, const QBitField &);
@@ -104,6 +104,7 @@ public:
bool completePending;
QmlEngine *engine;
+ QmlContext *creationContext;
void clear();
@@ -122,7 +123,7 @@ public:
QmlComponentAttached **prev;
QmlComponentAttached *next;
-signals:
+Q_SIGNALS:
void completed();
private:
diff --git a/src/declarative/qml/qmlcomponentjs.cpp b/src/declarative/qml/qmlcomponentjs.cpp
deleted file mode 100644
index df3e834..0000000
--- a/src/declarative/qml/qmlcomponentjs.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qmlcomponentjs_p.h"
-#include "qmlcomponentjs_p_p.h"
-#include "qmlengine_p.h"
-#include "qmlcomponent.h"
-
-QT_BEGIN_NAMESPACE
-
-QmlComponentJS::QmlComponentJS(QmlEngine *engine, QObject *parent)
- : QmlComponent(*(new QmlComponentJSPrivate), parent)
-{
- Q_D(QmlComponentJS);
- d->engine = engine;
- connect(this, SIGNAL(statusChanged(QmlComponent::Status)),
- this, SLOT(statusChange(QmlComponent::Status)));
-}
-
-QmlComponentJS::QmlComponentJS(QmlEngine *engine, const QUrl &url, QObject *parent)
- : QmlComponent(*(new QmlComponentJSPrivate), parent)
-{
- Q_D(QmlComponentJS);
- d->engine = engine;
- loadUrl(url);
- connect(this, SIGNAL(statusChanged(QmlComponent::Status)),
- this, SLOT(statusChange(QmlComponent::Status)));
-}
-
-void QmlComponentJS::setContext(QmlContext* c)
-{
- Q_D(QmlComponentJS);
- d->ctxt =c;
-}
-/*!
- Create a script object instance from this component. Returns a null
- script object if creation failed. It will create the instance in the
- same context that it was created it. QmlComponentJS is only
- meant to be created from with script - C++ developers should just use
- QmlComponent directly.
-
- Similar to QmlComponent::create(), but creates an object suitable
- for usage within scripts.
-*/
-QScriptValue QmlComponentJS::createObject()
-{
- Q_D(QmlComponentJS);
- QObject* ret = create(d->ctxt);
- return QmlEnginePrivate::qmlScriptObject(ret, d->engine);
-}
-
-/*!
- Return the list of errors that occured during the last compile or create
- operation, as a single string. An empty string is returned if isError()
- is not set.
-
- This function is similar to errors(), except more useful when called from
- QML. C++ code should usually use errors().
-
- \sa errors()
-*/
-QString QmlComponentJS::errorsString() const
-{
- Q_D(const QmlComponentJS);
- QString ret;
- if(!isError())
- return ret;
- foreach(const QmlError &e, d->errors) {
- ret += e.url().toString() + QLatin1String(":") +
- QString::number(e.line()) + QLatin1String(" ") +
- e.description() + QLatin1String("\n");
- }
- return ret;
-}
-
-
-void QmlComponentJS::statusChange(QmlComponent::Status newStatus)
-{
- Q_D(QmlComponentJS);
- if(newStatus == d->prevStatus)
- return;
- if(newStatus == QmlComponent::Null || d->prevStatus == QmlComponent::Null)
- emit isNullChanged();
- if(newStatus == QmlComponent::Ready || d->prevStatus == QmlComponent::Ready)
- emit isReadyChanged();
- if(newStatus == QmlComponent::Loading || d->prevStatus == QmlComponent::Loading)
- emit isLoadingChanged();
- if(newStatus == QmlComponent::Error || d->prevStatus == QmlComponent::Error)
- emit isErrorChanged();
- d->prevStatus = newStatus;
-}
-
-QT_END_NAMESPACE
diff --git a/src/declarative/qml/qmlcomponentjs_p.h b/src/declarative/qml/qmlcomponentjs_p.h
deleted file mode 100644
index 3213929..0000000
--- a/src/declarative/qml/qmlcomponentjs_p.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLCOMPONENTJS_P_H
-#define QMLCOMPONENTJS_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/qobject.h>
-#include <QtCore/qstring.h>
-#include <QtDeclarative/qfxglobal.h>
-#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qmlcomponent.h>
-#include <QtDeclarative/qmlerror.h>
-
-QT_BEGIN_NAMESPACE
-
-class QmlComponentJSPrivate;
-class QmlEngine;
-class QmlContext;
-class Q_DECLARATIVE_EXPORT QmlComponentJS : public QmlComponent
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlComponentJS)
- Q_PROPERTY(bool isNull READ isNull NOTIFY isNullChanged)
- Q_PROPERTY(bool isReady READ isReady NOTIFY isReadyChanged)
- Q_PROPERTY(bool isError READ isError NOTIFY isErrorChanged)
- Q_PROPERTY(bool isLoading READ isLoading NOTIFY isLoadingChanged)
- friend class QmlEngine;
-public:
- QmlComponentJS(QmlEngine *, const QUrl &url, QObject *parent = 0);
- QmlComponentJS(QmlEngine *, QObject *parent=0);
-
- Q_INVOKABLE QScriptValue createObject();
- Q_INVOKABLE QString errorsString() const;
-
- void setContext(QmlContext* c);
-Q_SIGNALS:
- void isNullChanged();
- void isErrorChanged();
- void isReadyChanged();
- void isLoadingChanged();
-private Q_SLOTS:
- void statusChange(QmlComponent::Status newStatus);
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QmlComponentJS)
-
-#endif // QMLCOMPONENTJS_P_H
diff --git a/src/declarative/qml/qmlcomponentjs_p_p.h b/src/declarative/qml/qmlcomponentjs_p_p.h
deleted file mode 100644
index 47ce491..0000000
--- a/src/declarative/qml/qmlcomponentjs_p_p.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLCOMPONENTJS_P_P_H
-#define QMLCOMPONENTJS_P_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qmlcomponent.h"
-#include "qmlcomponentjs_p.h"
-#include "qmlcomponent_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QmlContext;
-class QmlComponentJSPrivate : public QmlComponentPrivate
-{
- Q_DECLARE_PUBLIC(QmlComponentJS)
-public:
- QmlComponentJSPrivate() : QmlComponentPrivate(),
- prevStatus(QmlComponentJS::Null), ctxt(0)
- { }
-
- QmlComponent::Status prevStatus;
- QmlContext* ctxt;
-};
-
-QT_END_NAMESPACE
-
-#endif // QMLCOMPONENTJS_P_P_H
diff --git a/src/declarative/qml/qmlcompositetypedata_p.h b/src/declarative/qml/qmlcompositetypedata_p.h
index ffcef4c..0d2843d 100644
--- a/src/declarative/qml/qmlcompositetypedata_p.h
+++ b/src/declarative/qml/qmlcompositetypedata_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlcompositetypemanager.cpp b/src/declarative/qml/qmlcompositetypemanager.cpp
index 075c359..3c4982b 100644
--- a/src/declarative/qml/qmlcompositetypemanager.cpp
+++ b/src/declarative/qml/qmlcompositetypemanager.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlcompositetypemanager_p.h b/src/declarative/qml/qmlcompositetypemanager_p.h
index b6f84db..af028df 100644
--- a/src/declarative/qml/qmlcompositetypemanager_p.h
+++ b/src/declarative/qml/qmlcompositetypemanager_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp
index 5032ff4..fe0d9cb 100644
--- a/src/declarative/qml/qmlcontext.cpp
+++ b/src/declarative/qml/qmlcontext.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlcontext.h b/src/declarative/qml/qmlcontext.h
index 03baafa..de1d092 100644
--- a/src/declarative/qml/qmlcontext.h
+++ b/src/declarative/qml/qmlcontext.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlcontext_p.h b/src/declarative/qml/qmlcontext_p.h
index 6af5f64..286b882 100644
--- a/src/declarative/qml/qmlcontext_p.h
+++ b/src/declarative/qml/qmlcontext_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlcontextscriptclass.cpp b/src/declarative/qml/qmlcontextscriptclass.cpp
index a978df2..4615764 100644
--- a/src/declarative/qml/qmlcontextscriptclass.cpp
+++ b/src/declarative/qml/qmlcontextscriptclass.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlcontextscriptclass_p.h b/src/declarative/qml/qmlcontextscriptclass_p.h
index 95dff5b..bbd779b 100644
--- a/src/declarative/qml/qmlcontextscriptclass_p.h
+++ b/src/declarative/qml/qmlcontextscriptclass_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlcustomparser.cpp b/src/declarative/qml/qmlcustomparser.cpp
index dbcbeb1..32a745c 100644
--- a/src/declarative/qml/qmlcustomparser.cpp
+++ b/src/declarative/qml/qmlcustomparser.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlcustomparser_p.h b/src/declarative/qml/qmlcustomparser_p.h
index eb3e579..89d3be2 100644
--- a/src/declarative/qml/qmlcustomparser_p.h
+++ b/src/declarative/qml/qmlcustomparser_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -55,7 +55,6 @@
#include <QtCore/qbytearray.h>
#include <QtCore/qxmlstream.h>
-#include <QtDeclarative/qfxglobal.h>
#include <QtDeclarative/qmlmetatype.h>
#include <QtDeclarative/qmlerror.h>
#include <private/qmlparser_p.h>
diff --git a/src/declarative/qml/qmlcustomparser_p_p.h b/src/declarative/qml/qmlcustomparser_p_p.h
index 25023d3..2e0f14a 100644
--- a/src/declarative/qml/qmlcustomparser_p_p.h
+++ b/src/declarative/qml/qmlcustomparser_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmldeclarativedata_p.h b/src/declarative/qml/qmldeclarativedata_p.h
index f6ecc3d..aa82f32 100644
--- a/src/declarative/qml/qmldeclarativedata_p.h
+++ b/src/declarative/qml/qmldeclarativedata_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp
index 21eeb7c..b6e794b 100644
--- a/src/declarative/qml/qmldom.cpp
+++ b/src/declarative/qml/qmldom.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,6 +48,7 @@
#include <QtCore/QDebug>
#include <QtCore/QString>
#include "qmlscriptparser_p.h"
+#include <private/qmlglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -218,7 +219,7 @@ QList<QmlError> QmlDomDocument::errors() const
Returns the document's root object, or an invalid QmlDomObject if the
document has no root.
- In the sample QML below, the root object will be the QFxItem type.
+ In the sample QML below, the root object will be the QmlGraphicsItem type.
\qml
Item {
Text {
diff --git a/src/declarative/qml/qmldom.h b/src/declarative/qml/qmldom.h
index 5816780..8c43c4a 100644
--- a/src/declarative/qml/qmldom.h
+++ b/src/declarative/qml/qmldom.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmldom_p.h b/src/declarative/qml/qmldom_p.h
index b15844a..4b4de80 100644
--- a/src/declarative/qml/qmldom_p.h
+++ b/src/declarative/qml/qmldom_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index 3da8aa9..07296d9 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -62,7 +62,7 @@
#include <QDebug>
#include <QMetaObject>
#include "qml.h"
-#include <private/qfxperf_p.h>
+#include <private/qfxperf_p_p.h>
#include <QStack>
#include "private/qmlbasicscript_p.h"
#include "qmlengine.h"
@@ -75,8 +75,8 @@
#include <QtGui/qcolor.h>
#include <QtGui/qvector3d.h>
#include <QtGui/qsound.h>
+#include <QGraphicsObject>
#include <qmlcomponent.h>
-#include <private/qmlcomponentjs_p.h>
#include <private/qmlmetaproperty_p.h>
#include <private/qmlbinding_p.h>
#include <private/qmlvme_p.h>
@@ -87,6 +87,7 @@
#include <private/qmltypenamescriptclass_p.h>
#include <private/qmllistscriptclass_p.h>
#include <QtDeclarative/qmlscriptstring.h>
+#include <private/qmlglobal_p.h>
#ifdef Q_OS_WIN // for %APPDATA%
#include "qt_windows.h"
@@ -110,14 +111,6 @@ struct StaticQtMetaObject : public QObject
{ return &static_cast<StaticQtMetaObject*> (0)->staticQtMetaObject; }
};
-QScriptValue desktopOpenUrl(QScriptContext *ctxt, QScriptEngine *e)
-{
- if(!ctxt->argumentCount())
- return e->newVariant(QVariant(false));
- bool ret = QDesktopServices::openUrl(QUrl(ctxt->argument(0).toString()));
- return e->newVariant(QVariant(ret));
-}
-
static QString userLocalDataPath(const QString& app)
{
return QDesktopServices::storageLocation(QDesktopServices::DataLocation) + QLatin1String("/") + app;
@@ -130,11 +123,10 @@ QmlEnginePrivate::QmlEnginePrivate(QmlEngine *e)
inProgressCreations(0), scriptEngine(this), componentAttacheds(0), rootComponent(0),
networkAccessManager(0), typeManager(e), uniqueId(1)
{
+ // Note that all documentation for stuff put on the global object goes in
+ // doc/src/declarative/globalobject.qdoc
QScriptValue qtObject =
scriptEngine.newQMetaObject(StaticQtMetaObject::get());
- QScriptValue desktopObject = scriptEngine.newObject();
- desktopObject.setProperty(QLatin1String("openUrl"),scriptEngine.newFunction(desktopOpenUrl, 1));
- qtObject.setProperty(QLatin1String("DesktopServices"), desktopObject);
scriptEngine.globalObject().setProperty(QLatin1String("Qt"), qtObject);
offlineStoragePath = userLocalDataPath(QLatin1String("QML/OfflineStorage"));
@@ -156,6 +148,7 @@ QmlEnginePrivate::QmlEnginePrivate(QmlEngine *e)
//misc methods
qtObject.setProperty(QLatin1String("playSound"), scriptEngine.newFunction(QmlEnginePrivate::playSound, 1));
+ qtObject.setProperty(QLatin1String("openUrlExternally"),scriptEngine.newFunction(desktopOpenUrl, 1));
scriptEngine.globalObject().setProperty(QLatin1String("createQmlObject"),
scriptEngine.newFunction(QmlEnginePrivate::createQmlObject, 1));
@@ -276,7 +269,7 @@ QmlEnginePrivate::CapturedProperty::CapturedProperty(const QmlMetaProperty &p)
\code
QmlEngine engine;
QmlComponent component(&engine, "Text { text: \"Hello world!\" }");
- QFxItem *item = qobject_cast<QFxItem *>(component.create());
+ QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem *>(component.create());
//add item to view, etc
...
@@ -595,63 +588,10 @@ QmlContext *QmlEnginePrivate::getContext(QScriptContext *ctxt)
return contextClass->contextFromValue(scopeNode);
}
-/*!
- This function is intended for use inside QML only. In C++ just create a
- component object as usual.
-
- This function takes the URL of a QML file as its only argument. It returns
- a component object which can be used to create and load that QML file.
-
- Example QmlJS is below, remember that QML files that might be loaded
- over the network cannot be expected to be ready immediately.
- \code
- var component;
- var sprite;
- function finishCreation(){
- if(component.isReady()){
- sprite = component.createObject();
- if(sprite == 0){
- // Error Handling
- }else{
- sprite.parent = page;
- sprite.x = 200;
- //...
- }
- }else if(component.isError()){
- // Error Handling
- }
- }
-
- component = createComponent("Sprite.qml");
- if(component.isReady()){
- finishCreation();
- }else{
- component.statusChanged.connect(finishCreation);
- }
- \endcode
-
- If you are certain the files will be local, you could simplify to
-
- \code
- component = createComponent("Sprite.qml");
- sprite = component.createObject();
- if(sprite == 0){
- // Error Handling
- print(component.errorsString());
- }else{
- sprite.parent = page;
- sprite.x = 200;
- //...
- }
- \endcode
-
- If you want to just create an arbitrary string of QML, instead of
- loading a qml file, consider the createQmlObject() function.
-*/
QScriptValue QmlEnginePrivate::createComponent(QScriptContext *ctxt,
QScriptEngine *engine)
{
- QmlComponentJS* c;
+ QmlComponent* c;
QmlEnginePrivate *activeEnginePriv =
static_cast<QmlScriptEngine*>(engine)->p;
@@ -659,42 +599,17 @@ QScriptValue QmlEnginePrivate::createComponent(QScriptContext *ctxt,
QmlContext* context = activeEnginePriv->getContext(ctxt);
if(ctxt->argumentCount() != 1) {
- c = new QmlComponentJS(activeEngine);
+ c = new QmlComponent(activeEngine);
}else{
QUrl url = QUrl(context->resolvedUrl(ctxt->argument(0).toString()));
if(!url.isValid())
url = QUrl(ctxt->argument(0).toString());
- c = new QmlComponentJS(activeEngine, url, activeEngine);
+ c = new QmlComponent(activeEngine, url, activeEngine);
}
- c->setContext(context);
+ c->setCreationContext(context);
return engine->newQObject(c);
}
-/*!
- Creates a new object from the specified string of QML. It requires a
- second argument, which is the id of an existing QML object to use as
- the new object's parent. If a third argument is provided, this is used
- as the filepath that the qml came from.
-
- Example (where targetItem is the id of an existing QML item):
- \code
- newObject = createQmlObject('import Qt 4.6; Rectangle {color: "red"; width: 20; height: 20}',
- targetItem, "dynamicSnippet1");
- \endcode
-
- This function is intended for use inside QML only. It is intended to behave
- similarly to eval, but for creating QML elements.
-
- Returns the created object, or null if there is an error. In the case of an
- error, details of the error are output using qWarning().
-
- Note that this function returns immediately, and therefore may not work if
- the QML loads new components. If you are trying to load a new component,
- for example from a QML file, consider the createComponent() function
- instead. 'New components' refers to external QML files that have not yet
- been loaded, and so it is safe to use createQmlObject to load built-in
- components.
-*/
QScriptValue QmlEnginePrivate::createQmlObject(QScriptContext *ctxt, QScriptEngine *engine)
{
QmlEnginePrivate *activeEnginePriv =
@@ -708,8 +623,6 @@ QScriptValue QmlEnginePrivate::createQmlObject(QScriptContext *ctxt, QScriptEngi
QUrl url;
if(ctxt->argumentCount() > 2)
url = QUrl(ctxt->argument(2).toString());
- else
- url = QUrl(QLatin1String("DynamicQML"));
QObject *parentArg = activeEnginePriv->objectClass->toQObject(ctxt->argument(1));
QmlContext *qmlCtxt = qmlContext(parentArg);
if (url.isEmpty()) {
@@ -719,6 +632,7 @@ QScriptValue QmlEnginePrivate::createQmlObject(QScriptContext *ctxt, QScriptEngi
}
QmlComponent component(activeEngine, qml.toUtf8(), url);
+
if(component.isError()) {
QList<QmlError> errors = component.errors();
qWarning() <<"QmlEngine::createQmlObject():";
@@ -741,38 +655,15 @@ QScriptValue QmlEnginePrivate::createQmlObject(QScriptContext *ctxt, QScriptEngi
if(obj) {
obj->setParent(parentArg);
- obj->setProperty("parent", QVariant::fromValue<QObject*>(parentArg));
+ QGraphicsObject* gobj = qobject_cast<QGraphicsObject*>(obj);
+ QGraphicsObject* gparent = qobject_cast<QGraphicsObject*>(parentArg);
+ if(gobj && gparent)
+ gobj->setParentItem(gparent);
return qmlScriptObject(obj, activeEngine);
}
return engine->nullValue();
}
-/*!
- This function is intended for use inside QML only. In C++ just create a
- QVector3D as usual.
-
- This function takes three numeric components and combines them into a
- QVector3D value that can be used with any property that takes a
- QVector3D argument. The following QML code:
-
- \code
- transform: Rotation {
- id: rotation
- origin.x: Container.width / 2;
- axis: vector(0, 1, 1)
- }
- \endcode
-
- is equivalent to:
-
- \code
- transform: Rotation {
- id: rotation
- origin.x: Container.width / 2;
- axis.x: 0; axis.y: 1; axis.z: 0
- }
- \endcode
-*/
QScriptValue QmlEnginePrivate::vector(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() < 3)
@@ -898,19 +789,14 @@ QScriptValue QmlEnginePrivate::playSound(QScriptContext *ctxt, QScriptEngine *en
return engine->undefinedValue();
}
-/*!
- This function allows tinting one color with another.
-
- The tint color should usually be mostly transparent, or you will not be able to see the underlying color. The below example provides a slight red tint by having the tint color be pure red which is only 1/16th opaque.
-
- \qml
- Rectangle { x: 0; width: 80; height: 80; color: "lightsteelblue" }
- Rectangle { x: 100; width: 80; height: 80; color: Qt.tint("lightsteelblue", "#10FF0000") }
- \endqml
- \image declarative-rect_tint.png
+QScriptValue QmlEnginePrivate::desktopOpenUrl(QScriptContext *ctxt, QScriptEngine *e)
+{
+ if(ctxt->argumentCount() < 1)
+ return e->newVariant(QVariant(false));
+ bool ret = QDesktopServices::openUrl(QUrl(ctxt->argument(0).toString()));
+ return e->newVariant(QVariant(ret));
+}
- Tint is most useful when a subtle change is intended to be conveyed due to some event; you can then use tinting to more effectively tune the visible color.
-*/
QScriptValue QmlEnginePrivate::tint(QScriptContext *ctxt, QScriptEngine *engine)
{
if(ctxt->argumentCount() < 2)
@@ -1348,7 +1234,7 @@ void QmlEngine::addImportPath(const QString& path)
Returns the directory where SQL and other offline
storage is placed.
- QFxWebView and the SQL databases created with openDatabase()
+ QmlGraphicsWebView and the SQL databases created with openDatabase()
are stored here.
The default is QML/OfflineStorage/ in the platform-standard
diff --git a/src/declarative/qml/qmlengine.h b/src/declarative/qml/qmlengine.h
index b4233e4..0b18e94 100644
--- a/src/declarative/qml/qmlengine.h
+++ b/src/declarative/qml/qmlengine.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlengine_p.h b/src/declarative/qml/qmlengine_p.h
index efd26bf..b050ef6 100644
--- a/src/declarative/qml/qmlengine_p.h
+++ b/src/declarative/qml/qmlengine_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -255,6 +255,7 @@ public:
QVariant scriptValueToVariant(const QScriptValue &);
static QScriptValue qmlScriptObject(QObject*, QmlEngine*);
+
static QScriptValue createComponent(QScriptContext*, QScriptEngine*);
static QScriptValue createQmlObject(QScriptContext*, QScriptEngine*);
static QScriptValue vector(QScriptContext*, QScriptEngine*);
@@ -269,6 +270,7 @@ public:
static QScriptValue tint(QScriptContext*, QScriptEngine*);
static QScriptValue playSound(QScriptContext*, QScriptEngine*);
+ static QScriptValue desktopOpenUrl(QScriptContext*, QScriptEngine*);
static QScriptEngine *getScriptEngine(QmlEngine *e) { return &e->d_func()->scriptEngine; }
static QmlEngine *getEngine(QScriptEngine *e) { return static_cast<QmlScriptEngine*>(e)->p->q_func(); }
diff --git a/src/declarative/qml/qmlenginedebug.cpp b/src/declarative/qml/qmlenginedebug.cpp
index 5b54fbb..2d8acf7 100644
--- a/src/declarative/qml/qmlenginedebug.cpp
+++ b/src/declarative/qml/qmlenginedebug.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlenginedebug_p.h b/src/declarative/qml/qmlenginedebug_p.h
index 7dbbbda..8ba3d38 100644
--- a/src/declarative/qml/qmlenginedebug_p.h
+++ b/src/declarative/qml/qmlenginedebug_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,7 +53,7 @@
// We mean it.
//
-#include <QtDeclarative/qmldebugservice.h>
+#include <private/qmldebugservice_p.h>
#include <QtCore/qurl.h>
#include <QtCore/qvariant.h>
diff --git a/src/declarative/qml/qmlerror.cpp b/src/declarative/qml/qmlerror.cpp
index f4c9580..3532cf5 100644
--- a/src/declarative/qml/qmlerror.cpp
+++ b/src/declarative/qml/qmlerror.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlerror.h b/src/declarative/qml/qmlerror.h
index ee3d7b4..c54f932 100644
--- a/src/declarative/qml/qmlerror.h
+++ b/src/declarative/qml/qmlerror.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlexpression.cpp b/src/declarative/qml/qmlexpression.cpp
index e5e5cf9..2470c1d 100644
--- a/src/declarative/qml/qmlexpression.cpp
+++ b/src/declarative/qml/qmlexpression.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -92,7 +92,7 @@ void QmlExpressionPrivate::init(QmlContext *ctxt, const QString &expr,
void QmlExpressionPrivate::init(QmlContext *ctxt, void *expr, QmlRefCount *rc,
QObject *me, const QUrl &url, int lineNumber)
{
- data->fileName = url.toString();
+ data->url = url;
data->line = lineNumber;
quint32 *exprData = (quint32 *)expr;
@@ -113,7 +113,7 @@ void QmlExpressionPrivate::init(QmlContext *ctxt, void *expr, QmlRefCount *rc,
#if !defined(Q_OS_SYMBIAN) //XXX Why doesn't this work?
if (!dd->programs.at(progIdx)) {
dd->programs[progIdx] =
- new QScriptProgram(data->expression, data->fileName, data->line);
+ new QScriptProgram(data->expression, data->url.toString(), data->line);
}
#endif
@@ -252,7 +252,7 @@ void QmlExpression::setExpression(const QString &expression)
QVariant QmlExpressionPrivate::evalSSE()
{
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::BindValueSSE> perfsse;
+ QmlPerfTimer<QmlPerf::BindValueSSE> perfsse;
#endif
QVariant rv = data->sse.run(data->context(), data->me);
@@ -290,7 +290,7 @@ void QmlExpressionPrivate::exceptionToError(QScriptEngine *scriptEngine,
QVariant QmlExpressionPrivate::evalQtScript(QObject *secondaryScope, bool *isUndefined)
{
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::BindValueQt> perfqt;
+ QmlPerfTimer<QmlPerf::BindValueQt> perfqt;
#endif
QmlExpressionData *data = this->data;
@@ -310,12 +310,12 @@ QVariant QmlExpressionPrivate::evalQtScript(QObject *secondaryScope, bool *isUnd
if (data->expressionRewritten) {
data->expressionFunction = scriptEngine->evaluate(data->expression,
- data->fileName, data->line);
+ data->url.toString(), data->line);
} else {
QmlRewrite::RewriteBinding rewriteBinding;
const QString code = rewriteBinding(data->expression);
- data->expressionFunction = scriptEngine->evaluate(code, data->fileName, data->line);
+ data->expressionFunction = scriptEngine->evaluate(code, data->url.toString(), data->line);
}
scriptEngine->popContext();
@@ -382,7 +382,7 @@ QVariant QmlExpressionPrivate::value(QObject *secondaryScope, bool *isUndefined)
return rv;
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::BindValue> perf;
+ QmlPerfTimer<QmlPerf::BindValue> perf;
#endif
QmlEnginePrivate *ep = QmlEnginePrivate::get(q->engine());
@@ -484,7 +484,7 @@ void QmlExpression::setTrackChange(bool trackChange)
QUrl QmlExpression::sourceFile() const
{
Q_D(const QmlExpression);
- return QUrl(d->data->fileName);
+ return d->data->url;
}
/*!
@@ -498,13 +498,13 @@ int QmlExpression::lineNumber() const
}
/*!
- Set the location of this expression to \a line of \a fileName. This information
+ Set the location of this expression to \a line of \a url. This information
is used by the script engine.
*/
-void QmlExpression::setSourceLocation(const QUrl &fileName, int line)
+void QmlExpression::setSourceLocation(const QUrl &url, int line)
{
Q_D(QmlExpression);
- d->data->fileName = fileName.toString();
+ d->data->url = url;
d->data->line = line;
}
diff --git a/src/declarative/qml/qmlexpression.h b/src/declarative/qml/qmlexpression.h
index 127d3f3..9b123be 100644
--- a/src/declarative/qml/qmlexpression.h
+++ b/src/declarative/qml/qmlexpression.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlexpression_p.h b/src/declarative/qml/qmlexpression_p.h
index 4e13de3..ea572c3 100644
--- a/src/declarative/qml/qmlexpression_p.h
+++ b/src/declarative/qml/qmlexpression_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -98,7 +98,7 @@ public:
QObject *me;
bool trackChange;
- QString fileName;
+ QUrl url;
int line;
struct SignalGuard : public QGuard<QObject> {
diff --git a/src/declarative/util/qfxglobal.h b/src/declarative/qml/qmlglobal_p.h
index 9b4aee1..dc282bc 100644
--- a/src/declarative/util/qfxglobal.h
+++ b/src/declarative/qml/qmlglobal_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QFXGLOBAL_H
-#define QFXGLOBAL_H
+#ifndef QMLGLOBAL_H
+#define QMLGLOBAL_H
#include <QtCore/qglobal.h>
#include <QtCore/QObject>
@@ -51,9 +51,6 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-#define QFX_CONFIGURATION_SOFTWARE
-#define QFX_RENDER_QPAINTER
-
#define DEFINE_BOOL_CONFIG_OPTION(name, var) \
static bool name() \
{ \
@@ -67,7 +64,7 @@ QT_MODULE(Declarative)
return status == Yes; \
}
-struct QFx_DerivedObject : public QObject
+struct QmlGraphics_DerivedObject : public QObject
{
void setParent_noEvent(QObject *parent) {
bool sce = d_ptr->sendChildEvents;
@@ -82,13 +79,13 @@ struct QFx_DerivedObject : public QObject
neither \a parent nor the object's previous parent (if it had one) will
receive ChildRemoved or ChildAdded events.
*/
-inline void QFx_setParent_noEvent(QObject *object, QObject *parent)
+inline void QmlGraphics_setParent_noEvent(QObject *object, QObject *parent)
{
- static_cast<QFx_DerivedObject *>(object)->setParent_noEvent(parent);
+ static_cast<QmlGraphics_DerivedObject *>(object)->setParent_noEvent(parent);
}
QT_END_NAMESPACE
QT_END_HEADER
-#endif // QFXGLOBAL_H
+#endif // QMLGLOBAL_H
diff --git a/src/declarative/qml/qmlglobalscriptclass.cpp b/src/declarative/qml/qmlglobalscriptclass.cpp
index 91187c7..a9c5d3d 100644
--- a/src/declarative/qml/qmlglobalscriptclass.cpp
+++ b/src/declarative/qml/qmlglobalscriptclass.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlglobalscriptclass_p.h b/src/declarative/qml/qmlglobalscriptclass_p.h
index 1b58f1e..1658c27 100644
--- a/src/declarative/qml/qmlglobalscriptclass_p.h
+++ b/src/declarative/qml/qmlglobalscriptclass_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlinfo.cpp b/src/declarative/qml/qmlinfo.cpp
index 119641f..c0d9eca 100644
--- a/src/declarative/qml/qmlinfo.cpp
+++ b/src/declarative/qml/qmlinfo.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlinfo.h b/src/declarative/qml/qmlinfo.h
index f2d17fe..2e26ea4 100644
--- a/src/declarative/qml/qmlinfo.h
+++ b/src/declarative/qml/qmlinfo.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlinstruction.cpp b/src/declarative/qml/qmlinstruction.cpp
index a465445..dd075a8 100644
--- a/src/declarative/qml/qmlinstruction.cpp
+++ b/src/declarative/qml/qmlinstruction.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlinstruction_p.h b/src/declarative/qml/qmlinstruction_p.h
index dc18b05..15e4fdf 100644
--- a/src/declarative/qml/qmlinstruction_p.h
+++ b/src/declarative/qml/qmlinstruction_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,7 +53,7 @@
// We mean it.
//
-#include <QtDeclarative/qfxglobal.h>
+#include <QtCore/qglobal.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/qml/qmlintegercache.cpp b/src/declarative/qml/qmlintegercache.cpp
index 06955c7..b20b6eb 100644
--- a/src/declarative/qml/qmlintegercache.cpp
+++ b/src/declarative/qml/qmlintegercache.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlintegercache_p.h b/src/declarative/qml/qmlintegercache_p.h
index 6e9fadd..7816004 100644
--- a/src/declarative/qml/qmlintegercache_p.h
+++ b/src/declarative/qml/qmlintegercache_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmllist.h b/src/declarative/qml/qmllist.h
index 80c3138..c631d9e 100644
--- a/src/declarative/qml/qmllist.h
+++ b/src/declarative/qml/qmllist.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmllistscriptclass.cpp b/src/declarative/qml/qmllistscriptclass.cpp
index 09bde8c..f067db6 100644
--- a/src/declarative/qml/qmllistscriptclass.cpp
+++ b/src/declarative/qml/qmllistscriptclass.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmllistscriptclass_p.h b/src/declarative/qml/qmllistscriptclass_p.h
index 7592098..0c10472 100644
--- a/src/declarative/qml/qmllistscriptclass_p.h
+++ b/src/declarative/qml/qmllistscriptclass_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp
index edec988..8385352 100644
--- a/src/declarative/qml/qmlmetaproperty.cpp
+++ b/src/declarative/qml/qmlmetaproperty.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,7 +43,7 @@
#include "qmlmetaproperty_p.h"
#include "qmlcompositetypedata_p.h"
#include <qml.h>
-#include <private/qfxperf_p.h>
+#include <private/qfxperf_p_p.h>
#include <QStringList>
#include "qmlbinding.h"
#include <qmlcontext.h>
diff --git a/src/declarative/qml/qmlmetaproperty.h b/src/declarative/qml/qmlmetaproperty.h
index 4a2b864..ce4ac1e 100644
--- a/src/declarative/qml/qmlmetaproperty.h
+++ b/src/declarative/qml/qmlmetaproperty.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,8 +42,7 @@
#ifndef QMLMETAPROPERTY_H
#define QMLMETAPROPERTY_H
-#include <QtDeclarative/qfxglobal.h>
-#include <QtCore/QMetaProperty>
+#include <QtCore/qmetaobject.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/qml/qmlmetaproperty_p.h b/src/declarative/qml/qmlmetaproperty_p.h
index 368ca30..925f1ea 100644
--- a/src/declarative/qml/qmlmetaproperty_p.h
+++ b/src/declarative/qml/qmlmetaproperty_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlmetatype.cpp b/src/declarative/qml/qmlmetatype.cpp
index 1ab7aff..6ce51bd 100644
--- a/src/declarative/qml/qmlmetatype.cpp
+++ b/src/declarative/qml/qmlmetatype.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlmetatype.h b/src/declarative/qml/qmlmetatype.h
index 42c278c..eb5fd28 100644
--- a/src/declarative/qml/qmlmetatype.h
+++ b/src/declarative/qml/qmlmetatype.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlobjectscriptclass.cpp b/src/declarative/qml/qmlobjectscriptclass.cpp
index eac354d..c5641e5 100644
--- a/src/declarative/qml/qmlobjectscriptclass.cpp
+++ b/src/declarative/qml/qmlobjectscriptclass.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlobjectscriptclass_p.h b/src/declarative/qml/qmlobjectscriptclass_p.h
index 7fb727e..6169812 100644
--- a/src/declarative/qml/qmlobjectscriptclass_p.h
+++ b/src/declarative/qml/qmlobjectscriptclass_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlparser.cpp b/src/declarative/qml/qmlparser.cpp
index f9e3c50..7fd57f3 100644
--- a/src/declarative/qml/qmlparser.cpp
+++ b/src/declarative/qml/qmlparser.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,7 +47,7 @@
#include <QSizeF>
#include <QRectF>
#include <private/qmlvme_p.h>
-#include <private/qfxperf_p.h>
+#include <private/qfxperf_p_p.h>
#include <qml.h>
#include "private/qmlcomponent_p.h"
#include <qmlcomponent.h>
diff --git a/src/declarative/qml/qmlparser_p.h b/src/declarative/qml/qmlparser_p.h
index f0867ea..5bffff2 100644
--- a/src/declarative/qml/qmlparser_p.h
+++ b/src/declarative/qml/qmlparser_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlparserstatus.cpp b/src/declarative/qml/qmlparserstatus.cpp
index 0d262ca..69ccfda 100644
--- a/src/declarative/qml/qmlparserstatus.cpp
+++ b/src/declarative/qml/qmlparserstatus.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlparserstatus.h b/src/declarative/qml/qmlparserstatus.h
index 88ed865..e12c7b5 100644
--- a/src/declarative/qml/qmlparserstatus.h
+++ b/src/declarative/qml/qmlparserstatus.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlprivate.cpp b/src/declarative/qml/qmlprivate.cpp
index 21b19e8..01353cc 100644
--- a/src/declarative/qml/qmlprivate.cpp
+++ b/src/declarative/qml/qmlprivate.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlprivate.h b/src/declarative/qml/qmlprivate.h
index 3e1a7e0..6ab36a2 100644
--- a/src/declarative/qml/qmlprivate.h
+++ b/src/declarative/qml/qmlprivate.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -132,43 +132,11 @@ namespace QmlPrivate
}
};
-#if defined(Q_CC_MSVC)
- template <typename T>
- class has_attachedPropertiesMember
- {
- public:
- __if_exists(T::qmlAttachedProperties) {
- static bool const value = true;
- }
- __if_not_exists(T::qmlAttachedProperties) {
- static bool const value = false;
- }
- };
-#elif defined(Q_OS_SYMBIAN)
template <typename T>
struct has_attachedPropertiesMember
{
static bool const value = QmlTypeInfo<T>::hasAttachedProperties;
};
-#else
- template <typename T>
- class has_attachedPropertiesMember
- {
- typedef int yes_type;
- typedef char no_type;
- template <int>
- struct Selector {};
-
- template <typename S>
- static yes_type test(Selector<sizeof(&S::qmlAttachedProperties)>*);
-
- template <typename S>
- static no_type test(...);
-
- public:
- static bool const value = sizeof(test<T>(0)) == sizeof(yes_type);
- };
-#endif
template <typename T, bool hasMember>
class has_attachedPropertiesMethod
diff --git a/src/declarative/qml/qmlpropertycache.cpp b/src/declarative/qml/qmlpropertycache.cpp
index 4c24cdd..339bdef 100644
--- a/src/declarative/qml/qmlpropertycache.cpp
+++ b/src/declarative/qml/qmlpropertycache.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlpropertycache_p.h b/src/declarative/qml/qmlpropertycache_p.h
index 6c3142a..c2e8abe 100644
--- a/src/declarative/qml/qmlpropertycache_p.h
+++ b/src/declarative/qml/qmlpropertycache_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlpropertyvalueinterceptor.cpp b/src/declarative/qml/qmlpropertyvalueinterceptor.cpp
index 9a9aba8..c8a3f74 100644
--- a/src/declarative/qml/qmlpropertyvalueinterceptor.cpp
+++ b/src/declarative/qml/qmlpropertyvalueinterceptor.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlpropertyvalueinterceptor.h b/src/declarative/qml/qmlpropertyvalueinterceptor.h
index 678c12c..71cc6c5 100644
--- a/src/declarative/qml/qmlpropertyvalueinterceptor.h
+++ b/src/declarative/qml/qmlpropertyvalueinterceptor.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlpropertyvaluesource.cpp b/src/declarative/qml/qmlpropertyvaluesource.cpp
index 3317289..7c42e2f 100644
--- a/src/declarative/qml/qmlpropertyvaluesource.cpp
+++ b/src/declarative/qml/qmlpropertyvaluesource.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlpropertyvaluesource.h b/src/declarative/qml/qmlpropertyvaluesource.h
index 384d2f9..2017fb2 100644
--- a/src/declarative/qml/qmlpropertyvaluesource.h
+++ b/src/declarative/qml/qmlpropertyvaluesource.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlproxymetaobject.cpp b/src/declarative/qml/qmlproxymetaobject.cpp
index 0baea31..983c350 100644
--- a/src/declarative/qml/qmlproxymetaobject.cpp
+++ b/src/declarative/qml/qmlproxymetaobject.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlproxymetaobject_p.h b/src/declarative/qml/qmlproxymetaobject_p.h
index 736bd91..8ab3b6c 100644
--- a/src/declarative/qml/qmlproxymetaobject_p.h
+++ b/src/declarative/qml/qmlproxymetaobject_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlrefcount.cpp b/src/declarative/qml/qmlrefcount.cpp
index 6c409e1..9422625 100644
--- a/src/declarative/qml/qmlrefcount.cpp
+++ b/src/declarative/qml/qmlrefcount.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlrefcount_p.h b/src/declarative/qml/qmlrefcount_p.h
index a87d596..cd6afd3 100644
--- a/src/declarative/qml/qmlrefcount_p.h
+++ b/src/declarative/qml/qmlrefcount_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlrewrite.cpp b/src/declarative/qml/qmlrewrite.cpp
index 7cf8888..b86f2f2 100644
--- a/src/declarative/qml/qmlrewrite.cpp
+++ b/src/declarative/qml/qmlrewrite.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,28 +21,27 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmlrewrite_p.h"
-#include <QtDeclarative/qfxglobal.h>
#include <QtCore/qdebug.h>
+#include <private/qmlglobal_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/qml/qmlrewrite_p.h b/src/declarative/qml/qmlrewrite_p.h
index 59057d5..914f997 100644
--- a/src/declarative/qml/qmlrewrite_p.h
+++ b/src/declarative/qml/qmlrewrite_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlscript.cpp b/src/declarative/qml/qmlscript.cpp
index 307d72f..7242498 100644
--- a/src/declarative/qml/qmlscript.cpp
+++ b/src/declarative/qml/qmlscript.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp
index fb84651..526894e 100644
--- a/src/declarative/qml/qmlscriptparser.cpp
+++ b/src/declarative/qml/qmlscriptparser.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -55,7 +55,7 @@
#include <QCoreApplication>
#include <QtDebug>
-#include <private/qfxperf_p.h>
+#include <private/qfxperf_p_p.h>
QT_BEGIN_NAMESPACE
@@ -824,7 +824,7 @@ public:
bool QmlScriptParser::parse(const QByteArray &qmldata, const QUrl &url)
{
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::QmlParsing> pt;
+ QmlPerfTimer<QmlPerf::QmlParsing> pt;
#endif
clear();
diff --git a/src/declarative/qml/qmlscriptparser_p.h b/src/declarative/qml/qmlscriptparser_p.h
index b25d6bf..d4cdeda 100644
--- a/src/declarative/qml/qmlscriptparser_p.h
+++ b/src/declarative/qml/qmlscriptparser_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlscriptstring.cpp b/src/declarative/qml/qmlscriptstring.cpp
index 8a6afcc..6f669d5 100644
--- a/src/declarative/qml/qmlscriptstring.cpp
+++ b/src/declarative/qml/qmlscriptstring.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlscriptstring.h b/src/declarative/qml/qmlscriptstring.h
index c6067ce..73a473f 100644
--- a/src/declarative/qml/qmlscriptstring.h
+++ b/src/declarative/qml/qmlscriptstring.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlsqldatabase.cpp b/src/declarative/qml/qmlsqldatabase.cpp
index 9e39ffc..01d0590 100644
--- a/src/declarative/qml/qmlsqldatabase.cpp
+++ b/src/declarative/qml/qmlsqldatabase.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlsqldatabase_p.h b/src/declarative/qml/qmlsqldatabase_p.h
index f76a2fd..5a38bf0 100644
--- a/src/declarative/qml/qmlsqldatabase_p.h
+++ b/src/declarative/qml/qmlsqldatabase_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlstringconverters.cpp b/src/declarative/qml/qmlstringconverters.cpp
index 34025c5..0f6ada9 100644
--- a/src/declarative/qml/qmlstringconverters.cpp
+++ b/src/declarative/qml/qmlstringconverters.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlstringconverters_p.h b/src/declarative/qml/qmlstringconverters_p.h
index ab7448c..a31f06a 100644
--- a/src/declarative/qml/qmlstringconverters_p.h
+++ b/src/declarative/qml/qmlstringconverters_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmltypenamecache.cpp b/src/declarative/qml/qmltypenamecache.cpp
index d706c63..5c0d23b 100644
--- a/src/declarative/qml/qmltypenamecache.cpp
+++ b/src/declarative/qml/qmltypenamecache.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmltypenamecache_p.h b/src/declarative/qml/qmltypenamecache_p.h
index ec1e79d..6ff403d 100644
--- a/src/declarative/qml/qmltypenamecache_p.h
+++ b/src/declarative/qml/qmltypenamecache_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmltypenamescriptclass.cpp b/src/declarative/qml/qmltypenamescriptclass.cpp
index 7a14432..8b2addf 100644
--- a/src/declarative/qml/qmltypenamescriptclass.cpp
+++ b/src/declarative/qml/qmltypenamescriptclass.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmltypenamescriptclass_p.h b/src/declarative/qml/qmltypenamescriptclass_p.h
index d8112d2..f630854 100644
--- a/src/declarative/qml/qmltypenamescriptclass_p.h
+++ b/src/declarative/qml/qmltypenamescriptclass_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlvaluetype.cpp b/src/declarative/qml/qmlvaluetype.cpp
index 84c9ecb..1713205 100644
--- a/src/declarative/qml/qmlvaluetype.cpp
+++ b/src/declarative/qml/qmlvaluetype.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlvaluetype_p.h b/src/declarative/qml/qmlvaluetype_p.h
index d3adf1e..9842c02 100644
--- a/src/declarative/qml/qmlvaluetype_p.h
+++ b/src/declarative/qml/qmlvaluetype_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlvaluetypescriptclass.cpp b/src/declarative/qml/qmlvaluetypescriptclass.cpp
index 6a7bdeb..0c30992 100644
--- a/src/declarative/qml/qmlvaluetypescriptclass.cpp
+++ b/src/declarative/qml/qmlvaluetypescriptclass.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlvaluetypescriptclass_p.h b/src/declarative/qml/qmlvaluetypescriptclass_p.h
index d656a22..bd31ec1 100644
--- a/src/declarative/qml/qmlvaluetypescriptclass_p.h
+++ b/src/declarative/qml/qmlvaluetypescriptclass_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp
index b986b60..62ec025 100644
--- a/src/declarative/qml/qmlvme.cpp
+++ b/src/declarative/qml/qmlvme.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,28 +21,27 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qmlvme_p.h"
#include "qmlcompiler_p.h"
-#include <private/qfxperf_p.h>
+#include <private/qfxperf_p_p.h>
#include <private/qmlboundsignal_p.h>
#include <private/qmlstringconverters_p.h>
#include "private/qmetaobjectbuilder_p.h"
diff --git a/src/declarative/qml/qmlvme_p.h b/src/declarative/qml/qmlvme_p.h
index 38ba06f..ab58b6a 100644
--- a/src/declarative/qml/qmlvme_p.h
+++ b/src/declarative/qml/qmlvme_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlvmemetaobject.cpp b/src/declarative/qml/qmlvmemetaobject.cpp
index 83f904b..5315089 100644
--- a/src/declarative/qml/qmlvmemetaobject.cpp
+++ b/src/declarative/qml/qmlvmemetaobject.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlvmemetaobject_p.h b/src/declarative/qml/qmlvmemetaobject_p.h
index 74b6d09..9262b19 100644
--- a/src/declarative/qml/qmlvmemetaobject_p.h
+++ b/src/declarative/qml/qmlvmemetaobject_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlwatcher.cpp b/src/declarative/qml/qmlwatcher.cpp
index 8cd51e0..2737bf9 100644
--- a/src/declarative/qml/qmlwatcher.cpp
+++ b/src/declarative/qml/qmlwatcher.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,7 +42,7 @@
#include <QtCore/qmetaobject.h>
#include <QtCore/qdebug.h>
#include <QtDeclarative/qmlexpression.h>
-#include <QtDeclarative/qmldebugservice.h>
+#include <private/qmldebugservice_p.h>
#include <QtDeclarative/qmlcontext.h>
#include <QtDeclarative/qml.h>
diff --git a/src/declarative/qml/qmlwatcher_p.h b/src/declarative/qml/qmlwatcher_p.h
index 0bfcd71..5050949 100644
--- a/src/declarative/qml/qmlwatcher_p.h
+++ b/src/declarative/qml/qmlwatcher_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlxmlhttprequest.cpp b/src/declarative/qml/qmlxmlhttprequest.cpp
index eb7235b..0c0cd9c 100644
--- a/src/declarative/qml/qmlxmlhttprequest.cpp
+++ b/src/declarative/qml/qmlxmlhttprequest.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qmlxmlhttprequest_p.h b/src/declarative/qml/qmlxmlhttprequest_p.h
index 2142bc6..dfed5d2 100644
--- a/src/declarative/qml/qmlxmlhttprequest_p.h
+++ b/src/declarative/qml/qmlxmlhttprequest_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/qpodvector_p.h b/src/declarative/qml/qpodvector_p.h
index 77f7425..3fe2e65 100644
--- a/src/declarative/qml/qpodvector_p.h
+++ b/src/declarative/qml/qpodvector_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/rewriter/rewriter.cpp b/src/declarative/qml/rewriter/rewriter.cpp
index 1248a1c..ae1db30 100644
--- a/src/declarative/qml/rewriter/rewriter.cpp
+++ b/src/declarative/qml/rewriter/rewriter.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/rewriter/rewriter_p.h b/src/declarative/qml/rewriter/rewriter_p.h
index ae59226..ed9be16 100644
--- a/src/declarative/qml/rewriter/rewriter_p.h
+++ b/src/declarative/qml/rewriter/rewriter_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/rewriter/textwriter.cpp b/src/declarative/qml/rewriter/textwriter.cpp
index 1ec0675..8f89f12 100644
--- a/src/declarative/qml/rewriter/textwriter.cpp
+++ b/src/declarative/qml/rewriter/textwriter.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/qml/rewriter/textwriter_p.h b/src/declarative/qml/rewriter/textwriter_p.h
index 5894e6c..14c4726 100644
--- a/src/declarative/qml/rewriter/textwriter_p.h
+++ b/src/declarative/qml/rewriter/textwriter_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/util/qfxperf.cpp b/src/declarative/util/qfxperf.cpp
index 739e480..8fcab2b 100644
--- a/src/declarative/util/qfxperf.cpp
+++ b/src/declarative/util/qfxperf.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,30 +21,29 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "private/qfxperf_p.h"
+#include "private/qfxperf_p_p.h"
QT_BEGIN_NAMESPACE
-Q_DEFINE_PERFORMANCE_LOG(QFxPerf, "QFx") {
+Q_DEFINE_PERFORMANCE_LOG(QmlPerf, "QmlGraphics") {
Q_DEFINE_PERFORMANCE_METRIC(QmlParsing, "Compilation: QML Parsing")
Q_DEFINE_PERFORMANCE_METRIC(Compilation, " QML Compilation")
Q_DEFINE_PERFORMANCE_METRIC(VMEExecution, "Execution: QML VME Execution")
@@ -54,13 +54,13 @@ Q_DEFINE_PERFORMANCE_LOG(QFxPerf, "QFx") {
Q_DEFINE_PERFORMANCE_METRIC(BindableValueUpdate, "QmlBinding::update")
Q_DEFINE_PERFORMANCE_METRIC(PixmapLoad, "Pixmap loading")
Q_DEFINE_PERFORMANCE_METRIC(FontDatabase, "Font database creation")
- Q_DEFINE_PERFORMANCE_METRIC(QFxPathViewPathCache, "FX Items: QFxPathView: Path cache")
- Q_DEFINE_PERFORMANCE_METRIC(CreateParticle, " QFxParticles: Particle creation")
- Q_DEFINE_PERFORMANCE_METRIC(ItemComponentComplete, " QFxItem::componentComplete")
- Q_DEFINE_PERFORMANCE_METRIC(ImageComponentComplete, " QFxImage::componentComplete")
- Q_DEFINE_PERFORMANCE_METRIC(BaseLayoutComponentComplete, " QFxBasePositioner::componentComplete")
- Q_DEFINE_PERFORMANCE_METRIC(TextComponentComplete, " QFxText::componentComplete")
- Q_DEFINE_PERFORMANCE_METRIC(QFxText_setText, " QFxText::setText")
+ Q_DEFINE_PERFORMANCE_METRIC(QmlGraphicsPathViewPathCache, "FX Items: QmlGraphicsPathView: Path cache")
+ Q_DEFINE_PERFORMANCE_METRIC(CreateParticle, " QmlGraphicsParticles: Particle creation")
+ Q_DEFINE_PERFORMANCE_METRIC(ItemComponentComplete, " QmlGraphicsItem::componentComplete")
+ Q_DEFINE_PERFORMANCE_METRIC(ImageComponentComplete, " QmlGraphicsImage::componentComplete")
+ Q_DEFINE_PERFORMANCE_METRIC(BaseLayoutComponentComplete, " QmlGraphicsBasePositioner::componentComplete")
+ Q_DEFINE_PERFORMANCE_METRIC(TextComponentComplete, " QmlGraphicsText::componentComplete")
+ Q_DEFINE_PERFORMANCE_METRIC(QmlGraphicsText_setText, " QmlGraphicsText::setText")
Q_DEFINE_PERFORMANCE_METRIC(AddScript, "QmlScript::addScriptToEngine")
}
diff --git a/src/declarative/util/qfxperf_p.h b/src/declarative/util/qfxperf_p_p.h
index cea7e80..c16bf7b 100644
--- a/src/declarative/util/qfxperf_p.h
+++ b/src/declarative/util/qfxperf_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,7 +52,7 @@
// We mean it.
//
-#include "private/qperformancelog_p.h"
+#include "private/qperformancelog_p_p.h"
QT_BEGIN_HEADER
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-Q_DECLARE_PERFORMANCE_LOG(QFxPerf) {
+Q_DECLARE_PERFORMANCE_LOG(QmlPerf) {
Q_DECLARE_PERFORMANCE_METRIC(QmlParsing)
Q_DECLARE_PERFORMANCE_METRIC(Compilation)
@@ -73,13 +73,13 @@ Q_DECLARE_PERFORMANCE_LOG(QFxPerf) {
Q_DECLARE_PERFORMANCE_METRIC(BindableValueUpdate)
Q_DECLARE_PERFORMANCE_METRIC(PixmapLoad)
Q_DECLARE_PERFORMANCE_METRIC(FontDatabase)
- Q_DECLARE_PERFORMANCE_METRIC(QFxPathViewPathCache)
+ Q_DECLARE_PERFORMANCE_METRIC(QmlGraphicsPathViewPathCache)
Q_DECLARE_PERFORMANCE_METRIC(CreateParticle)
Q_DECLARE_PERFORMANCE_METRIC(ItemComponentComplete)
Q_DECLARE_PERFORMANCE_METRIC(ImageComponentComplete)
Q_DECLARE_PERFORMANCE_METRIC(BaseLayoutComponentComplete)
Q_DECLARE_PERFORMANCE_METRIC(TextComponentComplete)
- Q_DECLARE_PERFORMANCE_METRIC(QFxText_setText)
+ Q_DECLARE_PERFORMANCE_METRIC(QmlGraphicsText_setText)
Q_DECLARE_PERFORMANCE_METRIC(AddScript)
}
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp
index f103a6b..180864c 100644
--- a/src/declarative/util/qmlanimation.cpp
+++ b/src/declarative/util/qmlanimation.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,34 +21,33 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmlanimation.h"
+#include "qmlanimation_p.h"
#include "qvariant.h"
#include "qcolor.h"
#include "qfile.h"
#include "qmlpropertyvaluesource.h"
#include "qml.h"
#include "qmlinfo.h"
-#include "qmlanimation_p.h"
-#include "qmlbehavior.h"
+#include "qmlanimation_p_p.h"
+#include <private/qmlbehavior_p.h>
#include <QParallelAnimationGroup>
#include <QSequentialAnimationGroup>
#include <QtCore/qset.h>
@@ -55,9 +55,10 @@
#include <QtCore/qpoint.h>
#include <QtCore/qsize.h>
#include <QtDeclarative/qmlexpression.h>
-#include <QtDeclarative/qmlstateoperations.h>
+#include <private/qmlstateoperations_p.h>
#include <private/qmlstringconverters_p.h>
#include <private/qvariantanimation_p.h>
+#include <private/qmlglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -139,7 +140,7 @@ QEasingCurve stringToCurve(const QString &curve)
QML_DEFINE_NOCREATE_TYPE(QmlAbstractAnimation)
/*!
- \qmlclass Animation
+ \qmlclass Animation QmlAbstractAnimation
\brief The Animation element is the base of all QML animations.
The Animation element cannot be used directly in a QML file. It exists
@@ -663,7 +664,7 @@ void QmlPauseAnimationPrivate::init()
{
Q_Q(QmlPauseAnimation);
pa = new QPauseAnimation;
- QFx_setParent_noEvent(pa, q);
+ QmlGraphics_setParent_noEvent(pa, q);
}
/*!
@@ -786,7 +787,7 @@ void QmlScriptActionPrivate::init()
{
Q_Q(QmlScriptAction);
rsa = new QActionAnimation(&proxy);
- QFx_setParent_noEvent(rsa, q);
+ QmlGraphics_setParent_noEvent(rsa, q);
}
/*!
@@ -904,7 +905,7 @@ void QmlPropertyActionPrivate::init()
{
Q_Q(QmlPropertyAction);
spa = new QActionAnimation;
- QFx_setParent_noEvent(spa, q);
+ QmlGraphics_setParent_noEvent(spa, q);
}
/*!
@@ -1097,28 +1098,28 @@ void QmlParentActionPrivate::init()
{
Q_Q(QmlParentAction);
cpa = new QActionAnimation;
- QFx_setParent_noEvent(cpa, q);
+ QmlGraphics_setParent_noEvent(cpa, q);
}
-QFxItem *QmlParentAction::object() const
+QmlGraphicsItem *QmlParentAction::object() const
{
Q_D(const QmlParentAction);
return d->pcTarget;
}
-void QmlParentAction::setObject(QFxItem *target)
+void QmlParentAction::setObject(QmlGraphicsItem *target)
{
Q_D(QmlParentAction);
d->pcTarget = target;
}
-QFxItem *QmlParentAction::parent() const
+QmlGraphicsItem *QmlParentAction::parent() const
{
Q_D(const QmlParentAction);
return d->pcParent;
}
-void QmlParentAction::setParent(QFxItem *parent)
+void QmlParentAction::setParent(QmlGraphicsItem *parent)
{
Q_D(QmlParentAction);
d->pcParent = parent;
@@ -1516,7 +1517,7 @@ void QmlPropertyAnimationPrivate::init()
{
Q_Q(QmlPropertyAnimation);
va = new QmlTimeLineValueAnimator;
- QFx_setParent_noEvent(va, q);
+ QmlGraphics_setParent_noEvent(va, q);
va->setStartValue(QVariant(0.0f));
va->setEndValue(QVariant(1.0f));
diff --git a/src/declarative/util/qmlanimation.h b/src/declarative/util/qmlanimation.h
deleted file mode 100644
index f4f9f38..0000000
--- a/src/declarative/util/qmlanimation.h
+++ /dev/null
@@ -1,407 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLANIMATION_H
-#define QMLANIMATION_H
-
-#include <QtCore/qvariant.h>
-#include <QtCore/QAbstractAnimation>
-#include <QtGui/qcolor.h>
-#include <QtDeclarative/qmltransition.h>
-#include <QtDeclarative/qmlpropertyvaluesource.h>
-#include <QtDeclarative/qmlstate.h>
-#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qmlscriptstring.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-
-class QmlAbstractAnimationPrivate;
-class QmlAnimationGroup;
-class Q_AUTOTEST_EXPORT QmlAbstractAnimation : public QObject, public QmlPropertyValueSource, public QmlParserStatus
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlAbstractAnimation)
-
- Q_INTERFACES(QmlParserStatus)
- Q_INTERFACES(QmlPropertyValueSource)
- Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged)
- Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
- Q_PROPERTY(bool alwaysRunToEnd READ alwaysRunToEnd WRITE setAlwaysRunToEnd NOTIFY alwaysRunToEndChanged())
- Q_PROPERTY(bool repeat READ repeat WRITE setRepeat NOTIFY repeatChanged)
- Q_CLASSINFO("DefaultMethod", "start()")
- Q_INTERFACES(QmlParserStatus)
-
-public:
- QmlAbstractAnimation(QObject *parent=0);
- virtual ~QmlAbstractAnimation();
-
- bool isRunning() const;
- void setRunning(bool);
- bool isPaused() const;
- void setPaused(bool);
- bool alwaysRunToEnd() const;
- void setAlwaysRunToEnd(bool);
- bool repeat() const;
- void setRepeat(bool);
-
- int currentTime();
- void setCurrentTime(int);
-
- QmlAnimationGroup *group() const;
- void setGroup(QmlAnimationGroup *);
-
- //### these belong at a lower level in the hierarchy
- QObject *target() const;
- void setTarget(QObject *);
- QString property() const;
- void setProperty(const QString &);
-
- virtual void setTarget(const QmlMetaProperty &);
-
- void classBegin();
- void componentComplete();
-
-Q_SIGNALS:
- void started();
- void completed();
- void runningChanged(bool);
- void pausedChanged(bool);
- void repeatChanged(bool);
- void targetChanged(QObject *, const QString &);
- void alwaysRunToEndChanged(bool);
-
-public Q_SLOTS:
- void restart();
- void start();
- void pause();
- void resume();
- void stop();
- void complete();
-
-protected:
- QmlAbstractAnimation(QmlAbstractAnimationPrivate &dd, QObject *parent);
-
-public:
- enum TransitionDirection { Forward, Backward };
- virtual void transition(QmlStateActions &actions,
- QmlMetaProperties &modified,
- TransitionDirection direction);
- virtual void prepare(QmlMetaProperty &);
- virtual QAbstractAnimation *qtAnimation() = 0;
-
-private Q_SLOTS:
- void timelineComplete();
-};
-
-class QmlPauseAnimationPrivate;
-class QmlPauseAnimation : public QmlAbstractAnimation
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlPauseAnimation)
-
- Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged)
-
-public:
- QmlPauseAnimation(QObject *parent=0);
- virtual ~QmlPauseAnimation();
-
- int duration() const;
- void setDuration(int);
-
-Q_SIGNALS:
- void durationChanged(int);
-
-protected:
- virtual QAbstractAnimation *qtAnimation();
-};
-
-class QmlScriptActionPrivate;
-class QmlScriptAction : public QmlAbstractAnimation
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlScriptAction)
-
- Q_PROPERTY(QmlScriptString script READ script WRITE setScript)
- Q_PROPERTY(QString stateChangeScriptName READ stateChangeScriptName WRITE setStateChangeScriptName)
-
-public:
- QmlScriptAction(QObject *parent=0);
- virtual ~QmlScriptAction();
-
- QmlScriptString script() const;
- void setScript(const QmlScriptString &);
-
- QString stateChangeScriptName() const;
- void setStateChangeScriptName(const QString &);
-
-protected:
- virtual void transition(QmlStateActions &actions,
- QmlMetaProperties &modified,
- TransitionDirection direction);
- virtual QAbstractAnimation *qtAnimation();
-};
-
-class QmlPropertyActionPrivate;
-class QmlPropertyAction : public QmlAbstractAnimation
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlPropertyAction)
-
- Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
- Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY targetChanged)
- Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
- Q_PROPERTY(QList<QObject *>* targets READ targets)
- Q_PROPERTY(QList<QObject *>* exclude READ exclude)
- Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged)
-
-public:
- QmlPropertyAction(QObject *parent=0);
- virtual ~QmlPropertyAction();
-
- QString properties() const;
- void setProperties(const QString &);
-
- QList<QObject *> *targets();
- QList<QObject *> *exclude();
-
- QVariant value() const;
- void setValue(const QVariant &);
-
-Q_SIGNALS:
- void valueChanged(const QVariant &);
- void propertiesChanged(const QString &);
-
-protected:
- virtual void transition(QmlStateActions &actions,
- QmlMetaProperties &modified,
- TransitionDirection direction);
- virtual QAbstractAnimation *qtAnimation();
- virtual void prepare(QmlMetaProperty &);
-};
-
-class QFxItem;
-class QmlParentActionPrivate;
-class QmlParentAction : public QmlAbstractAnimation
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlParentAction)
-
- Q_PROPERTY(QFxItem *target READ object WRITE setObject)
- Q_PROPERTY(QFxItem *parent READ parent WRITE setParent)
-
-public:
- QmlParentAction(QObject *parent=0);
- virtual ~QmlParentAction();
-
- QFxItem *object() const;
- void setObject(QFxItem *);
-
- QFxItem *parent() const;
- void setParent(QFxItem *);
-
-protected:
- virtual void transition(QmlStateActions &actions,
- QmlMetaProperties &modified,
- TransitionDirection direction);
- virtual QAbstractAnimation *qtAnimation();
-};
-
-class QmlPropertyAnimationPrivate;
-class Q_AUTOTEST_EXPORT QmlPropertyAnimation : public QmlAbstractAnimation
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlPropertyAnimation)
-
- Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged)
- Q_PROPERTY(QVariant from READ from WRITE setFrom NOTIFY fromChanged)
- Q_PROPERTY(QVariant to READ to WRITE setTo NOTIFY toChanged)
- Q_PROPERTY(QString easing READ easing WRITE setEasing NOTIFY easingChanged)
- Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
- Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY targetChanged)
- Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
- Q_PROPERTY(QList<QObject *>* targets READ targets)
- Q_PROPERTY(QList<QObject *>* exclude READ exclude)
-
-public:
- QmlPropertyAnimation(QObject *parent=0);
- virtual ~QmlPropertyAnimation();
-
- int duration() const;
- void setDuration(int);
-
- QVariant from() const;
- void setFrom(const QVariant &);
-
- QVariant to() const;
- void setTo(const QVariant &);
-
- QString easing() const;
- void setEasing(const QString &);
-
- QString properties() const;
- void setProperties(const QString &);
-
- QList<QObject *> *targets();
- QList<QObject *> *exclude();
-
-protected:
- virtual void transition(QmlStateActions &actions,
- QmlMetaProperties &modified,
- TransitionDirection direction);
- virtual QAbstractAnimation *qtAnimation();
- virtual void prepare(QmlMetaProperty &);
-
-Q_SIGNALS:
- void durationChanged(int);
- void fromChanged(QVariant);
- void toChanged(QVariant);
- void easingChanged(const QString &);
- void propertiesChanged(const QString &);
-};
-
-class Q_AUTOTEST_EXPORT QmlColorAnimation : public QmlPropertyAnimation
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlPropertyAnimation)
- Q_PROPERTY(QColor from READ from WRITE setFrom NOTIFY fromChanged)
- Q_PROPERTY(QColor to READ to WRITE setTo NOTIFY toChanged)
-
-public:
- QmlColorAnimation(QObject *parent=0);
- virtual ~QmlColorAnimation();
-
- QColor from() const;
- void setFrom(const QColor &);
-
- QColor to() const;
- void setTo(const QColor &);
-};
-
-class Q_AUTOTEST_EXPORT QmlNumberAnimation : public QmlPropertyAnimation
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlPropertyAnimation)
-
- Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged)
- Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged)
-
-public:
- QmlNumberAnimation(QObject *parent=0);
- virtual ~QmlNumberAnimation();
-
- qreal from() const;
- void setFrom(qreal);
-
- qreal to() const;
- void setTo(qreal);
-};
-
-class QmlAnimationGroupPrivate;
-class QmlAnimationGroup : public QmlAbstractAnimation
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlAnimationGroup)
-
- Q_CLASSINFO("DefaultProperty", "animations")
- Q_PROPERTY(QmlList<QmlAbstractAnimation *> *animations READ animations)
-
-public:
- QmlAnimationGroup(QObject *parent);
- virtual ~QmlAnimationGroup();
-
- QmlList<QmlAbstractAnimation *>* animations();
- friend class QmlAbstractAnimation;
-};
-
-class QmlSequentialAnimation : public QmlAnimationGroup
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlAnimationGroup)
-
-public:
- QmlSequentialAnimation(QObject *parent=0);
- virtual ~QmlSequentialAnimation();
-
-protected:
- virtual void transition(QmlStateActions &actions,
- QmlMetaProperties &modified,
- TransitionDirection direction);
- virtual QAbstractAnimation *qtAnimation();
- virtual void prepare(QmlMetaProperty &);
-};
-
-class QmlParallelAnimation : public QmlAnimationGroup
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlAnimationGroup)
-
-public:
- QmlParallelAnimation(QObject *parent=0);
- virtual ~QmlParallelAnimation();
-
-protected:
- virtual void transition(QmlStateActions &actions,
- QmlMetaProperties &modified,
- TransitionDirection direction);
- virtual QAbstractAnimation *qtAnimation();
- virtual void prepare(QmlMetaProperty &);
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QmlAbstractAnimation)
-QML_DECLARE_TYPE(QmlPauseAnimation)
-QML_DECLARE_TYPE(QmlScriptAction)
-QML_DECLARE_TYPE(QmlPropertyAction)
-QML_DECLARE_TYPE(QmlParentAction)
-QML_DECLARE_TYPE(QmlPropertyAnimation)
-QML_DECLARE_TYPE(QmlColorAnimation)
-QML_DECLARE_TYPE(QmlNumberAnimation)
-QML_DECLARE_TYPE(QmlSequentialAnimation)
-QML_DECLARE_TYPE(QmlParallelAnimation)
-
-QT_END_HEADER
-
-#endif // QMLANIMATION_H
diff --git a/src/declarative/util/qmlanimation_p.h b/src/declarative/util/qmlanimation_p.h
index 1f52fcd..214bab9 100644
--- a/src/declarative/util/qmlanimation_p.h
+++ b/src/declarative/util/qmlanimation_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,343 +21,387 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QMLANIMATION_P_H
-#define QMLANIMATION_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <private/qobject_p.h>
-#include <private/qmlnullablevalue_p.h>
-#include <private/qvariantanimation_p.h>
-#include <QtCore/QPauseAnimation>
-#include <QtCore/QVariantAnimation>
-#include <QtCore/QAnimationGroup>
-#include <QtGui/QColor>
-#include <QtDeclarative/qmlanimation.h>
+#ifndef QMLANIMATION_H
+#define QMLANIMATION_H
+
+#include <QtCore/qvariant.h>
+#include <QtCore/QAbstractAnimation>
+#include <QtGui/qcolor.h>
+#include <private/qmltransition_p.h>
+#include <QtDeclarative/qmlpropertyvaluesource.h>
+#include <private/qmlstate_p.h>
#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qmlcontext.h>
-#include <private/qmltimeline_p.h>
+#include <QtDeclarative/qmlscriptstring.h>
+
+QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-//interface for classes that provide animation actions for QActionAnimation
-class QAbstractAnimationAction
-{
-public:
- virtual ~QAbstractAnimationAction() {}
- virtual void doAction() = 0;
-};
+QT_MODULE(Declarative)
-//templated animation action
-//allows us to specify an action that calls a function of a class.
-//(so that class doesn't have to inherit QmlAbstractAnimationAction)
-template<class T, void (T::*method)()>
-class QAnimationActionProxy : public QAbstractAnimationAction
+class QmlAbstractAnimationPrivate;
+class QmlAnimationGroup;
+class Q_AUTOTEST_EXPORT QmlAbstractAnimation : public QObject, public QmlPropertyValueSource, public QmlParserStatus
{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlAbstractAnimation)
+
+ Q_INTERFACES(QmlParserStatus)
+ Q_INTERFACES(QmlPropertyValueSource)
+ Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged)
+ Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
+ Q_PROPERTY(bool alwaysRunToEnd READ alwaysRunToEnd WRITE setAlwaysRunToEnd NOTIFY alwaysRunToEndChanged())
+ Q_PROPERTY(bool repeat READ repeat WRITE setRepeat NOTIFY repeatChanged)
+ Q_CLASSINFO("DefaultMethod", "start()")
+ Q_INTERFACES(QmlParserStatus)
+
public:
- QAnimationActionProxy(T *p) : m_p(p) {}
- virtual void doAction() { (m_p->*method)(); }
+ QmlAbstractAnimation(QObject *parent=0);
+ virtual ~QmlAbstractAnimation();
+
+ bool isRunning() const;
+ void setRunning(bool);
+ bool isPaused() const;
+ void setPaused(bool);
+ bool alwaysRunToEnd() const;
+ void setAlwaysRunToEnd(bool);
+ bool repeat() const;
+ void setRepeat(bool);
+
+ int currentTime();
+ void setCurrentTime(int);
+
+ QmlAnimationGroup *group() const;
+ void setGroup(QmlAnimationGroup *);
+
+ //### these belong at a lower level in the hierarchy
+ QObject *target() const;
+ void setTarget(QObject *);
+ QString property() const;
+ void setProperty(const QString &);
+
+ virtual void setTarget(const QmlMetaProperty &);
+
+ void classBegin();
+ void componentComplete();
+
+Q_SIGNALS:
+ void started();
+ void completed();
+ void runningChanged(bool);
+ void pausedChanged(bool);
+ void repeatChanged(bool);
+ void targetChanged(QObject *, const QString &);
+ void alwaysRunToEndChanged(bool);
+
+public Q_SLOTS:
+ void restart();
+ void start();
+ void pause();
+ void resume();
+ void stop();
+ void complete();
+
+protected:
+ QmlAbstractAnimation(QmlAbstractAnimationPrivate &dd, QObject *parent);
-private:
- T *m_p;
+public:
+ enum TransitionDirection { Forward, Backward };
+ virtual void transition(QmlStateActions &actions,
+ QmlMetaProperties &modified,
+ TransitionDirection direction);
+ virtual void prepare(QmlMetaProperty &);
+ virtual QAbstractAnimation *qtAnimation() = 0;
+
+private Q_SLOTS:
+ void timelineComplete();
};
-//performs an action of type QAbstractAnimationAction
-class QActionAnimation : public QAbstractAnimation
+class QmlPauseAnimationPrivate;
+class QmlPauseAnimation : public QmlAbstractAnimation
{
Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlPauseAnimation)
+
+ Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged)
+
public:
- QActionAnimation(QObject *parent = 0) : QAbstractAnimation(parent), animAction(0), policy(KeepWhenStopped) {}
- QActionAnimation(QAbstractAnimationAction *action, QObject *parent = 0)
- : QAbstractAnimation(parent), animAction(action), policy(KeepWhenStopped) {}
- virtual int duration() const { return 0; }
- void setAnimAction(QAbstractAnimationAction *action, DeletionPolicy p)
- {
- if (state() == Running)
- stop();
- animAction = action;
- policy = p;
- }
+ QmlPauseAnimation(QObject *parent=0);
+ virtual ~QmlPauseAnimation();
+
+ int duration() const;
+ void setDuration(int);
+
+Q_SIGNALS:
+ void durationChanged(int);
+
protected:
- virtual void updateCurrentTime(int) {}
-
- virtual void updateState(State /*oldState*/, State newState)
- {
- if (newState == Running) {
- if (animAction)
- animAction->doAction();
- } else if (newState == Stopped && policy == DeleteWhenStopped) {
- delete animAction;
- animAction = 0;
- }
- }
-
-private:
- QAbstractAnimationAction *animAction;
- DeletionPolicy policy;
+ virtual QAbstractAnimation *qtAnimation();
};
-//animates QmlTimeLineValue (assumes start and end values will be reals or compatible)
-class QmlTimeLineValueAnimator : public QVariantAnimation
+class QmlScriptActionPrivate;
+class QmlScriptAction : public QmlAbstractAnimation
{
Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlScriptAction)
+
+ Q_PROPERTY(QmlScriptString script READ script WRITE setScript)
+ Q_PROPERTY(QString stateChangeScriptName READ stateChangeScriptName WRITE setStateChangeScriptName)
+
public:
- QmlTimeLineValueAnimator(QObject *parent = 0) : QVariantAnimation(parent), animValue(0), fromSourced(0), policy(KeepWhenStopped) {}
- void setAnimValue(QmlTimeLineValue *value, DeletionPolicy p)
- {
- if (state() == Running)
- stop();
- animValue = value;
- policy = p;
- }
- void setFromSourcedValue(bool *value)
- {
- fromSourced = value;
- }
+ QmlScriptAction(QObject *parent=0);
+ virtual ~QmlScriptAction();
+
+ QmlScriptString script() const;
+ void setScript(const QmlScriptString &);
+
+ QString stateChangeScriptName() const;
+ void setStateChangeScriptName(const QString &);
+
protected:
- virtual void updateCurrentValue(const QVariant &value)
- {
- if (animValue)
- animValue->setValue(value.toDouble());
- }
- virtual void updateState(State oldState, State newState)
- {
- QVariantAnimation::updateState(oldState, newState);
- if (newState == Running) {
- //check for new from every loop
- if (fromSourced)
- *fromSourced = false;
- } else if (newState == Stopped && policy == DeleteWhenStopped) {
- delete animValue;
- animValue = 0;
- }
- }
-
-private:
- QmlTimeLineValue *animValue;
- bool *fromSourced;
- DeletionPolicy policy;
+ virtual void transition(QmlStateActions &actions,
+ QmlMetaProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation();
};
-//an animation that just gives a tick
-template<class T, void (T::*method)(int)>
-class QTickAnimationProxy : public QAbstractAnimation
+class QmlPropertyActionPrivate;
+class QmlPropertyAction : public QmlAbstractAnimation
{
- //Q_OBJECT //doesn't work with templating
-public:
- QTickAnimationProxy(T *p, QObject *parent = 0) : QAbstractAnimation(parent), m_p(p) {}
- virtual int duration() const { return -1; }
-protected:
- virtual void updateCurrentTime(int msec) { (m_p->*method)(msec); }
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlPropertyAction)
-private:
- T *m_p;
-};
+ Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
+ Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY targetChanged)
+ Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
+ Q_PROPERTY(QList<QObject *>* targets READ targets)
+ Q_PROPERTY(QList<QObject *>* exclude READ exclude)
+ Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged)
-class QmlAbstractAnimationPrivate : public QObjectPrivate
-{
- Q_DECLARE_PUBLIC(QmlAbstractAnimation)
public:
- QmlAbstractAnimationPrivate()
- : running(false), paused(false), alwaysRunToEnd(false), repeat(false),
- connectedTimeLine(false), componentComplete(true), startOnCompletion(false),
- target(0), group(0) {}
+ QmlPropertyAction(QObject *parent=0);
+ virtual ~QmlPropertyAction();
- bool running;
- bool paused;
- bool alwaysRunToEnd;
- bool repeat;
- bool connectedTimeLine;
+ QString properties() const;
+ void setProperties(const QString &);
- bool componentComplete;
- bool startOnCompletion;
+ QList<QObject *> *targets();
+ QList<QObject *> *exclude();
- void commence();
+ QVariant value() const;
+ void setValue(const QVariant &);
- QmlNullableValue<QmlMetaProperty> userProperty;
- QObject *target;
- QString propertyName;
+Q_SIGNALS:
+ void valueChanged(const QVariant &);
+ void propertiesChanged(const QString &);
- QmlMetaProperty property;
- QmlAnimationGroup *group;
-
- QmlMetaProperty createProperty(QObject *obj, const QString &str);
+protected:
+ virtual void transition(QmlStateActions &actions,
+ QmlMetaProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation();
+ virtual void prepare(QmlMetaProperty &);
};
-class QmlPauseAnimationPrivate : public QmlAbstractAnimationPrivate
+class QmlGraphicsItem;
+class QmlParentActionPrivate;
+class QmlParentAction : public QmlAbstractAnimation
{
- Q_DECLARE_PUBLIC(QmlPauseAnimation)
-public:
- QmlPauseAnimationPrivate()
- : QmlAbstractAnimationPrivate(), pa(0) {}
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlParentAction)
- void init();
+ Q_PROPERTY(QmlGraphicsItem *target READ object WRITE setObject)
+ Q_PROPERTY(QmlGraphicsItem *parent READ parent WRITE setParent)
- QPauseAnimation *pa;
-};
-
-class QmlScriptActionPrivate : public QmlAbstractAnimationPrivate
-{
- Q_DECLARE_PUBLIC(QmlScriptAction)
public:
- QmlScriptActionPrivate()
- : QmlAbstractAnimationPrivate(), hasRunScriptScript(false), proxy(this), rsa(0) {}
+ QmlParentAction(QObject *parent=0);
+ virtual ~QmlParentAction();
- void init();
+ QmlGraphicsItem *object() const;
+ void setObject(QmlGraphicsItem *);
- QmlScriptString script;
- QString name;
- QmlScriptString runScriptScript;
- bool hasRunScriptScript;
+ QmlGraphicsItem *parent() const;
+ void setParent(QmlGraphicsItem *);
- void execute();
-
- QAnimationActionProxy<QmlScriptActionPrivate,
- &QmlScriptActionPrivate::execute> proxy;
- QActionAnimation *rsa;
+protected:
+ virtual void transition(QmlStateActions &actions,
+ QmlMetaProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation();
};
-class QmlPropertyActionPrivate : public QmlAbstractAnimationPrivate
+class QmlPropertyAnimationPrivate;
+class Q_AUTOTEST_EXPORT QmlPropertyAnimation : public QmlAbstractAnimation
{
- Q_DECLARE_PUBLIC(QmlPropertyAction)
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlPropertyAnimation)
+
+ Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged)
+ Q_PROPERTY(QVariant from READ from WRITE setFrom NOTIFY fromChanged)
+ Q_PROPERTY(QVariant to READ to WRITE setTo NOTIFY toChanged)
+ Q_PROPERTY(QString easing READ easing WRITE setEasing NOTIFY easingChanged)
+ Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
+ Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY targetChanged)
+ Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
+ Q_PROPERTY(QList<QObject *>* targets READ targets)
+ Q_PROPERTY(QList<QObject *>* exclude READ exclude)
+
public:
- QmlPropertyActionPrivate()
- : QmlAbstractAnimationPrivate(), proxy(this), spa(0) {}
+ QmlPropertyAnimation(QObject *parent=0);
+ virtual ~QmlPropertyAnimation();
- void init();
+ int duration() const;
+ void setDuration(int);
- QString properties;
- QList<QObject *> targets;
- QList<QObject *> exclude;
+ QVariant from() const;
+ void setFrom(const QVariant &);
- QmlNullableValue<QVariant> value;
+ QVariant to() const;
+ void setTo(const QVariant &);
- void doAction();
+ QString easing() const;
+ void setEasing(const QString &);
- QAnimationActionProxy<QmlPropertyActionPrivate,
- &QmlPropertyActionPrivate::doAction> proxy;
- QActionAnimation *spa;
+ QString properties() const;
+ void setProperties(const QString &);
+
+ QList<QObject *> *targets();
+ QList<QObject *> *exclude();
+
+protected:
+ virtual void transition(QmlStateActions &actions,
+ QmlMetaProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation();
+ virtual void prepare(QmlMetaProperty &);
+
+Q_SIGNALS:
+ void durationChanged(int);
+ void fromChanged(QVariant);
+ void toChanged(QVariant);
+ void easingChanged(const QString &);
+ void propertiesChanged(const QString &);
};
-class QmlParentActionPrivate : public QmlAbstractAnimationPrivate
+class Q_AUTOTEST_EXPORT QmlColorAnimation : public QmlPropertyAnimation
{
- Q_DECLARE_PUBLIC(QmlParentAction)
-public:
- QmlParentActionPrivate()
- : QmlAbstractAnimationPrivate(), pcTarget(0), pcParent(0) {}
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlPropertyAnimation)
+ Q_PROPERTY(QColor from READ from WRITE setFrom NOTIFY fromChanged)
+ Q_PROPERTY(QColor to READ to WRITE setTo NOTIFY toChanged)
- void init();
+public:
+ QmlColorAnimation(QObject *parent=0);
+ virtual ~QmlColorAnimation();
- QFxItem *pcTarget;
- QFxItem *pcParent;
+ QColor from() const;
+ void setFrom(const QColor &);
- void doAction();
- QActionAnimation *cpa;
+ QColor to() const;
+ void setTo(const QColor &);
};
-class QmlAnimationGroupPrivate : public QmlAbstractAnimationPrivate
+class Q_AUTOTEST_EXPORT QmlNumberAnimation : public QmlPropertyAnimation
{
- Q_DECLARE_PUBLIC(QmlAnimationGroup)
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlPropertyAnimation)
+
+ Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged)
+ Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged)
+
public:
- QmlAnimationGroupPrivate()
- : QmlAbstractAnimationPrivate(), animations(this), ag(0) {}
-
- struct AnimationList : public QmlConcreteList<QmlAbstractAnimation *>
- {
- AnimationList(QmlAnimationGroupPrivate *p)
- : anim(p) {}
- virtual void append(QmlAbstractAnimation *a) {
- QmlConcreteList<QmlAbstractAnimation *>::append(a);
- a->setGroup(anim->q_func());
- }
- virtual void clear()
- {
- for (int i = 0; i < count(); ++i)
- at(i)->setGroup(0);
- QmlConcreteList<QmlAbstractAnimation *>::clear();
- }
- virtual void removeAt(int i)
- {
- at(i)->setGroup(0);
- QmlConcreteList<QmlAbstractAnimation *>::removeAt(i);
- }
- virtual void insert(int i, QmlAbstractAnimation *a)
- {
- QmlConcreteList<QmlAbstractAnimation *>::insert(i, a);
- a->setGroup(anim->q_func());
- }
-
- QmlAnimationGroupPrivate *anim;
- };
-
- AnimationList animations;
- QAnimationGroup *ag;
+ QmlNumberAnimation(QObject *parent=0);
+ virtual ~QmlNumberAnimation();
+
+ qreal from() const;
+ void setFrom(qreal);
+
+ qreal to() const;
+ void setTo(qreal);
};
-class QmlPropertyAnimationPrivate : public QmlAbstractAnimationPrivate
+class QmlAnimationGroupPrivate;
+class QmlAnimationGroup : public QmlAbstractAnimation
{
- Q_DECLARE_PUBLIC(QmlPropertyAnimation)
-public:
- QmlPropertyAnimationPrivate()
- : QmlAbstractAnimationPrivate(), fromSourced(false), fromIsDefined(false), toIsDefined(false),
- defaultToInterpolatorType(0), interpolatorType(0), interpolator(0), va(0),
- value(this, &QmlPropertyAnimationPrivate::valueChanged) {}
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlAnimationGroup)
- void init();
+ Q_CLASSINFO("DefaultProperty", "animations")
+ Q_PROPERTY(QmlList<QmlAbstractAnimation *> *animations READ animations)
- QVariant from;
- QVariant to;
+public:
+ QmlAnimationGroup(QObject *parent);
+ virtual ~QmlAnimationGroup();
- QString easing;
+ QmlList<QmlAbstractAnimation *>* animations();
+ friend class QmlAbstractAnimation;
+};
+
+class QmlSequentialAnimation : public QmlAnimationGroup
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlAnimationGroup)
- QString properties;
- QList<QObject *> targets;
- QList<QObject *> exclude;
+public:
+ QmlSequentialAnimation(QObject *parent=0);
+ virtual ~QmlSequentialAnimation();
- bool fromSourced;
- bool fromIsDefined;
- bool toIsDefined;
- bool defaultToInterpolatorType;
- int interpolatorType;
- QVariantAnimation::Interpolator interpolator;
+protected:
+ virtual void transition(QmlStateActions &actions,
+ QmlMetaProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation();
+ virtual void prepare(QmlMetaProperty &);
+};
- QmlTimeLineValueAnimator *va;
- virtual void valueChanged(qreal);
+class QmlParallelAnimation : public QmlAnimationGroup
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QmlAnimationGroup)
- QmlTimeLineValueProxy<QmlPropertyAnimationPrivate> value;
+public:
+ QmlParallelAnimation(QObject *parent=0);
+ virtual ~QmlParallelAnimation();
- static QVariant interpolateVariant(const QVariant &from, const QVariant &to, qreal progress);
- static void convertVariant(QVariant &variant, int type);
+protected:
+ virtual void transition(QmlStateActions &actions,
+ QmlMetaProperties &modified,
+ TransitionDirection direction);
+ virtual QAbstractAnimation *qtAnimation();
+ virtual void prepare(QmlMetaProperty &);
};
QT_END_NAMESPACE
-#endif // QMLANIMATION_P_H
+QML_DECLARE_TYPE(QmlAbstractAnimation)
+QML_DECLARE_TYPE(QmlPauseAnimation)
+QML_DECLARE_TYPE(QmlScriptAction)
+QML_DECLARE_TYPE(QmlPropertyAction)
+QML_DECLARE_TYPE(QmlParentAction)
+QML_DECLARE_TYPE(QmlPropertyAnimation)
+QML_DECLARE_TYPE(QmlColorAnimation)
+QML_DECLARE_TYPE(QmlNumberAnimation)
+QML_DECLARE_TYPE(QmlSequentialAnimation)
+QML_DECLARE_TYPE(QmlParallelAnimation)
+
+QT_END_HEADER
+
+#endif // QMLANIMATION_H
diff --git a/src/declarative/util/qmlanimation_p_p.h b/src/declarative/util/qmlanimation_p_p.h
new file mode 100644
index 0000000..1372343
--- /dev/null
+++ b/src/declarative/util/qmlanimation_p_p.h
@@ -0,0 +1,362 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMLANIMATION_P_H
+#define QMLANIMATION_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <private/qobject_p.h>
+#include <private/qmlnullablevalue_p_p.h>
+#include <private/qvariantanimation_p.h>
+#include <QtCore/QPauseAnimation>
+#include <QtCore/QVariantAnimation>
+#include <QtCore/QAnimationGroup>
+#include <QtGui/QColor>
+#include <private/qmlanimation_p.h>
+#include <QtDeclarative/qml.h>
+#include <QtDeclarative/qmlcontext.h>
+#include <private/qmltimeline_p_p.h>
+
+QT_BEGIN_NAMESPACE
+
+//interface for classes that provide animation actions for QActionAnimation
+class QAbstractAnimationAction
+{
+public:
+ virtual ~QAbstractAnimationAction() {}
+ virtual void doAction() = 0;
+};
+
+//templated animation action
+//allows us to specify an action that calls a function of a class.
+//(so that class doesn't have to inherit QmlAbstractAnimationAction)
+template<class T, void (T::*method)()>
+class QAnimationActionProxy : public QAbstractAnimationAction
+{
+public:
+ QAnimationActionProxy(T *p) : m_p(p) {}
+ virtual void doAction() { (m_p->*method)(); }
+
+private:
+ T *m_p;
+};
+
+//performs an action of type QAbstractAnimationAction
+class QActionAnimation : public QAbstractAnimation
+{
+ Q_OBJECT
+public:
+ QActionAnimation(QObject *parent = 0) : QAbstractAnimation(parent), animAction(0), policy(KeepWhenStopped) {}
+ QActionAnimation(QAbstractAnimationAction *action, QObject *parent = 0)
+ : QAbstractAnimation(parent), animAction(action), policy(KeepWhenStopped) {}
+ virtual int duration() const { return 0; }
+ void setAnimAction(QAbstractAnimationAction *action, DeletionPolicy p)
+ {
+ if (state() == Running)
+ stop();
+ animAction = action;
+ policy = p;
+ }
+protected:
+ virtual void updateCurrentTime(int) {}
+
+ virtual void updateState(State /*oldState*/, State newState)
+ {
+ if (newState == Running) {
+ if (animAction)
+ animAction->doAction();
+ } else if (newState == Stopped && policy == DeleteWhenStopped) {
+ delete animAction;
+ animAction = 0;
+ }
+ }
+
+private:
+ QAbstractAnimationAction *animAction;
+ DeletionPolicy policy;
+};
+
+//animates QmlTimeLineValue (assumes start and end values will be reals or compatible)
+class QmlTimeLineValueAnimator : public QVariantAnimation
+{
+ Q_OBJECT
+public:
+ QmlTimeLineValueAnimator(QObject *parent = 0) : QVariantAnimation(parent), animValue(0), fromSourced(0), policy(KeepWhenStopped) {}
+ void setAnimValue(QmlTimeLineValue *value, DeletionPolicy p)
+ {
+ if (state() == Running)
+ stop();
+ animValue = value;
+ policy = p;
+ }
+ void setFromSourcedValue(bool *value)
+ {
+ fromSourced = value;
+ }
+protected:
+ virtual void updateCurrentValue(const QVariant &value)
+ {
+ if (animValue)
+ animValue->setValue(value.toDouble());
+ }
+ virtual void updateState(State oldState, State newState)
+ {
+ QVariantAnimation::updateState(oldState, newState);
+ if (newState == Running) {
+ //check for new from every loop
+ if (fromSourced)
+ *fromSourced = false;
+ } else if (newState == Stopped && policy == DeleteWhenStopped) {
+ delete animValue;
+ animValue = 0;
+ }
+ }
+
+private:
+ QmlTimeLineValue *animValue;
+ bool *fromSourced;
+ DeletionPolicy policy;
+};
+
+//an animation that just gives a tick
+template<class T, void (T::*method)(int)>
+class QTickAnimationProxy : public QAbstractAnimation
+{
+ //Q_OBJECT //doesn't work with templating
+public:
+ QTickAnimationProxy(T *p, QObject *parent = 0) : QAbstractAnimation(parent), m_p(p) {}
+ virtual int duration() const { return -1; }
+protected:
+ virtual void updateCurrentTime(int msec) { (m_p->*method)(msec); }
+
+private:
+ T *m_p;
+};
+
+class QmlAbstractAnimationPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QmlAbstractAnimation)
+public:
+ QmlAbstractAnimationPrivate()
+ : running(false), paused(false), alwaysRunToEnd(false), repeat(false),
+ connectedTimeLine(false), componentComplete(true), startOnCompletion(false),
+ target(0), group(0) {}
+
+ bool running;
+ bool paused;
+ bool alwaysRunToEnd;
+ bool repeat;
+ bool connectedTimeLine;
+
+ bool componentComplete;
+ bool startOnCompletion;
+
+ void commence();
+
+ QmlNullableValue<QmlMetaProperty> userProperty;
+ QObject *target;
+ QString propertyName;
+
+ QmlMetaProperty property;
+ QmlAnimationGroup *group;
+
+ QmlMetaProperty createProperty(QObject *obj, const QString &str);
+};
+
+class QmlPauseAnimationPrivate : public QmlAbstractAnimationPrivate
+{
+ Q_DECLARE_PUBLIC(QmlPauseAnimation)
+public:
+ QmlPauseAnimationPrivate()
+ : QmlAbstractAnimationPrivate(), pa(0) {}
+
+ void init();
+
+ QPauseAnimation *pa;
+};
+
+class QmlScriptActionPrivate : public QmlAbstractAnimationPrivate
+{
+ Q_DECLARE_PUBLIC(QmlScriptAction)
+public:
+ QmlScriptActionPrivate()
+ : QmlAbstractAnimationPrivate(), hasRunScriptScript(false), proxy(this), rsa(0) {}
+
+ void init();
+
+ QmlScriptString script;
+ QString name;
+ QmlScriptString runScriptScript;
+ bool hasRunScriptScript;
+
+ void execute();
+
+ QAnimationActionProxy<QmlScriptActionPrivate,
+ &QmlScriptActionPrivate::execute> proxy;
+ QActionAnimation *rsa;
+};
+
+class QmlPropertyActionPrivate : public QmlAbstractAnimationPrivate
+{
+ Q_DECLARE_PUBLIC(QmlPropertyAction)
+public:
+ QmlPropertyActionPrivate()
+ : QmlAbstractAnimationPrivate(), proxy(this), spa(0) {}
+
+ void init();
+
+ QString properties;
+ QList<QObject *> targets;
+ QList<QObject *> exclude;
+
+ QmlNullableValue<QVariant> value;
+
+ void doAction();
+
+ QAnimationActionProxy<QmlPropertyActionPrivate,
+ &QmlPropertyActionPrivate::doAction> proxy;
+ QActionAnimation *spa;
+};
+
+class QmlParentActionPrivate : public QmlAbstractAnimationPrivate
+{
+ Q_DECLARE_PUBLIC(QmlParentAction)
+public:
+ QmlParentActionPrivate()
+ : QmlAbstractAnimationPrivate(), pcTarget(0), pcParent(0) {}
+
+ void init();
+
+ QmlGraphicsItem *pcTarget;
+ QmlGraphicsItem *pcParent;
+
+ void doAction();
+ QActionAnimation *cpa;
+};
+
+class QmlAnimationGroupPrivate : public QmlAbstractAnimationPrivate
+{
+ Q_DECLARE_PUBLIC(QmlAnimationGroup)
+public:
+ QmlAnimationGroupPrivate()
+ : QmlAbstractAnimationPrivate(), animations(this), ag(0) {}
+
+ struct AnimationList : public QmlConcreteList<QmlAbstractAnimation *>
+ {
+ AnimationList(QmlAnimationGroupPrivate *p)
+ : anim(p) {}
+ virtual void append(QmlAbstractAnimation *a) {
+ QmlConcreteList<QmlAbstractAnimation *>::append(a);
+ a->setGroup(anim->q_func());
+ }
+ virtual void clear()
+ {
+ for (int i = 0; i < count(); ++i)
+ at(i)->setGroup(0);
+ QmlConcreteList<QmlAbstractAnimation *>::clear();
+ }
+ virtual void removeAt(int i)
+ {
+ at(i)->setGroup(0);
+ QmlConcreteList<QmlAbstractAnimation *>::removeAt(i);
+ }
+ virtual void insert(int i, QmlAbstractAnimation *a)
+ {
+ QmlConcreteList<QmlAbstractAnimation *>::insert(i, a);
+ a->setGroup(anim->q_func());
+ }
+
+ QmlAnimationGroupPrivate *anim;
+ };
+
+ AnimationList animations;
+ QAnimationGroup *ag;
+};
+
+class QmlPropertyAnimationPrivate : public QmlAbstractAnimationPrivate
+{
+ Q_DECLARE_PUBLIC(QmlPropertyAnimation)
+public:
+ QmlPropertyAnimationPrivate()
+ : QmlAbstractAnimationPrivate(), fromSourced(false), fromIsDefined(false), toIsDefined(false),
+ defaultToInterpolatorType(0), interpolatorType(0), interpolator(0), va(0),
+ value(this, &QmlPropertyAnimationPrivate::valueChanged) {}
+
+ void init();
+
+ QVariant from;
+ QVariant to;
+
+ QString easing;
+
+ QString properties;
+ QList<QObject *> targets;
+ QList<QObject *> exclude;
+
+ bool fromSourced;
+ bool fromIsDefined;
+ bool toIsDefined;
+ bool defaultToInterpolatorType;
+ int interpolatorType;
+ QVariantAnimation::Interpolator interpolator;
+
+ QmlTimeLineValueAnimator *va;
+ virtual void valueChanged(qreal);
+
+ QmlTimeLineValueProxy<QmlPropertyAnimationPrivate> value;
+
+ static QVariant interpolateVariant(const QVariant &from, const QVariant &to, qreal progress);
+ static void convertVariant(QVariant &variant, int type);
+};
+
+QT_END_NAMESPACE
+
+#endif // QMLANIMATION_P_H
diff --git a/src/declarative/util/qmlbind.cpp b/src/declarative/util/qmlbind.cpp
index d18ef47..eadad08 100644
--- a/src/declarative/util/qmlbind.cpp
+++ b/src/declarative/util/qmlbind.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,8 +47,8 @@
#include <QtScript/qscriptvalue.h>
#include <QtScript/qscriptcontext.h>
#include <QtScript/qscriptengine.h>
-#include <private/qmlnullablevalue_p.h>
-#include "qmlbind.h"
+#include <private/qmlnullablevalue_p_p.h>
+#include "qmlbind_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/util/qmlbind.h b/src/declarative/util/qmlbind_p.h
index 731cdf8..c3118a3 100644
--- a/src/declarative/util/qmlbind.h
+++ b/src/declarative/util/qmlbind_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,7 +42,6 @@
#ifndef QMLBIND_H
#define QMLBIND_H
-#include <QtDeclarative/qfxglobal.h>
#include <QtCore/qobject.h>
#include <QtDeclarative/qml.h>
diff --git a/src/declarative/util/qmlconnection.cpp b/src/declarative/util/qmlconnection.cpp
index 5475fb2..27ac374 100644
--- a/src/declarative/util/qmlconnection.cpp
+++ b/src/declarative/util/qmlconnection.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmlconnection.h"
+#include "qmlconnection_p.h"
#include <QtDeclarative/qmlexpression.h>
#include "private/qmlboundsignal_p.h"
#include "private/qobject_p.h"
diff --git a/src/declarative/util/qmlconnection.h b/src/declarative/util/qmlconnection_p.h
index 3d69c6f..7a69771 100644
--- a/src/declarative/util/qmlconnection.h
+++ b/src/declarative/util/qmlconnection_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/util/qmleasefollow.cpp b/src/declarative/util/qmleasefollow.cpp
index 9d17d25..5447c56 100644
--- a/src/declarative/util/qmleasefollow.cpp
+++ b/src/declarative/util/qmleasefollow.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,30 +21,29 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmleasefollow.h"
+#include "qmleasefollow_p.h"
#include <QtDeclarative/qmlmetaproperty.h>
#include <math.h>
#include <QtCore/qdebug.h>
-#include <private/qmlanimation_p.h>
+#include <private/qmlanimation_p_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/util/qmleasefollow.h b/src/declarative/util/qmleasefollow_p.h
index a653ea6..3de72f2 100644
--- a/src/declarative/util/qmleasefollow.h
+++ b/src/declarative/util/qmleasefollow_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -95,7 +95,7 @@ public:
virtual void setTarget(const QmlMetaProperty &);
-signals:
+Q_SIGNALS:
void sourceChanged();
void velocityChanged();
void durationChanged();
diff --git a/src/declarative/util/qmllistaccessor.cpp b/src/declarative/util/qmllistaccessor.cpp
index 3e4cb64..910f2a5 100644
--- a/src/declarative/util/qmllistaccessor.cpp
+++ b/src/declarative/util/qmllistaccessor.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmllistaccessor.h"
+#include "qmllistaccessor_p.h"
#include <QStringList>
#include <qmlmetatype.h>
#include <QtCore/qdebug.h>
diff --git a/src/declarative/util/qmllistaccessor.h b/src/declarative/util/qmllistaccessor_p.h
index c3ff632..2697606 100644
--- a/src/declarative/util/qmllistaccessor.h
+++ b/src/declarative/util/qmllistaccessor_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index 9c9fa6a..dba2203 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,9 +44,9 @@
#include <QXmlStreamReader>
#include <private/qmlcustomparser_p.h>
#include <private/qmlparser_p.h>
-#include "qmlopenmetaobject.h"
+#include "qmlopenmetaobject_p.h"
#include <qmlcontext.h>
-#include "qmllistmodel.h"
+#include "qmllistmodel_p.h"
#include <QtScript/qscriptvalueiterator.h>
Q_DECLARE_METATYPE(QListModelInterface *)
@@ -72,7 +72,7 @@ struct ListModelData
static void dump(ModelNode *node, int ind);
/*!
- \qmlclass ListModel
+ \qmlclass ListModel QmlListModel
\brief The ListModel element defines a free-form list data source.
The ListModel is a simple hierarchy of elements containing data roles. The contents can
diff --git a/src/declarative/util/qmllistmodel.h b/src/declarative/util/qmllistmodel_p.h
index 7bb94cf..8676024 100644
--- a/src/declarative/util/qmllistmodel.h
+++ b/src/declarative/util/qmllistmodel_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,9 +47,8 @@
#include <QtCore/QHash>
#include <QtCore/QList>
#include <QtCore/QVariant>
-#include <QtDeclarative/qfxglobal.h>
#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qlistmodelinterface.h>
+#include <private/qlistmodelinterface_p.h>
#include <QtScript/qscriptvalue.h>
diff --git a/src/declarative/util/qmlnullablevalue_p.h b/src/declarative/util/qmlnullablevalue_p_p.h
index 6455642..151a3d4 100644
--- a/src/declarative/util/qmlnullablevalue_p.h
+++ b/src/declarative/util/qmlnullablevalue_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/util/qmlopenmetaobject.cpp b/src/declarative/util/qmlopenmetaobject.cpp
index 11648f6..05ff80a 100644
--- a/src/declarative/util/qmlopenmetaobject.cpp
+++ b/src/declarative/util/qmlopenmetaobject.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmlopenmetaobject.h"
+#include "qmlopenmetaobject_p.h"
#include "private/qmetaobjectbuilder_p.h"
#include <QDebug>
diff --git a/src/declarative/util/qmlopenmetaobject.h b/src/declarative/util/qmlopenmetaobject_p.h
index be0490d..1cf12f8 100644
--- a/src/declarative/util/qmlopenmetaobject.h
+++ b/src/declarative/util/qmlopenmetaobject_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/util/qmlpackage.cpp b/src/declarative/util/qmlpackage.cpp
index 7df8453..4d7fa86 100644
--- a/src/declarative/util/qmlpackage.cpp
+++ b/src/declarative/util/qmlpackage.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "private/qobject_p.h"
-#include "qmlpackage.h"
+#include "qmlpackage_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/util/qmlpackage.h b/src/declarative/util/qmlpackage_p.h
index 7cceaa7..abb57c6 100644
--- a/src/declarative/util/qmlpackage.h
+++ b/src/declarative/util/qmlpackage_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp
index 7e1f15c..8ba4b25 100644
--- a/src/declarative/util/qmlpropertychanges.cpp
+++ b/src/declarative/util/qmlpropertychanges.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,28 +21,27 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "private/qobject_p.h"
-#include "qmlopenmetaobject.h"
-#include "qmlpropertychanges.h"
+#include "qmlopenmetaobject_p.h"
+#include "qmlpropertychanges_p.h"
#include <QtCore/qdebug.h>
#include <QtDeclarative/qmlinfo.h>
#include <private/qmlcustomparser_p.h>
@@ -127,11 +127,12 @@ public:
QObject *object;
QByteArray data;
- bool decoded;
- void decode();
- bool restore;
- bool isExplicit;
+ bool decoded : 1;
+ bool restore : 1;
+ bool isExplicit : 1;
+
+ void decode();
QList<QPair<QByteArray, QVariant> > properties;
QList<QPair<QByteArray, QmlExpression *> > expressions;
diff --git a/src/declarative/util/qmlpropertychanges.h b/src/declarative/util/qmlpropertychanges_p.h
index 2931cdb..2c0cba9 100644
--- a/src/declarative/util/qmlpropertychanges.h
+++ b/src/declarative/util/qmlpropertychanges_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,7 +42,7 @@
#ifndef QMLPROPERTYCHANGES_H
#define QMLPROPERTYCHANGES_H
-#include <QtDeclarative/qmlstateoperations.h>
+#include <private/qmlstateoperations_p.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/util/qmlpropertymap.cpp b/src/declarative/util/qmlpropertymap.cpp
index a587af3..8abf09f 100644
--- a/src/declarative/util/qmlpropertymap.cpp
+++ b/src/declarative/util/qmlpropertymap.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmlpropertymap.h"
-#include <qmlopenmetaobject.h>
+#include "qmlpropertymap_p.h"
+#include <private/qmlopenmetaobject_p.h>
#include <QDebug>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/util/qmlpropertymap.h b/src/declarative/util/qmlpropertymap_p.h
index 24b4395..bb397fe 100644
--- a/src/declarative/util/qmlpropertymap.h
+++ b/src/declarative/util/qmlpropertymap_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,7 +42,6 @@
#ifndef QMLPROPERTYMAP_H
#define QMLPROPERTYMAP_H
-#include <QtDeclarative/qfxglobal.h>
#include <QtCore/QObject>
#include <QtCore/QHash>
#include <QtCore/QStringList>
diff --git a/src/declarative/util/qmlspringfollow.cpp b/src/declarative/util/qmlspringfollow.cpp
index 569cc48..e743aa5 100644
--- a/src/declarative/util/qmlspringfollow.cpp
+++ b/src/declarative/util/qmlspringfollow.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,8 +43,8 @@
#include <math.h>
#include <QtCore/qdebug.h>
#include "private/qobject_p.h"
-#include "qmlspringfollow.h"
-#include "private/qmlanimation_p.h"
+#include "qmlspringfollow_p.h"
+#include "private/qmlanimation_p_p.h"
QT_BEGIN_NAMESPACE
@@ -56,8 +56,8 @@ class QmlSpringFollowPrivate : public QObjectPrivate
public:
QmlSpringFollowPrivate()
: sourceValue(0), maxVelocity(0), lastTime(0)
- , mass(1.0), useMass(false), spring(0.), damping(0.), velocity(0), epsilon(0.01)
- , modulus(0.0), haveModulus(false), enabled(true), mode(Track), clock(this) {}
+ , mass(1.0), spring(0.), damping(0.), velocity(0), epsilon(0.01)
+ , modulus(0.0), useMass(false), haveModulus(false), enabled(true), mode(Track), clock(this) {}
QmlMetaProperty property;
qreal currentValue;
@@ -66,14 +66,15 @@ public:
qreal velocityms;
int lastTime;
qreal mass;
- bool useMass;
qreal spring;
qreal damping;
qreal velocity;
qreal epsilon;
qreal modulus;
- bool haveModulus;
- bool enabled;
+
+ bool useMass : 1;
+ bool haveModulus : 1;
+ bool enabled : 1;
enum Mode {
Track,
diff --git a/src/declarative/util/qmlspringfollow.h b/src/declarative/util/qmlspringfollow_p.h
index 1b77861..b81539a 100644
--- a/src/declarative/util/qmlspringfollow.h
+++ b/src/declarative/util/qmlspringfollow_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QMLFOLLOW_H
-#define QMLFOLLOW_H
+#ifndef QMLSMOOTHFOLLOW_H
+#define QMLSMOOTHFOLLOW_H
#include <QtDeclarative/qmlpropertyvaluesource.h>
#include <QtDeclarative/qml.h>
@@ -110,4 +110,4 @@ QML_DECLARE_TYPE(QmlSpringFollow)
QT_END_HEADER
-#endif // QFXFOLLOW_H
+#endif // QMLSMOOTHFOLLOW_H
diff --git a/src/declarative/util/qmlstate.cpp b/src/declarative/util/qmlstate.cpp
index 425480c..ce4b540 100644
--- a/src/declarative/util/qmlstate.cpp
+++ b/src/declarative/util/qmlstate.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,34 +21,34 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmltransition.h"
-#include "qmlstategroup.h"
-#include "qmlstate_p.h"
+#include "qmltransition_p.h"
+#include "qmlstategroup_p.h"
+#include "qmlstate_p_p.h"
#include "qmlbinding.h"
-#include "qmlstateoperations.h"
-#include "qmlanimation.h"
+#include "qmlstateoperations_p.h"
#include "qmlanimation_p.h"
-#include "qmlstate.h"
+#include "qmlanimation_p_p.h"
+#include "qmlstate_p.h"
#include <QtCore/qdebug.h>
+#include <private/qmlglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -125,7 +126,7 @@ QmlStateOperation::QmlStateOperation(QObjectPrivate &dd, QObject *parent)
}
/*!
- \qmlclass State
+ \qmlclass State QmlState
\brief The State element defines configurations of objects and properties.
A state is specified as a set of batched changes from the default configuration.
diff --git a/src/declarative/util/qmlstate.h b/src/declarative/util/qmlstate.h
deleted file mode 100644
index 50128c0..0000000
--- a/src/declarative/util/qmlstate.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLSTATE_H
-#define QMLSTATE_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/QSequentialAnimationGroup>
-#include <QtDeclarative/qfxglobal.h>
-#include <QtDeclarative/qml.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-
-class ActionEvent;
-class QmlBinding;
-class Action
-{
-public:
- Action();
- Action(QObject *, const QString &, const QVariant &);
-
- bool restore:1;
- bool actionDone:1;
- bool reverseEvent:1;
- bool deletableToBinding:1;
-
- QmlMetaProperty property;
- QVariant fromValue;
- QVariant toValue;
-
- QmlAbstractBinding *fromBinding;
- QmlAbstractBinding *toBinding;
- ActionEvent *event;
-
- //strictly for matching
- QObject *specifiedObject;
- QString specifiedProperty;
-
- void deleteFromBinding();
-};
-
-class ActionEvent
-{
-public:
- virtual ~ActionEvent();
- virtual QString typeName() const;
-
- virtual void execute();
- virtual bool isReversable();
- virtual void reverse();
- virtual void saveOriginals() {}
-
- //virtual bool hasExtraActions();
- virtual QList<Action> extraActions();
-
- virtual bool changesBindings();
- virtual void clearForwardBindings();
- virtual void clearReverseBindings();
- virtual bool override(ActionEvent*other);
-};
-
-//### rename to QmlStateChange?
-class QmlStateGroup;
-class Q_DECLARATIVE_EXPORT QmlStateOperation : public QObject
-{
- Q_OBJECT
-public:
- QmlStateOperation(QObject *parent = 0)
- : QObject(parent) {}
- typedef QList<Action> ActionList;
-
- virtual ActionList actions();
-
-protected:
- QmlStateOperation(QObjectPrivate &dd, QObject *parent = 0);
-};
-
-typedef QmlStateOperation::ActionList QmlStateActions;
-
-class QmlTransition;
-class QmlStatePrivate;
-class Q_DECLARATIVE_EXPORT QmlState : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(QString name READ name WRITE setName)
- Q_PROPERTY(QmlBinding *when READ when WRITE setWhen)
- Q_PROPERTY(QString extend READ extends WRITE setExtends)
- Q_PROPERTY(QmlList<QmlStateOperation *>* changes READ changes)
- Q_CLASSINFO("DefaultProperty", "changes")
-
-public:
- QmlState(QObject *parent=0);
- virtual ~QmlState();
-
- QString name() const;
- void setName(const QString &);
-
- /*'when' is a QmlBinding to limit state changes oscillation
- due to the unpredictable order of evaluation of bound expressions*/
- bool isWhenKnown() const;
- QmlBinding *when() const;
- void setWhen(QmlBinding *);
-
- QString extends() const;
- void setExtends(const QString &);
-
- QmlList<QmlStateOperation *> *changes();
- QmlState &operator<<(QmlStateOperation *);
-
- void apply(QmlStateGroup *, QmlTransition *, QmlState *revert);
- void cancel();
-
- QmlStateGroup *stateGroup() const;
- void setStateGroup(QmlStateGroup *);
-
-Q_SIGNALS:
- void completed();
-
-private:
- Q_DECLARE_PRIVATE(QmlState)
- Q_DISABLE_COPY(QmlState)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QmlStateOperation)
-QML_DECLARE_TYPE(QmlState)
-
-QT_END_HEADER
-
-#endif // QMLSTATE_H
diff --git a/src/declarative/util/qmlstate_p.h b/src/declarative/util/qmlstate_p.h
index 63fc6da..92aef8c 100644
--- a/src/declarative/util/qmlstate_p.h
+++ b/src/declarative/util/qmlstate_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,102 +21,153 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QMLSTATE_P_H
-#define QMLSTATE_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtDeclarative/qmlstate.h>
-#include <private/qobject_p.h>
-#include <private/qmlanimation_p.h>
-#include <private/qmltransitionmanager_p.h>
+#ifndef QMLSTATE_H
+#define QMLSTATE_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/QSequentialAnimationGroup>
+#include <QtDeclarative/qml.h>
+
+QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class SimpleAction
+QT_MODULE(Declarative)
+
+class ActionEvent;
+class QmlBinding;
+class Action
{
public:
- enum State { StartState, EndState };
- SimpleAction(const Action &a, State state = StartState)
- {
- property = a.property;
- specifiedObject = a.specifiedObject;
- specifiedProperty = a.specifiedProperty;
- event = a.event;
- if (state == StartState) {
- value = a.fromValue;
- binding = property.binding();
- reverseEvent = true;
- } else {
- value = a.toValue;
- binding = a.toBinding;
- reverseEvent = false;
- }
- }
+ Action();
+ Action(QObject *, const QString &, const QVariant &);
+
+ bool restore:1;
+ bool actionDone:1;
+ bool reverseEvent:1;
+ bool deletableToBinding:1;
QmlMetaProperty property;
- QVariant value;
- QmlAbstractBinding *binding;
+ QVariant fromValue;
+ QVariant toValue;
+
+ QmlAbstractBinding *fromBinding;
+ QmlAbstractBinding *toBinding;
+ ActionEvent *event;
+
+ //strictly for matching
QObject *specifiedObject;
QString specifiedProperty;
- ActionEvent *event;
- bool reverseEvent;
+
+ void deleteFromBinding();
};
-class QmlStatePrivate : public QObjectPrivate
+class ActionEvent
{
- Q_DECLARE_PUBLIC(QmlState)
+public:
+ virtual ~ActionEvent();
+ virtual QString typeName() const;
+
+ virtual void execute();
+ virtual bool isReversable();
+ virtual void reverse();
+ virtual void saveOriginals() {}
+
+ //virtual bool hasExtraActions();
+ virtual QList<Action> extraActions();
+
+ virtual bool changesBindings();
+ virtual void clearForwardBindings();
+ virtual void clearReverseBindings();
+ virtual bool override(ActionEvent*other);
+};
+
+//### rename to QmlStateChange?
+class QmlStateGroup;
+class Q_DECLARATIVE_EXPORT QmlStateOperation : public QObject
+{
+ Q_OBJECT
+public:
+ QmlStateOperation(QObject *parent = 0)
+ : QObject(parent) {}
+ typedef QList<Action> ActionList;
+
+ virtual ActionList actions();
+
+protected:
+ QmlStateOperation(QObjectPrivate &dd, QObject *parent = 0);
+};
+
+typedef QmlStateOperation::ActionList QmlStateActions;
+
+class QmlTransition;
+class QmlStatePrivate;
+class Q_DECLARATIVE_EXPORT QmlState : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString name READ name WRITE setName)
+ Q_PROPERTY(QmlBinding *when READ when WRITE setWhen)
+ Q_PROPERTY(QString extend READ extends WRITE setExtends)
+ Q_PROPERTY(QmlList<QmlStateOperation *>* changes READ changes)
+ Q_CLASSINFO("DefaultProperty", "changes")
public:
- QmlStatePrivate()
- : when(0), inState(false), group(0) {}
+ QmlState(QObject *parent=0);
+ virtual ~QmlState();
+
+ QString name() const;
+ void setName(const QString &);
- typedef QList<SimpleAction> SimpleActionList;
+ /*'when' is a QmlBinding to limit state changes oscillation
+ due to the unpredictable order of evaluation of bound expressions*/
+ bool isWhenKnown() const;
+ QmlBinding *when() const;
+ void setWhen(QmlBinding *);
- QString name;
- QmlBinding *when;
- QmlConcreteList<QmlStateOperation *> operations;
+ QString extends() const;
+ void setExtends(const QString &);
- QmlTransitionManager transitionManager;
+ QmlList<QmlStateOperation *> *changes();
+ QmlState &operator<<(QmlStateOperation *);
- SimpleActionList revertList;
- QList<QmlMetaProperty> reverting;
- QString extends;
- mutable bool inState;
- QmlStateGroup *group;
+ void apply(QmlStateGroup *, QmlTransition *, QmlState *revert);
+ void cancel();
- QmlStateOperation::ActionList generateActionList(QmlStateGroup *) const;
- void complete();
+ QmlStateGroup *stateGroup() const;
+ void setStateGroup(QmlStateGroup *);
+
+Q_SIGNALS:
+ void completed();
+
+private:
+ Q_DECLARE_PRIVATE(QmlState)
+ Q_DISABLE_COPY(QmlState)
};
QT_END_NAMESPACE
-#endif // QMLSTATE_P_H
+QML_DECLARE_TYPE(QmlStateOperation)
+QML_DECLARE_TYPE(QmlState)
+
+QT_END_HEADER
+
+#endif // QMLSTATE_H
diff --git a/src/declarative/util/qmlstate_p_p.h b/src/declarative/util/qmlstate_p_p.h
new file mode 100644
index 0000000..095a7d2
--- /dev/null
+++ b/src/declarative/util/qmlstate_p_p.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMLSTATE_P_H
+#define QMLSTATE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <private/qmlstate_p.h>
+#include <private/qobject_p.h>
+#include <private/qmlanimation_p_p.h>
+#include <private/qmltransitionmanager_p_p.h>
+
+QT_BEGIN_NAMESPACE
+
+class SimpleAction
+{
+public:
+ enum State { StartState, EndState };
+ SimpleAction(const Action &a, State state = StartState)
+ {
+ property = a.property;
+ specifiedObject = a.specifiedObject;
+ specifiedProperty = a.specifiedProperty;
+ event = a.event;
+ if (state == StartState) {
+ value = a.fromValue;
+ binding = property.binding();
+ reverseEvent = true;
+ } else {
+ value = a.toValue;
+ binding = a.toBinding;
+ reverseEvent = false;
+ }
+ }
+
+ QmlMetaProperty property;
+ QVariant value;
+ QmlAbstractBinding *binding;
+ QObject *specifiedObject;
+ QString specifiedProperty;
+ ActionEvent *event;
+ bool reverseEvent;
+};
+
+class QmlStatePrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QmlState)
+
+public:
+ QmlStatePrivate()
+ : when(0), inState(false), group(0) {}
+
+ typedef QList<SimpleAction> SimpleActionList;
+
+ QString name;
+ QmlBinding *when;
+ QmlConcreteList<QmlStateOperation *> operations;
+
+ QmlTransitionManager transitionManager;
+
+ SimpleActionList revertList;
+ QList<QmlMetaProperty> reverting;
+ QString extends;
+ mutable bool inState;
+ QmlStateGroup *group;
+
+ QmlStateOperation::ActionList generateActionList(QmlStateGroup *) const;
+ void complete();
+};
+
+QT_END_NAMESPACE
+
+#endif // QMLSTATE_P_H
diff --git a/src/declarative/util/qmlstategroup.cpp b/src/declarative/util/qmlstategroup.cpp
index bb40a8b..f518ea5 100644
--- a/src/declarative/util/qmlstategroup.cpp
+++ b/src/declarative/util/qmlstategroup.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,30 +21,30 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "private/qobject_p.h"
-#include "qmlstategroup.h"
-#include "qmltransition.h"
+#include "qmlstategroup_p.h"
+#include "qmltransition_p.h"
#include <QtDeclarative/qmlbinding.h>
#include <QtCore/qdebug.h>
+#include <private/qmlglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -274,7 +275,7 @@ void QmlStateGroupPrivate::setCurrentStateInternal(const QString &state,
}
if (oldState == 0 || newState == 0) {
- if (!nullState) { nullState = new QmlState; QFx_setParent_noEvent(nullState, q); }
+ if (!nullState) { nullState = new QmlState; QmlGraphics_setParent_noEvent(nullState, q); }
if (!oldState) oldState = nullState;
if (!newState) newState = nullState;
}
diff --git a/src/declarative/util/qmlstategroup.h b/src/declarative/util/qmlstategroup_p.h
index cf79eb4..f4c6d86 100644
--- a/src/declarative/util/qmlstategroup.h
+++ b/src/declarative/util/qmlstategroup_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,7 +42,7 @@
#ifndef QMLSTATEGROUP_H
#define QMLSTATEGROUP_H
-#include <QtDeclarative/qmlstate.h>
+#include <private/qmlstate_p.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp
index 4d469f9..ccb9a41 100644
--- a/src/declarative/util/qmlstateoperations.cpp
+++ b/src/declarative/util/qmlstateoperations.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,11 +43,11 @@
#include <qml.h>
#include <QtDeclarative/qmlcontext.h>
#include <QtDeclarative/qmlexpression.h>
-#include "qmlstateoperations.h"
+#include "qmlstateoperations_p.h"
#include <QtCore/qdebug.h>
#include <QtDeclarative/qmlinfo.h>
-#include <private/qfxanchors_p.h>
-#include <private/qfxitem_p.h>
+#include <private/qmlgraphicsanchors_p_p.h>
+#include <private/qmlgraphicsitem_p.h>
#include <QtGui/qgraphicsitem.h>
#include <QtCore/qmath.h>
@@ -59,15 +59,15 @@ class QmlParentChangePrivate : public QObjectPrivate
public:
QmlParentChangePrivate() : target(0), parent(0), origParent(0), origStackBefore(0) {}
- QFxItem *target;
- QFxItem *parent;
- QGuard<QFxItem> origParent;
- QGuard<QFxItem> origStackBefore;
+ QmlGraphicsItem *target;
+ QmlGraphicsItem *parent;
+ QGuard<QmlGraphicsItem> origParent;
+ QGuard<QmlGraphicsItem> origStackBefore;
- void doChange(QFxItem *targetParent, QFxItem *stackBefore = 0);
+ void doChange(QmlGraphicsItem *targetParent, QmlGraphicsItem *stackBefore = 0);
};
-void QmlParentChangePrivate::doChange(QFxItem *targetParent, QFxItem *stackBefore)
+void QmlParentChangePrivate::doChange(QmlGraphicsItem *targetParent, QmlGraphicsItem *stackBefore)
{
if (targetParent && target && target->parentItem()) {
//### for backwards direction, can we just restore original x, y, scale, rotation
@@ -105,7 +105,7 @@ void QmlParentChangePrivate::doChange(QFxItem *targetParent, QFxItem *stackBefor
qreal xt = transform.dx();
qreal yt = transform.dy();
- if (target->transformOrigin() != QFxItem::TopLeft) {
+ if (target->transformOrigin() != QmlGraphicsItem::TopLeft) {
qreal tempxt = target->transformOriginPoint().x();
qreal tempyt = target->transformOriginPoint().y();
QTransform t;
@@ -138,7 +138,7 @@ void QmlParentChangePrivate::doChange(QFxItem *targetParent, QFxItem *stackBefor
/*!
\preliminary
- \qmlclass ParentChange
+ \qmlclass ParentChange QmlParentChange
\brief The ParentChange element allows you to reparent an Item in a state change.
ParentChange reparents an Item while preserving its visual appearance (position, rotation,
@@ -166,13 +166,13 @@ QmlParentChange::~QmlParentChange()
This property holds the item to be reparented
*/
-QFxItem *QmlParentChange::object() const
+QmlGraphicsItem *QmlParentChange::object() const
{
Q_D(const QmlParentChange);
return d->target;
}
-void QmlParentChange::setObject(QFxItem *target)
+void QmlParentChange::setObject(QmlGraphicsItem *target)
{
Q_D(QmlParentChange);
d->target = target;
@@ -183,13 +183,13 @@ void QmlParentChange::setObject(QFxItem *target)
This property holds the parent for the item in this state
*/
-QFxItem *QmlParentChange::parent() const
+QmlGraphicsItem *QmlParentChange::parent() const
{
Q_D(const QmlParentChange);
return d->parent;
}
-void QmlParentChange::setParent(QFxItem *parent)
+void QmlParentChange::setParent(QmlGraphicsItem *parent)
{
Q_D(QmlParentChange);
d->parent = parent;
@@ -207,13 +207,13 @@ QmlStateOperation::ActionList QmlParentChange::actions()
return ActionList() << a;
}
-class AccessibleFxItem : public QFxItem
+class AccessibleFxItem : public QmlGraphicsItem
{
Q_OBJECT
- Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QFxItem)
+ Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QmlGraphicsItem)
public:
int siblingIndex() {
- Q_D(QFxItem);
+ Q_D(QmlGraphicsItem);
return d->siblingIndex;
}
};
@@ -238,7 +238,7 @@ void QmlParentChange::saveOriginals()
int siblingIndex = ((AccessibleFxItem*)d->target)->siblingIndex() + 1;
QList<QGraphicsItem*> children = d->origParent->childItems();
for (int i = 0; i < children.count(); ++i) {
- QFxItem *child = qobject_cast<QFxItem*>(children.at(i));
+ QmlGraphicsItem *child = qobject_cast<QmlGraphicsItem*>(children.at(i));
if (!child)
continue;
if (((AccessibleFxItem*)child)->siblingIndex() == siblingIndex) {
@@ -352,7 +352,7 @@ QmlStateChangeScript::ActionList QmlStateChangeScript::actions()
}
/*!
- \qmlclass AnchorChanges
+ \qmlclass AnchorChanges QmlAnchorChanges
\brief The AnchorChanges element allows you to change the anchors of an item in a state.
\snippet examples/declarative/anchors/anchor-changes.qml 0
@@ -368,24 +368,24 @@ public:
QmlAnchorChangesPrivate() : target(0) {}
QString name;
- QFxItem *target;
+ QmlGraphicsItem *target;
QString resetString;
QStringList resetList;
- QFxAnchorLine left;
- QFxAnchorLine right;
- QFxAnchorLine horizontalCenter;
- QFxAnchorLine top;
- QFxAnchorLine bottom;
- QFxAnchorLine verticalCenter;
- QFxAnchorLine baseline;
-
- QFxAnchorLine origLeft;
- QFxAnchorLine origRight;
- QFxAnchorLine origHCenter;
- QFxAnchorLine origTop;
- QFxAnchorLine origBottom;
- QFxAnchorLine origVCenter;
- QFxAnchorLine origBaseline;
+ QmlGraphicsAnchorLine left;
+ QmlGraphicsAnchorLine right;
+ QmlGraphicsAnchorLine horizontalCenter;
+ QmlGraphicsAnchorLine top;
+ QmlGraphicsAnchorLine bottom;
+ QmlGraphicsAnchorLine verticalCenter;
+ QmlGraphicsAnchorLine baseline;
+
+ QmlGraphicsAnchorLine origLeft;
+ QmlGraphicsAnchorLine origRight;
+ QmlGraphicsAnchorLine origHCenter;
+ QmlGraphicsAnchorLine origTop;
+ QmlGraphicsAnchorLine origBottom;
+ QmlGraphicsAnchorLine origVCenter;
+ QmlGraphicsAnchorLine origBaseline;
qreal origX;
qreal origY;
qreal origWidth;
@@ -413,13 +413,13 @@ QmlAnchorChanges::ActionList QmlAnchorChanges::actions()
return ActionList() << a;
}
-QFxItem *QmlAnchorChanges::object() const
+QmlGraphicsItem *QmlAnchorChanges::object() const
{
Q_D(const QmlAnchorChanges);
return d->target;
}
-void QmlAnchorChanges::setObject(QFxItem *target)
+void QmlAnchorChanges::setObject(QmlGraphicsItem *target)
{
Q_D(QmlAnchorChanges);
d->target = target;
@@ -450,85 +450,85 @@ void QmlAnchorChanges::setReset(const QString &reset)
These properties change the respective anchors of the item.
*/
-QFxAnchorLine QmlAnchorChanges::left() const
+QmlGraphicsAnchorLine QmlAnchorChanges::left() const
{
Q_D(const QmlAnchorChanges);
return d->left;
}
-void QmlAnchorChanges::setLeft(const QFxAnchorLine &edge)
+void QmlAnchorChanges::setLeft(const QmlGraphicsAnchorLine &edge)
{
Q_D(QmlAnchorChanges);
d->left = edge;
}
-QFxAnchorLine QmlAnchorChanges::right() const
+QmlGraphicsAnchorLine QmlAnchorChanges::right() const
{
Q_D(const QmlAnchorChanges);
return d->right;
}
-void QmlAnchorChanges::setRight(const QFxAnchorLine &edge)
+void QmlAnchorChanges::setRight(const QmlGraphicsAnchorLine &edge)
{
Q_D(QmlAnchorChanges);
d->right = edge;
}
-QFxAnchorLine QmlAnchorChanges::horizontalCenter() const
+QmlGraphicsAnchorLine QmlAnchorChanges::horizontalCenter() const
{
Q_D(const QmlAnchorChanges);
return d->horizontalCenter;
}
-void QmlAnchorChanges::setHorizontalCenter(const QFxAnchorLine &edge)
+void QmlAnchorChanges::setHorizontalCenter(const QmlGraphicsAnchorLine &edge)
{
Q_D(QmlAnchorChanges);
d->horizontalCenter = edge;
}
-QFxAnchorLine QmlAnchorChanges::top() const
+QmlGraphicsAnchorLine QmlAnchorChanges::top() const
{
Q_D(const QmlAnchorChanges);
return d->top;
}
-void QmlAnchorChanges::setTop(const QFxAnchorLine &edge)
+void QmlAnchorChanges::setTop(const QmlGraphicsAnchorLine &edge)
{
Q_D(QmlAnchorChanges);
d->top = edge;
}
-QFxAnchorLine QmlAnchorChanges::bottom() const
+QmlGraphicsAnchorLine QmlAnchorChanges::bottom() const
{
Q_D(const QmlAnchorChanges);
return d->bottom;
}
-void QmlAnchorChanges::setBottom(const QFxAnchorLine &edge)
+void QmlAnchorChanges::setBottom(const QmlGraphicsAnchorLine &edge)
{
Q_D(QmlAnchorChanges);
d->bottom = edge;
}
-QFxAnchorLine QmlAnchorChanges::verticalCenter() const
+QmlGraphicsAnchorLine QmlAnchorChanges::verticalCenter() const
{
Q_D(const QmlAnchorChanges);
return d->verticalCenter;
}
-void QmlAnchorChanges::setVerticalCenter(const QFxAnchorLine &edge)
+void QmlAnchorChanges::setVerticalCenter(const QmlGraphicsAnchorLine &edge)
{
Q_D(QmlAnchorChanges);
d->verticalCenter = edge;
}
-QFxAnchorLine QmlAnchorChanges::baseline() const
+QmlGraphicsAnchorLine QmlAnchorChanges::baseline() const
{
Q_D(const QmlAnchorChanges);
return d->baseline;
}
-void QmlAnchorChanges::setBaseline(const QFxAnchorLine &edge)
+void QmlAnchorChanges::setBaseline(const QmlGraphicsAnchorLine &edge)
{
Q_D(QmlAnchorChanges);
d->baseline = edge;
@@ -541,19 +541,19 @@ void QmlAnchorChanges::execute()
return;
//set any anchors that have been specified
- if (d->left.anchorLine != QFxAnchorLine::Invalid)
+ if (d->left.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setLeft(d->left);
- if (d->right.anchorLine != QFxAnchorLine::Invalid)
+ if (d->right.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setRight(d->right);
- if (d->horizontalCenter.anchorLine != QFxAnchorLine::Invalid)
+ if (d->horizontalCenter.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setHorizontalCenter(d->horizontalCenter);
- if (d->top.anchorLine != QFxAnchorLine::Invalid)
+ if (d->top.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setTop(d->top);
- if (d->bottom.anchorLine != QFxAnchorLine::Invalid)
+ if (d->bottom.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setBottom(d->bottom);
- if (d->verticalCenter.anchorLine != QFxAnchorLine::Invalid)
+ if (d->verticalCenter.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setVerticalCenter(d->verticalCenter);
- if (d->baseline.anchorLine != QFxAnchorLine::Invalid)
+ if (d->baseline.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setBaseline(d->baseline);
}
@@ -569,19 +569,19 @@ void QmlAnchorChanges::reverse()
return;
//restore previous anchors
- if (d->origLeft.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origLeft.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setLeft(d->origLeft);
- if (d->origRight.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origRight.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setRight(d->origRight);
- if (d->origHCenter.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origHCenter.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setHorizontalCenter(d->origHCenter);
- if (d->origTop.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origTop.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setTop(d->origTop);
- if (d->origBottom.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origBottom.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setBottom(d->origBottom);
- if (d->origVCenter.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origVCenter.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setVerticalCenter(d->origVCenter);
- if (d->origBaseline.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origBaseline.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->setBaseline(d->origBaseline);
}
@@ -662,19 +662,19 @@ void QmlAnchorChanges::clearForwardBindings()
d->target->anchors()->resetBaseline();
//reset any anchors that we'll be setting in the state
- if (d->left.anchorLine != QFxAnchorLine::Invalid)
+ if (d->left.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetLeft();
- if (d->right.anchorLine != QFxAnchorLine::Invalid)
+ if (d->right.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetRight();
- if (d->horizontalCenter.anchorLine != QFxAnchorLine::Invalid)
+ if (d->horizontalCenter.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetHorizontalCenter();
- if (d->top.anchorLine != QFxAnchorLine::Invalid)
+ if (d->top.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetTop();
- if (d->bottom.anchorLine != QFxAnchorLine::Invalid)
+ if (d->bottom.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetBottom();
- if (d->verticalCenter.anchorLine != QFxAnchorLine::Invalid)
+ if (d->verticalCenter.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetVerticalCenter();
- if (d->baseline.anchorLine != QFxAnchorLine::Invalid)
+ if (d->baseline.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetBaseline();
}
@@ -687,35 +687,35 @@ void QmlAnchorChanges::clearReverseBindings()
d->origHeight = d->target->height();
//reset any anchors that were set in the state
- if (d->left.anchorLine != QFxAnchorLine::Invalid)
+ if (d->left.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetLeft();
- if (d->right.anchorLine != QFxAnchorLine::Invalid)
+ if (d->right.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetRight();
- if (d->horizontalCenter.anchorLine != QFxAnchorLine::Invalid)
+ if (d->horizontalCenter.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetHorizontalCenter();
- if (d->top.anchorLine != QFxAnchorLine::Invalid)
+ if (d->top.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetTop();
- if (d->bottom.anchorLine != QFxAnchorLine::Invalid)
+ if (d->bottom.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetBottom();
- if (d->verticalCenter.anchorLine != QFxAnchorLine::Invalid)
+ if (d->verticalCenter.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetVerticalCenter();
- if (d->baseline.anchorLine != QFxAnchorLine::Invalid)
+ if (d->baseline.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetBaseline();
//reset any anchors that were set in the original state
- if (d->origLeft.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origLeft.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetLeft();
- if (d->origRight.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origRight.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetRight();
- if (d->origHCenter.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origHCenter.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetHorizontalCenter();
- if (d->origTop.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origTop.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetTop();
- if (d->origBottom.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origBottom.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetBottom();
- if (d->origVCenter.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origVCenter.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetVerticalCenter();
- if (d->origBaseline.anchorLine != QFxAnchorLine::Invalid)
+ if (d->origBaseline.anchorLine != QmlGraphicsAnchorLine::Invalid)
d->target->anchors()->resetBaseline();
}
@@ -730,8 +730,8 @@ bool QmlAnchorChanges::override(ActionEvent*other)
return false;
}
-QT_END_NAMESPACE
-
#include "qmlstateoperations.moc"
-#include "moc_qmlstateoperations.cpp"
+#include "moc_qmlstateoperations_p.cpp"
+
+QT_END_NAMESPACE
diff --git a/src/declarative/util/qmlstateoperations.h b/src/declarative/util/qmlstateoperations_p.h
index 237e3e8..2801f2b 100644
--- a/src/declarative/util/qmlstateoperations.h
+++ b/src/declarative/util/qmlstateoperations_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,9 +42,9 @@
#ifndef QMLSTATEOPERATIONS_H
#define QMLSTATEOPERATIONS_H
-#include <QtDeclarative/qmlstate.h>
-#include <QtDeclarative/qfxitem.h>
-#include <QtDeclarative/qfxanchors.h>
+#include <private/qmlstate_p.h>
+#include <QtDeclarative/qmlgraphicsitem.h>
+#include <private/qmlgraphicsanchors_p.h>
#include <QtDeclarative/qmlscriptstring.h>
QT_BEGIN_HEADER
@@ -59,17 +59,17 @@ class Q_DECLARATIVE_EXPORT QmlParentChange : public QmlStateOperation, public Ac
Q_OBJECT
Q_DECLARE_PRIVATE(QmlParentChange)
- Q_PROPERTY(QFxItem *target READ object WRITE setObject)
- Q_PROPERTY(QFxItem *parent READ parent WRITE setParent)
+ Q_PROPERTY(QmlGraphicsItem *target READ object WRITE setObject)
+ Q_PROPERTY(QmlGraphicsItem *parent READ parent WRITE setParent)
public:
QmlParentChange(QObject *parent=0);
~QmlParentChange();
- QFxItem *object() const;
- void setObject(QFxItem *);
+ QmlGraphicsItem *object() const;
+ void setObject(QmlGraphicsItem *);
- QFxItem *parent() const;
- void setParent(QFxItem *);
+ QmlGraphicsItem *parent() const;
+ void setParent(QmlGraphicsItem *);
virtual ActionList actions();
@@ -111,15 +111,15 @@ class Q_DECLARATIVE_EXPORT QmlAnchorChanges : public QmlStateOperation, public A
Q_OBJECT
Q_DECLARE_PRIVATE(QmlAnchorChanges)
- Q_PROPERTY(QFxItem *target READ object WRITE setObject)
+ Q_PROPERTY(QmlGraphicsItem *target READ object WRITE setObject)
Q_PROPERTY(QString reset READ reset WRITE setReset)
- Q_PROPERTY(QFxAnchorLine left READ left WRITE setLeft)
- Q_PROPERTY(QFxAnchorLine right READ right WRITE setRight)
- Q_PROPERTY(QFxAnchorLine horizontalCenter READ horizontalCenter WRITE setHorizontalCenter)
- Q_PROPERTY(QFxAnchorLine top READ top WRITE setTop)
- Q_PROPERTY(QFxAnchorLine bottom READ bottom WRITE setBottom)
- Q_PROPERTY(QFxAnchorLine verticalCenter READ verticalCenter WRITE setVerticalCenter)
- Q_PROPERTY(QFxAnchorLine baseline READ baseline WRITE setBaseline)
+ Q_PROPERTY(QmlGraphicsAnchorLine left READ left WRITE setLeft)
+ Q_PROPERTY(QmlGraphicsAnchorLine right READ right WRITE setRight)
+ Q_PROPERTY(QmlGraphicsAnchorLine horizontalCenter READ horizontalCenter WRITE setHorizontalCenter)
+ Q_PROPERTY(QmlGraphicsAnchorLine top READ top WRITE setTop)
+ Q_PROPERTY(QmlGraphicsAnchorLine bottom READ bottom WRITE setBottom)
+ Q_PROPERTY(QmlGraphicsAnchorLine verticalCenter READ verticalCenter WRITE setVerticalCenter)
+ Q_PROPERTY(QmlGraphicsAnchorLine baseline READ baseline WRITE setBaseline)
public:
QmlAnchorChanges(QObject *parent=0);
@@ -127,32 +127,32 @@ public:
virtual ActionList actions();
- QFxItem *object() const;
- void setObject(QFxItem *);
+ QmlGraphicsItem *object() const;
+ void setObject(QmlGraphicsItem *);
QString reset() const;
void setReset(const QString &);
- QFxAnchorLine left() const;
- void setLeft(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine left() const;
+ void setLeft(const QmlGraphicsAnchorLine &edge);
- QFxAnchorLine right() const;
- void setRight(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine right() const;
+ void setRight(const QmlGraphicsAnchorLine &edge);
- QFxAnchorLine horizontalCenter() const;
- void setHorizontalCenter(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine horizontalCenter() const;
+ void setHorizontalCenter(const QmlGraphicsAnchorLine &edge);
- QFxAnchorLine top() const;
- void setTop(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine top() const;
+ void setTop(const QmlGraphicsAnchorLine &edge);
- QFxAnchorLine bottom() const;
- void setBottom(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine bottom() const;
+ void setBottom(const QmlGraphicsAnchorLine &edge);
- QFxAnchorLine verticalCenter() const;
- void setVerticalCenter(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine verticalCenter() const;
+ void setVerticalCenter(const QmlGraphicsAnchorLine &edge);
- QFxAnchorLine baseline() const;
- void setBaseline(const QFxAnchorLine &edge);
+ QmlGraphicsAnchorLine baseline() const;
+ void setBaseline(const QmlGraphicsAnchorLine &edge);
virtual void execute();
virtual bool isReversable();
diff --git a/src/declarative/util/qmlsystempalette.cpp b/src/declarative/util/qmlsystempalette.cpp
index 014eca8..32cb4cf 100644
--- a/src/declarative/util/qmlsystempalette.cpp
+++ b/src/declarative/util/qmlsystempalette.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,27 +21,26 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "private/qobject_p.h"
-#include "qmlsystempalette.h"
+#include "qmlsystempalette_p.h"
#include <QApplication>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/util/qmlsystempalette.h b/src/declarative/util/qmlsystempalette_p.h
index 6558c7e..e87534e 100644
--- a/src/declarative/util/qmlsystempalette.h
+++ b/src/declarative/util/qmlsystempalette_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/util/qmltimeline.cpp b/src/declarative/util/qmltimeline.cpp
index 5ba310d..e8695de 100644
--- a/src/declarative/util/qmltimeline.cpp
+++ b/src/declarative/util/qmltimeline.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmltimeline_p.h"
+#include "qmltimeline_p_p.h"
#include <QDebug>
#include <QMutex>
#include <QThread>
diff --git a/src/declarative/util/qmltimeline_p.h b/src/declarative/util/qmltimeline_p_p.h
index abed80a..09d46ba 100644
--- a/src/declarative/util/qmltimeline_p.h
+++ b/src/declarative/util/qmltimeline_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -55,7 +55,6 @@
#include <QtCore/QObject>
#include <QtCore/QAbstractAnimation>
-#include <QtDeclarative/qfxglobal.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/util/qmltimer.cpp b/src/declarative/util/qmltimer.cpp
index f1991f5..268d5ec 100644
--- a/src/declarative/util/qmltimer.cpp
+++ b/src/declarative/util/qmltimer.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,7 +42,7 @@
#include "QtCore/qcoreapplication.h"
#include "QtCore/qpauseanimation.h"
#include "private/qobject_p.h"
-#include "qmltimer.h"
+#include "qmltimer_p.h"
#include "qdebug.h"
QT_BEGIN_NAMESPACE
@@ -66,7 +66,7 @@ public:
};
/*!
- \qmlclass Timer QFxTimer
+ \qmlclass Timer QmlTimer
\brief The Timer item triggers a handler at a specified interval.
A timer can be used to trigger an action either once, or repeatedly
diff --git a/src/declarative/util/qmltimer.h b/src/declarative/util/qmltimer_p.h
index 22478cb..f3037e0 100644
--- a/src/declarative/util/qmltimer.h
+++ b/src/declarative/util/qmltimer_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,7 +42,6 @@
#ifndef QMLTIMER_H
#define QMLTIMER_H
-#include <QtDeclarative/qfxglobal.h>
#include <QtCore/qobject.h>
#include <QtCore/qabstractanimation.h>
#include <QtDeclarative/qml.h>
diff --git a/src/declarative/util/qmltransition.cpp b/src/declarative/util/qmltransition.cpp
index 97a3b74..a5f4b67 100644
--- a/src/declarative/util/qmltransition.cpp
+++ b/src/declarative/util/qmltransition.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,32 +21,31 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qmlstate.h"
-#include "qmlstategroup.h"
#include "qmlstate_p.h"
-#include "qmlstateoperations.h"
-#include "qmlanimation.h"
+#include "qmlstategroup_p.h"
+#include "qmlstate_p_p.h"
+#include "qmlstateoperations_p.h"
#include "qmlanimation_p.h"
-#include "qmltransitionmanager_p.h"
+#include "qmlanimation_p_p.h"
+#include "qmltransitionmanager_p_p.h"
#include <QParallelAnimationGroup>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/util/qmltransition.h b/src/declarative/util/qmltransition_p.h
index b09341d..a7c709f 100644
--- a/src/declarative/util/qmltransition.h
+++ b/src/declarative/util/qmltransition_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -43,8 +43,7 @@
#define QMLTRANSITION_H
#include <QtCore/qobject.h>
-#include <QtDeclarative/qfxglobal.h>
-#include <QtDeclarative/qmlstate.h>
+#include <private/qmlstate_p.h>
#include <QtDeclarative/qml.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/util/qmltransitionmanager.cpp b/src/declarative/util/qmltransitionmanager.cpp
index 7eaccac..2cfc6ee 100644
--- a/src/declarative/util/qmltransitionmanager.cpp
+++ b/src/declarative/util/qmltransitionmanager.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,28 +21,27 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QtDeclarative/qmlbinding.h>
-#include <private/qmltransitionmanager_p.h>
-#include <private/qmlstate_p.h>
+#include <private/qmltransitionmanager_p_p.h>
+#include <private/qmlstate_p_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/util/qmltransitionmanager_p.h b/src/declarative/util/qmltransitionmanager_p_p.h
index 74a3950..9a05684 100644
--- a/src/declarative/util/qmltransitionmanager_p.h
+++ b/src/declarative/util/qmltransitionmanager_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,7 +53,7 @@
// We mean it.
//
-#include <QtDeclarative/qmlstateoperations.h>
+#include <private/qmlstateoperations_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/util/qmlview.cpp b/src/declarative/util/qmlview.cpp
index 329a9b2..0a2cc75 100644
--- a/src/declarative/util/qmlview.cpp
+++ b/src/declarative/util/qmlview.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -52,16 +52,17 @@
#include "qbasictimer.h"
#include "qml.h"
-#include "qfxitem.h"
-#include "private/qperformancelog_p.h"
-#include "private/qfxperf_p.h"
+#include "qmlgraphicsitem.h"
+#include "private/qperformancelog_p_p.h"
+#include "private/qfxperf_p_p.h"
#include "qmlview.h"
#include <QtDeclarative/qmlengine.h>
#include <QtDeclarative/qmlcontext.h>
-#include <QtDeclarative/qmldebug.h>
-#include <QtDeclarative/qmldebugservice.h>
+#include <private/qmldebug_p.h>
+#include <private/qmldebugservice_p.h>
#include <QtCore/qabstractanimation.h>
+#include <private/qmlglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -136,7 +137,7 @@ public:
: q(w), root(0), component(0), resizable(false) {}
QmlView *q;
- QFxItem *root;
+ QmlGraphicsItem *root;
QUrl source;
QString qml;
@@ -193,7 +194,7 @@ void QmlViewPrivate::init()
QmlMetaType::registerCustomStringConverter(QVariant::KeySequence, &stringToKeySequence);
#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxPerfTimer<QFxPerf::FontDatabase> perf;
+ QmlPerfTimer<QmlPerf::FontDatabase> perf;
#endif
QFontDatabase database;
@@ -213,7 +214,7 @@ void QmlViewPrivate::init()
}
/*!
- The destructor clears the view's \l {QFxItem} {items} and
+ The destructor clears the view's \l {QmlGraphicsItem} {items} and
deletes the internal representation.
\sa clearItems()
@@ -337,7 +338,7 @@ void QmlView::continueExecute()
}
if (obj) {
- if (QFxItem *item = qobject_cast<QFxItem *>(obj)) {
+ if (QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem *>(obj)) {
d->scene.addItem(item);
@@ -476,11 +477,11 @@ QSize QmlView::sizeHint() const
/*!
Creates a \l{QmlComponent} {component} from the \a qml
- string, and returns it as an \l {QFxItem} {item}. If the
+ string, and returns it as an \l {QmlGraphicsItem} {item}. If the
\a parent item is provided, it becomes the new item's
parent. \a parent should be in this view's item hierarchy.
*/
-QFxItem* QmlView::addItem(const QString &qml, QFxItem* parent)
+QmlGraphicsItem* QmlView::addItem(const QString &qml, QmlGraphicsItem* parent)
{
if (!d->root)
return 0;
@@ -508,7 +509,7 @@ QFxItem* QmlView::addItem(const QString &qml, QFxItem* parent)
}
if (obj){
- QFxItem *item = static_cast<QFxItem *>(obj);
+ QmlGraphicsItem *item = static_cast<QmlGraphicsItem *>(obj);
if (!parent)
parent = d->root;
@@ -519,7 +520,7 @@ QFxItem* QmlView::addItem(const QString &qml, QFxItem* parent)
}
/*!
- Deletes the view's \l {QFxItem} {items} and the \l {QmlEngine}
+ Deletes the view's \l {QmlGraphicsItem} {items} and the \l {QmlEngine}
{QML engine's} Component cache.
*/
void QmlView::reset()
@@ -530,7 +531,7 @@ void QmlView::reset()
}
/*!
- Deletes the view's \l {QFxItem} {items}.
+ Deletes the view's \l {QmlGraphicsItem} {items}.
*/
void QmlView::clearItems()
{
@@ -541,9 +542,9 @@ void QmlView::clearItems()
}
/*!
- Returns the view's root \l {QFxItem} {item}.
+ Returns the view's root \l {QmlGraphicsItem} {item}.
*/
-QFxItem *QmlView::root() const
+QmlGraphicsItem *QmlView::root() const
{
return d->root;
}
diff --git a/src/declarative/util/qmlview.h b/src/declarative/util/qmlview.h
index 822827a..08d69bc 100644
--- a/src/declarative/util/qmlview.h
+++ b/src/declarative/util/qmlview.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -46,7 +46,6 @@
#include <QtGui/qgraphicssceneevent.h>
#include <QtGui/qgraphicsview.h>
#include <QtGui/qwidget.h>
-#include <QtDeclarative/qfxglobal.h>
QT_BEGIN_HEADER
@@ -54,7 +53,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-class QFxItem;
+class QmlGraphicsItem;
class QmlEngine;
class QmlContext;
class QmlError;
@@ -78,10 +77,10 @@ public:
virtual void execute();
virtual void reset();
- virtual QFxItem* addItem(const QString &qml, QFxItem* parent=0);
+ virtual QmlGraphicsItem* addItem(const QString &qml, QmlGraphicsItem* parent=0);
virtual void clearItems();
- virtual QFxItem *root() const;
+ virtual QmlGraphicsItem *root() const;
void setContentResizable(bool);
bool contentResizable() const;
diff --git a/src/declarative/util/qperformancelog.cpp b/src/declarative/util/qperformancelog.cpp
index 8e11997..ff2f42e 100644
--- a/src/declarative/util/qperformancelog.cpp
+++ b/src/declarative/util/qperformancelog.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "qperformancelog_p.h"
+#include "qperformancelog_p_p.h"
#include <QHash>
#include <QDebug>
diff --git a/src/declarative/util/qperformancelog_p.h b/src/declarative/util/qperformancelog_p_p.h
index 6655a8d..e7a3b5e 100644
--- a/src/declarative/util/qperformancelog_p.h
+++ b/src/declarative/util/qperformancelog_p_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri
index 01ad898..87ccb58 100644
--- a/src/declarative/util/util.pri
+++ b/src/declarative/util/util.pri
@@ -24,28 +24,27 @@ SOURCES += \
HEADERS += \
util/qmlview.h \
- util/qfxperf_p.h \
- util/qfxglobal.h \
- util/qperformancelog_p.h \
- util/qmlconnection.h \
- util/qmlpackage.h \
- util/qmlanimation.h \
+ util/qfxperf_p_p.h \
+ util/qperformancelog_p_p.h \
+ util/qmlconnection_p.h \
+ util/qmlpackage_p.h \
util/qmlanimation_p.h \
- util/qmlsystempalette.h \
- util/qmlspringfollow.h \
- util/qmleasefollow.h \
- util/qmlstate.h\
- util/qmlstateoperations.h \
- util/qmlpropertychanges.h \
+ util/qmlanimation_p_p.h \
+ util/qmlsystempalette_p.h \
+ util/qmlspringfollow_p.h \
+ util/qmleasefollow_p.h \
util/qmlstate_p.h\
- util/qmltransitionmanager_p.h \
- util/qmlstategroup.h \
- util/qmltransition.h \
- util/qmllistmodel.h\
- util/qmllistaccessor.h \
- util/qmlopenmetaobject.h \
- util/qmlnullablevalue_p.h \
- util/qmltimeline_p.h \
- util/qmltimer.h \
- util/qmlbind.h \
- util/qmlpropertymap.h
+ util/qmlstateoperations_p.h \
+ util/qmlpropertychanges_p.h \
+ util/qmlstate_p_p.h\
+ util/qmltransitionmanager_p_p.h \
+ util/qmlstategroup_p.h \
+ util/qmltransition_p.h \
+ util/qmllistmodel_p.h\
+ util/qmllistaccessor_p.h \
+ util/qmlopenmetaobject_p.h \
+ util/qmlnullablevalue_p_p.h \
+ util/qmltimeline_p_p.h \
+ util/qmltimer_p.h \
+ util/qmlbind_p.h \
+ util/qmlpropertymap_p.h
diff --git a/src/declarative/widgets/graphicslayouts.cpp b/src/declarative/widgets/graphicslayouts.cpp
index 8707b94..9c7e919 100644
--- a/src/declarative/widgets/graphicslayouts.cpp
+++ b/src/declarative/widgets/graphicslayouts.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "graphicslayouts.h"
+#include "graphicslayouts_p.h"
#include <QtGui/qgraphicswidget.h>
#include <QtCore/qdebug.h>
diff --git a/src/declarative/widgets/graphicslayouts.h b/src/declarative/widgets/graphicslayouts_p.h
index 45f1439..5358e2b 100644
--- a/src/declarative/widgets/graphicslayouts.h
+++ b/src/declarative/widgets/graphicslayouts_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -42,7 +42,7 @@
#ifndef GRAPHICSLAYOUTS_H
#define GRAPHICSLAYOUTS_H
-#include <QtDeclarative/graphicswidgets.h>
+#include <private/graphicswidgets_p.h>
#include <QtGui/QGraphicsLinearLayout>
#include <QtGui/QGraphicsGridLayout>
diff --git a/src/declarative/widgets/graphicswidgets.cpp b/src/declarative/widgets/graphicswidgets.cpp
index cfcc87b..8f61999 100644
--- a/src/declarative/widgets/graphicswidgets.cpp
+++ b/src/declarative/widgets/graphicswidgets.cpp
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,26 +21,25 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "graphicswidgets.h"
+#include "graphicswidgets_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/widgets/graphicswidgets.h b/src/declarative/widgets/graphicswidgets_p.h
index 8147400..2871e5b 100644
--- a/src/declarative/widgets/graphicswidgets.h
+++ b/src/declarative/widgets/graphicswidgets_p.h
@@ -1,7 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
@@ -9,8 +10,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -20,21 +21,20 @@
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,8 +50,12 @@
QT_BEGIN_HEADER
+QT_BEGIN_NAMESPACE
+
QT_MODULE(Declarative)
+QT_END_NAMESPACE
+
QML_DECLARE_TYPE(QGraphicsView)
QML_DECLARE_TYPE_HASMETATYPE(QGraphicsScene)
QML_DECLARE_TYPE(QGraphicsWidget)
diff --git a/src/declarative/widgets/widgets.pri b/src/declarative/widgets/widgets.pri
index 41c50d8..4a8bc93 100644
--- a/src/declarative/widgets/widgets.pri
+++ b/src/declarative/widgets/widgets.pri
@@ -3,8 +3,8 @@ SOURCES += \
widgets/graphicslayouts.cpp \
HEADERS += \
- widgets/graphicswidgets.h \
- widgets/graphicslayouts.h \
+ widgets/graphicswidgets_p.h \
+ widgets/graphicslayouts_p.h \