GeneralPage.qml 35 KB

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