Diffstat (limited to 'inputmethods/handwriting/qimpenchar.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/handwriting/qimpenchar.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/inputmethods/handwriting/qimpenchar.h b/inputmethods/handwriting/qimpenchar.h index 9a5f687..efd6f16 100644 --- a/inputmethods/handwriting/qimpenchar.h +++ b/inputmethods/handwriting/qimpenchar.h @@ -15,97 +15,97 @@ ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef QIMPENCHAR_H_ #define QIMPENCHAR_H_ #include <qlist.h> #include <qvaluelist.h> #include <qcstring.h> #include "qimpenstroke.h" struct QIMPenSpecialKeys { int code; char *name; }; extern const QIMPenSpecialKeys qimpen_specialKeys[]; class QIMPenChar { public: QIMPenChar(); QIMPenChar( const QIMPenChar & ); unsigned int character() const { return ch; } void setCharacter( unsigned int c ) { ch = c; } const QString &data() const { return d; } void setData( const QString &ba ) { d = ba; } QString name() const; bool isEmpty() const { return strokes.isEmpty(); } unsigned int strokeCount() const { return strokes.count(); } unsigned int strokeLength( int s ) const; void clear(); int match( QIMPenChar *ch ); const QIMPenStrokeList &penStrokes() { return strokes; } QPoint startingPoint() const { return strokes.getFirst()->startingPoint(); } QRect boundingRect(); void setFlag( int f ) { flags |= f; } void clearFlag( int f ) { flags &= ~f; } bool testFlag( int f ) { return flags & f; } - enum Flags { System=0x01, Deleted=0x02, CombineRight=0x04, Data=0x08 }; + enum Flags { System=0x01, Deleted=0x02, CombineRight=0x04, Data=0x08, Combined=0x10 }; // Correspond to codes in template files. Do not change values. enum Mode { ModeBase=0x4000, Caps=0x4001, Shortcut=0x4002, CapsLock=0x4003, Punctuation=0x4004, Symbol=0x4005, Extended=0x4006 }; QIMPenChar &operator=( const QIMPenChar &s ); void addStroke( QIMPenStroke * ); protected: unsigned int ch; QString d; Q_UINT8 flags; QIMPenStrokeList strokes; friend QDataStream &operator<< (QDataStream &, const QIMPenChar &); friend QDataStream &operator>> (QDataStream &, QIMPenChar &); }; typedef QList<QIMPenChar> QIMPenCharList; typedef QListIterator<QIMPenChar> QIMPenCharIterator; QDataStream & operator<< (QDataStream & s, const QIMPenChar &ws); QDataStream & operator>> (QDataStream & s, QIMPenChar &ws); struct QIMPenCharMatch { int error; QIMPenChar *penChar; bool operator>( const QIMPenCharMatch &m ); bool operator<( const QIMPenCharMatch &m ); bool operator<=( const QIMPenCharMatch &m ); }; typedef QValueList<QIMPenCharMatch> QIMPenCharMatchList; class QIMPenCharSet { public: QIMPenCharSet(); QIMPenCharSet( const QString &fn ); bool isEmpty() const { return chars.isEmpty(); } unsigned int count() const { return chars.count(); } void clear() { chars.clear(); } void setDescription( const QString &d ) { desc = d; } |