MagicSmoke  $VERSION$
MHidKeyLayout Class Reference

#include <bcskeyboard.h>

Public Member Functions

 MHidKeyLayout ()
 loads the base layout only More...
 
 MHidKeyLayout (QString name)
 loads the specified layout More...
 
 MHidKeyLayout (const MHidKeyLayout &)=default
 
 MHidKeyLayout (MHidKeyLayout &&)=default
 
void clearKeyMapping ()
 
bool isValid () const
 returns true if this is a populated layout More...
 
QString layoutCodeName () const
 returns the iso code of the layout (base of the file name) or an empty string if this is a custom layout More...
 
QString layoutFileName () const
 returns the full file name of the layout More...
 
QString layoutName () const
 returns the human readable name of the layout More...
 
bool loadLayout (QString filename)
 attempts to load a layout file, normally the name mentioned should not contain a complete path or the suffix .kbl - the implementation will automatically search for a matching file; if it does contain a slash it is assumed to be a complete file name More...
 
MHidKeyLayoutoperator= (const MHidKeyLayout &)=default
 
MHidKeyLayoutoperator= (MHidKeyLayout &&)=default
 
bool parseLayout (QString content, QString filename=QString())
 
void resetLayout ()
 
void setKeyMapping (unsigned char keycode, const QList< MKey > &c)
 
void setLayoutName (QString l)
 
MKeySequence toKeys (const MHidKeySequence &) const
 
QString toLayoutDoc () const
 
QString toString (const MHidKeySequence &) const
 

Static Public Member Functions

static QMap< QString, QString > findLayouts ()
 

Constructor & Destructor Documentation

MHidKeyLayout::MHidKeyLayout ( )

loads the base layout only

References loadLayout().

MHidKeyLayout::MHidKeyLayout ( QString  name)
explicit

loads the specified layout

References loadLayout().

MHidKeyLayout::MHidKeyLayout ( const MHidKeyLayout )
default
MHidKeyLayout::MHidKeyLayout ( MHidKeyLayout &&  )
default

Member Function Documentation

void MHidKeyLayout::clearKeyMapping ( )

Referenced by resetLayout().

QMap< QString, QString > MHidKeyLayout::findLayouts ( )
static
bool MHidKeyLayout::isValid ( ) const
inline

returns true if this is a populated layout

QString MHidKeyLayout::layoutCodeName ( ) const

returns the iso code of the layout (base of the file name) or an empty string if this is a custom layout

Referenced by findLayouts().

QString MHidKeyLayout::layoutFileName ( ) const
inline

returns the full file name of the layout

Referenced by findLayouts().

QString MHidKeyLayout::layoutName ( ) const
inline

returns the human readable name of the layout

Referenced by findLayouts(), and MHidBarcodeScanner::MHidBarcodeScanner().

bool MHidKeyLayout::loadLayout ( QString  filename)

attempts to load a layout file, normally the name mentioned should not contain a complete path or the suffix .kbl - the implementation will automatically search for a matching file; if it does contain a slash it is assumed to be a complete file name

References parseLayout().

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

MHidKeyLayout& MHidKeyLayout::operator= ( const MHidKeyLayout )
default
MHidKeyLayout& MHidKeyLayout::operator= ( MHidKeyLayout &&  )
default
bool MHidKeyLayout::parseLayout ( QString  content,
QString  filename = QString() 
)

References MKey::fromCharName(), and loadLayout().

Referenced by loadLayout().

void MHidKeyLayout::resetLayout ( )

References clearKeyMapping(), and loadLayout().

void MHidKeyLayout::setKeyMapping ( unsigned char  keycode,
const QList< MKey > &  c 
)
void MHidKeyLayout::setLayoutName ( QString  l)
inline
MKeySequence MHidKeyLayout::toKeys ( const MHidKeySequence hsq) const

References MKey::AltGr, and MKey::Shift.

Referenced by toString().

QString MHidKeyLayout::toLayoutDoc ( ) const
QString MHidKeyLayout::toString ( const MHidKeySequence hsq) const

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