Sandboxie/SandboxiePlus/SandMan/Wizards/SetupWizard.h

198 lines
3.8 KiB
C
Raw Normal View History

2022-05-14 14:42:10 +01:00
#pragma once
#include <QWizard>
QT_BEGIN_NAMESPACE
class QCheckBox;
class QLabel;
class QLineEdit;
class QRadioButton;
QT_END_NAMESPACE
2023-07-01 17:54:53 +01:00
#define SETUP_LVL_1 1
#define SETUP_LVL_2 2
#define SETUP_LVL_CURRENT SETUP_LVL_2
2022-05-14 14:42:10 +01:00
class CSetupWizard : public QWizard
{
Q_OBJECT
public:
2023-07-01 17:54:53 +01:00
enum { Page_Intro, Page_Certificate, Page_UI, Page_Shell, Page_Update, Page_Finish };
2022-05-14 14:42:10 +01:00
2023-07-01 17:54:53 +01:00
CSetupWizard(int iOldLevel = 0, QWidget *parent = nullptr);
2022-05-14 14:42:10 +01:00
2023-07-01 17:54:53 +01:00
static bool ShowWizard(int iOldLevel = 0);
2022-05-14 14:42:10 +01:00
2022-08-05 17:23:19 +01:00
static void ShellUninstall();
2022-05-14 14:42:10 +01:00
private slots:
void showHelp();
};
//////////////////////////////////////////////////////////////////////////////////////////
// CIntroPage
//
class CIntroPage : public QWizardPage
{
Q_OBJECT
public:
CIntroPage(QWidget *parent = nullptr);
int nextId() const override;
bool isComplete() const override;
private:
QLabel* m_pLabel;
2022-06-06 18:46:03 +01:00
QRadioButton *m_pPersonal;
QRadioButton *m_pBusiness;
2022-05-14 14:42:10 +01:00
};
//////////////////////////////////////////////////////////////////////////////////////////
// CCertificatePage
//
class CCertificatePage : public QWizardPage
{
Q_OBJECT
public:
CCertificatePage(QWidget *parent = nullptr);
void initializePage() override;
int nextId() const override;
bool isComplete() const override;
bool validatePage() override;
2023-08-15 08:49:03 +01:00
private slots:
void OnCertData(const QByteArray& Certificate, const QVariantMap& Params);
2022-05-14 14:42:10 +01:00
private:
QLabel* m_pTopLabel;
QPlainTextEdit* m_pCertificate;
2023-08-15 08:49:03 +01:00
QLineEdit* m_pSerial;
2022-05-14 14:42:10 +01:00
QCheckBox* m_pEvaluate;
};
//////////////////////////////////////////////////////////////////////////////////////////
2022-06-06 18:46:03 +01:00
// CUIPage
//
class CUIPage : public QWizardPage
{
Q_OBJECT
public:
CUIPage(QWidget *parent = nullptr);
void initializePage() override;
int nextId() const override;
private slots:
void UpdatePreview();
private:
QRadioButton *m_pSimple;
QRadioButton *m_pAdvanced;
2022-07-09 10:46:07 +01:00
QRadioButton *m_pClassic;
2022-06-06 18:46:03 +01:00
QLabel* m_pPreview;
QRadioButton* m_pBrightMode;
QRadioButton* m_pDarkMode;
};
//////////////////////////////////////////////////////////////////////////////////////////
2022-05-14 14:42:10 +01:00
// CShellPage
//
class CShellPage : public QWizardPage
{
Q_OBJECT
public:
2024-05-25 13:28:56 +01:00
CShellPage(QWidget *parent = nullptr);
2022-05-14 14:42:10 +01:00
int nextId() const override;
2024-05-25 13:46:00 +01:00
private slots:
void OnEditOnlyAdmin();
2022-05-14 14:42:10 +01:00
private:
QCheckBox *m_pAutoStart;
QCheckBox *m_pContecxtMenu;
QCheckBox *m_pBrowserIcon;
2024-05-25 12:48:42 +01:00
QCheckBox* m_pEditOnlyAdmin;
2022-05-14 14:42:10 +01:00
};
2022-06-05 10:01:10 +01:00
//////////////////////////////////////////////////////////////////////////////////////////
// CWFPPage
//
2023-07-01 17:54:53 +01:00
/*class CWFPPage : public QWizardPage
2022-06-05 10:01:10 +01:00
{
Q_OBJECT
public:
CWFPPage(QWidget *parent = nullptr);
int nextId() const override;
private:
QCheckBox *m_pUseWFP;
2023-07-01 17:54:53 +01:00
};*/
//////////////////////////////////////////////////////////////////////////////////////////
// CSBUpdate
//
class CSBUpdate : public QWizardPage
{
Q_OBJECT
public:
CSBUpdate(QWidget *parent = nullptr);
void initializePage() override;
int nextId() const override;
private slots:
void UpdateOptions();
private:
QCheckBox* m_pUpdate;
QCheckBox* m_pVersion;
QLabel* m_pChanelInfo;
QRadioButton* m_pStable;
QRadioButton* m_pPreview;
QRadioButton* m_pInsider;
QCheckBox* m_pHotfixes;
//QCheckBox* m_pTemplates;
QCheckBox* m_pIssues;
QCheckBox* m_pAddons;
QLabel* m_pUpdateInfo;
QLabel* m_pBottomLabel;
2022-06-05 10:01:10 +01:00
};
2022-05-14 14:42:10 +01:00
//////////////////////////////////////////////////////////////////////////////////////////
// CFinishPage
//
class CFinishPage : public QWizardPage
{
Q_OBJECT
public:
CFinishPage(QWidget *parent = nullptr);
void initializePage() override;
int nextId() const override;
//void setVisible(bool visible) override;
private:
QLabel *m_pLabel;
2023-07-01 17:54:53 +01:00
//QCheckBox *m_pUpdate;
2022-05-14 14:42:10 +01:00
};