Sandboxie/SandboxiePlus/SandMan/Wizards/SetupWizard.cpp

541 lines
19 KiB
C++
Raw Normal View History

2022-05-14 14:42:10 +01:00
#include "stdafx.h"
#include "SetupWizard.h"
#include "../MiscHelpers/Common/Common.h"
#include "../Windows/SettingsWindow.h"
#include "../SandMan.h"
#include "Helpers/WinAdmin.h"
2022-06-06 18:46:03 +01:00
#include <QButtonGroup>
2022-08-05 17:23:19 +01:00
#include "../QSbieAPI/SbieUtils.h"
2022-05-14 14:42:10 +01:00
QString emailRegExp = QStringLiteral(".+@.+");
CSetupWizard::CSetupWizard(QWidget *parent)
: QWizard(parent)
{
setPage(Page_Intro, new CIntroPage);
setPage(Page_Certificate, new CCertificatePage);
2022-06-06 18:46:03 +01:00
setPage(Page_UI, new CUIPage);
2022-05-14 14:42:10 +01:00
setPage(Page_Shell, new CShellPage);
2022-06-05 10:01:10 +01:00
setPage(Page_WFP, new CWFPPage);
2022-05-14 14:42:10 +01:00
setPage(Page_Finish, new CFinishPage);
setWizardStyle(ModernStyle);
//setOption(HaveHelpButton, true);
setPixmap(QWizard::LogoPixmap, QPixmap(":/SandMan.png").scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation));
connect(this, &QWizard::helpRequested, this, &CSetupWizard::showHelp);
setWindowTitle(tr("Setup Wizard"));
}
void CSetupWizard::showHelp()
{
static QString lastHelpMessage;
QString message;
switch (currentId()) {
case Page_Intro:
message = tr("The decision you make here will affect which page you get to see next.");
break;
default:
message = tr("This help is likely not to be of any help.");
}
if (lastHelpMessage == message)
2022-05-24 00:02:29 +01:00
message = tr("Sorry, I already gave all the help I could.");
2022-05-14 14:42:10 +01:00
QMessageBox::information(this, tr("Setup Wizard Help"), message);
lastHelpMessage = message;
}
bool CSetupWizard::ShowWizard()
{
CSetupWizard wizard;
if (!wizard.exec())
return false;
//bool useBusiness = wizard.field("useBusiness").toBool();
//QString Certificate = wizard.field("useCertificate").toString();
//bool isEvaluate = wizard.field("isEvaluate").toBool();
2022-06-06 18:46:03 +01:00
if (wizard.field("useAdvanced").toBool())
2022-07-09 10:46:07 +01:00
theConf->SetValue("Options/ViewMode", 1);
2022-06-06 18:46:03 +01:00
else if (wizard.field("useSimple").toBool())
2022-07-09 10:46:07 +01:00
theConf->SetValue("Options/ViewMode", 0);
else if (wizard.field("useClassic").toBool())
theConf->SetValue("Options/ViewMode", 2);
2022-06-06 18:46:03 +01:00
if (wizard.field("useBrightMode").toInt())
theConf->SetValue("Options/UseDarkTheme", 0);
else if (wizard.field("useDarkMode").toInt())
theConf->SetValue("Options/UseDarkTheme", 1);
2022-05-14 14:42:10 +01:00
AutorunEnable(wizard.field("isAutoStart").toBool());
if (wizard.field("useContecxtMenu").toBool())
CSettingsWindow__AddContextMenu();
if (wizard.field("useBrowserIcon").toBool())
CSettingsWindow__AddBrowserIcon();
2022-06-05 10:01:10 +01:00
if (wizard.field("useWFP").toBool())
theAPI->GetGlobalSettings()->SetBool("NetworkEnableWFP", true);
2022-05-14 14:42:10 +01:00
if (wizard.field("isUpdate").toBool()) {
theConf->SetValue("Options/CheckForUpdates", 1);
}
theConf->SetValue("Options/WizardLevel", 1);
2022-07-09 10:46:07 +01:00
theGUI->UpdateSettings(true);
2022-06-06 18:46:03 +01:00
2022-05-14 14:42:10 +01:00
return true;
}
2022-08-05 17:23:19 +01:00
void CSetupWizard::ShellUninstall()
{
AutorunEnable(false);
CSettingsWindow__RemoveContextMenu();
CSbieUtils::RemoveContextMenu2();
// todo: delete desktop browser shortcut and start menu integration
}
2022-05-14 14:42:10 +01:00
//////////////////////////////////////////////////////////////////////////////////////////
// CIntroPage
//
CIntroPage::CIntroPage(QWidget *parent)
: QWizardPage(parent)
{
setTitle(tr("Introduction"));
setPixmap(QWizard::WatermarkPixmap, QPixmap(":/SideLogo.png"));
QVBoxLayout *layout = new QVBoxLayout;
QLabel* pTopLabel = new QLabel(tr("Welcome to the Setup Wizard. This wizard will help you to configure your copy of <b>Sandboxie-Plus</b>. "
2022-05-24 00:02:29 +01:00
"You can start this wizard at any time from the Sandbox->Maintenance menu if you do not wish to complete it now."));
2022-05-14 14:42:10 +01:00
pTopLabel->setWordWrap(true);
layout->addWidget(pTopLabel);
QWidget* pSpace = new QWidget();
pSpace->setMinimumHeight(16);
layout->addWidget(pSpace);
m_pLabel = new QLabel(tr("Select how you would like to use Sandboxie-Plus"));
layout->addWidget(m_pLabel);
2022-06-06 18:46:03 +01:00
m_pPersonal = new QRadioButton(tr("&Personally, for private non-commercial use"));
layout->addWidget(m_pPersonal);
connect(m_pPersonal, SIGNAL(toggled(bool)), this, SIGNAL(completeChanged()));
registerField("usePersonal", m_pPersonal);
2022-05-14 14:42:10 +01:00
2022-06-06 18:46:03 +01:00
m_pBusiness = new QRadioButton(tr("&Commercially, for business or enterprise use"));
layout->addWidget(m_pBusiness);
connect(m_pBusiness, SIGNAL(toggled(bool)), this, SIGNAL(completeChanged()));
registerField("useBusiness", m_pBusiness);
2022-05-14 14:42:10 +01:00
2022-08-05 17:23:19 +01:00
QLabel* pNote = new QLabel(tr("Note: this option is persistent"));
2022-06-04 20:07:04 +01:00
layout->addWidget(pNote);
2022-08-09 17:19:46 +01:00
uchar BusinessUse = 2;
if (!g_Certificate.isEmpty())
BusinessUse = g_CertInfo.business ? 1 : 0;
else {
uchar UsageFlags = 0;
if (theAPI->GetSecureParam("UsageFlags", &UsageFlags, sizeof(UsageFlags)))
BusinessUse = (UsageFlags & 1) != 0 ? 1 : 0;
}
2022-05-14 14:42:10 +01:00
if (BusinessUse != 2) {
2022-06-06 18:46:03 +01:00
m_pPersonal->setChecked(BusinessUse == 0);
m_pBusiness->setChecked(BusinessUse == 1);
2022-08-09 17:19:46 +01:00
if ((QApplication::keyboardModifiers() & Qt::ControlModifier) == 0) {
m_pLabel->setEnabled(false);
m_pPersonal->setEnabled(false);
m_pBusiness->setEnabled(false);
}
2022-06-04 20:07:04 +01:00
pNote->setEnabled(false);
2022-05-14 14:42:10 +01:00
}
setLayout(layout);
2022-08-09 08:03:01 +01:00
if (theGUI->m_DarkTheme) {
QPalette palette = this->palette();
palette.setColor(QPalette::Base, QColor(53, 53, 53));
this->setPalette(palette);
}
2022-05-14 14:42:10 +01:00
}
int CIntroPage::nextId() const
{
if(g_Certificate.isEmpty())
return CSetupWizard::Page_Certificate;
2022-06-06 18:46:03 +01:00
return CSetupWizard::Page_UI;
2022-05-14 14:42:10 +01:00
}
bool CIntroPage::isComplete() const
{
2022-06-06 18:46:03 +01:00
if (m_pLabel->isEnabled() && !m_pPersonal->isChecked() && !m_pBusiness->isChecked())
2022-05-14 14:42:10 +01:00
return false;
return QWizardPage::isComplete();
}
//////////////////////////////////////////////////////////////////////////////////////////
// CCertificatePage
//
CCertificatePage::CCertificatePage(QWidget *parent)
: QWizardPage(parent)
{
setTitle(tr("Install your <b>Sandboxie-Plus</b> support certificate"));
setSubTitle(tr("If you have a supporter certificate, please fill it into the field below."));
QGridLayout *layout = new QGridLayout;
m_pTopLabel = new QLabel();
m_pTopLabel->setWordWrap(true);
2022-05-23 20:20:22 +01:00
connect(m_pTopLabel, SIGNAL(linkActivated(const QString&)), theGUI, SLOT(OpenUrl(const QString&)));
2022-05-14 14:42:10 +01:00
layout->addWidget(m_pTopLabel);
m_pCertificate = new QPlainTextEdit();
m_pCertificate->setMaximumSize(QSize(16777215, 73));
m_pCertificate->setPlaceholderText(
"NAME: User Name\n"
"LEVEL: ULTIMATE\n"
"DATE: dd.mm.yyyy\n"
"UPDATEKEY: 00000000000000000000000000000000\n"
"SIGNATURE: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
);
2022-05-23 20:20:22 +01:00
layout->addWidget(m_pCertificate);
2022-05-14 14:42:10 +01:00
connect(m_pCertificate, SIGNAL(textChanged()), this, SIGNAL(completeChanged()));
registerField("useCertificate", m_pCertificate, "plainText");
2022-05-24 00:02:29 +01:00
m_pEvaluate = new QCheckBox(tr("Start evaluation without a certificate for a limited period of time."));
2022-08-09 17:19:46 +01:00
if (g_CertInfo.evaluation) {
m_pEvaluate->setEnabled(false);
m_pEvaluate->setChecked(true);
}
2022-05-14 14:42:10 +01:00
layout->addWidget(m_pEvaluate);
connect(m_pEvaluate, SIGNAL(toggled(bool)), this, SIGNAL(completeChanged()));
registerField("isEvaluate", m_pEvaluate);
layout->addWidget(new QWidget());
setLayout(layout);
}
void CCertificatePage::initializePage()
{
m_pCertificate->setPlainText(g_Certificate);
2022-08-09 17:19:46 +01:00
uchar UsageFlags = 0;
theAPI->GetSecureParam("UsageFlags", &UsageFlags, sizeof(UsageFlags));
2022-05-14 14:42:10 +01:00
if (field("useBusiness").toBool())
{
2022-08-09 17:19:46 +01:00
UsageFlags |= 1;
UsageFlags &= ~2;
theAPI->SetSecureParam("UsageFlags", &UsageFlags, sizeof(UsageFlags));
2022-05-14 14:42:10 +01:00
m_pTopLabel->setText(
2022-05-24 00:02:29 +01:00
tr("To use <b>Sandboxie-Plus</b> in a business setting, an appropriate <a href=\"https://sandboxie-plus.com/go.php?to=sbie-get-cert\">support certificate</a> for business use is required. "
"If you do not yet have the required certificate(s), you can get those from the <a href=\"https://xanasoft.com/shop/\">xanasoft.com web shop</a>.")
2022-05-14 14:42:10 +01:00
);
m_pEvaluate->setVisible(true);
}
else
{
2022-08-09 17:19:46 +01:00
if((UsageFlags & 1) != 0)
UsageFlags |= 2;
UsageFlags &= ~1;
theAPI->SetSecureParam("UsageFlags", &UsageFlags, sizeof(UsageFlags));
2022-05-14 14:42:10 +01:00
m_pTopLabel->setText(
tr("<b>Sandboxie-Plus</b> provides additional features and box types exclusively to <u>project supporters</u>. "
"Boxes like the Privacy Enhanced boxes <b><font color='red'>protect user data from illicit access</font></b> by the sandboxed programs. "
2022-05-24 00:02:29 +01:00
"If you are not yet a supporter, then please consider <a href=\"https://sandboxie-plus.com/go.php?to=sbie-get-cert\">supporting the project</a> "
"to ensure further development of Sandboxie and to receive a <a href=\"https://sandboxie-plus.com/go.php?to=sbie-cert\">supporter certificate</a>.")
2022-05-14 14:42:10 +01:00
);
m_pEvaluate->setVisible(false);
}
}
int CCertificatePage::nextId() const
{
2022-06-06 18:46:03 +01:00
return CSetupWizard::Page_UI;
2022-05-14 14:42:10 +01:00
}
bool CCertificatePage::isComplete() const
{
if (field("useBusiness").toBool())
{
2022-06-04 20:07:04 +01:00
m_pCertificate->setEnabled(!(m_pEvaluate->isChecked() && m_pEvaluate->isEnabled()));
if (m_pCertificate->toPlainText().isEmpty() && !(m_pEvaluate->isChecked() && m_pEvaluate->isEnabled()))
2022-05-14 14:42:10 +01:00
return false;
}
return QWizardPage::isComplete();
}
bool CCertificatePage::validatePage()
{
2022-08-10 15:20:47 +01:00
QByteArray Certificate = m_pCertificate->toPlainText().toUtf8();
2022-06-04 20:36:12 +01:00
if (!m_pEvaluate->isChecked() && !Certificate.isEmpty() && g_Certificate != Certificate) {
2022-05-14 14:42:10 +01:00
return CSettingsWindow::ApplyCertificate(Certificate, this);
}
return true;
}
2022-06-06 18:46:03 +01:00
//////////////////////////////////////////////////////////////////////////////////////////
// CUIPage
//
CUIPage::CUIPage(QWidget* parent)
: QWizardPage(parent)
{
setTitle(tr("Configure <b>Sandboxie-Plus</b> UI"));
2022-06-06 19:30:19 +01:00
setSubTitle(tr("Select the user interface style you prefer."));
2022-06-06 18:46:03 +01:00
QGridLayout* layout = new QGridLayout;
m_pAdvanced = new QRadioButton(tr("&Advanced UI for experts"));
2022-07-09 10:46:07 +01:00
m_pAdvanced->setChecked(theConf->GetInt("Options/ViewMode", 1) == 1);
2022-06-06 18:46:03 +01:00
layout->addWidget(m_pAdvanced, 0, 0);
registerField("useAdvanced", m_pAdvanced);
m_pSimple = new QRadioButton(tr("&Simple UI for beginners"));
2022-07-09 10:46:07 +01:00
m_pSimple->setChecked(theConf->GetInt("Options/ViewMode", 1) == 0);
2022-06-06 18:46:03 +01:00
layout->addWidget(m_pSimple, 1, 0);
registerField("useSimple", m_pSimple);
2022-07-10 17:28:10 +01:00
m_pClassic = new QRadioButton(tr("&Vintage SbieCtrl.exe UI"));
2022-07-09 10:46:07 +01:00
m_pClassic->setChecked(theConf->GetInt("Options/ViewMode", 1) == 2);
layout->addWidget(m_pClassic, 2, 0);
registerField("useClassic", m_pClassic);
2022-06-06 18:46:03 +01:00
QButtonGroup *buttonGroup1 = new QButtonGroup();
buttonGroup1->addButton(m_pAdvanced, 0);
buttonGroup1->addButton(m_pSimple, 1);
2022-07-09 10:46:07 +01:00
buttonGroup1->addButton(m_pClassic, 2);
2022-06-06 18:46:03 +01:00
connect(buttonGroup1, SIGNAL(buttonClicked(int)), this, SLOT(UpdatePreview()));
QLabel* pDummy = new QLabel();
pDummy->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
2022-07-09 10:46:07 +01:00
layout->addWidget(pDummy, 0, 1, 6, 4);
2022-06-06 18:46:03 +01:00
pDummy->setStyleSheet("QLabel { background-color : " + QApplication::palette().color(QPalette::Base).name() + "; }");
m_pPreview = new QLabel();
m_pPreview->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
m_pPreview->setAlignment(Qt::AlignLeft | Qt::AlignTop);
2022-07-09 10:46:07 +01:00
layout->addWidget(m_pPreview, 0, 1, 6, 4);
2022-06-06 18:46:03 +01:00
QWidget* pSpacer = new QWidget();
pSpacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
2022-07-09 10:46:07 +01:00
layout->addWidget(pSpacer, 3, 0);
2022-06-06 18:46:03 +01:00
m_pBrightMode = new QRadioButton(tr("Use Bright Mode"));
2022-07-09 10:46:07 +01:00
layout->addWidget(m_pBrightMode, 4, 0);
2022-06-06 18:46:03 +01:00
registerField("useBrightMode", m_pBrightMode);
m_pDarkMode = new QRadioButton(tr("Use Dark Mode"));
2022-07-09 10:46:07 +01:00
layout->addWidget(m_pDarkMode, 5, 0);
2022-06-06 18:46:03 +01:00
registerField("useDarkMode", m_pDarkMode);
QButtonGroup *buttonGroup2 = new QButtonGroup();
buttonGroup2->addButton(m_pBrightMode, 0);
buttonGroup2->addButton(m_pDarkMode, 1);
connect(buttonGroup2, SIGNAL(buttonClicked(int)), this, SLOT(UpdatePreview()));
layout->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1, 1, 1);
layout->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 2, 1, 1);
layout->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 3, 1, 1);
layout->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 4, 1, 1);
setLayout(layout);
}
void CUIPage::initializePage()
{
QTimer::singleShot(10, this, SLOT(UpdatePreview()));
}
void CUIPage::UpdatePreview()
{
bool bDark;
if (m_pDarkMode->isChecked())
bDark = true;
else if (m_pBrightMode->isChecked())
bDark = false;
else { // same as os
QSettings settings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", QSettings::NativeFormat);
bDark = (settings.value("AppsUseLightTheme") == 0);
}
QPixmap preview;
if(m_pAdvanced->isChecked() && !bDark)
preview = QPixmap::fromImage(QImage(":/Assets/Advanced.png"));
else if(m_pAdvanced->isChecked() && bDark)
preview = QPixmap::fromImage(QImage(":/Assets/AdvancedD.png"));
else if(m_pSimple->isChecked() && !bDark)
preview = QPixmap::fromImage(QImage(":/Assets/Simple.png"));
else if(m_pSimple->isChecked() && bDark)
preview = QPixmap::fromImage(QImage(":/Assets/SimpleD.png"));
2022-07-09 10:46:07 +01:00
else if(m_pClassic->isChecked() && !bDark)
preview = QPixmap::fromImage(QImage(":/Assets/Classic.png"));
else if(m_pClassic->isChecked() && bDark)
preview = QPixmap::fromImage(QImage(":/Assets/ClassicD.png"));
2022-06-06 18:46:03 +01:00
//QRect rect(0, 0, m_pPreview->width(), m_pPreview->height());
//m_pPreview->setPixmap(preview.scaled(preview.width()*5/10, preview.height()*5/10, Qt::KeepAspectRatio, Qt::SmoothTransformation).copy(rect));
//m_pPreview->setPixmap(preview.scaled(min(m_pPreview->width(), preview.width()), min(m_pPreview->height(), preview.height()), Qt::KeepAspectRatio, Qt::SmoothTransformation));
//m_pPreview->setPixmap(preview);
//m_pPreview->setPixmap(preview.scaled(preview.width()*7/10, preview.height()*7/10, Qt::KeepAspectRatio, Qt::SmoothTransformation));
2022-09-29 17:28:48 +01:00
m_pPreview->setPixmap(preview.scaled(std::min(preview.width(), std::max(preview.width()*7/10, m_pPreview->width())),
std::min(preview.height(), std::max(preview.height()*7/10, m_pPreview->height())), Qt::KeepAspectRatio, Qt::SmoothTransformation));
2022-06-06 18:46:03 +01:00
}
int CUIPage::nextId() const
{
return CSetupWizard::Page_Shell;
}
2022-05-14 14:42:10 +01:00
//////////////////////////////////////////////////////////////////////////////////////////
// CShellPage
//
CShellPage::CShellPage(QWidget *parent)
: QWizardPage(parent)
{
setTitle(tr("Configure <b>Sandboxie-Plus</b> shell integration"));
setSubTitle(tr("Configure how Sandboxie-Plus should integrate with your system."));
QVBoxLayout *layout = new QVBoxLayout;
m_pAutoStart = new QCheckBox(tr("Start UI with Windows"));
m_pAutoStart->setChecked(true);
layout->addWidget(m_pAutoStart);
registerField("isAutoStart", m_pAutoStart);
m_pContecxtMenu = new QCheckBox(tr("Add 'Run Sandboxed' to the explorer context menu"));
m_pContecxtMenu->setChecked(true);
layout->addWidget(m_pContecxtMenu);
registerField("useContecxtMenu", m_pContecxtMenu);
m_pBrowserIcon = new QCheckBox(tr("Add desktop shortcut for starting Web browser under Sandboxie"));
m_pBrowserIcon->setChecked(true);
layout->addWidget(m_pBrowserIcon);
registerField("useBrowserIcon", m_pBrowserIcon);
setLayout(layout);
}
int CShellPage::nextId() const
2022-06-05 10:01:10 +01:00
{
return CSetupWizard::Page_WFP;
2022-07-09 10:46:07 +01:00
//return CSetupWizard::Page_Finish;
2022-06-05 10:01:10 +01:00
}
//////////////////////////////////////////////////////////////////////////////////////////
// CWFPPage
//
CWFPPage::CWFPPage(QWidget *parent)
: QWizardPage(parent)
{
setTitle(tr("Configure <b>Sandboxie-Plus</b> network filtering"));
setSubTitle(tr("Sandboxie can use the Windows Filtering Platform (WFP) to restrict network access."));
QVBoxLayout *layout = new QVBoxLayout;
QLabel* pLabel = new QLabel;
pLabel->setWordWrap(true);
2022-06-05 12:08:29 +01:00
pLabel->setText(tr("Using WFP allows Sandboxie to reliably enforce IP/Port based rules for network access. "
"Unlike system level application firewalls, Sandboxie can use different rules in each box for the same application. "
"If you already have a good and reliable application firewall and do not need per box rules, you can leave this option unchecked. "
"Without WFP enabled, Sandboxie will still be able to reliably and entirely block processes from accessing the network. "
2022-06-05 23:40:31 +01:00
"However, this can cause the process to crash, as the driver blocks the required network device endpoints. "
"Even with WFP disabled, Sandboxie offers to set IP/Port based rules, however these will be applied in user mode only and not be enforced by the driver. "
2022-06-05 12:08:29 +01:00
"Hence, without WFP enabled, an intentionally malicious process could bypass those rules, but not the entire network block."));
2022-06-05 10:01:10 +01:00
layout->addWidget(pLabel);
m_pUseWFP = new QCheckBox(tr("Enable Windows Filtering Platform (WFP) support"));
2022-06-06 18:46:03 +01:00
m_pUseWFP->setChecked(theAPI->GetGlobalSettings()->GetBool("NetworkEnableWFP", false));
2022-06-05 10:01:10 +01:00
layout->addWidget(m_pUseWFP);
registerField("useWFP", m_pUseWFP);
setLayout(layout);
}
int CWFPPage::nextId() const
2022-05-14 14:42:10 +01:00
{
return CSetupWizard::Page_Finish;
}
//////////////////////////////////////////////////////////////////////////////////////////
// CFinishPage
//
CFinishPage::CFinishPage(QWidget *parent)
: QWizardPage(parent)
{
2022-05-24 00:02:29 +01:00
setTitle(tr("Complete your configuration"));
2022-05-14 14:42:10 +01:00
setPixmap(QWizard::WatermarkPixmap, QPixmap(":/SideLogo.png"));
QVBoxLayout *layout = new QVBoxLayout;
m_pLabel = new QLabel;
m_pLabel->setWordWrap(true);
2022-05-24 00:02:29 +01:00
m_pLabel->setText(tr("Almost complete, click Finish to apply all selected options and conclude the wizard."));
2022-05-14 14:42:10 +01:00
layout->addWidget(m_pLabel);
QWidget* pSpacer = new QWidget();
pSpacer->setMinimumHeight(16);
layout->addWidget(pSpacer);
//QLabel* pLabel = new QLabel;
//pLabel->setWordWrap(true);
//pLabel->setText(tr("Like with any other security product it's important to keep your Sandboxie-Plus up to date."));
//layout->addWidget(pLabel);
m_pUpdate = new QCheckBox(tr("Keep Sandboxie-Plus up to date."));
m_pUpdate->setChecked(true);
layout->addWidget(m_pUpdate);
registerField("isUpdate", m_pUpdate);
setLayout(layout);
}
int CFinishPage::nextId() const
{
return -1;
}
void CFinishPage::initializePage()
{
}
//void ConclusionPage::setVisible(bool visible)
//{
// QWizardPage::setVisible(visible);
//
// if (visible) {
// wizard()->setButtonText(QWizard::CustomButton1, tr("&Print"));
// wizard()->setOption(QWizard::HaveCustomButton1, true);
// connect(wizard(), &QWizard::customButtonClicked,
// this, &ConclusionPage::printButtonClicked);
// } else {
// wizard()->setOption(QWizard::HaveCustomButton1, false);
// disconnect(wizard(), &QWizard::customButtonClicked,
// this, &ConclusionPage::printButtonClicked);
// }
//}