From 08565b5f179a22b0e2d53f6dae90aa5009eb354b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 25 Feb 2019 07:34:40 -0500 Subject: [PATCH 1/4] [libcalamaresui] Remove the signal done() from ViewStep - The signal is emitted, generally from next(), but not actually used. --- src/libcalamaresui/viewpages/ViewStep.h | 1 - src/modules/finished/FinishedViewStep.cpp | 1 - .../interactiveterminal/InteractiveTerminalViewStep.cpp | 1 - src/modules/keyboard/KeyboardViewStep.cpp | 2 -- src/modules/license/LicenseViewStep.cpp | 1 - src/modules/locale/LocaleViewStep.cpp | 1 - src/modules/netinstall/NetInstallViewStep.cpp | 1 - src/modules/partition/gui/PartitionViewStep.cpp | 4 ---- src/modules/plasmalnf/PlasmaLnfViewStep.cpp | 1 - src/modules/summary/SummaryViewStep.cpp | 1 - src/modules/tracking/TrackingViewStep.cpp | 1 - src/modules/users/UsersViewStep.cpp | 1 - src/modules/webview/WebViewStep.cpp | 1 - src/modules/welcome/WelcomeViewStep.cpp | 1 - 14 files changed, 18 deletions(-) diff --git a/src/libcalamaresui/viewpages/ViewStep.h b/src/libcalamaresui/viewpages/ViewStep.h index f10d29b96..d6b8e1f3c 100644 --- a/src/libcalamaresui/viewpages/ViewStep.h +++ b/src/libcalamaresui/viewpages/ViewStep.h @@ -103,7 +103,6 @@ public: signals: void nextStatusChanged( bool status ); - void done(); /* Emitted when the viewstep thinks it needs more space than is currently * available for display. @p enlarge is the requested additional space, diff --git a/src/modules/finished/FinishedViewStep.cpp b/src/modules/finished/FinishedViewStep.cpp index 3b807f69c..818a07909 100644 --- a/src/modules/finished/FinishedViewStep.cpp +++ b/src/modules/finished/FinishedViewStep.cpp @@ -70,7 +70,6 @@ FinishedViewStep::widget() void FinishedViewStep::next() { - emit done(); } diff --git a/src/modules/interactiveterminal/InteractiveTerminalViewStep.cpp b/src/modules/interactiveterminal/InteractiveTerminalViewStep.cpp index 2559ea635..3242e47e9 100644 --- a/src/modules/interactiveterminal/InteractiveTerminalViewStep.cpp +++ b/src/modules/interactiveterminal/InteractiveTerminalViewStep.cpp @@ -56,7 +56,6 @@ InteractiveTerminalViewStep::widget() void InteractiveTerminalViewStep::next() { - emit done(); } diff --git a/src/modules/keyboard/KeyboardViewStep.cpp b/src/modules/keyboard/KeyboardViewStep.cpp index 053266059..3e846db43 100644 --- a/src/modules/keyboard/KeyboardViewStep.cpp +++ b/src/modules/keyboard/KeyboardViewStep.cpp @@ -68,8 +68,6 @@ KeyboardViewStep::widget() void KeyboardViewStep::next() { - //TODO: actually save those settings somewhere - emit done(); } diff --git a/src/modules/license/LicenseViewStep.cpp b/src/modules/license/LicenseViewStep.cpp index 41ca02a7e..a02ef36c6 100644 --- a/src/modules/license/LicenseViewStep.cpp +++ b/src/modules/license/LicenseViewStep.cpp @@ -62,7 +62,6 @@ LicenseViewStep::widget() void LicenseViewStep::next() { - emit done(); } diff --git a/src/modules/locale/LocaleViewStep.cpp b/src/modules/locale/LocaleViewStep.cpp index 4a6eb229a..4a30bc307 100644 --- a/src/modules/locale/LocaleViewStep.cpp +++ b/src/modules/locale/LocaleViewStep.cpp @@ -193,7 +193,6 @@ LocaleViewStep::widget() void LocaleViewStep::next() { - emit done(); } diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index 6dd824b32..5104390eb 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -72,7 +72,6 @@ NetInstallViewStep::widget() void NetInstallViewStep::next() { - emit done(); } diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 3c71302e0..34d9c4a81 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -294,23 +294,19 @@ PartitionViewStep::next() } 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(); return; } - emit done(); } diff --git a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp index ef319bde4..6e4a3e89c 100644 --- a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp +++ b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp @@ -79,7 +79,6 @@ PlasmaLnfViewStep::widget() void PlasmaLnfViewStep::next() { - emit done(); } diff --git a/src/modules/summary/SummaryViewStep.cpp b/src/modules/summary/SummaryViewStep.cpp index 4f60a3c4f..2ebfa449b 100644 --- a/src/modules/summary/SummaryViewStep.cpp +++ b/src/modules/summary/SummaryViewStep.cpp @@ -54,7 +54,6 @@ SummaryViewStep::widget() void SummaryViewStep::next() { - emit done(); } diff --git a/src/modules/tracking/TrackingViewStep.cpp b/src/modules/tracking/TrackingViewStep.cpp index 417e10fc0..8927c6865 100644 --- a/src/modules/tracking/TrackingViewStep.cpp +++ b/src/modules/tracking/TrackingViewStep.cpp @@ -70,7 +70,6 @@ TrackingViewStep::widget() void TrackingViewStep::next() { - emit done(); } diff --git a/src/modules/users/UsersViewStep.cpp b/src/modules/users/UsersViewStep.cpp index 8ff7b0e7b..ad0fcb118 100644 --- a/src/modules/users/UsersViewStep.cpp +++ b/src/modules/users/UsersViewStep.cpp @@ -64,7 +64,6 @@ UsersViewStep::widget() void UsersViewStep::next() { - emit done(); } diff --git a/src/modules/webview/WebViewStep.cpp b/src/modules/webview/WebViewStep.cpp index 1db7c8e41..145ff36d5 100644 --- a/src/modules/webview/WebViewStep.cpp +++ b/src/modules/webview/WebViewStep.cpp @@ -75,7 +75,6 @@ WebViewStep::widget() void WebViewStep::next() { - emit done(); } diff --git a/src/modules/welcome/WelcomeViewStep.cpp b/src/modules/welcome/WelcomeViewStep.cpp index 86740fb3d..f3aa54532 100644 --- a/src/modules/welcome/WelcomeViewStep.cpp +++ b/src/modules/welcome/WelcomeViewStep.cpp @@ -63,7 +63,6 @@ WelcomeViewStep::widget() void WelcomeViewStep::next() { - emit done(); } From 6071489788010e027798d02a03c6a0da747b660c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 25 Feb 2019 07:49:10 -0500 Subject: [PATCH 2/4] [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. --- src/libcalamaresui/viewpages/ViewStep.cpp | 8 ++++++++ src/libcalamaresui/viewpages/ViewStep.h | 4 ++-- src/modules/finished/FinishedViewStep.cpp | 11 ----------- src/modules/finished/FinishedViewStep.h | 3 --- .../InteractiveTerminalViewStep.cpp | 11 ----------- .../interactiveterminal/InteractiveTerminalViewStep.h | 3 --- src/modules/keyboard/KeyboardViewStep.cpp | 11 ----------- src/modules/keyboard/KeyboardViewStep.h | 3 --- src/modules/license/LicenseViewStep.cpp | 11 ----------- src/modules/license/LicenseViewStep.h | 3 --- src/modules/locale/LocaleViewStep.cpp | 11 ----------- src/modules/locale/LocaleViewStep.h | 3 --- src/modules/netinstall/NetInstallViewStep.cpp | 11 ----------- src/modules/netinstall/NetInstallViewStep.h | 3 --- src/modules/plasmalnf/PlasmaLnfViewStep.cpp | 11 ----------- src/modules/plasmalnf/PlasmaLnfViewStep.h | 3 --- src/modules/summary/SummaryViewStep.cpp | 11 ----------- src/modules/summary/SummaryViewStep.h | 3 --- src/modules/tracking/TrackingViewStep.cpp | 11 ----------- src/modules/tracking/TrackingViewStep.h | 3 --- src/modules/users/UsersViewStep.cpp | 11 ----------- src/modules/users/UsersViewStep.h | 3 --- src/modules/webview/WebViewStep.cpp | 11 ----------- src/modules/webview/WebViewStep.h | 2 -- src/modules/welcome/WelcomeViewStep.cpp | 11 ----------- src/modules/welcome/WelcomeViewStep.h | 3 --- 26 files changed, 10 insertions(+), 169 deletions(-) diff --git a/src/libcalamaresui/viewpages/ViewStep.cpp b/src/libcalamaresui/viewpages/ViewStep.cpp index c6acb5208..ec78c316f 100644 --- a/src/libcalamaresui/viewpages/ViewStep.cpp +++ b/src/libcalamaresui/viewpages/ViewStep.cpp @@ -52,6 +52,14 @@ void ViewStep::onLeave() {} +void +ViewStep::next() +{} + +void +ViewStep::back() +{} + void ViewStep::setModuleInstanceKey( const QString& instanceKey ) diff --git a/src/libcalamaresui/viewpages/ViewStep.h b/src/libcalamaresui/viewpages/ViewStep.h index d6b8e1f3c..775f09203 100644 --- a/src/libcalamaresui/viewpages/ViewStep.h +++ b/src/libcalamaresui/viewpages/ViewStep.h @@ -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; diff --git a/src/modules/finished/FinishedViewStep.cpp b/src/modules/finished/FinishedViewStep.cpp index 818a07909..8457aa4cd 100644 --- a/src/modules/finished/FinishedViewStep.cpp +++ b/src/modules/finished/FinishedViewStep.cpp @@ -67,17 +67,6 @@ FinishedViewStep::widget() } -void -FinishedViewStep::next() -{ -} - - -void -FinishedViewStep::back() -{} - - bool FinishedViewStep::isNextEnabled() const { diff --git a/src/modules/finished/FinishedViewStep.h b/src/modules/finished/FinishedViewStep.h index 393527053..b1af598c7 100644 --- a/src/modules/finished/FinishedViewStep.h +++ b/src/modules/finished/FinishedViewStep.h @@ -40,9 +40,6 @@ public: QWidget* widget() override; - void next() override; - void back() override; - bool isNextEnabled() const override; bool isBackEnabled() const override; diff --git a/src/modules/interactiveterminal/InteractiveTerminalViewStep.cpp b/src/modules/interactiveterminal/InteractiveTerminalViewStep.cpp index 3242e47e9..d57eb7d05 100644 --- a/src/modules/interactiveterminal/InteractiveTerminalViewStep.cpp +++ b/src/modules/interactiveterminal/InteractiveTerminalViewStep.cpp @@ -53,17 +53,6 @@ InteractiveTerminalViewStep::widget() } -void -InteractiveTerminalViewStep::next() -{ -} - - -void -InteractiveTerminalViewStep::back() -{} - - bool InteractiveTerminalViewStep::isNextEnabled() const { diff --git a/src/modules/interactiveterminal/InteractiveTerminalViewStep.h b/src/modules/interactiveterminal/InteractiveTerminalViewStep.h index 3d5862935..55486691d 100644 --- a/src/modules/interactiveterminal/InteractiveTerminalViewStep.h +++ b/src/modules/interactiveterminal/InteractiveTerminalViewStep.h @@ -41,9 +41,6 @@ public: QWidget* widget() override; - void next() override; - void back() override; - bool isNextEnabled() const override; bool isBackEnabled() const override; diff --git a/src/modules/keyboard/KeyboardViewStep.cpp b/src/modules/keyboard/KeyboardViewStep.cpp index 3e846db43..40a5385a3 100644 --- a/src/modules/keyboard/KeyboardViewStep.cpp +++ b/src/modules/keyboard/KeyboardViewStep.cpp @@ -65,17 +65,6 @@ KeyboardViewStep::widget() } -void -KeyboardViewStep::next() -{ -} - - -void -KeyboardViewStep::back() -{} - - bool KeyboardViewStep::isNextEnabled() const { diff --git a/src/modules/keyboard/KeyboardViewStep.h b/src/modules/keyboard/KeyboardViewStep.h index 46a52a524..a5bdd579e 100644 --- a/src/modules/keyboard/KeyboardViewStep.h +++ b/src/modules/keyboard/KeyboardViewStep.h @@ -42,9 +42,6 @@ public: QWidget* widget() override; - void next() override; - void back() override; - bool isNextEnabled() const override; bool isBackEnabled() const override; diff --git a/src/modules/license/LicenseViewStep.cpp b/src/modules/license/LicenseViewStep.cpp index a02ef36c6..96a7b8660 100644 --- a/src/modules/license/LicenseViewStep.cpp +++ b/src/modules/license/LicenseViewStep.cpp @@ -59,17 +59,6 @@ LicenseViewStep::widget() } -void -LicenseViewStep::next() -{ -} - - -void -LicenseViewStep::back() -{} - - bool LicenseViewStep::isNextEnabled() const { diff --git a/src/modules/license/LicenseViewStep.h b/src/modules/license/LicenseViewStep.h index cf7b2bc15..a4fabc8e1 100644 --- a/src/modules/license/LicenseViewStep.h +++ b/src/modules/license/LicenseViewStep.h @@ -42,9 +42,6 @@ public: QWidget* widget() override; - void next() override; - void back() override; - bool isNextEnabled() const override; bool isBackEnabled() const override; diff --git a/src/modules/locale/LocaleViewStep.cpp b/src/modules/locale/LocaleViewStep.cpp index 4a30bc307..a7dc432f8 100644 --- a/src/modules/locale/LocaleViewStep.cpp +++ b/src/modules/locale/LocaleViewStep.cpp @@ -190,17 +190,6 @@ LocaleViewStep::widget() } -void -LocaleViewStep::next() -{ -} - - -void -LocaleViewStep::back() -{} - - bool LocaleViewStep::isNextEnabled() const { diff --git a/src/modules/locale/LocaleViewStep.h b/src/modules/locale/LocaleViewStep.h index 8006bc616..3f5c91621 100644 --- a/src/modules/locale/LocaleViewStep.h +++ b/src/modules/locale/LocaleViewStep.h @@ -45,9 +45,6 @@ public: QWidget* widget() override; - void next() override; - void back() override; - bool isNextEnabled() const override; bool isBackEnabled() const override; diff --git a/src/modules/netinstall/NetInstallViewStep.cpp b/src/modules/netinstall/NetInstallViewStep.cpp index 5104390eb..3c4fa5e58 100644 --- a/src/modules/netinstall/NetInstallViewStep.cpp +++ b/src/modules/netinstall/NetInstallViewStep.cpp @@ -69,17 +69,6 @@ NetInstallViewStep::widget() } -void -NetInstallViewStep::next() -{ -} - - -void -NetInstallViewStep::back() -{} - - bool NetInstallViewStep::isNextEnabled() const { diff --git a/src/modules/netinstall/NetInstallViewStep.h b/src/modules/netinstall/NetInstallViewStep.h index ee53f61ce..b07d3f96d 100644 --- a/src/modules/netinstall/NetInstallViewStep.h +++ b/src/modules/netinstall/NetInstallViewStep.h @@ -42,9 +42,6 @@ public: QWidget* widget() override; - void next() override; - void back() override; - bool isNextEnabled() const override; bool isBackEnabled() const override; diff --git a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp index 6e4a3e89c..5525f36fc 100644 --- a/src/modules/plasmalnf/PlasmaLnfViewStep.cpp +++ b/src/modules/plasmalnf/PlasmaLnfViewStep.cpp @@ -76,17 +76,6 @@ PlasmaLnfViewStep::widget() } -void -PlasmaLnfViewStep::next() -{ -} - - -void -PlasmaLnfViewStep::back() -{} - - bool PlasmaLnfViewStep::isNextEnabled() const { diff --git a/src/modules/plasmalnf/PlasmaLnfViewStep.h b/src/modules/plasmalnf/PlasmaLnfViewStep.h index b9a6b72e6..01db17821 100644 --- a/src/modules/plasmalnf/PlasmaLnfViewStep.h +++ b/src/modules/plasmalnf/PlasmaLnfViewStep.h @@ -41,9 +41,6 @@ public: QWidget* widget() override; - void next() override; - void back() override; - bool isNextEnabled() const override; bool isBackEnabled() const override; diff --git a/src/modules/summary/SummaryViewStep.cpp b/src/modules/summary/SummaryViewStep.cpp index 2ebfa449b..6835b2b05 100644 --- a/src/modules/summary/SummaryViewStep.cpp +++ b/src/modules/summary/SummaryViewStep.cpp @@ -51,17 +51,6 @@ SummaryViewStep::widget() } -void -SummaryViewStep::next() -{ -} - - -void -SummaryViewStep::back() -{} - - bool SummaryViewStep::isNextEnabled() const { diff --git a/src/modules/summary/SummaryViewStep.h b/src/modules/summary/SummaryViewStep.h index 9aff35cd0..88f177a4d 100644 --- a/src/modules/summary/SummaryViewStep.h +++ b/src/modules/summary/SummaryViewStep.h @@ -40,9 +40,6 @@ public: QWidget* widget() override; - void next() override; - void back() override; - bool isNextEnabled() const override; bool isBackEnabled() const override; diff --git a/src/modules/tracking/TrackingViewStep.cpp b/src/modules/tracking/TrackingViewStep.cpp index 8927c6865..304e2a971 100644 --- a/src/modules/tracking/TrackingViewStep.cpp +++ b/src/modules/tracking/TrackingViewStep.cpp @@ -67,17 +67,6 @@ TrackingViewStep::widget() } -void -TrackingViewStep::next() -{ -} - - -void -TrackingViewStep::back() -{} - - bool TrackingViewStep::isNextEnabled() const { diff --git a/src/modules/tracking/TrackingViewStep.h b/src/modules/tracking/TrackingViewStep.h index dc3ae823e..aaaf3bbae 100644 --- a/src/modules/tracking/TrackingViewStep.h +++ b/src/modules/tracking/TrackingViewStep.h @@ -43,9 +43,6 @@ public: QWidget* widget() override; - void next() override; - void back() override; - bool isNextEnabled() const override; bool isBackEnabled() const override; diff --git a/src/modules/users/UsersViewStep.cpp b/src/modules/users/UsersViewStep.cpp index ad0fcb118..3b1e6a5ad 100644 --- a/src/modules/users/UsersViewStep.cpp +++ b/src/modules/users/UsersViewStep.cpp @@ -61,17 +61,6 @@ UsersViewStep::widget() } -void -UsersViewStep::next() -{ -} - - -void -UsersViewStep::back() -{} - - bool UsersViewStep::isNextEnabled() const { diff --git a/src/modules/users/UsersViewStep.h b/src/modules/users/UsersViewStep.h index 81b80bced..a1995497c 100644 --- a/src/modules/users/UsersViewStep.h +++ b/src/modules/users/UsersViewStep.h @@ -43,9 +43,6 @@ public: QWidget* widget() override; - void next() override; - void back() override; - bool isNextEnabled() const override; bool isBackEnabled() const override; diff --git a/src/modules/webview/WebViewStep.cpp b/src/modules/webview/WebViewStep.cpp index 145ff36d5..50c270b09 100644 --- a/src/modules/webview/WebViewStep.cpp +++ b/src/modules/webview/WebViewStep.cpp @@ -72,17 +72,6 @@ WebViewStep::widget() } -void -WebViewStep::next() -{ -} - - -void -WebViewStep::back() -{} - - bool WebViewStep::isNextEnabled() const { diff --git a/src/modules/webview/WebViewStep.h b/src/modules/webview/WebViewStep.h index 6430cdcf1..c588318fa 100644 --- a/src/modules/webview/WebViewStep.h +++ b/src/modules/webview/WebViewStep.h @@ -50,8 +50,6 @@ public: QWidget* widget() override; - void next() override; - void back() override; void onActivate() override; bool isNextEnabled() const override; diff --git a/src/modules/welcome/WelcomeViewStep.cpp b/src/modules/welcome/WelcomeViewStep.cpp index f3aa54532..756c5aa74 100644 --- a/src/modules/welcome/WelcomeViewStep.cpp +++ b/src/modules/welcome/WelcomeViewStep.cpp @@ -60,17 +60,6 @@ WelcomeViewStep::widget() } -void -WelcomeViewStep::next() -{ -} - - -void -WelcomeViewStep::back() -{} - - bool WelcomeViewStep::isNextEnabled() const { diff --git a/src/modules/welcome/WelcomeViewStep.h b/src/modules/welcome/WelcomeViewStep.h index 34b84c29f..b556b1ca1 100644 --- a/src/modules/welcome/WelcomeViewStep.h +++ b/src/modules/welcome/WelcomeViewStep.h @@ -43,9 +43,6 @@ public: QWidget* widget() override; - void next() override; - void back() override; - bool isNextEnabled() const override; bool isBackEnabled() const override; From cece01e3c5848e487bf1e448f669ea5afa27d2be Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 25 Feb 2019 07:59:58 -0500 Subject: [PATCH 3/4] [partition] Simplify next() --- src/modules/partition/gui/PartitionViewStep.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 34d9c4a81..bee5ad965 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -292,20 +292,7 @@ PartitionViewStep::next() if ( m_core->isDirty() ) m_manualPartitionPage->onRevertClicked(); } - else if ( m_choicePage->currentChoice() == ChoicePage::Erase ) - { - return; - } - else if ( m_choicePage->currentChoice() == ChoicePage::Alongside ) - { - return; - } - else if ( m_choicePage->currentChoice() == ChoicePage::Replace ) - { - return; - } cDebug() << "Choice applied: " << m_choicePage->currentChoice(); - return; } } From 64ca9d0d5aa73701db7f1fe6f9694f76065a63c3 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 25 Feb 2019 08:11:03 -0500 Subject: [PATCH 4/4] [libcalamaresui] Document multi-page support. --- src/libcalamaresui/viewpages/ViewStep.h | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/libcalamaresui/viewpages/ViewStep.h b/src/libcalamaresui/viewpages/ViewStep.h index 775f09203..a1275a198 100644 --- a/src/libcalamaresui/viewpages/ViewStep.h +++ b/src/libcalamaresui/viewpages/ViewStep.h @@ -68,13 +68,39 @@ public: //TODO: we might want to make this a QSharedPointer virtual QWidget* widget() = 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; + /// @brief Can the user click *previous* with currently-filled-in data? 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; + /// @brief Multi-page support, switch to next view step? virtual bool isAtEnd() const = 0; /**