2019-11-25 20:51:45 +01:00
|
|
|
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
2020-07-09 16:08:51 +02:00
|
|
|
*
|
2020-05-30 16:15:03 +02:00
|
|
|
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
|
2020-07-09 16:08:51 +02:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2019-11-25 20:51:45 +01:00
|
|
|
*
|
|
|
|
* Calamares is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Calamares is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
2020-05-30 16:15:03 +02:00
|
|
|
*
|
|
|
|
*
|
2019-11-25 20:51:45 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LOCALE_TIMEZONE_H
|
|
|
|
#define LOCALE_TIMEZONE_H
|
|
|
|
|
2019-12-09 21:46:10 +01:00
|
|
|
#include "DllMacro.h"
|
|
|
|
|
|
|
|
#include <QAbstractListModel>
|
2019-11-26 11:18:35 +01:00
|
|
|
#include <QObject>
|
2020-08-05 15:11:52 +02:00
|
|
|
#include <QVariant>
|
2019-12-10 11:36:05 +01:00
|
|
|
|
2019-11-25 20:51:45 +01:00
|
|
|
namespace CalamaresUtils
|
|
|
|
{
|
|
|
|
namespace Locale
|
|
|
|
{
|
2020-08-05 15:11:52 +02:00
|
|
|
struct Private;
|
2019-11-25 20:51:45 +01:00
|
|
|
|
2020-08-05 15:11:52 +02:00
|
|
|
/** @brief The list of timezone regions
|
2020-07-09 16:08:51 +02:00
|
|
|
*
|
2020-08-05 15:11:52 +02:00
|
|
|
* The regions are a short list of global areas (Africa, America, India ..)
|
|
|
|
* which contain zones.
|
2020-07-09 16:08:51 +02:00
|
|
|
*/
|
2020-08-05 15:11:52 +02:00
|
|
|
class DLLEXPORT RegionsModel : public QAbstractListModel
|
2019-11-25 20:51:45 +01:00
|
|
|
{
|
2020-03-24 16:04:14 +01:00
|
|
|
Q_OBJECT
|
2019-11-25 20:51:45 +01:00
|
|
|
|
2020-08-05 15:11:52 +02:00
|
|
|
RegionsModel();
|
2020-03-24 16:04:14 +01:00
|
|
|
|
2019-12-09 21:46:10 +01:00
|
|
|
public:
|
2020-08-05 15:11:52 +02:00
|
|
|
virtual ~RegionsModel() override;
|
|
|
|
static RegionsModel* instance();
|
2019-12-09 21:46:10 +01:00
|
|
|
|
|
|
|
int rowCount( const QModelIndex& parent ) const override;
|
|
|
|
QVariant data( const QModelIndex& index, int role ) const override;
|
|
|
|
|
|
|
|
private:
|
2020-08-05 15:11:52 +02:00
|
|
|
Private *m_private;
|
2019-12-09 21:46:10 +01:00
|
|
|
};
|
|
|
|
|
2019-11-26 11:18:35 +01:00
|
|
|
} // namespace Locale
|
|
|
|
} // namespace CalamaresUtils
|
2019-11-25 20:51:45 +01:00
|
|
|
|
|
|
|
#endif // LOCALE_TIMEZONE_H
|