source: calamares/trunk/fuentes/src/modules/locale/timezonewidget/localeglobal.h @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 13 months ago

sync with github

File size: 1.9 KB
Line 
1/* === This file is part of Calamares - <https://github.com/calamares> ===
2 *
3 *   Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
4 *
5 *   Originally from the Manjaro Installation Framework
6 *   by Roland Singer <roland@manjaro.org>
7 *   Copyright (C) 2007 Free Software Foundation, Inc.
8 *
9 *   Calamares is free software: you can redistribute it and/or modify
10 *   it under the terms of the GNU General Public License as published by
11 *   the Free Software Foundation, either version 3 of the License, or
12 *   (at your option) any later version.
13 *
14 *   Calamares is distributed in the hope that it will be useful,
15 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 *   GNU General Public License for more details.
18 *
19 *   You should have received a copy of the GNU General Public License
20 *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
21 */
22
23#ifndef LOCALEGLOBAL_H
24#define LOCALEGLOBAL_H
25
26#include <QString>
27#include <QFile>
28#include <QTextStream>
29#include <QDir>
30#include <QStringList>
31#include <QList>
32#include <QHash>
33#include <QMap>
34#include <QRegExp>
35#include <QDebug>
36#include "localeconst.h"
37
38class LocaleGlobal
39{
40public:
41    struct Locale {
42        QString description, locale;
43    };
44
45    struct Location {
46        QString region, zone, country;
47        double latitude, longitude;
48        static QString pretty( const QString& s );
49        QString comment() const;
50    };
51
52    static void init();
53    static QHash<QString, QHash<QString, QList<LocaleGlobal::Locale> > > getLocales();
54    static QHash<QString, QList<LocaleGlobal::Location> > getLocations();
55
56private:
57    static QHash<QString, QHash<QString, QList<LocaleGlobal::Locale> > > locales;
58    static QHash<QString, QList<LocaleGlobal::Location> > locations;
59
60    static void initLocales();
61    static void initLocations();
62    static double getRightGeoLocation(QString str);
63};
64
65#endif // LOCALEGLOBAL_H
Note: See TracBrowser for help on using the repository browser.