import QtQuick 2.3import'qrc:/UI/Control'as Control
ButtonBase {id: root
property alias bg: bg.children
property alias icon: icon
property alias source: icon.source
property alias mipmap : icon.mipmap
property alias asynchronous: icon.asynchronous
property alias textArea: text
property alias text: text.text
property alias font: text.font
property alias textColor: text.color
property alias antialiasing: text.antialiasing
property alias renderType: text.renderType
Item {id: bg
anchors.fill: parent
}
Image {id: icon
anchors.fill: parent
fillMode: Image.PreserveAspectFit
visible: status === Image.Ready
antialiasing:truesource: source
}
Control.NonAnimationText {id: text
anchors.centerIn: root
visible: text !==''}}
ButtonBase.qml
import QtQuick 2.3import QtQuick.Controls 1.2import'qrc:/UI/Control'as Control
Item {id: root
property bool interactive:true
property real scaleRatio:0.95
property bool longPressEnabled:false
property int longPressInterval:800
property bool pressing:false
property bool checked:false
property bool longPressing:false
property bool touchIn:true
property bool usingOnClicked:false
property bool scaleAnimation:false/*!
This is whether the attribute should block invalid beep corresponding
\c: default is true
*/
property bool exclusiveBeep:true
property ExclusiveGroup exclusiveGroup
signal clicked
signal doubleClicked
signal longPressed
signal pressed
signal released
signal canceled
signal checked
onExclusiveGroupChanged: exclusiveGroup && exclusiveGroup.bindCheckable(root)// filter beeponClicked:if(exclusiveBeep)(global.get('Button.onClicked')||function(){})()scale:(scaleAnimation && pressing)? scaleRatio :1.0
Binding {target: root
property:'state'value: pressing ?(longPressing ?(checked ?'checkedLongPressing':'longPressing'):(checked ?'checkedPressing':'pressing')):(activeFocus ?'focusing':(!enabled ?'disabled':(checked ?'checkedNormal':'normal')))}
Connections {target: mouseArea
onDoubleClicked:doubleClicked()onPressed:{
touchIn =true
pressing =truepressed()
longPressTimer.start()}onReleased:{
longPressTimer.stop()released()if(!longPressing && touchIn &&!usingOnClicked)clicked()
pressing =false}onClicked:{if(!longPressing && touchIn && usingOnClicked)clicked()
longPressing =false}onCanceled:{
longPressTimer.stop()canceled()
longPressing = pressing =false}onExited:{
longPressing = touchIn =false}}
Control.MouseArea {id: mouseArea
enabled: root.enabled && root.interactive
anchors.fill: parent
}
Timer {id: longPressTimer
interval: longPressInterval
onTriggered:{
longPressing =trueif(longPressEnabled)longPressed()}}}
import QtQuick 2.3
Button {id: root
property alias bgRect : bgRect
property alias bgOpacity : bgRect.opacity
property alias bgRadius : bgRect.radius
property alias bgBorder : bgRect.border
property alias bgPasters : bgRect.pasters
property alias bgBorderRect: bgRect.borderRect
property alias normalImages : bgRect.normalImages
property alias pressingImages : bgRect.pressingImages
property alias longPressingImages : bgRect.longPressingImages
property alias checkedNormalImages : bgRect.checkedNormalImages
property alias checkedPressingImages : bgRect.checkedPressingImages
property alias checkedLongPressingImages: bgRect.checkedLongPressingImages
property alias focusingImages : bgRect.focusingImages
property alias disabledImages : bgRect.disabledImages
bg: ButtonStateImage {id: bgRect
anchors.fill: parent
target: root
}}
Input.qml
import QtQuick 2.3importA71.0import'qrc:/UI/Control'as Control
Rectangle {id: root
height:62color:'transparent'radius:5
property string inputTextColor: inputCursorColor
property string inputCursorColor:inputTextColor //main.res('radio.main.frequency.color')// property alias searchIcon: searchIcon.source
property alias defaultText: defaultText.text
property alias text: inputText.text
property alias inputArea: inputText
property alias textLength: inputText.length
property alias deleteButton: deleteButton
// property alias finishButton: finishButton// property alias finishVisible: finishButton.visible
property alias deleteVisible: deleteButton.visible
signal finishInput
signal inputFocusChanged(var focus)
property varinputBreak:(function(){})functioninput(text){if(inputBreak(inputText.text, text))return
inputText.cursorVisible =true
inputText.remove(inputText.selectionStart, inputText.selectionEnd)
inputText.insert(inputText.cursorPosition, text)
inputText.deselect()}functionreset(){
inputText.text =''
inputText.cursorVisible =false
inputText.deselect()}functiondeleteText(){if(inputText.text ==='')returnif(inputText.selectedText ===''){
inputText.remove(inputText.cursorPosition -1,
inputText.cursorPosition)}else inputText.remove(inputText.selectionStart, inputText.selectionEnd)
inputText.deselect()}functiondeleteTextAll(){
inputText.remove(0, inputText.cursorPosition)}
Control.NonAnimationText {id: defaultText
//anchors.verticalCenter: parent.verticalCenter
font.pixelSize:32opacity:0.5visible:(text !=='')&&(inputText.text ==='')}
TextInput {id: inputText
height: defaultText.height
width:302
anchors {left: parent.left
}
font {family: defaultText.font.family
pixelSize: defaultText.font.pixelSize
}clip:truecolor: root.inputTextColor
//anchors.verticalCenter: parent.verticalCentercursorVisible:truefocus:truehorizontalAlignment: TextInput.AlignLeft
selectByMouse:trueactiveFocusOnPress:trueonFocusChanged: root.inputFocusChanged(focus)}
Control.IconButton {id: deleteButton
width:62height:62
anchors {left: inputText.right
verticalCenter: parent.verticalCenter
}normalIcon: main.res('keyboard.btn.delete.nor')pressingIcon: normalIcon//main.res('bluetooth.dial.del.press')scaleAnimation:truevisible:true;onClicked:{deleteText()}onLongPressed:{deleteTextAll()}}}
KeyboardNumber.qml
import QtQuick 2.3importA71.0
Grid {id: root
anchors.left :parent.left
anchors.leftMargin:350rows:4rowSpacing:2columns:5columnSpacing:6
signal pressed(int index, bool pressing)
signal clicked(int index, string text)
signal back
signal sure
signal symbolClicked
signal backspace
signal clearInputOne
signal clearInput
Repeater {model:['/','1','2','3','<-','+','4','5','6','.','-','7','8','9','%','?!#','<<','0',' ','sure']
PushButton {width:120height:68
font.pixelSize:38
Component.onCompleted:{switch(modelData){case'<-': source = main.res('keyboard.btn.delete.nor');breakcase' ': source ='';breakcase'<<': text = main.tr('Keyboard.button.back');breakcase'sure': text = main.tr('Keyboard.button.sure');breakdefault: text = modelData;break}}onPressingChanged: root.pressed(index, pressing)onClicked:{var ent = text
switch(modelData){case'<-': root.clearInputOne();breakcase'?!#': root.symbolClicked();breakcase'<<': root.back();breakcase'sure': root.sure();breakcase' ': ent =' 'default:
root.clicked(index, ent)break}}onLongPressed:{if(modelData ==='<-') root.clearInput()}}}}
需要导出我的SQL Server 的数据库文件,由于我使用的Hostease的Windows虚拟主机产品默认带普通用户权限的Plesk面板,但是不知道如何在Plesk上操作导出,因为也是对于Hostease主机产品不是很了解,因此联系Hostease的咨询了Hostease技…
引言
今天带来思维链论文 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models的笔记。
作者探索了如何通过生成一系列中间推理步骤的思维链,显著提升大型语言模型在进行复杂推理时的能力。
1 总体介绍
语言模型的规模扩大已被证明能够带来…
一、条件装配的作用是什么
条件装配是 Spring 框架中一个强大的特性,使得开发者能够创建更加灵活和可维护的应用程序。在 Spring Boot 中,这个特性被大量用于自动配置,极大地简化了基于 Spring 的应用开发。 二、条件装配注解
<dependen…