summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/function_keyboard.h
Unidiff
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.h9
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
9class FKey { 9class FKey {
10 10
11public: 11public:
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
20private: 21private:
21 22
22 QString label; 23 QString label;
23 ushort qcode; 24 ushort qcode;
24 ushort unicode; 25 ushort unicode;
25}; 26};
26 27
27class FunctionKeyboard : public QFrame { 28class FunctionKeyboard : public QFrame {
28 Q_OBJECT 29 Q_OBJECT
29 30
30public: 31public:
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
44signals: 42signals:
45 43
46 void keyPressed(ushort, ushort, bool, bool, bool); 44 void keyPressed(ushort, ushort, bool, bool, bool);
47 45
48private: 46private:
49 47
48 void loadDefaults();
49
50
51private:
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