MenuStatus.qml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import QtQuick 2.5
  2. import QtQuick.Controls 1.4
  3. import Qt.labs.controls 1.0
  4. import QtQuick.Controls.Styles 1.3
  5. import QtGraphicalEffects 1.0
  6. import "qrc:/Globals"
  7. Item {
  8. id: item1
  9. property int buttImgBorder: 20 // in percent of parent.height defaults to 20%
  10. property double itemMargin: height * (buttImgBorder / 200.0)
  11. width: parent.width
  12. height: parent.height / 10.0
  13. x: 0
  14. y: parent.height - height
  15. Rectangle {
  16. anchors.fill: parent
  17. gradient: Gradient {
  18. // GradientStop { position: 0.0; color: "darkgray" }
  19. // GradientStop { position: 1.0; color: "black" }
  20. GradientStop { position: 0.0; color: "darkgray" }
  21. GradientStop { position: 1.0; color: "white" }
  22. }
  23. }
  24. Label {
  25. id: versHMI
  26. text: Globals.versionINFO + " : " + Globals.getActUserRoleText(Globals.actUserRole) //+
  27. //" IN: " + Globals.in1Status + Globals.in2Status + Globals.in3Status + Globals.in4Status
  28. anchors.verticalCenter: parent.verticalCenter
  29. font.pointSize: 10
  30. anchors.left: parent.left
  31. anchors.leftMargin: 5
  32. }
  33. Text {
  34. anchors.right: parent.right
  35. anchors.top: parent.top
  36. anchors.topMargin: (parent.height - font.pixelSize) / 2
  37. color: "white"
  38. text : ""
  39. font.pixelSize: 22
  40. Timer {
  41. interval: 500
  42. running: true
  43. repeat: true
  44. triggeredOnStart: true
  45. onTriggered: {
  46. // parent.text = Qt.formatDateTime(new Date(),Qt.DefaultLocaleShortDate) + " ";
  47. parent.text = Qt.formatDateTime(new Date(),Qt.DefaultLocaleLongDate) + " ";
  48. }
  49. }
  50. }
  51. }