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: messageEditor.height > image.height ? messageEditor.height : image.height
14 height: charactersLeftRect.height + textEditRow.height
17 id: charactersLeftRect
18 height: charactersLeft.height
19 width: charactersLeft.width
20 anchors.top: parent.top
21 anchors.horizontalCenter: messageEditorRect.horizontalCenter
22 border { color: "black"; width: 1 }
26 Behavior on opacity { NumberAnimation { duration: animationDuration } }
31 anchors.centerIn: charactersLeftRect
34 Behavior on opacity { NumberAnimation { duration: animationDuration } }
39 anchors { left: parent.left; top: charactersLeftRect.bottom; topMargin: 2; right: parent.right }
40 height: messageEditor.height
45 anchors { left: parent.left; top: textEditRow.top }
50 anchors { fill: messageEditor; margins: -2 }
51 border { color: "black"; width: 1 }
56 Behavior on opacity { NumberAnimation { duration: animationDuration } }
61 anchors { leftMargin: 5; left: image.right; right: buttonsArea.left; rightMargin: 5; top: textEditRow.top }
62 height: paintedHeight > buttonsArea.height ? paintedHeight : buttonsArea.height
63 onActiveFocusChanged: {
67 onCharacterCountChanged: {
68 charactersLeft.text = 255 - characterCount + " characters left"
75 anchors { left: cancelButton.left; right: cancelButton.right; top: messageEditor.top }
77 scale: cancelButton.scale
78 transformOrigin: Item.Right
80 locationUpdate.setMessage(messageEditor.text)
83 sendButton.forceActiveFocus()
90 anchors { right: parent.right; rightMargin: 5; top: sendButton.bottom; topMargin: 5 }
93 transformOrigin: Item.TopRight
96 cancelButton.forceActiveFocus()
104 right: cancelButton.right
105 left: cancelButton.right
106 bottom: textEditRow.top
110 Component.onCompleted: {
111 textSingleLineHeight = messageEditor.height
118 target: messageEditor
119 text: locationUpdate.message
120 height: cancelButton.y + cancelButton.height
123 target: messageEditorRect
127 target: charactersLeftRect
131 target: charactersLeft
140 anchors.left: cancelButton.left
141 anchors.bottom: textEditRow.bottom
150 SequentialAnimation {
151 PropertyAction { target: sendButton; property: "visible"; value: true }
152 PropertyAction { target: cancelButton; property: "visible"; value: true }
154 NumberAnimation { target: cancelButton; properties: "scale"; duration: animationDuration }
155 AnchorAnimation { targets: buttonsArea; duration: animationDuration }
156 NumberAnimation { target: messageEditor; properties: "height"; duration: animationDuration }
163 SequentialAnimation {
165 NumberAnimation { target: cancelButton; properties: "scale"; duration: animationDuration }
166 AnchorAnimation { targets: buttonsArea; duration: animationDuration }
167 NumberAnimation { target: messageEditor; properties: "height"; duration: animationDuration }
169 PropertyAction { target: sendButton; property: "visible"; value: false }
170 PropertyAction { target: cancelButton; property: "visible"; value: false }