summaryrefslogtreecommitdiffstats
path: root/src/VButton.h
blob: 1c828772b09d4f8532539603f8c0bcc8a0c66c5c (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef VBUTTON_H
#define VBUTTON_H

#include <qpushbutton.h>
#include <qevent.h>

class VButton : public QPushButton
{
Q_OBJECT
public:
	VButton(QWidget *parent=0, const char *name=0);
	~VButton();
	void setKeyCode(unsigned int keycode);
	unsigned int getKeyCode();
	void setText(const QString& text);
	void setShiftText(const QString& text);
	void capsPressed(bool press);
	
	
	void reposition(int width, int height);
	void res();
	static double pw;
	static double ph;

private:
	bool press;
	bool inrpt;

protected:
	unsigned int keycode;
	QString u;
	QString l;
	QRect orig_size;
    void timerEvent ( QTimerEvent * );

public slots:
	void sendKey();
	void shiftPressed(bool press);

protected slots:
	void mousePressEvent(QMouseEvent *e);
	void mouseReleaseEvent(QMouseEvent *e);

signals:
	void keyClick(unsigned int keycode);

};

#endif