forked from challinan/pmd-demo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
graphSettingsPopup.cpp
104 lines (87 loc) · 2.29 KB
/
graphSettingsPopup.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
#include "graphSettingsPopup.h"
#include "mainwindow.h"
#include "ui_graphSettingsPopup.h"
GraphSettingsPopup::GraphSettingsPopup(MainWindow *parent):
ui(new Ui::GraphSettingsPopup),
m_mainWindow(parent)
{
setWindowFlags(Qt::FramelessWindowHint| Qt::WindowStaysOnTopHint);
ui->setupUi(this);
m_isVisible=false;
connect(ui->okButton, SIGNAL(clicked()), m_mainWindow, SLOT(onGraphMenuPopupOk()));
connect(ui->cancelButton, SIGNAL(clicked()), m_mainWindow, SLOT(onGraphMenuPopupCancel()));
}
GraphSettingsPopup::~GraphSettingsPopup()
{
delete ui;
}
void GraphSettingsPopup::on_pbtn_SizeMinus_clicked()
{
QString val;
if(m_graphWaveSize>1)
{
m_graphWaveSize--;
val.setNum(m_graphWaveSize);
ui->lbwavesize->setText(val);
ui->lbwavesize->update();
}
}
void GraphSettingsPopup::on_pbtn_SizeAuto_clicked()
{
QString val;
m_graphWaveSize=2;
val.setNum(m_graphWaveSize);
ui->lbwavesize->setText(val);
ui->lbwavesize->update();
}
void GraphSettingsPopup::on_pbtn_SizePlus_clicked()
{
QString val;
if(m_graphWaveSize<3)
{
m_graphWaveSize++;
val.setNum(m_graphWaveSize);
ui->lbwavesize->setText(val);
ui->lbwavesize->update();
}
}
void GraphSettingsPopup::on_pbtn_wave_co2_clicked()
{
m_graphType=GraphCO2;
}
void GraphSettingsPopup::on_pbtn_wave_abp_clicked()
{
m_graphType=GraphABP;
}
void GraphSettingsPopup::on_pbtn_wave_ecg_clicked()
{
m_graphType=GraphECG;
}
void GraphSettingsPopup::on_pbtn_wave_pleth_clicked()
{
m_graphType=GraphPLETH;
}
void GraphSettingsPopup::initialized(int graphSize,TGraphType graphType )
{
QString val;
m_graphWaveSize = graphSize;
m_graphType = graphType;
val.setNum(m_graphWaveSize);
ui->lbwavesize->setText(val);
switch(graphType)
{
case GraphECG:
ui->msgTitle->setText("ECG Menu");
break;
case GraphABP:
ui->msgTitle->setText("ABP Menu");
break;
case GraphPLETH:
ui->msgTitle->setText("PLETH Menu");
break;
case GraphCO2:
ui->msgTitle->setText("CO2 Menu");
break;
}
m_isVisible=true;
}