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

QIMPenMatch Class Reference

#include </home/clem/local/src/opie/inputmethods/handwriting/qimpenmatch.h>

Collaboration diagram for QIMPenMatch:

Collaboration graph
[legend]
List of all members.

Public Slots

void setCharSet (QIMPenCharSet *)
void beginStroke ()
void strokeEntered (QIMPenStroke *st)

Signals

void erase ()
void noMatch ()
void removeStroke ()
void keypress (uint ch)
void matchedCharacters (const QIMPenCharMatchList &)
void matchedWords (const QIMPenMatch::MatchWordList &)

Public Member Functions

 QIMPenMatch (QObject *parent=0, const char *name=0)
virtual ~QIMPenMatch ()
void resetState ()
void backspace ()
void setMultiStrokeTimeout (int t)
const QStringword () const
void setWordMatchingEnabled (bool e)
bool isWordMatchingEnabled () const

Protected Slots

void processMatches (QIMPenCharMatchList &ml)
void endMulti ()

Protected Member Functions

void updateWordMatch (QIMPenCharMatchList &ml)
void matchWords ()
void scanDict (const QDawg::Node *n, int ipos, const QString &str, int error)

Protected Attributes

QList< QIMPenStrokestrokes
QIMPenCharprevMatchChar
int prevMatchError
QIMPenCharSetcharSet
QIMPenCharSetmultiCharSet
QList< QIMPenCharMatchListwordChars
MatchWordList wordMatches
QString wordEntered
bool doWordMatching
bool canErase
int errorThreshold
int goodMatches
int badMatches
int maxGuess
QTimer * multiTimer
int multiTimeout

Classes

struct  MatchWord
class  MatchWordList

Constructor & Destructor Documentation

QIMPenMatch::QIMPenMatch QObject *  parent = 0,
const char *  name = 0
 

Definition at line 36 of file qimpenmatch.cpp.

References canErase, charSet, doWordMatching, endMulti(), FALSE, multiCharSet, multiTimeout, multiTimer, prevMatchChar, prevMatchError, strokes, TRUE, wordChars, and wordMatches.

QIMPenMatch::~QIMPenMatch  )  [virtual]
 

Definition at line 55 of file qimpenmatch.cpp.


Member Function Documentation

void QIMPenMatch::backspace  ) 
 

Definition at line 336 of file qimpenmatch.cpp.

References canErase, QString::length(), matchedWords(), matchWords(), TRUE, QString::truncate(), wordChars, wordEntered, and wordMatches.

Referenced by QIMPenInput::backspace().

void QIMPenMatch::beginStroke  )  [slot]
 

Definition at line 64 of file qimpenmatch.cpp.

References multiTimer.

void QIMPenMatch::endMulti  )  [protected, slot]
 

Definition at line 348 of file qimpenmatch.cpp.

References i, multiCharSet, removeStroke(), and strokes.

Referenced by QIMPenMatch().

void QIMPenMatch::erase  )  [signal]
 

Referenced by processMatches().

bool QIMPenMatch::isWordMatchingEnabled  )  const [inline]
 

Definition at line 49 of file qimpenmatch.h.

References doWordMatching.

Referenced by QIMPenInput::QIMPenInput(), and QIMPenInput::selectProfile().

void QIMPenMatch::keypress uint  ch  )  [signal]
 

Referenced by processMatches().

void QIMPenMatch::matchedCharacters const QIMPenCharMatchList  )  [signal]
 

Referenced by processMatches().

void QIMPenMatch::matchedWords const QIMPenMatch::MatchWordList  )  [signal]
 

Referenced by backspace(), resetState(), and updateWordMatch().

void QIMPenMatch::matchWords  )  [protected]
 

Definition at line 265 of file qimpenmatch.cpp.

References badMatches, ERROR_THRESHOLD, errorThreshold, Global::fixedDawg(), goodMatches, QString::length(), maxGuess, scanDict(), str, wordChars, wordEntered, and wordMatches.

Referenced by backspace(), and updateWordMatch().

void QIMPenMatch::noMatch  )  [signal]
 

Referenced by processMatches().

void QIMPenMatch::processMatches QIMPenCharMatchList ml  )  [protected, slot]
 

Definition at line 98 of file qimpenmatch.cpp.

References QIMPenChar::addStroke(), canErase, QIMPenChar::character(), charSet, code, QValueList< T >::count(), erase(), QIMPenCharMatch::error, FALSE, QValueList< T >::first(), i, Qt::Key_Backspace, keypress(), QString::length(), QIMPenCharSet::match(), matchedCharacters(), QIMPenChar::ModeBase, multiCharSet, multiTimeout, multiTimer, noMatch(), odebug, oendl, output, QIMPenCharMatch::penChar, prevMatchChar, prevMatchError, removeStroke(), strokes, TRUE, QString::truncate(), updateWordMatch(), wordChars, and wordEntered.

Referenced by strokeEntered().

void QIMPenMatch::removeStroke  )  [signal]
 

Referenced by endMulti(), and processMatches().

void QIMPenMatch::resetState  ) 
 

Definition at line 357 of file qimpenmatch.cpp.

References canErase, FALSE, QString::isEmpty(), matchedWords(), wordChars, wordEntered, and wordMatches.

Referenced by QIMPenInput::enter(), QIMPenInput::resetState(), and QIMPenInput::wordPicked().

void QIMPenMatch::scanDict const QDawg::Node n,
int  ipos,
const QString str,
int  error
[protected]
 

Definition at line 293 of file qimpenmatch.cpp.

References badMatches, QChar::category(), d, ERROR_THRESHOLD, errorThreshold, goodMatches, i, QChar::Letter_Uppercase, LOOKAHEAD_ERROR, QChar::lower(), maxGuess, wordChars, and wordMatches.

Referenced by matchWords().

void QIMPenMatch::setCharSet QIMPenCharSet  )  [slot]
 

Definition at line 59 of file qimpenmatch.cpp.

References charSet.

Referenced by HandwritingTrainer::HandwritingTrainer(), and HandwritingTrainer::selectCharSet().

void QIMPenMatch::setMultiStrokeTimeout int  t  )  [inline]
 

Definition at line 44 of file qimpenmatch.h.

References multiTimeout.

Referenced by QIMPenInput::selectProfile().

void QIMPenMatch::setWordMatchingEnabled bool  e  )  [inline]
 

Definition at line 48 of file qimpenmatch.h.

References doWordMatching.

Referenced by QIMPenInput::selectProfile().

void QIMPenMatch::strokeEntered QIMPenStroke st  )  [slot]
 

Definition at line 69 of file qimpenmatch.cpp.

References QIMPenChar::addStroke(), charSet, QIMPenCharSet::match(), multiCharSet, odebug, oendl, processMatches(), and strokes.

void QIMPenMatch::updateWordMatch QIMPenCharMatchList ml  )  [protected]
 

Definition at line 222 of file qimpenmatch.cpp.

References QIMPenChar::character(), code, doWordMatching, QChar::isPunct(), QChar::isSpace(), Qt::Key_Backspace, Qt::Key_Enter, Qt::Key_Escape, Qt::Key_Return, Qt::Key_Tab, QString::length(), matchedWords(), matchWords(), QIMPenChar::penStrokes(), strokes, QString::truncate(), wordChars, wordEntered, and wordMatches.

Referenced by processMatches().

const QString& QIMPenMatch::word  )  const [inline]
 

Definition at line 46 of file qimpenmatch.h.

References wordEntered.

Referenced by QIMPenInput::wordPicked().


Member Data Documentation

int QIMPenMatch::badMatches [protected]
 

Definition at line 101 of file qimpenmatch.h.

Referenced by matchWords(), and scanDict().

bool QIMPenMatch::canErase [protected]
 

Definition at line 98 of file qimpenmatch.h.

Referenced by backspace(), processMatches(), QIMPenMatch(), and resetState().

QIMPenCharSet* QIMPenMatch::charSet [protected]
 

Definition at line 92 of file qimpenmatch.h.

Referenced by processMatches(), QIMPenMatch(), setCharSet(), and strokeEntered().

bool QIMPenMatch::doWordMatching [protected]
 

Definition at line 97 of file qimpenmatch.h.

Referenced by isWordMatchingEnabled(), QIMPenMatch(), setWordMatchingEnabled(), and updateWordMatch().

int QIMPenMatch::errorThreshold [protected]
 

Definition at line 99 of file qimpenmatch.h.

Referenced by matchWords(), and scanDict().

int QIMPenMatch::goodMatches [protected]
 

Definition at line 100 of file qimpenmatch.h.

Referenced by matchWords(), and scanDict().

int QIMPenMatch::maxGuess [protected]
 

Definition at line 102 of file qimpenmatch.h.

Referenced by matchWords(), and scanDict().

QIMPenCharSet* QIMPenMatch::multiCharSet [protected]
 

Definition at line 93 of file qimpenmatch.h.

Referenced by endMulti(), processMatches(), QIMPenMatch(), and strokeEntered().

int QIMPenMatch::multiTimeout [protected]
 

Definition at line 104 of file qimpenmatch.h.

Referenced by processMatches(), QIMPenMatch(), and setMultiStrokeTimeout().

QTimer* QIMPenMatch::multiTimer [protected]
 

Definition at line 103 of file qimpenmatch.h.

Referenced by beginStroke(), processMatches(), and QIMPenMatch().

QIMPenChar* QIMPenMatch::prevMatchChar [protected]
 

Definition at line 90 of file qimpenmatch.h.

Referenced by processMatches(), and QIMPenMatch().

int QIMPenMatch::prevMatchError [protected]
 

Definition at line 91 of file qimpenmatch.h.

Referenced by processMatches(), and QIMPenMatch().

QList<QIMPenStroke> QIMPenMatch::strokes [protected]
 

Definition at line 89 of file qimpenmatch.h.

Referenced by endMulti(), processMatches(), QIMPenMatch(), strokeEntered(), and updateWordMatch().

QList<QIMPenCharMatchList> QIMPenMatch::wordChars [protected]
 

Definition at line 94 of file qimpenmatch.h.

Referenced by backspace(), matchWords(), processMatches(), QIMPenMatch(), resetState(), scanDict(), and updateWordMatch().

QString QIMPenMatch::wordEntered [protected]
 

Definition at line 96 of file qimpenmatch.h.

Referenced by backspace(), matchWords(), processMatches(), resetState(), updateWordMatch(), and word().

MatchWordList QIMPenMatch::wordMatches [protected]
 

Definition at line 95 of file qimpenmatch.h.

Referenced by backspace(), matchWords(), QIMPenMatch(), resetState(), scanDict(), and updateWordMatch().


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