summaryrefslogtreecommitdiffstats
path: root/mathemagics/keypad.h
diff options
context:
space:
mode:
Diffstat (limited to 'mathemagics/keypad.h')
-rw-r--r--mathemagics/keypad.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/mathemagics/keypad.h b/mathemagics/keypad.h
new file mode 100644
index 0000000..79d12ec
--- /dev/null
+++ b/mathemagics/keypad.h
@@ -0,0 +1,52 @@
+#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