aboutsummaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Remove QtQuick1 elements from qtdeclarativeMatthew Vogt2012-02-03486-25298/+0
| | | | | | | | QtQuick1 is now contained in a separate repository. Task-number: QTBUG-23737 Change-Id: I09eae67af5693a22b896b916f816f73ccc3a89b1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Support inline images with <img> tag in StyledTextYann Bodson2012-02-029-28/+183
| | | | | | Task-number: QTBUG-21793 Change-Id: Ie7b9f293c6c9a949c1899152c38b61251b0069d3 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Fix outdated license headers.Jason McDonald2012-02-012-2/+2
| | | | | Change-Id: I8448e0d3dbce0c18f38a1ed9b6e2d75ba83f7088 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix Minehunt demoAlan Alpert2012-02-012-3/+3
| | | | | | | | | This masks the real issue in QTBUG-23362, but gets the demo running again. This is also a more correct way of expressing the URL. Task-number: QTBUG-23362 Change-Id: I5569b8f0047b03db041f05740cfed52bdef465b9 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-30698-698/+698
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update PathAnimation API and document.Michael Brasser2012-01-271-0/+108
| | | | | | | | Update the API according to the last API review. Document it and add a basic example as well. Change-Id: I2d06a0772a9fb2101844446e68799620c275db97 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Document PathInterpolator.Michael Brasser2012-01-271-0/+114
| | | | | | Change-Id: I8fb625fb6881af8d0928da3d487dcd659dc384f5 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Update Sprite using examples to frameDurationAlan Alpert2012-01-279-28/+27
| | | | | | | | While it's good to test the interim compatibility code, examples are not supposed to print any warnings. Change-Id: Ie6560213fd89b0ca4162c5b48dbaf86dee63cb48 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Implement randomStart for spritesAlan Alpert2012-01-271-4/+2
| | | | | | | | Most useful in the particle system, so that sprites aren't temporally aligned at the start (ruining the random look). Change-Id: I1cbf6c2187e412fcb8b31cab0d87bcde275c9281 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Implement proper sprite sheet functionalityAlan Alpert2012-01-277-5/+12
| | | | | | | | | | Uses frameX/frameY from the new Sprite API. You can now specify your sprites as a single sprite sheet and just specify the offset for individual animations. Change-Id: I3a33d8329e6b9d65e5578669388e3115de992803 Reviewed-by: Alan Alpert <alan.alpert@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Update Sprite APIAlan Alpert2012-01-272-6/+6
| | | | | | | | | | | | | | | | | | | Added the following properties frameSync (replaces duration: -1) frameRate frameRateVariation frameDuration frameDurationVariation frameX (not yet implemented) frameY (not yet implemented) reverse (not yet implemented) Started the process of duration meaning animation duration instead of frameDuration, but some grace period is being allowed for the transition Change-Id: I0771a55d1708ba999483f76796f0323043b8a4db Reviewed-by: Alan Alpert <alan.alpert@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Svelte new form for dynamic scene exampleAlan Alpert2012-01-274-24/+61
| | | | | Change-Id: Ic6a3616ea06c8085e6ccd7e3e13566f36aadcc0f Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Move sqldatabase into a module API pluginCharles Yin2012-01-254-6/+10
| | | | | Change-Id: Icd0bbfe16804abf1bbadbabddf3a30b5b18df30c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Adapted QQuickScreenAttached to orientation API changes in QScreen.Samuel Rødal2012-01-242-2/+2
| | | | | Change-Id: Ic2cb008b989780e297f03ddd5bdef466bb230c74 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Symbian specific code.Xizhi Zhu (Steven)2012-01-246-35/+0
| | | | | Change-Id: Ifbcc92f1d44d46760ac7c5be24a997384fa22266 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Encode user input before insertion into URLsMatthew Vogt2012-01-234-8/+12
| | | | | | | | | Encode user input strings used to formulate URLs, to ensure they do not cause the structure of the URL to be subverted. Task-number: QTBUG-19925 Change-Id: I6173f4df67a4bc1676ac32be6072763fc16f9720 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-23696-696/+696
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Add a simple SpriteImage exampleAlan Alpert2012-01-212-0/+59
| | | | | | | | Also shows the full framerate mode. Task-number: QTBUG-22236 Change-Id: I42790029c4b799f916dac1a183a5cef1724448c5 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Adhere to examples standards more consistentlyAlan Alpert2012-01-2024-4/+4
| | | | | | | Example subfolders should be named 'content' Change-Id: I23f5b0ef44108f54f9b1703f04faf02cafc78efb Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix range checking in AbstractItemModel examplesMatthew Vogt2012-01-192-2/+2
| | | | | | | | Fix range checking in AbstractItemModel examples Task-number: QTBUG-23574 Change-Id: I6f2d4c18e1fb33ee369ebc75f501e524e8e63615 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Compile since recent API changesGunnar Sletta2012-01-181-1/+0
| | | | | Change-Id: Id8f8b238661a46cf071f671d5d40e5c683c8ccc9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Update Screen exampleAlan Alpert2012-01-171-38/+5
| | | | | | | | DPI API never made it into the final API, because there were more issues than valid usecases. Change-Id: Ie56465145461486456462154dfafe546fedaddee Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Update copyright year in Nokia copyright headers.Jason McDonald2012-01-1710-10/+10
| | | | | | | | Update copyright headers from before 2011, and a couple of new ones that were merged after the previous change to copyright headers. Change-Id: Ia76e08e2734afa4ef3f1207dbcda5ff3bc81b366 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add Two MultiPointTouchArea examplesAlan Alpert2012-01-1214-0/+539
| | | | | | | | Bear-whack and multi-flame. Still missing an example using a custom gesture and the signals. Change-Id: Ie75c57e34adab3a62f66eba586a1b2de51dbe100 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-05680-680/+680
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Examples: Remove commented out 'plugins' list from .qmlproject filesKai Koehne2012-01-0499-220/+0
| | | | | Change-Id: I24bacdd52f2f191dde8e0a2fa9718b38ab329597 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Examples: Hard-code the 'main' file in .qmlprojectKai Koehne2012-01-0365-65/+209
| | | | | | | | | | | Set the 'mainFile:' property in .qmlproject files where it makes sense (i.e. there's one natural candidate). This makes sure Qt Creator doesn't fall back to 'current file in editor' as main file, which is unexpected to a lot of people. (This requires Qt Creator version 2.2 and newer). Change-Id: Ia5d20b0d982038520d7892bca155267c5f13644b Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add accessibility to qmlFrederik Gladhorn2012-01-023-0/+188
| | | | | | | | | | | | | | | This consists of two parts: An attached property for QML items and a plugin for the accessibility framework. The attached property simply takes care of some properties (name, role) that are needed in order to expose semantics of the application to assistive tools. The plugin exposes the hierarchy of QML items to the accessibility framework. Change-Id: I32f5603d0d9549b01b3645b205b710b9801762f7 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Update to not use old properties.Alan Alpert2011-12-303-6/+6
| | | | | Change-Id: I428d702613186adfc761925de23ae67677f286ba Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Minimize the number of objects created per item in VisualDataModel.Andrew den Exter2011-12-231-1/+1
| | | | | | | | | | | | | | Derive from QDeclarativeContext and reference count the context object instead of parenting it to the context. Combined with a weak persistent v8 handle the allows the context object to be returned by javascript accessors instead of creating a new instance for every use. In addition to the efficiency advantages of creating fewer objects, routing all data access through a single object means that object can also persist data instead of just acting as a proxy. Change-Id: I107dc8c901f16f2a4b420ff1cbffa7a6be27de89 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add currentSprite property to SpriteImageAlan Alpert2011-12-231-3/+3
| | | | | | | | Also renames goalState to goalSprite, to help distinguish it from item states. Change-Id: I77e81595586e69e47a50a7a767fdb7ad775ad7be Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix compilation due to header changesSergio Ahumada2011-12-177-7/+7
| | | | | | | | | | - Fix QtGui/QApplication => QtWidgets/QApplication - Fix QtGui/QStylePlugin => QtWidgets/QStylePlugin - Fix QtWidgets/QStringListModel => QtCore/QStringListModel - Fix QtWidgets/qstringlistmodel.h => QtCore/qstringlistmodel.h Change-Id: I8df28f032f039107b900c81be27d2d6e5e69e06e Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Make PlainText the default textFormat of a TextEdit.Andrew den Exter2011-12-162-0/+2
| | | | | | | | | | | With AutoText as the default it's easy to assume that a TextEdit accepts plain text or rich text only which can lead to unexpected behaviour when user supplied text is does not have the expected formatting and implicitly changes the text format. Task-number: QTBUG-23109 Change-Id: I08900fb23545672fd0e181058633bafeb826a746 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add a tutorial describing how to re-arrange items in a ListView.Andrew den Exter2011-12-149-0/+1089
| | | | | | | | This example describes both how to use drag and drop to re-order items and how to use VisualDataGroup to sort a view using model data. Change-Id: I034963ea87c8ab0c30555536ac28495a396c0577 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Augment Samegame with resource efficient particle systemAlan Alpert2011-12-142-1/+2
| | | | | | | | | | | The particle system cannot automatically turn itself off when it's not needed, however it is easy enough to do so manually. This change does so in SameGame as an example. Task-number: QTBUG-22923 Change-Id: I5f2b3e572222f03c9412fd24c40276529e7d0e7e Reviewed-by: Alan Alpert <alan.alpert@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add Screen attached objectAlan Alpert2011-12-092-4/+128
| | | | | | | | | | | Use this to get details of the screen such as size and current orientation. As well as adding its own example, this commit updates Calculator to use Screen instead of Runtime for orientation. Change-Id: I1b73d2ee22a92b1dee827de1bd893eebec9f5817 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Decrease debug output of modelview examples.Alan Alpert2011-12-063-5/+5
| | | | | Change-Id: Idc7fd22f05eee7943c3b824a460897f13dc0408b Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Use qt_Opacity in shadersAlan Alpert2011-12-062-10/+16
| | | | | Change-Id: Ie9da3e980ece4bcb71c0886d58bc46335f5289a6 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Fix image pathAlan Alpert2011-12-061-1/+1
| | | | | | | Plasma Patrol wasn't finding a text mask. Change-Id: I10934d3cecd076df885ba68833d7654f4b3978d0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Say hello to QtQuick moduleKent Hansen2011-12-0238-44/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change moves the QtQuick 2 types and C++ API (including SceneGraph) to a new module (AKA library), QtQuick. 99% of this change is moving files from src/declarative to src/quick, and from tests/auto/declarative to tests/auto/qtquick2. The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to a plugin, src/imports/qtquick2, just like it's done for QtQuick 1. All tools, examples, and tests that use QtQuick C++ API have gotten "QT += quick" or "QT += quick-private" added to their .pro file. A few additional internal QtDeclarative classes had to be exported (via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the QtQuick 2 implementation. The old header locations (e.g. QtDeclarative/qquickitem.h) will still be supported for some time, but will produce compile-time warnings. (To avoid the QtQuick implementation using the compatibility headers (since QtDeclarative's includepath comes first), a few include statements were modified, e.g. from "#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".) There's a change in qtbase that automatically adds QtQuick to the module list if QtDeclarative is used. Together with the compatibility headers, this should help reduce the migration pain for existing projects. In theory, simply getting an existing QtDeclarative-based project to compile and link shouldn't require any changes for now -- but porting to the new scheme is of course recommended, and will eventually become mandatory. Task-number: QTBUG-22889 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* 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>