aboutsummaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Addd expectFail() to qmltestexmaple to avoid failure report from CI.Charles Yin2011-12-021-0/+3
| | | | | Change-Id: I35637c9951085d42d216b8eb1eb03ef1206d51d6 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Move XmlListModel to seperate pluginCharles Yin2011-12-019-0/+9
| | | | | | | | | | | | | XmlListModel is the only feature inside QtDeclarative which depends on the QtXmlPatterns module, move this item to a separate plugin can reduce the unnecessary dependency in most use cases. To use the new XmlListModel, an additional "import QtQuick.xmllistmodel 2.0" is needed. Task-number:QTBUG-22158 Change-Id: I9e19eb6cbba46cd40fb7ffcdbd741f346779a54d Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Have tutorial built along with other examplesAlan Alpert2011-12-0179-1/+3
| | | | | Change-Id: I9f64659ca1621a5fea8e9013ecd264d971207d4d Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Update to QtQuick 2.0Alan Alpert2011-11-2936-36/+36
| | | | | | | Note that the plugin only exposes QObject types, not QDeclarativeItem. Change-Id: I817d143f762239e32456a7ac8fcca29c483a4f8e Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Get the tutorial running againAlan Alpert2011-11-2912-53/+11
| | | | | | | Note that it still uses QtQuick 1.0 Change-Id: I1b6e174c2ec06ba6108f11cb295e32bc76ac3e36 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Initial window implementationAlan Alpert2011-11-294-0/+192
| | | | | | | | | Includes adding a color property on QQuickCanvas. Note that most Window related properties come from the QWindow inheritance. Task-number: QTBUG-19799 Change-Id: I00f6c90a1e2a5c85d787793d6edac2cd7d5309ab Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Better falling bear spriteAlan Alpert2011-11-282-1/+1
| | | | | | | He looked too comfortable. Change-Id: I8de05188587c53b18639cd2dc2a011db193b7790 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* SpriteImage ExampleAlan Alpert2011-11-226-0/+109
| | | | | | | Click the bear! Change-Id: I804f95930000ec1b4dec2cd631bc51dd88689d1c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Qt.locale() and JS locale type extension.Martin Jones2011-11-221-0/+132
| | | | | | | Task-number: QTBUG-17129 Change-Id: I69cbbe858735b750b4e37ce489f2fa1ad5d8b5d3 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Adding custom easing curves to property animationsAaron Kennedy2011-11-211-2/+13
| | | | | | | | QDeclarativeEasingValueType gets the property customBezierCurve. This allows to define a custom easing curve as a cubic bezier curve. Change-Id: I33ae128ce29bba2834eedcbb90a9769a5391f997 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Copy QSGEngine functions to QQuickCanvas.Gunnar Sletta2011-11-185-0/+349
| | | | | | | | | | | | Long term we intend to remove the QSGEngine class all together so this is the first step. It duplicates some of the logic but doesn't break anything. Also including an example on how to use it in examples/declarative/openglunderqml Change-Id: I69ed93ec5fa1b5c4c746169306d38f8d6ce80477 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove embarassing line from tutorial.Frederik Gladhorn2011-11-162-4/+5
| | | | | Change-Id: Ie392214f1b0bea0314ebf94f24fac1122db6483a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Correct image pathAlan Alpert2011-11-161-1/+1
| | | | | Change-Id: I9bf07a90d6e9c64a9f8470da0744766a391a06cd Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Get tst_examples passing againAlan Alpert2011-11-1418-18/+18
| | | | | | | | | | | | | | Shared QDeclarativeEngine sidesteps GC slowdown issue. New approach also verifies that the root object successfully loaded, this picks up all the cases where it did not successfully load before. Most of these were because they weren't importing QtQuick 2.0, import statements have been updated. One was because it does not create a QQuickItem root, it has been manually excluded. This required adding per file exclusions to the current directory exclusions. Change-Id: I809f0f20acc319aef58ba2e30e672e32f640686d Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix GravityAlan Alpert2011-11-031-1/+1
| | | | | | | | Now simulates acceleration instead of setting it, and properties are renamed to be consistent with AngleDirection Change-Id: I648aa9122c49b46aa7b7d7796bc25d5bd56bfffe Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Add Text.onLineLaidOut exampleYann Bodson2011-11-011-0/+109
| | | | | Change-Id: I87bef980cea9c9b5525c3dc88c15b4a9a555888c Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Add non-floats to particle typeAlan Alpert2011-11-011-1/+1
| | | | | | | | booleans exposed for the 1.0 or 0.0 floats, and color exposed as 0.0-1.0 even though it's 0-255 internally. Change-Id: Idc7ab2527fef150fddb077fc73ac1c7cf122cfdd Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* ImageParticle Sprite ImprovementsAlan Alpert2011-10-311-1/+2
| | | | | | | | Sprite updates are now from signals instead of polled, and update ParticleData as well as vertices. Change-Id: Ib91604a70f4b1fe849bd27c3212ccc1d1482c075 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix PaintedItem redraw bugCharles Yin2011-10-282-8/+95
| | | | | | | | | | | | 1) After QQuickItem::update() being called (means item's content is dirty), the paint() function should always been called, so the contentsDirty and geometryDirty flags are not needed. 2) Update the smile example to validate the above changes Task-number:QTBUG-22250 Change-Id: I5a72f18e6982bdb3ba23e78a253c2876aca2e8cb Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
* Remove Q_WS_*, symbian and maemo code in QtDeclarativeDamian Jansen2011-10-2626-171/+15
| | | | | Change-Id: If64daf80f9d19973e0bc2d864b003a66be5ca61d Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fold Move into AffectorAlan Alpert2011-10-242-12/+9
| | | | | | | | | | | | | | | | | | Since 'Move' was just a generic physics property affector, it makes sense to fold it into the generic affector as an easier way of implementing the common case of custom affector (and much faster, since it doesn't hit JS). For completeness in the Move behavior, 'once' now applies the effect of affectors over a second in that one time, so as to avoid exposing the simulation tick. This allows once to have actual meaning for continous affectors. Gravity is also going to be kept around as a convenience (although it will change slightly), so just removing its deprecation warning. Change-Id: Ieb52f8990445fe95f94070175a0f9beb6686324b Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Affectors now simulate with a minimum granularityAlan Alpert2011-10-241-23/+25
| | | | | | | | | | Since all time is sourced from the ParticleSystem, the easiest way is to alter the common time point while doing the multiple simulation runs. Also removes the experimental TargetAffector. Change-Id: Ieb52f8990445fe95f94070175a0f9beb6686324a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix abstractitemmodel for QGuiApplicationDamian Jansen2011-10-242-2/+3
| | | | | Change-Id: If9117f54f0dbe1c05cc5b46b6a6e662613e1b38f Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Rename Qt Quick-specific classes to QQuick*Kent Hansen2011-10-2131-86/+86
| | | | | | | | | | | | | | | | | | | | | | The QSG (SceneGraph) prefix is too generic for Qt Quick(2)-specific classes. All the classes and files in the declarative/items directory have been renamed. In particular, for classes that are currently public, the renaming is as follows: QSGView --> QQuickView QSGCanvas --> QQuickCanvas QSGItem --> QQuickItem QSGPaintedItem --> QQuickPaintedItem The header files have been renamed accordingly (e.g. qsgview.h --> qquickview.h). Change-Id: Iac937fff81db20bb639486a793c3aeb5230b038c Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Fix build error for canvas stockchart example.Charles Yin2011-10-211-1/+1
| | | | | | Change-Id: I82115738ada4fe6a77023a56e962c71284ebc91b Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Charles Yin <charles.yin@nokia.com>
* Replace Smiles with StarfishAlan Alpert2011-10-2136-150/+61
| | | | | | | | And a bear. Change-Id: I9809bca1664a7fe1aa6734edc986440b6ca2a63c Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Remove the InputContext module.Andrew den Exter2011-10-185-479/+0
| | | | | | | | | | | | | The input context module provided a bridge between QML and a QInputContext which allowed an application to implement it's own input method in-process. However since QInputContext has been replaced and now only exists as a QWidget compatibility API this module no longer works with the QtQuick 2 items and porting it to the new QPlatformInputContext API does not seem to be an option as there is no way to override the instance provided by the platform integration. Change-Id: Ica602377436fcea42b9ffd05e1b347e2ee52acc8 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Allow sizing of TrailEmitter emit area based on particle sizeAlan Alpert2011-10-171-5/+7
| | | | | Change-Id: I7ce2ba29459b9a66e62933f9bfb9e066baedaaef Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add Move affectorAlan Alpert2011-10-142-3/+147
| | | | | | | | | Slated to replace the 'Gravity' affector which only did one specialized gravity usecase anyways. This one is more generic. Change-Id: I3cbb975bad24e8f6fca7e07b671aa8ba5a3a916c Reviewed-on: http://codereview.qt-project.org/6657 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Allow view items to be preserved.Andrew den Exter2011-10-121-0/+155
| | | | | | | | | | | | | | | | | | | | Do not destroy items that are members of the VisualDataModel persistedItems group when they are released by the view. The create function on VisualDataGroup will return a reference to an instantiated item within that group, any item returned by this function is automatically added to the persistedItems group and can be released by removing it from the group. Uninstantiated items added to the persistedItems group by any other means are not instantiated until requested by a view or create. Task-number: QTBUG-21518 Task-number: QTBUG-20854 Change-Id: I59554711208504c8f20a3ebe783bddab9b21a558 Reviewed-on: http://codereview.qt-project.org/5831 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add DropArea item and Drag attached property.Andrew den Exter2011-10-1010-596/+177
| | | | | | | | | | | | | | | | | | | Refactors drag API to improve compatibility with traditional drag and drop by reusing events and adding drop actions. Event sending is removed from MouseArea, instead the Drag object can be attached to the item that is dragged and it will send drag events when the position of that item is changed or when its active property changes. The DragTarget item is renamed to DropArea and can now communicate supported and suggested actions. Task-number: QTBUG-19747 Change-Id: I46cb77e68cf1ff32bbcbf0945facb593c9c2243c Reviewed-on: http://codereview.qt-project.org/4638 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add a get function to VisualDataGroup.Andrew den Exter2011-10-062-0/+157
| | | | | | | | | | | | | This returns an object with properties for accessing the model data of an item, membership in the visual data model's groups and the index of the item in each group. Task-number: QTBUG-21512 Change-Id: I878442c8a2e30cc6f9941f7412303581613a6142 Reviewed-on: http://codereview.qt-project.org/5515 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add support for filtering VisualDataModels.Andrew den Exter2011-10-061-0/+198
| | | | | | | | | | | | | | | | | Add a VisualDataGroup element which items within a VisualDataModel can be assigned to. Setting the group property of a VisualDataModel or one of its parts models will filter the items visible within a view to just items belonging to that group. By default all items belong to an 'items' group. The VisualDataModel attached object includes properties indicating whether a item is a member of a group and its index in the group. Task-number: QTBUG-21513 QTBUG-21515 Change-Id: If3df6a359a888a6f79923775d2f78076d5e7d2cf Reviewed-on: http://codereview.qt-project.org/4115 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Split GroupGoal out of SpriteGoalAlan Alpert2011-10-051-6/+3
| | | | | | | | | | Leaving SpriteGoal alone for a few weeks with a deprecation message, but a functioning GroupGoal has been added. Change-Id: I395046c00526e7caa38bdbc499a8191308c476fa Reviewed-on: http://codereview.qt-project.org/5950 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* tests for canvas and a few bug fixesCharles Yin2011-09-307-7/+7
| | | | | | Change-Id: Icbbc7f2a0fe3b908963ce18afef51e25ea0170a0 Reviewed-on: http://codereview.qt-project.org/5805 Reviewed-by: Charles Yin <charles.yin@nokia.com>
* pulse calls should use ms instead of sKent Hansen2011-09-294-4/+4
| | | | | | | | | | This updates the examples to reflect the API change that was done in commit f0dc82305eb9c9297d73cba67634e9e4bc4f3b84 Change-Id: Id08896cbe3a47adc0b02797faddf50281a24c625 Reviewed-on: http://codereview.qt-project.org/5702 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Restructure imageelements and remove screenorientation examples.Damian Jansen2011-09-2944-2172/+4
| | | | | | | Change-Id: Ia23c905baab95f348c967b6769d7190c15eed19a Reviewed-on: http://codereview.qt-project.org/5765 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Fix missing/outdated license headers.Jason McDonald2011-09-261-0/+40
| | | | | | Change-Id: I381398b0c4f80db689a59797e2faeab5b14503eb Reviewed-on: http://codereview.qt-project.org/5491 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make delegates visibleAlan Alpert2011-09-231-1/+0
| | | | | | | Change-Id: Ia932396419e41692431a9ce5e964331700810677 Reviewed-on: http://codereview.qt-project.org/5424 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Change burst to use ms instead of sAlan Alpert2011-09-221-0/+84
| | | | | | | | | Also renames that variable, and adds a burst example. Change-Id: I53787612f287e71d9afb5618bd445c8aa72fd39e Reviewed-on: http://codereview.qt-project.org/5349 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Recognize deformable performance level properlyAlan Alpert2011-09-221-1/+0
| | | | | | | | | Task-number: QTBUG-21305 Change-Id: I88cfe56f0f22abc92a083b2a0a8da059ebefc652 Reviewed-on: http://codereview.qt-project.org/5344 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Additional ListView section header placement optionsMartin Jones2011-09-222-7/+65
| | | | | | | | | | | | | | | | | | Add a section.labelPositioning property which can be a combination of: - ViewSection.InlineLabels - section labels are shown inline between the item delegates separating sections (default). - ViewSection.CurrentLabelAtStart - the current section label sticks to the start of the view as it is moved. - ViewSection.NextLabelAtEnd - the next section label (beyond all visible sections) sticks to the end of the view as it is moved. Task-number: QTBUG-12880 Change-Id: I4601828337412bd3a83769c9b8df3f6d4d7474b8 Reviewed-on: http://codereview.qt-project.org/5192 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Add whitespaceAlan Alpert2011-09-2150-669/+738
| | | | | | Change-Id: Iad55228ffa86bbf63b12a33d0f00ce734807c071 Reviewed-on: http://codereview.qt-project.org/5199 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* CustomEmitter/Affector now affect whole lists at onceAlan Alpert2011-09-212-30/+39
| | | | | | | | | | Better performance potential (fewer drops to JS, possibility of more optimzed JS). Change-Id: If386f06ac8714162a5bfc6b5eef7f2e67f9dae95 Reviewed-on: http://codereview.qt-project.org/5189 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fixed compile of examples and tests.Rohan McGovern2011-09-2111-21/+21
| | | | | | | | | | | | | | | 6aad4122332c0291e2e3249b508c7583428177b9 in qtbase removed implicit linking to libQtWidgets. Projects which implicitly used that module were broken. Either remove the dependency where it is not required, or explicitly opt-in to libQtWidgets where it is required. Change-Id: I6f4fb1d98bdf5bb65b4f02a1d245d334314b163d Reviewed-on: http://codereview.qt-project.org/5268 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Initial ImageParticle sharingAlan Alpert2011-09-202-0/+199
| | | | | | | | | | | This allows particles rendered by ImageParticle to share some of their randomly generated state. Still to come are reset methods and animData sharing (so animations can look synced) Change-Id: Ia805e1b3735b15fba7bd14778ed7abd795b11f06 Reviewed-on: http://codereview.qt-project.org/5114 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add Age exampleAlan Alpert2011-09-161-0/+92
| | | | | | | | | | Also added advancePosition property to Age, as it was needed for even this simple example. Change-Id: I614a719280efc1bc5140d07ab91ec0f1bc345788 Reviewed-on: http://codereview.qt-project.org/4871 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fill out examples a little moreAlan Alpert2011-09-162-0/+205
| | | | | | | | | | Adds an example of colorized ImageParticle, and an example comparing the particle system to dynamically created Images (which don't do too badly when they're kept really simple). Change-Id: Id9e8d0575a38ddde1c73d694bd5c062d56cbed42 Reviewed-on: http://codereview.qt-project.org/5047 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Particles examples shuffleAlan Alpert2011-09-16151-903/+1124
| | | | | | | | Recast as examples, not demos. Fewer licking face usages. Change-Id: I02a03fb9af513cbc3dc2a94aa0843220f162593b Reviewed-on: http://codereview.qt-project.org/4754 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* rename threadRendering to renderInThreadCharles Yin2011-09-1611-23/+17
| | | | | | Change-Id: I21d2492288adc84d3ef99633752e78a3ea232a4a Reviewed-on: http://codereview.qt-project.org/5042 Reviewed-by: Charles Yin <charles.yin@nokia.com>