summaryrefslogtreecommitdiff
path: root/inputmethods
Unidiff
Diffstat (limited to 'inputmethods') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/keyboard.cpp10
-rw-r--r--inputmethods/multikey/keyboard.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp
index b71f929..671868c 100644
--- a/inputmethods/multikey/keyboard.cpp
+++ b/inputmethods/multikey/keyboard.cpp
@@ -1012,16 +1012,26 @@ void Keys::setKey(const int row, const int qcode, const ushort unicode,
1012 *(key->pressed) = 0; 1012 *(key->pressed) = 0;
1013 } 1013 }
1014 1014
1015 key->pix = pix; 1015 key->pix = pix;
1016 1016
1017 1017
1018 keys[row].append(key); 1018 keys[row].append(key);
1019} 1019}
1020
1021// Keys::~Keys {{{2
1022Keys::~Keys() {
1023
1024 for (int i = 1; i <= 5; i++)
1025 for (unsigned int j = 0; j < keys[i].count(); j++)
1026 delete keys[i].at(j);
1027
1028}
1029
1020// Keys:: other functions {{{2 1030// Keys:: other functions {{{2
1021int Keys::width(const int row, const int col) { 1031int Keys::width(const int row, const int col) {
1022 1032
1023 return keys[row].at(col)->width; 1033 return keys[row].at(col)->width;
1024 1034
1025} 1035}
1026ushort Keys::uni(const int row, const int col) { 1036ushort Keys::uni(const int row, const int col) {
1027 1037
diff --git a/inputmethods/multikey/keyboard.h b/inputmethods/multikey/keyboard.h
index 8ca50ea..400edc0 100644
--- a/inputmethods/multikey/keyboard.h
+++ b/inputmethods/multikey/keyboard.h
@@ -50,16 +50,17 @@ public:
50}; 50};
51 51
52 52
53class Keys { 53class Keys {
54public: 54public:
55 55
56 Keys(); 56 Keys();
57 Keys(const char * filename); 57 Keys(const char * filename);
58 ~Keys();
58 ushort uni(const int row, const int col); 59 ushort uni(const int row, const int col);
59 int qcode(const int row, const int col); 60 int qcode(const int row, const int col);
60 int width(const int row, const int col); 61 int width(const int row, const int col);
61 bool pressed(const int row, const int col); 62 bool pressed(const int row, const int col);
62 bool *pressedPtr(const int row, const int col); 63 bool *pressedPtr(const int row, const int col);
63 ushort shift(const ushort); 64 ushort shift(const ushort);
64 QPixmap *pix(const int row, const int col); 65 QPixmap *pix(const int row, const int col);
65 int numKeys(const int row); 66 int numKeys(const int row);