author | hash <hash> | 2002-10-11 19:46:50 (UTC) |
---|---|---|
committer | hash <hash> | 2002-10-11 19:46:50 (UTC) |
commit | cef14e20ffcf1aa5dc62f0f3d6774efcbffcd6b7 (patch) (unidiff) | |
tree | 539bb692e4a5c2be489ac1c70645ae3b36631ed7 /noncore/apps/opie-console/function_keyboard.h | |
parent | 4826955529ea98afbad60f18ae81aebc59cbfdcd (diff) | |
download | opie-cef14e20ffcf1aa5dc62f0f3d6774efcbffcd6b7.zip opie-cef14e20ffcf1aa5dc62f0f3d6774efcbffcd6b7.tar.gz opie-cef14e20ffcf1aa5dc62f0f3d6774efcbffcd6b7.tar.bz2 |
initial upload for the keyboard widget
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, 33 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.h b/noncore/apps/opie-console/function_keyboard.h new file mode 100644 index 0000000..f1ca037 --- a/dev/null +++ b/noncore/apps/opie-console/function_keyboard.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef OPIE_FUNCTION_KEYBOARD_H | ||
2 | #define OPIE_FUNCTION_KEYBOARD_H | ||
3 | |||
4 | #include <qframe.h> | ||
5 | #include <qpainter.h> | ||
6 | |||
7 | class FunctionKeyboard : public QFrame { | ||
8 | Q_OBJECT | ||
9 | |||
10 | public: | ||
11 | FunctionKeyboard(QWidget *parent = 0); | ||
12 | ~FunctionKeyboard(); | ||
13 | |||
14 | void paintEvent(QPaintEvent *); | ||
15 | void paintKey(int, int); | ||
16 | void mousePressEvent(QMouseEvent*); | ||
17 | void mouseReleaseEvent(QMouseEvent*); | ||
18 | void resizeEvent(QResizeEvent*); | ||
19 | |||
20 | |||
21 | QSize sizeHint() const; | ||
22 | |||
23 | private: | ||
24 | uint numRows; | ||
25 | uint numCols; | ||
26 | uint keyHeight; | ||
27 | double keyWidth; // decimal point matters! | ||
28 | |||
29 | int pressedRow, pressedCol; | ||
30 | |||
31 | }; | ||
32 | |||
33 | #endif | ||