Diffstat (limited to 'noncore/apps/opie-console/function_keyboard.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/function_keyboard.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.h b/noncore/apps/opie-console/function_keyboard.h index f1ca037..bc3e25c 100644 --- a/noncore/apps/opie-console/function_keyboard.h +++ b/noncore/apps/opie-console/function_keyboard.h | |||
@@ -1,8 +1,28 @@ | |||
1 | #ifndef OPIE_FUNCTION_KEYBOARD_H | 1 | #ifndef OPIE_FUNCTION_KEYBOARD_H |
2 | #define OPIE_FUNCTION_KEYBOARD_H | 2 | #define OPIE_FUNCTION_KEYBOARD_H |
3 | 3 | ||
4 | #include <qpe/config.h> | ||
4 | #include <qframe.h> | 5 | #include <qframe.h> |
5 | #include <qpainter.h> | 6 | #include <qpainter.h> |
7 | #include <qmap.h> | ||
8 | |||
9 | class FKey { | ||
10 | |||
11 | public: | ||
12 | |||
13 | FKey(): qcode(0), unicode(0) {}; | ||
14 | FKey(const QString &l, ushort q, ushort u): label(l), qcode(q), unicode(u) {}; | ||
15 | |||
16 | QString getL() { return label; } | ||
17 | ushort getQ() { return qcode; } | ||
18 | ushort getU() { return unicode; } | ||
19 | |||
20 | private: | ||
21 | |||
22 | QString label; | ||
23 | ushort qcode; | ||
24 | ushort unicode; | ||
25 | }; | ||
6 | 26 | ||
7 | class FunctionKeyboard : public QFrame { | 27 | class FunctionKeyboard : public QFrame { |
8 | Q_OBJECT | 28 | Q_OBJECT |
@@ -17,10 +37,15 @@ public: | |||
17 | void mouseReleaseEvent(QMouseEvent*); | 37 | void mouseReleaseEvent(QMouseEvent*); |
18 | void resizeEvent(QResizeEvent*); | 38 | void resizeEvent(QResizeEvent*); |
19 | 39 | ||
40 | |||
20 | 41 | ||
21 | QSize sizeHint() const; | 42 | QSize sizeHint() const; |
22 | 43 | ||
23 | private: | 44 | private: |
45 | |||
46 | // thie key for the map is the row/col | ||
47 | QMap<QString, FKey> keys; | ||
48 | |||
24 | uint numRows; | 49 | uint numRows; |
25 | uint numCols; | 50 | uint numCols; |
26 | uint keyHeight; | 51 | uint keyHeight; |