author | hash <hash> | 2002-08-15 11:19:45 (UTC) |
---|---|---|
committer | hash <hash> | 2002-08-15 11:19:45 (UTC) |
commit | 04a632ea5dd5e5f5a696e53b9c7870247ccaa83c (patch) (unidiff) | |
tree | b17fab3cebe6316ef08240fb93670a9ab73d2185 /inputmethods | |
parent | e7e645b74096ec754db314d2bfc04a1bbb8e1d00 (diff) | |
download | opie-04a632ea5dd5e5f5a696e53b9c7870247ccaa83c.zip opie-04a632ea5dd5e5f5a696e53b9c7870247ccaa83c.tar.gz opie-04a632ea5dd5e5f5a696e53b9c7870247ccaa83c.tar.bz2 |
made the keysize a little larger
-rw-r--r-- | inputmethods/multikey/configdlg.cpp | 3 | ||||
-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp index 68c31be..6ec8d0e 100644 --- a/inputmethods/multikey/configdlg.cpp +++ b/inputmethods/multikey/configdlg.cpp | |||
@@ -24,64 +24,67 @@ | |||
24 | #include <qpushbutton.h> | 24 | #include <qpushbutton.h> |
25 | #include <qcombobox.h> | 25 | #include <qcombobox.h> |
26 | #include "configdlg.h" | 26 | #include "configdlg.h" |
27 | #include "keyboard.h" | 27 | #include "keyboard.h" |
28 | 28 | ||
29 | ConfigDlg::ConfigDlg () : QTabWidget () | 29 | ConfigDlg::ConfigDlg () : QTabWidget () |
30 | { | 30 | { |
31 | setCaption( tr("Multikey Configuration") ); | 31 | setCaption( tr("Multikey Configuration") ); |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * 'general config' tab | 34 | * 'general config' tab |
35 | */ | 35 | */ |
36 | 36 | ||
37 | QVBox *gen_box = new QVBox (this); | 37 | QVBox *gen_box = new QVBox (this); |
38 | gen_box->setMargin(3); | 38 | gen_box->setMargin(3); |
39 | addTab(gen_box, tr("General Settings")); | 39 | addTab(gen_box, tr("General Settings")); |
40 | 40 | ||
41 | QGroupBox *map_group = new QGroupBox (2, Qt::Horizontal, tr("Keymap File"), gen_box); | 41 | QGroupBox *map_group = new QGroupBox (2, Qt::Horizontal, tr("Keymap File"), gen_box); |
42 | 42 | ||
43 | map_combo = new QComboBox ((bool)0, map_group); | 43 | map_combo = new QComboBox ((bool)0, map_group); |
44 | map_combo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); | 44 | map_combo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); |
45 | 45 | ||
46 | QString cur(tr("Current Language")); | 46 | QString cur(tr("Current Language")); |
47 | map_combo->insertItem(cur); | 47 | map_combo->insertItem(cur); |
48 | connect(map_combo, SIGNAL(activated(int)), SLOT(setMap(int))); | 48 | connect(map_combo, SIGNAL(activated(int)), SLOT(setMap(int))); |
49 | 49 | ||
50 | QString ko(tr("/opt/opie/share/multikey/ko.keymap")); | 50 | QString ko(tr("/opt/opie/share/multikey/ko.keymap")); |
51 | map_combo->insertItem(ko); | 51 | map_combo->insertItem(ko); |
52 | 52 | ||
53 | QString en(tr("/opt/opie/share/multikey/en.keymap")); | 53 | QString en(tr("/opt/opie/share/multikey/en.keymap")); |
54 | map_combo->insertItem(en); | 54 | map_combo->insertItem(en); |
55 | 55 | ||
56 | QString de(tr("/opt/opie/share/multikey/de.keymap")); | ||
57 | map_combo->insertItem(de); | ||
58 | |||
56 | QPushButton *button = new QPushButton(tr("Browse..."), map_group); | 59 | QPushButton *button = new QPushButton(tr("Browse..."), map_group); |
57 | button->setFlat((bool)1); | 60 | button->setFlat((bool)1); |
58 | 61 | ||
59 | pick_button = new QCheckBox(tr("Pickboard"), gen_box); | 62 | pick_button = new QCheckBox(tr("Pickboard"), gen_box); |
60 | 63 | ||
61 | Config config ("multikey"); | 64 | Config config ("multikey"); |
62 | config.setGroup ("pickboard"); | 65 | config.setGroup ("pickboard"); |
63 | bool pick_open = config.readBoolEntry ("open", "0"); // default closed | 66 | bool pick_open = config.readBoolEntry ("open", "0"); // default closed |
64 | if (pick_open) { | 67 | if (pick_open) { |
65 | 68 | ||
66 | pick_button->setChecked(true); | 69 | pick_button->setChecked(true); |
67 | } | 70 | } |
68 | 71 | ||
69 | // by connecting it after checking it, the signal isn't emmited | 72 | // by connecting it after checking it, the signal isn't emmited |
70 | connect (pick_button, SIGNAL(clicked()), this, SLOT(pickTog())); | 73 | connect (pick_button, SIGNAL(clicked()), this, SLOT(pickTog())); |
71 | 74 | ||
72 | /* | 75 | /* |
73 | * 'color' tab | 76 | * 'color' tab |
74 | */ | 77 | */ |
75 | 78 | ||
76 | QGrid *color_box = new QGrid(2, this); | 79 | QGrid *color_box = new QGrid(2, this); |
77 | color_box->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); | 80 | color_box->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); |
78 | color_box->setMargin(3); | 81 | color_box->setMargin(3); |
79 | addTab(color_box, tr("Colors")); | 82 | addTab(color_box, tr("Colors")); |
80 | 83 | ||
81 | QLabel *label; | 84 | QLabel *label; |
82 | 85 | ||
83 | label = new QLabel(tr("Key Color"), color_box); | 86 | label = new QLabel(tr("Key Color"), color_box); |
84 | button = new QPushButton(color_box); | 87 | button = new QPushButton(color_box); |
85 | button->setFlat((bool)1); | 88 | button->setFlat((bool)1); |
86 | label = new QLabel(tr("Key Pressed Color"), color_box); | 89 | label = new QLabel(tr("Key Pressed Color"), color_box); |
87 | button = new QPushButton(color_box); | 90 | button = new QPushButton(color_box); |
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp index 1d91b82..b793391 100644 --- a/inputmethods/multikey/keyboard.cpp +++ b/inputmethods/multikey/keyboard.cpp | |||
@@ -426,65 +426,65 @@ void Keyboard::timerEvent(QTimerEvent* e) | |||
426 | cout << "calling clearHighlight from timerEvent\n"; | 426 | cout << "calling clearHighlight from timerEvent\n"; |
427 | clearHighlight(); | 427 | clearHighlight(); |
428 | } | 428 | } |
429 | } | 429 | } |
430 | */ | 430 | */ |
431 | 431 | ||
432 | void Keyboard::repeat() | 432 | void Keyboard::repeat() |
433 | { | 433 | { |
434 | 434 | ||
435 | repeatTimer->start( 200 ); | 435 | repeatTimer->start( 200 ); |
436 | emit key( unicode, 0, modifiers, true, true ); | 436 | emit key( unicode, 0, modifiers, true, true ); |
437 | } | 437 | } |
438 | 438 | ||
439 | void Keyboard::clearHighlight() | 439 | void Keyboard::clearHighlight() |
440 | { | 440 | { |
441 | if ( pressedKeyRow >= 0 && pressedKeyCol >= 0) { | 441 | if ( pressedKeyRow >= 0 && pressedKeyCol >= 0) { |
442 | int tmpRow = pressedKeyRow; | 442 | int tmpRow = pressedKeyRow; |
443 | int tmpCol = pressedKeyCol; | 443 | int tmpCol = pressedKeyCol; |
444 | 444 | ||
445 | pressedKeyRow = -1; | 445 | pressedKeyRow = -1; |
446 | pressedKeyCol = -1; | 446 | pressedKeyCol = -1; |
447 | 447 | ||
448 | QPainter p(this); | 448 | QPainter p(this); |
449 | drawKeyboard(p, tmpRow, tmpCol); | 449 | drawKeyboard(p, tmpRow, tmpCol); |
450 | } | 450 | } |
451 | } | 451 | } |
452 | 452 | ||
453 | 453 | ||
454 | /* Keyboard::sizeHint {{{1 */ | 454 | /* Keyboard::sizeHint {{{1 */ |
455 | QSize Keyboard::sizeHint() const | 455 | QSize Keyboard::sizeHint() const |
456 | { | 456 | { |
457 | QFontMetrics fm=fontMetrics(); | 457 | QFontMetrics fm=fontMetrics(); |
458 | int keyHeight = fm.lineSpacing(); | 458 | int keyHeight = fm.lineSpacing() + 2; |
459 | 459 | ||
460 | return QSize( 240, keyHeight * 5 + (usePicks ? picks->sizeHint().height() : 0) + 1); | 460 | return QSize( 240, keyHeight * 5 + (usePicks ? picks->sizeHint().height() : 0) + 1); |
461 | } | 461 | } |
462 | 462 | ||
463 | 463 | ||
464 | void Keyboard::resetState() | 464 | void Keyboard::resetState() |
465 | { | 465 | { |
466 | schar = mchar = echar = 0; | 466 | schar = mchar = echar = 0; |
467 | picks->resetState(); | 467 | picks->resetState(); |
468 | } | 468 | } |
469 | 469 | ||
470 | /* Keyboard::togglePickboard {{{1 */ | 470 | /* Keyboard::togglePickboard {{{1 */ |
471 | void Keyboard::togglePickboard(bool on_off) | 471 | void Keyboard::togglePickboard(bool on_off) |
472 | { | 472 | { |
473 | usePicks = on_off; | 473 | usePicks = on_off; |
474 | if (usePicks) { | 474 | if (usePicks) { |
475 | picks->show(); | 475 | picks->show(); |
476 | //move(x(), y() - picks->height()); // not required anymore because QCopChannel::send | 476 | //move(x(), y() - picks->height()); // not required anymore because QCopChannel::send |
477 | //adjustSize(); | 477 | //adjustSize(); |
478 | QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), | 478 | QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), |
479 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); | 479 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); |
480 | } else { | 480 | } else { |
481 | 481 | ||
482 | picks->hide(); | 482 | picks->hide(); |
483 | picks->resetState(); | 483 | picks->resetState(); |
484 | //move(x(), y() + picks->height()); | 484 | //move(x(), y() + picks->height()); |
485 | //adjustSize(); | 485 | //adjustSize(); |
486 | QObject::disconnect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), | 486 | QObject::disconnect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), |
487 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); | 487 | this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); |
488 | 488 | ||
489 | } | 489 | } |
490 | /* | 490 | /* |