Diffstat (limited to 'inputmethods/handwriting/qimpenstroke.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/handwriting/qimpenstroke.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/inputmethods/handwriting/qimpenstroke.cpp b/inputmethods/handwriting/qimpenstroke.cpp index 3567d6d..14e435a 100644 --- a/inputmethods/handwriting/qimpenstroke.cpp +++ b/inputmethods/handwriting/qimpenstroke.cpp | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <limits.h> | 24 | #include <limits.h> |
25 | #include <qdatastream.h> | 25 | #include <qdatastream.h> |
26 | #include "qimpenstroke.h" | 26 | #include "qimpenstroke.h" |
27 | #include "opie2/odebug.h" | ||
27 | 28 | ||
28 | #define QIMPEN_CORRELATION_POINTS 25 | 29 | #define QIMPEN_CORRELATION_POINTS 25 |
29 | //#define DEBUG_QIMPEN | 30 | //#define DEBUG_QIMPEN |
@@ -49,7 +50,7 @@ QIMPenStroke::QIMPenStroke( const QIMPenStroke &st ) | |||
49 | QIMPenStroke &QIMPenStroke::operator=( const QIMPenStroke &s ) | 50 | QIMPenStroke &QIMPenStroke::operator=( const QIMPenStroke &s ) |
50 | { | 51 | { |
51 | clear(); | 52 | clear(); |
52 | //qDebug( "copy strokes %d", s.links.count() ); | 53 | //odebug << "copy strokes " << s.links.count() << oendl; |
53 | startPoint = s.startPoint; | 54 | startPoint = s.startPoint; |
54 | lastPoint = s.lastPoint; | 55 | lastPoint = s.lastPoint; |
55 | links = s.links.copy(); | 56 | links = s.links.copy(); |
@@ -149,7 +150,7 @@ void QIMPenStroke::endInput() | |||
149 | links[0] = gl; | 150 | links[0] = gl; |
150 | } | 151 | } |
151 | 152 | ||
152 | //qDebug("Points: %d", links.count() ); | 153 | //odebug << "Points: " << links.count() << oendl; |
153 | } | 154 | } |
154 | 155 | ||
155 | /*! | 156 | /*! |
@@ -169,7 +170,7 @@ unsigned int QIMPenStroke::match( QIMPenStroke *pen ) | |||
169 | 170 | ||
170 | if ( lratio > 2.0 ) { | 171 | if ( lratio > 2.0 ) { |
171 | #ifdef DEBUG_QIMPEN | 172 | #ifdef DEBUG_QIMPEN |
172 | qDebug( "stroke length too different" ); | 173 | odebug << "stroke length too different" << oendl; |
173 | #endif | 174 | #endif |
174 | return 400000; | 175 | return 400000; |
175 | } | 176 | } |
@@ -215,7 +216,7 @@ unsigned int QIMPenStroke::match( QIMPenStroke *pen ) | |||
215 | } | 216 | } |
216 | if ( err1 > 40 ) { // no need for more matching | 217 | if ( err1 > 40 ) { // no need for more matching |
217 | #ifdef DEBUG_QIMPEN | 218 | #ifdef DEBUG_QIMPEN |
218 | qDebug( "tsig too great: %d", err1 ); | 219 | odebug << "tsig too great: " << err1 << oendl; |
219 | #endif | 220 | #endif |
220 | return 400000; | 221 | return 400000; |
221 | } | 222 | } |
@@ -224,7 +225,7 @@ unsigned int QIMPenStroke::match( QIMPenStroke *pen ) | |||
224 | err2 = calcError( dsig, pen->dsig, 0, FALSE ); | 225 | err2 = calcError( dsig, pen->dsig, 0, FALSE ); |
225 | if ( err2 > 100 ) { | 226 | if ( err2 > 100 ) { |
226 | #ifdef DEBUG_QIMPEN | 227 | #ifdef DEBUG_QIMPEN |
227 | qDebug( "dsig too great: %d", err2 ); | 228 | odebug << "dsig too great: " << err2 << oendl; |
228 | #endif | 229 | #endif |
229 | return 400000; | 230 | return 400000; |
230 | } | 231 | } |
@@ -232,7 +233,7 @@ unsigned int QIMPenStroke::match( QIMPenStroke *pen ) | |||
232 | err3 = calcError( asig, pen->asig, 0, TRUE ); | 233 | err3 = calcError( asig, pen->asig, 0, TRUE ); |
233 | if ( err3 > 60 ) { | 234 | if ( err3 > 60 ) { |
234 | #ifdef DEBUG_QIMPEN | 235 | #ifdef DEBUG_QIMPEN |
235 | qDebug( "asig too great: %d", err3 ); | 236 | odebug << "asig too great: " << err3 << oendl; |
236 | #endif | 237 | #endif |
237 | return 400000; | 238 | return 400000; |
238 | } | 239 | } |
@@ -247,7 +248,7 @@ unsigned int QIMPenStroke::match( QIMPenStroke *pen ) | |||
247 | (unsigned int)(lratio * 5000.0); | 248 | (unsigned int)(lratio * 5000.0); |
248 | 249 | ||
249 | #ifdef DEBUG_QIMPEN | 250 | #ifdef DEBUG_QIMPEN |
250 | qDebug( "err %d ( %d, %d, %d, %d)", err, err1, err2, err3, vdiff ); | 251 | odebug << "err " << err << "( " << err1 << ", " << err2 << ", " << err3 << ", " << vdiff << oendl; |
251 | #endif | 252 | #endif |
252 | 253 | ||
253 | return err; | 254 | return err; |