Newer
Older
Import / projects / LGN-IP3870 / qtpyui / server / calculator.h
@John Ryland John Ryland on 22 Dec 2020 387 bytes import NUC files
#ifndef __CALC_H__
#define __CALC_H__


#include <QLabel>
#include <QWidget>


class Button;


class Calculator : public QWidget
{
    Q_OBJECT
public:
    Calculator(QWidget *parent);
    ~Calculator();
    void keyPressEvent(QKeyEvent *ke);
    void keyReleaseEvent(QKeyEvent *ke);
private:
    int indexForKey(int key);
    Button *button[7];
    QLabel *input, *output;
};


#endif