summaryrefslogtreecommitdiff
path: root/inputmethods/handwriting
Unidiff
Diffstat (limited to 'inputmethods/handwriting') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpenwidget.cpp2
-rw-r--r--inputmethods/handwriting/qimpenwidget.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/inputmethods/handwriting/qimpenwidget.cpp b/inputmethods/handwriting/qimpenwidget.cpp
index 8f8f582..7223e1a 100644
--- a/inputmethods/handwriting/qimpenwidget.cpp
+++ b/inputmethods/handwriting/qimpenwidget.cpp
@@ -269,33 +269,33 @@ bool QIMPenWidget::selectSet( QPoint p )
269 currCharSet = idx; 269 currCharSet = idx;
270 update( 0, 0, width(), 12 ); 270 update( 0, 0, width(), 12 );
271 emit changeCharSet( currCharSet ); 271 emit changeCharSet( currCharSet );
272 emit changeCharSet( charSets.at(currCharSet)->cs ); 272 emit changeCharSet( charSets.at(currCharSet)->cs );
273 } 273 }
274 break; 274 break;
275 } 275 }
276 } 276 }
277 } 277 }
278 278
279 return FALSE; 279 return FALSE;
280} 280}
281 281
282/*! 282/*!
283 Hopefully returns a sensible size. 283 Hopefully returns a sensible size.
284*/ 284*/
285QSize QIMPenWidget::sizeHint() 285QSize QIMPenWidget::sizeHint() const
286{ 286{
287 return QSize( TITLE_WIDTH * charSets.count(), 75 ); 287 return QSize( TITLE_WIDTH * charSets.count(), 75 );
288} 288}
289 289
290void QIMPenWidget::mousePressEvent( QMouseEvent *e ) 290void QIMPenWidget::mousePressEvent( QMouseEvent *e )
291{ 291{
292 if ( !readOnly && e->button() == LeftButton && mode == Waiting ) { 292 if ( !readOnly && e->button() == LeftButton && mode == Waiting ) {
293 // if selectSet returns false the click was not over the 293 // if selectSet returns false the click was not over the
294 // char set selectors. 294 // char set selectors.
295 if ( !selectSet( e->pos() ) ) { 295 if ( !selectSet( e->pos() ) ) {
296 // start of character input 296 // start of character input
297 timer->stop(); 297 timer->stop();
298 if ( outputChar ) { 298 if ( outputChar ) {
299 outputChar = 0; 299 outputChar = 0;
300 outputStroke = 0; 300 outputStroke = 0;
301 repaint(); 301 repaint();
diff --git a/inputmethods/handwriting/qimpenwidget.h b/inputmethods/handwriting/qimpenwidget.h
index 98d7f5c..d156554 100644
--- a/inputmethods/handwriting/qimpenwidget.h
+++ b/inputmethods/handwriting/qimpenwidget.h
@@ -24,33 +24,33 @@
24 24
25class QIMPenWidget : public QWidget 25class QIMPenWidget : public QWidget
26{ 26{
27 Q_OBJECT 27 Q_OBJECT
28public: 28public:
29 QIMPenWidget( QWidget *parent ); 29 QIMPenWidget( QWidget *parent );
30 30
31 void clear(); 31 void clear();
32 void greyStroke(); 32 void greyStroke();
33 void setReadOnly( bool r ) { readOnly = r; } 33 void setReadOnly( bool r ) { readOnly = r; }
34 34
35 void insertCharSet( QIMPenCharSet *cs, int stretch=1, int pos=-1 ); 35 void insertCharSet( QIMPenCharSet *cs, int stretch=1, int pos=-1 );
36 void removeCharSet( int ); 36 void removeCharSet( int );
37 void changeCharSet( QIMPenCharSet *cs, int pos ); 37 void changeCharSet( QIMPenCharSet *cs, int pos );
38 void clearCharSets(); 38 void clearCharSets();
39 void showCharacter( QIMPenChar *, int speed = 10 ); 39 void showCharacter( QIMPenChar *, int speed = 10 );
40 virtual QSize sizeHint(); 40 virtual QSize sizeHint() const;
41 41
42public slots: 42public slots:
43 void removeStroke(); 43 void removeStroke();
44 44
45signals: 45signals:
46 void changeCharSet( QIMPenCharSet *cs ); 46 void changeCharSet( QIMPenCharSet *cs );
47 void changeCharSet( int ); 47 void changeCharSet( int );
48 void beginStroke(); 48 void beginStroke();
49 void stroke( QIMPenStroke *ch ); 49 void stroke( QIMPenStroke *ch );
50 50
51protected slots: 51protected slots:
52 void timeout(); 52 void timeout();
53 53
54protected: 54protected:
55 enum Mode { Waiting, Input, Output }; 55 enum Mode { Waiting, Input, Output };
56 bool selectSet( QPoint ); 56 bool selectSet( QPoint );