AboutDialog.qml 15 KB

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