Diffstat (limited to 'noncore/tools/euroconv/calckeypad.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/tools/euroconv/calckeypad.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/noncore/tools/euroconv/calckeypad.h b/noncore/tools/euroconv/calckeypad.h new file mode 100644 index 0000000..42e7eb3 --- a/dev/null +++ b/noncore/tools/euroconv/calckeypad.h @@ -0,0 +1,78 @@ +/**************************************************************************** + * + * File: calckeypad.h + * + * Description: Header file for the class KeyPad + * + * + * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> + * + * Requirements: Qt + * + * $Id$ + * + * + ***************************************************************************/ +#ifndef CALCKEYPAD_H +#define CALCKEYPAD_H + +#include <qpushbutton.h> +#include <qgrid.h> +#include <qbuttongroup.h> + +#include "calcdisplay.h" + +class KeyPad : public QGrid { + +Q_OBJECT +public: + KeyPad(LCDDisplay *LCD, QWidget *parent=0, const char *name=0 ); + +public slots: + void enterDigits(int); + void operatorPressed(int); + void clearLCD(void); + void aboutDialog(void); + void gotoDec(void); + +private: + LCDDisplay *display; + double dCurrent; + int iLenCurrent; + bool bIsDec; + double dDecCurrent; + int iPreviousOperator; + double dPreviousValue; + + QPushButton *btn0; + QPushButton *btn1; + QPushButton *btn2; + QPushButton *btn3; + QPushButton *btn4; + QPushButton *btn5; + QPushButton *btn6; + QPushButton *btn7; + QPushButton *btn8; + QPushButton *btn9; + QButtonGroup *grpbtnDigits; + + QPushButton *btnDot; + + QPushButton *btnClear; + + QPushButton *btnPlus; + QPushButton *btnMinus; + QPushButton *btnMultiply; + QPushButton *btnDivide; + QPushButton *btnEqual; + QPushButton *btnPercent; + QPushButton *btnF1; + QPushButton *btnAbout; + + QButtonGroup *grpbtnOperators; + + + +}; + +#endif // CALCKEYPAD_H |