GeneralPage.qml 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955
  1. // Copyright (c) 2022 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.10
  4. import QtQuick.Controls 1.1
  5. import QtQuick.Layouts 1.1
  6. import QtQuick.Controls.Styles 1.1
  7. import QtQuick.Controls 2.3 as NewControls
  8. import UM 1.1 as UM
  9. import Cura 1.1 as Cura
  10. UM.PreferencesPage
  11. {
  12. //: General configuration page title
  13. title: catalog.i18nc("@title:tab", "General")
  14. id: generalPreferencesPage
  15. width: parent.width
  16. function setDefaultLanguage(languageCode)
  17. {
  18. //loops through the languageList and sets the language using the languageCode
  19. for(var i = 0; i < languageList.count; i++)
  20. {
  21. if (languageComboBox.model.get(i).code == languageCode)
  22. {
  23. languageComboBox.currentIndex = i
  24. }
  25. }
  26. }
  27. function setDefaultTheme(defaultThemeCode)
  28. {
  29. for(var i = 0; i < themeList.count; i++)
  30. {
  31. if (themeComboBox.model.get(i).code == defaultThemeCode)
  32. {
  33. themeComboBox.currentIndex = i
  34. }
  35. }
  36. }
  37. function setDefaultDiscardOrKeepProfile(code)
  38. {
  39. for (var i = 0; i < choiceOnProfileOverrideDropDownButton.model.count; i++)
  40. {
  41. if (choiceOnProfileOverrideDropDownButton.model.get(i).code == code)
  42. {
  43. choiceOnProfileOverrideDropDownButton.currentIndex = i;
  44. break;
  45. }
  46. }
  47. }
  48. function setDefaultOpenProjectOption(code)
  49. {
  50. for (var i = 0; i < choiceOnOpenProjectDropDownButton.model.count; ++i)
  51. {
  52. if (choiceOnOpenProjectDropDownButton.model.get(i).code == code)
  53. {
  54. choiceOnOpenProjectDropDownButton.currentIndex = i
  55. break;
  56. }
  57. }
  58. }
  59. function reset()
  60. {
  61. UM.Preferences.resetPreference("general/language")
  62. var defaultLanguage = UM.Preferences.getValue("general/language")
  63. setDefaultLanguage(defaultLanguage)
  64. UM.Preferences.resetPreference("general/theme")
  65. var defaultTheme = UM.Preferences.getValue("general/theme")
  66. setDefaultTheme(defaultTheme)
  67. UM.Preferences.resetPreference("cura/single_instance")
  68. singleInstanceCheckbox.checked = boolCheck(UM.Preferences.getValue("cura/single_instance"))
  69. UM.Preferences.resetPreference("cura/single_instance_clear_before_load")
  70. singleInstanceClearBeforeLoadCheckbox.checked = boolCheck(UM.Preferences.getValue("cura/single_instance_clear_before_load"))
  71. UM.Preferences.resetPreference("physics/automatic_push_free")
  72. pushFreeCheckbox.checked = boolCheck(UM.Preferences.getValue("physics/automatic_push_free"))
  73. UM.Preferences.resetPreference("physics/automatic_drop_down")
  74. dropDownCheckbox.checked = boolCheck(UM.Preferences.getValue("physics/automatic_drop_down"))
  75. UM.Preferences.resetPreference("mesh/scale_to_fit")
  76. scaleToFitCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_to_fit"))
  77. UM.Preferences.resetPreference("mesh/scale_tiny_meshes")
  78. scaleTinyCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_tiny_meshes"))
  79. UM.Preferences.resetPreference("cura/select_models_on_load")
  80. selectModelsOnLoadCheckbox.checked = boolCheck(UM.Preferences.getValue("cura/select_models_on_load"))
  81. UM.Preferences.resetPreference("cura/jobname_prefix")
  82. prefixJobNameCheckbox.checked = boolCheck(UM.Preferences.getValue("cura/jobname_prefix"))
  83. UM.Preferences.resetPreference("view/show_overhang");
  84. showOverhangCheckbox.checked = boolCheck(UM.Preferences.getValue("view/show_overhang"))
  85. UM.Preferences.resetPreference("view/show_xray_warning");
  86. showXrayErrorCheckbox.checked = boolCheck(UM.Preferences.getValue("view/show_xray_warning"))
  87. UM.Preferences.resetPreference("view/center_on_select");
  88. centerOnSelectCheckbox.checked = boolCheck(UM.Preferences.getValue("view/center_on_select"))
  89. UM.Preferences.resetPreference("view/invert_zoom");
  90. invertZoomCheckbox.checked = boolCheck(UM.Preferences.getValue("view/invert_zoom"))
  91. UM.Preferences.resetPreference("view/zoom_to_mouse");
  92. zoomToMouseCheckbox.checked = boolCheck(UM.Preferences.getValue("view/zoom_to_mouse"))
  93. UM.Preferences.resetPreference("view/top_layer_count");
  94. topLayerCountCheckbox.checked = boolCheck(UM.Preferences.getValue("view/top_layer_count"))
  95. UM.Preferences.resetPreference("general/restore_window_geometry")
  96. restoreWindowPositionCheckbox.checked = boolCheck(UM.Preferences.getValue("general/restore_window_geometry"))
  97. UM.Preferences.resetPreference("general/camera_perspective_mode")
  98. var defaultCameraMode = UM.Preferences.getValue("general/camera_perspective_mode")
  99. setDefaultCameraMode(defaultCameraMode)
  100. UM.Preferences.resetPreference("cura/choice_on_profile_override")
  101. setDefaultDiscardOrKeepProfile(UM.Preferences.getValue("cura/choice_on_profile_override"))
  102. UM.Preferences.resetPreference("cura/choice_on_open_project")
  103. setDefaultOpenProjectOption(UM.Preferences.getValue("cura/choice_on_open_project"))
  104. UM.Preferences.resetPreference("info/send_slice_info")
  105. sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info"))
  106. UM.Preferences.resetPreference("info/automatic_update_check")
  107. checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check"))
  108. UM.Preferences.resetPreference("info/latest_update_source")
  109. UM.Preferences.resetPreference("info/automatic_plugin_update_check")
  110. pluginNotificationsUpdateCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_plugin_update_check"))
  111. }
  112. ScrollView
  113. {
  114. id: preferencesScrollView
  115. width: parent.width
  116. height: parent.height
  117. Column
  118. {
  119. UM.I18nCatalog{id: catalog; name: "cura"}
  120. width: preferencesScrollView.viewport.width
  121. Label
  122. {
  123. font.bold: true
  124. text: catalog.i18nc("@label", "Interface")
  125. }
  126. GridLayout
  127. {
  128. id: interfaceGrid
  129. columns: 4
  130. width: parent.width
  131. Label
  132. {
  133. id: languageLabel
  134. text: "Language:" //Don't translate this, to make it easier to find the language drop-down if you can't read the current language.
  135. }
  136. ListModel
  137. {
  138. id: languageList
  139. Component.onCompleted:
  140. {
  141. append({ text: "English", code: "en_US" })
  142. append({ text: "Čeština", code: "cs_CZ" })
  143. append({ text: "Deutsch", code: "de_DE" })
  144. append({ text: "Español", code: "es_ES" })
  145. append({ text: "Français", code: "fr_FR" })
  146. append({ text: "Italiano", code: "it_IT" })
  147. append({ text: "日本語", code: "ja_JP" })
  148. append({ text: "한국어", code: "ko_KR" })
  149. append({ text: "Nederlands", code: "nl_NL" })
  150. append({ text: "Português do Brasil", code: "pt_BR" })
  151. append({ text: "Português", code: "pt_PT" })
  152. append({ text: "Русский", code: "ru_RU" })
  153. append({ text: "Türkçe", code: "tr_TR" })
  154. append({ text: "简体中文", code: "zh_CN" })
  155. append({ text: "正體字", code: "zh_TW" })
  156. var date_object = new Date();
  157. if (date_object.getUTCMonth() == 8 && date_object.getUTCDate() == 19) //Only add Pirate on the 19th of September.
  158. {
  159. append({ text: "Pirate", code: "en_7S" })
  160. }
  161. // incomplete and/or abandoned
  162. append({ text: catalog.i18nc("@heading", "-- incomplete --"), code: "" })
  163. append({ text: "Magyar", code: "hu_HU" })
  164. append({ text: "Suomi", code: "fi_FI" })
  165. append({ text: "Polski", code: "pl_PL" })
  166. }
  167. }
  168. NewControls.ComboBox
  169. {
  170. id: languageComboBox
  171. textRole: "text"
  172. model: languageList
  173. Layout.fillWidth: true
  174. function setCurrentIndex() {
  175. var code = UM.Preferences.getValue("general/language");
  176. for(var i = 0; i < languageList.count; ++i)
  177. {
  178. if(model.get(i).code == code)
  179. {
  180. return i
  181. }
  182. }
  183. }
  184. currentIndex: setCurrentIndex()
  185. onActivated: if (model.get(index).code != "")
  186. {
  187. UM.Preferences.setValue("general/language", model.get(index).code);
  188. }
  189. else
  190. {
  191. currentIndex = setCurrentIndex();
  192. }
  193. }
  194. Label
  195. {
  196. id: currencyLabel
  197. text: catalog.i18nc("@label", "Currency:")
  198. }
  199. TextField
  200. {
  201. id: currencyField
  202. text: UM.Preferences.getValue("cura/currency")
  203. onTextChanged: UM.Preferences.setValue("cura/currency", text)
  204. }
  205. Label
  206. {
  207. id: themeLabel
  208. text: catalog.i18nc("@label","Theme:")
  209. }
  210. ListModel
  211. {
  212. id: themeList
  213. Component.onCompleted: {
  214. var themes = UM.Theme.getThemes()
  215. for (var i = 0; i < themes.length; i++)
  216. {
  217. append({ text: themes[i].name.toString(), code: themes[i].id.toString() });
  218. }
  219. }
  220. }
  221. NewControls.ComboBox
  222. {
  223. id: themeComboBox
  224. model: themeList
  225. textRole: "text"
  226. Layout.fillWidth: true
  227. currentIndex:
  228. {
  229. var code = UM.Preferences.getValue("general/theme");
  230. for(var i = 0; i < themeList.count; ++i)
  231. {
  232. if(model.get(i).code == code)
  233. {
  234. return i
  235. }
  236. }
  237. return 0;
  238. }
  239. onActivated: UM.Preferences.setValue("general/theme", model.get(index).code)
  240. }
  241. }
  242. Label
  243. {
  244. id: languageCaption
  245. //: Language change warning
  246. text: catalog.i18nc("@label", "You will need to restart the application for these changes to have effect.")
  247. wrapMode: Text.WordWrap
  248. font.italic: true
  249. }
  250. Item
  251. {
  252. //: Spacer
  253. height: UM.Theme.getSize("default_margin").height
  254. width: UM.Theme.getSize("default_margin").width
  255. }
  256. UM.TooltipArea
  257. {
  258. width: childrenRect.width;
  259. height: childrenRect.height;
  260. text: catalog.i18nc("@info:tooltip", "Slice automatically when changing settings.")
  261. UM.CheckBox
  262. {
  263. id: autoSliceCheckbox
  264. checked: boolCheck(UM.Preferences.getValue("general/auto_slice"))
  265. onClicked: UM.Preferences.setValue("general/auto_slice", checked)
  266. text: catalog.i18nc("@option:check", "Slice automatically");
  267. }
  268. }
  269. Item
  270. {
  271. //: Spacer
  272. height: UM.Theme.getSize("default_margin").height
  273. width: UM.Theme.getSize("default_margin").width
  274. }
  275. Label
  276. {
  277. font.bold: true
  278. text: catalog.i18nc("@label", "Viewport behavior")
  279. }
  280. UM.TooltipArea
  281. {
  282. width: childrenRect.width;
  283. height: childrenRect.height;
  284. text: catalog.i18nc("@info:tooltip", "Highlight unsupported areas of the model in red. Without support these areas will not print properly.")
  285. UM.CheckBox
  286. {
  287. id: showOverhangCheckbox
  288. checked: boolCheck(UM.Preferences.getValue("view/show_overhang"))
  289. onClicked: UM.Preferences.setValue("view/show_overhang", checked)
  290. text: catalog.i18nc("@option:check", "Display overhang");
  291. }
  292. }
  293. UM.TooltipArea
  294. {
  295. width: childrenRect.width;
  296. height: childrenRect.height;
  297. text: catalog.i18nc("@info:tooltip", "Highlight missing or extraneous surfaces of the model using warning signs. The toolpaths will often be missing parts of the intended geometry.")
  298. UM.CheckBox
  299. {
  300. id: showXrayErrorCheckbox
  301. checked: boolCheck(UM.Preferences.getValue("view/show_xray_warning"))
  302. onClicked: UM.Preferences.setValue("view/show_xray_warning", checked)
  303. text: catalog.i18nc("@option:check", "Display model errors");
  304. }
  305. }
  306. UM.TooltipArea
  307. {
  308. width: childrenRect.width;
  309. height: childrenRect.height;
  310. text: catalog.i18nc("@info:tooltip", "Moves the camera so the model is in the center of the view when a model is selected")
  311. UM.CheckBox
  312. {
  313. id: centerOnSelectCheckbox
  314. text: catalog.i18nc("@action:button","Center camera when item is selected");
  315. checked: boolCheck(UM.Preferences.getValue("view/center_on_select"))
  316. onClicked: UM.Preferences.setValue("view/center_on_select", checked)
  317. }
  318. }
  319. UM.TooltipArea
  320. {
  321. width: childrenRect.width;
  322. height: childrenRect.height;
  323. text: catalog.i18nc("@info:tooltip", "Should the default zoom behavior of cura be inverted?")
  324. UM.CheckBox
  325. {
  326. id: invertZoomCheckbox
  327. text: catalog.i18nc("@action:button", "Invert the direction of camera zoom.");
  328. checked: boolCheck(UM.Preferences.getValue("view/invert_zoom"))
  329. onClicked: {
  330. if(!checked && zoomToMouseCheckbox.checked) //Fix for Github issue Ultimaker/Cura#6490: Make sure the camera origin is in front when unchecking.
  331. {
  332. UM.Controller.setCameraOrigin("home");
  333. }
  334. UM.Preferences.setValue("view/invert_zoom", checked);
  335. }
  336. }
  337. }
  338. UM.TooltipArea
  339. {
  340. width: childrenRect.width;
  341. height: childrenRect.height;
  342. text: zoomToMouseCheckbox.enabled ? catalog.i18nc("@info:tooltip", "Should zooming move in the direction of the mouse?") : catalog.i18nc("@info:tooltip", "Zooming towards the mouse is not supported in the orthographic perspective.")
  343. UM.CheckBox
  344. {
  345. id: zoomToMouseCheckbox
  346. text: catalog.i18nc("@action:button", "Zoom toward mouse direction")
  347. checked: boolCheck(UM.Preferences.getValue("view/zoom_to_mouse")) && zoomToMouseCheckbox.enabled
  348. onClicked: UM.Preferences.setValue("view/zoom_to_mouse", checked)
  349. enabled: UM.Preferences.getValue("general/camera_perspective_mode") !== "orthographic"
  350. }
  351. //Because there is no signal for individual preferences, we need to manually link to the onPreferenceChanged signal.
  352. Connections
  353. {
  354. target: UM.Preferences
  355. function onPreferenceChanged(preference)
  356. {
  357. if(preference != "general/camera_perspective_mode")
  358. {
  359. return;
  360. }
  361. zoomToMouseCheckbox.enabled = UM.Preferences.getValue("general/camera_perspective_mode") !== "orthographic";
  362. zoomToMouseCheckbox.checked = boolCheck(UM.Preferences.getValue("view/zoom_to_mouse")) && zoomToMouseCheckbox.enabled;
  363. }
  364. }
  365. }
  366. UM.TooltipArea
  367. {
  368. width: childrenRect.width
  369. height: childrenRect.height
  370. text: catalog.i18nc("@info:tooltip", "Should models on the platform be moved so that they no longer intersect?")
  371. UM.CheckBox
  372. {
  373. id: pushFreeCheckbox
  374. text: catalog.i18nc("@option:check", "Ensure models are kept apart")
  375. checked: boolCheck(UM.Preferences.getValue("physics/automatic_push_free"))
  376. onCheckedChanged: UM.Preferences.setValue("physics/automatic_push_free", checked)
  377. }
  378. }
  379. UM.TooltipArea
  380. {
  381. width: childrenRect.width
  382. height: childrenRect.height
  383. text: catalog.i18nc("@info:tooltip", "Should models on the platform be moved down to touch the build plate?")
  384. UM.CheckBox
  385. {
  386. id: dropDownCheckbox
  387. text: catalog.i18nc("@option:check", "Automatically drop models to the build plate")
  388. checked: boolCheck(UM.Preferences.getValue("physics/automatic_drop_down"))
  389. onCheckedChanged: UM.Preferences.setValue("physics/automatic_drop_down", checked)
  390. }
  391. }
  392. UM.TooltipArea
  393. {
  394. width: childrenRect.width;
  395. height: childrenRect.height;
  396. text: catalog.i18nc("@info:tooltip","Show caution message in g-code reader.")
  397. UM.CheckBox
  398. {
  399. id: gcodeShowCautionCheckbox
  400. checked: boolCheck(UM.Preferences.getValue("gcodereader/show_caution"))
  401. onClicked: UM.Preferences.setValue("gcodereader/show_caution", checked)
  402. text: catalog.i18nc("@option:check","Caution message in g-code reader");
  403. }
  404. }
  405. UM.TooltipArea
  406. {
  407. width: childrenRect.width
  408. height: childrenRect.height
  409. text: catalog.i18nc("@info:tooltip", "Should layer be forced into compatibility mode?")
  410. UM.CheckBox
  411. {
  412. id: forceLayerViewCompatibilityModeCheckbox
  413. text: catalog.i18nc("@option:check", "Force layer view compatibility mode (restart required)")
  414. checked: boolCheck(UM.Preferences.getValue("view/force_layer_view_compatibility_mode"))
  415. onCheckedChanged: UM.Preferences.setValue("view/force_layer_view_compatibility_mode", checked)
  416. }
  417. }
  418. UM.TooltipArea
  419. {
  420. width: childrenRect.width
  421. height: childrenRect.height
  422. text: catalog.i18nc("@info:tooltip", "Should Cura open at the location it was closed?")
  423. UM.CheckBox
  424. {
  425. id: restoreWindowPositionCheckbox
  426. text: catalog.i18nc("@option:check", "Restore window position on start")
  427. checked: boolCheck(UM.Preferences.getValue("general/restore_window_geometry"))
  428. onCheckedChanged: UM.Preferences.setValue("general/restore_window_geometry", checked)
  429. }
  430. }
  431. UM.TooltipArea
  432. {
  433. width: childrenRect.width
  434. height: childrenRect.height
  435. text: catalog.i18nc("@info:tooltip", "What type of camera rendering should be used?")
  436. Column
  437. {
  438. spacing: 4 * screenScaleFactor
  439. Label
  440. {
  441. text: catalog.i18nc("@window:text", "Camera rendering:")
  442. }
  443. ListModel
  444. {
  445. id: comboBoxList
  446. Component.onCompleted:
  447. {
  448. append({ text: catalog.i18n("Perspective"), code: "perspective" })
  449. append({ text: catalog.i18n("Orthographic"), code: "orthographic" })
  450. }
  451. }
  452. NewControls.ComboBox
  453. {
  454. id: cameraComboBox
  455. model: comboBoxList
  456. textRole: "text"
  457. currentIndex:
  458. {
  459. var code = UM.Preferences.getValue("general/camera_perspective_mode");
  460. for(var i = 0; i < comboBoxList.count; ++i)
  461. {
  462. if(model.get(i).code == code)
  463. {
  464. return i
  465. }
  466. }
  467. return 0
  468. }
  469. onActivated: UM.Preferences.setValue("general/camera_perspective_mode", model.get(index).code)
  470. }
  471. }
  472. }
  473. Item
  474. {
  475. //: Spacer
  476. height: UM.Theme.getSize("default_margin").height
  477. width: UM.Theme.getSize("default_margin").height
  478. }
  479. Label
  480. {
  481. font.bold: true
  482. text: catalog.i18nc("@label","Opening and saving files")
  483. }
  484. UM.TooltipArea
  485. {
  486. width: childrenRect.width
  487. height: childrenRect.height
  488. text: catalog.i18nc("@info:tooltip","Should opening files from the desktop or external applications open in the same instance of Cura?")
  489. UM.CheckBox
  490. {
  491. id: singleInstanceCheckbox
  492. text: catalog.i18nc("@option:check","Use a single instance of Cura")
  493. checked: boolCheck(UM.Preferences.getValue("cura/single_instance"))
  494. onCheckedChanged: UM.Preferences.setValue("cura/single_instance", checked)
  495. }
  496. }
  497. UM.TooltipArea
  498. {
  499. width: childrenRect.width
  500. height: childrenRect.height
  501. text: catalog.i18nc("@info:tooltip","Should the build plate be cleared before loading a new model in the single instance of Cura?")
  502. enabled: singleInstanceCheckbox.checked
  503. UM.CheckBox
  504. {
  505. id: singleInstanceClearBeforeLoadCheckbox
  506. text: catalog.i18nc("@option:check","Clear buildplate before loading model into the single instance")
  507. checked: boolCheck(UM.Preferences.getValue("cura/single_instance_clear_before_load"))
  508. onCheckedChanged: UM.Preferences.setValue("cura/single_instance_clear_before_load", checked)
  509. }
  510. }
  511. UM.TooltipArea
  512. {
  513. width: childrenRect.width
  514. height: childrenRect.height
  515. text: catalog.i18nc("@info:tooltip","Should models be scaled to the build volume if they are too large?")
  516. UM.CheckBox
  517. {
  518. id: scaleToFitCheckbox
  519. text: catalog.i18nc("@option:check","Scale large models")
  520. checked: boolCheck(UM.Preferences.getValue("mesh/scale_to_fit"))
  521. onCheckedChanged: UM.Preferences.setValue("mesh/scale_to_fit", checked)
  522. }
  523. }
  524. UM.TooltipArea
  525. {
  526. width: childrenRect.width
  527. height: childrenRect.height
  528. text: catalog.i18nc("@info:tooltip","An model may appear extremely small if its unit is for example in meters rather than millimeters. Should these models be scaled up?")
  529. UM.CheckBox
  530. {
  531. id: scaleTinyCheckbox
  532. text: catalog.i18nc("@option:check","Scale extremely small models")
  533. checked: boolCheck(UM.Preferences.getValue("mesh/scale_tiny_meshes"))
  534. onCheckedChanged: UM.Preferences.setValue("mesh/scale_tiny_meshes", checked)
  535. }
  536. }
  537. UM.TooltipArea
  538. {
  539. width: childrenRect.width
  540. height: childrenRect.height
  541. text: catalog.i18nc("@info:tooltip","Should models be selected after they are loaded?")
  542. UM.CheckBox
  543. {
  544. id: selectModelsOnLoadCheckbox
  545. text: catalog.i18nc("@option:check","Select models when loaded")
  546. checked: boolCheck(UM.Preferences.getValue("cura/select_models_on_load"))
  547. onCheckedChanged: UM.Preferences.setValue("cura/select_models_on_load", checked)
  548. }
  549. }
  550. UM.TooltipArea
  551. {
  552. width: childrenRect.width
  553. height: childrenRect.height
  554. text: catalog.i18nc("@info:tooltip", "Should a prefix based on the printer name be added to the print job name automatically?")
  555. UM.CheckBox
  556. {
  557. id: prefixJobNameCheckbox
  558. text: catalog.i18nc("@option:check", "Add machine prefix to job name")
  559. checked: boolCheck(UM.Preferences.getValue("cura/jobname_prefix"))
  560. onCheckedChanged: UM.Preferences.setValue("cura/jobname_prefix", checked)
  561. }
  562. }
  563. UM.TooltipArea
  564. {
  565. width: childrenRect.width
  566. height: childrenRect.height
  567. text: catalog.i18nc("@info:tooltip", "Should a summary be shown when saving a project file?")
  568. UM.CheckBox
  569. {
  570. text: catalog.i18nc("@option:check", "Show summary dialog when saving project")
  571. checked: boolCheck(UM.Preferences.getValue("cura/dialog_on_project_save"))
  572. onCheckedChanged: UM.Preferences.setValue("cura/dialog_on_project_save", checked)
  573. }
  574. }
  575. UM.TooltipArea
  576. {
  577. width: childrenRect.width
  578. height: childrenRect.height
  579. text: catalog.i18nc("@info:tooltip", "Default behavior when opening a project file")
  580. Column
  581. {
  582. spacing: 4 * screenScaleFactor
  583. Label
  584. {
  585. text: catalog.i18nc("@window:text", "Default behavior when opening a project file: ")
  586. }
  587. NewControls.ComboBox
  588. {
  589. id: choiceOnOpenProjectDropDownButton
  590. width: Math.round(250 * screenScaleFactor)
  591. model: ListModel
  592. {
  593. id: openProjectOptionModel
  594. Component.onCompleted:
  595. {
  596. append({ text: catalog.i18nc("@option:openProject", "Always ask me this"), code: "always_ask" })
  597. append({ text: catalog.i18nc("@option:openProject", "Always open as a project"), code: "open_as_project" })
  598. append({ text: catalog.i18nc("@option:openProject", "Always import models"), code: "open_as_model" })
  599. }
  600. }
  601. textRole: "text"
  602. currentIndex:
  603. {
  604. var index = 0;
  605. var currentChoice = UM.Preferences.getValue("cura/choice_on_open_project");
  606. for (var i = 0; i < model.count; ++i)
  607. {
  608. if (model.get(i).code == currentChoice)
  609. {
  610. index = i;
  611. break;
  612. }
  613. }
  614. return index;
  615. }
  616. onActivated: UM.Preferences.setValue("cura/choice_on_open_project", model.get(index).code)
  617. }
  618. }
  619. }
  620. Item
  621. {
  622. //: Spacer
  623. height: UM.Theme.getSize("default_margin").height
  624. width: UM.Theme.getSize("default_margin").width
  625. }
  626. UM.TooltipArea
  627. {
  628. width: childrenRect.width;
  629. height: childrenRect.height;
  630. text: catalog.i18nc("@info:tooltip", "When you have made changes to a profile and switched to a different one, a dialog will be shown asking whether you want to keep your modifications or not, or you can choose a default behaviour and never show that dialog again.")
  631. Column
  632. {
  633. spacing: 4 * screenScaleFactor
  634. Label
  635. {
  636. font.bold: true
  637. text: catalog.i18nc("@label", "Profiles")
  638. }
  639. Label
  640. {
  641. text: catalog.i18nc("@window:text", "Default behavior for changed setting values when switching to a different profile: ")
  642. }
  643. NewControls.ComboBox
  644. {
  645. id: choiceOnProfileOverrideDropDownButton
  646. width: Math.round(250 * screenScaleFactor)
  647. popup.width: Math.round(350 * screenScaleFactor)
  648. model: ListModel
  649. {
  650. id: discardOrKeepProfileListModel
  651. Component.onCompleted:
  652. {
  653. append({ text: catalog.i18nc("@option:discardOrKeep", "Always ask me this"), code: "always_ask" })
  654. append({ text: catalog.i18nc("@option:discardOrKeep", "Always discard changed settings"), code: "always_discard" })
  655. append({ text: catalog.i18nc("@option:discardOrKeep", "Always transfer changed settings to new profile"), code: "always_keep" })
  656. }
  657. }
  658. textRole: "text"
  659. currentIndex:
  660. {
  661. var index = 0;
  662. var code = UM.Preferences.getValue("cura/choice_on_profile_override");
  663. for (var i = 0; i < model.count; ++i)
  664. {
  665. if (model.get(i).code == code)
  666. {
  667. index = i;
  668. break;
  669. }
  670. }
  671. return index;
  672. }
  673. onActivated: UM.Preferences.setValue("cura/choice_on_profile_override", model.get(index).code)
  674. }
  675. }
  676. }
  677. Item
  678. {
  679. //: Spacer
  680. height: UM.Theme.getSize("default_margin").height
  681. width: UM.Theme.getSize("default_margin").height
  682. }
  683. Label
  684. {
  685. font.bold: true
  686. text: catalog.i18nc("@label", "Privacy")
  687. }
  688. UM.TooltipArea
  689. {
  690. width: childrenRect.width
  691. height: visible ? childrenRect.height : 0
  692. text: catalog.i18nc("@info:tooltip", "Should anonymous data about your print be sent to Ultimaker? Note, no models, IP addresses or other personally identifiable information is sent or stored.")
  693. UM.CheckBox
  694. {
  695. id: sendDataCheckbox
  696. text: catalog.i18nc("@option:check","Send (anonymous) print information")
  697. checked: boolCheck(UM.Preferences.getValue("info/send_slice_info"))
  698. onCheckedChanged: UM.Preferences.setValue("info/send_slice_info", checked)
  699. }
  700. Button
  701. {
  702. id: showMoreInfo
  703. anchors.top: sendDataCheckbox.bottom
  704. text: catalog.i18nc("@action:button", "More information")
  705. onClicked:
  706. {
  707. CuraApplication.showMoreInformationDialogForAnonymousDataCollection();
  708. }
  709. }
  710. }
  711. Item
  712. {
  713. //: Spacer
  714. height: UM.Theme.getSize("default_margin").height
  715. width: UM.Theme.getSize("default_margin").height
  716. }
  717. Label
  718. {
  719. font.bold: true
  720. text: catalog.i18nc("@label", "Updates")
  721. }
  722. UM.TooltipArea
  723. {
  724. width: childrenRect.width
  725. height: visible ? childrenRect.height : 0
  726. text: catalog.i18nc("@info:tooltip", "Should Cura check for updates when the program is started?")
  727. UM.CheckBox
  728. {
  729. id: checkUpdatesCheckbox
  730. text: catalog.i18nc("@option:check","Check for updates on start")
  731. checked: boolCheck(UM.Preferences.getValue("info/automatic_update_check"))
  732. onCheckedChanged: UM.Preferences.setValue("info/automatic_update_check", checked)
  733. }
  734. }
  735. ExclusiveGroup { id: curaUpdatesGroup }
  736. UM.TooltipArea
  737. {
  738. width: childrenRect.width
  739. height: visible ? childrenRect.height : 0
  740. text: catalog.i18nc("@info:tooltip", "When checking for updates, only check for stable releases.")
  741. anchors.left: parent.left
  742. anchors.leftMargin: UM.Theme.getSize("default_margin").width
  743. RadioButton
  744. {
  745. text: catalog.i18nc("@option:radio", "Stable releases only")
  746. exclusiveGroup: curaUpdatesGroup
  747. enabled: checkUpdatesCheckbox.checked
  748. checked: UM.Preferences.getValue("info/latest_update_source") == "stable"
  749. onClicked: UM.Preferences.setValue("info/latest_update_source", "stable")
  750. }
  751. }
  752. UM.TooltipArea
  753. {
  754. width: childrenRect.width
  755. height: visible ? childrenRect.height : 0
  756. text: catalog.i18nc("@info:tooltip", "When checking for updates, check for both stable and for beta releases.")
  757. anchors.left: parent.left
  758. anchors.leftMargin: UM.Theme.getSize("default_margin").width
  759. RadioButton
  760. {
  761. text: catalog.i18nc("@option:radio", "Stable and Beta releases")
  762. exclusiveGroup: curaUpdatesGroup
  763. enabled: checkUpdatesCheckbox.checked
  764. checked: UM.Preferences.getValue("info/latest_update_source") == "beta"
  765. onClicked: UM.Preferences.setValue("info/latest_update_source", "beta")
  766. }
  767. }
  768. UM.TooltipArea
  769. {
  770. width: childrenRect.width
  771. height: visible ? childrenRect.height : 0
  772. text: catalog.i18nc("@info:tooltip", "Should an automatic check for new plugins be done every time Cura is started? It is highly recommended that you do not disable this!")
  773. UM.CheckBox
  774. {
  775. id: pluginNotificationsUpdateCheckbox
  776. text: catalog.i18nc("@option:check", "Get notifications for plugin updates")
  777. checked: boolCheck(UM.Preferences.getValue("info/automatic_plugin_update_check"))
  778. onCheckedChanged: UM.Preferences.setValue("info/automatic_plugin_update_check", checked)
  779. }
  780. }
  781. /* Multi-buildplate functionality is disabled because it's broken. See CURA-4975 for the ticket to remove it.
  782. Item
  783. {
  784. //: Spacer
  785. height: UM.Theme.getSize("default_margin").height
  786. width: UM.Theme.getSize("default_margin").height
  787. }
  788. Label
  789. {
  790. font.bold: true
  791. text: catalog.i18nc("@label","Experimental")
  792. }
  793. UM.TooltipArea
  794. {
  795. width: childrenRect.width
  796. height: childrenRect.height
  797. text: catalog.i18nc("@info:tooltip","Use multi build plate functionality")
  798. CheckBox
  799. {
  800. id: useMultiBuildPlateCheckbox
  801. text: catalog.i18nc("@option:check","Use multi build plate functionality (restart required)")
  802. checked: boolCheck(UM.Preferences.getValue("cura/use_multi_build_plate"))
  803. onCheckedChanged: UM.Preferences.setValue("cura/use_multi_build_plate", checked)
  804. }
  805. }*/
  806. Connections
  807. {
  808. target: UM.Preferences
  809. function onPreferenceChanged(preference)
  810. {
  811. if (preference !== "info/send_slice_info")
  812. {
  813. return;
  814. }
  815. sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info"))
  816. }
  817. }
  818. }
  819. }
  820. }