| 15 | from PythonQt import QtCore, QtGui, QtUiTools |
| 16 | |
| 17 | def showDialog(mainWindow): |
| 18 | |
| 19 | loader = QtUiTools.QUiLoader() |
| 20 | uifile = QtCore.QFile(':/vvResources/vvAboutDialog.ui') |
| 21 | if not uifile.open(uifile.ReadOnly): |
| 22 | print("Canno't open the ui for the about dialog.") |
| 23 | return |
| 24 | |
| 25 | dialog = loader.load(uifile, mainWindow) |
| 26 | uifile.close() |
| 27 | dialog.setModal(True) |
| 28 | |
| 29 | # Delete "?" Button that appears on windows os |
| 30 | # Rewrite the flags without QtCore.Qt.WindowContextHelpButtonHint |
| 31 | flags = QtCore.Qt.Dialog | QtCore.Qt.WindowStaysOnTopHint | QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowCloseButtonHint |
| 32 | dialog.setWindowFlags(flags) |
| 33 | |
| 34 | def w(name): |
| 35 | for widget in dialog.children(): |
| 36 | if widget.objectName == name: |
| 37 | return widget |
| 38 | |
| 39 | image = w('splashLabel') |
| 40 | splash = image.pixmap.scaled(image.pixmap.width()/2.0, image.pixmap.height()/2.0) |
| 41 | image.setPixmap(splash) |
| 42 | image.adjustSize() |
| 43 | |
| 44 | appName = mainWindow.windowTitle.split(" ")[0] |
| 45 | appVersionTag = mainWindow.windowTitle.split(" ")[1] |
| 46 | appBitTag = mainWindow.windowTitle.split(" ")[2] |
| 47 | dialog.windowTitle = "About " + appName + " ..." |
| 48 | copyrightText = '''<h1>{0} {1} {2}</h1><br/> |
| 49 | Copyright (c) 2013-2021, Velodyne Lidar, |
| 50 | Copyright (c) 2016-2021, Kitware<br /> |
| 51 | Provided by <a href="http://velodynelidar.com/">Velodyne Lidar</a>, coded by <a href="https://www.kitware.com/">Kitware</a>.<br /> |
| 52 | <br /> |
| 53 | Sample Data Repository: <a href="http://midas3.kitware.com/midas/community/29">http://midas3.kitware.com/midas/community/29</a> |
| 54 | '''.format(appName, appVersionTag, appBitTag) |
| 55 | w('copyrightLabel').setText(copyrightText) |
| 56 | |
| 57 | textBoxContent = '''<h4>Want more ? Ask Kitware !</h4> |
| 58 | Kitware Inc. is a leading provider of open-source software systems for technical and scientific computing. |
| 59 | We are the developers of VeloView, providing real-time interactive visualization of live captured 3D LiDAR |
| 60 | data from Velodyne's sensors. We create customized solutions providing detection and tracking of people, |
| 61 | street signs, lane markings, vehicles, industrial machinery, and building facades from within VeloView or using |
| 62 | combinations of point cloud and video data. We also provide Lidar-based SLAM algorithms for other Velodyne's integrators. |
| 63 | We work with customers to create tailored solutions using proven open-source |
| 64 | technologies, avoiding vendor lock-in and leveraging our world-leading experience in visualization, computer vision, high-performance |
| 65 | computing, and test-driven high-quality software process.<br /> |
| 66 | <br /> |
| 67 | <br /> |
| 68 | Have a look at <a href="https://www.kitware.com/our-expertise/">our expertise</a>, and for more information, please contact us: |
| 69 | <a href="mailto:kitware@kitware.fr?subject=Contact+about+VeloView">kitware@kitware.fr</a> |
| 70 | ''' |
| 71 | w('detailsLabel').setText(textBoxContent) |
| 72 | |
| 73 | |
| 74 | button = w('closeButton') |