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 @@ +#ifndef OPIE_FUNCTION_KEYBOARD_H +#define OPIE_FUNCTION_KEYBOARD_H + +#include <qframe.h> +#include <qpainter.h> + +class FunctionKeyboard : public QFrame { + Q_OBJECT + +public: + FunctionKeyboard(QWidget *parent = 0); + ~FunctionKeyboard(); + + void paintEvent(QPaintEvent *); + void paintKey(int, int); + void mousePressEvent(QMouseEvent*); + void mouseReleaseEvent(QMouseEvent*); + void resizeEvent(QResizeEvent*); + + + QSize sizeHint() const; + +private: + uint numRows; + uint numCols; + uint keyHeight; + double keyWidth; // decimal point matters! + + int pressedRow, pressedCol; + +}; + +#endif |