Implemented a screen displaying the history of operations with the board. Added dialogs for displaying messages and statuses

This commit is contained in:
Yury Shuvakin
2022-08-26 07:34:04 +03:00
parent 79518df613
commit 6ae4386b37
18 changed files with 535 additions and 61 deletions

View File

@@ -0,0 +1,65 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import Controls 1.0 as Controls
import Utils 1.0
Dialog {
id: root
width: 500
height: 350
modal: true
closePolicy: Popup.CloseOnEscape
bottomPadding: 0
property string description: ""
property bool good: true
header: Controls.DialogHeader {
dialog: root
}
contentItem: ColumnLayout {
spacing: 20
RowLayout {
spacing: 20
Image {
source: good ? "qrc:/Icons/info.svg" : "qrc:/Icons/warning.svg"
sourceSize.width: 52
sourceSize.height: 48
}
Controls.SubtitleLabel {
text: root.description
maximumLineCount: 10
wrapMode: Text.Wrap
Layout.fillWidth: true
}
Layout.fillWidth: true
Layout.fillHeight: true
}
RowLayout {
Controls.Button {
text: qsTr("Ok")
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: 100
onClicked: root.close()
}
Layout.alignment: Qt.AlignCenter
Layout.fillWidth: true
}
}
background: Controls.DialogBackground {}
onVisibleChanged: {
x = Qt.binding(function() { return (parent.width - width) / 2})
y = Qt.binding(function() { return (parent.height - height) / 2})
}
}