4 property alias image: image.source
5 property alias text: messageEditor.text
7 property int textSingleLineHeight: 0
8 property int animationDuration: 150
10 anchors.left: parent.left
11 anchors.right: parent.right
13 height: textEditRowBox.y + textEditRowBox.height + 3
17 id: charactersLeftRect
18 anchors.fill: charactersLeft
19 anchors.leftMargin: -4
20 anchors.rightMargin: anchors.leftMargin
21 border { color: "black"; width: 1 }
25 Behavior on opacity { NumberAnimation { duration: animationDuration } }
30 anchors.top: parent.top
31 anchors.horizontalCenter: messageEditorRect.horizontalCenter
36 Behavior on opacity { NumberAnimation { duration: animationDuration } }
37 Behavior on height { NumberAnimation { duration: animationDuration } }
42 anchors { left: parent.left; top: charactersLeftRect.bottom; topMargin: 2; right: parent.right }
43 height: messageEditor.height
48 anchors { left: textEditRowBox.left; top: textEditRowBox.top }
53 anchors { fill: messageEditor; margins: -2 }
54 border { color: palette.highlight ; width: 1 }
59 Behavior on opacity { NumberAnimation { duration: animationDuration } }
65 left: image.right; leftMargin: 5;
66 right: textEditRowBox.right; rightMargin: 5;
67 top: textEditRowBox.top
70 onActiveFocusChanged: {
74 onCharacterCountChanged: {
75 charactersLeft.text = 255 - characterCount + " characters left"
82 anchors { left: cancelButton.left; right: cancelButton.right; top: textEditRowBox.top }
84 scale: cancelButton.scale
85 transformOrigin: Item.TopRight
87 locationUpdate.setMessage(messageEditor.text)
90 sendButton.forceActiveFocus()
98 right: parent.right; rightMargin: 5
99 top: sendButton.bottom; topMargin: 5
103 transformOrigin: Item.TopRight
106 cancelButton.forceActiveFocus()
110 Component.onCompleted: {
111 textSingleLineHeight = messageEditor.height
118 target: messageEditor
119 text: locationUpdate.message
120 height: cancelButton.y + cancelButton.height
124 target: messageEditorRect
128 target: charactersLeftRect
132 target: charactersLeft
134 height: charactersLeft.paintedHeight
141 target: messageEditor
142 anchors.right: cancelButton.left
151 SequentialAnimation {
152 PropertyAction { target: sendButton; property: "visible"; value: true }
153 PropertyAction { target: cancelButton; property: "visible"; value: true }
155 NumberAnimation { target: cancelButton; properties: "scale"; duration: animationDuration }
156 AnchorAnimation { targets: messageEditor; duration: animationDuration }
157 NumberAnimation { target: messageEditor; properties: "height, font.pixelSize"; duration: animationDuration }
158 NumberAnimation { target: charactersLeft; property: "height"; duration: animationDuration }
165 SequentialAnimation {
167 NumberAnimation { target: cancelButton; properties: "scale"; duration: animationDuration }
168 AnchorAnimation { targets: messageEditor; duration: animationDuration }
169 NumberAnimation { target: messageEditor; properties: "height, font.pixelSize"; duration: animationDuration }
171 PropertyAction { target: sendButton; property: "visible"; value: false }
172 PropertyAction { target: cancelButton; property: "visible"; value: false }