ConfigUI.qml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. // Copyright (c) 2015 Ultimaker B.V.
  2. // Cura is released under the terms of the AGPLv3 or higher.
  3. import QtQuick 2.1
  4. import QtQuick.Controls 1.1
  5. import QtQuick.Layouts 1.1
  6. import QtQuick.Window 2.1
  7. import UM 1.1 as UM
  8. UM.Dialog
  9. {
  10. width: 350 * Screen.devicePixelRatio;
  11. minimumWidth: 350 * Screen.devicePixelRatio;
  12. maximumWidth: 350 * Screen.devicePixelRatio;
  13. height: 250 * Screen.devicePixelRatio;
  14. minimumHeight: 250 * Screen.devicePixelRatio;
  15. maximumHeight: 250 * Screen.devicePixelRatio;
  16. title: catalog.i18nc("@title:window", "Convert Image...")
  17. GridLayout
  18. {
  19. UM.I18nCatalog{id: catalog; name:"cura"}
  20. anchors.fill: parent;
  21. Layout.fillWidth: true
  22. columnSpacing: 16
  23. rowSpacing: 4
  24. columns: 1
  25. UM.TooltipArea {
  26. Layout.fillWidth:true
  27. height: childrenRect.height
  28. text: catalog.i18nc("@info:tooltip","The maximum distance of each pixel from \"Base.\"")
  29. Row {
  30. width: parent.width
  31. Label {
  32. text: catalog.i18nc("@action:label","Height (mm)")
  33. width: 150
  34. anchors.verticalCenter: parent.verticalCenter
  35. }
  36. TextField {
  37. id: peak_height
  38. objectName: "Peak_Height"
  39. validator: DoubleValidator {notation: DoubleValidator.StandardNotation; bottom: -500; top: 500;}
  40. width: 180
  41. onTextChanged: { manager.onPeakHeightChanged(text) }
  42. }
  43. }
  44. }
  45. UM.TooltipArea {
  46. Layout.fillWidth:true
  47. height: childrenRect.height
  48. text: catalog.i18nc("@info:tooltip","The base height from the build plate in millimeters.")
  49. Row {
  50. width: parent.width
  51. Label {
  52. text: catalog.i18nc("@action:label","Base (mm)")
  53. width: 150
  54. anchors.verticalCenter: parent.verticalCenter
  55. }
  56. TextField {
  57. id: base_height
  58. objectName: "Base_Height"
  59. validator: DoubleValidator {notation: DoubleValidator.StandardNotation; bottom: 0; top: 500;}
  60. width: 180
  61. onTextChanged: { manager.onBaseHeightChanged(text) }
  62. }
  63. }
  64. }
  65. UM.TooltipArea {
  66. Layout.fillWidth:true
  67. height: childrenRect.height
  68. text: catalog.i18nc("@info:tooltip","The width in millimeters on the build plate.")
  69. Row {
  70. width: parent.width
  71. Label {
  72. text: catalog.i18nc("@action:label","Width (mm)")
  73. width: 150
  74. anchors.verticalCenter: parent.verticalCenter
  75. }
  76. TextField {
  77. id: width
  78. objectName: "Width"
  79. focus: true
  80. validator: DoubleValidator {notation: DoubleValidator.StandardNotation; bottom: 1; top: 500;}
  81. width: 180
  82. onTextChanged: { manager.onWidthChanged(text) }
  83. }
  84. }
  85. }
  86. UM.TooltipArea {
  87. Layout.fillWidth:true
  88. height: childrenRect.height
  89. text: catalog.i18nc("@info:tooltip","The depth in millimeters on the build plate")
  90. Row {
  91. width: parent.width
  92. Label {
  93. text: catalog.i18nc("@action:label","Depth (mm)")
  94. width: 150
  95. anchors.verticalCenter: parent.verticalCenter
  96. }
  97. TextField {
  98. id: depth
  99. objectName: "Depth"
  100. focus: true
  101. validator: DoubleValidator {notation: DoubleValidator.StandardNotation; bottom: 1; top: 500;}
  102. width: 180
  103. onTextChanged: { manager.onDepthChanged(text) }
  104. }
  105. }
  106. }
  107. UM.TooltipArea {
  108. Layout.fillWidth:true
  109. height: childrenRect.height
  110. text: catalog.i18nc("@info:tooltip","By default, white pixels represent high points on the mesh and black pixels represent low points on the mesh. Change this option to reverse the behavior such that black pixels represent high points on the mesh and white pixels represent low points on the mesh.")
  111. Row {
  112. width: parent.width
  113. //Empty label so 2 column layout works.
  114. Label {
  115. text: ""
  116. width: 150
  117. anchors.verticalCenter: parent.verticalCenter
  118. }
  119. ComboBox {
  120. id: image_color_invert
  121. objectName: "Image_Color_Invert"
  122. model: [ catalog.i18nc("@item:inlistbox","Lighter is higher"), catalog.i18nc("@item:inlistbox","Darker is higher") ]
  123. width: 180
  124. onCurrentIndexChanged: { manager.onImageColorInvertChanged(currentIndex) }
  125. }
  126. }
  127. }
  128. UM.TooltipArea {
  129. Layout.fillWidth:true
  130. height: childrenRect.height
  131. text: catalog.i18nc("@info:tooltip","The amount of smoothing to apply to the image.")
  132. Row {
  133. width: parent.width
  134. Label {
  135. text: catalog.i18nc("@action:label","Smoothing")
  136. width: 150
  137. anchors.verticalCenter: parent.verticalCenter
  138. }
  139. Rectangle {
  140. width: 180
  141. height: 20
  142. Layout.fillWidth:true
  143. color: "transparent"
  144. Slider {
  145. id: smoothing
  146. objectName: "Smoothing"
  147. maximumValue: 100.0
  148. stepSize: 1.0
  149. width: 180
  150. onValueChanged: { manager.onSmoothingChanged(value) }
  151. }
  152. }
  153. }
  154. }
  155. }
  156. rightButtons: [
  157. Button
  158. {
  159. id:ok_button
  160. text: catalog.i18nc("@action:button","OK");
  161. onClicked: { manager.onOkButtonClicked() }
  162. enabled: true
  163. },
  164. Button
  165. {
  166. id:cancel_button
  167. text: catalog.i18nc("@action:button","Cancel");
  168. onClicked: { manager.onCancelButtonClicked() }
  169. enabled: true
  170. }
  171. ]
  172. }