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

QIMPenChar Class Reference

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

Collaboration diagram for QIMPenChar:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Flags {
  System = 0x01, Deleted = 0x02, CombineRight = 0x04, Data = 0x08,
  Combined = 0x10
}
enum  Mode {
  ModeBase = 0x4000, Caps = 0x4001, Shortcut = 0x4002, CapsLock = 0x4003,
  Punctuation = 0x4004, Symbol = 0x4005, Extended = 0x4006
}

Public Member Functions

 QIMPenChar ()
 QIMPenChar (const QIMPenChar &)
unsigned int character () const
void setCharacter (unsigned int c)
const QStringdata () const
void setData (const QString &ba)
QString name () const
bool isEmpty () const
unsigned int strokeCount () const
unsigned int strokeLength (int s) const
void clear ()
int match (QIMPenChar *ch)
const QIMPenStrokeListpenStrokes ()
QPoint startingPoint () const
QRect boundingRect ()
void setFlag (int f)
void clearFlag (int f)
bool testFlag (int f)
QIMPenCharoperator= (const QIMPenChar &s)
void addStroke (QIMPenStroke *)

Protected Attributes

unsigned int ch
QString d
Q_UINT8 flags
QIMPenStrokeList strokes

Friends

QDataStreamoperator<< (QDataStream &, const QIMPenChar &)
QDataStreamoperator>> (QDataStream &, QIMPenChar &)

Detailed Description

Handles a single character. Can calculate closeness of match to another character.

Definition at line 37 of file qimpenchar.h.


Member Enumeration Documentation

enum QIMPenChar::Flags
 

Enumeration values:
System 
Deleted 
CombineRight 
Data 
Combined 

Definition at line 63 of file qimpenchar.h.

enum QIMPenChar::Mode
 

Enumeration values:
ModeBase 
Caps 
Shortcut 
CapsLock 
Punctuation 
Symbol 
Extended 

Definition at line 65 of file qimpenchar.h.


Constructor & Destructor Documentation

QIMPenChar::QIMPenChar  ) 
 

Definition at line 54 of file qimpenchar.cpp.

References flags, strokes, and TRUE.

QIMPenChar::QIMPenChar const QIMPenChar  ) 
 

Definition at line 60 of file qimpenchar.cpp.

References ch, QString::d, d, flags, strokes, and TRUE.


Member Function Documentation

void QIMPenChar::addStroke QIMPenStroke st  ) 
 

Add a stroke to the character

Definition at line 132 of file qimpenchar.cpp.

References strokes.

Referenced by QIMPenCombining::combine(), QIMPenEdit::newStroke(), QIMPenMatch::processMatches(), and QIMPenMatch::strokeEntered().

QRect QIMPenChar::boundingRect  ) 
 

Return the bounding rect of this character. It may have sides with negative coords since its origin is where the user started drawing the character.

Definition at line 196 of file qimpenchar.cpp.

References QIMPenStroke::boundingRect(), and strokes.

Referenced by QIMPenCombining::combine(), QIMPenWidget::paintEvent(), QIMPenWidget::showCharacter(), and QIMPenWidget::timeout().

unsigned int QIMPenChar::character  )  const [inline]
 

Definition at line 43 of file qimpenchar.h.

References ch.

Referenced by QIMPenEdit::addChar(), QIMPenCombining::addCombined(), QIMPenEdit::defaultChars(), QIMPenCharSet::markDeleted(), HandwritingTrainer::matched(), QIMPenInput::matchedCharacters(), QIMPenCombining::penChar(), QIMPenMatch::processMatches(), and QIMPenMatch::updateWordMatch().

void QIMPenChar::clear  ) 
 

Definition at line 107 of file qimpenchar.cpp.

References ch, d, flags, QString::null, and strokes.

Referenced by QIMPenEdit::addChar(), QIMPenEdit::clearChar(), QIMPenEdit::selectChar(), and QIMPenEdit::selectCharSet().

void QIMPenChar::clearFlag int  f  )  [inline]
 

Definition at line 60 of file qimpenchar.h.

References flags.

Referenced by QIMPenEdit::addChar(), and QIMPenEdit::defaultChars().

const QString& QIMPenChar::data  )  const [inline]
 

Definition at line 46 of file qimpenchar.h.

References d.

Referenced by QIMPenInput::matchedCharacters().

bool QIMPenChar::isEmpty  )  const [inline]
 

Definition at line 50 of file qimpenchar.h.

References strokes.

Referenced by QIMPenEdit::addChar(), QIMPenEdit::addNewChar(), QIMPenEdit::enableButtons(), and QIMPenWidget::showCharacter().

int QIMPenChar::match QIMPenChar pen  ) 
 

Return an indicator of the closeness of this character to pen. Lower value is better.

Definition at line 142 of file qimpenchar.cpp.

References diff(), odebug, oendl, and strokes.

QString QIMPenChar::name  )  const
 

Definition at line 88 of file qimpenchar.cpp.

References ch, code, i, Qt::Key_unknown, and QIMPenSpecialKeys::name.

QIMPenChar & QIMPenChar::operator= const QIMPenChar s  ) 
 

Definition at line 73 of file qimpenchar.cpp.

References ch, QString::d, d, flags, and strokes.

const QIMPenStrokeList& QIMPenChar::penStrokes  )  [inline]
 

Definition at line 55 of file qimpenchar.h.

References strokes.

Referenced by QIMPenCharSet::addChar(), QIMPenCombining::combine(), QIMPenCharSet::match(), QIMPenWidget::paintEvent(), QIMPenWidget::showCharacter(), QIMPenWidget::timeout(), and QIMPenMatch::updateWordMatch().

void QIMPenChar::setCharacter unsigned int  c  )  [inline]
 

Definition at line 44 of file qimpenchar.h.

References ch.

Referenced by QIMPenEdit::addChar(), and QIMPenCombining::addCombined().

void QIMPenChar::setData const QString ba  )  [inline]
 

Definition at line 47 of file qimpenchar.h.

References d.

void QIMPenChar::setFlag int  f  )  [inline]
 

Definition at line 59 of file qimpenchar.h.

References flags.

Referenced by QIMPenCombining::addCombined(), QIMPenCombining::combine(), QIMPenCharSet::markDeleted(), and QIMPenEdit::removeChar().

QPoint QIMPenChar::startingPoint  )  const [inline]
 

Definition at line 56 of file qimpenchar.h.

References strokes.

Referenced by QIMPenWidget::paintEvent(), and QIMPenWidget::timeout().

unsigned int QIMPenChar::strokeCount  )  const [inline]
 

Definition at line 51 of file qimpenchar.h.

References strokes.

unsigned int QIMPenChar::strokeLength int  s  )  const
 

Definition at line 115 of file qimpenchar.cpp.

References strokes.

bool QIMPenChar::testFlag int  f  )  [inline]
 

Definition at line 61 of file qimpenchar.h.

References flags.

Referenced by QIMPenEdit::addChar(), QIMPenCombining::addCombined(), QIMPenCombining::combine(), QIMPenEdit::defaultChars(), QIMPenCharSet::markDeleted(), QIMPenCharSet::match(), QIMPenEdit::removeChar(), and QIMPenCharSet::save().


Friends And Related Function Documentation

QDataStream& operator<< QDataStream ,
const QIMPenChar
[friend]
 

Write the character's data to the stream.

Definition at line 212 of file qimpenchar.cpp.

QDataStream& operator>> QDataStream ,
QIMPenChar
[friend]
 

Read the character's data from the stream.

Definition at line 231 of file qimpenchar.cpp.


Member Data Documentation

unsigned int QIMPenChar::ch [protected]
 

Definition at line 73 of file qimpenchar.h.

Referenced by character(), clear(), name(), operator<<(), operator=(), operator>>(), QIMPenChar(), and setCharacter().

QString QIMPenChar::d [protected]
 

Definition at line 74 of file qimpenchar.h.

Referenced by clear(), data(), operator<<(), operator=(), operator>>(), QIMPenChar(), and setData().

Q_UINT8 QIMPenChar::flags [protected]
 

Definition at line 75 of file qimpenchar.h.

Referenced by clear(), clearFlag(), operator<<(), operator=(), operator>>(), QIMPenChar(), setFlag(), and testFlag().

QIMPenStrokeList QIMPenChar::strokes [protected]
 

Definition at line 76 of file qimpenchar.h.

Referenced by addStroke(), boundingRect(), clear(), isEmpty(), match(), operator<<(), operator=(), operator>>(), penStrokes(), QIMPenChar(), startingPoint(), strokeCount(), and strokeLength().


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