modified listwgt

This commit is contained in:
pimin 2025-10-21 09:03:51 +08:00
parent dc83646fab
commit 1eb367d265

View File

@ -107,6 +107,25 @@ void TargetListWgt::updateParseFile(const QString & strFile, int nT, QVariantLis
double t = listLine.at(nT).toDouble();
QMap<int, QVariantList> mapData;
if (listCurve.size() == 0)
{
int nCount = ui.tableWidget->columnCount();
int nRow = (listLine.size() - 1) / nCount;
for (int nI = 0; nI < nRow; nI++)
{
int nBegin = nT + 1 + nI * nCount;
QVariantList varList;
for (int nJ = 0; nJ < nCount; nJ++)
{
int nIndex = nBegin + nJ;
double data = listLine.at(nIndex).toDouble();
varList.push_back(data);
}
mapData.insert(nI, varList);
}
}
else
{
for (int nI = 0; nI < listCurve.size(); nI++)
{
QVariantMap mapCurve = listCurve.at(nI).toMap();
@ -122,6 +141,8 @@ void TargetListWgt::updateParseFile(const QString & strFile, int nT, QVariantLis
}
mapData.insert(nI, varList);
}
}
m_dataTable.insert(t, mapData);
}
}