Diffstat (limited to 'inputmethods/handwriting/qimpenchar.h') (more/less context) (show 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 | |||
@@ -96,62 +96,65 @@ struct QIMPenCharMatch | |||
96 | }; | 96 | }; |
97 | 97 | ||
98 | typedef QValueList<QIMPenCharMatch> QIMPenCharMatchList; | 98 | typedef QValueList<QIMPenCharMatch> QIMPenCharMatchList; |
99 | 99 | ||
100 | 100 | ||
101 | class QIMPenCharSet | 101 | class QIMPenCharSet |
102 | { | 102 | { |
103 | public: | 103 | public: |
104 | QIMPenCharSet(); | 104 | QIMPenCharSet(); |
105 | QIMPenCharSet( const QString &fn ); | 105 | QIMPenCharSet( const QString &fn ); |
106 | 106 | ||
107 | bool isEmpty() const { return chars.isEmpty(); } | 107 | bool isEmpty() const { return chars.isEmpty(); } |
108 | unsigned int count() const { return chars.count(); } | 108 | unsigned int count() const { return chars.count(); } |
109 | void clear() { chars.clear(); } | 109 | void clear() { chars.clear(); } |
110 | 110 | ||
111 | void setDescription( const QString &d ) { desc = d; } | 111 | void setDescription( const QString &d ) { desc = d; } |
112 | QString description() const { return desc; } | 112 | QString description() const { return desc; } |
113 | void setTitle( const QString &t ) { csTitle = t; } | 113 | void setTitle( const QString &t ) { csTitle = t; } |
114 | QString title() const { return csTitle; } | 114 | QString title() const { return csTitle; } |
115 | 115 | ||
116 | QIMPenCharMatchList match( QIMPenChar *ch ); | 116 | QIMPenCharMatchList match( QIMPenChar *ch ); |
117 | void addChar( QIMPenChar *ch ); | 117 | void addChar( QIMPenChar *ch ); |
118 | void removeChar( QIMPenChar *ch ); | 118 | void removeChar( QIMPenChar *ch ); |
119 | QIMPenChar *at( int i ); | 119 | QIMPenChar *at( int i ); |
120 | void setHidden ( const bool &b ) { phidden = &b; } | ||
121 | bool hidden() const { return phidden; } | ||
120 | 122 | ||
121 | unsigned maximumStrokes() const { return maxStrokes; } | 123 | unsigned maximumStrokes() const { return maxStrokes; } |
122 | 124 | ||
123 | void up( QIMPenChar *ch ); | 125 | void up( QIMPenChar *ch ); |
124 | void down( QIMPenChar *ch ); | 126 | void down( QIMPenChar *ch ); |
125 | 127 | ||
126 | enum Domain { System, User }; | 128 | enum Domain { System, User }; |
127 | enum Type { Unknown=0x00, Lower=0x01, Upper=0x02, Combining=0x04, | 129 | enum Type { Unknown=0x00, Lower=0x01, Upper=0x02, Combining=0x04, |
128 | Numeric=0x08, Punctuation=0x10, Symbol=0x20, Shortcut=0x40 }; | 130 | Numeric=0x08, Punctuation=0x10, Symbol=0x20, Shortcut=0x40 }; |
129 | 131 | ||
130 | const QIMPenCharList &characters() const { return chars; } | 132 | const QIMPenCharList &characters() const { return chars; } |
131 | 133 | ||
132 | void setType( Type t ) { csType = t; } | 134 | void setType( Type t ) { csType = t; } |
133 | Type type() const { return csType; } | 135 | Type type() const { return csType; } |
134 | 136 | ||
135 | const QString &filename( Domain d ) const; | 137 | const QString &filename( Domain d ) const; |
136 | void setFilename( const QString &fn, Domain d=System ); | 138 | void setFilename( const QString &fn, Domain d=System ); |
137 | bool load( const QString &fn, Domain d=System ); | 139 | bool load( const QString &fn, Domain d=System ); |
138 | bool save( Domain d=System ); | 140 | bool save( Domain d=System ); |
139 | 141 | ||
140 | protected: | 142 | protected: |
141 | void markDeleted( uint ch ); | 143 | void markDeleted( uint ch ); |
142 | 144 | ||
143 | protected: | 145 | protected: |
144 | QString csTitle; | 146 | QString csTitle; |
145 | QString desc; | 147 | QString desc; |
146 | QString sysFilename; | 148 | QString sysFilename; |
147 | QString userFilename; | 149 | QString userFilename; |
148 | Type csType; | 150 | Type csType; |
149 | unsigned maxStrokes; | 151 | unsigned maxStrokes; |
150 | QIMPenCharList chars; | 152 | QIMPenCharList chars; |
151 | QIMPenCharMatchList matches; | 153 | QIMPenCharMatchList matches; |
154 | bool phidden : 1; | ||
152 | }; | 155 | }; |
153 | 156 | ||
154 | typedef QList<QIMPenCharSet> QIMPenCharSetList; | 157 | typedef QList<QIMPenCharSet> QIMPenCharSetList; |
155 | typedef QListIterator<QIMPenCharSet> QIMPenCharSetIterator; | 158 | typedef QListIterator<QIMPenCharSet> QIMPenCharSetIterator; |
156 | 159 | ||
157 | #endif | 160 | #endif |