summaryrefslogtreecommitdiffstats
path: root/kxkb/rules.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kxkb/rules.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kxkb/rules.h')
-rw-r--r--kxkb/rules.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/kxkb/rules.h b/kxkb/rules.h
new file mode 100644
index 000000000..d3e72b7a6
--- /dev/null
+++ b/kxkb/rules.h
@@ -0,0 +1,46 @@
+#ifndef __RULES_H__
+#define __RULES_H__
+
+#include <qstring.h>
+#include <qdict.h>
+#include <qmap.h>
+
+
+class XkbRules
+{
+public:
+
+ XkbRules(bool layoutsOnly=false);
+
+ const QDict<char> &models() const { return m_models; };
+ const QDict<char> &layouts() const { return m_layouts; };
+ const QDict<char> &options() const { return m_options; };
+
+ QStringList getAvailableVariants(const QString& layout);
+ unsigned int getDefaultGroup(const QString& layout, const QString& includeGroup);
+
+ bool isSingleGroup(const QString& layout);
+
+protected:
+
+ void loadRules(QString filename, bool layoutsOnly=false);
+ void loadGroups(QString filename);
+ void loadOldLayouts(QString filename);
+
+private:
+
+ QDict<char> m_models;
+ QDict<char> m_layouts;
+ QDict<char> m_options;
+ QMap<QString, unsigned int> m_initialGroups;
+ QDict<QStringList> m_varLists;
+ QStringList m_oldLayouts;
+ QStringList m_nonLatinLayouts;
+
+ QString X11_DIR; // pseudo-constant
+
+// void fixLayouts();
+};
+
+
+#endif