main.qml 909 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 bool viewItemCount: false
  17. }
  18. Rectangle {
  19. focus: true
  20. color: "black"
  21. anchors.fill: parent
  22. Keys.forwardTo: [punk, toplevelhandler]
  23. Gravity {
  24. // TODO: generalize all this
  25. id: punk
  26. }
  27. }
  28. Rectangle {
  29. id: toplevelhandler
  30. focus: true
  31. Keys.onLeftPressed: settings.columnCount = Math.max(settings.columnCount-1,1)
  32. Keys.onRightPressed: settings.columnCount++
  33. }
  34. Component.onCompleted: showFullScreen()
  35. }