]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QLyXKeySym.h
Missing files, get keyboard partly working
[lyx.git] / src / frontends / qt2 / QLyXKeySym.h
1 // -*- C++ -*-
2 /**
3  * \file QLyXKeySym.h
4  * Copyright 2002 the LyX Team
5  * Read the file COPYING
6  *
7  * \author Asger and Juergen
8  * \author John Levon <moz@compsoc.man.ac.uk>
9  */
10
11 #ifndef QLYXKEYSYM_H
12 #define QLYXKEYSYM_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "LString.h"
19 #include "frontends/LyXKeySym.h"
20
21 #include <qstring.h> 
22  
23 /**
24  * Qt-specific key press.
25  */
26 class QLyXKeySym : public LyXKeySym {
27 public:
28         QLyXKeySym();
29
30         void set(int key, QString const & text);
31
32         virtual void init(string const & symbolname);
33
34         virtual ~QLyXKeySym() {}
35
36         /// Is this a valid key?
37         virtual bool isOK() const;
38
39         /// Is this a modifier key only?
40         virtual bool isModifier() const;
41         
42         virtual string getSymbolName() const;
43
44         /**
45          * Return the value of the keysym into the local ISO encoding.
46          * This converts the LyXKeySym to a 8-bit encoded character.
47          * This relies on user to use the right encoding.
48          */
49         virtual char getISOEncoded() const;
50
51         virtual bool operator==(LyXKeySym const & k) const;
52
53 private:
54         int key_;
55         QString text_;
56 };
57
58 #endif // QLYXKEYSYM_H