123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- import QtQuick 2.12
- import QtQuick.Controls 2.5
- import QtQuick.Layouts 1.3
- Item {
- width: 1250
- height: 50
- property string fileNameText: "Name Placeholder"
- property string fileSizeText: "Size Placeholder"
- property string fileDecryptableText: "Decryptable Placeholder"
- property bool fileExists: false
- Connections {
- target: _qmlHandler
- onReceivingDisableDownloadButton: {
- if (fileNameText == fileName) {
- fileExists = true
- }
- }
- onReceivingCloseConfirmDeletePopup: {
- confirmDeletePopup.close()
- }
- }
- RowLayout {
- id: rowLayout
- anchors.fill: parent
- Text {
- id: fileTemplateFileName
- Layout.alignment: Qt.AlignCenter
- Layout.preferredHeight: parent.height
- Layout.preferredWidth: 400
- verticalAlignment: Text.AlignVCenter
- text: fileNameText
- color: "#ffffff"
- }
- Text {
- id: fileTemplateFileSize
- Layout.alignment: Qt.AlignCenter
- Layout.preferredHeight: parent.height
- Layout.preferredWidth: 200
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- text: fileSizeText
- color: "#ffffff"
- }
- Text {
- id: fileTemplateFileDecryptable
- Layout.alignment: Qt.AlignCenter
- Layout.preferredHeight: parent.height
- Layout.preferredWidth: 200
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- text: fileDecryptableText
- color: "#ffffff"
- }
- Button {
- id: fileTemplateDownloadButton
- Layout.alignment: Qt.AlignCenter
- Layout.preferredHeight: parent.height
- Layout.preferredWidth: 200
- enabled: !fileExists
- text: fileExists ? qsTr("Already Downloaded") : qsTr("Download")
- onClicked: _qmlHandler.onReceivingDownloadFileButton(fileNameText)
- }
- Button {
- id: fileTemplateDeleteButton
- Layout.alignment: Qt.AlignCenter
- Layout.preferredHeight: parent.height
- Layout.preferredWidth: 200
- text: qsTr("Delete from server")
- onClicked: confirmDeletePopup.open()
- }
- }
- ReceivingFileTemplateDeletePopup {
- id: confirmDeletePopup
- }
- }
|