blob: f1ca037255f8b9fcb2f2fecdab55b2e1846fd78a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
|