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 | |
parent | e0205bac48b9d23af9feb48004c24fcf7a5e8200 (diff) | |
download | opie-7ff2e7bd4620a574f3ff22a951a5904310cfd920.zip opie-7ff2e7bd4620a574f3ff22a951a5904310cfd920.tar.gz opie-7ff2e7bd4620a574f3ff22a951a5904310cfd920.tar.bz2 |
Resource -> OResource
-rw-r--r-- | inputmethods/kjumpx/config.in | 2 | ||||
-rw-r--r-- | inputmethods/kjumpx/keyboard.cpp | 60 | ||||
-rw-r--r-- | inputmethods/kjumpx/kjumpx.pro | 2 | ||||
-rw-r--r-- | inputmethods/kjumpx/opie-kjumpx.control | 2 |
4 files changed, 33 insertions, 33 deletions
diff --git a/inputmethods/kjumpx/config.in b/inputmethods/kjumpx/config.in index 8ccef5b..0c4e9d4 100644 --- a/inputmethods/kjumpx/config.in +++ b/inputmethods/kjumpx/config.in @@ -1,4 +1,4 @@ config KJUMPX boolean "opie-kjumpx (korean keyboard optimized for single finger/stylus input)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE 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; diff --git a/inputmethods/kjumpx/kjumpx.pro b/inputmethods/kjumpx/kjumpx.pro index 09e9bf1..0f708fd 100644 --- a/inputmethods/kjumpx/kjumpx.pro +++ b/inputmethods/kjumpx/kjumpx.pro @@ -1,15 +1,15 @@ TEMPLATE = lib CONFIG += qt plugin warn_on release HEADERS = keyboard.h \ keyboardimpl.h SOURCES = keyboard.cpp \ keyboardimpl.cpp TARGET = qkjumpx DESTDIR = ../../plugins/inputmethods INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 VERSION = 1.0.0 include( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/inputmethods diff --git a/inputmethods/kjumpx/opie-kjumpx.control b/inputmethods/kjumpx/opie-kjumpx.control index 3650812..a9d004e 100644 --- a/inputmethods/kjumpx/opie-kjumpx.control +++ b/inputmethods/kjumpx/opie-kjumpx.control @@ -1,11 +1,11 @@ Package: opie-kjumpx Files: plugins/inputmethods/libqkjumpx.so* pics/kjumpx/* Priority: optional Section: opie/inputmethods Maintainer: Jake Richardson <jake@asdfnews.org> Architecture: arm -Depends: task-opie-minimal +Depends: task-opie-minimal, libopiecore2 License: GPL Description: Koreanized JumpX input method Keyboard-like input method for the Opie environment. Version: $QPE_VERSION$EXTRAVERSION |