GeneralPage.qml 40 KB

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