Advertisement
Guest User

Untitled

a guest
Jul 15th, 2011
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. import QtQuick 1.1
  2. import com.meego 1.0
  3.  
  4. Sheet { // TODO: make this work on portrait
  5. id: settingsSheet
  6. acceptButtonText: "Save"
  7. rejectButtonText: ""
  8.  
  9. content: Flickable {
  10. anchors.fill: parent
  11. anchors.leftMargin: 10
  12. anchors.topMargin: 10
  13. flickableDirection: Flickable.VerticalFlick
  14.  
  15. Column {
  16. anchors.top: parent.top
  17. anchors.fill: parent
  18. spacing: 10
  19.  
  20. CheckBox {
  21. id: askQuitCheckBox
  22. text: "Ask before quitting"
  23. checked: appSettings.askQuit
  24. }
  25. Binding {
  26. target: appSettings
  27. property: "askQuit"
  28. value: askQuitCheckBox.checked
  29. }
  30.  
  31. CheckBox {
  32. id: autoSaveOnQuitCheckBox
  33. text: "Preserve state when you quit"
  34. checked: appSettings.autoSaveOnQuit
  35. }
  36. Binding {
  37. target: appSettings
  38. property: "autoSaveOnQuit"
  39. value: autoSaveOnQuitCheckBox.checked
  40. }
  41.  
  42. Label {
  43. text: "Number of rows"
  44. }
  45. Slider {
  46. id: rowsSlider
  47. minimumValue: 1
  48. maximumValue: 10
  49. value: appSettings.rows
  50. stepSize: 1
  51. valueIndicatorVisible: true
  52. }
  53. Binding {
  54. target: appSettings
  55. property: "rows"
  56. value: rowsSlider.value
  57. }
  58.  
  59. Label {
  60. text: "Number of columns"
  61. }
  62. Slider {
  63. id: columnsSlider
  64. minimumValue: 1
  65. maximumValue: 10
  66. value: appSettings.columns
  67. stepSize: 1
  68. valueIndicatorVisible: true
  69. }
  70. Binding {
  71. target: appSettings
  72. property: "columns"
  73. value: columnsSlider.value
  74. }
  75. }
  76. }
  77. onAccepted: {} // TODO
  78. onRejected: {} // TODO
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement