GeneralPage.qml 37 KB

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