2024-11-12 13:40:43 +08:00
|
|
|
#include "parametersettingswidget.h"
|
|
|
|
|
|
|
|
ParameterSettingsWidget::ParameterSettingsWidget(QWidget *parent )
|
|
|
|
{
|
2024-11-13 10:46:22 +08:00
|
|
|
|
2024-11-12 13:40:43 +08:00
|
|
|
m_PerHighFreqWidget.m_labImage.setStyleSheet("border-image:url(:/image/icon_HighFreq.png);}");
|
|
|
|
m_PerHighFreqWidget.m_labImage.setFixedSize(QSize(30,30));
|
|
|
|
m_PerHighFreqWidget.m_labTxt.setText("高频滤波");
|
|
|
|
m_PerHighFreqWidget.setTextList(QStringList()<<"0.05Hz"<<"0.1Hz"<<"1Hz"<<"2Hz"<<"5Hz",
|
|
|
|
QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme" << "Parameter setting" << "hospital-information");
|
|
|
|
|
2024-11-13 10:46:22 +08:00
|
|
|
m_PerLowerFreqWidget.setTextList(QStringList()<<"10Hz"<<"30Hz"<<"50Hz"<<"70Hz"<<"100Hz",
|
2024-11-12 13:40:43 +08:00
|
|
|
QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme" << "Parameter setting" << "hospital-information");
|
2024-11-12 14:04:19 +08:00
|
|
|
m_PerLowerFreqWidget.m_labImage.setStyleSheet("border-image:url(:/image/icon_LowerFreq.png);}");
|
|
|
|
m_PerLowerFreqWidget.m_labImage.setFixedSize(QSize(30,30));
|
2024-11-12 15:57:09 +08:00
|
|
|
m_PerLowerFreqWidget.m_labTxt.setText("低频滤波");
|
2024-11-12 13:40:43 +08:00
|
|
|
|
2024-11-13 10:46:22 +08:00
|
|
|
m_PerTimeConst.setTextList(QStringList()<<"0.03Hz"<<"0.1Hz"<<"0.3Hz",
|
|
|
|
QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme" );
|
2024-11-12 14:04:19 +08:00
|
|
|
m_PerTimeConst.m_labImage.setStyleSheet("border-image:url(:/image/icon_TimeConst.png);}");
|
|
|
|
m_PerTimeConst.m_labImage.setFixedSize(QSize(30,30));
|
2024-11-12 15:57:09 +08:00
|
|
|
m_PerTimeConst.m_labTxt.setText("时间常数");
|
2024-11-12 14:04:19 +08:00
|
|
|
|
2024-11-12 13:40:43 +08:00
|
|
|
|
|
|
|
m_PerPowerFreNotch.setTextList(QStringList()<<"0.05Hz"<<"0.1Hz"<<"1Hz"<<"2Hz"<<"5Hz",
|
|
|
|
QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme" << "Parameter setting" << "hospital-information");
|
2024-11-12 14:04:19 +08:00
|
|
|
m_PerPowerFreNotch.m_labImage.setStyleSheet("border-image:url(:/image/icon_PowerFreNotch.png);}");
|
|
|
|
m_PerPowerFreNotch.m_labImage.setFixedSize(QSize(30,30));
|
2024-11-12 15:57:09 +08:00
|
|
|
m_PerPowerFreNotch.m_labTxt.setText("工作馅波");
|
2024-11-12 14:04:19 +08:00
|
|
|
|
2024-11-13 10:46:22 +08:00
|
|
|
m_PerAmplitude.setTextList(QStringList()<<"1"<<"2"<<"4"<<"8"<<"16"<<"32"<<"64",
|
|
|
|
QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme"
|
|
|
|
<< "Parameter setting" << "hospital-information"<<"s"<<"h");
|
2024-11-12 14:04:19 +08:00
|
|
|
m_PerAmplitude.m_labImage.setStyleSheet("border-image:url(:/image/icon_Amplitude.png);}");
|
|
|
|
m_PerAmplitude.m_labImage.setFixedSize(QSize(30,30));
|
2024-11-12 15:57:09 +08:00
|
|
|
m_PerAmplitude.m_labTxt.setText("波幅");
|
2024-11-12 14:04:19 +08:00
|
|
|
|
2024-11-13 13:37:58 +08:00
|
|
|
m_PerWavevelocity.setTextList(QStringList()<<"100"<<"500"<<"1000"<<"2500"<<"5000"<<"10000"<<"15000",
|
|
|
|
QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme" << "Parameter setting" << "hospital-information"<<"ss"<<"kk");
|
2024-11-12 14:04:19 +08:00
|
|
|
m_PerWavevelocity.m_labImage.setStyleSheet("border-image:url(:/image/icon_Wavevelocity.png);}");
|
|
|
|
m_PerWavevelocity.m_labImage.setFixedSize(QSize(30,30));
|
2024-11-12 15:57:09 +08:00
|
|
|
m_PerWavevelocity.m_labTxt.setText("波速");
|
|
|
|
|
|
|
|
|
2024-11-12 13:40:43 +08:00
|
|
|
QHBoxLayout * hlay = new QHBoxLayout;
|
|
|
|
|
|
|
|
hlay->setSpacing(0);
|
|
|
|
hlay->addWidget(&m_PerHighFreqWidget);
|
|
|
|
hlay->addWidget(&m_PerLowerFreqWidget);
|
|
|
|
hlay->addWidget(&m_PerTimeConst);
|
|
|
|
hlay->addWidget(&m_PerPowerFreNotch);
|
|
|
|
hlay->addWidget(&m_PerAmplitude);
|
|
|
|
hlay->addWidget(&m_PerWavevelocity);
|
|
|
|
|
|
|
|
|
2024-11-13 10:46:22 +08:00
|
|
|
//setContentsMargins(0,0,0,0);
|
2024-11-12 15:57:09 +08:00
|
|
|
m_labSettingTxt.setStyleSheet("QLabel { font-size: 14px;\
|
|
|
|
color: rgb(13,157,219); }\
|
|
|
|
");
|
|
|
|
m_labSettingTxt.setText("参数设置");
|
|
|
|
m_btnOK.setText("保存");
|
|
|
|
m_btncanCel.setText("取消");
|
|
|
|
QHBoxLayout * hlay2 = new QHBoxLayout;
|
|
|
|
hlay2->setSpacing(0);
|
|
|
|
hlay2->addWidget(&m_labSettingTxt);
|
|
|
|
hlay2->addStretch();
|
|
|
|
|
|
|
|
QHBoxLayout * hlay3 = new QHBoxLayout;
|
|
|
|
hlay3->addStretch();
|
|
|
|
hlay3->addWidget(&m_btncanCel);
|
|
|
|
hlay3->addWidget(&m_btnOK);
|
|
|
|
hlay3->addStretch();
|
|
|
|
|
|
|
|
QVBoxLayout * vlay = new QVBoxLayout;
|
|
|
|
vlay->addLayout(hlay2);
|
|
|
|
vlay->addLayout(hlay);
|
|
|
|
|
2024-11-15 16:00:37 +08:00
|
|
|
|
2024-11-13 10:46:22 +08:00
|
|
|
|
|
|
|
|
|
|
|
QWidget * w = new QWidget;
|
|
|
|
|
|
|
|
|
2024-11-13 15:03:53 +08:00
|
|
|
|
|
|
|
setStyleSheet("QWidget \
|
|
|
|
{\
|
|
|
|
background-color:white;\
|
|
|
|
border-radius:10px;\
|
|
|
|
}");
|
2024-11-13 10:46:22 +08:00
|
|
|
w->setLayout(vlay);
|
2024-11-15 16:00:37 +08:00
|
|
|
QVBoxLayout * hlayall = new QVBoxLayout;
|
2024-11-13 10:46:22 +08:00
|
|
|
hlayall->addWidget(w);
|
2024-11-15 16:00:37 +08:00
|
|
|
hlayall->addLayout(hlay3);
|
2024-11-13 10:46:22 +08:00
|
|
|
setLayout(hlayall);
|
2024-11-12 13:40:43 +08:00
|
|
|
|
2024-11-13 15:03:53 +08:00
|
|
|
m_btnOK.setStyleSheet("QPushButton{\
|
|
|
|
background: white;\
|
|
|
|
border-radius:10px;padding:7px 10px;\
|
|
|
|
}\
|
|
|
|
QPushButton:hover{\
|
|
|
|
background: #0d9ddb;\
|
|
|
|
border-radius:10px;padding:7px 10px;\
|
|
|
|
}\
|
|
|
|
QPushButton:pressed{\
|
|
|
|
background: #0d9ddb;\
|
|
|
|
border-radius:10px;padding:7px 10px;\
|
|
|
|
}\
|
|
|
|
QPushButton:checked{\
|
|
|
|
background: #0d9ddb;\
|
|
|
|
border-radius:10px;padding:7px 10px;\
|
|
|
|
}");
|
|
|
|
m_btncanCel.setStyleSheet("QPushButton{\
|
|
|
|
background: white;\
|
|
|
|
border-radius:10px;padding:7px 10px;\
|
|
|
|
}\
|
|
|
|
QPushButton:hover{\
|
|
|
|
background: #0d9ddb;\
|
|
|
|
border-radius:10px;padding:7px 10px;\
|
|
|
|
}\
|
|
|
|
QPushButton:pressed{\
|
|
|
|
background: #0d9ddb;\
|
|
|
|
border-radius:10px;padding:7px 10px;\
|
|
|
|
}\
|
|
|
|
QPushButton:checked{\
|
|
|
|
background: #0d9ddb;\
|
|
|
|
border-radius:10px;padding:7px 10px;\
|
|
|
|
}");
|
|
|
|
|
|
|
|
m_btncanCel.setMinimumWidth(100);
|
|
|
|
m_btnOK.setMinimumWidth(100);
|
2024-11-12 13:40:43 +08:00
|
|
|
}
|
|
|
|
ParameterSettingsWidget::~ParameterSettingsWidget()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
void ParameterSettingsWidget::init()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
void ParameterSettingsWidget::initLay()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
bool ParameterSettingsWidget::initConnect()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
PerWidget::PerWidget(QWidget * parent):QWidget (parent)
|
|
|
|
{
|
|
|
|
init();
|
|
|
|
initLay();
|
|
|
|
}
|
|
|
|
PerWidget::~PerWidget()
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
void PerWidget::init()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
void PerWidget::initLay()
|
|
|
|
{
|
|
|
|
|
2024-11-13 10:46:22 +08:00
|
|
|
//m_NavListWidget.setList(QStringList()<<"0.05Hz"<<"0.1Hz"<<"1Hz"<<"2Hz"<<"5Hz",
|
|
|
|
// QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme" << "Parameter setting" << "hospital-information");
|
2024-11-12 13:40:43 +08:00
|
|
|
|
|
|
|
m_NavListWidget.setObjectName("NavList1");
|
|
|
|
/*
|
|
|
|
font-size: 16px;\
|
|
|
|
font-weight: bold;\
|
|
|
|
*/
|
|
|
|
|
2024-11-13 13:37:58 +08:00
|
|
|
m_NavListWidget.setCustomSize(QSize(30,20));
|
2024-11-12 13:40:43 +08:00
|
|
|
|
|
|
|
m_NavListWidget.setStyleSheet("QPushButton{\
|
|
|
|
background: rgba(255, 255, 255);\
|
|
|
|
color: black;\
|
|
|
|
border-radius: 8px;\
|
|
|
|
border:0px ; \
|
|
|
|
}\
|
|
|
|
QPushButton:hover{\
|
|
|
|
color: black;\
|
|
|
|
background: rgb(255, 255, 255);\
|
|
|
|
border-radius: 8px;\
|
|
|
|
}\
|
|
|
|
QPushButton:pressed{\
|
|
|
|
color: black;\
|
|
|
|
background: rgb(255, 255, 255);\
|
|
|
|
border-radius: 8px;\
|
|
|
|
}\
|
|
|
|
QPushButton:checked{\
|
|
|
|
color: white;\
|
|
|
|
background: rgb(51, 144, 76);\
|
|
|
|
border-radius: 8px;\
|
|
|
|
}"\
|
|
|
|
"QWidget#NavList1{background-color:rgb(255, 255, 255);}"\
|
|
|
|
);
|
|
|
|
// m_NavListWidget.show();
|
|
|
|
|
|
|
|
//setAttribute(Qt::WA_TranslucentBackground); // 背景透明
|
|
|
|
QHBoxLayout * hlay = new QHBoxLayout;
|
|
|
|
QFrame *line = new QFrame();
|
|
|
|
line->setFrameShape(QFrame::VLine);
|
|
|
|
//line->setFrameShadow(QFrame::Plain);
|
|
|
|
|
|
|
|
hlay->setSpacing(0);
|
|
|
|
hlay->addWidget(&m_NavListWidget);
|
|
|
|
hlay->addWidget(line);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QHBoxLayout * hlay2 = new QHBoxLayout;
|
|
|
|
hlay2->addStretch();
|
|
|
|
hlay2->addWidget(&m_labImage, 1,Qt::AlignRight);
|
|
|
|
hlay2->addWidget(&m_labTxt, 1,Qt::AlignLeft);
|
|
|
|
hlay2->addStretch();
|
|
|
|
hlay2->setSpacing(0);
|
|
|
|
|
|
|
|
|
|
|
|
QVBoxLayout * vlay = new QVBoxLayout;
|
|
|
|
vlay->addLayout(hlay2);
|
|
|
|
vlay->addLayout(hlay);
|
2024-11-13 10:46:22 +08:00
|
|
|
vlay->setContentsMargins(0,0,0,0);
|
2024-11-12 13:40:43 +08:00
|
|
|
setContentsMargins(0,0,0,0);
|
|
|
|
setLayout( vlay);
|
|
|
|
}
|
|
|
|
void PerWidget::initConnect()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
void PerWidget::setTextList(QStringList str,QStringList objNames)
|
|
|
|
{
|
|
|
|
m_NavListWidget.setList(str, objNames);
|
|
|
|
}
|