Commit Graph

219 Commits

Author SHA1 Message Date
Alan Alpert 2738c57e51 Fix renaming merge with examples
Some examples were duplicated a few times. Removing the excess.

Change-Id: I6fa59f79de63ac952103421ba1c063f5912b702b
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-03-06 01:39:49 +01:00
Matthew Vogt 0284817d6c Merge master <-> api_changes
Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
2012-03-05 11:39:54 +10:00
Bea Lam cc462d6a16 Use view transitions in drag'n'drop example
Change-Id: Idc661225acf9e517d26928cafba650ac48ca880a
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2012-03-02 08:26:52 +01:00
Alan Alpert beecd8388b Update ImageElement examples
Now more consistently formed. Required a UI redesign for border image,
you now view one at a time, with a selector control.

Change-Id: Idf64119b644c1a79779ea0a46412247d6d013cb1
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
2012-03-01 05:43:07 +01:00
Alan Alpert 60cae093d7 Examples guidelines have changes slightly
Update docs to current thinking.

Change-Id: Ide00240f4d779549eebdc81592f3f2104dfd759a
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-02-28 09:19:59 +01:00
Alan Alpert 01bfcfba02 Move some toys back to examples
tvtennis, corkboards and dynamicscene are more examples than demos.

clocks and tic-tac-toe are remaining demos for now.

Change-Id: I3d9501a4742349a9eb7efdad0d06aa6e7cb02c14
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-02-28 09:19:53 +01:00
Alan Alpert 7d32bacfc5 Update drag and drop examples to new guidelines
Change-Id: Ib09a50015eaf7e79f21ade5df3cbd3b58b89c83d
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
2012-02-28 09:19:51 +01:00
Alan Alpert 75a0d33d25 Rename SpriteImage to SpriteSequence
Also rename Sprite::frames->Sprite::frameCount

Change-Id: I2e7a71adc37044fd696ffda2a5da4835725ba3a8
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-02-28 09:19:40 +01:00
Alan Alpert f7dae3960b Add AnimatedSprite
A simpler sprite image element for the simple usecase. Because sometimes
an engine with stochastic capabilities is overkill.

Change-Id: I2b76c5d417719e92a548f6266bffd563dc016983
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-02-28 09:19:37 +01:00
Alan Alpert 929935dd69 Examples refactor rebase
Automatic rebase did not move some new files to where they should have
gone.

Change-Id: I25515d29d8992acde15db0df1bb5972e35573e60
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-28 00:39:41 +01:00
Alan Alpert 9d2b618fa0 Start of examples refactor
This is the general reorg of the examples directory structure, plus additional
guidelines.

calculator, animations and accessibility have been updated to the new standards
and tested, as an example.

Task-number: QTBUG-24133
Change-Id: I76c3b86751d3195ba2a5474ff23afb875765e9a4
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-02-24 10:24:58 +01:00
Matthew Vogt b855240b78 Rename QDeclarative symbols to QQuick and QQml
Symbols beginning with QDeclarative are already exported
by the quick1 module.

Users can apply the bin/rename-qtdeclarative-symbols.sh
script to modify client code using the previous names of the
renamed symbols.

Task-number: QTBUG-23737
Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-24 04:51:31 +01:00
Friedemann Kleint fb3889a423 Use new plugin system in QtDeclarative.
- Use prefix "org.qt-project" for interfaces.
- Use new macros, add json files.

Change-Id: I53df83f95153c5c9c462098584606284470a5ae0
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-23 09:05:49 +01:00
Oswald Buddenhagen 78c34d31b6 clean up qmake-generated project
remove "header" and assignmets which are defaults or bogus

Change-Id: I1d777f5418b0f353bf276a979c6300a941927e7e
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-02-22 17:39:51 +01:00
Alan Alpert 16da679efc Alter Clocks demo
For further component reuse, it's now a delegate in a view that can load
many more clocks. Also looks better both in landscape and portrait mode.

Change-Id: Ib5f172ee165554dfbe1ab84b96fe0eec7c22b1d1
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
2012-02-15 04:18:01 +01:00
Jerome Pasion 2d4e6ff9dd Doc: Overhaul of doc/src/declarative and QtQuick2 docs.
-Consolidated model/view documentation into one.
-Added a new navigation for all overviews (grouped the pages)
-New front page that shows the grouping
-Separated the Qt C++ from the main QML overviews
-Consolidated Qt C++ into the "declarative runtime" section
-New articles about JavaScript, the engine, and plugins
-Fixed the older examples. New snippet comments
-Renamed some of the articles
-kept the qtquick2 qmlmodule
-"Qt Quick Elements"

Moved contents of doc/src/declarative into respective
module dirs.

-Qt Quick 2, LocalStorage, Particles, and QML are now
separate.
-Removed unused or duplicate documentation.
-edited C++ examples
-removed navigation and "\inqmlmodule QtQuick 2" for
those pages that are not in Qt Quick 2
-fixed doc/src/ licenses to header.FDL from qtbase

Change-Id: Ib36f9c07565d91160fa8d04f9670c438f684b82a
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-02-14 12:53:21 +01:00
Alan Alpert da068b6065 Remove missing image reference
Not really needed for this example anyways

Change-Id: I98fd546441f3fd5e6caa9212cc171dab3000a139
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-14 02:28:43 +01:00
Rick Stockton e4eb6b2995 modify 'mousearea-example' to run with MANY MORE buttons
The example formerly supported only 'Qt::LeftButton'
and 'Qt::RightButton'. This enhancement shows that qml
can work with any of the buttons supported by Qt itself.
(The example reacts to ALL 27 possible Qt mouse buttons.)

Task-number: QTBUG-24132

Change-Id: Id1c1431175c39eace43e48915a47da8c4f92a1b6
Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-02-13 23:51:30 +01:00
Charles Yin ab84713eb2 Remove non-standard canvas filter/mirror functions
They are not standard context 2d APIs, and now the same effects can
be implemented by the ShaderEffect/QtGraphicEffects as well, so remove
them from canvas 2d to reduce the duplicated features.

Change-Id: If77ea6794e839a59927a313702aeea2282384844
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-02-13 10:27:31 +01:00
Justin McPherson dcd47afed9 Use only standard API in examples.
Change-Id: I62a864de35c5b595ffda4397edb16342f54a86ce
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-02-10 07:24:29 +01:00
Justin McPherson 66f740c5e7 Refactor Canvas rendering paths.
Refactor Canvas rendering paths to enable different drawing contexts.

Change-Id: If0e00a14baa673fca6b999a787b4e89885bb1e51
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-02-10 07:24:29 +01:00
Andrew den Exter 8550ed6915 Add linkColor property to Text.
Allows the color of links in text to be changed from the default blue.

This currently only works with StyledText and the distance field
rendererer.  It could be made to work with RichText overwriting the
specified foreground color in all instances or by not setting a default
color in the html parser.  The former would prevent the color being
set with CSS or some future means for altering text formats.  The latter
would break rendering with QPainter.

Task-number: QTBUG-23048
Change-Id: I98df215cabe8a089f648fd4a6206622b4318fb8f
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-09 09:10:31 +01:00
Damian Jansen 3b141d5f1e UI improvement for TwitterFriends example
Remove need to erase pre-existing text in TextInput
More likeable input field

Change-Id: I253c0a871079ebedecb96a4b2e27998e82cb10c2
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-02-09 03:46:24 +01:00
Michael Brasser 96860e3c9e Fix example to clear rect before painting.
Change-Id: Iecefc9bb38957ec463edb575f4495275aae7c57e
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-02-07 06:38:33 +01:00
Alan Alpert 3f622e0dc7 Homogenize examples
Several groups of examples are now organized like the other Qt examples,
with a project file, doc entry, and single launch point.

Change-Id: I2fd957c00e0d1121ebe47c806e54e6999425d1d3
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-06 22:23:34 +01:00
Alan Alpert 21270c1b9a Add a grouping examples launcher for animation examples
Components are designed to be reusable, so that other categories might
use them to create grouping launchers.

Single grouped launchers fit better into the Qt examples style that
QtCreator and qdoc are expecting.

Change-Id: Ia6935394caa1856aa8cc105746dd3d30fd0b8c7c
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-06 04:09:40 +01:00
Alan Alpert 1a4dc88394 Remove SVG use from example
With the SVG module now an optional dependency, examples that don't need
SVG shouldn't use them.

Change-Id: I17ad57dec6982e78090904d1514e28233c354b5b
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-06 04:09:37 +01:00
Alan Alpert 7a3d6f0396 Update BearWhack sprites
Missed the API change on duration

Change-Id: I64abcdad3f0e9554f797868761a06b9ed8662762
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-06 04:09:29 +01:00
Yann Bodson 3499561431 Cleanup text examples
Change-Id: I66797c9cf8b2c3a502a31c442d9e51d7febfe368
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
2012-02-03 00:39:18 +01:00
Matthew Vogt 01dc7e2ea4 Remove QtQuick1 elements from qtdeclarative
QtQuick1 is now contained in a separate repository.

Task-number: QTBUG-23737
Change-Id: I09eae67af5693a22b896b916f816f73ccc3a89b1
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-03 00:39:18 +01:00
Yann Bodson 8872c0716f Support inline images with <img> tag in StyledText
Task-number: QTBUG-21793
Change-Id: Ie7b9f293c6c9a949c1899152c38b61251b0069d3
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
2012-02-02 11:11:53 +01:00
Jason McDonald a83dafe49a Fix outdated license headers.
Change-Id: I8448e0d3dbce0c18f38a1ed9b6e2d75ba83f7088
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-01 15:34:49 +01:00
Alan Alpert f0850e45b7 Fix Minehunt demo
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>
2012-02-01 05:18:35 +01:00
Jason McDonald 45b14259fc Remove "All rights reserved" line from license headers.
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>
2012-01-30 23:52:43 +01:00
Michael Brasser fc973c6ca4 Update PathAnimation API and document.
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>
2012-01-27 06:23:51 +01:00
Michael Brasser 9a15b7e1b0 Document PathInterpolator.
Change-Id: I8fb625fb6881af8d0928da3d487dcd659dc384f5
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-01-27 06:23:26 +01:00
Alan Alpert a838eea333 Update Sprite using examples to frameDuration
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>
2012-01-27 06:18:00 +01:00
Alan Alpert 7c9f6b7b8f Implement randomStart for sprites
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>
2012-01-27 06:17:54 +01:00
Alan Alpert 335aa32862 Implement proper sprite sheet functionality
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>
2012-01-27 06:17:53 +01:00
Alan Alpert 15c00d747e Update Sprite API
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>
2012-01-27 06:17:51 +01:00
Alan Alpert a15e6415e4 Svelte new form for dynamic scene example
Change-Id: Ic6a3616ea06c8085e6ccd7e3e13566f36aadcc0f
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-01-27 02:23:18 +01:00
Charles Yin b2869013fd Move sqldatabase into a module API plugin
Change-Id: Icd0bbfe16804abf1bbadbabddf3a30b5b18df30c
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-01-25 06:32:34 +01:00
Samuel Rødal d2d53dffbc Adapted QQuickScreenAttached to orientation API changes in QScreen.
Change-Id: Ic2cb008b989780e297f03ddd5bdef466bb230c74
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-24 21:01:53 +01:00
Xizhi Zhu (Steven) c6497e5edc Remove Symbian specific code.
Change-Id: Ifbcc92f1d44d46760ac7c5be24a997384fa22266
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2012-01-24 10:52:54 +01:00
Matthew Vogt 69920f4dde Encode user input before insertion into URLs
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>
2012-01-23 07:38:34 +01:00
Jason McDonald e6b224aa28 Update obsolete contact address.
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>
2012-01-23 06:28:53 +01:00
Alan Alpert 599536d18f Add a simple SpriteImage example
Also shows the full framerate mode.

Task-number: QTBUG-22236
Change-Id: I42790029c4b799f916dac1a183a5cef1724448c5
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-01-21 09:35:30 +01:00
Alan Alpert 95a92ae388 Adhere to examples standards more consistently
Example subfolders should be named 'content'

Change-Id: I23f5b0ef44108f54f9b1703f04faf02cafc78efb
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-01-20 15:13:15 +01:00
Matthew Vogt 9a08d3e79f Fix range checking in AbstractItemModel examples
Fix range checking in AbstractItemModel examples

Task-number: QTBUG-23574
Change-Id: I6f2d4c18e1fb33ee369ebc75f501e524e8e63615
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-01-19 09:54:52 +01:00
Gunnar Sletta 9087497279 Compile since recent API changes
Change-Id: Id8f8b238661a46cf071f671d5d40e5c683c8ccc9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-18 11:11:22 +01:00