AboutDialog.qml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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. fillMode: Image.PreserveAspectFit
  32. anchors.centerIn: parent
  33. }
  34. UM.Label
  35. {
  36. id: version
  37. text: catalog.i18nc("@label","version: %1").arg(UM.Application.version)
  38. font: UM.Theme.getFont("large_bold")
  39. color: UM.Theme.getColor("button_text")
  40. anchors.right : logo.right
  41. anchors.top: logo.bottom
  42. }
  43. MouseArea
  44. {
  45. anchors.fill: parent
  46. onDoubleClicked: showDefaultDependencies = !showDefaultDependencies
  47. }
  48. }
  49. // Reusable component to display a dependency
  50. readonly property Component dependency_row: RowLayout
  51. {
  52. spacing: UM.Theme.getSize("default_margin").width
  53. UM.Label
  54. {
  55. text: {
  56. if (url !== "") {
  57. return `<a href="${url}">${name}</a>`;
  58. } else {
  59. return name;
  60. }
  61. }
  62. visible: text !== ""
  63. Layout.fillWidth: true
  64. Layout.preferredWidth: 1
  65. onLinkActivated: Qt.openUrlExternally(url)
  66. }
  67. UM.Label
  68. {
  69. text: description
  70. visible: text !== ""
  71. Layout.fillWidth: true
  72. Layout.preferredWidth: 2
  73. }
  74. UM.Label
  75. {
  76. text: license
  77. visible: text !== ""
  78. Layout.fillWidth: true
  79. Layout.preferredWidth: 1
  80. }
  81. UM.Label
  82. {
  83. text: version
  84. visible: text !== ""
  85. Layout.fillWidth: true
  86. Layout.preferredWidth: 1
  87. }
  88. }
  89. Flickable
  90. {
  91. anchors.fill: parent
  92. ScrollBar.vertical: UM.ScrollBar {
  93. visible: contentHeight > height
  94. }
  95. contentHeight: content.height
  96. clip: true
  97. Column
  98. {
  99. id: content
  100. spacing: UM.Theme.getSize("default_margin").height
  101. width: parent.width
  102. UM.Label
  103. {
  104. text: catalog.i18nc("@label", "End-to-end solution for fused filament 3D printing.")
  105. font: UM.Theme.getFont("system")
  106. wrapMode: Text.WordWrap
  107. }
  108. UM.Label
  109. {
  110. text: catalog.i18nc("@info:credit", "Cura is developed by UltiMaker in cooperation with the community.\nCura proudly uses the following open source projects:")
  111. font: UM.Theme.getFont("system")
  112. wrapMode: Text.WordWrap
  113. }
  114. Column
  115. {
  116. visible: showDefaultDependencies
  117. width: parent.width
  118. Repeater
  119. {
  120. width: parent.width
  121. delegate: Loader
  122. {
  123. sourceComponent: dependency_row
  124. width: parent.width
  125. property string name: model.name
  126. property string description: model.description
  127. property string license: model.license
  128. property string url: model.url
  129. property string version: ""
  130. }
  131. model: ListModel
  132. {
  133. id: projectsModel
  134. }
  135. Component.onCompleted:
  136. {
  137. //Do NOT add dependencies of our dependencies here, nor CI-dependencies!
  138. //UltiMaker's own projects and forks.
  139. projectsModel.append({ name: "Cura", description: catalog.i18nc("@label Description for application component", "Graphical user interface"), license: "LGPLv3", url: "https://github.com/Ultimaker/Cura" });
  140. projectsModel.append({ name: "Uranium", description: catalog.i18nc("@label Description for application component", "Application framework"), license: "LGPLv3", url: "https://github.com/Ultimaker/Uranium" });
  141. projectsModel.append({ name: "CuraEngine", description: catalog.i18nc("@label Description for application component", "G-code generator"), license: "AGPLv3", url: "https://github.com/Ultimaker/CuraEngine" });
  142. projectsModel.append({ name: "libArcus", description: catalog.i18nc("@label Description for application component", "Interprocess communication library"), license: "LGPLv3", url: "https://github.com/Ultimaker/libArcus" });
  143. projectsModel.append({ name: "pynest2d", description: catalog.i18nc("@label Description for application component", "Python bindings for libnest2d"), license: "LGPL", url: "https://github.com/Ultimaker/pynest2d" });
  144. 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" });
  145. 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" });
  146. 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" });
  147. //Direct dependencies of the front-end.
  148. projectsModel.append({ name: "Python", description: catalog.i18nc("@label Description for application dependency", "Programming language"), license: "Python", url: "http://python.org/" });
  149. projectsModel.append({ name: "Qt6", description: catalog.i18nc("@label Description for application dependency", "GUI framework"), license: "LGPLv3", url: "https://www.qt.io/" });
  150. projectsModel.append({ name: "PyQt", description: catalog.i18nc("@label Description for application dependency", "GUI framework bindings"), license: "GPL", url: "https://riverbankcomputing.com/software/pyqt" });
  151. projectsModel.append({ name: "SIP", description: catalog.i18nc("@label Description for application dependency", "C/C++ Binding library"), license: "GPL", url: "https://riverbankcomputing.com/software/sip" });
  152. projectsModel.append({ name: "Protobuf", description: catalog.i18nc("@label Description for application dependency", "Data interchange format"), license: "BSD", url: "https://developers.google.com/protocol-buffers" });
  153. projectsModel.append({ name: "Noto Sans", description: catalog.i18nc("@label", "Font"), license: "Apache 2.0", url: "https://www.google.com/get/noto/" });
  154. //CuraEngine's dependencies.
  155. 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" });
  156. projectsModel.append({ name: "RapidJSON", description: catalog.i18nc("@label Description for application dependency", "JSON parser"), license: "MIT", url: "https://rapidjson.org/" });
  157. 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" });
  158. projectsModel.append({ name: "Boost", description: catalog.i18nc("@label Description for application dependency", "Utility library, including Voronoi generation"), license: "Boost", url: "https://www.boost.org/" });
  159. //Python modules.
  160. 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" });
  161. 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/" });
  162. 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/" });
  163. 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" });
  164. projectsModel.append({ name: "NumPy", description: catalog.i18nc("@label Description for application dependency", "Support library for faster math"), license: "BSD", url: "http://www.numpy.org/" });
  165. 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" });
  166. projectsModel.append({ name: "PyClipper", description: catalog.i18nc("@label Description for application dependency", "Python bindings for Clipper"), license: "MIT", url: "https://github.com/fonttools/pyclipper" });
  167. projectsModel.append({ name: "PySerial", description: catalog.i18nc("@label Description for application dependency", "Serial communication library"), license: "Python", url: "http://pyserial.sourceforge.net/" });
  168. 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/" });
  169. 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/" });
  170. projectsModel.append({ name: "Trimesh", description: catalog.i18nc("@label Description for application dependency", "Support library for handling triangular meshes"), license: "MIT", url: "https://trimsh.org" });
  171. 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" });
  172. //Building/packaging.
  173. projectsModel.append({ name: "CMake", description: catalog.i18nc("@label Description for development tool", "Universal build system configuration"), license: "BSD 3-Clause", url: "https://cmake.org/" });
  174. projectsModel.append({ name: "Conan", description: catalog.i18nc("@label Description for development tool", "Dependency and package manager"), license: "MIT", url: "https://conan.io/" });
  175. projectsModel.append({ name: "Pyinstaller", description: catalog.i18nc("@label Description for development tool", "Packaging Python-applications"), license: "GPLv2", url: "https://pyinstaller.org/" });
  176. 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" });
  177. projectsModel.append({ name: "NSIS", description: catalog.i18nc("@label Description for development tool", "Generating Windows installers"), license: "Zlib", url: "https://nsis.sourceforge.io/" });
  178. }
  179. }
  180. }
  181. UM.Label
  182. {
  183. visible: !showDefaultDependencies
  184. text: "Conan Installs"
  185. font: UM.Theme.getFont("large_bold")
  186. }
  187. Column
  188. {
  189. visible: !showDefaultDependencies
  190. width: parent.width
  191. Repeater
  192. {
  193. width: parent.width
  194. model: Object
  195. .entries(CuraApplication.conanInstalls)
  196. .map(([name, { version }]) => ({ name, version }))
  197. delegate: Loader
  198. {
  199. sourceComponent: dependency_row
  200. width: parent.width
  201. property string name: modelData.name
  202. property string version: modelData.version
  203. property string license: ""
  204. property string url: ""
  205. property string description: ""
  206. }
  207. }
  208. }
  209. UM.Label
  210. {
  211. visible: !showDefaultDependencies
  212. text: "Python Installs"
  213. font: UM.Theme.getFont("large_bold")
  214. }
  215. Column
  216. {
  217. width: parent.width
  218. visible: !showDefaultDependencies
  219. Repeater
  220. {
  221. delegate: Loader
  222. {
  223. sourceComponent: dependency_row
  224. width: parent.width
  225. property string name: modelData.name
  226. property string version: modelData.version
  227. property string license: ""
  228. property string url: ""
  229. property string description: ""
  230. }
  231. width: parent.width
  232. model: Object
  233. .entries(CuraApplication.pythonInstalls)
  234. .map(([name, { version }]) => ({ name, version }))
  235. }
  236. }
  237. }
  238. }
  239. rightButtons: Cura.TertiaryButton
  240. {
  241. id: closeButton
  242. text: catalog.i18nc("@action:button", "Close")
  243. onClicked: reject()
  244. }
  245. }