GeneralPage.qml 39 KB

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