Added some logic to the page switching

loadfix
pvdk 11 years ago
parent 8162f8370b
commit 0e1d3237fe

@ -1,7 +1,14 @@
#include "componentselectionpage.hpp" #include "componentselectionpage.hpp"
#include "mainwizard.hpp"
Wizard::ComponentSelectionPage::ComponentSelectionPage(QWidget *parent) : Wizard::ComponentSelectionPage::ComponentSelectionPage(QWidget *parent) :
QWizardPage(parent) QWizardPage(parent)
{ {
setupUi(this); setupUi(this);
} }
int Wizard::ComponentSelectionPage::nextId() const
{
return MainWizard::Page_Installation;
}

@ -14,6 +14,8 @@ namespace Wizard
public: public:
ComponentSelectionPage(QWidget *parent = 0); ComponentSelectionPage(QWidget *parent = 0);
int nextId() const;
}; };
} }

@ -5,3 +5,8 @@ Wizard::ConclusionPage::ConclusionPage(QWidget *parent) :
{ {
setupUi(this); setupUi(this);
} }
int Wizard::ConclusionPage::nextId() const
{
return -1;
}

@ -14,6 +14,8 @@ namespace Wizard
public: public:
ConclusionPage(QWidget *parent = 0); ConclusionPage(QWidget *parent = 0);
int nextId() const;
}; };
} }

@ -1,7 +1,14 @@
#include "existinginstallationpage.hpp" #include "existinginstallationpage.hpp"
#include "mainwizard.hpp"
Wizard::ExistingInstallationPage::ExistingInstallationPage(QWidget *parent) : Wizard::ExistingInstallationPage::ExistingInstallationPage(QWidget *parent) :
QWizardPage(parent) QWizardPage(parent)
{ {
setupUi(this); setupUi(this);
} }
int Wizard::ExistingInstallationPage::nextId() const
{
return MainWizard::Page_ComponentSelection;
}

@ -14,6 +14,8 @@ namespace Wizard
public: public:
ExistingInstallationPage(QWidget *parent = 0); ExistingInstallationPage(QWidget *parent = 0);
int nextId() const;
}; };
} }

@ -1,7 +1,14 @@
#include "importpage.hpp" #include "importpage.hpp"
#include "mainwizard.hpp"
Wizard::ImportPage::ImportPage(QWidget *parent) : Wizard::ImportPage::ImportPage(QWidget *parent) :
QWizardPage(parent) QWizardPage(parent)
{ {
setupUi(this); setupUi(this);
} }
int Wizard::ImportPage::nextId() const
{
return MainWizard::Page_Conclusion;
}

@ -14,6 +14,8 @@ namespace Wizard
public: public:
ImportPage(QWidget *parent = 0); ImportPage(QWidget *parent = 0);
int nextId() const;
}; };
} }

@ -1,7 +1,14 @@
#include "installationpage.hpp" #include "installationpage.hpp"
#include "mainwizard.hpp"
Wizard::InstallationPage::InstallationPage(QWidget *parent) : Wizard::InstallationPage::InstallationPage(QWidget *parent) :
QWizardPage(parent) QWizardPage(parent)
{ {
setupUi(this); setupUi(this);
} }
int Wizard::InstallationPage::nextId() const
{
return MainWizard::Page_Import;
}

@ -14,6 +14,8 @@ namespace Wizard
public: public:
InstallationPage(QWidget *parent = 0); InstallationPage(QWidget *parent = 0);
int nextId() const;
}; };
} }

@ -1,7 +1,14 @@
#include "installationtargetpage.hpp" #include "installationtargetpage.hpp"
#include "mainwizard.hpp"
Wizard::InstallationTargetPage::InstallationTargetPage(QWidget *parent) : Wizard::InstallationTargetPage::InstallationTargetPage(QWidget *parent) :
QWizardPage(parent) QWizardPage(parent)
{ {
setupUi(this); setupUi(this);
} }
int Wizard::InstallationTargetPage::nextId() const
{
return MainWizard::Page_ComponentSelection;
}

@ -14,6 +14,8 @@ namespace Wizard
public: public:
InstallationTargetPage(QWidget *parent = 0); InstallationTargetPage(QWidget *parent = 0);
int nextId() const;
}; };
} }

@ -1,7 +1,14 @@
#include "intropage.hpp" #include "intropage.hpp"
#include "mainwizard.hpp"
Wizard::IntroPage::IntroPage(QWidget *parent) : Wizard::IntroPage::IntroPage(QWidget *parent) :
QWizardPage(parent) QWizardPage(parent)
{ {
setupUi(this); setupUi(this);
} }
int Wizard::IntroPage::nextId() const
{
return MainWizard::Page_MethodSelection;
}

@ -14,6 +14,8 @@ namespace Wizard
public: public:
IntroPage(QWidget *parent = 0); IntroPage(QWidget *parent = 0);
int nextId() const;
}; };
} }

@ -1,7 +1,18 @@
#include "methodselectionpage.hpp" #include "methodselectionpage.hpp"
#include "mainwizard.hpp"
Wizard::MethodSelectionPage::MethodSelectionPage(QWidget *parent) : Wizard::MethodSelectionPage::MethodSelectionPage(QWidget *parent) :
QWizardPage(parent) QWizardPage(parent)
{ {
setupUi(this); setupUi(this);
} }
int Wizard::MethodSelectionPage::nextId() const
{
if (newLocationRadioButton->isChecked()) {
return MainWizard::Page_InstallationTarget;
} else {
return MainWizard::Page_ExistingInstallation;
}
}

@ -14,6 +14,8 @@ namespace Wizard
public: public:
MethodSelectionPage(QWidget *parent = 0); MethodSelectionPage(QWidget *parent = 0);
int nextId() const;
}; };
} }

Loading…
Cancel
Save