GeneralPage.qml 32 KB

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