-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtctrl.h
More file actions
34 lines (32 loc) · 765 Bytes
/
tctrl.h
File metadata and controls
34 lines (32 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef TCTRL_H
#define TCTRL_H
#include "aeditor.h"
#include "tanumber.h"
#include "memory.h"
#include "proc.h"
enum TCtrlState {cStart = 0, cEditing, FunDone, cValDone, cExpDone, cOpDone, cOpChange, cError};
enum Type {Frac = 0, Complex, PNumber};
template <class t>
class TCtrl
{
private:
TCtrlState ctrlState;
public:
Type type;
TCtrl();
TCtrl(int bas);
AEditor* editor;
TANumber* number;
Memory memory;
Proc proc;
void runMem(int command);
void runCalc(int command);
void runCommandEditor(int command);
void runOperation();
void runFunc();
void StrToNum(Type type);
QString NumToStr(Type type, TANumber& other);
int getCtrlState();
void setCtrlState(TCtrlState State);
};
#endif // TCTRL_H