2014-05-12 08:49:59 +00:00
|
|
|
#include "installwizard.h"
|
|
|
|
#include "ui_installwizard.h"
|
2014-05-12 09:00:36 +00:00
|
|
|
#include "installwizard_installtype.h"
|
2014-05-12 09:38:18 +00:00
|
|
|
#include "installwizard_locate.h"
|
2014-05-12 09:35:28 +00:00
|
|
|
#include "installwizard_patch.h"
|
|
|
|
#include "installwizard_finished.h"
|
2014-05-12 08:49:59 +00:00
|
|
|
#include "settings.h"
|
|
|
|
|
|
|
|
InstallWizard::InstallWizard(QWidget *parent, Settings *settings) :
|
|
|
|
QWizard(parent),
|
|
|
|
ui(new Ui::InstallWizard),
|
|
|
|
settings(settings)
|
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
2014-05-12 09:00:36 +00:00
|
|
|
setPage(Page_InstallType, new InstallWizard_InstallType(this));
|
2014-05-12 08:49:59 +00:00
|
|
|
|
|
|
|
#ifdef Q_OS_WIN32
|
|
|
|
setPage(Page_Locate, new InstallWizard_LocatePage(this, settings));
|
|
|
|
#endif
|
2014-05-12 09:35:28 +00:00
|
|
|
|
|
|
|
setPage(Page_Patch, new InstallWizard_Patch());
|
|
|
|
setPage(Page_Finished, new InstallWizard_Finished());
|
2014-05-12 08:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
InstallWizard::~InstallWizard()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|
|
|
|
|
|
|
|
void InstallWizard::on_InstallWizard_customButtonClicked(int which)
|
|
|
|
{
|
|
|
|
if (which == QWizard::FinishButton)
|
|
|
|
{
|
|
|
|
#ifdef Q_OS_WIN32
|
|
|
|
settings->setQuakePath(field("quake3Path").toString());
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|