NDEVR
API Documentation
NDEVRActivationDialog.h
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;
17 class NDEVRActivationDialog : public QWidget
18 {
19 Q_OBJECT
20 public:
25 NDEVRActivationDialog(QWidget* parent = nullptr);
26 ~NDEVRActivationDialog();
30 static void PerformActivationCheck();
31 virtual void showEvent(QShowEvent* event) override;
32 virtual void hideEvent(QHideEvent* event) override;
36 void updateInformationUI();
41 void setActivationID(const String& id);
45 void saveOptions();
49 void tryToActivate();
54 void showButtons(bool buttons);
59 void onActivationFileSelected(const File& file);
63 void updateInternetTime();
67 void updateDemoTimes();
72 String activationCode() const;
73 public:
78 static void SetActivationDialogShowing(bool is_showing);
83 static void SetShowActivationOverride(std::function<void()> function);
84 protected:
88 void retranslate();
89 signals:
90 void onActivatedSignal();
91 void onActivationFailedSignal();
92 void onAcceptedSignal();
93 protected:
97 void onIncorrectActivation();
101 void onCorrectActivation();
102 protected:
103 static bool s_is_activation_showing;
104 static bool s_has_shown_activation_dialog;
105 Ui::NDEVRActivationDialogUI* ui;
106 FileChooserDialog* m_selection_dialog = nullptr;
107 bool m_showing_file_browser = false;
108 String m_activation_id;
109 static std::function<void()> s_show_activation_override;
110 };
111}
112#endif
A dialog designed to allow the user to navigate a filesytem and select or create one or more files or...
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Definition File.h:53
The primary namespace for the NDEVR SDK.