NotificationTemplate.ui.qml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. }
  22. Text {
  23. id: notificationTemplateMessageText
  24. Layout.alignment: Qt.AlignCenter
  25. Layout.preferredHeight: parent.height
  26. Layout.preferredWidth: 800
  27. verticalAlignment: Text.AlignVCenter
  28. horizontalAlignment: Text.AlignHLeft
  29. text: notificationMessageText
  30. }
  31. Button {
  32. id: notificationTemplateDismissButton
  33. Layout.alignment: Qt.AlignCenter
  34. Layout.preferredHeight: parent.height
  35. Layout.preferredWidth: 50
  36. text: qsTr("X")
  37. // @disable-check M223
  38. onClicked: {
  39. // @disable-check M222
  40. _qmlHandler.onDismissNotificationButton(myIndex)
  41. }
  42. }
  43. }
  44. }