Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 1.1
- import com.nokia.symbian 1.1
- Rectangle {
- width: 1024
- height: 600
- color: "pink"
- Text {
- id: sometext
- text: "Tap and drag NAO!"
- horizontalAlignment: Text.AlignHCenter
- transformOrigin: Item.Center
- font.pointSize: 36
- font.family: "Verdana"
- smooth: false
- scale: 1
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- Component.onCompleted: {
- myanim.start()
- }
- }
- ListView {
- id: grid
- anchors.centerIn: parent
- width: parent.width
- height: parent.height
- maximumFlickVelocity: 3000
- model: gallery
- delegate:
- Component {
- id: fruitDelegate
- Row {
- height: childrenRect.height
- spacing: 10
- Button{ text: "Btn Cmpnt"}
- Text { color: "white" ; text: name }
- Text { color: "white" ; text: '$' + cost }
- }
- }
- }
- ListModel {
- id: gallery
- ListElement {
- name: "Apple"
- cost: 2.45
- }
- ListElement {
- name: "Orange"
- cost: 3.25
- }
- ListElement {
- name: "Banana"
- cost: 1.95
- }
- }
- MouseArea {
- x: 0
- y: 0
- width: 1024
- height: 600
- anchors.rightMargin: 20
- anchors.bottomMargin: 20
- anchors.leftMargin: 20
- anchors.topMargin: 20
- anchors.fill: parent
- onPositionChanged: {
- sometext.x = mouse.x - sometext.width / 2
- sometext.y = mouse.y - sometext.height / 2
- }
- }
- SequentialAnimation {
- id: myanim
- loops: Animation.Infinite
- ParallelAnimation {
- NumberAnimation { target: sometext; property: "rotation";
- from: 0; to: 360; duration: 1000; easing.type: Easing.OutBack;
- }
- NumberAnimation { target: sometext; property: "opacity";
- from: 0.2; to: 1; duration: 2000; easing.type: Easing.InQuad;
- }
- }
- ParallelAnimation {
- NumberAnimation { target: sometext; property: "rotation";
- from: 0; to: 360; duration: 2000; easing.type: Easing.OutBack;
- }
- NumberAnimation { target: sometext; property: "opacity";
- to: 0.2; duration: 2000; easing.type: Easing.InQuart;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement