-
Notifications
You must be signed in to change notification settings - Fork 2
/
kassomatcontroller.cpp
55 lines (44 loc) · 1.28 KB
/
kassomatcontroller.cpp
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include "kassomatcontroller.h"
#include "QsLog/QsLog.h"
#include <QDebug>
KassomatController::KassomatController(QObject *parent) :
QObject(parent), m_smartPayout(new SmartPayout(this))
{
QObject::connect(m_smartPayout.data(), &SmartPayout::deviceChanged, this, &KassomatController::smartPayoutDeviceChanged);
m_state="STANDARD_SCREEN";
m_credit=0;
}
const QString &KassomatController::smartPayoutDevice() const {
return m_smartPayout->device();
}
unsigned int KassomatController::credit() const{
return m_credit;
}
unsigned int KassomatController::debt() const{
return m_debt;
}
const QString& KassomatController::state() const{
return m_state;
}
void KassomatController::setSmartPayoutDevice(const QString &dev) {
m_smartPayout->setDevice(dev);
}
void KassomatController::setCredit(unsigned int credit){
m_credit = credit;
emit creditChanged(credit);
QLOG_INFO() << "uuuh the credits, they has a change";
}
void KassomatController::setDebt(unsigned int debt){
m_debt = debt;
emit debtChanged(debt);
}
void KassomatController::setState(const QString &state){
m_state = state;
emit stateChanged(state);
}
void KassomatController::test() {
m_smartPayout->test();
}
void KassomatController::poll() {
m_smartPayout->poll();
}