-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCodeMap.cpp
More file actions
82 lines (72 loc) · 1.6 KB
/
CodeMap.cpp
File metadata and controls
82 lines (72 loc) · 1.6 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include "CodeMap.h"
CodeMap::CodeMap() {}
QString CodeMap::getMapModel(int key)
{
if (mapModel.contains(key)) {
return mapModel[key];
} else {
return "";
}
}
QString CodeMap::getPixelFormat(int key)
{
if (mapPixelFormat.contains(key)) {
return mapPixelFormat[key];
} else {
return "";
}
}
QString CodeMap::getTrgMode(int key)
{
if (getMapTrgMode().contains(key)) {
return getMapTrgMode()[key];
} else {
return "";
}
}
QString CodeMap::getTrgSrc(int key)
{
if (getMapTrgSrc().contains(key)) {
return getMapTrgSrc()[key];
} else {
return "";
}
}
int CodeMap::getDataType(QString key)
{
if (mapDataType.contains(key)) {
return mapDataType[key];
} else {
return -1;
}
}
int CodeMap::getRdWt(QString key)
{
if (mapRdWt.contains(key)) {
return mapRdWt[key];
} else {
return -1;
}
}
int CodeMap::getUpdateTiming(QString key)
{
if (mapUpdateTiming.contains(key)) {
return mapUpdateTiming[key];
} else {
return -1;
}
}
// 实现静态方法
const QMap<int, QString> &CodeMap::getMapTrgMode()
{
static QMap<int, QString> map = {{Stream, tr("流模式")},
{Normal, tr("普通触发")},
{Rolling, tr("滚动快门多帧触发")},
{Pulse, tr("电平触发")}};
return map;
}
const QMap<int, QString> &CodeMap::getMapTrgSrc()
{
static QMap<int, QString> map = {{0, tr("软触发")}, {1, tr("硬触发")}};
return map;
}