Add prettyStatus to Locale module.

main
Teo Mrnjavac 11 years ago
parent e622fe4f99
commit f1ba2e1270

@ -149,3 +149,15 @@ LocalePage::init()
emit m_tzWidget->locationChanged( m_tzWidget->getCurrentLocation() ); 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;
}

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

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

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

Loading…
Cancel
Save