Rename "installtype" wizard page to "setup".

This commit is contained in:
Jonathan Young 2014-05-15 16:29:22 +10:00
parent 616b422e3b
commit 294afa1066
6 changed files with 35 additions and 35 deletions

View file

@ -1,7 +1,7 @@
#include <QPushButton> #include <QPushButton>
#include "installwizard.h" #include "installwizard.h"
#include "ui_installwizard.h" #include "ui_installwizard.h"
#include "installwizard_installtype.h" #include "installwizard_setup.h"
#include "installwizard_copy.h" #include "installwizard_copy.h"
#include "installwizard_eula.h" #include "installwizard_eula.h"
#include "installwizard_patch.h" #include "installwizard_patch.h"
@ -24,7 +24,7 @@ InstallWizard::InstallWizard(QWidget *parent, Settings *settings) :
ui->setupUi(this); ui->setupUi(this);
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel())); connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
setPage(Page_InstallType, new InstallWizard_InstallType(this, settings)); setPage(Page_Setup, new InstallWizard_Setup(this, settings));
setPage(Page_Eula, new InstallWizard_Eula(this)); setPage(Page_Eula, new InstallWizard_Eula(this));
setPage(Page_Copy, new InstallWizard_Copy(this)); setPage(Page_Copy, new InstallWizard_Copy(this));
setPage(Page_Patch, new InstallWizard_Patch(this)); setPage(Page_Patch, new InstallWizard_Patch(this));

View file

@ -29,7 +29,7 @@ public:
enum enum
{ {
Page_InstallType, Page_Setup,
Page_Eula, Page_Eula,
Page_Copy, Page_Copy,
Page_Patch, Page_Patch,

View file

@ -2,14 +2,14 @@
#include <QFileDialog> #include <QFileDialog>
#include <QFileInfo> #include <QFileInfo>
#include <QMessageBox> #include <QMessageBox>
#include "installwizard_installtype.h" #include "installwizard_setup.h"
#include "ui_installwizard_installtype.h" #include "ui_installwizard_setup.h"
#include "installwizard.h" #include "installwizard.h"
#include "settings.h" #include "settings.h"
InstallWizard_InstallType::InstallWizard_InstallType(QWidget *parent, Settings *settings) : InstallWizard_Setup::InstallWizard_Setup(QWidget *parent, Settings *settings) :
QWizardPage(parent), QWizardPage(parent),
ui(new Ui::InstallWizard_InstallType), ui(new Ui::InstallWizard_Setup),
settings(settings), settings(settings),
isQuake3PatchRequired(false) isQuake3PatchRequired(false)
{ {
@ -22,12 +22,12 @@ InstallWizard_InstallType::InstallWizard_InstallType(QWidget *parent, Settings *
#endif #endif
} }
InstallWizard_InstallType::~InstallWizard_InstallType() InstallWizard_Setup::~InstallWizard_Setup()
{ {
delete ui; delete ui;
} }
void InstallWizard_InstallType::initializePage() void InstallWizard_Setup::initializePage()
{ {
ui->txtLocatePath->setText(settings->getQuakePath()); ui->txtLocatePath->setText(settings->getQuakePath());
@ -47,7 +47,7 @@ void InstallWizard_InstallType::initializePage()
#endif #endif
} }
bool InstallWizard_InstallType::validatePage() bool InstallWizard_Setup::validatePage()
{ {
if (ui->stackPages->currentIndex() == Page_Install) if (ui->stackPages->currentIndex() == Page_Install)
{ {
@ -132,7 +132,7 @@ bool InstallWizard_InstallType::validatePage()
return true; return true;
} }
bool InstallWizard_InstallType::isComplete() const bool InstallWizard_Setup::isComplete() const
{ {
if (ui->stackPages->currentIndex() == Page_Install) if (ui->stackPages->currentIndex() == Page_Install)
{ {
@ -152,7 +152,7 @@ bool InstallWizard_InstallType::isComplete() const
return true; return true;
} }
int InstallWizard_InstallType::nextId() const int InstallWizard_Setup::nextId() const
{ {
if (ui->stackPages->currentIndex() == Page_Install || ui->stackPages->currentIndex() == Page_InstallSteam) if (ui->stackPages->currentIndex() == Page_Install || ui->stackPages->currentIndex() == Page_InstallSteam)
{ {
@ -177,22 +177,22 @@ int InstallWizard_InstallType::nextId() const
return InstallWizard::Page_Finished; return InstallWizard::Page_Finished;
} }
void InstallWizard_InstallType::on_rbLocate_clicked() void InstallWizard_Setup::on_rbLocate_clicked()
{ {
ui->stackPages->setCurrentIndex(Page_Locate); ui->stackPages->setCurrentIndex(Page_Locate);
} }
void InstallWizard_InstallType::on_rbInstall_clicked() void InstallWizard_Setup::on_rbInstall_clicked()
{ {
ui->stackPages->setCurrentIndex(Page_Install); ui->stackPages->setCurrentIndex(Page_Install);
} }
void InstallWizard_InstallType::on_rbInstallSteam_clicked() void InstallWizard_Setup::on_rbInstallSteam_clicked()
{ {
ui->stackPages->setCurrentIndex(Page_InstallSteam); ui->stackPages->setCurrentIndex(Page_InstallSteam);
} }
void InstallWizard_InstallType::on_btnLocateBrowse_clicked() void InstallWizard_Setup::on_btnLocateBrowse_clicked()
{ {
const QString location = QFileDialog::getExistingDirectory(this, tr("Select Quake III Arena Location"), settings->getQuakePath()); const QString location = QFileDialog::getExistingDirectory(this, tr("Select Quake III Arena Location"), settings->getQuakePath());
@ -203,12 +203,12 @@ void InstallWizard_InstallType::on_btnLocateBrowse_clicked()
} }
} }
void InstallWizard_InstallType::on_txtLocatePath_textChanged(const QString & /*arg1*/) void InstallWizard_Setup::on_txtLocatePath_textChanged(const QString & /*arg1*/)
{ {
emit completeChanged(); emit completeChanged();
} }
void InstallWizard_InstallType::on_btnInstallBrowseSource_clicked() void InstallWizard_Setup::on_btnInstallBrowseSource_clicked()
{ {
const QString location = QFileDialog::getOpenFileName(wizard(), "Select pak0.pk3 location", QString(), "Quake III Arena Pak File (pak0.pk3)"); const QString location = QFileDialog::getOpenFileName(wizard(), "Select pak0.pk3 location", QString(), "Quake III Arena Pak File (pak0.pk3)");
@ -218,7 +218,7 @@ void InstallWizard_InstallType::on_btnInstallBrowseSource_clicked()
} }
} }
void InstallWizard_InstallType::on_btnInstallBrowseDest_clicked() void InstallWizard_Setup::on_btnInstallBrowseDest_clicked()
{ {
const QString location = QFileDialog::getExistingDirectory(this, tr("Select Quake III Arena Location"), ui->txtInstallDest->text()); const QString location = QFileDialog::getExistingDirectory(this, tr("Select Quake III Arena Location"), ui->txtInstallDest->text());
@ -228,17 +228,17 @@ void InstallWizard_InstallType::on_btnInstallBrowseDest_clicked()
} }
} }
void InstallWizard_InstallType::on_txtInstallSource_textChanged(const QString & /*arg1*/) void InstallWizard_Setup::on_txtInstallSource_textChanged(const QString & /*arg1*/)
{ {
emit completeChanged(); emit completeChanged();
} }
void InstallWizard_InstallType::on_txtInstallDest_textChanged(const QString & /*arg1*/) void InstallWizard_Setup::on_txtInstallDest_textChanged(const QString & /*arg1*/)
{ {
emit completeChanged(); emit completeChanged();
} }
void InstallWizard_InstallType::on_btnInstallSteamBrowseSource_clicked() void InstallWizard_Setup::on_btnInstallSteamBrowseSource_clicked()
{ {
const QString location = QFileDialog::getExistingDirectory(this, tr("Select Steam Location"), ui->txtInstallSteamSource->text()); const QString location = QFileDialog::getExistingDirectory(this, tr("Select Steam Location"), ui->txtInstallSteamSource->text());
@ -248,7 +248,7 @@ void InstallWizard_InstallType::on_btnInstallSteamBrowseSource_clicked()
} }
} }
void InstallWizard_InstallType::on_btnInstallSteamBrowseDest_clicked() void InstallWizard_Setup::on_btnInstallSteamBrowseDest_clicked()
{ {
const QString location = QFileDialog::getExistingDirectory(this, tr("Select Quake III Arena Location"), ui->txtInstallSteamDest->text()); const QString location = QFileDialog::getExistingDirectory(this, tr("Select Quake III Arena Location"), ui->txtInstallSteamDest->text());
@ -258,12 +258,12 @@ void InstallWizard_InstallType::on_btnInstallSteamBrowseDest_clicked()
} }
} }
void InstallWizard_InstallType::on_txtInstallSteamSource_textChanged(const QString & /*arg1*/) void InstallWizard_Setup::on_txtInstallSteamSource_textChanged(const QString & /*arg1*/)
{ {
emit completeChanged(); emit completeChanged();
} }
void InstallWizard_InstallType::on_txtInstallSteamDest_textChanged(const QString & /*arg1*/) void InstallWizard_Setup::on_txtInstallSteamDest_textChanged(const QString & /*arg1*/)
{ {
emit completeChanged(); emit completeChanged();
} }

View file

@ -4,18 +4,18 @@
#include <QWizardPage> #include <QWizardPage>
namespace Ui { namespace Ui {
class InstallWizard_InstallType; class InstallWizard_Setup;
} }
class Settings; class Settings;
class InstallWizard_InstallType : public QWizardPage class InstallWizard_Setup : public QWizardPage
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit InstallWizard_InstallType(QWidget *parent, Settings *settings); explicit InstallWizard_Setup(QWidget *parent, Settings *settings);
~InstallWizard_InstallType(); ~InstallWizard_Setup();
virtual void initializePage(); virtual void initializePage();
virtual bool validatePage(); virtual bool validatePage();
virtual bool isComplete() const; virtual bool isComplete() const;
@ -56,7 +56,7 @@ private:
Page_InstallSteam Page_InstallSteam
}; };
Ui::InstallWizard_InstallType *ui; Ui::InstallWizard_Setup *ui;
Settings *settings; Settings *settings;
bool isQuake3PatchRequired; bool isQuake3PatchRequired;

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>InstallWizard_InstallType</class> <class>InstallWizard_Setup</class>
<widget class="QWizardPage" name="InstallWizard_InstallType"> <widget class="QWizardPage" name="InstallWizard_Setup">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>

View file

@ -16,7 +16,7 @@ SOURCES += main.cpp\
mainwindow.cpp \ mainwindow.cpp \
settings.cpp \ settings.cpp \
installwizard.cpp \ installwizard.cpp \
installwizard_installtype.cpp \ installwizard_setup.cpp \
installwizard_finished.cpp \ installwizard_finished.cpp \
installwizard_patch.cpp \ installwizard_patch.cpp \
installwizard_eula.cpp \ installwizard_eula.cpp \
@ -25,7 +25,7 @@ SOURCES += main.cpp\
HEADERS += mainwindow.h \ HEADERS += mainwindow.h \
settings.h \ settings.h \
installwizard.h \ installwizard.h \
installwizard_installtype.h \ installwizard_setup.h \
installwizard_finished.h \ installwizard_finished.h \
installwizard_patch.h \ installwizard_patch.h \
installwizard_eula.h \ installwizard_eula.h \
@ -33,7 +33,7 @@ HEADERS += mainwindow.h \
FORMS += mainwindow.ui \ FORMS += mainwindow.ui \
installwizard.ui \ installwizard.ui \
installwizard_installtype.ui \ installwizard_setup.ui \
installwizard_finished.ui \ installwizard_finished.ui \
installwizard_patch.ui \ installwizard_patch.ui \
installwizard_eula.ui \ installwizard_eula.ui \