-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlicensevalidationdialog.h
61 lines (51 loc) · 1.44 KB
/
licensevalidationdialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef LICENSEVALIDATIONDIALOG_H
#define LICENSEVALIDATIONDIALOG_H
#include <QDialog>
#include <QDebug>
#include <QPixmap>
#include <QCryptographicHash>
#include <QMessageBox>
#include <QSettings>
#include <QFile>
#include <QDate>
#include <QProcess>
QT_BEGIN_NAMESPACE
namespace Ui { class LicenseValidationDialog; }
QT_END_NAMESPACE
class LicenseValidationDialog : public QDialog
{
Q_OBJECT
public:
LicenseValidationDialog(QWidget *parent = nullptr);
~LicenseValidationDialog();
bool CheckBasicValid();
bool valid = false;
private slots:
void processStarted();
void readyReadStandardOutput();
void encodingFinished();
void on_pushButton_OK_clicked();
void on_pushButton_cancel_clicked();
private:
Ui::LicenseValidationDialog *ui;
//DO NOT TOUCH
QProcess* process;
QStringList RunCommand(QString command);
void delay_MSec(unsigned int msec);
void SetupScript();
QString GetNTPDate();
void PrepareWindow();
void SetLanguage();
bool silent = false;
QStringList language_pack;
QString error1, error2, error3, error4;
bool CheckLicense(QString license_key, QString license_hash, QString user_name, QString expiration_time);
void SaveLicenseFile(QString license_key, QString license_hash, QString user_name, QString expiration_time);
//DEVELOPER SETTINGS
QString API_KEY = "";
QString NTP_SERVER = "";
bool save_license = true;
bool set_custom_language = false;
QString custom_language_file_path = "";
};
#endif // LICENSEVALIDATIONDIALOG_H