blob: 2fd964b45f1f94b79dfde7962e911d3ea60f3424 [file] [log] [blame]
swissChili4b3105a2022-02-22 16:34:39 -08001#include "Cell.h"
2
3Cell::Cell(QObject *parent) : QObject(parent)
4{
5
6}
7
8Cell::Cell(const Cell &copy, QObject *parent)
9 : Cell(parent)
10{
11 *this = copy;
12}
13
14Cell::Cell(QString code, QString result, QObject *parent)
15 : Cell(parent)
16{
17 setCode(code);
18 setResult(result);
19}
20
21Cell &Cell::operator =(const Cell &copy)
22{
23 setCode(copy.code());
24 setResult(copy.result());
25
26 return *this;
27}
28
29QString Cell::code() const
30{
31 return _code;
32}
33
34QString Cell::result() const
35{
36 return _result;
37}
38
39void Cell::setCode(QString code)
40{
41 _code = code;
42 emit codeChanged(code);
43}
44
45void Cell::setResult(QString result)
46{
47 _result = result;
48 emit resultChanged(result);
49}