Compare commits

..

No commits in common. "630552b1563d61ff173136630f48bcc982e340dc" and "e3117d66876f692422002dddd455b53894d62556" have entirely different histories.

24 changed files with 99 additions and 315 deletions

Binary file not shown.

View File

@ -5,7 +5,6 @@
<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>
@ -351,11 +350,6 @@
<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"/>
@ -403,7 +397,6 @@
<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>
@ -550,11 +543,6 @@
<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>
@ -891,16 +879,6 @@
</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"/>
@ -1127,12 +1105,6 @@
<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>
@ -1153,6 +1125,12 @@
<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>
@ -1338,7 +1316,6 @@
<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>
@ -1568,11 +1545,6 @@
<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,7 +42,6 @@ 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() {
@ -278,8 +277,7 @@ 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"));
@ -293,8 +291,3 @@ void FileManagerMenu::AddPolarFile()
SaveWorkSpace(); SaveWorkSpace();
} }
} }
void FileManagerMenu::AddImageFile()
{
}

View File

@ -26,7 +26,6 @@ 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,16 +104,6 @@
</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>0</number> <number>5</number>
</property> </property>
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>5</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>0</number> <number>5</number>
</property> </property>
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>5</number>
</property> </property>
<item> <item>
<widget class="QToolBox" name="PresetModelToolBox"> <widget class="QToolBox" name="PresetModelToolBox">
@ -38,6 +38,13 @@
</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,12 +434,6 @@ 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))
{ {
@ -552,12 +546,6 @@ 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,9 +45,7 @@ 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
@ -113,19 +111,10 @@ 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);
@ -145,12 +134,14 @@ void LightPanel::updateParseFile(const QString & strFile, int nT, FileEntryLight
pLyt->addWidget(pLampLab); pLyt->addWidget(pLampLab);
pLyt->addWidget(pTextLab); pLyt->addWidget(pTextLab);
layout->addLayout(pLyt, nI, i); pMainLyt->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())
{ {
@ -183,8 +174,6 @@ 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);
@ -194,32 +183,3 @@ 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,8 +64,6 @@ 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,9 +234,6 @@ 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,10 +122,6 @@ 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<int>::of(&QSpinBox::valueChanged), this, &AddCurveFileDlg::onCurveDataChanged); connect(ui->xValueSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &AddCurveFileDlg::onCurveDataChanged);
connect(ui->yValueSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &AddCurveFileDlg::onCurveDataChanged); connect(ui->yValueSpinBox, QOverload<double>::of(&QDoubleSpinBox::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,11 +87,9 @@ 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();
} }
@ -101,13 +99,10 @@ 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;
} }
@ -126,7 +121,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 [%2,%3] (%4,%5,%6)") displayText = QString("%1 (%.2f,%.2f) (%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)
@ -139,8 +134,6 @@ 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);
} }
@ -176,36 +169,21 @@ 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);
ui->dataStopSpinBox->blockSignals(false); } else {
}
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);
@ -256,7 +234,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 [%2,%3] (%4,%5,%6)") displayText = QString("%1 (%.2f,%.2f) (%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)
@ -365,32 +343,18 @@ 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);
ui->dataStopSpinBox->blockSignals(false); } else {
}
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;
@ -597,12 +561,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;
} }
@ -616,21 +580,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 tr("Data Files (*.txt *.csv *.dat);;All Files (*.*)"); return "Data Files (*.txt *.csv *.dat);;All Files (*.*)";
} }
QString AddCurveFileDlg::getDialogTitle() const { QString AddCurveFileDlg::getDialogTitle() const {
return tr("Add Curve Data File"); return "Add Curve Data File";
} }
void AddCurveFileDlg::onSure() { void AddCurveFileDlg::onSure() {

View File

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

View File

@ -230,24 +230,17 @@ 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_));
@ -297,22 +290,15 @@ 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(", "));
ui->lightDataEdit->blockSignals(false); } else {
}
else
{
ui->lightDataEdit->clear(); ui->lightDataEdit->clear();
} }
} }
@ -352,11 +338,11 @@ bool AddLightFileDlg::validateSpecificParams() {
} }
QString AddLightFileDlg::getFileFilter() const { QString AddLightFileDlg::getFileFilter() const {
return tr("Light Data Files (*.txt *.csv *.dat);;All Files (*.*)"); return "Light Data Files (*.txt *.csv *.dat);;All Files (*.*)";
} }
QString AddLightFileDlg::getDialogTitle() const { QString AddLightFileDlg::getDialogTitle() const {
return tr("Add Light Data File"); return "Add Light Data File";
} }
void AddLightFileDlg::onSure() { void AddLightFileDlg::onSure() {
@ -390,7 +376,6 @@ 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 Name:</string> <string>Chart Names:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -135,37 +135,11 @@
<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>
@ -481,7 +455,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>0</height> <height>30</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
@ -494,7 +468,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>0</height> <height>30</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>0</height> <height>30</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>0</height> <height>30</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 tr("Data Files (*.txt *.csv *.dat);;All Files (*.*)"); return "Data Files (*.txt *.csv *.dat);;All Files (*.*)";
} }
QString AddPolarFileDlg::getDialogTitle() const QString AddPolarFileDlg::getDialogTitle() const
{ {
return tr("Add Polar"); return "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("Polar file count has reached the limit (9 files)"); errorMsg = tr("Curve 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,10 +560,6 @@ 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,29 +291,13 @@ 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->surfaceNameLineEdit->blockSignals(false);
ui->surfaceStartSpinBox->blockSignals(true);
ui->surfaceStartSpinBox->setValue(surface.start); ui->surfaceStartSpinBox->setValue(surface.start);
ui->surfaceStartSpinBox->blockSignals(false);
ui->surfaceStopSpinBox->blockSignals(true);
ui->surfaceStopSpinBox->setValue(surface.stop); 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>0</height> <height>30</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 tr("Table Files (*.txt *.csv *.tsv *.dat);;All Files (*.*)"); return QStringLiteral("Table Files (*.txt *.csv *.tsv *.dat);;All Files (*.*)");
} }
QString AddTableFileDlg::getDialogTitle() const { QString AddTableFileDlg::getDialogTitle() const {
return tr("Add Table Data File"); return QStringLiteral("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>0</height> <height>30</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>0</height> <height>30</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("<22><>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>AntennaPattern<EFBFBD>ļ<EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")); QMessageBox::information(nullptr, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), 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("<22><>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BeamPoint<EFBFBD>ļ<EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")); QMessageBox::information(nullptr, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), 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("<22><>ʾ"), QString::fromLocal8Bit("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>RD<52>ļ<EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>")); QMessageBox::information(nullptr, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>RD<EFBFBD>ļ<EFBFBD>·<EFBFBD><EFBFBD><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("<22><>ʾ"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Wave<EFBFBD>ļ<EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>")); QMessageBox::information(nullptr, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ʾ"), 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("<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>")); 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>"));
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,8 +510,6 @@ 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");
@ -561,8 +559,6 @@ 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");