GeneralPage.qml 34 KB

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