[libcalamaresui] Provide default implementations of next() and back()

- These methods are used for multi-page view-steps, which are rare.
   For all the others, just drop the empty implementation and defer
   to the base class.
This commit is contained in:
Adriaan de Groot 2019-02-25 07:49:10 -05:00
parent 08565b5f17
commit 6071489788
26 changed files with 10 additions and 169 deletions

View File

@ -52,6 +52,14 @@ void
ViewStep::onLeave()
{}
void
ViewStep::next()
{}
void
ViewStep::back()
{}
void
ViewStep::setModuleInstanceKey( const QString& instanceKey )

View File

@ -68,8 +68,8 @@ public:
//TODO: we might want to make this a QSharedPointer
virtual QWidget* widget() = 0;
virtual void next() = 0;
virtual void back() = 0;
virtual void next();
virtual void back();
virtual bool isNextEnabled() const = 0;
virtual bool isBackEnabled() const = 0;

View File

@ -67,17 +67,6 @@ FinishedViewStep::widget()
}
void
FinishedViewStep::next()
{
}
void
FinishedViewStep::back()
{}
bool
FinishedViewStep::isNextEnabled() const
{

View File

@ -40,9 +40,6 @@ public:
QWidget* widget() override;
void next() override;
void back() override;
bool isNextEnabled() const override;
bool isBackEnabled() const override;

View File

@ -53,17 +53,6 @@ InteractiveTerminalViewStep::widget()
}
void
InteractiveTerminalViewStep::next()
{
}
void
InteractiveTerminalViewStep::back()
{}
bool
InteractiveTerminalViewStep::isNextEnabled() const
{

View File

@ -41,9 +41,6 @@ public:
QWidget* widget() override;
void next() override;
void back() override;
bool isNextEnabled() const override;
bool isBackEnabled() const override;

View File

@ -65,17 +65,6 @@ KeyboardViewStep::widget()
}
void
KeyboardViewStep::next()
{
}
void
KeyboardViewStep::back()
{}
bool
KeyboardViewStep::isNextEnabled() const
{

View File

@ -42,9 +42,6 @@ public:
QWidget* widget() override;
void next() override;
void back() override;
bool isNextEnabled() const override;
bool isBackEnabled() const override;

View File

@ -59,17 +59,6 @@ LicenseViewStep::widget()
}
void
LicenseViewStep::next()
{
}
void
LicenseViewStep::back()
{}
bool
LicenseViewStep::isNextEnabled() const
{

View File

@ -42,9 +42,6 @@ public:
QWidget* widget() override;
void next() override;
void back() override;
bool isNextEnabled() const override;
bool isBackEnabled() const override;

View File

@ -190,17 +190,6 @@ LocaleViewStep::widget()
}
void
LocaleViewStep::next()
{
}
void
LocaleViewStep::back()
{}
bool
LocaleViewStep::isNextEnabled() const
{

View File

@ -45,9 +45,6 @@ public:
QWidget* widget() override;
void next() override;
void back() override;
bool isNextEnabled() const override;
bool isBackEnabled() const override;

View File

@ -69,17 +69,6 @@ NetInstallViewStep::widget()
}
void
NetInstallViewStep::next()
{
}
void
NetInstallViewStep::back()
{}
bool
NetInstallViewStep::isNextEnabled() const
{

View File

@ -42,9 +42,6 @@ public:
QWidget* widget() override;
void next() override;
void back() override;
bool isNextEnabled() const override;
bool isBackEnabled() const override;

View File

@ -76,17 +76,6 @@ PlasmaLnfViewStep::widget()
}
void
PlasmaLnfViewStep::next()
{
}
void
PlasmaLnfViewStep::back()
{}
bool
PlasmaLnfViewStep::isNextEnabled() const
{

View File

@ -41,9 +41,6 @@ public:
QWidget* widget() override;
void next() override;
void back() override;
bool isNextEnabled() const override;
bool isBackEnabled() const override;

View File

@ -51,17 +51,6 @@ SummaryViewStep::widget()
}
void
SummaryViewStep::next()
{
}
void
SummaryViewStep::back()
{}
bool
SummaryViewStep::isNextEnabled() const
{

View File

@ -40,9 +40,6 @@ public:
QWidget* widget() override;
void next() override;
void back() override;
bool isNextEnabled() const override;
bool isBackEnabled() const override;

View File

@ -67,17 +67,6 @@ TrackingViewStep::widget()
}
void
TrackingViewStep::next()
{
}
void
TrackingViewStep::back()
{}
bool
TrackingViewStep::isNextEnabled() const
{

View File

@ -43,9 +43,6 @@ public:
QWidget* widget() override;
void next() override;
void back() override;
bool isNextEnabled() const override;
bool isBackEnabled() const override;

View File

@ -61,17 +61,6 @@ UsersViewStep::widget()
}
void
UsersViewStep::next()
{
}
void
UsersViewStep::back()
{}
bool
UsersViewStep::isNextEnabled() const
{

View File

@ -43,9 +43,6 @@ public:
QWidget* widget() override;
void next() override;
void back() override;
bool isNextEnabled() const override;
bool isBackEnabled() const override;

View File

@ -72,17 +72,6 @@ WebViewStep::widget()
}
void
WebViewStep::next()
{
}
void
WebViewStep::back()
{}
bool
WebViewStep::isNextEnabled() const
{

View File

@ -50,8 +50,6 @@ public:
QWidget* widget() override;
void next() override;
void back() override;
void onActivate() override;
bool isNextEnabled() const override;

View File

@ -60,17 +60,6 @@ WelcomeViewStep::widget()
}
void
WelcomeViewStep::next()
{
}
void
WelcomeViewStep::back()
{}
bool
WelcomeViewStep::isNextEnabled() const
{

View File

@ -43,9 +43,6 @@ public:
QWidget* widget() override;
void next() override;
void back() override;
bool isNextEnabled() const override;
bool isBackEnabled() const override;