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

Keymap Class Reference

#include </home/clem/local/src/opie/noncore/applets/zkbapplet/keyzcfg/zkb.h>

Inheritance diagram for Keymap:

Inheritance graph
[legend]
Collaboration diagram for Keymap:

Collaboration graph
[legend]
List of all members.

Signals

void stateChanged (const QString &name)

Public Member Functions

 Keymap ()
virtual ~Keymap ()
virtual bool filter (int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat)
void enable ()
void disable ()
QStringList listStates ()
StategetStateByName (const QString &name)
QStringList listLabels ()
StategetStateByLabel (const QString &label)
bool addState (const QString &name, State *state)
bool removeState (const QString &name, bool force=false)
bool setCurrentState (State *)
StategetCurrentState () const
QString getCurrentLabel ()
bool addLabel (const QString &label, const QString &state, int index=-1)
bool removeLabel (const QString &label)
int getAutorepeatDelay () const
void setAutorepeatDelay (int)
int getAutorepeatPeriod () const
void setAutorepeatPeriod (int)

Protected Slots

void autoRepeat ()

Protected Member Functions

QList< ActionfindStateUsage (State *s)
void generateLabelStateMaps ()

Protected Attributes

QMap< QString, State * > states
QMap< QString, QStringlabels
QStringList labelList
QMap< State *, QStringstateLabelMap
bool lsmapInSync
bool enabled
StatecurrentState
QString currentStateName
QString currentLabel
ActionautoRepeatAction
int repeatDelay
int repeatPeriod
QTimer repeater

Constructor & Destructor Documentation

Keymap::Keymap  ) 
 

Definition at line 243 of file zkb.cpp.

References autoRepeat(), repeatDelay, repeater, and repeatPeriod.

Keymap::~Keymap  )  [virtual]
 

Definition at line 249 of file zkb.cpp.

References QMap< Key, T >::begin(), QMap< Key, T >::clear(), QMap< Key, T >::end(), Opie::Core::OKeyFilter::inst(), odebug, oendl, and states.


Member Function Documentation

bool Keymap::addLabel const QString label,
const QString state,
int  index = -1
 

Definition at line 485 of file zkb.cpp.

References QValueList< T >::append(), QValueList< T >::at(), QMap< Key, T >::end(), QMap< Key, T >::find(), QValueList< T >::insert(), QMap< Key, T >::insert(), l, labelList, labels, and lsmapInSync.

Referenced by ZkbHandler::startLabelElement().

bool Keymap::addState const QString name,
State state
 

Definition at line 382 of file zkb.cpp.

References currentState, QMap< Key, T >::end(), QMap< Key, T >::find(), QMap< Key, T >::insert(), lsmapInSync, setCurrentState(), and states.

Referenced by ZkbHandler::startStateElement().

void Keymap::autoRepeat  )  [protected, slot]
 

Definition at line 469 of file zkb.cpp.

References autoRepeatAction, Action::getKeycode(), Action::getModifiers(), Action::getUnicode(), Action::isPressed(), odebug, oendl, repeater, repeatPeriod, QWSServer::sendKeyEvent(), and TRUE.

Referenced by Keymap().

void Keymap::disable  ) 
 

Definition at line 318 of file zkb.cpp.

References enabled.

Referenced by ZkbWidget::labelChanged(), and ZkbWidget::signalReceived().

void Keymap::enable  ) 
 

Definition at line 314 of file zkb.cpp.

References enabled.

Referenced by ZkbWidget::labelChanged(), and ZkbWidget::signalReceived().

bool Keymap::filter int  unicode,
int  keycode,
int  modifiers,
bool  isPress,
bool  autoRepeat
[virtual]
 

Reimplemented from QWSServer::KeyboardFilter.

Definition at line 259 of file zkb.cpp.

References autoRepeatAction, currentState, enabled, State::get(), getCurrentLabel(), Action::getKeycode(), Action::getModifiers(), Action::getState(), Action::getUnicode(), Action::hasEvent(), Action::isAutorepeat(), Action::isDefined(), QString::isEmpty(), Action::isPressed(), odebug, oendl, repeatDelay, repeater, QWSServer::sendKeyEvent(), setCurrentState(), stateChanged(), and TRUE.

QList< Action > Keymap::findStateUsage State s  )  [protected]
 

Definition at line 536 of file zkb.cpp.

References QMap< Key, T >::begin(), QMap< Key, T >::end(), State::get(), Action::getState(), i, and states.

Referenced by removeState().

void Keymap::generateLabelStateMaps  )  [protected]
 

Definition at line 559 of file zkb.cpp.

References QMap< Key, T >::begin(), QMap< Key, T >::clear(), QMap< Key, T >::end(), QString::find(), QMap< Key, T >::insert(), labels, QString::left(), QString::length(), lsmapInSync, name, stateLabelMap, and states.

Referenced by setCurrentState().

int Keymap::getAutorepeatDelay  )  const
 

Definition at line 520 of file zkb.cpp.

References repeatDelay.

int Keymap::getAutorepeatPeriod  )  const
 

Definition at line 528 of file zkb.cpp.

References repeatPeriod.

QString Keymap::getCurrentLabel  ) 
 

Definition at line 401 of file zkb.cpp.

References currentLabel.

Referenced by filter(), and ZkbWidget::loadKeymap().

State * Keymap::getCurrentState  )  const
 

Definition at line 397 of file zkb.cpp.

References currentState.

State * Keymap::getStateByLabel const QString label  ) 
 

Definition at line 353 of file zkb.cpp.

References currentStateName, QMap< Key, T >::end(), QString::find(), QMap< Key, T >::find(), QString::findRev(), labels, QString::left(), QString::length(), QString::mid(), name, and states.

Referenced by ZkbWidget::labelChanged(), and ZkbWidget::signalReceived().

State * Keymap::getStateByName const QString name  ) 
 

Definition at line 333 of file zkb.cpp.

References QMap< Key, T >::end(), QMap< Key, T >::find(), and states.

Referenced by ZkbHandler::startNextStateElement(), and ZkbHandler::startStateElement().

QStringList Keymap::listLabels  ) 
 

Definition at line 343 of file zkb.cpp.

References QValueList< T >::append(), QValueList< T >::at(), QValueList< T >::count(), i, and labelList.

Referenced by ZkbWidget::labelChanged(), and ZkbWidget::loadKeymap().

QStringList Keymap::listStates  ) 
 

Definition at line 322 of file zkb.cpp.

References QValueList< T >::append(), QMap< Key, T >::begin(), QMap< Key, T >::end(), and states.

bool Keymap::removeLabel const QString label  ) 
 

Definition at line 503 of file zkb.cpp.

References currentLabel, QMap< Key, T >::end(), QMap< Key, T >::find(), labelList, labels, lsmapInSync, QValueList< T >::remove(), and QMap< Key, T >::remove().

bool Keymap::removeState const QString name,
bool  force = false
 

Definition at line 435 of file zkb.cpp.

References QMap< Key, T >::begin(), currentState, QMap< Key, T >::end(), QMap< Key, T >::find(), findStateUsage(), lsmapInSync, QMap< Key, T >::remove(), setCurrentState(), Action::setState(), and states.

void Keymap::setAutorepeatDelay int   ) 
 

Definition at line 524 of file zkb.cpp.

References repeatDelay.

Referenced by ZkbHandler::endKeymapElement().

void Keymap::setAutorepeatPeriod int   ) 
 

Definition at line 532 of file zkb.cpp.

References repeatPeriod.

Referenced by ZkbHandler::endKeymapElement().

bool Keymap::setCurrentState State  ) 
 

Definition at line 405 of file zkb.cpp.

References QMap< Key, T >::begin(), currentLabel, currentState, currentStateName, QMap< Key, T >::end(), QMap< Key, T >::find(), generateLabelStateMaps(), lsmapInSync, odebug, oendl, s, stateLabelMap, states, and QString::utf8().

Referenced by addState(), filter(), ZkbWidget::labelChanged(), removeState(), ZkbWidget::signalReceived(), and ZkbHandler::startStateElement().

void Keymap::stateChanged const QString name  )  [signal]
 

Referenced by filter().


Member Data Documentation

Action* Keymap::autoRepeatAction [protected]
 

Definition at line 195 of file zkb.h.

Referenced by autoRepeat(), and filter().

QString Keymap::currentLabel [protected]
 

Definition at line 194 of file zkb.h.

Referenced by getCurrentLabel(), removeLabel(), and setCurrentState().

State* Keymap::currentState [protected]
 

Definition at line 192 of file zkb.h.

Referenced by addState(), filter(), getCurrentState(), removeState(), and setCurrentState().

QString Keymap::currentStateName [protected]
 

Definition at line 193 of file zkb.h.

Referenced by getStateByLabel(), and setCurrentState().

bool Keymap::enabled [protected]
 

Definition at line 191 of file zkb.h.

Referenced by disable(), enable(), and filter().

QStringList Keymap::labelList [protected]
 

Definition at line 186 of file zkb.h.

Referenced by addLabel(), listLabels(), and removeLabel().

QMap<QString, QString> Keymap::labels [protected]
 

Definition at line 185 of file zkb.h.

Referenced by addLabel(), generateLabelStateMaps(), getStateByLabel(), and removeLabel().

bool Keymap::lsmapInSync [protected]
 

Definition at line 189 of file zkb.h.

Referenced by addLabel(), addState(), generateLabelStateMaps(), removeLabel(), removeState(), and setCurrentState().

int Keymap::repeatDelay [protected]
 

Definition at line 197 of file zkb.h.

Referenced by filter(), getAutorepeatDelay(), Keymap(), and setAutorepeatDelay().

QTimer Keymap::repeater [protected]
 

Definition at line 199 of file zkb.h.

Referenced by autoRepeat(), filter(), and Keymap().

int Keymap::repeatPeriod [protected]
 

Definition at line 198 of file zkb.h.

Referenced by autoRepeat(), getAutorepeatPeriod(), Keymap(), and setAutorepeatPeriod().

QMap<State*,QString> Keymap::stateLabelMap [protected]
 

Definition at line 188 of file zkb.h.

Referenced by generateLabelStateMaps(), and setCurrentState().

QMap<QString, State*> Keymap::states [protected]
 

Definition at line 184 of file zkb.h.

Referenced by addState(), findStateUsage(), generateLabelStateMaps(), getStateByLabel(), getStateByName(), listStates(), removeState(), setCurrentState(), and ~Keymap().


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