/* * Copyright (C) 2013 by Neusoft * Author : Jia Zhao * */ import QtQuick 2.0 import LabelInput 2.0 /** * This is a Text component from QtQuick. * * You can use all elements of the QML Text component, in particular the "text" * property to define the label text. */ Item { id:labelInputItem property alias labelInputAssembly : labelInput property bool lableBeep: true//add #176279 2017/5/22 ld signal lableTextChanged() signal lableMaxLengthSignal() signal lableSingleClickSignal() signal lableDoubleClickSignal() x:0 y:0 clip: true LabelInput { id: labelInput x:0 y:0 color: "white" verticalAlignment: LabelInput.AlignLeft horizontalAlignment: LabelInput.AlignVCenter width: labelInputItem.width height: labelInputItem.height font.pixelSize:30 //FOD by lishunan for KB start font.family:"Montserrat"//"方正兰亭黑简体" //FOD by lishunan for KB end onXuanzhongClose: { if(labelInput.visible) { systemCtrl.pinyinsreachclear() } } onContentWidthChanged: { // console.log("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ labelInput.contentWidth = "+labelInput.contentWidth) // console.log("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ labelInput.width = "+labelInput.width) if(labelInputItem.width > labelInput.contentWidth) { labelInput.width = labelInputItem.width labelInput.x =0; } else { labelInput.width = labelInput.contentWidth+2 labelInput.x = labelInputItem.width - labelInput.contentWidth-2 } } //add #176279 2017/5/22 ld onSinglePressSignal:{ console.log("lableinput onSinglePressSignal") if (lableBeep) { //console.log("lableinput onSinglePressSignal lableBeep="+lableBeep) systemCtrl.touchBeep(0) } } //add #176279 2017/5/22 ld onSingleClickSignal: { lableSingleClickSignal(); } onDoubleClickSignal: { //lableDoubleClickSignal(); labelInput.selectAllTex = 0; } onMaxLengthSignal: { lableMaxLengthSignal(); } } function setTextInputHandle() { systemCtrl.setTextInputHandle(labelInput); } }