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

QIMPenWidget Class Reference

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

Collaboration diagram for QIMPenWidget:

Collaboration graph
[legend]
List of all members.

Public Slots

void removeStroke ()

Signals

void changeCharSet (QIMPenCharSet *cs)
void changeCharSet (int)
void beginStroke ()
void stroke (QIMPenStroke *ch)

Public Member Functions

 QIMPenWidget (QWidget *parent)
void clear ()
void greyStroke ()
void setReadOnly (bool r)
void insertCharSet (QIMPenCharSet *cs, int stretch=1, int pos=-1)
void removeCharSet (int)
void changeCharSet (QIMPenCharSet *cs, int pos)
void clearCharSets ()
void showCharacter (QIMPenChar *, int speed=10)
virtual QSize sizeHint ()

Protected Types

typedef QList< CharSetEntryCharSetEntryList
typedef QListIterator< CharSetEntryCharSetEntryIterator
enum  Mode { Waiting, Input, Output }

Protected Slots

void timeout ()

Protected Member Functions

bool selectSet (QPoint)
virtual void mousePressEvent (QMouseEvent *e)
virtual void mouseReleaseEvent (QMouseEvent *e)
virtual void mouseMoveEvent (QMouseEvent *e)
virtual void paintEvent (QPaintEvent *e)
virtual void resizeEvent (QResizeEvent *e)

Protected Attributes

Mode mode
bool autoHide
bool readOnly
QPoint lastPoint
unsigned pointIndex
int strokeIndex
int currCharSet
QTimer * timer
QColor strokeColor
QRect dirtyRect
QIMPenCharoutputChar
QIMPenStrokeoutputStroke
QIMPenStrokeinputStroke
QIMPenStrokeList strokes
CharSetEntryList charSets
int totalStretch

Classes

struct  CharSetEntry

Detailed Description

Draws characters and allows input of characters.

Definition at line 25 of file qimpenwidget.h.


Member Typedef Documentation

typedef QListIterator<CharSetEntry> QIMPenWidget::CharSetEntryIterator [protected]
 

Definition at line 68 of file qimpenwidget.h.

typedef QList<CharSetEntry> QIMPenWidget::CharSetEntryList [protected]
 

Definition at line 67 of file qimpenwidget.h.


Member Enumeration Documentation

enum QIMPenWidget::Mode [protected]
 

Enumeration values:
Waiting 
Input 
Output 

Definition at line 55 of file qimpenwidget.h.


Constructor & Destructor Documentation

QIMPenWidget::QIMPenWidget QWidget *  parent  ) 
 

Definition at line 38 of file qimpenwidget.cpp.

References charSets, currCharSet, FALSE, inputStroke, mode, outputChar, outputStroke, qApp, readOnly, strokeColor, strokes, timeout(), timer, TRUE, and Waiting.


Member Function Documentation

void QIMPenWidget::beginStroke  )  [signal]
 

Referenced by mousePressEvent().

void QIMPenWidget::changeCharSet int   )  [signal]
 

void QIMPenWidget::changeCharSet QIMPenCharSet cs  )  [signal]
 

void QIMPenWidget::changeCharSet QIMPenCharSet cs,
int  pos
 

Definition at line 156 of file qimpenwidget.cpp.

References charSets, QIMPenWidget::CharSetEntry::cs, currCharSet, and QIMPenWidget::CharSetEntry::stretch.

Referenced by insertCharSet(), QIMPenInput::keypress(), QIMPenInput::matchedCharacters(), removeCharSet(), QIMPenInput::selectCharSet(), and selectSet().

void QIMPenWidget::clear  ) 
 

Definition at line 59 of file qimpenwidget.cpp.

References dirtyRect, mode, outputChar, outputStroke, strokes, timer, and Waiting.

Referenced by QIMPenEdit::clearChar(), and HandwritingTrainer::setCurrentChar().

void QIMPenWidget::clearCharSets  ) 
 

Definition at line 171 of file qimpenwidget.cpp.

References charSets, and currCharSet.

Referenced by QIMPenInput::selectProfile().

void QIMPenWidget::greyStroke  ) 
 

Definition at line 97 of file qimpenwidget.cpp.

References QIMPenStroke::boundingRect(), dirtyRect, strokeColor, and strokes.

Referenced by QIMPenInput::strokeEntered(), and HandwritingTrainer::strokeEntered().

void QIMPenWidget::insertCharSet QIMPenCharSet cs,
int  stretch = 1,
int  pos = -1
 

Insert a character set into the list.

Definition at line 118 of file qimpenwidget.cpp.

References changeCharSet(), charSets, QIMPenWidget::CharSetEntry::cs, currCharSet, QIMPenWidget::CharSetEntry::stretch, and totalStretch.

Referenced by QIMPenEdit::selectCharSet(), HandwritingTrainer::selectCharSet(), and QIMPenInput::selectProfile().

void QIMPenWidget::mouseMoveEvent QMouseEvent *  e  )  [protected, virtual]
 

Definition at line 327 of file qimpenwidget.cpp.

References QIMPenStroke::addPoint(), Qt::black, QIMPenStroke::chain(), i, inputStroke, lastPoint, mode, p, and readOnly.

void QIMPenWidget::mousePressEvent QMouseEvent *  e  )  [protected, virtual]
 

Definition at line 290 of file qimpenwidget.cpp.

References QIMPenStroke::beginInput(), beginStroke(), Qt::black, inputStroke, lastPoint, mode, outputChar, outputStroke, readOnly, selectSet(), strokes, timer, and Waiting.

void QIMPenWidget::mouseReleaseEvent QMouseEvent *  e  )  [protected, virtual]
 

Definition at line 316 of file qimpenwidget.cpp.

References charSets, QIMPenStroke::endInput(), inputStroke, mode, readOnly, stroke(), and Waiting.

void QIMPenWidget::paintEvent QPaintEvent *  e  )  [protected, virtual]
 

Definition at line 357 of file qimpenwidget.cpp.

References QIMPenChar::boundingRect(), charSets, dirtyRect, Qt::gray, height, i, mode, off, outputChar, p, QIMPenChar::penStrokes(), QIMPenChar::startingPoint(), strokeColor, strokes, totalStretch, Waiting, width, and Opie::MM::y.

void QIMPenWidget::removeCharSet int  pos  ) 
 

Remove a character set from the list.

Definition at line 139 of file qimpenwidget.cpp.

References changeCharSet(), charSets, currCharSet, and totalStretch.

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

void QIMPenWidget::removeStroke  )  [slot]
 

Definition at line 81 of file qimpenwidget.cpp.

References QIMPenStroke::boundingRect(), dirtyRect, and strokes.

void QIMPenWidget::resizeEvent QResizeEvent *  e  )  [protected, virtual]
 

Definition at line 439 of file qimpenwidget.cpp.

References mode, outputChar, and showCharacter().

bool QIMPenWidget::selectSet QPoint  p  )  [protected]
 

If the point p is over one of the character set titles, switch to the set and return TRUE.

Definition at line 258 of file qimpenwidget.cpp.

References changeCharSet(), charSets, currCharSet, FALSE, totalStretch, and width.

Referenced by mousePressEvent().

void QIMPenWidget::setReadOnly bool  r  )  [inline]
 

Definition at line 33 of file qimpenwidget.h.

References readOnly.

Referenced by HandwritingTrainer::HandwritingTrainer().

void QIMPenWidget::showCharacter QIMPenChar ch,
int  speed = 10
 

Display a character. speed determines how quickly the character is drawn.

Definition at line 182 of file qimpenwidget.cpp.

References QIMPenChar::boundingRect(), dirtyRect, QIMPenChar::isEmpty(), lastPoint, mode, outputChar, outputStroke, QIMPenChar::penStrokes(), pointIndex, QIMPenStroke::startingPoint(), strokeIndex, strokes, timer, Waiting, and width.

Referenced by HandwritingTrainer::redrawChar(), resizeEvent(), QIMPenEdit::setCurrentChar(), and HandwritingTrainer::setCurrentChar().

QSize QIMPenWidget::sizeHint  )  [virtual]
 

Hopefully returns a sensible size.

Definition at line 285 of file qimpenwidget.cpp.

References charSets, and TITLE_WIDTH.

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

void QIMPenWidget::stroke QIMPenStroke ch  )  [signal]
 

Referenced by mouseReleaseEvent().

void QIMPenWidget::timeout  )  [protected, slot]
 

Handle drawing/clearing of characters.

Definition at line 213 of file qimpenwidget.cpp.

References Qt::black, QIMPenChar::boundingRect(), QIMPenStroke::chain(), dirtyRect, i, lastPoint, mode, off, outputChar, outputStroke, QIMPenChar::penStrokes(), pointIndex, QIMPenStroke::startingPoint(), QIMPenChar::startingPoint(), strokeIndex, strokes, timer, Waiting, and width.

Referenced by QIMPenWidget().


Member Data Documentation

bool QIMPenWidget::autoHide [protected]
 

Definition at line 72 of file qimpenwidget.h.

CharSetEntryList QIMPenWidget::charSets [protected]
 

Definition at line 85 of file qimpenwidget.h.

Referenced by changeCharSet(), clearCharSets(), insertCharSet(), mouseReleaseEvent(), paintEvent(), QIMPenWidget(), removeCharSet(), selectSet(), and sizeHint().

int QIMPenWidget::currCharSet [protected]
 

Definition at line 77 of file qimpenwidget.h.

Referenced by changeCharSet(), clearCharSets(), insertCharSet(), QIMPenWidget(), removeCharSet(), and selectSet().

QRect QIMPenWidget::dirtyRect [protected]
 

Definition at line 80 of file qimpenwidget.h.

Referenced by clear(), greyStroke(), paintEvent(), removeStroke(), showCharacter(), and timeout().

QIMPenStroke* QIMPenWidget::inputStroke [protected]
 

Definition at line 83 of file qimpenwidget.h.

Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and QIMPenWidget().

QPoint QIMPenWidget::lastPoint [protected]
 

Definition at line 74 of file qimpenwidget.h.

Referenced by mouseMoveEvent(), mousePressEvent(), showCharacter(), and timeout().

Mode QIMPenWidget::mode [protected]
 

Definition at line 71 of file qimpenwidget.h.

Referenced by clear(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paintEvent(), QIMPenWidget(), resizeEvent(), showCharacter(), and timeout().

QIMPenChar* QIMPenWidget::outputChar [protected]
 

Definition at line 81 of file qimpenwidget.h.

Referenced by clear(), mousePressEvent(), paintEvent(), QIMPenWidget(), resizeEvent(), showCharacter(), and timeout().

QIMPenStroke* QIMPenWidget::outputStroke [protected]
 

Definition at line 82 of file qimpenwidget.h.

Referenced by clear(), mousePressEvent(), QIMPenWidget(), showCharacter(), and timeout().

unsigned QIMPenWidget::pointIndex [protected]
 

Definition at line 75 of file qimpenwidget.h.

Referenced by showCharacter(), and timeout().

bool QIMPenWidget::readOnly [protected]
 

Definition at line 73 of file qimpenwidget.h.

Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), QIMPenWidget(), and setReadOnly().

QColor QIMPenWidget::strokeColor [protected]
 

Definition at line 79 of file qimpenwidget.h.

Referenced by greyStroke(), paintEvent(), and QIMPenWidget().

int QIMPenWidget::strokeIndex [protected]
 

Definition at line 76 of file qimpenwidget.h.

Referenced by showCharacter(), and timeout().

QIMPenStrokeList QIMPenWidget::strokes [protected]
 

Definition at line 84 of file qimpenwidget.h.

Referenced by clear(), greyStroke(), mousePressEvent(), paintEvent(), QIMPenWidget(), removeStroke(), showCharacter(), and timeout().

QTimer* QIMPenWidget::timer [protected]
 

Definition at line 78 of file qimpenwidget.h.

Referenced by clear(), mousePressEvent(), QIMPenWidget(), showCharacter(), and timeout().

int QIMPenWidget::totalStretch [protected]
 

Definition at line 86 of file qimpenwidget.h.

Referenced by insertCharSet(), paintEvent(), removeCharSet(), and selectSet().


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