Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qmlvisual / qdeclarativetextedit / cursorDelegate.qml
1 import QtQuick 1.0
2 import "../shared" 1.0
3
4 Rectangle {
5     resources: [
6         Component { id: cursorA
7             Item { id: cPage;
8                 Behavior on x { NumberAnimation { } }
9                 Behavior on y { NumberAnimation { } }
10                 Behavior on height { NumberAnimation { duration: 200 } }
11                 Rectangle { id: cRectangle; color: "black"; y: 1; width: 1; height: parent.height-2;
12                     Rectangle { id:top; color: "black"; width: 3; height: 1; x: -1; y:0}
13                     Rectangle { id:bottom; color: "black"; width: 3; height: 1; x: -1; anchors.bottom: parent.bottom;}
14                 }
15                 SequentialAnimation on opacity { running: true; loops: Animation.Infinite;
16                     NumberAnimation { to: 0; duration: 500; easing.type: "OutQuad"}
17                     NumberAnimation { to: 1; duration: 500; easing.type: "InQuad"}
18                 }
19                 width: 1;
20             }
21         }
22     ]
23     width: 400
24     height: 200
25     color: "white"
26     TestTextEdit { id: mainText
27         text: "Hello World"
28         cursorDelegate: cursorA
29         focus: true
30         font.pixelSize: 28
31         selectionColor: "lightsteelblue"
32         selectedTextColor: "deeppink"
33         color: "forestgreen"
34         anchors.centerIn: parent
35     }
36 }