阻抗界面
This commit is contained in:
parent
fa195e72ce
commit
7a89d7f423
292
ZBD_IIIDL_S_Project/DependFile/QML/PopImpedance.qml
Normal file
292
ZBD_IIIDL_S_Project/DependFile/QML/PopImpedance.qml
Normal file
@ -0,0 +1,292 @@
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.0
|
||||
|
||||
Popup {
|
||||
id: impedancePopup // 弹出窗口的唯一标识
|
||||
x:510
|
||||
y:80
|
||||
|
||||
property string red: "#EE6352"
|
||||
property string green: "#41B962"
|
||||
property string yellow: "#F8C434"
|
||||
|
||||
function show() {
|
||||
impedancePopup.visible = true;
|
||||
hitTimer.start()
|
||||
}
|
||||
function colorChange(index,color) {
|
||||
|
||||
switch(index) {
|
||||
case 1:
|
||||
radius1.color=color
|
||||
break;
|
||||
case 2:
|
||||
radius2.color=color
|
||||
break;
|
||||
case 3:
|
||||
radius3.color=color
|
||||
break;
|
||||
case 4:
|
||||
radius4.color=color
|
||||
break;
|
||||
case 5:
|
||||
radius5.color=color
|
||||
break;
|
||||
case 6:
|
||||
radius6.color=color
|
||||
break;
|
||||
case 7:
|
||||
radius7.color=color
|
||||
break;
|
||||
case 8:
|
||||
radius8.color=color
|
||||
break;
|
||||
case 9:
|
||||
radius9.color=color
|
||||
break;
|
||||
case 10:
|
||||
radius10.color=color
|
||||
break;
|
||||
}
|
||||
}
|
||||
width: bgRect.width
|
||||
height: bgRect.height
|
||||
|
||||
background: Item {
|
||||
implicitWidth: bgRect.width
|
||||
implicitHeight: bgRect.height
|
||||
}
|
||||
|
||||
|
||||
modal: true
|
||||
focus: true
|
||||
closePolicy: /*Popup.CloseOnEscape | */Popup.CloseOnPressOutsideParent
|
||||
|
||||
// 弹出窗口的内容项
|
||||
Rectangle
|
||||
{
|
||||
id: bgRect
|
||||
width: 900
|
||||
height: 720
|
||||
radius: 20
|
||||
x:0
|
||||
y:0
|
||||
color: "#FFFFFF" // 设置矩形的背景颜色
|
||||
// 文本显示在矩形中
|
||||
//标题
|
||||
Rectangle {
|
||||
id: titleRect
|
||||
width: parent.width
|
||||
height: 120
|
||||
color: "#F5F7F9"
|
||||
radius: parent.radius
|
||||
|
||||
Text {
|
||||
id: titleText
|
||||
color: "#333333"
|
||||
font.pixelSize: 24
|
||||
text: qsTr("阻抗")
|
||||
font.weight: Font.Bold
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 30
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
z:2
|
||||
}
|
||||
|
||||
Image {
|
||||
id: closeImg
|
||||
source: "qrc:DependFile/Source/dialog/close.png"
|
||||
sourceSize: Qt.size(34,34)
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 50
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
impedancePopup.visible = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Rectangle {
|
||||
id: buttonRect
|
||||
x:0
|
||||
y:100
|
||||
width: parent.width
|
||||
height: 600
|
||||
color: "#FFFFFF"
|
||||
Text {
|
||||
id: buttonText
|
||||
color: "#666666"
|
||||
font.pixelSize: 20
|
||||
text: qsTr("请保存安静,正在进行阻抗检测")
|
||||
y:44
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
z:2
|
||||
}
|
||||
Image {
|
||||
id: impedanceImg
|
||||
source: "qrc:/DependFile/Source/brainTrain/popup_Z_bg.png"
|
||||
sourceSize: Qt.size(602,290)
|
||||
y:114
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
Rectangle {
|
||||
id: radius1
|
||||
x:230
|
||||
y:170
|
||||
width: 32
|
||||
height: 32
|
||||
radius: 16
|
||||
color: red
|
||||
}
|
||||
Rectangle {
|
||||
id: radius2
|
||||
x:320
|
||||
y:180
|
||||
width: 32
|
||||
height: 32
|
||||
radius: 16
|
||||
color: red
|
||||
}
|
||||
Rectangle {
|
||||
id: radius3
|
||||
x:434
|
||||
y:167
|
||||
width: 32
|
||||
height: 32
|
||||
radius: 16
|
||||
color: red
|
||||
}
|
||||
Rectangle {
|
||||
id: radius4
|
||||
x:548
|
||||
y:180
|
||||
width: 32
|
||||
height: 32
|
||||
radius: 16
|
||||
color: red
|
||||
}
|
||||
Rectangle {
|
||||
id: radius5
|
||||
x:646
|
||||
y:167
|
||||
width: 32
|
||||
height: 32
|
||||
radius: 16
|
||||
color: red
|
||||
}
|
||||
Rectangle {
|
||||
id: radius6
|
||||
x:213
|
||||
y:310
|
||||
width: 32
|
||||
height: 32
|
||||
radius: 16
|
||||
color: red
|
||||
}
|
||||
Rectangle {
|
||||
id: radius7
|
||||
x:340
|
||||
y:300
|
||||
width: 32
|
||||
height: 32
|
||||
radius: 16
|
||||
color: red
|
||||
}
|
||||
Rectangle {
|
||||
id: radius8
|
||||
x:434
|
||||
y:308
|
||||
width: 32
|
||||
height: 32
|
||||
radius: 16
|
||||
color: red
|
||||
}
|
||||
Rectangle {
|
||||
id: radius9
|
||||
x:526
|
||||
y:300
|
||||
width: 32
|
||||
height: 32
|
||||
radius: 16
|
||||
color: red
|
||||
}
|
||||
Rectangle {
|
||||
id: radius10
|
||||
x:655
|
||||
y:310
|
||||
width: 32
|
||||
height: 32
|
||||
radius: 16
|
||||
color: red
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Rectangle {
|
||||
id: cancel
|
||||
x:270
|
||||
y:600
|
||||
width: 160
|
||||
height: 64
|
||||
color: "#FFFFFF"
|
||||
border.color: "#0D9DDB"
|
||||
border.width:1
|
||||
radius:8
|
||||
Text {
|
||||
id: cancelText
|
||||
color: "#0D9DDB"
|
||||
font.pixelSize: 28
|
||||
font.weight: Font.Bold
|
||||
text: qsTr("取消")
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
z:2
|
||||
}
|
||||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
impedancePopup.visible = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
id: confirm
|
||||
x:470
|
||||
y:600
|
||||
width: 160
|
||||
height: 64
|
||||
color: "#0D9DDB"
|
||||
radius:8
|
||||
Text {
|
||||
id: confirmText
|
||||
color: "#FFFFFF"
|
||||
font.pixelSize: 28
|
||||
font.weight: Font.Bold
|
||||
text: qsTr("确定")
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
z:2
|
||||
}
|
||||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
impedancePopup.visible = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -877,12 +877,21 @@ Item {
|
||||
{
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
popimpedance.show()
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
PopImpedance{
|
||||
id:popimpedance
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,161 +0,0 @@
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.0
|
||||
|
||||
Popup {
|
||||
id: popup // 弹出窗口的唯一标识
|
||||
x:510
|
||||
y:80
|
||||
|
||||
|
||||
function show() {
|
||||
popup.visible = true;
|
||||
}
|
||||
width: bgRect.width
|
||||
height: bgRect.height
|
||||
|
||||
background: Item {
|
||||
implicitWidth: bgRect.width
|
||||
implicitHeight: bgRect.height
|
||||
}
|
||||
|
||||
|
||||
modal: true
|
||||
focus: true
|
||||
closePolicy: /*Popup.CloseOnEscape | */Popup.CloseOnPressOutsideParent
|
||||
|
||||
// 弹出窗口的内容项
|
||||
Rectangle
|
||||
{
|
||||
id: bgRect
|
||||
width: 900
|
||||
height: 720
|
||||
radius: 20
|
||||
x:0
|
||||
y:0
|
||||
color: "#FFFFFF" // 设置矩形的背景颜色
|
||||
// 文本显示在矩形中
|
||||
//标题
|
||||
Rectangle {
|
||||
id: titleRect
|
||||
width: parent.width
|
||||
height: 120
|
||||
color: "#F5F7F9"
|
||||
radius: parent.radius
|
||||
|
||||
Text {
|
||||
id: titleText
|
||||
color: "#333333"
|
||||
font.pixelSize: 24
|
||||
text: qsTr("阻抗")
|
||||
font.weight: Font.Bold
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 30
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
z:2
|
||||
}
|
||||
|
||||
Image {
|
||||
id: closeImg
|
||||
source: "qrc:DependFile/Source/dialog/close.png"
|
||||
sourceSize: Qt.size(34,34)
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 50
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
popup.visible = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Rectangle {
|
||||
id: buttonRect
|
||||
x:0
|
||||
y:100
|
||||
width: parent.width
|
||||
height: 600
|
||||
color: "#FFFFFF"
|
||||
Text {
|
||||
id: buttonText
|
||||
color: "#666666"
|
||||
font.pixelSize: 20
|
||||
text: qsTr("请保存安静,正在进行阻抗检测")
|
||||
y:44
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
z:2
|
||||
}
|
||||
Image {
|
||||
id: impedanceImg
|
||||
source: "qrc:/DependFile/Source/brainTrain/popup_Z_bg.png"
|
||||
sourceSize: Qt.size(602,290)
|
||||
y:114
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Rectangle {
|
||||
id: cancel
|
||||
x:270
|
||||
y:600
|
||||
width: 160
|
||||
height: 64
|
||||
color: "#FFFFFF"
|
||||
border.color: "#0D9DDB"
|
||||
border.width:1
|
||||
radius:8
|
||||
Text {
|
||||
id: cancelText
|
||||
color: "#0D9DDB"
|
||||
font.pixelSize: 28
|
||||
font.weight: Font.Bold
|
||||
text: qsTr("取消")
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
z:2
|
||||
}
|
||||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
popup.visible = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
id: confirm
|
||||
x:470
|
||||
y:600
|
||||
width: 160
|
||||
height: 64
|
||||
color: "#0D9DDB"
|
||||
radius:8
|
||||
Text {
|
||||
id: confirmText
|
||||
color: "#FFFFFF"
|
||||
font.pixelSize: 28
|
||||
font.weight: Font.Bold
|
||||
text: qsTr("确定")
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
z:2
|
||||
}
|
||||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
popup.visible = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -289,6 +289,6 @@
|
||||
<file>DependFile/Source/brainTrain/upTest3/upper_stretch_R16.png</file>
|
||||
<file>DependFile/Source/brainTrain/popup_Z_bg.png</file>
|
||||
<file>DependFile/Source/brainTrain/btn_Z.png</file>
|
||||
<file>DependFile/QML/impedanceDialog.qml</file>
|
||||
<file>DependFile/QML/PopImpedance.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Loading…
x
Reference in New Issue
Block a user