NotificationTemplate.ui.qml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import QtQuick 2.12
  2. import QtQuick.Controls 2.5
  3. import QtQuick.Layouts 1.3
  4. Item {
  5. width: 1250
  6. height: 50
  7. property string notificationDateText
  8. property string notificationMessageText
  9. property int myIndex
  10. RowLayout {
  11. id: rowLayout
  12. anchors.fill: parent
  13. Text {
  14. id: notificationTemplateDateText
  15. Layout.alignment: Qt.AlignCenter
  16. Layout.preferredHeight: parent.height
  17. Layout.preferredWidth: 200
  18. verticalAlignment: Text.AlignVCenter
  19. horizontalAlignment: Text.AlignHLeft
  20. text: notificationDateText
  21. color: "#ffffff"
  22. }
  23. Text {
  24. id: notificationTemplateMessageText
  25. Layout.alignment: Qt.AlignCenter
  26. Layout.preferredHeight: parent.height
  27. Layout.preferredWidth: 800
  28. verticalAlignment: Text.AlignVCenter
  29. horizontalAlignment: Text.AlignHLeft
  30. text: notificationMessageText
  31. color: "#ffffff"
  32. }
  33. Button {
  34. id: notificationTemplateDismissButton
  35. Layout.alignment: Qt.AlignCenter
  36. Layout.preferredHeight: parent.height
  37. Layout.preferredWidth: 50
  38. text: qsTr("X")
  39. // @disable-check M223
  40. onClicked: {
  41. // @disable-check M222
  42. _qmlHandler.onDismissNotificationButton(myIndex)
  43. }
  44. }
  45. }
  46. }