172 lines
5.3 KiB
C++
172 lines
5.3 KiB
C++
#include "parametersettingswidget.h"
|
|
|
|
ParameterSettingsWidget::ParameterSettingsWidget(QWidget *parent )
|
|
{
|
|
setStyleSheet("background:white;");
|
|
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");
|
|
|
|
m_PerLowerFreqWidget.setTextList(QStringList()<<"0.05Hz"<<"0.1Hz"<<"1Hz"<<"2Hz"<<"5Hz",
|
|
QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme" << "Parameter setting" << "hospital-information");
|
|
|
|
m_PerTimeConst.setTextList(QStringList()<<"0.05Hz"<<"0.1Hz"<<"1Hz"<<"2Hz"<<"5Hz",
|
|
QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme" << "Parameter setting" << "hospital-information");
|
|
|
|
m_PerPowerFreNotch.setTextList(QStringList()<<"0.05Hz"<<"0.1Hz"<<"1Hz"<<"2Hz"<<"5Hz",
|
|
QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme" << "Parameter setting" << "hospital-information");
|
|
m_PerAmplitude.setTextList(QStringList()<<"0.05Hz"<<"0.1Hz"<<"1Hz"<<"2Hz"<<"5Hz",
|
|
QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme" << "Parameter setting" << "hospital-information");
|
|
m_PerWavevelocity.setTextList(QStringList()<<"0.05Hz"<<"0.1Hz"<<"1Hz"<<"2Hz"<<"5Hz",
|
|
QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme" << "Parameter setting" << "hospital-information");
|
|
|
|
|
|
|
|
#if 0
|
|
QLabel m_labHighFrequencyFiltering;
|
|
PerWidget m_PerHighFreqWidget;
|
|
|
|
//低频过滤
|
|
QLabel m_labLowerFrequencyFiltering;
|
|
PerWidget m_PerLowerFreqWidget;
|
|
|
|
//时间常数
|
|
QLabel m_labTimeConst;
|
|
PerWidget m_PerTimeConst;
|
|
|
|
//工频馅波 Power-frequency notch
|
|
QLabel m_labPowerFreNotch;
|
|
PerWidget m_PerPowerFreNotch;
|
|
//波幅
|
|
QLabel m_labAmplitude;
|
|
PerWidget m_PerAmplitude;
|
|
//Wave velocity
|
|
//波速
|
|
QLabel m_labWavevelocity;
|
|
PerWidget m_PerWavevelocity;
|
|
#endif
|
|
QHBoxLayout * hlay = new QHBoxLayout;
|
|
QFrame *line = new QFrame();
|
|
line->setFrameShape(QFrame::VLine);
|
|
//line->setFrameShadow(QFrame::Plain);
|
|
|
|
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);
|
|
|
|
|
|
setContentsMargins(0,0,0,0);
|
|
setLayout(hlay);
|
|
|
|
}
|
|
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()
|
|
{
|
|
|
|
m_NavListWidget.setList(QStringList()<<"0.05Hz"<<"0.1Hz"<<"1Hz"<<"2Hz"<<"5Hz",
|
|
QStringList()<<"fill-in-the-Case" << "case-management" << "leading-scheme" << "Parameter setting" << "hospital-information");
|
|
|
|
m_NavListWidget.setObjectName("NavList1");
|
|
/*
|
|
font-size: 16px;\
|
|
font-weight: bold;\
|
|
*/
|
|
|
|
m_NavListWidget.setCustomSize(QSize(40,30));
|
|
|
|
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);
|
|
setContentsMargins(0,0,0,0);
|
|
setLayout( vlay);
|
|
}
|
|
void PerWidget::initConnect()
|
|
{
|
|
|
|
}
|
|
void PerWidget::setTextList(QStringList str,QStringList objNames)
|
|
{
|
|
m_NavListWidget.setList(str, objNames);
|
|
}
|