2025-04-24T16:41:19

This commit is contained in:
yuntang 2025-04-24 16:41:20 +08:00
parent 834751d2a8
commit 71c308ac2d
76 changed files with 84817 additions and 263 deletions

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
{
"InstrumentCoefficient": 1
}

View File

@ -0,0 +1,11 @@
*GLOBAL:
ENABLED = true
TO_FILE = true
TO_STANDARD_OUTPUT = true
FORMAT = "[%datetime] %msg"
FILENAME = "log-sdk/%datetime{%Y%M%d}.log"
MILLISECONDS_WIDTH = 3
PERFORMANCE_TRACKING = false
MAX_LOG_FILE_SIZE = 104857600
LOG_FLUSH_THRESHOLD = 0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,37 +0,0 @@
2025-04-15 16:25:15,306 DEBUG [default] main...
2025-04-15 16:25:15,558 DEBUG [default] setEventHandlerEnable...0
2025-04-15 16:25:15,558 DEBUG [default] xMax:5
2025-04-15 16:25:19,903 DEBUG [default] peakPoint:186.879,2.2
2025-04-15 16:25:20,731 DEBUG [default] peakPoint:33.156,-2.366
2025-04-15 16:25:21,296 DEBUG [default] peakPoint:136.386,-3.03
2025-04-15 17:09:54,935 DEBUG [default] main...
2025-04-15 17:09:54,952 DEBUG [default] setEventHandlerEnable...0
2025-04-15 17:09:54,953 DEBUG [default] xMax:5
2025-04-15 17:10:04,848 DEBUG [default] peakPoint:186.879,2.2
2025-04-15 17:10:05,521 DEBUG [default] peakPoint:33.156,-2.366
2025-04-15 17:10:06,448 DEBUG [default] peakPoint:136.386,-3.03
2025-04-15 17:10:09,876 DEBUG [default] context menu...
2025-04-15 17:10:09,876 DEBUG [default] selected...
2025-04-15 17:10:11,336 DEBUG [default] slotBaseLine...
2025-04-15 17:10:11,342 DEBUG [default] index:0
2025-04-15 17:10:12,838 DEBUG [default] context menu...
2025-04-15 17:10:12,838 DEBUG [default] selected...
2025-04-15 17:10:14,440 DEBUG [default] index:1
2025-04-15 17:10:15,719 DEBUG [default] context menu...
2025-04-15 17:10:15,719 DEBUG [default] selected...
2025-04-15 17:10:17,216 DEBUG [default] index:2
2025-04-15 17:10:25,154 DEBUG [default] Base,standard,sample not selected.
2025-04-15 17:10:28,909 DEBUG [default] Base,standard,sample not selected.
2025-04-15 17:10:30,014 DEBUG [default] Base,standard,sample not selected.
2025-04-15 17:10:33,063 DEBUG [default] Base,standard,sample not selected.
2025-04-15 17:10:33,241 DEBUG [default] Base,standard,sample not selected.
2025-04-15 17:10:33,424 DEBUG [default] Base,standard,sample not selected.
2025-04-15 17:10:33,595 DEBUG [default] Base,standard,sample not selected.
2025-04-15 17:10:33,782 DEBUG [default] Base,standard,sample not selected.
2025-04-15 17:10:33,952 DEBUG [default] Base,standard,sample not selected.
2025-04-15 17:10:45,031 DEBUG [default] Base,standard,sample not selected.
2025-04-15 17:10:45,194 DEBUG [default] Base,standard,sample not selected.
2025-04-15 17:10:45,371 DEBUG [default] Base,standard,sample not selected.
2025-04-15 17:25:42,781 DEBUG [default] main...
2025-04-15 17:25:42,794 DEBUG [default] setEventHandlerEnable...0
2025-04-15 17:25:42,794 DEBUG [default] xMax:5

Binary file not shown.

View File

@ -1,113 +1,113 @@
QT += core gui serialport printsupport
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++11
CONFIG+=precompile_header
PRECOMPILED_HEADER=stable.h
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
include(thirdparty\QtXlsxWriter-0.3.0\src\xlsx\qtxlsx.pri)
SOURCES += \
data/confighandler.cpp \
data/filemanager.cpp \
data/pointcalculate.cpp \
data/txthandler.cpp \
global.cpp \
logger/logger.cpp \
ui/aboutform.cpp \
ui/coefficientselectionform.cpp \
ui/enthalpydatacorrectionform.cpp \
ui/rightwidget.cpp \
thirdparty/easylogging/easylogging++.cc \
ui/analysissettingform.cpp \
ui/centralwidget.cpp \
main.cpp \
mainwindow.cpp \
serialport/dataparser.cpp \
serialport/serialport.cpp \
thirdparty/qcustomplot/qcustomplot.cpp \
ui/degreeofcrystallinityform.cpp \
ui/degreeofcureform.cpp \
ui/eventhandler.cpp \
ui/experimentsettingform.cpp \
ui/instrumentcoefficientform.cpp \
ui/leftwidget.cpp \
ui/oitautoanalysisparamform.cpp \
ui/realtimedataform.cpp \
ui/specificheatcomparisonmethodform.cpp \
data/xlsxhandler.cpp
HEADERS += \
data/confighandler.h \
data/txthandler.h \
global.h \
data/filemanager.h \
data/pointcalculate.h \
defines.h \
logger/logger.h \
ui/aboutform.h \
ui/coefficientselectionform.h \
ui/enthalpydatacorrectionform.h \
ui/rightwidget.h \
thirdparty/easylogging/easylogging++.h \
ui/analysissettingform.h \
ui/centralwidget.h \
mainwindow.h \
serialport/dataparser.h \
serialport/protocol.h \
serialport/serialport.h \
thirdparty/qcustomplot/qcustomplot.h \
ui/degreeofcrystallinityform.h \
ui/degreeofcureform.h \
ui/eventhandler.h \
ui/experimentsettingform.h \
ui/instrumentcoefficientform.h \
ui/leftwidget.h \
ui/oitautoanalysisparamform.h \
ui/realtimedataform.h \
ui/specificheatcomparisonmethodform.h \
data/xlsxhandler.h
FORMS += \
mainwindow.ui \
ui/aboutform.ui \
ui/coefficientselectionform.ui \
ui/degreeofcrystallinityform.ui \
ui/degreeofcureform.ui \
ui/enthalpydatacorrectionform.ui \
ui/experimentsettingform.ui \
ui/instrumentcoefficientform.ui \
ui/oitautoanalysisparamform.ui \
ui/realtimedataform.ui \
ui/specificheatcomparisonmethodform.ui
INCLUDEPATH += serialport \
ui \
logger \
thirdparty/easylogging \
thirdparty/qcustomplot \
data
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
RESOURCES += \
images.qrc
DISTFILES += \
logger/log.conf
QT += core gui serialport printsupport
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++11
CONFIG+=precompile_header
PRECOMPILED_HEADER=stable.h
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
include(thirdparty\QtXlsxWriter-0.3.0\src\xlsx\qtxlsx.pri)
SOURCES += \
data/confighandler.cpp \
data/filemanager.cpp \
data/pointcalculate.cpp \
data/txthandler.cpp \
global.cpp \
logger/logger.cpp \
ui/aboutform.cpp \
ui/coefficientselectionform.cpp \
ui/enthalpydatacorrectionform.cpp \
ui/rightwidget.cpp \
thirdparty/easylogging/easylogging++.cc \
ui/analysissettingform.cpp \
ui/centralwidget.cpp \
main.cpp \
mainwindow.cpp \
serialport/dataparser.cpp \
serialport/serialport.cpp \
thirdparty/qcustomplot/qcustomplot.cpp \
ui/degreeofcrystallinityform.cpp \
ui/degreeofcureform.cpp \
ui/eventhandler.cpp \
ui/experimentsettingform.cpp \
ui/instrumentcoefficientform.cpp \
ui/leftwidget.cpp \
ui/oitautoanalysisparamform.cpp \
ui/realtimedataform.cpp \
ui/specificheatcomparisonmethodform.cpp \
data/xlsxhandler.cpp
HEADERS += \
data/confighandler.h \
data/txthandler.h \
global.h \
data/filemanager.h \
data/pointcalculate.h \
defines.h \
logger/logger.h \
ui/aboutform.h \
ui/coefficientselectionform.h \
ui/enthalpydatacorrectionform.h \
ui/rightwidget.h \
thirdparty/easylogging/easylogging++.h \
ui/analysissettingform.h \
ui/centralwidget.h \
mainwindow.h \
serialport/dataparser.h \
serialport/protocol.h \
serialport/serialport.h \
thirdparty/qcustomplot/qcustomplot.h \
ui/degreeofcrystallinityform.h \
ui/degreeofcureform.h \
ui/eventhandler.h \
ui/experimentsettingform.h \
ui/instrumentcoefficientform.h \
ui/leftwidget.h \
ui/oitautoanalysisparamform.h \
ui/realtimedataform.h \
ui/specificheatcomparisonmethodform.h \
data/xlsxhandler.h
FORMS += \
mainwindow.ui \
ui/aboutform.ui \
ui/coefficientselectionform.ui \
ui/degreeofcrystallinityform.ui \
ui/degreeofcureform.ui \
ui/enthalpydatacorrectionform.ui \
ui/experimentsettingform.ui \
ui/instrumentcoefficientform.ui \
ui/oitautoanalysisparamform.ui \
ui/realtimedataform.ui \
ui/specificheatcomparisonmethodform.ui
INCLUDEPATH += serialport \
ui \
logger \
thirdparty/easylogging \
thirdparty/qcustomplot \
data
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
RESOURCES += \
images.qrc
DISTFILES += \
logger/log.conf

View File

@ -14,7 +14,7 @@ void ConfigHandler::reader()
if (QFile::exists(ConConfigFilePath)) {
logde << "config config file existed. ";
}else{
writer(true);
writer(false);
}
// 读取JSON文件
@ -37,7 +37,7 @@ void ConfigHandler::reader()
_configMap[ConInstrumentCoefficientStr] = QVariant(obj[ConInstrumentCoefficientStr].toDouble());
}
#if 0
void ConfigHandler::createDefaultFile()
{
logde<<"createDefaultFile";
@ -48,8 +48,12 @@ void ConfigHandler::createDefaultFile()
// obj["age"] = 30;
// obj["city"] = "New York";
obj[ConInstrumentCoefficientStr] =
ConDefaultMap[ConInstrumentCoefficientStr].toFloat();
double coefficient =
ConfigHandler::ConDefaultMap.value(ConInstrumentCoefficientStr).toDouble();
logde<<"coefficient:"<<coefficient;
obj[ConInstrumentCoefficientStr] =coefficient;
// 将 QJsonObject 转换为 QJsonDocument
QJsonDocument doc(obj);
@ -65,6 +69,7 @@ void ConfigHandler::createDefaultFile()
file.write(doc.toJson());
file.close(); // 确保文件关闭
}
#endif
void ConfigHandler::writer(const bool writeRealDataFlag)
{
@ -76,7 +81,7 @@ void ConfigHandler::writer(const bool writeRealDataFlag)
}
obj[ConInstrumentCoefficientStr] =
(*mapPtr)[ConInstrumentCoefficientStr].toFloat();
(*mapPtr).value(ConInstrumentCoefficientStr).toFloat();
// 将 QJsonObject 转换为 QJsonDocument
QJsonDocument doc(obj);

View File

@ -6,8 +6,17 @@
const QString ConInstrumentCoefficientStr = "InstrumentCoefficient";
namespace ConfigHandler {
const QString ConConfigFilePath = QDir::currentPath() + "/config.json";
const QMap<QString, QVariant> ConDefaultMap = {
{ConInstrumentCoefficientStr, QVariant(1.000f)},
};
extern QMap<QString, QVariant> _configMap;
//
void reader();
void createDefaultFile();
//void createDefaultFile();
/**
* @brief writer
* @param writeRealDataFlag
@ -15,14 +24,6 @@ void createDefaultFile();
* false:Write ConDefaultMap content.
*/
void writer(const bool writeRealDataFlag = true);
const QString ConConfigFilePath = QDir::currentPath() + "/config.json";
const QMap<QString, QVariant> ConDefaultMap = {
{ConInstrumentCoefficientStr, 1.001f},
};
extern QMap<QString, QVariant> _configMap;
}

View File

@ -251,7 +251,9 @@ float PointCalculate::calculateArea() {
/*
* H = K * S / w;
*/
float coefficient = ConfigHandler::_configMap[ConInstrumentCoefficientStr].toFloat();
float coefficient = ConfigHandler::_configMap.value(ConInstrumentCoefficientStr).toFloat();
logde<<"coefficient:"<<coefficient;
if(Global::_enthalpyCoefficientEnableFlag){
logde<<"_enthalpyCoefficientEnableFlag...";
@ -266,10 +268,8 @@ float PointCalculate::calculateArea() {
value3;
}
logde<<"coefficient:"<<coefficient;
float weight = 1.0f;
float area = integral * coefficient / weight;
float area = integral * coefficient ;
return area;
}

View File

@ -38,21 +38,13 @@ int XlsxHandler::readFile(const QString sourceFilePath, Global::CurveFileData &c
return 3;
}
#if 0
// 获取工作表的行数和列数
int rowCount = workSheet->dimension().rowCount();
int colCount = workSheet->dimension().columnCount();
qDebug() << "row:" << rowCount << "col:" << colCount;
logde << "0:" << workSheet->cellAt(1, 1)->value().toString().toStdString();
qDebug() << workSheet->cellAt(1, 1)->value().toString();
#endif
//
int index = 2;
Global::ExperimentInfo& ei = cfd.ei;
ei.sampleName = workSheet->cellAt(index++, 2)->value().toString();
ei.sampleWeight = workSheet->cellAt(index++, 2)->value().toString();
logde<<"xlsx sample weight:"<<ei.sampleWeight.toStdString();
index++; // skip crucible weight.
ei.date = workSheet->cellAt(index++, 2)->value().toString();
ei.experimentor = workSheet->cellAt(index++, 2)->value().toString();

View File

@ -8,9 +8,10 @@
#include "protocol.h"
namespace Global {
const QString ConSoftVersion = "0.9.1";
const QString ConSoftVersion = "0.9.7";
const QString ExperimentDirPath = QDir::currentPath()+"/../experiment_data";
const QString SampleDataFloder = ExperimentDirPath + "/sample_data";
const QString BaseLineFolder = ExperimentDirPath + "/base_line";
const QString AnalysisStateFolder = ExperimentDirPath + "/analysis_state";

View File

@ -22,8 +22,13 @@ int main(int argc, char *argv[])
logde<<"main...";
//
ConfigHandler::reader();
#if 0
logde<<"config,instrument coefficient:"
<<ConfigHandler::_configMap[ConInstrumentCoefficientStr].toFloat();
<<ConfigHandler::_configMap.value(ConInstrumentCoefficientStr).toFloat();
logde<<"config,default coefficient:"
<<ConfigHandler::ConDefaultMap.value(ConInstrumentCoefficientStr).toFloat();
#endif
#if 0
ConfigHandler::_configMap[ConInstrumentCoefficientStr] = 2.001f;
@ -45,11 +50,11 @@ int main(int argc, char *argv[])
w.show();
#endif
// EnthalpyDataCorrectionForm edf;
// edf.show();
// EnthalpyDataCorrectionForm edf;
// edf.show();
// CoefficientSelectionForm csf;
// csf.show();
// CoefficientSelectionForm csf;
// csf.show();
// AboutForm af;
// af.show();
@ -62,8 +67,8 @@ int main(int argc, char *argv[])
// ExperimentSettingForm es;
// es.show();
// CentralWidget central;
// central.show();
// CentralWidget central;
// central.show();
// SerialPort::parserTest();

View File

@ -44,29 +44,6 @@ MainWindow::MainWindow(QWidget *parent)
permenentLabel->setText("Software Ver:" + Global::ConSoftVersion);
ui->statusbar->addPermanentWidget(permenentLabel);
//
#if 0
_expertmentSettingForm->setWindowFlags(_expertmentSettingForm->windowFlags()|
Qt::Dialog);
_specificHeatComparisonMethodForm->setWindowFlags(
_specificHeatComparisonMethodForm->windowFlags()| Qt::Dialog);
_realTimeDataForm->setWindowFlags(_realTimeDataForm->windowFlags()|
Qt::Dialog);
_degreeOfCureForm->setWindowFlags(_degreeOfCureForm->windowFlags()|
Qt::Dialog);
_instrumentCoefficientForm->setWindowFlags(_instrumentCoefficientForm->windowFlags()|
Qt::Dialog);
_OITAutoAnalysisParamForm->setWindowFlags(_OITAutoAnalysisParamForm->windowFlags()|
Qt::Dialog);
// _degreeOfCrystallinityForm->setWindowFlags(_degreeOfCrystallinityForm->windowFlags()|
// Qt::Dialog);
// 设置子窗口为模态对话框
_degreeOfCrystallinityForm->setWindowModality(Qt::ApplicationModal);
_degreeOfCrystallinityForm->setWindowFlags(Qt::Dialog);
#endif
setSubWidgetAttribute(_expertmentSettingForm);
setSubWidgetAttribute(_specificHeatComparisonMethodForm);
setSubWidgetAttribute(_realTimeDataForm);
@ -101,6 +78,11 @@ void MainWindow::slotContextMenuShow(const QPoint point)
_contextMenu->exec(point);
}
void MainWindow::slotStatusbarMesg(const QString)
{
}
void MainWindow::closeEvent(QCloseEvent *event)
{
// 弹出确认对话框

View File

@ -35,6 +35,7 @@ public:
public slots:
void slotContextMenuShow(const QPoint);
void slotStatusbarMesg(const QString);
protected:
void closeEvent(QCloseEvent *event) override;
private slots:

View File

@ -140,6 +140,7 @@ QByteArray setDeviceStartStop(const DeviceStartMode mode)
void experimentalStateSwitching(const CommonData &cd)
{
// Switch the software mode accord to the serial port data.
switch(cd.run_type){
case DeviceRunStatus::Heat:
case DeviceRunStatus::ConstantTemp:
@ -152,10 +153,10 @@ void experimentalStateSwitching(const CommonData &cd)
default:break;
}
// If phase update, add new phase data to the global param.
if(Global::_currentPhase != (int)cd.current_phase){
Global::_currentPhase = (int)cd.current_phase;
// Global::CurveExperimentData ced{nullptr,"",QVector<Global::ExperimentData>()};
Global::CurveExperimentData ced;
Global::_curveExperimentDataVtr.push_back(ced);
@ -210,43 +211,6 @@ QByteArray inquirePhaseInfo()
QByteArray((char *)&crc, 2);
}
bool isDevExperimentEnded(const CommonData &cd)
{
switch(cd.run_type){
case DeviceRunStatus::Heat:
case DeviceRunStatus::ConstantTemp:
Global::_mode = Global::Mode::Experiment;
break;
case DeviceRunStatus::Idle:
logde<<"idle...";
case DeviceRunStatus::Cooling:
Global::_mode = Global::Mode::Analysis;
logde<<"cooling...";
// return true;
break;
default:break;
}
#if 0
logde<<"phase:"<<(int)cd.current_phase;
logde<<"run type:"<<(int)cd.run_type;
switch(cd.run_type){
case DeviceRunStatus::Idle:
logde<<"idle...";
// break;
case DeviceRunStatus::Cooling:
// Global::instance()->setMode(Global::Mode::Analysis);
// Global::_mode = Global::Mode::Analysis;
// logde<<"Device into cooling status,then set the software into annlysis mode.";
logde<<"cooling...";
// return true;
break;
default:break;
}
return false;
#endif
}

View File

@ -14,7 +14,6 @@ QByteArray inquirePhaseInfo();
QByteArray setDeviceStartStop(const DeviceStartMode);
void experimentalStateSwitching(const CommonData&cd);
bool isDevExperimentEnded(const CommonData&cd);
bool commonDataParser(const QByteArray&ba,CommonData &cd);
unsigned short modbusCRC16(unsigned char *data,unsigned short length);

View File

@ -129,6 +129,7 @@ void SerialPort::slotReadData()
{
DataParser::experimentalStateSwitching(cd);
setAxis();
updateStatusbarMsg();
if (spp->addr == 0)
{
@ -141,6 +142,11 @@ void SerialPort::slotReadData()
}
}
void SerialPort::updateStatusbarMsg()
{
}
void SerialPort::commonDataParser(const int dataLength, const u16 addr,
const CommonData &cd)
{

View File

@ -44,6 +44,7 @@ private slots:
void slotReadData();
private:
void updateStatusbarMsg();
void commonDataParser(const int dataLength, const u16 addr, const CommonData &cd);
void to_hex(char *in_char, int char_length, char *out_char);
void displayPortInfo();

View File

@ -160,13 +160,13 @@ void CentralWidget::slotRecvCommonData(const CommonData &cd)
// return;
// Record data.
// logde<<"record data...";
// logde<<"record data...";
if(!Global::_currentCurveExperimentDataPtr){
logde<<"_currentCurveExperimentDataPtr is nullptr.";
exit(0);
}else{
// logde<<"add ed...";
// logde<<"add ed...";
Global::ExperimentData ed;
ed.dsc = cd .dsc;
@ -207,6 +207,7 @@ void CentralWidget::slotRecvAnalysisFileName(const QString &filePath)
qDebug() << "slotRecvAnalysisFileName" << filePath;
// todo.禁止重复文件添加。
Global::CurveFileData cfd;
if(XlsxHandler::readFile(filePath,cfd) != 0){
QMessageBox::warning((QWidget*)this->parent(), "warnning", "File parse error.");
@ -249,9 +250,12 @@ void CentralWidget::slotRecvAnalysisFileName(const QString &filePath)
// Add data to global parameter.
QFileInfo fileInfo(filePath);
Global::_curveExperimentDataVtr.push_back({_currentCurve,fileInfo.fileName(),pti.dataVtr});
pti.curve = _currentCurve;
}
Global::_curveFileDataVtr.push_back(cfd);
_customPlot->rescaleAxes();
_customPlot->replot();
}
@ -380,7 +384,18 @@ void CentralWidget::slotAnalysisSettingApply()
PointCalculate::setRegionPointX(x1,x2);
//enthalpy
double enthalpyValue = PointCalculate::calculateArea();
double sampleWeight = 0.0f;
for(Global::CurveFileData& cfd:Global::_curveFileDataVtr){
for(Global::PhaseTotalInfo& pti:cfd.phaseTotalVtr){
if(_currentCurve && _currentCurve == pti.curve){
sampleWeight = cfd.ei.sampleWeight.toDouble();
}
}
}
logde<<"sample weight:"<<sampleWeight;
double enthalpyValue = PointCalculate::calculateArea() / sampleWeight;
//peak
QPointF peakPoint = PointCalculate::getPeakPoint();
@ -391,10 +406,11 @@ void CentralWidget::slotAnalysisSettingApply()
logde<<"start,end:"<<startEndPointPair.first.x()<<","
<<startEndPointPair.second.x();
drawText(peakPoint,PointCalculate::textFormatPeakPoint(enthalpyValue,
peakPoint.x(),
startEndPointPair.first.x(),
startEndPointPair.second.x()));
drawText(peakPoint,
PointCalculate::textFormatPeakPoint(enthalpyValue,
peakPoint.x(),
startEndPointPair.first.x(),
startEndPointPair.second.x()));
//
break;
}
@ -833,11 +849,11 @@ void CentralWidget::setEventHandlerEnable(const bool flag)
double xMax = _customPlot->xAxis->range().upper;
double xMin = _customPlot->xAxis->range().lower;
logde<<"xMax:"<<xMax;
// logde<<"xMax:"<<xMax;
QVector<double> ticks = _customPlot->xAxis->tickVector();
int numTicks = ticks.size();
logde<<"ticks:"<<numTicks;
// QVector<double> ticks = _customPlot->xAxis->tickVector();
// int numTicks = ticks.size();
// logde<<"ticks:"<<numTicks;
double range = xMax - xMin;
double xLeft = xMin + range / 3;

View File

@ -43,12 +43,12 @@ public slots:
void slotSelectionChanged();
//analysis setting
void slotAnalysisSettingLineXPoint(const int index,const double);
void slotAnalysisSettingApply();
void slotAnalysisSettingConfirm();
void slotAnalysisSettingUndo();
void slotAnalysisSettingCancel();
void slotAnalysisSettingLineXPoint(const int index,const double);
protected:
void timerEvent(QTimerEvent* event);
void contextMenuEvent(QContextMenuEvent *event);

View File

@ -15,7 +15,6 @@ RealTimeDataForm::~RealTimeDataForm()
void RealTimeDataForm::slotRevCommonData(const CommonData &data)
{
return;
#if 0
qDebug()<<"rev-------------------------";
// 格式化输出 double 类型,保留三位小数