Merge branch 'remove-signal-done'

This commit is contained in:
Adriaan de Groot 2019-02-25 08:11:32 -05:00
commit 633e2a87aa
27 changed files with 36 additions and 200 deletions

View File

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

View File

@ -68,13 +68,39 @@ public:
//TODO: we might want to make this a QSharedPointer //TODO: we might want to make this a QSharedPointer
virtual QWidget* widget() = 0; virtual QWidget* widget() = 0;
virtual void next() = 0; /**
virtual void back() = 0; * @brief Multi-page support, go next
*
* Multi-page view steps need to manage the content visible in the widget
* themselves. This method is called when the user clicks the *next*
* button, and should switch to the next of the multiple-pages. It needs
* to be consistent with both isNextEnabled() and isAtEnd().
*
* In particular: when isAtEnd() returns false, next() is called when
* the user clicks the button and a new page should be shown by this
* view step. When isAtEnd() returns true, clicking the button will
* switch to the next view step in sequence, rather than a next page
* in the current view step.
*/
virtual void next();
/// @brief Multi-page support, go back
virtual void back();
/// @brief Can the user click *next* with currently-filled-in data?
virtual bool isNextEnabled() const = 0; virtual bool isNextEnabled() const = 0;
/// @brief Can the user click *previous* with currently-filled-in data?
virtual bool isBackEnabled() const = 0; virtual bool isBackEnabled() const = 0;
/**
* @brief Multi-page support, switch to previous view step?
*
* For a multi-page view step, this indicates that the first (beginning)
* page is showing. Clicking *previous* when at the beginning of a view
* step, switches to the previous step, not the previous page of the
* current view step.
*/
virtual bool isAtBeginning() const = 0; virtual bool isAtBeginning() const = 0;
/// @brief Multi-page support, switch to next view step?
virtual bool isAtEnd() const = 0; virtual bool isAtEnd() const = 0;
/** /**
@ -103,7 +129,6 @@ public:
signals: signals:
void nextStatusChanged( bool status ); void nextStatusChanged( bool status );
void done();
/* Emitted when the viewstep thinks it needs more space than is currently /* Emitted when the viewstep thinks it needs more space than is currently
* available for display. @p enlarge is the requested additional space, * available for display. @p enlarge is the requested additional space,

View File

@ -67,18 +67,6 @@ FinishedViewStep::widget()
} }
void
FinishedViewStep::next()
{
emit done();
}
void
FinishedViewStep::back()
{}
bool bool
FinishedViewStep::isNextEnabled() const FinishedViewStep::isNextEnabled() const
{ {

View File

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

View File

@ -53,18 +53,6 @@ InteractiveTerminalViewStep::widget()
} }
void
InteractiveTerminalViewStep::next()
{
emit done();
}
void
InteractiveTerminalViewStep::back()
{}
bool bool
InteractiveTerminalViewStep::isNextEnabled() const InteractiveTerminalViewStep::isNextEnabled() const
{ {

View File

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

View File

@ -65,19 +65,6 @@ KeyboardViewStep::widget()
} }
void
KeyboardViewStep::next()
{
//TODO: actually save those settings somewhere
emit done();
}
void
KeyboardViewStep::back()
{}
bool bool
KeyboardViewStep::isNextEnabled() const KeyboardViewStep::isNextEnabled() const
{ {

View File

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

View File

@ -59,18 +59,6 @@ LicenseViewStep::widget()
} }
void
LicenseViewStep::next()
{
emit done();
}
void
LicenseViewStep::back()
{}
bool bool
LicenseViewStep::isNextEnabled() const LicenseViewStep::isNextEnabled() const
{ {

View File

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

View File

@ -190,18 +190,6 @@ LocaleViewStep::widget()
} }
void
LocaleViewStep::next()
{
emit done();
}
void
LocaleViewStep::back()
{}
bool bool
LocaleViewStep::isNextEnabled() const LocaleViewStep::isNextEnabled() const
{ {

View File

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

View File

@ -69,18 +69,6 @@ NetInstallViewStep::widget()
} }
void
NetInstallViewStep::next()
{
emit done();
}
void
NetInstallViewStep::back()
{}
bool bool
NetInstallViewStep::isNextEnabled() const NetInstallViewStep::isNextEnabled() const
{ {

View File

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

View File

@ -292,25 +292,8 @@ PartitionViewStep::next()
if ( m_core->isDirty() ) if ( m_core->isDirty() )
m_manualPartitionPage->onRevertClicked(); m_manualPartitionPage->onRevertClicked();
} }
else if ( m_choicePage->currentChoice() == ChoicePage::Erase )
{
emit done();
return;
}
else if ( m_choicePage->currentChoice() == ChoicePage::Alongside )
{
emit done();
return;
}
else if ( m_choicePage->currentChoice() == ChoicePage::Replace )
{
emit done();
return;
}
cDebug() << "Choice applied: " << m_choicePage->currentChoice(); cDebug() << "Choice applied: " << m_choicePage->currentChoice();
return;
} }
emit done();
} }

View File

@ -76,18 +76,6 @@ PlasmaLnfViewStep::widget()
} }
void
PlasmaLnfViewStep::next()
{
emit done();
}
void
PlasmaLnfViewStep::back()
{}
bool bool
PlasmaLnfViewStep::isNextEnabled() const PlasmaLnfViewStep::isNextEnabled() const
{ {

View File

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

View File

@ -51,18 +51,6 @@ SummaryViewStep::widget()
} }
void
SummaryViewStep::next()
{
emit done();
}
void
SummaryViewStep::back()
{}
bool bool
SummaryViewStep::isNextEnabled() const SummaryViewStep::isNextEnabled() const
{ {

View File

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

View File

@ -67,18 +67,6 @@ TrackingViewStep::widget()
} }
void
TrackingViewStep::next()
{
emit done();
}
void
TrackingViewStep::back()
{}
bool bool
TrackingViewStep::isNextEnabled() const TrackingViewStep::isNextEnabled() const
{ {

View File

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

View File

@ -61,18 +61,6 @@ UsersViewStep::widget()
} }
void
UsersViewStep::next()
{
emit done();
}
void
UsersViewStep::back()
{}
bool bool
UsersViewStep::isNextEnabled() const UsersViewStep::isNextEnabled() const
{ {

View File

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

View File

@ -72,18 +72,6 @@ WebViewStep::widget()
} }
void
WebViewStep::next()
{
emit done();
}
void
WebViewStep::back()
{}
bool bool
WebViewStep::isNextEnabled() const WebViewStep::isNextEnabled() const
{ {

View File

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

View File

@ -60,18 +60,6 @@ WelcomeViewStep::widget()
} }
void
WelcomeViewStep::next()
{
emit done();
}
void
WelcomeViewStep::back()
{}
bool bool
WelcomeViewStep::isNextEnabled() const WelcomeViewStep::isNextEnabled() const
{ {

View File

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