| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- import QtQuick
- import QtQuick.Controls
- import QtQuick.Layouts
- Item {
- id: prompt_info
- x: parent.width / 2 - 175
- y: parent.height / 2 - 175
- width: 350
- height: 350
- visible: false
- property int promptInfoTimeout: 0;
- property string promptInfoText: "";
- property string promptInfoIcon: "";
- property string promptInfoColor: "";
- Connections {
- target: prompt_info
- onPromptInfoTextChanged:
- {
- prompt_info_notice.text = promptInfoText;
- }
- onPromptInfoIconChanged:
- {
- prompt_info_image.source = promptInfoIcon;
- }
- onPromptInfoColorChanged:
- {
- prompt_info_rect.color = promptInfoColor;
- }
- }
- Rectangle {
- id: prompt_info_rect
- anchors.fill: parent
- color: "#66ea3a0e"
- radius: 20
- Column {
- x: 0
- y: 0
- width: 350
- height: 350
- visible: true
- spacing: 30
- padding: 0
- topPadding: 46
- Image {
- id: prompt_info_image
- width: 200
- height: 200
- opacity: 0.5
- anchors.horizontalCenter: parent.horizontalCenter
- source: "qrc:/png/error.png"
- }
- Label {
- id: prompt_info_notice
- width: parent.width
- anchors.horizontalCenter: parent.horizontalCenter
- color: "#9affffff"
- text: qsTr("")
- font.pixelSize: 25
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- wrapMode: Text.WrapAnywhere
- font.bold: true
- }
- }
- }
- Timer {
- interval: 1000
- running: true
- repeat: true
- onTriggered: {
- if(promptInfoTimeout > 0)
- {
- if (prompt_info.visible === false)
- {
- prompt_info.visible = true;
- }
- promptInfoTimeout--;
- }
- else{
- prompt_info.visible = false;
- }
- }
- }
- }
|