diff -u 20030713/qimpeninput.cpp 20030713-k1/qimpeninput.cpp --- 20030713/qimpeninput.cpp Sun Jul 13 23:06:32 2003 +++ 20030713-k1/qimpeninput.cpp Sun Jul 13 21:35:43 2003 @@ -41,6 +41,30 @@ // We'll use little pixmaps for the buttons to save screen space. + +/* XPM */ +static const char * knj_xpm[] = { +"12 12 5 1", +" c None", +". c #333333", +"+ c #000000", +"@ c #FFFFFF", +"# c #666666", +"+ + + ", +" ++++++++++ ", +" + + ", +" +++++++ ", +"+ + + + ", +" + +++++++ ", +" + ", +" ++++++++ ", +" + + ", +".+ +++++++ ", +"+. + +. ", +"+ +++ .++ "}; + + + /* XPM */ static const char * const pen_xpm[] = { "12 12 4 1", @@ -61,7 +85,7 @@ " .. ", " "}; - +#if 0 /* XPM */ static char * bs_xpm[] = { "12 12 5 1", @@ -82,6 +106,7 @@ " . ", " ", " "}; +#endif /* XPM */ @@ -170,11 +195,12 @@ QPushButton *b = new QPushButton( this ); b->setFocusPolicy( NoFocus ); - b->setPixmap( QPixmap( (const char **)bs_xpm ) ); + b->setPixmap( QPixmap( (const char **)knj_xpm ) ); b->setFixedHeight(pw->sizeHint().height()-3*bh); // left-over space goes here b->setAutoRepeat( TRUE ); gl->addWidget( b, 1, 1 ); - connect( b, SIGNAL(clicked()), SLOT(backspace())); + // connect( b, SIGNAL(clicked()), SLOT(backspace())); + connect( b, SIGNAL(clicked()), SLOT(toggleKanjiMode())); b = new QPushButton( this ); b->setFocusPolicy( NoFocus ); @@ -496,10 +522,18 @@ } } +#if 0 void QIMPenInput::backspace() { keypress( Qt::Key_Backspace << 16 ); matcher->backspace(); +} +#endif + +void QIMPenInput::toggleKanjiMode() +{ + keypress( Qt::Key_F25 << 16 ); + matcher->resetState(); } void QIMPenInput::enter() diff -u 20030713/qimpeninput.h 20030713-k1/qimpeninput.h --- 20030713/qimpeninput.h Sun Jul 13 23:06:32 2003 +++ 20030713-k1/qimpeninput.h Sun Jul 13 21:35:43 2003 @@ -61,7 +61,8 @@ void erase(); void help(); void setup(); - void backspace(); + // void backspace(); + void toggleKanjiMode(); void enter(); private: