71 lines
2 KiB
QML
71 lines
2 KiB
QML
import QtQuick 2.9
|
|
import QtMultimedia 5.8
|
|
import QtQuick.Window 2.2
|
|
import QtQuick.Controls 2.2
|
|
|
|
Dialog {
|
|
|
|
x: startButt.x
|
|
y: startButt.y
|
|
width: startButt.width
|
|
height: startButt.height
|
|
modal: false
|
|
enabled: false
|
|
|
|
enter: Transition {
|
|
NumberAnimation { properties: "scale"; from: 0; to: 1; duration: 500; easing.type: Easing.InCubic }
|
|
}
|
|
|
|
exit: Transition {
|
|
NumberAnimation { properties: "scale"; from: 1; to: 0; duration: 500; easing.type: Easing.OutCubic }
|
|
}
|
|
|
|
|
|
background: Rectangle {
|
|
radius: width * 0.5
|
|
color: "white"
|
|
border.color: "grey"
|
|
border.width: 1
|
|
Label {
|
|
text: "Options"
|
|
font.pixelSize: headlineUnderline.width * 0.1
|
|
anchors {
|
|
horizontalCenter: parent.horizontalCenter
|
|
top: parent.top
|
|
topMargin: headlineUnderline.anchors.topMargin / 2 - height / 2
|
|
}
|
|
}
|
|
|
|
Rectangle {
|
|
id: headlineUnderline
|
|
height: 1
|
|
width: parent.width
|
|
color: "grey"
|
|
anchors {
|
|
top: parent.top
|
|
left: parent.left
|
|
right: parent.right
|
|
topMargin: parent.height * 0.15
|
|
rightMargin: parent.radius - Math.sqrt(Math.pow(parent.radius,2)-Math.pow(parent.radius-anchors.topMargin,2))
|
|
leftMargin: parent.radius - Math.sqrt(Math.pow(parent.radius,2)-Math.pow(parent.radius-anchors.topMargin,2))
|
|
}
|
|
}
|
|
}
|
|
Column {
|
|
anchors.fill: parent
|
|
|
|
ItemDelegate {
|
|
id: connect_del
|
|
anchors.fill: parent
|
|
text: "connect"
|
|
onClicked: {
|
|
// connect_del.enabled = false
|
|
// connect_del.text = _cppBuzzerConn.get("offset")
|
|
// _cppBuzzerConn.connect()
|
|
// connect_del.enabled = true
|
|
connect_del.text = _cppBuzzerConn.test()
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|