Add prettyStatus to Keyboard module.

main
Teo Mrnjavac 11 years ago
parent c339ac8cfc
commit e622fe4f99

@ -170,6 +170,20 @@ KeyboardPage::init()
} }
QString
KeyboardPage::prettyStatus() const
{
QString status;
status += tr( "Set keyboard model to %1.<br/>" )
.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 void
KeyboardPage::onListLayoutCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous ) KeyboardPage::onListLayoutCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous )
{ {

@ -44,6 +44,8 @@ public:
void init(); void init();
QString prettyStatus() const;
protected slots: protected slots:
void onListLayoutCurrentItemChanged( QListWidgetItem* current, void onListLayoutCurrentItemChanged( QListWidgetItem* current,
QListWidgetItem* previous ); QListWidgetItem* previous );

@ -46,6 +46,13 @@ KeyboardViewStep::prettyName() const
} }
QString
KeyboardViewStep::prettyStatus() const
{
return m_prettyStatus;
}
QWidget* QWidget*
KeyboardViewStep::widget() KeyboardViewStep::widget()
{ {
@ -92,3 +99,10 @@ KeyboardViewStep::jobs() const
{ {
return QList< Calamares::job_ptr >(); return QList< Calamares::job_ptr >();
} }
void
KeyboardViewStep::onLeave()
{
m_prettyStatus = m_widget->prettyStatus();
}

@ -38,6 +38,7 @@ public:
virtual ~KeyboardViewStep(); virtual ~KeyboardViewStep();
QString prettyName() const override; QString prettyName() const override;
QString prettyStatus() const override;
QWidget* widget() override; QWidget* widget() override;
@ -51,9 +52,12 @@ public:
QList< Calamares::job_ptr > jobs() const override; QList< Calamares::job_ptr > jobs() const override;
void onLeave() override;
private: private:
KeyboardPage* m_widget; KeyboardPage* m_widget;
bool m_nextEnabled; bool m_nextEnabled;
QString m_prettyStatus;
}; };
#endif // KEYBOARDVIEWSTEP_H #endif // KEYBOARDVIEWSTEP_H

Loading…
Cancel
Save