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

KeyModifiers Class Reference

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

Collaboration diagram for KeyModifiers:

Collaboration graph
[legend]
List of all members.

Public Types

typedef QValueList< ModifierInfo * > ModifierList

Public Slots

void resetToggles ()

Public Member Functions

 KeyModifiers ()
virtual ~KeyModifiers ()
void addType (const QString &type)
ModifierInfoassign (const QString &type, int keycode, int keymask=0, bool toggle=false)
void assignRelease (int keycode)
void assignRelease (ModifierInfo *info, int keycode)
void setToggle ()
void setToggle (ModifierInfo *info)
bool isToggled ()
void resetStates ()
void keepToggles ()
bool pressKey (int keycode, int modifiers)
void releaseKey (int keycode)
int getState ()
int getState (int modifiers, bool reset=false)
int getMask (const QString &type)
int getModifiers (int modifiers)
bool isModifier (int keycode)
void statistics ()
void reset ()

Private Member Functions

void clear ()
void init ()

Private Attributes

QMap< QString, int > m_types
int m_bitmask
ModifierList m_modifiers
QMap< int, ModifierList * > m_releasekeys
ModifierList m_togglekeys
ModifierInfom_info
QTimer * m_pTimer
int m_timeout

Member Typedef Documentation

typedef QValueList<ModifierInfo*> KeyModifiers::ModifierList
 

Definition at line 34 of file KeyModifiers.h.


Constructor & Destructor Documentation

KeyModifiers::KeyModifiers  ) 
 

Definition at line 3 of file KeyModifiers.cpp.

References init(), m_pTimer, qDebug(), and resetToggles().

KeyModifiers::~KeyModifiers  )  [virtual]
 

Definition at line 12 of file KeyModifiers.cpp.

References clear(), m_pTimer, and qDebug().


Member Function Documentation

void KeyModifiers::addType const QString type  ) 
 

Definition at line 19 of file KeyModifiers.cpp.

References QMap< Key, T >::contains(), QMap< Key, T >::insert(), QString::latin1(), m_bitmask, m_types, and qDebug().

Referenced by assign(), and init().

ModifierInfo * KeyModifiers::assign const QString type,
int  keycode,
int  keymask = 0,
bool  toggle = false
 

Definition at line 28 of file KeyModifiers.cpp.

References addType(), QValueList< T >::append(), assignRelease(), m_info, m_modifiers, and m_togglekeys.

Referenced by ModifiersHandler::endElement().

void KeyModifiers::assignRelease ModifierInfo info,
int  keycode
 

Definition at line 46 of file KeyModifiers.cpp.

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

void KeyModifiers::assignRelease int  keycode  ) 
 

Definition at line 41 of file KeyModifiers.cpp.

References m_info.

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

void KeyModifiers::clear  )  [private]
 

Definition at line 193 of file KeyModifiers.cpp.

References QMap< Key, T >::begin(), QValueList< T >::begin(), QValueList< T >::clear(), QMap< Key, T >::clear(), QMap< Key, T >::end(), QValueList< T >::end(), m_modifiers, m_releasekeys, m_togglekeys, and m_types.

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

int KeyModifiers::getMask const QString type  ) 
 

Definition at line 184 of file KeyModifiers.cpp.

References QMap< Key, T >::contains(), and m_types.

Referenced by ExtensionsHandler::endElement(), getModifiers(), getState(), KeyHelper::setDefault(), ModifiersHandler::startElement(), and MappingsHandler::startElement().

int KeyModifiers::getModifiers int  modifiers  ) 
 

Definition at line 167 of file KeyModifiers.cpp.

References Qt::AltButton, Qt::ControlButton, getMask(), getState(), and Qt::ShiftButton.

Referenced by KeyAction::doAction().

int KeyModifiers::getState int  modifiers,
bool  reset = false
 

Definition at line 134 of file KeyModifiers.cpp.

References Qt::AltButton, Qt::ControlButton, getMask(), getState(), and Qt::ShiftButton.

int KeyModifiers::getState  ) 
 

Definition at line 122 of file KeyModifiers.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), m_modifiers, and m_types.

Referenced by KeyAction::doAction(), getModifiers(), getState(), and pressKey().

void KeyModifiers::init  )  [private]
 

Definition at line 212 of file KeyModifiers.cpp.

References addType(), ConfigEx::getInstance(), m_bitmask, m_timeout, Config::readEntry(), Config::setGroup(), and QString::toInt().

Referenced by KeyModifiers(), and reset().

bool KeyModifiers::isModifier int  keycode  ) 
 

Definition at line 98 of file KeyModifiers.cpp.

References Qt::Key_Alt, Qt::Key_Control, Qt::Key_F22, Qt::Key_Meta, and Qt::Key_Shift.

Referenced by KeyAction::doAction().

bool KeyModifiers::isToggled  ) 
 

Definition at line 235 of file KeyModifiers.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), and m_togglekeys.

void KeyModifiers::keepToggles  ) 
 

Definition at line 65 of file KeyModifiers.cpp.

References m_pTimer, and m_timeout.

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

bool KeyModifiers::pressKey int  keycode,
int  modifiers
 

Definition at line 72 of file KeyModifiers.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), getState(), keepToggles(), m_modifiers, and m_pTimer.

Referenced by KeyAction::doAction().

void KeyModifiers::releaseKey int  keycode  ) 
 

Definition at line 111 of file KeyModifiers.cpp.

References QMap< Key, T >::contains(), list, and m_releasekeys.

Referenced by KeyAction::doAction().

void KeyModifiers::reset  ) 
 

Definition at line 229 of file KeyModifiers.cpp.

References clear(), and init().

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

void KeyModifiers::resetStates  ) 
 

Definition at line 255 of file KeyModifiers.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), m_modifiers, and resetToggles().

Referenced by KeyHelper::set().

void KeyModifiers::resetToggles  )  [slot]
 

Definition at line 246 of file KeyModifiers.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), m_pTimer, and m_togglekeys.

Referenced by KeyAction::doAction(), KeyExtensions::doKey(), KeyModifiers(), and resetStates().

void KeyModifiers::setToggle ModifierInfo info  ) 
 

Definition at line 59 of file KeyModifiers.cpp.

References QValueList< T >::append(), m_togglekeys, and ModifierInfo::toggle_mode.

void KeyModifiers::setToggle  ) 
 

Definition at line 54 of file KeyModifiers.cpp.

References m_info.

void KeyModifiers::statistics  ) 
 

Definition at line 264 of file KeyModifiers.cpp.

References QMap< Key, T >::begin(), QValueList< T >::begin(), QMap< Key, T >::end(), QValueList< T >::end(), m_modifiers, m_releasekeys, and qWarning().

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


Member Data Documentation

int KeyModifiers::m_bitmask [private]
 

Definition at line 68 of file KeyModifiers.h.

Referenced by addType(), and init().

ModifierInfo* KeyModifiers::m_info [private]
 

Definition at line 72 of file KeyModifiers.h.

Referenced by assign(), assignRelease(), and setToggle().

ModifierList KeyModifiers::m_modifiers [private]
 

Definition at line 69 of file KeyModifiers.h.

Referenced by assign(), clear(), getState(), pressKey(), resetStates(), and statistics().

QTimer* KeyModifiers::m_pTimer [private]
 

Definition at line 73 of file KeyModifiers.h.

Referenced by keepToggles(), KeyModifiers(), pressKey(), resetToggles(), and ~KeyModifiers().

QMap<int, ModifierList*> KeyModifiers::m_releasekeys [private]
 

Definition at line 70 of file KeyModifiers.h.

Referenced by assignRelease(), clear(), releaseKey(), and statistics().

int KeyModifiers::m_timeout [private]
 

Definition at line 74 of file KeyModifiers.h.

Referenced by init(), and keepToggles().

ModifierList KeyModifiers::m_togglekeys [private]
 

Definition at line 71 of file KeyModifiers.h.

Referenced by assign(), clear(), isToggled(), resetToggles(), and setToggle().

QMap<QString, int> KeyModifiers::m_types [private]
 

Definition at line 67 of file KeyModifiers.h.

Referenced by addType(), clear(), getMask(), and getState().


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