ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
AboutDialog.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include "AboutDialog.h"
9 #include "PythonInterpreter.h"
10 #include "Resources.h"
11 
12 #include <ui_AboutDialog.h>
13 
14 #undef slots
15 #include <pybind11/pybind11.h>
16 
17 AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), m_dlg(new Ui_AboutDialog)
18 {
19  m_dlg->setupUi(this);
20  setWindowIcon(QIcon(ABOUT_ICON_PATH));
21 
22  connect(m_dlg->okBtn, &QPushButton::clicked, this, &QDialog::close);
24  {
25  const char *versionStr = Py_GetVersion();
26  m_dlg->pythonVersionLabel->setText(QString(versionStr));
27  }
28  else
29  {
30  m_dlg->pythonVersionLabel->setText(QString("Unknown python version"));
31  }
32 }
33 
35 {
36  delete m_dlg;
37 }
#define ABOUT_ICON_PATH
Definition: Resources.h:13
~AboutDialog() noexcept override
Definition: AboutDialog.cpp:34
AboutDialog(QWidget *parent=nullptr)
Definition: AboutDialog.cpp:17
static bool IsInitialized()