ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
G3PointDisclaimer.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 "G3PointDisclaimer.h"
9 
10 #include "ui_G3PointDisclaimer.h"
11 
12 // qCC_plugins
13 #include <ecvMainAppInterface.h>
14 
15 // Qt
16 #include <QMainWindow>
17 
18 bool G3PointDisclaimer::s_disclaimerAccepted = false;
19 
21  : QDialog(parent), ui(new Ui::G3PointDisclaimer) {
22  ui->setupUi(this);
23 
24  QString compilationInfo;
25  compilationInfo += "Version " + QString(G3POINT_VERSION);
26  compilationInfo += QStringLiteral("<br><i>Compiled with");
27 
28 #if defined(_MSC_VER)
29  compilationInfo += QStringLiteral(" MSVC %1 and").arg(_MSC_VER);
30 #endif
31 
32  compilationInfo += QStringLiteral(" Qt %1").arg(QT_VERSION_STR);
33  compilationInfo += QStringLiteral("</i>");
34  compilationInfo += " [cc " + QString(GIT_BRANCH_CC) + "/" +
35  QString(GIT_COMMMIT_HASH_CC) + "]";
36  compilationInfo += " [g3point " + QString(GIT_TAG_G3POINT) + " " +
37  QString(GIT_BRANCH_G3POINT) + "/" +
38  QString(GIT_COMMMIT_HASH_G3POINT) + "]";
39 
40  ui->labelCompilationInformation->setText(compilationInfo);
41 }
42 
44 
46  if (!s_disclaimerAccepted) {
47  // if the user "cancels" it, then he refuses the disclaimer
48  s_disclaimerAccepted =
49  G3PointDisclaimer(app ? app->getMainWindow() : 0).exec();
50  }
51 
52  return s_disclaimerAccepted;
53 }
static bool show(ecvMainAppInterface *app)
G3PointDisclaimer(QWidget *parent=nullptr)
Main application interface (for plugins)
virtual QMainWindow * getMainWindow()=0
Returns main window.