AboutDialog.qml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. // Copyright (c) 2023 UltiMaker
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.4
  4. import QtQuick.Controls 2.9
  5. import QtQuick.Layouts 1.3
  6. import UM 1.6 as UM
  7. import Cura 1.6 as Cura
  8. UM.Dialog
  9. {
  10. readonly property UM.I18nCatalog catalog: UM.I18nCatalog { name: "cura" }
  11. id: base
  12. title: catalog.i18nc("@title:window The argument is the application name.", "About %1").arg(CuraApplication.applicationDisplayName)
  13. // Flag to toggle between main dependencies information and extensive dependencies information
  14. property bool showDefaultDependencies: true
  15. minimumWidth: 500 * screenScaleFactor
  16. minimumHeight: 700 * screenScaleFactor
  17. width: minimumWidth
  18. height: minimumHeight
  19. backgroundColor: UM.Theme.getColor("main_background")
  20. headerComponent: Rectangle
  21. {
  22. width: parent.width
  23. height: logo.height + 2 * UM.Theme.getSize("wide_margin").height
  24. color: UM.Theme.getColor("main_window_header_background")
  25. Image
  26. {
  27. id: logo
  28. width: Math.floor(base.width * 0.85)
  29. height: Math.floor(width * UM.Theme.getSize("logo").height / UM.Theme.getSize("logo").width)
  30. source: UM.Theme.getImage("logo")
  31. sourceSize.width: width
  32. sourceSize.height: height
  33. fillMode: Image.PreserveAspectFit
  34. anchors.centerIn: parent
  35. }
  36. Image
  37. {
  38. id: enterpriseLogo
  39. visible: CuraApplication.isEnterprise
  40. source: UM.Theme.getImage("enterprise")
  41. fillMode: Image.PreserveAspectFit
  42. anchors.bottom: parent.bottom
  43. }
  44. UM.Label
  45. {
  46. id: version
  47. text: catalog.i18nc("@label","version: %1").arg(CuraApplication.version())
  48. font: UM.Theme.getFont("large_bold")
  49. color: UM.Theme.getColor("button_text")
  50. anchors.right : logo.right
  51. anchors.top: logo.bottom
  52. }
  53. MouseArea
  54. {
  55. anchors.fill: parent
  56. onDoubleClicked: showDefaultDependencies = !showDefaultDependencies
  57. }
  58. }
  59. // Reusable component to display a dependency
  60. readonly property Component dependency_row: RowLayout
  61. {
  62. spacing: UM.Theme.getSize("default_margin").width
  63. UM.Label
  64. {
  65. text: {
  66. if (url !== "") {
  67. return `<a href="${url}">${name}</a>`;
  68. } else {
  69. return name;
  70. }
  71. }
  72. visible: text !== ""
  73. Layout.fillWidth: true
  74. Layout.preferredWidth: 1
  75. onLinkActivated: Qt.openUrlExternally(url)
  76. }
  77. UM.Label
  78. {
  79. text: description
  80. visible: text !== ""
  81. Layout.fillWidth: true
  82. Layout.preferredWidth: 2
  83. }
  84. UM.Label
  85. {
  86. text: license
  87. visible: text !== ""
  88. Layout.fillWidth: true
  89. Layout.preferredWidth: 1
  90. }
  91. UM.Label
  92. {
  93. text: version
  94. visible: text !== ""
  95. Layout.fillWidth: true
  96. Layout.preferredWidth: 1
  97. }
  98. }
  99. Flickable
  100. {
  101. id: scroll
  102. anchors.fill: parent
  103. ScrollBar.vertical: UM.ScrollBar {
  104. visible: scroll.contentHeight > height
  105. }
  106. contentHeight: content.height
  107. clip: true
  108. Column
  109. {
  110. id: content
  111. spacing: UM.Theme.getSize("default_margin").height
  112. width: parent.width
  113. UM.Label
  114. {
  115. text: catalog.i18nc("@label", "End-to-end solution for fused filament 3D printing.")
  116. font: UM.Theme.getFont("system")
  117. wrapMode: Text.WordWrap
  118. }
  119. UM.Label
  120. {
  121. text: catalog.i18nc("@info:credit", "Cura is developed by UltiMaker in cooperation with the community.\nCura proudly uses the following open source projects:")
  122. font: UM.Theme.getFont("system")
  123. wrapMode: Text.WordWrap
  124. }
  125. Column
  126. {
  127. visible: showDefaultDependencies
  128. width: parent.width
  129. Repeater
  130. {
  131. width: parent.width
  132. delegate: Loader
  133. {
  134. sourceComponent: dependency_row
  135. width: parent.width
  136. property string name: model.name
  137. property string description: model.description
  138. property string license: model.license
  139. property string url: model.url
  140. property string version: ""
  141. }
  142. model: ListModel
  143. {
  144. id: projectsModel
  145. }
  146. Component.onCompleted:
  147. {
  148. //Do NOT add dependencies of our dependencies here, nor CI-dependencies!
  149. //UltiMaker's own projects and forks.
  150. projectsModel.append({ name: "Cura", description: catalog.i18nc("@label Description for application component", "Graphical user interface"), license: "LGPLv3", url: "https://github.com/Ultimaker/Cura" });
  151. projectsModel.append({ name: "Uranium", description: catalog.i18nc("@label Description for application component", "Application framework"), license: "LGPLv3", url: "https://github.com/Ultimaker/Uranium" });
  152. projectsModel.append({ name: "CuraEngine", description: catalog.i18nc("@label Description for application component", "G-code generator"), license: "AGPLv3", url: "https://github.com/Ultimaker/CuraEngine" });
  153. projectsModel.append({ name: "libArcus", description: catalog.i18nc("@label Description for application component", "Interprocess communication library"), license: "LGPLv3", url: "https://github.com/Ultimaker/libArcus" });
  154. projectsModel.append({ name: "pynest2d", description: catalog.i18nc("@label Description for application component", "Python bindings for libnest2d"), license: "LGPL", url: "https://github.com/Ultimaker/pynest2d" });
  155. projectsModel.append({ name: "libnest2d", description: catalog.i18nc("@label Description for application component", "Polygon packing library, developed by Prusa Research"), license: "LGPL", url: "https://github.com/tamasmeszaros/libnest2d" });
  156. projectsModel.append({ name: "libSavitar", description: catalog.i18nc("@label Description for application component", "Support library for handling 3MF files"), license: "LGPLv3", url: "https://github.com/ultimaker/libsavitar" });
  157. projectsModel.append({ name: "libCharon", description: catalog.i18nc("@label Description for application component", "Support library for file metadata and streaming"), license: "LGPLv3", url: "https://github.com/ultimaker/libcharon" });
  158. //Direct dependencies of the front-end.
  159. projectsModel.append({ name: "Python", description: catalog.i18nc("@label Description for application dependency", "Programming language"), license: "Python", url: "http://python.org/" });
  160. projectsModel.append({ name: "Qt6", description: catalog.i18nc("@label Description for application dependency", "GUI framework"), license: "LGPLv3", url: "https://www.qt.io/" });
  161. projectsModel.append({ name: "PyQt", description: catalog.i18nc("@label Description for application dependency", "GUI framework bindings"), license: "GPL", url: "https://riverbankcomputing.com/software/pyqt" });
  162. projectsModel.append({ name: "SIP", description: catalog.i18nc("@label Description for application dependency", "C/C++ Binding library"), license: "GPL", url: "https://riverbankcomputing.com/software/sip" });
  163. projectsModel.append({ name: "Protobuf", description: catalog.i18nc("@label Description for application dependency", "Data interchange format"), license: "BSD", url: "https://developers.google.com/protocol-buffers" });
  164. projectsModel.append({ name: "Noto Sans", description: catalog.i18nc("@label", "Font"), license: "Apache 2.0", url: "https://www.google.com/get/noto/" });
  165. //CuraEngine's dependencies.
  166. projectsModel.append({ name: "Clipper", description: catalog.i18nc("@label Description for application dependency", "Polygon clipping library"), license: "Boost", url: "http://www.angusj.com/delphi/clipper.php" });
  167. projectsModel.append({ name: "RapidJSON", description: catalog.i18nc("@label Description for application dependency", "JSON parser"), license: "MIT", url: "https://rapidjson.org/" });
  168. projectsModel.append({ name: "STB", description: catalog.i18nc("@label Description for application dependency", "Utility functions, including an image loader"), license: "Public Domain", url: "https://github.com/nothings/stb" });
  169. projectsModel.append({ name: "Boost", description: catalog.i18nc("@label Description for application dependency", "Utility library, including Voronoi generation"), license: "Boost", url: "https://www.boost.org/" });
  170. //Python modules.
  171. projectsModel.append({ name: "Certifi", description: catalog.i18nc("@label Description for application dependency", "Root Certificates for validating SSL trustworthiness"), license: "MPL", url: "https://github.com/certifi/python-certifi" });
  172. projectsModel.append({ name: "Cryptography", description: catalog.i18nc("@label Description for application dependency", "Root Certificates for validating SSL trustworthiness"), license: "APACHE and BSD", url: "https://cryptography.io/" });
  173. projectsModel.append({ name: "Future", description: catalog.i18nc("@label Description for application dependency", "Compatibility between Python 2 and 3"), license: "MIT", url: "https://python-future.org/" });
  174. projectsModel.append({ name: "keyring", description: catalog.i18nc("@label Description for application dependency", "Support library for system keyring access"), license: "MIT", url: "https://github.com/jaraco/keyring" });
  175. projectsModel.append({ name: "NumPy", description: catalog.i18nc("@label Description for application dependency", "Support library for faster math"), license: "BSD", url: "http://www.numpy.org/" });
  176. projectsModel.append({ name: "NumPy-STL", description: catalog.i18nc("@label Description for application dependency", "Support library for handling STL files"), license: "BSD", url: "https://github.com/WoLpH/numpy-stl" });
  177. projectsModel.append({ name: "PyClipper", description: catalog.i18nc("@label Description for application dependency", "Python bindings for Clipper"), license: "MIT", url: "https://github.com/fonttools/pyclipper" });
  178. projectsModel.append({ name: "PySerial", description: catalog.i18nc("@label Description for application dependency", "Serial communication library"), license: "Python", url: "http://pyserial.sourceforge.net/" });
  179. projectsModel.append({ name: "SciPy", description: catalog.i18nc("@label Description for application dependency", "Support library for scientific computing"), license: "BSD-new", url: "https://www.scipy.org/" });
  180. projectsModel.append({ name: "Sentry", description: catalog.i18nc("@Label Description for application dependency", "Python Error tracking library"), license: "BSD 2-Clause 'Simplified'", url: "https://sentry.io/for/python/" });
  181. projectsModel.append({ name: "Trimesh", description: catalog.i18nc("@label Description for application dependency", "Support library for handling triangular meshes"), license: "MIT", url: "https://trimsh.org" });
  182. projectsModel.append({ name: "python-zeroconf", description: catalog.i18nc("@label Description for application dependency", "ZeroConf discovery library"), license: "LGPL", url: "https://github.com/jstasiak/python-zeroconf" });
  183. //Building/packaging.
  184. projectsModel.append({ name: "CMake", description: catalog.i18nc("@label Description for development tool", "Universal build system configuration"), license: "BSD 3-Clause", url: "https://cmake.org/" });
  185. projectsModel.append({ name: "Conan", description: catalog.i18nc("@label Description for development tool", "Dependency and package manager"), license: "MIT", url: "https://conan.io/" });
  186. projectsModel.append({ name: "Pyinstaller", description: catalog.i18nc("@label Description for development tool", "Packaging Python-applications"), license: "GPLv2", url: "https://pyinstaller.org/" });
  187. projectsModel.append({ name: "AppImageKit", description: catalog.i18nc("@label Description for development tool", "Linux cross-distribution application deployment"), license: "MIT", url: "https://github.com/AppImage/AppImageKit" });
  188. projectsModel.append({ name: "NSIS", description: catalog.i18nc("@label Description for development tool", "Generating Windows installers"), license: "Zlib", url: "https://nsis.sourceforge.io/" });
  189. }
  190. }
  191. }
  192. UM.Label
  193. {
  194. visible: !showDefaultDependencies
  195. text: "Conan Installs"
  196. font: UM.Theme.getFont("large_bold")
  197. }
  198. Column
  199. {
  200. visible: !showDefaultDependencies
  201. width: parent.width
  202. Repeater
  203. {
  204. width: parent.width
  205. model: Object
  206. .entries(CuraApplication.conanInstalls)
  207. .map(([name, { version }]) => ({ name, version }))
  208. delegate: Loader
  209. {
  210. sourceComponent: dependency_row
  211. width: parent.width
  212. property string name: modelData.name
  213. property string version: modelData.version
  214. property string license: ""
  215. property string url: ""
  216. property string description: ""
  217. }
  218. }
  219. }
  220. UM.Label
  221. {
  222. visible: !showDefaultDependencies
  223. text: "Python Installs"
  224. font: UM.Theme.getFont("large_bold")
  225. }
  226. Column
  227. {
  228. width: parent.width
  229. visible: !showDefaultDependencies
  230. Repeater
  231. {
  232. delegate: Loader
  233. {
  234. sourceComponent: dependency_row
  235. width: parent.width
  236. property string name: modelData.name
  237. property string version: modelData.version
  238. property string license: ""
  239. property string url: ""
  240. property string description: ""
  241. }
  242. width: parent.width
  243. model: Object
  244. .entries(CuraApplication.pythonInstalls)
  245. .map(([name, { version }]) => ({ name, version }))
  246. }
  247. }
  248. }
  249. }
  250. rightButtons: Cura.TertiaryButton
  251. {
  252. id: closeButton
  253. text: catalog.i18nc("@action:button", "Close")
  254. onClicked: reject()
  255. }
  256. }