summaryrefslogtreecommitdiffstats
path: root/kxkb/rules.h
blob: e7a6e8840e6dd52837a94d22539b679f5cc142a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef __RULES_H__
#define __RULES_H__

#include <tqstring.h>
#include <tqdict.h>
#include <tqmap.h>

#include "layoutunit.h"

class XkbRules
{
public:

  XkbRules(bool layoutsOnly=false);

  const TQDict<char> &models() const { return m_models; };
  const TQDict<char> &layouts() const { return m_layouts; };
  const TQDict<char> &options() const { return m_options; };

  TQStringList getAvailableVariants(const TQString& layout);

  TQString getLayoutName(LayoutUnit layout) const;

protected:
  void loadRules(TQString filename, bool layoutsOnly=false);

private:

  TQDict<char> m_models;
  TQDict<char> m_layouts;
  TQDict<char> m_options;
  TQDict<TQStringList> m_varLists;

  TQString X11_DIR;	// pseudo-constant

//  void fixLayouts();
};


#endif