-
Notifications
You must be signed in to change notification settings - Fork 81
/
DrawerTh_VoiceScanner.cpp
135 lines (125 loc) · 2.28 KB
/
DrawerTh_VoiceScanner.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#include "DrawerTh_VoiceScanner.h"
#include "externData.h"
void DrawerTh_VoiceScanner::doEmitAddLine()
{
emit vsTh->sAddLine();
};
void DrawerTh_VoiceScanner::doEmitDrawGrid(int factor)
{
emit vsTh->sDrawGrid(factor);
};
void DrawerTh_VoiceScanner::doEmitDrawTextPlacers()
{
emit vsTh->sDrawTextPlacers();
}
void makeVoiceLine(int Al, int An, int Bd, int Sp, int Lo, int var, int Ovl, int WF, int SSH)
{
if(vAlivLst.size() < 140)
{
if(Al > 0) vAlivLst.push_back((Al + 1)*10);
}
else
{
vAlivLst.pop_front();
if(Al > 0) vAlivLst.push_back((Al + 1)*10);
};
if(vAnomLst.size() < 140)
{
if(An > 0) vAnomLst.push_back((An + 1)*10);
}
else
{
vAnomLst.pop_front();
if(An > 0) vAnomLst.push_back((An + 1)*10);
};
if(vWFLst.size() < 140)
{
if(Bd > 0) vWFLst.push_back((Bd + 1)*10);
}
else
{
vWFLst.pop_front();
if(Bd > 0) vWFLst.push_back((Bd + 1)*10);
};
if(vSuspLst.size() < 140)
{
if(Sp > 0) vSuspLst.push_back((Sp + 1)*10);
}
else
{
vSuspLst.pop_front();
if(Sp > 0) vSuspLst.push_back((Sp + 1)*10);
};
if(vLowlLst.size() < 140)
{
if(Lo > 0) vLowlLst.push_back((Lo + 1)*10);
}
else
{
vLowlLst.pop_front();
if(Lo > 0) vLowlLst.push_back((Lo + 1)*10);
};
if(vLowlLst.size() < 140)
{
if(var > 0) vBALst.push_back((var + 1)*10);
}
else
{
vBALst.pop_front();
if(var > 0) vBALst.push_back((var + 1)*10);
};
if(vOvrlLst.size() < 140)
{
if(Ovl > 0) vOvrlLst.push_back((Ovl + 1)*10);
}
else
{
vOvrlLst.pop_front();
if(Ovl > 0) vOvrlLst.push_back((Ovl + 1)*10);
};
if(vSSHLst.size() < 140)
{
if(SSH > 0) vSSHLst.push_back((SSH + 1)*10);
}
else
{
vSSHLst.pop_front();
if(SSH > 0) vSSHLst.push_back((SSH + 1)*10);
};
};
void DrawerTh_VoiceScanner::run()
{
vsTh->doEmitDrawGrid(150);
vsTh->doEmitDrawTextPlacers();
while(VoiceScanFlag)
{
if(widgetIsHidden == false && tray->isVisible() == false)
{
makeVoiceLine(Alive, camerasC1, 0, other, 0, baCount, Overl, 0, ssh);
Alive = 0;
camerasC1 = 0;
//WF = 0;
filtered = 0;
//Lowl = 0;
baCount = 0;
Overl = 0;
other = 0;
ssh = 0;
vsTh->doEmitAddLine();
msleep(150);
}
else
{
msleep(500);
Alive = 0;
camerasC1 = 0;
//WF = 0;
filtered = 0;
//Lowl = 0;
baCount = 0;
Overl = 0;
other = 0;
ssh = 0;
};
};
};