source: calamares/trunk/fuentes/src/modules/keyboard/keyboardwidget/keyboardglobal.h @ 7538

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

sync with github

File size: 1.7 KB
Line 
1/* === This file is part of Calamares - <https://github.com/calamares> ===
2 *
3 *   Copyright 2014, Teo Mrnjavac <teo@kde.org>
4 *   Copyright 2017, Adriaan de Groot <groot@kde.org>
5 *
6 *   Originally from the Manjaro Installation Framework
7 *   by Roland Singer <roland@manjaro.org>
8 *   Copyright (C) 2007 Free Software Foundation, Inc.
9 *
10 *   Calamares is free software: you can redistribute it and/or modify
11 *   it under the terms of the GNU General Public License as published by
12 *   the Free Software Foundation, either version 3 of the License, or
13 *   (at your option) any later version.
14 *
15 *   Calamares is distributed in the hope that it will be useful,
16 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
17 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 *   GNU General Public License for more details.
19 *
20 *   You should have received a copy of the GNU General Public License
21 *   along with Calamares. If not, see <http://www.gnu.org/licenses/>.
22 */
23
24#ifndef KEYBOARDGLOBAL_H
25#define KEYBOARDGLOBAL_H
26
27#include <QString>
28#include <QFile>
29#include <QTextStream>
30#include <QDir>
31#include <QStringList>
32#include <QList>
33#include <QHash>
34#include <QMap>
35#include <QRegExp>
36#include <QDebug>
37
38#define XKB_FILE "/usr/share/X11/xkb/rules/base.lst"
39
40class KeyboardGlobal
41{
42public:
43    struct KeyboardInfo {
44        QString description;
45        QMap< QString, QString > variants;
46    };
47
48    using LayoutsMap = QMap< QString, KeyboardInfo >;
49
50    static LayoutsMap getKeyboardLayouts();
51    static QMap< QString, QString > getKeyboardModels();
52
53
54private:
55    static QMap< QString, QString > parseKeyboardModels(QString filepath);
56    static LayoutsMap parseKeyboardLayouts(QString filepath);
57};
58
59#endif // KEYBOARDGLOBAL_H
Note: See TracBrowser for help on using the repository browser.