summaryrefslogtreecommitdiff
path: root/inputmethods/multikey/keyboard.h
Unidiff
Diffstat (limited to 'inputmethods/multikey/keyboard.h') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/multikey/keyboard.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/inputmethods/multikey/keyboard.h b/inputmethods/multikey/keyboard.h
index 1aa7a35..8af80d0 100644
--- a/inputmethods/multikey/keyboard.h
+++ b/inputmethods/multikey/keyboard.h
@@ -53,19 +53,22 @@ public:
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 ~Keys();
59 int width(const int row, const int col);
60 int rows();
59 ushort uni(const int row, const int col); 61 ushort uni(const int row, const int col);
60 int qcode(const int row, const int col); 62 int qcode(const int row, const int col);
61 int width(const int row, const int col);
62 bool pressed(const int row, const int col); 63 bool pressed(const int row, const int col);
63 bool *pressedPtr(const int row, const int col); 64 bool *pressedPtr(const int row, const int col);
64 ushort shift(const ushort); 65 ushort shift(const ushort);
65 ushort meta(const ushort); 66 ushort meta(const ushort);
67 ushort circumflex(const ushort);
68 ushort diaeresis(const ushort);
66 QImage *pix(const int row, const int col); 69 QImage *pix(const int row, const int col);
67 int numKeys(const int row); 70 int numKeys(const int row);
68 void setKeysFromFile(const char *filename); 71 void setKeysFromFile(const char *filename);
69 void setKey(const int row, const int qcode, const ushort unicode, 72 void setKey(const int row, const int qcode, const ushort unicode,
70 const int width, QImage *pix); 73 const int width, QImage *pix);
71 void setPressed(const int row, const int col, const bool pressed); 74 void setPressed(const int row, const int col, const bool pressed);
@@ -84,12 +87,14 @@ private:
84 QImage *pix; 87 QImage *pix;
85 }; 88 };
86 89
87 QList<Key> keys[6]; 90 QList<Key> keys[6];
88 QMap<ushort,ushort> shiftMap; 91 QMap<ushort,ushort> shiftMap;
89 QMap<ushort,ushort> metaMap; 92 QMap<ushort,ushort> metaMap;
93 QMap<ushort,ushort> circumflexMap;
94 QMap<ushort,ushort> diaeresisMap;
90 95
91}; 96};
92 97
93class Keyboard : public QFrame 98class Keyboard : public QFrame
94{ 99{
95 Q_OBJECT 100 Q_OBJECT
@@ -114,12 +119,13 @@ signals:
114private slots: 119private slots:
115 void repeat(); 120 void repeat();
116 void togglePickboard(bool on_off); 121 void togglePickboard(bool on_off);
117 void toggleRepeat(bool on_off); 122 void toggleRepeat(bool on_off);
118 void setMapToDefault(); 123 void setMapToDefault();
119 void setMapToFile(QString map); 124 void setMapToFile(QString map);
125 void cleanupConfigDlg();
120 126
121 // used to redraw keyboard after edited colors 127 // used to redraw keyboard after edited colors
122 void reloadKeyboard(); 128 void reloadKeyboard();
123 129
124private: 130private:
125 int getKey( int &w, int j = -1 ); 131 int getKey( int &w, int j = -1 );
@@ -127,12 +133,15 @@ private:
127 133
128 bool *shift; 134 bool *shift;
129 bool *lock; 135 bool *lock;
130 bool *ctrl; 136 bool *ctrl;
131 bool *alt; 137 bool *alt;
132 bool *meta; 138 bool *meta;
139 bool *circumflex;
140 bool *diaeresis;
141
133 uint useLargeKeys:1; 142 uint useLargeKeys:1;
134 uint usePicks:1; 143 uint usePicks:1;
135 uint useRepeat:1; 144 uint useRepeat:1;
136 145
137 int pressedKeyRow; 146 int pressedKeyRow;
138 int pressedKeyCol; 147 int pressedKeyCol;