// -*- C++ -*-
/**
* \file QLyXKeySym.h
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
* \author Asger and Juergen
- * \author John Levon <moz@compsoc.man.ac.uk>
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS
*/
#ifndef QLYXKEYSYM_H
#include "LString.h"
#include "frontends/LyXKeySym.h"
-#include <qstring.h>
-
+#include <qstring.h>
+
+class QKeyEvent;
+
/**
* Qt-specific key press.
+ *
+ * This is some really sick stuff.
*/
class QLyXKeySym : public LyXKeySym {
public:
virtual ~QLyXKeySym() {}
/// delayed constructor
- void set(int key, QString const & text);
+ void set(QKeyEvent * ev);
/// set from a LyX symbolic name
virtual void init(string const & symbolname);
/// Is this a modifier key only?
virtual bool isModifier() const;
-
+
/// return the LyX symbolic name
virtual string getSymbolName() const;
* This relies on user to use the right encoding.
*/
virtual char getISOEncoded() const;
-
- virtual bool operator==(LyXKeySym const & k) const;
-
+ ///
+ int key() const {
+ return key_;
+ }
private:
/// the Qt sym value
int key_;
- /**
- * The generated text from the symbol. This will only be
- * filled when the QLyXKeySym is used to pass a key press
- * event, not when stored in a kbsequence etc.
- */
+ /// the event string value
QString text_;
};