3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Asger and Juergen
9 * Full author contact details are available in file CREDITS
15 #pragma implementation
18 #include "QLyXKeySym.h"
26 QLyXKeySym::QLyXKeySym()
27 : LyXKeySym(), key_(0)
32 void QLyXKeySym::set(QKeyEvent * ev)
39 void QLyXKeySym::init(string const & symbolname)
41 key_ = string_to_qkey(symbolname);
42 text_ = symbolname.c_str();
43 lyxerr[Debug::KEY] << "Init key to " << key_ << ", " << text_ << endl;
47 bool QLyXKeySym::isOK() const
53 bool QLyXKeySym::isModifier() const
55 return q_is_modifier(key_);
59 string QLyXKeySym::getSymbolName() const
61 string sym(qkey_to_string(key_));
64 lyxerr[Debug::KEY] << "sym empty in getSymbolName()" << endl;
67 lyxerr[Debug::KEY] << "getSymbolName() -> " << sym << endl;
72 char QLyXKeySym::getISOEncoded() const
74 lyxerr[Debug::KEY] << "getISO returning " << text_.latin1()[0] << endl;
75 return text_.latin1()[0];
79 bool QLyXKeySym::operator==(LyXKeySym const & k) const
81 QLyXKeySym const & o = static_cast<QLyXKeySym const &>(k);
83 return o.key_ == key_;