API Documentation
Loading...
Searching...
No Matches
NDEVRActivationDialog.h
Go to the documentation of this file.
1#pragma once
2#include <NDEVR/String.h>
3#if NDEVR_SECURITY
4#include <QWidget>
5#include <functional>
6namespace Ui
7{
8 class NDEVRActivationDialogUI;
9}
10namespace NDEVR
11{
12 class File;
13 class FileChooserDialog;
14 /**--------------------------------------------------------------------------------------------------
15 \brief Shown when the software needs to be activated and allows the user to input activation information
16 **/
17 class NDEVRActivationDialog : public QWidget
18 {
19 Q_OBJECT
20 public:
21 NDEVRActivationDialog(QWidget* parent = nullptr);
22 ~NDEVRActivationDialog();
23 static void PerformActivationCheck();
24 virtual void showEvent(QShowEvent* event) override;
25 virtual void hideEvent(QHideEvent* event) override;
26 void updateInformationUI();
27 void setActivationID(const String& id);
28 void saveOptions();
29 void tryToActivate();
30 void showButtons(bool buttons);
31 void onActivationFileSelected(const File& file);
32 void updateInternetTime();
33 void updateDemoTimes();
34 String activationCode() const;
35 public:
36 static void SetActivationDialogShowing(bool is_showing);
37 static void SetShowActivationOverride(std::function<void()> function);
38 protected:
39 void retranslate();
40 signals:
41 void onActivatedSignal();
42 void onActivationFailedSignal();
43 void onAcceptedSignal();
44 protected:
45 void onIncorrectActivation();
46 void onCorrectActivation();
47 protected:
48 static bool s_is_activation_showing;
49 static bool s_has_shown_activation_dialog;
50 Ui::NDEVRActivationDialogUI* ui;
51 FileChooserDialog* m_selection_dialog = nullptr;
52 bool m_showing_file_browser = false;
53 String m_activation_id;
54 static std::function<void()> s_show_activation_override;
55 };
56}
57#endif
Definition ACIColor.h:37
Definition FontEditor.h:6