Add prettyStatus to Locale module.

This commit is contained in:
Teo Mrnjavac 2014-07-08 18:25:54 +02:00
parent e622fe4f99
commit f1ba2e1270
4 changed files with 32 additions and 0 deletions

View File

@ -149,3 +149,15 @@ LocalePage::init()
emit m_tzWidget->locationChanged( m_tzWidget->getCurrentLocation() );
}
QString
LocalePage::prettyStatus() const
{
QString status;
status += tr( "Set timezone to %1/%2.<br/>" )
.arg( m_regionCombo->currentText() )
.arg( m_timezoneCombo->currentText() );
return status;
}

View File

@ -32,6 +32,8 @@ public:
void init();
QString prettyStatus() const;
private:
TimeZoneWidget* m_tzWidget;
QComboBox* m_regionCombo;

View File

@ -103,6 +103,13 @@ LocaleViewStep::prettyName() const
}
QString
LocaleViewStep::prettyStatus() const
{
return m_prettyStatus;
}
QWidget*
LocaleViewStep::widget()
{
@ -149,3 +156,10 @@ LocaleViewStep::jobs() const
{
return QList< Calamares::job_ptr >();
}
void
LocaleViewStep::onLeave()
{
m_prettyStatus = m_actualWidget->prettyStatus();
}

View File

@ -40,6 +40,7 @@ public:
virtual ~LocaleViewStep();
QString prettyName() const override;
QString prettyStatus() const override;
QWidget* widget() override;
@ -53,12 +54,15 @@ public:
QList< Calamares::job_ptr > jobs() const override;
void onLeave() override;
private:
QWidget* m_widget;
QFutureWatcher< void > m_initWatcher;
LocalePage* m_actualWidget;
bool m_nextEnabled;
QString m_prettyStatus;
};
#endif // LOCALEVIEWSTEP_H