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
KeyboardPage::onListLayoutCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous )
{

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

@ -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();
}

@ -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

Loading…
Cancel
Save