author | hash <hash> | 2002-08-12 07:25:27 (UTC) |
---|---|---|
committer | hash <hash> | 2002-08-12 07:25:27 (UTC) |
commit | bda525801efed23f97f11bb411b5bca27dadf47d (patch) (side-by-side diff) | |
tree | 47da8471c95178927cba2e461620965096c15921 /inputmethods | |
parent | fa311d52c378b6bbdbea0b2228497ebfa2266bcf (diff) | |
download | opie-bda525801efed23f97f11bb411b5bca27dadf47d.zip opie-bda525801efed23f97f11bb411b5bca27dadf47d.tar.gz opie-bda525801efed23f97f11bb411b5bca27dadf47d.tar.bz2 |
korean only right now, just testing it out
-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp index 92da8ca..3e43978 100644 --- a/inputmethods/multikey/keyboard.cpp +++ b/inputmethods/multikey/keyboard.cpp @@ -38,32 +38,37 @@ #define USE_SMALL_BACKSPACE /* Keyboard::Keyboard {{{1 */ Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) : QFrame(parent, _name, f), shift(0), lock(0), ctrl(0), alt(0), useLargeKeys(TRUE), usePicks(0), pressedKeyRow(-1), pressedKeyCol(-1), unicode(-1), qkeycode(0), modifiers(0), LANG("ko"), schar(0), mchar(0), echar(0) { + // get the default font + Config qpeConfig( "qpe" ); + qpeConfig.setGroup( "Appearance" ); + QString familyStr = qpeConfig.readEntry( "FontFamily", "fixed" ); + + setFont( QFont( familyStr, 8 ) ); picks = new KeyboardPicks( this ); - picks->setFont( QFont( "helvetica", 8 ) ); - setFont( QFont( "helvetica", 8 ) ); + picks->setFont( QFont( familyStr, 8 ) ); picks->initialise(); if (usePicks) { QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); } else picks->hide(); Config config("locale"); config.setGroup( "Language" ); - LANG = config.readEntry( "Language" ); - if(LANG.isEmpty()) LANG = "en"; + //LANG = config.readEntry( "Language", "en" ); + LANG = "ko"; repeatTimer = new QTimer( this ); connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) ); } /* Keyboard::resizeEvent {{{1 */ void Keyboard::resizeEvent(QResizeEvent*) @@ -441,17 +446,17 @@ void Keyboard::clearHighlight() } } /* Keyboard::sizeHint {{{1 */ QSize Keyboard::sizeHint() const { QFontMetrics fm=fontMetrics(); - int keyHeight = fm.lineSpacing()+2; + int keyHeight = fm.lineSpacing(); return QSize( 240, keyHeight * 5 + (usePicks ? picks->sizeHint().height() : 0) + 1); } void Keyboard::resetState() { schar = mchar = echar = 0; @@ -763,17 +768,19 @@ ushort Keyboard::constoe(const ushort c) { Keys::Keys() { Config config("locale"); config.setGroup( "Language" ); QString l = config.readEntry( "Language" ); if(l.isEmpty()) l = "en"; - QString key_map = QPEApplication::qpeDir() + "/i18n/" + l + "/keyboard"; + QString key_map = QPEApplication::qpeDir() + "/share/multikey/" + + /* l // testing korean for now */ + + "ko.keymap"; setKeysFromFile(key_map); } Keys::Keys(const char * filename) { setKeysFromFile(filename); } |