You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mathemagics/mathemagics/keypad.h

53 lines
740 B

#ifndef KEYPAD_H
#define KEYPAD_H
#include <qwidget.h>
#include <qpushbutton.h>
#include <qstring.h>
class QCloseEvent;
class CharButton : public QPushButton
{
Q_OBJECT
public:
CharButton(const QString &text, QWidget *parent=0, const char *name=0);
~CharButton() {}
signals:
void clicked(const QString &);
private slots:
void emitClicked();
private:
QString m_text;
};
class MathKeypad : public QWidget
{
Q_OBJECT
public:
MathKeypad(QWidget *parent=0, const char *name=0);
~MathKeypad() {}
signals:
void closing();
void insertChar(const QString &);
void add();
void subtract();
void multiply();
void divide();
void enter();
void backspace();
void eex();
protected:
void closeEvent(QCloseEvent *);
};
#endif