]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QLyXKeySym.C
Missing files, get keyboard partly working
[lyx.git] / src / frontends / qt2 / QLyXKeySym.C
1 /**
2  * \file QLyXKeySym.C
3  * Copyright 2002 the LyX Team
4  * Read the file COPYING
5  *
6  * \author Asger and Juergen
7  * \author John Levon <moz@compsoc.man.ac.uk>
8  */
9
10 #include <config.h>
11
12 #ifdef __GNUG__
13 #pragma implementation
14 #endif
15
16 #include "QLyXKeySym.h"
17
18 #include "qevent.h"
19 #include "qlkey.h"
20  
21 QLyXKeySym::QLyXKeySym()
22         : LyXKeySym(), key_(0), text_("")
23 {
24 }
25  
26  
27 void QLyXKeySym::set(int key, QString const & text)
28 {
29         key_ = key;
30         text_ = text;
31 }
32  
33
34 void QLyXKeySym::init(string const & symbolname)
35 {
36         // FIXME: ARGHH !
37         key_ = string_to_qkey(symbolname);
38 }
39
40  
41 bool QLyXKeySym::isOK() const
42 {
43         // FIXME
44         return key_ != 0;
45 }
46  
47
48 bool QLyXKeySym::isModifier() const
49 {
50         return q_is_modifier(key_);
51 }
52
53  
54 string QLyXKeySym::getSymbolName() const
55 {
56         // FIXME
57         return qkey_to_string(key_);
58 }
59
60  
61 char QLyXKeySym::getISOEncoded() const
62 {
63         // FIXME
64         return text_.latin1()[0];
65 }
66  
67
68 bool QLyXKeySym::operator==(LyXKeySym const & k) const
69 {
70         QLyXKeySym const & o = static_cast<QLyXKeySym const &>(k);
71
72         // FIXME: UGHGHGHGGH
73         return o.key_ == key_ /*&& o.text_ == text_*/;
74 }