diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 4b01a15e7..79f4bc1c5 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -170,6 +170,20 @@ KeyboardPage::init() } +QString +KeyboardPage::prettyStatus() const +{ + QString status; + status += tr( "Set keyboard model to %1.
" ) + .arg( ui->comboBoxModel->currentText() ); + status += tr( "Set keyboard layout to %1/%2." ) + .arg( ui->listLayout->currentItem()->text() ) + .arg( ui->listVariant->currentItem()->text() ); + + return status; +} + + void KeyboardPage::onListLayoutCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous ) { diff --git a/src/modules/keyboard/KeyboardPage.h b/src/modules/keyboard/KeyboardPage.h index 0c279966c..560b961d4 100644 --- a/src/modules/keyboard/KeyboardPage.h +++ b/src/modules/keyboard/KeyboardPage.h @@ -44,6 +44,8 @@ public: void init(); + QString prettyStatus() const; + protected slots: void onListLayoutCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous ); diff --git a/src/modules/keyboard/KeyboardViewStep.cpp b/src/modules/keyboard/KeyboardViewStep.cpp index 808c82208..e7ec6eb2e 100644 --- a/src/modules/keyboard/KeyboardViewStep.cpp +++ b/src/modules/keyboard/KeyboardViewStep.cpp @@ -46,6 +46,13 @@ KeyboardViewStep::prettyName() const } +QString +KeyboardViewStep::prettyStatus() const +{ + return m_prettyStatus; +} + + QWidget* KeyboardViewStep::widget() { @@ -92,3 +99,10 @@ KeyboardViewStep::jobs() const { return QList< Calamares::job_ptr >(); } + + +void +KeyboardViewStep::onLeave() +{ + m_prettyStatus = m_widget->prettyStatus(); +} diff --git a/src/modules/keyboard/KeyboardViewStep.h b/src/modules/keyboard/KeyboardViewStep.h index 3c9b57b36..c5d8328c4 100644 --- a/src/modules/keyboard/KeyboardViewStep.h +++ b/src/modules/keyboard/KeyboardViewStep.h @@ -38,6 +38,7 @@ public: virtual ~KeyboardViewStep(); QString prettyName() const override; + QString prettyStatus() const override; QWidget* widget() override; @@ -51,9 +52,12 @@ public: QList< Calamares::job_ptr > jobs() const override; + void onLeave() override; + private: KeyboardPage* m_widget; bool m_nextEnabled; + QString m_prettyStatus; }; #endif // KEYBOARDVIEWSTEP_H