2025-05-30T13:46:39
This commit is contained in:
parent
2a23ee4c74
commit
62f3de1511
BIN
experiment_data/analysis_state/13-2-new.xlsx
Normal file
BIN
experiment_data/analysis_state/13-2-new.xlsx
Normal file
Binary file not shown.
BIN
experiment_data/analysis_state/13-4-new.xlsx
Normal file
BIN
experiment_data/analysis_state/13-4-new.xlsx
Normal file
Binary file not shown.
BIN
experiment_data/analysis_state/13-new.xlsx
Normal file
BIN
experiment_data/analysis_state/13-new.xlsx
Normal file
Binary file not shown.
BIN
experiment_data/analysis_state/30-new.xlsx
Normal file
BIN
experiment_data/analysis_state/30-new.xlsx
Normal file
Binary file not shown.
BIN
experiment_data/analysis_state/new.xlsx
Normal file
BIN
experiment_data/analysis_state/new.xlsx
Normal file
Binary file not shown.
BIN
experiment_data/analysis_state/~$30-new.xlsx
Normal file
BIN
experiment_data/analysis_state/~$30-new.xlsx
Normal file
Binary file not shown.
BIN
experiment_data/analysis_state/~$new.xlsx
Normal file
BIN
experiment_data/analysis_state/~$new.xlsx
Normal file
Binary file not shown.
BIN
experiment_data/sample_data/30-new.xlsx
Normal file
BIN
experiment_data/sample_data/30-new.xlsx
Normal file
Binary file not shown.
BIN
experiment_data/sample_data/33-new.xlsx
Normal file
BIN
experiment_data/sample_data/33-new.xlsx
Normal file
Binary file not shown.
Binary file not shown.
@ -9,7 +9,7 @@ CONFIG+=precompile_header
|
|||||||
PRECOMPILED_HEADER=stable.h
|
PRECOMPILED_HEADER=stable.h
|
||||||
|
|
||||||
#
|
#
|
||||||
VERSION = 1.0.1
|
VERSION = 1.0.2
|
||||||
# 设置目标文件名,包含版本号
|
# 设置目标文件名,包含版本号
|
||||||
TARGET = DSCAnalysisTool_$${VERSION}
|
TARGET = DSCAnalysisTool_$${VERSION}
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ int XlsxHandler::readFile(const QString filePath, Global::CurveFileData &cfd)
|
|||||||
{
|
{
|
||||||
if(!QFile::exists(filePath))
|
if(!QFile::exists(filePath))
|
||||||
{
|
{
|
||||||
qDebug() << "xlsx file not existed:" << filePath;
|
logde<< "xlsx file not existed:" << filePath.toStdString();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ void XlsxHandler::writeFile(const QString filePath)
|
|||||||
const Phase& phase = ei.phaseVtr.at(i);
|
const Phase& phase = ei.phaseVtr.at(i);
|
||||||
|
|
||||||
if(phase.onoff == 0){
|
if(phase.onoff == 0){
|
||||||
logde<<"onoff == 0.";
|
// logde<<"onoff == 0.";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,8 +381,9 @@ void XlsxHandler::writeAnalysisOperation(const QString filePath)
|
|||||||
QXlsx::Document* XlsxHandler::openXlsxFile(const QString& sourceFilePath) {
|
QXlsx::Document* XlsxHandler::openXlsxFile(const QString& sourceFilePath) {
|
||||||
// 检查文件是否存在
|
// 检查文件是否存在
|
||||||
if (!QFile::exists(sourceFilePath)) {
|
if (!QFile::exists(sourceFilePath)) {
|
||||||
qDebug() << "xlsx file not existed:" << sourceFilePath;
|
logde << "xlsx file not existed:" << sourceFilePath.toStdString();
|
||||||
return nullptr;
|
QXlsx::Document* xlsx = new QXlsx::Document(sourceFilePath);
|
||||||
|
return xlsx;
|
||||||
}
|
}
|
||||||
QFileInfo fileInfo(sourceFilePath);
|
QFileInfo fileInfo(sourceFilePath);
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,8 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
this->setToolTip(".....");
|
this->setToolTip(".....");
|
||||||
|
|
||||||
|
ui->actionSaveas->setVisible(false);
|
||||||
|
|
||||||
setCentralWidget(_centralWidget);
|
setCentralWidget(_centralWidget);
|
||||||
addDockWidget(Qt::LeftDockWidgetArea, _leftWidget);
|
addDockWidget(Qt::LeftDockWidgetArea, _leftWidget);
|
||||||
addDockWidget(Qt::RightDockWidgetArea, _rightWidget);
|
addDockWidget(Qt::RightDockWidgetArea, _rightWidget);
|
||||||
@ -268,12 +270,21 @@ bool MainWindow::saveFile(const QString fileName,const Global::Mode mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(mode == Global::Mode::Analysis){
|
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){
|
}else if(mode == Global::Mode::Experiment){
|
||||||
|
logde<<"writeFile...";
|
||||||
XlsxHandler::writeFile(filePath);
|
XlsxHandler::writeFile(filePath);
|
||||||
|
#if 0
|
||||||
// Clear data.
|
// Clear data.
|
||||||
Global::clearExperimentData();
|
Global::clearExperimentData();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -332,6 +332,9 @@
|
|||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionSaveas">
|
<action name="actionSaveas">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>另存为</string>
|
<string>另存为</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@ -963,6 +963,8 @@ void CentralWidget::clearData(const CentralWidget::ClearDataMode mode)
|
|||||||
|
|
||||||
Global::_curveFileDataVtr.clear();
|
Global::_curveFileDataVtr.clear();
|
||||||
|
|
||||||
|
AnalysisOperationRecorder::_analysisOperationVtr.clear();
|
||||||
|
|
||||||
// Set lines visiable false.
|
// Set lines visiable false.
|
||||||
_line1->setVisible(false);
|
_line1->setVisible(false);
|
||||||
_line2->setVisible(false);
|
_line2->setVisible(false);
|
||||||
@ -1295,6 +1297,7 @@ void CentralWidget::loadAnalysisData(
|
|||||||
|
|
||||||
void CentralWidget::clearAllData()
|
void CentralWidget::clearAllData()
|
||||||
{
|
{
|
||||||
|
Global::_mode = Global::Mode::Analysis;
|
||||||
clearData(ClearDataMode::All);
|
clearData(ClearDataMode::All);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user