GeneralPage.qml 47 KB

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