GeneralPage.qml 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942
  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. //Finnish is disabled for being incomplete: append({ text: "Suomi", code: "fi_FI" })
  146. append({ text: "Français", code: "fr_FR" })
  147. append({ text: "Italiano", code: "it_IT" })
  148. append({ text: "日本語", code: "ja_JP" })
  149. append({ text: "한국어", code: "ko_KR" })
  150. append({ text: "Nederlands", code: "nl_NL" })
  151. //Polish is disabled for being incomplete: append({ text: "Polski", code: "pl_PL" })
  152. append({ text: "Português do Brasil", code: "pt_BR" })
  153. append({ text: "Português", code: "pt_PT" })
  154. append({ text: "Русский", code: "ru_RU" })
  155. append({ text: "Türkçe", code: "tr_TR" })
  156. append({ text: "简体中文", code: "zh_CN" })
  157. append({ text: "正體字", code: "zh_TW" })
  158. var date_object = new Date();
  159. if (date_object.getUTCMonth() == 8 && date_object.getUTCDate() == 19) //Only add Pirate on the 19th of September.
  160. {
  161. append({ text: "Pirate", code: "en_7S" })
  162. }
  163. }
  164. }
  165. NewControls.ComboBox
  166. {
  167. id: languageComboBox
  168. textRole: "text"
  169. model: languageList
  170. Layout.fillWidth: true
  171. currentIndex:
  172. {
  173. var code = UM.Preferences.getValue("general/language");
  174. for(var i = 0; i < languageList.count; ++i)
  175. {
  176. if(model.get(i).code == code)
  177. {
  178. return i
  179. }
  180. }
  181. }
  182. onActivated: UM.Preferences.setValue("general/language", model.get(index).code)
  183. }
  184. Label
  185. {
  186. id: currencyLabel
  187. text: catalog.i18nc("@label", "Currency:")
  188. }
  189. TextField
  190. {
  191. id: currencyField
  192. text: UM.Preferences.getValue("cura/currency")
  193. onTextChanged: UM.Preferences.setValue("cura/currency", text)
  194. }
  195. Label
  196. {
  197. id: themeLabel
  198. text: catalog.i18nc("@label","Theme:")
  199. }
  200. ListModel
  201. {
  202. id: themeList
  203. Component.onCompleted: {
  204. var themes = UM.Theme.getThemes()
  205. for (var i = 0; i < themes.length; i++)
  206. {
  207. append({ text: themes[i].name.toString(), code: themes[i].id.toString() });
  208. }
  209. }
  210. }
  211. NewControls.ComboBox
  212. {
  213. id: themeComboBox
  214. model: themeList
  215. textRole: "text"
  216. Layout.fillWidth: true
  217. currentIndex:
  218. {
  219. var code = UM.Preferences.getValue("general/theme");
  220. for(var i = 0; i < themeList.count; ++i)
  221. {
  222. if(model.get(i).code == code)
  223. {
  224. return i
  225. }
  226. }
  227. return 0;
  228. }
  229. onActivated: UM.Preferences.setValue("general/theme", model.get(index).code)
  230. }
  231. }
  232. Label
  233. {
  234. id: languageCaption
  235. //: Language change warning
  236. text: catalog.i18nc("@label", "You will need to restart the application for these changes to have effect.")
  237. wrapMode: Text.WordWrap
  238. font.italic: true
  239. }
  240. Item
  241. {
  242. //: Spacer
  243. height: UM.Theme.getSize("default_margin").height
  244. width: UM.Theme.getSize("default_margin").width
  245. }
  246. UM.TooltipArea
  247. {
  248. width: childrenRect.width;
  249. height: childrenRect.height;
  250. text: catalog.i18nc("@info:tooltip", "Slice automatically when changing settings.")
  251. CheckBox
  252. {
  253. id: autoSliceCheckbox
  254. checked: boolCheck(UM.Preferences.getValue("general/auto_slice"))
  255. onClicked: UM.Preferences.setValue("general/auto_slice", checked)
  256. text: catalog.i18nc("@option:check", "Slice automatically");
  257. }
  258. }
  259. Item
  260. {
  261. //: Spacer
  262. height: UM.Theme.getSize("default_margin").height
  263. width: UM.Theme.getSize("default_margin").width
  264. }
  265. Label
  266. {
  267. font.bold: true
  268. text: catalog.i18nc("@label", "Viewport behavior")
  269. }
  270. UM.TooltipArea
  271. {
  272. width: childrenRect.width;
  273. height: childrenRect.height;
  274. text: catalog.i18nc("@info:tooltip", "Highlight unsupported areas of the model in red. Without support these areas will not print properly.")
  275. CheckBox
  276. {
  277. id: showOverhangCheckbox
  278. checked: boolCheck(UM.Preferences.getValue("view/show_overhang"))
  279. onClicked: UM.Preferences.setValue("view/show_overhang", checked)
  280. text: catalog.i18nc("@option:check", "Display overhang");
  281. }
  282. }
  283. UM.TooltipArea
  284. {
  285. width: childrenRect.width;
  286. height: childrenRect.height;
  287. 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.")
  288. CheckBox
  289. {
  290. id: showXrayErrorCheckbox
  291. checked: boolCheck(UM.Preferences.getValue("view/show_xray_warning"))
  292. onClicked: UM.Preferences.setValue("view/show_xray_warning", checked)
  293. text: catalog.i18nc("@option:check", "Display model errors");
  294. }
  295. }
  296. UM.TooltipArea
  297. {
  298. width: childrenRect.width;
  299. height: childrenRect.height;
  300. text: catalog.i18nc("@info:tooltip", "Moves the camera so the model is in the center of the view when a model is selected")
  301. CheckBox
  302. {
  303. id: centerOnSelectCheckbox
  304. text: catalog.i18nc("@action:button","Center camera when item is selected");
  305. checked: boolCheck(UM.Preferences.getValue("view/center_on_select"))
  306. onClicked: UM.Preferences.setValue("view/center_on_select", checked)
  307. }
  308. }
  309. UM.TooltipArea
  310. {
  311. width: childrenRect.width;
  312. height: childrenRect.height;
  313. text: catalog.i18nc("@info:tooltip", "Should the default zoom behavior of cura be inverted?")
  314. CheckBox
  315. {
  316. id: invertZoomCheckbox
  317. text: catalog.i18nc("@action:button", "Invert the direction of camera zoom.");
  318. checked: boolCheck(UM.Preferences.getValue("view/invert_zoom"))
  319. onClicked: {
  320. if(!checked && zoomToMouseCheckbox.checked) //Fix for Github issue Ultimaker/Cura#6490: Make sure the camera origin is in front when unchecking.
  321. {
  322. UM.Controller.setCameraOrigin("home");
  323. }
  324. UM.Preferences.setValue("view/invert_zoom", checked);
  325. }
  326. }
  327. }
  328. UM.TooltipArea
  329. {
  330. width: childrenRect.width;
  331. height: childrenRect.height;
  332. 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.")
  333. CheckBox
  334. {
  335. id: zoomToMouseCheckbox
  336. text: catalog.i18nc("@action:button", "Zoom toward mouse direction")
  337. checked: boolCheck(UM.Preferences.getValue("view/zoom_to_mouse")) && zoomToMouseCheckbox.enabled
  338. onClicked: UM.Preferences.setValue("view/zoom_to_mouse", checked)
  339. enabled: UM.Preferences.getValue("general/camera_perspective_mode") !== "orthographic"
  340. }
  341. //Because there is no signal for individual preferences, we need to manually link to the onPreferenceChanged signal.
  342. Connections
  343. {
  344. target: UM.Preferences
  345. function onPreferenceChanged(preference)
  346. {
  347. if(preference != "general/camera_perspective_mode")
  348. {
  349. return;
  350. }
  351. zoomToMouseCheckbox.enabled = UM.Preferences.getValue("general/camera_perspective_mode") !== "orthographic";
  352. zoomToMouseCheckbox.checked = boolCheck(UM.Preferences.getValue("view/zoom_to_mouse")) && zoomToMouseCheckbox.enabled;
  353. }
  354. }
  355. }
  356. UM.TooltipArea
  357. {
  358. width: childrenRect.width
  359. height: childrenRect.height
  360. text: catalog.i18nc("@info:tooltip", "Should models on the platform be moved so that they no longer intersect?")
  361. CheckBox
  362. {
  363. id: pushFreeCheckbox
  364. text: catalog.i18nc("@option:check", "Ensure models are kept apart")
  365. checked: boolCheck(UM.Preferences.getValue("physics/automatic_push_free"))
  366. onCheckedChanged: UM.Preferences.setValue("physics/automatic_push_free", checked)
  367. }
  368. }
  369. UM.TooltipArea
  370. {
  371. width: childrenRect.width
  372. height: childrenRect.height
  373. text: catalog.i18nc("@info:tooltip", "Should models on the platform be moved down to touch the build plate?")
  374. CheckBox
  375. {
  376. id: dropDownCheckbox
  377. text: catalog.i18nc("@option:check", "Automatically drop models to the build plate")
  378. checked: boolCheck(UM.Preferences.getValue("physics/automatic_drop_down"))
  379. onCheckedChanged: UM.Preferences.setValue("physics/automatic_drop_down", checked)
  380. }
  381. }
  382. UM.TooltipArea
  383. {
  384. width: childrenRect.width;
  385. height: childrenRect.height;
  386. text: catalog.i18nc("@info:tooltip","Show caution message in g-code reader.")
  387. CheckBox
  388. {
  389. id: gcodeShowCautionCheckbox
  390. checked: boolCheck(UM.Preferences.getValue("gcodereader/show_caution"))
  391. onClicked: UM.Preferences.setValue("gcodereader/show_caution", checked)
  392. text: catalog.i18nc("@option:check","Caution message in g-code reader");
  393. }
  394. }
  395. UM.TooltipArea
  396. {
  397. width: childrenRect.width
  398. height: childrenRect.height
  399. text: catalog.i18nc("@info:tooltip", "Should layer be forced into compatibility mode?")
  400. CheckBox
  401. {
  402. id: forceLayerViewCompatibilityModeCheckbox
  403. text: catalog.i18nc("@option:check", "Force layer view compatibility mode (restart required)")
  404. checked: boolCheck(UM.Preferences.getValue("view/force_layer_view_compatibility_mode"))
  405. onCheckedChanged: UM.Preferences.setValue("view/force_layer_view_compatibility_mode", checked)
  406. }
  407. }
  408. UM.TooltipArea
  409. {
  410. width: childrenRect.width
  411. height: childrenRect.height
  412. text: catalog.i18nc("@info:tooltip", "Should Cura open at the location it was closed?")
  413. CheckBox
  414. {
  415. id: restoreWindowPositionCheckbox
  416. text: catalog.i18nc("@option:check", "Restore window position on start")
  417. checked: boolCheck(UM.Preferences.getValue("general/restore_window_geometry"))
  418. onCheckedChanged: UM.Preferences.setValue("general/restore_window_geometry", checked)
  419. }
  420. }
  421. UM.TooltipArea
  422. {
  423. width: childrenRect.width
  424. height: childrenRect.height
  425. text: catalog.i18nc("@info:tooltip", "What type of camera rendering should be used?")
  426. Column
  427. {
  428. spacing: 4 * screenScaleFactor
  429. Label
  430. {
  431. text: catalog.i18nc("@window:text", "Camera rendering:")
  432. }
  433. ListModel
  434. {
  435. id: comboBoxList
  436. Component.onCompleted:
  437. {
  438. append({ text: catalog.i18n("Perspective"), code: "perspective" })
  439. append({ text: catalog.i18n("Orthographic"), code: "orthographic" })
  440. }
  441. }
  442. NewControls.ComboBox
  443. {
  444. id: cameraComboBox
  445. model: comboBoxList
  446. textRole: "text"
  447. currentIndex:
  448. {
  449. var code = UM.Preferences.getValue("general/camera_perspective_mode");
  450. for(var i = 0; i < comboBoxList.count; ++i)
  451. {
  452. if(model.get(i).code == code)
  453. {
  454. return i
  455. }
  456. }
  457. return 0
  458. }
  459. onActivated: UM.Preferences.setValue("general/camera_perspective_mode", model.get(index).code)
  460. }
  461. }
  462. }
  463. Item
  464. {
  465. //: Spacer
  466. height: UM.Theme.getSize("default_margin").height
  467. width: UM.Theme.getSize("default_margin").height
  468. }
  469. Label
  470. {
  471. font.bold: true
  472. text: catalog.i18nc("@label","Opening and saving files")
  473. }
  474. UM.TooltipArea
  475. {
  476. width: childrenRect.width
  477. height: childrenRect.height
  478. text: catalog.i18nc("@info:tooltip","Should opening files from the desktop or external applications open in the same instance of Cura?")
  479. CheckBox
  480. {
  481. id: singleInstanceCheckbox
  482. text: catalog.i18nc("@option:check","Use a single instance of Cura")
  483. checked: boolCheck(UM.Preferences.getValue("cura/single_instance"))
  484. onCheckedChanged: UM.Preferences.setValue("cura/single_instance", checked)
  485. }
  486. }
  487. UM.TooltipArea
  488. {
  489. width: childrenRect.width
  490. height: childrenRect.height
  491. text: catalog.i18nc("@info:tooltip","Should the build plate be cleared before loading a new model in the single instance of Cura?")
  492. enabled: singleInstanceCheckbox.checked
  493. CheckBox
  494. {
  495. id: singleInstanceClearBeforeLoadCheckbox
  496. text: catalog.i18nc("@option:check","Clear buildplate before loading model into the single instance")
  497. checked: boolCheck(UM.Preferences.getValue("cura/single_instance_clear_before_load"))
  498. onCheckedChanged: UM.Preferences.setValue("cura/single_instance_clear_before_load", checked)
  499. }
  500. }
  501. UM.TooltipArea
  502. {
  503. width: childrenRect.width
  504. height: childrenRect.height
  505. text: catalog.i18nc("@info:tooltip","Should models be scaled to the build volume if they are too large?")
  506. CheckBox
  507. {
  508. id: scaleToFitCheckbox
  509. text: catalog.i18nc("@option:check","Scale large models")
  510. checked: boolCheck(UM.Preferences.getValue("mesh/scale_to_fit"))
  511. onCheckedChanged: UM.Preferences.setValue("mesh/scale_to_fit", checked)
  512. }
  513. }
  514. UM.TooltipArea
  515. {
  516. width: childrenRect.width
  517. height: childrenRect.height
  518. 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?")
  519. CheckBox
  520. {
  521. id: scaleTinyCheckbox
  522. text: catalog.i18nc("@option:check","Scale extremely small models")
  523. checked: boolCheck(UM.Preferences.getValue("mesh/scale_tiny_meshes"))
  524. onCheckedChanged: UM.Preferences.setValue("mesh/scale_tiny_meshes", checked)
  525. }
  526. }
  527. UM.TooltipArea
  528. {
  529. width: childrenRect.width
  530. height: childrenRect.height
  531. text: catalog.i18nc("@info:tooltip","Should models be selected after they are loaded?")
  532. CheckBox
  533. {
  534. id: selectModelsOnLoadCheckbox
  535. text: catalog.i18nc("@option:check","Select models when loaded")
  536. checked: boolCheck(UM.Preferences.getValue("cura/select_models_on_load"))
  537. onCheckedChanged: UM.Preferences.setValue("cura/select_models_on_load", checked)
  538. }
  539. }
  540. UM.TooltipArea
  541. {
  542. width: childrenRect.width
  543. height: childrenRect.height
  544. text: catalog.i18nc("@info:tooltip", "Should a prefix based on the printer name be added to the print job name automatically?")
  545. CheckBox
  546. {
  547. id: prefixJobNameCheckbox
  548. text: catalog.i18nc("@option:check", "Add machine prefix to job name")
  549. checked: boolCheck(UM.Preferences.getValue("cura/jobname_prefix"))
  550. onCheckedChanged: UM.Preferences.setValue("cura/jobname_prefix", checked)
  551. }
  552. }
  553. UM.TooltipArea
  554. {
  555. width: childrenRect.width
  556. height: childrenRect.height
  557. text: catalog.i18nc("@info:tooltip", "Should a summary be shown when saving a project file?")
  558. CheckBox
  559. {
  560. text: catalog.i18nc("@option:check", "Show summary dialog when saving project")
  561. checked: boolCheck(UM.Preferences.getValue("cura/dialog_on_project_save"))
  562. onCheckedChanged: UM.Preferences.setValue("cura/dialog_on_project_save", checked)
  563. }
  564. }
  565. UM.TooltipArea
  566. {
  567. width: childrenRect.width
  568. height: childrenRect.height
  569. text: catalog.i18nc("@info:tooltip", "Default behavior when opening a project file")
  570. Column
  571. {
  572. spacing: 4 * screenScaleFactor
  573. Label
  574. {
  575. text: catalog.i18nc("@window:text", "Default behavior when opening a project file: ")
  576. }
  577. NewControls.ComboBox
  578. {
  579. id: choiceOnOpenProjectDropDownButton
  580. width: Math.round(250 * screenScaleFactor)
  581. model: ListModel
  582. {
  583. id: openProjectOptionModel
  584. Component.onCompleted:
  585. {
  586. append({ text: catalog.i18nc("@option:openProject", "Always ask me this"), code: "always_ask" })
  587. append({ text: catalog.i18nc("@option:openProject", "Always open as a project"), code: "open_as_project" })
  588. append({ text: catalog.i18nc("@option:openProject", "Always import models"), code: "open_as_model" })
  589. }
  590. }
  591. textRole: "text"
  592. currentIndex:
  593. {
  594. var index = 0;
  595. var currentChoice = UM.Preferences.getValue("cura/choice_on_open_project");
  596. for (var i = 0; i < model.count; ++i)
  597. {
  598. if (model.get(i).code == currentChoice)
  599. {
  600. index = i;
  601. break;
  602. }
  603. }
  604. return index;
  605. }
  606. onActivated: UM.Preferences.setValue("cura/choice_on_open_project", model.get(index).code)
  607. }
  608. }
  609. }
  610. Item
  611. {
  612. //: Spacer
  613. height: UM.Theme.getSize("default_margin").height
  614. width: UM.Theme.getSize("default_margin").width
  615. }
  616. UM.TooltipArea
  617. {
  618. width: childrenRect.width;
  619. height: childrenRect.height;
  620. 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.")
  621. Column
  622. {
  623. spacing: 4 * screenScaleFactor
  624. Label
  625. {
  626. font.bold: true
  627. text: catalog.i18nc("@label", "Profiles")
  628. }
  629. Label
  630. {
  631. text: catalog.i18nc("@window:text", "Default behavior for changed setting values when switching to a different profile: ")
  632. }
  633. NewControls.ComboBox
  634. {
  635. id: choiceOnProfileOverrideDropDownButton
  636. width: Math.round(250 * screenScaleFactor)
  637. popup.width: Math.round(350 * screenScaleFactor)
  638. model: ListModel
  639. {
  640. id: discardOrKeepProfileListModel
  641. Component.onCompleted:
  642. {
  643. append({ text: catalog.i18nc("@option:discardOrKeep", "Always ask me this"), code: "always_ask" })
  644. append({ text: catalog.i18nc("@option:discardOrKeep", "Always discard changed settings"), code: "always_discard" })
  645. append({ text: catalog.i18nc("@option:discardOrKeep", "Always transfer changed settings to new profile"), code: "always_keep" })
  646. }
  647. }
  648. textRole: "text"
  649. currentIndex:
  650. {
  651. var index = 0;
  652. var code = UM.Preferences.getValue("cura/choice_on_profile_override");
  653. for (var i = 0; i < model.count; ++i)
  654. {
  655. if (model.get(i).code == code)
  656. {
  657. index = i;
  658. break;
  659. }
  660. }
  661. return index;
  662. }
  663. onActivated: UM.Preferences.setValue("cura/choice_on_profile_override", model.get(index).code)
  664. }
  665. }
  666. }
  667. Item
  668. {
  669. //: Spacer
  670. height: UM.Theme.getSize("default_margin").height
  671. width: UM.Theme.getSize("default_margin").height
  672. }
  673. Label
  674. {
  675. font.bold: true
  676. text: catalog.i18nc("@label", "Privacy")
  677. }
  678. UM.TooltipArea
  679. {
  680. width: childrenRect.width
  681. height: visible ? childrenRect.height : 0
  682. 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.")
  683. CheckBox
  684. {
  685. id: sendDataCheckbox
  686. text: catalog.i18nc("@option:check","Send (anonymous) print information")
  687. checked: boolCheck(UM.Preferences.getValue("info/send_slice_info"))
  688. onCheckedChanged: UM.Preferences.setValue("info/send_slice_info", checked)
  689. }
  690. Button
  691. {
  692. id: showMoreInfo
  693. anchors.top: sendDataCheckbox.bottom
  694. text: catalog.i18nc("@action:button", "More information")
  695. onClicked:
  696. {
  697. CuraApplication.showMoreInformationDialogForAnonymousDataCollection();
  698. }
  699. }
  700. }
  701. Item
  702. {
  703. //: Spacer
  704. height: UM.Theme.getSize("default_margin").height
  705. width: UM.Theme.getSize("default_margin").height
  706. }
  707. Label
  708. {
  709. font.bold: true
  710. text: catalog.i18nc("@label", "Updates")
  711. }
  712. UM.TooltipArea
  713. {
  714. width: childrenRect.width
  715. height: visible ? childrenRect.height : 0
  716. text: catalog.i18nc("@info:tooltip", "Should Cura check for updates when the program is started?")
  717. CheckBox
  718. {
  719. id: checkUpdatesCheckbox
  720. text: catalog.i18nc("@option:check","Check for updates on start")
  721. checked: boolCheck(UM.Preferences.getValue("info/automatic_update_check"))
  722. onCheckedChanged: UM.Preferences.setValue("info/automatic_update_check", checked)
  723. }
  724. }
  725. ExclusiveGroup { id: curaUpdatesGroup }
  726. UM.TooltipArea
  727. {
  728. width: childrenRect.width
  729. height: visible ? childrenRect.height : 0
  730. text: catalog.i18nc("@info:tooltip", "When checking for updates, only check for stable releases.")
  731. anchors.left: parent.left
  732. anchors.leftMargin: UM.Theme.getSize("default_margin").width
  733. RadioButton
  734. {
  735. text: catalog.i18nc("@option:radio", "Stable releases only")
  736. exclusiveGroup: curaUpdatesGroup
  737. enabled: checkUpdatesCheckbox.checked
  738. checked: UM.Preferences.getValue("info/latest_update_source") == "stable"
  739. onClicked: UM.Preferences.setValue("info/latest_update_source", "stable")
  740. }
  741. }
  742. UM.TooltipArea
  743. {
  744. width: childrenRect.width
  745. height: visible ? childrenRect.height : 0
  746. text: catalog.i18nc("@info:tooltip", "When checking for updates, check for both stable and for beta releases.")
  747. anchors.left: parent.left
  748. anchors.leftMargin: UM.Theme.getSize("default_margin").width
  749. RadioButton
  750. {
  751. text: catalog.i18nc("@option:radio", "Stable and Beta releases")
  752. exclusiveGroup: curaUpdatesGroup
  753. enabled: checkUpdatesCheckbox.checked
  754. checked: UM.Preferences.getValue("info/latest_update_source") == "beta"
  755. onClicked: UM.Preferences.setValue("info/latest_update_source", "beta")
  756. }
  757. }
  758. UM.TooltipArea
  759. {
  760. width: childrenRect.width
  761. height: visible ? childrenRect.height : 0
  762. 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!")
  763. CheckBox
  764. {
  765. id: pluginNotificationsUpdateCheckbox
  766. text: catalog.i18nc("@option:check", "Get notifications for plugin updates")
  767. checked: boolCheck(UM.Preferences.getValue("info/automatic_plugin_update_check"))
  768. onCheckedChanged: UM.Preferences.setValue("info/automatic_plugin_update_check", checked)
  769. }
  770. }
  771. /* Multi-buildplate functionality is disabled because it's broken. See CURA-4975 for the ticket to remove it.
  772. Item
  773. {
  774. //: Spacer
  775. height: UM.Theme.getSize("default_margin").height
  776. width: UM.Theme.getSize("default_margin").height
  777. }
  778. Label
  779. {
  780. font.bold: true
  781. text: catalog.i18nc("@label","Experimental")
  782. }
  783. UM.TooltipArea
  784. {
  785. width: childrenRect.width
  786. height: childrenRect.height
  787. text: catalog.i18nc("@info:tooltip","Use multi build plate functionality")
  788. CheckBox
  789. {
  790. id: useMultiBuildPlateCheckbox
  791. text: catalog.i18nc("@option:check","Use multi build plate functionality (restart required)")
  792. checked: boolCheck(UM.Preferences.getValue("cura/use_multi_build_plate"))
  793. onCheckedChanged: UM.Preferences.setValue("cura/use_multi_build_plate", checked)
  794. }
  795. }*/
  796. Connections
  797. {
  798. target: UM.Preferences
  799. function onPreferenceChanged(preference)
  800. {
  801. if (preference !== "info/send_slice_info")
  802. {
  803. return;
  804. }
  805. sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info"))
  806. }
  807. }
  808. }
  809. }
  810. }