Compare commits

..

2 Commits

Author SHA1 Message Date
630552b156 modified panel 2025-11-02 11:36:10 +08:00
7597087fb7 modified addPolarDlg 2025-11-02 09:27:55 +08:00
24 changed files with 317 additions and 101 deletions

Binary file not shown.

View File

@ -5,6 +5,7 @@
<name>AddCurveFileDlg</name> <name>AddCurveFileDlg</name>
<message> <message>
<location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="14"/> <location filename="../ui/WorkSpace/AddCurveFileDlg.ui" line="14"/>
<location filename="../ui/WorkSpace/AddCurveFileDlg.cpp" line="597"/>
<source>Add Curve Data File</source> <source>Add Curve Data File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -350,6 +351,11 @@
<source>X axis tick count must be at least 2.</source> <source>X axis tick count must be at least 2.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../ui/WorkSpace/AddCurveFileDlg.cpp" line="593"/>
<source>Data Files (*.txt *.csv *.dat);;All Files (*.*)</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../ui/WorkSpace/AddCurveFileDlg.cpp" line="605"/> <location filename="../ui/WorkSpace/AddCurveFileDlg.cpp" line="605"/>
<location filename="../ui/WorkSpace/AddCurveFileDlg.cpp" line="634"/> <location filename="../ui/WorkSpace/AddCurveFileDlg.cpp" line="634"/>
@ -397,6 +403,7 @@
<name>AddLightFileDlg</name> <name>AddLightFileDlg</name>
<message> <message>
<location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="14"/> <location filename="../ui/WorkSpace/AddLightFileDlg.ui" line="14"/>
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="345"/>
<source>Add Light Data File</source> <source>Add Light Data File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -543,6 +550,11 @@
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="341"/>
<source>Light Data Files (*.txt *.csv *.dat);;All Files (*.*)</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="353"/> <location filename="../ui/WorkSpace/AddLightFileDlg.cpp" line="353"/>
<source>Warning</source> <source>Warning</source>
@ -879,6 +891,16 @@
</context> </context>
<context> <context>
<name>AddPolarFileDlg</name> <name>AddPolarFileDlg</name>
<message>
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="33"/>
<source>Data Files (*.txt *.csv *.dat);;All Files (*.*)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="38"/>
<source>Add Polar</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="47"/> <location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="47"/>
<location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="55"/> <location filename="../ui/WorkSpace/AddPolarFileDlg.cpp" line="55"/>
@ -1105,6 +1127,12 @@
<source>Z Count:</source> <source>Z Count:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="464"/>
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="544"/>
<source>Name:</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="486"/> <location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="486"/>
<source>Surface Management</source> <source>Surface Management</source>
@ -1125,12 +1153,6 @@
<source>Surface Properties</source> <source>Surface Properties</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="464"/>
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="544"/>
<source>Name:</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="567"/> <location filename="../ui/WorkSpace/AddSurfaceFileDlg.ui" line="567"/>
<source>Color:</source> <source>Color:</source>
@ -1316,6 +1338,7 @@
<name>AddTableFileDlg</name> <name>AddTableFileDlg</name>
<message> <message>
<location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="14"/> <location filename="../ui/WorkSpace/AddTableFileDlg.ui" line="14"/>
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="346"/>
<source>Add Table Data File</source> <source>Add Table Data File</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -1545,6 +1568,11 @@
<source>Curve &apos;%1&apos; data count (%2) doesn&apos;t match headers count (%3).</source> <source>Curve &apos;%1&apos; data count (%2) doesn&apos;t match headers count (%3).</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="342"/>
<source>Table Files (*.txt *.csv *.tsv *.dat);;All Files (*.*)</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="358"/> <location filename="../ui/WorkSpace/AddTableFileDlg.cpp" line="358"/>
<source>Please enter a table name.</source> <source>Please enter a table name.</source>

View File

@ -42,6 +42,7 @@ void FileManagerMenu::InitConnect() {
connect(ui->menu_table_file, &QToolButton::clicked, this, &FileManagerMenu::AddTableFile); connect(ui->menu_table_file, &QToolButton::clicked, this, &FileManagerMenu::AddTableFile);
connect(ui->menu_light_file, &QToolButton::clicked, this, &FileManagerMenu::AddLightFile); connect(ui->menu_light_file, &QToolButton::clicked, this, &FileManagerMenu::AddLightFile);
connect(ui->menu_polar_file, &QToolButton::clicked, this, &FileManagerMenu::AddPolarFile); connect(ui->menu_polar_file, &QToolButton::clicked, this, &FileManagerMenu::AddPolarFile);
connect(ui->menu_image_file, &QToolButton::clicked, this, &FileManagerMenu::AddImageFile);
} }
void FileManagerMenu::NewWorkSpace() { void FileManagerMenu::NewWorkSpace() {
@ -277,7 +278,8 @@ void FileManagerMenu::AddLightFile() {
} }
} }
void FileManagerMenu::AddPolarFile() { void FileManagerMenu::AddPolarFile()
{
auto current = WorkSpaceManager::Get().GetCurrent(); auto current = WorkSpaceManager::Get().GetCurrent();
if (nullptr == current) { if (nullptr == current) {
QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"), QObject::tr("please create workspace first")); QMessageBox::information(&MainFrame::Get(), QObject::tr("prompt"), QObject::tr("please create workspace first"));
@ -291,3 +293,8 @@ void FileManagerMenu::AddPolarFile() {
SaveWorkSpace(); SaveWorkSpace();
} }
} }
void FileManagerMenu::AddImageFile()
{
}

View File

@ -26,6 +26,7 @@ protected:
void AddTableFile(); void AddTableFile();
void AddLightFile(); void AddLightFile();
void AddPolarFile(); void AddPolarFile();
void AddImageFile();
signals: signals:
void LoadDyt(const QString& path); void LoadDyt(const QString& path);

View File

@ -104,6 +104,16 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QToolButton" name="menu_image_file">
<property name="toolTip">
<string>new image file</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">

View File

@ -18,16 +18,16 @@
<number>5</number> <number>5</number>
</property> </property>
<property name="leftMargin"> <property name="leftMargin">
<number>5</number> <number>0</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>5</number> <number>0</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>5</number> <number>0</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>5</number> <number>0</number>
</property> </property>
<item> <item>
<widget class="QToolBox" name="PresetModelToolBox"> <widget class="QToolBox" name="PresetModelToolBox">
@ -38,13 +38,6 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>PresetModelListWidget</class>
<extends>QListWidget</extends>
<header>ui/ModelBrowser/PresetModelListWidget.h</header>
</customwidget>
</customwidgets>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

View File

@ -434,6 +434,12 @@ void CurvePanel::updateParseWaveFile(const QString& strFile, int nT, FileEntryCu
return; return;
} }
curveChart->removeAllSeries();
m_seriesIDMap.clear();
m_dataWava.clear();
m_dataReport.clear();
QFile file(strFile); QFile file(strFile);
if (file.open(QIODevice::ReadOnly)) if (file.open(QIODevice::ReadOnly))
{ {
@ -546,6 +552,12 @@ void CurvePanel::updateParseReportFile(const QString & strFile, int nT, FileEntr
return; return;
} }
curveChart->removeAllSeries();
m_seriesIDMap.clear();
m_dataWava.clear();
m_dataReport.clear();
QFile file(strFile); QFile file(strFile);
if (file.open(QIODevice::ReadOnly)) if (file.open(QIODevice::ReadOnly))
{ {

View File

@ -45,7 +45,9 @@ void LightPanel::RefreshPanel()
void LightPanel::InitUI() void LightPanel::InitUI()
{ {
QGridLayout* pMainLyt = new QGridLayout(this);
pMainLyt->setContentsMargins(5, 0, 5, 0);
setLayout(pMainLyt);
} }
QString LightPanel::GetTypeDisplayName() const QString LightPanel::GetTypeDisplayName() const
@ -111,10 +113,19 @@ void LightPanel::updateParseFile(const QString & strFile, int nT, FileEntryLight
return; return;
} }
m_dataLamp.clear();
clearLightPanel();
QGridLayout* layout = qobject_cast<QGridLayout*>(this->layout());
if (!layout)
{
return;
}
QFile file(strFile); QFile file(strFile);
if (file.open(QIODevice::ReadOnly)) if (file.open(QIODevice::ReadOnly))
{ {
QGridLayout* pMainLyt = new QGridLayout(this);
for (int nI = 0; nI < listCurve.size(); nI++) for (int nI = 0; nI < listCurve.size(); nI++)
{ {
FileEntryLight::LightRowProperty prop = listCurve.at(nI); FileEntryLight::LightRowProperty prop = listCurve.at(nI);
@ -134,14 +145,12 @@ void LightPanel::updateParseFile(const QString & strFile, int nT, FileEntryLight
pLyt->addWidget(pLampLab); pLyt->addWidget(pLampLab);
pLyt->addWidget(pTextLab); pLyt->addWidget(pTextLab);
pMainLyt->addLayout(pLyt, nI, i); layout->addLayout(pLyt, nI, i);
QString strKey = QString::number(nI) + "-" + QString::number(i); QString strKey = QString::number(nI) + "-" + QString::number(i);
m_mapLamp.insert(strKey, pLampLab); m_mapLamp.insert(strKey, pLampLab);
} }
} }
pMainLyt->setContentsMargins(5, 0, 5, 0);
setLayout(pMainLyt);
while (!file.atEnd()) while (!file.atEnd())
{ {
@ -174,6 +183,8 @@ void LightPanel::updateParseFile(const QString & strFile, int nT, FileEntryLight
void LightPanel::updateLampColor(const QString & strOpenColor, const QString & strCloseColor) void LightPanel::updateLampColor(const QString & strOpenColor, const QString & strCloseColor)
{ {
m_lampColor.clear();
{ {
QString strStyle = "QLabel{background-color: rgb(" + strCloseColor + ");border-radius: 10px;}; "; QString strStyle = "QLabel{background-color: rgb(" + strCloseColor + ");border-radius: 10px;}; ";
m_lampColor.insert(0, strStyle); m_lampColor.insert(0, strStyle);
@ -183,3 +194,32 @@ void LightPanel::updateLampColor(const QString & strOpenColor, const QString & s
m_lampColor.insert(1, strStyle); m_lampColor.insert(1, strStyle);
} }
} }
void LightPanel::clearLightPanel()
{
if (auto* layout = qobject_cast<QGridLayout*>(this->layout()))
{
while (layout->count() > 0)
{
QLayoutItem* item = layout->takeAt(0);
if (item)
{
auto* childLayout = item->layout();
while (childLayout->count() > 0)
{
QLayoutItem* itemChild = childLayout->takeAt(0);
if (itemChild)
{
if (auto* w = itemChild->widget())
{
w->deleteLater();
}
delete itemChild;
}
}
delete item;
}
}
}
m_mapLamp.clear();
}

View File

@ -64,6 +64,8 @@ private:
void updateParseFile(const QString& strFile, int nT, FileEntryLight::LightRowProperties listCurve); void updateParseFile(const QString& strFile, int nT, FileEntryLight::LightRowProperties listCurve);
void updateLampColor(const QString& strOpenColor, const QString& strCloseColor); void updateLampColor(const QString& strOpenColor, const QString& strCloseColor);
void clearLightPanel();
private: private:
QMap<int, QString> m_lampColor; QMap<int, QString> m_lampColor;
QMap<QString, SignalLabel*> m_mapLamp; QMap<QString, SignalLabel*> m_mapLamp;

View File

@ -234,6 +234,9 @@ void SurfacePanel::updateParseFile(const QString & strFile, int nT, FileEntrySur
return; return;
} }
m_data.clear();
m_pSeries->dataProxy()->resetArray(nullptr);
QFile file(strFile); QFile file(strFile);
if (file.open(QIODevice::ReadOnly)) if (file.open(QIODevice::ReadOnly))
{ {

View File

@ -122,6 +122,10 @@ void TablePanel::updateParseFile(const QString & strFile, int nT, FileEntryTable
return; return;
} }
m_tableSetting.clear();
m_dataTable.clear();
clearTable();
QFile file(strFile); QFile file(strFile);
if (file.open(QIODevice::ReadOnly)) if (file.open(QIODevice::ReadOnly))
{ {

View File

@ -54,8 +54,8 @@ void AddCurveFileDlg::setupConnections() {
connect(ui->curveNameEdit, &QLineEdit::textChanged, this, &AddCurveFileDlg::onCurveNameChanged); connect(ui->curveNameEdit, &QLineEdit::textChanged, this, &AddCurveFileDlg::onCurveNameChanged);
connect(ui->dataStartSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &AddCurveFileDlg::onCurveDataChanged); connect(ui->dataStartSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &AddCurveFileDlg::onCurveDataChanged);
connect(ui->dataStopSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &AddCurveFileDlg::onCurveDataChanged); connect(ui->dataStopSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &AddCurveFileDlg::onCurveDataChanged);
connect(ui->xValueSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &AddCurveFileDlg::onCurveDataChanged); connect(ui->xValueSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &AddCurveFileDlg::onCurveDataChanged);
connect(ui->yValueSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &AddCurveFileDlg::onCurveDataChanged); connect(ui->yValueSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &AddCurveFileDlg::onCurveDataChanged);
// Dialog buttons // Dialog buttons
connect(ui->addBtn, &QPushButton::clicked, this, &AddCurveFileDlg::onSure); connect(ui->addBtn, &QPushButton::clicked, this, &AddCurveFileDlg::onSure);
@ -87,9 +87,11 @@ void AddCurveFileDlg::updateFileInfo(const QString& filePath) {
ui->filePathEdit->setText(filePath); ui->filePathEdit->setText(filePath);
} }
void AddCurveFileDlg::onAddCurveClicked() { void AddCurveFileDlg::onAddCurveClicked()
{
// Save current curve properties if any curve is selected // Save current curve properties if any curve is selected
if (currentCurveIndex_ >= 0) { if (currentCurveIndex_ >= 0)
{
saveCurveProperties(); saveCurveProperties();
} }
@ -99,10 +101,13 @@ void AddCurveFileDlg::onAddCurveClicked() {
newCurve.color = generateCurveColor(); newCurve.color = generateCurveColor();
// Set default values based on chart type // Set default values based on chart type
if (chartProperties_.chartType == ChartType::Wave) { if (chartProperties_.chartType == ChartType::Wave)
{
newCurve.data.wave.start = 1; newCurve.data.wave.start = 1;
newCurve.data.wave.stop = 241; newCurve.data.wave.stop = 241;
} else { }
else
{
newCurve.data.report.x = 0.0; newCurve.data.report.x = 0.0;
newCurve.data.report.y = 0.0; newCurve.data.report.y = 0.0;
} }
@ -121,7 +126,7 @@ void AddCurveFileDlg::onAddCurveClicked() {
.arg(newCurve.color.green()) .arg(newCurve.color.green())
.arg(newCurve.color.blue()); .arg(newCurve.color.blue());
} else { } else {
displayText = QString("%1 (%.2f,%.2f) (%4,%5,%6)") displayText = QString("%1 [%2,%3] (%4,%5,%6)")
.arg(newCurve.name) .arg(newCurve.name)
.arg(newCurve.data.report.x) .arg(newCurve.data.report.x)
.arg(newCurve.data.report.y) .arg(newCurve.data.report.y)
@ -134,6 +139,8 @@ void AddCurveFileDlg::onAddCurveClicked() {
ui->curveListWidget->addItem(item); ui->curveListWidget->addItem(item);
++currentCurveIndex_; ++currentCurveIndex_;
ui->curveNameEdit->setText(newCurve.name);
// Select the new curve // Select the new curve
ui->curveListWidget->setCurrentRow(curves_.size() - 1); ui->curveListWidget->setCurrentRow(curves_.size() - 1);
} }
@ -169,21 +176,36 @@ void AddCurveFileDlg::onRemoveCurveClicked() {
} }
void AddCurveFileDlg::onCurveListWidgetItemClicked(QListWidgetItem* item) { void AddCurveFileDlg::onCurveListWidgetItemClicked(QListWidgetItem* item) {
if (!item) { if (!item)
{
return; return;
} }
int clickedIndex = ui->curveListWidget->row(item); int clickedIndex = ui->curveListWidget->row(item);
if (clickedIndex == currentCurveIndex_) { if (clickedIndex == currentCurveIndex_)
{
ui->curveNameEdit->setText(curves_[currentCurveIndex_].name); ui->curveNameEdit->setText(curves_[currentCurveIndex_].name);
if (chartProperties_.chartType == ChartType::Wave) { if (chartProperties_.chartType == ChartType::Wave)
{
ui->dataStartSpinBox->blockSignals(true);
ui->dataStartSpinBox->setValue(curves_[currentCurveIndex_].data.wave.start); ui->dataStartSpinBox->setValue(curves_[currentCurveIndex_].data.wave.start);
ui->dataStartSpinBox->blockSignals(false);
ui->dataStopSpinBox->blockSignals(true);
ui->dataStopSpinBox->setValue(curves_[currentCurveIndex_].data.wave.stop); ui->dataStopSpinBox->setValue(curves_[currentCurveIndex_].data.wave.stop);
} else { ui->dataStopSpinBox->blockSignals(false);
}
else
{
ui->xValueSpinBox->blockSignals(true);
ui->xValueSpinBox->setValue(curves_[currentCurveIndex_].data.report.x); ui->xValueSpinBox->setValue(curves_[currentCurveIndex_].data.report.x);
ui->xValueSpinBox->blockSignals(false);
ui->yValueSpinBox->blockSignals(true);
ui->yValueSpinBox->setValue(curves_[currentCurveIndex_].data.report.y); ui->yValueSpinBox->setValue(curves_[currentCurveIndex_].data.report.y);
ui->yValueSpinBox->blockSignals(false);
} }
updateColorPreview(curves_[currentCurveIndex_].color); updateColorPreview(curves_[currentCurveIndex_].color);
@ -234,7 +256,7 @@ void AddCurveFileDlg::onCurveNameChanged() {
.arg(curves_[currentCurveIndex_].color.green()) .arg(curves_[currentCurveIndex_].color.green())
.arg(curves_[currentCurveIndex_].color.blue()); .arg(curves_[currentCurveIndex_].color.blue());
} else { } else {
displayText = QString("%1 (%.2f,%.2f) (%4,%5,%6)") displayText = QString("%1 [%2,%3] (%4,%5,%6)")
.arg(newName) .arg(newName)
.arg(curves_[currentCurveIndex_].data.report.x) .arg(curves_[currentCurveIndex_].data.report.x)
.arg(curves_[currentCurveIndex_].data.report.y) .arg(curves_[currentCurveIndex_].data.report.y)
@ -343,18 +365,32 @@ void AddCurveFileDlg::addCurveToList(const FileEntryCurve::CurveProperty& curve)
} }
void AddCurveFileDlg::updateCurveProperties() { void AddCurveFileDlg::updateCurveProperties() {
if (currentCurveIndex_ >= 0 && currentCurveIndex_ < curves_.size()) { if (currentCurveIndex_ >= 0 && currentCurveIndex_ < curves_.size())
{
const FileEntryCurve::CurveProperty& curve = curves_[currentCurveIndex_]; const FileEntryCurve::CurveProperty& curve = curves_[currentCurveIndex_];
ui->curveNameEdit->setText(curve.name); ui->curveNameEdit->setText(curve.name);
// Update properties based on chart type // Update properties based on chart type
if (chartProperties_.chartType == ChartType::Wave) { if (chartProperties_.chartType == ChartType::Wave)
{
ui->dataStartSpinBox->blockSignals(true);
ui->dataStartSpinBox->setValue(curve.data.wave.start); ui->dataStartSpinBox->setValue(curve.data.wave.start);
ui->dataStartSpinBox->blockSignals(false);
ui->dataStopSpinBox->blockSignals(true);
ui->dataStopSpinBox->setValue(curve.data.wave.stop); ui->dataStopSpinBox->setValue(curve.data.wave.stop);
} else { ui->dataStopSpinBox->blockSignals(false);
}
else
{
ui->xValueSpinBox->blockSignals(true);
ui->xValueSpinBox->setValue(curve.data.report.x); ui->xValueSpinBox->setValue(curve.data.report.x);
ui->xValueSpinBox->blockSignals(false);
ui->yValueSpinBox->blockSignals(true);
ui->yValueSpinBox->setValue(curve.data.report.y); ui->yValueSpinBox->setValue(curve.data.report.y);
ui->yValueSpinBox->blockSignals(false);
} }
selectedColor_ = curve.color; selectedColor_ = curve.color;
@ -561,12 +597,12 @@ bool AddCurveFileDlg::validateSpecificParams() {
double yMin = ui->yMinSpinBox->value(); double yMin = ui->yMinSpinBox->value();
double yMax = ui->yMaxSpinBox->value(); double yMax = ui->yMaxSpinBox->value();
if (xMin >= xMax) { if (xMin > xMax) {
QMessageBox::warning(this, tr("Validation Error"), tr("X axis minimum value must be less than maximum value.")); QMessageBox::warning(this, tr("Validation Error"), tr("X axis minimum value must be less than maximum value."));
return false; return false;
} }
if (yMin >= yMax) { if (yMin > yMax) {
QMessageBox::warning(this, tr("Validation Error"), tr("Y axis minimum value must be less than maximum value.")); QMessageBox::warning(this, tr("Validation Error"), tr("Y axis minimum value must be less than maximum value."));
return false; return false;
} }
@ -580,21 +616,21 @@ bool AddCurveFileDlg::validateSpecificParams() {
} }
// X axis tick count validation // X axis tick count validation
int xTickCount = ui->xCountSpinBox->value(); //int xTickCount = ui->xCountSpinBox->value();
if (xTickCount < 2) { //if (xTickCount < 2) {
QMessageBox::warning(this, tr("Validation Error"), tr("X axis tick count must be at least 2.")); // QMessageBox::warning(this, tr("Validation Error"), tr("X axis tick count must be at least 2."));
return false; // return false;
} //}
return true; return true;
} }
QString AddCurveFileDlg::getFileFilter() const { QString AddCurveFileDlg::getFileFilter() const {
return "Data Files (*.txt *.csv *.dat);;All Files (*.*)"; return tr("Data Files (*.txt *.csv *.dat);;All Files (*.*)");
} }
QString AddCurveFileDlg::getDialogTitle() const { QString AddCurveFileDlg::getDialogTitle() const {
return "Add Curve Data File"; return tr("Add Curve Data File");
} }
void AddCurveFileDlg::onSure() { void AddCurveFileDlg::onSure() {

View File

@ -2,12 +2,15 @@
<ui version="4.0"> <ui version="4.0">
<class>AddCurveFileDlg</class> <class>AddCurveFileDlg</class>
<widget class="QWidget" name="AddCurveFileDlg"> <widget class="QWidget" name="AddCurveFileDlg">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>600</width> <width>600</width>
<height>789</height> <height>842</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -287,7 +290,7 @@
</size> </size>
</property> </property>
<property name="minimum"> <property name="minimum">
<number>2</number> <number>0</number>
</property> </property>
<property name="maximum"> <property name="maximum">
<number>50</number> <number>50</number>
@ -377,7 +380,7 @@
</size> </size>
</property> </property>
<property name="minimum"> <property name="minimum">
<number>2</number> <number>0</number>
</property> </property>
<property name="maximum"> <property name="maximum">
<number>50</number> <number>50</number>
@ -543,7 +546,7 @@
<property name="title"> <property name="title">
<string>Selected Curve Properties</string> <string>Selected Curve Properties</string>
</property> </property>
<layout class="QGridLayout" name="curvePropertiesGridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="curveNameLabel"> <widget class="QLabel" name="curveNameLabel">
<property name="minimumSize"> <property name="minimumSize">
@ -609,7 +612,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>50</width> <width>50</width>
<height>25</height> <height>0</height>
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -701,8 +704,11 @@
</item> </item>
<item row="4" column="0"> <item row="4" column="0">
<widget class="QLabel" name="xValueLabel"> <widget class="QLabel" name="xValueLabel">
<property name="visible"> <property name="minimumSize">
<bool>false</bool> <size>
<width>0</width>
<height>25</height>
</size>
</property> </property>
<property name="text"> <property name="text">
<string>X Value:</string> <string>X Value:</string>
@ -710,25 +716,31 @@
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="4" column="1">
<widget class="QDoubleSpinBox" name="xValueSpinBox"> <widget class="QSpinBox" name="xValueSpinBox">
<property name="visible"> <property name="minimumSize">
<bool>false</bool> <size>
<width>0</width>
<height>25</height>
</size>
</property> </property>
<property name="minimum"> <property name="minimum">
<double>-999999.000000000000000</double> <number>1</number>
</property> </property>
<property name="maximum"> <property name="maximum">
<double>999999.000000000000000</double> <number>999999</number>
</property> </property>
<property name="value"> <property name="value">
<double>0.000000000000000</double> <number>1</number>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0"> <item row="5" column="0">
<widget class="QLabel" name="yValueLabel"> <widget class="QLabel" name="yValueLabel">
<property name="visible"> <property name="minimumSize">
<bool>false</bool> <size>
<width>0</width>
<height>25</height>
</size>
</property> </property>
<property name="text"> <property name="text">
<string>Y Value:</string> <string>Y Value:</string>
@ -736,18 +748,21 @@
</widget> </widget>
</item> </item>
<item row="5" column="1"> <item row="5" column="1">
<widget class="QDoubleSpinBox" name="yValueSpinBox"> <widget class="QSpinBox" name="yValueSpinBox">
<property name="visible"> <property name="minimumSize">
<bool>false</bool> <size>
<width>0</width>
<height>25</height>
</size>
</property> </property>
<property name="minimum"> <property name="minimum">
<double>-999999.000000000000000</double> <number>1</number>
</property> </property>
<property name="maximum"> <property name="maximum">
<double>999999.000000000000000</double> <number>999999</number>
</property> </property>
<property name="value"> <property name="value">
<double>0.000000000000000</double> <number>2</number>
</property> </property>
</widget> </widget>
</item> </item>
@ -777,7 +792,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>30</height> <height>0</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
@ -793,7 +808,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>30</height> <height>0</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">

View File

@ -230,17 +230,24 @@ void AddLightFileDlg::addLightToList(const FileEntryLight::LightRowProperty& lig
ui->lightListWidget->addItem(item); ui->lightListWidget->addItem(item);
} }
void AddLightFileDlg::updateLightProperties() { void AddLightFileDlg::updateLightProperties()
if (currentLightIndex_ >= 0 && currentLightIndex_ < lights_.size()) { {
if (currentLightIndex_ >= 0 && currentLightIndex_ < lights_.size())
{
const FileEntryLight::LightRowProperty& light = lights_[currentLightIndex_]; const FileEntryLight::LightRowProperty& light = lights_[currentLightIndex_];
ui->lightNameEdit->blockSignals(true);
ui->lightNameEdit->setText(light.name.join(", ")); ui->lightNameEdit->setText(light.name.join(", "));
ui->lightNameEdit->blockSignals(false);
// Update data edit // Update data edit
QStringList dataStrings; QStringList dataStrings;
for (int dataValue : light.data) { for (int dataValue : light.data) {
dataStrings.append(QString::number(dataValue)); dataStrings.append(QString::number(dataValue));
} }
ui->lightDataEdit->blockSignals(true);
ui->lightDataEdit->setText(dataStrings.join(", ")); ui->lightDataEdit->setText(dataStrings.join(", "));
ui->lightDataEdit->blockSignals(false);
// Update row index display // Update row index display
ui->rowIndexValue->setText(QString::number(currentLightIndex_)); ui->rowIndexValue->setText(QString::number(currentLightIndex_));
@ -290,15 +297,22 @@ QString AddLightFileDlg::generateLightName() {
return QString("Light_%1").arg(lights_.size() + 1); return QString("Light_%1").arg(lights_.size() + 1);
} }
void AddLightFileDlg::updateDataDisplay() { void AddLightFileDlg::updateDataDisplay()
if (currentLightIndex_ >= 0 && currentLightIndex_ < lights_.size()) { {
if (currentLightIndex_ >= 0 && currentLightIndex_ < lights_.size())
{
const FileEntryLight::LightRowProperty& light = lights_[currentLightIndex_]; const FileEntryLight::LightRowProperty& light = lights_[currentLightIndex_];
QStringList dataStrings; QStringList dataStrings;
for (int dataValue : light.data) { for (int dataValue : light.data)
{
dataStrings.append(QString::number(dataValue)); dataStrings.append(QString::number(dataValue));
} }
ui->lightDataEdit->blockSignals(true);
ui->lightDataEdit->setText(dataStrings.join(", ")); ui->lightDataEdit->setText(dataStrings.join(", "));
} else { ui->lightDataEdit->blockSignals(false);
}
else
{
ui->lightDataEdit->clear(); ui->lightDataEdit->clear();
} }
} }
@ -338,11 +352,11 @@ bool AddLightFileDlg::validateSpecificParams() {
} }
QString AddLightFileDlg::getFileFilter() const { QString AddLightFileDlg::getFileFilter() const {
return "Light Data Files (*.txt *.csv *.dat);;All Files (*.*)"; return tr("Light Data Files (*.txt *.csv *.dat);;All Files (*.*)");
} }
QString AddLightFileDlg::getDialogTitle() const { QString AddLightFileDlg::getDialogTitle() const {
return "Add Light Data File"; return tr("Add Light Data File");
} }
void AddLightFileDlg::onSure() { void AddLightFileDlg::onSure() {
@ -376,6 +390,7 @@ void AddLightFileDlg::onSure() {
if (lightEntry) { if (lightEntry) {
lightEntry->SetName(sName); lightEntry->SetName(sName);
colorProperties_.timeParam = ui->SpinBox_time->value();
// Set color properties // Set color properties
lightEntry->SetColorProperties(colorProperties_); lightEntry->SetColorProperties(colorProperties_);

View File

@ -123,7 +123,7 @@
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>Chart Names:</string> <string>Chart Name:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -135,11 +135,37 @@
<height>25</height> <height>25</height>
</size> </size>
</property> </property>
<property name="text">
<string>Chart 1</string>
</property>
<property name="placeholderText"> <property name="placeholderText">
<string/> <string/>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QLabel" name="timeParamLabel">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="text">
<string>Time:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="SpinBox_time">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -455,7 +481,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>30</height> <height>0</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
@ -468,7 +494,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>30</height> <height>0</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">

View File

@ -754,7 +754,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>30</height> <height>0</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
@ -770,7 +770,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>30</height> <height>0</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">

View File

@ -30,12 +30,12 @@ AddPolarFileDlg::~AddPolarFileDlg() {
QString AddPolarFileDlg::getFileFilter() const QString AddPolarFileDlg::getFileFilter() const
{ {
return "Data Files (*.txt *.csv *.dat);;All Files (*.*)"; return tr("Data Files (*.txt *.csv *.dat);;All Files (*.*)");
} }
QString AddPolarFileDlg::getDialogTitle() const QString AddPolarFileDlg::getDialogTitle() const
{ {
return "Add Polar"; return tr("Add Polar");
} }
bool AddPolarFileDlg::validateSpecificParams() bool AddPolarFileDlg::validateSpecificParams()
@ -539,7 +539,7 @@ void AddPolarFileDlg::onSure()
QString errorMsg; QString errorMsg;
switch (result) { switch (result) {
case WorkSpace::FileEntryResult::LimitExceeded: case WorkSpace::FileEntryResult::LimitExceeded:
errorMsg = tr("Curve file count has reached the limit (9 files)"); errorMsg = tr("Polar file count has reached the limit (9 files)");
break; break;
case WorkSpace::FileEntryResult::Duplicate: case WorkSpace::FileEntryResult::Duplicate:
errorMsg = tr("File already exists"); errorMsg = tr("File already exists");
@ -560,6 +560,10 @@ void AddPolarFileDlg::onSure()
accept(); accept();
} }
else
{
QMessageBox::critical(this, tr("Error"), tr("Failed to create Polar file entry."));
}
} }
void AddPolarFileDlg::onCurveDataChanged() void AddPolarFileDlg::onCurveDataChanged()

View File

@ -291,13 +291,29 @@ void AddSurfaceFileDlg::updateSurfaceProperties()
if (currentSurfaceIndex_ >= 0 && currentSurfaceIndex_ < surfaces_.size()) { if (currentSurfaceIndex_ >= 0 && currentSurfaceIndex_ < surfaces_.size()) {
const auto& surface = surfaces_[currentSurfaceIndex_]; const auto& surface = surfaces_[currentSurfaceIndex_];
ui->surfaceNameLineEdit->blockSignals(true);
ui->surfaceNameLineEdit->setText(surface.name); ui->surfaceNameLineEdit->setText(surface.name);
ui->surfaceStartSpinBox->setValue(surface.start); ui->surfaceNameLineEdit->blockSignals(false);
ui->surfaceStopSpinBox->setValue(surface.stop);
ui->surfaceStartSpinBox->blockSignals(true);
ui->surfaceStartSpinBox->setValue(surface.start);
ui->surfaceStartSpinBox->blockSignals(false);
ui->surfaceStopSpinBox->blockSignals(true);
ui->surfaceStopSpinBox->setValue(surface.stop);
ui->surfaceStopSpinBox->blockSignals(false);
ui->comboBox_x->blockSignals(true);
ui->comboBox_x->setCurrentText(surface.x); ui->comboBox_x->setCurrentText(surface.x);
ui->comboBox_x->blockSignals(false);
ui->comboBox_y->blockSignals(true);
ui->comboBox_y->setCurrentText(surface.y); ui->comboBox_y->setCurrentText(surface.y);
ui->comboBox_y->blockSignals(false);
ui->comboBox_z->blockSignals(true);
ui->comboBox_z->setCurrentText(surface.z); ui->comboBox_z->setCurrentText(surface.z);
ui->comboBox_z->blockSignals(false);
selectedColor_ = surface.color; selectedColor_ = surface.color;
updateColorPreview(ui->surfaceColorButton, selectedColor_); updateColorPreview(ui->surfaceColorButton, selectedColor_);

View File

@ -573,7 +573,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>30</height> <height>0</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">

View File

@ -339,11 +339,11 @@ bool AddTableFileDlg::validateSpecificParams() {
} }
QString AddTableFileDlg::getFileFilter() const { QString AddTableFileDlg::getFileFilter() const {
return QStringLiteral("Table Files (*.txt *.csv *.tsv *.dat);;All Files (*.*)"); return tr("Table Files (*.txt *.csv *.tsv *.dat);;All Files (*.*)");
} }
QString AddTableFileDlg::getDialogTitle() const { QString AddTableFileDlg::getDialogTitle() const {
return QStringLiteral("Add Table Data File"); return tr("Add Table Data File");
} }
QString AddTableFileDlg::getSelectedFilePath() const { QString AddTableFileDlg::getSelectedFilePath() const {

View File

@ -512,7 +512,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>30</height> <height>0</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
@ -528,7 +528,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>30</height> <height>0</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">

View File

@ -1,4 +1,4 @@
#include "DYTChart.h" #include "DYTChart.h"
#include "FitCurveDialog.h" #include "FitCurveDialog.h"
#include "SurfaceDialog.h" #include "SurfaceDialog.h"
@ -267,7 +267,7 @@ void DYTChart::ParseAntennaPatternFile(const QString& strFile, std::vector<std::
{ {
if (strFile.isEmpty()) if (strFile.isEmpty())
{ {
QMessageBox::information(nullptr, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>AntennaPattern<EFBFBD>ļ<EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")); //QMessageBox::information(nullptr, QString::fromLocal8Bit("<22><>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>AntennaPattern<EFBFBD>ļ<EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
return; return;
} }
@ -296,7 +296,7 @@ void DYTChart::ParseBeamPointFile(const QString& strFile, std::vector<std::vecto
{ {
if (strFile.isEmpty()) if (strFile.isEmpty())
{ {
QMessageBox::information(nullptr, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BeamPoint<EFBFBD>ļ<EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")); //QMessageBox::information(nullptr, QString::fromLocal8Bit("<22><>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BeamPoint<EFBFBD>ļ<EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
return; return;
} }
@ -324,7 +324,7 @@ void DYTChart::ParseRD(const QString& strFile, std::vector<std::vector<float>>&
{ {
if (strFile.isEmpty()) if (strFile.isEmpty())
{ {
QMessageBox::information(nullptr, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>RD<EFBFBD>ļ<EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")); //QMessageBox::information(nullptr, QString::fromLocal8Bit("<22><>ʾ"), QString::fromLocal8Bit("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>RD<52>ļ<EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>"));
return; return;
} }
@ -366,7 +366,7 @@ void DYTChart::ParseWave(const QString& strFile, std::vector<std::vector<float>>
{ {
if (strFile.isEmpty()) if (strFile.isEmpty())
{ {
QMessageBox::information(nullptr, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Wave<EFBFBD>ļ<EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")); //QMessageBox::information(nullptr, QString::fromLocal8Bit("<22><>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Wave<EFBFBD>ļ<EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
return; return;
} }
@ -1240,7 +1240,7 @@ void DYTChart::slotUpdate()
} }
else else
{ {
QMessageBox::information(nullptr, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), QString::fromLocal8Bit("X<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")); //QMessageBox::information(nullptr, QString::fromLocal8Bit("<22><>ʾ"), QString::fromLocal8Bit("X<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
return; return;
} }
} }

View File

@ -1,4 +1,4 @@
#include "viewer/OsgWidget.h" #include "viewer/OsgWidget.h"
#include <QWindow> #include <QWindow>

View File

@ -1,4 +1,4 @@
#include "workspace/FileEntry.h" #include "workspace/FileEntry.h"
#include <QFileInfo> #include <QFileInfo>
@ -510,6 +510,8 @@ bool FileEntryLight::SaveFiles(tinyxml2::XMLElement* scene, tinyxml2::XMLDocumen
chartElement->SetAttribute("openColor", QColorToString(colorProperties_.openColor).toUtf8().constData()); chartElement->SetAttribute("openColor", QColorToString(colorProperties_.openColor).toUtf8().constData());
chartElement->SetAttribute("closeColor", QColorToString(colorProperties_.closeColor).toUtf8().constData()); chartElement->SetAttribute("closeColor", QColorToString(colorProperties_.closeColor).toUtf8().constData());
chartElement->SetAttribute("t", colorProperties_.timeParam);
// 为每个LightRowProperty创建<light>元素 // 为每个LightRowProperty创建<light>元素
for (const auto& lightRow : lightProperties_) { for (const auto& lightRow : lightProperties_) {
tinyxml2::XMLElement* lightElement = doc->NewElement("curve"); tinyxml2::XMLElement* lightElement = doc->NewElement("curve");
@ -559,6 +561,8 @@ bool FileEntryLight::ParseFiles(const tinyxml2::XMLElement* chartElement) {
colorProperties_.closeColor = StringToQColor(QString::fromUtf8(closeColorAttr)); colorProperties_.closeColor = StringToQColor(QString::fromUtf8(closeColorAttr));
} }
colorProperties_.timeParam = chartElement->DoubleAttribute("t", 0.0);
// 解析所有<light>元素 // 解析所有<light>元素
lightProperties_.clear(); lightProperties_.clear();
for (const tinyxml2::XMLElement* lightElement = chartElement->FirstChildElement("curve"); for (const tinyxml2::XMLElement* lightElement = chartElement->FirstChildElement("curve");