main.qml 957 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import QtQuick 2.5
  2. import QtQuick.Window 2.2
  3. import Qt.labs.settings 1.0
  4. Window {
  5. id: appWindow
  6. //visibility: Window.FullScreen
  7. visible: true
  8. width: 1024
  9. height: 768
  10. Settings {
  11. id: settings
  12. property int columnCount: 30
  13. property int interval: 30
  14. property bool fitByHeight: false
  15. property double pace: 1.0
  16. property double columnBufferFactor: 1.2
  17. property bool viewItemCount: false
  18. }
  19. Rectangle {
  20. focus: true
  21. color: "black"
  22. anchors.fill: parent
  23. Keys.forwardTo: [punk, toplevelhandler]
  24. Gravity {
  25. // TODO: generalize all this
  26. id: punk
  27. }
  28. }
  29. Rectangle {
  30. id: toplevelhandler
  31. focus: true
  32. Keys.onLeftPressed: settings.columnCount = Math.max(settings.columnCount-1,1)
  33. Keys.onRightPressed: settings.columnCount++
  34. }
  35. Component.onCompleted: showFullScreen()
  36. }