Coffee Tweed Demo: Difference between revisions
No edit summary |
(Remove dead links and old instructions) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Developing_with_Qt::Qt_Quick::Demos]] | |||
[[Category:Learning::Demos_and_Examples]] | |||
'''English''' [[Coffee_Tweed_Demo_Japanese|日本語]] | |||
[https://www.youtube.com/watch?v=NqmncgPjWBI YouTube video] | |||
== | == Description == | ||
This is a simple app created to show how states and transitions work on QtQuick. It is a daily coffee cup counter; each time you press the '''add''' button you see an animation of a cup falling and a number decreasing, complete with a fade-out and fade-in. | |||
CoffeeTweed can work also as an introduction to Component Oriented Programming using QtQuick. Cup, Button and Tray are the demo's main components that are declared on a main file. An example of its simplicity is demonstrated when a Button is clicked. It is just a Cup state changing through JavaScript. The animation between states is defined inside the Cup component. | |||
To build on this demo, you could try to create persistent data, add a field to define the maximum number of coffees to be consumed each day or create a button that would start the counting all over again. This would be an interesting exercise for you to learn more about states, transitions and databases in QtQuick. | |||
== | == Source code == | ||
http://code.qt.io/cgit/%7bnon-gerrit%7d/qt-labs/mobile-demos.git/tree/CoffeeTweed | |||
Latest revision as of 03:15, 20 April 2016
English 日本語
Description
This is a simple app created to show how states and transitions work on QtQuick. It is a daily coffee cup counter; each time you press the add button you see an animation of a cup falling and a number decreasing, complete with a fade-out and fade-in.
CoffeeTweed can work also as an introduction to Component Oriented Programming using QtQuick. Cup, Button and Tray are the demo's main components that are declared on a main file. An example of its simplicity is demonstrated when a Button is clicked. It is just a Cup state changing through JavaScript. The animation between states is defined inside the Cup component.
To build on this demo, you could try to create persistent data, add a field to define the maximum number of coffees to be consumed each day or create a button that would start the counting all over again. This would be an interesting exercise for you to learn more about states, transitions and databases in QtQuick.
Source code
http://code.qt.io/cgit/%7bnon-gerrit%7d/qt-labs/mobile-demos.git/tree/CoffeeTweed