mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-25 08:28:22 -04:00
Create jobs in locale viewmodule.
This commit is contained in:
parent
34c5ac3182
commit
271b0945c9
5 changed files with 24 additions and 1 deletions
|
@ -8,6 +8,7 @@ calamares_add_plugin( locale
|
|||
LocaleViewStep.cpp
|
||||
LocalePage.cpp
|
||||
QtWaitingSpinner.cpp
|
||||
SetTimezoneJob.cpp
|
||||
timezonewidget/timezonewidget.cpp
|
||||
timezonewidget/localeglobal.cpp
|
||||
UI
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "LocalePage.h"
|
||||
|
||||
#include "timezonewidget/timezonewidget.h"
|
||||
#include "SetTimezoneJob.h"
|
||||
|
||||
#include <QBoxLayout>
|
||||
#include <QComboBox>
|
||||
|
@ -179,3 +180,15 @@ LocalePage::prettyStatus() const
|
|||
return status;
|
||||
}
|
||||
|
||||
|
||||
QList< Calamares::job_ptr >
|
||||
LocalePage::createJobs()
|
||||
{
|
||||
QList< Calamares::job_ptr > list;
|
||||
LocaleGlobal::Location location = m_tzWidget->getCurrentLocation();
|
||||
|
||||
Calamares::Job* j = new SetTimezoneJob( location.region, location.zone );
|
||||
list.append( Calamares::job_ptr( j ) );
|
||||
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
#ifndef LOCALEPAGE_H
|
||||
#define LOCALEPAGE_H
|
||||
|
||||
#include "Typedefs.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class QComboBox;
|
||||
|
@ -34,6 +36,8 @@ public:
|
|||
|
||||
QString prettyStatus() const;
|
||||
|
||||
QList< Calamares::job_ptr > createJobs();
|
||||
|
||||
private:
|
||||
TimeZoneWidget* m_tzWidget;
|
||||
QComboBox* m_regionCombo;
|
||||
|
|
|
@ -154,13 +154,16 @@ LocaleViewStep::isAtEnd() const
|
|||
QList< Calamares::job_ptr >
|
||||
LocaleViewStep::jobs() const
|
||||
{
|
||||
return QList< Calamares::job_ptr >();
|
||||
return m_jobs;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LocaleViewStep::onLeave()
|
||||
{
|
||||
m_jobs.clear();
|
||||
m_jobs.append( m_actualWidget->createJobs() );
|
||||
|
||||
m_prettyStatus = m_actualWidget->prettyStatus();
|
||||
}
|
||||
|
||||
|
|
|
@ -67,6 +67,8 @@ private:
|
|||
QString m_prettyStatus;
|
||||
|
||||
QPair< QString, QString > m_startingTimezone;
|
||||
|
||||
QList< Calamares::job_ptr > m_jobs;
|
||||
};
|
||||
|
||||
#endif // LOCALEVIEWSTEP_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue