]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/QLyXKeySym.h
partial fonts fix. Like Juergen said we really need our own dialog.
[lyx.git] / src / frontends / qt2 / QLyXKeySym.h
index 48651796dd734e888d597556956ab8d4f58a86d1..e104b262f9720206966a1c92d0b05645c2cfbcc7 100644 (file)
@@ -1,11 +1,13 @@
 // -*- 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:
        QLyXKeySym();
 
-       void set(int key, QString const & text);
+       virtual ~QLyXKeySym() {}
 
-       virtual void init(string const & symbolname);
+       /// delayed constructor
+       void set(QKeyEvent * ev);
 
-       virtual ~QLyXKeySym() {}
+       /// set from a LyX symbolic name
+       virtual void init(string const & symbolname);
 
        /// Is this a valid key?
        virtual bool isOK() const;
 
        /// Is this a modifier key only?
        virtual bool isModifier() const;
-       
+
+       /// return the LyX symbolic name
        virtual string getSymbolName() const;
 
        /**
@@ -47,11 +56,14 @@ public:
         * 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 event string value
        QString text_;
 };