author | zecke <zecke> | 2004-01-18 13:26:43 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-01-18 13:26:43 (UTC) |
commit | 7d94c9b04f8702d0f94c6c64454d159a186a2576 (patch) (side-by-side diff) | |
tree | a5989f07e02e610abab7cf7514737a67c78b1d68 /inputmethods/handwriting/qimpenchar.h | |
parent | a2a3aabf21655cc9c7df8e2ed0d420d2b208fd3d (diff) | |
download | opie-7d94c9b04f8702d0f94c6c64454d159a186a2576.zip opie-7d94c9b04f8702d0f94c6c64454d159a186a2576.tar.gz opie-7d94c9b04f8702d0f94c6c64454d159a186a2576.tar.bz2 |
Comit the "Mono" patch by
Brad Campbell <brad@wasp.net.au>
Diffstat (limited to 'inputmethods/handwriting/qimpenchar.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/handwriting/qimpenchar.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/inputmethods/handwriting/qimpenchar.h b/inputmethods/handwriting/qimpenchar.h index efd6f16..e4e7645 100644 --- a/inputmethods/handwriting/qimpenchar.h +++ b/inputmethods/handwriting/qimpenchar.h @@ -56,102 +56,105 @@ public: 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, 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; } QString description() const { return desc; } void setTitle( const QString &t ) { csTitle = t; } QString title() const { return csTitle; } QIMPenCharMatchList match( QIMPenChar *ch ); void addChar( QIMPenChar *ch ); void removeChar( QIMPenChar *ch ); QIMPenChar *at( int i ); + void setHidden ( const bool &b ) { phidden = &b; } + bool hidden() const { return phidden; } unsigned maximumStrokes() const { return maxStrokes; } void up( QIMPenChar *ch ); void down( QIMPenChar *ch ); enum Domain { System, User }; enum Type { Unknown=0x00, Lower=0x01, Upper=0x02, Combining=0x04, Numeric=0x08, Punctuation=0x10, Symbol=0x20, Shortcut=0x40 }; const QIMPenCharList &characters() const { return chars; } void setType( Type t ) { csType = t; } Type type() const { return csType; } const QString &filename( 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: void markDeleted( uint ch ); protected: QString csTitle; QString desc; QString sysFilename; QString userFilename; Type csType; unsigned maxStrokes; QIMPenCharList chars; QIMPenCharMatchList matches; + bool phidden : 1; }; typedef QList<QIMPenCharSet> QIMPenCharSetList; typedef QListIterator<QIMPenCharSet> QIMPenCharSetIterator; #endif |