author | drw <drw> | 2005-06-15 22:54:50 (UTC) |
---|---|---|
committer | drw <drw> | 2005-06-15 22:54:50 (UTC) |
commit | 7ff2e7bd4620a574f3ff22a951a5904310cfd920 (patch) (side-by-side diff) | |
tree | 6d8ffd28aadf00901b3ab560464794aded3efc76 /inputmethods/kjumpx/keyboard.cpp | |
parent | e0205bac48b9d23af9feb48004c24fcf7a5e8200 (diff) | |
download | opie-7ff2e7bd4620a574f3ff22a951a5904310cfd920.zip opie-7ff2e7bd4620a574f3ff22a951a5904310cfd920.tar.gz opie-7ff2e7bd4620a574f3ff22a951a5904310cfd920.tar.bz2 |
Resource -> OResource
Diffstat (limited to 'inputmethods/kjumpx/keyboard.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | inputmethods/kjumpx/keyboard.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/inputmethods/kjumpx/keyboard.cpp b/inputmethods/kjumpx/keyboard.cpp index dc44805..4e99f40 100644 --- a/inputmethods/kjumpx/keyboard.cpp +++ b/inputmethods/kjumpx/keyboard.cpp @@ -2,25 +2,25 @@ ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** *********************************************************************************************/ #include "keyboard.h" -#include <qpe/resource.h> +#include <opie2/oresource.h> //#include <iostream.h> static const int autorepeatDelaytime = 500; // ms static const int autorepeatRate = 20; // chars per second static const int mod1x1 = 0; static const int mod1x2 = 23; static const int mod1w = mod1x2 - mod1x1; static const int letterx1 = 27; @@ -144,43 +144,43 @@ using namespace KJumpX; Keyboard::Keyboard(QWidget* parent, const char* name, WFlags f) : QFrame(parent, name, f), shift(0), paren(0), ctrl(0), alt(0), lang(1), lastKey(0), pressedKeyUnicode(0), pressedKeyQcode(0), pressedMod(0), isnoncont(false), slideKeyUnicodeH(0), slideKeyQcodeH(0), slideKeyUnicodeV(0), slideKeyQcodeV(0), enableMouseTracking(false), slidePix(NULL), slidePixH(NULL), slidePixV(NULL), releasedPix(NULL), pressedPix(NULL) { //setPalette(QPalette(QColor(240,240,230))); // Beige! - releasedPlain = releasedShift = releasedParen = Resource::loadPixmap("kjumpx/released"); - pressedPlain = pressedShift = pressedParen = Resource::loadPixmap("kjumpx/pressed"); - pressedDigit = Resource::loadPixmap("kjumpx/pressed"); + releasedPlain = releasedShift = releasedParen = Opie::Core::OResource::loadPixmap("kjumpx/released"); + pressedPlain = pressedShift = pressedParen = Opie::Core::OResource::loadPixmap("kjumpx/pressed"); + pressedDigit = Opie::Core::OResource::loadPixmap("kjumpx/pressed"); QPixmap tmp; - tmp = Resource::loadPixmap("kjumpx/releasedShift"); + tmp = Opie::Core::OResource::loadPixmap("kjumpx/releasedShift"); bitBlt(&releasedShift, letterx1, 0, &tmp); - tmp = Resource::loadPixmap("kjumpx/releasedParen"); + tmp = Opie::Core::OResource::loadPixmap("kjumpx/releasedParen"); bitBlt(&releasedParen, specialx1, 0, &tmp); - tmp = Resource::loadPixmap("kjumpx/pressedShift"); + tmp = Opie::Core::OResource::loadPixmap("kjumpx/pressedShift"); bitBlt(&pressedShift, letterx1, 0, &tmp); - tmp = Resource::loadPixmap("kjumpx/pressedParen"); + tmp = Opie::Core::OResource::loadPixmap("kjumpx/pressedParen"); bitBlt(&pressedParen, specialx1, 0, &tmp); - tmp = Resource::loadPixmap("kjumpx/pressedDigit"); + tmp = Opie::Core::OResource::loadPixmap("kjumpx/pressedDigit"); bitBlt(&pressedDigit, specialx1, 0, &tmp); offscreen = QPixmap( releasedPlain ); releasedPix = &releasedPlain; pressedPix = &pressedPlain; slidePix = &pressedPlain; delayTimer = new QTimer(this); rateTimer = new QTimer(this); connect( delayTimer, SIGNAL( timeout() ), this, SLOT( delayTimerDone() ) ); connect( rateTimer, SIGNAL( timeout() ), this, SLOT( rateTimerDone() ) ); @@ -555,27 +555,27 @@ void Keyboard::resetState() * one major problem with this implementation is that you can't move the * cursor after inputing korean chars, otherwise it will eat up and replace * the char before the cursor you move to. fix that * * make a kor/eng swaping key * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * how korean input works * * all following chars means unicode char value and are in hex * - * ÃÊÀ½ = schar (start char) - * ÁßÀ½ = mchar (middle char) - * ³¡À½ = echar (end char) + * �= = schar (start char) + * �= = mchar (middle char) + * = = echar (end char) * * there are 19 schars. unicode position is at 1100 - 1112 * there are 21 mchars. unicode position is at 1161 - 1175 * there are 27 echars. unicode position is at 11a8 - 11c2 * * the map with everything combined is at ac00 - d7a3 * * to find a combination of schar + mchar in the map, lookup * ((schar - 0x1100) * 587) + ((mchar - 0x1161) * 27) + (echar - 0x11a8) + 0xac00) * */ @@ -601,67 +601,67 @@ QChar Keyboard::parseKoreanInput (ushort c) { if (echar == 0) { if (!(echar = constoe(c))) { schar = c; mchar = 0; echar = 0; return QChar(c); } } else { // must figure out what the echar is - if (echar == 0x11a8) { // ¤¡ + if (echar == 0x11a8) { // - if (c == 0x1100) echar = 0x11a9; // ¤¡ + ¤¡ - else if (c == 0x1109) echar = 0x11aa; // ¤¡ + ¤µ + if (c == 0x1100) echar = 0x11a9; // + + else if (c == 0x1109) echar = 0x11aa; // + else { schar = c; mchar = 0; echar = 0; return QChar(c); } - } else if (echar == 0x11ab) { // ¤¤ + } else if (echar == 0x11ab) { // - if (c == 0x110c) echar = 0x11ac; // ¤¤ + ¤¸ - else if (c == 0x1112) echar = 0x11ad; // ¤¤ + ¤¾ + if (c == 0x110c) echar = 0x11ac; // + + else if (c == 0x1112) echar = 0x11ad; // + else { schar = c; mchar = 0; echar = 0; return QChar(c); } - } else if (echar == 0x11af) { // ¤© + } else if (echar == 0x11af) { // - if (c == 0x1100) echar = 0x11b0; // ¤© + ¤¡ - else if (c == 0x1106) echar = 0x11b1; // ¤© + ¤± - else if (c == 0x1107) echar = 0x11b2; // ¤© + ¤² - else if (c == 0x1109) echar = 0x11b3; // ¤© + ¤µ - else if (c == 0x1110) echar = 0x11b4; // ¤© + ¤¼ - else if (c == 0x1111) echar = 0x11b5; // ¤© + ¤½ - else if (c == 0x1112) echar = 0x11b6; // ¤© + ¤¾ + if (c == 0x1100) echar = 0x11b0; // + + else if (c == 0x1106) echar = 0x11b1; // + + else if (c == 0x1107) echar = 0x11b2; // + + else if (c == 0x1109) echar = 0x11b3; // + + else if (c == 0x1110) echar = 0x11b4; // + + else if (c == 0x1111) echar = 0x11b5; // + + else if (c == 0x1112) echar = 0x11b6; // + else { schar = c; mchar = 0; echar = 0; return QChar(c); } - } else if (echar == 0x11b8) { // ¤² + } else if (echar == 0x11b8) { // - if (c == 0x1109) echar = 0x11b9; // ¤² + ¤µ + if (c == 0x1109) echar = 0x11b9; // + else { schar = c; mchar = 0; echar = 0; return QChar(c); } - } else if (echar == 0x11ba) { // ¤µ + } else if (echar == 0x11ba) { // - if (c == 0x1109) echar = 0x11bb; // ¤µ + ¤µ + if (c == 0x1109) echar = 0x11bb; // + else { schar = c; mchar = 0; echar = 0; return QChar(c); } } else { // if any other char, cannot combine chars schar = c; mchar = 0; echar = 0; return QChar(c); } lastKey = echar; |