MagicSmoke  $VERSION$
MKey Class Reference

#include <bcskeyboard.h>

Public Types

enum  KeyType {
  AllKeyRelease = 0, CharKey = 1, CapsLock = 2, NumLock = 3,
  Backspace = 4, Return = 5, Tabulator = 6, Space = 7,
  ModifierOnly =8, Escape = 9
}
 
enum  Modifier {
  None = 0, Ctrl = 1, Shift = 2, Alt = 4,
  AltGr = 8, GUI = 16
}
 

Public Member Functions

 MKey ()
 
 MKey (const MKey &k, Modifiers m)
 
 MKey (const MKey &)=default
 
 MKey (MKey &&)=default
 
 MKey (QChar, Modifiers m=None)
 
 MKey (KeyType t, Modifiers m=None)
 
bool isPrintable (bool ignoremodifier=false) const
 
bool isValid () const
 
Modifiers modifiers () const
 
bool operator!= (const MKey &k)
 
MKeyoperator= (const MKey &)=default
 
MKeyoperator= (MKey &&)=default
 
bool operator== (const MKey &)
 
 Q_DECLARE_FLAGS (Modifiers, Modifier)
 
QChar toChar (bool ignoremodifier=false) const
 
QString toCharName () const
 returns the encoded character name as used in layout files More...
 
MKey toLower () const
 
MKey toUpper () const
 

Static Public Member Functions

static MKey fromCharName (QString)
 returns a key object matching the encoded character name from a layout file More...
 

Member Enumeration Documentation

Enumerator
AllKeyRelease 
CharKey 
CapsLock 
NumLock 
Backspace 
Return 
Tabulator 
Space 
ModifierOnly 
Escape 
Enumerator
None 
Ctrl 
Shift 
Alt 
AltGr 
GUI 

Constructor & Destructor Documentation

MKey::MKey ( )
inline

Referenced by fromCharName().

MKey::MKey ( const MKey k,
Modifiers  m 
)

References CharKey, and Shift.

MKey::MKey ( const MKey )
default
MKey::MKey ( MKey &&  )
default
MKey::MKey ( QChar  c,
Modifiers  m = None 
)

References Return, Shift, Space, and Tabulator.

MKey::MKey ( KeyType  t,
Modifiers  m = None 
)
inline

Member Function Documentation

MKey MKey::fromCharName ( QString  n)
static

returns a key object matching the encoded character name from a layout file

References Alt, AltGr, Backspace, CapsLock, Ctrl, Escape, MKey(), None, NumLock, Return, Shift, Space, and Tabulator.

Referenced by MHidBarcodeScanner::MHidBarcodeScanner(), and MHidKeyLayout::parseLayout().

bool MKey::isPrintable ( bool  ignoremodifier = false) const

References Alt, CharKey, Ctrl, and Space.

Referenced by toChar(), and MKeySequence::toString().

bool MKey::isValid ( ) const
inline

References AllKeyRelease.

Modifiers MKey::modifiers ( ) const
inline

Referenced by MKeySequence::toString().

bool MKey::operator!= ( const MKey k)
inline

References operator==().

MKey& MKey::operator= ( const MKey )
default
MKey& MKey::operator= ( MKey &&  )
default
bool MKey::operator== ( const MKey k)

References CharKey.

Referenced by operator!=().

MKey::Q_DECLARE_FLAGS ( Modifiers  ,
Modifier   
)
QChar MKey::toChar ( bool  ignoremodifier = false) const

References CharKey, isPrintable(), and Space.

Referenced by MKeySequence::toString().

QString MKey::toCharName ( ) const

returns the encoded character name as used in layout files

References AllKeyRelease, Alt, AltGr, Backspace, CapsLock, CharKey, Ctrl, Escape, NumLock, Return, Shift, Space, and Tabulator.

MKey MKey::toLower ( ) const
inline
MKey MKey::toUpper ( ) const
inline

The documentation for this class was generated from the following files: