summaryrefslogtreecommitdiffstats
path: root/src/declarative/QmlChanges.txt
blob: a2afc1bf343fb70d401800c08e4489bd1ffad5c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
=============================================================================
The changes below are pre Qt 4.7.0 alpha

Renamed MouseRegion -> MouseArea

QmlView
-------
The API of QmlView has been narrowed and its role as a convenience class
reinforced.
- remove addItem()
- remove clearItems() - use 'delete root()'
- remove reset()
- resizeContent -> enum ResizeMode { SizeViewToRootObject, SizeRootObjectToView }
- remove setQml(), qml()
- rename setUrl(), ur() to setSource(), source()
- root() -> rootObject(),  returns QGraphicsObject rather than QmlGraphicsItem
- remove quit() signal -> use quit() signal of engine()
- initialSize() signal removed
- Added status() to determine status of the internal QmlComponent

sectionExpression has been replaced by section.property, section.criteria

ListModel
---------
- types are strictly checked (previously, everything was a string)
 - foo: "bar"  continues to work as before
 - foo: bar  is now invalid, use  foo: "bar"
 - foo: true  is now a bool (not string "true")
 - foo: false  is now a bool (not string "false" == true!)


=============================================================================
The changes below are pre-4.6.0 release.

QML API Review
==============

The QML API is being reviewed.  This file documents the changes.
Note that the changes are incremental, so a rename A->B for example may be followed
by another subsequent rename B->C, if later reviews override earlier reviews.

API Changes
===========

Renamed Elements:
LineEdit         -> TextInput
VerticalLayout   -> Column
HorizontalLayout -> Row
VerticalPositioner -> Column
HorizontalPositioner -> Row
GridLayout       -> Grid
GridPositioner   -> Grid
Rect             -> Rectangle
FocusRealm       -> FocusScope
FontFamily       -> FontLoader
Palette          -> SystemPalette
Bind             -> Binding
SetProperties    -> PropertyChanges
RunScript        -> StateChangeScript
SetAnchors       -> AnchorChanges
SetPropertyAction  -> PropertyAction
RunScriptAction    -> ScriptAction
ParentChangeAction -> ParentAction
VisualModel        -> VisualDataModel
Follow             -> SpringFollow

Renamed properties:
Item: contents         -> childrenRect
MouseRegion: xmin      -> minimumX
MouseRegion: xmax      -> maximumX
MouseRegion: ymin      -> minimumY
MouseRegion: ymin      -> maximumY
Text elements: hAlign  -> horizontalAlignment
Text elements: vAlign  -> verticalAlignment
Text elements: highlightColor -> selectionColor
Text elements: highlightedTextColor -> selectedTextColor
Text elements: preserveSelection -> persistentSelection
State: operations      -> changes
Transition: operations -> animations
Transition: fromState  -> from
Transition: toState    -> to
Follow: followValue    -> value
Flickable: xPosition   -> viewportX
Flickable: yPosition   -> viewportY
Flickable: xVelocity   -> horizontalVelocity
Flickable: yVelocity   -> verticalVelocity
Flickable: velocityDecay -> reportedVelocitySmoothing
Flickable: locked      -> interactive (note reversal of meaning)
Flickable: pageXPosition -> visibleArea.xPosition
Flickable: pageYPosition -> visibleArea.yPosition
Flickable: pageWidth    -> visibleArea.widthRatio
Flickable: pageHeight   -> visibleArea.heightRatio
WebView: idealWidth    -> preferredWidth
WebView: idealHeight   -> preferredHeight
WebView: status        -> statusText
WebView: mouseX        -> clickX (parameter to onDoubleClick)
WebView: mouseY        -> clickY (parameter to onDoubleClick)
WebView: cacheSize     -> pixelCacheSize
Repeater: component    -> delegate
Repeater: dataSource   -> model
ListView: current      -> currentItem
GridView: current      -> currentItem
ListView: wrap         -> keyNavigationWraps
ListView: autoHighlight -> highlightFollowsCurrentItem
GridView: wrap         -> keyNavigationWraps
GridView: autoHighlight -> highlightFollowsCurrentItem
Animation: targets -> matchTargets
Animation: properties -> matchProperties

Additions:
MouseRegion: add "acceptedButtons" property
MouseRegion: add "hoverEnabled" property
MouseRegion: add "pressedButtons" property
Timer: add start() and stop() slots
WebView: add newWindowComponent and newWindowParent properties
Loader: add status() and progress() properties
Loader: add sourceComponent property
Loader: add resizeMode property
ListView: preferredHighlightBegin, preferredHighlightEnd
ListView: strictlyEnforceHighlightRange
Particles: Added emissionRate, emissionVariance and burst()

Deletions:
Column/VerticalPositioner: lost "margins" property
Row/HorizontalPositioner: lost "margins" property
Grid/Positioner/Layout: lost "margins" property
WebView: lost "interactive" property (always true now)
Flickable: removed "dragMode" property
ComponentInstance: removed.  Replaced by Loader.sourceComponent
ListView: removed currentItemMode.  Replaced by highligh range.
ListView: removed snapPos.
Particles: removed streamIn. Replaced by emissionRate

Other Changes:
ids must be lowercase: Text { id: foo }, not Text { id: Foo }
Drag: axis becomes an enum with values "XAxis", "YAxis", "XandYAxis"
Image: scaleGrid property removed. New item called BorderImage instead.
KeyActions: changed to a Keys attached property on any item.
KeyProxy: changed to a Keys.forwardTo property on any item.
Script: now an intrinsic type in the language
 - cannot be assigned to properties
 - good: Item { Script { ... } }
 - bad:  Item { resources: Script { ... } }
Script: delay-loaded of the QML file until their source has been loaded (this only effects QML files loaded across the network.)
Scope: declared properties shadow a property of the same name (was previously the reverse)
ScriptAction and StateChangeScript: the script property now takes script rather than a string containing script (script: doSomething() rather than script: "doSomething()")
QmlGraphicsItem::transformOrigin default changed from TopLeft to Center
Animations used as PropertySourceValues are set to 'running: true' as default