Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

KeyMappings Class Reference

#include </home/clem/local/src/opie/noncore/applets/keyhelper/keyhelperapplet/misc/KeyMappings.h>

Collaboration diagram for KeyMappings:

Collaboration graph
[legend]
List of all members.

Public Types

typedef QWSServer::KeyMap KeyMap
typedef QMap< int, MapInfoCodeMaps

Public Member Functions

 KeyMappings ()
virtual ~KeyMappings ()
void setOriginal (int unicode, int modifiers)
void setModifiers (int modifiers)
void setUnicode (int unicode)
void setKeycode (int keycode)
int getUnicode ()
int getKeycode ()
int getModifiers ()
bool isDefined ()
void assign (int keycode, int keymask, int mapcode, int mapmodifiers=0, int unicode=0, int shift_unicode=0, int ctrl_unicode=0)
void assignModifier (const QString &type, const QString &state)
void assignUnicode (const QString &kind, const QString &ch)
void assignUnicode (int unicode)
bool apply (int unicode, int keycode, int modifiers, int keymask, bool isPress)
bool apply (int keycode, int keymask, bool isPress)
void setCapsLock (bool on=true)
void reset ()
void statistics ()

Private Member Functions

void init ()
void clear ()

Private Attributes

QMap< int, CodeMaps * > m_keymaps
MapInfo m_keyinfo
int m_modifiers
CodeMaps::Iterator m_it
bool m_capslock
bool m_isMapped

Member Typedef Documentation

typedef QMap<int, MapInfo> KeyMappings::CodeMaps
 

Definition at line 30 of file KeyMappings.h.

typedef QWSServer::KeyMap KeyMappings::KeyMap
 

Definition at line 29 of file KeyMappings.h.


Constructor & Destructor Documentation

KeyMappings::KeyMappings  ) 
 

Definition at line 51 of file KeyMappings.cpp.

References init(), and qDebug().

KeyMappings::~KeyMappings  )  [virtual]
 

Definition at line 57 of file KeyMappings.cpp.

References clear(), and qDebug().


Member Function Documentation

bool KeyMappings::apply int  keycode,
int  keymask,
bool  isPress
 

Definition at line 219 of file KeyMappings.cpp.

References QMap< Key, T >::begin(), QMap< Key, T >::contains(), QMap< Key, T >::end(), Qt::Key_CapsLock, MapInfo::keycode, m_capslock, m_isMapped, m_keyinfo, and m_keymaps.

bool KeyMappings::apply int  unicode,
int  keycode,
int  modifiers,
int  keymask,
bool  isPress
 

Definition at line 156 of file KeyMappings.cpp.

References QMap< Key, T >::begin(), cache, QMap< Key, T >::contains(), Qt::ControlButton, QMap< Key, T >::end(), g_mapCache, MapInfo::isDefined, Qt::Key_CapsLock, MapInfo::keycode, QChar::lower(), m_capslock, m_isMapped, m_keyinfo, m_keymaps, NULL, setOriginal(), setUnicode(), Qt::ShiftButton, and QChar::upper().

Referenced by KeyAction::doAction().

void KeyMappings::assign int  keycode,
int  keymask,
int  mapcode,
int  mapmodifiers = 0,
int  unicode = 0,
int  shift_unicode = 0,
int  ctrl_unicode = 0
 

Definition at line 84 of file KeyMappings.cpp.

References QMap< Key, T >::contains(), QMap< Key, T >::insert(), m_it, and m_keymaps.

Referenced by ModifiersHandler::endElement(), and MappingsHandler::endElement().

void KeyMappings::assignModifier const QString type,
const QString state
 

Definition at line 99 of file KeyMappings.cpp.

References Qt::AltButton, Qt::ControlButton, QString::lower(), Qt::ShiftButton, and str.

Referenced by MappingsHandler::endElement().

void KeyMappings::assignUnicode int  unicode  ) 
 

Definition at line 132 of file KeyMappings.cpp.

void KeyMappings::assignUnicode const QString kind,
const QString ch
 

Definition at line 118 of file KeyMappings.cpp.

References code, QString::lower(), str, and QString::unicode().

Referenced by MappingsHandler::endElement().

void KeyMappings::clear  )  [private]
 

Definition at line 73 of file KeyMappings.cpp.

References QMap< Key, T >::begin(), QMap< Key, T >::clear(), QMap< Key, T >::end(), g_mapCache, and m_keymaps.

Referenced by reset(), and ~KeyMappings().

int KeyMappings::getKeycode  ) 
 

Definition at line 327 of file KeyMappings.cpp.

References MapInfo::keycode, and m_keyinfo.

Referenced by KeyAction::doAction().

int KeyMappings::getModifiers  ) 
 

Definition at line 332 of file KeyMappings.cpp.

References m_modifiers.

Referenced by KeyAction::doAction().

int KeyMappings::getUnicode  ) 
 

Definition at line 290 of file KeyMappings.cpp.

References QChar::category(), category(), Qt::ControlButton, MapInfo::ctrl_unicode, QChar::Letter_Lowercase, QChar::Letter_Uppercase, QChar::lower(), m_capslock, m_isMapped, m_keyinfo, m_modifiers, qDebug(), MapInfo::shift_unicode, Qt::ShiftButton, MapInfo::unicode, and QChar::upper().

Referenced by KeyAction::doAction().

void KeyMappings::init  )  [private]
 

Definition at line 63 of file KeyMappings.cpp.

References m_capslock.

Referenced by KeyMappings().

bool KeyMappings::isDefined  ) 
 

Definition at line 337 of file KeyMappings.cpp.

References MapInfo::isDefined, and m_keyinfo.

Referenced by KeyAction::doAction().

void KeyMappings::reset  ) 
 

Definition at line 68 of file KeyMappings.cpp.

References clear().

Referenced by KeycfgReader::load(), and KeyHelper::reload().

void KeyMappings::setCapsLock bool  on = true  )  [inline]
 

Definition at line 52 of file KeyMappings.h.

References m_capslock, and on.

Referenced by KeyAction::checkState().

void KeyMappings::setKeycode int  keycode  ) 
 

Definition at line 285 of file KeyMappings.cpp.

References MapInfo::keycode, and m_keyinfo.

void KeyMappings::setModifiers int  modifiers  ) 
 

Definition at line 271 of file KeyMappings.cpp.

References m_keyinfo, m_modifiers, and MapInfo::modifiers.

Referenced by KeyAction::doAction().

void KeyMappings::setOriginal int  unicode,
int  modifiers
 

set original unicode

Definition at line 260 of file KeyMappings.cpp.

References Qt::ControlButton, MapInfo::ctrl_unicode, m_keyinfo, MapInfo::shift_unicode, Qt::ShiftButton, and MapInfo::unicode.

Referenced by apply(), and KeyAction::doAction().

void KeyMappings::setUnicode int  unicode  ) 
 

Definition at line 278 of file KeyMappings.cpp.

References MapInfo::ctrl_unicode, m_keyinfo, MapInfo::shift_unicode, and MapInfo::unicode.

Referenced by apply(), and KeyAction::doAction().

void KeyMappings::statistics  ) 
 

Definition at line 138 of file KeyMappings.cpp.

References QMap< Key, T >::begin(), QMap< Key, T >::end(), m_keymaps, qDebug(), and qWarning().

Referenced by KeycfgReader::load(), and KeyHelper::statistics().


Member Data Documentation

bool KeyMappings::m_capslock [private]
 

Definition at line 65 of file KeyMappings.h.

Referenced by apply(), getUnicode(), init(), and setCapsLock().

bool KeyMappings::m_isMapped [private]
 

Definition at line 66 of file KeyMappings.h.

Referenced by apply(), and getUnicode().

CodeMaps::Iterator KeyMappings::m_it [private]
 

Definition at line 63 of file KeyMappings.h.

Referenced by assign().

MapInfo KeyMappings::m_keyinfo [private]
 

Definition at line 61 of file KeyMappings.h.

Referenced by apply(), getKeycode(), getUnicode(), isDefined(), setKeycode(), setModifiers(), setOriginal(), and setUnicode().

QMap<int, CodeMaps*> KeyMappings::m_keymaps [private]
 

Definition at line 60 of file KeyMappings.h.

Referenced by apply(), assign(), clear(), and statistics().

int KeyMappings::m_modifiers [private]
 

Definition at line 62 of file KeyMappings.h.

Referenced by getModifiers(), getUnicode(), and setModifiers().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:37:42 2005 for OPIE by  doxygen 1.4.2