mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-02 14:01:10 +00:00
44cd0fc9a1
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7862 a592a061-630c-0410-9148-cb99ea01b6c8
69 lines
1.4 KiB
C++
69 lines
1.4 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file QLyXKeySym.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Asger and Jürgen
|
|
* \author John Levon
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef QLYXKEYSYM_H
|
|
#define QLYXKEYSYM_H
|
|
|
|
#include "frontends/LyXKeySym.h"
|
|
|
|
#include <qstring.h>
|
|
|
|
class QKeyEvent;
|
|
|
|
/**
|
|
* Qt-specific key press.
|
|
*
|
|
* This is some really sick stuff.
|
|
*/
|
|
class QLyXKeySym : public LyXKeySym {
|
|
public:
|
|
QLyXKeySym();
|
|
|
|
virtual ~QLyXKeySym() {}
|
|
|
|
/// delayed constructor
|
|
void set(QKeyEvent * ev);
|
|
|
|
/// set from a LyX symbolic name
|
|
virtual void init(std::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 std::string getSymbolName() const;
|
|
|
|
/// Is this normal insertable text ? (last ditch attempt only)
|
|
virtual bool isText() const;
|
|
|
|
/**
|
|
* Return the value of the keysym into the local ISO encoding.
|
|
* This converts the LyXKeySym to a 8-bit encoded character.
|
|
* This relies on user to use the right encoding.
|
|
*/
|
|
virtual char getISOEncoded(std::string const & encoding) const;
|
|
///
|
|
int key() const {
|
|
return key_;
|
|
}
|
|
private:
|
|
/// the Qt sym value
|
|
int key_;
|
|
/// the event string value
|
|
QString text_;
|
|
};
|
|
|
|
#endif // QLYXKEYSYM_H
|