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

QIMPenCharSet Class Reference

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

Inheritance diagram for QIMPenCharSet:

Inheritance graph
[legend]
Collaboration diagram for QIMPenCharSet:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Domain { System, User }
enum  Type {
  Unknown = 0x00, Lower = 0x01, Upper = 0x02, Combining = 0x04,
  Numeric = 0x08, Punctuation = 0x10, Symbol = 0x20, Shortcut = 0x40
}

Public Member Functions

 QIMPenCharSet ()
 QIMPenCharSet (const QString &fn)
bool isEmpty () const
unsigned int count () const
void clear ()
void setDescription (const QString &d)
QString description () const
void setTitle (const QString &t)
QString title () const
QIMPenCharMatchList match (QIMPenChar *ch)
void addChar (QIMPenChar *ch)
void removeChar (QIMPenChar *ch)
QIMPenCharat (int i)
void setHidden (const bool &b)
bool hidden () const
unsigned maximumStrokes () const
void up (QIMPenChar *ch)
void down (QIMPenChar *ch)
const QIMPenCharListcharacters () const
void setType (Type t)
Type type () const
const QStringfilename (Domain d) const
void setFilename (const QString &fn, Domain d=System)
bool load (const QString &fn, Domain d=System)
bool save (Domain d=System)

Protected Member Functions

void markDeleted (uint ch)

Protected Attributes

QString csTitle
QString desc
QString sysFilename
QString userFilename
Type csType
unsigned maxStrokes
QIMPenCharList chars
QIMPenCharMatchList matches
bool phidden: 1

Detailed Description

Maintains a set of related characters.

Definition at line 101 of file qimpenchar.h.


Member Enumeration Documentation

enum QIMPenCharSet::Domain
 

Enumeration values:
System 
User 

Definition at line 128 of file qimpenchar.h.

enum QIMPenCharSet::Type
 

Enumeration values:
Unknown 
Lower 
Upper 
Combining 
Numeric 
Punctuation 
Symbol 
Shortcut 

Definition at line 129 of file qimpenchar.h.


Constructor & Destructor Documentation

QIMPenCharSet::QIMPenCharSet  ) 
 

Definition at line 273 of file qimpenchar.cpp.

References chars, csTitle, csType, desc, maxStrokes, TRUE, and Unknown.

QIMPenCharSet::QIMPenCharSet const QString fn  ) 
 

Construct and load a characters set from file fn.

Definition at line 285 of file qimpenchar.cpp.

References chars, csTitle, csType, desc, load(), maxStrokes, TRUE, and Unknown.


Member Function Documentation

void QIMPenCharSet::addChar QIMPenChar ch  ) 
 

Add a character ch to this set. QIMPenCharSet will delete this character when it is no longer needed.

Definition at line 487 of file qimpenchar.cpp.

References chars, maxStrokes, and QIMPenChar::penStrokes().

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

QIMPenChar * QIMPenCharSet::at int  i  ) 
 

Definition at line 420 of file qimpenchar.cpp.

References chars.

const QIMPenCharList& QIMPenCharSet::characters  )  const [inline]
 

Definition at line 132 of file qimpenchar.h.

References chars.

Referenced by QIMPenEdit::addChar(), QIMPenCombining::addCombined(), QIMPenEdit::defaultChars(), QIMPenEdit::fillCharList(), HandwritingTrainer::fillCharList(), QIMPenEdit::findNext(), HandwritingTrainer::findNext(), QIMPenEdit::findPrev(), HandwritingTrainer::findPrev(), QIMPenEdit::selectChar(), and HandwritingTrainer::selectChar().

void QIMPenCharSet::clear  )  [inline]
 

Definition at line 109 of file qimpenchar.h.

References chars.

unsigned int QIMPenCharSet::count  )  const [inline]
 

Definition at line 108 of file qimpenchar.h.

References chars.

Referenced by QIMPenCombining::addCombined(), and QIMPenCombining::combine().

QString QIMPenCharSet::description  )  const [inline]
 

Definition at line 112 of file qimpenchar.h.

References desc.

void QIMPenCharSet::down QIMPenChar ch  ) 
 

Move the character down the list of characters.

Definition at line 518 of file qimpenchar.cpp.

References chars.

const QString & QIMPenCharSet::filename Domain  d  )  const
 

Definition at line 295 of file qimpenchar.cpp.

References sysFilename, and userFilename.

Referenced by save().

bool QIMPenCharSet::hidden  )  const [inline]
 

Definition at line 121 of file qimpenchar.h.

References phidden.

Referenced by save().

bool QIMPenCharSet::isEmpty  )  const [inline]
 

Definition at line 107 of file qimpenchar.h.

References chars.

Referenced by QIMPenProfile::loadData(), and save().

bool QIMPenCharSet::load const QString fn,
Domain  d = System
 

Load a character set from file fn.

Definition at line 314 of file qimpenchar.cpp.

References addChar(), QDataStream::atEnd(), Combining, csTitle, csType, QIMPenChar::Deleted, desc, FALSE, IO_Ok, IO_ReadOnly, Lower, markDeleted(), QString::mid(), Numeric, QFile::open(), setFilename(), setHidden(), TRUE, Upper, User, and version.

Referenced by QIMPenProfile::loadData(), and QIMPenCharSet().

void QIMPenCharSet::markDeleted uint  ch  )  [protected]
 

Definition at line 425 of file qimpenchar.cpp.

References QIMPenChar::character(), chars, QIMPenChar::Deleted, QIMPenChar::setFlag(), QIMPenChar::System, and QIMPenChar::testFlag().

Referenced by load().

QIMPenCharMatchList QIMPenCharSet::match QIMPenChar ch  ) 
 

Find the best matches for ch in this character set.

Definition at line 438 of file qimpenchar.cpp.

References QValueList< T >::append(), QValueList< T >::begin(), chars, QIMPenChar::Deleted, QValueList< T >::end(), QIMPenCharMatch::error, matches, QIMPenCharMatch::penChar, QIMPenChar::penStrokes(), qHeapSort(), QIMPEN_MATCH_THRESHOLD, and QIMPenChar::testFlag().

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

unsigned QIMPenCharSet::maximumStrokes  )  const [inline]
 

Definition at line 123 of file qimpenchar.h.

References maxStrokes.

void QIMPenCharSet::removeChar QIMPenChar ch  ) 
 

Remove a character by reference ch from this set. QIMPenCharSet will delete this character.

Definition at line 498 of file qimpenchar.cpp.

References chars.

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

bool QIMPenCharSet::save Domain  d = System  ) 
 

Save this character set.

Definition at line 358 of file qimpenchar.cpp.

References buf, chars, QFile::close(), QIMPenChar::Combined, csTitle, csType, QIMPenChar::Deleted, desc, FALSE, filename(), hidden(), IO_Ok, IO_Raw, IO_WriteOnly, isEmpty(), QString::latin1(), oendl, QFile::open(), owarn, QFile::remove(), QIODevice::status(), QIMPenChar::System, QIMPenChar::testFlag(), TRUE, User, and QFile::writeBlock().

void QIMPenCharSet::setDescription const QString d  )  [inline]
 

Definition at line 111 of file qimpenchar.h.

References desc.

void QIMPenCharSet::setFilename const QString fn,
Domain  d = System
 

Definition at line 303 of file qimpenchar.cpp.

References sysFilename, User, and userFilename.

Referenced by load().

void QIMPenCharSet::setHidden const bool &  b  )  [inline]
 

Definition at line 120 of file qimpenchar.h.

References phidden.

Referenced by load().

void QIMPenCharSet::setTitle const QString t  )  [inline]
 

Definition at line 113 of file qimpenchar.h.

References csTitle.

Referenced by QIMPenInput::loadProfiles().

void QIMPenCharSet::setType Type  t  )  [inline]
 

Definition at line 134 of file qimpenchar.h.

References csType.

QString QIMPenCharSet::title  )  const [inline]
 

Definition at line 114 of file qimpenchar.h.

References csTitle.

Type QIMPenCharSet::type  )  const [inline]
 

Definition at line 135 of file qimpenchar.h.

References csType.

void QIMPenCharSet::up QIMPenChar ch  ) 
 

Move the character up the list of characters.

Definition at line 506 of file qimpenchar.cpp.

References chars.


Member Data Documentation

QIMPenCharList QIMPenCharSet::chars [protected]
 

Definition at line 152 of file qimpenchar.h.

Referenced by addChar(), QIMPenCombining::addCombined(), at(), characters(), clear(), count(), down(), isEmpty(), markDeleted(), match(), QIMPenCombining::penChar(), QIMPenCharSet(), removeChar(), save(), and up().

QString QIMPenCharSet::csTitle [protected]
 

Definition at line 146 of file qimpenchar.h.

Referenced by load(), QIMPenCharSet(), save(), setTitle(), and title().

Type QIMPenCharSet::csType [protected]
 

Definition at line 150 of file qimpenchar.h.

Referenced by load(), QIMPenCharSet(), save(), setType(), and type().

QString QIMPenCharSet::desc [protected]
 

Definition at line 147 of file qimpenchar.h.

Referenced by description(), load(), QIMPenCharSet(), save(), and setDescription().

QIMPenCharMatchList QIMPenCharSet::matches [protected]
 

Definition at line 153 of file qimpenchar.h.

Referenced by match().

unsigned QIMPenCharSet::maxStrokes [protected]
 

Definition at line 151 of file qimpenchar.h.

Referenced by addChar(), maximumStrokes(), and QIMPenCharSet().

bool QIMPenCharSet::phidden [protected]
 

Definition at line 154 of file qimpenchar.h.

Referenced by hidden(), and setHidden().

QString QIMPenCharSet::sysFilename [protected]
 

Definition at line 148 of file qimpenchar.h.

Referenced by filename(), and setFilename().

QString QIMPenCharSet::userFilename [protected]
 

Definition at line 149 of file qimpenchar.h.

Referenced by filename(), and setFilename().


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