Diffstat (limited to 'noncore/apps/opie-console/function_keyboard.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/function_keyboard.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.h b/noncore/apps/opie-console/function_keyboard.h index b8420ae..8d05e2b 100644 --- a/noncore/apps/opie-console/function_keyboard.h +++ b/noncore/apps/opie-console/function_keyboard.h | |||
@@ -8,54 +8,57 @@ | |||
8 | 8 | ||
9 | class FKey { | 9 | class FKey { |
10 | 10 | ||
11 | public: | 11 | public: |
12 | 12 | ||
13 | FKey(): qcode(0), unicode(0) {}; | 13 | FKey(): qcode(0), unicode(0) {}; |
14 | FKey(const QString &l, ushort q, ushort u): label(l), qcode(q), unicode(u) {}; | 14 | FKey(const QString &l, ushort q, ushort u): label(l), qcode(q), unicode(u) {}; |
15 | 15 | ||
16 | QString getL() { return label; } | 16 | QString getL() { return label; } |
17 | ushort getQ() { return qcode; } | 17 | ushort getQ() { return qcode; } |
18 | ushort getU() { return unicode; } | 18 | ushort getU() { return unicode; } |
19 | 19 | ||
20 | |||
20 | private: | 21 | private: |
21 | 22 | ||
22 | QString label; | 23 | QString label; |
23 | ushort qcode; | 24 | ushort qcode; |
24 | ushort unicode; | 25 | ushort unicode; |
25 | }; | 26 | }; |
26 | 27 | ||
27 | class FunctionKeyboard : public QFrame { | 28 | class FunctionKeyboard : public QFrame { |
28 | Q_OBJECT | 29 | Q_OBJECT |
29 | 30 | ||
30 | public: | 31 | public: |
31 | FunctionKeyboard(QWidget *parent = 0); | 32 | FunctionKeyboard(QWidget *parent = 0); |
32 | ~FunctionKeyboard(); | 33 | ~FunctionKeyboard(); |
33 | 34 | ||
34 | void paintEvent(QPaintEvent *); | 35 | void paintEvent(QPaintEvent *); |
35 | void paintKey(int, int); | 36 | void paintKey(int, int); |
36 | void mousePressEvent(QMouseEvent*); | 37 | void mousePressEvent(QMouseEvent*); |
37 | void mouseReleaseEvent(QMouseEvent*); | 38 | void mouseReleaseEvent(QMouseEvent*); |
38 | void resizeEvent(QResizeEvent*); | 39 | void resizeEvent(QResizeEvent*); |
39 | |||
40 | |||
41 | |||
42 | QSize sizeHint() const; | 40 | QSize sizeHint() const; |
43 | 41 | ||
44 | signals: | 42 | signals: |
45 | 43 | ||
46 | void keyPressed(ushort, ushort, bool, bool, bool); | 44 | void keyPressed(ushort, ushort, bool, bool, bool); |
47 | 45 | ||
48 | private: | 46 | private: |
49 | 47 | ||
48 | void loadDefaults(); | ||
49 | |||
50 | |||
51 | private: | ||
52 | |||
50 | // thie key for the map is the row/col | 53 | // thie key for the map is the row/col |
51 | QMap<QString, FKey> keys; | 54 | QMap<QString, FKey> keys; |
52 | 55 | ||
53 | uint numRows; | 56 | uint numRows; |
54 | uint numCols; | 57 | uint numCols; |
55 | uint keyHeight; | 58 | uint keyHeight; |
56 | double keyWidth; // decimal point matters! | 59 | double keyWidth; // decimal point matters! |
57 | 60 | ||
58 | int pressedRow, pressedCol; | 61 | int pressedRow, pressedCol; |
59 | 62 | ||
60 | QObject *parent; | 63 | QObject *parent; |
61 | 64 | ||