2025-04-22T17:33:03
This commit is contained in:
parent
ed67bf9287
commit
658c68b3ce
@ -15,6 +15,7 @@ CentralWidget::CentralWidget(QWidget *parent)
|
|||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
,_customPlot(new QCustomPlot(this))
|
,_customPlot(new QCustomPlot(this))
|
||||||
,_analysisMode(AnalysisMode::None)
|
,_analysisMode(AnalysisMode::None)
|
||||||
|
,_currentCurve(nullptr)
|
||||||
{
|
{
|
||||||
setMouseTracking(true);
|
setMouseTracking(true);
|
||||||
|
|
||||||
@ -81,7 +82,7 @@ CentralWidget::CentralWidget(QWidget *parent)
|
|||||||
_customPlot->yAxis->setLabel("DSC/mW");
|
_customPlot->yAxis->setLabel("DSC/mW");
|
||||||
// 设置坐标轴范围,以便我们可以看到全部数据
|
// 设置坐标轴范围,以便我们可以看到全部数据
|
||||||
_customPlot->xAxis->setRange(0, 400);
|
_customPlot->xAxis->setRange(0, 400);
|
||||||
_customPlot->yAxis->setRange(-50, 50);
|
_customPlot->yAxis->setRange(-100,200);
|
||||||
}
|
}
|
||||||
|
|
||||||
CentralWidget::~CentralWidget()
|
CentralWidget::~CentralWidget()
|
||||||
@ -143,18 +144,21 @@ void CentralWidget::slotRecvCommonData(const CommonData &cd)
|
|||||||
if(!_currentCurve){
|
if(!_currentCurve){
|
||||||
_currentCurve = new QCPCurve(_customPlot->xAxis, _customPlot->yAxis);
|
_currentCurve = new QCPCurve(_customPlot->xAxis, _customPlot->yAxis);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logde<<"temp:"<<cd.sample_temp<<",dsc:"<<cd.dsc;
|
||||||
|
|
||||||
// Update curve.
|
// Update curve.
|
||||||
// _currentCurve->addData(cd.sample_temp, cd.dsc);
|
// _currentCurve->addData(cd.sample_temp, cd.dsc);
|
||||||
_currentCurve->addData(index++,cd.sample_temp, cd.dsc);
|
|
||||||
// _currentCurve->data()->add(QCPCurveData(index++, cd.sample_temp, cd.dsc));
|
// _currentCurve->data()->add(QCPCurveData(index++, cd.sample_temp, cd.dsc));
|
||||||
|
|
||||||
|
// _currentCurve->addData(index++,cd.sample_temp, cd.dsc);
|
||||||
|
|
||||||
// 设置曲线数据
|
// 设置曲线数据
|
||||||
// _currentCurve->setData(data);
|
// _currentCurve->setData(data);
|
||||||
|
|
||||||
|
|
||||||
_customPlot->rescaleAxes();
|
// _customPlot->rescaleAxes();
|
||||||
_customPlot->replot();
|
// _customPlot->replot();
|
||||||
|
|
||||||
// Record data.
|
// Record data.
|
||||||
QVector<Global::ExperimentData>* pEdVtr = nullptr; // 声明指针变量
|
QVector<Global::ExperimentData>* pEdVtr = nullptr; // 声明指针变量
|
||||||
|
|||||||
@ -15,6 +15,7 @@ RealTimeDataForm::~RealTimeDataForm()
|
|||||||
|
|
||||||
void RealTimeDataForm::slotRevCommonData(const CommonData &data)
|
void RealTimeDataForm::slotRevCommonData(const CommonData &data)
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
#if 0
|
#if 0
|
||||||
qDebug()<<"rev-------------------------";
|
qDebug()<<"rev-------------------------";
|
||||||
// 格式化输出 double 类型,保留三位小数
|
// 格式化输出 double 类型,保留三位小数
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user