GeneralPage.qml 38 KB

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