00001 #ifndef __RULES_H__
00002 #define __RULES_H__
00003
00004 #include <tqstring.h>
00005 #include <tqdict.h>
00006 #include <tqmap.h>
00007
00008
00009 class XkbRules
00010 {
00011 public:
00012
00013 XkbRules(bool layoutsOnly=false);
00014
00015 const TQDict<char> &models() const { return m_models; };
00016 const TQDict<char> &layouts() const { return m_layouts; };
00017 const TQDict<char> &options() const { return m_options; };
00018
00019 TQStringList getAvailableVariants(const TQString& layout);
00020 unsigned int getDefaultGroup(const TQString& layout, const TQString& includeGroup);
00021
00022 bool isSingleGroup(const TQString& layout);
00023
00024 protected:
00025
00026 void loadRules(TQString filename, bool layoutsOnly=false);
00027 void loadGroups(TQString filename);
00028 void loadOldLayouts(TQString filename);
00029
00030 private:
00031
00032 TQDict<char> m_models;
00033 TQDict<char> m_layouts;
00034 TQDict<char> m_options;
00035 TQMap<TQString, unsigned int> m_initialGroups;
00036 TQDict<TQStringList> m_varLists;
00037 TQStringList m_oldLayouts;
00038 TQStringList m_nonLatinLayouts;
00039
00040 TQString X11_DIR;
00041
00042
00043 };
00044
00045
00046 #endif