Commit c6b801d0 authored by Екатерина Спорова's avatar Екатерина Спорова
Browse files

Add new file

parent 66d13636
No related merge requests found
Pipeline #881 canceled with stages
Showing with 54 additions and 0 deletions
+54 -0
Calc.h 0 → 100644
#ifndef CALC_H
#define CALC_H
#include <QWidget>
#include <QStack>
class QLCDNumber;
class QPushButton;
class QGridLayout;
class QRadioButton;
class QHBoxLayout;
class Calculator : public QWidget
{
Q_OBJECT
public:
Calculator(QWidget *parent = nullptr);
~Calculator();
void calc();
private:
QLCDNumber* f_lcdNum;
QRadioButton* f_radioBtnCasual;
QRadioButton* f_radioBtnSci;
QStack<QString> f_operStack;
QString f_currentNum;
bool f_if_currNumChangable;
QGridLayout* f_BtnLayoutCasual;
QGridLayout* f_BtnLayoutSciExtr;
QWidget* f_BtnLayoutSciExtrWidget;
QWidget* f_BtnLayoutCasualExtrWidget;
QHBoxLayout* f_HBoxBtnLayout;
QGridLayout* MainLayout;
const double PI = 3.1415926535;
const QVector<QString> NumND = {"e", "pi"};
const QVector<QString> UnOp = {"rev", "sqr", "sqrt", "-x", "sin", "cos", "tan", "tanh", "sinh", "cosh", "ln", "exp", "n!", "cubic root", "cubic sqr"};
const QVector<QString> OpToCountimmediately = {"log", "ysqr", "ysqrt"};
const QVector<QString> SumOp = {"+", "-"};
QPushButton* createButton(const QString &p_str, size_t p_horz, size_t p_vert);
public slots:
void slotButtonClicked();
void slotHideSci(bool);
void slotShowSci(bool);
};
#endif // CALCULATOR_H
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment