2 * Copyright (C) 2003-2006 Andriy Rysin (rysin@kde.org)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 #include "x11helper.h"
32 XkbRules(bool layoutsOnly
=false);
34 const QHash
<QString
, QString
> &models() const { return m_models
; }
35 const QHash
<QString
, QString
> &layouts() const { return m_layouts
; }
36 const QHash
<QString
, XkbOption
> &options() const { return m_options
; }
37 const QHash
<QString
, XkbOptionGroup
> &optionGroups() const { return m_optionGroups
; }
39 QList
<XkbVariant
> getAvailableVariants(const QString
& layout
);
40 unsigned int getDefaultGroup(const QString
& layout
, const QString
& includeGroup
);
42 bool isSingleGroup(const QString
& layout
);
46 QHash
<QString
, QString
> m_models
;
47 QHash
<QString
, QString
> m_layouts
;
48 QHash
<QString
, XkbOptionGroup
> m_optionGroups
;
49 QHash
<QString
, XkbOption
> m_options
;
50 QHash
<QString
, QList
<XkbVariant
>*> m_varLists
;
52 QString X11_DIR
; // pseudo-constant
54 static bool m_layoutsClean
;
57 void loadNewRules(bool layoutsOnly
);
59 void loadRules(const QString
&filename
, bool layoutsOnly
=false);
60 void fixOptionGroups();