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 | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.h b/noncore/apps/opie-console/function_keyboard.h index 05b991d..496d932 100644 --- a/noncore/apps/opie-console/function_keyboard.h +++ b/noncore/apps/opie-console/function_keyboard.h | |||
@@ -3,4 +3,5 @@ | |||
3 | 3 | ||
4 | #include <qpe/config.h> | 4 | #include <qpe/config.h> |
5 | #include <qpe/qpeapplication.h> | ||
5 | #include <qframe.h> | 6 | #include <qframe.h> |
6 | #include <qpainter.h> | 7 | #include <qpainter.h> |
@@ -13,19 +14,20 @@ | |||
13 | 14 | ||
14 | 15 | ||
15 | class FKey { | 16 | struct FKey { |
16 | |||
17 | public: | ||
18 | 17 | ||
19 | FKey(): qcode(0), unicode(0) {}; | 18 | FKey(): qcode(0), unicode(0) {}; |
20 | FKey(const QString &l, ushort q, ushort u): label(l), qcode(q), unicode(u) {}; | 19 | FKey(const QString &l, const QString &f, ushort q, ushort u): |
20 | label(l), pixFile(f), qcode(q), unicode(u) { | ||
21 | 21 | ||
22 | QString getL() { return label; } | 22 | if (!f.isEmpty()) { |
23 | ushort getQ() { return qcode; } | ||
24 | ushort getU() { return unicode; } | ||
25 | 23 | ||
24 | pix = new QPixmap (QPEApplication::qpeDir() + "pics/console/keys/" + f); | ||
26 | 25 | ||
27 | private: | 26 | } |
27 | }; | ||
28 | 28 | ||
29 | QString label; | 29 | QString label; |
30 | QPixmap *pix; | ||
31 | QString pixFile; | ||
30 | ushort qcode; | 32 | ushort qcode; |
31 | ushort unicode; | 33 | ushort unicode; |
@@ -39,9 +41,13 @@ public: | |||
39 | ~FunctionKeyboard(); | 41 | ~FunctionKeyboard(); |
40 | 42 | ||
43 | friend class FunctionKeyboardConfig; | ||
44 | |||
41 | void changeRows(int); | 45 | void changeRows(int); |
42 | void changeCols(int); | 46 | void changeCols(int); |
43 | 47 | ||
48 | //Key getKey(int, int); | ||
49 | |||
44 | void paintEvent(QPaintEvent *); | 50 | void paintEvent(QPaintEvent *); |
45 | void paintKey(int, int); | 51 | void paintKey(uint, uint); |
46 | void mousePressEvent(QMouseEvent*); | 52 | void mousePressEvent(QMouseEvent*); |
47 | void mouseReleaseEvent(QMouseEvent*); | 53 | void mouseReleaseEvent(QMouseEvent*); |
@@ -51,5 +57,5 @@ public: | |||
51 | signals: | 57 | signals: |
52 | 58 | ||
53 | void keyPressed(ushort, ushort, bool, bool, bool, ushort, ushort); | 59 | void keyPressed(FKey, ushort, ushort, bool); |
54 | 60 | ||
55 | private: | 61 | private: |
@@ -88,14 +94,17 @@ public: | |||
88 | private slots: | 94 | private slots: |
89 | 95 | ||
90 | void slotKeyPressed(ushort, ushort, bool, bool, bool, ushort, ushort); | 96 | void slotKeyPressed(FKey, ushort, ushort, bool); |
91 | void slotChangeRows(int); | 97 | void slotChangeRows(int); |
92 | void slotChangeCols(int); | 98 | void slotChangeCols(int); |
93 | void slotChangeIcon(int); | 99 | void slotChangeIcon(int); |
100 | void slotChangeLabelText(const QString &); | ||
94 | 101 | ||
95 | private: | 102 | private: |
96 | 103 | ||
104 | ushort selectedRow, selectedCol; | ||
105 | |||
97 | FunctionKeyboard *kb; | 106 | FunctionKeyboard *kb; |
98 | QSpinBox *m_rowBox, *m_colBox; | 107 | QSpinBox *m_rowBox, *m_colBox; |
99 | QComboBox *m_labels; | 108 | QComboBox *m_labels, *m_qvalues; |
100 | 109 | ||
101 | }; | 110 | }; |