- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.cpp
More file actions
Latest commit
58 lines (48 loc) · 1.43 KB
/
Copy pathutils.cpp
File metadata and controls
58 lines (48 loc) · 1.43 KB
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
#include"utils.h"
QString stringProcessState(ProccesThreadState pts) {
switch(pts) {
caseWAITING: return"Waiting";
caseFINISH: return"Finish";
caseWORKING: return"Working";
caseSTARTING: return"Starting";
}
return"";
}
QString crtiterionsToString(Criterions crt) {
switch(crt) {
caseGOAL_FIRTS_TIME: return"Goals in 1st time";
caseGOAL_SECOND_TIME: return"Goals in 2ed time";
caseGOAL_IN_3_TIMES: return"Goal in all times";
}
return"";
}
intcriterionsToTime(Criterions crt) {
switch (crt) {
caseGOAL_FIRTS_TIME: return1;
caseGOAL_SECOND_TIME: return2;
caseGOAL_IN_3_TIMES: return999;
}
return -1;
}
ConfigFileParametrs StringToCFP(QString param) {
if (param == "Xlsx_path")
return ConfigFileParametrs::Xlsx_path;
elseif (param == "DB_path")
return ConfigFileParametrs::DB_path;
}
MatchPeriod criterionToMatchPeriod(Criterions crt) {
MatchPeriod p;
switch(crt) {
caseGOAL_FIRTS_TIME: p = FIRST_TIME; break;
caseGOAL_SECOND_TIME: p = SECOND_TIME; break;
caseGOAL_IN_3_TIMES: p = WHOLE_MATCH; break;
}
return p;
}
Criterions intToCrt(int i) {
switch (i) {
case1: returnGOAL_FIRTS_TIME;
case2: returnGOAL_SECOND_TIME;
case3: returnGOAL_IN_3_TIMES;
}
}