]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/QLyXKeySym.h
swap colors: superscript box should be blue, not black
[features.git] / src / frontends / qt4 / QLyXKeySym.h
index 61339cdcab71dc114bb61549f74e343ce127b86d..69d6001fe0707b63c4e73b868b57ebf81a38fac8 100644 (file)
 #include <QString>
 #include <QKeyEvent>
 
+
 class QKeyEvent;
 
+namespace lyx {
+
 /**
  * Qt-specific key press.
  *
@@ -31,6 +34,11 @@ public:
 
        virtual ~QLyXKeySym() {}
 
+       /// .
+       /// inlined out because of profiling results under linux when
+       /// opening a document.
+       inline bool operator==(LyXKeySym const& ks) const;
+
        /// delayed constructor
        void set(QKeyEvent * ev);
 
@@ -53,13 +61,14 @@ public:
         * Return the value of the keysym into the UCS-4 encoding.
         * This converts the LyXKeySym to a 32-bit encoded character.
         */
-       virtual size_t getUCSEncoded() const;
+       virtual char_type getUCSEncoded() const;
 
-       /// Return a human-readable version of a key+modifier pair.
-       virtual std::string const print(key_modifier::state mod) const;
-
-       ///
-       QString const qprint(key_modifier::state mod) const;
+       /**
+        * Return a human-readable version of a key+modifier pair.
+        * This will be the GUI version (translated and with special
+        * characters for Mac OS X) when \c forgui is true.
+        */
+       virtual docstring const print(key_modifier::state mod, bool forgui) const;
 
        ///
        int key() const {
@@ -72,4 +81,7 @@ private:
        QString text_;
 };
 
+
+} // namespace lyx
+
 #endif // QLYXKEYSYM_H