summaryrefslogtreecommitdiff
path: root/inputmethods/multikey/keyboard.cpp
authorhash <hash>2002-08-12 07:25:27 (UTC)
committer hash <hash>2002-08-12 07:25:27 (UTC)
commitbda525801efed23f97f11bb411b5bca27dadf47d (patch) (unidiff)
tree47da8471c95178927cba2e461620965096c15921 /inputmethods/multikey/keyboard.cpp
parentfa311d52c378b6bbdbea0b2228497ebfa2266bcf (diff)
downloadopie-bda525801efed23f97f11bb411b5bca27dadf47d.zip
opie-bda525801efed23f97f11bb411b5bca27dadf47d.tar.gz
opie-bda525801efed23f97f11bb411b5bca27dadf47d.tar.bz2
korean only right now, just testing it out
Diffstat (limited to 'inputmethods/multikey/keyboard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/keyboard.cpp19
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
@@ -43,10 +43,15 @@ Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) :
43 alt(0), useLargeKeys(TRUE), usePicks(0), pressedKeyRow(-1), pressedKeyCol(-1), 43 alt(0), useLargeKeys(TRUE), usePicks(0), pressedKeyRow(-1), pressedKeyCol(-1),
44 unicode(-1), qkeycode(0), modifiers(0), LANG("ko"), schar(0), mchar(0), echar(0) 44 unicode(-1), qkeycode(0), modifiers(0), LANG("ko"), schar(0), mchar(0), echar(0)
45{ 45{
46 // get the default font
47 Config qpeConfig( "qpe" );
48 qpeConfig.setGroup( "Appearance" );
49 QString familyStr = qpeConfig.readEntry( "FontFamily", "fixed" );
50
51 setFont( QFont( familyStr, 8 ) );
46 52
47 picks = new KeyboardPicks( this ); 53 picks = new KeyboardPicks( this );
48 picks->setFont( QFont( "helvetica", 8 ) ); 54 picks->setFont( QFont( familyStr, 8 ) );
49 setFont( QFont( "helvetica", 8 ) );
50 picks->initialise(); 55 picks->initialise();
51 if (usePicks) { 56 if (usePicks) {
52 57
@@ -57,8 +62,8 @@ Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) :
57 62
58 Config config("locale"); 63 Config config("locale");
59 config.setGroup( "Language" ); 64 config.setGroup( "Language" );
60 LANG = config.readEntry( "Language" ); 65 //LANG = config.readEntry( "Language", "en" );
61 if(LANG.isEmpty()) LANG = "en"; 66 LANG = "ko";
62 67
63 repeatTimer = new QTimer( this ); 68 repeatTimer = new QTimer( this );
64 connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) ); 69 connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) );
@@ -446,7 +451,7 @@ void Keyboard::clearHighlight()
446QSize Keyboard::sizeHint() const 451QSize Keyboard::sizeHint() const
447{ 452{
448 QFontMetrics fm=fontMetrics(); 453 QFontMetrics fm=fontMetrics();
449 int keyHeight = fm.lineSpacing()+2; 454 int keyHeight = fm.lineSpacing();
450 455
451 return QSize( 240, keyHeight * 5 + (usePicks ? picks->sizeHint().height() : 0) + 1); 456 return QSize( 240, keyHeight * 5 + (usePicks ? picks->sizeHint().height() : 0) + 1);
452} 457}
@@ -768,7 +773,9 @@ Keys::Keys() {
768 QString l = config.readEntry( "Language" ); 773 QString l = config.readEntry( "Language" );
769 if(l.isEmpty()) l = "en"; 774 if(l.isEmpty()) l = "en";
770 775
771 QString key_map = QPEApplication::qpeDir() + "/i18n/" + l + "/keyboard"; 776 QString key_map = QPEApplication::qpeDir() + "/share/multikey/"
777 + /* l // testing korean for now */
778 + "ko.keymap";
772 779
773 setKeysFromFile(key_map); 780 setKeysFromFile(key_map);
774} 781}