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"
2023-08-15 08:49:03 +01:00
# include "../OnlineUpdater.h"
2022-05-14 14:42:10 +01:00
2023-07-01 17:54:53 +01:00
CSetupWizard : : CSetupWizard ( int iOldLevel , QWidget * parent )
2022-05-14 14:42:10 +01:00
: QWizard ( parent )
{
2024-08-25 09:36:29 +01:00
if ( iOldLevel < SETUP_LVL_1 )
2023-07-01 17:54:53 +01:00
setPage ( Page_Intro , new CIntroPage ) ;
2024-08-25 09:36:29 +01:00
if ( iOldLevel < SETUP_LVL_3 )
setPage ( Page_Certificate , new CCertificatePage ( iOldLevel ) ) ;
if ( iOldLevel < SETUP_LVL_1 ) {
2023-07-01 17:54:53 +01:00
setPage ( Page_UI , new CUIPage ) ;
setPage ( Page_Shell , new CShellPage ) ;
//setPage(Page_WFP, new CWFPPage);
}
2024-08-25 09:36:29 +01:00
if ( iOldLevel < SETUP_LVL_2 )
2023-07-01 17:54:53 +01:00
setPage ( Page_Update , new CSBUpdate ) ;
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 ;
}
2023-07-01 17:54:53 +01:00
bool CSetupWizard : : ShowWizard ( int iOldLevel )
2022-05-14 14:42:10 +01:00
{
2023-07-01 17:54:53 +01:00
CSetupWizard wizard ( iOldLevel , theGUI ) ;
2023-05-25 17:33:24 +01:00
if ( ! theGUI - > SafeExec ( & wizard ) )
2022-05-14 14:42:10 +01:00
return false ;
2023-07-01 17:54:53 +01:00
if ( iOldLevel < SETUP_LVL_1 ) {
//bool useBusiness = wizard.field("useBusiness").toBool();
//QString Certificate = wizard.field("useCertificate").toString();
//bool isEvaluate = wizard.field("isEvaluate").toBool();
if ( wizard . field ( " useAdvanced " ) . toBool ( ) )
theConf - > SetValue ( " Options/ViewMode " , 1 ) ;
else if ( wizard . field ( " useSimple " ) . toBool ( ) )
theConf - > SetValue ( " Options/ViewMode " , 0 ) ;
else if ( wizard . field ( " useClassic " ) . toBool ( ) )
theConf - > SetValue ( " Options/ViewMode " , 2 ) ;
if ( wizard . field ( " useBrightMode " ) . toInt ( ) )
theConf - > SetValue ( " Options/UseDarkTheme " , 0 ) ;
else if ( wizard . field ( " useDarkMode " ) . toInt ( ) )
theConf - > SetValue ( " Options/UseDarkTheme " , 1 ) ;
AutorunEnable ( wizard . field ( " isAutoStart " ) . toBool ( ) ) ;
if ( wizard . field ( " useContecxtMenu " ) . toBool ( ) )
CSettingsWindow : : AddContextMenu ( ) ;
if ( wizard . field ( " useBrowserIcon " ) . toBool ( ) )
CSettingsWindow : : AddBrowserIcon ( ) ;
//if (wizard.field("useWFP").toBool()) {
// theAPI->GetGlobalSettings()->SetBool("NetworkEnableWFP", true);
// theAPI->ReloadConfig(true);
//}
}
2022-06-06 18:46:03 +01:00
2023-07-01 17:54:53 +01:00
if ( iOldLevel < SETUP_LVL_2 ) {
2022-05-14 14:42:10 +01:00
2023-07-01 17:54:53 +01:00
if ( wizard . field ( " updateAll " ) . toBool ( ) )
{
theConf - > SetValue ( " Options/CheckForUpdates " , 1 ) ;
theConf - > SetValue ( " Options/OnNewUpdate " , " install " ) ;
//theConf->SetValue("Options/CheckForTemplates", 1);
theConf - > SetValue ( " Options/CheckForIssues " , 1 ) ;
theConf - > SetValue ( " Options/CheckForAddons " , 1 ) ;
}
else
{
if ( wizard . field ( " updateApp " ) . toBool ( ) )
theConf - > SetValue ( " Options/CheckForUpdates " , 1 ) ;
if ( wizard . field ( " applyHotfixes " ) . toBool ( ) )
theConf - > SetValue ( " Options/OnNewUpdate " , " install " ) ;
//if(wizard.field("updateCompat").toBool())
// theConf->SetValue("Options/CheckForTemplates", 1);
if ( wizard . field ( " updateIssues " ) . toBool ( ) )
theConf - > SetValue ( " Options/CheckForIssues " , 1 ) ;
if ( wizard . field ( " updateAddons " ) . toBool ( ) )
theConf - > SetValue ( " Options/CheckForAddons " , 1 ) ;
}
2022-05-14 14:42:10 +01:00
2023-07-01 17:54:53 +01:00
if ( wizard . field ( " updateAll " ) . toBool ( ) | | wizard . field ( " updateApp " ) . toBool ( ) ) {
QString ReleaseChannel ;
if ( wizard . field ( " channelStable " ) . toBool ( ) )
ReleaseChannel = " stable " ;
else if ( wizard . field ( " channelPreview " ) . toBool ( ) )
ReleaseChannel = " preview " ;
else if ( wizard . field ( " channelInsider " ) . toBool ( ) )
ReleaseChannel = " insider " ;
if ( ! ReleaseChannel . isEmpty ( ) ) theConf - > SetValue ( " Options/ReleaseChannel " , ReleaseChannel ) ;
}
2023-05-21 13:48:58 +01:00
}
2022-06-05 10:01:10 +01:00
2023-07-01 17:54:53 +01:00
//if (wizard.field("isUpdate").toBool())
// theConf->SetValue("Options/CheckForUpdates", 1);
2022-05-14 14:42:10 +01:00
2024-05-25 13:07:48 +01:00
if ( iOldLevel < SETUP_LVL_1 )
{
if ( wizard . field ( " editAdminOnly " ) . toBool ( ) )
theAPI - > GetGlobalSettings ( ) - > SetText ( " EditAdminOnly " , " y " ) ;
}
2023-07-01 17:54:53 +01:00
theConf - > SetValue ( " Options/WizardLevel " , SETUP_LVL_CURRENT ) ;
2022-05-14 14:42:10 +01:00
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 ) ;
2023-07-01 17:54:53 +01:00
CSettingsWindow : : RemoveContextMenu ( ) ;
2022-08-05 17:23:19 +01:00
CSbieUtils : : RemoveContextMenu2 ( ) ;
2024-11-16 18:26:51 +00:00
CSbieUtils : : RemoveContextMenu3 ( ) ;
CSbieUtils : : RemoveContextMenu4 ( ) ;
2022-08-05 17:23:19 +01:00
// 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 " ) ) ;
2023-08-27 11:54:54 +01:00
QPixmap Logo = QPixmap ( theGUI - > m_DarkTheme ? " :/SideLogoDM.png " : " :/SideLogo.png " ) ;
int Scaling = theConf - > GetInt ( " Options/FontScaling " , 100 ) ;
if ( Scaling ! = 100 ) Logo = Logo . scaled ( Logo . width ( ) * Scaling / 100 , Logo . height ( ) * Scaling / 100 ) ;
setPixmap ( QWizard : : WatermarkPixmap , Logo ) ;
2022-05-14 14:42:10 +01:00
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 ( ) )
2023-07-11 21:35:59 +01:00
BusinessUse = CERT_IS_TYPE ( g_CertInfo , eCertBusiness ) ? 1 : 0 ;
2022-08-09 17:19:46 +01:00
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
//
2024-08-25 09:36:29 +01:00
CCertificatePage : : CCertificatePage ( int iOldLevel , QWidget * parent )
2022-05-14 14:42:10 +01:00
: 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. " ) ) ;
2024-08-25 09:36:29 +01:00
if ( iOldLevel < SETUP_LVL_1 )
m_NextPage = CSetupWizard : : Page_UI ;
else if ( iOldLevel < SETUP_LVL_3 )
m_NextPage = CSetupWizard : : Page_Finish ;
2022-05-14 14:42:10 +01:00
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 "
2023-08-15 08:49:03 +01:00
" TYPE: ULTIMATE \n "
2022-05-14 14:42:10 +01:00
" 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 " ) ;
2023-08-15 08:49:03 +01:00
layout - > addWidget ( new QLabel ( tr ( " Retrieve certificate using Serial Number: " ) ) ) ;
m_pSerial = new QLineEdit ( ) ;
m_pSerial - > setPlaceholderText ( " SBIE_-_____-_____-_____-_____ " ) ;
layout - > addWidget ( m_pSerial ) ;
2022-05-24 00:02:29 +01:00
m_pEvaluate = new QCheckBox ( tr ( " Start evaluation without a certificate for a limited period of time. " ) ) ;
2023-07-11 21:35:59 +01:00
if ( CERT_IS_TYPE ( g_CertInfo , eCertEvaluation ) ) {
2022-08-09 17:19:46 +01:00
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 ) ;
2024-08-25 09:36:29 +01:00
QLabel * pGetEvalCert = new QLabel ( tr ( " <b><a href= \" _ \" ><font color='red'>Get a free evaluation certificate</font></a> and enjoy all premium features for %1 days.</b> " ) . arg ( EVAL_DAYS ) ) ;
2024-08-27 14:37:59 +01:00
pGetEvalCert - > setToolTip ( tr ( " You can request a free %1-day evaluation certificate up to %2 times per hardware ID. " ) . arg ( EVAL_DAYS ) . arg ( EVAL_MAX ) ) ;
2024-08-25 09:36:29 +01:00
layout - > addWidget ( pGetEvalCert ) ;
connect ( pGetEvalCert , & QLabel : : linkActivated , this , [ = ] ( ) {
CSettingsWindow : : StartEval ( this , this , SLOT ( OnCertData ( const QByteArray & , const QVariantMap & ) ) ) ;
} ) ;
2022-05-14 14:42:10 +01:00
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 ) ;
}
2023-08-15 08:49:03 +01:00
m_pSerial - > setVisible ( true ) ;
m_pSerial - > clear ( ) ;
2022-05-14 14:42:10 +01:00
}
int CCertificatePage : : nextId ( ) const
{
2024-08-25 09:36:29 +01:00
return m_NextPage ;
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 ( ) ;
}
2023-08-15 08:49:03 +01:00
void CCertificatePage : : OnCertData ( const QByteArray & Certificate , const QVariantMap & Params )
{
if ( ! Certificate . isEmpty ( ) ) {
m_pSerial - > clear ( ) ;
m_pCertificate - > setPlainText ( Certificate ) ;
wizard ( ) - > next ( ) ;
}
else {
2023-10-21 13:10:45 +01:00
QString Message = tr ( " Failed to retrieve the certificate. " ) ;
2023-08-15 08:49:03 +01:00
Message + = tr ( " \n Error: %1 " ) . arg ( Params [ " error " ] . toString ( ) ) ;
QMessageBox : : critical ( this , " Sandboxie-Plus " , Message ) ;
}
}
2022-05-14 14:42:10 +01:00
bool CCertificatePage : : validatePage ( )
{
2023-08-15 08:49:03 +01:00
if ( m_pEvaluate - > isChecked ( ) )
return true ;
2024-04-08 18:24:26 +01:00
QByteArray Certificate = m_pCertificate - > toPlainText ( ) . toUtf8 ( ) ;
2023-08-15 08:49:03 +01:00
QString Serial = m_pSerial - > text ( ) ;
2024-04-08 18:24:26 +01:00
2023-08-15 08:49:03 +01:00
if ( ! Serial . isEmpty ( ) ) {
2024-04-08 18:24:26 +01:00
QVariantMap Params ;
if ( ! Certificate . isEmpty ( ) )
Params [ " key " ] = GetArguments ( Certificate , L ' \n ' , L ' : ' ) . value ( " UPDATEKEY " ) ;
SB_PROGRESS Status = theGUI - > m_pUpdater - > GetSupportCert ( Serial , this , SLOT ( OnCertData ( const QByteArray & , const QVariantMap & ) ) , Params ) ;
2023-08-15 08:49:03 +01:00
if ( Status . GetStatus ( ) = = OP_ASYNC ) {
theGUI - > AddAsyncOp ( Status . GetValue ( ) ) ;
2023-10-21 13:10:45 +01:00
Status . GetValue ( ) - > ShowMessage ( tr ( " Retrieving certificate... " ) ) ;
2023-08-15 08:49:03 +01:00
}
return false ;
}
if ( ! Certificate . isEmpty ( ) & & Certificate ! = g_Certificate )
2022-05-14 14:42:10 +01:00
return CSettingsWindow : : ApplyCertificate ( Certificate , this ) ;
2023-08-15 08:49:03 +01:00
2022-05-14 14:42:10 +01:00
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 ) ;
2023-05-15 18:34:15 +01:00
connect ( buttonGroup1 , SIGNAL ( buttonClicked ( QAbstractButton * ) ) , this , SLOT ( UpdatePreview ( ) ) ) ;
2022-06-06 18:46:03 +01:00
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 ) ;
2023-05-15 18:34:15 +01:00
connect ( buttonGroup2 , SIGNAL ( buttonClicked ( QAbstractButton * ) ) , this , SLOT ( UpdatePreview ( ) ) ) ;
2022-06-06 18:46:03 +01:00
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
//
2024-05-25 13:46:00 +01:00
2022-05-14 14:42:10 +01:00
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 ) ;
2024-05-28 14:52:16 +01:00
m_pEditOnlyAdmin = new QCheckBox ( tr ( " Only applications with admin rights can change configuration " ) ) ;
2024-05-25 12:48:42 +01:00
m_pEditOnlyAdmin - > setChecked ( false ) ;
2024-05-25 13:28:56 +01:00
connect ( m_pEditOnlyAdmin , SIGNAL ( clicked ( bool ) ) , this , SLOT ( OnEditOnlyAdmin ( ) ) ) ;
2024-05-25 12:48:42 +01:00
layout - > addWidget ( m_pEditOnlyAdmin ) ;
registerField ( " editAdminOnly " , m_pEditOnlyAdmin ) ;
2022-05-14 14:42:10 +01:00
setLayout ( layout ) ;
}
2024-05-25 13:46:00 +01:00
void CShellPage : : OnEditOnlyAdmin ( )
{
if ( m_pEditOnlyAdmin - > isChecked ( ) ) {
2024-05-28 14:52:16 +01:00
if ( QMessageBox : : warning ( this , tr ( " Warning " ) , tr ( " Enabling this option prevents changes to the Sandboxie.ini configuration from the user interface without admin rights. Be careful, as using Sandboxie Manager with normal user rights may result in a lockout. "
" To make changes to the configuration, you must restart Sandboxie Manager as an admin by clicking 'Restart as Admin' in the 'Sandbox' menu in the main window. " ) ,
2024-05-25 13:46:00 +01:00
QMessageBox : : Ok , QMessageBox : : Cancel ) = = QMessageBox : : Cancel )
m_pEditOnlyAdmin - > setChecked ( false ) ;
}
}
2022-05-14 14:42:10 +01:00
int CShellPage : : nextId ( ) const
2022-06-05 10:01:10 +01:00
{
2023-07-01 17:54:53 +01:00
//return CSetupWizard::Page_WFP;
return CSetupWizard : : Page_Update ;
2022-07-09 10:46:07 +01:00
//return CSetupWizard::Page_Finish;
2022-06-05 10:01:10 +01:00
}
//////////////////////////////////////////////////////////////////////////////////////////
// CWFPPage
//
2023-07-01 17:54:53 +01:00
/*CWFPPage::CWFPPage(QWidget *parent)
2022-06-05 10:01:10 +01:00
: 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
2023-07-01 17:54:53 +01:00
{
return CSetupWizard : : Page_Finish ;
} */
//////////////////////////////////////////////////////////////////////////////////////////
// CSBUpdate
//
CSBUpdate : : CSBUpdate ( QWidget * parent )
: QWizardPage ( parent )
{
setTitle ( tr ( " Configure <b>Sandboxie-Plus</b> updater " ) ) ;
2023-07-05 13:45:21 +01:00
setSubTitle ( tr ( " Like with any other security product, it's important to keep your Sandboxie-Plus up to date. " ) ) ;
2023-07-01 17:54:53 +01:00
QGridLayout * layout = new QGridLayout ;
layout - > setSpacing ( 3 ) ;
int row = 0 ;
int rows = 4 ;
2023-07-05 13:45:21 +01:00
m_pUpdate = new QCheckBox ( tr ( " Regularly check for all updates to Sandboxie-Plus and optional components " ) ) ;
m_pUpdate - > setToolTip ( tr ( " Let Sandboxie regularly check for latest updates. " ) ) ;
2023-07-01 17:54:53 +01:00
layout - > addWidget ( m_pUpdate , row + + , 0 , 1 , rows ) ;
connect ( m_pUpdate , & QCheckBox : : toggled , this , & CSBUpdate : : UpdateOptions ) ;
registerField ( " updateAll " , m_pUpdate ) ;
QWidget * pSpacer = new QWidget ( ) ;
pSpacer - > setMinimumHeight ( 16 ) ;
pSpacer - > setMaximumWidth ( 16 ) ;
layout - > addWidget ( pSpacer , row + 5 , 0 , 1 , 1 ) ;
m_pVersion = new QCheckBox ( tr ( " Check for new Sandboxie-Plus versions: " ) ) ;
m_pVersion - > setToolTip ( tr ( " Check for new Sandboxie-Plus builds. " ) ) ;
layout - > addWidget ( m_pVersion , row + + , 1 , 1 , rows - 2 ) ;
//layout->addWidget(new QComboBox(), row-1, 3, 1, 1);
connect ( m_pVersion , & QCheckBox : : toggled , this , & CSBUpdate : : UpdateOptions ) ;
registerField ( " updateApp " , m_pVersion ) ;
2023-07-04 20:26:02 +01:00
m_pChanelInfo = new QLabel ( tr ( " Select in which update channel to look for new Sandboxie-Plus builds: " ) ) ;
2023-07-01 17:54:53 +01:00
m_pChanelInfo - > setMinimumHeight ( 20 ) ;
layout - > addWidget ( m_pChanelInfo , row + + , 1 , 1 , rows - 1 ) ;
pSpacer = new QWidget ( ) ;
pSpacer - > setMinimumHeight ( 16 ) ;
pSpacer - > setMaximumWidth ( 16 ) ;
layout - > addWidget ( pSpacer , row , 1 , 1 , 1 ) ;
m_pStable = new QRadioButton ( tr ( " In the Stable Channel " ) ) ;
m_pStable - > setToolTip ( tr ( " The stable channel contains the latest stable GitHub releases. " ) ) ;
layout - > addWidget ( m_pStable , row + + , 2 , 1 , rows - 2 ) ;
registerField ( " channelStable " , m_pStable ) ;
m_pPreview = new QRadioButton ( tr ( " In the Preview Channel - with newest experimental changes " ) ) ;
m_pPreview - > setToolTip ( tr ( " The preview channel contains the latest GitHub pre-releases. " ) ) ;
layout - > addWidget ( m_pPreview , row + + , 2 , 1 , rows - 2 ) ;
registerField ( " channelPreview " , m_pPreview ) ;
m_pInsider = new QRadioButton ( tr ( " In the Insider Channel - exclusive features " ) ) ;
m_pInsider - > setToolTip ( tr ( " The Insider channel offers early access to new features and bugfixes that will eventually be released to the public, "
" as well as all relevant improvements from the stable channel. \n Unlike the preview channel, it does not include untested, potentially breaking, "
" or experimental changes that may not be ready for wider use. " ) ) ;
layout - > addWidget ( m_pInsider , row , 2 , 1 , 1 ) ;
registerField ( " channelInsider " , m_pInsider ) ;
QLabel * pInsiderInfo = new QLabel ( tr ( " More about the <a href= \" https://sandboxie-plus.com/go.php?to=sbie-insider \" >Insider Channel</a> " ) ) ;
connect ( pInsiderInfo , SIGNAL ( linkActivated ( const QString & ) ) , theGUI , SLOT ( OpenUrl ( const QString & ) ) ) ;
layout - > addWidget ( pInsiderInfo , row + + , 3 , 1 , 1 ) ;
2023-07-03 15:58:38 +01:00
//m_pTemplates = new QCheckBox(tr("Keep Compatibility Templates up to date"));
//m_pTemplates->setToolTip(tr("Check for latest compatibility templates."));
2023-07-01 17:54:53 +01:00
//layout->addWidget(m_pTemplates, row++, 1, 1, rows-1);
//registerField("updateCompat", m_pTemplates);
2023-07-03 15:58:38 +01:00
m_pHotfixes = new QCheckBox ( tr ( " Keep Compatibility Templates up to date and apply hotfixes " ) ) ;
m_pHotfixes - > setToolTip ( tr ( " Check for latest compatibility templates and hotfixes. " ) ) ;
2023-07-01 17:54:53 +01:00
layout - > addWidget ( m_pHotfixes , row + + , 1 , 1 , rows - 1 ) ;
registerField ( " applyHotfixes " , m_pHotfixes ) ;
m_pIssues = new QCheckBox ( tr ( " Get the latest Scripts for the Troubleshooting Wizard " ) ) ;
2023-07-03 15:58:38 +01:00
m_pIssues - > setToolTip ( tr ( " Check for latest troubleshooting scripts for the troubleshooting wizard. " ) ) ;
2023-07-01 17:54:53 +01:00
layout - > addWidget ( m_pIssues , row + + , 1 , 1 , rows - 1 ) ;
registerField ( " updateIssues " , m_pIssues ) ;
2023-08-26 22:15:15 +01:00
m_pAddons = new QCheckBox ( tr ( " Keep the list of optional Add-on components up to date " ) ) ;
m_pAddons - > setToolTip ( tr ( " Check for latest available add-ons. " ) ) ;
2023-07-01 17:54:53 +01:00
layout - > addWidget ( m_pAddons , row + + , 1 , 1 , rows - 1 ) ;
registerField ( " updateAddons " , m_pAddons ) ;
m_pUpdateInfo = new QLabel ( ) ;
m_pUpdateInfo - > setWordWrap ( true ) ;
//m_pUpdateInfo->setText(tr("Sandboxie-Plus applies many application restrictions which may occasionally lead to compatibility issues, necessitating mitigation efforts. "
// "Compatibility may be broken by new Windows updates and changes within sandboxed applications themselves. "
// "To ensure smooth operation, it is highly recommended to regularly check for Sandboxie-Plus updates, apply the latest compatibility templates, and keep troubleshooting scripts up-to-date."));
m_pUpdateInfo - > setText ( tr ( " Sandboxie-Plus applies strict application restrictions, which can lead to compatibility issues. "
" Stay updated with Sandboxie-Plus, including compatibility templates and troubleshooting, to ensure smooth operation amid Windows updates and application changes. " ) ) ;
layout - > addWidget ( m_pUpdateInfo , row + + , 0 , 1 , rows ) ;
layout - > addItem ( new QSpacerItem ( 10 , 10 , QSizePolicy : : Fixed , QSizePolicy : : Expanding ) , row + + , 0 ) ;
m_pBottomLabel = new QLabel ( tr ( " Access to the latest compatibility templates and the online troubleshooting database requires a valid <a href= \" https://sandboxie-plus.com/go.php?to=sbie-cert \" >supporter certificate</a>. " ) ) ;
connect ( m_pBottomLabel , SIGNAL ( linkActivated ( const QString & ) ) , theGUI , SLOT ( OpenUrl ( const QString & ) ) ) ;
m_pBottomLabel - > setWordWrap ( true ) ;
layout - > addWidget ( m_pBottomLabel , row + + , 0 , 1 , rows ) ;
setLayout ( layout ) ;
}
void CSBUpdate : : initializePage ( )
{
m_pUpdate - > setChecked ( true ) ;
m_pStable - > setChecked ( true ) ;
2023-07-11 21:35:59 +01:00
m_pBottomLabel - > setVisible ( ! g_CertInfo . active | | g_CertInfo . expired ) ;
2023-07-01 17:54:53 +01:00
UpdateOptions ( ) ;
}
void CSBUpdate : : UpdateOptions ( )
{
m_pVersion - > setVisible ( ! m_pUpdate - > isChecked ( ) ) ;
//m_pTemplates->setVisible(!m_pUpdate->isChecked());
m_pHotfixes - > setVisible ( ! m_pUpdate - > isChecked ( ) ) ;
m_pIssues - > setVisible ( ! m_pUpdate - > isChecked ( ) ) ;
m_pAddons - > setVisible ( ! m_pUpdate - > isChecked ( ) ) ;
m_pChanelInfo - > setVisible ( m_pUpdate - > isChecked ( ) ) ;
m_pUpdateInfo - > setVisible ( m_pUpdate - > isChecked ( ) ) ;
if ( m_pUpdate - > isChecked ( ) ) {
m_pVersion - > setChecked ( true ) ;
//m_pTemplates->setChecked(true);
m_pIssues - > setChecked ( true ) ;
m_pAddons - > setChecked ( true ) ;
}
m_pStable - > setEnabled ( m_pVersion - > isChecked ( ) ) ;
m_pPreview - > setEnabled ( m_pVersion - > isChecked ( ) ) ;
2023-07-11 21:35:59 +01:00
m_pInsider - > setEnabled ( CERT_IS_INSIDER ( g_CertInfo ) & & m_pVersion - > isChecked ( ) ) ;
2023-07-01 17:54:53 +01:00
m_pHotfixes - > setEnabled ( m_pVersion - > isChecked ( ) ) ;
}
int CSBUpdate : : 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 " ) ) ;
2023-08-27 11:54:54 +01:00
QPixmap Logo = QPixmap ( theGUI - > m_DarkTheme ? " :/SideLogoDM.png " : " :/SideLogo.png " ) ;
int Scaling = theConf - > GetInt ( " Options/FontScaling " , 100 ) ;
if ( Scaling ! = 100 ) Logo = Logo . scaled ( Logo . width ( ) * Scaling / 100 , Logo . height ( ) * Scaling / 100 ) ;
setPixmap ( QWizard : : WatermarkPixmap , Logo ) ;
2022-05-14 14:42:10 +01:00
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 ) ;
2023-07-01 17:54:53 +01:00
//QWidget* pSpacer = new QWidget();
//pSpacer->setMinimumHeight(16);
//layout->addWidget(pSpacer);
2022-05-14 14:42:10 +01:00
//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);
2023-07-01 17:54:53 +01:00
//m_pUpdate = new QCheckBox(tr("Keep Sandboxie-Plus up to date."));
//m_pUpdate->setChecked(true);
//layout->addWidget(m_pUpdate);
//registerField("isUpdate", m_pUpdate);
2022-05-14 14:42:10 +01:00
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);
// }
//}