ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
q3DMASCDisclaimerDialog.h
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 #pragma once
9 
10 #include <ui_classifyDisclaimerDlg.h>
11 #include <ui_trainDisclaimerDlg.h>
12 
13 // qCC_plugins
14 #include <ecvMainAppInterface.h>
15 
16 // Qt
17 #include <QMainWindow>
18 
20 class TrainDisclaimerDialog : public QDialog, public Ui::TrainDisclaimerDialog {
21 public:
23  TrainDisclaimerDialog(QWidget* parent = 0)
24  : QDialog(parent), Ui::TrainDisclaimerDialog() {
25  setupUi(this);
26 
27  QString compilationInfo;
28  compilationInfo += "Version " + QString(Q3DMASC_VERSION);
29  compilationInfo += QStringLiteral("<br><i>Compiled with");
30 
31 #if defined(_MSC_VER)
32  compilationInfo += QStringLiteral(" MSVC %1 and").arg(_MSC_VER);
33 #endif
34 
35  compilationInfo += QStringLiteral(" Qt %1").arg(QT_VERSION_STR);
36  compilationInfo += QStringLiteral("</i>");
37  compilationInfo += " [cc " + QString(GIT_BRANCH_CC) + "/" +
38  QString(GIT_COMMMIT_HASH_CC) + "]";
39  compilationInfo += " [3dmasc " + QString(GIT_TAG_3DMASC) + " " +
40  QString(GIT_BRANCH_3DMASC) + "/" +
41  QString(GIT_COMMMIT_HASH_3DMASC) + "]";
42 
43  label_compilationInformation->setText(compilationInfo);
44  }
45 };
46 
47 // whether disclaimer has already been displayed (and accepted) or not
48 static bool s_trainDisclaimerAccepted = false;
49 
52  // if the user "cancels" it, then he refuses the diclaimer!
54  TrainDisclaimerDialog(app ? app->getMainWindow() : 0).exec();
55  }
56 
58 }
59 
61 class ClassifyDisclaimerDialog : public QDialog,
62  public Ui::ClassifyDisclaimerDialog {
63 public:
65  ClassifyDisclaimerDialog(QWidget* parent = 0)
66  : QDialog(parent), Ui::ClassifyDisclaimerDialog() {
67  setupUi(this);
68 
69  QString compilationInfo;
70  compilationInfo += "Version " + QString(Q3DMASC_VERSION);
71  compilationInfo += QStringLiteral("<br><i>Compiled with");
72 
73 #if defined(_MSC_VER)
74  compilationInfo += QStringLiteral(" MSVC %1 and").arg(_MSC_VER);
75 #endif
76 
77  compilationInfo += QStringLiteral(" Qt %1").arg(QT_VERSION_STR);
78  compilationInfo += QStringLiteral("</i>");
79  compilationInfo += " [cc " + QString(GIT_BRANCH_CC) + "/" +
80  QString(GIT_COMMMIT_HASH_CC) + "]";
81  compilationInfo += " [3dmasc " + QString(GIT_TAG_3DMASC) + " " +
82  QString(GIT_BRANCH_3DMASC) + "/" +
83  QString(GIT_COMMMIT_HASH_3DMASC) + "]";
84 
85  label_compilationInformation->setText(compilationInfo);
86  }
87 };
88 
89 // whether disclaimer has already been displayed (and accepted) or not
90 static bool s_classifyDisclaimerAccepted = false;
91 
94  // if the user "cancels" it, then he refuses the diclaimer!
96  ClassifyDisclaimerDialog(app ? app->getMainWindow() : 0).exec();
97  }
98 
100 }
Dialog for displaying the M3C2/UEB disclaimer.
ClassifyDisclaimerDialog(QWidget *parent=0)
Default constructor.
Dialog for displaying the 3DSMAC/UEB disclaimer.
TrainDisclaimerDialog(QWidget *parent=0)
Default constructor.
Main application interface (for plugins)
virtual QMainWindow * getMainWindow()=0
Returns main window.
static bool ShowClassifyDisclaimer(ecvMainAppInterface *app)
static bool ShowTrainDisclaimer(ecvMainAppInterface *app)
static bool s_classifyDisclaimerAccepted
static bool s_trainDisclaimerAccepted