776411ce5
고영탁
설정 기능 5월 개발 범위 UI...
|
7
8
9
10
11
12
13
14
15
|
ConfigInfoDlg::ConfigInfoDlg(QWidget *parent, ConfigType type) :
QDialog(parent),
ui(new Ui::ConfigInfoDlg)
{
Config* cfg = Config::getInstance();
ui->setupUi(this);
this->setWindowFlags( Qt::FramelessWindowHint);
this->setAttribute( Qt::WA_DeleteOnClose);
|
776411ce5
고영탁
설정 기능 5월 개발 범위 UI...
|
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
|
m_nType = type;
ui->ctrTitle->setText(cfg->getTitleString(type));
switch(type){
case config_hotline_chef:
loadHotlineChefInfo();
break;
case config_hotline_service:
loadHotlineServiceInfo();
break;
case config_software_info:
default:
loadSoftwareInfo();
break;
}
}
ConfigInfoDlg::~ConfigInfoDlg()
{
delete ui;
}
void ConfigInfoDlg::on_ctrBtnOk_clicked()
{
deleteLater();
}
void ConfigInfoDlg::loadSoftwareInfo(){
QString strTemp;
QMap<QString , QString> mapInfos;
QLabel* label;
mapInfos["모델명"] = "PRIME ST-01";
mapInfos["제조일자"] = "2017-06";
mapInfos["소프트웨어버전"] ="0.1 BETA";
for(int i =0;i<MAX_SOFTWARE_INFO_CNT;i++){
strTemp.sprintf("%s",software_item_name[i]);
qDebug() <<strTemp;
strTemp = strTemp.replace(" ","");
qDebug() << strTemp;
strTemp = mapInfos[strTemp];
label = new QLabel(this);
label ->setText(tr(software_item_name[i]).append(":"));
ui->gridLayout_info->addWidget(label,i,0);
label = new QLabel(this);
label->setText(strTemp);
ui->gridLayout_info->addWidget(label,i,1);
}
}
void ConfigInfoDlg::loadHotlineChefInfo(){
QString strTemp;
QMap<QString , QString> mapInfos;
QLabel* label;
mapInfos["연락처"] = "010-3004-6517";
mapInfos["이름"] = "김성우";
mapInfos["위치정보"] ="인천광역시 남동구 남동동로 34번길 56";
for(int i =0;i<MAX_HOTLINE_CHEF_CNT;i++){
strTemp.sprintf("%s",hotline_chef_item_name[i]);
qDebug() <<strTemp;
strTemp = strTemp.replace(" ","");
qDebug() << strTemp;
strTemp = mapInfos[strTemp];
label = new QLabel(this);
label ->setText(tr(hotline_chef_item_name[i]).append(":"));
ui->gridLayout_info->addWidget(label,i,0);
label = new QLabel(this);
label->setText(strTemp);
ui->gridLayout_info->addWidget(label,i,1);
}
}
void ConfigInfoDlg::loadHotlineServiceInfo(){
QString strTemp;
QMap<QString , QString> mapInfos;
QLabel* label;
mapInfos["연락처"] = "1644-9533";
mapInfos["위치정보"] ="인천광역시 남동구 남동동로 34번길 56";
for(int i =0;i<MAX_HOTLINE_SERVICE_CNT;i++){
strTemp.sprintf("%s",hotline_service_item_name[i]);
qDebug() <<strTemp;
strTemp = strTemp.replace(" ","");
qDebug() << strTemp;
strTemp = mapInfos[strTemp];
label = new QLabel(this);
label ->setText(tr(hotline_service_item_name[i]).append(":"));
ui->gridLayout_info->addWidget(label,i,0);
label = new QLabel(this);
label->setText(strTemp);
ui->gridLayout_info->addWidget(label,i,1);
}
}
|