2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2014-07-02 17:59:24 +02:00
|
|
|
*
|
2020-08-22 01:19:58 +02:00
|
|
|
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
|
|
|
|
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2014-07-02 17:59:24 +02:00
|
|
|
*
|
2020-08-25 16:05:56 +02:00
|
|
|
* Calamares is Free Software: see the License-Identifier above.
|
2014-07-02 17:59:24 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LOCALEPAGE_H
|
|
|
|
#define LOCALEPAGE_H
|
|
|
|
|
2016-08-10 11:45:22 +02:00
|
|
|
#include "LocaleConfiguration.h"
|
2019-09-07 15:47:12 +02:00
|
|
|
|
2019-05-07 15:51:23 +02:00
|
|
|
#include "Job.h"
|
2019-12-10 10:30:48 +01:00
|
|
|
#include "locale/TimeZone.h"
|
2016-08-10 11:45:22 +02:00
|
|
|
|
2014-07-02 17:59:24 +02:00
|
|
|
#include <QWidget>
|
|
|
|
|
2019-12-10 10:30:48 +01:00
|
|
|
#include <memory>
|
|
|
|
|
2014-07-02 17:59:24 +02:00
|
|
|
class QComboBox;
|
2014-11-10 14:56:29 +01:00
|
|
|
class QLabel;
|
2014-11-25 17:41:27 +01:00
|
|
|
class QPushButton;
|
2020-07-20 12:58:35 +02:00
|
|
|
|
|
|
|
class Config;
|
2014-07-02 17:59:24 +02:00
|
|
|
class TimeZoneWidget;
|
|
|
|
|
|
|
|
class LocalePage : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2020-07-20 12:58:35 +02:00
|
|
|
explicit LocalePage( class Config* config, QWidget* parent = nullptr );
|
2014-11-25 17:41:27 +01:00
|
|
|
virtual ~LocalePage();
|
2014-07-02 17:59:24 +02:00
|
|
|
|
2014-11-26 18:52:44 +01:00
|
|
|
void onActivate();
|
|
|
|
|
2014-07-02 17:59:24 +02:00
|
|
|
private:
|
2020-07-20 12:58:35 +02:00
|
|
|
/// @brief Non-owning pointer to the ViewStep's config
|
|
|
|
Config* m_config;
|
|
|
|
|
2016-08-10 11:45:22 +02:00
|
|
|
void updateLocaleLabels();
|
2014-11-25 17:41:27 +01:00
|
|
|
|
2019-09-07 15:18:58 +02:00
|
|
|
void regionChanged( int currentIndex );
|
|
|
|
void zoneChanged( int currentIndex );
|
2020-08-06 01:27:03 +02:00
|
|
|
void locationChanged( const CalamaresUtils::Locale::TimeZoneData* location );
|
2019-09-07 15:47:12 +02:00
|
|
|
void changeLocale();
|
|
|
|
void changeFormats();
|
2019-09-07 15:18:58 +02:00
|
|
|
|
2014-07-02 17:59:24 +02:00
|
|
|
TimeZoneWidget* m_tzWidget;
|
|
|
|
QComboBox* m_regionCombo;
|
2014-11-25 17:41:27 +01:00
|
|
|
QComboBox* m_zoneCombo;
|
|
|
|
|
|
|
|
QLabel* m_regionLabel;
|
|
|
|
QLabel* m_zoneLabel;
|
|
|
|
QLabel* m_localeLabel;
|
|
|
|
QPushButton* m_localeChangeButton;
|
2016-08-10 11:45:22 +02:00
|
|
|
QLabel* m_formatsLabel;
|
|
|
|
QPushButton* m_formatsChangeButton;
|
2014-11-25 17:41:27 +01:00
|
|
|
|
2014-07-02 17:59:24 +02:00
|
|
|
|
|
|
|
bool m_blockTzWidgetSet;
|
|
|
|
};
|
|
|
|
|
2019-09-07 15:48:22 +02:00
|
|
|
#endif // LOCALEPAGE_H
|