2025-05-30T13:46:39

This commit is contained in:
yuntang 2025-05-30 13:46:40 +08:00
parent 2a23ee4c74
commit 62f3de1511
15 changed files with 25 additions and 7 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -9,7 +9,7 @@ CONFIG+=precompile_header
PRECOMPILED_HEADER=stable.h
#
VERSION = 1.0.1
VERSION = 1.0.2
# 设置目标文件名,包含版本号
TARGET = DSCAnalysisTool_$${VERSION}

View File

@ -27,7 +27,7 @@ int XlsxHandler::readFile(const QString filePath, Global::CurveFileData &cfd)
{
if(!QFile::exists(filePath))
{
qDebug() << "xlsx file not existed:" << filePath;
logde<< "xlsx file not existed:" << filePath.toStdString();
return 1;
}
@ -198,7 +198,7 @@ void XlsxHandler::writeFile(const QString filePath)
const Phase& phase = ei.phaseVtr.at(i);
if(phase.onoff == 0){
logde<<"onoff == 0.";
// logde<<"onoff == 0.";
continue;
}
@ -381,8 +381,9 @@ void XlsxHandler::writeAnalysisOperation(const QString filePath)
QXlsx::Document* XlsxHandler::openXlsxFile(const QString& sourceFilePath) {
// 检查文件是否存在
if (!QFile::exists(sourceFilePath)) {
qDebug() << "xlsx file not existed:" << sourceFilePath;
return nullptr;
logde << "xlsx file not existed:" << sourceFilePath.toStdString();
QXlsx::Document* xlsx = new QXlsx::Document(sourceFilePath);
return xlsx;
}
QFileInfo fileInfo(sourceFilePath);

View File

@ -34,6 +34,8 @@ MainWindow::MainWindow(QWidget *parent)
ui->setupUi(this);
this->setToolTip(".....");
ui->actionSaveas->setVisible(false);
setCentralWidget(_centralWidget);
addDockWidget(Qt::LeftDockWidgetArea, _leftWidget);
addDockWidget(Qt::RightDockWidgetArea, _rightWidget);
@ -268,12 +270,21 @@ bool MainWindow::saveFile(const QString fileName,const Global::Mode mode)
}
if(mode == Global::Mode::Analysis){
XlsxHandler::writeAnalysisOperation(filePath);
if(Global::_curveFileDataVtr.empty()){
logde<<"analysis experiemt data...";
XlsxHandler::writeFile(filePath);
// XlsxHandler::writeAnalysisOperation(filePath);
}else{
logde<<"analysis xlsx data...";
XlsxHandler::writeAnalysisOperation(filePath);
}
}else if(mode == Global::Mode::Experiment){
logde<<"writeFile...";
XlsxHandler::writeFile(filePath);
#if 0
// Clear data.
Global::clearExperimentData();
#endif
}
return true;

View File

@ -332,6 +332,9 @@
</property>
</action>
<action name="actionSaveas">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>另存为</string>
</property>

View File

@ -963,6 +963,8 @@ void CentralWidget::clearData(const CentralWidget::ClearDataMode mode)
Global::_curveFileDataVtr.clear();
AnalysisOperationRecorder::_analysisOperationVtr.clear();
// Set lines visiable false.
_line1->setVisible(false);
_line2->setVisible(false);
@ -1295,6 +1297,7 @@ void CentralWidget::loadAnalysisData(
void CentralWidget::clearAllData()
{
Global::_mode = Global::Mode::Analysis;
clearData(ClearDataMode::All);
}