mirea-projects/Third term/Industrial programming technologies/1_Calculator/calculator.h

43 lines
725 B
C
Raw Normal View History

2024-09-23 23:22:33 +00:00
#ifndef CALCULATOR_H
#define CALCULATOR_H
#include <QMainWindow>
QT_BEGIN_NAMESPACE
2024-09-27 05:31:03 +00:00
namespace Ui
{
class Calculator;
2024-09-23 23:22:33 +00:00
}
QT_END_NAMESPACE
class Calculator : public QMainWindow
{
Q_OBJECT
public:
Calculator(QWidget *parent = nullptr);
~Calculator();
private slots:
void digitClicked();
void dotClicked();
void addClicked();
void subtractClicked();
void multiplyClicked();
void divideClicked();
void equalsClicked();
void clearClicked();
void changeSignClicked();
void powClicked();
void printDisplay();
private:
2024-09-27 05:31:03 +00:00
Ui::Calculator *ui;
2024-09-23 23:22:33 +00:00
double currentValue;
double storedValue;
int doubleDepth;
QString pendingOperator;
};
2024-09-27 05:31:03 +00:00
2024-09-23 23:22:33 +00:00
#endif // CALCULATOR_H