[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/base/plasma/applets/plasmaboard
From: Björn Ruberg <bjoern () ruberg-wegener ! de>
Date: 2009-04-05 21:16:34
Message-ID: 1238966194.264090.28388.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 949764 by ruberg:
Fixed bug keys are only labeled correctly AFTER having clicked shift the first time
M +9 -6 AlphaNumKey.cpp
M +1 -0 AlphaNumKey.h
--- trunk/playground/base/plasma/applets/plasmaboard/AlphaNumKey.cpp #949763:949764
@@ -36,22 +36,25 @@
void AlphaNumKey::setKeycode(unsigned int keycodeP) {
keycode = keycodeP;
- setText(*new QChar(Helpers::keycodeToKeysym(keycode,0)));
+ setLabel(0);
}
+void AlphaNumKey::setLabel(int level){
+ setText(*new QChar(Helpers::mapToUnicode(Helpers::keycodeToKeysym(getKeycode(),level))));
+}
+
void AlphaNumKey::switchKey(bool isLevel2, bool isAlternative, bool isLocked){
if(isLocked){
isLevel2 = !isLevel2;
}
if(isLevel2){
- isAlternative ?
- setText(*new QChar(Helpers::mapToUnicode(Helpers::keycodeToKeysym(getKeycode(),4)))) :
- setText(*new QChar(Helpers::mapToUnicode(Helpers::keycodeToKeysym(getKeycode(),1))));
+ isAlternative ? setLabel(4) : setLabel(1);
}
else{
- isAlternative ?
+ setLabel(0);
+ /*isAlternative ?
setText(*new QChar(Helpers::mapToUnicode(Helpers::keycodeToKeysym(getKeycode(),0)))) :
- setText(*new QChar(Helpers::mapToUnicode(Helpers::keycodeToKeysym(getKeycode(),0))));
+ setText(*new QChar(Helpers::mapToUnicode(Helpers::keycodeToKeysym(getKeycode(),0))));*/
}
}
--- trunk/playground/base/plasma/applets/plasmaboard/AlphaNumKey.h #949763:949764
@@ -33,6 +33,7 @@
void switchKey(bool isLevel2, bool isAlternative, bool isLocked);
void setKeycode(unsigned int keysym);
+ void setLabel(int level);
public Q_SLOTS:
virtual void sendKeycodePress();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic