From 6545443b246129c800999ea774fc9a25c0cb6f08 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 3 Mar 2017 12:32:35 +0100 Subject: [PATCH] Documentation++ --- src/modules/partition/gui/ChoicePage.cpp | 6 ---- src/modules/partition/gui/ChoicePage.h | 29 +++++++++++++++++++ src/modules/partition/gui/PartitionViewStep.h | 4 +-- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 68a75c2df..a213e62fa 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -141,12 +141,6 @@ ChoicePage::~ChoicePage() {} -/** - * @brief ChoicePage::init runs when the PartitionViewStep and the PartitionCoreModule are - * ready. Sets up the rest of the UI based on os-prober output. - * @param core the PartitionCoreModule pointer. - * @param osproberEntries the output of os-prober, cleaned up and structured. - */ void ChoicePage::init( PartitionCoreModule* core ) { diff --git a/src/modules/partition/gui/ChoicePage.h b/src/modules/partition/gui/ChoicePage.h index 0c3f0b5a8..f102cf419 100644 --- a/src/modules/partition/gui/ChoicePage.h +++ b/src/modules/partition/gui/ChoicePage.h @@ -42,6 +42,12 @@ class DeviceInfoWidget; class Device; + +/** + * @brief The ChoicePage class is the first page of the partitioning interface. + * It offers a choice between partitioning operations and initiates all automated + * partitioning modes. For manual partitioning, see PartitionPage. + */ class ChoicePage : public QWidget, private Ui::ChoicePage { Q_OBJECT @@ -58,13 +64,36 @@ public: explicit ChoicePage( QWidget* parent = nullptr ); virtual ~ChoicePage(); + /** + * @brief init runs when the PartitionViewStep and the PartitionCoreModule are + * ready. Sets up the rest of the UI based on os-prober output. + * @param core the PartitionCoreModule pointer. + */ void init( PartitionCoreModule* core ); + /** + * @brief isNextEnabled answers whether the current state of the page is such + * that progressing to the next page should be allowed. + * @return true if next is allowed, otherwise false. + */ bool isNextEnabled() const; + /** + * @brief currentChoice returns the enum Choice value corresponding to the + * currently selected partitioning mode (with a PrettyRadioButton). + * @return the enum Choice value. + */ Choice currentChoice() const; + /** + * @brief onLeave runs when control passes from this page to another one. + */ void onLeave(); + + /** + * @brief applyActionChoice reacts to a choice of partitioning mode. + * @param choice the partitioning action choice. + */ void applyActionChoice( ChoicePage::Choice choice ); signals: diff --git a/src/modules/partition/gui/PartitionViewStep.h b/src/modules/partition/gui/PartitionViewStep.h index ce66e4bf9..7f31a3d1b 100644 --- a/src/modules/partition/gui/PartitionViewStep.h +++ b/src/modules/partition/gui/PartitionViewStep.h @@ -33,8 +33,8 @@ class PartitionCoreModule; class QStackedWidget; /** - * The starting point of the module. Instantiates PartitionCoreModule and - * PartitionPage, then connect them. + * The starting point of the module. Instantiates PartitionCoreModule, + * ChoicePage and PartitionPage, then connects them. */ class PLUGINDLLEXPORT PartitionViewStep : public Calamares::ViewStep {