ConfigUI.qml 6.6 KB

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