Commit Graph

98 Commits

Author SHA1 Message Date
J-P Nurmi ce5dff18b9 ListView: add support for "pull back" header & footer
[ChangeLog][QtQuick][ListView] Introduced headerPositioning and
footerPositioning properties to control whether header and footer
are positioned inline, as overlays, or so that they slide away and
can be pulled back regardless of the content position.

Change-Id: Ifef1faf1ce6acf2b55cd1b6408e22ec2de841409
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-08 00:25:49 +02:00
Simon Hausmann 75d8ebb3e6 Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
	src/qml/compiler/qv4ssa.cpp
	src/qml/jsruntime/qv4arrayobject.cpp
	src/qml/jsruntime/qv4engine.cpp

Change-Id: Ie3ef6202b6a3a8521971e1be10c40c6a2db6989c
2014-07-26 13:21:16 +02:00
Martin Jones 39c144f44b Don't recreate header and footer unnecessarily
The only time that they need to be recreated is if the orientation
changes (even then, a good implementation could handle it, but no
point requiring that now).

Task-number: QTBUG-40375
Change-Id: Id0215fb812724827bb139cda8f8dc6208c703852
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-07-25 02:58:24 +02:00
Lars Knoll 2338bb1faa Fix QQmlDelegateModelChangeArray
The class had a vtable, clashing with assumptions about Managed
objects. The derived classes where actually only cosmetic sugar
on top of the basic change class. Clean this up and unify the
functionality in the base class.

In addition adjust the class to the new data layout.

Change-Id: I8677f6c71465381f7ebdf82eb6025fda6d137ec3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-07-22 13:49:09 +02:00
Frederik Gladhorn 427bee6cb6 Merge remote-tracking branch 'origin/5.3' into dev
Change-Id: Iba61035910c46627e5e1c3824757da7b3d573657
2014-07-10 10:12:13 +02:00
Nico Vertriest 2dcad8f5c8 Doc: correct link/compilation errors in Qt Declarative
Task-number: QTBUG-34749
Change-Id: I507d54b0568d77c6099a0bd99f5c369b8667032a
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-02 14:52:54 +02:00
Frederik Gladhorn 815838373a Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2014-05-15 08:25:53 +02:00
Jan Arve Saether 1246a5673f Don't adjust the position of transitioning list items.
Adjusting the position of list items only makes sense for items that
belongs to the layout.

Task-number: QTBUG-38229
Change-Id: I7a05f7a3591620cce3cd9ab84cfecbe325e5e93c
Reviewed-by: Bea Lam <bea.lam@jollamobile.com>
2014-05-14 21:27:54 +02:00
J-P Nurmi 556846aa1f Item views: prevent negative cache buffer
A negative cache buffer does not make much sense, and the item views
would go crazy and start creating/destructing delegates endlessly.

Task-number: QTBUG-38725
Change-Id: I1fbba1f3130a99af67fbc4c2aba4d3199d0554a9
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-05-07 14:46:50 +02:00
J-P Nurmi fc5314f969 ListView: fix rounding errors
Task-number: QTBUG-37339
Change-Id: I223e4d6bcabb1daa705c0ed2212e7e2b2fc3f37c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2014-04-09 00:29:23 +02:00
Sze Howe Koh 2341b58b76 Doc: Document signals (not handlers) under \qmlattachedsignal
- They're not "attached properties" either.
- Append the handler names to the end of the corresponding signal doc.
- Update descriptions and links

Task-number: QTBUG-35846
Change-Id: I54e93187b3209546ec344a20e0482c98d7f14109
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-03-28 02:42:57 +01:00
J-P Nurmi c4c5129632 Item views: improve initial Z-value handling
Respect the initial Z-values of item, highlight, header, footer and
section delegate instances. Mention also the default values in docs.

Change-Id: I2ce4bb537898a0f5fdfa776b79d5747b1c080a7b
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
2014-03-18 09:05:57 +01:00
Nils Jeisecke 1061c7e5cf Make GridView/ListView attached "view" property available to all delegate types
This is useful for accessing the view (e.g. "width", "cellWidth", ... properties)
from within section (ListView only), header, footer and highlight delegate components.

A typical usecase are components that are used in multiple views and therefore
cannot use the views's id for access.

The only attached property valid for those non-item delegates is "view". This
has been added to the documentation.

Change-Id: I33d976da778be23ed531a3b193ceee95ed9800d2
Task-number: QTBUG-32836
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2014-02-26 09:19:23 +01:00
Frederik Gladhorn 24e2b39e7a Merge remote-tracking branch 'origin/stable' into dev
Change-Id: If9a205bea219b9aca95d78b1e556ca9bbff58dd0
2014-01-06 16:12:41 +01:00
Lars Knoll e3232bce40 Fix a warning about casting from ascii
Change-Id: I4e1b7151742dcb6296e59dd59146c908cd5587ba
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-01-03 17:09:25 +01:00
Sze Howe Koh ef9f85ad8d Doc: Fix broken links
Change-Id: I4c4577edde96978a986606bf30fbb925f871bd42
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2013-12-30 12:13:29 +01:00
Frederik Gladhorn d588ec795b Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/quick/items/qquickrectangle.cpp

Change-Id: Ia40bc0f2f08b5be68e32eb1e1f118445d20e44fc
2013-12-24 10:30:20 +01:00
J-P Nurmi ae59cb90ce QtQuick docs: add missing \qmlpropertygroup commands
"warning: No QML property group command found; using..."

Change-Id: Iafbdbc09cbd76bf81a5baf3a5a4fab843778b5cb
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2013-12-20 15:06:05 +01:00
Andrew den Exter 854272ecf9 Fix positioning of item when first cacheBuffer item is removed.
When items prior to the first visible item are removed from the instantiated
items list the first item is moved forward by the size of the item removed so
it position remains correct relative to the visible items.  But if the removed
item is the first instanitated item then it's size shouldn't contribute to the
offset as the next instatiated item is already offset by its size.

Task-number: QTBUG-33619

Change-Id: I05c33f505e2856afa08cd9cd89d8eae97c20679d
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-12-19 01:36:30 +01:00
Frederik Gladhorn 13e88fe2b9 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/quick/items/qquickitem.cpp
	src/quick/items/qquicktext.cpp
	tests/auto/quick/qquicklistview/tst_qquicklistview.cpp

Change-Id: I0bc5786098193c2c40b6fd8905de75d90f6ed0cf
2013-12-16 17:05:21 +01:00
Martin Jones a46312b3b5 Add displayMarginBeginning/End to ListView and GridView.
This allows displaying content outside the visible area of
the view.

[ChangeLog][QtQuick] Add displayMarginBeginning/End to
ListView and GridView.

Change-Id: Idf9b5a0cd34a781c9603a9ad98ea189754972ba1
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
2013-12-11 23:17:51 +01:00
Robin Burchell 4b2fae2a90 Set highlight size for both dimensions, irrespective of ListView orientation
The assumption that all list delegates are the same size (dependent on ListView
orientation) is not a correct one, even if it is correct most of the time.

Task-number: QTBUG-31626
Change-Id: Iba6f3bc5f38d60e3be7632ab17d0c66ab8e73965
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-12-11 02:31:29 +01:00
Martin Jones 39b715f32a Set all attached section properties before emitting change signals.
If we have bindings to the section properties, e.g. implementing manual
section header creation, we want previousSection, section and
nextSection to be set before emitting the change signals to prevent
different results each time the binding is run.

Change-Id: Id3a0b4a53419681f35102c9e7c620b5c6112ebb0
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
2013-11-30 13:30:16 +01:00
Sze Howe Koh 22c138abfc Doc: Fix broken links
Change-Id: Ie7408409ddbaa354370267f2dd74326ec56a4186
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2013-11-05 15:37:29 +01:00
Martin Smith 4706b1ceff qdoc: no longer recognizes the version nr in QML refs
All QML references of the form
<QML-module-name><QML-module-version>::<QML-type>::<member-name> have
had the <QML-module-version> removed i.

Task-number: QTBUG-33776
Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-10-02 14:40:01 +02:00
Gunnar Sletta 424052000a Fix license headers of QtQuick sources.
Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-30 08:06:57 +02:00
Jerome Pasion 0e62896fdc Doc: Fixed and updated Qt Quick's \qmlmodule page
-incremented version to Qt Quick 2.2 (in \qmlmodule page)
-import changed to QtQuick 2.2
-\inqmlmodule no longer needs the version. QDoc will ignore the version
but it is better to remove it now to avoid confusion

Task-number: QTBUG-32172
Change-Id: I40b52e59667014720be40a35b3a8fb9836825e31
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-25 13:51:51 +02:00
Jerome Pasion 779182eb4a Doc: Made Qt Quick items' \since consistent.
Qt 5.2:
-"\since QtQuick 2.2" -> "\since 5.2"

Qt 5.1:
-"\since QtQuick 2.1" -> "\since 5.1"
-"\since Qt 5.1" -> "\since 5.1"

Qt 5.0:
-"\since QtQuick 2.0" -> "\since 5.0"

Task-number: QTBUG-32172
Change-Id: I699b00b31373a434ddb8f4caccfef40c588bf8a4
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-09-25 13:51:06 +02:00
Tomasz Siekierda (sierdzio) 55867c2f00 Document parenting behaviour of delegates in QML ListView and Component.
ListView:
As delegates are instantiated in ListView, they are parented to views
contentItem. This is now explicitly stated in the documentation.

Component:
Components are not derived from Items, so they cannot hook to anchors.

Task-number: QTBUG-24822
Change-Id: I09e04fbcc01b2858c039d22f9600ef201a9a91ab
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-08-10 10:46:53 +02:00
J-P Nurmi 53371a557f QQuickListViewPrivate::updateStickySections(): add missing null check
Task-number: QTBUG-32711
Change-Id: I45ed6829f2c240e8352dac33beeee803cb88a18d
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-07-29 22:50:26 +02:00
Albert Astals Cid 3f01f6ff03 Resizing items out of the list viewport should not change the viewport
Consider the old geometry, not the new one to check if an item
was outside the viewport or not

Change-Id: I108412d560faf86130044f3d091254c07af0c004
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-07-24 11:30:40 +02:00
Albert Astals Cid b924cbe711 Update snap when snapMode changes
Task-number: QTBUG-32258

Change-Id: Id2120acad06d7cfce988400df0067e2c0f16eb24
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-07-08 15:17:04 +02:00
J-P Nurmi feaf7ca8f5 Item views: do not track the geometry of items being removed
Task-number: QTBUG-31873
Change-Id: I4230893ccb2925ed9c2429d26b411264bf7c1c65
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2013-07-04 08:26:59 +02:00
Tasuku Suzuki cbc86ae4d4 Doc: fix since QtQuick 5.1
Change-Id: I87a108e817caa06c73620dde0ba68b3c66a134c9
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-06-10 05:48:57 +02:00
David Fries 3b5173b826 Doc: corrections, spelling, and ListView requirements comments
From the ListView comment I thought the model had to be derived from
QAbstractListModel, but that's not the case, QAbstractListModel will
work just fine, it just doesn't support specific cases such as trees.

Change-Id: I59305006540ddc049e276cf412571373cbfa6c67
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-05-15 09:32:58 +02:00
Sze Howe Koh 0d4512c8bd Doc: Fix some broken snippet paths
Change-Id: Ib79bfbea402b86e26a503de47383522317ca906b
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-06 16:35:28 +02:00
Alan Alpert 53e3174686 No longer apply pending changes when accessing ItemView properties
Applying changes in the getters can lead to binding loops, and is
currently inconsistently applied. Removing the applyPendingChanges calls
from remaining getters, and adding a forceLayout() function for cases
where the immediate-apply behavior is needed.

Task-number:  QTBUG-30555
Parts-of-patch-by: Albert Astals Cid
Change-Id: I64632601e02f2a53060296ab7739577a749d916f
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
2013-04-26 21:17:42 +02:00
Frederik Gladhorn 15dc45ce10 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ia02971527a2d1a80c5624d69330428818aab3a41
2013-02-25 11:57:50 +01:00
Michael Brasser 523bf6c3d0 ListView's highlightMoveDuration should default to -1.
Change-Id: Ibb53cc21b4f1f301569cd7724c60cb8df978921a
Reviewed-by: Bea Lam <bea.lam@jollamobile.com>
2013-02-22 14:35:10 +01:00
Alan Alpert 7cad0e52c5 Move the model classes from QtQuick to QtQml
This is needed for proper support of non-GUI instantiators in QtQml.
Only private C++ classes are affected. Aside from name changes, model
classes now operate on QObjects instead of QQuickItems, leading to minor
changes in the implementation of QtQuick classes using them.

The old QML type names will still be registered in the QtQuick import
for the forseeable future, but pointing to the new classes. The new QML
types will be added in a second commit.

Classes Affected:
QQuickVisualDataGroup -> QQmlDataGroup
QQuickVisualDataModel -> QQmlDelegateModel
QQuickVisualItemModel -> QQmlObjectModel
QQuickVisualModel -> QQmlInstanceModel
QQuickChangeSet -> QQmlChangeSet
QQuickListAccessor -> QQmlListAccessor
QQuickListCompositor -> QQmlListCompositor
QQuickPackage -> QQuickPackage (just moved for now)

Change-Id: Ia19e630e53bfa9e5d459e289596cd11df1ea3930
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2013-01-24 17:14:23 +01:00
Sergio Ahumada 83deab8d1b Update copyright year in Digia's license headers
Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-10 19:52:37 +01:00
Xingtao Zhang 888a02ec4a Doc: Updated docs for examples and etc
- Corrected several \snippet paths and \example paths.
- Added missing example images.
- Marked several commands as code.
- Updated the exampledirs variable for qtqml.

Done-with: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Task-number: QTBUG-28898
Change-Id: I24aac17821f54de4bd5129c45b5bf96dc0f114b2
Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-01-09 18:42:42 +01:00
Iikka Eklund 46010aa7a2 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-09-23 08:22:24 +02:00
Bea Lam 545608ee97 Document that add transitions should not animate item height
Change-Id: I4941e96e9ea96dfe364b9b95a00372d94695c7a3
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-08-03 09:47:47 +02:00
Bea Lam 21f6b4d381 Fix various broken links in documentation
Change-Id: I9e2dac37d18e3ca62e4a92be25e5c2e60ffeba00
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2012-08-03 09:47:47 +02:00
Bea Lam 76c5bbd375 Use \b instead of \bold
Change-Id: Ica77b78b113321f962066f1edabd34bf21d38910
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-08-02 05:44:53 +02:00
Jerome Pasion 2d3584ff21 Doc: Changed \qmlclass to \qmltype and added \instantiates.
-To simplify QDoc, \qmlclass is now \qmltype.
-'\instantiates <C+++ class>' is for the types that are defined in C++.

Change-Id: I29242d33daf7b972d8b86a356b9689638866b950
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-07-30 11:11:56 +02:00
Martin Jones 3a045419ba Add SnapPosition mode to positionViewAtIndex() in List/GridView.
This allows the view to be positioned on a snap boundary, which is
generally what is wanted when strict highlight mode s set or snapping
is enabled.

Task-number: QTBUG-26605
Change-Id: I6288dc8be4ff16c412b56ab449b6a9fb7b7ea889
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-07-27 03:08:24 +02:00
Andrew den Exter 7daab8039a Remove QListModelInterface.
Implement ListModel and XmlListModel using QAbstractListModel
instead.

Task-number: QTBUG-15728

Change-Id: I14e03d90883d341f4b1d89c1e9fc9dc1534fde78
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
2012-07-25 02:15:15 +02:00
Martin Jones 50ec85e368 Change Quick docs to refer to "types" rather than "elements"
Task-number: QTBUG-24785
Change-Id: I223479b879514abaacb123852323c1cfada7a5e1
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-07-16 04:50:48 +02:00