FooterForm.ui.qml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import QtQuick 2.4
  2. import QtQuick.Controls 2.4
  3. import QtQuick.Layouts 1.3
  4. Page {
  5. width: 1280
  6. height: 200
  7. font.capitalization: Font.MixedCase
  8. Connections {
  9. target: _qmlHandler
  10. onLog: {
  11. footerLog.append(new Date().toLocaleTimeString(
  12. Qt.locale("de_DE"), "[hh:mm:ss]\n") + logText)
  13. footerFlickable.contentY = footerLog.height - footerFlickable.height
  14. }
  15. onFooterSetStatus: {
  16. footerStatusText.text = "Status: " + status
  17. }
  18. }
  19. Rectangle {
  20. anchors.fill: parent
  21. color: "#404040"
  22. ColumnLayout {
  23. anchors.fill: parent
  24. RowLayout {
  25. Layout.preferredHeight: 30
  26. Layout.preferredWidth: parent.width
  27. Text {
  28. id: footerStatusText
  29. Layout.preferredHeight: parent.height
  30. Layout.preferredWidth: 1000
  31. color: "#ffffff"
  32. text: qsTr("")
  33. font.pixelSize: 23
  34. }
  35. Button {
  36. id: footerGetStatusButton
  37. Layout.preferredHeight: 30
  38. Layout.preferredWidth: 250
  39. text: qsTr("Get Status")
  40. // @disable-check M223
  41. onClicked: {
  42. footerStatusText.text = ""
  43. // @disable-check M222
  44. _qmlHandler.onFooterGetStatusButton()
  45. }
  46. }
  47. }
  48. Flickable {
  49. id: footerFlickable
  50. flickableDirection: Flickable.VerticalFlick
  51. Layout.preferredHeight: 170
  52. Layout.preferredWidth: parent.width
  53. TextArea.flickable: TextArea {
  54. selectByMouse: true
  55. id: footerLog
  56. readOnly: true
  57. wrapMode: TextArea.Wrap
  58. text: qsTr("")
  59. font.pointSize: 15
  60. }
  61. ScrollBar.vertical: ScrollBar {
  62. }
  63. }
  64. }
  65. }
  66. }