Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QIMPenChar Class Reference
[QtInputMethodsModule]

The QIMPenChar class handles a single character for the stroke recognition libraries. More...

    #include <QIMPenChar>

This class is under development and is subject to change.

Public Types

Public Functions


Detailed Description

The QIMPenChar class handles a single character for the stroke recognition libraries.

Each QIMPenChar associates a unicode character with a series of strokes.

QIMPenChar can calculate closeness of match to another character.


Member Type Documentation

enum QIMPenChar::Flags

This enum specifies how split() should behave with respect to empty strings.

ConstantValueDescription
QIMPenChar::System0x01The character is a system character, and should be turned off rather than deleted when disabled
QIMPenChar::Deleted0x02The character is a system character that has been disabled.
QIMPenChar::CombineRight0x04The character is aligned to the right when combining characters to create some interantional characters like áâä, etc..
QIMPenChar::Data0x08Kept in order to read old files

enum QIMPenChar::Mode

This enum is used to refer to several special characters used by Qtopia. It includes modifiers like the shift and control keys, as well as system spefic values used to indicate actions to the system like SymbolPopup.

ConstantValueDescription
QIMPenChar::ModeBase0x4000Base value for all Modes
QIMPenChar::Caps0x4001Shift
QIMPenChar::Shortcut0x4002Used by the system
QIMPenChar::CapsLock0x4003Caps lock
QIMPenChar::Punctuation0x4004Used by the system
QIMPenChar::Symbol0x4005Used by the system
QIMPenChar::NextWord0x4007Used by the system
QIMPenChar::WordPopup0x4008Used by the system
QIMPenChar::SymbolPopup0x4009Used by the system
QIMPenChar::ModePopup0x400AUsed by the system

enum

Value
ModeBase0x4000
Caps0x4001
Shortcut0x4002
CapsLock0x4003
Punctuation0x4004
Symbol0x4005
NextWord0x4007
WordPopup0x4008
SymbolPopup0x4009
ModePopup0x400A


Member Function Documentation

QIMPenChar::QIMPenChar ()

Constructs an empty QIMPenChar.

QIMPenChar::QIMPenChar ( const QIMPenChar & character )

Constructs a copy of the given character.

QIMPenChar::~QIMPenChar ()

Destroys this character and cleans up.

void QIMPenChar::addStroke ( QIMPenStroke * stroke )

Adds stroke to the character

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.

void QIMPenChar::clear ()

Clears the data of this character.

void QIMPenChar::clearFlag ( int f )

Clear flag f for this character.

bool QIMPenChar::isEmpty () const

Return true if this character has no strokes, otherwise return false.

uint QIMPenChar::key () const

Return the key for this character.

See also setKey() and repCharacter().

int QIMPenChar::match ( QIMPenChar * pen )

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

QString QIMPenChar::name () const

Returns the name of this character. This is usually the unicode of the character. However, the following special keys have the following names:

Key CodeName
Qt::Key_Escape"[Esc]"
Qt::Key_Tab"[Tab]"
Qt::Key_Backspace"[BackSpace]"
Qt::Key_Return"[Return]"
QIMPenChar::Caps"[Uppercase]"
QIMPenChar::CapsLock"[Caps Lock]"
QIMPenChar::Shortcut"[Shortcut]"
QIMPenChar::Punctuation"[Punctuation]"
QIMPenChar::Symbol"[Symbol]"
QIMPenChar::NextWord"[Next Word]"
QIMPenChar::WordPopup"[Word Menu]"
QIMPenChar::SymbolPopup"[Symbol Menu]"
QIMPenChar::ModePopup"[Mode Menu]"

const QIMPenStrokeList & QIMPenChar::penStrokes () const

Returns the list of penStrokes for this character.

QChar QIMPenChar::repCharacter () const

Returns the QChar this character represents.

See also key() and setRepCharacter().

void QIMPenChar::setFlag ( int f )

Set flag f for this character.

void QIMPenChar::setKey ( uint code )

If code is in the set of qimpen_specialKeys, sets the key code for the character to code and clear the unicode value. Otherwise does nothing.

See also key().

void QIMPenChar::setRepCharacter ( QChar code )

Sets the unicode for the character to code and clears the key value.

See also repCharacter().

QPoint QIMPenChar::startingPoint () const

Returns the starting point of the first stroke of this character.

See also strokeLength(), addStroke(), strokeCount(), and isEmpty().

uint QIMPenChar::strokeCount () const

Returns the number of strokes in this character.

uint QIMPenChar::strokeLength ( int n ) const

Returns the length of stroke n. Returns 0 if this character has less then n strokes.

bool QIMPenChar::testFlag ( int f )

Return true if flag f is set for this character, otherwise return false.

QIMPenChar & QIMPenChar::operator= ( const QIMPenChar & character )

Assigns a copy of the given character to this character and returns a refernece to this character.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3