import QtQuick 2.0 import "../../../../layoutList.js" as Layout Item { property bool newline: false property bool iSerach: true //ADD #105313 2016/12/07 liduo begin property bool changecanvas: true //ADD #105313 2016/12/07 liduo end property bool iConfirm: false property bool confirmBtFlag: true property string style: systemCtrl.style property bool bDeleteKeyLongPress: false property int deleteKeyConsequentPressTime: 200 property int clearMycanvasTime: 1000 property bool isInput : false property string stInput : "" property bool iPassword : false property bool iNum : false //ADD #105313 2016/12/07 liduo begin property int curPressedX: 0 property int curPressedY: 0 //ADD #105313 2016/12/07 liduo end //ADD 2016/11/30 ld begin property string searchInfo: "" //ADD 2016/11/30 ld end property bool flag: false property QtObject listtmp property int lastPressedX: 0//ADD 2017/3/15 ld property int lastPressedY: 0//ADD 2017/3/15 ld signal keyborad(int itype) signal searchStart() signal closeKeyBoardSignal() signal delKeyPressed() signal delKeyLongPressed() //ADD mengyufeng 20170515 onIPasswordChanged: { if(iPassword==true) { keyborad(2) } } onINumChanged: { if(iNum==true) { keyborad(3) systemCtrl.handwriteshuzi(); } } onISerachChanged: { if(iSerach) { iConfirm=false } else { iConfirm=true } } onIConfirmChanged: { if(iConfirm) { iSerach=false } else { iSerach=true } } id:handWriteID width: 960 height: 400 Component.onCompleted: { systemCtrl.handWriteInit(0,mycanvas.width,0,mycanvas.height) } Component.onDestruction: { systemCtrl.handWriteRelease() } onVisibleChanged: { if(visible) { confirmBtFlag=true if(iSerach) { iConfirm=false } if(iConfirm) { iSerach=false } systemCtrl.hdRulesVisibleChanged(false)//ADD #158132 2017/3/21 ld } else { listView.model = listtmp; mycanvas.clear() //ADD #157102 2017/3/13 ld begin searchInfo="" systemCtrl.handWriteRecognize(); //ADD #157102 2017/3/13 ld end systemCtrl.hdRulesVisibleChanged(true)//ADD #158132 2017/3/21 ld } } Connections { target: systemCtrl onHandWriteAlternateListChanged: { if(handWriteID.visible) { listView.model = systemCtrl.handWriteAlternateList } } } Item { id:keyBoard x:0 width: 960 height: 400 Column{ id: keyboardColumn Item{ id:keyRowItem width: 960 height: 400 //ADD #105313 2016/12/07 liduo begin Row { id:handwrite anchors{bottom:tempRow.top;bottomMargin:2;horizontalCenter: parent.horizontalCenter} Image { id:mycanimage width: 960 height: 640 visible: changecanvas?true:false source:"qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_HANDWRITTEN_MASK"+style Canvas { id: mycanvas width: 960 height: 640 visible: changecanvas?true:false antialiasing:false//add #167343 2017/5/3 ld property var clickX :[]; property var clickY :[]; property var clickDrag :[]; property bool isPressed: false; property bool isClear: false; onPaint: { //ADD 2017/3/15 ld if(lastPressedX-curPressedX!=0&&lastPressedY-curPressedY!=0){ simplifyDrawLine()//add #167343 2017/5/3 ld } //ADD 2017/3/15 ld } MouseArea { id: mousearea1 anchors.fill: parent onPressed: { //ADD 2016/11/30 ld begin setsearchInfo.stop() systemCtrl.setsencodkeypress(1) //ADD 2016/11/30 ld end clearMycanvas.stop() mycanvas.isPressed = true; mycanvas.isClear = true; mycanvas.addClick(mouse.x, mouse.y, false); mycanvas.requestPaint(); //enlargeCanvas.stop() curPressedX=mouse.x curPressedY=mouse.y //ADD By qushh for bug 147838 start //systemCtrl.gestureState = 0 systemCtrl.setGestureShieldState(Layout.GESTURE_POP,Layout.POP_ALL_NOT_AVAILABLE) //ADD By qushh for bug 147838 end } onPositionChanged: { if (mycanvas.isPressed &&mouse.x>=0 && mouse.y>=0) { mycanvas.isClear = true; mycanvas.addClick(mouse.x, mouse.y, true); mycanvas.requestPaint(); } } //ADD #173852 2017/5/12 ld begin onCanceled: { mycanvas.isPressed = false; mycanvas.isClear = true; systemCtrl.handWriteRecognize(); clearMycanvas.start() //setsearchInfo.start() systemCtrl.setGestureShieldState(Layout.GESTURE_POP,Layout.POP_ALL_AVAILABLE) } //ADD #173852 2017/5/12 ld end onReleased: { //ADD 2017/3/15 ld lastPressedX=mouse.x lastPressedY=mouse.y if(mouse.x-curPressedX!=0&&mouse.y-curPressedY!=0){ mycanvas.isPressed = false; mycanvas.isClear = true; systemCtrl.handWriteRecognize(); clearMycanvas.start() setsearchInfo.start() } //ADD 2017/3/15 ld //enlargeCanvas.start() if((mouse.y-curPressedY==0)&&(mouse.x-curPressedX==0)&&changecanvas==true){ changecanvas=false mycanvas.clear() }else if((mouse.y-curPressedY==0)&&(mouse.x-curPressedX==0)&&changecanvas==false){ changecanvas=true mycanvas.clear() }else{ //do nothing } //ADD By qushh for bug 147838 start //systemCtrl.gestureState = 1 systemCtrl.setGestureShieldState(Layout.GESTURE_POP,Layout.POP_ALL_AVAILABLE) //ADD By qushh for bug 147838 end } MouseArea{ id:mousecanvas anchors.fill: parent visible: false onClicked: { if(changecanvas==true){ changecanvas=false }else{ changecanvas=true } } } } function clear() { mycanvas.isClear = false; systemCtrl.clearHandWritePoint(); var context = mycanvas.getContext('2d'); context.clearRect(0,0,mycanvas.width,mycanvas.height); clickX = []; clickY = []; clickDrag = []; mycanvas.requestPaint(); } function addClick(m, n, dragging) { clickX.push(m); clickY.push(n); clickDrag.push(dragging); systemCtrl.addHandWritePoint(m, n, dragging); } //add #167343 2017/5/3 ld function simplifyDrawLine(){ if(isPressed){ var ctx = getContext('2d') ctx.strokeStyle = "white"; ctx.lineJoin="round"; ctx.lineWidth = 5; // if(clickX.length <= 16) // { // for(var i=0; i < clickX.length - 3; i=i+3) // { // if(clickDrag[i] && clickDrag[i+1] && clickDrag[i+2] && clickDrag[i+3]) // { // ctx.beginPath(); // ctx.moveTo(clickX[i], clickY[i]) // ctx.bezierCurveTo(clickX[i+1],clickY[i+1],clickX[i+2],clickY[i+2],clickX[i+3],clickY[i+3]); // ctx.lineTo(clickX[i], clickY[i]) // ctx.closePath(); // ctx.stroke(); // } // } // }else{ for(var k = clickX.length - clickX.length%3 - 16; k < clickX.length - 3; k = k+3) { if(clickDrag[k] && clickDrag[k+1] && clickDrag[k+2] && clickDrag[k+3]){ ctx.beginPath(); ctx.moveTo(clickX[k], clickY[k]); ctx.bezierCurveTo(clickX[k+1],clickY[k+1],clickX[k+2],clickY[k+2],clickX[k+3],clickY[k+3]); ctx.lineTo(clickX[k], clickY[k]) ctx.closePath(); ctx.stroke(); } } //} }else{ clickX = []; clickY = []; clickDrag = []; } } //add #167343 2017/5/3 ld function drawLine(){ if(isPressed){ var context = mycanvas.getContext('2d'); context.strokeStyle = "white"; context.lineJoin = "round"; context.lineWidth = 5; if(clickX.length > 3){ if(clickX.length <= 16) { for(var i=0; i < clickX.length - 3; i=i+3) { //DEL #142296 mengyufeng 2017/01/11 begin //if(clickDrag[i] && clickDrag[i+1] && clickDrag[i+2] && clickDrag[i+3]){ //DEL #142296 mengyufeng 2017/01/11 end context.beginPath(); context.moveTo(clickX[i], clickY[i]); context.bezierCurveTo(clickX[i+1],clickY[i+1],clickX[i+2],clickY[i+2],clickX[i+3],clickY[i+3]); context.closePath(); context.stroke(); //DEL #142296 mengyufeng 2017/01/11 begin //} //DEL #142296 mengyufeng 2017/01/11 end } } else { for(var k = clickX.length - clickX.length%3 - 16; k < clickX.length - 3; k = k+3) { if(clickDrag[k] && clickDrag[k+1] && clickDrag[k+2] && clickDrag[k+3]){ context.beginPath(); context.moveTo(clickX[k], clickY[k]); context.bezierCurveTo(clickX[k+1],clickY[k+1],clickX[k+2],clickY[k+2],clickX[k+3],clickY[k+3]); context.closePath(); context.stroke(); } } } } else{ for(var j=0; j < clickX.length; j++) { context.beginPath(); if(clickDrag[j] && j){ context.moveTo(clickX[j-1], clickY[j-1]); }else{ context.moveTo(clickX[j]-1, clickY[j]); } context.lineTo(clickX[j], clickY[j]); context.closePath(); context.stroke(); } } } else { clickX = []; clickY = []; clickDrag = []; } } Timer{ id: clearMycanvas interval: clearMycanvasTime repeat: false onTriggered: { mycanvas.clear() //ADD 2016/11/30 ld begin //ADD 2016/11/30 ld end } } Timer{ id: setsearchInfo interval: clearMycanvasTime //FOD 2017/2/22 #151215 LD repeat: false onTriggered: { if(handWriteID.visible==true){//ADD #157102 2017/3/13 ld searchInfo=systemCtrl.getHandWrite_frist(); systemCtrl.setKeyPress(searchInfo,2)//add 2017/5/3 ld //searchInfo="" } } } } } } Row { id:tempRow anchors{bottom:firstRow.top;bottomMargin:2;horizontalCenter: parent.horizontalCenter} Item { id: tempItem width: 960 height: 78 } } //ADD #105313 2016/12/07 liduo end Row { id:firstRow anchors{bottom:lastRow.top;bottomMargin:2;horizontalCenter: parent.horizontalCenter} //ADD #128169 20161115 ld begin Image { width: 96*8+2 source:("qrc:MATERIAL/MATERIAL_M8X_CANDIDATE-KEY_BG"+style) //ADD #128169 20161115 ld end ListView { id:listView //FOD F0030 2016/10/16 liduo begin width:96*8+2 //FOD F0030 2016/10/16 liduo end height: 78 flickableDirection:Flickable.HorizontalFlick clip: true snapMode:ListView.SnapToItem orientation:ListView.Horizontal model:systemCtrl.handWriteAlternateList highlightFollowsCurrentItem:true //DEL #141378 20170103 liduo begin //highlightRangeMode: ListView.StrictlyEnforceRange //DEL #141378 20170103 liduo end cacheBuffer: listView.width*4 delegate: recipeDelegate spacing: 2 //DEL #128169 20161115 ld begin //Image //{ //anchors.fill: parent ////FOD F0030 2016/10/16 liduo begin //width: 96*8+2 //source:("qrc:MATERIAL/MATERIAL_M8X_CANDIDATE-KEY_BG"+style) ////FOD F0030 2016/10/16 liduo end //} //DEL #128169 20161115 ld end } Component { id: recipeDelegate Item { id: delegateImgMain width: _testLabelbg.width height: _testLabelbg.height /*DEL F0031 2016/10/12 liduo begin Image { id: _testLabelbg width: _testLabel.contentWidth+35 height: 78 source:m_area.pressed?("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_BUTTON_P"+style):("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_BUTTON"+style) } HMILabel { id: _testLabel width: _testLabelbg.width height: _testLabelbg.height text: col0 font.pixelSize: 30 color:m_area.pressed?"#FF8400":"white" HMIMouseArea { id: m_area anchors.fill: parent onPressed: { } //DEL F0031 2016/10/12 liduo end*/ //ADD F00312016/10/12 liduo begin Item { id: _testLabelbg //FOD #140699 2017/1/10 liduo begin width: _testLabel.contentWidth+64 //FOD #140699 2017/1/10 liduo end height: 78 } Image { id: _testLabelbg_press //FOD #140699 2017/1/10 liduo begin width: _testLabel.contentWidth+64 //FOD #140699 2017/1/10 liduo end height: 78 //DEL 2016/12/13 liduo begin visible: m_area.pressed?true:false //DEL 2016/12/13 liduo end source:"qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_BUTTON_P"+style } HMILabel { id: _testLabel width: _testLabelbg.width height: _testLabelbg.height text: col0 font.pixelSize: 30 //ADD #145211 mengyufeng 20170125 begin wtitesize:2 //ADD #145211 mengyufeng 20170125 end //FOD #140698 2017/1/10 liduo begin color:"white" //FOD #140698 2017/1/10 liduo begin HMIMouseArea { id: m_area anchors.fill: parent onPressed: { //DEL 2016/12/13 liduo begin // _testLabelbg_press.visible=true //DEL 2016/12/13 liduo begin } onReleased: { //DEL 2016/12/13 liduo begin // _testLabelbg_press.visible=false //DEL 2016/12/13 liduo begin } //ADD F0031 2016/10/12 liduo end onClicked: { searchInfo= "" setsearchInfo.stop()//ADD 2017/3/16 ld mycanvas.clear() systemCtrl.setSelectedHandWriteHanzi(col0,stInput) listView.model = systemCtrl.handWritePredictList stInput="" } } } } } //ADD #128169 20161115 ld begin } //ADD #128169 20161115 ld end HMIKeyBtn { id:deleteKey x:_testLabel.x+96 //DEL F0027 2016/10/12 liduo begin //btnIcon: deleteKey.pressed?("qrc:MATERIAL/MATERIAL_M8X_ICON_DELETE_D"+style):("qrc:MATERIAL/MATERIAL_M8X_ICON_DELETE"+style) //DEL F0027 2016/10/12 liduo end //ADD F0027 2016/10/12 liduo begin btnIcon:"qrc:MATERIAL/MATERIAL_M8X_ICON_DELETE"+style //ADD F0027 2016/10/12 liduo end onPressed: { bDeleteKeyLongPress = false } onClicked: { delKeyPressed() if(listView.count<1&&mycanvas.isClear == true) { mycanvas.clear() systemCtrl.handWriteRecognize(); } else { systemCtrl.setKeyPress("delete") isInput=false mycanvas.clear() systemCtrl.handWriteRecognize(); } } onPressAndHold: { deleteKeyConsequentPress_timer.start() delKeyLongPressed() //ADD mengyufeng 20170515 } onReleased: { deleteKeyConsequentPress_timer.stop() } //ADD #145875 2017/01/20 mengyufeng begin onCanceled: { deleteKeyConsequentPress_timer.stop() } //ADD #145875 2017/01/20 mengyufeng end } HMIKeyBtn { id:closeKeyboard //FOD F0031 liduo begin x:deleteKey.x+96 Image { id: closeKeyboardicon anchors.horizontalCenter: closeKeyboard.horizontalCenter y:closeKeyboard.y+28 source: "qrc:MATERIAL/MATERIAL_M8X_ARROW_RETRACT"+style } //FOD F0031 liduo end onClicked: { //ADD 2017/3/22 ld if(searchInfo!=""){ systemCtrl.setsencodkeypress(1) } closeKeyBoardSignal(); isInput=false //DEL 2017/3/22 ld //if(searchInfo!=""){//ADD 2017/3/15 ld //systemCtrl.setsencodkeypress(2)//ADD #154249 2017/3/8 ld //} mycanvas.clear() systemCtrl.handWriteRecognize(); } } } //DEL #105313 2016/12/07 liduo begin /* Row { id:handwrite anchors{top:firstRow.bottom;topMargin:2;horizontalCenter: parent.horizontalCenter} Canvas { id: mycanvas width: 960 height: 238 property var clickX :[]; property var clickY :[]; property var clickDrag :[]; property bool isPressed: false; property bool isClear: false; onPaint: { drawLine() } Image { id:mycanimage anchors.fill: parent source:"qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_HANDWRITTEN_BG"+style } MouseArea { id: mousearea1 anchors.fill: parent onPressed: { //ADD 2016/11/30 ld begin systemCtrl.setsencodkeypress(1) //ADD 2016/11/30 ld end clearMycanvas.stop() mycanvas.isPressed = true; mycanvas.isClear = true; mycanvas.addClick(mouse.x, mouse.y, false); mycanvas.requestPaint(); } onPositionChanged: { if (mycanvas.isPressed &&mouse.x>=0 && mouse.y>=0) { mycanvas.isClear = true; mycanvas.addClick(mouse.x, mouse.y, true); mycanvas.requestPaint(); } } onReleased: { mycanvas.isPressed = false; mycanvas.isClear = true; systemCtrl.handWriteRecognize(); clearMycanvas.start() } } function clear() { mycanvas.isClear = false; systemCtrl.clearHandWritePoint(); var context = mycanvas.getContext('2d'); context.clearRect(0,0,mycanvas.width,mycanvas.height); clickX = []; clickY = []; clickDrag = []; mycanvas.requestPaint(); } function addClick(m, n, dragging) { clickX.push(m); clickY.push(n); clickDrag.push(dragging); systemCtrl.addHandWritePoint(m, n, dragging); } function drawLine(){ if(isPressed){ var context = mycanvas.getContext('2d'); context.strokeStyle = "blue"; context.lineJoin = "round"; context.lineWidth = 5; if(clickX.length > 3){ if(clickX.length <= 16) { for(var i=0; i < clickX.length - 3; i=i+3) { if(clickDrag[i] && clickDrag[i+1] && clickDrag[i+2] && clickDrag[i+3]){ context.beginPath(); context.moveTo(clickX[i], clickY[i]); context.bezierCurveTo(clickX[i+1],clickY[i+1],clickX[i+2],clickY[i+2],clickX[i+3],clickY[i+3]); context.closePath(); context.stroke(); } } } else { for(var k = clickX.length - clickX.length%3 - 16; k < clickX.length - 3; k = k+3) { if(clickDrag[k] && clickDrag[k+1] && clickDrag[k+2] && clickDrag[k+3]){ context.beginPath(); context.moveTo(clickX[k], clickY[k]); context.bezierCurveTo(clickX[k+1],clickY[k+1],clickX[k+2],clickY[k+2],clickX[k+3],clickY[k+3]); context.closePath(); context.stroke(); } } } } else{ for(var j=0; j < clickX.length; j++) { context.beginPath(); if(clickDrag[j] && j){ context.moveTo(clickX[j-1], clickY[j-1]); }else{ context.moveTo(clickX[j]-1, clickY[j]); } context.lineTo(clickX[j], clickY[j]); context.closePath(); context.stroke(); } } } else { clickX = []; clickY = []; clickDrag = []; } } Timer{ id: clearMycanvas interval: clearMycanvasTime repeat: false onTriggered: { mycanvas.clear() //ADD 2016/11/30 ld begin searchInfo=systemCtrl.getHandWrite_frist(); systemCtrl.setKeyPress(searchInfo,1) //ADD 2016/11/30 ld end } } } }*/ //DEL #105313 2016/12/07 liduo end Row { id: lastRow anchors{bottom:parent.bottom;bottomMargin:2;horizontalCenter: parent.horizontalCenter} spacing: 2 HMIKeyBtn{ id:hdqiehuan x:0 //ADD #145871 2017/0/20 liduo begin cursize:1 //ADD #145871 2017/0/20 liduo end btnImg:hdqiehuan.pressed?("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_BUTTON_H142_P"+style):("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_BUTTON_H142"+style) //DEL #F0167 2017/1/10 liduo begin //btnIcon:"qrc:MATERIAL/MATERIAL_M8X_ICON_HANDWRITTEN"+style //DEL #F0167 2017/1/10 liduo end //ADD #F0167 2017/1/10 liduo begin labelPixelSize:30//FOD design 2017/1/10 ld labelText: "123" //ADD #F0167 2017/1/10 liduo end onClicked: { //DEL #F0167 2017/1/10 liduo begin //keyborad(1) //isInput = false //DEL #F0167 2017/1/10 liduo end //ADD #F0167 2017/1/10 liduo begin keyborad(3) isInput = false //ADD 2017/2/17 ld begin systemCtrl.setsencodkeypress(1) searchInfo="" //ADD 2017/2/17 ld end systemCtrl.handwriteshuzi(); systemCtrl.handwritekeypy(1); //ADD #F0167 2017/1/10 liduo end } } HMIKeyBtn{ id:hd123 //ADD #145871 2017/0/20 liduo begin cursize:1 //ADD #145871 2017/0/20 liduo end btnImg: hd123.pressed?("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_BUTTON_H142_P"+style):("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_BUTTON_H142"+style) //FOD #F0167 2017/1/10 liduo begin labelText: (qsTr("Written")+systemCtrl.emptyString) //FOD #F0167 2017/1/10 liduo end //FOD #145871 2017/01/20 liduo begin labelPixelSize:30//28//30//FOD design 2017/1/10 ld //FOD #145871 2017/01/20 liduo end onClicked: { keyborad(1) isInput = false //ADD 2017/2/17 ld begin systemCtrl.setsencodkeypress(1) searchInfo="" //ADD 2017/2/17 ld end systemCtrl.handwritekeypy(0); } } HMIKeyBtn { id:hdkongge btnImg:{ if(false == newline){ hdkongge.pressed?("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_SPACE_BUTTON_W526_P"+style):("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_SPACE_BUTTON_W526"+style) }else{ hdkongge.pressed?("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_SPACE_BUTTON_W382_P"+style):("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_SPACE_BUTTON_W382"+style) } } //FOD #F0117 2016/11/30 ld begin Image{ //FOD 2016/12/1 liduo begin anchors.horizontalCenter: hdkongge.horizontalCenter y:hdkongge.y+34 //FOD 2016/12/1 liduo end source:("qrc:MATERIAL/MATERIAL_M8X_ICON_SPACE"+style)//FOD #150435 2017/2/20 ld } //FOD #F0117 2016/11/30 ld end labelText: " " onClicked: { //FOD #163227 2017/4/6 ld begin if(searchInfo==""){ systemCtrl.setKeyPress(" ") }else{ systemCtrl.setsencodkeypress(1) searchInfo="" } //FOD #163227 2017/4/6 ld end } } HMIKeyBtn{ id: newlinekey x: 673 btnImg:pressed?("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_BUTTON_H142_P"+style):("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_BUTTON_H142"+style) width:142 height:78 //ADD #145871 2017/0/20 liduo begin cursize:1 //ADD #145871 2017/0/20 liduo end labelPixelSize:30//FOD design 2017/1/10 ld visible: newline HMILabel { anchors.centerIn: parent //FOD #F0117 2016/11/30 ld begin text:qsTr("Enter")+systemCtrl.emptyString font.pixelSize:30//28 width:180 height:35 //FOD #F0117 2016/11/30 ld end } onClicked:{ if(iPassword||iNum) { //do nothing }else{ systemCtrl.setKeyPress("enter") } } } HMIKeyBtn { id:search visible: iSerach enabled: confirmBtFlag //ADD #145871 2017/0/20 liduo begin cursize:1 //ADD #145871 2017/0/20 liduo end labelPixelSize:30//FOD design 2017/1/10 ld btnImg:search.pressed?("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_BUTTON_H142_P"+style):("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_BUTTON_H142"+style) HMILabel { anchors.centerIn: parent //DEL F0028 2016/10/12 liduo begin //text:"检索" //DEL F0028 2016/10/12 liduo end //ADD F0028 2016/10/12 liduo begin //FOD #F0117 2016/11/30 ld begin text:qsTr("Search")+systemCtrl.emptyString wtitesize:1 //Add by yangli for ST Bug#154984 //ADD F0028 2016/10/12 liduo end font.pixelSize:30//28 width:180 height:35 //FOD #F0117 2016/11/30 ld end } onClicked:{ //ADD #146645 2017/1/23 ld begin if(searchInfo!=""){//ADD 2017/3/22 ld systemCtrl.setsencodkeypress(1) searchInfo="" } //ADD #146645 2017/1/23 ld end if(search.enabled) searchStart() } } HMIKeyBtn{ id:confirm visible: iConfirm enabled: confirmBtFlag //ADD #145871 2017/0/20 liduo begin cursize:1 //ADD #145871 2017/0/20 liduo end labelPixelSize:30//FOD design 2017/1/10 ld btnImg:confirm.pressed?("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_BUTTON_H142_P"+style):("qrc:MATERIAL/MATERIAL_M8X_KEYBOARD_BUTTON_H142"+style) HMILabel { anchors.centerIn: parent //FOD #F0117 2016/11/30 ld begin text:qsTr("OK")+systemCtrl.emptyString font.pixelSize:30//28 wtitesize:1 width:180 height:35 //FOD #F0117 2016/11/30 ld end } onClicked: { if(confirm.enabled) searchStart() } } } } } } function mouseAreaMask() { if(true == mousearea1.visible) { mousearea1.visible = false mousearea1.visible = true } } Timer { id: deleteKeyConsequentPress_timer interval: deleteKeyConsequentPressTime repeat: true onTriggered: { delKeyPressed() systemCtrl.doubleClickChooseAll()//FOD 2017/3/15 LD systemCtrl.setKeyPress("delete") isInput=false mycanvas.clear() systemCtrl.handWriteRecognize(); } } Connections { target: ScreenManager onFormchange: { if(formStatus) { mouseAreaMask(); } } } Connections { target:acCtrl onCvbsStatusOn: { mouseAreaMask() } } Connections { target: systemCtrl onPinyinSearchInfoToClear: { if(handWriteID.visible) { listView.model = listtmp } } onPowercheckHIGH: { mouseAreaMask() } onPowercheckLOW: { mouseAreaMask() } onPowerIGNOff: { mouseAreaMask() } onHkNoseEncoderPressed: { if(Layout.HMI_SHORT_PRESS == keyStat) { mouseAreaMask() } } onHkNoseEncoderRotated:{ mouseAreaMask() } } }