summaryrefslogtreecommitdiffstats
path: root/mathemagics/keypad.h
blob: 311d6d5add4efe0df07d8fd08cdab7e190d9f0ea (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
50
51
52
#ifndef KEYPAD_H
#define KEYPAD_H

#include <tqwidget.h>
#include <tqpushbutton.h>
#include <tqstring.h>

class TQCloseEvent;

class CharButton : public TQPushButton
{
	TQ_OBJECT

public:
	CharButton(const TQString &text, TQWidget *parent=0, const char *name=0);
	~CharButton() {}

signals:
	void clicked(const TQString &);

private slots:
	void emitClicked();

private:
	TQString m_text;
};

class MathKeypad : public TQWidget 
{
	TQ_OBJECT

public:
	MathKeypad(TQWidget *parent=0, const char *name=0);
	~MathKeypad() {}

signals:
	void closing();
	void insertChar(const TQString &);

	void add();
	void subtract();
	void multiply();
	void divide();
	void enter();
	void backspace();
	void eex();

protected:
	void closeEvent(TQCloseEvent *);
};

#endif